Compare commits

..

21 Commits

Author SHA1 Message Date
c586bdf1a6 Merge pull request 'Add username + profileImageUri to PlayerClusterGQL' (#246) from dean/player-cluster-username into master
Reviewed-on: #246
2026-05-12 00:27:06 +00:00
Dean Wenstrand
9250e4c639 Add username + profileImageUri to PlayerClusterGQL
All checks were successful
Tests / Tests (pull_request) Successful in 9s
The labeling UI was falling back to "user N" for any assigned cluster
whose user wasn't the video owner — e.g. an admin re-labels a video
they don't own. With the resolver now resolving usernames for every
confirmed cluster, the FE can render real names regardless of who's
viewing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 17:25:34 -07:00
a12b3e1210 Merge pull request 'Add averageDifficulty to PlayerSummaryFields' (#245) from dean/player-summaries-avg-difficulty-types into master
Reviewed-on: #245
2026-05-11 22:41:52 +00:00
Dean Wenstrand
5cf2dbaf01 Add averageDifficulty to PlayerSummaryFields
All checks were successful
Tests / Tests (pull_request) Successful in 9s
Regenerated via `just gql` after BE added average_difficulty to
PlayerSummaryGQL.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 15:34:25 -07:00
239a143554 Merge pull request 'Regenerate schema + add longestRun to PlayerSummaryFields' (#244) from dean/player-summaries-longest-run-types into master
Reviewed-on: #244
2026-05-11 20:29:39 +00:00
Dean Wenstrand
296522afb8 Regenerate schema + add longestRun to PlayerSummaryFields
All checks were successful
Tests / Tests (pull_request) Successful in 10s
Generated by `just gql` after BE added longest_run to PlayerSummaryGQL.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 13:21:47 -07:00
f42579076e Merge pull request 'Add score to PlayerSummaryFields + PlayerClusterFields fragments' (#243) from dean/video-match-score-types into master
Reviewed-on: #243
2026-05-11 17:43:43 +00:00
Dean Wenstrand
0c9eb4945a Add score to PlayerSummaryFields + PlayerClusterFields fragments
All checks were successful
Tests / Tests (pull_request) Successful in 9s
Picks up the BE additions in railbird PR dean/video-match-score:
new `score` field on PlayerClusterGQL and PlayerSummaryGQL, and
a new `score` input field on ClusterAssignmentInput.

Generated by `just gql`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 10:22:58 -07:00
1182c15004 Merge pull request 'Add playerSummaries to schema + Video fragments' (#242) from dean/player-summaries-types into master
Reviewed-on: #242
2026-05-09 19:34:40 +00:00
Dean Wenstrand
755336b16a Add playerSummaries to schema + Video fragments
All checks were successful
Tests / Tests (pull_request) Successful in 10s
Backs the multi-player vs UI: feed cards and the detail page both
read `video.playerSummaries`, a per-cluster rollup with username,
profile image, representative full-frame URL, makes/total/percentage.

  - PlayerSummaryFields fragment in shooter.gql
  - VideoCardFields (feed) and GetVideoDetails (detail) include
    playerSummaries via the new fragment
  - VideoCardFields tag selection extended to include tagClasses,
    needed for the FE's player_count detection

Generated by `just gql` from the BE additions in railbird PR
dean/video-player-summaries.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 12:02:57 -07:00
c1efe9f5f2 Merge pull request 'Add VideoPlayerClusters query + FinalizePlayerAssignments mutation' (#241) from dean/player-labeling-ops into master
Reviewed-on: #241
2026-05-09 04:46:10 +00:00
Dean Wenstrand
a3460842ac Add VideoPlayerClusters query + FinalizePlayerAssignments mutation
All checks were successful
Tests / Tests (pull_request) Successful in 10s
Operation file for the per-video player-labeling UI that consumes the
schema types added in #240.

  - VideoPlayerClusters($videoId): read clusters + crops
  - FinalizePlayerAssignments($input): apply user assignments and
    shot moves in one transaction

Generated by `just gql`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 21:44:42 -07:00
84d3a0252d Merge pull request 'Add player cluster + labeling mutation types' (#240) from dean/labeling-api-types into master
Reviewed-on: #240
2026-05-09 00:38:29 +00:00
130314546c Merge pull request 'Add trial days to GetAvailableSubscriptions' (#239) from loewy/add-trial-period-days into master
Reviewed-on: #239
2026-05-04 21:46:45 +00:00
b88f172355 add trial days to return
All checks were successful
Tests / Tests (pull_request) Successful in 10s
2026-05-04 14:07:16 -07:00
639fc88b0b Merge pull request 'Add createCustomerPortalSession' (#238) from loewy/create-customer-portal-session into master
Reviewed-on: #238
2026-05-01 22:45:40 +00:00
20f50368c9 remove return url
All checks were successful
Tests / Tests (pull_request) Successful in 10s
2026-05-01 13:15:18 -07:00
8367c2d0cd add createCustomerPortalSession
All checks were successful
Tests / Tests (pull_request) Successful in 10s
2026-04-30 11:44:34 -07:00
b0c62f6e80 Merge pull request 'Trim getFeed query fragment' (#237) from loewy/trim-get-feed-query-fragment into master
Reviewed-on: #237
2026-04-29 20:26:40 +00:00
bc1ff66467 trim uncessary requested fields
All checks were successful
Tests / Tests (pull_request) Successful in 38s
2026-04-28 12:53:25 -07:00
ae37a3d9d9 Merge pull request 'Default getLongestRunsLeaderboard limit to 50' (#236) from dean/leaderboard-default-top-50 into master
Reviewed-on: #236
2026-04-24 00:01:23 +00:00
6 changed files with 526 additions and 62 deletions

View File

@@ -207,6 +207,7 @@ export enum ClientUploadStatusEnum {
export type ClusterAssignmentInput = {
clusterId: Scalars["Int"]["input"];
score?: InputMaybe<Scalars["Int"]["input"]>;
userId?: InputMaybe<Scalars["Int"]["input"]>;
};
@@ -2700,8 +2701,11 @@ export type PlayerClusterGql = {
clusterId: Scalars["Int"]["output"];
confirmed: Scalars["Boolean"]["output"];
nShots: Scalars["Int"]["output"];
profileImageUri?: Maybe<Scalars["String"]["output"]>;
score?: Maybe<Scalars["Int"]["output"]>;
shots: Array<PlayerClusterShotGql>;
userId?: Maybe<Scalars["Int"]["output"]>;
username?: Maybe<Scalars["String"]["output"]>;
videoId: Scalars["Int"]["output"];
};
@@ -2718,6 +2722,22 @@ export type PlayerClusterShotGql = {
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 {
Corner = "CORNER",
Side = "SIDE",
@@ -3557,6 +3577,7 @@ export type VideoGql = {
medianRun?: Maybe<Scalars["Float"]["output"]>;
name?: Maybe<Scalars["String"]["output"]>;
owner?: Maybe<UserGql>;
playerSummaries: Array<PlayerSummaryGql>;
playlist?: Maybe<HlsPlaylistGql>;
pocketSize?: Maybe<Scalars["Float"]["output"]>;
private: Scalars["Boolean"]["output"];
@@ -4153,15 +4174,11 @@ export type GetFeedQuery = {
id: number;
name?: string | null;
screenshotUri?: string | null;
totalShotsMade: number;
totalShots: number;
makePercentage: number;
averageTimeBetweenShots?: number | null;
averageDifficulty?: number | null;
createdAt?: any | null;
updatedAt?: any | null;
startTime?: any | null;
endTime?: any | null;
private: boolean;
elapsedTime?: number | null;
tableSize: number;
@@ -4176,7 +4193,6 @@ export type GetFeedQuery = {
__typename?: "UploadStreamGQL";
id: string;
lastIntendedSegmentBound?: number | null;
isCompleted: boolean;
streamSegmentType: StreamSegmentTypeEnum;
} | null;
tags: Array<{
@@ -4184,18 +4200,25 @@ export type GetFeedQuery = {
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?: {
__typename?: "VideoProcessingGQL";
id: number;
status: ProcessingStatusEnum;
errors: Array<{
__typename?: "VideoProcessingErrorGQL";
message: string;
}>;
statuses: Array<{
__typename?: "VideoProcessingStatusGQL";
status: ProcessingStatusEnum;
}>;
} | null;
reactions: Array<{
__typename?: "ReactionGQL";
@@ -4255,15 +4278,11 @@ export type VideoCardFieldsFragment = {
id: number;
name?: string | null;
screenshotUri?: string | null;
totalShotsMade: number;
totalShots: number;
makePercentage: number;
averageTimeBetweenShots?: number | null;
averageDifficulty?: number | null;
createdAt?: any | null;
updatedAt?: any | null;
startTime?: any | null;
endTime?: any | null;
private: boolean;
elapsedTime?: number | null;
tableSize: number;
@@ -4278,7 +4297,6 @@ export type VideoCardFieldsFragment = {
__typename?: "UploadStreamGQL";
id: string;
lastIntendedSegmentBound?: number | null;
isCompleted: boolean;
streamSegmentType: StreamSegmentTypeEnum;
} | null;
tags: Array<{
@@ -4286,15 +4304,25 @@ export type VideoCardFieldsFragment = {
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?: {
__typename?: "VideoProcessingGQL";
id: number;
status: ProcessingStatusEnum;
errors: Array<{ __typename?: "VideoProcessingErrorGQL"; message: string }>;
statuses: Array<{
__typename?: "VideoProcessingStatusGQL";
status: ProcessingStatusEnum;
}>;
} | null;
reactions: Array<{
__typename?: "ReactionGQL";
@@ -4368,15 +4396,11 @@ export type GetVideoFeedQuery = {
id: number;
name?: string | null;
screenshotUri?: string | null;
totalShotsMade: number;
totalShots: number;
makePercentage: number;
averageTimeBetweenShots?: number | null;
averageDifficulty?: number | null;
createdAt?: any | null;
updatedAt?: any | null;
startTime?: any | null;
endTime?: any | null;
private: boolean;
elapsedTime?: number | null;
tableSize: number;
@@ -4391,7 +4415,6 @@ export type GetVideoFeedQuery = {
__typename?: "UploadStreamGQL";
id: string;
lastIntendedSegmentBound?: number | null;
isCompleted: boolean;
streamSegmentType: StreamSegmentTypeEnum;
} | null;
tags: Array<{
@@ -4399,18 +4422,25 @@ export type GetVideoFeedQuery = {
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?: {
__typename?: "VideoProcessingGQL";
id: number;
status: ProcessingStatusEnum;
errors: Array<{
__typename?: "VideoProcessingErrorGQL";
message: string;
}>;
statuses: Array<{
__typename?: "VideoProcessingStatusGQL";
status: ProcessingStatusEnum;
}>;
} | null;
reactions: Array<{
__typename?: "ReactionGQL";
@@ -4805,6 +4835,18 @@ export type CreateSubscriptionMutation = {
};
};
export type CreateCustomerPortalSessionMutationVariables = Exact<{
[key: string]: never;
}>;
export type CreateCustomerPortalSessionMutation = {
__typename?: "Mutation";
createCustomerPortalSession: {
__typename?: "CreateCustomerPortalSessionResultGQL";
portalUrl: string;
};
};
export type GetAvailableSubscriptionOptionsQueryVariables = Exact<{
[key: string]: never;
}>;
@@ -4813,6 +4855,7 @@ export type GetAvailableSubscriptionOptionsQuery = {
__typename?: "Query";
getAvailableSubscriptionOptions: {
__typename?: "StripeSubscriptionOptionsGQL";
trialPeriodDays?: number | null;
products: Array<{
__typename?: "StripeProductGQL";
id: string;
@@ -4964,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<{
filterInput: FilterInput;
}>;
@@ -5900,6 +6058,21 @@ export type GetVideoDetailsQuery = {
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;
}>;
};
};
@@ -6557,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`
fragment UserSocialsFields on UserGQL {
id
@@ -6575,41 +6764,32 @@ export const VideoCardFieldsFragmentDoc = gql`
}
name
screenshotUri
totalShotsMade
totalShots
makePercentage
averageTimeBetweenShots
averageDifficulty
createdAt
updatedAt
startTime
endTime
private
elapsedTime
screenshotUri
stream {
id
lastIntendedSegmentBound
isCompleted
streamSegmentType
}
tableSize
pocketSize
tags {
name
tagClasses {
name
}
name
}
playerSummaries {
...PlayerSummaryFields
}
currentProcessing {
id
errors {
message
}
status
statuses {
status
}
}
reactions {
videoId
@@ -6633,6 +6813,7 @@ export const VideoCardFieldsFragmentDoc = gql`
}
}
}
${PlayerSummaryFieldsFragmentDoc}
${UserSocialsFieldsFragmentDoc}
`;
export const MedalFieldsFragmentDoc = gql`
@@ -6682,6 +6863,35 @@ export const PocketingIntentionFragmentFragmentDoc = gql`
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`
fragment ShotWithAllFeatures on ShotGQL {
id
@@ -9708,9 +9918,60 @@ export type CreateSubscriptionMutationOptions = Apollo.BaseMutationOptions<
CreateSubscriptionMutation,
CreateSubscriptionMutationVariables
>;
export const CreateCustomerPortalSessionDocument = gql`
mutation CreateCustomerPortalSession {
createCustomerPortalSession {
portalUrl
}
}
`;
export type CreateCustomerPortalSessionMutationFn = Apollo.MutationFunction<
CreateCustomerPortalSessionMutation,
CreateCustomerPortalSessionMutationVariables
>;
/**
* __useCreateCustomerPortalSessionMutation__
*
* To run a mutation, you first call `useCreateCustomerPortalSessionMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useCreateCustomerPortalSessionMutation` 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 [createCustomerPortalSessionMutation, { data, loading, error }] = useCreateCustomerPortalSessionMutation({
* variables: {
* },
* });
*/
export function useCreateCustomerPortalSessionMutation(
baseOptions?: Apollo.MutationHookOptions<
CreateCustomerPortalSessionMutation,
CreateCustomerPortalSessionMutationVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useMutation<
CreateCustomerPortalSessionMutation,
CreateCustomerPortalSessionMutationVariables
>(CreateCustomerPortalSessionDocument, options);
}
export type CreateCustomerPortalSessionMutationHookResult = ReturnType<
typeof useCreateCustomerPortalSessionMutation
>;
export type CreateCustomerPortalSessionMutationResult =
Apollo.MutationResult<CreateCustomerPortalSessionMutation>;
export type CreateCustomerPortalSessionMutationOptions =
Apollo.BaseMutationOptions<
CreateCustomerPortalSessionMutation,
CreateCustomerPortalSessionMutationVariables
>;
export const GetAvailableSubscriptionOptionsDocument = gql`
query GetAvailableSubscriptionOptions {
getAvailableSubscriptionOptions {
trialPeriodDays
products {
id
name
@@ -10234,6 +10495,132 @@ export type GetRunsWithTimestampsQueryResult = Apollo.QueryResult<
GetRunsWithTimestampsQuery,
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`
query GetSerializedShotPaths($filterInput: FilterInput!) {
getShots(filterInput: $filterInput) {
@@ -12423,8 +12810,12 @@ export const GetVideoDetailsDocument = gql`
}
name
}
playerSummaries {
...PlayerSummaryFields
}
}
}
${PlayerSummaryFieldsFragmentDoc}
`;
/**

View File

@@ -31,41 +31,32 @@ fragment VideoCardFields on VideoGQL {
}
name
screenshotUri
totalShotsMade
totalShots
makePercentage
averageTimeBetweenShots
averageDifficulty
createdAt
updatedAt
startTime
endTime
private
elapsedTime
screenshotUri
stream {
id
lastIntendedSegmentBound
isCompleted
streamSegmentType
}
tableSize
pocketSize
tags {
name
tagClasses {
name
}
name
}
playerSummaries {
...PlayerSummaryFields
}
currentProcessing {
id
errors {
message
}
status
statuses {
status
}
}
reactions {
videoId

View File

@@ -20,8 +20,15 @@ mutation CreateSubscription($priceId: String!) {
}
}
mutation CreateCustomerPortalSession {
createCustomerPortalSession {
portalUrl
}
}
query GetAvailableSubscriptionOptions {
getAvailableSubscriptionOptions {
trialPeriodDays
products {
id
name

View 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
}
}

View File

@@ -83,6 +83,9 @@ query GetVideoDetails($videoId: Int!) {
}
name
}
playerSummaries {
...PlayerSummaryFields
}
}
}

View File

@@ -406,6 +406,7 @@ type VideoGQL {
currentProcessing: VideoProcessingGQL
reactions: [ReactionGQL!]!
comments: [CommentGQL!]!
playerSummaries: [PlayerSummaryGQL!]!
}
type ShotGQL {
@@ -665,6 +666,21 @@ type 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 {
allowNewUsers: Boolean!
firebase: Boolean!
@@ -866,7 +882,10 @@ type PlayerClusterGQL {
clusterId: Int!
nShots: Int!
userId: Int
username: String
profileImageUri: String
confirmed: Boolean!
score: Int
shots: [PlayerClusterShotGQL!]!
}
@@ -1199,6 +1218,7 @@ input FinalizePlayerAssignmentsInput {
input ClusterAssignmentInput {
clusterId: Int!
userId: Int = null
score: Int = null
}
input ShotMoveInput {