Compare commits
21 Commits
dean/camer
...
live-table
| Author | SHA1 | Date | |
|---|---|---|---|
| a150e1a300 | |||
| 63a376ed35 | |||
| 31f9852f4b | |||
| 0b4016c601 | |||
| 8e85fddb0a | |||
| 338798ea5a | |||
| 6bd92ae991 | |||
| 8dd9f6df40 | |||
| f60950a6f6 | |||
| 739451f250 | |||
| 146af8d713 | |||
| 43b99c447b | |||
| cba07aa69e | |||
| f626054662 | |||
|
|
6bc02ec47c | ||
| c92246510b | |||
|
|
3ce2a7be61 | ||
|
|
fc921c3ae7 | ||
| 0b6ac787d8 | |||
|
|
ac479dc7e4 | ||
| c6a754cc2d |
928
src/index.tsx
928
src/index.tsx
File diff suppressed because it is too large
Load Diff
@@ -7,6 +7,8 @@ query getDeployedConfig {
|
||||
minimumAllowedAppVersion
|
||||
subscriptionGatingEnabled
|
||||
quotaEnforcementEnabled
|
||||
storageLimitEnforcementEnabled
|
||||
capabilityEnforcementEnabled
|
||||
bannerMessages {
|
||||
color
|
||||
dismissible
|
||||
|
||||
@@ -44,6 +44,7 @@ fragment VideoCardFields on VideoGQL {
|
||||
streamSegmentType
|
||||
isCompleted
|
||||
lastSegmentUploadedAt
|
||||
clientUploadStatus
|
||||
}
|
||||
tableSize
|
||||
pocketSize
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -49,6 +49,20 @@ query GetAvailableSubscriptionOptions {
|
||||
proMonthlyProductId
|
||||
productIds
|
||||
}
|
||||
tierOptions {
|
||||
tierName
|
||||
tierDisplayName
|
||||
billingInterval
|
||||
platform
|
||||
isConfigured
|
||||
isAvailable
|
||||
stripeProductId
|
||||
stripePriceId
|
||||
appleProductId
|
||||
currency
|
||||
unitAmount
|
||||
recurringIntervalCount
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,6 +81,37 @@ query GetSubscriptionStatus {
|
||||
}
|
||||
}
|
||||
|
||||
query GetResolvedTier {
|
||||
getResolvedTier {
|
||||
tierName
|
||||
tierDisplayName
|
||||
hasActiveSubscription
|
||||
entitlementSource
|
||||
entitlementStatus
|
||||
entitlementStartsAt
|
||||
entitlementEndsAt
|
||||
capabilities
|
||||
}
|
||||
}
|
||||
|
||||
query GetStorageStatus {
|
||||
getStorageStatus {
|
||||
userId
|
||||
tierName
|
||||
retainedStorageUsedBytes
|
||||
retainedStorageLimitBytes
|
||||
isUnlimited
|
||||
policyConfigured
|
||||
remainingStorageBytes
|
||||
storageUsageRatio
|
||||
isNearLimit
|
||||
isOverLimit
|
||||
usageCalculated
|
||||
usageSource
|
||||
lastCalculatedAt
|
||||
}
|
||||
}
|
||||
|
||||
query GetAppleAppAccountToken {
|
||||
getAppleAppAccountToken
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@ fragment PoolHallFields on PoolHall {
|
||||
id
|
||||
name
|
||||
address
|
||||
city
|
||||
state
|
||||
latitude
|
||||
longitude
|
||||
timezone
|
||||
@@ -19,6 +21,10 @@ fragment PoolHallCameraFields on PoolHallCamera {
|
||||
status
|
||||
tableSize
|
||||
pocketSize
|
||||
allowsPrivateVideos
|
||||
claimTermsText
|
||||
claimTermsVersion
|
||||
inUse
|
||||
lastPublishedAt
|
||||
lastUnpublishedAt
|
||||
createdAt
|
||||
@@ -50,6 +56,7 @@ fragment CameraClaimSessionFields on CameraClaimSession {
|
||||
detectedAt
|
||||
failedAt
|
||||
failureReason
|
||||
agreedTermsVersion
|
||||
createdAt
|
||||
updatedAt
|
||||
camera {
|
||||
@@ -141,8 +148,22 @@ mutation RotatePoolHallCameraStreamKey($cameraId: ID!) {
|
||||
}
|
||||
}
|
||||
|
||||
mutation CreateCameraClaimSession($cameraId: ID!) {
|
||||
createCameraClaimSession(cameraId: $cameraId) {
|
||||
mutation CreateCameraClaimSession(
|
||||
$cameraId: ID!
|
||||
$durationMinutes: Int
|
||||
$videoName: String
|
||||
$videoPrivate: Boolean
|
||||
$agreedTermsVersion: Int
|
||||
$tags: [VideoTagInput!]
|
||||
) {
|
||||
createCameraClaimSession(
|
||||
cameraId: $cameraId
|
||||
durationMinutes: $durationMinutes
|
||||
videoName: $videoName
|
||||
videoPrivate: $videoPrivate
|
||||
agreedTermsVersion: $agreedTermsVersion
|
||||
tags: $tags
|
||||
) {
|
||||
...CameraClaimSessionFields
|
||||
}
|
||||
}
|
||||
@@ -152,3 +173,15 @@ mutation CancelCameraClaimSession($claimSessionId: ID!) {
|
||||
...CameraClaimSessionFields
|
||||
}
|
||||
}
|
||||
|
||||
mutation EndCameraLease($leaseId: ID!) {
|
||||
endCameraLease(leaseId: $leaseId) {
|
||||
...CameraLeaseFields
|
||||
}
|
||||
}
|
||||
|
||||
mutation ExtendCameraLease($leaseId: ID!, $additionalMinutes: Int! = 60) {
|
||||
extendCameraLease(leaseId: $leaseId, additionalMinutes: $additionalMinutes) {
|
||||
...CameraLeaseFields
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,19 @@ query GetTableState(
|
||||
}
|
||||
}
|
||||
|
||||
query GetLiveTableState($videoId: Int!) {
|
||||
getLiveTableState(videoId: $videoId) {
|
||||
videoId
|
||||
frameIndex
|
||||
tableState {
|
||||
identifierToPosition
|
||||
homography {
|
||||
...HomographyInfo
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query SimulateShot($simulationInput: SimulateShotInputGQL!) {
|
||||
simulateShot(simulationInput: $simulationInput) {
|
||||
trajectories {
|
||||
|
||||
@@ -37,6 +37,13 @@ mutation GetUploadLink($videoId: Int!, $segmentIndex: Int!) {
|
||||
}
|
||||
}
|
||||
}
|
||||
... on StorageLimitExceededErr {
|
||||
reason
|
||||
tierName
|
||||
retainedStorageUsedBytes
|
||||
retainedStorageLimitBytes
|
||||
remainingStorageBytes
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,6 +72,7 @@ type Query {
|
||||
tableSize: Float = 100
|
||||
useHomography: HomographyInputGQL = null
|
||||
): TableStateGQL!
|
||||
getLiveTableState(videoId: Int!): LiveTableStateGQL!
|
||||
simulateShot(simulationInput: SimulateShotInputGQL!): ShotProjectionGQL!
|
||||
computePotAim(
|
||||
simulationInput: SimulateShotInputGQL!
|
||||
@@ -892,6 +893,8 @@ type PoolHall {
|
||||
id: ID!
|
||||
name: String!
|
||||
address: String
|
||||
city: String
|
||||
state: String
|
||||
latitude: Float
|
||||
longitude: Float
|
||||
timezone: String
|
||||
@@ -909,10 +912,14 @@ type PoolHallCamera {
|
||||
status: String!
|
||||
tableSize: Float
|
||||
pocketSize: Float
|
||||
allowsPrivateVideos: Boolean!
|
||||
claimTermsText: String
|
||||
claimTermsVersion: Int
|
||||
lastPublishedAt: DateTime
|
||||
lastUnpublishedAt: DateTime
|
||||
createdAt: DateTime!
|
||||
updatedAt: DateTime!
|
||||
inUse: Boolean!
|
||||
poolHall: PoolHall!
|
||||
}
|
||||
|
||||
@@ -926,6 +933,7 @@ type CameraClaimSession {
|
||||
detectedAt: DateTime
|
||||
failedAt: DateTime
|
||||
failureReason: String
|
||||
agreedTermsVersion: Int
|
||||
createdAt: DateTime!
|
||||
updatedAt: DateTime!
|
||||
camera: PoolHallCamera!
|
||||
@@ -1042,6 +1050,12 @@ input IntPoint2DInput {
|
||||
y: Int!
|
||||
}
|
||||
|
||||
type LiveTableStateGQL {
|
||||
videoId: Int!
|
||||
frameIndex: Int!
|
||||
tableState: TableStateGQL!
|
||||
}
|
||||
|
||||
type ShotProjectionGQL {
|
||||
trajectories: [BallTrajectoryGQL!]!
|
||||
events: [SimulationEventGQL!]!
|
||||
@@ -1161,6 +1175,7 @@ type StripeSubscriptionOptionsGQL {
|
||||
products: [StripeProductGQL!]!
|
||||
trialPeriodDays: Int
|
||||
appleIap: AppleIapSubscriptionOptionsGQL!
|
||||
tierOptions: [SubscriptionTierPurchaseOptionGQL!]!
|
||||
}
|
||||
|
||||
type StripeProductGQL {
|
||||
@@ -1187,6 +1202,21 @@ type AppleIapSubscriptionOptionsGQL {
|
||||
productIds: [String!]!
|
||||
}
|
||||
|
||||
type SubscriptionTierPurchaseOptionGQL {
|
||||
tierName: String!
|
||||
tierDisplayName: String!
|
||||
billingInterval: String!
|
||||
platform: String!
|
||||
isConfigured: Boolean!
|
||||
isAvailable: Boolean!
|
||||
stripeProductId: String
|
||||
stripePriceId: String
|
||||
appleProductId: String
|
||||
currency: String
|
||||
unitAmount: Int
|
||||
recurringIntervalCount: Int
|
||||
}
|
||||
|
||||
type UserSubscriptionStatusGQL {
|
||||
hasActiveSubscription: Boolean!
|
||||
entitlementSource: EntitlementSourceTypeEnum
|
||||
@@ -1403,8 +1433,17 @@ type Mutation {
|
||||
): PoolHallCameraStreamCredentials!
|
||||
updatePoolHallCamera(input: UpdatePoolHallCameraInput!): PoolHallCamera!
|
||||
rotatePoolHallCameraStreamKey(cameraId: ID!): PoolHallCameraStreamCredentials!
|
||||
createCameraClaimSession(cameraId: ID!): CameraClaimSession!
|
||||
createCameraClaimSession(
|
||||
cameraId: ID!
|
||||
durationMinutes: Int = null
|
||||
videoName: String = null
|
||||
videoPrivate: Boolean = null
|
||||
agreedTermsVersion: Int = null
|
||||
tags: [VideoTagInput!] = null
|
||||
): CameraClaimSession!
|
||||
cancelCameraClaimSession(claimSessionId: ID!): CameraClaimSession!
|
||||
endCameraLease(leaseId: ID!): CameraLease!
|
||||
extendCameraLease(leaseId: ID!, additionalMinutes: Int! = 60): CameraLease!
|
||||
finalizePlayerAssignments(
|
||||
input: FinalizePlayerAssignmentsInput!
|
||||
): [PlayerClusterGQL!]!
|
||||
@@ -1487,6 +1526,8 @@ enum ReportReasonEnum {
|
||||
input CreatePoolHallInput {
|
||||
name: String!
|
||||
address: String = null
|
||||
city: String = null
|
||||
state: String = null
|
||||
latitude: Float = null
|
||||
longitude: Float = null
|
||||
timezone: String = null
|
||||
@@ -1496,6 +1537,8 @@ input UpdatePoolHallInput {
|
||||
id: ID!
|
||||
name: String = null
|
||||
address: String = null
|
||||
city: String = null
|
||||
state: String = null
|
||||
latitude: Float = null
|
||||
longitude: Float = null
|
||||
timezone: String = null
|
||||
@@ -1515,6 +1558,8 @@ input CreatePoolHallCameraInput {
|
||||
streamPath: String = null
|
||||
tableSize: Float = null
|
||||
pocketSize: Float = null
|
||||
allowsPrivateVideos: Boolean = null
|
||||
claimTermsText: String = null
|
||||
}
|
||||
|
||||
input UpdatePoolHallCameraInput {
|
||||
@@ -1524,6 +1569,8 @@ input UpdatePoolHallCameraInput {
|
||||
status: String = null
|
||||
tableSize: Float = null
|
||||
pocketSize: Float = null
|
||||
allowsPrivateVideos: Boolean = null
|
||||
claimTermsText: String = null
|
||||
}
|
||||
|
||||
input FinalizePlayerAssignmentsInput {
|
||||
|
||||
Reference in New Issue
Block a user