Compare commits
24 Commits
loewy/scop
...
colonelpan
| Author | SHA1 | Date | |
|---|---|---|---|
| 8111042936 | |||
| d6fd68c1f6 | |||
| deb724b430 | |||
|
|
9250e4c639 | ||
|
|
5cf2dbaf01 | ||
| 239a143554 | |||
|
|
296522afb8 | ||
| f42579076e | |||
|
|
0c9eb4945a | ||
| 1182c15004 | |||
|
|
755336b16a | ||
| c1efe9f5f2 | |||
|
|
a3460842ac | ||
| 84d3a0252d | |||
|
|
1de4a97cb6 | ||
| 130314546c | |||
| b88f172355 | |||
| 639fc88b0b | |||
| 20f50368c9 | |||
| 8367c2d0cd | |||
| b0c62f6e80 | |||
| bc1ff66467 | |||
| ae37a3d9d9 | |||
|
|
114b21400e |
729
src/index.tsx
729
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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -83,6 +83,9 @@ query GetVideoDetails($videoId: Int!) {
|
||||
}
|
||||
name
|
||||
}
|
||||
playerSummaries {
|
||||
...PlayerSummaryFields
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
202
src/schema.gql
202
src/schema.gql
@@ -28,7 +28,7 @@ type Query {
|
||||
getLongestRunsLeaderboard(
|
||||
interval: TimeInterval = null
|
||||
when: DateTime = null
|
||||
limit: Int! = 100
|
||||
limit: Int! = 50
|
||||
requiredTags: [String!] = null
|
||||
): RunLeaderboardGQL!
|
||||
getMakesLeaderboard(
|
||||
@@ -42,6 +42,12 @@ type Query {
|
||||
filters: NotificationFilters = null
|
||||
): NotificationConnection!
|
||||
unreadNotificationCount: Int!
|
||||
poolHalls: [PoolHall!]!
|
||||
claimablePoolHalls: [PoolHall!]!
|
||||
poolHallCameras(poolHallId: ID!): [PoolHallCamera!]!
|
||||
claimableCameras(poolHallId: ID!): [PoolHallCamera!]!
|
||||
cameraClaimSession(id: ID!): CameraClaimSession
|
||||
activeCameraLease: CameraLease
|
||||
getRuns(
|
||||
filterInput: RunFilterInput!
|
||||
runIds: [Int!] = null
|
||||
@@ -49,6 +55,7 @@ type Query {
|
||||
limit: Int! = 500
|
||||
countRespectsLimit: Boolean! = false
|
||||
): GetRunsResult!
|
||||
videoPlayerClusters(videoId: Int!): [PlayerClusterGQL!]!
|
||||
getShotAnnotationTypes(errorTypes: Boolean = false): [ShotAnnotationTypeGQL!]!
|
||||
getTableState(
|
||||
b64Image: String!
|
||||
@@ -405,6 +412,7 @@ type VideoGQL {
|
||||
currentProcessing: VideoProcessingGQL
|
||||
reactions: [ReactionGQL!]!
|
||||
comments: [CommentGQL!]!
|
||||
playerSummaries: [PlayerSummaryGQL!]!
|
||||
}
|
||||
|
||||
type ShotGQL {
|
||||
@@ -664,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!
|
||||
@@ -671,6 +694,7 @@ type DeployedConfigGQL {
|
||||
environment: String!
|
||||
minimumAllowedAppVersion: String!
|
||||
subscriptionGatingEnabled: Boolean!
|
||||
quotaEnforcementEnabled: Boolean!
|
||||
bannerMessages: [BannerGQL!]!
|
||||
defaultAndroidRecordingFormat: StreamSegmentTypeEnum!
|
||||
bucketUrl: String!
|
||||
@@ -822,6 +846,63 @@ input NotificationFilters {
|
||||
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 {
|
||||
runs: [RunGQL!]!
|
||||
count: Int
|
||||
@@ -860,6 +941,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 +1045,7 @@ type UserRelationship {
|
||||
|
||||
type StripeSubscriptionOptionsGQL {
|
||||
products: [StripeProductGQL!]!
|
||||
trialPeriodDays: Int
|
||||
}
|
||||
|
||||
type StripeProductGQL {
|
||||
@@ -998,15 +1104,21 @@ type QuotaStatusGQL {
|
||||
durationUsedSeconds: Float!
|
||||
durationLimitSeconds: Int
|
||||
maxVideoDurationSeconds: Int
|
||||
recordingPermission: UploadPermissionGQL!
|
||||
importUploadPermission: UploadPermissionGQL!
|
||||
importQuotaBuckets: [QuotaBucketStatusGQL!]!
|
||||
recordingQuotaBuckets: [QuotaBucketStatusGQL!]!
|
||||
durationRemainingSeconds: Float
|
||||
canUpload: Boolean!
|
||||
}
|
||||
|
||||
type UploadPermissionGQL {
|
||||
allowed: Boolean!
|
||||
reason: String
|
||||
type QuotaBucketStatusGQL {
|
||||
quotaKey: String!
|
||||
appliesToUploadKind: String!
|
||||
periodStart: DateTime!
|
||||
periodEnd: DateTime!
|
||||
durationUsedSeconds: Float!
|
||||
durationLimitSeconds: Int
|
||||
durationRemainingSeconds: Float
|
||||
canUpload: Boolean!
|
||||
}
|
||||
|
||||
type UserPlayTimeGQL {
|
||||
@@ -1100,6 +1212,18 @@ type Mutation {
|
||||
markAllNotificationsAsRead: Boolean!
|
||||
markNotificationsAsRead(notificationIds: [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(
|
||||
input: FinalizePlayerAssignmentsInput!
|
||||
): [PlayerClusterGQL!]!
|
||||
addAnnotationToShot(
|
||||
shotId: Int!
|
||||
annotationName: String!
|
||||
@@ -1124,6 +1248,7 @@ type Mutation {
|
||||
ensureStripeCustomerExists: UserGQL!
|
||||
deleteUser: Boolean!
|
||||
createSubscription(priceId: String!): CreateSubscriptionResultGQL!
|
||||
createCustomerPortalSession: CreateCustomerPortalSessionResultGQL!
|
||||
cancelSubscription: UserSubscriptionStatusGQL!
|
||||
grantManualEntitlement(
|
||||
userId: Int!
|
||||
@@ -1141,7 +1266,6 @@ type Mutation {
|
||||
findPrerecordTableLayout(b64Image: String!, videoId: Int!): HomographyInfoGQL
|
||||
createUploadStream(
|
||||
videoMetadata: VideoMetadataInput!
|
||||
uploadKind: UploadKindEnum = null
|
||||
expectedDurationSeconds: Float = null
|
||||
): CreateUploadStreamReturn!
|
||||
getUploadLink(videoId: Int!, segmentIndex: Int!): GetUploadLinkReturn!
|
||||
@@ -1171,6 +1295,61 @@ enum ReportReasonEnum {
|
||||
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 {
|
||||
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!
|
||||
}
|
||||
@@ -1264,6 +1443,10 @@ type CreateSubscriptionResultGQL {
|
||||
sessionId: String!
|
||||
}
|
||||
|
||||
type CreateCustomerPortalSessionResultGQL {
|
||||
portalUrl: String!
|
||||
}
|
||||
|
||||
enum CancellationReasonEnum {
|
||||
DONT_PLAY_ENOUGH
|
||||
TOO_EXPENSIVE
|
||||
@@ -1310,11 +1493,6 @@ input VideoResolution {
|
||||
height: Int!
|
||||
}
|
||||
|
||||
enum UploadKindEnum {
|
||||
RECORDING
|
||||
IMPORT
|
||||
}
|
||||
|
||||
type GetUploadLinkReturn {
|
||||
value: UploadLinkGetUploadLinkErrors!
|
||||
stream: UploadStreamGQL
|
||||
|
||||
Reference in New Issue
Block a user