506 lines
9.7 KiB
GraphQL
506 lines
9.7 KiB
GraphQL
type Query {
|
|
getAggregatedShotMetrics(
|
|
aggregateInput: AggregateInputGQL!
|
|
): [AggregateResultGQL!]!
|
|
getBucketSet(keyName: String!): BucketSetGQL
|
|
getDeployedConfig: DeployedConfigGQL!
|
|
waitFor(duration: Float!): Float!
|
|
getVideoMakePercentageIntervals(
|
|
videoId: ID!
|
|
intervalDuration: Int! = 300
|
|
): [MakePercentageIntervalGQL!]!
|
|
getShots(
|
|
filterInput: FilterInput!
|
|
shotsPagination: GetShotsPagination = null
|
|
limit: Int! = 500
|
|
): [ShotGQL!]!
|
|
getShotAnnotationTypes: [ShotAnnotationTypeGQL!]!
|
|
getUser(userId: Int!): UserGQL
|
|
getLoggedInUser: UserGQL
|
|
getUsernames(
|
|
matchString: String = null
|
|
limit: Int = null
|
|
after: String = null
|
|
): [String!]!
|
|
getPlayTime(userId: Int!): UserPlayTimeGQL!
|
|
getUserVideos(
|
|
userId: Int = null
|
|
limit: Int! = 5
|
|
after: String = null
|
|
filters: VideoFilterInput = null
|
|
): VideoHistoryGQL!
|
|
getUserTags: [TagGQL!]!
|
|
getVideo(videoId: Int!, debuggingJson: JSON = null): VideoGQL!
|
|
getVideos(videoIds: [Int!]!): [VideoGQL!]!
|
|
}
|
|
|
|
type AggregateResultGQL {
|
|
aggregationIdentifiers: [AggregationIdentifierGQL!]!
|
|
targetMetrics: TargetMetricsGQL!
|
|
}
|
|
|
|
type AggregationIdentifierGQL {
|
|
featureName: String!
|
|
groupName: String!
|
|
}
|
|
|
|
type TargetMetricsGQL {
|
|
count: Int!
|
|
makePercentage: Float
|
|
averageDifficulty: Float
|
|
}
|
|
|
|
input AggregateInputGQL {
|
|
aggregations: [AggregationInput!]!
|
|
filterInput: FilterInput
|
|
}
|
|
|
|
input AggregationInput @oneOf {
|
|
bucketSet: BucketSetInputGQL
|
|
enum: EnumAggregation
|
|
}
|
|
|
|
input BucketSetInputGQL {
|
|
feature: String!
|
|
buckets: [BucketInputGQL!]!
|
|
}
|
|
|
|
input BucketInputGQL {
|
|
rangeKey: String!
|
|
lowerBound: Float!
|
|
}
|
|
|
|
input EnumAggregation {
|
|
feature: String!
|
|
}
|
|
|
|
input FilterInput @oneOf {
|
|
andFilters: [FilterInput!]
|
|
orFilters: [FilterInput!]
|
|
notFilter: FilterInput
|
|
cueObjectDistance: RangeFilter
|
|
targetPocketDistance: RangeFilter
|
|
cueObjectAngle: RangeFilter
|
|
cueBallSpeed: RangeFilter
|
|
difficulty: RangeFilter
|
|
intendedPocketType: [PocketEnum!]
|
|
shotDirection: [ShotDirectionEnum!]
|
|
videoId: [Int!]
|
|
userId: [Int!]
|
|
make: [Boolean!]
|
|
tags: [VideoTagInput!]
|
|
annotations: [ShotAnnotationInput!]
|
|
isStraight: [Boolean!]
|
|
isRight: [Boolean!]
|
|
isLeft: [Boolean!]
|
|
isLeftMiss: [Boolean!]
|
|
isRightMiss: [Boolean!]
|
|
isDirect: [Boolean!]
|
|
tableSize: Float
|
|
bankAngle: RangeFilter
|
|
bankDistance: RangeFilter
|
|
kickAngle: RangeFilter
|
|
kickDistance: RangeFilter
|
|
cueAngleAfterObject: RangeFilter
|
|
cueSpeedAfterObject: RangeFilter
|
|
spinType: [String!]
|
|
falsePositiveScore: RangeFilter
|
|
}
|
|
|
|
input RangeFilter {
|
|
lessThan: Float = null
|
|
greaterThanEqualTo: Float = null
|
|
includeOnNone: Boolean! = false
|
|
}
|
|
|
|
enum PocketEnum {
|
|
CORNER
|
|
SIDE
|
|
}
|
|
|
|
enum ShotDirectionEnum {
|
|
LEFT
|
|
RIGHT
|
|
STRAIGHT
|
|
}
|
|
|
|
input VideoTagInput {
|
|
tagClasses: [VideoTagClassInput!]! = []
|
|
name: String!
|
|
}
|
|
|
|
input VideoTagClassInput {
|
|
name: String!
|
|
}
|
|
|
|
input ShotAnnotationInput {
|
|
name: String!
|
|
}
|
|
|
|
type BucketSetGQL {
|
|
keyName: String!
|
|
feature: String!
|
|
buckets: [BucketGQL!]!
|
|
}
|
|
|
|
type BucketGQL {
|
|
rangeKey: String!
|
|
lowerBound: Float!
|
|
}
|
|
|
|
type DeployedConfigGQL {
|
|
allowNewUsers: Boolean!
|
|
firebase: Boolean!
|
|
devMode: Boolean!
|
|
environment: String!
|
|
}
|
|
|
|
type MakePercentageIntervalGQL {
|
|
makePercentage: Float!
|
|
elapsedTime: Float!
|
|
}
|
|
|
|
type ShotGQL {
|
|
id: Int!
|
|
videoId: Int!
|
|
startFrame: Int!
|
|
endFrame: Int!
|
|
createdAt: DateTime
|
|
updatedAt: DateTime
|
|
cueObjectFeatures: CueObjectFeaturesGQL
|
|
pocketingIntentionFeatures: PocketingIntentionFeaturesGQL
|
|
bankFeatures: BankFeaturesGQL
|
|
serializedShotPaths: SerializedShotPathsGQL
|
|
user: UserGQL
|
|
annotations: [ShotAnnotationGQL!]!
|
|
falsePositiveScore: Float
|
|
video: VideoGQL
|
|
}
|
|
|
|
"""
|
|
Date with time (isoformat)
|
|
"""
|
|
scalar DateTime
|
|
|
|
type CueObjectFeaturesGQL {
|
|
cueObjectDistance: Float
|
|
cueObjectAngle: Float
|
|
cueBallSpeed: Float
|
|
shotDirection: ShotDirectionEnum
|
|
}
|
|
|
|
type PocketingIntentionFeaturesGQL {
|
|
targetPocketDistance: Float
|
|
make: Boolean
|
|
intendedPocketType: PocketEnum
|
|
difficulty: Float
|
|
}
|
|
|
|
type BankFeaturesGQL {
|
|
wallsHit: [WallTypeEnum!]!
|
|
bankAngle: Float!
|
|
distance: Float!
|
|
}
|
|
|
|
enum WallTypeEnum {
|
|
LONG
|
|
SHORT
|
|
}
|
|
|
|
type SerializedShotPathsGQL {
|
|
b64EncodedBuffer: String
|
|
}
|
|
|
|
type UserGQL {
|
|
id: Int!
|
|
firebaseUid: String!
|
|
username: String!
|
|
isAdmin: Boolean!
|
|
activeVideoId: Int
|
|
profileImageUri: String
|
|
createdAt: DateTime
|
|
updatedAt: DateTime
|
|
}
|
|
|
|
type ShotAnnotationGQL {
|
|
shotId: Int!
|
|
type: ShotAnnotationTypeGQL!
|
|
creator: UserGQL!
|
|
notes: String!
|
|
createdAt: DateTime
|
|
updatedAt: DateTime
|
|
}
|
|
|
|
type ShotAnnotationTypeGQL {
|
|
id: Int!
|
|
name: String!
|
|
}
|
|
|
|
type VideoGQL {
|
|
id: Int!
|
|
owner: UserGQL
|
|
name: String
|
|
screenshotUri: String
|
|
totalShotsMade: Int!
|
|
totalShots: Int!
|
|
makePercentage: Float!
|
|
medianRun: Float
|
|
averageTimeBetweenShots: Float
|
|
createdAt: DateTime
|
|
updatedAt: DateTime
|
|
shots: [ShotGQL!]!
|
|
startTime: DateTime
|
|
endTime: DateTime
|
|
elapsedTime: Float
|
|
framesPerSecond: Float!
|
|
stream: UploadStreamGQL
|
|
playlist: HLSPlaylistGQL
|
|
tags: [VideoTag!]!
|
|
homographyHistory: [HomographyInfoGQL!]!
|
|
currentProcessing: VideoProcessingGQL
|
|
}
|
|
|
|
type UploadStreamGQL {
|
|
id: ID!
|
|
linksRequested: Int!
|
|
uploadsCompleted: Int!
|
|
segmentProcessingCursor: Int!
|
|
lastIntendedSegmentBound: Int
|
|
isCompleted: Boolean!
|
|
initPlaylistUploadStatus: InitPlaylistUploadStatusEnum
|
|
lowestUnuploadedSegmentIndex: Int!
|
|
uploadCompletionCursor: Int!
|
|
errors: [StreamErrorGQL!]!
|
|
createdAt: DateTime!
|
|
updatedAt: DateTime!
|
|
segments: [UploadSegmentGQL!]!
|
|
resolution: VideoResolutionGQL!
|
|
streamSegmentType: StreamSegmentTypeEnum!
|
|
}
|
|
|
|
enum InitPlaylistUploadStatusEnum {
|
|
NOT_APPLICABLE
|
|
NOT_UPLOADED
|
|
UPLOADED
|
|
}
|
|
|
|
type StreamErrorGQL {
|
|
message: String!
|
|
}
|
|
|
|
type UploadSegmentGQL {
|
|
segmentIndex: Int!
|
|
uploaded: Boolean!
|
|
valid: Boolean!
|
|
endFrameIndex: Int
|
|
framesPerSecond: Float
|
|
durationInSeconds: Float
|
|
linksRequested: Int!
|
|
}
|
|
|
|
type VideoResolutionGQL {
|
|
width: Int
|
|
height: Int
|
|
}
|
|
|
|
enum StreamSegmentTypeEnum {
|
|
FRAGMENTED_MP4
|
|
RB_CHUNKED_MP4
|
|
}
|
|
|
|
type HLSPlaylistGQL {
|
|
videoId: Int!
|
|
m3u8Text: String!
|
|
segmentDurations: [Float!]!
|
|
}
|
|
|
|
type VideoTag {
|
|
tagClasses: [VideoTagClass!]!
|
|
name: String!
|
|
}
|
|
|
|
type VideoTagClass {
|
|
name: String!
|
|
}
|
|
|
|
type HomographyInfoGQL {
|
|
frameIndex: Int!
|
|
crop: BoundingBoxGQL!
|
|
pockets: [BoundingBoxGQL!]!
|
|
sourcePoints: PocketPointsGQL!
|
|
destPoints: PocketPointsGQL!
|
|
}
|
|
|
|
type BoundingBoxGQL {
|
|
left: Float!
|
|
top: Float!
|
|
width: Float!
|
|
height: Float!
|
|
}
|
|
|
|
type PocketPointsGQL {
|
|
topLeft: IntPoint2D!
|
|
topSide: IntPoint2D!
|
|
topRight: IntPoint2D!
|
|
bottomLeft: IntPoint2D!
|
|
bottomSide: IntPoint2D!
|
|
bottomRight: IntPoint2D!
|
|
}
|
|
|
|
type IntPoint2D {
|
|
x: Int!
|
|
y: Int!
|
|
}
|
|
|
|
type VideoProcessingGQL {
|
|
errors: [VideoProcessingErrorGQL!]!
|
|
status: ProcessingStatusEnum!
|
|
statuses: [VideoProcessingStatusGQL!]!
|
|
}
|
|
|
|
type VideoProcessingErrorGQL {
|
|
message: String!
|
|
startSegmentIndex: Int
|
|
endSegmentIndex: Int
|
|
}
|
|
|
|
enum ProcessingStatusEnum {
|
|
STARTED
|
|
FAILED
|
|
SUCCEEDED
|
|
SUSPENDED
|
|
CREATED
|
|
QUEUED
|
|
RUNNING
|
|
REEXTRACTING_FEATURES
|
|
}
|
|
|
|
type VideoProcessingStatusGQL {
|
|
status: ProcessingStatusEnum!
|
|
appVersion: String!
|
|
sequenceId: Int!
|
|
createdAt: DateTime
|
|
updatedAt: DateTime
|
|
}
|
|
|
|
input GetShotsPagination {
|
|
createdAfter: CreatedAfter!
|
|
startFrameAfter: Int!
|
|
}
|
|
|
|
input CreatedAfter @oneOf {
|
|
videoId: Int
|
|
createdAt: DateTime
|
|
}
|
|
|
|
type UserPlayTimeGQL {
|
|
totalSeconds: Float!
|
|
}
|
|
|
|
type VideoHistoryGQL {
|
|
videos: [VideoGQL!]!
|
|
pageInfo: PageInfoGQL!
|
|
}
|
|
|
|
type PageInfoGQL {
|
|
hasNextPage: Boolean!
|
|
endCursor: String
|
|
}
|
|
|
|
input VideoFilterInput {
|
|
isStreamCompleted: Boolean = null
|
|
requireCursorCompletion: Boolean! = true
|
|
}
|
|
|
|
type TagGQL {
|
|
name: String!
|
|
id: Int!
|
|
group: String
|
|
}
|
|
|
|
"""
|
|
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"
|
|
)
|
|
|
|
type Mutation {
|
|
createBucketSet(params: CreateBucketSetInput!): BucketSetGQL!
|
|
setLoggerLevel(path: String!, level: String!): Boolean!
|
|
addAnnotationToShot(shotId: Int!, annotationName: String!): Boolean!
|
|
getProfileImageUploadLink(fileExt: String = ".png"): GetUploadLinkReturn!
|
|
editProfileImageUri(profileImageUri: String!): UserGQL!
|
|
createUploadStream(
|
|
videoMetadata: VideoMetadataInput!
|
|
): CreateUploadStreamReturn!
|
|
getUploadLink(videoId: Int!, segmentIndex: Int!): GetUploadLinkReturn!
|
|
getHlsInitUploadLink(videoId: Int!): GetUploadLinkReturn!
|
|
setSegmentDuration(
|
|
videoId: Int!
|
|
segmentIndex: Int!
|
|
duration: Float!
|
|
): Boolean!
|
|
editUploadStream(videoId: Int!, videoMetadata: VideoMetadataInput!): Boolean!
|
|
deleteVideo(videoId: Int!): Boolean!
|
|
}
|
|
|
|
input CreateBucketSetInput {
|
|
keyName: String!
|
|
feature: String!
|
|
buckets: [BucketInputGQL!]!
|
|
}
|
|
|
|
type GetUploadLinkReturn {
|
|
uploadUrl: String!
|
|
headers: [Header]!
|
|
uploadCompletionCursor: Int
|
|
}
|
|
|
|
type Header {
|
|
key: String!
|
|
value: String!
|
|
}
|
|
|
|
type CreateUploadStreamReturn {
|
|
videoId: Int!
|
|
}
|
|
|
|
input VideoMetadataInput {
|
|
videoName: String = null
|
|
startTime: DateTime = null
|
|
endTime: DateTime = null
|
|
gameType: String = null
|
|
tableSize: Float = null
|
|
uploadStreamMetadataInput: UploadStreamMetadataInput = null
|
|
lastIntendedSegmentBound: Int = null
|
|
streamSegmentType: StreamSegmentTypeEnum = null
|
|
endStream: Boolean! = false
|
|
resolution: VideoResolution = null
|
|
framesPerSecond: Float = null
|
|
}
|
|
|
|
input UploadStreamMetadataInput {
|
|
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
|
|
}
|
|
|
|
enum DeviceTypeEnum {
|
|
IOS
|
|
ANDROID
|
|
BROWSER
|
|
}
|
|
|
|
input VideoResolution {
|
|
width: Int!
|
|
height: Int!
|
|
}
|