Compare commits

..

1 Commits

Author SHA1 Message Date
Dean Wenstrand
d4f4a539f5 Add camera-claim schema: venues, cameras, claim lifecycle
New query/mutation surface for the camera-claim flow: getVenues (with
per-camera availability), getActiveClaim, claimCamera, endClaim,
extendClaim, plus VenueGQL / VenueCameraGQL / CameraClaimGQL /
ClaimStatusEnum types.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 14:44:33 -07:00
7 changed files with 109 additions and 745 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -42,8 +42,6 @@ fragment VideoCardFields on VideoGQL {
id
lastIntendedSegmentBound
streamSegmentType
isCompleted
lastSegmentUploadedAt
}
tableSize
pocketSize
@@ -148,6 +146,5 @@ query GetVideoFeed(
endCursor
}
hasFollowing
followingCount
}
}

View File

@@ -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
}
}
}

View File

@@ -44,20 +44,12 @@ query GetAvailableSubscriptionOptions {
active
}
}
appleIap {
enabled
proMonthlyProductId
productIds
}
}
}
query GetSubscriptionStatus {
getUserSubscriptionStatus {
hasActiveSubscription
entitlementSource
entitlementStartsAt
entitlementEndsAt
subscriptionStatus
currentPeriodStart
currentPeriodEnd
@@ -67,35 +59,9 @@ query GetSubscriptionStatus {
}
}
query GetAppleAppAccountToken {
getAppleAppAccountToken
}
mutation SyncAppleSubscription($signedTransactionInfo: String!) {
syncAppleSubscription(
input: { signedTransactionInfo: $signedTransactionInfo }
) {
ok
errorCode
errorMessage
hasActiveSubscription
entitlementSource
entitlementStartsAt
entitlementEndsAt
appleStatus
originalTransactionId
latestTransactionId
productId
expiresAt
}
}
mutation CancelSubscription {
cancelSubscription {
hasActiveSubscription
entitlementSource
entitlementStartsAt
entitlementEndsAt
subscriptionStatus
currentPeriodStart
currentPeriodEnd

View File

@@ -9,12 +9,6 @@ fragment PlayerSummaryFields on PlayerSummaryGQL {
makePercentage
score
longestRun
runLengths
spinTypeBreakdown {
draw
center
follow
}
averageDifficulty
averageTimeBetweenShots
}

View File

@@ -177,7 +177,6 @@ mutation editUser(
$fargoRating: Int
$videosPrivateByDefault: Boolean
$agreesToMarketing: Boolean
$bio: String
) {
editUser(
input: {
@@ -185,7 +184,6 @@ mutation editUser(
fargoRating: $fargoRating
videosPrivateByDefault: $videosPrivateByDefault
agreesToMarketing: $agreesToMarketing
bio: $bio
}
) {
id
@@ -195,7 +193,6 @@ mutation editUser(
updatedAt
videosPrivateByDefault
agreesToMarketing
bio
}
}
@@ -209,7 +206,6 @@ fragment UserFragment on UserGQL {
username
isAdmin
profileImageUri
bio
fargoRating
activeVideoId
createdAt

View File

@@ -11,6 +11,8 @@ type Query {
myChallengeInvitations: [ChallengeInvitation!]!
ruleSets: [RuleSet!]!
myChallengeEntries: [ChallengeEntry!]!
getVenues: [VenueGQL!]!
getActiveClaim: CameraClaimGQL
getDeployedConfig: DeployedConfigGQL!
waitFor(duration: Float!): Float!
getFeedVideos(
@@ -31,16 +33,6 @@ type Query {
limit: Int! = 50
requiredTags: [String!] = null
): 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(
interval: TimeInterval = null
when: DateTime = null
@@ -108,7 +100,6 @@ type Query {
): UserRelationshipsResult!
getAvailableSubscriptionOptions: StripeSubscriptionOptionsGQL!
getUserSubscriptionStatus: UserSubscriptionStatusGQL!
getAppleAppAccountToken: String!
getQuotaStatus: QuotaStatusGQL!
getPlayTime(userId: Int!, filters: VideoFilterInput = null): UserPlayTimeGQL!
getUserVideos(
@@ -356,7 +347,6 @@ type UserGQL {
activeVideoId: Int
stripeCustomerId: String
profileImageUri: String
bio: String
createdAt: DateTime
updatedAt: DateTime
videosPrivateByDefault: Boolean
@@ -530,7 +520,6 @@ type UploadStreamGQL {
initPlaylistUploadStatus: InitPlaylistUploadStatusEnum
lowestUnuploadedSegmentIndex: Int!
uploadCompletionCursor: Int!
lastSegmentUploadedAt: DateTime
errors: [StreamErrorGQL!]!
createdAt: DateTime!
updatedAt: DateTime!
@@ -690,16 +679,50 @@ type PlayerSummaryGQL {
makePercentage: Float!
score: Int
longestRun: Int!
runLengths: [Int!]!
spinTypeBreakdown: SpinTypeBreakdownGQL!
averageDifficulty: Float
averageTimeBetweenShots: Float
}
type SpinTypeBreakdownGQL {
draw: Int!
center: Int!
follow: Int!
type VenueGQL {
id: Int!
name: String!
latitude: Float
longitude: Float
cameras: [VenueCameraGQL!]!
}
type VenueCameraGQL {
id: Int!
venueId: Int!
tableLabel: String!
enabled: Boolean!
isAvailable: Boolean!
}
type CameraClaimGQL {
id: Int!
cameraId: Int!
userId: Int!
videoId: Int
status: ClaimStatusEnum!
expiresAt: DateTime
endedAt: DateTime
createdAt: DateTime!
}
enum ClaimStatusEnum {
REQUESTED
CODE_ISSUED
SCANNING
SCAN_CONFIRMED
INGESTING
ACTIVE
ENDED_BY_USER
EXPIRED
STREAM_LOST
STREAM_UNREACHABLE
CODE_EXPIRED
RELEASED_INACTIVE
}
type DeployedConfigGQL {
@@ -734,7 +757,6 @@ type VideoHistoryGQL {
videos: [VideoGQL!]!
pageInfo: PageInfoGQL!
hasFollowing: Boolean!
followingCount: Int!
}
type PageInfoGQL {
@@ -771,13 +793,6 @@ type RunLeaderboardGQL {
entries: [RunGQL!]!
}
type DrillRunLeaderboardGQL {
entries: [RunGQL!]!
youRun: RunGQL
youRank: Int
totalPlayers: Int!
}
type CountLeaderboardGQL {
entries: [UserShotCountEntry!]!
}
@@ -1012,7 +1027,6 @@ type UserRelationship {
type StripeSubscriptionOptionsGQL {
products: [StripeProductGQL!]!
trialPeriodDays: Int
appleIap: AppleIapSubscriptionOptionsGQL!
}
type StripeProductGQL {
@@ -1033,12 +1047,6 @@ type StripePriceGQL {
active: Boolean!
}
type AppleIapSubscriptionOptionsGQL {
enabled: Boolean!
proMonthlyProductId: String
productIds: [String!]!
}
type UserSubscriptionStatusGQL {
hasActiveSubscription: Boolean!
entitlementSource: EntitlementSourceTypeEnum
@@ -1056,7 +1064,6 @@ enum EntitlementSourceTypeEnum {
ADMIN
MANUAL
STRIPE
APPLE
ALPHA_LEGACY
}
@@ -1166,6 +1173,9 @@ type Mutation {
submitChallengeEntry(entryId: ID!, videoId: ID!): ChallengeEntry!
dismissChallenge(challengeId: ID!): Boolean!
undismissChallenge(challengeId: ID!): Boolean!
claimCamera(cameraId: Int!, durationMinutes: Int! = 60): CameraClaimGQL!
endClaim(claimId: Int!): CameraClaimGQL!
extendClaim(claimId: Int!, additionalMinutes: Int! = 60): CameraClaimGQL!
setLoggerLevel(path: String!, level: String!): Boolean!
reactToVideo(videoId: Int!, reaction: ReactionEnum): Boolean!
commentOnVideo(
@@ -1212,9 +1222,6 @@ type Mutation {
retireTags(tagIds: [Int!]!): Boolean!
ensureStripeCustomerExists: UserGQL!
deleteUser: Boolean!
syncAppleSubscription(
input: SyncAppleSubscriptionInputGQL!
): SyncAppleSubscriptionResultGQL!
createSubscription(priceId: String!): CreateSubscriptionResultGQL!
createCustomerPortalSession: CreateCustomerPortalSessionResultGQL!
cancelSubscription: UserSubscriptionStatusGQL!
@@ -1366,27 +1373,6 @@ input EditUserInputGQL {
fargoRating: Int = null
videosPrivateByDefault: Boolean = null
agreesToMarketing: Boolean = null
bio: String = 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 {