Compare commits
20 Commits
dean/feed-
...
shot-simul
| Author | SHA1 | Date | |
|---|---|---|---|
| 4ff2db1ef4 | |||
| b6adae4949 | |||
| 459e89d8b8 | |||
| fa2ff19572 | |||
| 428286fa5a | |||
|
|
8771350115 | ||
|
|
f1594b8492 | ||
|
|
3ec3e3d081 | ||
|
|
d2c697e4cb | ||
| 3484af9dde | |||
| bc62cb5e39 | |||
| bc52145a9e | |||
| 5c286f2bcf | |||
| d636c298f8 | |||
| 681320c62d | |||
| 49f409f60b | |||
| e7fc6c147d | |||
| 10c3f6de53 | |||
|
|
d7b1aaee13 | ||
| b477590137 |
480
src/index.tsx
480
src/index.tsx
@@ -28,6 +28,8 @@ export type Scalars = {
|
||||
Boolean: { input: boolean; output: boolean };
|
||||
Int: { input: number; output: number };
|
||||
Float: { input: number; output: number };
|
||||
/** Integer value that can exceed GraphQL Int's 32-bit range. */
|
||||
BigInt: { input: any; output: any };
|
||||
/** Date (isoformat) */
|
||||
Date: { input: any; output: any };
|
||||
/** Date with time (isoformat) */
|
||||
@@ -86,6 +88,12 @@ export type AppleIapSubscriptionOptionsGql = {
|
||||
productIds: Array<Scalars["String"]["output"]>;
|
||||
};
|
||||
|
||||
export type BallTrajectoryGql = {
|
||||
__typename?: "BallTrajectoryGQL";
|
||||
ballId: Scalars["Int"]["output"];
|
||||
points: Array<TrajectoryPointGql>;
|
||||
};
|
||||
|
||||
export type BankFeaturesGql = {
|
||||
__typename?: "BankFeaturesGQL";
|
||||
bankAngle: Scalars["Float"]["output"];
|
||||
@@ -266,6 +274,14 @@ export type CueObjectFeaturesGql = {
|
||||
spinType?: Maybe<SpinTypeEnum>;
|
||||
};
|
||||
|
||||
export type CueStrikeInputGql = {
|
||||
a?: Scalars["Float"]["input"];
|
||||
b?: Scalars["Float"]["input"];
|
||||
phi: Scalars["Float"]["input"];
|
||||
theta?: Scalars["Float"]["input"];
|
||||
v0: Scalars["Float"]["input"];
|
||||
};
|
||||
|
||||
export type DateRangeFilter = {
|
||||
greaterThan?: InputMaybe<Scalars["Date"]["input"]>;
|
||||
greaterThanEqualTo?: InputMaybe<Scalars["Date"]["input"]>;
|
||||
@@ -298,6 +314,7 @@ export type DeployedConfigGql = {
|
||||
firebase: Scalars["Boolean"]["output"];
|
||||
minimumAllowedAppVersion: Scalars["String"]["output"];
|
||||
quotaEnforcementEnabled: Scalars["Boolean"]["output"];
|
||||
storageLimitEnforcementEnabled: Scalars["Boolean"]["output"];
|
||||
subscriptionGatingEnabled: Scalars["Boolean"]["output"];
|
||||
};
|
||||
|
||||
@@ -2285,7 +2302,7 @@ export type GetShotsResult = {
|
||||
|
||||
export type GetUploadLinkErrors = {
|
||||
__typename?: "GetUploadLinkErrors";
|
||||
error: MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErr;
|
||||
error: MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErrStorageLimitExceededErr;
|
||||
};
|
||||
|
||||
export type GetUploadLinkReturn = {
|
||||
@@ -2389,13 +2406,14 @@ export type MustHaveSetForUploadLinkErr = {
|
||||
resolution?: Maybe<Scalars["Boolean"]["output"]>;
|
||||
};
|
||||
|
||||
export type MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErr =
|
||||
export type MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErrStorageLimitExceededErr =
|
||||
|
||||
| InitUploadAlreadyCompletedErr
|
||||
| MustHaveSetForUploadLinkErr
|
||||
| NoInitForChunkedUploadErr
|
||||
| ProcessingFailedErr
|
||||
| SegmentAlreadyUploadedErr
|
||||
| StorageLimitExceededErr
|
||||
| TooManyInitUploadsErr
|
||||
| TooManyProfileImageUploadsErr;
|
||||
|
||||
@@ -2438,6 +2456,7 @@ export type Mutation = {
|
||||
reactToVideo: Scalars["Boolean"]["output"];
|
||||
recalculateChallengeEntry: ChallengeEntry;
|
||||
reportContent: Scalars["Boolean"]["output"];
|
||||
requestVideoExport: VideoExportJobGql;
|
||||
respondToChallengeInvitation: ChallengeInvitation;
|
||||
retireTags: Scalars["Boolean"]["output"];
|
||||
revokeManualEntitlement: UserSubscriptionStatusGql;
|
||||
@@ -2611,6 +2630,10 @@ export type MutationReportContentArgs = {
|
||||
videoId: Scalars["Int"]["input"];
|
||||
};
|
||||
|
||||
export type MutationRequestVideoExportArgs = {
|
||||
input: RequestVideoExportInput;
|
||||
};
|
||||
|
||||
export type MutationRespondToChallengeInvitationArgs = {
|
||||
accept: Scalars["Boolean"]["input"];
|
||||
invitationId: Scalars["ID"]["input"];
|
||||
@@ -2704,6 +2727,7 @@ export enum NotificationTypeEnum {
|
||||
ChallengeInvite = "CHALLENGE_INVITE",
|
||||
Comment = "COMMENT",
|
||||
CommentReply = "COMMENT_REPLY",
|
||||
ExportReady = "EXPORT_READY",
|
||||
Follow = "FOLLOW",
|
||||
Reaction = "REACTION",
|
||||
}
|
||||
@@ -2853,11 +2877,13 @@ export type Query = {
|
||||
getOrderedShots: GetShotsResult;
|
||||
getPlayTime: UserPlayTimeGql;
|
||||
getQuotaStatus: QuotaStatusGql;
|
||||
getResolvedTier: ResolvedTierGql;
|
||||
getRuns: GetRunsResult;
|
||||
getShotAnnotationTypes: Array<ShotAnnotationTypeGql>;
|
||||
getShots: Array<ShotGql>;
|
||||
getShotsByIds: Array<ShotGql>;
|
||||
getShotsWithMetadata: GetShotsResult;
|
||||
getStorageStatus?: Maybe<StorageStatusGql>;
|
||||
getTableState: TableStateGql;
|
||||
getUser?: Maybe<UserGql>;
|
||||
getUserRelationshipsMatching: UserRelationshipsResult;
|
||||
@@ -2873,9 +2899,12 @@ export type Query = {
|
||||
myChallengeEntries: Array<ChallengeEntry>;
|
||||
myChallengeInvitations: Array<ChallengeInvitation>;
|
||||
myDismissedChallenges: Array<Challenge>;
|
||||
myVideoExports: Array<VideoExportJobGql>;
|
||||
notifications: NotificationConnection;
|
||||
ruleSets: Array<RuleSet>;
|
||||
simulateShot: ShotProjectionGql;
|
||||
unreadNotificationCount: Scalars["Int"]["output"];
|
||||
videoExportJob?: Maybe<VideoExportJobGql>;
|
||||
videoPlayerClusters: Array<PlayerClusterGql>;
|
||||
waitFor: Scalars["Float"]["output"];
|
||||
};
|
||||
@@ -3052,12 +3081,25 @@ export type QueryIsChallengeDismissedArgs = {
|
||||
challengeId: Scalars["ID"]["input"];
|
||||
};
|
||||
|
||||
export type QueryMyVideoExportsArgs = {
|
||||
limit?: Scalars["Int"]["input"];
|
||||
offset?: Scalars["Int"]["input"];
|
||||
};
|
||||
|
||||
export type QueryNotificationsArgs = {
|
||||
filters?: InputMaybe<NotificationFilters>;
|
||||
limit?: Scalars["Int"]["input"];
|
||||
offset?: Scalars["Int"]["input"];
|
||||
};
|
||||
|
||||
export type QuerySimulateShotArgs = {
|
||||
simulationInput: SimulateShotInputGql;
|
||||
};
|
||||
|
||||
export type QueryVideoExportJobArgs = {
|
||||
jobId: Scalars["Int"]["input"];
|
||||
};
|
||||
|
||||
export type QueryVideoPlayerClustersArgs = {
|
||||
videoId: Scalars["Int"]["input"];
|
||||
};
|
||||
@@ -3117,6 +3159,13 @@ export enum ReportReasonEnum {
|
||||
Violence = "VIOLENCE",
|
||||
}
|
||||
|
||||
export type RequestVideoExportInput = {
|
||||
mode: VideoExportModeEnum;
|
||||
runId?: InputMaybe<Scalars["Int"]["input"]>;
|
||||
shotIds?: InputMaybe<Array<Scalars["Int"]["input"]>>;
|
||||
videoId: Scalars["Int"]["input"];
|
||||
};
|
||||
|
||||
export type RequestedMedalsGql = {
|
||||
__typename?: "RequestedMedalsGQL";
|
||||
dailyMakes50?: Maybe<MedalGql>;
|
||||
@@ -3158,6 +3207,18 @@ export type RequestedMedalsGql = {
|
||||
totalMakes10000?: Maybe<MedalGql>;
|
||||
};
|
||||
|
||||
export type ResolvedTierGql = {
|
||||
__typename?: "ResolvedTierGQL";
|
||||
capabilities: Array<Scalars["String"]["output"]>;
|
||||
entitlementEndsAt?: Maybe<Scalars["DateTime"]["output"]>;
|
||||
entitlementSource?: Maybe<EntitlementSourceTypeEnum>;
|
||||
entitlementStartsAt?: Maybe<Scalars["DateTime"]["output"]>;
|
||||
entitlementStatus?: Maybe<Scalars["String"]["output"]>;
|
||||
hasActiveSubscription: Scalars["Boolean"]["output"];
|
||||
tierDisplayName: Scalars["String"]["output"];
|
||||
tierName: Scalars["String"]["output"];
|
||||
};
|
||||
|
||||
export type RuleSet = {
|
||||
__typename?: "RuleSet";
|
||||
createdAt: Scalars["DateTime"]["output"];
|
||||
@@ -3298,6 +3359,14 @@ export type ShotMoveInput = {
|
||||
shotId: Scalars["Int"]["input"];
|
||||
};
|
||||
|
||||
export type ShotProjectionGql = {
|
||||
__typename?: "ShotProjectionGQL";
|
||||
events: Array<SimulationEventGql>;
|
||||
finalState: Array<SimulationBallStateGql>;
|
||||
pottedBallIds: Array<Scalars["Int"]["output"]>;
|
||||
trajectories: Array<BallTrajectoryGql>;
|
||||
};
|
||||
|
||||
export type ShotsOrderingComponent =
|
||||
| {
|
||||
difficulty: FloatOrdering;
|
||||
@@ -3348,6 +3417,42 @@ export type ShotsOrderingComponent =
|
||||
videoId: IntOrdering;
|
||||
};
|
||||
|
||||
export type SimulateShotInputGql = {
|
||||
b64Image?: InputMaybe<Scalars["String"]["input"]>;
|
||||
balls?: InputMaybe<Array<SimulationBallStateInputGql>>;
|
||||
cueBallId: Scalars["Int"]["input"];
|
||||
strike: CueStrikeInputGql;
|
||||
tableSize?: InputMaybe<Scalars["Float"]["input"]>;
|
||||
useHomography?: InputMaybe<HomographyInputGql>;
|
||||
};
|
||||
|
||||
export type SimulationBallStateGql = {
|
||||
__typename?: "SimulationBallStateGQL";
|
||||
ballId: Scalars["Int"]["output"];
|
||||
position: Array<Scalars["Float"]["output"]>;
|
||||
};
|
||||
|
||||
export type SimulationBallStateInputGql = {
|
||||
ballId: Scalars["Int"]["input"];
|
||||
position: Array<Scalars["Float"]["input"]>;
|
||||
};
|
||||
|
||||
export type SimulationEventGql = {
|
||||
__typename?: "SimulationEventGQL";
|
||||
ballIds: Array<Scalars["Int"]["output"]>;
|
||||
eventType: SimulationEventType;
|
||||
position?: Maybe<Array<Scalars["Float"]["output"]>>;
|
||||
time: Scalars["Float"]["output"];
|
||||
};
|
||||
|
||||
export enum SimulationEventType {
|
||||
BallBall = "BALL_BALL",
|
||||
BallCushion = "BALL_CUSHION",
|
||||
BallPocket = "BALL_POCKET",
|
||||
BallStop = "BALL_STOP",
|
||||
StickBall = "STICK_BALL",
|
||||
}
|
||||
|
||||
export type SpinTypeBreakdownGql = {
|
||||
__typename?: "SpinTypeBreakdownGQL";
|
||||
center: Scalars["Int"]["output"];
|
||||
@@ -3370,6 +3475,32 @@ export enum SpinTypeEnum {
|
||||
Unknown = "UNKNOWN",
|
||||
}
|
||||
|
||||
export type StorageLimitExceededErr = {
|
||||
__typename?: "StorageLimitExceededErr";
|
||||
reason: Scalars["String"]["output"];
|
||||
remainingStorageBytes?: Maybe<Scalars["BigInt"]["output"]>;
|
||||
retainedStorageLimitBytes?: Maybe<Scalars["BigInt"]["output"]>;
|
||||
retainedStorageUsedBytes: Scalars["BigInt"]["output"];
|
||||
tierName: Scalars["String"]["output"];
|
||||
};
|
||||
|
||||
export type StorageStatusGql = {
|
||||
__typename?: "StorageStatusGQL";
|
||||
isNearLimit: Scalars["Boolean"]["output"];
|
||||
isOverLimit: Scalars["Boolean"]["output"];
|
||||
isUnlimited: Scalars["Boolean"]["output"];
|
||||
lastCalculatedAt?: Maybe<Scalars["DateTime"]["output"]>;
|
||||
policyConfigured: Scalars["Boolean"]["output"];
|
||||
remainingStorageBytes?: Maybe<Scalars["BigInt"]["output"]>;
|
||||
retainedStorageLimitBytes?: Maybe<Scalars["BigInt"]["output"]>;
|
||||
retainedStorageUsedBytes: Scalars["BigInt"]["output"];
|
||||
storageUsageRatio?: Maybe<Scalars["Float"]["output"]>;
|
||||
tierName: Scalars["String"]["output"];
|
||||
usageCalculated: Scalars["Boolean"]["output"];
|
||||
usageSource?: Maybe<Scalars["String"]["output"]>;
|
||||
userId: Scalars["Int"]["output"];
|
||||
};
|
||||
|
||||
export type StreamErrorGql = {
|
||||
__typename?: "StreamErrorGQL";
|
||||
message: Scalars["String"]["output"];
|
||||
@@ -3498,6 +3629,12 @@ export type TooManyProfileImageUploadsErr = {
|
||||
linksRequested: Scalars["Int"]["output"];
|
||||
};
|
||||
|
||||
export type TrajectoryPointGql = {
|
||||
__typename?: "TrajectoryPointGQL";
|
||||
position: Array<Scalars["Float"]["output"]>;
|
||||
time: Scalars["Float"]["output"];
|
||||
};
|
||||
|
||||
export type UpdateAnnotationInputGql = {
|
||||
name: Scalars["String"]["input"];
|
||||
notes?: InputMaybe<Scalars["String"]["input"]>;
|
||||
@@ -3615,6 +3752,35 @@ export type UserSubscriptionStatusGql = {
|
||||
validUntil?: Maybe<Scalars["DateTime"]["output"]>;
|
||||
};
|
||||
|
||||
export type VideoExportJobGql = {
|
||||
__typename?: "VideoExportJobGQL";
|
||||
createdAt?: Maybe<Scalars["DateTime"]["output"]>;
|
||||
downloadUrl?: Maybe<Scalars["String"]["output"]>;
|
||||
expiresAt?: Maybe<Scalars["DateTime"]["output"]>;
|
||||
fileSizeBytes?: Maybe<Scalars["Int"]["output"]>;
|
||||
id: Scalars["Int"]["output"];
|
||||
mode: VideoExportModeEnum;
|
||||
runId?: Maybe<Scalars["Int"]["output"]>;
|
||||
shotIds?: Maybe<Array<Scalars["Int"]["output"]>>;
|
||||
status: VideoExportStatusEnum;
|
||||
videoId: Scalars["Int"]["output"];
|
||||
};
|
||||
|
||||
export enum VideoExportModeEnum {
|
||||
FullSession = "FULL_SESSION",
|
||||
Run = "RUN",
|
||||
Shots = "SHOTS",
|
||||
}
|
||||
|
||||
export enum VideoExportStatusEnum {
|
||||
Created = "CREATED",
|
||||
Expired = "EXPIRED",
|
||||
Failed = "FAILED",
|
||||
Queued = "QUEUED",
|
||||
Running = "RUNNING",
|
||||
Succeeded = "SUCCEEDED",
|
||||
}
|
||||
|
||||
export type VideoFeedInputGql =
|
||||
| {
|
||||
allUsers: Scalars["Boolean"]["input"];
|
||||
@@ -4700,6 +4866,7 @@ export type GetDrillRunLeaderboardQuery = {
|
||||
__typename?: "VideoGQL";
|
||||
tableSize: number;
|
||||
pocketSize?: number | null;
|
||||
createdAt?: any | null;
|
||||
};
|
||||
user: {
|
||||
__typename?: "UserGQL";
|
||||
@@ -6981,6 +7148,84 @@ export type HomographyInfoFragment = {
|
||||
};
|
||||
};
|
||||
|
||||
export type VideoExportJobFieldsFragment = {
|
||||
__typename?: "VideoExportJobGQL";
|
||||
id: number;
|
||||
videoId: number;
|
||||
mode: VideoExportModeEnum;
|
||||
status: VideoExportStatusEnum;
|
||||
shotIds?: Array<number> | null;
|
||||
runId?: number | null;
|
||||
downloadUrl?: string | null;
|
||||
fileSizeBytes?: number | null;
|
||||
expiresAt?: any | null;
|
||||
createdAt?: any | null;
|
||||
};
|
||||
|
||||
export type RequestVideoExportMutationVariables = Exact<{
|
||||
input: RequestVideoExportInput;
|
||||
}>;
|
||||
|
||||
export type RequestVideoExportMutation = {
|
||||
__typename?: "Mutation";
|
||||
requestVideoExport: {
|
||||
__typename?: "VideoExportJobGQL";
|
||||
id: number;
|
||||
videoId: number;
|
||||
mode: VideoExportModeEnum;
|
||||
status: VideoExportStatusEnum;
|
||||
shotIds?: Array<number> | null;
|
||||
runId?: number | null;
|
||||
downloadUrl?: string | null;
|
||||
fileSizeBytes?: number | null;
|
||||
expiresAt?: any | null;
|
||||
createdAt?: any | null;
|
||||
};
|
||||
};
|
||||
|
||||
export type VideoExportJobQueryVariables = Exact<{
|
||||
jobId: Scalars["Int"]["input"];
|
||||
}>;
|
||||
|
||||
export type VideoExportJobQuery = {
|
||||
__typename?: "Query";
|
||||
videoExportJob?: {
|
||||
__typename?: "VideoExportJobGQL";
|
||||
id: number;
|
||||
videoId: number;
|
||||
mode: VideoExportModeEnum;
|
||||
status: VideoExportStatusEnum;
|
||||
shotIds?: Array<number> | null;
|
||||
runId?: number | null;
|
||||
downloadUrl?: string | null;
|
||||
fileSizeBytes?: number | null;
|
||||
expiresAt?: any | null;
|
||||
createdAt?: any | null;
|
||||
} | null;
|
||||
};
|
||||
|
||||
export type MyVideoExportsQueryVariables = Exact<{
|
||||
limit?: InputMaybe<Scalars["Int"]["input"]>;
|
||||
offset?: InputMaybe<Scalars["Int"]["input"]>;
|
||||
}>;
|
||||
|
||||
export type MyVideoExportsQuery = {
|
||||
__typename?: "Query";
|
||||
myVideoExports: Array<{
|
||||
__typename?: "VideoExportJobGQL";
|
||||
id: number;
|
||||
videoId: number;
|
||||
mode: VideoExportModeEnum;
|
||||
status: VideoExportStatusEnum;
|
||||
shotIds?: Array<number> | null;
|
||||
runId?: number | null;
|
||||
downloadUrl?: string | null;
|
||||
fileSizeBytes?: number | null;
|
||||
expiresAt?: any | null;
|
||||
createdAt?: any | null;
|
||||
}>;
|
||||
};
|
||||
|
||||
export type CreateUploadStreamMutationVariables = Exact<{
|
||||
videoMetadataInput: VideoMetadataInput;
|
||||
expectedDurationSeconds?: InputMaybe<Scalars["Float"]["input"]>;
|
||||
@@ -7026,6 +7271,7 @@ export type GetUploadLinkMutation = {
|
||||
};
|
||||
}
|
||||
| { __typename?: "SegmentAlreadyUploadedErr"; segmentId: number }
|
||||
| { __typename?: "StorageLimitExceededErr" }
|
||||
| { __typename?: "TooManyInitUploadsErr" }
|
||||
| { __typename?: "TooManyProfileImageUploadsErr" };
|
||||
}
|
||||
@@ -7068,6 +7314,14 @@ export type GetHlsInitUploadLinkMutation = {
|
||||
}
|
||||
| { __typename?: "ProcessingFailedErr" }
|
||||
| { __typename?: "SegmentAlreadyUploadedErr" }
|
||||
| {
|
||||
__typename?: "StorageLimitExceededErr";
|
||||
reason: string;
|
||||
tierName: string;
|
||||
retainedStorageUsedBytes: any;
|
||||
retainedStorageLimitBytes?: any | null;
|
||||
remainingStorageBytes?: any | null;
|
||||
}
|
||||
| { __typename?: "TooManyInitUploadsErr"; linksRequested: number }
|
||||
| { __typename?: "TooManyProfileImageUploadsErr" };
|
||||
}
|
||||
@@ -7546,6 +7800,20 @@ export const HomographyInfoFragmentDoc = gql`
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const VideoExportJobFieldsFragmentDoc = gql`
|
||||
fragment VideoExportJobFields on VideoExportJobGQL {
|
||||
id
|
||||
videoId
|
||||
mode
|
||||
status
|
||||
shotIds
|
||||
runId
|
||||
downloadUrl
|
||||
fileSizeBytes
|
||||
expiresAt
|
||||
createdAt
|
||||
}
|
||||
`;
|
||||
export const UploadStreamWithDetailsFragmentDoc = gql`
|
||||
fragment UploadStreamWithDetails on VideoGQL {
|
||||
id
|
||||
@@ -9817,6 +10085,7 @@ export const GetDrillRunLeaderboardDocument = gql`
|
||||
video {
|
||||
tableSize
|
||||
pocketSize
|
||||
createdAt
|
||||
}
|
||||
user {
|
||||
id
|
||||
@@ -14956,6 +15225,206 @@ export type FindPrerecordTableLayoutMutationOptions =
|
||||
FindPrerecordTableLayoutMutation,
|
||||
FindPrerecordTableLayoutMutationVariables
|
||||
>;
|
||||
export const RequestVideoExportDocument = gql`
|
||||
mutation RequestVideoExport($input: RequestVideoExportInput!) {
|
||||
requestVideoExport(input: $input) {
|
||||
...VideoExportJobFields
|
||||
}
|
||||
}
|
||||
${VideoExportJobFieldsFragmentDoc}
|
||||
`;
|
||||
export type RequestVideoExportMutationFn = Apollo.MutationFunction<
|
||||
RequestVideoExportMutation,
|
||||
RequestVideoExportMutationVariables
|
||||
>;
|
||||
|
||||
/**
|
||||
* __useRequestVideoExportMutation__
|
||||
*
|
||||
* To run a mutation, you first call `useRequestVideoExportMutation` within a React component and pass it any options that fit your needs.
|
||||
* When your component renders, `useRequestVideoExportMutation` 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 [requestVideoExportMutation, { data, loading, error }] = useRequestVideoExportMutation({
|
||||
* variables: {
|
||||
* input: // value for 'input'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
export function useRequestVideoExportMutation(
|
||||
baseOptions?: Apollo.MutationHookOptions<
|
||||
RequestVideoExportMutation,
|
||||
RequestVideoExportMutationVariables
|
||||
>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useMutation<
|
||||
RequestVideoExportMutation,
|
||||
RequestVideoExportMutationVariables
|
||||
>(RequestVideoExportDocument, options);
|
||||
}
|
||||
export type RequestVideoExportMutationHookResult = ReturnType<
|
||||
typeof useRequestVideoExportMutation
|
||||
>;
|
||||
export type RequestVideoExportMutationResult =
|
||||
Apollo.MutationResult<RequestVideoExportMutation>;
|
||||
export type RequestVideoExportMutationOptions = Apollo.BaseMutationOptions<
|
||||
RequestVideoExportMutation,
|
||||
RequestVideoExportMutationVariables
|
||||
>;
|
||||
export const VideoExportJobDocument = gql`
|
||||
query VideoExportJob($jobId: Int!) {
|
||||
videoExportJob(jobId: $jobId) {
|
||||
...VideoExportJobFields
|
||||
}
|
||||
}
|
||||
${VideoExportJobFieldsFragmentDoc}
|
||||
`;
|
||||
|
||||
/**
|
||||
* __useVideoExportJobQuery__
|
||||
*
|
||||
* To run a query within a React component, call `useVideoExportJobQuery` and pass it any options that fit your needs.
|
||||
* When your component renders, `useVideoExportJobQuery` 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 } = useVideoExportJobQuery({
|
||||
* variables: {
|
||||
* jobId: // value for 'jobId'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
export function useVideoExportJobQuery(
|
||||
baseOptions: Apollo.QueryHookOptions<
|
||||
VideoExportJobQuery,
|
||||
VideoExportJobQueryVariables
|
||||
>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useQuery<VideoExportJobQuery, VideoExportJobQueryVariables>(
|
||||
VideoExportJobDocument,
|
||||
options,
|
||||
);
|
||||
}
|
||||
export function useVideoExportJobLazyQuery(
|
||||
baseOptions?: Apollo.LazyQueryHookOptions<
|
||||
VideoExportJobQuery,
|
||||
VideoExportJobQueryVariables
|
||||
>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useLazyQuery<VideoExportJobQuery, VideoExportJobQueryVariables>(
|
||||
VideoExportJobDocument,
|
||||
options,
|
||||
);
|
||||
}
|
||||
export function useVideoExportJobSuspenseQuery(
|
||||
baseOptions?: Apollo.SuspenseQueryHookOptions<
|
||||
VideoExportJobQuery,
|
||||
VideoExportJobQueryVariables
|
||||
>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useSuspenseQuery<
|
||||
VideoExportJobQuery,
|
||||
VideoExportJobQueryVariables
|
||||
>(VideoExportJobDocument, options);
|
||||
}
|
||||
export type VideoExportJobQueryHookResult = ReturnType<
|
||||
typeof useVideoExportJobQuery
|
||||
>;
|
||||
export type VideoExportJobLazyQueryHookResult = ReturnType<
|
||||
typeof useVideoExportJobLazyQuery
|
||||
>;
|
||||
export type VideoExportJobSuspenseQueryHookResult = ReturnType<
|
||||
typeof useVideoExportJobSuspenseQuery
|
||||
>;
|
||||
export type VideoExportJobQueryResult = Apollo.QueryResult<
|
||||
VideoExportJobQuery,
|
||||
VideoExportJobQueryVariables
|
||||
>;
|
||||
export const MyVideoExportsDocument = gql`
|
||||
query MyVideoExports($limit: Int = 30, $offset: Int = 0) {
|
||||
myVideoExports(limit: $limit, offset: $offset) {
|
||||
...VideoExportJobFields
|
||||
}
|
||||
}
|
||||
${VideoExportJobFieldsFragmentDoc}
|
||||
`;
|
||||
|
||||
/**
|
||||
* __useMyVideoExportsQuery__
|
||||
*
|
||||
* To run a query within a React component, call `useMyVideoExportsQuery` and pass it any options that fit your needs.
|
||||
* When your component renders, `useMyVideoExportsQuery` 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 } = useMyVideoExportsQuery({
|
||||
* variables: {
|
||||
* limit: // value for 'limit'
|
||||
* offset: // value for 'offset'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
export function useMyVideoExportsQuery(
|
||||
baseOptions?: Apollo.QueryHookOptions<
|
||||
MyVideoExportsQuery,
|
||||
MyVideoExportsQueryVariables
|
||||
>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useQuery<MyVideoExportsQuery, MyVideoExportsQueryVariables>(
|
||||
MyVideoExportsDocument,
|
||||
options,
|
||||
);
|
||||
}
|
||||
export function useMyVideoExportsLazyQuery(
|
||||
baseOptions?: Apollo.LazyQueryHookOptions<
|
||||
MyVideoExportsQuery,
|
||||
MyVideoExportsQueryVariables
|
||||
>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useLazyQuery<MyVideoExportsQuery, MyVideoExportsQueryVariables>(
|
||||
MyVideoExportsDocument,
|
||||
options,
|
||||
);
|
||||
}
|
||||
export function useMyVideoExportsSuspenseQuery(
|
||||
baseOptions?: Apollo.SuspenseQueryHookOptions<
|
||||
MyVideoExportsQuery,
|
||||
MyVideoExportsQueryVariables
|
||||
>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useSuspenseQuery<
|
||||
MyVideoExportsQuery,
|
||||
MyVideoExportsQueryVariables
|
||||
>(MyVideoExportsDocument, options);
|
||||
}
|
||||
export type MyVideoExportsQueryHookResult = ReturnType<
|
||||
typeof useMyVideoExportsQuery
|
||||
>;
|
||||
export type MyVideoExportsLazyQueryHookResult = ReturnType<
|
||||
typeof useMyVideoExportsLazyQuery
|
||||
>;
|
||||
export type MyVideoExportsSuspenseQueryHookResult = ReturnType<
|
||||
typeof useMyVideoExportsSuspenseQuery
|
||||
>;
|
||||
export type MyVideoExportsQueryResult = Apollo.QueryResult<
|
||||
MyVideoExportsQuery,
|
||||
MyVideoExportsQueryVariables
|
||||
>;
|
||||
export const CreateUploadStreamDocument = gql`
|
||||
mutation CreateUploadStream(
|
||||
$videoMetadataInput: VideoMetadataInput!
|
||||
@@ -15116,6 +15585,13 @@ export const GetHlsInitUploadLinkDocument = gql`
|
||||
... on TooManyInitUploadsErr {
|
||||
linksRequested
|
||||
}
|
||||
... on StorageLimitExceededErr {
|
||||
reason
|
||||
tierName
|
||||
retainedStorageUsedBytes
|
||||
retainedStorageLimitBytes
|
||||
remainingStorageBytes
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,6 +56,7 @@ query GetDrillRunLeaderboard(
|
||||
video {
|
||||
tableSize
|
||||
pocketSize
|
||||
createdAt
|
||||
}
|
||||
user {
|
||||
id
|
||||
|
||||
30
src/operations/video_export.gql
Normal file
30
src/operations/video_export.gql
Normal file
@@ -0,0 +1,30 @@
|
||||
fragment VideoExportJobFields on VideoExportJobGQL {
|
||||
id
|
||||
videoId
|
||||
mode
|
||||
status
|
||||
shotIds
|
||||
runId
|
||||
downloadUrl
|
||||
fileSizeBytes
|
||||
expiresAt
|
||||
createdAt
|
||||
}
|
||||
|
||||
mutation RequestVideoExport($input: RequestVideoExportInput!) {
|
||||
requestVideoExport(input: $input) {
|
||||
...VideoExportJobFields
|
||||
}
|
||||
}
|
||||
|
||||
query VideoExportJob($jobId: Int!) {
|
||||
videoExportJob(jobId: $jobId) {
|
||||
...VideoExportJobFields
|
||||
}
|
||||
}
|
||||
|
||||
query MyVideoExports($limit: Int = 30, $offset: Int = 0) {
|
||||
myVideoExports(limit: $limit, offset: $offset) {
|
||||
...VideoExportJobFields
|
||||
}
|
||||
}
|
||||
@@ -67,6 +67,13 @@ mutation GetHlsInitUploadLink($videoId: Int!) {
|
||||
... on TooManyInitUploadsErr {
|
||||
linksRequested
|
||||
}
|
||||
... on StorageLimitExceededErr {
|
||||
reason
|
||||
tierName
|
||||
retainedStorageUsedBytes
|
||||
retainedStorageLimitBytes
|
||||
remainingStorageBytes
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
147
src/schema.gql
147
src/schema.gql
@@ -66,6 +66,7 @@ type Query {
|
||||
tableSize: Float = 100
|
||||
useHomography: HomographyInputGQL = null
|
||||
): TableStateGQL!
|
||||
simulateShot(simulationInput: SimulateShotInputGQL!): ShotProjectionGQL!
|
||||
getOrderedShots(
|
||||
filterInput: FilterInput!
|
||||
ids: [Int!] = null
|
||||
@@ -108,8 +109,10 @@ type Query {
|
||||
): UserRelationshipsResult!
|
||||
getAvailableSubscriptionOptions: StripeSubscriptionOptionsGQL!
|
||||
getUserSubscriptionStatus: UserSubscriptionStatusGQL!
|
||||
getResolvedTier: ResolvedTierGQL!
|
||||
getAppleAppAccountToken: String!
|
||||
getQuotaStatus: QuotaStatusGQL!
|
||||
getStorageStatus: StorageStatusGQL
|
||||
getPlayTime(userId: Int!, filters: VideoFilterInput = null): UserPlayTimeGQL!
|
||||
getUserVideos(
|
||||
userId: Int = null
|
||||
@@ -119,6 +122,8 @@ type Query {
|
||||
): VideoHistoryGQL!
|
||||
getUserTags(includeRetiredTags: Boolean = false): [TagGQL!]!
|
||||
getGameTypeTagMetrics(input: GameTypeTagMetricsInput!): [GameTypeTagMetric!]!
|
||||
videoExportJob(jobId: Int!): VideoExportJobGQL
|
||||
myVideoExports(limit: Int! = 30, offset: Int! = 0): [VideoExportJobGQL!]!
|
||||
getVideo(videoId: Int!, debuggingJson: JSON = null): VideoGQL!
|
||||
getVideos(videoIds: [Int!]!): [VideoGQL!]!
|
||||
}
|
||||
@@ -710,6 +715,7 @@ type DeployedConfigGQL {
|
||||
minimumAllowedAppVersion: String!
|
||||
subscriptionGatingEnabled: Boolean!
|
||||
quotaEnforcementEnabled: Boolean!
|
||||
storageLimitEnforcementEnabled: Boolean!
|
||||
bannerMessages: [BannerGQL!]!
|
||||
defaultAndroidRecordingFormat: StreamSegmentTypeEnum!
|
||||
bucketUrl: String!
|
||||
@@ -862,6 +868,7 @@ enum NotificationTypeEnum {
|
||||
REACTION
|
||||
FOLLOW
|
||||
CHALLENGE_INVITE
|
||||
EXPORT_READY
|
||||
}
|
||||
|
||||
input NotificationFilters {
|
||||
@@ -964,6 +971,65 @@ input IntPoint2DInput {
|
||||
y: Int!
|
||||
}
|
||||
|
||||
type ShotProjectionGQL {
|
||||
trajectories: [BallTrajectoryGQL!]!
|
||||
events: [SimulationEventGQL!]!
|
||||
finalState: [SimulationBallStateGQL!]!
|
||||
pottedBallIds: [Int!]!
|
||||
}
|
||||
|
||||
type BallTrajectoryGQL {
|
||||
ballId: Int!
|
||||
points: [TrajectoryPointGQL!]!
|
||||
}
|
||||
|
||||
type TrajectoryPointGQL {
|
||||
time: Float!
|
||||
position: [Float!]!
|
||||
}
|
||||
|
||||
type SimulationEventGQL {
|
||||
eventType: SimulationEventType!
|
||||
time: Float!
|
||||
ballIds: [Int!]!
|
||||
position: [Float!]
|
||||
}
|
||||
|
||||
enum SimulationEventType {
|
||||
STICK_BALL
|
||||
BALL_BALL
|
||||
BALL_CUSHION
|
||||
BALL_POCKET
|
||||
BALL_STOP
|
||||
}
|
||||
|
||||
type SimulationBallStateGQL {
|
||||
ballId: Int!
|
||||
position: [Float!]!
|
||||
}
|
||||
|
||||
input SimulateShotInputGQL {
|
||||
cueBallId: Int!
|
||||
strike: CueStrikeInputGQL!
|
||||
balls: [SimulationBallStateInputGQL!] = null
|
||||
b64Image: String = null
|
||||
useHomography: HomographyInputGQL = null
|
||||
tableSize: Float = null
|
||||
}
|
||||
|
||||
input CueStrikeInputGQL {
|
||||
v0: Float!
|
||||
phi: Float!
|
||||
theta: Float! = 0
|
||||
a: Float! = 0
|
||||
b: Float! = 0
|
||||
}
|
||||
|
||||
input SimulationBallStateInputGQL {
|
||||
ballId: Int!
|
||||
position: [Float!]!
|
||||
}
|
||||
|
||||
type GetShotsResult {
|
||||
shots: [ShotGQL!]!
|
||||
count: Int
|
||||
@@ -1071,6 +1137,17 @@ enum StripeSubscriptionStatusEnum {
|
||||
PAUSED
|
||||
}
|
||||
|
||||
type ResolvedTierGQL {
|
||||
tierName: String!
|
||||
tierDisplayName: String!
|
||||
hasActiveSubscription: Boolean!
|
||||
entitlementSource: EntitlementSourceTypeEnum
|
||||
entitlementStatus: String
|
||||
entitlementStartsAt: DateTime
|
||||
entitlementEndsAt: DateTime
|
||||
capabilities: [String!]!
|
||||
}
|
||||
|
||||
type QuotaStatusGQL {
|
||||
tierName: String!
|
||||
periodStart: DateTime!
|
||||
@@ -1095,6 +1172,27 @@ type QuotaBucketStatusGQL {
|
||||
canUpload: Boolean!
|
||||
}
|
||||
|
||||
type StorageStatusGQL {
|
||||
userId: Int!
|
||||
tierName: String!
|
||||
retainedStorageUsedBytes: BigInt!
|
||||
retainedStorageLimitBytes: BigInt
|
||||
isUnlimited: Boolean!
|
||||
policyConfigured: Boolean!
|
||||
remainingStorageBytes: BigInt
|
||||
storageUsageRatio: Float
|
||||
isNearLimit: Boolean!
|
||||
isOverLimit: Boolean!
|
||||
usageCalculated: Boolean!
|
||||
usageSource: String
|
||||
lastCalculatedAt: DateTime
|
||||
}
|
||||
|
||||
"""
|
||||
Integer value that can exceed GraphQL Int's 32-bit range.
|
||||
"""
|
||||
scalar BigInt
|
||||
|
||||
type UserPlayTimeGQL {
|
||||
totalSeconds: Float!
|
||||
}
|
||||
@@ -1130,6 +1228,34 @@ input GameTypeTagMetricsInput {
|
||||
includePrivate: IncludePrivateEnum! = MINE
|
||||
}
|
||||
|
||||
type VideoExportJobGQL {
|
||||
id: Int!
|
||||
videoId: Int!
|
||||
mode: VideoExportModeEnum!
|
||||
status: VideoExportStatusEnum!
|
||||
shotIds: [Int!]
|
||||
runId: Int
|
||||
downloadUrl: String
|
||||
fileSizeBytes: Int
|
||||
expiresAt: DateTime
|
||||
createdAt: DateTime
|
||||
}
|
||||
|
||||
enum VideoExportModeEnum {
|
||||
FULL_SESSION
|
||||
SHOTS
|
||||
RUN
|
||||
}
|
||||
|
||||
enum VideoExportStatusEnum {
|
||||
CREATED
|
||||
QUEUED
|
||||
RUNNING
|
||||
SUCCEEDED
|
||||
FAILED
|
||||
EXPIRED
|
||||
}
|
||||
|
||||
"""
|
||||
The `JSON` scalar type represents JSON values as specified by [ECMA-404](https://ecma-international.org/wp-content/uploads/ECMA-404_2nd_edition_december_2017.pdf).
|
||||
"""
|
||||
@@ -1231,6 +1357,7 @@ type Mutation {
|
||||
feedback: String = null
|
||||
metadata: CancellationFeedbackMetadataInput = null
|
||||
): Boolean!
|
||||
requestVideoExport(input: RequestVideoExportInput!): VideoExportJobGQL!
|
||||
findPrerecordTableLayout(b64Image: String!, videoId: Int!): HomographyInfoGQL
|
||||
createUploadStream(
|
||||
videoMetadata: VideoMetadataInput!
|
||||
@@ -1413,6 +1540,13 @@ input CancellationFeedbackMetadataInput {
|
||||
platform: String = null
|
||||
}
|
||||
|
||||
input RequestVideoExportInput {
|
||||
videoId: Int!
|
||||
mode: VideoExportModeEnum!
|
||||
shotIds: [Int!] = null
|
||||
runId: Int = null
|
||||
}
|
||||
|
||||
type CreateUploadStreamReturn {
|
||||
videoId: Int!
|
||||
}
|
||||
@@ -1452,10 +1586,10 @@ type GetUploadLinkReturn {
|
||||
union UploadLinkGetUploadLinkErrors = UploadLink | GetUploadLinkErrors
|
||||
|
||||
type GetUploadLinkErrors {
|
||||
error: MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErr!
|
||||
error: MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErrStorageLimitExceededErr!
|
||||
}
|
||||
|
||||
union MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErr =
|
||||
union MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErrStorageLimitExceededErr =
|
||||
MustHaveSetForUploadLinkErr
|
||||
| SegmentAlreadyUploadedErr
|
||||
| ProcessingFailedErr
|
||||
@@ -1463,6 +1597,7 @@ union MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoI
|
||||
| TooManyProfileImageUploadsErr
|
||||
| InitUploadAlreadyCompletedErr
|
||||
| TooManyInitUploadsErr
|
||||
| StorageLimitExceededErr
|
||||
|
||||
type MustHaveSetForUploadLinkErr {
|
||||
resolution: Boolean
|
||||
@@ -1488,3 +1623,11 @@ type InitUploadAlreadyCompletedErr {
|
||||
type TooManyInitUploadsErr {
|
||||
linksRequested: Int!
|
||||
}
|
||||
|
||||
type StorageLimitExceededErr {
|
||||
reason: String!
|
||||
tierName: String!
|
||||
retainedStorageUsedBytes: BigInt!
|
||||
retainedStorageLimitBytes: BigInt
|
||||
remainingStorageBytes: BigInt
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user