Compare commits
3 Commits
fe9b9ac9cc
...
ivan/shot-
| Author | SHA1 | Date | |
|---|---|---|---|
| 9b6b08c1ec | |||
| 0f01c71a43 | |||
| 238ade1384 |
125
src/index.tsx
125
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",
|
||||
}
|
||||
@@ -3864,6 +3882,7 @@ export type ShotProjectionGql = {
|
||||
|
||||
export type ShotTableStateGql = {
|
||||
__typename?: "ShotTableStateGQL";
|
||||
frameImage?: Maybe<Scalars["String"]["output"]>;
|
||||
frameIndex: Scalars["Int"]["output"];
|
||||
shotId: Scalars["Int"]["output"];
|
||||
tableState: TableStateGql;
|
||||
@@ -7238,6 +7257,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"];
|
||||
}>;
|
||||
@@ -7697,6 +7736,7 @@ export type GetShotTableStateQuery = {
|
||||
shotId: number;
|
||||
videoId: number;
|
||||
frameIndex: number;
|
||||
frameImage?: string | null;
|
||||
tableState: {
|
||||
__typename?: "TableStateGQL";
|
||||
identifierToPosition: Array<Array<number>>;
|
||||
@@ -15923,6 +15963,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) {
|
||||
@@ -16393,6 +16517,7 @@ export const GetShotTableStateDocument = gql`
|
||||
shotId
|
||||
videoId
|
||||
frameIndex
|
||||
frameImage
|
||||
tableState {
|
||||
...TableStateLayoutFields
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -44,9 +44,10 @@ fragment DetectionPocketPointFields on PocketPointsGQL {
|
||||
# positions. Boxes, pocket boxes, and source points share the crop's
|
||||
# coordinate space; the crop locates that space in the full frame.
|
||||
#
|
||||
# Only the photo query selects this. The live and shot queries read a
|
||||
# frame out of a video the app never holds, so there is no image to
|
||||
# overlay, and getLiveTableState is polled every five seconds.
|
||||
# Only the photo query selects this. The shot query returns its source
|
||||
# frame (frameImage) but positions there come from the stored homography,
|
||||
# so there are no fresh boxes to draw; the live query returns no image at
|
||||
# all and is polled every five seconds.
|
||||
fragment TableStateDetectionFields on TableStateGQL {
|
||||
identifierToBox {
|
||||
...DetectionBoxFields
|
||||
@@ -97,6 +98,9 @@ query GetShotTableState($shotId: Int!) {
|
||||
shotId
|
||||
videoId
|
||||
frameIndex
|
||||
# The b64 JPEG frame the layout was detected in, so the client can show
|
||||
# the shot's actual starting frame instead of the video's thumbnail.
|
||||
frameImage
|
||||
tableState {
|
||||
...TableStateLayoutFields
|
||||
}
|
||||
|
||||
@@ -250,11 +250,6 @@ input CreatePoolHallCameraInput {
|
||||
claimTermsText: String = null
|
||||
}
|
||||
|
||||
input CreateShotShareLinkInput {
|
||||
shotIds: [Int!]!
|
||||
paddingSeconds: Float = null
|
||||
}
|
||||
|
||||
input CreatePoolHallInput {
|
||||
name: String!
|
||||
address: String = null
|
||||
@@ -1081,6 +1076,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 +1472,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
|
||||
}
|
||||
@@ -1558,6 +1568,7 @@ type ShotTableStateGQL {
|
||||
videoId: Int!
|
||||
frameIndex: Int!
|
||||
tableState: TableStateGQL!
|
||||
frameImage: String
|
||||
}
|
||||
|
||||
input ShotsOrderingComponent @oneOf {
|
||||
@@ -1951,11 +1962,6 @@ type UserSubscriptionStatusGQL {
|
||||
stripeSubscriptionId: String
|
||||
}
|
||||
|
||||
type ShareLinkGQL {
|
||||
slug: String!
|
||||
url: String!
|
||||
}
|
||||
|
||||
type VideoExportJobGQL {
|
||||
id: Int!
|
||||
videoId: Int!
|
||||
|
||||
Reference in New Issue
Block a user