Compare commits

..

40 Commits

Author SHA1 Message Date
36b6804719 Privacy
All checks were successful
Tests / Tests (pull_request) Successful in 10s
2024-11-12 14:15:19 +01:00
0120c15064 Merge pull request 'Add count to GetShotsWithJustIds operation return' (#127) from loewy/add-count-to-getshots-with-just-ids into master
Reviewed-on: #127
2024-11-11 21:13:19 -07:00
9cc99d956a add countRespectsLimit argument
All checks were successful
Tests / Tests (pull_request) Successful in 15s
2024-11-11 20:07:58 -08:00
985fa8b8e5 add count to return for get shots with just ids
All checks were successful
Tests / Tests (pull_request) Successful in 14s
2024-11-11 19:54:10 -08:00
c4868e7ebe Add null default 2024-11-11 19:02:13 -08:00
58e1c18034 Merge pull request 'Add filters for getPlayTime' (#126) from mk/add-filter-for-play-time into master
Reviewed-on: #126
2024-11-11 19:52:36 -07:00
592dea0ca2 Add filters for getPlayTime
All checks were successful
Tests / Tests (pull_request) Successful in 9s
2024-11-11 18:50:00 -08:00
0e00ae9297 Merge pull request 'Add private to VideoGQL' (#125) from mk/not-clear into master
Reviewed-on: #125
2024-11-07 18:50:34 -07:00
e16812f242 ???
All checks were successful
Tests / Tests (pull_request) Successful in 16s
2024-11-07 17:49:36 -08:00
3e9b7a0d16 Merge pull request 'Add private field to user and videos' (#124) from mk/privacy into master
Reviewed-on: #124
2024-11-07 18:19:01 -07:00
309deb9473 Add private field to user and videos
All checks were successful
Tests / Tests (pull_request) Successful in 9s
2024-11-07 17:16:56 -08:00
d5ba9c2ba5 Merge pull request 'Remove id from HomographyInfo fragment for now, use string instead of base64 for FindPrerecordTableLayout' (#122) from loewy/switch-back-to-string into master
Reviewed-on: #122
2024-11-07 18:09:51 -07:00
73771a263a remove id for now, use string instead of base64
All checks were successful
Tests / Tests (pull_request) Successful in 16s
2024-11-07 17:08:35 -08:00
655e59c43c Remove base64 scalar 2024-11-07 17:43:09 -07:00
056120a68a Merge pull request 'Add operation for FindPrerecordTableLayoutMutation + HomographyInfoGql fragment' (#121) from loewy/add-operation-check-homography into master
Reviewed-on: #121
2024-11-07 16:51:16 -07:00
bd7ffa7fdb add operation
All checks were successful
Tests / Tests (pull_request) Successful in 10s
2024-11-07 15:45:03 -08:00
ec58923c65 Add id to homography info gql 2024-11-07 16:29:33 -07:00
63869cd7ca Rename checkHomographyIsValid to findPrerecordTableLayout 2024-11-07 15:55:23 -07:00
08ae9611cf Add id to video processing gql 2024-11-07 15:52:07 -07:00
4e610b7df2 Merge pull request 'Return video processing status in feed' (#119) from kat/current-processing into master
Reviewed-on: #119
2024-11-06 22:41:30 -07:00
2d6d3964ad Return video processing status in feed
All checks were successful
Tests / Tests (pull_request) Successful in 8s
2024-11-06 22:40:18 -07:00
73a58de36e Merge pull request 'Make check homography mutation' (#118) from mk/make-homography-mutation into master
Reviewed-on: #118
2024-11-06 17:26:27 -07:00
dc6f246489 Make check homography mutation
All checks were successful
Tests / Tests (pull_request) Successful in 16s
2024-11-06 16:25:23 -08:00
c0a3aa97dc Merge pull request 'Add getShotsWithJustIds' (#117) from loewy/update-get-shots-with-video-ids into master
Reviewed-on: #117
2024-11-06 16:32:59 -07:00
f4e43b24f2 add getShotsWithJustIds
All checks were successful
Tests / Tests (pull_request) Successful in 15s
2024-11-06 14:58:32 -08:00
51ab8320d7 Merge pull request 'add checkHomographyIsValid' (#116) from mk/get-homography-valid into master
Reviewed-on: #116
2024-11-05 15:45:49 -07:00
f9a00ad3eb add checkHomographyIsValid
All checks were successful
Tests / Tests (pull_request) Successful in 16s
2024-11-05 14:39:23 -08:00
998b2ffc8c Merge pull request 'Create video card fragment' (#115) from kat/video-card-feed into master
Reviewed-on: #115
2024-11-05 14:04:02 -07:00
c7642e6204 Create video card fragment
All checks were successful
Tests / Tests (pull_request) Successful in 16s
2024-11-05 13:58:31 -07:00
b2ce1c2f96 Create video card fragment
All checks were successful
Tests / Tests (pull_request) Successful in 6s
2024-11-05 13:56:51 -07:00
d0cf071934 Merge pull request 'Return profile image in feed' (#114) from kat/image-uri-feed into master
Reviewed-on: #114
2024-11-05 12:54:24 -07:00
6b410b3d78 Return profile image in feed
All checks were successful
Tests / Tests (pull_request) Successful in 10s
2024-11-05 12:53:42 -07:00
607504261c Merge pull request 'Create new get feed operation' (#113) from kat/add-feed into master
Reviewed-on: #113
Reviewed-by: loewy <loewymalkov@gmail.com>
2024-11-04 15:13:56 -07:00
0421be855d Create new get feed operation
All checks were successful
Tests / Tests (pull_request) Successful in 8s
2024-11-04 15:08:21 -07:00
014aab473b Merge pull request 'Add operation for query doesUsernameExist' (#111) from loewy/query-does-username-exist into master
Reviewed-on: #111
2024-10-31 18:39:58 -06:00
353872401e does username exist query
All checks were successful
Tests / Tests (pull_request) Successful in 8s
2024-10-31 17:37:08 -07:00
433dfdaf74 Merge pull request 'Add countRespectsLimit to GetShotsWithMetadataFilterResult operation args' (#110) from loewy/add-count-respects-limit-to-get-shots-with-metadata-filter-result into master
Reviewed-on: #110
2024-10-31 16:41:06 -06:00
a2d9e688e9 add countRespectsLimit
All checks were successful
Tests / Tests (pull_request) Successful in 15s
2024-10-31 15:21:54 -07:00
b3259dac1f Merge pull request 'Add countRespectsLimit' (#109) from mk/count-respects-limit into master
Reviewed-on: #109
2024-10-31 14:40:06 -06:00
0982b9e60c Add countRespectsLimit
All checks were successful
Tests / Tests (pull_request) Successful in 15s
2024-10-31 13:37:15 -07:00
6 changed files with 867 additions and 160 deletions

View File

@@ -184,6 +184,7 @@ export type DoesNotOwnShotErrOtherErrorNeedsNote =
export type EditUserInputGql = {
fargoRating?: InputMaybe<Scalars["Int"]["input"]>;
username?: InputMaybe<Scalars["String"]["input"]>;
videosPrivateByDefault?: InputMaybe<Scalars["Boolean"]["input"]>;
};
export type EnumAggregation = {
@@ -1942,6 +1943,7 @@ export type HomographyInfoGql = {
crop: BoundingBoxGql;
destPoints: PocketPointsGql;
frameIndex: Scalars["Int"]["output"];
id: Scalars["Int"]["output"];
pockets: Array<BoundingBoxGql>;
sourcePoints: PocketPointsGql;
};
@@ -2008,6 +2010,7 @@ export type Mutation = {
editProfileImageUri: UserGql;
editUploadStream: Scalars["Boolean"]["output"];
editUser: UserGql;
findPrerecordTableLayout?: Maybe<HomographyInfoGql>;
followUser: UserGql;
getHlsInitUploadLink: GetUploadLinkReturn;
getProfileImageUploadLink: GetProfileUploadLinkReturn;
@@ -2049,6 +2052,11 @@ export type MutationEditUserArgs = {
input: EditUserInputGql;
};
export type MutationFindPrerecordTableLayoutArgs = {
b64Image: Scalars["String"]["input"];
videoId: Scalars["Int"]["input"];
};
export type MutationFollowUserArgs = {
followedUserId: Scalars["Int"]["input"];
};
@@ -2211,6 +2219,7 @@ export type QueryGetMedalsArgs = {
};
export type QueryGetOrderedShotsArgs = {
countRespectsLimit?: Scalars["Boolean"]["input"];
filterInput: FilterInput;
ids?: InputMaybe<Array<Scalars["Int"]["input"]>>;
limit?: Scalars["Int"]["input"];
@@ -2218,6 +2227,7 @@ export type QueryGetOrderedShotsArgs = {
};
export type QueryGetPlayTimeArgs = {
filters?: InputMaybe<VideoFilterInput>;
userId: Scalars["Int"]["input"];
};
@@ -2226,6 +2236,7 @@ export type QueryGetShotAnnotationTypesArgs = {
};
export type QueryGetShotsArgs = {
countRespectsLimit?: Scalars["Boolean"]["input"];
filterInput: FilterInput;
limit?: Scalars["Int"]["input"];
shotsPagination?: InputMaybe<GetShotsPagination>;
@@ -2236,6 +2247,7 @@ export type QueryGetShotsByIdsArgs = {
};
export type QueryGetShotsWithMetadataArgs = {
countRespectsLimit?: Scalars["Boolean"]["input"];
filterInput: FilterInput;
ids?: InputMaybe<Array<Scalars["Int"]["input"]>>;
limit?: Scalars["Int"]["input"];
@@ -2574,6 +2586,7 @@ export type UserGql = {
profileImageUri?: Maybe<Scalars["String"]["output"]>;
updatedAt?: Maybe<Scalars["DateTime"]["output"]>;
username: Scalars["String"]["output"];
videosPrivateByDefault?: Maybe<Scalars["Boolean"]["output"]>;
};
export type UserPlayTimeGql = {
@@ -2595,6 +2608,7 @@ export type UserRelationshipsResult = {
};
export type VideoFilterInput = {
createdAt?: InputMaybe<DateRangeFilter>;
isStreamCompleted?: InputMaybe<Scalars["Boolean"]["input"]>;
requireCursorCompletion?: Scalars["Boolean"]["input"];
};
@@ -2615,6 +2629,7 @@ export type VideoGql = {
name?: Maybe<Scalars["String"]["output"]>;
owner?: Maybe<UserGql>;
playlist?: Maybe<HlsPlaylistGql>;
private: Scalars["Boolean"]["output"];
screenshotUri?: Maybe<Scalars["String"]["output"]>;
shots: Array<ShotGql>;
startTime?: Maybe<Scalars["DateTime"]["output"]>;
@@ -2638,6 +2653,7 @@ export type VideoMetadataInput = {
framesPerSecond?: InputMaybe<Scalars["Float"]["input"]>;
gameType?: InputMaybe<Scalars["String"]["input"]>;
lastIntendedSegmentBound?: InputMaybe<Scalars["Int"]["input"]>;
private?: InputMaybe<Scalars["Boolean"]["input"]>;
resolution?: InputMaybe<VideoResolution>;
startTime?: InputMaybe<Scalars["DateTime"]["input"]>;
streamSegmentType?: InputMaybe<StreamSegmentTypeEnum>;
@@ -2655,6 +2671,7 @@ export type VideoProcessingErrorGql = {
export type VideoProcessingGql = {
__typename?: "VideoProcessingGQL";
errors: Array<VideoProcessingErrorGql>;
id: Scalars["Int"]["output"];
status: ProcessingStatusEnum;
statuses: Array<VideoProcessingStatusGql>;
};
@@ -2783,6 +2800,112 @@ export type GetFeedQuery = {
};
};
export type VideoCardFieldsFragment = {
__typename?: "VideoGQL";
id: number;
name?: string | null;
screenshotUri?: string | null;
totalShotsMade: number;
totalShots: number;
makePercentage: number;
createdAt?: any | null;
updatedAt?: any | null;
startTime?: any | null;
endTime?: any | null;
private: boolean;
elapsedTime?: number | null;
tableSize: number;
owner?: {
__typename?: "UserGQL";
id: number;
username: string;
profileImageUri?: string | null;
} | null;
stream?: {
__typename?: "UploadStreamGQL";
id: string;
isCompleted: boolean;
} | null;
tags: Array<{
__typename?: "VideoTag";
name: string;
tagClasses: Array<{ __typename?: "VideoTagClass"; name: string }>;
}>;
currentProcessing?: {
__typename?: "VideoProcessingGQL";
id: number;
status: ProcessingStatusEnum;
errors: Array<{ __typename?: "VideoProcessingErrorGQL"; message: string }>;
statuses: Array<{
__typename?: "VideoProcessingStatusGQL";
status: ProcessingStatusEnum;
}>;
} | null;
};
export type GetVideoFeedQueryVariables = Exact<{
limit?: Scalars["Int"]["input"];
after?: InputMaybe<Scalars["String"]["input"]>;
filters?: InputMaybe<VideoFilterInput>;
}>;
export type GetVideoFeedQuery = {
__typename?: "Query";
getFeedVideos: {
__typename?: "VideoHistoryGQL";
videos: Array<{
__typename?: "VideoGQL";
id: number;
name?: string | null;
screenshotUri?: string | null;
totalShotsMade: number;
totalShots: number;
makePercentage: number;
createdAt?: any | null;
updatedAt?: any | null;
startTime?: any | null;
endTime?: any | null;
private: boolean;
elapsedTime?: number | null;
tableSize: number;
owner?: {
__typename?: "UserGQL";
id: number;
username: string;
profileImageUri?: string | null;
} | null;
stream?: {
__typename?: "UploadStreamGQL";
id: string;
isCompleted: boolean;
} | null;
tags: Array<{
__typename?: "VideoTag";
name: string;
tagClasses: Array<{ __typename?: "VideoTagClass"; name: string }>;
}>;
currentProcessing?: {
__typename?: "VideoProcessingGQL";
id: number;
status: ProcessingStatusEnum;
errors: Array<{
__typename?: "VideoProcessingErrorGQL";
message: string;
}>;
statuses: Array<{
__typename?: "VideoProcessingStatusGQL";
status: ProcessingStatusEnum;
}>;
} | null;
}>;
pageInfo: {
__typename?: "PageInfoGQL";
hasNextPage: boolean;
endCursor?: string | null;
};
};
};
export type GetVideoMakePercentageIntervalsQueryVariables = Exact<{
videoId: Scalars["ID"]["input"];
intervalDuration: Scalars["Int"]["input"];
@@ -2883,11 +3006,28 @@ export type GetShotsWithVideoGqlQuery = {
};
};
export type GetShotsWithJustIdsQueryVariables = Exact<{
filterInput: FilterInput;
shotsOrdering?: InputMaybe<GetShotsOrdering>;
limit?: InputMaybe<Scalars["Int"]["input"]>;
countRespectsLimit?: InputMaybe<Scalars["Boolean"]["input"]>;
}>;
export type GetShotsWithJustIdsQuery = {
__typename?: "Query";
getOrderedShots: {
__typename?: "GetShotsResult";
count?: number | null;
shots: Array<{ __typename?: "ShotGQL"; id: number; videoId: number }>;
};
};
export type GetShotsWithMetadataFilterResultQueryVariables = Exact<{
filterInput: FilterInput;
shotsOrdering?: InputMaybe<GetShotsOrdering>;
limit?: InputMaybe<Scalars["Int"]["input"]>;
ids?: InputMaybe<Array<Scalars["Int"]["input"]> | Scalars["Int"]["input"]>;
countRespectsLimit?: InputMaybe<Scalars["Boolean"]["input"]>;
}>;
export type GetShotsWithMetadataFilterResultQuery = {
@@ -3176,6 +3316,7 @@ export type GetLoggedInUserQuery = {
activeVideoId?: number | null;
createdAt?: any | null;
updatedAt?: any | null;
videosPrivateByDefault?: boolean | null;
} | null;
};
@@ -3294,6 +3435,34 @@ export type GetUserFollowingFollowersQuery = {
} | null;
};
export type DoesUsernameExistQueryVariables = Exact<{
candidateUsername: Scalars["String"]["input"];
}>;
export type DoesUsernameExistQuery = {
__typename?: "Query";
doesUsernameExist: boolean;
};
export type EditUserMutationVariables = Exact<{
username?: InputMaybe<Scalars["String"]["input"]>;
fargoRating?: InputMaybe<Scalars["Int"]["input"]>;
videosPrivateByDefault?: InputMaybe<Scalars["Boolean"]["input"]>;
}>;
export type EditUserMutation = {
__typename?: "Mutation";
editUser: {
__typename?: "UserGQL";
id: number;
firebaseUid?: string | null;
username: string;
fargoRating?: number | null;
updatedAt?: any | null;
videosPrivateByDefault?: boolean | null;
};
};
export type GetStreamMonitoringDetailsQueryVariables = Exact<{
videoId: Scalars["Int"]["input"];
debuggingJson?: InputMaybe<Scalars["JSON"]["input"]>;
@@ -3309,6 +3478,7 @@ export type GetStreamMonitoringDetailsQuery = {
elapsedTime?: number | null;
currentHomography?: {
__typename?: "HomographyInfoGQL";
frameIndex: number;
crop: {
__typename?: "BoundingBoxGQL";
left: number;
@@ -3723,6 +3893,70 @@ export type GetHeaderInfoByVideoIdQuery = {
};
};
export type FindPrerecordTableLayoutMutationVariables = Exact<{
b64Image: Scalars["String"]["input"];
videoId: Scalars["Int"]["input"];
}>;
export type FindPrerecordTableLayoutMutation = {
__typename?: "Mutation";
findPrerecordTableLayout?: {
__typename?: "HomographyInfoGQL";
frameIndex: number;
crop: {
__typename?: "BoundingBoxGQL";
left: number;
top: number;
width: number;
height: number;
};
pockets: Array<{
__typename?: "BoundingBoxGQL";
left: number;
top: number;
width: number;
height: number;
}>;
sourcePoints: {
__typename?: "PocketPointsGQL";
topLeft: { __typename?: "IntPoint2D"; x: number; y: number };
topSide: { __typename?: "IntPoint2D"; x: number; y: number };
topRight: { __typename?: "IntPoint2D"; x: number; y: number };
bottomLeft: { __typename?: "IntPoint2D"; x: number; y: number };
bottomSide: { __typename?: "IntPoint2D"; x: number; y: number };
bottomRight: { __typename?: "IntPoint2D"; x: number; y: number };
};
} | null;
};
export type HomographyInfoFragment = {
__typename?: "HomographyInfoGQL";
frameIndex: number;
crop: {
__typename?: "BoundingBoxGQL";
left: number;
top: number;
width: number;
height: number;
};
pockets: Array<{
__typename?: "BoundingBoxGQL";
left: number;
top: number;
width: number;
height: number;
}>;
sourcePoints: {
__typename?: "PocketPointsGQL";
topLeft: { __typename?: "IntPoint2D"; x: number; y: number };
topSide: { __typename?: "IntPoint2D"; x: number; y: number };
topRight: { __typename?: "IntPoint2D"; x: number; y: number };
bottomLeft: { __typename?: "IntPoint2D"; x: number; y: number };
bottomSide: { __typename?: "IntPoint2D"; x: number; y: number };
bottomRight: { __typename?: "IntPoint2D"; x: number; y: number };
};
};
export type CreateUploadStreamMutationVariables = Exact<{
videoMetadataInput: VideoMetadataInput;
}>;
@@ -3895,6 +4129,49 @@ export type GetUploadStreamsWithDetailsQuery = {
};
};
export const VideoCardFieldsFragmentDoc = gql`
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 {
name
}
name
}
currentProcessing {
id
errors {
message
}
status
statuses {
status
}
}
}
`;
export const ShotWithAllFeaturesFragmentDoc = gql`
fragment ShotWithAllFeatures on ShotGQL {
id
@@ -4013,6 +4290,49 @@ export const VideoDurationDataFragmentDoc = gql`
${PlaylistWithSegmentStartTimesFragmentDoc}
${StreamWithEndFramesFragmentDoc}
`;
export const HomographyInfoFragmentDoc = gql`
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
}
}
}
`;
export const GetAggregatedShotMetricsDocument = gql`
query GetAggregatedShotMetrics($aggregateInput: AggregateInputGQL!) {
getAggregatedShotMetrics(aggregateInput: $aggregateInput) {
@@ -4272,6 +4592,92 @@ export type GetFeedQueryResult = Apollo.QueryResult<
GetFeedQuery,
GetFeedQueryVariables
>;
export const GetVideoFeedDocument = gql`
query GetVideoFeed(
$limit: Int! = 5
$after: String = null
$filters: VideoFilterInput = null
) {
getFeedVideos(limit: $limit, after: $after, filters: $filters) {
videos {
...VideoCardFields
}
pageInfo {
hasNextPage
endCursor
}
}
}
${VideoCardFieldsFragmentDoc}
`;
/**
* __useGetVideoFeedQuery__
*
* To run a query within a React component, call `useGetVideoFeedQuery` and pass it any options that fit your needs.
* When your component renders, `useGetVideoFeedQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
* const { data, loading, error } = useGetVideoFeedQuery({
* variables: {
* limit: // value for 'limit'
* after: // value for 'after'
* filters: // value for 'filters'
* },
* });
*/
export function useGetVideoFeedQuery(
baseOptions?: Apollo.QueryHookOptions<
GetVideoFeedQuery,
GetVideoFeedQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useQuery<GetVideoFeedQuery, GetVideoFeedQueryVariables>(
GetVideoFeedDocument,
options,
);
}
export function useGetVideoFeedLazyQuery(
baseOptions?: Apollo.LazyQueryHookOptions<
GetVideoFeedQuery,
GetVideoFeedQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useLazyQuery<GetVideoFeedQuery, GetVideoFeedQueryVariables>(
GetVideoFeedDocument,
options,
);
}
export function useGetVideoFeedSuspenseQuery(
baseOptions?: Apollo.SuspenseQueryHookOptions<
GetVideoFeedQuery,
GetVideoFeedQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useSuspenseQuery<GetVideoFeedQuery, GetVideoFeedQueryVariables>(
GetVideoFeedDocument,
options,
);
}
export type GetVideoFeedQueryHookResult = ReturnType<
typeof useGetVideoFeedQuery
>;
export type GetVideoFeedLazyQueryHookResult = ReturnType<
typeof useGetVideoFeedLazyQuery
>;
export type GetVideoFeedSuspenseQueryHookResult = ReturnType<
typeof useGetVideoFeedSuspenseQuery
>;
export type GetVideoFeedQueryResult = Apollo.QueryResult<
GetVideoFeedQuery,
GetVideoFeedQueryVariables
>;
export const GetVideoMakePercentageIntervalsDocument = gql`
query GetVideoMakePercentageIntervals(
$videoId: ID!
@@ -4663,18 +5069,110 @@ export type GetShotsWithVideoGqlQueryResult = Apollo.QueryResult<
GetShotsWithVideoGqlQuery,
GetShotsWithVideoGqlQueryVariables
>;
export const GetShotsWithJustIdsDocument = gql`
query GetShotsWithJustIds(
$filterInput: FilterInput!
$shotsOrdering: GetShotsOrdering
$limit: Int
$countRespectsLimit: Boolean
) {
getOrderedShots(
filterInput: $filterInput
shotsOrdering: $shotsOrdering
limit: $limit
countRespectsLimit: $countRespectsLimit
) {
count
shots {
id
videoId
}
}
}
`;
/**
* __useGetShotsWithJustIdsQuery__
*
* To run a query within a React component, call `useGetShotsWithJustIdsQuery` and pass it any options that fit your needs.
* When your component renders, `useGetShotsWithJustIdsQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
* const { data, loading, error } = useGetShotsWithJustIdsQuery({
* variables: {
* filterInput: // value for 'filterInput'
* shotsOrdering: // value for 'shotsOrdering'
* limit: // value for 'limit'
* countRespectsLimit: // value for 'countRespectsLimit'
* },
* });
*/
export function useGetShotsWithJustIdsQuery(
baseOptions: Apollo.QueryHookOptions<
GetShotsWithJustIdsQuery,
GetShotsWithJustIdsQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useQuery<
GetShotsWithJustIdsQuery,
GetShotsWithJustIdsQueryVariables
>(GetShotsWithJustIdsDocument, options);
}
export function useGetShotsWithJustIdsLazyQuery(
baseOptions?: Apollo.LazyQueryHookOptions<
GetShotsWithJustIdsQuery,
GetShotsWithJustIdsQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useLazyQuery<
GetShotsWithJustIdsQuery,
GetShotsWithJustIdsQueryVariables
>(GetShotsWithJustIdsDocument, options);
}
export function useGetShotsWithJustIdsSuspenseQuery(
baseOptions?: Apollo.SuspenseQueryHookOptions<
GetShotsWithJustIdsQuery,
GetShotsWithJustIdsQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useSuspenseQuery<
GetShotsWithJustIdsQuery,
GetShotsWithJustIdsQueryVariables
>(GetShotsWithJustIdsDocument, options);
}
export type GetShotsWithJustIdsQueryHookResult = ReturnType<
typeof useGetShotsWithJustIdsQuery
>;
export type GetShotsWithJustIdsLazyQueryHookResult = ReturnType<
typeof useGetShotsWithJustIdsLazyQuery
>;
export type GetShotsWithJustIdsSuspenseQueryHookResult = ReturnType<
typeof useGetShotsWithJustIdsSuspenseQuery
>;
export type GetShotsWithJustIdsQueryResult = Apollo.QueryResult<
GetShotsWithJustIdsQuery,
GetShotsWithJustIdsQueryVariables
>;
export const GetShotsWithMetadataFilterResultDocument = gql`
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 {
@@ -4702,6 +5200,7 @@ export const GetShotsWithMetadataFilterResultDocument = gql`
* shotsOrdering: // value for 'shotsOrdering'
* limit: // value for 'limit'
* ids: // value for 'ids'
* countRespectsLimit: // value for 'countRespectsLimit'
* },
* });
*/
@@ -5051,6 +5550,7 @@ export const GetLoggedInUserDocument = gql`
activeVideoId
createdAt
updatedAt
videosPrivateByDefault
}
}
`;
@@ -5631,6 +6131,141 @@ export type GetUserFollowingFollowersQueryResult = Apollo.QueryResult<
GetUserFollowingFollowersQuery,
GetUserFollowingFollowersQueryVariables
>;
export const DoesUsernameExistDocument = gql`
query doesUsernameExist($candidateUsername: String!) {
doesUsernameExist(candidateUsername: $candidateUsername)
}
`;
/**
* __useDoesUsernameExistQuery__
*
* To run a query within a React component, call `useDoesUsernameExistQuery` and pass it any options that fit your needs.
* When your component renders, `useDoesUsernameExistQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
* const { data, loading, error } = useDoesUsernameExistQuery({
* variables: {
* candidateUsername: // value for 'candidateUsername'
* },
* });
*/
export function useDoesUsernameExistQuery(
baseOptions: Apollo.QueryHookOptions<
DoesUsernameExistQuery,
DoesUsernameExistQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useQuery<
DoesUsernameExistQuery,
DoesUsernameExistQueryVariables
>(DoesUsernameExistDocument, options);
}
export function useDoesUsernameExistLazyQuery(
baseOptions?: Apollo.LazyQueryHookOptions<
DoesUsernameExistQuery,
DoesUsernameExistQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useLazyQuery<
DoesUsernameExistQuery,
DoesUsernameExistQueryVariables
>(DoesUsernameExistDocument, options);
}
export function useDoesUsernameExistSuspenseQuery(
baseOptions?: Apollo.SuspenseQueryHookOptions<
DoesUsernameExistQuery,
DoesUsernameExistQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useSuspenseQuery<
DoesUsernameExistQuery,
DoesUsernameExistQueryVariables
>(DoesUsernameExistDocument, options);
}
export type DoesUsernameExistQueryHookResult = ReturnType<
typeof useDoesUsernameExistQuery
>;
export type DoesUsernameExistLazyQueryHookResult = ReturnType<
typeof useDoesUsernameExistLazyQuery
>;
export type DoesUsernameExistSuspenseQueryHookResult = ReturnType<
typeof useDoesUsernameExistSuspenseQuery
>;
export type DoesUsernameExistQueryResult = Apollo.QueryResult<
DoesUsernameExistQuery,
DoesUsernameExistQueryVariables
>;
export const EditUserDocument = gql`
mutation editUser(
$username: String
$fargoRating: Int
$videosPrivateByDefault: Boolean
) {
editUser(
input: {
username: $username
fargoRating: $fargoRating
videosPrivateByDefault: $videosPrivateByDefault
}
) {
id
firebaseUid
username
fargoRating
updatedAt
videosPrivateByDefault
}
}
`;
export type EditUserMutationFn = Apollo.MutationFunction<
EditUserMutation,
EditUserMutationVariables
>;
/**
* __useEditUserMutation__
*
* To run a mutation, you first call `useEditUserMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useEditUserMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [editUserMutation, { data, loading, error }] = useEditUserMutation({
* variables: {
* username: // value for 'username'
* fargoRating: // value for 'fargoRating'
* videosPrivateByDefault: // value for 'videosPrivateByDefault'
* },
* });
*/
export function useEditUserMutation(
baseOptions?: Apollo.MutationHookOptions<
EditUserMutation,
EditUserMutationVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useMutation<EditUserMutation, EditUserMutationVariables>(
EditUserDocument,
options,
);
}
export type EditUserMutationHookResult = ReturnType<typeof useEditUserMutation>;
export type EditUserMutationResult = Apollo.MutationResult<EditUserMutation>;
export type EditUserMutationOptions = Apollo.BaseMutationOptions<
EditUserMutation,
EditUserMutationVariables
>;
export const GetStreamMonitoringDetailsDocument = gql`
query GetStreamMonitoringDetails($videoId: Int!, $debuggingJson: JSON) {
getVideo(videoId: $videoId, debuggingJson: $debuggingJson) {
@@ -5639,44 +6274,7 @@ export const GetStreamMonitoringDetailsDocument = gql`
makePercentage
elapsedTime
currentHomography {
crop {
left
top
width
height
}
pockets {
left
top
width
height
}
sourcePoints {
topLeft {
x
y
}
topSide {
x
y
}
topRight {
x
y
}
bottomLeft {
x
y
}
bottomSide {
x
y
}
bottomRight {
x
y
}
}
...HomographyInfo
}
stream {
id
@@ -5697,6 +6295,7 @@ export const GetStreamMonitoringDetailsDocument = gql`
}
}
}
${HomographyInfoFragmentDoc}
`;
/**
@@ -6146,45 +6745,7 @@ export const GetVideoDocument = gql`
segmentDurations
}
homographyHistory {
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
}
}
...HomographyInfo
}
stream {
id
@@ -6201,6 +6762,7 @@ export const GetVideoDocument = gql`
}
}
}
${HomographyInfoFragmentDoc}
`;
/**
@@ -6634,6 +7196,59 @@ export type GetHeaderInfoByVideoIdQueryResult = Apollo.QueryResult<
GetHeaderInfoByVideoIdQuery,
GetHeaderInfoByVideoIdQueryVariables
>;
export const FindPrerecordTableLayoutDocument = gql`
mutation FindPrerecordTableLayout($b64Image: String!, $videoId: Int!) {
findPrerecordTableLayout(b64Image: $b64Image, videoId: $videoId) {
...HomographyInfo
}
}
${HomographyInfoFragmentDoc}
`;
export type FindPrerecordTableLayoutMutationFn = Apollo.MutationFunction<
FindPrerecordTableLayoutMutation,
FindPrerecordTableLayoutMutationVariables
>;
/**
* __useFindPrerecordTableLayoutMutation__
*
* To run a mutation, you first call `useFindPrerecordTableLayoutMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useFindPrerecordTableLayoutMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [findPrerecordTableLayoutMutation, { data, loading, error }] = useFindPrerecordTableLayoutMutation({
* variables: {
* b64Image: // value for 'b64Image'
* videoId: // value for 'videoId'
* },
* });
*/
export function useFindPrerecordTableLayoutMutation(
baseOptions?: Apollo.MutationHookOptions<
FindPrerecordTableLayoutMutation,
FindPrerecordTableLayoutMutationVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useMutation<
FindPrerecordTableLayoutMutation,
FindPrerecordTableLayoutMutationVariables
>(FindPrerecordTableLayoutDocument, options);
}
export type FindPrerecordTableLayoutMutationHookResult = ReturnType<
typeof useFindPrerecordTableLayoutMutation
>;
export type FindPrerecordTableLayoutMutationResult =
Apollo.MutationResult<FindPrerecordTableLayoutMutation>;
export type FindPrerecordTableLayoutMutationOptions =
Apollo.BaseMutationOptions<
FindPrerecordTableLayoutMutation,
FindPrerecordTableLayoutMutationVariables
>;
export const CreateUploadStreamDocument = gql`
mutation CreateUploadStream($videoMetadataInput: VideoMetadataInput!) {
createUploadStream(videoMetadata: $videoMetadataInput) {

View File

@@ -1,3 +1,4 @@
# DO NOT USE: use getVideoFeed instead
query GetFeed(
$limit: Int! = 5
$after: String = null
@@ -38,3 +39,61 @@ query GetFeed(
}
}
}
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 {
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
}
}
}

View File

@@ -40,6 +40,7 @@ mutation UpdateShotAnnotations(
}
}
## Should be deprecated
query GetShotsWithVideoGql(
$filterInput: FilterInput!
$shotsOrdering: GetShotsOrdering
@@ -61,18 +62,40 @@ 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 {

View File

@@ -41,6 +41,7 @@ query getLoggedInUser {
activeVideoId
createdAt
updatedAt
videosPrivateByDefault
}
}
@@ -131,3 +132,28 @@ query getUserFollowingFollowers {
}
}
}
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
}
}

View File

@@ -5,44 +5,7 @@ query GetStreamMonitoringDetails($videoId: Int!, $debuggingJson: JSON) {
makePercentage
elapsedTime
currentHomography {
crop {
left
top
width
height
}
pockets {
left
top
width
height
}
sourcePoints {
topLeft {
x
y
}
topSide {
x
y
}
topRight {
x
y
}
bottomLeft {
x
y
}
bottomSide {
x
y
}
bottomRight {
x
y
}
}
...HomographyInfo
}
stream {
id
@@ -154,45 +117,7 @@ query GetVideo($videoId: Int!) {
segmentDurations
}
homographyHistory {
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
}
}
...HomographyInfo
}
stream {
id
@@ -288,3 +213,51 @@ 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
}
}
}

View File

@@ -15,17 +15,20 @@ type Query {
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!]!
@@ -43,7 +46,7 @@ type Query {
limit: Int = 100
after: String = null
): UserRelationshipsResult!
getPlayTime(userId: Int!): UserPlayTimeGQL!
getPlayTime(userId: Int!, filters: VideoFilterInput = null): UserPlayTimeGQL!
getUserVideos(
userId: Int = null
limit: Int! = 5
@@ -397,6 +400,7 @@ type UserGQL {
profileImageUri: String
createdAt: DateTime
updatedAt: DateTime
videosPrivateByDefault: Boolean
following: [UserGQL!]
followers: [UserGQL!]
}
@@ -434,6 +438,7 @@ type VideoGQL {
elapsedTime: Float
framesPerSecond: Float!
tableSize: Float!
private: Boolean!
stream: UploadStreamGQL
playlist: HLSPlaylistGQL
tags: [VideoTag!]!
@@ -506,6 +511,7 @@ type VideoTagClass {
}
type HomographyInfoGQL {
id: Int!
frameIndex: Int!
crop: BoundingBoxGQL!
pockets: [BoundingBoxGQL!]!
@@ -535,6 +541,7 @@ type IntPoint2D {
}
type VideoProcessingGQL {
id: Int!
errors: [VideoProcessingErrorGQL!]!
status: ProcessingStatusEnum!
statuses: [VideoProcessingStatusGQL!]!
@@ -617,6 +624,12 @@ type UserPlayTimeGQL {
totalSeconds: Float!
}
input VideoFilterInput {
isStreamCompleted: Boolean = null
requireCursorCompletion: Boolean! = true
createdAt: DateRangeFilter = null
}
type VideoHistoryGQL {
videos: [VideoGQL!]!
pageInfo: PageInfoGQL!
@@ -627,11 +640,6 @@ type PageInfoGQL {
endCursor: String
}
input VideoFilterInput {
isStreamCompleted: Boolean = null
requireCursorCompletion: Boolean! = true
}
type TagGQL {
name: String!
id: Int!
@@ -665,6 +673,7 @@ type Mutation {
editUser(input: EditUserInputGQL!): UserGQL!
followUser(followedUserId: Int!): UserGQL!
unfollowUser(followedUserId: Int!): UserGQL!
findPrerecordTableLayout(b64Image: String!, videoId: Int!): HomographyInfoGQL
createUploadStream(
videoMetadata: VideoMetadataInput!
): CreateUploadStreamReturn!
@@ -753,6 +762,7 @@ type TooManyProfileImageUploadsErr {
input EditUserInputGQL {
username: String = null
fargoRating: Int = null
videosPrivateByDefault: Boolean = null
}
type CreateUploadStreamReturn {
@@ -767,6 +777,7 @@ input VideoMetadataInput {
tableSize: Float = null
lastIntendedSegmentBound: Int = null
streamSegmentType: StreamSegmentTypeEnum = null
private: Boolean = null
endStream: Boolean! = false
resolution: VideoResolution = null
framesPerSecond: Float = null