Compare commits
	
		
			1 Commits
		
	
	
		
			9db95c4e6c
			...
			kat/reserv
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 15be60f2ca | 
| @@ -1,7 +1,5 @@ | ||||
| overwrite: true | ||||
| schema: | ||||
|   - "src/schema.gql" | ||||
|   - "src/client-schema.gql" | ||||
| schema: "src/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.13" | ||||
| python = ">=3.10,<3.12" | ||||
| protobuf = "^4.25.3" | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -1,25 +0,0 @@ | ||||
| # 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!]! | ||||
| } | ||||
							
								
								
									
										1332
									
								
								src/index.tsx
									
									
									
									
									
								
							
							
						
						
									
										1332
									
								
								src/index.tsx
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -21,7 +21,6 @@ query GetFeed( | ||||
|       elapsedTime | ||||
|       screenshotUri | ||||
|       stream { | ||||
|         id | ||||
|         isCompleted | ||||
|       } | ||||
|       tableSize | ||||
|   | ||||
| @@ -17,39 +17,9 @@ query GetShotAnnotationTypes { | ||||
|   } | ||||
| } | ||||
|  | ||||
| mutation UpdateShotAnnotations( | ||||
|   $shotId: Int! | ||||
|   $annotations: [UpdateAnnotationInputGQL!]! | ||||
| ) { | ||||
|   updateShotAnnotations(shotId: $shotId, annotations: $annotations) { | ||||
|     shot { | ||||
|       id | ||||
|       annotations { | ||||
|         shotId | ||||
|         type { | ||||
|           id | ||||
|           name | ||||
|         } | ||||
|         notes | ||||
|       } | ||||
|     } | ||||
|     error { | ||||
|       shotId | ||||
|       msg | ||||
|     } | ||||
|   } | ||||
| } | ||||
|  | ||||
| query GetShotsWithVideoGql( | ||||
|   $filterInput: FilterInput! | ||||
|   $shotsOrdering: GetShotsOrdering | ||||
|   $limit: Int | ||||
| ) { | ||||
|   getOrderedShots( | ||||
|     filterInput: $filterInput | ||||
|     shotsOrdering: $shotsOrdering | ||||
|     limit: $limit | ||||
|   ) { | ||||
| query GetShotsWithVideoGql($filterInput: FilterInput!, $limit: Int) { | ||||
|   getShotsWithMetadata(filterInput: $filterInput, limit: $limit) { | ||||
|     ids | ||||
|     shots { | ||||
|       id | ||||
|       videoId | ||||
| @@ -64,13 +34,13 @@ query GetShotsWithVideoGql( | ||||
| ## Reserved for playlists (which are created from a filter) | ||||
| query GetShotsWithMetadataFilterResult( | ||||
|   $filterInput: FilterInput! | ||||
|   $shotsOrdering: GetShotsOrdering | ||||
|   $shotsPagination: GetShotsPagination | ||||
|   $limit: Int | ||||
|   $ids: [Int!] | ||||
| ) { | ||||
|   getOrderedShots( | ||||
|   getShotsWithMetadata( | ||||
|     filterInput: $filterInput | ||||
|     shotsOrdering: $shotsOrdering | ||||
|     shotsPagination: $shotsPagination | ||||
|     limit: $limit | ||||
|     ids: $ids | ||||
|   ) { | ||||
| @@ -114,12 +84,19 @@ fragment ShotWithAllFeatures on ShotGQL { | ||||
|   videoId | ||||
|   startFrame | ||||
|   endFrame | ||||
|   startTime @client | ||||
|   endTime @client | ||||
|   user { | ||||
|     id | ||||
|   } | ||||
|   falsePositiveScore | ||||
|   video { | ||||
|     id | ||||
|     stream { | ||||
|       resolution { | ||||
|         width | ||||
|         height | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|   createdAt | ||||
|   updatedAt | ||||
|   cueObjectFeatures { | ||||
| @@ -145,12 +122,4 @@ fragment ShotWithAllFeatures on ShotGQL { | ||||
|   serializedShotPaths { | ||||
|     b64EncodedBuffer | ||||
|   } | ||||
|   annotations { | ||||
|     shotId | ||||
|     type { | ||||
|       id | ||||
|       name | ||||
|     } | ||||
|     notes | ||||
|   } | ||||
| } | ||||
|   | ||||
| @@ -37,7 +37,6 @@ query getLoggedInUser { | ||||
|     username | ||||
|     isAdmin | ||||
|     profileImageUri | ||||
|     fargoRating | ||||
|     activeVideoId | ||||
|     createdAt | ||||
|     updatedAt | ||||
| @@ -58,70 +57,9 @@ 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 | ||||
|     following { | ||||
|       id | ||||
|     } | ||||
|     followers { | ||||
|       id | ||||
|     } | ||||
|   } | ||||
| } | ||||
|  | ||||
| mutation unfollowUser($followedUserId: Int!) { | ||||
|   unfollowUser(followedUserId: $followedUserId) { | ||||
|     username | ||||
|     following { | ||||
|       id | ||||
|     } | ||||
|     followers { | ||||
|       id | ||||
|     } | ||||
|   } | ||||
| } | ||||
|  | ||||
| query getUserFollowingFollowers { | ||||
|   getLoggedInUser { | ||||
|     id | ||||
|     following { | ||||
|       id | ||||
|       username | ||||
|     } | ||||
|     followers { | ||||
|       id | ||||
|       username | ||||
|     } | ||||
|   } | ||||
| } | ||||
|   | ||||
| @@ -45,7 +45,6 @@ query GetStreamMonitoringDetails($videoId: Int!, $debuggingJson: JSON) { | ||||
|       } | ||||
|     } | ||||
|     stream { | ||||
|       id | ||||
|       linksRequested | ||||
|       uploadsCompleted | ||||
|       segmentProcessingCursor | ||||
| @@ -118,11 +117,6 @@ query GetVideoDetails($videoId: Int!) { | ||||
|  | ||||
| query GetVideos($videoIds: [Int!]!) { | ||||
|   getVideos(videoIds: $videoIds) { | ||||
|     ...VideoStreamMetadata | ||||
|   } | ||||
| } | ||||
|  | ||||
| fragment VideoStreamMetadata on VideoGQL { | ||||
|     id | ||||
|     framesPerSecond | ||||
|     stream { | ||||
| @@ -140,11 +134,6 @@ fragment VideoStreamMetadata on VideoGQL { | ||||
|       segmentDurations | ||||
|     } | ||||
|   } | ||||
|  | ||||
| query GetVideoForShotTime($videoId: Int!) { | ||||
|   getVideo(videoId: $videoId) { | ||||
|     ...VideoStreamMetadata | ||||
|   } | ||||
| } | ||||
|  | ||||
| query GetVideo($videoId: Int!) { | ||||
| @@ -195,7 +184,6 @@ query GetVideo($videoId: Int!) { | ||||
|       } | ||||
|     } | ||||
|     stream { | ||||
|       id | ||||
|       streamSegmentType | ||||
|       segments { | ||||
|         segmentIndex | ||||
| @@ -216,14 +204,12 @@ query GetAverageTimePerShotForVideo($videoId: Int!) { | ||||
|     averageTimeBetweenShots | ||||
|   } | ||||
| } | ||||
|  | ||||
| query GetElapsedTimeForVideo($videoId: Int!) { | ||||
|   getVideo(videoId: $videoId) { | ||||
|     id | ||||
|     elapsedTime | ||||
|   } | ||||
| } | ||||
|  | ||||
| query GetMedianRunForVideo($videoId: Int!) { | ||||
|   getVideo(videoId: $videoId) { | ||||
|     id | ||||
| @@ -231,14 +217,16 @@ query GetMedianRunForVideo($videoId: Int!) { | ||||
|   } | ||||
| } | ||||
|  | ||||
| fragment StreamWithEndFrames on UploadStreamGQL { | ||||
| query GetVideoForClipTimes($videoId: Int!) { | ||||
|   getVideo(videoId: $videoId) { | ||||
|     id | ||||
|     framesPerSecond | ||||
|     playlist { | ||||
|       segmentDurations | ||||
|     } | ||||
|     stream { | ||||
|       id | ||||
|       streamSegmentType | ||||
|   segmentEndFrames @client | ||||
|   resolution { | ||||
|     width | ||||
|     height | ||||
|   } | ||||
|       segments { | ||||
|         uploaded | ||||
|         valid | ||||
| @@ -247,37 +235,6 @@ fragment StreamWithEndFrames on UploadStreamGQL { | ||||
|         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 | ||||
|   } | ||||
| } | ||||
|  | ||||
|   | ||||
							
								
								
									
										106
									
								
								src/schema.gql
									
									
									
									
									
								
							
							
						
						
									
										106
									
								
								src/schema.gql
									
									
									
									
									
								
							| @@ -9,12 +9,6 @@ type Query { | ||||
|     videoId: ID! | ||||
|     intervalDuration: Int! = 300 | ||||
|   ): [MakePercentageIntervalGQL!]! | ||||
|   getOrderedShots( | ||||
|     filterInput: FilterInput! | ||||
|     ids: [Int!] = null | ||||
|     shotsOrdering: GetShotsOrdering = null | ||||
|     limit: Int! = 500 | ||||
|   ): GetShotsResult! | ||||
|   getShotsWithMetadata( | ||||
|     filterInput: FilterInput! | ||||
|     ids: [Int!] = null | ||||
| @@ -35,12 +29,6 @@ type Query { | ||||
|     limit: Int = null | ||||
|     after: String = null | ||||
|   ): [String!]! | ||||
|   getUserRelationshipsMatching( | ||||
|     userId: Int! | ||||
|     matchString: String = null | ||||
|     limit: Int = 100 | ||||
|     after: String = null | ||||
|   ): UserRelationshipsResult! | ||||
|   getPlayTime(userId: Int!): UserPlayTimeGQL! | ||||
|   getUserVideos( | ||||
|     userId: Int = null | ||||
| @@ -51,11 +39,6 @@ type Query { | ||||
|   getUserTags: [TagGQL!]! | ||||
|   getVideo(videoId: Int!, debuggingJson: JSON = null): VideoGQL! | ||||
|   getVideos(videoIds: [Int!]!): [VideoGQL!]! | ||||
|   getFeedVideos( | ||||
|     limit: Int! = 5 | ||||
|     after: String = null | ||||
|     filters: VideoFilterInput = null | ||||
|   ): VideoHistoryGQL! | ||||
| } | ||||
|  | ||||
| type AggregateResultGQL { | ||||
| @@ -159,7 +142,6 @@ input FilterInput @oneOf { | ||||
|   videoId: [Int!] | ||||
|   userId: [Int!] | ||||
|   username: [String!] | ||||
|   fargoRating: FloatRangeFilter | ||||
|   make: [Boolean!] | ||||
|   tags: [VideoTagInput!] | ||||
|   annotations: [ShotAnnotationInput!] | ||||
| @@ -184,8 +166,6 @@ input FilterInput @oneOf { | ||||
|   missAngleInDegrees: FloatRangeFilter | ||||
|   marginOfErrorInDegrees: FloatRangeFilter | ||||
|   createdAt: DateRangeFilter | ||||
|   totalDistance: FloatRangeFilter | ||||
|   runLength: FloatRangeFilter | ||||
| } | ||||
|  | ||||
| input FloatRangeFilter { | ||||
| @@ -341,16 +321,13 @@ type SerializedShotPathsGQL { | ||||
|  | ||||
| type UserGQL { | ||||
|   id: Int! | ||||
|   firebaseUid: String | ||||
|   firebaseUid: String! | ||||
|   username: String! | ||||
|   isAdmin: Boolean | ||||
|   fargoRating: Int | ||||
|   isAdmin: Boolean! | ||||
|   activeVideoId: Int | ||||
|   profileImageUri: String | ||||
|   createdAt: DateTime | ||||
|   updatedAt: DateTime | ||||
|   following: [UserGQL!] | ||||
|   followers: [UserGQL!] | ||||
| } | ||||
|  | ||||
| type ShotAnnotationGQL { | ||||
| @@ -517,33 +494,6 @@ type VideoProcessingStatusGQL { | ||||
|   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 { | ||||
|   createdAfter: CreatedAfter! | ||||
|   startFrameAfter: Int! | ||||
| @@ -554,17 +504,6 @@ input CreatedAfter @oneOf { | ||||
|   createdAt: DateTime | ||||
| } | ||||
|  | ||||
| type UserRelationshipsResult { | ||||
|   inquiringUser: UserGQL! | ||||
|   relationships: [UserRelationship!]! | ||||
| } | ||||
|  | ||||
| type UserRelationship { | ||||
|   toUser: UserGQL! | ||||
|   toUserFollows: Boolean! | ||||
|   toUserIsFollowedBy: Boolean! | ||||
| } | ||||
|  | ||||
| type UserPlayTimeGQL { | ||||
|   totalSeconds: Float! | ||||
| } | ||||
| @@ -606,17 +545,10 @@ 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! | ||||
|   createUploadStream( | ||||
|     videoMetadata: VideoMetadataInput! | ||||
|   ): CreateUploadStreamReturn! | ||||
| @@ -666,16 +598,6 @@ type OtherErrorNeedsNote { | ||||
|   msg: String | ||||
| } | ||||
|  | ||||
| type UpdateShotAnnotationReturn { | ||||
|   shot: ShotGQL | ||||
|   error: DoesNotOwnShotErr | ||||
| } | ||||
|  | ||||
| input UpdateAnnotationInputGQL { | ||||
|   name: String! | ||||
|   notes: String = null | ||||
| } | ||||
|  | ||||
| type GetProfileUploadLinkReturn { | ||||
|   value: UploadLinkGetProfileUploadLinkErrors! | ||||
| } | ||||
| @@ -702,11 +624,6 @@ type TooManyProfileImageUploadsErr { | ||||
|   linksRequested: Int! | ||||
| } | ||||
|  | ||||
| input EditUserInputGQL { | ||||
|   username: String = null | ||||
|   fargoRating: Int = null | ||||
| } | ||||
|  | ||||
| type CreateUploadStreamReturn { | ||||
|   videoId: Int! | ||||
| } | ||||
| @@ -717,6 +634,7 @@ input VideoMetadataInput { | ||||
|   endTime: DateTime = null | ||||
|   gameType: String = null | ||||
|   tableSize: Float = null | ||||
|   uploadStreamMetadataInput: UploadStreamMetadataInput = null | ||||
|   lastIntendedSegmentBound: Int = null | ||||
|   streamSegmentType: StreamSegmentTypeEnum = null | ||||
|   endStream: Boolean! = false | ||||
| @@ -724,6 +642,24 @@ input VideoMetadataInput { | ||||
|   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! | ||||
|   | ||||
		Reference in New Issue
	
	Block a user