Compare commits

..

15 Commits

Author SHA1 Message Date
594c89ab76 Select the detection audit payload on getTableState
All checks were successful
Tests / Tests (pull_request) Successful in 3m9s
Adds identifierToBox to TableStateGQL and selects it, alongside the
homography that was already in the schema but never requested, so the
photo path can draw a detection back over the image it came from. The
live and shot queries keep the layout-only selection: their frame lives
inside a video the app never holds, and one of them polls every five
seconds.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-31 18:55:19 -07:00
d7b0b21430 Merge pull request 'Use BigInt for video export file sizes' (#310) from agent/video-export-bigint into master
Reviewed-on: #310
2026-07-27 19:35:17 +00:00
f173466b2f Merge pull request 'Add createShotShareLink for short share links' (#311) from dean/short-share-links-gql into master
Reviewed-on: #311
2026-07-27 19:35:11 +00:00
Dean Wenstrand
df69d154a5 Merge master into short-share-links-gql
All checks were successful
Tests / Tests (pull_request) Successful in 34s
gql master added Shot Lab video feed scopes and pagination
(operations-only: recorded_shots.gql + codegen output) while this branch
added createShotShareLink. The two touch disjoint parts of the generated
index.tsx, so the merge is textual only.

Verified rather than trusted: re-ran graphql-codegen after the merge and
src/index.tsx came back byte-identical (same md5), so the merged
generated file is exactly what codegen produces. Reverted prettier's
schema.gql reformat, which CI's own prettier undoes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 15:34:22 -04:00
0bceb5d300 Merge pull request 'Add Shot Lab video feed scopes and pagination' (#312) from t3code/shot-lab-video-sources into master
Reviewed-on: #312
2026-07-26 09:31:20 +00:00
f58048768c Add Shot Lab video feed scopes and pagination
All checks were successful
Tests / Tests (pull_request) Successful in 12s
2026-07-26 02:26:39 -07:00
179e8ed4e1 Add createShotShareLink for short share links
All checks were successful
Tests / Tests (pull_request) Successful in 11s
index.tsx is graphql-codegen output. schema.gql carries only the new
type, input and mutation field, deliberately left in the file's existing
formatting: package.json pins prettier as ^3.2.5, so a local install and
CI's yarn install can resolve different 3.x versions that disagree about
GraphQL union indentation. Committing a locally-reformatted schema.gql
makes CI's 'graphql-codegen causes no changes' check fail when its
prettier reformats it back.

The schema is verified semantically identical to the backend export via
lexicographic_sort_schema.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-25 15:02:17 -07:00
3e6dabe12a Use BigInt for video export file size
All checks were successful
Tests / Tests (pull_request) Successful in 6m3s
2026-07-24 20:09:19 -07:00
9104a312b1 Merge pull request 'Expose Session Coach agent summary' (#305) from loewy/session-coach-real-agent into master
Reviewed-on: #305
2026-07-24 05:24:11 +00:00
43e944e82f Expose grounded Coach strengths
All checks were successful
Tests / Tests (pull_request) Successful in 40s
2026-07-23 11:53:03 -07:00
d6cc81ef9f Add multi-signal coach decision fields 2026-07-23 11:53:03 -07:00
5d775eac70 Expose Session Coach agent summary 2026-07-23 11:53:03 -07:00
b810907f10 Merge pull request 'Add getUploadLinks batch mutation (schema + operation)' (#309) from dean/batch-upload-links-gql into master
Reviewed-on: #309
2026-07-23 07:50:57 +00:00
Dean Wenstrand
0eb627479a Add getUploadLinks batch mutation (schema + operation)
All checks were successful
Tests / Tests (pull_request) Successful in 38s
Batched counterpart to getUploadLink: one validation pass server-side,
N locally-signed URLs per round-trip, already-acknowledged indexes
returned in alreadyUploaded. Schema grafted additively (a full
gql-export from BE master would drop schema entries belonging to
not-yet-merged BE branches).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 00:31:18 -07:00
1914b2f5c0 Merge pull request 'Re-add legacy shot-sim operations alongside GetShotLabVideos' (#308) from dean/readd-legacy-shotsim-ops into master
Reviewed-on: #308
2026-07-23 06:18:53 +00:00
8 changed files with 713 additions and 66 deletions

View File

@@ -265,7 +265,6 @@ export type CohortStatsGql = {
activated7d: Scalars["Int"]["output"];
activatedNotPaid7d: Scalars["Int"]["output"];
paid7d: Scalars["Int"]["output"];
paidTotal: Scalars["Int"]["output"];
signups: Scalars["Int"]["output"];
weekStart: Scalars["Date"]["output"];
};
@@ -2324,8 +2323,6 @@ export type FunnelStatsGql = {
freemiumEpoch: Scalars["Date"]["output"];
newPaid7d: Scalars["Int"]["output"];
newPaid30d: Scalars["Int"]["output"];
newPaidToday: Scalars["Int"]["output"];
pastDueUsers: Scalars["Int"]["output"];
payingUsers: Scalars["Int"]["output"];
retentionPrevActive: Scalars["Int"]["output"];
retentionReturned: Scalars["Int"]["output"];
@@ -4081,6 +4078,7 @@ export type SyncAppleSubscriptionResultGql = {
export type TableStateGql = {
__typename?: "TableStateGQL";
homography?: Maybe<HomographyInfoGql>;
identifierToBox: Array<BoundingBoxGql>;
identifierToColor: Array<Maybe<RgbColorGql>>;
identifierToPosition: Array<Array<Scalars["Float"]["output"]>>;
};
@@ -4321,7 +4319,7 @@ export type VideoExportJobGql = {
createdAt?: Maybe<Scalars["DateTime"]["output"]>;
downloadUrl?: Maybe<Scalars["String"]["output"]>;
expiresAt?: Maybe<Scalars["DateTime"]["output"]>;
fileSizeBytes?: Maybe<Scalars["Int"]["output"]>;
fileSizeBytes?: Maybe<Scalars["BigInt"]["output"]>;
id: Scalars["Int"]["output"];
mode: VideoExportModeEnum;
runId?: Maybe<Scalars["Int"]["output"]>;
@@ -6893,8 +6891,10 @@ export type ReactToVideoMutation = {
};
export type GetShotLabVideosQueryVariables = Exact<{
userId: Scalars["Int"]["input"];
feedInput: VideoFeedInputGql;
includePrivate: IncludePrivateEnum;
limit?: Scalars["Int"]["input"];
after?: InputMaybe<Scalars["String"]["input"]>;
}>;
export type GetShotLabVideosQuery = {
@@ -6922,6 +6922,11 @@ export type GetShotLabVideosQuery = {
lastSegmentUploadedAt?: any | null;
} | null;
}>;
pageInfo: {
__typename?: "PageInfoGQL";
hasNextPage: boolean;
endCursor?: string | null;
};
};
};
@@ -7052,6 +7057,46 @@ export type GetSessionCoachQuery = {
unknownOutcomeCount: number;
analyzedShotCount: number;
makePercentage?: number | null;
longestMakeStreak: number;
recentBaseline?: {
__typename?: "SessionCoachBaselineGQL";
sessionCount: number;
attemptCount: number;
madeCount: number;
makePercentage: number;
} | null;
positiveCandidates: Array<{
__typename?: "SessionCoachCandidateGQL";
id: string;
rank: number;
family: SessionCoachCandidateFamilyEnum;
kind: SessionCoachCandidateKindEnum;
title: string;
body: string;
action: string;
supportingShotIds: Array<number>;
drillId?: string | null;
limitations: Array<string>;
evidence: {
__typename?: "SessionCoachEvidenceGQL";
bucketKey: string;
bucketLabel: string;
attemptCount: number;
madeCount: number;
missedCount: number;
makePercentage: number;
comparisonAttemptCount: number;
comparisonMadeCount: number;
comparisonMakePercentage?: number | null;
patternShotCount: number;
score: number;
rankReason: string;
baselineSessionCount: number;
baselineAttemptCount: number;
baselineMadeCount: number;
baselineMakePercentage?: number | null;
};
}>;
primaryCandidate?: {
__typename?: "SessionCoachCandidateGQL";
id: string;
@@ -7078,6 +7123,10 @@ export type GetSessionCoachQuery = {
patternShotCount: number;
score: number;
rankReason: string;
baselineSessionCount: number;
baselineAttemptCount: number;
baselineMadeCount: number;
baselineMakePercentage?: number | null;
};
} | null;
candidates: Array<{
@@ -7106,6 +7155,10 @@ export type GetSessionCoachQuery = {
patternShotCount: number;
score: number;
rankReason: string;
baselineSessionCount: number;
baselineAttemptCount: number;
baselineMadeCount: number;
baselineMakePercentage?: number | null;
};
}>;
agentGeneration?: {
@@ -7116,7 +7169,13 @@ export type GetSessionCoachQuery = {
completedAt?: any | null;
decision?: {
__typename?: "SessionCoachDecisionGQL";
selectedPositiveCandidateId?: string | null;
positiveTitle?: string | null;
positiveBody?: string | null;
selectedCandidateId?: string | null;
supportingCandidateIds: Array<string>;
supportingShotIds: Array<number>;
sessionSummary?: string | null;
title?: string | null;
body?: string | null;
suggestedAction?: string | null;
@@ -7144,6 +7203,7 @@ export type GetSessionCoachQuery = {
startedAt?: any | null;
lastEnqueuedAt?: any | null;
abstentionReason?: string | null;
synthesisRationale?: string | null;
} | null;
} | null;
};
@@ -7166,7 +7226,13 @@ export type RequestSessionCoachGenerationMutation = {
completedAt?: any | null;
decision?: {
__typename?: "SessionCoachDecisionGQL";
selectedPositiveCandidateId?: string | null;
positiveTitle?: string | null;
positiveBody?: string | null;
selectedCandidateId?: string | null;
supportingCandidateIds: Array<string>;
supportingShotIds: Array<number>;
sessionSummary?: string | null;
title?: string | null;
body?: string | null;
suggestedAction?: string | null;
@@ -7194,6 +7260,7 @@ export type RequestSessionCoachGenerationMutation = {
startedAt?: any | null;
lastEnqueuedAt?: any | null;
abstentionReason?: string | null;
synthesisRationale?: string | null;
} | null;
} | null;
};
@@ -7225,6 +7292,10 @@ export type SessionCoachCandidateFieldsFragment = {
patternShotCount: number;
score: number;
rankReason: string;
baselineSessionCount: number;
baselineAttemptCount: number;
baselineMadeCount: number;
baselineMakePercentage?: number | null;
};
};
@@ -7236,7 +7307,13 @@ export type SessionCoachGenerationFieldsFragment = {
completedAt?: any | null;
decision?: {
__typename?: "SessionCoachDecisionGQL";
selectedPositiveCandidateId?: string | null;
positiveTitle?: string | null;
positiveBody?: string | null;
selectedCandidateId?: string | null;
supportingCandidateIds: Array<string>;
supportingShotIds: Array<number>;
sessionSummary?: string | null;
title?: string | null;
body?: string | null;
suggestedAction?: string | null;
@@ -7264,9 +7341,24 @@ export type SessionCoachGenerationFieldsFragment = {
startedAt?: any | null;
lastEnqueuedAt?: any | null;
abstentionReason?: string | null;
synthesisRationale?: string | null;
} | null;
};
export type CreateShotShareLinkMutationVariables = Exact<{
shotIds: Array<Scalars["Int"]["input"]> | Scalars["Int"]["input"];
paddingSeconds?: InputMaybe<Scalars["Float"]["input"]>;
}>;
export type CreateShotShareLinkMutation = {
__typename?: "Mutation";
createShotShareLink: {
__typename?: "ShareLinkGQL";
slug: string;
url: string;
};
};
export type PlayerSummaryFieldsFragment = {
__typename?: "PlayerSummaryGQL";
clusterId: number;
@@ -7389,6 +7481,76 @@ export type FinalizePlayerAssignmentsMutation = {
}>;
};
export type TableStateLayoutFieldsFragment = {
__typename?: "TableStateGQL";
identifierToPosition: Array<Array<number>>;
identifierToColor: Array<{ __typename?: "RGBColorGQL"; hex: string } | null>;
};
export type DetectionBoxFieldsFragment = {
__typename?: "BoundingBoxGQL";
left: number;
top: number;
width: number;
height: number;
};
export type DetectionPocketPointFieldsFragment = {
__typename?: "PocketPointsGQL";
topLeft: { __typename?: "IntPoint2D"; x: number; y: number };
topSide: { __typename?: "IntPoint2D"; x: number; y: number };
topRight: { __typename?: "IntPoint2D"; x: number; y: number };
bottomLeft: { __typename?: "IntPoint2D"; x: number; y: number };
bottomSide: { __typename?: "IntPoint2D"; x: number; y: number };
bottomRight: { __typename?: "IntPoint2D"; x: number; y: number };
};
export type TableStateDetectionFieldsFragment = {
__typename?: "TableStateGQL";
identifierToBox: Array<{
__typename?: "BoundingBoxGQL";
left: number;
top: number;
width: number;
height: number;
}>;
homography?: {
__typename?: "HomographyInfoGQL";
crop: {
__typename?: "BoundingBoxGQL";
left: number;
top: number;
width: number;
height: number;
};
pockets: Array<{
__typename?: "BoundingBoxGQL";
left: number;
top: number;
width: number;
height: number;
}>;
sourcePoints: {
__typename?: "PocketPointsGQL";
topLeft: { __typename?: "IntPoint2D"; x: number; y: number };
topSide: { __typename?: "IntPoint2D"; x: number; y: number };
topRight: { __typename?: "IntPoint2D"; x: number; y: number };
bottomLeft: { __typename?: "IntPoint2D"; x: number; y: number };
bottomSide: { __typename?: "IntPoint2D"; x: number; y: number };
bottomRight: { __typename?: "IntPoint2D"; x: number; y: number };
};
destPoints: {
__typename?: "PocketPointsGQL";
topLeft: { __typename?: "IntPoint2D"; x: number; y: number };
topSide: { __typename?: "IntPoint2D"; x: number; y: number };
topRight: { __typename?: "IntPoint2D"; x: number; y: number };
bottomLeft: { __typename?: "IntPoint2D"; x: number; y: number };
bottomSide: { __typename?: "IntPoint2D"; x: number; y: number };
bottomRight: { __typename?: "IntPoint2D"; x: number; y: number };
};
} | null;
};
export type GetTableStateQueryVariables = Exact<{
b64Image: Scalars["String"]["input"];
tableSize?: InputMaybe<Scalars["Float"]["input"]>;
@@ -7404,6 +7566,48 @@ export type GetTableStateQuery = {
__typename?: "RGBColorGQL";
hex: string;
} | null>;
identifierToBox: Array<{
__typename?: "BoundingBoxGQL";
left: number;
top: number;
width: number;
height: number;
}>;
homography?: {
__typename?: "HomographyInfoGQL";
crop: {
__typename?: "BoundingBoxGQL";
left: number;
top: number;
width: number;
height: number;
};
pockets: Array<{
__typename?: "BoundingBoxGQL";
left: number;
top: number;
width: number;
height: number;
}>;
sourcePoints: {
__typename?: "PocketPointsGQL";
topLeft: { __typename?: "IntPoint2D"; x: number; y: number };
topSide: { __typename?: "IntPoint2D"; x: number; y: number };
topRight: { __typename?: "IntPoint2D"; x: number; y: number };
bottomLeft: { __typename?: "IntPoint2D"; x: number; y: number };
bottomSide: { __typename?: "IntPoint2D"; x: number; y: number };
bottomRight: { __typename?: "IntPoint2D"; x: number; y: number };
};
destPoints: {
__typename?: "PocketPointsGQL";
topLeft: { __typename?: "IntPoint2D"; x: number; y: number };
topSide: { __typename?: "IntPoint2D"; x: number; y: number };
topRight: { __typename?: "IntPoint2D"; x: number; y: number };
bottomLeft: { __typename?: "IntPoint2D"; x: number; y: number };
bottomSide: { __typename?: "IntPoint2D"; x: number; y: number };
bottomRight: { __typename?: "IntPoint2D"; x: number; y: number };
};
} | null;
};
};
@@ -8064,8 +8268,6 @@ export type GetUsageStatsQuery = {
activationCohort: number;
activationActivated: number;
payingUsers: number;
pastDueUsers: number;
newPaidToday: number;
newPaid7d: number;
newPaid30d: number;
retentionPrevActive: number;
@@ -8078,7 +8280,6 @@ export type GetUsageStatsQuery = {
activated7d: number;
paid7d: number;
activatedNotPaid7d: number;
paidTotal: number;
}>;
windows: Array<{
__typename?: "UsageStatsWindowGQL";
@@ -9193,7 +9394,7 @@ export type VideoExportJobFieldsFragment = {
shotIds?: Array<number> | null;
runId?: number | null;
downloadUrl?: string | null;
fileSizeBytes?: number | null;
fileSizeBytes?: any | null;
expiresAt?: any | null;
createdAt?: any | null;
};
@@ -9215,7 +9416,7 @@ export type RequestVideoExportMutation = {
shotIds?: Array<number> | null;
runId?: number | null;
downloadUrl?: string | null;
fileSizeBytes?: number | null;
fileSizeBytes?: any | null;
expiresAt?: any | null;
createdAt?: any | null;
};
@@ -9247,7 +9448,7 @@ export type VideoExportJobQuery = {
shotIds?: Array<number> | null;
runId?: number | null;
downloadUrl?: string | null;
fileSizeBytes?: number | null;
fileSizeBytes?: any | null;
expiresAt?: any | null;
createdAt?: any | null;
} | null;
@@ -9271,7 +9472,7 @@ export type MyVideoExportsQuery = {
shotIds?: Array<number> | null;
runId?: number | null;
downloadUrl?: string | null;
fileSizeBytes?: number | null;
fileSizeBytes?: any | null;
expiresAt?: any | null;
createdAt?: any | null;
}>;
@@ -9350,6 +9551,71 @@ export type GetUploadLinkMutation = {
};
};
export type GetUploadLinksMutationVariables = Exact<{
videoId: Scalars["Int"]["input"];
segmentIndexes: Array<Scalars["Int"]["input"]> | Scalars["Int"]["input"];
}>;
export type GetUploadLinksMutation = {
__typename?: "Mutation";
getUploadLinks: {
__typename?: "GetUploadLinksReturn";
value:
| {
__typename?: "GetUploadLinkErrors";
error:
| { __typename?: "InitUploadAlreadyCompletedErr" }
| {
__typename?: "MustHaveSetForUploadLinkErr";
resolution?: boolean | null;
framesPerSecond?: boolean | null;
}
| { __typename?: "NoInitForChunkedUploadErr" }
| {
__typename?: "ProcessingFailedErr";
processing: {
__typename?: "VideoProcessingGQL";
status: ProcessingStatusEnum;
errors: Array<{
__typename?: "VideoProcessingErrorGQL";
message: string;
}>;
};
}
| { __typename?: "SegmentAlreadyUploadedErr" }
| {
__typename?: "StorageLimitExceededErr";
reason: string;
tierName: string;
retainedStorageUsedBytes: any;
retainedStorageLimitBytes?: any | null;
remainingStorageBytes?: any | null;
}
| { __typename?: "TooManyInitUploadsErr" }
| { __typename?: "TooManyProfileImageUploadsErr" };
}
| {
__typename?: "UploadLinkBatch";
alreadyUploaded: Array<number>;
links: Array<{
__typename?: "SegmentUploadLink";
segmentIndex: number;
uploadUrl: string;
headers: Array<{
__typename?: "Header";
key: string;
value: string;
} | null>;
}>;
};
stream?: {
__typename?: "UploadStreamGQL";
id: string;
uploadCompletionCursor: number;
} | null;
};
};
export type GetHlsInitUploadLinkMutationVariables = Exact<{
videoId: Scalars["Int"]["input"];
}>;
@@ -9747,6 +10013,10 @@ export const SessionCoachCandidateFieldsFragmentDoc = gql`
patternShotCount
score
rankReason
baselineSessionCount
baselineAttemptCount
baselineMadeCount
baselineMakePercentage
}
}
`;
@@ -9757,7 +10027,13 @@ export const SessionCoachGenerationFieldsFragmentDoc = gql`
createdAt
completedAt
decision {
selectedPositiveCandidateId
positiveTitle
positiveBody
selectedCandidateId
supportingCandidateIds
supportingShotIds
sessionSummary
title
body
suggestedAction
@@ -9784,6 +10060,7 @@ export const SessionCoachGenerationFieldsFragmentDoc = gql`
startedAt
lastEnqueuedAt
abstentionReason
synthesisRationale
}
}
`;
@@ -9816,6 +10093,73 @@ export const PlayerClusterFieldsFragmentDoc = gql`
}
${PlayerClusterShotFieldsFragmentDoc}
`;
export const TableStateLayoutFieldsFragmentDoc = gql`
fragment TableStateLayoutFields on TableStateGQL {
identifierToPosition
identifierToColor {
hex
}
}
`;
export const DetectionBoxFieldsFragmentDoc = gql`
fragment DetectionBoxFields on BoundingBoxGQL {
left
top
width
height
}
`;
export const DetectionPocketPointFieldsFragmentDoc = gql`
fragment DetectionPocketPointFields on PocketPointsGQL {
topLeft {
x
y
}
topSide {
x
y
}
topRight {
x
y
}
bottomLeft {
x
y
}
bottomSide {
x
y
}
bottomRight {
x
y
}
}
`;
export const TableStateDetectionFieldsFragmentDoc = gql`
fragment TableStateDetectionFields on TableStateGQL {
identifierToBox {
...DetectionBoxFields
}
homography {
crop {
...DetectionBoxFields
}
pockets {
...DetectionBoxFields
}
sourcePoints {
...DetectionPocketPointFields
}
destPoints {
...DetectionPocketPointFields
}
}
}
${DetectionBoxFieldsFragmentDoc}
${DetectionPocketPointFieldsFragmentDoc}
`;
export const ShotClipRangeFragmentDoc = gql`
fragment ShotClipRange on ShotGQL {
id
@@ -15013,12 +15357,18 @@ export type ReactToVideoMutationOptions = Apollo.BaseMutationOptions<
ReactToVideoMutationVariables
>;
export const GetShotLabVideosDocument = gql`
query GetShotLabVideos($userId: Int!, $limit: Int! = 25) {
query GetShotLabVideos(
$feedInput: VideoFeedInputGQL!
$includePrivate: IncludePrivateEnum!
$limit: Int! = 25
$after: String = null
) {
getFeedVideos(
limit: $limit
after: $after
includeCallersVideos: false
includePrivate: MINE
feedInput: { userId: $userId }
includePrivate: $includePrivate
feedInput: $feedInput
) {
videos {
id
@@ -15038,6 +15388,10 @@ export const GetShotLabVideosDocument = gql`
lastSegmentUploadedAt
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
`;
@@ -15054,8 +15408,10 @@ export const GetShotLabVideosDocument = gql`
* @example
* const { data, loading, error } = useGetShotLabVideosQuery({
* variables: {
* userId: // value for 'userId'
* feedInput: // value for 'feedInput'
* includePrivate: // value for 'includePrivate'
* limit: // value for 'limit'
* after: // value for 'after'
* },
* });
*/
@@ -15416,6 +15772,16 @@ export const GetSessionCoachDocument = gql`
unknownOutcomeCount
analyzedShotCount
makePercentage
longestMakeStreak
recentBaseline {
sessionCount
attemptCount
madeCount
makePercentage
}
positiveCandidates {
...SessionCoachCandidateFields
}
primaryCandidate {
...SessionCoachCandidateFields
}
@@ -15551,6 +15917,63 @@ export type RequestSessionCoachGenerationMutationOptions =
RequestSessionCoachGenerationMutation,
RequestSessionCoachGenerationMutationVariables
>;
export const CreateShotShareLinkDocument = gql`
mutation CreateShotShareLink(
$shotIds: [Int!]!
$paddingSeconds: Float = null
) {
createShotShareLink(
input: { shotIds: $shotIds, paddingSeconds: $paddingSeconds }
) {
slug
url
}
}
`;
export type CreateShotShareLinkMutationFn = Apollo.MutationFunction<
CreateShotShareLinkMutation,
CreateShotShareLinkMutationVariables
>;
/**
* __useCreateShotShareLinkMutation__
*
* To run a mutation, you first call `useCreateShotShareLinkMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useCreateShotShareLinkMutation` 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 [createShotShareLinkMutation, { data, loading, error }] = useCreateShotShareLinkMutation({
* variables: {
* shotIds: // value for 'shotIds'
* paddingSeconds: // value for 'paddingSeconds'
* },
* });
*/
export function useCreateShotShareLinkMutation(
baseOptions?: Apollo.MutationHookOptions<
CreateShotShareLinkMutation,
CreateShotShareLinkMutationVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useMutation<
CreateShotShareLinkMutation,
CreateShotShareLinkMutationVariables
>(CreateShotShareLinkDocument, options);
}
export type CreateShotShareLinkMutationHookResult = ReturnType<
typeof useCreateShotShareLinkMutation
>;
export type CreateShotShareLinkMutationResult =
Apollo.MutationResult<CreateShotShareLinkMutation>;
export type CreateShotShareLinkMutationOptions = Apollo.BaseMutationOptions<
CreateShotShareLinkMutation,
CreateShotShareLinkMutationVariables
>;
export const VideoPlayerClustersDocument = gql`
query VideoPlayerClusters($videoId: Int!) {
videoPlayerClusters(videoId: $videoId) {
@@ -15688,12 +16111,12 @@ export const GetTableStateDocument = gql`
tableSize: $tableSize
useHomography: $useHomography
) {
identifierToPosition
identifierToColor {
hex
}
...TableStateLayoutFields
...TableStateDetectionFields
}
}
${TableStateLayoutFieldsFragmentDoc}
${TableStateDetectionFieldsFragmentDoc}
`;
/**
@@ -15769,13 +16192,11 @@ export const GetLiveTableStateDocument = gql`
videoId
frameIndex
tableState {
identifierToPosition
identifierToColor {
hex
}
...TableStateLayoutFields
}
}
}
${TableStateLayoutFieldsFragmentDoc}
`;
/**
@@ -15850,13 +16271,11 @@ export const GetShotTableStateDocument = gql`
videoId
frameIndex
tableState {
identifierToPosition
identifierToColor {
hex
}
...TableStateLayoutFields
}
}
}
${TableStateLayoutFieldsFragmentDoc}
`;
/**
@@ -17011,8 +17430,6 @@ export const GetUsageStatsDocument = gql`
activationCohort
activationActivated
payingUsers
pastDueUsers
newPaidToday
newPaid7d
newPaid30d
retentionPrevActive
@@ -17024,7 +17441,6 @@ export const GetUsageStatsDocument = gql`
activated7d
paid7d
activatedNotPaid7d
paidTotal
}
totalUsers
totalVideos
@@ -20066,6 +20482,96 @@ export type GetUploadLinkMutationOptions = Apollo.BaseMutationOptions<
GetUploadLinkMutation,
GetUploadLinkMutationVariables
>;
export const GetUploadLinksDocument = gql`
mutation GetUploadLinks($videoId: Int!, $segmentIndexes: [Int!]!) {
getUploadLinks(videoId: $videoId, segmentIndexes: $segmentIndexes) {
value {
... on UploadLinkBatch {
links {
segmentIndex
uploadUrl
headers {
key
value
}
}
alreadyUploaded
}
... on GetUploadLinkErrors {
error {
... on MustHaveSetForUploadLinkErr {
resolution
framesPerSecond
}
... on ProcessingFailedErr {
processing {
status
errors {
message
}
}
}
... on StorageLimitExceededErr {
reason
tierName
retainedStorageUsedBytes
retainedStorageLimitBytes
remainingStorageBytes
}
}
}
}
stream {
id
uploadCompletionCursor
}
}
}
`;
export type GetUploadLinksMutationFn = Apollo.MutationFunction<
GetUploadLinksMutation,
GetUploadLinksMutationVariables
>;
/**
* __useGetUploadLinksMutation__
*
* To run a mutation, you first call `useGetUploadLinksMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useGetUploadLinksMutation` 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 [getUploadLinksMutation, { data, loading, error }] = useGetUploadLinksMutation({
* variables: {
* videoId: // value for 'videoId'
* segmentIndexes: // value for 'segmentIndexes'
* },
* });
*/
export function useGetUploadLinksMutation(
baseOptions?: Apollo.MutationHookOptions<
GetUploadLinksMutation,
GetUploadLinksMutationVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useMutation<
GetUploadLinksMutation,
GetUploadLinksMutationVariables
>(GetUploadLinksDocument, options);
}
export type GetUploadLinksMutationHookResult = ReturnType<
typeof useGetUploadLinksMutation
>;
export type GetUploadLinksMutationResult =
Apollo.MutationResult<GetUploadLinksMutation>;
export type GetUploadLinksMutationOptions = Apollo.BaseMutationOptions<
GetUploadLinksMutation,
GetUploadLinksMutationVariables
>;
export const GetHlsInitUploadLinkDocument = gql`
mutation GetHlsInitUploadLink($videoId: Int!) {
getHlsInitUploadLink(videoId: $videoId) {

View File

@@ -1,12 +1,19 @@
# Lightweight two-step picker data for Shot Lab's video-first source: the
# caller's recent videos (completed or still uploading), then that video's
# shots. The stream fields hint at "actively updating" without gating.
query GetShotLabVideos($userId: Int!, $limit: Int! = 25) {
# Lightweight two-step picker data for Shot Lab's video-first source: recent
# videos from the requested audience (mine, followed users, or public), then
# that video's shots. The stream fields hint at "actively updating" without
# gating.
query GetShotLabVideos(
$feedInput: VideoFeedInputGQL!
$includePrivate: IncludePrivateEnum!
$limit: Int! = 25
$after: String = null
) {
getFeedVideos(
limit: $limit
after: $after
includeCallersVideos: false
includePrivate: MINE
feedInput: { userId: $userId }
includePrivate: $includePrivate
feedInput: $feedInput
) {
videos {
id
@@ -26,6 +33,10 @@ query GetShotLabVideos($userId: Int!, $limit: Int! = 25) {
lastSegmentUploadedAt
}
}
pageInfo {
hasNextPage
endCursor
}
}
}

View File

@@ -14,6 +14,16 @@ query GetSessionCoach($videoId: Int!) {
unknownOutcomeCount
analyzedShotCount
makePercentage
longestMakeStreak
recentBaseline {
sessionCount
attemptCount
madeCount
makePercentage
}
positiveCandidates {
...SessionCoachCandidateFields
}
primaryCandidate {
...SessionCoachCandidateFields
}
@@ -59,6 +69,10 @@ fragment SessionCoachCandidateFields on SessionCoachCandidateGQL {
patternShotCount
score
rankReason
baselineSessionCount
baselineAttemptCount
baselineMadeCount
baselineMakePercentage
}
}
@@ -68,7 +82,13 @@ fragment SessionCoachGenerationFields on SessionCoachGenerationGQL {
createdAt
completedAt
decision {
selectedPositiveCandidateId
positiveTitle
positiveBody
selectedCandidateId
supportingCandidateIds
supportingShotIds
sessionSummary
title
body
suggestedAction
@@ -95,5 +115,6 @@ fragment SessionCoachGenerationFields on SessionCoachGenerationGQL {
startedAt
lastEnqueuedAt
abstentionReason
synthesisRationale
}
}

View File

@@ -0,0 +1,8 @@
mutation CreateShotShareLink($shotIds: [Int!]!, $paddingSeconds: Float = null) {
createShotShareLink(
input: { shotIds: $shotIds, paddingSeconds: $paddingSeconds }
) {
slug
url
}
}

View File

@@ -1,3 +1,72 @@
fragment TableStateLayoutFields on TableStateGQL {
identifierToPosition
identifierToColor {
hex
}
}
fragment DetectionBoxFields on BoundingBoxGQL {
left
top
width
height
}
fragment DetectionPocketPointFields on PocketPointsGQL {
topLeft {
x
y
}
topSide {
x
y
}
topRight {
x
y
}
bottomLeft {
x
y
}
bottomSide {
x
y
}
bottomRight {
x
y
}
}
# Everything needed to redraw a detection over the image it came from:
# the detector's boxes plus the homography that turned them into plane
# 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.
fragment TableStateDetectionFields on TableStateGQL {
identifierToBox {
...DetectionBoxFields
}
homography {
crop {
...DetectionBoxFields
}
pockets {
...DetectionBoxFields
}
sourcePoints {
...DetectionPocketPointFields
}
destPoints {
...DetectionPocketPointFields
}
}
}
query GetTableState(
$b64Image: String!
$tableSize: Float
@@ -8,10 +77,8 @@ query GetTableState(
tableSize: $tableSize
useHomography: $useHomography
) {
identifierToPosition
identifierToColor {
hex
}
...TableStateLayoutFields
...TableStateDetectionFields
}
}
@@ -20,10 +87,7 @@ query GetLiveTableState($videoId: Int!) {
videoId
frameIndex
tableState {
identifierToPosition
identifierToColor {
hex
}
...TableStateLayoutFields
}
}
}
@@ -34,10 +98,7 @@ query GetShotTableState($shotId: Int!) {
videoId
frameIndex
tableState {
identifierToPosition
identifierToColor {
hex
}
...TableStateLayoutFields
}
}
}

View File

@@ -7,8 +7,6 @@ query getUsageStats($days: Int! = 30) {
activationCohort
activationActivated
payingUsers
pastDueUsers
newPaidToday
newPaid7d
newPaid30d
retentionPrevActive
@@ -20,7 +18,6 @@ query getUsageStats($days: Int! = 30) {
activated7d
paid7d
activatedNotPaid7d
paidTotal
}
totalUsers
totalVideos

View File

@@ -54,6 +54,51 @@ mutation GetUploadLink($videoId: Int!, $segmentIndex: Int!) {
}
}
mutation GetUploadLinks($videoId: Int!, $segmentIndexes: [Int!]!) {
getUploadLinks(videoId: $videoId, segmentIndexes: $segmentIndexes) {
value {
... on UploadLinkBatch {
links {
segmentIndex
uploadUrl
headers {
key
value
}
}
alreadyUploaded
}
... on GetUploadLinkErrors {
error {
... on MustHaveSetForUploadLinkErr {
resolution
framesPerSecond
}
... on ProcessingFailedErr {
processing {
status
errors {
message
}
}
}
... on StorageLimitExceededErr {
reason
tierName
retainedStorageUsedBytes
retainedStorageLimitBytes
remainingStorageBytes
}
}
}
}
stream {
id
uploadCompletionCursor
}
}
}
mutation GetHlsInitUploadLink($videoId: Int!) {
getHlsInitUploadLink(videoId: $videoId) {
value {

View File

@@ -214,7 +214,6 @@ type CohortStatsGQL {
activated7d: Int!
paid7d: Int!
activatedNotPaid7d: Int!
paidTotal: Int!
}
type CommentGQL {
@@ -250,6 +249,11 @@ input CreatePoolHallCameraInput {
claimTermsText: String = null
}
input CreateShotShareLinkInput {
shotIds: [Int!]!
paddingSeconds: Float = null
}
input CreatePoolHallInput {
name: String!
address: String = null
@@ -260,11 +264,6 @@ input CreatePoolHallInput {
timezone: String = null
}
input CreateShotShareLinkInput {
shotIds: [Int!]!
paddingSeconds: Float = null
}
type CreateSubscriptionResultGQL {
checkoutUrl: String!
sessionId: String!
@@ -465,8 +464,6 @@ type FunnelStatsGQL {
activationCohort: Int!
activationActivated: Int!
payingUsers: Int!
pastDueUsers: Int!
newPaidToday: Int!
newPaid7d: Int!
newPaid30d: Int!
retentionPrevActive: Int!
@@ -1462,11 +1459,6 @@ enum SessionCoachStateEnum {
FAILED
}
type ShareLinkGQL {
slug: String!
url: String!
}
type ShotAnnotationGQL {
shotId: Int!
type: ShotAnnotationTypeGQL!
@@ -1716,6 +1708,7 @@ type TableStateGQL {
identifierToPosition: [[Float!]!]!
homography: HomographyInfoGQL
identifierToColor: [RGBColorGQL]!
identifierToBox: [BoundingBoxGQL!]!
}
type TagClassGQL {
@@ -1927,6 +1920,11 @@ type UserSubscriptionStatusGQL {
stripeSubscriptionId: String
}
type ShareLinkGQL {
slug: String!
url: String!
}
type VideoExportJobGQL {
id: Int!
videoId: Int!
@@ -1937,7 +1935,7 @@ type VideoExportJobGQL {
shotIds: [Int!]
runId: Int
downloadUrl: String
fileSizeBytes: Int
fileSizeBytes: BigInt
expiresAt: DateTime
createdAt: DateTime
}