Compare commits
1 Commits
compute-po
...
loewy/stor
| Author | SHA1 | Date | |
|---|---|---|---|
| c388932271 |
870
src/index.tsx
870
src/index.tsx
File diff suppressed because it is too large
Load Diff
@@ -1,57 +0,0 @@
|
|||||||
query GetTableState(
|
|
||||||
$b64Image: String!
|
|
||||||
$tableSize: Float
|
|
||||||
$useHomography: HomographyInputGQL
|
|
||||||
) {
|
|
||||||
getTableState(
|
|
||||||
b64Image: $b64Image
|
|
||||||
tableSize: $tableSize
|
|
||||||
useHomography: $useHomography
|
|
||||||
) {
|
|
||||||
identifierToPosition
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
query SimulateShot($simulationInput: SimulateShotInputGQL!) {
|
|
||||||
simulateShot(simulationInput: $simulationInput) {
|
|
||||||
trajectories {
|
|
||||||
ballId
|
|
||||||
points {
|
|
||||||
time
|
|
||||||
position
|
|
||||||
}
|
|
||||||
}
|
|
||||||
events {
|
|
||||||
eventType
|
|
||||||
time
|
|
||||||
ballIds
|
|
||||||
position
|
|
||||||
}
|
|
||||||
finalState {
|
|
||||||
ballId
|
|
||||||
position
|
|
||||||
}
|
|
||||||
pottedBallIds
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
query ComputePotAim(
|
|
||||||
$simulationInput: SimulateShotInputGQL!
|
|
||||||
$targetBallId: Int!
|
|
||||||
$pocket: PocketIdentifier!
|
|
||||||
) {
|
|
||||||
computePotAim(
|
|
||||||
simulationInput: $simulationInput
|
|
||||||
targetBallId: $targetBallId
|
|
||||||
pocket: $pocket
|
|
||||||
) {
|
|
||||||
phi
|
|
||||||
geometricPhi
|
|
||||||
cutAngle
|
|
||||||
requiredPrecision
|
|
||||||
feasible
|
|
||||||
potted
|
|
||||||
converged
|
|
||||||
occludingBallIds
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
fragment VideoExportJobFields on VideoExportJobGQL {
|
|
||||||
id
|
|
||||||
videoId
|
|
||||||
mode
|
|
||||||
status
|
|
||||||
videoName
|
|
||||||
videoThumbnailUri
|
|
||||||
shotIds
|
|
||||||
runId
|
|
||||||
downloadUrl
|
|
||||||
fileSizeBytes
|
|
||||||
expiresAt
|
|
||||||
createdAt
|
|
||||||
}
|
|
||||||
|
|
||||||
mutation RequestVideoExport($input: RequestVideoExportInput!) {
|
|
||||||
requestVideoExport(input: $input) {
|
|
||||||
...VideoExportJobFields
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
mutation DismissVideoExport($jobId: Int!) {
|
|
||||||
dismissVideoExport(jobId: $jobId)
|
|
||||||
}
|
|
||||||
|
|
||||||
query VideoExportJob($jobId: Int!) {
|
|
||||||
videoExportJob(jobId: $jobId) {
|
|
||||||
...VideoExportJobFields
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
query MyVideoExports($limit: Int = 30, $offset: Int = 0) {
|
|
||||||
myVideoExports(limit: $limit, offset: $offset) {
|
|
||||||
...VideoExportJobFields
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -67,13 +67,6 @@ mutation GetHlsInitUploadLink($videoId: Int!) {
|
|||||||
... on TooManyInitUploadsErr {
|
... on TooManyInitUploadsErr {
|
||||||
linksRequested
|
linksRequested
|
||||||
}
|
}
|
||||||
... on StorageLimitExceededErr {
|
|
||||||
reason
|
|
||||||
tierName
|
|
||||||
retainedStorageUsedBytes
|
|
||||||
retainedStorageLimitBytes
|
|
||||||
remainingStorageBytes
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
133
src/schema.gql
133
src/schema.gql
@@ -66,12 +66,6 @@ type Query {
|
|||||||
tableSize: Float = 100
|
tableSize: Float = 100
|
||||||
useHomography: HomographyInputGQL = null
|
useHomography: HomographyInputGQL = null
|
||||||
): TableStateGQL!
|
): TableStateGQL!
|
||||||
simulateShot(simulationInput: SimulateShotInputGQL!): ShotProjectionGQL!
|
|
||||||
computePotAim(
|
|
||||||
simulationInput: SimulateShotInputGQL!
|
|
||||||
targetBallId: Int!
|
|
||||||
pocket: PocketIdentifier!
|
|
||||||
): PotAimGQL!
|
|
||||||
getOrderedShots(
|
getOrderedShots(
|
||||||
filterInput: FilterInput!
|
filterInput: FilterInput!
|
||||||
ids: [Int!] = null
|
ids: [Int!] = null
|
||||||
@@ -127,8 +121,6 @@ type Query {
|
|||||||
): VideoHistoryGQL!
|
): VideoHistoryGQL!
|
||||||
getUserTags(includeRetiredTags: Boolean = false): [TagGQL!]!
|
getUserTags(includeRetiredTags: Boolean = false): [TagGQL!]!
|
||||||
getGameTypeTagMetrics(input: GameTypeTagMetricsInput!): [GameTypeTagMetric!]!
|
getGameTypeTagMetrics(input: GameTypeTagMetricsInput!): [GameTypeTagMetric!]!
|
||||||
videoExportJob(jobId: Int!): VideoExportJobGQL
|
|
||||||
myVideoExports(limit: Int! = 30, offset: Int! = 0): [VideoExportJobGQL!]!
|
|
||||||
getVideo(videoId: Int!, debuggingJson: JSON = null): VideoGQL!
|
getVideo(videoId: Int!, debuggingJson: JSON = null): VideoGQL!
|
||||||
getVideos(videoIds: [Int!]!): [VideoGQL!]!
|
getVideos(videoIds: [Int!]!): [VideoGQL!]!
|
||||||
}
|
}
|
||||||
@@ -720,7 +712,6 @@ type DeployedConfigGQL {
|
|||||||
minimumAllowedAppVersion: String!
|
minimumAllowedAppVersion: String!
|
||||||
subscriptionGatingEnabled: Boolean!
|
subscriptionGatingEnabled: Boolean!
|
||||||
quotaEnforcementEnabled: Boolean!
|
quotaEnforcementEnabled: Boolean!
|
||||||
storageLimitEnforcementEnabled: Boolean!
|
|
||||||
bannerMessages: [BannerGQL!]!
|
bannerMessages: [BannerGQL!]!
|
||||||
defaultAndroidRecordingFormat: StreamSegmentTypeEnum!
|
defaultAndroidRecordingFormat: StreamSegmentTypeEnum!
|
||||||
bucketUrl: String!
|
bucketUrl: String!
|
||||||
@@ -873,7 +864,6 @@ enum NotificationTypeEnum {
|
|||||||
REACTION
|
REACTION
|
||||||
FOLLOW
|
FOLLOW
|
||||||
CHALLENGE_INVITE
|
CHALLENGE_INVITE
|
||||||
EXPORT_READY
|
|
||||||
}
|
}
|
||||||
|
|
||||||
input NotificationFilters {
|
input NotificationFilters {
|
||||||
@@ -976,76 +966,6 @@ input IntPoint2DInput {
|
|||||||
y: Int!
|
y: Int!
|
||||||
}
|
}
|
||||||
|
|
||||||
type ShotProjectionGQL {
|
|
||||||
trajectories: [BallTrajectoryGQL!]!
|
|
||||||
events: [SimulationEventGQL!]!
|
|
||||||
finalState: [SimulationBallStateGQL!]!
|
|
||||||
pottedBallIds: [Int!]!
|
|
||||||
}
|
|
||||||
|
|
||||||
type BallTrajectoryGQL {
|
|
||||||
ballId: Int!
|
|
||||||
points: [TrajectoryPointGQL!]!
|
|
||||||
}
|
|
||||||
|
|
||||||
type TrajectoryPointGQL {
|
|
||||||
time: Float!
|
|
||||||
position: [Float!]!
|
|
||||||
}
|
|
||||||
|
|
||||||
type SimulationEventGQL {
|
|
||||||
eventType: SimulationEventType!
|
|
||||||
time: Float!
|
|
||||||
ballIds: [Int!]!
|
|
||||||
position: [Float!]
|
|
||||||
}
|
|
||||||
|
|
||||||
enum SimulationEventType {
|
|
||||||
STICK_BALL
|
|
||||||
BALL_BALL
|
|
||||||
BALL_CUSHION
|
|
||||||
BALL_POCKET
|
|
||||||
BALL_STOP
|
|
||||||
}
|
|
||||||
|
|
||||||
type SimulationBallStateGQL {
|
|
||||||
ballId: Int!
|
|
||||||
position: [Float!]!
|
|
||||||
}
|
|
||||||
|
|
||||||
input SimulateShotInputGQL {
|
|
||||||
cueBallId: Int!
|
|
||||||
strike: CueStrikeInputGQL!
|
|
||||||
balls: [SimulationBallStateInputGQL!] = null
|
|
||||||
b64Image: String = null
|
|
||||||
useHomography: HomographyInputGQL = null
|
|
||||||
tableSize: Float = null
|
|
||||||
}
|
|
||||||
|
|
||||||
input CueStrikeInputGQL {
|
|
||||||
v0: Float!
|
|
||||||
phi: Float!
|
|
||||||
theta: Float! = 0
|
|
||||||
a: Float! = 0
|
|
||||||
b: Float! = 0
|
|
||||||
}
|
|
||||||
|
|
||||||
input SimulationBallStateInputGQL {
|
|
||||||
ballId: Int!
|
|
||||||
position: [Float!]!
|
|
||||||
}
|
|
||||||
|
|
||||||
type PotAimGQL {
|
|
||||||
phi: Float!
|
|
||||||
geometricPhi: Float!
|
|
||||||
cutAngle: Float!
|
|
||||||
requiredPrecision: Float!
|
|
||||||
feasible: Boolean!
|
|
||||||
potted: Boolean!
|
|
||||||
converged: Boolean!
|
|
||||||
occludingBallIds: [Int!]!
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetShotsResult {
|
type GetShotsResult {
|
||||||
shots: [ShotGQL!]!
|
shots: [ShotGQL!]!
|
||||||
count: Int
|
count: Int
|
||||||
@@ -1202,6 +1122,7 @@ type StorageStatusGQL {
|
|||||||
usageCalculated: Boolean!
|
usageCalculated: Boolean!
|
||||||
usageSource: String
|
usageSource: String
|
||||||
lastCalculatedAt: DateTime
|
lastCalculatedAt: DateTime
|
||||||
|
usageEstimated: Boolean!
|
||||||
}
|
}
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@@ -1244,36 +1165,6 @@ input GameTypeTagMetricsInput {
|
|||||||
includePrivate: IncludePrivateEnum! = MINE
|
includePrivate: IncludePrivateEnum! = MINE
|
||||||
}
|
}
|
||||||
|
|
||||||
type VideoExportJobGQL {
|
|
||||||
id: Int!
|
|
||||||
videoId: Int!
|
|
||||||
mode: VideoExportModeEnum!
|
|
||||||
status: VideoExportStatusEnum!
|
|
||||||
videoName: String
|
|
||||||
videoThumbnailUri: String
|
|
||||||
shotIds: [Int!]
|
|
||||||
runId: Int
|
|
||||||
downloadUrl: String
|
|
||||||
fileSizeBytes: Int
|
|
||||||
expiresAt: DateTime
|
|
||||||
createdAt: DateTime
|
|
||||||
}
|
|
||||||
|
|
||||||
enum VideoExportModeEnum {
|
|
||||||
FULL_SESSION
|
|
||||||
SHOTS
|
|
||||||
RUN
|
|
||||||
}
|
|
||||||
|
|
||||||
enum VideoExportStatusEnum {
|
|
||||||
CREATED
|
|
||||||
QUEUED
|
|
||||||
RUNNING
|
|
||||||
SUCCEEDED
|
|
||||||
FAILED
|
|
||||||
EXPIRED
|
|
||||||
}
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
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).
|
||||||
"""
|
"""
|
||||||
@@ -1375,8 +1266,6 @@ type Mutation {
|
|||||||
feedback: String = null
|
feedback: String = null
|
||||||
metadata: CancellationFeedbackMetadataInput = null
|
metadata: CancellationFeedbackMetadataInput = null
|
||||||
): Boolean!
|
): Boolean!
|
||||||
requestVideoExport(input: RequestVideoExportInput!): VideoExportJobGQL!
|
|
||||||
dismissVideoExport(jobId: Int!): Boolean!
|
|
||||||
findPrerecordTableLayout(b64Image: String!, videoId: Int!): HomographyInfoGQL
|
findPrerecordTableLayout(b64Image: String!, videoId: Int!): HomographyInfoGQL
|
||||||
createUploadStream(
|
createUploadStream(
|
||||||
videoMetadata: VideoMetadataInput!
|
videoMetadata: VideoMetadataInput!
|
||||||
@@ -1559,13 +1448,6 @@ input CancellationFeedbackMetadataInput {
|
|||||||
platform: String = null
|
platform: String = null
|
||||||
}
|
}
|
||||||
|
|
||||||
input RequestVideoExportInput {
|
|
||||||
videoId: Int!
|
|
||||||
mode: VideoExportModeEnum!
|
|
||||||
shotIds: [Int!] = null
|
|
||||||
runId: Int = null
|
|
||||||
}
|
|
||||||
|
|
||||||
type CreateUploadStreamReturn {
|
type CreateUploadStreamReturn {
|
||||||
videoId: Int!
|
videoId: Int!
|
||||||
}
|
}
|
||||||
@@ -1605,10 +1487,10 @@ type GetUploadLinkReturn {
|
|||||||
union UploadLinkGetUploadLinkErrors = UploadLink | GetUploadLinkErrors
|
union UploadLinkGetUploadLinkErrors = UploadLink | GetUploadLinkErrors
|
||||||
|
|
||||||
type GetUploadLinkErrors {
|
type GetUploadLinkErrors {
|
||||||
error: MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErrStorageLimitExceededErr!
|
error: MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErr!
|
||||||
}
|
}
|
||||||
|
|
||||||
union MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErrStorageLimitExceededErr =
|
union MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErr =
|
||||||
MustHaveSetForUploadLinkErr
|
MustHaveSetForUploadLinkErr
|
||||||
| SegmentAlreadyUploadedErr
|
| SegmentAlreadyUploadedErr
|
||||||
| ProcessingFailedErr
|
| ProcessingFailedErr
|
||||||
@@ -1616,7 +1498,6 @@ union MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoI
|
|||||||
| TooManyProfileImageUploadsErr
|
| TooManyProfileImageUploadsErr
|
||||||
| InitUploadAlreadyCompletedErr
|
| InitUploadAlreadyCompletedErr
|
||||||
| TooManyInitUploadsErr
|
| TooManyInitUploadsErr
|
||||||
| StorageLimitExceededErr
|
|
||||||
|
|
||||||
type MustHaveSetForUploadLinkErr {
|
type MustHaveSetForUploadLinkErr {
|
||||||
resolution: Boolean
|
resolution: Boolean
|
||||||
@@ -1642,11 +1523,3 @@ type InitUploadAlreadyCompletedErr {
|
|||||||
type TooManyInitUploadsErr {
|
type TooManyInitUploadsErr {
|
||||||
linksRequested: Int!
|
linksRequested: Int!
|
||||||
}
|
}
|
||||||
|
|
||||||
type StorageLimitExceededErr {
|
|
||||||
reason: String!
|
|
||||||
tierName: String!
|
|
||||||
retainedStorageUsedBytes: BigInt!
|
|
||||||
retainedStorageLimitBytes: BigInt
|
|
||||||
remainingStorageBytes: BigInt
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user