2024-02-03 03:16:55 -07:00
type Query {
2024-03-09 10:21:43 -07:00
getAggregatedShotMetrics(
aggregateInput: AggregateInputGQL!
): [AggregateResultGQL!]!
2024-02-03 03:16:55 -07:00
getBucketSet(keyName: String!): BucketSetGQL
2024-04-01 20:46:21 -06:00
getDeployedConfig: DeployedConfigGQL!
2024-08-09 00:59:38 -06:00
waitFor(duration: Float!): Float!
2024-03-14 12:57:31 -06:00
getVideoMakePercentageIntervals(
videoId: ID!
intervalDuration: Int! = 300
): [MakePercentageIntervalGQL!]!
2024-08-01 19:49:57 -06:00
getShots(
filterInput: FilterInput!
shotsPagination: GetShotsPagination = null
2024-08-05 23:36:26 -06:00
limit: Int! = 500
2024-08-01 19:49:57 -06:00
): [ShotGQL!]!
2024-08-21 14:41:24 -06:00
getShotAnnotationTypes(errorTypes: Boolean = false): [ShotAnnotationTypeGQL!]!
2024-04-01 20:46:21 -06:00
getUser(userId: Int!): UserGQL
getLoggedInUser: UserGQL
2024-07-13 23:42:12 -06:00
getUsernames(
matchString: String = null
limit: Int = null
after: String = null
): [String!]!
2024-04-01 20:46:21 -06:00
getPlayTime(userId: Int!): UserPlayTimeGQL!
2024-04-05 15:46:16 -06:00
getUserVideos(
userId: Int = null
limit: Int! = 5
after: String = null
filters: VideoFilterInput = null
): VideoHistoryGQL!
2024-07-24 12:47:50 -06:00
getUserTags: [TagGQL!]!
2024-08-13 14:28:36 -06:00
getVideo(videoId: Int!, debuggingJson: JSON = null): VideoGQL!
2024-04-22 16:18:06 -06:00
getVideos(videoIds: [Int!]!): [VideoGQL!]!
2024-02-03 03:16:55 -07:00
}
type AggregateResultGQL {
2024-03-30 21:49:29 -06:00
aggregationIdentifiers: [AggregationIdentifierGQL!]!
targetMetrics: TargetMetricsGQL!
2024-02-03 03:16:55 -07:00
}
2024-03-30 21:49:29 -06:00
type AggregationIdentifierGQL {
featureName: String!
groupName: String!
2024-02-03 03:16:55 -07:00
}
2024-03-30 21:49:29 -06:00
type TargetMetricsGQL {
count: Int!
2024-02-03 03:16:55 -07:00
makePercentage: Float
2024-05-01 12:47:50 -06:00
averageDifficulty: Float
2024-02-03 03:16:55 -07:00
}
2024-03-09 10:21:43 -07:00
input AggregateInputGQL {
2024-03-30 21:49:29 -06:00
aggregations: [AggregationInput!]!
2024-03-09 10:21:43 -07:00
filterInput: FilterInput
}
2024-05-22 16:41:24 -06:00
input AggregationInput @oneOf {
2024-05-22 15:13:18 -06:00
bucketSet: BucketSetInputGQL
enum: EnumAggregation
2024-03-30 21:49:29 -06:00
}
2024-02-03 03:16:55 -07:00
input BucketSetInputGQL {
feature: String!
buckets: [BucketInputGQL!]!
}
input BucketInputGQL {
rangeKey: String!
lowerBound: Float!
}
2024-03-30 21:49:29 -06:00
input EnumAggregation {
feature: String!
}
2024-05-22 16:41:24 -06:00
input FilterInput @oneOf {
2024-05-22 15:13:18 -06:00
andFilters: [FilterInput!]
orFilters: [FilterInput!]
2024-07-10 16:17:25 -06:00
notFilter: FilterInput
2024-05-22 15:13:18 -06:00
cueObjectDistance: RangeFilter
targetPocketDistance: RangeFilter
cueObjectAngle: RangeFilter
cueBallSpeed: RangeFilter
difficulty: RangeFilter
intendedPocketType: [PocketEnum!]
shotDirection: [ShotDirectionEnum!]
videoId: [Int!]
userId: [Int!]
make: [Boolean!]
tags: [VideoTagInput!]
2024-07-08 10:56:05 -06:00
annotations: [ShotAnnotationInput!]
2024-07-02 16:54:56 -06:00
isStraight: [Boolean!]
isRight: [Boolean!]
isLeft: [Boolean!]
isLeftMiss: [Boolean!]
isRightMiss: [Boolean!]
2024-07-12 17:52:06 -06:00
isDirect: [Boolean!]
2024-08-15 20:42:53 -06:00
tableSize: RangeFilter
2024-07-12 17:52:06 -06:00
bankAngle: RangeFilter
bankDistance: RangeFilter
kickAngle: RangeFilter
kickDistance: RangeFilter
2024-07-19 17:18:14 -06:00
cueAngleAfterObject: RangeFilter
cueSpeedAfterObject: RangeFilter
spinType: [String!]
2024-07-28 02:06:39 -06:00
falsePositiveScore: RangeFilter
2024-03-09 10:21:43 -07:00
}
input RangeFilter {
lessThan: Float = null
greaterThanEqualTo: Float = null
2024-08-15 20:42:53 -06:00
greaterThan: Float = null
2024-07-29 17:21:09 -06:00
includeOnNone: Boolean! = false
2024-08-15 20:42:53 -06:00
lessThanInclusive: Boolean! = false
greaterThanInclusive: Boolean! = true
2024-03-09 10:21:43 -07:00
}
2024-03-30 21:49:29 -06:00
enum PocketEnum {
CORNER
SIDE
2024-03-17 22:33:52 -06:00
}
2024-03-30 21:49:29 -06:00
enum ShotDirectionEnum {
LEFT
RIGHT
STRAIGHT
2024-03-09 10:21:43 -07:00
}
2024-03-28 15:20:39 -06:00
input VideoTagInput {
2024-04-01 18:04:54 -06:00
tagClasses: [VideoTagClassInput!]! = []
2024-03-28 15:20:39 -06:00
name: String!
}
input VideoTagClassInput {
name: String!
2024-03-19 21:02:49 -06:00
}
2024-07-08 10:56:05 -06:00
input ShotAnnotationInput {
name: String!
}
2024-04-01 20:46:21 -06:00
type BucketSetGQL {
keyName: String!
feature: String!
buckets: [BucketGQL!]!
2024-02-03 03:16:55 -07:00
}
2024-04-01 20:46:21 -06:00
type BucketGQL {
rangeKey: String!
lowerBound: Float!
}
2024-02-03 03:16:55 -07:00
2024-03-18 16:46:23 -06:00
type DeployedConfigGQL {
allowNewUsers: Boolean!
2024-04-01 20:46:21 -06:00
firebase: Boolean!
devMode: Boolean!
2024-04-25 11:41:57 -06:00
environment: String!
2024-08-16 13:21:46 -06:00
minimumAllowedAppVersion: String!
2024-03-18 16:46:23 -06:00
}
2024-04-01 20:46:21 -06:00
type MakePercentageIntervalGQL {
2024-02-20 19:18:21 -07:00
makePercentage: Float!
2024-04-01 20:46:21 -06:00
elapsedTime: Float!
2024-02-03 03:16:55 -07:00
}
type ShotGQL {
2024-05-20 16:19:20 -06:00
id: Int!
videoId: Int!
startFrame: Int!
endFrame: Int!
2024-02-03 03:16:55 -07:00
createdAt: DateTime
updatedAt: DateTime
cueObjectFeatures: CueObjectFeaturesGQL
pocketingIntentionFeatures: PocketingIntentionFeaturesGQL
2024-03-30 21:49:29 -06:00
bankFeatures: BankFeaturesGQL
2024-05-22 16:41:24 -06:00
serializedShotPaths: SerializedShotPathsGQL
2024-04-09 22:34:54 -06:00
user: UserGQL
2024-07-15 15:32:21 -06:00
annotations: [ShotAnnotationGQL!]!
2024-07-28 02:06:39 -06:00
falsePositiveScore: Float
2024-08-01 19:49:57 -06:00
video: VideoGQL
2024-02-03 03:16:55 -07:00
}
2024-04-01 20:46:21 -06:00
"""
Date with time (isoformat)
"""
scalar DateTime
2024-03-30 21:49:29 -06:00
type CueObjectFeaturesGQL {
2024-02-03 03:16:55 -07:00
cueObjectDistance: Float
2024-03-30 21:49:29 -06:00
cueObjectAngle: Float
2024-02-03 03:16:55 -07:00
cueBallSpeed: Float
shotDirection: ShotDirectionEnum
}
2024-03-30 21:49:29 -06:00
type PocketingIntentionFeaturesGQL {
targetPocketDistance: Float
make: Boolean
intendedPocketType: PocketEnum
2024-05-01 12:47:50 -06:00
difficulty: Float
2024-02-03 03:16:55 -07:00
}
type BankFeaturesGQL {
wallsHit: [WallTypeEnum!]!
bankAngle: Float!
distance: Float!
}
enum WallTypeEnum {
LONG
SHORT
}
2024-05-22 16:41:24 -06:00
type SerializedShotPathsGQL {
b64EncodedBuffer: String
}
2024-04-01 20:46:21 -06:00
type UserGQL {
id: Int!
firebaseUid: String!
username: String!
2024-07-13 17:40:30 -06:00
isAdmin: Boolean!
2024-04-25 11:41:57 -06:00
activeVideoId: Int
2024-04-01 20:46:21 -06:00
profileImageUri: String
createdAt: DateTime
updatedAt: DateTime
}
2024-07-15 15:32:21 -06:00
type ShotAnnotationGQL {
shotId: Int!
type: ShotAnnotationTypeGQL!
creator: UserGQL!
notes: String!
2024-08-21 14:41:24 -06:00
errorDefault: Boolean!
2024-07-15 15:32:21 -06:00
createdAt: DateTime
updatedAt: DateTime
}
2024-07-08 13:18:11 -06:00
type ShotAnnotationTypeGQL {
id: Int!
name: String!
}
2024-04-01 20:46:21 -06:00
type VideoGQL {
id: Int!
owner: UserGQL
name: String
2024-04-29 14:08:27 -06:00
screenshotUri: String
2024-04-01 20:46:21 -06:00
totalShotsMade: Int!
totalShots: Int!
makePercentage: Float!
medianRun: Float
averageTimeBetweenShots: Float
createdAt: DateTime
updatedAt: DateTime
shots: [ShotGQL!]!
startTime: DateTime
endTime: DateTime
elapsedTime: Float
2024-04-23 20:25:27 -06:00
framesPerSecond: Float!
2024-08-15 19:05:19 -06:00
tableSize: Float!
2024-04-01 20:46:21 -06:00
stream: UploadStreamGQL
2024-04-22 16:18:06 -06:00
playlist: HLSPlaylistGQL
2024-04-01 20:46:21 -06:00
tags: [VideoTag!]!
homographyHistory: [HomographyInfoGQL!]!
2024-05-20 23:39:47 -06:00
currentProcessing: VideoProcessingGQL
2024-04-01 20:46:21 -06:00
}
2024-02-03 03:16:55 -07:00
type UploadStreamGQL {
id: ID!
linksRequested: Int!
uploadsCompleted: Int!
2024-03-08 17:15:37 -07:00
segmentProcessingCursor: Int!
2024-05-20 23:39:47 -06:00
lastIntendedSegmentBound: Int
2024-02-03 03:16:55 -07:00
isCompleted: Boolean!
2024-07-16 15:21:45 -06:00
initPlaylistUploadStatus: InitPlaylistUploadStatusEnum
2024-04-16 17:49:50 -06:00
lowestUnuploadedSegmentIndex: Int!
2024-05-01 17:39:52 -06:00
uploadCompletionCursor: Int!
2024-03-08 17:15:37 -07:00
errors: [StreamErrorGQL!]!
2024-02-03 03:16:55 -07:00
createdAt: DateTime!
updatedAt: DateTime!
2024-05-01 17:39:52 -06:00
segments: [UploadSegmentGQL!]!
2024-07-25 18:18:16 -06:00
resolution: VideoResolutionGQL!
2024-07-27 20:51:48 -06:00
streamSegmentType: StreamSegmentTypeEnum!
2024-02-03 03:16:55 -07:00
}
2024-07-16 15:21:45 -06:00
enum InitPlaylistUploadStatusEnum {
NOT_APPLICABLE
NOT_UPLOADED
UPLOADED
}
2024-03-23 17:03:11 -06:00
type StreamErrorGQL {
message: String!
}
2024-04-30 21:55:48 -06:00
type UploadSegmentGQL {
segmentIndex: Int!
uploaded: Boolean!
valid: Boolean!
endFrameIndex: Int
framesPerSecond: Float
2024-07-16 21:48:15 -06:00
durationInSeconds: Float
2024-04-30 21:55:48 -06:00
linksRequested: Int!
}
2024-07-25 18:18:16 -06:00
type VideoResolutionGQL {
width: Int
height: Int
}
2024-07-27 20:51:48 -06:00
enum StreamSegmentTypeEnum {
FRAGMENTED_MP4
RB_CHUNKED_MP4
}
2024-04-22 16:18:06 -06:00
type HLSPlaylistGQL {
videoId: Int!
m3u8Text: String!
segmentDurations: [Float!]!
}
2024-03-23 17:03:11 -06:00
type VideoTag {
tagClasses: [VideoTagClass!]!
name: String!
}
type VideoTagClass {
name: String!
}
2024-03-08 17:15:37 -07:00
type HomographyInfoGQL {
2024-03-23 17:03:11 -06:00
frameIndex: Int!
2024-03-08 17:15:37 -07:00
crop: BoundingBoxGQL!
pockets: [BoundingBoxGQL!]!
sourcePoints: PocketPointsGQL!
destPoints: PocketPointsGQL!
}
type BoundingBoxGQL {
2024-03-23 17:03:11 -06:00
left: Float!
top: Float!
width: Float!
height: Float!
2024-03-08 17:15:37 -07:00
}
type PocketPointsGQL {
topLeft: IntPoint2D!
topSide: IntPoint2D!
topRight: IntPoint2D!
bottomLeft: IntPoint2D!
bottomSide: IntPoint2D!
bottomRight: IntPoint2D!
}
type IntPoint2D {
x: Int!
y: Int!
}
2024-05-20 23:39:47 -06:00
type VideoProcessingGQL {
errors: [VideoProcessingErrorGQL!]!
2024-08-13 12:33:31 -06:00
status: ProcessingStatusEnum!
2024-08-13 13:42:45 -06:00
statuses: [VideoProcessingStatusGQL!]!
2024-05-20 23:39:47 -06:00
}
type VideoProcessingErrorGQL {
message: String!
startSegmentIndex: Int
endSegmentIndex: Int
}
2024-08-13 12:33:31 -06:00
enum ProcessingStatusEnum {
STARTED
FAILED
SUCCEEDED
SUSPENDED
CREATED
QUEUED
RUNNING
REEXTRACTING_FEATURES
}
2024-08-13 13:42:45 -06:00
type VideoProcessingStatusGQL {
status: ProcessingStatusEnum!
appVersion: String!
sequenceId: Int!
createdAt: DateTime
updatedAt: DateTime
}
2024-08-01 19:49:57 -06:00
input GetShotsPagination {
createdAfter: CreatedAfter!
startFrameAfter: Int!
}
input CreatedAfter @oneOf {
videoId: Int
createdAt: DateTime
}
type UserPlayTimeGQL {
totalSeconds: Float!
}
type VideoHistoryGQL {
videos: [VideoGQL!]!
pageInfo: PageInfoGQL!
}
2024-02-20 19:18:21 -07:00
type PageInfoGQL {
hasNextPage: Boolean!
endCursor: String
}
2024-04-05 15:46:16 -06:00
input VideoFilterInput {
isStreamCompleted: Boolean = null
2024-05-02 22:08:57 -06:00
requireCursorCompletion: Boolean! = true
2024-04-05 15:46:16 -06:00
}
2024-07-22 19:22:03 -06:00
type TagGQL {
name: String!
id: Int!
2024-07-23 19:53:39 -06:00
group: String
2024-07-22 19:22:03 -06:00
}
2024-08-13 14:28:36 -06:00
"""
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).
"""
scalar JSON
@specifiedBy(
url: "https://ecma-international.org/wp-content/uploads/ECMA-404_2nd_edition_december_2017.pdf"
)
2024-02-03 03:16:55 -07:00
type Mutation {
createBucketSet(params: CreateBucketSetInput!): BucketSetGQL!
2024-04-01 20:46:21 -06:00
setLoggerLevel(path: String!, level: String!): Boolean!
2024-08-21 14:41:24 -06:00
addAnnotationToShot(
shotId: Int!
annotationName: String!
notes: String = null
): AddShotAnnotationReturn!
2024-08-19 15:44:43 -06:00
getProfileImageUploadLink(
fileExt: String = ".png"
): GetProfileUploadLinkReturn!
2024-04-01 20:46:21 -06:00
editProfileImageUri(profileImageUri: String!): UserGQL!
2024-02-22 19:27:29 -07:00
createUploadStream(
2024-03-04 22:22:42 -07:00
videoMetadata: VideoMetadataInput!
2024-02-22 19:27:29 -07:00
): CreateUploadStreamReturn!
2024-02-11 22:42:37 -07:00
getUploadLink(videoId: Int!, segmentIndex: Int!): GetUploadLinkReturn!
2024-07-12 18:50:03 -06:00
getHlsInitUploadLink(videoId: Int!): GetUploadLinkReturn!
2024-07-16 20:20:17 -06:00
setSegmentDuration(
videoId: Int!
segmentIndex: Int!
duration: Float!
): Boolean!
2024-03-24 21:01:02 -06:00
editUploadStream(videoId: Int!, videoMetadata: VideoMetadataInput!): Boolean!
2024-03-12 12:50:28 -06:00
deleteVideo(videoId: Int!): Boolean!
2024-02-03 03:16:55 -07:00
}
input CreateBucketSetInput {
keyName: String!
feature: String!
buckets: [BucketInputGQL!]!
}
2024-08-21 14:41:24 -06:00
type AddShotAnnotationReturn {
value: SuccessfulAddAddShotAnnotationErrors!
}
union SuccessfulAddAddShotAnnotationErrors =
SuccessfulAdd
| AddShotAnnotationErrors
type SuccessfulAdd {
value: Boolean!
}
type AddShotAnnotationErrors {
error: DoesNotOwnShotErrOtherErrorNeedsNote!
}
union DoesNotOwnShotErrOtherErrorNeedsNote =
DoesNotOwnShotErr
| OtherErrorNeedsNote
type DoesNotOwnShotErr {
shotId: Int!
msg: String
}
type OtherErrorNeedsNote {
msg: String
}
2024-08-19 15:44:43 -06:00
type GetProfileUploadLinkReturn {
value: UploadLinkGetProfileUploadLinkErrors!
2024-08-16 17:28:45 -06:00
}
2024-08-19 15:44:43 -06:00
union UploadLinkGetProfileUploadLinkErrors =
UploadLink
| GetProfileUploadLinkErrors
2024-08-16 17:28:45 -06:00
type UploadLink {
2024-04-01 20:46:21 -06:00
uploadUrl: String!
headers: [Header]!
}
type Header {
key: String!
value: String!
}
2024-08-19 15:44:43 -06:00
type GetProfileUploadLinkErrors {
error: TooManyProfileImageUploadsErr!
2024-08-16 17:28:45 -06:00
}
type TooManyProfileImageUploadsErr {
linksRequested: Int!
}
2024-02-03 03:16:55 -07:00
type CreateUploadStreamReturn {
videoId: Int!
}
2024-03-04 20:10:49 -07:00
input VideoMetadataInput {
videoName: String = null
startTime: DateTime = null
endTime: DateTime = null
gameType: String = null
2024-08-15 16:44:30 -06:00
tableSize: Float = null
2024-03-04 20:10:49 -07:00
uploadStreamMetadataInput: UploadStreamMetadataInput = null
2024-04-25 16:36:32 -06:00
lastIntendedSegmentBound: Int = null
2024-07-12 18:50:03 -06:00
streamSegmentType: StreamSegmentTypeEnum = null
2024-03-24 21:01:02 -06:00
endStream: Boolean! = false
2024-07-18 01:14:18 -06:00
resolution: VideoResolution = null
2024-07-18 17:14:28 -06:00
framesPerSecond: Float = null
2024-03-04 20:10:49 -07:00
}
input UploadStreamMetadataInput {
2024-02-03 03:16:55 -07:00
deviceType: DeviceTypeEnum = null
osVersion: String = null
appVersion: String = null
browserName: String = null
browserVersion: String = null
locale: String = null
timezone: String = null
networkType: String = null
ipAddress: String = null
}
2024-03-04 20:10:49 -07:00
enum DeviceTypeEnum {
IOS
ANDROID
BROWSER
}
2024-07-12 18:50:03 -06:00
2024-07-18 01:14:18 -06:00
input VideoResolution {
width: Int!
height: Int!
}
2024-08-19 15:44:43 -06:00
type GetUploadLinkReturn {
value: UploadLinkGetUploadLinkErrors!
stream: UploadStreamGQL
}
union UploadLinkGetUploadLinkErrors = UploadLink | GetUploadLinkErrors
type GetUploadLinkErrors {
error: MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErr!
}
union MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErr =
MustHaveSetForUploadLinkErr
| SegmentAlreadyUploadedErr
| ProcessingFailedErr
| NoInitForChunkedUploadErr
| TooManyProfileImageUploadsErr
type MustHaveSetForUploadLinkErr {
resolution: Boolean
framesPerSecond: Boolean
}
type SegmentAlreadyUploadedErr {
segmentId: Int!
}
type ProcessingFailedErr {
processing: VideoProcessingGQL!
}
type NoInitForChunkedUploadErr {
segmentType: StreamSegmentTypeEnum!
}