Compare commits
34 Commits
dean/label
...
dean/drill
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d1ed5b308b | ||
| af68bc3c60 | |||
| f12d2c5a1b | |||
| 4e3f649a2c | |||
| 7cef75b2ca | |||
|
|
6d5cd9b1ed | ||
|
|
d59e21c10e | ||
| 9358205327 | |||
| 88634a32e9 | |||
| f7200a2e9f | |||
| 7d839c0fa6 | |||
| ab1e604871 | |||
| deb724b430 | |||
| c586bdf1a6 | |||
|
|
9250e4c639 | ||
| a12b3e1210 | |||
|
|
5cf2dbaf01 | ||
| 239a143554 | |||
|
|
296522afb8 | ||
| f42579076e | |||
|
|
0c9eb4945a | ||
| 1182c15004 | |||
|
|
755336b16a | ||
| c1efe9f5f2 | |||
|
|
a3460842ac | ||
| 84d3a0252d | |||
| 130314546c | |||
| b88f172355 | |||
| 639fc88b0b | |||
| 20f50368c9 | |||
| 8367c2d0cd | |||
| b0c62f6e80 | |||
| bc1ff66467 | |||
| ae37a3d9d9 |
1226
src/index.tsx
1226
src/index.tsx
File diff suppressed because it is too large
Load Diff
@@ -6,6 +6,7 @@ query getDeployedConfig {
|
||||
firebase
|
||||
minimumAllowedAppVersion
|
||||
subscriptionGatingEnabled
|
||||
quotaEnforcementEnabled
|
||||
bannerMessages {
|
||||
color
|
||||
dismissible
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -30,3 +30,33 @@ query GetRunsLeaderboard($interval: TimeInterval, $when: DateTime) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query GetDrillRunLeaderboard(
|
||||
$drillTag: String!
|
||||
$interval: TimeInterval
|
||||
$limit: Int = 50
|
||||
) {
|
||||
getDrillRunLeaderboard(
|
||||
drillTag: $drillTag
|
||||
interval: $interval
|
||||
limit: $limit
|
||||
) {
|
||||
entries {
|
||||
id
|
||||
runLength
|
||||
videoId
|
||||
user {
|
||||
id
|
||||
username
|
||||
profileImageUri
|
||||
}
|
||||
}
|
||||
youRun {
|
||||
id
|
||||
runLength
|
||||
videoId
|
||||
}
|
||||
youRank
|
||||
totalPlayers
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -49,6 +49,39 @@ query GetUserPlayTime($userId: Int!, $filters: VideoFilterInput) {
|
||||
}
|
||||
}
|
||||
|
||||
query GetUploadQuotaStatus {
|
||||
getQuotaStatus {
|
||||
tierName
|
||||
periodStart
|
||||
periodEnd
|
||||
durationUsedSeconds
|
||||
durationLimitSeconds
|
||||
maxVideoDurationSeconds
|
||||
durationRemainingSeconds
|
||||
canUpload
|
||||
importQuotaBuckets {
|
||||
quotaKey
|
||||
appliesToUploadKind
|
||||
periodStart
|
||||
periodEnd
|
||||
durationUsedSeconds
|
||||
durationLimitSeconds
|
||||
durationRemainingSeconds
|
||||
canUpload
|
||||
}
|
||||
recordingQuotaBuckets {
|
||||
quotaKey
|
||||
appliesToUploadKind
|
||||
periodStart
|
||||
periodEnd
|
||||
durationUsedSeconds
|
||||
durationLimitSeconds
|
||||
durationRemainingSeconds
|
||||
canUpload
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query getUsernames(
|
||||
$matchString: String!
|
||||
$limit: Int = null
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -31,6 +31,11 @@ type Query {
|
||||
limit: Int! = 50
|
||||
requiredTags: [String!] = null
|
||||
): RunLeaderboardGQL!
|
||||
getDrillRunLeaderboard(
|
||||
drillTag: String!
|
||||
interval: TimeInterval = null
|
||||
limit: Int! = 50
|
||||
): DrillRunLeaderboardGQL!
|
||||
getMakesLeaderboard(
|
||||
interval: TimeInterval = null
|
||||
when: DateTime = null
|
||||
@@ -98,6 +103,7 @@ type Query {
|
||||
): UserRelationshipsResult!
|
||||
getAvailableSubscriptionOptions: StripeSubscriptionOptionsGQL!
|
||||
getUserSubscriptionStatus: UserSubscriptionStatusGQL!
|
||||
getAppleAppAccountToken: String!
|
||||
getQuotaStatus: QuotaStatusGQL!
|
||||
getPlayTime(userId: Int!, filters: VideoFilterInput = null): UserPlayTimeGQL!
|
||||
getUserVideos(
|
||||
@@ -406,6 +412,7 @@ type VideoGQL {
|
||||
currentProcessing: VideoProcessingGQL
|
||||
reactions: [ReactionGQL!]!
|
||||
comments: [CommentGQL!]!
|
||||
playerSummaries: [PlayerSummaryGQL!]!
|
||||
}
|
||||
|
||||
type ShotGQL {
|
||||
@@ -665,6 +672,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!
|
||||
@@ -672,6 +694,7 @@ type DeployedConfigGQL {
|
||||
environment: String!
|
||||
minimumAllowedAppVersion: String!
|
||||
subscriptionGatingEnabled: Boolean!
|
||||
quotaEnforcementEnabled: Boolean!
|
||||
bannerMessages: [BannerGQL!]!
|
||||
defaultAndroidRecordingFormat: StreamSegmentTypeEnum!
|
||||
bucketUrl: String!
|
||||
@@ -732,6 +755,13 @@ type RunLeaderboardGQL {
|
||||
entries: [RunGQL!]!
|
||||
}
|
||||
|
||||
type DrillRunLeaderboardGQL {
|
||||
entries: [RunGQL!]!
|
||||
youRun: RunGQL
|
||||
youRank: Int
|
||||
totalPlayers: Int!
|
||||
}
|
||||
|
||||
type CountLeaderboardGQL {
|
||||
entries: [UserShotCountEntry!]!
|
||||
}
|
||||
@@ -866,7 +896,10 @@ type PlayerClusterGQL {
|
||||
clusterId: Int!
|
||||
nShots: Int!
|
||||
userId: Int
|
||||
username: String
|
||||
profileImageUri: String
|
||||
confirmed: Boolean!
|
||||
score: Int
|
||||
shots: [PlayerClusterShotGQL!]!
|
||||
}
|
||||
|
||||
@@ -1000,6 +1033,7 @@ enum EntitlementSourceTypeEnum {
|
||||
ADMIN
|
||||
MANUAL
|
||||
STRIPE
|
||||
APPLE
|
||||
ALPHA_LEGACY
|
||||
}
|
||||
|
||||
@@ -1021,6 +1055,19 @@ type QuotaStatusGQL {
|
||||
durationUsedSeconds: Float!
|
||||
durationLimitSeconds: Int
|
||||
maxVideoDurationSeconds: Int
|
||||
importQuotaBuckets: [QuotaBucketStatusGQL!]!
|
||||
recordingQuotaBuckets: [QuotaBucketStatusGQL!]!
|
||||
durationRemainingSeconds: Float
|
||||
canUpload: Boolean!
|
||||
}
|
||||
|
||||
type QuotaBucketStatusGQL {
|
||||
quotaKey: String!
|
||||
appliesToUploadKind: String!
|
||||
periodStart: DateTime!
|
||||
periodEnd: DateTime!
|
||||
durationUsedSeconds: Float!
|
||||
durationLimitSeconds: Int
|
||||
durationRemainingSeconds: Float
|
||||
canUpload: Boolean!
|
||||
}
|
||||
@@ -1142,6 +1189,9 @@ type Mutation {
|
||||
retireTags(tagIds: [Int!]!): Boolean!
|
||||
ensureStripeCustomerExists: UserGQL!
|
||||
deleteUser: Boolean!
|
||||
syncAppleSubscription(
|
||||
input: SyncAppleSubscriptionInputGQL!
|
||||
): SyncAppleSubscriptionResultGQL!
|
||||
createSubscription(priceId: String!): CreateSubscriptionResultGQL!
|
||||
createCustomerPortalSession: CreateCustomerPortalSessionResultGQL!
|
||||
cancelSubscription: UserSubscriptionStatusGQL!
|
||||
@@ -1199,6 +1249,7 @@ input FinalizePlayerAssignmentsInput {
|
||||
input ClusterAssignmentInput {
|
||||
clusterId: Int!
|
||||
userId: Int = null
|
||||
score: Int = null
|
||||
}
|
||||
|
||||
input ShotMoveInput {
|
||||
@@ -1294,6 +1345,26 @@ input EditUserInputGQL {
|
||||
agreesToMarketing: Boolean = null
|
||||
}
|
||||
|
||||
type SyncAppleSubscriptionResultGQL {
|
||||
ok: Boolean!
|
||||
errorCode: String
|
||||
errorMessage: String
|
||||
hasActiveSubscription: Boolean!
|
||||
entitlementSource: EntitlementSourceTypeEnum
|
||||
entitlementStartsAt: DateTime
|
||||
entitlementEndsAt: DateTime
|
||||
appleStatus: Int
|
||||
originalTransactionId: String
|
||||
latestTransactionId: String
|
||||
productId: String
|
||||
expiresAt: DateTime
|
||||
}
|
||||
|
||||
input SyncAppleSubscriptionInputGQL {
|
||||
signedTransactionInfo: String!
|
||||
signedRenewalInfo: String = null
|
||||
}
|
||||
|
||||
type CreateSubscriptionResultGQL {
|
||||
checkoutUrl: String!
|
||||
sessionId: String!
|
||||
|
||||
Reference in New Issue
Block a user