377 lines
7.0 KiB
GraphQL
377 lines
7.0 KiB
GraphQL
type Query {
|
|
getAggregatedShotMetrics(
|
|
aggregateInput: AggregateInputGQL!
|
|
): [AggregateResultGQL!]!
|
|
getBucketSet(keyName: String!): BucketSetGQL
|
|
getDeployedConfig: DeployedConfigGQL!
|
|
getVideoMakePercentageIntervals(
|
|
videoId: ID!
|
|
intervalDuration: Int! = 300
|
|
): [MakePercentageIntervalGQL!]!
|
|
getShots(filterInput: FilterInput!): [ShotGQL!]!
|
|
getUser(userId: Int!): UserGQL
|
|
getLoggedInUser: UserGQL
|
|
getPlayTime(userId: Int!): UserPlayTimeGQL!
|
|
getUserVideos(
|
|
userId: Int = null
|
|
limit: Int! = 5
|
|
after: String = null
|
|
filters: VideoFilterInput = null
|
|
): VideoHistoryGQL!
|
|
getVideo(videoId: Int!): 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 {
|
|
bucketSet: BucketSetInputGQL = null
|
|
enum: EnumAggregation = null
|
|
}
|
|
|
|
input BucketSetInputGQL {
|
|
feature: String!
|
|
buckets: [BucketInputGQL!]!
|
|
}
|
|
|
|
input BucketInputGQL {
|
|
rangeKey: String!
|
|
lowerBound: Float!
|
|
}
|
|
|
|
input EnumAggregation {
|
|
feature: String!
|
|
}
|
|
|
|
input FilterInput {
|
|
andFilters: AndFilter = null
|
|
orFilters: OrFilter = null
|
|
cueObjectDistance: RangeFilter = null
|
|
targetPocketDistance: RangeFilter = null
|
|
cueObjectAngle: RangeFilter = null
|
|
cueBallSpeed: RangeFilter = null
|
|
difficulty: RangeFilter = null
|
|
intendedPocketType: [PocketEnum!] = null
|
|
shotDirection: [ShotDirectionEnum!] = null
|
|
videoId: [Int!] = null
|
|
userId: [Int!] = null
|
|
make: [Boolean!] = null
|
|
tags: [VideoTagInput!] = null
|
|
}
|
|
|
|
input AndFilter {
|
|
filters: [FilterInput!]!
|
|
}
|
|
|
|
input OrFilter {
|
|
filters: [FilterInput!]!
|
|
}
|
|
|
|
input RangeFilter {
|
|
lessThan: Float = null
|
|
greaterThanEqualTo: Float = null
|
|
}
|
|
|
|
enum PocketEnum {
|
|
CORNER
|
|
SIDE
|
|
}
|
|
|
|
enum ShotDirectionEnum {
|
|
LEFT
|
|
RIGHT
|
|
STRAIGHT
|
|
}
|
|
|
|
input VideoTagInput {
|
|
tagClasses: [VideoTagClassInput!]! = []
|
|
name: String!
|
|
}
|
|
|
|
input VideoTagClassInput {
|
|
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
|
|
user: UserGQL
|
|
}
|
|
|
|
"""
|
|
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 UserGQL {
|
|
id: Int!
|
|
firebaseUid: String!
|
|
username: String!
|
|
activeVideoId: Int
|
|
profileImageUri: String
|
|
createdAt: DateTime
|
|
updatedAt: DateTime
|
|
}
|
|
|
|
type UserPlayTimeGQL {
|
|
totalSeconds: Float!
|
|
}
|
|
|
|
type VideoHistoryGQL {
|
|
videos: [VideoGQL!]!
|
|
pageInfo: PageInfoGQL!
|
|
}
|
|
|
|
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!
|
|
lowestUnuploadedSegmentIndex: Int!
|
|
uploadCompletionCursor: Int!
|
|
errors: [StreamErrorGQL!]!
|
|
createdAt: DateTime!
|
|
updatedAt: DateTime!
|
|
segments: [UploadSegmentGQL!]!
|
|
}
|
|
|
|
type StreamErrorGQL {
|
|
message: String!
|
|
}
|
|
|
|
type UploadSegmentGQL {
|
|
segmentIndex: Int!
|
|
uploaded: Boolean!
|
|
valid: Boolean!
|
|
endFrameIndex: Int
|
|
framesPerSecond: Float
|
|
durationsInSeconds: Float
|
|
linksRequested: Int!
|
|
}
|
|
|
|
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!]!
|
|
}
|
|
|
|
type VideoProcessingErrorGQL {
|
|
message: String!
|
|
startSegmentIndex: Int
|
|
endSegmentIndex: Int
|
|
}
|
|
|
|
type PageInfoGQL {
|
|
hasNextPage: Boolean!
|
|
endCursor: String
|
|
}
|
|
|
|
input VideoFilterInput {
|
|
isStreamCompleted: Boolean = null
|
|
requireCursorCompletion: Boolean! = true
|
|
}
|
|
|
|
type Mutation {
|
|
createBucketSet(params: CreateBucketSetInput!): BucketSetGQL!
|
|
setLoggerLevel(path: String!, level: String!): Boolean!
|
|
getProfileImageUploadLink(fileExt: String = ".png"): GetUploadLinkReturn!
|
|
editProfileImageUri(profileImageUri: String!): UserGQL!
|
|
createUploadStream(
|
|
videoMetadata: VideoMetadataInput!
|
|
): CreateUploadStreamReturn!
|
|
getUploadLink(videoId: Int!, segmentIndex: Int!): GetUploadLinkReturn!
|
|
editUploadStream(videoId: Int!, videoMetadata: VideoMetadataInput!): Boolean!
|
|
deleteVideo(videoId: Int!): Boolean!
|
|
}
|
|
|
|
input CreateBucketSetInput {
|
|
keyName: String!
|
|
feature: String!
|
|
buckets: [BucketInputGQL!]!
|
|
}
|
|
|
|
type GetUploadLinkReturn {
|
|
uploadUrl: String!
|
|
headers: [Header]!
|
|
}
|
|
|
|
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: String = null
|
|
uploadStreamMetadataInput: UploadStreamMetadataInput = null
|
|
lastIntendedSegmentBound: Int = null
|
|
endStream: Boolean! = false
|
|
}
|
|
|
|
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
|
|
}
|