Compare commits

..

No commits in common. "master" and "kat/create-shot-fragment" have entirely different histories.

15 changed files with 806 additions and 4839 deletions

View File

@ -1,7 +1,5 @@
overwrite: true overwrite: true
schema: schema: "src/schema.gql"
- "src/schema.gql"
- "src/client-schema.gql"
documents: "src/**/*.gql" documents: "src/**/*.gql"
generates: generates:
src/index.tsx: src/index.tsx:

View File

@ -12,7 +12,7 @@
"author": "Ivan Malison <IvanMalison@gmail.com>", "author": "Ivan Malison <IvanMalison@gmail.com>",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@apollo/client": "^3.11.10", "@apollo/client": "^3.9.2",
"@graphql-codegen/cli": "^5.0.0", "@graphql-codegen/cli": "^5.0.0",
"@graphql-codegen/typescript": "^4.0.1", "@graphql-codegen/typescript": "^4.0.1",
"@graphql-codegen/typescript-operations": "^4.0.1", "@graphql-codegen/typescript-operations": "^4.0.1",

View File

@ -7,7 +7,7 @@ readme = "README.md"
packages = [{include = "rbproto"}] packages = [{include = "rbproto"}]
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = ">=3.10,<=3.13" python = ">=3.10,<3.12"
protobuf = "^4.25.3" protobuf = "^4.25.3"

View File

@ -1,32 +0,0 @@
# see: https://www.apollographql.com/docs/react/local-state/managing-state-with-field-policies/
directive @client on FIELD
type SegmentInfo {
index: Int!
time: Float!
}
extend type ShotGQL {
startTime: Float!
endTime: Float!
startSegment: SegmentInfo!
endSegment: SegmentInfo!
}
extend type UploadStreamGQL {
segmentEndFrames: [Int!]!
}
extend type HLSPlaylistGQL {
segmentStartTimes: [Float!]!
}
type SegmentEndFramesGQL {
id: Int!
segmentEndFrames: [Int!]!
}
type SegmentStartTimesGQL {
id: Int!
segmentStartTimes: [Float!]!
}

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,3 @@
# DO NOT USE: use getVideoFeed instead
query GetFeed( query GetFeed(
$limit: Int! = 5 $limit: Int! = 5
$after: String = null $after: String = null
@ -6,78 +5,31 @@ query GetFeed(
) { ) {
getUserVideos(limit: $limit, after: $after, filters: $filters) { getUserVideos(limit: $limit, after: $after, filters: $filters) {
videos { videos {
...VideoCardFields id
} owner {
pageInfo { username
hasNextPage }
endCursor
}
}
}
fragment VideoCardFields on VideoGQL {
id
owner {
id
username
profileImageUri
}
name
screenshotUri
totalShotsMade
totalShots
makePercentage
averageTimeBetweenShots
averageDifficulty
createdAt
updatedAt
startTime
endTime
private
elapsedTime
screenshotUri
stream {
id
lastIntendedSegmentBound
isCompleted
}
tableSize
tags {
tagClasses {
name name
} screenshotUri
name totalShotsMade
} totalShots
currentProcessing { makePercentage
id createdAt
errors { updatedAt
message startTime
} endTime
status elapsedTime
statuses { screenshotUri
status stream {
} isCompleted
} }
} tableSize
tags {
query GetVideoFeed( tagClasses {
$limit: Int! = 5 name
$after: String = null }
$filters: VideoFilterInput = null name
$includeCallersVideos: Boolean = null }
$includePrivate: IncludePrivateEnum = MINE
$feedInput: VideoFeedInputGQL = null
) {
getFeedVideos(
limit: $limit
after: $after
filters: $filters
includeCallersVideos: $includeCallersVideos
includePrivate: $includePrivate
feedInput: $feedInput
) {
videos {
...VideoCardFields
} }
pageInfo { pageInfo {
hasNextPage hasNextPage

View File

@ -1,32 +0,0 @@
query GetMakesLeaderboard($interval: TimeInterval, $when: DateTime) {
getMakesLeaderboard(interval: $interval, when: $when) {
entries {
user {
id
username
profileImageUri
}
value
proportionMade
total
}
}
}
query GetRunsLeaderboard($interval: TimeInterval, $when: DateTime) {
getLongestRunsLeaderboard(interval: $interval, when: $when) {
entries {
id
runLength
video {
name
createdAt
}
user {
id
username
profileImageUri
}
}
}
}

View File

@ -1,75 +0,0 @@
fragment MedalFields on MedalGQL {
count
nickname
}
query getMedals($scope: MedalScope!, $userId: Int) {
getMedals(scope: $scope, userId: $userId) {
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
}
totalMakes500 {
...MedalFields
}
totalMakes1000 {
...MedalFields
}
totalMakes5000 {
...MedalFields
}
totalMakes10000 {
...MedalFields
}
dailyMakes50 {
...MedalFields
}
dailyMakes100 {
...MedalFields
}
dailyMakes150 {
...MedalFields
}
dailyMakes200 {
...MedalFields
}
dailyMakes250 {
...MedalFields
}
}
}

View File

@ -1,24 +0,0 @@
query GetRunsForHighlights(
$filterInput: RunFilterInput!
$runIds: [Int!] = null
$runsOrdering: GetRunsOrdering
) {
getRuns(
filterInput: $filterInput
runIds: $runIds
runsOrdering: $runsOrdering
) {
count
runs {
id
runLength
userId
videoId
shots {
videoId
id
}
}
runIds
}
}

View File

@ -1,3 +1,59 @@
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!) { query GetSerializedShotPaths($filterInput: FilterInput!) {
getShots(filterInput: $filterInput) { getShots(filterInput: $filterInput) {
id id
@ -17,118 +73,70 @@ query GetShotAnnotationTypes {
} }
} }
mutation UpdateShotAnnotations(
$shotId: Int!
$annotations: [UpdateAnnotationInputGQL!]!
) {
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
shotsOrdering: $shotsOrdering
limit: $limit
) {
shots {
id
videoId
video {
screenshotUri
endTime
}
}
}
}
query GetShotsWithJustIds(
$filterInput: FilterInput!
$shotsOrdering: GetShotsOrdering
$limit: Int
$countRespectsLimit: Boolean
) {
getOrderedShots(
filterInput: $filterInput
shotsOrdering: $shotsOrdering
limit: $limit
countRespectsLimit: $countRespectsLimit
) {
count
shots {
id
videoId
}
}
}
## 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
}
ids
}
}
# TODO: Delete
query GetShotsWithMetadata( query GetShotsWithMetadata(
$filterInput: FilterInput! $filterInput: FilterInput!
$shotsPagination: GetShotsPagination $shotsPagination: GetShotsPagination
$limit: Int $limit: Int
$ids: [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
) { ) {
getShotsWithMetadata( getShotsWithMetadata(
filterInput: $filterInput filterInput: $filterInput
shotsPagination: $shotsPagination shotsPagination: $shotsPagination
limit: $limit limit: $limit
ids: $ids
) { ) {
count count
shots { shots {
...ShotWithAllFeatures 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
}
} }
ids
}
}
query GetShotsByIds($ids: [Int!]!) {
getShotsByIds(ids: $ids) {
...ShotWithAllFeatures
} }
} }
@ -137,22 +145,21 @@ fragment ShotWithAllFeatures on ShotGQL {
videoId videoId
startFrame startFrame
endFrame endFrame
startTime @client
endTime @client
startSegment @client {
index
time
}
endSegment @client {
index
time
}
user {
id
}
falsePositiveScore falsePositiveScore
createdAt createdAt
updatedAt updatedAt
user {
id
}
video {
id
stream {
resolution {
width
height
}
}
}
cueObjectFeatures { cueObjectFeatures {
cueObjectDistance cueObjectDistance
cueObjectAngle cueObjectAngle
@ -161,40 +168,14 @@ fragment ShotWithAllFeatures on ShotGQL {
spinType spinType
} }
pocketingIntentionFeatures { pocketingIntentionFeatures {
make
targetPocketDistance targetPocketDistance
targetPocketAngle make
targetPocketAngleDirection
marginOfErrorInDegrees
intendedPocketType intendedPocketType
difficulty
}
pocketingIntentionInfo {
ballId
pocketId
pathMetadataIndex
}
serializedShotPaths {
b64EncodedBuffer
}
annotations {
shotId
type {
id
name
}
notes
} }
} }
mutation EditShot($shotId: Int!, $fieldsToEdit: EditableShotFieldInputGQL!) { query GetShotsByIds($ids: [Int!]!) {
editShot(shotId: $shotId, fieldsToEdit: $fieldsToEdit) { getShotsByIds(ids: $ids) {
error { ...ShotWithAllFeatures
shotId
msg
}
shot {
...ShotWithAllFeatures
}
} }
} }

View File

@ -21,24 +21,30 @@ mutation getProfileImageUploadLink($fileExt: String = ".png") {
mutation editProfileImageUri($profileImageUri: String!) { mutation editProfileImageUri($profileImageUri: String!) {
editProfileImageUri(profileImageUri: $profileImageUri) { editProfileImageUri(profileImageUri: $profileImageUri) {
...UserFragment id
firebaseUid
username
profileImageUri
createdAt
updatedAt
} }
} }
query getLoggedInUser { query getLoggedInUser {
getLoggedInUser { getLoggedInUser {
...UserFragment id
firebaseUid
username
isAdmin
profileImageUri
activeVideoId
createdAt
updatedAt
} }
} }
query GetUser($userId: Int!) { query GetUserPlayTime($userId: Int!) {
getUser(userId: $userId) { getPlayTime(userId: $userId) {
...UserFragment
}
}
query GetUserPlayTime($userId: Int!, $filters: VideoFilterInput) {
getPlayTime(userId: $userId, filters: $filters) {
totalSeconds totalSeconds
} }
} }
@ -51,121 +57,9 @@ query getUsernames(
getUsernames(matchString: $matchString, limit: $limit, after: $after) 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
profileImageUri
id
}
toUserFollows
toUserIsFollowedBy
}
}
}
query GetUserTags { query GetUserTags {
getUserTags { getUserTags {
id id
name name
tagClasses {
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
profileImageUri
}
followers {
id
username
profileImageUri
}
}
}
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
}
}
fragment UserFragment on UserGQL {
id
firebaseUid
username
isAdmin
profileImageUri
fargoRating
activeVideoId
createdAt
updatedAt
videosPrivateByDefault
}

View File

@ -5,10 +5,46 @@ query GetStreamMonitoringDetails($videoId: Int!, $debuggingJson: JSON) {
makePercentage makePercentage
elapsedTime elapsedTime
currentHomography { currentHomography {
...HomographyInfo 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
}
}
} }
stream { stream {
id
linksRequested linksRequested
uploadsCompleted uploadsCompleted
segmentProcessingCursor segmentProcessingCursor
@ -18,7 +54,6 @@ query GetStreamMonitoringDetails($videoId: Int!, $debuggingJson: JSON) {
initPlaylistUploadStatus initPlaylistUploadStatus
} }
currentProcessing { currentProcessing {
id
errors { errors {
message message
startSegmentIndex startSegmentIndex
@ -36,7 +71,6 @@ query GetVideoUpdatePageDetails($videoId: Int!) {
makePercentage makePercentage
elapsedTime elapsedTime
tableSize tableSize
private
tags { tags {
tagClasses { tagClasses {
name name
@ -66,7 +100,6 @@ query GetVideoDetails($videoId: Int!) {
createdAt createdAt
updatedAt updatedAt
tableSize tableSize
private
owner { owner {
id id
firebaseUid firebaseUid
@ -84,32 +117,22 @@ query GetVideoDetails($videoId: Int!) {
query GetVideos($videoIds: [Int!]!) { query GetVideos($videoIds: [Int!]!) {
getVideos(videoIds: $videoIds) { getVideos(videoIds: $videoIds) {
...VideoStreamMetadata
}
}
fragment VideoStreamMetadata on VideoGQL {
id
framesPerSecond
stream {
id id
streamSegmentType framesPerSecond
segments { stream {
uploaded id
valid streamSegmentType
segmentIndex segments {
endFrameIndex uploaded
framesPerSecond valid
segmentIndex
endFrameIndex
framesPerSecond
}
}
playlist {
segmentDurations
} }
}
playlist {
segmentDurations
}
}
query GetVideoForShotTime($videoId: Int!) {
getVideo(videoId: $videoId) {
...VideoStreamMetadata
} }
} }
@ -120,10 +143,47 @@ query GetVideo($videoId: Int!) {
segmentDurations segmentDurations
} }
homographyHistory { homographyHistory {
...HomographyInfo frameIndex
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
}
}
} }
stream { stream {
id
streamSegmentType streamSegmentType
segments { segments {
segmentIndex segmentIndex
@ -144,14 +204,12 @@ query GetAverageTimePerShotForVideo($videoId: Int!) {
averageTimeBetweenShots averageTimeBetweenShots
} }
} }
query GetElapsedTimeForVideo($videoId: Int!) { query GetElapsedTimeForVideo($videoId: Int!) {
getVideo(videoId: $videoId) { getVideo(videoId: $videoId) {
id id
elapsedTime elapsedTime
} }
} }
query GetMedianRunForVideo($videoId: Int!) { query GetMedianRunForVideo($videoId: Int!) {
getVideo(videoId: $videoId) { getVideo(videoId: $videoId) {
id id
@ -159,126 +217,23 @@ query GetMedianRunForVideo($videoId: Int!) {
} }
} }
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!) { query GetVideoForClipTimes($videoId: Int!) {
getVideo(videoId: $videoId) {
...VideoDurationData
}
}
query GetHeaderInfoByVideoId($videoId: Int!) {
getVideo(videoId: $videoId) { getVideo(videoId: $videoId) {
id id
name framesPerSecond
startTime playlist {
} segmentDurations
} }
query GetBannerInfoByVideoId($videoId: Int!) {
getVideo(videoId: $videoId) {
id
name
stream { stream {
id id
lastIntendedSegmentBound streamSegmentType
} segments {
owner { uploaded
id valid
} segmentIndex
currentProcessing { endFrameIndex
id framesPerSecond
status }
}
}
}
mutation FindPrerecordTableLayout($b64Image: String!, $videoId: Int!) {
findPrerecordTableLayout(b64Image: $b64Image, videoId: $videoId) {
...HomographyInfo
}
}
fragment HomographyInfo on HomographyInfoGQL {
id
frameIndex
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
} }
} }
} }

View File

@ -101,19 +101,6 @@ query GetUploadStreams(
} }
} }
} }
fragment UploadStreamWithDetails on VideoGQL {
id
name
startTime
stream {
isCompleted
lastIntendedSegmentBound
uploadCompletionCursor
uploadsCompleted
}
}
query GetUploadStreamsWithDetails( query GetUploadStreamsWithDetails(
$limit: Int! = 5 $limit: Int! = 5
$after: String = null $after: String = null
@ -121,7 +108,15 @@ query GetUploadStreamsWithDetails(
) { ) {
getUserVideos(limit: $limit, after: $after, filters: $filters) { getUserVideos(limit: $limit, after: $after, filters: $filters) {
videos { videos {
...UploadStreamWithDetails id
name
startTime
stream {
isCompleted
lastIntendedSegmentBound
uploadCompletionCursor
uploadsCompleted
}
} }
pageInfo { pageInfo {
hasNextPage hasNextPage

View File

@ -9,51 +9,26 @@ type Query {
videoId: ID! videoId: ID!
intervalDuration: Int! = 300 intervalDuration: Int! = 300
): [MakePercentageIntervalGQL!]! ): [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( getShotsWithMetadata(
filterInput: FilterInput! filterInput: FilterInput!
ids: [Int!] = null
shotsPagination: GetShotsPagination = null shotsPagination: GetShotsPagination = null
limit: Int! = 500 limit: Int! = 500
countRespectsLimit: Boolean! = false
): GetShotsResult! ): GetShotsResult!
getShots( getShots(
filterInput: FilterInput! filterInput: FilterInput!
shotsPagination: GetShotsPagination = null shotsPagination: GetShotsPagination = null
limit: Int! = 500 limit: Int! = 500
countRespectsLimit: Boolean! = false
): [ShotGQL!]! ): [ShotGQL!]!
getShotsByIds(ids: [Int!]!): [ShotGQL!]! getShotsByIds(ids: [Int!]!): [ShotGQL!]!
getShotAnnotationTypes(errorTypes: Boolean = false): [ShotAnnotationTypeGQL!]! getShotAnnotationTypes(errorTypes: Boolean = false): [ShotAnnotationTypeGQL!]!
getUser(userId: Int!): UserGQL getUser(userId: Int!): UserGQL
doesUsernameExist(candidateUsername: String!): Boolean!
getLoggedInUser: UserGQL getLoggedInUser: UserGQL
getUsernames( getUsernames(
matchString: String = null matchString: String = null
limit: Int = null limit: Int = null
after: String = null after: String = null
): [String!]! ): [String!]!
getUserRelationshipsMatching( getPlayTime(userId: Int!): UserPlayTimeGQL!
userId: Int!
matchString: String = null
limit: Int = 100
after: String = null
): UserRelationshipsResult!
getPlayTime(userId: Int!, filters: VideoFilterInput = null): UserPlayTimeGQL!
getUserVideos( getUserVideos(
userId: Int = null userId: Int = null
limit: Int! = 5 limit: Int! = 5
@ -63,24 +38,6 @@ type Query {
getUserTags: [TagGQL!]! getUserTags: [TagGQL!]!
getVideo(videoId: Int!, debuggingJson: JSON = null): VideoGQL! getVideo(videoId: Int!, debuggingJson: JSON = null): VideoGQL!
getVideos(videoIds: [Int!]!): [VideoGQL!]! getVideos(videoIds: [Int!]!): [VideoGQL!]!
getFeedVideos(
limit: Int! = 5
after: String = null
includePrivate: IncludePrivateEnum! = MINE
includeCallersVideos: Boolean = true
filters: VideoFilterInput = null
feedInput: VideoFeedInputGQL = null
): VideoHistoryGQL!
getLongestRunsLeaderboard(
interval: TimeInterval = null
when: DateTime = null
limit: Int! = 100
requiredTags: [String!] = null
): RunLeaderboardGQL!
getMakesLeaderboard(
interval: TimeInterval = null
when: DateTime = null
): CountLeaderboardGQL!
} }
type AggregateResultGQL { type AggregateResultGQL {
@ -167,7 +124,6 @@ enum AlignedIntervalEnum {
MONTH MONTH
YEAR YEAR
WEEK WEEK
DAY
} }
input FilterInput @oneOf { input FilterInput @oneOf {
@ -183,9 +139,6 @@ input FilterInput @oneOf {
shotDirection: [ShotDirectionEnum!] shotDirection: [ShotDirectionEnum!]
videoId: [Int!] videoId: [Int!]
userId: [Int!] userId: [Int!]
runId: [Int!]
username: [String!]
fargoRating: FloatRangeFilter
make: [Boolean!] make: [Boolean!]
tags: [VideoTagInput!] tags: [VideoTagInput!]
annotations: [ShotAnnotationInput!] annotations: [ShotAnnotationInput!]
@ -208,10 +161,7 @@ input FilterInput @oneOf {
targetPocketAngleDirection: [ShotDirectionEnum!] targetPocketAngleDirection: [ShotDirectionEnum!]
targetPocketAngle: FloatRangeFilter targetPocketAngle: FloatRangeFilter
missAngleInDegrees: FloatRangeFilter missAngleInDegrees: FloatRangeFilter
marginOfErrorInDegrees: FloatRangeFilter
createdAt: DateRangeFilter createdAt: DateRangeFilter
totalDistance: FloatRangeFilter
runLength: FloatRangeFilter
} }
input FloatRangeFilter { input FloatRangeFilter {
@ -292,65 +242,10 @@ type MakePercentageIntervalGQL {
elapsedTime: Float! elapsedTime: Float!
} }
type RequestedMedalsGQL { type GetShotsResult {
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
@deprecated(reason: "NO LONGER SUPPORTED, USE DATETIME_RANGE")
datetimeRange: DatetimeRangeAggregationInput
}
type GetRunsResult {
runs: [RunGQL!]!
count: Int
runIds: [Int!]!
}
type RunGQL {
id: Int!
runLength: Int!
videoId: Int!
userId: Int!
shots: [ShotGQL!]! shots: [ShotGQL!]!
video: VideoGQL! count: Int
user: UserGQL! ids: [Int!]!
} }
type ShotGQL { type ShotGQL {
@ -369,8 +264,6 @@ type ShotGQL {
annotations: [ShotAnnotationGQL!]! annotations: [ShotAnnotationGQL!]!
falsePositiveScore: Float falsePositiveScore: Float
video: VideoGQL video: VideoGQL
run: RunGQL
runFeatures: RunFeaturesGQL
} }
type CueObjectFeaturesGQL { type CueObjectFeaturesGQL {
@ -388,7 +281,6 @@ type PocketingIntentionFeaturesGQL {
difficulty: Float difficulty: Float
targetPocketAngle: Float targetPocketAngle: Float
targetPocketAngleDirection: ShotDirectionEnum targetPocketAngleDirection: ShotDirectionEnum
marginOfErrorInDegrees: Float
backcut: Boolean backcut: Boolean
} }
@ -424,17 +316,13 @@ type SerializedShotPathsGQL {
type UserGQL { type UserGQL {
id: Int! id: Int!
firebaseUid: String firebaseUid: String!
username: String! username: String!
isAdmin: Boolean isAdmin: Boolean!
fargoRating: Int
activeVideoId: Int activeVideoId: Int
profileImageUri: String profileImageUri: String
createdAt: DateTime createdAt: DateTime
updatedAt: DateTime updatedAt: DateTime
videosPrivateByDefault: Boolean
following: [UserGQL!]
followers: [UserGQL!]
} }
type ShotAnnotationGQL { type ShotAnnotationGQL {
@ -462,7 +350,6 @@ type VideoGQL {
makePercentage: Float! makePercentage: Float!
medianRun: Float medianRun: Float
averageTimeBetweenShots: Float averageTimeBetweenShots: Float
averageDifficulty: Float
createdAt: DateTime createdAt: DateTime
updatedAt: DateTime updatedAt: DateTime
shots: [ShotGQL!]! shots: [ShotGQL!]!
@ -471,7 +358,6 @@ type VideoGQL {
elapsedTime: Float elapsedTime: Float
framesPerSecond: Float! framesPerSecond: Float!
tableSize: Float! tableSize: Float!
private: Boolean!
stream: UploadStreamGQL stream: UploadStreamGQL
playlist: HLSPlaylistGQL playlist: HLSPlaylistGQL
tags: [VideoTag!]! tags: [VideoTag!]!
@ -494,7 +380,6 @@ type UploadStreamGQL {
createdAt: DateTime! createdAt: DateTime!
updatedAt: DateTime! updatedAt: DateTime!
segments: [UploadSegmentGQL!]! segments: [UploadSegmentGQL!]!
clientUploadStatus: ClientUploadStatusEnum
resolution: VideoResolutionGQL! resolution: VideoResolutionGQL!
streamSegmentType: StreamSegmentTypeEnum! streamSegmentType: StreamSegmentTypeEnum!
} }
@ -519,11 +404,6 @@ type UploadSegmentGQL {
linksRequested: Int! linksRequested: Int!
} }
enum ClientUploadStatusEnum {
UPLOAD_ENABLED
UPLOAD_DISABLED
}
type VideoResolutionGQL { type VideoResolutionGQL {
width: Int width: Int
height: Int height: Int
@ -550,7 +430,6 @@ type VideoTagClass {
} }
type HomographyInfoGQL { type HomographyInfoGQL {
id: Int!
frameIndex: Int! frameIndex: Int!
crop: BoundingBoxGQL! crop: BoundingBoxGQL!
pockets: [BoundingBoxGQL!]! pockets: [BoundingBoxGQL!]!
@ -580,7 +459,6 @@ type IntPoint2D {
} }
type VideoProcessingGQL { type VideoProcessingGQL {
id: Int!
errors: [VideoProcessingErrorGQL!]! errors: [VideoProcessingErrorGQL!]!
status: ProcessingStatusEnum! status: ProcessingStatusEnum!
statuses: [VideoProcessingStatusGQL!]! statuses: [VideoProcessingStatusGQL!]!
@ -611,67 +489,6 @@ type VideoProcessingStatusGQL {
updatedAt: DateTime updatedAt: DateTime
} }
type RunFeaturesGQL {
runId: Int!
indexInRun: Int!
}
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
difficulty: FloatOrdering
videoId: IntOrdering
startFrame: IntOrdering
runLength: IntOrdering
}
input FloatOrdering {
descending: Boolean! = true
startingAt: Float = null
}
input GetShotsPagination { input GetShotsPagination {
createdAfter: CreatedAfter! createdAfter: CreatedAfter!
startFrameAfter: Int! startFrameAfter: Int!
@ -682,28 +499,10 @@ input CreatedAfter @oneOf {
createdAt: DateTime createdAt: DateTime
} }
type UserRelationshipsResult {
inquiringUser: UserGQL!
relationships: [UserRelationship!]!
}
type UserRelationship {
toUser: UserGQL!
toUserFollows: Boolean!
toUserIsFollowedBy: Boolean!
}
type UserPlayTimeGQL { type UserPlayTimeGQL {
totalSeconds: Float! totalSeconds: Float!
} }
input VideoFilterInput {
isStreamCompleted: Boolean = null
requireCursorCompletion: Boolean! = true
createdAt: DateRangeFilter = null
excludeVideosWithNoShots: Boolean = null
}
type VideoHistoryGQL { type VideoHistoryGQL {
videos: [VideoGQL!]! videos: [VideoGQL!]!
pageInfo: PageInfoGQL! pageInfo: PageInfoGQL!
@ -714,15 +513,15 @@ type PageInfoGQL {
endCursor: String endCursor: String
} }
type TagGQL { input VideoFilterInput {
id: Int! isStreamCompleted: Boolean = null
name: String! requireCursorCompletion: Boolean! = true
tagClasses: [TagClassGQL!]
} }
type TagClassGQL { type TagGQL {
id: Int!
name: String! name: String!
id: Int!
group: String
} }
""" """
@ -733,58 +532,18 @@ scalar JSON
url: "https://ecma-international.org/wp-content/uploads/ECMA-404_2nd_edition_december_2017.pdf" url: "https://ecma-international.org/wp-content/uploads/ECMA-404_2nd_edition_december_2017.pdf"
) )
enum IncludePrivateEnum {
ALL
MINE
NONE
}
input VideoFeedInputGQL @oneOf {
followedByUserId: Int
userId: Int
allUsers: Boolean
}
type RunLeaderboardGQL {
entries: [RunGQL!]!
}
type CountLeaderboardGQL {
entries: [UserShotCountEntry!]!
}
type UserShotCountEntry {
user: UserGQL!
value: Int!
total: Int!
proportionMade: Float!
videos: Int!
}
type Mutation { type Mutation {
createBucketSet(params: CreateBucketSetInput!): BucketSetGQL! createBucketSet(params: CreateBucketSetInput!): BucketSetGQL!
setLoggerLevel(path: String!, level: String!): Boolean! setLoggerLevel(path: String!, level: String!): Boolean!
editShot(
shotId: Int!
fieldsToEdit: EditableShotFieldInputGQL!
): EditShotReturn!
addAnnotationToShot( addAnnotationToShot(
shotId: Int! shotId: Int!
annotationName: String! annotationName: String!
notes: String = null notes: String = null
): AddShotAnnotationReturn! ): AddShotAnnotationReturn!
updateShotAnnotations(
shotId: Int!
annotations: [UpdateAnnotationInputGQL!]!
): UpdateShotAnnotationReturn!
getProfileImageUploadLink( getProfileImageUploadLink(
fileExt: String = ".png" fileExt: String = ".png"
): GetProfileUploadLinkReturn! ): GetProfileUploadLinkReturn!
editProfileImageUri(profileImageUri: String!): UserGQL! editProfileImageUri(profileImageUri: String!): UserGQL!
editUser(input: EditUserInputGQL!): UserGQL!
followUser(followedUserId: Int!): UserGQL!
unfollowUser(followedUserId: Int!): UserGQL!
findPrerecordTableLayout(b64Image: String!, videoId: Int!): HomographyInfoGQL
createUploadStream( createUploadStream(
videoMetadata: VideoMetadataInput! videoMetadata: VideoMetadataInput!
): CreateUploadStreamReturn! ): CreateUploadStreamReturn!
@ -805,27 +564,6 @@ input CreateBucketSetInput {
buckets: [BucketInputGQL!]! buckets: [BucketInputGQL!]!
} }
type EditShotReturn {
shot: ShotGQL
error: DoesNotOwnShotErr
}
type DoesNotOwnShotErr {
shotId: Int!
msg: String
}
input EditableShotFieldInputGQL {
intendedPocketType: PocketEnum
shotDirection: ShotDirectionEnum
spinType: SpinTypeEnum
targetPocketAngleDirection: ShotDirectionEnum
make: Boolean
backcut: Boolean
excludeFromStats: Boolean
notes: String
}
type AddShotAnnotationReturn { type AddShotAnnotationReturn {
value: SuccessfulAddAddShotAnnotationErrors! value: SuccessfulAddAddShotAnnotationErrors!
} }
@ -846,18 +584,13 @@ union DoesNotOwnShotErrOtherErrorNeedsNote =
DoesNotOwnShotErr DoesNotOwnShotErr
| OtherErrorNeedsNote | OtherErrorNeedsNote
type OtherErrorNeedsNote { type DoesNotOwnShotErr {
shotId: Int!
msg: String msg: String
} }
type UpdateShotAnnotationReturn { type OtherErrorNeedsNote {
shot: ShotGQL msg: String
error: DoesNotOwnShotErr
}
input UpdateAnnotationInputGQL {
name: String!
notes: String = null
} }
type GetProfileUploadLinkReturn { type GetProfileUploadLinkReturn {
@ -886,12 +619,6 @@ type TooManyProfileImageUploadsErr {
linksRequested: Int! linksRequested: Int!
} }
input EditUserInputGQL {
username: String = null
fargoRating: Int = null
videosPrivateByDefault: Boolean = null
}
type CreateUploadStreamReturn { type CreateUploadStreamReturn {
videoId: Int! videoId: Int!
} }
@ -901,22 +628,33 @@ input VideoMetadataInput {
startTime: DateTime = null startTime: DateTime = null
endTime: DateTime = null endTime: DateTime = null
gameType: String = null gameType: String = null
@deprecated(reason: "`game_type` is deprecated. Use `tags` instead.")
"""
A list of tags associated with the video. Replace `game_type`
"""
tags: [VideoTagInput!] = null
tableSize: Float = null tableSize: Float = null
uploadStreamMetadataInput: UploadStreamMetadataInput = null
lastIntendedSegmentBound: Int = null lastIntendedSegmentBound: Int = null
streamSegmentType: StreamSegmentTypeEnum = null streamSegmentType: StreamSegmentTypeEnum = null
private: Boolean = null
endStream: Boolean! = false endStream: Boolean! = false
clientUploadStatus: ClientUploadStatusEnum = null
resolution: VideoResolution = null resolution: VideoResolution = null
framesPerSecond: Float = 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 { input VideoResolution {
width: Int! width: Int!
height: Int! height: Int!

View File

@ -10,10 +10,10 @@
"@jridgewell/gen-mapping" "^0.3.0" "@jridgewell/gen-mapping" "^0.3.0"
"@jridgewell/trace-mapping" "^0.3.9" "@jridgewell/trace-mapping" "^0.3.9"
"@apollo/client@^3.11.10": "@apollo/client@^3.9.2":
version "3.12.3" version "3.9.2"
resolved "https://registry.yarnpkg.com/@apollo/client/-/client-3.12.3.tgz#0d252749baad8328e06883fe118dc7e73e3bbb1f" resolved "https://registry.yarnpkg.com/@apollo/client/-/client-3.9.2.tgz#96edf2c212f828bad1ef3d84234fa473c5a27ff8"
integrity sha512-KZ5zymRdb8bMbGUb1wP2U04ff7qIGgaC1BCdCVC+IPFiXkxEhHBc5fDEQOwAUT+vUo9KbBh3g7QK/JCOswn59w== integrity sha512-Zw9WvXjqhpbgkvAvnj52vstOWwM0iedKWtn1hSq1cODQyoe1CF2uFwMYFI7l56BrAY9CzLi6MQA0AhxpgJgvxw==
dependencies: dependencies:
"@graphql-typed-document-node/core" "^3.1.1" "@graphql-typed-document-node/core" "^3.1.1"
"@wry/caches" "^1.0.0" "@wry/caches" "^1.0.0"
@ -23,7 +23,7 @@
hoist-non-react-statics "^3.3.2" hoist-non-react-statics "^3.3.2"
optimism "^0.18.0" optimism "^0.18.0"
prop-types "^15.7.2" prop-types "^15.7.2"
rehackt "^0.1.0" rehackt "0.0.3"
response-iterator "^0.2.6" response-iterator "^0.2.6"
symbol-observable "^4.0.0" symbol-observable "^4.0.0"
ts-invariant "^0.10.3" ts-invariant "^0.10.3"
@ -2633,10 +2633,10 @@ regenerator-runtime@^0.14.0:
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f"
integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw== integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==
rehackt@^0.1.0: rehackt@0.0.3:
version "0.1.0" version "0.0.3"
resolved "https://registry.yarnpkg.com/rehackt/-/rehackt-0.1.0.tgz#a7c5e289c87345f70da8728a7eb878e5d03c696b" resolved "https://registry.yarnpkg.com/rehackt/-/rehackt-0.0.3.tgz#1ea454620d4641db8342e2db44595cf0e7ac6aa0"
integrity sha512-7kRDOuLHB87D/JESKxQoRwv4DzbIdwkAGQ7p6QKGdVlY1IZheUnVhlk/4UZlNUVxdAXpyxikE3URsG067ybVzw== integrity sha512-aBRHudKhOWwsTvCbSoinzq+Lej/7R8e8UoPvLZo5HirZIIBLGAgdG7SL9QpdcBoQ7+3QYPi3lRLknAzXBlhZ7g==
relay-runtime@12.0.0: relay-runtime@12.0.0:
version "12.0.0" version "12.0.0"