Compare commits

..

20 Commits

Author SHA1 Message Date
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
5 changed files with 507 additions and 0 deletions

View File

@@ -2002,6 +2002,7 @@ export type MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailed
export type Mutation = {
__typename?: "Mutation";
addAnnotationToShot: AddShotAnnotationReturn;
checkHomographyIsValid?: Maybe<HomographyInfoGql>;
createBucketSet: BucketSetGql;
createUploadStream: CreateUploadStreamReturn;
deleteVideo: Scalars["Boolean"]["output"];
@@ -2024,6 +2025,11 @@ export type MutationAddAnnotationToShotArgs = {
shotId: Scalars["Int"]["input"];
};
export type MutationCheckHomographyIsValidArgs = {
b64Image: Scalars["String"]["input"];
videoId: Scalars["Int"]["input"];
};
export type MutationCreateBucketSetArgs = {
params: CreateBucketSetInput;
};
@@ -2211,6 +2217,7 @@ export type QueryGetMedalsArgs = {
};
export type QueryGetOrderedShotsArgs = {
countRespectsLimit?: Scalars["Boolean"]["input"];
filterInput: FilterInput;
ids?: InputMaybe<Array<Scalars["Int"]["input"]>>;
limit?: Scalars["Int"]["input"];
@@ -2226,6 +2233,7 @@ export type QueryGetShotAnnotationTypesArgs = {
};
export type QueryGetShotsArgs = {
countRespectsLimit?: Scalars["Boolean"]["input"];
filterInput: FilterInput;
limit?: Scalars["Int"]["input"];
shotsPagination?: InputMaybe<GetShotsPagination>;
@@ -2236,6 +2244,7 @@ export type QueryGetShotsByIdsArgs = {
};
export type QueryGetShotsWithMetadataArgs = {
countRespectsLimit?: Scalars["Boolean"]["input"];
filterInput: FilterInput;
ids?: InputMaybe<Array<Scalars["Int"]["input"]>>;
limit?: Scalars["Int"]["input"];
@@ -2783,6 +2792,108 @@ 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;
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";
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;
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";
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 +2994,26 @@ export type GetShotsWithVideoGqlQuery = {
};
};
export type GetShotsWithJustIdsQueryVariables = Exact<{
filterInput: FilterInput;
shotsOrdering?: InputMaybe<GetShotsOrdering>;
limit?: InputMaybe<Scalars["Int"]["input"]>;
}>;
export type GetShotsWithJustIdsQuery = {
__typename?: "Query";
getOrderedShots: {
__typename?: "GetShotsResult";
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 = {
@@ -3294,6 +3420,15 @@ export type GetUserFollowingFollowersQuery = {
} | null;
};
export type DoesUsernameExistQueryVariables = Exact<{
candidateUsername: Scalars["String"]["input"];
}>;
export type DoesUsernameExistQuery = {
__typename?: "Query";
doesUsernameExist: boolean;
};
export type GetStreamMonitoringDetailsQueryVariables = Exact<{
videoId: Scalars["Int"]["input"];
debuggingJson?: InputMaybe<Scalars["JSON"]["input"]>;
@@ -3895,6 +4030,47 @@ 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
elapsedTime
screenshotUri
stream {
id
isCompleted
}
tableSize
tags {
tagClasses {
name
}
name
}
currentProcessing {
errors {
message
}
status
statuses {
status
}
}
}
`;
export const ShotWithAllFeaturesFragmentDoc = gql`
fragment ShotWithAllFeatures on ShotGQL {
id
@@ -4272,6 +4448,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 +4925,106 @@ export type GetShotsWithVideoGqlQueryResult = Apollo.QueryResult<
GetShotsWithVideoGqlQuery,
GetShotsWithVideoGqlQueryVariables
>;
export const GetShotsWithJustIdsDocument = gql`
query GetShotsWithJustIds(
$filterInput: FilterInput!
$shotsOrdering: GetShotsOrdering
$limit: Int
) {
getOrderedShots(
filterInput: $filterInput
shotsOrdering: $shotsOrdering
limit: $limit
) {
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'
* },
* });
*/
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 +5052,7 @@ export const GetShotsWithMetadataFilterResultDocument = gql`
* shotsOrdering: // value for 'shotsOrdering'
* limit: // value for 'limit'
* ids: // value for 'ids'
* countRespectsLimit: // value for 'countRespectsLimit'
* },
* });
*/
@@ -5631,6 +5982,77 @@ 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 GetStreamMonitoringDetailsDocument = gql`
query GetStreamMonitoringDetails($videoId: Int!, $debuggingJson: JSON) {
getVideo(videoId: $videoId, debuggingJson: $debuggingJson) {

View File

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

View File

@@ -131,3 +131,7 @@ query getUserFollowingFollowers {
}
}
}
query doesUsernameExist($candidateUsername: String!) {
doesUsernameExist(candidateUsername: $candidateUsername)
}

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!]!
@@ -665,6 +668,7 @@ type Mutation {
editUser(input: EditUserInputGQL!): UserGQL!
followUser(followedUserId: Int!): UserGQL!
unfollowUser(followedUserId: Int!): UserGQL!
checkHomographyIsValid(b64Image: String!, videoId: Int!): HomographyInfoGQL
createUploadStream(
videoMetadata: VideoMetadataInput!
): CreateUploadStreamReturn!