Compare commits
16 Commits
colonelpan
...
dean/batch
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0eb627479a | ||
| 1914b2f5c0 | |||
|
|
722b2ca2b0 | ||
| 79f38fa45f | |||
|
|
16684f0057 | ||
|
|
6a599d7d2b | ||
| 2886d2f5b8 | |||
|
|
8441bb12e9 | ||
| 17a518429a | |||
| 33eb213cc9 | |||
| 3b66cb3270 | |||
| d67fdd9fee | |||
| d787e5e9a2 | |||
| 1d73b2d67b | |||
|
|
aa731b85fc | ||
| 644f70c3b0 |
842
src/index.tsx
842
src/index.tsx
File diff suppressed because it is too large
Load Diff
@@ -78,6 +78,7 @@ fragment VideoCardFields on VideoGQL {
|
|||||||
replies {
|
replies {
|
||||||
id
|
id
|
||||||
message
|
message
|
||||||
|
replyToCommentId
|
||||||
user {
|
user {
|
||||||
...UserSocialsFields
|
...UserSocialsFields
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,21 @@
|
|||||||
query GetMakesLeaderboard($interval: TimeInterval, $when: DateTime) {
|
query GetMakesLeaderboard(
|
||||||
getMakesLeaderboard(interval: $interval, when: $when) {
|
$interval: TimeInterval
|
||||||
|
$when: DateTime
|
||||||
|
$gameType: String
|
||||||
|
$tableSizeMin: Float
|
||||||
|
$tableSizeMax: Float
|
||||||
|
$pocketSizeMin: Float
|
||||||
|
$pocketSizeMax: Float
|
||||||
|
) {
|
||||||
|
getMakesLeaderboard(
|
||||||
|
interval: $interval
|
||||||
|
when: $when
|
||||||
|
gameType: $gameType
|
||||||
|
tableSizeMin: $tableSizeMin
|
||||||
|
tableSizeMax: $tableSizeMax
|
||||||
|
pocketSizeMin: $pocketSizeMin
|
||||||
|
pocketSizeMax: $pocketSizeMax
|
||||||
|
) {
|
||||||
entries {
|
entries {
|
||||||
user {
|
user {
|
||||||
id
|
id
|
||||||
@@ -13,8 +29,24 @@ query GetMakesLeaderboard($interval: TimeInterval, $when: DateTime) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
query GetRunsLeaderboard($interval: TimeInterval, $when: DateTime) {
|
query GetRunsLeaderboard(
|
||||||
getLongestRunsLeaderboard(interval: $interval, when: $when) {
|
$interval: TimeInterval
|
||||||
|
$when: DateTime
|
||||||
|
$gameType: String
|
||||||
|
$tableSizeMin: Float
|
||||||
|
$tableSizeMax: Float
|
||||||
|
$pocketSizeMin: Float
|
||||||
|
$pocketSizeMax: Float
|
||||||
|
) {
|
||||||
|
getLongestRunsLeaderboard(
|
||||||
|
interval: $interval
|
||||||
|
when: $when
|
||||||
|
gameType: $gameType
|
||||||
|
tableSizeMin: $tableSizeMin
|
||||||
|
tableSizeMax: $tableSizeMax
|
||||||
|
pocketSizeMin: $pocketSizeMin
|
||||||
|
pocketSizeMax: $pocketSizeMax
|
||||||
|
) {
|
||||||
entries {
|
entries {
|
||||||
id
|
id
|
||||||
runLength
|
runLength
|
||||||
|
|||||||
25
src/operations/legacy_shotsim.gql
Normal file
25
src/operations/legacy_shotsim.gql
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# Legacy shot-sim operations still used by mobile master's
|
||||||
|
# LiveStreamPicker / RecordedShotPicker; remove when those are deleted.
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,12 +1,12 @@
|
|||||||
# Lightweight two-step picker data for Shot Lab's video-first source: recent
|
# Lightweight two-step picker data for Shot Lab's video-first source: the
|
||||||
# videos (completed or still uploading — no completion gate, so an in-progress
|
# caller's recent videos (completed or still uploading), then that video's
|
||||||
# recording with no shots yet still appears), then that video's shots. The
|
# shots. The stream fields hint at "actively updating" without gating.
|
||||||
# stream fields let the client hint at "actively updating" without gating.
|
query GetShotLabVideos($userId: Int!, $limit: Int! = 25) {
|
||||||
query GetShotLabVideos($limit: Int! = 25) {
|
|
||||||
getFeedVideos(
|
getFeedVideos(
|
||||||
limit: $limit
|
limit: $limit
|
||||||
|
includeCallersVideos: false
|
||||||
includePrivate: MINE
|
includePrivate: MINE
|
||||||
feedInput: { allUsers: true }
|
feedInput: { userId: $userId }
|
||||||
) {
|
) {
|
||||||
videos {
|
videos {
|
||||||
id
|
id
|
||||||
@@ -43,26 +43,11 @@ query GetRecordedStreamShots($videoId: Int!, $limit: Int! = 200) {
|
|||||||
serializedShotPaths {
|
serializedShotPaths {
|
||||||
b64EncodedBuffer
|
b64EncodedBuffer
|
||||||
}
|
}
|
||||||
cueObjectFeatures {
|
|
||||||
cueObjectDistance
|
|
||||||
cueObjectAngle
|
|
||||||
cueBallSpeed
|
|
||||||
shotDirection
|
|
||||||
spinType
|
|
||||||
}
|
|
||||||
pocketingIntentionFeatures {
|
pocketingIntentionFeatures {
|
||||||
make
|
make
|
||||||
targetPocketDistance
|
|
||||||
targetPocketAngle
|
|
||||||
targetPocketAngleDirection
|
|
||||||
marginOfErrorInDegrees
|
|
||||||
intendedPocketType
|
|
||||||
difficulty
|
|
||||||
}
|
}
|
||||||
pocketingIntentionInfo {
|
pocketingIntentionInfo {
|
||||||
ballId
|
|
||||||
pocketId
|
pocketId
|
||||||
pathMetadataIndex
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,18 @@ query GetSessionCoach($videoId: Int!) {
|
|||||||
candidates {
|
candidates {
|
||||||
...SessionCoachCandidateFields
|
...SessionCoachCandidateFields
|
||||||
}
|
}
|
||||||
|
agentGeneration {
|
||||||
|
...SessionCoachGenerationFields
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mutation RequestSessionCoachGeneration($videoId: Int!) {
|
||||||
|
requestSessionCoachGeneration(videoId: $videoId) {
|
||||||
|
state
|
||||||
|
agentGeneration {
|
||||||
|
...SessionCoachGenerationFields
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,3 +61,39 @@ fragment SessionCoachCandidateFields on SessionCoachCandidateGQL {
|
|||||||
rankReason
|
rankReason
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fragment SessionCoachGenerationFields on SessionCoachGenerationGQL {
|
||||||
|
id
|
||||||
|
state
|
||||||
|
createdAt
|
||||||
|
completedAt
|
||||||
|
decision {
|
||||||
|
selectedCandidateId
|
||||||
|
title
|
||||||
|
body
|
||||||
|
suggestedAction
|
||||||
|
drillId
|
||||||
|
drillReason
|
||||||
|
practiceAttemptCount
|
||||||
|
practiceTarget
|
||||||
|
}
|
||||||
|
diagnostics {
|
||||||
|
analysisVersion
|
||||||
|
promptVersion
|
||||||
|
providerKey
|
||||||
|
modelName
|
||||||
|
inputHash
|
||||||
|
attemptCount
|
||||||
|
maxAttempts
|
||||||
|
enqueueCount
|
||||||
|
latencyMs
|
||||||
|
inputTokens
|
||||||
|
cachedInputTokens
|
||||||
|
outputTokens
|
||||||
|
failureCode
|
||||||
|
updatedAt
|
||||||
|
startedAt
|
||||||
|
lastEnqueuedAt
|
||||||
|
abstentionReason
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -131,6 +131,7 @@ query GetVideoSocialDetailsById($videoId: Int!) {
|
|||||||
replies {
|
replies {
|
||||||
id
|
id
|
||||||
message
|
message
|
||||||
|
replyToCommentId
|
||||||
user {
|
user {
|
||||||
...UserSocialsFields
|
...UserSocialsFields
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,6 +48,52 @@ mutation GetUploadLink($videoId: Int!, $segmentIndex: Int!) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
stream {
|
stream {
|
||||||
|
id
|
||||||
|
uploadCompletionCursor
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mutation GetUploadLinks($videoId: Int!, $segmentIndexes: [Int!]!) {
|
||||||
|
getUploadLinks(videoId: $videoId, segmentIndexes: $segmentIndexes) {
|
||||||
|
value {
|
||||||
|
... on UploadLinkBatch {
|
||||||
|
links {
|
||||||
|
segmentIndex
|
||||||
|
uploadUrl
|
||||||
|
headers {
|
||||||
|
key
|
||||||
|
value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
alreadyUploaded
|
||||||
|
}
|
||||||
|
... on GetUploadLinkErrors {
|
||||||
|
error {
|
||||||
|
... on MustHaveSetForUploadLinkErr {
|
||||||
|
resolution
|
||||||
|
framesPerSecond
|
||||||
|
}
|
||||||
|
... on ProcessingFailedErr {
|
||||||
|
processing {
|
||||||
|
status
|
||||||
|
errors {
|
||||||
|
message
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
... on StorageLimitExceededErr {
|
||||||
|
reason
|
||||||
|
tierName
|
||||||
|
retainedStorageUsedBytes
|
||||||
|
retainedStorageLimitBytes
|
||||||
|
remainingStorageBytes
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stream {
|
||||||
|
id
|
||||||
uploadCompletionCursor
|
uploadCompletionCursor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -127,6 +173,7 @@ fragment UploadStreamWithDetails on VideoGQL {
|
|||||||
name
|
name
|
||||||
startTime
|
startTime
|
||||||
stream {
|
stream {
|
||||||
|
id
|
||||||
isCompleted
|
isCompleted
|
||||||
lastIntendedSegmentBound
|
lastIntendedSegmentBound
|
||||||
uploadCompletionCursor
|
uploadCompletionCursor
|
||||||
|
|||||||
@@ -221,6 +221,7 @@ type CommentGQL {
|
|||||||
user: UserGQL!
|
user: UserGQL!
|
||||||
message: String!
|
message: String!
|
||||||
replies: [CommentGQL!]!
|
replies: [CommentGQL!]!
|
||||||
|
replyToCommentId: Int
|
||||||
}
|
}
|
||||||
|
|
||||||
type CountLeaderboardGQL {
|
type CountLeaderboardGQL {
|
||||||
@@ -525,6 +526,24 @@ type GetUploadLinkReturn {
|
|||||||
stream: UploadStreamGQL
|
stream: UploadStreamGQL
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type GetUploadLinksReturn {
|
||||||
|
value: UploadLinkBatchGetUploadLinkErrors!
|
||||||
|
stream: UploadStreamGQL
|
||||||
|
}
|
||||||
|
|
||||||
|
type SegmentUploadLink {
|
||||||
|
segmentIndex: Int!
|
||||||
|
uploadUrl: String!
|
||||||
|
headers: [Header]!
|
||||||
|
}
|
||||||
|
|
||||||
|
type UploadLinkBatch {
|
||||||
|
links: [SegmentUploadLink!]!
|
||||||
|
alreadyUploaded: [Int!]!
|
||||||
|
}
|
||||||
|
|
||||||
|
union UploadLinkBatchGetUploadLinkErrors = UploadLinkBatch | GetUploadLinkErrors
|
||||||
|
|
||||||
type HLSPlaylistGQL {
|
type HLSPlaylistGQL {
|
||||||
videoId: Int!
|
videoId: Int!
|
||||||
m3u8Text: String!
|
m3u8Text: String!
|
||||||
@@ -716,6 +735,7 @@ type Mutation {
|
|||||||
shotId: Int!
|
shotId: Int!
|
||||||
fieldsToEdit: EditableShotFieldInputGQL!
|
fieldsToEdit: EditableShotFieldInputGQL!
|
||||||
): EditShotReturn!
|
): EditShotReturn!
|
||||||
|
requestSessionCoachGeneration(videoId: Int!): SessionCoachGQL!
|
||||||
getProfileImageUploadLink(
|
getProfileImageUploadLink(
|
||||||
fileExt: String = ".png"
|
fileExt: String = ".png"
|
||||||
): GetProfileUploadLinkReturn!
|
): GetProfileUploadLinkReturn!
|
||||||
@@ -753,6 +773,7 @@ type Mutation {
|
|||||||
expectedDurationSeconds: Float = null
|
expectedDurationSeconds: Float = null
|
||||||
): CreateUploadStreamReturn!
|
): CreateUploadStreamReturn!
|
||||||
getUploadLink(videoId: Int!, segmentIndex: Int!): GetUploadLinkReturn!
|
getUploadLink(videoId: Int!, segmentIndex: Int!): GetUploadLinkReturn!
|
||||||
|
getUploadLinks(videoId: Int!, segmentIndexes: [Int!]!): GetUploadLinksReturn!
|
||||||
getHlsInitUploadLink(videoId: Int!): GetUploadLinkReturn!
|
getHlsInitUploadLink(videoId: Int!): GetUploadLinkReturn!
|
||||||
setSegmentDuration(
|
setSegmentDuration(
|
||||||
videoId: Int!
|
videoId: Int!
|
||||||
@@ -1320,6 +1341,17 @@ enum SessionCoachCandidateKindEnum {
|
|||||||
USAGE_PATTERN
|
USAGE_PATTERN
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type SessionCoachDecisionGQL {
|
||||||
|
selectedCandidateId: ID
|
||||||
|
title: String
|
||||||
|
body: String
|
||||||
|
suggestedAction: String
|
||||||
|
drillId: String
|
||||||
|
drillReason: String
|
||||||
|
practiceAttemptCount: Int
|
||||||
|
practiceTarget: String
|
||||||
|
}
|
||||||
|
|
||||||
type SessionCoachEvidenceGQL {
|
type SessionCoachEvidenceGQL {
|
||||||
bucketKey: String!
|
bucketKey: String!
|
||||||
bucketLabel: String!
|
bucketLabel: String!
|
||||||
@@ -1352,6 +1384,43 @@ type SessionCoachGQL {
|
|||||||
makePercentage: Float
|
makePercentage: Float
|
||||||
primaryCandidate: SessionCoachCandidateGQL
|
primaryCandidate: SessionCoachCandidateGQL
|
||||||
candidates: [SessionCoachCandidateGQL!]!
|
candidates: [SessionCoachCandidateGQL!]!
|
||||||
|
agentGeneration: SessionCoachGenerationGQL
|
||||||
|
}
|
||||||
|
|
||||||
|
type SessionCoachGenerationDiagnosticsGQL {
|
||||||
|
analysisVersion: String!
|
||||||
|
promptVersion: String!
|
||||||
|
providerKey: String!
|
||||||
|
modelName: String!
|
||||||
|
inputHash: String!
|
||||||
|
attemptCount: Int!
|
||||||
|
maxAttempts: Int!
|
||||||
|
enqueueCount: Int!
|
||||||
|
latencyMs: Int
|
||||||
|
inputTokens: Int
|
||||||
|
cachedInputTokens: Int
|
||||||
|
outputTokens: Int
|
||||||
|
failureCode: String
|
||||||
|
updatedAt: DateTime!
|
||||||
|
startedAt: DateTime
|
||||||
|
lastEnqueuedAt: DateTime
|
||||||
|
abstentionReason: String
|
||||||
|
}
|
||||||
|
|
||||||
|
type SessionCoachGenerationGQL {
|
||||||
|
id: ID!
|
||||||
|
state: SessionCoachGenerationStateEnum!
|
||||||
|
createdAt: DateTime!
|
||||||
|
completedAt: DateTime
|
||||||
|
decision: SessionCoachDecisionGQL
|
||||||
|
diagnostics: SessionCoachGenerationDiagnosticsGQL
|
||||||
|
}
|
||||||
|
|
||||||
|
enum SessionCoachGenerationStateEnum {
|
||||||
|
QUEUED
|
||||||
|
RUNNING
|
||||||
|
READY
|
||||||
|
FAILED
|
||||||
}
|
}
|
||||||
|
|
||||||
enum SessionCoachIneligibilityReasonEnum {
|
enum SessionCoachIneligibilityReasonEnum {
|
||||||
@@ -1880,7 +1949,7 @@ type VideoGQL {
|
|||||||
startTime: DateTime
|
startTime: DateTime
|
||||||
endTime: DateTime
|
endTime: DateTime
|
||||||
elapsedTime: Float
|
elapsedTime: Float
|
||||||
framesPerSecond: Float!
|
framesPerSecond: Float
|
||||||
tableSize: Float!
|
tableSize: Float!
|
||||||
pocketSize: Float
|
pocketSize: Float
|
||||||
private: Boolean!
|
private: Boolean!
|
||||||
|
|||||||
Reference in New Issue
Block a user