Compare commits
	
		
			122 Commits
		
	
	
		
			14863e3357
			...
			loewy/incl
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| b34bce6e5f | |||
| 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 | 
| @@ -1,5 +1,7 @@ | |||||||
| overwrite: true | overwrite: true | ||||||
| schema: "src/schema.gql" | schema: | ||||||
|  |   - "src/schema.gql" | ||||||
|  |   - "src/client-schema.gql" | ||||||
| documents: "src/**/*.gql" | documents: "src/**/*.gql" | ||||||
| generates: | generates: | ||||||
|   src/index.tsx: |   src/index.tsx: | ||||||
|   | |||||||
| @@ -7,7 +7,7 @@ readme = "README.md" | |||||||
| packages = [{include = "rbproto"}] | packages = [{include = "rbproto"}] | ||||||
|  |  | ||||||
| [tool.poetry.dependencies] | [tool.poetry.dependencies] | ||||||
| python = ">=3.10,<3.12" | python = ">=3.10,<=3.13" | ||||||
| protobuf = "^4.25.3" | 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!]! | ||||||
|  | } | ||||||
							
								
								
									
										2562
									
								
								src/index.tsx
									
									
									
									
									
								
							
							
						
						
									
										2562
									
								
								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( | query GetFeed( | ||||||
|   $limit: Int! = 5 |   $limit: Int! = 5 | ||||||
|   $after: String = null |   $after: String = null | ||||||
| @@ -21,6 +22,7 @@ query GetFeed( | |||||||
|       elapsedTime |       elapsedTime | ||||||
|       screenshotUri |       screenshotUri | ||||||
|       stream { |       stream { | ||||||
|  |         id | ||||||
|         isCompleted |         isCompleted | ||||||
|       } |       } | ||||||
|       tableSize |       tableSize | ||||||
| @@ -37,3 +39,60 @@ query GetFeed( | |||||||
|     } |     } | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  |  | ||||||
|  | fragment VideoCardFields on VideoGQL { | ||||||
|  |   id | ||||||
|  |   owner { | ||||||
|  |     id | ||||||
|  |     username | ||||||
|  |     profileImageUri | ||||||
|  |   } | ||||||
|  |   name | ||||||
|  |   screenshotUri | ||||||
|  |   totalShotsMade | ||||||
|  |   totalShots | ||||||
|  |   makePercentage | ||||||
|  |   createdAt | ||||||
|  |   updatedAt | ||||||
|  |   startTime | ||||||
|  |   endTime | ||||||
|  |   elapsedTime | ||||||
|  |   screenshotUri | ||||||
|  |   stream { | ||||||
|  |     id | ||||||
|  |     isCompleted | ||||||
|  |   } | ||||||
|  |   tableSize | ||||||
|  |   tags { | ||||||
|  |     tagClasses { | ||||||
|  |       name | ||||||
|  |     } | ||||||
|  |     name | ||||||
|  |   } | ||||||
|  |   currentProcessing { | ||||||
|  |     id | ||||||
|  |     errors { | ||||||
|  |       message | ||||||
|  |     } | ||||||
|  |     status | ||||||
|  |     statuses { | ||||||
|  |       status | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | } | ||||||
|  |  | ||||||
|  | query GetVideoFeed( | ||||||
|  |   $limit: Int! = 5 | ||||||
|  |   $after: String = null | ||||||
|  |   $filters: VideoFilterInput = null | ||||||
|  | ) { | ||||||
|  |   getFeedVideos(limit: $limit, after: $after, filters: $filters) { | ||||||
|  |     videos { | ||||||
|  |       ...VideoCardFields | ||||||
|  |     } | ||||||
|  |     pageInfo { | ||||||
|  |       hasNextPage | ||||||
|  |       endCursor | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | } | ||||||
|   | |||||||
| @@ -17,6 +17,92 @@ 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 | ||||||
|  | ) { | ||||||
|  |   getOrderedShots( | ||||||
|  |     filterInput: $filterInput | ||||||
|  |     shotsOrdering: $shotsOrdering | ||||||
|  |     limit: $limit | ||||||
|  |   ) { | ||||||
|  |     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 | ||||||
| @@ -48,18 +134,12 @@ fragment ShotWithAllFeatures on ShotGQL { | |||||||
|   videoId |   videoId | ||||||
|   startFrame |   startFrame | ||||||
|   endFrame |   endFrame | ||||||
|  |   startTime @client | ||||||
|  |   endTime @client | ||||||
|   user { |   user { | ||||||
|     id |     id | ||||||
|   } |   } | ||||||
|   falsePositiveScore |   falsePositiveScore | ||||||
|   video { |  | ||||||
|     stream { |  | ||||||
|       resolution { |  | ||||||
|         width |  | ||||||
|         height |  | ||||||
|       } |  | ||||||
|     } |  | ||||||
|   } |  | ||||||
|   createdAt |   createdAt | ||||||
|   updatedAt |   updatedAt | ||||||
|   cueObjectFeatures { |   cueObjectFeatures { | ||||||
| @@ -70,8 +150,11 @@ fragment ShotWithAllFeatures on ShotGQL { | |||||||
|     spinType |     spinType | ||||||
|   } |   } | ||||||
|   pocketingIntentionFeatures { |   pocketingIntentionFeatures { | ||||||
|     targetPocketDistance |  | ||||||
|     make |     make | ||||||
|  |     targetPocketDistance | ||||||
|  |     targetPocketAngle | ||||||
|  |     targetPocketAngleDirection | ||||||
|  |     marginOfErrorInDegrees | ||||||
|     intendedPocketType |     intendedPocketType | ||||||
|   } |   } | ||||||
|   pocketingIntentionInfo { |   pocketingIntentionInfo { | ||||||
| @@ -82,4 +165,12 @@ fragment ShotWithAllFeatures on ShotGQL { | |||||||
|   serializedShotPaths { |   serializedShotPaths { | ||||||
|     b64EncodedBuffer |     b64EncodedBuffer | ||||||
|   } |   } | ||||||
|  |   annotations { | ||||||
|  |     shotId | ||||||
|  |     type { | ||||||
|  |       id | ||||||
|  |       name | ||||||
|  |     } | ||||||
|  |     notes | ||||||
|  |   } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -37,6 +37,7 @@ query getLoggedInUser { | |||||||
|     username |     username | ||||||
|     isAdmin |     isAdmin | ||||||
|     profileImageUri |     profileImageUri | ||||||
|  |     fargoRating | ||||||
|     activeVideoId |     activeVideoId | ||||||
|     createdAt |     createdAt | ||||||
|     updatedAt |     updatedAt | ||||||
| @@ -57,9 +58,80 @@ 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 | ||||||
|  |         id | ||||||
|  |       } | ||||||
|  |       toUserFollows | ||||||
|  |       toUserIsFollowedBy | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  | } | ||||||
|  |  | ||||||
| query GetUserTags { | query GetUserTags { | ||||||
|   getUserTags { |   getUserTags { | ||||||
|     id |     id | ||||||
|     name |     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) | ||||||
|  | } | ||||||
|   | |||||||
| @@ -5,46 +5,10 @@ query GetStreamMonitoringDetails($videoId: Int!, $debuggingJson: JSON) { | |||||||
|     makePercentage |     makePercentage | ||||||
|     elapsedTime |     elapsedTime | ||||||
|     currentHomography { |     currentHomography { | ||||||
|       crop { |       ...HomographyInfo | ||||||
|         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 | ||||||
| @@ -117,6 +81,11 @@ query GetVideoDetails($videoId: Int!) { | |||||||
|  |  | ||||||
| query GetVideos($videoIds: [Int!]!) { | query GetVideos($videoIds: [Int!]!) { | ||||||
|   getVideos(videoIds: $videoIds) { |   getVideos(videoIds: $videoIds) { | ||||||
|  |     ...VideoStreamMetadata | ||||||
|  |   } | ||||||
|  | } | ||||||
|  |  | ||||||
|  | fragment VideoStreamMetadata on VideoGQL { | ||||||
|   id |   id | ||||||
|   framesPerSecond |   framesPerSecond | ||||||
|   stream { |   stream { | ||||||
| @@ -134,6 +103,11 @@ query GetVideos($videoIds: [Int!]!) { | |||||||
|     segmentDurations |     segmentDurations | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  |  | ||||||
|  | query GetVideoForShotTime($videoId: Int!) { | ||||||
|  |   getVideo(videoId: $videoId) { | ||||||
|  |     ...VideoStreamMetadata | ||||||
|  |   } | ||||||
| } | } | ||||||
|  |  | ||||||
| query GetVideo($videoId: Int!) { | query GetVideo($videoId: Int!) { | ||||||
| @@ -143,6 +117,111 @@ query GetVideo($videoId: Int!) { | |||||||
|       segmentDurations |       segmentDurations | ||||||
|     } |     } | ||||||
|     homographyHistory { |     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 |   frameIndex | ||||||
|   crop { |   crop { | ||||||
|     left |     left | ||||||
| @@ -183,57 +262,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 |  | ||||||
|       } |  | ||||||
|     } |  | ||||||
|   } |  | ||||||
| } |  | ||||||
|   | |||||||
							
								
								
									
										168
									
								
								src/schema.gql
									
									
									
									
									
								
							
							
						
						
									
										168
									
								
								src/schema.gql
									
									
									
									
									
								
							| @@ -9,26 +9,43 @@ type Query { | |||||||
|     videoId: ID! |     videoId: ID! | ||||||
|     intervalDuration: Int! = 300 |     intervalDuration: Int! = 300 | ||||||
|   ): [MakePercentageIntervalGQL!]! |   ): [MakePercentageIntervalGQL!]! | ||||||
|  |   getMedals(scope: MedalScope!, userId: Int = null): RequestedMedalsGQL! | ||||||
|  |   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 |     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( | ||||||
|  |     userId: Int! | ||||||
|  |     matchString: String = null | ||||||
|  |     limit: Int = 100 | ||||||
|  |     after: String = null | ||||||
|  |   ): UserRelationshipsResult! | ||||||
|   getPlayTime(userId: Int!): UserPlayTimeGQL! |   getPlayTime(userId: Int!): UserPlayTimeGQL! | ||||||
|   getUserVideos( |   getUserVideos( | ||||||
|     userId: Int = null |     userId: Int = null | ||||||
| @@ -39,6 +56,11 @@ 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 | ||||||
|  |     filters: VideoFilterInput = null | ||||||
|  |   ): VideoHistoryGQL! | ||||||
| } | } | ||||||
|  |  | ||||||
| type AggregateResultGQL { | type AggregateResultGQL { | ||||||
| @@ -125,6 +147,7 @@ enum AlignedIntervalEnum { | |||||||
|   MONTH |   MONTH | ||||||
|   YEAR |   YEAR | ||||||
|   WEEK |   WEEK | ||||||
|  |   DAY | ||||||
| } | } | ||||||
|  |  | ||||||
| input FilterInput @oneOf { | input FilterInput @oneOf { | ||||||
| @@ -140,6 +163,8 @@ input FilterInput @oneOf { | |||||||
|   shotDirection: [ShotDirectionEnum!] |   shotDirection: [ShotDirectionEnum!] | ||||||
|   videoId: [Int!] |   videoId: [Int!] | ||||||
|   userId: [Int!] |   userId: [Int!] | ||||||
|  |   username: [String!] | ||||||
|  |   fargoRating: FloatRangeFilter | ||||||
|   make: [Boolean!] |   make: [Boolean!] | ||||||
|   tags: [VideoTagInput!] |   tags: [VideoTagInput!] | ||||||
|   annotations: [ShotAnnotationInput!] |   annotations: [ShotAnnotationInput!] | ||||||
| @@ -162,7 +187,10 @@ 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 { | ||||||
| @@ -243,6 +271,52 @@ type MakePercentageIntervalGQL { | |||||||
|   elapsedTime: Float! |   elapsedTime: Float! | ||||||
| } | } | ||||||
|  |  | ||||||
|  | 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 | ||||||
|  |   totalMakes50: MedalGQL | ||||||
|  |   totalMakes75: MedalGQL | ||||||
|  |   totalMakes100: MedalGQL | ||||||
|  |   totalMakes200: MedalGQL | ||||||
|  |   totalMakes300: MedalGQL | ||||||
|  |   totalMakes400: MedalGQL | ||||||
|  |   totalMakes500: MedalGQL | ||||||
|  |   totalMakes750: MedalGQL | ||||||
|  |   totalMakes1000: MedalGQL | ||||||
|  |   dayStreak2: MedalGQL | ||||||
|  |   dayStreak3: MedalGQL | ||||||
|  |   dayStreak4: MedalGQL | ||||||
|  |   dayStreak5: MedalGQL | ||||||
|  |   dayStreak6: MedalGQL | ||||||
|  |   dayStreak7: MedalGQL | ||||||
|  |   dayStreak14: MedalGQL | ||||||
|  |   dayStreak21: MedalGQL | ||||||
|  |   dayStreak30: MedalGQL | ||||||
|  |   dayStreak60: MedalGQL | ||||||
|  |   dayStreak90: MedalGQL | ||||||
|  | } | ||||||
|  |  | ||||||
|  | type MedalGQL { | ||||||
|  |   count: Int! | ||||||
|  | } | ||||||
|  |  | ||||||
|  | input MedalScope @oneOf { | ||||||
|  |   videoId: Int | ||||||
|  |   interval: TimeInterval | ||||||
|  | } | ||||||
|  |  | ||||||
| type GetShotsResult { | type GetShotsResult { | ||||||
|   shots: [ShotGQL!]! |   shots: [ShotGQL!]! | ||||||
|   count: Int |   count: Int | ||||||
| @@ -282,6 +356,7 @@ type PocketingIntentionFeaturesGQL { | |||||||
|   difficulty: Float |   difficulty: Float | ||||||
|   targetPocketAngle: Float |   targetPocketAngle: Float | ||||||
|   targetPocketAngleDirection: ShotDirectionEnum |   targetPocketAngleDirection: ShotDirectionEnum | ||||||
|  |   marginOfErrorInDegrees: Float | ||||||
|   backcut: Boolean |   backcut: Boolean | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -317,13 +392,17 @@ 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 { | ||||||
| @@ -359,6 +438,7 @@ 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!]! | ||||||
| @@ -431,6 +511,7 @@ type VideoTagClass { | |||||||
| } | } | ||||||
|  |  | ||||||
| type HomographyInfoGQL { | type HomographyInfoGQL { | ||||||
|  |   id: Int! | ||||||
|   frameIndex: Int! |   frameIndex: Int! | ||||||
|   crop: BoundingBoxGQL! |   crop: BoundingBoxGQL! | ||||||
|   pockets: [BoundingBoxGQL!]! |   pockets: [BoundingBoxGQL!]! | ||||||
| @@ -460,6 +541,7 @@ type IntPoint2D { | |||||||
| } | } | ||||||
|  |  | ||||||
| type VideoProcessingGQL { | type VideoProcessingGQL { | ||||||
|  |   id: Int! | ||||||
|   errors: [VideoProcessingErrorGQL!]! |   errors: [VideoProcessingErrorGQL!]! | ||||||
|   status: ProcessingStatusEnum! |   status: ProcessingStatusEnum! | ||||||
|   statuses: [VideoProcessingStatusGQL!]! |   statuses: [VideoProcessingStatusGQL!]! | ||||||
| @@ -490,6 +572,33 @@ type VideoProcessingStatusGQL { | |||||||
|   updatedAt: DateTime |   updatedAt: DateTime | ||||||
| } | } | ||||||
|  |  | ||||||
|  | input GetShotsOrdering { | ||||||
|  |   orderings: [ShotsOrderingComponent!]! | ||||||
|  | } | ||||||
|  |  | ||||||
|  | input ShotsOrderingComponent @oneOf { | ||||||
|  |   videoCreation: DatetimeShotOrdering | ||||||
|  |   marginOfError: FloatShotOrdering | ||||||
|  |   videoId: IntShotOrdering | ||||||
|  |   startFrame: IntShotOrdering | ||||||
|  |   runLength: IntShotOrdering | ||||||
|  | } | ||||||
|  |  | ||||||
|  | input DatetimeShotOrdering { | ||||||
|  |   descending: Boolean! = true | ||||||
|  |   startingAt: DateTime = null | ||||||
|  | } | ||||||
|  |  | ||||||
|  | input FloatShotOrdering { | ||||||
|  |   descending: Boolean! = true | ||||||
|  |   startingAt: Float = null | ||||||
|  | } | ||||||
|  |  | ||||||
|  | input IntShotOrdering { | ||||||
|  |   descending: Boolean! = true | ||||||
|  |   startingAt: Int = null | ||||||
|  | } | ||||||
|  |  | ||||||
| input GetShotsPagination { | input GetShotsPagination { | ||||||
|   createdAfter: CreatedAfter! |   createdAfter: CreatedAfter! | ||||||
|   startFrameAfter: Int! |   startFrameAfter: Int! | ||||||
| @@ -500,6 +609,17 @@ 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! | ||||||
| } | } | ||||||
| @@ -541,10 +661,18 @@ type Mutation { | |||||||
|     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! | ||||||
| @@ -594,6 +722,16 @@ type OtherErrorNeedsNote { | |||||||
|   msg: String |   msg: String | ||||||
| } | } | ||||||
|  |  | ||||||
|  | type UpdateShotAnnotationReturn { | ||||||
|  |   shot: ShotGQL | ||||||
|  |   error: DoesNotOwnShotErr | ||||||
|  | } | ||||||
|  |  | ||||||
|  | input UpdateAnnotationInputGQL { | ||||||
|  |   name: String! | ||||||
|  |   notes: String = null | ||||||
|  | } | ||||||
|  |  | ||||||
| type GetProfileUploadLinkReturn { | type GetProfileUploadLinkReturn { | ||||||
|   value: UploadLinkGetProfileUploadLinkErrors! |   value: UploadLinkGetProfileUploadLinkErrors! | ||||||
| } | } | ||||||
| @@ -620,6 +758,12 @@ 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! | ||||||
| } | } | ||||||
| @@ -630,32 +774,14 @@ input VideoMetadataInput { | |||||||
|   endTime: DateTime = null |   endTime: DateTime = null | ||||||
|   gameType: String = null |   gameType: String = 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 | ||||||
|   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! | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user