Compare commits

..

3 Commits

Author SHA1 Message Date
cc4ecaff5d Add resolved tier query
All checks were successful
Tests / Tests (pull_request) Successful in 11s
2026-06-30 18:08:18 -07:00
3a599b5c5f Add storage status readiness query fields 2026-06-30 18:08:18 -07:00
387ab1b172 Add storage status query 2026-06-30 18:03:33 -07:00
6 changed files with 237 additions and 683 deletions

View File

@@ -88,12 +88,6 @@ 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"];
@@ -274,14 +268,6 @@ 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"]>;
@@ -314,7 +300,6 @@ export type DeployedConfigGql = {
firebase: Scalars["Boolean"]["output"];
minimumAllowedAppVersion: Scalars["String"]["output"];
quotaEnforcementEnabled: Scalars["Boolean"]["output"];
storageLimitEnforcementEnabled: Scalars["Boolean"]["output"];
subscriptionGatingEnabled: Scalars["Boolean"]["output"];
};
@@ -2302,7 +2287,7 @@ export type GetShotsResult = {
export type GetUploadLinkErrors = {
__typename?: "GetUploadLinkErrors";
error: MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErrStorageLimitExceededErr;
error: MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErr;
};
export type GetUploadLinkReturn = {
@@ -2406,14 +2391,13 @@ export type MustHaveSetForUploadLinkErr = {
resolution?: Maybe<Scalars["Boolean"]["output"]>;
};
export type MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErrStorageLimitExceededErr =
export type MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErr =
| InitUploadAlreadyCompletedErr
| MustHaveSetForUploadLinkErr
| NoInitForChunkedUploadErr
| ProcessingFailedErr
| SegmentAlreadyUploadedErr
| StorageLimitExceededErr
| TooManyInitUploadsErr
| TooManyProfileImageUploadsErr;
@@ -2436,7 +2420,6 @@ export type Mutation = {
deleteUser: Scalars["Boolean"]["output"];
deleteVideo: Scalars["Boolean"]["output"];
dismissChallenge: Scalars["Boolean"]["output"];
dismissVideoExport: Scalars["Boolean"]["output"];
editComment: Scalars["Boolean"]["output"];
editProfileImageUri: UserGql;
editShot: EditShotReturn;
@@ -2545,10 +2528,6 @@ export type MutationDismissChallengeArgs = {
challengeId: Scalars["ID"]["input"];
};
export type MutationDismissVideoExportArgs = {
jobId: Scalars["Int"]["input"];
};
export type MutationEditCommentArgs = {
commentId: Scalars["Int"]["input"];
newMessage: Scalars["String"]["input"];
@@ -2844,18 +2823,6 @@ export type PocketingIntentionInfoGql = {
pocketId: PocketIdentifier;
};
export type PotAimGql = {
__typename?: "PotAimGQL";
converged: Scalars["Boolean"]["output"];
cutAngle: Scalars["Float"]["output"];
feasible: Scalars["Boolean"]["output"];
geometricPhi: Scalars["Float"]["output"];
occludingBallIds: Array<Scalars["Int"]["output"]>;
phi: Scalars["Float"]["output"];
potted: Scalars["Boolean"]["output"];
requiredPrecision: Scalars["Float"]["output"];
};
export type ProcessingFailedErr = {
__typename?: "ProcessingFailedErr";
processing: VideoProcessingGql;
@@ -2877,7 +2844,6 @@ export type Query = {
challenge?: Maybe<Challenge>;
challengeLeaderboard: Array<ChallengeEntry>;
challenges: Array<Challenge>;
computePotAim: PotAimGql;
doesUsernameExist: Scalars["Boolean"]["output"];
getAggregatedShotMetrics: Array<AggregateResultGql>;
getAppleAppAccountToken: Scalars["String"]["output"];
@@ -2920,7 +2886,6 @@ export type Query = {
myVideoExports: Array<VideoExportJobGql>;
notifications: NotificationConnection;
ruleSets: Array<RuleSet>;
simulateShot: ShotProjectionGql;
unreadNotificationCount: Scalars["Int"]["output"];
videoExportJob?: Maybe<VideoExportJobGql>;
videoPlayerClusters: Array<PlayerClusterGql>;
@@ -2940,12 +2905,6 @@ export type QueryChallengesArgs = {
includeDismissed?: Scalars["Boolean"]["input"];
};
export type QueryComputePotAimArgs = {
pocket: PocketIdentifier;
simulationInput: SimulateShotInputGql;
targetBallId: Scalars["Int"]["input"];
};
export type QueryDoesUsernameExistArgs = {
candidateUsername: Scalars["String"]["input"];
};
@@ -3116,10 +3075,6 @@ export type QueryNotificationsArgs = {
offset?: Scalars["Int"]["input"];
};
export type QuerySimulateShotArgs = {
simulationInput: SimulateShotInputGql;
};
export type QueryVideoExportJobArgs = {
jobId: Scalars["Int"]["input"];
};
@@ -3383,14 +3338,6 @@ 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;
@@ -3441,42 +3388,6 @@ 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"];
@@ -3499,15 +3410,6 @@ 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"];
@@ -3653,12 +3555,6 @@ 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"]>;
@@ -3788,8 +3684,6 @@ export type VideoExportJobGql = {
shotIds?: Maybe<Array<Scalars["Int"]["output"]>>;
status: VideoExportStatusEnum;
videoId: Scalars["Int"]["output"];
videoName?: Maybe<Scalars["String"]["output"]>;
videoThumbnailUri?: Maybe<Scalars["String"]["output"]>;
};
export enum VideoExportModeEnum {
@@ -5290,6 +5184,45 @@ export type GetSubscriptionStatusQuery = {
};
};
export type GetResolvedTierQueryVariables = Exact<{ [key: string]: never }>;
export type GetResolvedTierQuery = {
__typename?: "Query";
getResolvedTier: {
__typename?: "ResolvedTierGQL";
tierName: string;
tierDisplayName: string;
hasActiveSubscription: boolean;
entitlementSource?: EntitlementSourceTypeEnum | null;
entitlementStatus?: string | null;
entitlementStartsAt?: any | null;
entitlementEndsAt?: any | null;
capabilities: Array<string>;
};
};
export type GetStorageStatusQueryVariables = Exact<{ [key: string]: never }>;
export type GetStorageStatusQuery = {
__typename?: "Query";
getStorageStatus?: {
__typename?: "StorageStatusGQL";
userId: number;
tierName: string;
retainedStorageUsedBytes: any;
retainedStorageLimitBytes?: any | null;
isUnlimited: boolean;
policyConfigured: boolean;
remainingStorageBytes?: any | null;
storageUsageRatio?: number | null;
isNearLimit: boolean;
isOverLimit: boolean;
usageCalculated: boolean;
usageSource?: string | null;
lastCalculatedAt?: any | null;
} | null;
};
export type GetAppleAppAccountTokenQueryVariables = Exact<{
[key: string]: never;
}>;
@@ -5560,74 +5493,6 @@ export type FinalizePlayerAssignmentsMutation = {
}>;
};
export type GetTableStateQueryVariables = Exact<{
b64Image: Scalars["String"]["input"];
tableSize?: InputMaybe<Scalars["Float"]["input"]>;
useHomography?: InputMaybe<HomographyInputGql>;
}>;
export type GetTableStateQuery = {
__typename?: "Query";
getTableState: {
__typename?: "TableStateGQL";
identifierToPosition: Array<Array<number>>;
};
};
export type SimulateShotQueryVariables = Exact<{
simulationInput: SimulateShotInputGql;
}>;
export type SimulateShotQuery = {
__typename?: "Query";
simulateShot: {
__typename?: "ShotProjectionGQL";
pottedBallIds: Array<number>;
trajectories: Array<{
__typename?: "BallTrajectoryGQL";
ballId: number;
points: Array<{
__typename?: "TrajectoryPointGQL";
time: number;
position: Array<number>;
}>;
}>;
events: Array<{
__typename?: "SimulationEventGQL";
eventType: SimulationEventType;
time: number;
ballIds: Array<number>;
position?: Array<number> | null;
}>;
finalState: Array<{
__typename?: "SimulationBallStateGQL";
ballId: number;
position: Array<number>;
}>;
};
};
export type ComputePotAimQueryVariables = Exact<{
simulationInput: SimulateShotInputGql;
targetBallId: Scalars["Int"]["input"];
pocket: PocketIdentifier;
}>;
export type ComputePotAimQuery = {
__typename?: "Query";
computePotAim: {
__typename?: "PotAimGQL";
phi: number;
geometricPhi: number;
cutAngle: number;
requiredPrecision: number;
feasible: boolean;
potted: boolean;
converged: boolean;
occludingBallIds: Array<number>;
};
};
export type GetSerializedShotPathsQueryVariables = Exact<{
filterInput: FilterInput;
}>;
@@ -7248,8 +7113,6 @@ export type VideoExportJobFieldsFragment = {
videoId: number;
mode: VideoExportModeEnum;
status: VideoExportStatusEnum;
videoName?: string | null;
videoThumbnailUri?: string | null;
shotIds?: Array<number> | null;
runId?: number | null;
downloadUrl?: string | null;
@@ -7270,8 +7133,6 @@ export type RequestVideoExportMutation = {
videoId: number;
mode: VideoExportModeEnum;
status: VideoExportStatusEnum;
videoName?: string | null;
videoThumbnailUri?: string | null;
shotIds?: Array<number> | null;
runId?: number | null;
downloadUrl?: string | null;
@@ -7281,15 +7142,6 @@ export type RequestVideoExportMutation = {
};
};
export type DismissVideoExportMutationVariables = Exact<{
jobId: Scalars["Int"]["input"];
}>;
export type DismissVideoExportMutation = {
__typename?: "Mutation";
dismissVideoExport: boolean;
};
export type VideoExportJobQueryVariables = Exact<{
jobId: Scalars["Int"]["input"];
}>;
@@ -7302,8 +7154,6 @@ export type VideoExportJobQuery = {
videoId: number;
mode: VideoExportModeEnum;
status: VideoExportStatusEnum;
videoName?: string | null;
videoThumbnailUri?: string | null;
shotIds?: Array<number> | null;
runId?: number | null;
downloadUrl?: string | null;
@@ -7326,8 +7176,6 @@ export type MyVideoExportsQuery = {
videoId: number;
mode: VideoExportModeEnum;
status: VideoExportStatusEnum;
videoName?: string | null;
videoThumbnailUri?: string | null;
shotIds?: Array<number> | null;
runId?: number | null;
downloadUrl?: string | null;
@@ -7382,7 +7230,6 @@ export type GetUploadLinkMutation = {
};
}
| { __typename?: "SegmentAlreadyUploadedErr"; segmentId: number }
| { __typename?: "StorageLimitExceededErr" }
| { __typename?: "TooManyInitUploadsErr" }
| { __typename?: "TooManyProfileImageUploadsErr" };
}
@@ -7425,14 +7272,6 @@ 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" };
}
@@ -7917,8 +7756,6 @@ export const VideoExportJobFieldsFragmentDoc = gql`
videoId
mode
status
videoName
videoThumbnailUri
shotIds
runId
downloadUrl
@@ -11263,6 +11100,169 @@ export type GetSubscriptionStatusQueryResult = Apollo.QueryResult<
GetSubscriptionStatusQuery,
GetSubscriptionStatusQueryVariables
>;
export const GetResolvedTierDocument = gql`
query GetResolvedTier {
getResolvedTier {
tierName
tierDisplayName
hasActiveSubscription
entitlementSource
entitlementStatus
entitlementStartsAt
entitlementEndsAt
capabilities
}
}
`;
/**
* __useGetResolvedTierQuery__
*
* To run a query within a React component, call `useGetResolvedTierQuery` and pass it any options that fit your needs.
* When your component renders, `useGetResolvedTierQuery` 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 } = useGetResolvedTierQuery({
* variables: {
* },
* });
*/
export function useGetResolvedTierQuery(
baseOptions?: Apollo.QueryHookOptions<
GetResolvedTierQuery,
GetResolvedTierQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useQuery<GetResolvedTierQuery, GetResolvedTierQueryVariables>(
GetResolvedTierDocument,
options,
);
}
export function useGetResolvedTierLazyQuery(
baseOptions?: Apollo.LazyQueryHookOptions<
GetResolvedTierQuery,
GetResolvedTierQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useLazyQuery<
GetResolvedTierQuery,
GetResolvedTierQueryVariables
>(GetResolvedTierDocument, options);
}
export function useGetResolvedTierSuspenseQuery(
baseOptions?: Apollo.SuspenseQueryHookOptions<
GetResolvedTierQuery,
GetResolvedTierQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useSuspenseQuery<
GetResolvedTierQuery,
GetResolvedTierQueryVariables
>(GetResolvedTierDocument, options);
}
export type GetResolvedTierQueryHookResult = ReturnType<
typeof useGetResolvedTierQuery
>;
export type GetResolvedTierLazyQueryHookResult = ReturnType<
typeof useGetResolvedTierLazyQuery
>;
export type GetResolvedTierSuspenseQueryHookResult = ReturnType<
typeof useGetResolvedTierSuspenseQuery
>;
export type GetResolvedTierQueryResult = Apollo.QueryResult<
GetResolvedTierQuery,
GetResolvedTierQueryVariables
>;
export const GetStorageStatusDocument = gql`
query GetStorageStatus {
getStorageStatus {
userId
tierName
retainedStorageUsedBytes
retainedStorageLimitBytes
isUnlimited
policyConfigured
remainingStorageBytes
storageUsageRatio
isNearLimit
isOverLimit
usageCalculated
usageSource
lastCalculatedAt
}
}
`;
/**
* __useGetStorageStatusQuery__
*
* To run a query within a React component, call `useGetStorageStatusQuery` and pass it any options that fit your needs.
* When your component renders, `useGetStorageStatusQuery` 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 } = useGetStorageStatusQuery({
* variables: {
* },
* });
*/
export function useGetStorageStatusQuery(
baseOptions?: Apollo.QueryHookOptions<
GetStorageStatusQuery,
GetStorageStatusQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useQuery<GetStorageStatusQuery, GetStorageStatusQueryVariables>(
GetStorageStatusDocument,
options,
);
}
export function useGetStorageStatusLazyQuery(
baseOptions?: Apollo.LazyQueryHookOptions<
GetStorageStatusQuery,
GetStorageStatusQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useLazyQuery<
GetStorageStatusQuery,
GetStorageStatusQueryVariables
>(GetStorageStatusDocument, options);
}
export function useGetStorageStatusSuspenseQuery(
baseOptions?: Apollo.SuspenseQueryHookOptions<
GetStorageStatusQuery,
GetStorageStatusQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useSuspenseQuery<
GetStorageStatusQuery,
GetStorageStatusQueryVariables
>(GetStorageStatusDocument, options);
}
export type GetStorageStatusQueryHookResult = ReturnType<
typeof useGetStorageStatusQuery
>;
export type GetStorageStatusLazyQueryHookResult = ReturnType<
typeof useGetStorageStatusLazyQuery
>;
export type GetStorageStatusSuspenseQueryHookResult = ReturnType<
typeof useGetStorageStatusSuspenseQuery
>;
export type GetStorageStatusQueryResult = Apollo.QueryResult<
GetStorageStatusQuery,
GetStorageStatusQueryVariables
>;
export const GetAppleAppAccountTokenDocument = gql`
query GetAppleAppAccountToken {
getAppleAppAccountToken
@@ -11887,269 +11887,6 @@ export type FinalizePlayerAssignmentsMutationOptions =
FinalizePlayerAssignmentsMutation,
FinalizePlayerAssignmentsMutationVariables
>;
export const GetTableStateDocument = gql`
query GetTableState(
$b64Image: String!
$tableSize: Float
$useHomography: HomographyInputGQL
) {
getTableState(
b64Image: $b64Image
tableSize: $tableSize
useHomography: $useHomography
) {
identifierToPosition
}
}
`;
/**
* __useGetTableStateQuery__
*
* To run a query within a React component, call `useGetTableStateQuery` and pass it any options that fit your needs.
* When your component renders, `useGetTableStateQuery` 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 } = useGetTableStateQuery({
* variables: {
* b64Image: // value for 'b64Image'
* tableSize: // value for 'tableSize'
* useHomography: // value for 'useHomography'
* },
* });
*/
export function useGetTableStateQuery(
baseOptions: Apollo.QueryHookOptions<
GetTableStateQuery,
GetTableStateQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useQuery<GetTableStateQuery, GetTableStateQueryVariables>(
GetTableStateDocument,
options,
);
}
export function useGetTableStateLazyQuery(
baseOptions?: Apollo.LazyQueryHookOptions<
GetTableStateQuery,
GetTableStateQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useLazyQuery<GetTableStateQuery, GetTableStateQueryVariables>(
GetTableStateDocument,
options,
);
}
export function useGetTableStateSuspenseQuery(
baseOptions?: Apollo.SuspenseQueryHookOptions<
GetTableStateQuery,
GetTableStateQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useSuspenseQuery<
GetTableStateQuery,
GetTableStateQueryVariables
>(GetTableStateDocument, options);
}
export type GetTableStateQueryHookResult = ReturnType<
typeof useGetTableStateQuery
>;
export type GetTableStateLazyQueryHookResult = ReturnType<
typeof useGetTableStateLazyQuery
>;
export type GetTableStateSuspenseQueryHookResult = ReturnType<
typeof useGetTableStateSuspenseQuery
>;
export type GetTableStateQueryResult = Apollo.QueryResult<
GetTableStateQuery,
GetTableStateQueryVariables
>;
export const SimulateShotDocument = gql`
query SimulateShot($simulationInput: SimulateShotInputGQL!) {
simulateShot(simulationInput: $simulationInput) {
trajectories {
ballId
points {
time
position
}
}
events {
eventType
time
ballIds
position
}
finalState {
ballId
position
}
pottedBallIds
}
}
`;
/**
* __useSimulateShotQuery__
*
* To run a query within a React component, call `useSimulateShotQuery` and pass it any options that fit your needs.
* When your component renders, `useSimulateShotQuery` 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 } = useSimulateShotQuery({
* variables: {
* simulationInput: // value for 'simulationInput'
* },
* });
*/
export function useSimulateShotQuery(
baseOptions: Apollo.QueryHookOptions<
SimulateShotQuery,
SimulateShotQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useQuery<SimulateShotQuery, SimulateShotQueryVariables>(
SimulateShotDocument,
options,
);
}
export function useSimulateShotLazyQuery(
baseOptions?: Apollo.LazyQueryHookOptions<
SimulateShotQuery,
SimulateShotQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useLazyQuery<SimulateShotQuery, SimulateShotQueryVariables>(
SimulateShotDocument,
options,
);
}
export function useSimulateShotSuspenseQuery(
baseOptions?: Apollo.SuspenseQueryHookOptions<
SimulateShotQuery,
SimulateShotQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useSuspenseQuery<SimulateShotQuery, SimulateShotQueryVariables>(
SimulateShotDocument,
options,
);
}
export type SimulateShotQueryHookResult = ReturnType<
typeof useSimulateShotQuery
>;
export type SimulateShotLazyQueryHookResult = ReturnType<
typeof useSimulateShotLazyQuery
>;
export type SimulateShotSuspenseQueryHookResult = ReturnType<
typeof useSimulateShotSuspenseQuery
>;
export type SimulateShotQueryResult = Apollo.QueryResult<
SimulateShotQuery,
SimulateShotQueryVariables
>;
export const ComputePotAimDocument = gql`
query ComputePotAim(
$simulationInput: SimulateShotInputGQL!
$targetBallId: Int!
$pocket: PocketIdentifier!
) {
computePotAim(
simulationInput: $simulationInput
targetBallId: $targetBallId
pocket: $pocket
) {
phi
geometricPhi
cutAngle
requiredPrecision
feasible
potted
converged
occludingBallIds
}
}
`;
/**
* __useComputePotAimQuery__
*
* To run a query within a React component, call `useComputePotAimQuery` and pass it any options that fit your needs.
* When your component renders, `useComputePotAimQuery` 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 } = useComputePotAimQuery({
* variables: {
* simulationInput: // value for 'simulationInput'
* targetBallId: // value for 'targetBallId'
* pocket: // value for 'pocket'
* },
* });
*/
export function useComputePotAimQuery(
baseOptions: Apollo.QueryHookOptions<
ComputePotAimQuery,
ComputePotAimQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useQuery<ComputePotAimQuery, ComputePotAimQueryVariables>(
ComputePotAimDocument,
options,
);
}
export function useComputePotAimLazyQuery(
baseOptions?: Apollo.LazyQueryHookOptions<
ComputePotAimQuery,
ComputePotAimQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useLazyQuery<ComputePotAimQuery, ComputePotAimQueryVariables>(
ComputePotAimDocument,
options,
);
}
export function useComputePotAimSuspenseQuery(
baseOptions?: Apollo.SuspenseQueryHookOptions<
ComputePotAimQuery,
ComputePotAimQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useSuspenseQuery<
ComputePotAimQuery,
ComputePotAimQueryVariables
>(ComputePotAimDocument, options);
}
export type ComputePotAimQueryHookResult = ReturnType<
typeof useComputePotAimQuery
>;
export type ComputePotAimLazyQueryHookResult = ReturnType<
typeof useComputePotAimLazyQuery
>;
export type ComputePotAimSuspenseQueryHookResult = ReturnType<
typeof useComputePotAimSuspenseQuery
>;
export type ComputePotAimQueryResult = Apollo.QueryResult<
ComputePotAimQuery,
ComputePotAimQueryVariables
>;
export const GetSerializedShotPathsDocument = gql`
query GetSerializedShotPaths($filterInput: FilterInput!) {
getShots(filterInput: $filterInput) {
@@ -15652,54 +15389,6 @@ export type RequestVideoExportMutationOptions = Apollo.BaseMutationOptions<
RequestVideoExportMutation,
RequestVideoExportMutationVariables
>;
export const DismissVideoExportDocument = gql`
mutation DismissVideoExport($jobId: Int!) {
dismissVideoExport(jobId: $jobId)
}
`;
export type DismissVideoExportMutationFn = Apollo.MutationFunction<
DismissVideoExportMutation,
DismissVideoExportMutationVariables
>;
/**
* __useDismissVideoExportMutation__
*
* To run a mutation, you first call `useDismissVideoExportMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useDismissVideoExportMutation` 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 [dismissVideoExportMutation, { data, loading, error }] = useDismissVideoExportMutation({
* variables: {
* jobId: // value for 'jobId'
* },
* });
*/
export function useDismissVideoExportMutation(
baseOptions?: Apollo.MutationHookOptions<
DismissVideoExportMutation,
DismissVideoExportMutationVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useMutation<
DismissVideoExportMutation,
DismissVideoExportMutationVariables
>(DismissVideoExportDocument, options);
}
export type DismissVideoExportMutationHookResult = ReturnType<
typeof useDismissVideoExportMutation
>;
export type DismissVideoExportMutationResult =
Apollo.MutationResult<DismissVideoExportMutation>;
export type DismissVideoExportMutationOptions = Apollo.BaseMutationOptions<
DismissVideoExportMutation,
DismissVideoExportMutationVariables
>;
export const VideoExportJobDocument = gql`
query VideoExportJob($jobId: Int!) {
videoExportJob(jobId: $jobId) {
@@ -16009,13 +15698,6 @@ export const GetHlsInitUploadLinkDocument = gql`
... on TooManyInitUploadsErr {
linksRequested
}
... on StorageLimitExceededErr {
reason
tierName
retainedStorageUsedBytes
retainedStorageLimitBytes
remainingStorageBytes
}
}
}
}

View File

@@ -67,6 +67,37 @@ query GetSubscriptionStatus {
}
}
query GetResolvedTier {
getResolvedTier {
tierName
tierDisplayName
hasActiveSubscription
entitlementSource
entitlementStatus
entitlementStartsAt
entitlementEndsAt
capabilities
}
}
query GetStorageStatus {
getStorageStatus {
userId
tierName
retainedStorageUsedBytes
retainedStorageLimitBytes
isUnlimited
policyConfigured
remainingStorageBytes
storageUsageRatio
isNearLimit
isOverLimit
usageCalculated
usageSource
lastCalculatedAt
}
}
query GetAppleAppAccountToken {
getAppleAppAccountToken
}

View File

@@ -1,57 +0,0 @@
query GetTableState(
$b64Image: String!
$tableSize: Float
$useHomography: HomographyInputGQL
) {
getTableState(
b64Image: $b64Image
tableSize: $tableSize
useHomography: $useHomography
) {
identifierToPosition
}
}
query SimulateShot($simulationInput: SimulateShotInputGQL!) {
simulateShot(simulationInput: $simulationInput) {
trajectories {
ballId
points {
time
position
}
}
events {
eventType
time
ballIds
position
}
finalState {
ballId
position
}
pottedBallIds
}
}
query ComputePotAim(
$simulationInput: SimulateShotInputGQL!
$targetBallId: Int!
$pocket: PocketIdentifier!
) {
computePotAim(
simulationInput: $simulationInput
targetBallId: $targetBallId
pocket: $pocket
) {
phi
geometricPhi
cutAngle
requiredPrecision
feasible
potted
converged
occludingBallIds
}
}

View File

@@ -3,8 +3,6 @@ fragment VideoExportJobFields on VideoExportJobGQL {
videoId
mode
status
videoName
videoThumbnailUri
shotIds
runId
downloadUrl
@@ -19,10 +17,6 @@ mutation RequestVideoExport($input: RequestVideoExportInput!) {
}
}
mutation DismissVideoExport($jobId: Int!) {
dismissVideoExport(jobId: $jobId)
}
query VideoExportJob($jobId: Int!) {
videoExportJob(jobId: $jobId) {
...VideoExportJobFields

View File

@@ -67,13 +67,6 @@ mutation GetHlsInitUploadLink($videoId: Int!) {
... on TooManyInitUploadsErr {
linksRequested
}
... on StorageLimitExceededErr {
reason
tierName
retainedStorageUsedBytes
retainedStorageLimitBytes
remainingStorageBytes
}
}
}
}

View File

@@ -66,12 +66,6 @@ type Query {
tableSize: Float = 100
useHomography: HomographyInputGQL = null
): TableStateGQL!
simulateShot(simulationInput: SimulateShotInputGQL!): ShotProjectionGQL!
computePotAim(
simulationInput: SimulateShotInputGQL!
targetBallId: Int!
pocket: PocketIdentifier!
): PotAimGQL!
getOrderedShots(
filterInput: FilterInput!
ids: [Int!] = null
@@ -720,7 +714,6 @@ type DeployedConfigGQL {
minimumAllowedAppVersion: String!
subscriptionGatingEnabled: Boolean!
quotaEnforcementEnabled: Boolean!
storageLimitEnforcementEnabled: Boolean!
bannerMessages: [BannerGQL!]!
defaultAndroidRecordingFormat: StreamSegmentTypeEnum!
bucketUrl: String!
@@ -976,76 +969,6 @@ 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 PotAimGQL {
phi: Float!
geometricPhi: Float!
cutAngle: Float!
requiredPrecision: Float!
feasible: Boolean!
potted: Boolean!
converged: Boolean!
occludingBallIds: [Int!]!
}
type GetShotsResult {
shots: [ShotGQL!]!
count: Int
@@ -1249,8 +1172,6 @@ type VideoExportJobGQL {
videoId: Int!
mode: VideoExportModeEnum!
status: VideoExportStatusEnum!
videoName: String
videoThumbnailUri: String
shotIds: [Int!]
runId: Int
downloadUrl: String
@@ -1376,7 +1297,6 @@ type Mutation {
metadata: CancellationFeedbackMetadataInput = null
): Boolean!
requestVideoExport(input: RequestVideoExportInput!): VideoExportJobGQL!
dismissVideoExport(jobId: Int!): Boolean!
findPrerecordTableLayout(b64Image: String!, videoId: Int!): HomographyInfoGQL
createUploadStream(
videoMetadata: VideoMetadataInput!
@@ -1605,10 +1525,10 @@ type GetUploadLinkReturn {
union UploadLinkGetUploadLinkErrors = UploadLink | GetUploadLinkErrors
type GetUploadLinkErrors {
error: MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErrStorageLimitExceededErr!
error: MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErr!
}
union MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErrStorageLimitExceededErr =
union MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErr =
MustHaveSetForUploadLinkErr
| SegmentAlreadyUploadedErr
| ProcessingFailedErr
@@ -1616,7 +1536,6 @@ union MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoI
| TooManyProfileImageUploadsErr
| InitUploadAlreadyCompletedErr
| TooManyInitUploadsErr
| StorageLimitExceededErr
type MustHaveSetForUploadLinkErr {
resolution: Boolean
@@ -1642,11 +1561,3 @@ type InitUploadAlreadyCompletedErr {
type TooManyInitUploadsErr {
linksRequested: Int!
}
type StorageLimitExceededErr {
reason: String!
tierName: String!
retainedStorageUsedBytes: BigInt!
retainedStorageLimitBytes: BigInt
remainingStorageBytes: BigInt
}