Compare commits
2 Commits
07ca121a3e
...
colonelpan
| Author | SHA1 | Date | |
|---|---|---|---|
| 8111042936 | |||
| d6fd68c1f6 |
1067
src/index.tsx
1067
src/index.tsx
File diff suppressed because it is too large
Load Diff
@@ -101,27 +101,6 @@ 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(
|
query GetVideoFeed(
|
||||||
$limit: Int! = 5
|
$limit: Int! = 5
|
||||||
$after: String = null
|
$after: String = null
|
||||||
|
|||||||
@@ -30,56 +30,3 @@ query GetRunsLeaderboard($interval: TimeInterval, $when: DateTime) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
query GetDrillRunLeaderboard(
|
|
||||||
$drillTag: String!
|
|
||||||
$interval: TimeInterval
|
|
||||||
$limit: Int = 50
|
|
||||||
$tableSizeMin: Float
|
|
||||||
$tableSizeMax: Float
|
|
||||||
$pocketSizeMin: Float
|
|
||||||
$pocketSizeMax: Float
|
|
||||||
) {
|
|
||||||
getDrillRunLeaderboard(
|
|
||||||
drillTag: $drillTag
|
|
||||||
interval: $interval
|
|
||||||
limit: $limit
|
|
||||||
tableSizeMin: $tableSizeMin
|
|
||||||
tableSizeMax: $tableSizeMax
|
|
||||||
pocketSizeMin: $pocketSizeMin
|
|
||||||
pocketSizeMax: $pocketSizeMax
|
|
||||||
) {
|
|
||||||
entries {
|
|
||||||
id
|
|
||||||
runLength
|
|
||||||
videoId
|
|
||||||
video {
|
|
||||||
tableSize
|
|
||||||
pocketSize
|
|
||||||
}
|
|
||||||
user {
|
|
||||||
id
|
|
||||||
username
|
|
||||||
profileImageUri
|
|
||||||
}
|
|
||||||
}
|
|
||||||
youRun {
|
|
||||||
id
|
|
||||||
runLength
|
|
||||||
videoId
|
|
||||||
}
|
|
||||||
youRank
|
|
||||||
totalPlayers
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
query GetMyDrillRuns($drillTag: String!, $limit: Int = 50) {
|
|
||||||
getMyDrillRuns(drillTag: $drillTag, limit: $limit) {
|
|
||||||
id
|
|
||||||
runLength
|
|
||||||
videoId
|
|
||||||
video {
|
|
||||||
createdAt
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -9,12 +9,6 @@ fragment PlayerSummaryFields on PlayerSummaryGQL {
|
|||||||
makePercentage
|
makePercentage
|
||||||
score
|
score
|
||||||
longestRun
|
longestRun
|
||||||
runLengths
|
|
||||||
spinTypeBreakdown {
|
|
||||||
draw
|
|
||||||
center
|
|
||||||
follow
|
|
||||||
}
|
|
||||||
averageDifficulty
|
averageDifficulty
|
||||||
averageTimeBetweenShots
|
averageTimeBetweenShots
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -132,38 +132,6 @@ 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 {
|
fragment ShotWithAllFeatures on ShotGQL {
|
||||||
id
|
id
|
||||||
videoId
|
videoId
|
||||||
|
|||||||
@@ -49,39 +49,6 @@ 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(
|
query getUsernames(
|
||||||
$matchString: String!
|
$matchString: String!
|
||||||
$limit: Int = null
|
$limit: Int = null
|
||||||
|
|||||||
@@ -139,15 +139,6 @@ 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!]!) {
|
query GetVideos($videoIds: [Int!]!) {
|
||||||
getVideos(videoIds: $videoIds) {
|
getVideos(videoIds: $videoIds) {
|
||||||
...VideoStreamMetadata
|
...VideoStreamMetadata
|
||||||
|
|||||||
166
src/schema.gql
166
src/schema.gql
@@ -31,16 +31,6 @@ type Query {
|
|||||||
limit: Int! = 50
|
limit: Int! = 50
|
||||||
requiredTags: [String!] = null
|
requiredTags: [String!] = null
|
||||||
): RunLeaderboardGQL!
|
): RunLeaderboardGQL!
|
||||||
getDrillRunLeaderboard(
|
|
||||||
drillTag: String!
|
|
||||||
interval: TimeInterval = null
|
|
||||||
limit: Int! = 50
|
|
||||||
tableSizeMin: Float = null
|
|
||||||
tableSizeMax: Float = null
|
|
||||||
pocketSizeMin: Float = null
|
|
||||||
pocketSizeMax: Float = null
|
|
||||||
): DrillRunLeaderboardGQL!
|
|
||||||
getMyDrillRuns(drillTag: String!, limit: Int! = 50): [RunGQL!]!
|
|
||||||
getMakesLeaderboard(
|
getMakesLeaderboard(
|
||||||
interval: TimeInterval = null
|
interval: TimeInterval = null
|
||||||
when: DateTime = null
|
when: DateTime = null
|
||||||
@@ -52,6 +42,12 @@ type Query {
|
|||||||
filters: NotificationFilters = null
|
filters: NotificationFilters = null
|
||||||
): NotificationConnection!
|
): NotificationConnection!
|
||||||
unreadNotificationCount: Int!
|
unreadNotificationCount: Int!
|
||||||
|
poolHalls: [PoolHall!]!
|
||||||
|
claimablePoolHalls: [PoolHall!]!
|
||||||
|
poolHallCameras(poolHallId: ID!): [PoolHallCamera!]!
|
||||||
|
claimableCameras(poolHallId: ID!): [PoolHallCamera!]!
|
||||||
|
cameraClaimSession(id: ID!): CameraClaimSession
|
||||||
|
activeCameraLease: CameraLease
|
||||||
getRuns(
|
getRuns(
|
||||||
filterInput: RunFilterInput!
|
filterInput: RunFilterInput!
|
||||||
runIds: [Int!] = null
|
runIds: [Int!] = null
|
||||||
@@ -108,7 +104,6 @@ type Query {
|
|||||||
): UserRelationshipsResult!
|
): UserRelationshipsResult!
|
||||||
getAvailableSubscriptionOptions: StripeSubscriptionOptionsGQL!
|
getAvailableSubscriptionOptions: StripeSubscriptionOptionsGQL!
|
||||||
getUserSubscriptionStatus: UserSubscriptionStatusGQL!
|
getUserSubscriptionStatus: UserSubscriptionStatusGQL!
|
||||||
getAppleAppAccountToken: String!
|
|
||||||
getQuotaStatus: QuotaStatusGQL!
|
getQuotaStatus: QuotaStatusGQL!
|
||||||
getPlayTime(userId: Int!, filters: VideoFilterInput = null): UserPlayTimeGQL!
|
getPlayTime(userId: Int!, filters: VideoFilterInput = null): UserPlayTimeGQL!
|
||||||
getUserVideos(
|
getUserVideos(
|
||||||
@@ -688,18 +683,10 @@ type PlayerSummaryGQL {
|
|||||||
makePercentage: Float!
|
makePercentage: Float!
|
||||||
score: Int
|
score: Int
|
||||||
longestRun: Int!
|
longestRun: Int!
|
||||||
runLengths: [Int!]!
|
|
||||||
spinTypeBreakdown: SpinTypeBreakdownGQL!
|
|
||||||
averageDifficulty: Float
|
averageDifficulty: Float
|
||||||
averageTimeBetweenShots: Float
|
averageTimeBetweenShots: Float
|
||||||
}
|
}
|
||||||
|
|
||||||
type SpinTypeBreakdownGQL {
|
|
||||||
draw: Int!
|
|
||||||
center: Int!
|
|
||||||
follow: Int!
|
|
||||||
}
|
|
||||||
|
|
||||||
type DeployedConfigGQL {
|
type DeployedConfigGQL {
|
||||||
allowNewUsers: Boolean!
|
allowNewUsers: Boolean!
|
||||||
firebase: Boolean!
|
firebase: Boolean!
|
||||||
@@ -768,13 +755,6 @@ type RunLeaderboardGQL {
|
|||||||
entries: [RunGQL!]!
|
entries: [RunGQL!]!
|
||||||
}
|
}
|
||||||
|
|
||||||
type DrillRunLeaderboardGQL {
|
|
||||||
entries: [RunGQL!]!
|
|
||||||
youRun: RunGQL
|
|
||||||
youRank: Int
|
|
||||||
totalPlayers: Int!
|
|
||||||
}
|
|
||||||
|
|
||||||
type CountLeaderboardGQL {
|
type CountLeaderboardGQL {
|
||||||
entries: [UserShotCountEntry!]!
|
entries: [UserShotCountEntry!]!
|
||||||
}
|
}
|
||||||
@@ -866,6 +846,63 @@ input NotificationFilters {
|
|||||||
notificationTypes: [NotificationTypeEnum!] = null
|
notificationTypes: [NotificationTypeEnum!] = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type PoolHall {
|
||||||
|
id: ID!
|
||||||
|
name: String!
|
||||||
|
address: String
|
||||||
|
latitude: Float
|
||||||
|
longitude: Float
|
||||||
|
timezone: String
|
||||||
|
status: String!
|
||||||
|
createdAt: DateTime!
|
||||||
|
updatedAt: DateTime!
|
||||||
|
}
|
||||||
|
|
||||||
|
type PoolHallCamera {
|
||||||
|
id: ID!
|
||||||
|
poolHallId: ID!
|
||||||
|
name: String!
|
||||||
|
tableLabel: String
|
||||||
|
streamPath: String!
|
||||||
|
status: String!
|
||||||
|
lastPublishedAt: DateTime
|
||||||
|
lastUnpublishedAt: DateTime
|
||||||
|
createdAt: DateTime!
|
||||||
|
updatedAt: DateTime!
|
||||||
|
poolHall: PoolHall!
|
||||||
|
}
|
||||||
|
|
||||||
|
type CameraClaimSession {
|
||||||
|
id: ID!
|
||||||
|
cameraId: ID!
|
||||||
|
userId: ID!
|
||||||
|
challengeCode: String!
|
||||||
|
status: String!
|
||||||
|
expiresAt: DateTime!
|
||||||
|
detectedAt: DateTime
|
||||||
|
failedAt: DateTime
|
||||||
|
failureReason: String
|
||||||
|
createdAt: DateTime!
|
||||||
|
updatedAt: DateTime!
|
||||||
|
camera: PoolHallCamera!
|
||||||
|
}
|
||||||
|
|
||||||
|
type CameraLease {
|
||||||
|
id: ID!
|
||||||
|
cameraId: ID!
|
||||||
|
claimSessionId: ID
|
||||||
|
userId: ID!
|
||||||
|
videoId: ID
|
||||||
|
status: String!
|
||||||
|
startedAt: DateTime!
|
||||||
|
endedAt: DateTime
|
||||||
|
expiresAt: DateTime
|
||||||
|
endReason: String
|
||||||
|
createdAt: DateTime!
|
||||||
|
updatedAt: DateTime!
|
||||||
|
camera: PoolHallCamera!
|
||||||
|
}
|
||||||
|
|
||||||
type GetRunsResult {
|
type GetRunsResult {
|
||||||
runs: [RunGQL!]!
|
runs: [RunGQL!]!
|
||||||
count: Int
|
count: Int
|
||||||
@@ -1009,7 +1046,6 @@ type UserRelationship {
|
|||||||
type StripeSubscriptionOptionsGQL {
|
type StripeSubscriptionOptionsGQL {
|
||||||
products: [StripeProductGQL!]!
|
products: [StripeProductGQL!]!
|
||||||
trialPeriodDays: Int
|
trialPeriodDays: Int
|
||||||
appleIap: AppleIapSubscriptionOptionsGQL!
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type StripeProductGQL {
|
type StripeProductGQL {
|
||||||
@@ -1030,11 +1066,6 @@ type StripePriceGQL {
|
|||||||
active: Boolean!
|
active: Boolean!
|
||||||
}
|
}
|
||||||
|
|
||||||
type AppleIapSubscriptionOptionsGQL {
|
|
||||||
enabled: Boolean!
|
|
||||||
proMonthlyProductId: String
|
|
||||||
}
|
|
||||||
|
|
||||||
type UserSubscriptionStatusGQL {
|
type UserSubscriptionStatusGQL {
|
||||||
hasActiveSubscription: Boolean!
|
hasActiveSubscription: Boolean!
|
||||||
entitlementSource: EntitlementSourceTypeEnum
|
entitlementSource: EntitlementSourceTypeEnum
|
||||||
@@ -1052,7 +1083,6 @@ enum EntitlementSourceTypeEnum {
|
|||||||
ADMIN
|
ADMIN
|
||||||
MANUAL
|
MANUAL
|
||||||
STRIPE
|
STRIPE
|
||||||
APPLE
|
|
||||||
ALPHA_LEGACY
|
ALPHA_LEGACY
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1182,6 +1212,15 @@ type Mutation {
|
|||||||
markAllNotificationsAsRead: Boolean!
|
markAllNotificationsAsRead: Boolean!
|
||||||
markNotificationsAsRead(notificationIds: [Int!]!): Boolean!
|
markNotificationsAsRead(notificationIds: [Int!]!): Boolean!
|
||||||
deleteNotification(notificationId: Int!): Boolean!
|
deleteNotification(notificationId: Int!): Boolean!
|
||||||
|
createPoolHall(input: CreatePoolHallInput!): PoolHall!
|
||||||
|
updatePoolHall(input: UpdatePoolHallInput!): PoolHall!
|
||||||
|
createPoolHallCamera(
|
||||||
|
input: CreatePoolHallCameraInput!
|
||||||
|
): PoolHallCameraStreamCredentials!
|
||||||
|
updatePoolHallCamera(input: UpdatePoolHallCameraInput!): PoolHallCamera!
|
||||||
|
rotatePoolHallCameraStreamKey(cameraId: ID!): PoolHallCameraStreamCredentials!
|
||||||
|
createCameraClaimSession(cameraId: ID!): CameraClaimSession!
|
||||||
|
cancelCameraClaimSession(claimSessionId: ID!): CameraClaimSession!
|
||||||
finalizePlayerAssignments(
|
finalizePlayerAssignments(
|
||||||
input: FinalizePlayerAssignmentsInput!
|
input: FinalizePlayerAssignmentsInput!
|
||||||
): [PlayerClusterGQL!]!
|
): [PlayerClusterGQL!]!
|
||||||
@@ -1208,9 +1247,6 @@ type Mutation {
|
|||||||
retireTags(tagIds: [Int!]!): Boolean!
|
retireTags(tagIds: [Int!]!): Boolean!
|
||||||
ensureStripeCustomerExists: UserGQL!
|
ensureStripeCustomerExists: UserGQL!
|
||||||
deleteUser: Boolean!
|
deleteUser: Boolean!
|
||||||
syncAppleSubscription(
|
|
||||||
input: SyncAppleSubscriptionInputGQL!
|
|
||||||
): SyncAppleSubscriptionResultGQL!
|
|
||||||
createSubscription(priceId: String!): CreateSubscriptionResultGQL!
|
createSubscription(priceId: String!): CreateSubscriptionResultGQL!
|
||||||
createCustomerPortalSession: CreateCustomerPortalSessionResultGQL!
|
createCustomerPortalSession: CreateCustomerPortalSessionResultGQL!
|
||||||
cancelSubscription: UserSubscriptionStatusGQL!
|
cancelSubscription: UserSubscriptionStatusGQL!
|
||||||
@@ -1259,6 +1295,44 @@ enum ReportReasonEnum {
|
|||||||
OTHER
|
OTHER
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input CreatePoolHallInput {
|
||||||
|
name: String!
|
||||||
|
address: String = null
|
||||||
|
latitude: Float = null
|
||||||
|
longitude: Float = null
|
||||||
|
timezone: String = null
|
||||||
|
}
|
||||||
|
|
||||||
|
input UpdatePoolHallInput {
|
||||||
|
id: ID!
|
||||||
|
name: String = null
|
||||||
|
address: String = null
|
||||||
|
latitude: Float = null
|
||||||
|
longitude: Float = null
|
||||||
|
timezone: String = null
|
||||||
|
status: String = null
|
||||||
|
}
|
||||||
|
|
||||||
|
type PoolHallCameraStreamCredentials {
|
||||||
|
camera: PoolHallCamera!
|
||||||
|
streamKey: String!
|
||||||
|
rtmpPath: String!
|
||||||
|
}
|
||||||
|
|
||||||
|
input CreatePoolHallCameraInput {
|
||||||
|
poolHallId: ID!
|
||||||
|
name: String!
|
||||||
|
tableLabel: String = null
|
||||||
|
streamPath: String = null
|
||||||
|
}
|
||||||
|
|
||||||
|
input UpdatePoolHallCameraInput {
|
||||||
|
id: ID!
|
||||||
|
name: String = null
|
||||||
|
tableLabel: String = null
|
||||||
|
status: String = null
|
||||||
|
}
|
||||||
|
|
||||||
input FinalizePlayerAssignmentsInput {
|
input FinalizePlayerAssignmentsInput {
|
||||||
videoId: Int!
|
videoId: Int!
|
||||||
clusterAssignments: [ClusterAssignmentInput!]! = []
|
clusterAssignments: [ClusterAssignmentInput!]! = []
|
||||||
@@ -1364,26 +1438,6 @@ input EditUserInputGQL {
|
|||||||
agreesToMarketing: Boolean = null
|
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 {
|
type CreateSubscriptionResultGQL {
|
||||||
checkoutUrl: String!
|
checkoutUrl: String!
|
||||||
sessionId: String!
|
sessionId: String!
|
||||||
|
|||||||
Reference in New Issue
Block a user