Compare commits
12 Commits
c1efe9f5f2
...
colonelpan
| Author | SHA1 | Date | |
|---|---|---|---|
| 64bc5c723a | |||
| 8111042936 | |||
| d6fd68c1f6 | |||
| deb724b430 | |||
|
|
9250e4c639 | ||
|
|
5cf2dbaf01 | ||
| 239a143554 | |||
|
|
296522afb8 | ||
| f42579076e | |||
|
|
0c9eb4945a | ||
| 1182c15004 | |||
|
|
755336b16a |
1818
src/index.tsx
1818
src/index.tsx
File diff suppressed because it is too large
Load Diff
@@ -6,6 +6,7 @@ query getDeployedConfig {
|
|||||||
firebase
|
firebase
|
||||||
minimumAllowedAppVersion
|
minimumAllowedAppVersion
|
||||||
subscriptionGatingEnabled
|
subscriptionGatingEnabled
|
||||||
|
quotaEnforcementEnabled
|
||||||
bannerMessages {
|
bannerMessages {
|
||||||
color
|
color
|
||||||
dismissible
|
dismissible
|
||||||
|
|||||||
@@ -47,6 +47,12 @@ fragment VideoCardFields on VideoGQL {
|
|||||||
pocketSize
|
pocketSize
|
||||||
tags {
|
tags {
|
||||||
name
|
name
|
||||||
|
tagClasses {
|
||||||
|
name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
playerSummaries {
|
||||||
|
...PlayerSummaryFields
|
||||||
}
|
}
|
||||||
currentProcessing {
|
currentProcessing {
|
||||||
id
|
id
|
||||||
|
|||||||
152
src/operations/pool_hall.gql
Normal file
152
src/operations/pool_hall.gql
Normal file
@@ -0,0 +1,152 @@
|
|||||||
|
fragment PoolHallFields on PoolHall {
|
||||||
|
id
|
||||||
|
name
|
||||||
|
address
|
||||||
|
latitude
|
||||||
|
longitude
|
||||||
|
timezone
|
||||||
|
status
|
||||||
|
createdAt
|
||||||
|
updatedAt
|
||||||
|
}
|
||||||
|
|
||||||
|
fragment PoolHallCameraFields on PoolHallCamera {
|
||||||
|
id
|
||||||
|
poolHallId
|
||||||
|
name
|
||||||
|
tableLabel
|
||||||
|
streamPath
|
||||||
|
status
|
||||||
|
lastPublishedAt
|
||||||
|
lastUnpublishedAt
|
||||||
|
createdAt
|
||||||
|
updatedAt
|
||||||
|
}
|
||||||
|
|
||||||
|
fragment PoolHallCameraWithHallFields on PoolHallCamera {
|
||||||
|
...PoolHallCameraFields
|
||||||
|
poolHall {
|
||||||
|
...PoolHallFields
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fragment PoolHallCameraStreamCredentialsFields on PoolHallCameraStreamCredentials {
|
||||||
|
streamKey
|
||||||
|
rtmpPath
|
||||||
|
camera {
|
||||||
|
...PoolHallCameraWithHallFields
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fragment CameraClaimSessionFields on CameraClaimSession {
|
||||||
|
id
|
||||||
|
cameraId
|
||||||
|
userId
|
||||||
|
challengeCode
|
||||||
|
status
|
||||||
|
expiresAt
|
||||||
|
detectedAt
|
||||||
|
failedAt
|
||||||
|
failureReason
|
||||||
|
createdAt
|
||||||
|
updatedAt
|
||||||
|
camera {
|
||||||
|
...PoolHallCameraWithHallFields
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fragment CameraLeaseFields on CameraLease {
|
||||||
|
id
|
||||||
|
cameraId
|
||||||
|
claimSessionId
|
||||||
|
userId
|
||||||
|
videoId
|
||||||
|
status
|
||||||
|
startedAt
|
||||||
|
endedAt
|
||||||
|
expiresAt
|
||||||
|
endReason
|
||||||
|
createdAt
|
||||||
|
updatedAt
|
||||||
|
camera {
|
||||||
|
...PoolHallCameraWithHallFields
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
query GetPoolHalls {
|
||||||
|
poolHalls {
|
||||||
|
...PoolHallFields
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
query GetClaimablePoolHalls {
|
||||||
|
claimablePoolHalls {
|
||||||
|
...PoolHallFields
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
query GetPoolHallCameras($poolHallId: ID!) {
|
||||||
|
poolHallCameras(poolHallId: $poolHallId) {
|
||||||
|
...PoolHallCameraWithHallFields
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
query GetClaimableCameras($poolHallId: ID!) {
|
||||||
|
claimableCameras(poolHallId: $poolHallId) {
|
||||||
|
...PoolHallCameraWithHallFields
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
query GetCameraClaimSession($id: ID!) {
|
||||||
|
cameraClaimSession(id: $id) {
|
||||||
|
...CameraClaimSessionFields
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
query GetActiveCameraLease {
|
||||||
|
activeCameraLease {
|
||||||
|
...CameraLeaseFields
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mutation CreatePoolHall($input: CreatePoolHallInput!) {
|
||||||
|
createPoolHall(input: $input) {
|
||||||
|
...PoolHallFields
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mutation UpdatePoolHall($input: UpdatePoolHallInput!) {
|
||||||
|
updatePoolHall(input: $input) {
|
||||||
|
...PoolHallFields
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mutation CreatePoolHallCamera($input: CreatePoolHallCameraInput!) {
|
||||||
|
createPoolHallCamera(input: $input) {
|
||||||
|
...PoolHallCameraStreamCredentialsFields
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mutation UpdatePoolHallCamera($input: UpdatePoolHallCameraInput!) {
|
||||||
|
updatePoolHallCamera(input: $input) {
|
||||||
|
...PoolHallCameraWithHallFields
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mutation RotatePoolHallCameraStreamKey($cameraId: ID!) {
|
||||||
|
rotatePoolHallCameraStreamKey(cameraId: $cameraId) {
|
||||||
|
...PoolHallCameraStreamCredentialsFields
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mutation CreateCameraClaimSession($cameraId: ID!) {
|
||||||
|
createCameraClaimSession(cameraId: $cameraId) {
|
||||||
|
...CameraClaimSessionFields
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mutation CancelCameraClaimSession($claimSessionId: ID!) {
|
||||||
|
cancelCameraClaimSession(claimSessionId: $claimSessionId) {
|
||||||
|
...CameraClaimSessionFields
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,3 +1,18 @@
|
|||||||
|
fragment PlayerSummaryFields on PlayerSummaryGQL {
|
||||||
|
clusterId
|
||||||
|
userId
|
||||||
|
username
|
||||||
|
profileImageUri
|
||||||
|
representativeFullFrameUrl
|
||||||
|
totalShots
|
||||||
|
totalShotsMade
|
||||||
|
makePercentage
|
||||||
|
score
|
||||||
|
longestRun
|
||||||
|
averageDifficulty
|
||||||
|
averageTimeBetweenShots
|
||||||
|
}
|
||||||
|
|
||||||
fragment PlayerClusterShotFields on PlayerClusterShotGQL {
|
fragment PlayerClusterShotFields on PlayerClusterShotGQL {
|
||||||
shotId
|
shotId
|
||||||
bboxX1
|
bboxX1
|
||||||
@@ -15,7 +30,10 @@ fragment PlayerClusterFields on PlayerClusterGQL {
|
|||||||
clusterId
|
clusterId
|
||||||
nShots
|
nShots
|
||||||
userId
|
userId
|
||||||
|
username
|
||||||
|
profileImageUri
|
||||||
confirmed
|
confirmed
|
||||||
|
score
|
||||||
shots {
|
shots {
|
||||||
...PlayerClusterShotFields
|
...PlayerClusterShotFields
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,6 +83,9 @@ query GetVideoDetails($videoId: Int!) {
|
|||||||
}
|
}
|
||||||
name
|
name
|
||||||
}
|
}
|
||||||
|
playerSummaries {
|
||||||
|
...PlayerSummaryFields
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
144
src/schema.gql
144
src/schema.gql
@@ -42,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
|
||||||
@@ -406,6 +412,7 @@ type VideoGQL {
|
|||||||
currentProcessing: VideoProcessingGQL
|
currentProcessing: VideoProcessingGQL
|
||||||
reactions: [ReactionGQL!]!
|
reactions: [ReactionGQL!]!
|
||||||
comments: [CommentGQL!]!
|
comments: [CommentGQL!]!
|
||||||
|
playerSummaries: [PlayerSummaryGQL!]!
|
||||||
}
|
}
|
||||||
|
|
||||||
type ShotGQL {
|
type ShotGQL {
|
||||||
@@ -665,6 +672,21 @@ type CommentGQL {
|
|||||||
replies: [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 {
|
type DeployedConfigGQL {
|
||||||
allowNewUsers: Boolean!
|
allowNewUsers: Boolean!
|
||||||
firebase: Boolean!
|
firebase: Boolean!
|
||||||
@@ -672,6 +694,7 @@ type DeployedConfigGQL {
|
|||||||
environment: String!
|
environment: String!
|
||||||
minimumAllowedAppVersion: String!
|
minimumAllowedAppVersion: String!
|
||||||
subscriptionGatingEnabled: Boolean!
|
subscriptionGatingEnabled: Boolean!
|
||||||
|
quotaEnforcementEnabled: Boolean!
|
||||||
bannerMessages: [BannerGQL!]!
|
bannerMessages: [BannerGQL!]!
|
||||||
defaultAndroidRecordingFormat: StreamSegmentTypeEnum!
|
defaultAndroidRecordingFormat: StreamSegmentTypeEnum!
|
||||||
bucketUrl: String!
|
bucketUrl: String!
|
||||||
@@ -823,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
|
||||||
@@ -866,7 +946,10 @@ type PlayerClusterGQL {
|
|||||||
clusterId: Int!
|
clusterId: Int!
|
||||||
nShots: Int!
|
nShots: Int!
|
||||||
userId: Int
|
userId: Int
|
||||||
|
username: String
|
||||||
|
profileImageUri: String
|
||||||
confirmed: Boolean!
|
confirmed: Boolean!
|
||||||
|
score: Int
|
||||||
shots: [PlayerClusterShotGQL!]!
|
shots: [PlayerClusterShotGQL!]!
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1021,6 +1104,19 @@ type QuotaStatusGQL {
|
|||||||
durationUsedSeconds: Float!
|
durationUsedSeconds: Float!
|
||||||
durationLimitSeconds: Int
|
durationLimitSeconds: Int
|
||||||
maxVideoDurationSeconds: 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
|
durationRemainingSeconds: Float
|
||||||
canUpload: Boolean!
|
canUpload: Boolean!
|
||||||
}
|
}
|
||||||
@@ -1116,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!]!
|
||||||
@@ -1190,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!]! = []
|
||||||
@@ -1199,6 +1342,7 @@ input FinalizePlayerAssignmentsInput {
|
|||||||
input ClusterAssignmentInput {
|
input ClusterAssignmentInput {
|
||||||
clusterId: Int!
|
clusterId: Int!
|
||||||
userId: Int = null
|
userId: Int = null
|
||||||
|
score: Int = null
|
||||||
}
|
}
|
||||||
|
|
||||||
input ShotMoveInput {
|
input ShotMoveInput {
|
||||||
|
|||||||
Reference in New Issue
Block a user