Compare commits
23 Commits
loewy/scop
...
dean/get-v
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6d5cd9b1ed | ||
|
|
d59e21c10e | ||
|
|
9250e4c639 | ||
|
|
5cf2dbaf01 | ||
| 239a143554 | |||
|
|
296522afb8 | ||
| f42579076e | |||
|
|
0c9eb4945a | ||
| 1182c15004 | |||
|
|
755336b16a | ||
| c1efe9f5f2 | |||
|
|
a3460842ac | ||
| 84d3a0252d | |||
|
|
1de4a97cb6 | ||
| 130314546c | |||
| b88f172355 | |||
| 639fc88b0b | |||
| 20f50368c9 | |||
| 8367c2d0cd | |||
| b0c62f6e80 | |||
| bc1ff66467 | |||
| ae37a3d9d9 | |||
|
|
114b21400e |
950
src/index.tsx
950
src/index.tsx
File diff suppressed because it is too large
Load Diff
@@ -31,41 +31,32 @@ fragment VideoCardFields on VideoGQL {
|
||||
}
|
||||
name
|
||||
screenshotUri
|
||||
totalShotsMade
|
||||
totalShots
|
||||
makePercentage
|
||||
averageTimeBetweenShots
|
||||
averageDifficulty
|
||||
createdAt
|
||||
updatedAt
|
||||
startTime
|
||||
endTime
|
||||
private
|
||||
elapsedTime
|
||||
screenshotUri
|
||||
stream {
|
||||
id
|
||||
lastIntendedSegmentBound
|
||||
isCompleted
|
||||
streamSegmentType
|
||||
}
|
||||
tableSize
|
||||
pocketSize
|
||||
tags {
|
||||
name
|
||||
tagClasses {
|
||||
name
|
||||
}
|
||||
name
|
||||
}
|
||||
playerSummaries {
|
||||
...PlayerSummaryFields
|
||||
}
|
||||
currentProcessing {
|
||||
id
|
||||
errors {
|
||||
message
|
||||
}
|
||||
status
|
||||
statuses {
|
||||
status
|
||||
}
|
||||
}
|
||||
reactions {
|
||||
videoId
|
||||
@@ -110,6 +101,27 @@ query GetVideoFeedSessionCount(
|
||||
}
|
||||
}
|
||||
|
||||
# Minimal query for the Home recency nudge ("you haven't recorded in N days").
|
||||
# Only the most recent session's start time — avoids pulling the full
|
||||
# VideoCardFields payload (reactions, comments, player summaries, etc.).
|
||||
query GetLastSessionDate(
|
||||
$filters: VideoFilterInput = null
|
||||
$includePrivate: IncludePrivateEnum = MINE
|
||||
$feedInput: VideoFeedInputGQL = null
|
||||
) {
|
||||
getFeedVideos(
|
||||
limit: 1
|
||||
filters: $filters
|
||||
includePrivate: $includePrivate
|
||||
feedInput: $feedInput
|
||||
) {
|
||||
videos {
|
||||
id
|
||||
startTime
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query GetVideoFeed(
|
||||
$limit: Int! = 5
|
||||
$after: String = null
|
||||
|
||||
@@ -20,8 +20,15 @@ mutation CreateSubscription($priceId: String!) {
|
||||
}
|
||||
}
|
||||
|
||||
mutation CreateCustomerPortalSession {
|
||||
createCustomerPortalSession {
|
||||
portalUrl
|
||||
}
|
||||
}
|
||||
|
||||
query GetAvailableSubscriptionOptions {
|
||||
getAvailableSubscriptionOptions {
|
||||
trialPeriodDays
|
||||
products {
|
||||
id
|
||||
name
|
||||
|
||||
52
src/operations/shooter.gql
Normal file
52
src/operations/shooter.gql
Normal file
@@ -0,0 +1,52 @@
|
||||
fragment PlayerSummaryFields on PlayerSummaryGQL {
|
||||
clusterId
|
||||
userId
|
||||
username
|
||||
profileImageUri
|
||||
representativeFullFrameUrl
|
||||
totalShots
|
||||
totalShotsMade
|
||||
makePercentage
|
||||
score
|
||||
longestRun
|
||||
averageDifficulty
|
||||
averageTimeBetweenShots
|
||||
}
|
||||
|
||||
fragment PlayerClusterShotFields on PlayerClusterShotGQL {
|
||||
shotId
|
||||
bboxX1
|
||||
bboxY1
|
||||
bboxX2
|
||||
bboxY2
|
||||
confidence
|
||||
isConfirmed
|
||||
cropUrl
|
||||
fullFrameUrl
|
||||
}
|
||||
|
||||
fragment PlayerClusterFields on PlayerClusterGQL {
|
||||
videoId
|
||||
clusterId
|
||||
nShots
|
||||
userId
|
||||
username
|
||||
profileImageUri
|
||||
confirmed
|
||||
score
|
||||
shots {
|
||||
...PlayerClusterShotFields
|
||||
}
|
||||
}
|
||||
|
||||
query VideoPlayerClusters($videoId: Int!) {
|
||||
videoPlayerClusters(videoId: $videoId) {
|
||||
...PlayerClusterFields
|
||||
}
|
||||
}
|
||||
|
||||
mutation FinalizePlayerAssignments($input: FinalizePlayerAssignmentsInput!) {
|
||||
finalizePlayerAssignments(input: $input) {
|
||||
...PlayerClusterFields
|
||||
}
|
||||
}
|
||||
@@ -132,6 +132,38 @@ query GetShotsByIds($ids: [Int!]!) {
|
||||
}
|
||||
}
|
||||
|
||||
# Lightweight clip boundaries for condensed session playback. The inline
|
||||
# session player only needs each shot's frame/time window to seek between
|
||||
# shots — this skips the heavy ShotWithAllFeatures payload (cue/pocketing
|
||||
# features, serialized shot paths, annotations, nested video/playlist). The
|
||||
# startTime/endTime @client resolvers derive their values from the frame
|
||||
# fields + the video (looked up internally), so this is all they require.
|
||||
fragment ShotClipRange on ShotGQL {
|
||||
id
|
||||
videoId
|
||||
startFrame
|
||||
endFrame
|
||||
startTime @client
|
||||
endTime @client
|
||||
}
|
||||
|
||||
query GetShotClipRanges(
|
||||
$filterInput: FilterInput!
|
||||
$shotsOrdering: GetShotsOrdering
|
||||
$limit: Int
|
||||
) {
|
||||
getOrderedShots(
|
||||
filterInput: $filterInput
|
||||
shotsOrdering: $shotsOrdering
|
||||
limit: $limit
|
||||
) {
|
||||
count
|
||||
shots {
|
||||
...ShotClipRange
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fragment ShotWithAllFeatures on ShotGQL {
|
||||
id
|
||||
videoId
|
||||
|
||||
@@ -83,6 +83,9 @@ query GetVideoDetails($videoId: Int!) {
|
||||
}
|
||||
name
|
||||
}
|
||||
playerSummaries {
|
||||
...PlayerSummaryFields
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,6 +139,15 @@ query GetVideoSocialDetailsById($videoId: Int!) {
|
||||
}
|
||||
}
|
||||
|
||||
# Full card payload for a single video — reuses the same VideoCardFields
|
||||
# fragment the feed list uses, so the session-detail meta header shares one
|
||||
# source of truth (and the normalized Apollo cache) with the feed card.
|
||||
query GetVideoCard($videoId: Int!) {
|
||||
getVideo(videoId: $videoId) {
|
||||
...VideoCardFields
|
||||
}
|
||||
}
|
||||
|
||||
query GetVideos($videoIds: [Int!]!) {
|
||||
getVideos(videoIds: $videoIds) {
|
||||
...VideoStreamMetadata
|
||||
|
||||
@@ -28,7 +28,7 @@ type Query {
|
||||
getLongestRunsLeaderboard(
|
||||
interval: TimeInterval = null
|
||||
when: DateTime = null
|
||||
limit: Int! = 100
|
||||
limit: Int! = 50
|
||||
requiredTags: [String!] = null
|
||||
): RunLeaderboardGQL!
|
||||
getMakesLeaderboard(
|
||||
@@ -49,6 +49,7 @@ type Query {
|
||||
limit: Int! = 500
|
||||
countRespectsLimit: Boolean! = false
|
||||
): GetRunsResult!
|
||||
videoPlayerClusters(videoId: Int!): [PlayerClusterGQL!]!
|
||||
getShotAnnotationTypes(errorTypes: Boolean = false): [ShotAnnotationTypeGQL!]!
|
||||
getTableState(
|
||||
b64Image: String!
|
||||
@@ -405,6 +406,7 @@ type VideoGQL {
|
||||
currentProcessing: VideoProcessingGQL
|
||||
reactions: [ReactionGQL!]!
|
||||
comments: [CommentGQL!]!
|
||||
playerSummaries: [PlayerSummaryGQL!]!
|
||||
}
|
||||
|
||||
type ShotGQL {
|
||||
@@ -664,6 +666,21 @@ type CommentGQL {
|
||||
replies: [CommentGQL!]!
|
||||
}
|
||||
|
||||
type PlayerSummaryGQL {
|
||||
clusterId: Int!
|
||||
userId: Int
|
||||
username: String
|
||||
profileImageUri: String
|
||||
representativeFullFrameUrl: String
|
||||
totalShots: Int!
|
||||
totalShotsMade: Int!
|
||||
makePercentage: Float!
|
||||
score: Int
|
||||
longestRun: Int!
|
||||
averageDifficulty: Float
|
||||
averageTimeBetweenShots: Float
|
||||
}
|
||||
|
||||
type DeployedConfigGQL {
|
||||
allowNewUsers: Boolean!
|
||||
firebase: Boolean!
|
||||
@@ -860,6 +877,30 @@ input DatetimeOrdering {
|
||||
startingAt: DateTime = null
|
||||
}
|
||||
|
||||
type PlayerClusterGQL {
|
||||
videoId: Int!
|
||||
clusterId: Int!
|
||||
nShots: Int!
|
||||
userId: Int
|
||||
username: String
|
||||
profileImageUri: String
|
||||
confirmed: Boolean!
|
||||
score: Int
|
||||
shots: [PlayerClusterShotGQL!]!
|
||||
}
|
||||
|
||||
type PlayerClusterShotGQL {
|
||||
shotId: Int!
|
||||
bboxX1: Int!
|
||||
bboxY1: Int!
|
||||
bboxX2: Int!
|
||||
bboxY2: Int!
|
||||
confidence: Float!
|
||||
isConfirmed: Boolean!
|
||||
cropUrl: String
|
||||
fullFrameUrl: String
|
||||
}
|
||||
|
||||
type TableStateGQL {
|
||||
identifierToPosition: [[Float!]!]!
|
||||
homography: HomographyInfoGQL
|
||||
@@ -940,6 +981,7 @@ type UserRelationship {
|
||||
|
||||
type StripeSubscriptionOptionsGQL {
|
||||
products: [StripeProductGQL!]!
|
||||
trialPeriodDays: Int
|
||||
}
|
||||
|
||||
type StripeProductGQL {
|
||||
@@ -1093,6 +1135,9 @@ type Mutation {
|
||||
markAllNotificationsAsRead: Boolean!
|
||||
markNotificationsAsRead(notificationIds: [Int!]!): Boolean!
|
||||
deleteNotification(notificationId: Int!): Boolean!
|
||||
finalizePlayerAssignments(
|
||||
input: FinalizePlayerAssignmentsInput!
|
||||
): [PlayerClusterGQL!]!
|
||||
addAnnotationToShot(
|
||||
shotId: Int!
|
||||
annotationName: String!
|
||||
@@ -1117,6 +1162,7 @@ type Mutation {
|
||||
ensureStripeCustomerExists: UserGQL!
|
||||
deleteUser: Boolean!
|
||||
createSubscription(priceId: String!): CreateSubscriptionResultGQL!
|
||||
createCustomerPortalSession: CreateCustomerPortalSessionResultGQL!
|
||||
cancelSubscription: UserSubscriptionStatusGQL!
|
||||
grantManualEntitlement(
|
||||
userId: Int!
|
||||
@@ -1163,6 +1209,23 @@ enum ReportReasonEnum {
|
||||
OTHER
|
||||
}
|
||||
|
||||
input FinalizePlayerAssignmentsInput {
|
||||
videoId: Int!
|
||||
clusterAssignments: [ClusterAssignmentInput!]! = []
|
||||
shotMoves: [ShotMoveInput!]! = []
|
||||
}
|
||||
|
||||
input ClusterAssignmentInput {
|
||||
clusterId: Int!
|
||||
userId: Int = null
|
||||
score: Int = null
|
||||
}
|
||||
|
||||
input ShotMoveInput {
|
||||
shotId: Int!
|
||||
newClusterId: Int!
|
||||
}
|
||||
|
||||
type AddShotAnnotationReturn {
|
||||
value: SuccessfulAddAddShotAnnotationErrors!
|
||||
}
|
||||
@@ -1256,6 +1319,10 @@ type CreateSubscriptionResultGQL {
|
||||
sessionId: String!
|
||||
}
|
||||
|
||||
type CreateCustomerPortalSessionResultGQL {
|
||||
portalUrl: String!
|
||||
}
|
||||
|
||||
enum CancellationReasonEnum {
|
||||
DONT_PLAY_ENOUGH
|
||||
TOO_EXPENSIVE
|
||||
|
||||
Reference in New Issue
Block a user