Compare commits
13 Commits
ball-traje
...
colonelpan
| Author | SHA1 | Date | |
|---|---|---|---|
| b30dbd01f5 | |||
| 303261f2d7 | |||
|
|
6f356f9535 | ||
|
|
5c0ff8c31b | ||
|
|
582c20170d | ||
| ef4782fc14 | |||
| 905a1ca6db | |||
| 6f63189703 | |||
| 958057764c | |||
| 361730cace | |||
| a150e1a300 | |||
| 63a376ed35 | |||
| 31f9852f4b |
876
src/index.tsx
876
src/index.tsx
File diff suppressed because it is too large
Load Diff
@@ -44,6 +44,7 @@ fragment VideoCardFields on VideoGQL {
|
||||
streamSegmentType
|
||||
isCompleted
|
||||
lastSegmentUploadedAt
|
||||
clientUploadStatus
|
||||
}
|
||||
tableSize
|
||||
pocketSize
|
||||
|
||||
34
src/operations/live_streams.gql
Normal file
34
src/operations/live_streams.gql
Normal file
@@ -0,0 +1,34 @@
|
||||
# Lightweight listing of live (in-progress) streams for pickers like the
|
||||
# Shot Lab "follow a live stream" flow. Selects only what a picker card
|
||||
# needs; intentionally avoids the heavy VideoCardFields fragment.
|
||||
query GetLiveStreams($limit: Int! = 25) {
|
||||
getFeedVideos(
|
||||
limit: $limit
|
||||
filters: { isStreamCompleted: false, requireCursorCompletion: false }
|
||||
includePrivate: MINE
|
||||
feedInput: { allUsers: true }
|
||||
) {
|
||||
videos {
|
||||
id
|
||||
name
|
||||
startTime
|
||||
createdAt
|
||||
screenshotUri
|
||||
elapsedTime
|
||||
owner {
|
||||
id
|
||||
username
|
||||
profileImageUri
|
||||
}
|
||||
stream {
|
||||
id
|
||||
isCompleted
|
||||
lastSegmentUploadedAt
|
||||
}
|
||||
}
|
||||
pageInfo {
|
||||
hasNextPage
|
||||
endCursor
|
||||
}
|
||||
}
|
||||
}
|
||||
62
src/operations/recorded_shots.gql
Normal file
62
src/operations/recorded_shots.gql
Normal file
@@ -0,0 +1,62 @@
|
||||
# Lightweight two-step picker data for loading a recorded shot into Shot Lab.
|
||||
query GetRecordedStreams($limit: Int! = 25) {
|
||||
getFeedVideos(
|
||||
limit: $limit
|
||||
filters: { isStreamCompleted: true, excludeVideosWithNoShots: true }
|
||||
includePrivate: MINE
|
||||
feedInput: { allUsers: true }
|
||||
) {
|
||||
videos {
|
||||
id
|
||||
name
|
||||
createdAt
|
||||
screenshotUri
|
||||
framesPerSecond
|
||||
totalShots
|
||||
owner {
|
||||
id
|
||||
username
|
||||
profileImageUri
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query GetRecordedStreamShots($videoId: Int!, $limit: Int! = 200) {
|
||||
getOrderedShots(
|
||||
filterInput: { videoId: [$videoId] }
|
||||
shotsOrdering: { orderings: [{ startFrame: { descending: false } }] }
|
||||
limit: $limit
|
||||
) {
|
||||
shots {
|
||||
id
|
||||
videoId
|
||||
startFrame
|
||||
endFrame
|
||||
serializedShotPaths {
|
||||
b64EncodedBuffer
|
||||
}
|
||||
cueObjectFeatures {
|
||||
cueObjectDistance
|
||||
cueObjectAngle
|
||||
cueBallSpeed
|
||||
shotDirection
|
||||
spinType
|
||||
}
|
||||
pocketingIntentionFeatures {
|
||||
make
|
||||
targetPocketDistance
|
||||
targetPocketAngle
|
||||
targetPocketAngleDirection
|
||||
marginOfErrorInDegrees
|
||||
intendedPocketType
|
||||
difficulty
|
||||
}
|
||||
pocketingIntentionInfo {
|
||||
ballId
|
||||
pocketId
|
||||
pathMetadataIndex
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,36 @@ query GetTableState(
|
||||
useHomography: $useHomography
|
||||
) {
|
||||
identifierToPosition
|
||||
identifierToColor {
|
||||
hex
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query GetLiveTableState($videoId: Int!) {
|
||||
getLiveTableState(videoId: $videoId) {
|
||||
videoId
|
||||
frameIndex
|
||||
tableState {
|
||||
identifierToPosition
|
||||
identifierToColor {
|
||||
hex
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query GetShotTableState($shotId: Int!) {
|
||||
getShotTableState(shotId: $shotId) {
|
||||
shotId
|
||||
videoId
|
||||
frameIndex
|
||||
tableState {
|
||||
identifierToPosition
|
||||
identifierToColor {
|
||||
hex
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
38
src/operations/usage_stats.gql
Normal file
38
src/operations/usage_stats.gql
Normal file
@@ -0,0 +1,38 @@
|
||||
query getUsageStats($days: Int! = 30) {
|
||||
getUsageStats(days: $days) {
|
||||
funnel {
|
||||
freemiumEpoch
|
||||
eraSignups
|
||||
eraPaying
|
||||
activationCohort
|
||||
activationActivated
|
||||
payingUsers
|
||||
newPaid7d
|
||||
newPaid30d
|
||||
retentionPrevActive
|
||||
retentionReturned
|
||||
}
|
||||
totalUsers
|
||||
totalVideos
|
||||
totalShots
|
||||
totalRuns
|
||||
windows {
|
||||
label
|
||||
newUsers
|
||||
activeUsers
|
||||
sessions
|
||||
shots
|
||||
}
|
||||
daily {
|
||||
day
|
||||
newUsers
|
||||
activeUsers
|
||||
sessions
|
||||
shots
|
||||
}
|
||||
processingLast24h {
|
||||
status
|
||||
count
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -72,6 +72,8 @@ type Query {
|
||||
tableSize: Float = 100
|
||||
useHomography: HomographyInputGQL = null
|
||||
): TableStateGQL!
|
||||
getLiveTableState(videoId: Int!): LiveTableStateGQL!
|
||||
getShotTableState(shotId: Int!): ShotTableStateGQL!
|
||||
simulateShot(simulationInput: SimulateShotInputGQL!): ShotProjectionGQL!
|
||||
computePotAim(
|
||||
simulationInput: SimulateShotInputGQL!
|
||||
@@ -99,6 +101,7 @@ type Query {
|
||||
countRespectsLimit: Boolean! = false
|
||||
): [ShotGQL!]!
|
||||
getShotsByIds(ids: [Int!]!): [ShotGQL!]!
|
||||
getUsageStats(days: Int! = 30): UsageStatsGQL!
|
||||
getUser(userId: Int!): UserGQL
|
||||
doesUsernameExist(candidateUsername: String!): Boolean!
|
||||
getLoggedInUser: UserGQL
|
||||
@@ -607,7 +610,7 @@ type VideoTagClass {
|
||||
}
|
||||
|
||||
type HomographyInfoGQL {
|
||||
id: Int!
|
||||
id: Int
|
||||
frameIndex: Int!
|
||||
crop: BoundingBoxGQL!
|
||||
pockets: [BoundingBoxGQL!]!
|
||||
@@ -1019,6 +1022,14 @@ type PlayerClusterShotGQL {
|
||||
type TableStateGQL {
|
||||
identifierToPosition: [[Float!]!]!
|
||||
homography: HomographyInfoGQL
|
||||
identifierToColor: [RGBColorGQL]!
|
||||
}
|
||||
|
||||
type RGBColorGQL {
|
||||
r: Int!
|
||||
g: Int!
|
||||
b: Int!
|
||||
hex: String!
|
||||
}
|
||||
|
||||
input HomographyInputGQL {
|
||||
@@ -1049,6 +1060,19 @@ input IntPoint2DInput {
|
||||
y: Int!
|
||||
}
|
||||
|
||||
type LiveTableStateGQL {
|
||||
videoId: Int!
|
||||
frameIndex: Int!
|
||||
tableState: TableStateGQL!
|
||||
}
|
||||
|
||||
type ShotTableStateGQL {
|
||||
shotId: Int!
|
||||
videoId: Int!
|
||||
frameIndex: Int!
|
||||
tableState: TableStateGQL!
|
||||
}
|
||||
|
||||
type ShotProjectionGQL {
|
||||
trajectories: [BallTrajectoryGQL!]!
|
||||
events: [SimulationEventGQL!]!
|
||||
@@ -1153,6 +1177,51 @@ input CreatedAfter @oneOf {
|
||||
createdAt: DateTime
|
||||
}
|
||||
|
||||
type UsageStatsGQL {
|
||||
funnel: FunnelStatsGQL!
|
||||
totalUsers: Int!
|
||||
totalVideos: Int!
|
||||
totalShots: Int!
|
||||
totalRuns: Int!
|
||||
windows: [UsageStatsWindowGQL!]!
|
||||
daily: [UsageStatsDailyGQL!]!
|
||||
processingLast24h: [ProcessingStatusCountGQL!]!
|
||||
}
|
||||
|
||||
type FunnelStatsGQL {
|
||||
freemiumEpoch: Date!
|
||||
eraSignups: Int!
|
||||
eraPaying: Int!
|
||||
activationCohort: Int!
|
||||
activationActivated: Int!
|
||||
payingUsers: Int!
|
||||
newPaid7d: Int!
|
||||
newPaid30d: Int!
|
||||
retentionPrevActive: Int!
|
||||
retentionReturned: Int!
|
||||
}
|
||||
|
||||
type UsageStatsWindowGQL {
|
||||
label: String!
|
||||
newUsers: Int!
|
||||
activeUsers: Int!
|
||||
sessions: Int!
|
||||
shots: Int!
|
||||
}
|
||||
|
||||
type UsageStatsDailyGQL {
|
||||
day: Date!
|
||||
newUsers: Int!
|
||||
activeUsers: Int!
|
||||
sessions: Int!
|
||||
shots: Int!
|
||||
}
|
||||
|
||||
type ProcessingStatusCountGQL {
|
||||
status: String!
|
||||
count: Int!
|
||||
}
|
||||
|
||||
type UserRelationshipsResult {
|
||||
inquiringUser: UserGQL!
|
||||
relationships: [UserRelationship!]!
|
||||
|
||||
Reference in New Issue
Block a user