Compare commits
10 Commits
colonelpan
...
7cef75b2ca
| Author | SHA1 | Date | |
|---|---|---|---|
| 7cef75b2ca | |||
|
|
6d5cd9b1ed | ||
|
|
d59e21c10e | ||
| 9358205327 | |||
| 88634a32e9 | |||
| f7200a2e9f | |||
| 7d839c0fa6 | |||
| ab1e604871 | |||
| c586bdf1a6 | |||
| a12b3e1210 |
2192
src/index.tsx
2192
src/index.tsx
File diff suppressed because it is too large
Load Diff
@@ -101,6 +101,27 @@ 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(
|
||||
$limit: Int! = 5
|
||||
$after: String = null
|
||||
|
||||
@@ -1,152 +0,0 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
@@ -132,6 +132,38 @@ 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 {
|
||||
id
|
||||
videoId
|
||||
|
||||
@@ -49,6 +49,39 @@ 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(
|
||||
$matchString: String!
|
||||
$limit: Int = null
|
||||
|
||||
@@ -139,6 +139,15 @@ 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!]!) {
|
||||
getVideos(videoIds: $videoIds) {
|
||||
...VideoStreamMetadata
|
||||
|
||||
110
src/schema.gql
110
src/schema.gql
@@ -42,12 +42,6 @@ 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
|
||||
@@ -846,63 +840,6 @@ 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
|
||||
@@ -1212,15 +1149,6 @@ 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!]!
|
||||
@@ -1295,44 +1223,6 @@ 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!]! = []
|
||||
|
||||
Reference in New Issue
Block a user