Compare commits
10 Commits
84d3a0252d
...
dean/playe
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9250e4c639 | ||
|
|
5cf2dbaf01 | ||
| 239a143554 | |||
|
|
296522afb8 | ||
| f42579076e | |||
|
|
0c9eb4945a | ||
| 1182c15004 | |||
|
|
755336b16a | ||
| c1efe9f5f2 | |||
|
|
a3460842ac |
396
src/index.tsx
396
src/index.tsx
@@ -207,6 +207,7 @@ export enum ClientUploadStatusEnum {
|
|||||||
|
|
||||||
export type ClusterAssignmentInput = {
|
export type ClusterAssignmentInput = {
|
||||||
clusterId: Scalars["Int"]["input"];
|
clusterId: Scalars["Int"]["input"];
|
||||||
|
score?: InputMaybe<Scalars["Int"]["input"]>;
|
||||||
userId?: InputMaybe<Scalars["Int"]["input"]>;
|
userId?: InputMaybe<Scalars["Int"]["input"]>;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -2700,8 +2701,11 @@ export type PlayerClusterGql = {
|
|||||||
clusterId: Scalars["Int"]["output"];
|
clusterId: Scalars["Int"]["output"];
|
||||||
confirmed: Scalars["Boolean"]["output"];
|
confirmed: Scalars["Boolean"]["output"];
|
||||||
nShots: Scalars["Int"]["output"];
|
nShots: Scalars["Int"]["output"];
|
||||||
|
profileImageUri?: Maybe<Scalars["String"]["output"]>;
|
||||||
|
score?: Maybe<Scalars["Int"]["output"]>;
|
||||||
shots: Array<PlayerClusterShotGql>;
|
shots: Array<PlayerClusterShotGql>;
|
||||||
userId?: Maybe<Scalars["Int"]["output"]>;
|
userId?: Maybe<Scalars["Int"]["output"]>;
|
||||||
|
username?: Maybe<Scalars["String"]["output"]>;
|
||||||
videoId: Scalars["Int"]["output"];
|
videoId: Scalars["Int"]["output"];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -2718,6 +2722,22 @@ export type PlayerClusterShotGql = {
|
|||||||
shotId: Scalars["Int"]["output"];
|
shotId: Scalars["Int"]["output"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type PlayerSummaryGql = {
|
||||||
|
__typename?: "PlayerSummaryGQL";
|
||||||
|
averageDifficulty?: Maybe<Scalars["Float"]["output"]>;
|
||||||
|
averageTimeBetweenShots?: Maybe<Scalars["Float"]["output"]>;
|
||||||
|
clusterId: Scalars["Int"]["output"];
|
||||||
|
longestRun: Scalars["Int"]["output"];
|
||||||
|
makePercentage: Scalars["Float"]["output"];
|
||||||
|
profileImageUri?: Maybe<Scalars["String"]["output"]>;
|
||||||
|
representativeFullFrameUrl?: Maybe<Scalars["String"]["output"]>;
|
||||||
|
score?: Maybe<Scalars["Int"]["output"]>;
|
||||||
|
totalShots: Scalars["Int"]["output"];
|
||||||
|
totalShotsMade: Scalars["Int"]["output"];
|
||||||
|
userId?: Maybe<Scalars["Int"]["output"]>;
|
||||||
|
username?: Maybe<Scalars["String"]["output"]>;
|
||||||
|
};
|
||||||
|
|
||||||
export enum PocketEnum {
|
export enum PocketEnum {
|
||||||
Corner = "CORNER",
|
Corner = "CORNER",
|
||||||
Side = "SIDE",
|
Side = "SIDE",
|
||||||
@@ -3557,6 +3577,7 @@ export type VideoGql = {
|
|||||||
medianRun?: Maybe<Scalars["Float"]["output"]>;
|
medianRun?: Maybe<Scalars["Float"]["output"]>;
|
||||||
name?: Maybe<Scalars["String"]["output"]>;
|
name?: Maybe<Scalars["String"]["output"]>;
|
||||||
owner?: Maybe<UserGql>;
|
owner?: Maybe<UserGql>;
|
||||||
|
playerSummaries: Array<PlayerSummaryGql>;
|
||||||
playlist?: Maybe<HlsPlaylistGql>;
|
playlist?: Maybe<HlsPlaylistGql>;
|
||||||
pocketSize?: Maybe<Scalars["Float"]["output"]>;
|
pocketSize?: Maybe<Scalars["Float"]["output"]>;
|
||||||
private: Scalars["Boolean"]["output"];
|
private: Scalars["Boolean"]["output"];
|
||||||
@@ -4174,7 +4195,26 @@ export type GetFeedQuery = {
|
|||||||
lastIntendedSegmentBound?: number | null;
|
lastIntendedSegmentBound?: number | null;
|
||||||
streamSegmentType: StreamSegmentTypeEnum;
|
streamSegmentType: StreamSegmentTypeEnum;
|
||||||
} | null;
|
} | null;
|
||||||
tags: Array<{ __typename?: "VideoTag"; name: string }>;
|
tags: Array<{
|
||||||
|
__typename?: "VideoTag";
|
||||||
|
name: string;
|
||||||
|
tagClasses: Array<{ __typename?: "VideoTagClass"; name: string }>;
|
||||||
|
}>;
|
||||||
|
playerSummaries: Array<{
|
||||||
|
__typename?: "PlayerSummaryGQL";
|
||||||
|
clusterId: number;
|
||||||
|
userId?: number | null;
|
||||||
|
username?: string | null;
|
||||||
|
profileImageUri?: string | null;
|
||||||
|
representativeFullFrameUrl?: string | null;
|
||||||
|
totalShots: number;
|
||||||
|
totalShotsMade: number;
|
||||||
|
makePercentage: number;
|
||||||
|
score?: number | null;
|
||||||
|
longestRun: number;
|
||||||
|
averageDifficulty?: number | null;
|
||||||
|
averageTimeBetweenShots?: number | null;
|
||||||
|
}>;
|
||||||
currentProcessing?: {
|
currentProcessing?: {
|
||||||
__typename?: "VideoProcessingGQL";
|
__typename?: "VideoProcessingGQL";
|
||||||
id: number;
|
id: number;
|
||||||
@@ -4259,7 +4299,26 @@ export type VideoCardFieldsFragment = {
|
|||||||
lastIntendedSegmentBound?: number | null;
|
lastIntendedSegmentBound?: number | null;
|
||||||
streamSegmentType: StreamSegmentTypeEnum;
|
streamSegmentType: StreamSegmentTypeEnum;
|
||||||
} | null;
|
} | null;
|
||||||
tags: Array<{ __typename?: "VideoTag"; name: string }>;
|
tags: Array<{
|
||||||
|
__typename?: "VideoTag";
|
||||||
|
name: string;
|
||||||
|
tagClasses: Array<{ __typename?: "VideoTagClass"; name: string }>;
|
||||||
|
}>;
|
||||||
|
playerSummaries: Array<{
|
||||||
|
__typename?: "PlayerSummaryGQL";
|
||||||
|
clusterId: number;
|
||||||
|
userId?: number | null;
|
||||||
|
username?: string | null;
|
||||||
|
profileImageUri?: string | null;
|
||||||
|
representativeFullFrameUrl?: string | null;
|
||||||
|
totalShots: number;
|
||||||
|
totalShotsMade: number;
|
||||||
|
makePercentage: number;
|
||||||
|
score?: number | null;
|
||||||
|
longestRun: number;
|
||||||
|
averageDifficulty?: number | null;
|
||||||
|
averageTimeBetweenShots?: number | null;
|
||||||
|
}>;
|
||||||
currentProcessing?: {
|
currentProcessing?: {
|
||||||
__typename?: "VideoProcessingGQL";
|
__typename?: "VideoProcessingGQL";
|
||||||
id: number;
|
id: number;
|
||||||
@@ -4358,7 +4417,26 @@ export type GetVideoFeedQuery = {
|
|||||||
lastIntendedSegmentBound?: number | null;
|
lastIntendedSegmentBound?: number | null;
|
||||||
streamSegmentType: StreamSegmentTypeEnum;
|
streamSegmentType: StreamSegmentTypeEnum;
|
||||||
} | null;
|
} | null;
|
||||||
tags: Array<{ __typename?: "VideoTag"; name: string }>;
|
tags: Array<{
|
||||||
|
__typename?: "VideoTag";
|
||||||
|
name: string;
|
||||||
|
tagClasses: Array<{ __typename?: "VideoTagClass"; name: string }>;
|
||||||
|
}>;
|
||||||
|
playerSummaries: Array<{
|
||||||
|
__typename?: "PlayerSummaryGQL";
|
||||||
|
clusterId: number;
|
||||||
|
userId?: number | null;
|
||||||
|
username?: string | null;
|
||||||
|
profileImageUri?: string | null;
|
||||||
|
representativeFullFrameUrl?: string | null;
|
||||||
|
totalShots: number;
|
||||||
|
totalShotsMade: number;
|
||||||
|
makePercentage: number;
|
||||||
|
score?: number | null;
|
||||||
|
longestRun: number;
|
||||||
|
averageDifficulty?: number | null;
|
||||||
|
averageTimeBetweenShots?: number | null;
|
||||||
|
}>;
|
||||||
currentProcessing?: {
|
currentProcessing?: {
|
||||||
__typename?: "VideoProcessingGQL";
|
__typename?: "VideoProcessingGQL";
|
||||||
id: number;
|
id: number;
|
||||||
@@ -4929,6 +5007,121 @@ export type GetRunsWithTimestampsQuery = {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type PlayerSummaryFieldsFragment = {
|
||||||
|
__typename?: "PlayerSummaryGQL";
|
||||||
|
clusterId: number;
|
||||||
|
userId?: number | null;
|
||||||
|
username?: string | null;
|
||||||
|
profileImageUri?: string | null;
|
||||||
|
representativeFullFrameUrl?: string | null;
|
||||||
|
totalShots: number;
|
||||||
|
totalShotsMade: number;
|
||||||
|
makePercentage: number;
|
||||||
|
score?: number | null;
|
||||||
|
longestRun: number;
|
||||||
|
averageDifficulty?: number | null;
|
||||||
|
averageTimeBetweenShots?: number | null;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type PlayerClusterShotFieldsFragment = {
|
||||||
|
__typename?: "PlayerClusterShotGQL";
|
||||||
|
shotId: number;
|
||||||
|
bboxX1: number;
|
||||||
|
bboxY1: number;
|
||||||
|
bboxX2: number;
|
||||||
|
bboxY2: number;
|
||||||
|
confidence: number;
|
||||||
|
isConfirmed: boolean;
|
||||||
|
cropUrl?: string | null;
|
||||||
|
fullFrameUrl?: string | null;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type PlayerClusterFieldsFragment = {
|
||||||
|
__typename?: "PlayerClusterGQL";
|
||||||
|
videoId: number;
|
||||||
|
clusterId: number;
|
||||||
|
nShots: number;
|
||||||
|
userId?: number | null;
|
||||||
|
username?: string | null;
|
||||||
|
profileImageUri?: string | null;
|
||||||
|
confirmed: boolean;
|
||||||
|
score?: number | null;
|
||||||
|
shots: Array<{
|
||||||
|
__typename?: "PlayerClusterShotGQL";
|
||||||
|
shotId: number;
|
||||||
|
bboxX1: number;
|
||||||
|
bboxY1: number;
|
||||||
|
bboxX2: number;
|
||||||
|
bboxY2: number;
|
||||||
|
confidence: number;
|
||||||
|
isConfirmed: boolean;
|
||||||
|
cropUrl?: string | null;
|
||||||
|
fullFrameUrl?: string | null;
|
||||||
|
}>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type VideoPlayerClustersQueryVariables = Exact<{
|
||||||
|
videoId: Scalars["Int"]["input"];
|
||||||
|
}>;
|
||||||
|
|
||||||
|
export type VideoPlayerClustersQuery = {
|
||||||
|
__typename?: "Query";
|
||||||
|
videoPlayerClusters: Array<{
|
||||||
|
__typename?: "PlayerClusterGQL";
|
||||||
|
videoId: number;
|
||||||
|
clusterId: number;
|
||||||
|
nShots: number;
|
||||||
|
userId?: number | null;
|
||||||
|
username?: string | null;
|
||||||
|
profileImageUri?: string | null;
|
||||||
|
confirmed: boolean;
|
||||||
|
score?: number | null;
|
||||||
|
shots: Array<{
|
||||||
|
__typename?: "PlayerClusterShotGQL";
|
||||||
|
shotId: number;
|
||||||
|
bboxX1: number;
|
||||||
|
bboxY1: number;
|
||||||
|
bboxX2: number;
|
||||||
|
bboxY2: number;
|
||||||
|
confidence: number;
|
||||||
|
isConfirmed: boolean;
|
||||||
|
cropUrl?: string | null;
|
||||||
|
fullFrameUrl?: string | null;
|
||||||
|
}>;
|
||||||
|
}>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type FinalizePlayerAssignmentsMutationVariables = Exact<{
|
||||||
|
input: FinalizePlayerAssignmentsInput;
|
||||||
|
}>;
|
||||||
|
|
||||||
|
export type FinalizePlayerAssignmentsMutation = {
|
||||||
|
__typename?: "Mutation";
|
||||||
|
finalizePlayerAssignments: Array<{
|
||||||
|
__typename?: "PlayerClusterGQL";
|
||||||
|
videoId: number;
|
||||||
|
clusterId: number;
|
||||||
|
nShots: number;
|
||||||
|
userId?: number | null;
|
||||||
|
username?: string | null;
|
||||||
|
profileImageUri?: string | null;
|
||||||
|
confirmed: boolean;
|
||||||
|
score?: number | null;
|
||||||
|
shots: Array<{
|
||||||
|
__typename?: "PlayerClusterShotGQL";
|
||||||
|
shotId: number;
|
||||||
|
bboxX1: number;
|
||||||
|
bboxY1: number;
|
||||||
|
bboxX2: number;
|
||||||
|
bboxY2: number;
|
||||||
|
confidence: number;
|
||||||
|
isConfirmed: boolean;
|
||||||
|
cropUrl?: string | null;
|
||||||
|
fullFrameUrl?: string | null;
|
||||||
|
}>;
|
||||||
|
}>;
|
||||||
|
};
|
||||||
|
|
||||||
export type GetSerializedShotPathsQueryVariables = Exact<{
|
export type GetSerializedShotPathsQueryVariables = Exact<{
|
||||||
filterInput: FilterInput;
|
filterInput: FilterInput;
|
||||||
}>;
|
}>;
|
||||||
@@ -5865,6 +6058,21 @@ export type GetVideoDetailsQuery = {
|
|||||||
name: string;
|
name: string;
|
||||||
tagClasses: Array<{ __typename?: "VideoTagClass"; name: string }>;
|
tagClasses: Array<{ __typename?: "VideoTagClass"; name: string }>;
|
||||||
}>;
|
}>;
|
||||||
|
playerSummaries: Array<{
|
||||||
|
__typename?: "PlayerSummaryGQL";
|
||||||
|
clusterId: number;
|
||||||
|
userId?: number | null;
|
||||||
|
username?: string | null;
|
||||||
|
profileImageUri?: string | null;
|
||||||
|
representativeFullFrameUrl?: string | null;
|
||||||
|
totalShots: number;
|
||||||
|
totalShotsMade: number;
|
||||||
|
makePercentage: number;
|
||||||
|
score?: number | null;
|
||||||
|
longestRun: number;
|
||||||
|
averageDifficulty?: number | null;
|
||||||
|
averageTimeBetweenShots?: number | null;
|
||||||
|
}>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -6522,6 +6730,22 @@ export type GetUploadStreamsWithDetailsQuery = {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const PlayerSummaryFieldsFragmentDoc = gql`
|
||||||
|
fragment PlayerSummaryFields on PlayerSummaryGQL {
|
||||||
|
clusterId
|
||||||
|
userId
|
||||||
|
username
|
||||||
|
profileImageUri
|
||||||
|
representativeFullFrameUrl
|
||||||
|
totalShots
|
||||||
|
totalShotsMade
|
||||||
|
makePercentage
|
||||||
|
score
|
||||||
|
longestRun
|
||||||
|
averageDifficulty
|
||||||
|
averageTimeBetweenShots
|
||||||
|
}
|
||||||
|
`;
|
||||||
export const UserSocialsFieldsFragmentDoc = gql`
|
export const UserSocialsFieldsFragmentDoc = gql`
|
||||||
fragment UserSocialsFields on UserGQL {
|
fragment UserSocialsFields on UserGQL {
|
||||||
id
|
id
|
||||||
@@ -6556,6 +6780,12 @@ export const VideoCardFieldsFragmentDoc = gql`
|
|||||||
pocketSize
|
pocketSize
|
||||||
tags {
|
tags {
|
||||||
name
|
name
|
||||||
|
tagClasses {
|
||||||
|
name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
playerSummaries {
|
||||||
|
...PlayerSummaryFields
|
||||||
}
|
}
|
||||||
currentProcessing {
|
currentProcessing {
|
||||||
id
|
id
|
||||||
@@ -6583,6 +6813,7 @@ export const VideoCardFieldsFragmentDoc = gql`
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
${PlayerSummaryFieldsFragmentDoc}
|
||||||
${UserSocialsFieldsFragmentDoc}
|
${UserSocialsFieldsFragmentDoc}
|
||||||
`;
|
`;
|
||||||
export const MedalFieldsFragmentDoc = gql`
|
export const MedalFieldsFragmentDoc = gql`
|
||||||
@@ -6632,6 +6863,35 @@ export const PocketingIntentionFragmentFragmentDoc = gql`
|
|||||||
difficulty
|
difficulty
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
export const PlayerClusterShotFieldsFragmentDoc = gql`
|
||||||
|
fragment PlayerClusterShotFields on PlayerClusterShotGQL {
|
||||||
|
shotId
|
||||||
|
bboxX1
|
||||||
|
bboxY1
|
||||||
|
bboxX2
|
||||||
|
bboxY2
|
||||||
|
confidence
|
||||||
|
isConfirmed
|
||||||
|
cropUrl
|
||||||
|
fullFrameUrl
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
export const PlayerClusterFieldsFragmentDoc = gql`
|
||||||
|
fragment PlayerClusterFields on PlayerClusterGQL {
|
||||||
|
videoId
|
||||||
|
clusterId
|
||||||
|
nShots
|
||||||
|
userId
|
||||||
|
username
|
||||||
|
profileImageUri
|
||||||
|
confirmed
|
||||||
|
score
|
||||||
|
shots {
|
||||||
|
...PlayerClusterShotFields
|
||||||
|
}
|
||||||
|
}
|
||||||
|
${PlayerClusterShotFieldsFragmentDoc}
|
||||||
|
`;
|
||||||
export const ShotWithAllFeaturesFragmentDoc = gql`
|
export const ShotWithAllFeaturesFragmentDoc = gql`
|
||||||
fragment ShotWithAllFeatures on ShotGQL {
|
fragment ShotWithAllFeatures on ShotGQL {
|
||||||
id
|
id
|
||||||
@@ -10235,6 +10495,132 @@ export type GetRunsWithTimestampsQueryResult = Apollo.QueryResult<
|
|||||||
GetRunsWithTimestampsQuery,
|
GetRunsWithTimestampsQuery,
|
||||||
GetRunsWithTimestampsQueryVariables
|
GetRunsWithTimestampsQueryVariables
|
||||||
>;
|
>;
|
||||||
|
export const VideoPlayerClustersDocument = gql`
|
||||||
|
query VideoPlayerClusters($videoId: Int!) {
|
||||||
|
videoPlayerClusters(videoId: $videoId) {
|
||||||
|
...PlayerClusterFields
|
||||||
|
}
|
||||||
|
}
|
||||||
|
${PlayerClusterFieldsFragmentDoc}
|
||||||
|
`;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* __useVideoPlayerClustersQuery__
|
||||||
|
*
|
||||||
|
* To run a query within a React component, call `useVideoPlayerClustersQuery` and pass it any options that fit your needs.
|
||||||
|
* When your component renders, `useVideoPlayerClustersQuery` 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 } = useVideoPlayerClustersQuery({
|
||||||
|
* variables: {
|
||||||
|
* videoId: // value for 'videoId'
|
||||||
|
* },
|
||||||
|
* });
|
||||||
|
*/
|
||||||
|
export function useVideoPlayerClustersQuery(
|
||||||
|
baseOptions: Apollo.QueryHookOptions<
|
||||||
|
VideoPlayerClustersQuery,
|
||||||
|
VideoPlayerClustersQueryVariables
|
||||||
|
>,
|
||||||
|
) {
|
||||||
|
const options = { ...defaultOptions, ...baseOptions };
|
||||||
|
return Apollo.useQuery<
|
||||||
|
VideoPlayerClustersQuery,
|
||||||
|
VideoPlayerClustersQueryVariables
|
||||||
|
>(VideoPlayerClustersDocument, options);
|
||||||
|
}
|
||||||
|
export function useVideoPlayerClustersLazyQuery(
|
||||||
|
baseOptions?: Apollo.LazyQueryHookOptions<
|
||||||
|
VideoPlayerClustersQuery,
|
||||||
|
VideoPlayerClustersQueryVariables
|
||||||
|
>,
|
||||||
|
) {
|
||||||
|
const options = { ...defaultOptions, ...baseOptions };
|
||||||
|
return Apollo.useLazyQuery<
|
||||||
|
VideoPlayerClustersQuery,
|
||||||
|
VideoPlayerClustersQueryVariables
|
||||||
|
>(VideoPlayerClustersDocument, options);
|
||||||
|
}
|
||||||
|
export function useVideoPlayerClustersSuspenseQuery(
|
||||||
|
baseOptions?: Apollo.SuspenseQueryHookOptions<
|
||||||
|
VideoPlayerClustersQuery,
|
||||||
|
VideoPlayerClustersQueryVariables
|
||||||
|
>,
|
||||||
|
) {
|
||||||
|
const options = { ...defaultOptions, ...baseOptions };
|
||||||
|
return Apollo.useSuspenseQuery<
|
||||||
|
VideoPlayerClustersQuery,
|
||||||
|
VideoPlayerClustersQueryVariables
|
||||||
|
>(VideoPlayerClustersDocument, options);
|
||||||
|
}
|
||||||
|
export type VideoPlayerClustersQueryHookResult = ReturnType<
|
||||||
|
typeof useVideoPlayerClustersQuery
|
||||||
|
>;
|
||||||
|
export type VideoPlayerClustersLazyQueryHookResult = ReturnType<
|
||||||
|
typeof useVideoPlayerClustersLazyQuery
|
||||||
|
>;
|
||||||
|
export type VideoPlayerClustersSuspenseQueryHookResult = ReturnType<
|
||||||
|
typeof useVideoPlayerClustersSuspenseQuery
|
||||||
|
>;
|
||||||
|
export type VideoPlayerClustersQueryResult = Apollo.QueryResult<
|
||||||
|
VideoPlayerClustersQuery,
|
||||||
|
VideoPlayerClustersQueryVariables
|
||||||
|
>;
|
||||||
|
export const FinalizePlayerAssignmentsDocument = gql`
|
||||||
|
mutation FinalizePlayerAssignments($input: FinalizePlayerAssignmentsInput!) {
|
||||||
|
finalizePlayerAssignments(input: $input) {
|
||||||
|
...PlayerClusterFields
|
||||||
|
}
|
||||||
|
}
|
||||||
|
${PlayerClusterFieldsFragmentDoc}
|
||||||
|
`;
|
||||||
|
export type FinalizePlayerAssignmentsMutationFn = Apollo.MutationFunction<
|
||||||
|
FinalizePlayerAssignmentsMutation,
|
||||||
|
FinalizePlayerAssignmentsMutationVariables
|
||||||
|
>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* __useFinalizePlayerAssignmentsMutation__
|
||||||
|
*
|
||||||
|
* To run a mutation, you first call `useFinalizePlayerAssignmentsMutation` within a React component and pass it any options that fit your needs.
|
||||||
|
* When your component renders, `useFinalizePlayerAssignmentsMutation` 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 [finalizePlayerAssignmentsMutation, { data, loading, error }] = useFinalizePlayerAssignmentsMutation({
|
||||||
|
* variables: {
|
||||||
|
* input: // value for 'input'
|
||||||
|
* },
|
||||||
|
* });
|
||||||
|
*/
|
||||||
|
export function useFinalizePlayerAssignmentsMutation(
|
||||||
|
baseOptions?: Apollo.MutationHookOptions<
|
||||||
|
FinalizePlayerAssignmentsMutation,
|
||||||
|
FinalizePlayerAssignmentsMutationVariables
|
||||||
|
>,
|
||||||
|
) {
|
||||||
|
const options = { ...defaultOptions, ...baseOptions };
|
||||||
|
return Apollo.useMutation<
|
||||||
|
FinalizePlayerAssignmentsMutation,
|
||||||
|
FinalizePlayerAssignmentsMutationVariables
|
||||||
|
>(FinalizePlayerAssignmentsDocument, options);
|
||||||
|
}
|
||||||
|
export type FinalizePlayerAssignmentsMutationHookResult = ReturnType<
|
||||||
|
typeof useFinalizePlayerAssignmentsMutation
|
||||||
|
>;
|
||||||
|
export type FinalizePlayerAssignmentsMutationResult =
|
||||||
|
Apollo.MutationResult<FinalizePlayerAssignmentsMutation>;
|
||||||
|
export type FinalizePlayerAssignmentsMutationOptions =
|
||||||
|
Apollo.BaseMutationOptions<
|
||||||
|
FinalizePlayerAssignmentsMutation,
|
||||||
|
FinalizePlayerAssignmentsMutationVariables
|
||||||
|
>;
|
||||||
export const GetSerializedShotPathsDocument = gql`
|
export const GetSerializedShotPathsDocument = gql`
|
||||||
query GetSerializedShotPaths($filterInput: FilterInput!) {
|
query GetSerializedShotPaths($filterInput: FilterInput!) {
|
||||||
getShots(filterInput: $filterInput) {
|
getShots(filterInput: $filterInput) {
|
||||||
@@ -12424,8 +12810,12 @@ export const GetVideoDetailsDocument = gql`
|
|||||||
}
|
}
|
||||||
name
|
name
|
||||||
}
|
}
|
||||||
|
playerSummaries {
|
||||||
|
...PlayerSummaryFields
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
${PlayerSummaryFieldsFragmentDoc}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -47,6 +47,12 @@ fragment VideoCardFields on VideoGQL {
|
|||||||
pocketSize
|
pocketSize
|
||||||
tags {
|
tags {
|
||||||
name
|
name
|
||||||
|
tagClasses {
|
||||||
|
name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
playerSummaries {
|
||||||
|
...PlayerSummaryFields
|
||||||
}
|
}
|
||||||
currentProcessing {
|
currentProcessing {
|
||||||
id
|
id
|
||||||
|
|||||||
52
src/operations/shooter.gql
Normal file
52
src/operations/shooter.gql
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
fragment PlayerSummaryFields on PlayerSummaryGQL {
|
||||||
|
clusterId
|
||||||
|
userId
|
||||||
|
username
|
||||||
|
profileImageUri
|
||||||
|
representativeFullFrameUrl
|
||||||
|
totalShots
|
||||||
|
totalShotsMade
|
||||||
|
makePercentage
|
||||||
|
score
|
||||||
|
longestRun
|
||||||
|
averageDifficulty
|
||||||
|
averageTimeBetweenShots
|
||||||
|
}
|
||||||
|
|
||||||
|
fragment PlayerClusterShotFields on PlayerClusterShotGQL {
|
||||||
|
shotId
|
||||||
|
bboxX1
|
||||||
|
bboxY1
|
||||||
|
bboxX2
|
||||||
|
bboxY2
|
||||||
|
confidence
|
||||||
|
isConfirmed
|
||||||
|
cropUrl
|
||||||
|
fullFrameUrl
|
||||||
|
}
|
||||||
|
|
||||||
|
fragment PlayerClusterFields on PlayerClusterGQL {
|
||||||
|
videoId
|
||||||
|
clusterId
|
||||||
|
nShots
|
||||||
|
userId
|
||||||
|
username
|
||||||
|
profileImageUri
|
||||||
|
confirmed
|
||||||
|
score
|
||||||
|
shots {
|
||||||
|
...PlayerClusterShotFields
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
query VideoPlayerClusters($videoId: Int!) {
|
||||||
|
videoPlayerClusters(videoId: $videoId) {
|
||||||
|
...PlayerClusterFields
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
mutation FinalizePlayerAssignments($input: FinalizePlayerAssignmentsInput!) {
|
||||||
|
finalizePlayerAssignments(input: $input) {
|
||||||
|
...PlayerClusterFields
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -83,6 +83,9 @@ query GetVideoDetails($videoId: Int!) {
|
|||||||
}
|
}
|
||||||
name
|
name
|
||||||
}
|
}
|
||||||
|
playerSummaries {
|
||||||
|
...PlayerSummaryFields
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -406,6 +406,7 @@ type VideoGQL {
|
|||||||
currentProcessing: VideoProcessingGQL
|
currentProcessing: VideoProcessingGQL
|
||||||
reactions: [ReactionGQL!]!
|
reactions: [ReactionGQL!]!
|
||||||
comments: [CommentGQL!]!
|
comments: [CommentGQL!]!
|
||||||
|
playerSummaries: [PlayerSummaryGQL!]!
|
||||||
}
|
}
|
||||||
|
|
||||||
type ShotGQL {
|
type ShotGQL {
|
||||||
@@ -665,6 +666,21 @@ type CommentGQL {
|
|||||||
replies: [CommentGQL!]!
|
replies: [CommentGQL!]!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type PlayerSummaryGQL {
|
||||||
|
clusterId: Int!
|
||||||
|
userId: Int
|
||||||
|
username: String
|
||||||
|
profileImageUri: String
|
||||||
|
representativeFullFrameUrl: String
|
||||||
|
totalShots: Int!
|
||||||
|
totalShotsMade: Int!
|
||||||
|
makePercentage: Float!
|
||||||
|
score: Int
|
||||||
|
longestRun: Int!
|
||||||
|
averageDifficulty: Float
|
||||||
|
averageTimeBetweenShots: Float
|
||||||
|
}
|
||||||
|
|
||||||
type DeployedConfigGQL {
|
type DeployedConfigGQL {
|
||||||
allowNewUsers: Boolean!
|
allowNewUsers: Boolean!
|
||||||
firebase: Boolean!
|
firebase: Boolean!
|
||||||
@@ -866,7 +882,10 @@ type PlayerClusterGQL {
|
|||||||
clusterId: Int!
|
clusterId: Int!
|
||||||
nShots: Int!
|
nShots: Int!
|
||||||
userId: Int
|
userId: Int
|
||||||
|
username: String
|
||||||
|
profileImageUri: String
|
||||||
confirmed: Boolean!
|
confirmed: Boolean!
|
||||||
|
score: Int
|
||||||
shots: [PlayerClusterShotGQL!]!
|
shots: [PlayerClusterShotGQL!]!
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1199,6 +1218,7 @@ input FinalizePlayerAssignmentsInput {
|
|||||||
input ClusterAssignmentInput {
|
input ClusterAssignmentInput {
|
||||||
clusterId: Int!
|
clusterId: Int!
|
||||||
userId: Int = null
|
userId: Int = null
|
||||||
|
score: Int = null
|
||||||
}
|
}
|
||||||
|
|
||||||
input ShotMoveInput {
|
input ShotMoveInput {
|
||||||
|
|||||||
Reference in New Issue
Block a user