Compare commits
No commits in common. "master" and "kat/add-get-usernames-following-operation" have entirely different histories.
master
...
kat/add-ge
@ -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"
|
||||
|
||||
|
||||
|
1399
src/index.tsx
1399
src/index.tsx
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,3 @@
|
||||
# DO NOT USE: use getVideoFeed instead
|
||||
query GetFeed(
|
||||
$limit: Int! = 5
|
||||
$after: String = null
|
||||
@ -6,71 +5,31 @@ 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
|
||||
totalShotsMade
|
||||
totalShots
|
||||
makePercentage
|
||||
createdAt
|
||||
updatedAt
|
||||
startTime
|
||||
endTime
|
||||
private
|
||||
elapsedTime
|
||||
screenshotUri
|
||||
stream {
|
||||
id
|
||||
isCompleted
|
||||
}
|
||||
tableSize
|
||||
tags {
|
||||
tagClasses {
|
||||
id
|
||||
owner {
|
||||
username
|
||||
}
|
||||
name
|
||||
}
|
||||
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
|
||||
screenshotUri
|
||||
totalShotsMade
|
||||
totalShots
|
||||
makePercentage
|
||||
createdAt
|
||||
updatedAt
|
||||
startTime
|
||||
endTime
|
||||
elapsedTime
|
||||
screenshotUri
|
||||
stream {
|
||||
isCompleted
|
||||
}
|
||||
tableSize
|
||||
tags {
|
||||
tagClasses {
|
||||
name
|
||||
}
|
||||
name
|
||||
}
|
||||
}
|
||||
pageInfo {
|
||||
hasNextPage
|
||||
|
@ -22,35 +22,23 @@ mutation UpdateShotAnnotations(
|
||||
$annotations: [UpdateAnnotationInputGQL!]!
|
||||
) {
|
||||
updateShotAnnotations(shotId: $shotId, annotations: $annotations) {
|
||||
shot {
|
||||
id
|
||||
annotations {
|
||||
shotId
|
||||
type {
|
||||
id
|
||||
name
|
||||
}
|
||||
notes
|
||||
value {
|
||||
... on SuccessfulUpdate {
|
||||
value
|
||||
}
|
||||
... on UpdateShotAnnotationErrors {
|
||||
error {
|
||||
shotId
|
||||
msg
|
||||
}
|
||||
}
|
||||
}
|
||||
error {
|
||||
shotId
|
||||
msg
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
## Should be deprecated
|
||||
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
|
||||
@ -62,40 +50,18 @@ query GetShotsWithVideoGql(
|
||||
}
|
||||
}
|
||||
|
||||
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 {
|
||||
|
@ -37,16 +37,14 @@ query getLoggedInUser {
|
||||
username
|
||||
isAdmin
|
||||
profileImageUri
|
||||
fargoRating
|
||||
activeVideoId
|
||||
createdAt
|
||||
updatedAt
|
||||
videosPrivateByDefault
|
||||
}
|
||||
}
|
||||
|
||||
query GetUserPlayTime($userId: Int!, $filters: VideoFilterInput) {
|
||||
getPlayTime(userId: $userId, filters: $filters) {
|
||||
query GetUserPlayTime($userId: Int!) {
|
||||
getPlayTime(userId: $userId) {
|
||||
totalSeconds
|
||||
}
|
||||
}
|
||||
@ -59,26 +57,21 @@ query getUsernames(
|
||||
getUsernames(matchString: $matchString, limit: $limit, after: $after)
|
||||
}
|
||||
|
||||
query getUserRelationshipsMatching(
|
||||
query getUsernamesAndFollowing(
|
||||
$userId: Int!
|
||||
$matchString: String!
|
||||
$limit: Int = null
|
||||
$after: String = null
|
||||
) {
|
||||
getUserRelationshipsMatching(
|
||||
getUsernamesAndFollowing(
|
||||
userId: $userId
|
||||
matchString: $matchString
|
||||
limit: $limit
|
||||
after: $after
|
||||
) {
|
||||
relationships {
|
||||
toUser {
|
||||
username
|
||||
id
|
||||
}
|
||||
toUserFollows
|
||||
toUserIsFollowedBy
|
||||
}
|
||||
followers
|
||||
following
|
||||
usernames
|
||||
}
|
||||
}
|
||||
|
||||
@ -88,72 +81,3 @@ query GetUserTags {
|
||||
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,10 +5,46 @@ query GetStreamMonitoringDetails($videoId: Int!, $debuggingJson: JSON) {
|
||||
makePercentage
|
||||
elapsedTime
|
||||
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 {
|
||||
id
|
||||
linksRequested
|
||||
uploadsCompleted
|
||||
segmentProcessingCursor
|
||||
@ -18,7 +54,6 @@ query GetStreamMonitoringDetails($videoId: Int!, $debuggingJson: JSON) {
|
||||
initPlaylistUploadStatus
|
||||
}
|
||||
currentProcessing {
|
||||
id
|
||||
errors {
|
||||
message
|
||||
startSegmentIndex
|
||||
@ -118,10 +153,47 @@ query GetVideo($videoId: Int!) {
|
||||
segmentDurations
|
||||
}
|
||||
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 {
|
||||
id
|
||||
streamSegmentType
|
||||
segments {
|
||||
segmentIndex
|
||||
@ -214,51 +286,3 @@ query GetHeaderInfoByVideoId($videoId: Int!) {
|
||||
startTime
|
||||
}
|
||||
}
|
||||
|
||||
mutation FindPrerecordTableLayout($b64Image: String!, $videoId: Int!) {
|
||||
findPrerecordTableLayout(b64Image: $b64Image, videoId: $videoId) {
|
||||
...HomographyInfo
|
||||
}
|
||||
}
|
||||
|
||||
fragment HomographyInfo on HomographyInfoGQL {
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
111
src/schema.gql
111
src/schema.gql
@ -9,44 +9,39 @@ type Query {
|
||||
videoId: ID!
|
||||
intervalDuration: Int! = 300
|
||||
): [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(
|
||||
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!]!
|
||||
getUserRelationshipsMatching(
|
||||
getUsernamesAndFollowing(
|
||||
userId: Int!
|
||||
matchString: String = null
|
||||
limit: Int = 100
|
||||
after: String = null
|
||||
): UserRelationshipsResult!
|
||||
getPlayTime(userId: Int!, filters: VideoFilterInput = null): UserPlayTimeGQL!
|
||||
): UsernamesAndFollowingResponse!
|
||||
getPlayTime(userId: Int!): UserPlayTimeGQL!
|
||||
getUserVideos(
|
||||
userId: Int = null
|
||||
limit: Int! = 5
|
||||
@ -59,7 +54,6 @@ type Query {
|
||||
getFeedVideos(
|
||||
limit: Int! = 5
|
||||
after: String = null
|
||||
includeCallersVideos: Boolean = true
|
||||
filters: VideoFilterInput = null
|
||||
): VideoHistoryGQL!
|
||||
}
|
||||
@ -272,52 +266,6 @@ type MakePercentageIntervalGQL {
|
||||
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 {
|
||||
shots: [ShotGQL!]!
|
||||
count: Int
|
||||
@ -393,17 +341,16 @@ 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!]
|
||||
following: [Int!]
|
||||
followers: [Int!]
|
||||
}
|
||||
|
||||
type ShotAnnotationGQL {
|
||||
@ -439,7 +386,6 @@ type VideoGQL {
|
||||
elapsedTime: Float
|
||||
framesPerSecond: Float!
|
||||
tableSize: Float!
|
||||
private: Boolean!
|
||||
stream: UploadStreamGQL
|
||||
playlist: HLSPlaylistGQL
|
||||
tags: [VideoTag!]!
|
||||
@ -512,7 +458,6 @@ type VideoTagClass {
|
||||
}
|
||||
|
||||
type HomographyInfoGQL {
|
||||
id: Int!
|
||||
frameIndex: Int!
|
||||
crop: BoundingBoxGQL!
|
||||
pockets: [BoundingBoxGQL!]!
|
||||
@ -542,7 +487,6 @@ type IntPoint2D {
|
||||
}
|
||||
|
||||
type VideoProcessingGQL {
|
||||
id: Int!
|
||||
errors: [VideoProcessingErrorGQL!]!
|
||||
status: ProcessingStatusEnum!
|
||||
statuses: [VideoProcessingStatusGQL!]!
|
||||
@ -610,28 +554,16 @@ input CreatedAfter @oneOf {
|
||||
createdAt: DateTime
|
||||
}
|
||||
|
||||
type UserRelationshipsResult {
|
||||
inquiringUser: UserGQL!
|
||||
relationships: [UserRelationship!]!
|
||||
}
|
||||
|
||||
type UserRelationship {
|
||||
toUser: UserGQL!
|
||||
toUserFollows: Boolean!
|
||||
toUserIsFollowedBy: Boolean!
|
||||
type UsernamesAndFollowingResponse {
|
||||
usernames: [String!]!
|
||||
following: [Int!]!
|
||||
followers: [Int!]!
|
||||
}
|
||||
|
||||
type UserPlayTimeGQL {
|
||||
totalSeconds: Float!
|
||||
}
|
||||
|
||||
input VideoFilterInput {
|
||||
isStreamCompleted: Boolean = null
|
||||
requireCursorCompletion: Boolean! = true
|
||||
createdAt: DateRangeFilter = null
|
||||
excludeVideosWithNoShots: Boolean = null
|
||||
}
|
||||
|
||||
type VideoHistoryGQL {
|
||||
videos: [VideoGQL!]!
|
||||
pageInfo: PageInfoGQL!
|
||||
@ -642,6 +574,11 @@ type PageInfoGQL {
|
||||
endCursor: String
|
||||
}
|
||||
|
||||
input VideoFilterInput {
|
||||
isStreamCompleted: Boolean = null
|
||||
requireCursorCompletion: Boolean! = true
|
||||
}
|
||||
|
||||
type TagGQL {
|
||||
name: String!
|
||||
id: Int!
|
||||
@ -675,7 +612,6 @@ type Mutation {
|
||||
editUser(input: EditUserInputGQL!): UserGQL!
|
||||
followUser(followedUserId: Int!): UserGQL!
|
||||
unfollowUser(followedUserId: Int!): UserGQL!
|
||||
findPrerecordTableLayout(b64Image: String!, videoId: Int!): HomographyInfoGQL
|
||||
createUploadStream(
|
||||
videoMetadata: VideoMetadataInput!
|
||||
): CreateUploadStreamReturn!
|
||||
@ -726,7 +662,18 @@ type OtherErrorNeedsNote {
|
||||
}
|
||||
|
||||
type UpdateShotAnnotationReturn {
|
||||
shot: ShotGQL
|
||||
value: SuccessfulUpdateUpdateShotAnnotationErrors!
|
||||
}
|
||||
|
||||
union SuccessfulUpdateUpdateShotAnnotationErrors =
|
||||
SuccessfulUpdate
|
||||
| UpdateShotAnnotationErrors
|
||||
|
||||
type SuccessfulUpdate {
|
||||
value: Boolean!
|
||||
}
|
||||
|
||||
type UpdateShotAnnotationErrors {
|
||||
error: DoesNotOwnShotErr
|
||||
}
|
||||
|
||||
@ -764,7 +711,6 @@ type TooManyProfileImageUploadsErr {
|
||||
input EditUserInputGQL {
|
||||
username: String = null
|
||||
fargoRating: Int = null
|
||||
videosPrivateByDefault: Boolean = null
|
||||
}
|
||||
|
||||
type CreateUploadStreamReturn {
|
||||
@ -779,7 +725,6 @@ input VideoMetadataInput {
|
||||
tableSize: Float = null
|
||||
lastIntendedSegmentBound: Int = null
|
||||
streamSegmentType: StreamSegmentTypeEnum = null
|
||||
private: Boolean = null
|
||||
endStream: Boolean! = false
|
||||
resolution: VideoResolution = null
|
||||
framesPerSecond: Float = null
|
||||
|
Loading…
Reference in New Issue
Block a user