Compare commits
172 Commits
kat/create
...
master
Author | SHA1 | Date | |
---|---|---|---|
e137ce8ad1 | |||
bd5bebb747 | |||
034facebf3 | |||
ac1fceb648 | |||
fd87ade629 | |||
1fab007654 | |||
cd2cdb475a | |||
c3c74379fb | |||
da21627f15 | |||
8fabfd67cf | |||
e6960038f2 | |||
b6ec7ed39d | |||
545ba638c2 | |||
94e4e55558 | |||
2536f5db6b | |||
ffd0814a98 | |||
55bfe42484 | |||
dabb0d1d9c | |||
a538c1d81c | |||
872bce3adb | |||
457d375bed | |||
12798e368c | |||
a3d6e6e19e | |||
f7a6e393e7 | |||
ee11e506ed | |||
90ec47848b | |||
21acb5219d | |||
087d511efc | |||
7cc0dca821 | |||
f826121aa3 | |||
2aadb8b49b | |||
5468b7ccda | |||
08dfafe1a3 | |||
36b6804719 | |||
0120c15064 | |||
9cc99d956a | |||
985fa8b8e5 | |||
c4868e7ebe | |||
58e1c18034 | |||
592dea0ca2 | |||
0e00ae9297 | |||
e16812f242 | |||
3e9b7a0d16 | |||
309deb9473 | |||
d5ba9c2ba5 | |||
73771a263a | |||
655e59c43c | |||
056120a68a | |||
bd7ffa7fdb | |||
ec58923c65 | |||
63869cd7ca | |||
08ae9611cf | |||
4e610b7df2 | |||
2d6d3964ad | |||
73a58de36e | |||
dc6f246489 | |||
c0a3aa97dc | |||
f4e43b24f2 | |||
51ab8320d7 | |||
f9a00ad3eb | |||
998b2ffc8c | |||
c7642e6204 | |||
b2ce1c2f96 | |||
d0cf071934 | |||
6b410b3d78 | |||
607504261c | |||
0421be855d | |||
014aab473b | |||
353872401e | |||
433dfdaf74 | |||
a2d9e688e9 | |||
b3259dac1f | |||
0982b9e60c | |||
1710ae451c | |||
de9e7dea6a | |||
cfcf1dbcd2 | |||
05e3182e8b | |||
baf139aab5 | |||
b3b454ef83 | |||
f6e4a1bc0b | |||
9d8155527d | |||
8690e81029 | |||
4ef13a482a | |||
9db95c4e6c | |||
249807c935 | |||
eec79b2dc5 | |||
464c013095 | |||
e2f4995cad | |||
a43b286e39 | |||
148f5362f0 | |||
4d01e9814d | |||
b9e3e1f310 | |||
b0da48c4fb | |||
1e53dc21ee | |||
5c5014339f | |||
84188a6066 | |||
7c7be319d1 | |||
79784faba1 | |||
f3ea44755c | |||
9b6559559c | |||
2398216bf2 | |||
d942b91d17 | |||
24d9b9225e | |||
f6f6404302 | |||
4609af726b | |||
c5919c90d0 | |||
605adc3293 | |||
b40554d38d | |||
194d7c66a0 | |||
3adc301935 | |||
9232c673e8 | |||
c2cb411469 | |||
44ddc732a1 | |||
d6ef3e0487 | |||
8c191bdb90 | |||
8246699915 | |||
de9d47c289 | |||
39b1808cab | |||
a78f9e7b9d | |||
f573026853 | |||
f98c98ecdd | |||
3f6314aab7 | |||
3051c155e2 | |||
e686be5acd | |||
d49f9b213a | |||
8f346d7832 | |||
163c6a4e0c | |||
b9036001aa | |||
b16b36588f | |||
efaaeeaad1 | |||
5d93f7166e | |||
72ac956758 | |||
5cb7df174b | |||
d15dae23c1 | |||
c98a65bb6f | |||
e701c79469 | |||
18cd3efe80 | |||
d71974d385 | |||
0defdf0892 | |||
8d1f79b8a8 | |||
9dc426ea0f | |||
19a63b9d19 | |||
ae97f956b3 | |||
d619751144 | |||
e431a1751f | |||
209f0aa019 | |||
70015a942c | |||
91cfcb28e7 | |||
b2a09c1b8c | |||
59aaf47cbe | |||
c426e753cd | |||
c8cf97421b | |||
9718137ad3 | |||
af1fb3fee7 | |||
025baf257a | |||
8239ab6e1b | |||
1f018f954e | |||
fd78ddf641 | |||
7662f1f050 | |||
890bea2571 | |||
f57f6dc32d | |||
14863e3357 | |||
|
58f01c567c | ||
937368c753 | |||
d8c11875d4 | |||
bacd9e77f0 | |||
69d755ba32 | |||
31fb95e3b0 | |||
7d0f9870dd | |||
4a493b4e8d | |||
341dc819a0 | |||
b58aecf7a5 |
@ -1,5 +1,7 @@
|
||||
overwrite: true
|
||||
schema: "src/schema.gql"
|
||||
schema:
|
||||
- "src/schema.gql"
|
||||
- "src/client-schema.gql"
|
||||
documents: "src/**/*.gql"
|
||||
generates:
|
||||
src/index.tsx:
|
||||
|
@ -7,7 +7,7 @@ readme = "README.md"
|
||||
packages = [{include = "rbproto"}]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = ">=3.10,<3.12"
|
||||
python = ">=3.10,<=3.13"
|
||||
protobuf = "^4.25.3"
|
||||
|
||||
|
||||
|
25
src/client-schema.gql
Normal file
25
src/client-schema.gql
Normal file
@ -0,0 +1,25 @@
|
||||
# see: https://www.apollographql.com/docs/react/local-state/managing-state-with-field-policies/
|
||||
directive @client on FIELD
|
||||
|
||||
extend type ShotGQL {
|
||||
startTime: Float!
|
||||
endTime: Float!
|
||||
}
|
||||
|
||||
extend type UploadStreamGQL {
|
||||
segmentEndFrames: [Int!]!
|
||||
}
|
||||
|
||||
extend type HLSPlaylistGQL {
|
||||
segmentStartTimes: [Float!]!
|
||||
}
|
||||
|
||||
type SegmentEndFramesGQL {
|
||||
id: Int!
|
||||
segmentEndFrames: [Int!]!
|
||||
}
|
||||
|
||||
type SegmentStartTimesGQL {
|
||||
id: Int!
|
||||
segmentStartTimes: [Float!]!
|
||||
}
|
3249
src/index.tsx
3249
src/index.tsx
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,4 @@
|
||||
# DO NOT USE: use getVideoFeed instead
|
||||
query GetFeed(
|
||||
$limit: Int! = 5
|
||||
$after: String = null
|
||||
@ -5,9 +6,21 @@ query GetFeed(
|
||||
) {
|
||||
getUserVideos(limit: $limit, after: $after, filters: $filters) {
|
||||
videos {
|
||||
...VideoCardFields
|
||||
}
|
||||
pageInfo {
|
||||
hasNextPage
|
||||
endCursor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fragment VideoCardFields on VideoGQL {
|
||||
id
|
||||
owner {
|
||||
id
|
||||
username
|
||||
profileImageUri
|
||||
}
|
||||
name
|
||||
screenshotUri
|
||||
@ -18,9 +31,11 @@ query GetFeed(
|
||||
updatedAt
|
||||
startTime
|
||||
endTime
|
||||
private
|
||||
elapsedTime
|
||||
screenshotUri
|
||||
stream {
|
||||
id
|
||||
isCompleted
|
||||
}
|
||||
tableSize
|
||||
@ -30,6 +45,32 @@ query GetFeed(
|
||||
}
|
||||
name
|
||||
}
|
||||
currentProcessing {
|
||||
id
|
||||
errors {
|
||||
message
|
||||
}
|
||||
status
|
||||
statuses {
|
||||
status
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query GetVideoFeed(
|
||||
$limit: Int! = 5
|
||||
$after: String = null
|
||||
$filters: VideoFilterInput = null
|
||||
$includeCallersVideos: Boolean = null
|
||||
) {
|
||||
getFeedVideos(
|
||||
limit: $limit
|
||||
after: $after
|
||||
filters: $filters
|
||||
includeCallersVideos: $includeCallersVideos
|
||||
) {
|
||||
videos {
|
||||
...VideoCardFields
|
||||
}
|
||||
pageInfo {
|
||||
hasNextPage
|
||||
|
80
src/operations/medals.gql
Normal file
80
src/operations/medals.gql
Normal file
@ -0,0 +1,80 @@
|
||||
fragment MedalFields on MedalGQL {
|
||||
count
|
||||
nickname
|
||||
}
|
||||
|
||||
query getMedals($scope: MedalScope!, $userId: Int) {
|
||||
getMedals(scope: $scope, userId: $userId) {
|
||||
distanceOver66 {
|
||||
...MedalFields
|
||||
}
|
||||
distanceOver78 {
|
||||
...MedalFields
|
||||
}
|
||||
distanceOver90 {
|
||||
...MedalFields
|
||||
}
|
||||
runLength3 {
|
||||
...MedalFields
|
||||
}
|
||||
runLength5 {
|
||||
...MedalFields
|
||||
}
|
||||
runLength8 {
|
||||
...MedalFields
|
||||
}
|
||||
runLength10 {
|
||||
...MedalFields
|
||||
}
|
||||
runLength15 {
|
||||
...MedalFields
|
||||
}
|
||||
runLength20 {
|
||||
...MedalFields
|
||||
}
|
||||
runLength25 {
|
||||
...MedalFields
|
||||
}
|
||||
runLength30 {
|
||||
...MedalFields
|
||||
}
|
||||
runLength40 {
|
||||
...MedalFields
|
||||
}
|
||||
runLength50 {
|
||||
...MedalFields
|
||||
}
|
||||
totalMakes100 {
|
||||
...MedalFields
|
||||
}
|
||||
# missing assets
|
||||
# totalMakes500 {
|
||||
# ...MedalFields
|
||||
# }
|
||||
# totalMakes1000 {
|
||||
# ...MedalFields
|
||||
# }
|
||||
# totalMakes5000 {
|
||||
# ...MedalFields
|
||||
# }
|
||||
# totalMakes10000 {
|
||||
# ...MedalFields
|
||||
# }
|
||||
dailyMakes50 {
|
||||
...MedalFields
|
||||
}
|
||||
dailyMakes100 {
|
||||
...MedalFields
|
||||
}
|
||||
dailyMakes150 {
|
||||
...MedalFields
|
||||
}
|
||||
dailyMakes200 {
|
||||
...MedalFields
|
||||
}
|
||||
# missing asset
|
||||
# dailyMakes250 {
|
||||
# ...MedalFields
|
||||
# }
|
||||
}
|
||||
}
|
@ -1,59 +1,3 @@
|
||||
query GetShots(
|
||||
$filterInput: FilterInput!
|
||||
$shotsPagination: GetShotsPagination
|
||||
$limit: Int
|
||||
$includeCreatedAt: Boolean! = false
|
||||
$includeUpdatedAt: Boolean! = false
|
||||
$includeCueObjectFeatures: Boolean! = false
|
||||
$includePocketingIntentionFeatures: Boolean! = false
|
||||
$includeCueObjectDistance: Boolean! = false
|
||||
$includeCueObjectAngle: Boolean! = false
|
||||
$includeCueBallSpeed: Boolean! = false
|
||||
$includeSpinType: Boolean! = false
|
||||
$includeShotDirection: Boolean! = false
|
||||
$includeTargetPocketDistance: Boolean! = false
|
||||
$includeMake: Boolean! = false
|
||||
$includeIntendedPocketType: Boolean! = false
|
||||
) {
|
||||
getShots(
|
||||
filterInput: $filterInput
|
||||
shotsPagination: $shotsPagination
|
||||
limit: $limit
|
||||
) {
|
||||
id
|
||||
videoId
|
||||
startFrame
|
||||
endFrame
|
||||
user {
|
||||
id
|
||||
}
|
||||
falsePositiveScore
|
||||
video {
|
||||
stream {
|
||||
resolution {
|
||||
width
|
||||
height
|
||||
}
|
||||
}
|
||||
}
|
||||
createdAt @include(if: $includeCreatedAt)
|
||||
updatedAt @include(if: $includeUpdatedAt)
|
||||
cueObjectFeatures @include(if: $includeCueObjectFeatures) {
|
||||
cueObjectDistance @include(if: $includeCueObjectDistance)
|
||||
cueObjectAngle @include(if: $includeCueObjectAngle)
|
||||
cueBallSpeed @include(if: $includeCueBallSpeed)
|
||||
shotDirection @include(if: $includeShotDirection)
|
||||
spinType @include(if: $includeSpinType)
|
||||
}
|
||||
pocketingIntentionFeatures
|
||||
@include(if: $includePocketingIntentionFeatures) {
|
||||
targetPocketDistance @include(if: $includeTargetPocketDistance)
|
||||
make @include(if: $includeMake)
|
||||
intendedPocketType @include(if: $includeIntendedPocketType)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query GetSerializedShotPaths($filterInput: FilterInput!) {
|
||||
getShots(filterInput: $filterInput) {
|
||||
id
|
||||
@ -73,104 +17,112 @@ query GetShotAnnotationTypes {
|
||||
}
|
||||
}
|
||||
|
||||
query GetShotsWithMetadata(
|
||||
$filterInput: FilterInput!
|
||||
$shotsPagination: GetShotsPagination
|
||||
$limit: Int
|
||||
$includeCreatedAt: Boolean! = false
|
||||
$includeUpdatedAt: Boolean! = false
|
||||
$includeCueObjectFeatures: Boolean! = false
|
||||
$includePocketingIntentionFeatures: Boolean! = false
|
||||
$includeCueObjectDistance: Boolean! = false
|
||||
$includeCueObjectAngle: Boolean! = false
|
||||
$includeCueBallSpeed: Boolean! = false
|
||||
$includeSpinType: Boolean! = false
|
||||
$includeShotDirection: Boolean! = false
|
||||
$includeTargetPocketDistance: Boolean! = false
|
||||
$includeMake: Boolean! = false
|
||||
$includeIntendedPocketType: Boolean! = false
|
||||
mutation UpdateShotAnnotations(
|
||||
$shotId: Int!
|
||||
$annotations: [UpdateAnnotationInputGQL!]!
|
||||
) {
|
||||
getShotsWithMetadata(
|
||||
updateShotAnnotations(shotId: $shotId, annotations: $annotations) {
|
||||
shot {
|
||||
id
|
||||
annotations {
|
||||
shotId
|
||||
type {
|
||||
id
|
||||
name
|
||||
}
|
||||
notes
|
||||
}
|
||||
}
|
||||
error {
|
||||
shotId
|
||||
msg
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
## Should be deprecated
|
||||
query GetShotsWithVideoGql(
|
||||
$filterInput: FilterInput!
|
||||
$shotsOrdering: GetShotsOrdering
|
||||
$limit: Int
|
||||
) {
|
||||
getOrderedShots(
|
||||
filterInput: $filterInput
|
||||
shotsPagination: $shotsPagination
|
||||
shotsOrdering: $shotsOrdering
|
||||
limit: $limit
|
||||
) {
|
||||
count
|
||||
shots {
|
||||
id
|
||||
videoId
|
||||
startFrame
|
||||
endFrame
|
||||
user {
|
||||
id
|
||||
}
|
||||
falsePositiveScore
|
||||
video {
|
||||
stream {
|
||||
resolution {
|
||||
width
|
||||
height
|
||||
}
|
||||
}
|
||||
}
|
||||
createdAt @include(if: $includeCreatedAt)
|
||||
updatedAt @include(if: $includeUpdatedAt)
|
||||
cueObjectFeatures @include(if: $includeCueObjectFeatures) {
|
||||
cueObjectDistance @include(if: $includeCueObjectDistance)
|
||||
cueObjectAngle @include(if: $includeCueObjectAngle)
|
||||
cueBallSpeed @include(if: $includeCueBallSpeed)
|
||||
shotDirection @include(if: $includeShotDirection)
|
||||
spinType @include(if: $includeSpinType)
|
||||
}
|
||||
pocketingIntentionFeatures
|
||||
@include(if: $includePocketingIntentionFeatures) {
|
||||
targetPocketDistance @include(if: $includeTargetPocketDistance)
|
||||
make @include(if: $includeMake)
|
||||
intendedPocketType @include(if: $includeIntendedPocketType)
|
||||
}
|
||||
pocketingIntentionInfo @include(if: $includePocketingIntentionFeatures) {
|
||||
ballId
|
||||
pocketId
|
||||
pathMetadataIndex
|
||||
}
|
||||
serializedShotPaths @include(if: $includePocketingIntentionFeatures) {
|
||||
b64EncodedBuffer
|
||||
screenshotUri
|
||||
endTime
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fragment ShotWithAllFeatures on ShotGQL {
|
||||
query GetShotsWithJustIds(
|
||||
$filterInput: FilterInput!
|
||||
$shotsOrdering: GetShotsOrdering
|
||||
$limit: Int
|
||||
$countRespectsLimit: Boolean
|
||||
) {
|
||||
getOrderedShots(
|
||||
filterInput: $filterInput
|
||||
shotsOrdering: $shotsOrdering
|
||||
limit: $limit
|
||||
countRespectsLimit: $countRespectsLimit
|
||||
) {
|
||||
count
|
||||
shots {
|
||||
id
|
||||
videoId
|
||||
startFrame
|
||||
endFrame
|
||||
falsePositiveScore
|
||||
createdAt
|
||||
updatedAt
|
||||
user {
|
||||
id
|
||||
}
|
||||
video {
|
||||
id
|
||||
stream {
|
||||
resolution {
|
||||
width
|
||||
height
|
||||
}
|
||||
}
|
||||
}
|
||||
cueObjectFeatures {
|
||||
cueObjectDistance
|
||||
cueObjectAngle
|
||||
cueBallSpeed
|
||||
shotDirection
|
||||
spinType
|
||||
|
||||
## Reserved for playlists (which are created from a filter)
|
||||
query GetShotsWithMetadataFilterResult(
|
||||
$filterInput: FilterInput!
|
||||
$shotsOrdering: GetShotsOrdering
|
||||
$limit: Int
|
||||
$ids: [Int!]
|
||||
$countRespectsLimit: Boolean
|
||||
) {
|
||||
getOrderedShots(
|
||||
filterInput: $filterInput
|
||||
shotsOrdering: $shotsOrdering
|
||||
limit: $limit
|
||||
ids: $ids
|
||||
countRespectsLimit: $countRespectsLimit
|
||||
) {
|
||||
count
|
||||
shots {
|
||||
...ShotWithAllFeatures
|
||||
}
|
||||
pocketingIntentionFeatures {
|
||||
targetPocketDistance
|
||||
make
|
||||
intendedPocketType
|
||||
ids
|
||||
}
|
||||
}
|
||||
|
||||
# TODO: Delete
|
||||
query GetShotsWithMetadata(
|
||||
$filterInput: FilterInput!
|
||||
$shotsPagination: GetShotsPagination
|
||||
$limit: Int
|
||||
$ids: [Int!]
|
||||
) {
|
||||
getShotsWithMetadata(
|
||||
filterInput: $filterInput
|
||||
shotsPagination: $shotsPagination
|
||||
limit: $limit
|
||||
ids: $ids
|
||||
) {
|
||||
count
|
||||
shots {
|
||||
...ShotWithAllFeatures
|
||||
}
|
||||
ids
|
||||
}
|
||||
}
|
||||
|
||||
@ -179,3 +131,50 @@ query GetShotsByIds($ids: [Int!]!) {
|
||||
...ShotWithAllFeatures
|
||||
}
|
||||
}
|
||||
|
||||
fragment ShotWithAllFeatures on ShotGQL {
|
||||
id
|
||||
videoId
|
||||
startFrame
|
||||
endFrame
|
||||
startTime @client
|
||||
endTime @client
|
||||
user {
|
||||
id
|
||||
}
|
||||
falsePositiveScore
|
||||
createdAt
|
||||
updatedAt
|
||||
cueObjectFeatures {
|
||||
cueObjectDistance
|
||||
cueObjectAngle
|
||||
cueBallSpeed
|
||||
shotDirection
|
||||
spinType
|
||||
}
|
||||
pocketingIntentionFeatures {
|
||||
make
|
||||
targetPocketDistance
|
||||
targetPocketAngle
|
||||
targetPocketAngleDirection
|
||||
marginOfErrorInDegrees
|
||||
intendedPocketType
|
||||
difficulty
|
||||
}
|
||||
pocketingIntentionInfo {
|
||||
ballId
|
||||
pocketId
|
||||
pathMetadataIndex
|
||||
}
|
||||
serializedShotPaths {
|
||||
b64EncodedBuffer
|
||||
}
|
||||
annotations {
|
||||
shotId
|
||||
type {
|
||||
id
|
||||
name
|
||||
}
|
||||
notes
|
||||
}
|
||||
}
|
||||
|
@ -37,14 +37,16 @@ query getLoggedInUser {
|
||||
username
|
||||
isAdmin
|
||||
profileImageUri
|
||||
fargoRating
|
||||
activeVideoId
|
||||
createdAt
|
||||
updatedAt
|
||||
videosPrivateByDefault
|
||||
}
|
||||
}
|
||||
|
||||
query GetUserPlayTime($userId: Int!) {
|
||||
getPlayTime(userId: $userId) {
|
||||
query GetUserPlayTime($userId: Int!, $filters: VideoFilterInput) {
|
||||
getPlayTime(userId: $userId, filters: $filters) {
|
||||
totalSeconds
|
||||
}
|
||||
}
|
||||
@ -57,9 +59,101 @@ query getUsernames(
|
||||
getUsernames(matchString: $matchString, limit: $limit, after: $after)
|
||||
}
|
||||
|
||||
query getUserRelationshipsMatching(
|
||||
$userId: Int!
|
||||
$matchString: String!
|
||||
$limit: Int = null
|
||||
$after: String = null
|
||||
) {
|
||||
getUserRelationshipsMatching(
|
||||
userId: $userId
|
||||
matchString: $matchString
|
||||
limit: $limit
|
||||
after: $after
|
||||
) {
|
||||
relationships {
|
||||
toUser {
|
||||
username
|
||||
id
|
||||
}
|
||||
toUserFollows
|
||||
toUserIsFollowedBy
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query GetUserTags {
|
||||
getUserTags {
|
||||
id
|
||||
name
|
||||
}
|
||||
}
|
||||
|
||||
mutation followUser($followedUserId: Int!) {
|
||||
followUser(followedUserId: $followedUserId) {
|
||||
username
|
||||
id
|
||||
following {
|
||||
id
|
||||
username
|
||||
}
|
||||
followers {
|
||||
id
|
||||
username
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mutation unfollowUser($followedUserId: Int!) {
|
||||
unfollowUser(followedUserId: $followedUserId) {
|
||||
username
|
||||
id
|
||||
following {
|
||||
id
|
||||
username
|
||||
}
|
||||
followers {
|
||||
id
|
||||
username
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query getUserFollowingFollowers {
|
||||
getLoggedInUser {
|
||||
id
|
||||
following {
|
||||
id
|
||||
username
|
||||
}
|
||||
followers {
|
||||
id
|
||||
username
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query doesUsernameExist($candidateUsername: String!) {
|
||||
doesUsernameExist(candidateUsername: $candidateUsername)
|
||||
}
|
||||
|
||||
mutation editUser(
|
||||
$username: String
|
||||
$fargoRating: Int
|
||||
$videosPrivateByDefault: Boolean
|
||||
) {
|
||||
editUser(
|
||||
input: {
|
||||
username: $username
|
||||
fargoRating: $fargoRating
|
||||
videosPrivateByDefault: $videosPrivateByDefault
|
||||
}
|
||||
) {
|
||||
id
|
||||
firebaseUid
|
||||
username
|
||||
fargoRating
|
||||
updatedAt
|
||||
videosPrivateByDefault
|
||||
}
|
||||
}
|
||||
|
@ -5,46 +5,10 @@ query GetStreamMonitoringDetails($videoId: Int!, $debuggingJson: JSON) {
|
||||
makePercentage
|
||||
elapsedTime
|
||||
currentHomography {
|
||||
crop {
|
||||
left
|
||||
top
|
||||
width
|
||||
height
|
||||
}
|
||||
pockets {
|
||||
left
|
||||
top
|
||||
width
|
||||
height
|
||||
}
|
||||
sourcePoints {
|
||||
topLeft {
|
||||
x
|
||||
y
|
||||
}
|
||||
topSide {
|
||||
x
|
||||
y
|
||||
}
|
||||
topRight {
|
||||
x
|
||||
y
|
||||
}
|
||||
bottomLeft {
|
||||
x
|
||||
y
|
||||
}
|
||||
bottomSide {
|
||||
x
|
||||
y
|
||||
}
|
||||
bottomRight {
|
||||
x
|
||||
y
|
||||
}
|
||||
}
|
||||
...HomographyInfo
|
||||
}
|
||||
stream {
|
||||
id
|
||||
linksRequested
|
||||
uploadsCompleted
|
||||
segmentProcessingCursor
|
||||
@ -54,6 +18,7 @@ query GetStreamMonitoringDetails($videoId: Int!, $debuggingJson: JSON) {
|
||||
initPlaylistUploadStatus
|
||||
}
|
||||
currentProcessing {
|
||||
id
|
||||
errors {
|
||||
message
|
||||
startSegmentIndex
|
||||
@ -117,6 +82,11 @@ query GetVideoDetails($videoId: Int!) {
|
||||
|
||||
query GetVideos($videoIds: [Int!]!) {
|
||||
getVideos(videoIds: $videoIds) {
|
||||
...VideoStreamMetadata
|
||||
}
|
||||
}
|
||||
|
||||
fragment VideoStreamMetadata on VideoGQL {
|
||||
id
|
||||
framesPerSecond
|
||||
stream {
|
||||
@ -134,6 +104,11 @@ query GetVideos($videoIds: [Int!]!) {
|
||||
segmentDurations
|
||||
}
|
||||
}
|
||||
|
||||
query GetVideoForShotTime($videoId: Int!) {
|
||||
getVideo(videoId: $videoId) {
|
||||
...VideoStreamMetadata
|
||||
}
|
||||
}
|
||||
|
||||
query GetVideo($videoId: Int!) {
|
||||
@ -143,6 +118,111 @@ query GetVideo($videoId: Int!) {
|
||||
segmentDurations
|
||||
}
|
||||
homographyHistory {
|
||||
...HomographyInfo
|
||||
}
|
||||
stream {
|
||||
id
|
||||
streamSegmentType
|
||||
segments {
|
||||
segmentIndex
|
||||
endFrameIndex
|
||||
framesPerSecond
|
||||
}
|
||||
resolution {
|
||||
width
|
||||
height
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query GetAverageTimePerShotForVideo($videoId: Int!) {
|
||||
getVideo(videoId: $videoId) {
|
||||
id
|
||||
averageTimeBetweenShots
|
||||
}
|
||||
}
|
||||
|
||||
query GetElapsedTimeForVideo($videoId: Int!) {
|
||||
getVideo(videoId: $videoId) {
|
||||
id
|
||||
elapsedTime
|
||||
}
|
||||
}
|
||||
|
||||
query GetMedianRunForVideo($videoId: Int!) {
|
||||
getVideo(videoId: $videoId) {
|
||||
id
|
||||
medianRun
|
||||
}
|
||||
}
|
||||
|
||||
fragment StreamWithEndFrames on UploadStreamGQL {
|
||||
id
|
||||
streamSegmentType
|
||||
segmentEndFrames @client
|
||||
resolution {
|
||||
width
|
||||
height
|
||||
}
|
||||
segments {
|
||||
uploaded
|
||||
valid
|
||||
segmentIndex
|
||||
endFrameIndex
|
||||
framesPerSecond
|
||||
}
|
||||
}
|
||||
|
||||
fragment SegmentEndFrames on SegmentEndFramesGQL {
|
||||
id
|
||||
segmentEndFrames
|
||||
}
|
||||
|
||||
fragment SegmentStartTimes on SegmentStartTimesGQL {
|
||||
id
|
||||
segmentStartTimes
|
||||
}
|
||||
|
||||
fragment PlaylistWithSegmentStartTimes on HLSPlaylistGQL {
|
||||
videoId
|
||||
segmentDurations
|
||||
segmentStartTimes @client
|
||||
}
|
||||
|
||||
fragment VideoDurationData on VideoGQL {
|
||||
id
|
||||
framesPerSecond
|
||||
playlist {
|
||||
...PlaylistWithSegmentStartTimes
|
||||
}
|
||||
stream {
|
||||
...StreamWithEndFrames
|
||||
}
|
||||
}
|
||||
|
||||
query GetVideoForClipTimes($videoId: Int!) {
|
||||
getVideo(videoId: $videoId) {
|
||||
...VideoDurationData
|
||||
}
|
||||
}
|
||||
|
||||
query GetHeaderInfoByVideoId($videoId: Int!) {
|
||||
getVideo(videoId: $videoId) {
|
||||
id
|
||||
name
|
||||
startTime
|
||||
}
|
||||
}
|
||||
|
||||
mutation FindPrerecordTableLayout($b64Image: String!, $videoId: Int!) {
|
||||
findPrerecordTableLayout(b64Image: $b64Image, videoId: $videoId) {
|
||||
...HomographyInfo
|
||||
}
|
||||
}
|
||||
|
||||
fragment HomographyInfo on HomographyInfoGQL {
|
||||
id
|
||||
frameIndex
|
||||
crop {
|
||||
left
|
||||
@ -183,57 +263,3 @@ query GetVideo($videoId: Int!) {
|
||||
}
|
||||
}
|
||||
}
|
||||
stream {
|
||||
streamSegmentType
|
||||
segments {
|
||||
segmentIndex
|
||||
endFrameIndex
|
||||
framesPerSecond
|
||||
}
|
||||
resolution {
|
||||
width
|
||||
height
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query GetAverageTimePerShotForVideo($videoId: Int!) {
|
||||
getVideo(videoId: $videoId) {
|
||||
id
|
||||
averageTimeBetweenShots
|
||||
}
|
||||
}
|
||||
query GetElapsedTimeForVideo($videoId: Int!) {
|
||||
getVideo(videoId: $videoId) {
|
||||
id
|
||||
elapsedTime
|
||||
}
|
||||
}
|
||||
query GetMedianRunForVideo($videoId: Int!) {
|
||||
getVideo(videoId: $videoId) {
|
||||
id
|
||||
medianRun
|
||||
}
|
||||
}
|
||||
|
||||
query GetVideoForClipTimes($videoId: Int!) {
|
||||
getVideo(videoId: $videoId) {
|
||||
id
|
||||
framesPerSecond
|
||||
playlist {
|
||||
segmentDurations
|
||||
}
|
||||
stream {
|
||||
id
|
||||
streamSegmentType
|
||||
segments {
|
||||
uploaded
|
||||
valid
|
||||
segmentIndex
|
||||
endFrameIndex
|
||||
framesPerSecond
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
237
src/schema.gql
237
src/schema.gql
@ -9,26 +9,51 @@ type Query {
|
||||
videoId: ID!
|
||||
intervalDuration: Int! = 300
|
||||
): [MakePercentageIntervalGQL!]!
|
||||
getMedals(scope: MedalScope!, userId: Int = null): RequestedMedalsGQL!
|
||||
getRuns(
|
||||
filterInput: RunFilterInput!
|
||||
runIds: [Int!] = null
|
||||
runsOrdering: GetRunsOrdering = null
|
||||
limit: Int! = 500
|
||||
countRespectsLimit: Boolean! = false
|
||||
): GetRunsResult!
|
||||
getOrderedShots(
|
||||
filterInput: FilterInput!
|
||||
ids: [Int!] = null
|
||||
shotsOrdering: GetShotsOrdering = null
|
||||
limit: Int! = 500
|
||||
countRespectsLimit: Boolean! = false
|
||||
): GetShotsResult!
|
||||
getShotsWithMetadata(
|
||||
filterInput: FilterInput!
|
||||
ids: [Int!] = null
|
||||
shotsPagination: GetShotsPagination = null
|
||||
limit: Int! = 500
|
||||
countRespectsLimit: Boolean! = false
|
||||
): GetShotsResult!
|
||||
getShots(
|
||||
filterInput: FilterInput!
|
||||
shotsPagination: GetShotsPagination = null
|
||||
limit: Int! = 500
|
||||
countRespectsLimit: Boolean! = false
|
||||
): [ShotGQL!]!
|
||||
getShotsByIds(ids: [Int!]!): [ShotGQL!]!
|
||||
getShotAnnotationTypes(errorTypes: Boolean = false): [ShotAnnotationTypeGQL!]!
|
||||
getUser(userId: Int!): UserGQL
|
||||
doesUsernameExist(candidateUsername: String!): Boolean!
|
||||
getLoggedInUser: UserGQL
|
||||
getUsernames(
|
||||
matchString: String = null
|
||||
limit: Int = null
|
||||
after: String = null
|
||||
): [String!]!
|
||||
getPlayTime(userId: Int!): UserPlayTimeGQL!
|
||||
getUserRelationshipsMatching(
|
||||
userId: Int!
|
||||
matchString: String = null
|
||||
limit: Int = 100
|
||||
after: String = null
|
||||
): UserRelationshipsResult!
|
||||
getPlayTime(userId: Int!, filters: VideoFilterInput = null): UserPlayTimeGQL!
|
||||
getUserVideos(
|
||||
userId: Int = null
|
||||
limit: Int! = 5
|
||||
@ -38,6 +63,12 @@ type Query {
|
||||
getUserTags: [TagGQL!]!
|
||||
getVideo(videoId: Int!, debuggingJson: JSON = null): VideoGQL!
|
||||
getVideos(videoIds: [Int!]!): [VideoGQL!]!
|
||||
getFeedVideos(
|
||||
limit: Int! = 5
|
||||
after: String = null
|
||||
includeCallersVideos: Boolean = true
|
||||
filters: VideoFilterInput = null
|
||||
): VideoHistoryGQL!
|
||||
}
|
||||
|
||||
type AggregateResultGQL {
|
||||
@ -124,6 +155,7 @@ enum AlignedIntervalEnum {
|
||||
MONTH
|
||||
YEAR
|
||||
WEEK
|
||||
DAY
|
||||
}
|
||||
|
||||
input FilterInput @oneOf {
|
||||
@ -139,6 +171,8 @@ input FilterInput @oneOf {
|
||||
shotDirection: [ShotDirectionEnum!]
|
||||
videoId: [Int!]
|
||||
userId: [Int!]
|
||||
username: [String!]
|
||||
fargoRating: FloatRangeFilter
|
||||
make: [Boolean!]
|
||||
tags: [VideoTagInput!]
|
||||
annotations: [ShotAnnotationInput!]
|
||||
@ -161,7 +195,10 @@ input FilterInput @oneOf {
|
||||
targetPocketAngleDirection: [ShotDirectionEnum!]
|
||||
targetPocketAngle: FloatRangeFilter
|
||||
missAngleInDegrees: FloatRangeFilter
|
||||
marginOfErrorInDegrees: FloatRangeFilter
|
||||
createdAt: DateRangeFilter
|
||||
totalDistance: FloatRangeFilter
|
||||
runLength: FloatRangeFilter
|
||||
}
|
||||
|
||||
input FloatRangeFilter {
|
||||
@ -242,10 +279,61 @@ type MakePercentageIntervalGQL {
|
||||
elapsedTime: Float!
|
||||
}
|
||||
|
||||
type GetShotsResult {
|
||||
shots: [ShotGQL!]!
|
||||
type RequestedMedalsGQL {
|
||||
distanceOver66: MedalGQL
|
||||
distanceOver78: MedalGQL
|
||||
distanceOver90: MedalGQL
|
||||
runLength3: MedalGQL
|
||||
runLength5: MedalGQL
|
||||
runLength8: MedalGQL
|
||||
runLength10: MedalGQL
|
||||
runLength15: MedalGQL
|
||||
runLength20: MedalGQL
|
||||
runLength25: MedalGQL
|
||||
runLength30: MedalGQL
|
||||
runLength40: MedalGQL
|
||||
runLength50: MedalGQL
|
||||
totalMakes25: MedalGQL @deprecated(reason: "no longer supported")
|
||||
totalMakes50: MedalGQL @deprecated(reason: "no longer supported")
|
||||
totalMakes75: MedalGQL @deprecated(reason: "no longer supported")
|
||||
totalMakes200: MedalGQL @deprecated(reason: "no longer supported")
|
||||
totalMakes300: MedalGQL @deprecated(reason: "no longer supported")
|
||||
totalMakes400: MedalGQL @deprecated(reason: "no longer supported")
|
||||
totalMakes750: MedalGQL @deprecated(reason: "no longer supported")
|
||||
totalMakes100: MedalGQL
|
||||
totalMakes500: MedalGQL
|
||||
totalMakes1000: MedalGQL
|
||||
totalMakes5000: MedalGQL
|
||||
totalMakes10000: MedalGQL
|
||||
dailyMakes50: MedalGQL
|
||||
dailyMakes100: MedalGQL
|
||||
dailyMakes150: MedalGQL
|
||||
dailyMakes200: MedalGQL
|
||||
dailyMakes250: MedalGQL
|
||||
}
|
||||
|
||||
type MedalGQL {
|
||||
count: Int!
|
||||
nickname: String
|
||||
}
|
||||
|
||||
input MedalScope @oneOf {
|
||||
videoId: Int
|
||||
interval: TimeInterval
|
||||
}
|
||||
|
||||
type GetRunsResult {
|
||||
runs: [RunGQL!]!
|
||||
count: Int
|
||||
ids: [Int!]!
|
||||
runIds: [Int!]!
|
||||
}
|
||||
|
||||
type RunGQL {
|
||||
id: Int!
|
||||
runLength: Int!
|
||||
videoId: Int!
|
||||
userId: Int!
|
||||
shots: [ShotGQL!]!
|
||||
}
|
||||
|
||||
type ShotGQL {
|
||||
@ -281,6 +369,7 @@ type PocketingIntentionFeaturesGQL {
|
||||
difficulty: Float
|
||||
targetPocketAngle: Float
|
||||
targetPocketAngleDirection: ShotDirectionEnum
|
||||
marginOfErrorInDegrees: Float
|
||||
backcut: Boolean
|
||||
}
|
||||
|
||||
@ -316,13 +405,17 @@ type SerializedShotPathsGQL {
|
||||
|
||||
type UserGQL {
|
||||
id: Int!
|
||||
firebaseUid: String!
|
||||
firebaseUid: String
|
||||
username: String!
|
||||
isAdmin: Boolean!
|
||||
isAdmin: Boolean
|
||||
fargoRating: Int
|
||||
activeVideoId: Int
|
||||
profileImageUri: String
|
||||
createdAt: DateTime
|
||||
updatedAt: DateTime
|
||||
videosPrivateByDefault: Boolean
|
||||
following: [UserGQL!]
|
||||
followers: [UserGQL!]
|
||||
}
|
||||
|
||||
type ShotAnnotationGQL {
|
||||
@ -358,6 +451,7 @@ type VideoGQL {
|
||||
elapsedTime: Float
|
||||
framesPerSecond: Float!
|
||||
tableSize: Float!
|
||||
private: Boolean!
|
||||
stream: UploadStreamGQL
|
||||
playlist: HLSPlaylistGQL
|
||||
tags: [VideoTag!]!
|
||||
@ -380,6 +474,7 @@ type UploadStreamGQL {
|
||||
createdAt: DateTime!
|
||||
updatedAt: DateTime!
|
||||
segments: [UploadSegmentGQL!]!
|
||||
clientUploadStatus: ClientUploadStatusEnum
|
||||
resolution: VideoResolutionGQL!
|
||||
streamSegmentType: StreamSegmentTypeEnum!
|
||||
}
|
||||
@ -404,6 +499,11 @@ type UploadSegmentGQL {
|
||||
linksRequested: Int!
|
||||
}
|
||||
|
||||
enum ClientUploadStatusEnum {
|
||||
UPLOAD_ENABLED
|
||||
UPLOAD_DISABLED
|
||||
}
|
||||
|
||||
type VideoResolutionGQL {
|
||||
width: Int
|
||||
height: Int
|
||||
@ -430,6 +530,7 @@ type VideoTagClass {
|
||||
}
|
||||
|
||||
type HomographyInfoGQL {
|
||||
id: Int!
|
||||
frameIndex: Int!
|
||||
crop: BoundingBoxGQL!
|
||||
pockets: [BoundingBoxGQL!]!
|
||||
@ -459,6 +560,7 @@ type IntPoint2D {
|
||||
}
|
||||
|
||||
type VideoProcessingGQL {
|
||||
id: Int!
|
||||
errors: [VideoProcessingErrorGQL!]!
|
||||
status: ProcessingStatusEnum!
|
||||
statuses: [VideoProcessingStatusGQL!]!
|
||||
@ -489,6 +591,61 @@ type VideoProcessingStatusGQL {
|
||||
updatedAt: DateTime
|
||||
}
|
||||
|
||||
input RunFilterInput {
|
||||
videoId: [Int!]
|
||||
userId: [Int!]
|
||||
username: [String!]
|
||||
andFilters: [RunFilterInput!]
|
||||
orFilters: [RunFilterInput!]
|
||||
notFilter: RunFilterInput
|
||||
tableSize: FloatRangeFilter
|
||||
createdAt: DateRangeFilter
|
||||
runLength: FloatRangeFilter
|
||||
}
|
||||
|
||||
input GetRunsOrdering {
|
||||
orderings: [RunsOrderingComponent!]!
|
||||
}
|
||||
|
||||
input RunsOrderingComponent @oneOf {
|
||||
runLength: IntOrdering
|
||||
videoId: IntOrdering
|
||||
videoCreation: DatetimeOrdering
|
||||
}
|
||||
|
||||
input IntOrdering {
|
||||
descending: Boolean! = true
|
||||
startingAt: Int = null
|
||||
}
|
||||
|
||||
input DatetimeOrdering {
|
||||
descending: Boolean! = true
|
||||
startingAt: DateTime = null
|
||||
}
|
||||
|
||||
type GetShotsResult {
|
||||
shots: [ShotGQL!]!
|
||||
count: Int
|
||||
ids: [Int!]!
|
||||
}
|
||||
|
||||
input GetShotsOrdering {
|
||||
orderings: [ShotsOrderingComponent!]!
|
||||
}
|
||||
|
||||
input ShotsOrderingComponent @oneOf {
|
||||
videoCreation: DatetimeOrdering
|
||||
marginOfError: FloatOrdering
|
||||
videoId: IntOrdering
|
||||
startFrame: IntOrdering
|
||||
runLength: IntOrdering
|
||||
}
|
||||
|
||||
input FloatOrdering {
|
||||
descending: Boolean! = true
|
||||
startingAt: Float = null
|
||||
}
|
||||
|
||||
input GetShotsPagination {
|
||||
createdAfter: CreatedAfter!
|
||||
startFrameAfter: Int!
|
||||
@ -499,10 +656,28 @@ input CreatedAfter @oneOf {
|
||||
createdAt: DateTime
|
||||
}
|
||||
|
||||
type UserRelationshipsResult {
|
||||
inquiringUser: UserGQL!
|
||||
relationships: [UserRelationship!]!
|
||||
}
|
||||
|
||||
type UserRelationship {
|
||||
toUser: UserGQL!
|
||||
toUserFollows: Boolean!
|
||||
toUserIsFollowedBy: Boolean!
|
||||
}
|
||||
|
||||
type UserPlayTimeGQL {
|
||||
totalSeconds: Float!
|
||||
}
|
||||
|
||||
input VideoFilterInput {
|
||||
isStreamCompleted: Boolean = null
|
||||
requireCursorCompletion: Boolean! = true
|
||||
createdAt: DateRangeFilter = null
|
||||
excludeVideosWithNoShots: Boolean = null
|
||||
}
|
||||
|
||||
type VideoHistoryGQL {
|
||||
videos: [VideoGQL!]!
|
||||
pageInfo: PageInfoGQL!
|
||||
@ -513,11 +688,6 @@ type PageInfoGQL {
|
||||
endCursor: String
|
||||
}
|
||||
|
||||
input VideoFilterInput {
|
||||
isStreamCompleted: Boolean = null
|
||||
requireCursorCompletion: Boolean! = true
|
||||
}
|
||||
|
||||
type TagGQL {
|
||||
name: String!
|
||||
id: Int!
|
||||
@ -540,10 +710,18 @@ type Mutation {
|
||||
annotationName: String!
|
||||
notes: String = null
|
||||
): AddShotAnnotationReturn!
|
||||
updateShotAnnotations(
|
||||
shotId: Int!
|
||||
annotations: [UpdateAnnotationInputGQL!]!
|
||||
): UpdateShotAnnotationReturn!
|
||||
getProfileImageUploadLink(
|
||||
fileExt: String = ".png"
|
||||
): GetProfileUploadLinkReturn!
|
||||
editProfileImageUri(profileImageUri: String!): UserGQL!
|
||||
editUser(input: EditUserInputGQL!): UserGQL!
|
||||
followUser(followedUserId: Int!): UserGQL!
|
||||
unfollowUser(followedUserId: Int!): UserGQL!
|
||||
findPrerecordTableLayout(b64Image: String!, videoId: Int!): HomographyInfoGQL
|
||||
createUploadStream(
|
||||
videoMetadata: VideoMetadataInput!
|
||||
): CreateUploadStreamReturn!
|
||||
@ -593,6 +771,16 @@ type OtherErrorNeedsNote {
|
||||
msg: String
|
||||
}
|
||||
|
||||
type UpdateShotAnnotationReturn {
|
||||
shot: ShotGQL
|
||||
error: DoesNotOwnShotErr
|
||||
}
|
||||
|
||||
input UpdateAnnotationInputGQL {
|
||||
name: String!
|
||||
notes: String = null
|
||||
}
|
||||
|
||||
type GetProfileUploadLinkReturn {
|
||||
value: UploadLinkGetProfileUploadLinkErrors!
|
||||
}
|
||||
@ -619,6 +807,12 @@ type TooManyProfileImageUploadsErr {
|
||||
linksRequested: Int!
|
||||
}
|
||||
|
||||
input EditUserInputGQL {
|
||||
username: String = null
|
||||
fargoRating: Int = null
|
||||
videosPrivateByDefault: Boolean = null
|
||||
}
|
||||
|
||||
type CreateUploadStreamReturn {
|
||||
videoId: Int!
|
||||
}
|
||||
@ -629,32 +823,15 @@ input VideoMetadataInput {
|
||||
endTime: DateTime = null
|
||||
gameType: String = null
|
||||
tableSize: Float = null
|
||||
uploadStreamMetadataInput: UploadStreamMetadataInput = null
|
||||
lastIntendedSegmentBound: Int = null
|
||||
streamSegmentType: StreamSegmentTypeEnum = null
|
||||
private: Boolean = null
|
||||
endStream: Boolean! = false
|
||||
clientUploadStatus: ClientUploadStatusEnum = null
|
||||
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!
|
||||
|
Loading…
Reference in New Issue
Block a user