Add Session Coach generation status query
All checks were successful
Tests / Tests (pull_request) Successful in 40s
All checks were successful
Tests / Tests (pull_request) Successful in 40s
This commit is contained in:
122
src/index.tsx
122
src/index.tsx
@@ -3132,6 +3132,7 @@ export type Query = {
|
||||
getResolvedTier: ResolvedTierGql;
|
||||
getRuns: GetRunsResult;
|
||||
getSessionCoach: SessionCoachGql;
|
||||
getSessionCoachGenerationStatus?: Maybe<SessionCoachGenerationStatusGql>;
|
||||
getShotAnnotationTypes: Array<ShotAnnotationTypeGql>;
|
||||
getShotTableState: ShotTableStateGql;
|
||||
getShots: Array<ShotGql>;
|
||||
@@ -3293,6 +3294,11 @@ export type QueryGetSessionCoachArgs = {
|
||||
videoId: Scalars["Int"]["input"];
|
||||
};
|
||||
|
||||
export type QueryGetSessionCoachGenerationStatusArgs = {
|
||||
generationId: Scalars["ID"]["input"];
|
||||
videoId: Scalars["Int"]["input"];
|
||||
};
|
||||
|
||||
export type QueryGetShotAnnotationTypesArgs = {
|
||||
errorTypes?: InputMaybe<Scalars["Boolean"]["input"]>;
|
||||
};
|
||||
@@ -3772,6 +3778,18 @@ export enum SessionCoachGenerationStateEnum {
|
||||
Running = "RUNNING",
|
||||
}
|
||||
|
||||
export type SessionCoachGenerationStatusGql = {
|
||||
__typename?: "SessionCoachGenerationStatusGQL";
|
||||
completedAt?: Maybe<Scalars["DateTime"]["output"]>;
|
||||
createdAt: Scalars["DateTime"]["output"];
|
||||
enqueueCount: Scalars["Int"]["output"];
|
||||
id: Scalars["ID"]["output"];
|
||||
lastEnqueuedAt?: Maybe<Scalars["DateTime"]["output"]>;
|
||||
startedAt?: Maybe<Scalars["DateTime"]["output"]>;
|
||||
state: SessionCoachGenerationStateEnum;
|
||||
updatedAt: Scalars["DateTime"]["output"];
|
||||
};
|
||||
|
||||
export enum SessionCoachIneligibilityReasonEnum {
|
||||
Multiplayer = "MULTIPLAYER",
|
||||
}
|
||||
@@ -7238,6 +7256,26 @@ export type GetSessionCoachQuery = {
|
||||
};
|
||||
};
|
||||
|
||||
export type GetSessionCoachGenerationStatusQueryVariables = Exact<{
|
||||
videoId: Scalars["Int"]["input"];
|
||||
generationId: Scalars["ID"]["input"];
|
||||
}>;
|
||||
|
||||
export type GetSessionCoachGenerationStatusQuery = {
|
||||
__typename?: "Query";
|
||||
getSessionCoachGenerationStatus?: {
|
||||
__typename?: "SessionCoachGenerationStatusGQL";
|
||||
id: string;
|
||||
state: SessionCoachGenerationStateEnum;
|
||||
createdAt: any;
|
||||
updatedAt: any;
|
||||
startedAt?: any | null;
|
||||
lastEnqueuedAt?: any | null;
|
||||
enqueueCount: number;
|
||||
completedAt?: any | null;
|
||||
} | null;
|
||||
};
|
||||
|
||||
export type RequestSessionCoachGenerationMutationVariables = Exact<{
|
||||
videoId: Scalars["Int"]["input"];
|
||||
}>;
|
||||
@@ -15923,6 +15961,90 @@ export type GetSessionCoachQueryResult = Apollo.QueryResult<
|
||||
GetSessionCoachQuery,
|
||||
GetSessionCoachQueryVariables
|
||||
>;
|
||||
export const GetSessionCoachGenerationStatusDocument = gql`
|
||||
query GetSessionCoachGenerationStatus($videoId: Int!, $generationId: ID!) {
|
||||
getSessionCoachGenerationStatus(
|
||||
videoId: $videoId
|
||||
generationId: $generationId
|
||||
) {
|
||||
id
|
||||
state
|
||||
createdAt
|
||||
updatedAt
|
||||
startedAt
|
||||
lastEnqueuedAt
|
||||
enqueueCount
|
||||
completedAt
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
/**
|
||||
* __useGetSessionCoachGenerationStatusQuery__
|
||||
*
|
||||
* To run a query within a React component, call `useGetSessionCoachGenerationStatusQuery` and pass it any options that fit your needs.
|
||||
* When your component renders, `useGetSessionCoachGenerationStatusQuery` 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 } = useGetSessionCoachGenerationStatusQuery({
|
||||
* variables: {
|
||||
* videoId: // value for 'videoId'
|
||||
* generationId: // value for 'generationId'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
export function useGetSessionCoachGenerationStatusQuery(
|
||||
baseOptions: Apollo.QueryHookOptions<
|
||||
GetSessionCoachGenerationStatusQuery,
|
||||
GetSessionCoachGenerationStatusQueryVariables
|
||||
>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useQuery<
|
||||
GetSessionCoachGenerationStatusQuery,
|
||||
GetSessionCoachGenerationStatusQueryVariables
|
||||
>(GetSessionCoachGenerationStatusDocument, options);
|
||||
}
|
||||
export function useGetSessionCoachGenerationStatusLazyQuery(
|
||||
baseOptions?: Apollo.LazyQueryHookOptions<
|
||||
GetSessionCoachGenerationStatusQuery,
|
||||
GetSessionCoachGenerationStatusQueryVariables
|
||||
>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useLazyQuery<
|
||||
GetSessionCoachGenerationStatusQuery,
|
||||
GetSessionCoachGenerationStatusQueryVariables
|
||||
>(GetSessionCoachGenerationStatusDocument, options);
|
||||
}
|
||||
export function useGetSessionCoachGenerationStatusSuspenseQuery(
|
||||
baseOptions?: Apollo.SuspenseQueryHookOptions<
|
||||
GetSessionCoachGenerationStatusQuery,
|
||||
GetSessionCoachGenerationStatusQueryVariables
|
||||
>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useSuspenseQuery<
|
||||
GetSessionCoachGenerationStatusQuery,
|
||||
GetSessionCoachGenerationStatusQueryVariables
|
||||
>(GetSessionCoachGenerationStatusDocument, options);
|
||||
}
|
||||
export type GetSessionCoachGenerationStatusQueryHookResult = ReturnType<
|
||||
typeof useGetSessionCoachGenerationStatusQuery
|
||||
>;
|
||||
export type GetSessionCoachGenerationStatusLazyQueryHookResult = ReturnType<
|
||||
typeof useGetSessionCoachGenerationStatusLazyQuery
|
||||
>;
|
||||
export type GetSessionCoachGenerationStatusSuspenseQueryHookResult = ReturnType<
|
||||
typeof useGetSessionCoachGenerationStatusSuspenseQuery
|
||||
>;
|
||||
export type GetSessionCoachGenerationStatusQueryResult = Apollo.QueryResult<
|
||||
GetSessionCoachGenerationStatusQuery,
|
||||
GetSessionCoachGenerationStatusQueryVariables
|
||||
>;
|
||||
export const RequestSessionCoachGenerationDocument = gql`
|
||||
mutation RequestSessionCoachGeneration($videoId: Int!) {
|
||||
requestSessionCoachGeneration(videoId: $videoId) {
|
||||
|
||||
@@ -36,6 +36,22 @@ query GetSessionCoach($videoId: Int!) {
|
||||
}
|
||||
}
|
||||
|
||||
query GetSessionCoachGenerationStatus($videoId: Int!, $generationId: ID!) {
|
||||
getSessionCoachGenerationStatus(
|
||||
videoId: $videoId
|
||||
generationId: $generationId
|
||||
) {
|
||||
id
|
||||
state
|
||||
createdAt
|
||||
updatedAt
|
||||
startedAt
|
||||
lastEnqueuedAt
|
||||
enqueueCount
|
||||
completedAt
|
||||
}
|
||||
}
|
||||
|
||||
mutation RequestSessionCoachGeneration($videoId: Int!) {
|
||||
requestSessionCoachGeneration(videoId: $videoId) {
|
||||
state
|
||||
|
||||
@@ -1081,6 +1081,10 @@ type Query {
|
||||
limit: Int! = 500
|
||||
countRespectsLimit: Boolean! = false
|
||||
): GetRunsResult!
|
||||
getSessionCoachGenerationStatus(
|
||||
videoId: Int!
|
||||
generationId: ID!
|
||||
): SessionCoachGenerationStatusGQL
|
||||
getSessionCoach(videoId: Int!): SessionCoachGQL!
|
||||
videoPlayerClusters(videoId: Int!): [PlayerClusterGQL!]!
|
||||
getShotAnnotationTypes(errorTypes: Boolean = false): [ShotAnnotationTypeGQL!]!
|
||||
@@ -1473,6 +1477,17 @@ enum SessionCoachGenerationStateEnum {
|
||||
FAILED
|
||||
}
|
||||
|
||||
type SessionCoachGenerationStatusGQL {
|
||||
id: ID!
|
||||
state: SessionCoachGenerationStateEnum!
|
||||
createdAt: DateTime!
|
||||
updatedAt: DateTime!
|
||||
startedAt: DateTime
|
||||
lastEnqueuedAt: DateTime
|
||||
enqueueCount: Int!
|
||||
completedAt: DateTime
|
||||
}
|
||||
|
||||
enum SessionCoachIneligibilityReasonEnum {
|
||||
MULTIPLAYER
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user