2024-02-03 03:16:55 -07:00
|
|
|
type Query {
|
|
|
|
getAggregateShots(bucketSets: [BucketSetInputGQL!]!): [AggregateResultGQL!]!
|
|
|
|
getUser(userId: Int!): UserGQL
|
2024-02-11 22:42:37 -07:00
|
|
|
getLoggedInUser: UserGQL
|
2024-02-03 03:16:55 -07:00
|
|
|
getVideo(videoId: Int!): VideoGQL!
|
|
|
|
getShots(filterInput: FilterInput = null): [ShotGQL!]!
|
|
|
|
getBucketSet(keyName: String!): BucketSetGQL
|
2024-02-22 19:23:28 -07:00
|
|
|
getVideoFeedForUser(limit: Int! = 5, after: String = null): VideoFeedGQL!
|
2024-02-03 03:16:55 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
type AggregateResultGQL {
|
|
|
|
featureBuckets: [BucketGQL!]!
|
|
|
|
targetMetrics: [TargetMetricGQL!]!
|
|
|
|
}
|
|
|
|
|
|
|
|
type BucketGQL {
|
|
|
|
rangeKey: String!
|
|
|
|
lowerBound: Float!
|
|
|
|
}
|
|
|
|
|
|
|
|
type TargetMetricGQL {
|
|
|
|
count: Int
|
|
|
|
makePercentage: Float
|
|
|
|
floatFeature: TargetFloatFeatureGQL
|
|
|
|
}
|
|
|
|
|
|
|
|
type TargetFloatFeatureGQL {
|
|
|
|
featureName: String!
|
|
|
|
average: Float
|
|
|
|
median: Float
|
|
|
|
}
|
|
|
|
|
|
|
|
input BucketSetInputGQL {
|
|
|
|
feature: String!
|
|
|
|
buckets: [BucketInputGQL!]!
|
|
|
|
}
|
|
|
|
|
|
|
|
input BucketInputGQL {
|
|
|
|
rangeKey: String!
|
|
|
|
lowerBound: Float!
|
|
|
|
}
|
|
|
|
|
|
|
|
type UserGQL {
|
|
|
|
id: Int!
|
2024-02-11 22:42:37 -07:00
|
|
|
firebaseUid: String!
|
2024-02-03 03:16:55 -07:00
|
|
|
username: String!
|
|
|
|
createdAt: DateTime
|
|
|
|
updatedAt: DateTime
|
|
|
|
statistics: UserStatisticsGQL!
|
|
|
|
}
|
|
|
|
|
2024-02-22 19:27:29 -07:00
|
|
|
"""
|
|
|
|
Date with time (isoformat)
|
|
|
|
"""
|
2024-02-03 03:16:55 -07:00
|
|
|
scalar DateTime
|
|
|
|
|
|
|
|
type UserStatisticsGQL {
|
|
|
|
totalShots: Int!
|
|
|
|
totalShotsMade: Int!
|
|
|
|
makePercentage: Decimal!
|
|
|
|
averageTimeBetweenShots: Decimal!
|
|
|
|
timeSpentPlaying: Decimal!
|
|
|
|
medianRun: Decimal
|
|
|
|
}
|
|
|
|
|
2024-02-22 19:27:29 -07:00
|
|
|
"""
|
|
|
|
Decimal (fixed-point)
|
|
|
|
"""
|
2024-02-03 03:16:55 -07:00
|
|
|
scalar Decimal
|
|
|
|
|
|
|
|
type VideoGQL {
|
|
|
|
id: Int!
|
2024-02-24 12:59:27 -07:00
|
|
|
owner: UserGQL
|
2024-02-22 17:07:29 -07:00
|
|
|
name: String
|
2024-02-03 03:16:55 -07:00
|
|
|
totalShotsMade: Int!
|
|
|
|
totalShots: Int!
|
2024-02-20 19:18:21 -07:00
|
|
|
makePercentage: Float!
|
|
|
|
medianRun: Float
|
|
|
|
averageTimeBetweenShots: Float
|
2024-02-22 17:13:46 -07:00
|
|
|
createdAt: DateTime
|
|
|
|
updatedAt: DateTime
|
2024-02-03 03:16:55 -07:00
|
|
|
shots: [ShotGQL!]!
|
2024-02-22 17:13:46 -07:00
|
|
|
startTime: DateTime
|
|
|
|
endTime: DateTime
|
2024-02-21 17:44:24 -07:00
|
|
|
elapsedTime: Float
|
2024-02-03 03:16:55 -07:00
|
|
|
framesPerSecond: Int!
|
|
|
|
stream: UploadStreamGQL
|
|
|
|
}
|
|
|
|
|
|
|
|
type ShotGQL {
|
|
|
|
id: Int
|
|
|
|
videoId: Int
|
|
|
|
startFrame: Int
|
|
|
|
endFrame: Int
|
|
|
|
createdAt: DateTime
|
|
|
|
updatedAt: DateTime
|
|
|
|
features: ShotFeaturesGQL
|
|
|
|
cueObjectFeatures: CueObjectFeaturesGQL
|
|
|
|
pocketingIntentionFeatures: PocketingIntentionFeaturesGQL
|
|
|
|
}
|
|
|
|
|
|
|
|
type ShotFeaturesGQL {
|
|
|
|
cueObjectAngle: Float
|
|
|
|
cueObjectDistance: Float
|
|
|
|
targetPocketDistance: Float
|
|
|
|
intendedPocket: PocketEnum
|
|
|
|
cueBallSpeed: Float
|
|
|
|
shotDirection: ShotDirectionEnum
|
|
|
|
bank: BankFeaturesGQL
|
|
|
|
}
|
|
|
|
|
|
|
|
enum PocketEnum {
|
|
|
|
CORNER
|
|
|
|
SIDE
|
|
|
|
}
|
|
|
|
|
|
|
|
enum ShotDirectionEnum {
|
|
|
|
LEFT
|
|
|
|
RIGHT
|
|
|
|
STRAIGHT
|
|
|
|
}
|
|
|
|
|
|
|
|
type BankFeaturesGQL {
|
|
|
|
wallsHit: [WallTypeEnum!]!
|
|
|
|
bankAngle: Float!
|
|
|
|
distance: Float!
|
|
|
|
}
|
|
|
|
|
|
|
|
enum WallTypeEnum {
|
|
|
|
LONG
|
|
|
|
SHORT
|
|
|
|
}
|
|
|
|
|
|
|
|
type CueObjectFeaturesGQL {
|
|
|
|
cueObjectDistance: Float
|
|
|
|
cueObjectAngle: Float
|
|
|
|
cueBallSpeed: Float
|
|
|
|
shotDirection: ShotDirectionEnum
|
|
|
|
}
|
|
|
|
|
|
|
|
type PocketingIntentionFeaturesGQL {
|
|
|
|
targetPocketDistance: Float
|
|
|
|
make: Boolean
|
|
|
|
intendedPocketType: PocketEnum
|
|
|
|
}
|
|
|
|
|
|
|
|
type UploadStreamGQL {
|
|
|
|
id: ID!
|
|
|
|
linksRequested: Int!
|
|
|
|
uploadsCompleted: Int!
|
|
|
|
isCompleted: Boolean!
|
|
|
|
createdAt: DateTime!
|
|
|
|
updatedAt: DateTime!
|
|
|
|
}
|
|
|
|
|
|
|
|
input FilterInput {
|
|
|
|
andFilters: AndFilter = null
|
|
|
|
orFilters: OrFilter = null
|
|
|
|
cueObjectDistance: CueObjectDistanceInput = null
|
|
|
|
targetPocketDistance: TargetPocketDistanceInput = null
|
|
|
|
cueObjectAngle: CueObjectAngleInput = null
|
|
|
|
cueBallSpeed: CueBallSpeedInput = null
|
|
|
|
intendedPocketType: IntendedPocketTypeInput = null
|
|
|
|
shotDirection: ShotDirectionInput = null
|
|
|
|
}
|
|
|
|
|
|
|
|
input AndFilter {
|
|
|
|
filters: [FilterInput!]!
|
|
|
|
}
|
|
|
|
|
|
|
|
input OrFilter {
|
|
|
|
filters: [FilterInput!]!
|
|
|
|
}
|
|
|
|
|
|
|
|
input CueObjectDistanceInput {
|
|
|
|
value: RangeFilter!
|
|
|
|
}
|
|
|
|
|
|
|
|
input RangeFilter {
|
|
|
|
lessThan: Float = null
|
|
|
|
greaterThanEqualTo: Float = null
|
|
|
|
}
|
|
|
|
|
|
|
|
input TargetPocketDistanceInput {
|
|
|
|
value: RangeFilter!
|
|
|
|
}
|
|
|
|
|
|
|
|
input CueObjectAngleInput {
|
|
|
|
value: RangeFilter!
|
|
|
|
}
|
|
|
|
|
|
|
|
input CueBallSpeedInput {
|
|
|
|
value: RangeFilter!
|
|
|
|
}
|
|
|
|
|
|
|
|
input IntendedPocketTypeInput {
|
|
|
|
value: EnumFilter!
|
|
|
|
}
|
|
|
|
|
|
|
|
input EnumFilter {
|
|
|
|
equals: String = null
|
|
|
|
}
|
|
|
|
|
|
|
|
input ShotDirectionInput {
|
|
|
|
value: EnumFilter!
|
|
|
|
}
|
|
|
|
|
|
|
|
type BucketSetGQL {
|
|
|
|
keyName: String!
|
|
|
|
feature: String!
|
|
|
|
buckets: [BucketGQL!]!
|
|
|
|
}
|
|
|
|
|
2024-02-20 19:18:21 -07:00
|
|
|
type VideoFeedGQL {
|
|
|
|
videos: [VideoGQL!]!
|
|
|
|
pageInfo: PageInfoGQL!
|
|
|
|
}
|
|
|
|
|
|
|
|
type PageInfoGQL {
|
|
|
|
hasNextPage: Boolean!
|
|
|
|
endCursor: String
|
|
|
|
}
|
|
|
|
|
2024-02-03 03:16:55 -07:00
|
|
|
type Mutation {
|
|
|
|
createBucketSet(params: CreateBucketSetInput!): BucketSetGQL!
|
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-02-22 19:27:29 -07:00
|
|
|
terminateUploadStream(
|
|
|
|
videoId: Int!
|
2024-03-04 22:22:42 -07:00
|
|
|
videoMetadata: VideoMetadataInput!
|
2024-02-22 19:27:29 -07:00
|
|
|
): Boolean!
|
2024-02-03 03:16:55 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
input CreateBucketSetInput {
|
|
|
|
keyName: String!
|
|
|
|
feature: String!
|
|
|
|
buckets: [BucketInputGQL!]!
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
tableSize: String = null
|
|
|
|
uploadStreamMetadataInput: UploadStreamMetadataInput = null
|
|
|
|
}
|
|
|
|
|
|
|
|
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-02-03 03:16:55 -07:00
|
|
|
type GetUploadLinkReturn {
|
|
|
|
uploadUrl: String!
|
2024-03-04 17:48:59 -07:00
|
|
|
headers: [Header]!
|
|
|
|
}
|
|
|
|
|
|
|
|
type Header {
|
|
|
|
key: String!
|
|
|
|
value: String!
|
2024-02-03 03:16:55 -07:00
|
|
|
}
|