Compare commits
28 Commits
dfd03a225a
...
dean/playe
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a3460842ac | ||
| 84d3a0252d | |||
|
|
1de4a97cb6 | ||
| 130314546c | |||
| b88f172355 | |||
| 639fc88b0b | |||
| 20f50368c9 | |||
| 8367c2d0cd | |||
| b0c62f6e80 | |||
| bc1ff66467 | |||
| ae37a3d9d9 | |||
|
|
114b21400e | ||
| ad9cab4543 | |||
| cd3ecdfba4 | |||
| 28ba01c07f | |||
| 27a0c08cd5 | |||
| 99f0913fd8 | |||
| dfb0e02630 | |||
| c4a2e184fb | |||
| f14cf3b255 | |||
| c46776d417 | |||
| 6ab5286a49 | |||
| cd6a33bfed | |||
| 07bb45942e | |||
| 9abb533be8 | |||
| c76220b65f | |||
| 1218ecdaaa | |||
| c3156bac05 |
709
src/index.tsx
709
src/index.tsx
File diff suppressed because it is too large
Load Diff
@@ -31,41 +31,26 @@ fragment VideoCardFields on VideoGQL {
|
|||||||
}
|
}
|
||||||
name
|
name
|
||||||
screenshotUri
|
screenshotUri
|
||||||
totalShotsMade
|
|
||||||
totalShots
|
totalShots
|
||||||
makePercentage
|
makePercentage
|
||||||
averageTimeBetweenShots
|
averageTimeBetweenShots
|
||||||
averageDifficulty
|
averageDifficulty
|
||||||
createdAt
|
|
||||||
updatedAt
|
|
||||||
startTime
|
startTime
|
||||||
endTime
|
|
||||||
private
|
private
|
||||||
elapsedTime
|
elapsedTime
|
||||||
screenshotUri
|
|
||||||
stream {
|
stream {
|
||||||
id
|
id
|
||||||
lastIntendedSegmentBound
|
lastIntendedSegmentBound
|
||||||
isCompleted
|
|
||||||
streamSegmentType
|
streamSegmentType
|
||||||
}
|
}
|
||||||
tableSize
|
tableSize
|
||||||
pocketSize
|
pocketSize
|
||||||
tags {
|
tags {
|
||||||
tagClasses {
|
|
||||||
name
|
|
||||||
}
|
|
||||||
name
|
name
|
||||||
}
|
}
|
||||||
currentProcessing {
|
currentProcessing {
|
||||||
id
|
id
|
||||||
errors {
|
|
||||||
message
|
|
||||||
}
|
|
||||||
status
|
status
|
||||||
statuses {
|
|
||||||
status
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
reactions {
|
reactions {
|
||||||
videoId
|
videoId
|
||||||
@@ -90,6 +75,26 @@ fragment VideoCardFields on VideoGQL {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Lightweight version of GetVideoFeed for counting sessions only
|
||||||
|
query GetVideoFeedSessionCount(
|
||||||
|
$limit: Int! = 100
|
||||||
|
$filters: VideoFilterInput = null
|
||||||
|
$includePrivate: IncludePrivateEnum = MINE
|
||||||
|
$feedInput: VideoFeedInputGQL = null
|
||||||
|
) {
|
||||||
|
getFeedVideos(
|
||||||
|
limit: $limit
|
||||||
|
filters: $filters
|
||||||
|
includePrivate: $includePrivate
|
||||||
|
feedInput: $feedInput
|
||||||
|
) {
|
||||||
|
videos {
|
||||||
|
id
|
||||||
|
totalShots
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
query GetVideoFeed(
|
query GetVideoFeed(
|
||||||
$limit: Int! = 5
|
$limit: Int! = 5
|
||||||
$after: String = null
|
$after: String = null
|
||||||
|
|||||||
@@ -20,8 +20,15 @@ mutation CreateSubscription($priceId: String!) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mutation CreateCustomerPortalSession {
|
||||||
|
createCustomerPortalSession {
|
||||||
|
portalUrl
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
query GetAvailableSubscriptionOptions {
|
query GetAvailableSubscriptionOptions {
|
||||||
getAvailableSubscriptionOptions {
|
getAvailableSubscriptionOptions {
|
||||||
|
trialPeriodDays
|
||||||
products {
|
products {
|
||||||
id
|
id
|
||||||
name
|
name
|
||||||
|
|||||||
34
src/operations/shooter.gql
Normal file
34
src/operations/shooter.gql
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
fragment PlayerClusterShotFields on PlayerClusterShotGQL {
|
||||||
|
shotId
|
||||||
|
bboxX1
|
||||||
|
bboxY1
|
||||||
|
bboxX2
|
||||||
|
bboxY2
|
||||||
|
confidence
|
||||||
|
isConfirmed
|
||||||
|
cropUrl
|
||||||
|
fullFrameUrl
|
||||||
|
}
|
||||||
|
|
||||||
|
fragment PlayerClusterFields on PlayerClusterGQL {
|
||||||
|
videoId
|
||||||
|
clusterId
|
||||||
|
nShots
|
||||||
|
userId
|
||||||
|
confirmed
|
||||||
|
shots {
|
||||||
|
...PlayerClusterShotFields
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
query VideoPlayerClusters($videoId: Int!) {
|
||||||
|
videoPlayerClusters(videoId: $videoId) {
|
||||||
|
...PlayerClusterFields
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mutation FinalizePlayerAssignments($input: FinalizePlayerAssignmentsInput!) {
|
||||||
|
finalizePlayerAssignments(input: $input) {
|
||||||
|
...PlayerClusterFields
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -92,6 +92,17 @@ query GetUserTags {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
query GetGameTypeTagMetrics($input: GameTypeTagMetricsInput!) {
|
||||||
|
getGameTypeTagMetrics(input: $input) {
|
||||||
|
tagName
|
||||||
|
tagLabel
|
||||||
|
tableSize
|
||||||
|
shotCount
|
||||||
|
madeShots
|
||||||
|
makeRate
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
mutation followUser($followedUserId: Int!) {
|
mutation followUser($followedUserId: Int!) {
|
||||||
followUser(followedUserId: $followedUserId) {
|
followUser(followedUserId: $followedUserId) {
|
||||||
id
|
id
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ query GetStreamMonitoringDetails($videoId: Int!, $debuggingJson: JSON) {
|
|||||||
stream {
|
stream {
|
||||||
id
|
id
|
||||||
linksRequested
|
linksRequested
|
||||||
|
lowestUnuploadedSegmentIndex
|
||||||
uploadsCompleted
|
uploadsCompleted
|
||||||
segmentProcessingCursor
|
segmentProcessingCursor
|
||||||
isCompleted
|
isCompleted
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
mutation CreateUploadStream($videoMetadataInput: VideoMetadataInput!) {
|
mutation CreateUploadStream(
|
||||||
createUploadStream(videoMetadata: $videoMetadataInput) {
|
$videoMetadataInput: VideoMetadataInput!
|
||||||
|
$expectedDurationSeconds: Float = null
|
||||||
|
) {
|
||||||
|
createUploadStream(
|
||||||
|
videoMetadata: $videoMetadataInput
|
||||||
|
expectedDurationSeconds: $expectedDurationSeconds
|
||||||
|
) {
|
||||||
videoId
|
videoId
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
102
src/schema.gql
102
src/schema.gql
@@ -28,7 +28,7 @@ type Query {
|
|||||||
getLongestRunsLeaderboard(
|
getLongestRunsLeaderboard(
|
||||||
interval: TimeInterval = null
|
interval: TimeInterval = null
|
||||||
when: DateTime = null
|
when: DateTime = null
|
||||||
limit: Int! = 100
|
limit: Int! = 50
|
||||||
requiredTags: [String!] = null
|
requiredTags: [String!] = null
|
||||||
): RunLeaderboardGQL!
|
): RunLeaderboardGQL!
|
||||||
getMakesLeaderboard(
|
getMakesLeaderboard(
|
||||||
@@ -49,6 +49,7 @@ type Query {
|
|||||||
limit: Int! = 500
|
limit: Int! = 500
|
||||||
countRespectsLimit: Boolean! = false
|
countRespectsLimit: Boolean! = false
|
||||||
): GetRunsResult!
|
): GetRunsResult!
|
||||||
|
videoPlayerClusters(videoId: Int!): [PlayerClusterGQL!]!
|
||||||
getShotAnnotationTypes(errorTypes: Boolean = false): [ShotAnnotationTypeGQL!]!
|
getShotAnnotationTypes(errorTypes: Boolean = false): [ShotAnnotationTypeGQL!]!
|
||||||
getTableState(
|
getTableState(
|
||||||
b64Image: String!
|
b64Image: String!
|
||||||
@@ -97,6 +98,7 @@ type Query {
|
|||||||
): UserRelationshipsResult!
|
): UserRelationshipsResult!
|
||||||
getAvailableSubscriptionOptions: StripeSubscriptionOptionsGQL!
|
getAvailableSubscriptionOptions: StripeSubscriptionOptionsGQL!
|
||||||
getUserSubscriptionStatus: UserSubscriptionStatusGQL!
|
getUserSubscriptionStatus: UserSubscriptionStatusGQL!
|
||||||
|
getQuotaStatus: QuotaStatusGQL!
|
||||||
getPlayTime(userId: Int!, filters: VideoFilterInput = null): UserPlayTimeGQL!
|
getPlayTime(userId: Int!, filters: VideoFilterInput = null): UserPlayTimeGQL!
|
||||||
getUserVideos(
|
getUserVideos(
|
||||||
userId: Int = null
|
userId: Int = null
|
||||||
@@ -105,6 +107,7 @@ type Query {
|
|||||||
filters: VideoFilterInput = null
|
filters: VideoFilterInput = null
|
||||||
): VideoHistoryGQL!
|
): VideoHistoryGQL!
|
||||||
getUserTags(includeRetiredTags: Boolean = false): [TagGQL!]!
|
getUserTags(includeRetiredTags: Boolean = false): [TagGQL!]!
|
||||||
|
getGameTypeTagMetrics(input: GameTypeTagMetricsInput!): [GameTypeTagMetric!]!
|
||||||
getVideo(videoId: Int!, debuggingJson: JSON = null): VideoGQL!
|
getVideo(videoId: Int!, debuggingJson: JSON = null): VideoGQL!
|
||||||
getVideos(videoIds: [Int!]!): [VideoGQL!]!
|
getVideos(videoIds: [Int!]!): [VideoGQL!]!
|
||||||
}
|
}
|
||||||
@@ -605,6 +608,8 @@ type IntPoint2D {
|
|||||||
|
|
||||||
type VideoProcessingGQL {
|
type VideoProcessingGQL {
|
||||||
id: Int!
|
id: Int!
|
||||||
|
parentProcessingId: Int
|
||||||
|
labels: [String!]!
|
||||||
errors: [VideoProcessingErrorGQL!]!
|
errors: [VideoProcessingErrorGQL!]!
|
||||||
status: ProcessingStatusEnum!
|
status: ProcessingStatusEnum!
|
||||||
statuses: [VideoProcessingStatusGQL!]!
|
statuses: [VideoProcessingStatusGQL!]!
|
||||||
@@ -856,6 +861,27 @@ input DatetimeOrdering {
|
|||||||
startingAt: DateTime = null
|
startingAt: DateTime = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type PlayerClusterGQL {
|
||||||
|
videoId: Int!
|
||||||
|
clusterId: Int!
|
||||||
|
nShots: Int!
|
||||||
|
userId: Int
|
||||||
|
confirmed: Boolean!
|
||||||
|
shots: [PlayerClusterShotGQL!]!
|
||||||
|
}
|
||||||
|
|
||||||
|
type PlayerClusterShotGQL {
|
||||||
|
shotId: Int!
|
||||||
|
bboxX1: Int!
|
||||||
|
bboxY1: Int!
|
||||||
|
bboxX2: Int!
|
||||||
|
bboxY2: Int!
|
||||||
|
confidence: Float!
|
||||||
|
isConfirmed: Boolean!
|
||||||
|
cropUrl: String
|
||||||
|
fullFrameUrl: String
|
||||||
|
}
|
||||||
|
|
||||||
type TableStateGQL {
|
type TableStateGQL {
|
||||||
identifierToPosition: [[Float!]!]!
|
identifierToPosition: [[Float!]!]!
|
||||||
homography: HomographyInfoGQL
|
homography: HomographyInfoGQL
|
||||||
@@ -936,6 +962,7 @@ type UserRelationship {
|
|||||||
|
|
||||||
type StripeSubscriptionOptionsGQL {
|
type StripeSubscriptionOptionsGQL {
|
||||||
products: [StripeProductGQL!]!
|
products: [StripeProductGQL!]!
|
||||||
|
trialPeriodDays: Int
|
||||||
}
|
}
|
||||||
|
|
||||||
type StripeProductGQL {
|
type StripeProductGQL {
|
||||||
@@ -958,6 +985,9 @@ type StripePriceGQL {
|
|||||||
|
|
||||||
type UserSubscriptionStatusGQL {
|
type UserSubscriptionStatusGQL {
|
||||||
hasActiveSubscription: Boolean!
|
hasActiveSubscription: Boolean!
|
||||||
|
entitlementSource: EntitlementSourceTypeEnum
|
||||||
|
entitlementStartsAt: DateTime
|
||||||
|
entitlementEndsAt: DateTime
|
||||||
subscriptionStatus: StripeSubscriptionStatusEnum
|
subscriptionStatus: StripeSubscriptionStatusEnum
|
||||||
currentPeriodStart: DateTime
|
currentPeriodStart: DateTime
|
||||||
currentPeriodEnd: DateTime
|
currentPeriodEnd: DateTime
|
||||||
@@ -966,6 +996,13 @@ type UserSubscriptionStatusGQL {
|
|||||||
stripeSubscriptionId: String
|
stripeSubscriptionId: String
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum EntitlementSourceTypeEnum {
|
||||||
|
ADMIN
|
||||||
|
MANUAL
|
||||||
|
STRIPE
|
||||||
|
ALPHA_LEGACY
|
||||||
|
}
|
||||||
|
|
||||||
enum StripeSubscriptionStatusEnum {
|
enum StripeSubscriptionStatusEnum {
|
||||||
INCOMPLETE
|
INCOMPLETE
|
||||||
INCOMPLETE_EXPIRED
|
INCOMPLETE_EXPIRED
|
||||||
@@ -977,6 +1014,17 @@ enum StripeSubscriptionStatusEnum {
|
|||||||
PAUSED
|
PAUSED
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type QuotaStatusGQL {
|
||||||
|
tierName: String!
|
||||||
|
periodStart: DateTime!
|
||||||
|
periodEnd: DateTime!
|
||||||
|
durationUsedSeconds: Float!
|
||||||
|
durationLimitSeconds: Int
|
||||||
|
maxVideoDurationSeconds: Int
|
||||||
|
durationRemainingSeconds: Float
|
||||||
|
canUpload: Boolean!
|
||||||
|
}
|
||||||
|
|
||||||
type UserPlayTimeGQL {
|
type UserPlayTimeGQL {
|
||||||
totalSeconds: Float!
|
totalSeconds: Float!
|
||||||
}
|
}
|
||||||
@@ -993,6 +1041,25 @@ type TagClassGQL {
|
|||||||
name: String!
|
name: String!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type GameTypeTagMetric {
|
||||||
|
tagName: String!
|
||||||
|
tagLabel: String!
|
||||||
|
tableSize: Float
|
||||||
|
shotCount: Int!
|
||||||
|
madeShots: Int!
|
||||||
|
makeRate: Float!
|
||||||
|
}
|
||||||
|
|
||||||
|
input GameTypeTagMetricsInput {
|
||||||
|
userId: Int!
|
||||||
|
createdAt: DateRangeFilter = null
|
||||||
|
maxTags: Int = null
|
||||||
|
groupByTableSize: Boolean! = true
|
||||||
|
includeUnknown: Boolean! = true
|
||||||
|
tagClass: String = "game_type"
|
||||||
|
includePrivate: IncludePrivateEnum! = MINE
|
||||||
|
}
|
||||||
|
|
||||||
"""
|
"""
|
||||||
The `JSON` scalar type represents JSON values as specified by [ECMA-404](https://ecma-international.org/wp-content/uploads/ECMA-404_2nd_edition_december_2017.pdf).
|
The `JSON` scalar type represents JSON values as specified by [ECMA-404](https://ecma-international.org/wp-content/uploads/ECMA-404_2nd_edition_december_2017.pdf).
|
||||||
"""
|
"""
|
||||||
@@ -1049,6 +1116,9 @@ type Mutation {
|
|||||||
markAllNotificationsAsRead: Boolean!
|
markAllNotificationsAsRead: Boolean!
|
||||||
markNotificationsAsRead(notificationIds: [Int!]!): Boolean!
|
markNotificationsAsRead(notificationIds: [Int!]!): Boolean!
|
||||||
deleteNotification(notificationId: Int!): Boolean!
|
deleteNotification(notificationId: Int!): Boolean!
|
||||||
|
finalizePlayerAssignments(
|
||||||
|
input: FinalizePlayerAssignmentsInput!
|
||||||
|
): [PlayerClusterGQL!]!
|
||||||
addAnnotationToShot(
|
addAnnotationToShot(
|
||||||
shotId: Int!
|
shotId: Int!
|
||||||
annotationName: String!
|
annotationName: String!
|
||||||
@@ -1073,7 +1143,16 @@ type Mutation {
|
|||||||
ensureStripeCustomerExists: UserGQL!
|
ensureStripeCustomerExists: UserGQL!
|
||||||
deleteUser: Boolean!
|
deleteUser: Boolean!
|
||||||
createSubscription(priceId: String!): CreateSubscriptionResultGQL!
|
createSubscription(priceId: String!): CreateSubscriptionResultGQL!
|
||||||
|
createCustomerPortalSession: CreateCustomerPortalSessionResultGQL!
|
||||||
cancelSubscription: UserSubscriptionStatusGQL!
|
cancelSubscription: UserSubscriptionStatusGQL!
|
||||||
|
grantManualEntitlement(
|
||||||
|
userId: Int!
|
||||||
|
tierName: String! = "pro"
|
||||||
|
startsAt: DateTime = null
|
||||||
|
endsAt: DateTime = null
|
||||||
|
reason: String = null
|
||||||
|
): UserSubscriptionStatusGQL!
|
||||||
|
revokeManualEntitlement(userId: Int!): UserSubscriptionStatusGQL!
|
||||||
submitCancellationFeedback(
|
submitCancellationFeedback(
|
||||||
reasons: [CancellationReasonEnum!] = null
|
reasons: [CancellationReasonEnum!] = null
|
||||||
feedback: String = null
|
feedback: String = null
|
||||||
@@ -1082,6 +1161,7 @@ type Mutation {
|
|||||||
findPrerecordTableLayout(b64Image: String!, videoId: Int!): HomographyInfoGQL
|
findPrerecordTableLayout(b64Image: String!, videoId: Int!): HomographyInfoGQL
|
||||||
createUploadStream(
|
createUploadStream(
|
||||||
videoMetadata: VideoMetadataInput!
|
videoMetadata: VideoMetadataInput!
|
||||||
|
expectedDurationSeconds: Float = null
|
||||||
): CreateUploadStreamReturn!
|
): CreateUploadStreamReturn!
|
||||||
getUploadLink(videoId: Int!, segmentIndex: Int!): GetUploadLinkReturn!
|
getUploadLink(videoId: Int!, segmentIndex: Int!): GetUploadLinkReturn!
|
||||||
getHlsInitUploadLink(videoId: Int!): GetUploadLinkReturn!
|
getHlsInitUploadLink(videoId: Int!): GetUploadLinkReturn!
|
||||||
@@ -1110,6 +1190,22 @@ enum ReportReasonEnum {
|
|||||||
OTHER
|
OTHER
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input FinalizePlayerAssignmentsInput {
|
||||||
|
videoId: Int!
|
||||||
|
clusterAssignments: [ClusterAssignmentInput!]! = []
|
||||||
|
shotMoves: [ShotMoveInput!]! = []
|
||||||
|
}
|
||||||
|
|
||||||
|
input ClusterAssignmentInput {
|
||||||
|
clusterId: Int!
|
||||||
|
userId: Int = null
|
||||||
|
}
|
||||||
|
|
||||||
|
input ShotMoveInput {
|
||||||
|
shotId: Int!
|
||||||
|
newClusterId: Int!
|
||||||
|
}
|
||||||
|
|
||||||
type AddShotAnnotationReturn {
|
type AddShotAnnotationReturn {
|
||||||
value: SuccessfulAddAddShotAnnotationErrors!
|
value: SuccessfulAddAddShotAnnotationErrors!
|
||||||
}
|
}
|
||||||
@@ -1203,6 +1299,10 @@ type CreateSubscriptionResultGQL {
|
|||||||
sessionId: String!
|
sessionId: String!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type CreateCustomerPortalSessionResultGQL {
|
||||||
|
portalUrl: String!
|
||||||
|
}
|
||||||
|
|
||||||
enum CancellationReasonEnum {
|
enum CancellationReasonEnum {
|
||||||
DONT_PLAY_ENOUGH
|
DONT_PLAY_ENOUGH
|
||||||
TOO_EXPENSIVE
|
TOO_EXPENSIVE
|
||||||
|
|||||||
Reference in New Issue
Block a user