diff --git a/src/index.tsx b/src/index.tsx index 709b736..879ba91 100644 --- a/src/index.tsx +++ b/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) */ @@ -79,6 +81,19 @@ export enum AlignedIntervalEnum { Year = "YEAR", } +export type AppleIapSubscriptionOptionsGql = { + __typename?: "AppleIapSubscriptionOptionsGQL"; + enabled: Scalars["Boolean"]["output"]; + proMonthlyProductId?: Maybe; + productIds: Array; +}; + +export type BallTrajectoryGql = { + __typename?: "BallTrajectoryGQL"; + ballId: Scalars["Int"]["output"]; + points: Array; +}; + export type BankFeaturesGql = { __typename?: "BankFeaturesGQL"; bankAngle: Scalars["Float"]["output"]; @@ -307,6 +322,14 @@ export type CueObjectFeaturesGql = { spinType?: Maybe; }; +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; greaterThanEqualTo?: InputMaybe; @@ -333,12 +356,14 @@ export type DeployedConfigGql = { allowNewUsers: Scalars["Boolean"]["output"]; bannerMessages: Array; bucketUrl: Scalars["String"]["output"]; + capabilityEnforcementEnabled: Scalars["Boolean"]["output"]; defaultAndroidRecordingFormat: StreamSegmentTypeEnum; devMode: Scalars["Boolean"]["output"]; environment: Scalars["String"]["output"]; firebase: Scalars["Boolean"]["output"]; minimumAllowedAppVersion: Scalars["String"]["output"]; quotaEnforcementEnabled: Scalars["Boolean"]["output"]; + storageLimitEnforcementEnabled: Scalars["Boolean"]["output"]; subscriptionGatingEnabled: Scalars["Boolean"]["output"]; }; @@ -352,6 +377,14 @@ export type DoesNotOwnShotErrOtherErrorNeedsNote = | DoesNotOwnShotErr | OtherErrorNeedsNote; +export type DrillRunLeaderboardGql = { + __typename?: "DrillRunLeaderboardGQL"; + entries: Array; + totalPlayers: Scalars["Int"]["output"]; + youRank?: Maybe; + youRun?: Maybe; +}; + export type EditShotReturn = { __typename?: "EditShotReturn"; error?: Maybe; @@ -360,6 +393,7 @@ export type EditShotReturn = { export type EditUserInputGql = { agreesToMarketing?: InputMaybe; + bio?: InputMaybe; fargoRating?: InputMaybe; username?: InputMaybe; videosPrivateByDefault?: InputMaybe; @@ -379,6 +413,7 @@ export type EditableShotFieldInputGql = { export enum EntitlementSourceTypeEnum { Admin = "ADMIN", AlphaLegacy = "ALPHA_LEGACY", + Apple = "APPLE", Manual = "MANUAL", Stripe = "STRIPE", } @@ -2316,7 +2351,7 @@ export type GetShotsResult = { export type GetUploadLinkErrors = { __typename?: "GetUploadLinkErrors"; - error: MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErr; + error: MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErrStorageLimitExceededErr; }; export type GetUploadLinkReturn = { @@ -2420,13 +2455,14 @@ export type MustHaveSetForUploadLinkErr = { resolution?: Maybe; }; -export type MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErr = +export type MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErrStorageLimitExceededErr = | InitUploadAlreadyCompletedErr | MustHaveSetForUploadLinkErr | NoInitForChunkedUploadErr | ProcessingFailedErr | SegmentAlreadyUploadedErr + | StorageLimitExceededErr | TooManyInitUploadsErr | TooManyProfileImageUploadsErr; @@ -2453,6 +2489,7 @@ 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; @@ -2473,6 +2510,7 @@ export type Mutation = { reactToVideo: Scalars["Boolean"]["output"]; recalculateChallengeEntry: ChallengeEntry; reportContent: Scalars["Boolean"]["output"]; + requestVideoExport: VideoExportJobGql; respondToChallengeInvitation: ChallengeInvitation; retireTags: Scalars["Boolean"]["output"]; revokeManualEntitlement: UserSubscriptionStatusGql; @@ -2482,6 +2520,7 @@ export type Mutation = { startChallenge: ChallengeEntry; submitCancellationFeedback: Scalars["Boolean"]["output"]; submitChallengeEntry: ChallengeEntry; + syncAppleSubscription: SyncAppleSubscriptionResultGql; undismissChallenge: Scalars["Boolean"]["output"]; unfollowUser: UserGql; updatePoolHall: PoolHall; @@ -2578,6 +2617,10 @@ 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"]; @@ -2664,6 +2707,10 @@ export type MutationReportContentArgs = { videoId: Scalars["Int"]["input"]; }; +export type MutationRequestVideoExportArgs = { + input: RequestVideoExportInput; +}; + export type MutationRespondToChallengeInvitationArgs = { accept: Scalars["Boolean"]["input"]; invitationId: Scalars["ID"]["input"]; @@ -2707,6 +2754,10 @@ export type MutationSubmitChallengeEntryArgs = { videoId: Scalars["ID"]["input"]; }; +export type MutationSyncAppleSubscriptionArgs = { + input: SyncAppleSubscriptionInputGql; +}; + export type MutationUndismissChallengeArgs = { challengeId: Scalars["ID"]["input"]; }; @@ -2765,6 +2816,7 @@ export enum NotificationTypeEnum { ChallengeInvite = "CHALLENGE_INVITE", Comment = "COMMENT", CommentReply = "COMMENT_REPLY", + ExportReady = "EXPORT_READY", Follow = "FOLLOW", Reaction = "REACTION", } @@ -2815,7 +2867,9 @@ export type PlayerSummaryGql = { makePercentage: Scalars["Float"]["output"]; profileImageUri?: Maybe; representativeFullFrameUrl?: Maybe; + runLengths: Array; score?: Maybe; + spinTypeBreakdown: SpinTypeBreakdownGql; totalShots: Scalars["Int"]["output"]; totalShotsMade: Scalars["Int"]["output"]; userId?: Maybe; @@ -2909,6 +2963,18 @@ export type PoolHallCameraStreamCredentials = { streamKey: Scalars["String"]["output"]; }; +export type PotAimGql = { + __typename?: "PotAimGQL"; + converged: Scalars["Boolean"]["output"]; + cutAngle: Scalars["Float"]["output"]; + feasible: Scalars["Boolean"]["output"]; + geometricPhi: Scalars["Float"]["output"]; + occludingBallIds: Array; + phi: Scalars["Float"]["output"]; + potted: Scalars["Boolean"]["output"]; + requiredPrecision: Scalars["Float"]["output"]; +}; + export type ProcessingFailedErr = { __typename?: "ProcessingFailedErr"; processing: VideoProcessingGql; @@ -2934,25 +3000,31 @@ export type Query = { challenges: Array; claimableCameras: Array; claimablePoolHalls: Array; + computePotAim: PotAimGql; doesUsernameExist: Scalars["Boolean"]["output"]; getAggregatedShotMetrics: Array; + getAppleAppAccountToken: Scalars["String"]["output"]; getAvailableSubscriptionOptions: StripeSubscriptionOptionsGql; getBucketSet?: Maybe; getDeployedConfig: DeployedConfigGql; + getDrillRunLeaderboard: DrillRunLeaderboardGql; getFeedVideos: VideoHistoryGql; getGameTypeTagMetrics: Array; getLoggedInUser?: Maybe; getLongestRunsLeaderboard: RunLeaderboardGql; getMakesLeaderboard: CountLeaderboardGql; getMedals: RequestedMedalsGql; + getMyDrillRuns: Array; getOrderedShots: GetShotsResult; getPlayTime: UserPlayTimeGql; getQuotaStatus: QuotaStatusGql; + getResolvedTier: ResolvedTierGql; getRuns: GetRunsResult; getShotAnnotationTypes: Array; getShots: Array; getShotsByIds: Array; getShotsWithMetadata: GetShotsResult; + getStorageStatus?: Maybe; getTableState: TableStateGql; getUser?: Maybe; getUserRelationshipsMatching: UserRelationshipsResult; @@ -2968,11 +3040,14 @@ export type Query = { myChallengeEntries: Array; myChallengeInvitations: Array; myDismissedChallenges: Array; + myVideoExports: Array; notifications: NotificationConnection; poolHallCameras: Array; poolHalls: Array; ruleSets: Array; + simulateShot: ShotProjectionGql; unreadNotificationCount: Scalars["Int"]["output"]; + videoExportJob?: Maybe; videoPlayerClusters: Array; waitFor: Scalars["Float"]["output"]; }; @@ -2998,6 +3073,12 @@ export type QueryClaimableCamerasArgs = { poolHallId: Scalars["ID"]["input"]; }; +export type QueryComputePotAimArgs = { + pocket: PocketIdentifier; + simulationInput: SimulateShotInputGql; + targetBallId: Scalars["Int"]["input"]; +}; + export type QueryDoesUsernameExistArgs = { candidateUsername: Scalars["String"]["input"]; }; @@ -3010,6 +3091,16 @@ export type QueryGetBucketSetArgs = { keyName: Scalars["String"]["input"]; }; +export type QueryGetDrillRunLeaderboardArgs = { + drillTag: Scalars["String"]["input"]; + interval?: InputMaybe; + limit?: Scalars["Int"]["input"]; + pocketSizeMax?: InputMaybe; + pocketSizeMin?: InputMaybe; + tableSizeMax?: InputMaybe; + tableSizeMin?: InputMaybe; +}; + export type QueryGetFeedVideosArgs = { after?: InputMaybe; feedInput?: InputMaybe; @@ -3040,6 +3131,11 @@ export type QueryGetMedalsArgs = { userId?: InputMaybe; }; +export type QueryGetMyDrillRunsArgs = { + drillTag: Scalars["String"]["input"]; + limit?: Scalars["Int"]["input"]; +}; + export type QueryGetOrderedShotsArgs = { countRespectsLimit?: Scalars["Boolean"]["input"]; filterInput: FilterInput; @@ -3142,6 +3238,11 @@ export type QueryIsChallengeDismissedArgs = { challengeId: Scalars["ID"]["input"]; }; +export type QueryMyVideoExportsArgs = { + limit?: Scalars["Int"]["input"]; + offset?: Scalars["Int"]["input"]; +}; + export type QueryNotificationsArgs = { filters?: InputMaybe; limit?: Scalars["Int"]["input"]; @@ -3152,6 +3253,14 @@ export type QueryPoolHallCamerasArgs = { poolHallId: Scalars["ID"]["input"]; }; +export type QuerySimulateShotArgs = { + simulationInput: SimulateShotInputGql; +}; + +export type QueryVideoExportJobArgs = { + jobId: Scalars["Int"]["input"]; +}; + export type QueryVideoPlayerClustersArgs = { videoId: Scalars["Int"]["input"]; }; @@ -3211,6 +3320,13 @@ export enum ReportReasonEnum { Violence = "VIOLENCE", } +export type RequestVideoExportInput = { + mode: VideoExportModeEnum; + runId?: InputMaybe; + shotIds?: InputMaybe>; + videoId: Scalars["Int"]["input"]; +}; + export type RequestedMedalsGql = { __typename?: "RequestedMedalsGQL"; dailyMakes50?: Maybe; @@ -3252,6 +3368,18 @@ export type RequestedMedalsGql = { totalMakes10000?: Maybe; }; +export type ResolvedTierGql = { + __typename?: "ResolvedTierGQL"; + capabilities: Array; + entitlementEndsAt?: Maybe; + entitlementSource?: Maybe; + entitlementStartsAt?: Maybe; + entitlementStatus?: Maybe; + hasActiveSubscription: Scalars["Boolean"]["output"]; + tierDisplayName: Scalars["String"]["output"]; + tierName: Scalars["String"]["output"]; +}; + export type RuleSet = { __typename?: "RuleSet"; createdAt: Scalars["DateTime"]["output"]; @@ -3392,6 +3520,14 @@ export type ShotMoveInput = { shotId: Scalars["Int"]["input"]; }; +export type ShotProjectionGql = { + __typename?: "ShotProjectionGQL"; + events: Array; + finalState: Array; + pottedBallIds: Array; + trajectories: Array; +}; + export type ShotsOrderingComponent = | { difficulty: FloatOrdering; @@ -3442,6 +3578,49 @@ export type ShotsOrderingComponent = videoId: IntOrdering; }; +export type SimulateShotInputGql = { + b64Image?: InputMaybe; + balls?: InputMaybe>; + cueBallId: Scalars["Int"]["input"]; + strike: CueStrikeInputGql; + tableSize?: InputMaybe; + useHomography?: InputMaybe; +}; + +export type SimulationBallStateGql = { + __typename?: "SimulationBallStateGQL"; + ballId: Scalars["Int"]["output"]; + position: Array; +}; + +export type SimulationBallStateInputGql = { + ballId: Scalars["Int"]["input"]; + position: Array; +}; + +export type SimulationEventGql = { + __typename?: "SimulationEventGQL"; + ballIds: Array; + eventType: SimulationEventType; + position?: Maybe>; + 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"]; + draw: Scalars["Int"]["output"]; + follow: Scalars["Int"]["output"]; +}; + export type SpinTypeCountsGql = { __typename?: "SpinTypeCountsGQL"; center: Scalars["Int"]["output"]; @@ -3457,6 +3636,32 @@ export enum SpinTypeEnum { Unknown = "UNKNOWN", } +export type StorageLimitExceededErr = { + __typename?: "StorageLimitExceededErr"; + reason: Scalars["String"]["output"]; + remainingStorageBytes?: Maybe; + retainedStorageLimitBytes?: Maybe; + 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; + policyConfigured: Scalars["Boolean"]["output"]; + remainingStorageBytes?: Maybe; + retainedStorageLimitBytes?: Maybe; + retainedStorageUsedBytes: Scalars["BigInt"]["output"]; + storageUsageRatio?: Maybe; + tierName: Scalars["String"]["output"]; + usageCalculated: Scalars["Boolean"]["output"]; + usageSource?: Maybe; + userId: Scalars["Int"]["output"]; +}; + export type StreamErrorGql = { __typename?: "StreamErrorGQL"; message: Scalars["String"]["output"]; @@ -3489,6 +3694,7 @@ export type StripeProductGql = { export type StripeSubscriptionOptionsGql = { __typename?: "StripeSubscriptionOptionsGQL"; + appleIap: AppleIapSubscriptionOptionsGql; products: Array; trialPeriodDays?: Maybe; }; @@ -3513,6 +3719,27 @@ export type SuccessfulAddAddShotAnnotationErrors = | AddShotAnnotationErrors | SuccessfulAdd; +export type SyncAppleSubscriptionInputGql = { + signedRenewalInfo?: InputMaybe; + signedTransactionInfo: Scalars["String"]["input"]; +}; + +export type SyncAppleSubscriptionResultGql = { + __typename?: "SyncAppleSubscriptionResultGQL"; + appleStatus?: Maybe; + entitlementEndsAt?: Maybe; + entitlementSource?: Maybe; + entitlementStartsAt?: Maybe; + errorCode?: Maybe; + errorMessage?: Maybe; + expiresAt?: Maybe; + hasActiveSubscription: Scalars["Boolean"]["output"]; + latestTransactionId?: Maybe; + ok: Scalars["Boolean"]["output"]; + originalTransactionId?: Maybe; + productId?: Maybe; +}; + export type TableStateGql = { __typename?: "TableStateGQL"; homography?: Maybe; @@ -3563,6 +3790,12 @@ export type TooManyProfileImageUploadsErr = { linksRequested: Scalars["Int"]["output"]; }; +export type TrajectoryPointGql = { + __typename?: "TrajectoryPointGQL"; + position: Array; + time: Scalars["Float"]["output"]; +}; + export type UpdateAnnotationInputGql = { name: Scalars["String"]["input"]; notes?: InputMaybe; @@ -3623,6 +3856,7 @@ export type UploadStreamGql = { initPlaylistUploadStatus?: Maybe; isCompleted: Scalars["Boolean"]["output"]; lastIntendedSegmentBound?: Maybe; + lastSegmentUploadedAt?: Maybe; linksRequested: Scalars["Int"]["output"]; lowestUnuploadedSegmentIndex: Scalars["Int"]["output"]; resolution: VideoResolutionGql; @@ -3639,6 +3873,7 @@ export type UserGql = { __typename?: "UserGQL"; activeVideoId?: Maybe; agreesToMarketing?: Maybe; + bio?: Maybe; createdAt?: Maybe; fargoRating?: Maybe; firebaseUid?: Maybe; @@ -3695,6 +3930,37 @@ export type UserSubscriptionStatusGql = { validUntil?: Maybe; }; +export type VideoExportJobGql = { + __typename?: "VideoExportJobGQL"; + createdAt?: Maybe; + downloadUrl?: Maybe; + expiresAt?: Maybe; + fileSizeBytes?: Maybe; + id: Scalars["Int"]["output"]; + mode: VideoExportModeEnum; + runId?: Maybe; + shotIds?: Maybe>; + status: VideoExportStatusEnum; + videoId: Scalars["Int"]["output"]; + videoName?: Maybe; + videoThumbnailUri?: Maybe; +}; + +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"]; @@ -3763,6 +4029,7 @@ export type VideoGql = { export type VideoHistoryGql = { __typename?: "VideoHistoryGQL"; + followingCount: Scalars["Int"]["output"]; hasFollowing: Scalars["Boolean"]["output"]; pageInfo: PageInfoGql; videos: Array; @@ -4363,6 +4630,8 @@ export type GetFeedQuery = { id: string; lastIntendedSegmentBound?: number | null; streamSegmentType: StreamSegmentTypeEnum; + isCompleted: boolean; + lastSegmentUploadedAt?: any | null; } | null; tags: Array<{ __typename?: "VideoTag"; @@ -4381,8 +4650,15 @@ export type GetFeedQuery = { makePercentage: number; score?: number | null; longestRun: number; + runLengths: Array; averageDifficulty?: number | null; averageTimeBetweenShots?: number | null; + spinTypeBreakdown: { + __typename?: "SpinTypeBreakdownGQL"; + draw: number; + center: number; + follow: number; + }; }>; currentProcessing?: { __typename?: "VideoProcessingGQL"; @@ -4467,6 +4743,8 @@ export type VideoCardFieldsFragment = { id: string; lastIntendedSegmentBound?: number | null; streamSegmentType: StreamSegmentTypeEnum; + isCompleted: boolean; + lastSegmentUploadedAt?: any | null; } | null; tags: Array<{ __typename?: "VideoTag"; @@ -4485,8 +4763,15 @@ export type VideoCardFieldsFragment = { makePercentage: number; score?: number | null; longestRun: number; + runLengths: Array; averageDifficulty?: number | null; averageTimeBetweenShots?: number | null; + spinTypeBreakdown: { + __typename?: "SpinTypeBreakdownGQL"; + draw: number; + center: number; + follow: number; + }; }>; currentProcessing?: { __typename?: "VideoProcessingGQL"; @@ -4546,6 +4831,24 @@ export type GetVideoFeedSessionCountQuery = { }; }; +export type GetLastSessionDateQueryVariables = Exact<{ + filters?: InputMaybe; + includePrivate?: InputMaybe; + feedInput?: InputMaybe; +}>; + +export type GetLastSessionDateQuery = { + __typename?: "Query"; + getFeedVideos: { + __typename?: "VideoHistoryGQL"; + videos: Array<{ + __typename?: "VideoGQL"; + id: number; + startTime?: any | null; + }>; + }; +}; + export type GetVideoFeedQueryVariables = Exact<{ limit?: Scalars["Int"]["input"]; after?: InputMaybe; @@ -4560,6 +4863,7 @@ export type GetVideoFeedQuery = { getFeedVideos: { __typename?: "VideoHistoryGQL"; hasFollowing: boolean; + followingCount: number; videos: Array<{ __typename?: "VideoGQL"; id: number; @@ -4585,6 +4889,8 @@ export type GetVideoFeedQuery = { id: string; lastIntendedSegmentBound?: number | null; streamSegmentType: StreamSegmentTypeEnum; + isCompleted: boolean; + lastSegmentUploadedAt?: any | null; } | null; tags: Array<{ __typename?: "VideoTag"; @@ -4603,8 +4909,15 @@ export type GetVideoFeedQuery = { makePercentage: number; score?: number | null; longestRun: number; + runLengths: Array; averageDifficulty?: number | null; averageTimeBetweenShots?: number | null; + spinTypeBreakdown: { + __typename?: "SpinTypeBreakdownGQL"; + draw: number; + center: number; + follow: number; + }; }>; currentProcessing?: { __typename?: "VideoProcessingGQL"; @@ -4708,6 +5021,65 @@ export type GetRunsLeaderboardQuery = { }; }; +export type GetDrillRunLeaderboardQueryVariables = Exact<{ + drillTag: Scalars["String"]["input"]; + interval?: InputMaybe; + limit?: InputMaybe; + tableSizeMin?: InputMaybe; + tableSizeMax?: InputMaybe; + pocketSizeMin?: InputMaybe; + pocketSizeMax?: InputMaybe; +}>; + +export type GetDrillRunLeaderboardQuery = { + __typename?: "Query"; + getDrillRunLeaderboard: { + __typename?: "DrillRunLeaderboardGQL"; + youRank?: number | null; + totalPlayers: number; + entries: Array<{ + __typename?: "RunGQL"; + id: number; + runLength: number; + videoId: number; + video: { + __typename?: "VideoGQL"; + tableSize: number; + pocketSize?: number | null; + createdAt?: any | null; + }; + user: { + __typename?: "UserGQL"; + id: number; + username: string; + profileImageUri?: string | null; + }; + }>; + youRun?: { + __typename?: "RunGQL"; + id: number; + runLength: number; + videoId: number; + } | null; + }; +}; + +export type GetMyDrillRunsQueryVariables = Exact<{ + drillTag: Scalars["String"]["input"]; + limit?: InputMaybe; +}>; + +export type GetMyDrillRunsQuery = { + __typename?: "Query"; + getMyDrillRuns: Array<{ + __typename?: "RunGQL"; + id: number; + runLength: number; + videoId: number; + video: { __typename?: "VideoGQL"; createdAt?: any | null }; + }>; +}; + export type GetVideoMakePercentageIntervalsQueryVariables = Exact<{ videoId: Scalars["ID"]["input"]; intervalDuration: Scalars["Int"]["input"]; @@ -5042,6 +5414,12 @@ export type GetAvailableSubscriptionOptionsQuery = { active: boolean; }>; }>; + appleIap: { + __typename?: "AppleIapSubscriptionOptionsGQL"; + enabled: boolean; + proMonthlyProductId?: string | null; + productIds: Array; + }; }; }; @@ -5054,6 +5432,9 @@ export type GetSubscriptionStatusQuery = { getUserSubscriptionStatus: { __typename?: "UserSubscriptionStatusGQL"; hasActiveSubscription: boolean; + entitlementSource?: EntitlementSourceTypeEnum | null; + entitlementStartsAt?: any | null; + entitlementEndsAt?: any | null; subscriptionStatus?: StripeSubscriptionStatusEnum | null; currentPeriodStart?: any | null; currentPeriodEnd?: any | null; @@ -5063,6 +5444,38 @@ export type GetSubscriptionStatusQuery = { }; }; +export type GetAppleAppAccountTokenQueryVariables = Exact<{ + [key: string]: never; +}>; + +export type GetAppleAppAccountTokenQuery = { + __typename?: "Query"; + getAppleAppAccountToken: string; +}; + +export type SyncAppleSubscriptionMutationVariables = Exact<{ + signedTransactionInfo: Scalars["String"]["input"]; +}>; + +export type SyncAppleSubscriptionMutation = { + __typename?: "Mutation"; + syncAppleSubscription: { + __typename?: "SyncAppleSubscriptionResultGQL"; + ok: boolean; + errorCode?: string | null; + errorMessage?: string | null; + hasActiveSubscription: boolean; + entitlementSource?: EntitlementSourceTypeEnum | null; + entitlementStartsAt?: any | null; + entitlementEndsAt?: any | null; + appleStatus?: number | null; + originalTransactionId?: string | null; + latestTransactionId?: string | null; + productId?: string | null; + expiresAt?: any | null; + }; +}; + export type CancelSubscriptionMutationVariables = Exact<{ [key: string]: never; }>; @@ -5072,6 +5485,9 @@ export type CancelSubscriptionMutation = { cancelSubscription: { __typename?: "UserSubscriptionStatusGQL"; hasActiveSubscription: boolean; + entitlementSource?: EntitlementSourceTypeEnum | null; + entitlementStartsAt?: any | null; + entitlementEndsAt?: any | null; subscriptionStatus?: StripeSubscriptionStatusEnum | null; currentPeriodStart?: any | null; currentPeriodEnd?: any | null; @@ -5795,8 +6211,15 @@ export type PlayerSummaryFieldsFragment = { makePercentage: number; score?: number | null; longestRun: number; + runLengths: Array; averageDifficulty?: number | null; averageTimeBetweenShots?: number | null; + spinTypeBreakdown: { + __typename?: "SpinTypeBreakdownGQL"; + draw: number; + center: number; + follow: number; + }; }; export type PlayerClusterShotFieldsFragment = { @@ -5898,6 +6321,74 @@ export type FinalizePlayerAssignmentsMutation = { }>; }; +export type GetTableStateQueryVariables = Exact<{ + b64Image: Scalars["String"]["input"]; + tableSize?: InputMaybe; + useHomography?: InputMaybe; +}>; + +export type GetTableStateQuery = { + __typename?: "Query"; + getTableState: { + __typename?: "TableStateGQL"; + identifierToPosition: Array>; + }; +}; + +export type SimulateShotQueryVariables = Exact<{ + simulationInput: SimulateShotInputGql; +}>; + +export type SimulateShotQuery = { + __typename?: "Query"; + simulateShot: { + __typename?: "ShotProjectionGQL"; + pottedBallIds: Array; + trajectories: Array<{ + __typename?: "BallTrajectoryGQL"; + ballId: number; + points: Array<{ + __typename?: "TrajectoryPointGQL"; + time: number; + position: Array; + }>; + }>; + events: Array<{ + __typename?: "SimulationEventGQL"; + eventType: SimulationEventType; + time: number; + ballIds: Array; + position?: Array | null; + }>; + finalState: Array<{ + __typename?: "SimulationBallStateGQL"; + ballId: number; + position: Array; + }>; + }; +}; + +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; + }; +}; + export type GetSerializedShotPathsQueryVariables = Exact<{ filterInput: FilterInput; }>; @@ -6238,6 +6729,39 @@ export type GetShotsByIdsQuery = { }>; }; +export type ShotClipRangeFragment = { + __typename?: "ShotGQL"; + id: number; + videoId: number; + startFrame: number; + endFrame: number; + startTime: number; + endTime: number; +}; + +export type GetShotClipRangesQueryVariables = Exact<{ + filterInput: FilterInput; + shotsOrdering?: InputMaybe; + limit?: InputMaybe; +}>; + +export type GetShotClipRangesQuery = { + __typename?: "Query"; + getOrderedShots: { + __typename?: "GetShotsResult"; + count?: number | null; + shots: Array<{ + __typename?: "ShotGQL"; + id: number; + videoId: number; + startFrame: number; + endFrame: number; + startTime: number; + endTime: number; + }>; + }; +}; + export type ShotWithAllFeaturesFragment = { __typename?: "ShotGQL"; id: number; @@ -6446,6 +6970,7 @@ export type EditProfileImageUriMutation = { username: string; isAdmin?: boolean | null; profileImageUri?: string | null; + bio?: string | null; fargoRating?: number | null; activeVideoId?: number | null; createdAt?: any | null; @@ -6466,6 +6991,7 @@ export type GetLoggedInUserQuery = { username: string; isAdmin?: boolean | null; profileImageUri?: string | null; + bio?: string | null; fargoRating?: number | null; activeVideoId?: number | null; createdAt?: any | null; @@ -6488,6 +7014,7 @@ export type GetUserQuery = { username: string; isAdmin?: boolean | null; profileImageUri?: string | null; + bio?: string | null; fargoRating?: number | null; activeVideoId?: number | null; createdAt?: any | null; @@ -6509,6 +7036,47 @@ export type GetUserPlayTimeQuery = { getPlayTime: { __typename?: "UserPlayTimeGQL"; totalSeconds: number }; }; +export type GetUploadQuotaStatusQueryVariables = Exact<{ + [key: string]: never; +}>; + +export type GetUploadQuotaStatusQuery = { + __typename?: "Query"; + getQuotaStatus: { + __typename?: "QuotaStatusGQL"; + tierName: string; + periodStart: any; + periodEnd: any; + durationUsedSeconds: number; + durationLimitSeconds?: number | null; + maxVideoDurationSeconds?: number | null; + durationRemainingSeconds?: number | null; + canUpload: boolean; + importQuotaBuckets: Array<{ + __typename?: "QuotaBucketStatusGQL"; + quotaKey: string; + appliesToUploadKind: string; + periodStart: any; + periodEnd: any; + durationUsedSeconds: number; + durationLimitSeconds?: number | null; + durationRemainingSeconds?: number | null; + canUpload: boolean; + }>; + recordingQuotaBuckets: Array<{ + __typename?: "QuotaBucketStatusGQL"; + quotaKey: string; + appliesToUploadKind: string; + periodStart: any; + periodEnd: any; + durationUsedSeconds: number; + durationLimitSeconds?: number | null; + durationRemainingSeconds?: number | null; + canUpload: boolean; + }>; + }; +}; + export type GetUsernamesQueryVariables = Exact<{ matchString: Scalars["String"]["input"]; limit?: InputMaybe; @@ -6636,6 +7204,7 @@ export type EditUserMutationVariables = Exact<{ fargoRating?: InputMaybe; videosPrivateByDefault?: InputMaybe; agreesToMarketing?: InputMaybe; + bio?: InputMaybe; }>; export type EditUserMutation = { @@ -6649,6 +7218,7 @@ export type EditUserMutation = { updatedAt?: any | null; videosPrivateByDefault?: boolean | null; agreesToMarketing?: boolean | null; + bio?: string | null; }; }; @@ -6666,6 +7236,7 @@ export type UserFragmentFragment = { username: string; isAdmin?: boolean | null; profileImageUri?: string | null; + bio?: string | null; fargoRating?: number | null; activeVideoId?: number | null; createdAt?: any | null; @@ -6689,6 +7260,7 @@ export type GetUsersMatchingQuery = { username: string; isAdmin?: boolean | null; profileImageUri?: string | null; + bio?: string | null; fargoRating?: number | null; activeVideoId?: number | null; createdAt?: any | null; @@ -6846,8 +7418,15 @@ export type GetVideoDetailsQuery = { makePercentage: number; score?: number | null; longestRun: number; + runLengths: Array; averageDifficulty?: number | null; averageTimeBetweenShots?: number | null; + spinTypeBreakdown: { + __typename?: "SpinTypeBreakdownGQL"; + draw: number; + center: number; + follow: number; + }; }>; }; }; @@ -6916,6 +7495,111 @@ export type GetVideoSocialDetailsByIdQuery = { }; }; +export type GetVideoCardQueryVariables = Exact<{ + videoId: Scalars["Int"]["input"]; +}>; + +export type GetVideoCardQuery = { + __typename?: "Query"; + getVideo: { + __typename?: "VideoGQL"; + id: number; + name?: string | null; + screenshotUri?: string | null; + totalShots: number; + makePercentage: number; + averageTimeBetweenShots?: number | null; + averageDifficulty?: number | null; + startTime?: any | null; + private: boolean; + elapsedTime?: number | null; + tableSize: number; + pocketSize?: number | null; + owner?: { + __typename?: "UserGQL"; + id: number; + username: string; + profileImageUri?: string | null; + } | null; + stream?: { + __typename?: "UploadStreamGQL"; + id: string; + lastIntendedSegmentBound?: number | null; + streamSegmentType: StreamSegmentTypeEnum; + isCompleted: boolean; + lastSegmentUploadedAt?: any | null; + } | null; + tags: Array<{ + __typename?: "VideoTag"; + name: string; + tagClasses: Array<{ __typename?: "VideoTagClass"; name: string }>; + }>; + playerSummaries: Array<{ + __typename?: "PlayerSummaryGQL"; + clusterId: number; + userId?: number | null; + username?: string | null; + profileImageUri?: string | null; + representativeFullFrameUrl?: string | null; + totalShots: number; + totalShotsMade: number; + makePercentage: number; + score?: number | null; + longestRun: number; + runLengths: Array; + averageDifficulty?: number | null; + averageTimeBetweenShots?: number | null; + spinTypeBreakdown: { + __typename?: "SpinTypeBreakdownGQL"; + draw: number; + center: number; + follow: number; + }; + }>; + currentProcessing?: { + __typename?: "VideoProcessingGQL"; + id: number; + status: ProcessingStatusEnum; + } | null; + reactions: Array<{ + __typename?: "ReactionGQL"; + videoId: number; + reaction: ReactionEnum; + user: { + __typename?: "UserGQL"; + id: number; + username: string; + profileImageUri?: string | null; + isFollowedByCurrentUser?: boolean | null; + }; + }>; + comments: Array<{ + __typename?: "CommentGQL"; + id: number; + message: string; + user: { + __typename?: "UserGQL"; + id: number; + username: string; + profileImageUri?: string | null; + isFollowedByCurrentUser?: boolean | null; + }; + replies: Array<{ + __typename?: "CommentGQL"; + id: number; + message: string; + user: { + __typename?: "UserGQL"; + id: number; + username: string; + profileImageUri?: string | null; + isFollowedByCurrentUser?: boolean | null; + }; + }>; + }>; + }; +}; + export type GetVideosQueryVariables = Exact<{ videoIds: Array | Scalars["Int"]["input"]; }>; @@ -7319,6 +8003,101 @@ export type HomographyInfoFragment = { }; }; +export type VideoExportJobFieldsFragment = { + __typename?: "VideoExportJobGQL"; + id: number; + videoId: number; + mode: VideoExportModeEnum; + status: VideoExportStatusEnum; + videoName?: string | null; + videoThumbnailUri?: string | null; + shotIds?: Array | 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; + videoName?: string | null; + videoThumbnailUri?: string | null; + shotIds?: Array | null; + runId?: number | null; + downloadUrl?: string | null; + fileSizeBytes?: number | null; + expiresAt?: any | null; + createdAt?: any | null; + }; +}; + +export type DismissVideoExportMutationVariables = Exact<{ + jobId: Scalars["Int"]["input"]; +}>; + +export type DismissVideoExportMutation = { + __typename?: "Mutation"; + dismissVideoExport: boolean; +}; + +export type VideoExportJobQueryVariables = Exact<{ + jobId: Scalars["Int"]["input"]; +}>; + +export type VideoExportJobQuery = { + __typename?: "Query"; + videoExportJob?: { + __typename?: "VideoExportJobGQL"; + id: number; + videoId: number; + mode: VideoExportModeEnum; + status: VideoExportStatusEnum; + videoName?: string | null; + videoThumbnailUri?: string | null; + shotIds?: Array | null; + runId?: number | null; + downloadUrl?: string | null; + fileSizeBytes?: number | null; + expiresAt?: any | null; + createdAt?: any | null; + } | null; +}; + +export type MyVideoExportsQueryVariables = Exact<{ + limit?: InputMaybe; + offset?: InputMaybe; +}>; + +export type MyVideoExportsQuery = { + __typename?: "Query"; + myVideoExports: Array<{ + __typename?: "VideoExportJobGQL"; + id: number; + videoId: number; + mode: VideoExportModeEnum; + status: VideoExportStatusEnum; + videoName?: string | null; + videoThumbnailUri?: string | null; + shotIds?: Array | null; + runId?: number | null; + downloadUrl?: string | null; + fileSizeBytes?: number | null; + expiresAt?: any | null; + createdAt?: any | null; + }>; +}; + export type CreateUploadStreamMutationVariables = Exact<{ videoMetadataInput: VideoMetadataInput; expectedDurationSeconds?: InputMaybe; @@ -7364,6 +8143,7 @@ export type GetUploadLinkMutation = { }; } | { __typename?: "SegmentAlreadyUploadedErr"; segmentId: number } + | { __typename?: "StorageLimitExceededErr" } | { __typename?: "TooManyInitUploadsErr" } | { __typename?: "TooManyProfileImageUploadsErr" }; } @@ -7406,6 +8186,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" }; } @@ -7518,6 +8306,12 @@ export const PlayerSummaryFieldsFragmentDoc = gql` makePercentage score longestRun + runLengths + spinTypeBreakdown { + draw + center + follow + } averageDifficulty averageTimeBetweenShots } @@ -7551,6 +8345,8 @@ export const VideoCardFieldsFragmentDoc = gql` id lastIntendedSegmentBound streamSegmentType + isCompleted + lastSegmentUploadedAt } tableSize pocketSize @@ -7754,6 +8550,16 @@ export const PlayerClusterFieldsFragmentDoc = gql` } ${PlayerClusterShotFieldsFragmentDoc} `; +export const ShotClipRangeFragmentDoc = gql` + fragment ShotClipRange on ShotGQL { + id + videoId + startFrame + endFrame + startTime @client + endTime @client + } +`; export const ShotWithAllFeaturesFragmentDoc = gql` fragment ShotWithAllFeatures on ShotGQL { id @@ -7828,6 +8634,7 @@ export const UserFragmentFragmentDoc = gql` username isAdmin profileImageUri + bio fargoRating activeVideoId createdAt @@ -7951,6 +8758,22 @@ export const HomographyInfoFragmentDoc = gql` } } `; +export const VideoExportJobFieldsFragmentDoc = gql` + fragment VideoExportJobFields on VideoExportJobGQL { + id + videoId + mode + status + videoName + videoThumbnailUri + shotIds + runId + downloadUrl + fileSizeBytes + expiresAt + createdAt + } +`; export const UploadStreamWithDetailsFragmentDoc = gql` fragment UploadStreamWithDetails on VideoGQL { id @@ -9839,6 +10662,93 @@ export type GetVideoFeedSessionCountQueryResult = Apollo.QueryResult< GetVideoFeedSessionCountQuery, GetVideoFeedSessionCountQueryVariables >; +export const GetLastSessionDateDocument = gql` + query GetLastSessionDate( + $filters: VideoFilterInput = null + $includePrivate: IncludePrivateEnum = MINE + $feedInput: VideoFeedInputGQL = null + ) { + getFeedVideos( + limit: 1 + filters: $filters + includePrivate: $includePrivate + feedInput: $feedInput + ) { + videos { + id + startTime + } + } + } +`; + +/** + * __useGetLastSessionDateQuery__ + * + * To run a query within a React component, call `useGetLastSessionDateQuery` and pass it any options that fit your needs. + * When your component renders, `useGetLastSessionDateQuery` 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 } = useGetLastSessionDateQuery({ + * variables: { + * filters: // value for 'filters' + * includePrivate: // value for 'includePrivate' + * feedInput: // value for 'feedInput' + * }, + * }); + */ +export function useGetLastSessionDateQuery( + baseOptions?: Apollo.QueryHookOptions< + GetLastSessionDateQuery, + GetLastSessionDateQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery< + GetLastSessionDateQuery, + GetLastSessionDateQueryVariables + >(GetLastSessionDateDocument, options); +} +export function useGetLastSessionDateLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + GetLastSessionDateQuery, + GetLastSessionDateQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery< + GetLastSessionDateQuery, + GetLastSessionDateQueryVariables + >(GetLastSessionDateDocument, options); +} +export function useGetLastSessionDateSuspenseQuery( + baseOptions?: Apollo.SuspenseQueryHookOptions< + GetLastSessionDateQuery, + GetLastSessionDateQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useSuspenseQuery< + GetLastSessionDateQuery, + GetLastSessionDateQueryVariables + >(GetLastSessionDateDocument, options); +} +export type GetLastSessionDateQueryHookResult = ReturnType< + typeof useGetLastSessionDateQuery +>; +export type GetLastSessionDateLazyQueryHookResult = ReturnType< + typeof useGetLastSessionDateLazyQuery +>; +export type GetLastSessionDateSuspenseQueryHookResult = ReturnType< + typeof useGetLastSessionDateSuspenseQuery +>; +export type GetLastSessionDateQueryResult = Apollo.QueryResult< + GetLastSessionDateQuery, + GetLastSessionDateQueryVariables +>; export const GetVideoFeedDocument = gql` query GetVideoFeed( $limit: Int! = 5 @@ -9864,6 +10774,7 @@ export const GetVideoFeedDocument = gql` endCursor } hasFollowing + followingCount } } ${VideoCardFieldsFragmentDoc} @@ -10108,6 +11019,201 @@ export type GetRunsLeaderboardQueryResult = Apollo.QueryResult< GetRunsLeaderboardQuery, GetRunsLeaderboardQueryVariables >; +export const GetDrillRunLeaderboardDocument = gql` + query GetDrillRunLeaderboard( + $drillTag: String! + $interval: TimeInterval + $limit: Int = 50 + $tableSizeMin: Float + $tableSizeMax: Float + $pocketSizeMin: Float + $pocketSizeMax: Float + ) { + getDrillRunLeaderboard( + drillTag: $drillTag + interval: $interval + limit: $limit + tableSizeMin: $tableSizeMin + tableSizeMax: $tableSizeMax + pocketSizeMin: $pocketSizeMin + pocketSizeMax: $pocketSizeMax + ) { + entries { + id + runLength + videoId + video { + tableSize + pocketSize + createdAt + } + user { + id + username + profileImageUri + } + } + youRun { + id + runLength + videoId + } + youRank + totalPlayers + } + } +`; + +/** + * __useGetDrillRunLeaderboardQuery__ + * + * To run a query within a React component, call `useGetDrillRunLeaderboardQuery` and pass it any options that fit your needs. + * When your component renders, `useGetDrillRunLeaderboardQuery` 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 } = useGetDrillRunLeaderboardQuery({ + * variables: { + * drillTag: // value for 'drillTag' + * interval: // value for 'interval' + * limit: // value for 'limit' + * tableSizeMin: // value for 'tableSizeMin' + * tableSizeMax: // value for 'tableSizeMax' + * pocketSizeMin: // value for 'pocketSizeMin' + * pocketSizeMax: // value for 'pocketSizeMax' + * }, + * }); + */ +export function useGetDrillRunLeaderboardQuery( + baseOptions: Apollo.QueryHookOptions< + GetDrillRunLeaderboardQuery, + GetDrillRunLeaderboardQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery< + GetDrillRunLeaderboardQuery, + GetDrillRunLeaderboardQueryVariables + >(GetDrillRunLeaderboardDocument, options); +} +export function useGetDrillRunLeaderboardLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + GetDrillRunLeaderboardQuery, + GetDrillRunLeaderboardQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery< + GetDrillRunLeaderboardQuery, + GetDrillRunLeaderboardQueryVariables + >(GetDrillRunLeaderboardDocument, options); +} +export function useGetDrillRunLeaderboardSuspenseQuery( + baseOptions?: Apollo.SuspenseQueryHookOptions< + GetDrillRunLeaderboardQuery, + GetDrillRunLeaderboardQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useSuspenseQuery< + GetDrillRunLeaderboardQuery, + GetDrillRunLeaderboardQueryVariables + >(GetDrillRunLeaderboardDocument, options); +} +export type GetDrillRunLeaderboardQueryHookResult = ReturnType< + typeof useGetDrillRunLeaderboardQuery +>; +export type GetDrillRunLeaderboardLazyQueryHookResult = ReturnType< + typeof useGetDrillRunLeaderboardLazyQuery +>; +export type GetDrillRunLeaderboardSuspenseQueryHookResult = ReturnType< + typeof useGetDrillRunLeaderboardSuspenseQuery +>; +export type GetDrillRunLeaderboardQueryResult = Apollo.QueryResult< + GetDrillRunLeaderboardQuery, + GetDrillRunLeaderboardQueryVariables +>; +export const GetMyDrillRunsDocument = gql` + query GetMyDrillRuns($drillTag: String!, $limit: Int = 50) { + getMyDrillRuns(drillTag: $drillTag, limit: $limit) { + id + runLength + videoId + video { + createdAt + } + } + } +`; + +/** + * __useGetMyDrillRunsQuery__ + * + * To run a query within a React component, call `useGetMyDrillRunsQuery` and pass it any options that fit your needs. + * When your component renders, `useGetMyDrillRunsQuery` 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 } = useGetMyDrillRunsQuery({ + * variables: { + * drillTag: // value for 'drillTag' + * limit: // value for 'limit' + * }, + * }); + */ +export function useGetMyDrillRunsQuery( + baseOptions: Apollo.QueryHookOptions< + GetMyDrillRunsQuery, + GetMyDrillRunsQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery( + GetMyDrillRunsDocument, + options, + ); +} +export function useGetMyDrillRunsLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + GetMyDrillRunsQuery, + GetMyDrillRunsQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery( + GetMyDrillRunsDocument, + options, + ); +} +export function useGetMyDrillRunsSuspenseQuery( + baseOptions?: Apollo.SuspenseQueryHookOptions< + GetMyDrillRunsQuery, + GetMyDrillRunsQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useSuspenseQuery< + GetMyDrillRunsQuery, + GetMyDrillRunsQueryVariables + >(GetMyDrillRunsDocument, options); +} +export type GetMyDrillRunsQueryHookResult = ReturnType< + typeof useGetMyDrillRunsQuery +>; +export type GetMyDrillRunsLazyQueryHookResult = ReturnType< + typeof useGetMyDrillRunsLazyQuery +>; +export type GetMyDrillRunsSuspenseQueryHookResult = ReturnType< + typeof useGetMyDrillRunsSuspenseQuery +>; +export type GetMyDrillRunsQueryResult = Apollo.QueryResult< + GetMyDrillRunsQuery, + GetMyDrillRunsQueryVariables +>; export const GetVideoMakePercentageIntervalsDocument = gql` query GetVideoMakePercentageIntervals( $videoId: ID! @@ -10850,6 +11956,11 @@ export const GetAvailableSubscriptionOptionsDocument = gql` active } } + appleIap { + enabled + proMonthlyProductId + productIds + } } } `; @@ -10922,6 +12033,9 @@ export const GetSubscriptionStatusDocument = gql` query GetSubscriptionStatus { getUserSubscriptionStatus { hasActiveSubscription + entitlementSource + entitlementStartsAt + entitlementEndsAt subscriptionStatus currentPeriodStart currentPeriodEnd @@ -10996,10 +12110,146 @@ export type GetSubscriptionStatusQueryResult = Apollo.QueryResult< GetSubscriptionStatusQuery, GetSubscriptionStatusQueryVariables >; +export const GetAppleAppAccountTokenDocument = gql` + query GetAppleAppAccountToken { + getAppleAppAccountToken + } +`; + +/** + * __useGetAppleAppAccountTokenQuery__ + * + * To run a query within a React component, call `useGetAppleAppAccountTokenQuery` and pass it any options that fit your needs. + * When your component renders, `useGetAppleAppAccountTokenQuery` 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 } = useGetAppleAppAccountTokenQuery({ + * variables: { + * }, + * }); + */ +export function useGetAppleAppAccountTokenQuery( + baseOptions?: Apollo.QueryHookOptions< + GetAppleAppAccountTokenQuery, + GetAppleAppAccountTokenQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery< + GetAppleAppAccountTokenQuery, + GetAppleAppAccountTokenQueryVariables + >(GetAppleAppAccountTokenDocument, options); +} +export function useGetAppleAppAccountTokenLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + GetAppleAppAccountTokenQuery, + GetAppleAppAccountTokenQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery< + GetAppleAppAccountTokenQuery, + GetAppleAppAccountTokenQueryVariables + >(GetAppleAppAccountTokenDocument, options); +} +export function useGetAppleAppAccountTokenSuspenseQuery( + baseOptions?: Apollo.SuspenseQueryHookOptions< + GetAppleAppAccountTokenQuery, + GetAppleAppAccountTokenQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useSuspenseQuery< + GetAppleAppAccountTokenQuery, + GetAppleAppAccountTokenQueryVariables + >(GetAppleAppAccountTokenDocument, options); +} +export type GetAppleAppAccountTokenQueryHookResult = ReturnType< + typeof useGetAppleAppAccountTokenQuery +>; +export type GetAppleAppAccountTokenLazyQueryHookResult = ReturnType< + typeof useGetAppleAppAccountTokenLazyQuery +>; +export type GetAppleAppAccountTokenSuspenseQueryHookResult = ReturnType< + typeof useGetAppleAppAccountTokenSuspenseQuery +>; +export type GetAppleAppAccountTokenQueryResult = Apollo.QueryResult< + GetAppleAppAccountTokenQuery, + GetAppleAppAccountTokenQueryVariables +>; +export const SyncAppleSubscriptionDocument = gql` + mutation SyncAppleSubscription($signedTransactionInfo: String!) { + syncAppleSubscription( + input: { signedTransactionInfo: $signedTransactionInfo } + ) { + ok + errorCode + errorMessage + hasActiveSubscription + entitlementSource + entitlementStartsAt + entitlementEndsAt + appleStatus + originalTransactionId + latestTransactionId + productId + expiresAt + } + } +`; +export type SyncAppleSubscriptionMutationFn = Apollo.MutationFunction< + SyncAppleSubscriptionMutation, + SyncAppleSubscriptionMutationVariables +>; + +/** + * __useSyncAppleSubscriptionMutation__ + * + * To run a mutation, you first call `useSyncAppleSubscriptionMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useSyncAppleSubscriptionMutation` 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 [syncAppleSubscriptionMutation, { data, loading, error }] = useSyncAppleSubscriptionMutation({ + * variables: { + * signedTransactionInfo: // value for 'signedTransactionInfo' + * }, + * }); + */ +export function useSyncAppleSubscriptionMutation( + baseOptions?: Apollo.MutationHookOptions< + SyncAppleSubscriptionMutation, + SyncAppleSubscriptionMutationVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation< + SyncAppleSubscriptionMutation, + SyncAppleSubscriptionMutationVariables + >(SyncAppleSubscriptionDocument, options); +} +export type SyncAppleSubscriptionMutationHookResult = ReturnType< + typeof useSyncAppleSubscriptionMutation +>; +export type SyncAppleSubscriptionMutationResult = + Apollo.MutationResult; +export type SyncAppleSubscriptionMutationOptions = Apollo.BaseMutationOptions< + SyncAppleSubscriptionMutation, + SyncAppleSubscriptionMutationVariables +>; export const CancelSubscriptionDocument = gql` mutation CancelSubscription { cancelSubscription { hasActiveSubscription + entitlementSource + entitlementStartsAt + entitlementEndsAt subscriptionStatus currentPeriodStart currentPeriodEnd @@ -12285,6 +13535,269 @@ 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( + GetTableStateDocument, + options, + ); +} +export function useGetTableStateLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + GetTableStateQuery, + GetTableStateQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery( + 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( + SimulateShotDocument, + options, + ); +} +export function useSimulateShotLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + SimulateShotQuery, + SimulateShotQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery( + SimulateShotDocument, + options, + ); +} +export function useSimulateShotSuspenseQuery( + baseOptions?: Apollo.SuspenseQueryHookOptions< + SimulateShotQuery, + SimulateShotQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useSuspenseQuery( + 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( + ComputePotAimDocument, + options, + ); +} +export function useComputePotAimLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + ComputePotAimQuery, + ComputePotAimQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery( + 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) { @@ -12943,6 +14456,93 @@ export type GetShotsByIdsQueryResult = Apollo.QueryResult< GetShotsByIdsQuery, GetShotsByIdsQueryVariables >; +export const GetShotClipRangesDocument = gql` + query GetShotClipRanges( + $filterInput: FilterInput! + $shotsOrdering: GetShotsOrdering + $limit: Int + ) { + getOrderedShots( + filterInput: $filterInput + shotsOrdering: $shotsOrdering + limit: $limit + ) { + count + shots { + ...ShotClipRange + } + } + } + ${ShotClipRangeFragmentDoc} +`; + +/** + * __useGetShotClipRangesQuery__ + * + * To run a query within a React component, call `useGetShotClipRangesQuery` and pass it any options that fit your needs. + * When your component renders, `useGetShotClipRangesQuery` 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 } = useGetShotClipRangesQuery({ + * variables: { + * filterInput: // value for 'filterInput' + * shotsOrdering: // value for 'shotsOrdering' + * limit: // value for 'limit' + * }, + * }); + */ +export function useGetShotClipRangesQuery( + baseOptions: Apollo.QueryHookOptions< + GetShotClipRangesQuery, + GetShotClipRangesQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery< + GetShotClipRangesQuery, + GetShotClipRangesQueryVariables + >(GetShotClipRangesDocument, options); +} +export function useGetShotClipRangesLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + GetShotClipRangesQuery, + GetShotClipRangesQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery< + GetShotClipRangesQuery, + GetShotClipRangesQueryVariables + >(GetShotClipRangesDocument, options); +} +export function useGetShotClipRangesSuspenseQuery( + baseOptions?: Apollo.SuspenseQueryHookOptions< + GetShotClipRangesQuery, + GetShotClipRangesQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useSuspenseQuery< + GetShotClipRangesQuery, + GetShotClipRangesQueryVariables + >(GetShotClipRangesDocument, options); +} +export type GetShotClipRangesQueryHookResult = ReturnType< + typeof useGetShotClipRangesQuery +>; +export type GetShotClipRangesLazyQueryHookResult = ReturnType< + typeof useGetShotClipRangesLazyQuery +>; +export type GetShotClipRangesSuspenseQueryHookResult = ReturnType< + typeof useGetShotClipRangesSuspenseQuery +>; +export type GetShotClipRangesQueryResult = Apollo.QueryResult< + GetShotClipRangesQuery, + GetShotClipRangesQueryVariables +>; export const EditShotDocument = gql` mutation EditShot($shotId: Int!, $fieldsToEdit: EditableShotFieldInputGQL!) { editShot(shotId: $shotId, fieldsToEdit: $fieldsToEdit) { @@ -13432,6 +15032,105 @@ export type GetUserPlayTimeQueryResult = Apollo.QueryResult< GetUserPlayTimeQuery, GetUserPlayTimeQueryVariables >; +export const GetUploadQuotaStatusDocument = gql` + query GetUploadQuotaStatus { + getQuotaStatus { + tierName + periodStart + periodEnd + durationUsedSeconds + durationLimitSeconds + maxVideoDurationSeconds + durationRemainingSeconds + canUpload + importQuotaBuckets { + quotaKey + appliesToUploadKind + periodStart + periodEnd + durationUsedSeconds + durationLimitSeconds + durationRemainingSeconds + canUpload + } + recordingQuotaBuckets { + quotaKey + appliesToUploadKind + periodStart + periodEnd + durationUsedSeconds + durationLimitSeconds + durationRemainingSeconds + canUpload + } + } + } +`; + +/** + * __useGetUploadQuotaStatusQuery__ + * + * To run a query within a React component, call `useGetUploadQuotaStatusQuery` and pass it any options that fit your needs. + * When your component renders, `useGetUploadQuotaStatusQuery` 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 } = useGetUploadQuotaStatusQuery({ + * variables: { + * }, + * }); + */ +export function useGetUploadQuotaStatusQuery( + baseOptions?: Apollo.QueryHookOptions< + GetUploadQuotaStatusQuery, + GetUploadQuotaStatusQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery< + GetUploadQuotaStatusQuery, + GetUploadQuotaStatusQueryVariables + >(GetUploadQuotaStatusDocument, options); +} +export function useGetUploadQuotaStatusLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + GetUploadQuotaStatusQuery, + GetUploadQuotaStatusQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery< + GetUploadQuotaStatusQuery, + GetUploadQuotaStatusQueryVariables + >(GetUploadQuotaStatusDocument, options); +} +export function useGetUploadQuotaStatusSuspenseQuery( + baseOptions?: Apollo.SuspenseQueryHookOptions< + GetUploadQuotaStatusQuery, + GetUploadQuotaStatusQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useSuspenseQuery< + GetUploadQuotaStatusQuery, + GetUploadQuotaStatusQueryVariables + >(GetUploadQuotaStatusDocument, options); +} +export type GetUploadQuotaStatusQueryHookResult = ReturnType< + typeof useGetUploadQuotaStatusQuery +>; +export type GetUploadQuotaStatusLazyQueryHookResult = ReturnType< + typeof useGetUploadQuotaStatusLazyQuery +>; +export type GetUploadQuotaStatusSuspenseQueryHookResult = ReturnType< + typeof useGetUploadQuotaStatusSuspenseQuery +>; +export type GetUploadQuotaStatusQueryResult = Apollo.QueryResult< + GetUploadQuotaStatusQuery, + GetUploadQuotaStatusQueryVariables +>; export const GetUsernamesDocument = gql` query getUsernames( $matchString: String! @@ -14019,6 +15718,7 @@ export const EditUserDocument = gql` $fargoRating: Int $videosPrivateByDefault: Boolean $agreesToMarketing: Boolean + $bio: String ) { editUser( input: { @@ -14026,6 +15726,7 @@ export const EditUserDocument = gql` fargoRating: $fargoRating videosPrivateByDefault: $videosPrivateByDefault agreesToMarketing: $agreesToMarketing + bio: $bio } ) { id @@ -14035,6 +15736,7 @@ export const EditUserDocument = gql` updatedAt videosPrivateByDefault agreesToMarketing + bio } } `; @@ -14060,6 +15762,7 @@ export type EditUserMutationFn = Apollo.MutationFunction< * fargoRating: // value for 'fargoRating' * videosPrivateByDefault: // value for 'videosPrivateByDefault' * agreesToMarketing: // value for 'agreesToMarketing' + * bio: // value for 'bio' * }, * }); */ @@ -14658,6 +16361,80 @@ export type GetVideoSocialDetailsByIdQueryResult = Apollo.QueryResult< GetVideoSocialDetailsByIdQuery, GetVideoSocialDetailsByIdQueryVariables >; +export const GetVideoCardDocument = gql` + query GetVideoCard($videoId: Int!) { + getVideo(videoId: $videoId) { + ...VideoCardFields + } + } + ${VideoCardFieldsFragmentDoc} +`; + +/** + * __useGetVideoCardQuery__ + * + * To run a query within a React component, call `useGetVideoCardQuery` and pass it any options that fit your needs. + * When your component renders, `useGetVideoCardQuery` 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 } = useGetVideoCardQuery({ + * variables: { + * videoId: // value for 'videoId' + * }, + * }); + */ +export function useGetVideoCardQuery( + baseOptions: Apollo.QueryHookOptions< + GetVideoCardQuery, + GetVideoCardQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useQuery( + GetVideoCardDocument, + options, + ); +} +export function useGetVideoCardLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + GetVideoCardQuery, + GetVideoCardQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery( + GetVideoCardDocument, + options, + ); +} +export function useGetVideoCardSuspenseQuery( + baseOptions?: Apollo.SuspenseQueryHookOptions< + GetVideoCardQuery, + GetVideoCardQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useSuspenseQuery( + GetVideoCardDocument, + options, + ); +} +export type GetVideoCardQueryHookResult = ReturnType< + typeof useGetVideoCardQuery +>; +export type GetVideoCardLazyQueryHookResult = ReturnType< + typeof useGetVideoCardLazyQuery +>; +export type GetVideoCardSuspenseQueryHookResult = ReturnType< + typeof useGetVideoCardSuspenseQuery +>; +export type GetVideoCardQueryResult = Apollo.QueryResult< + GetVideoCardQuery, + GetVideoCardQueryVariables +>; export const GetVideosDocument = gql` query GetVideos($videoIds: [Int!]!) { getVideos(videoIds: $videoIds) { @@ -15472,6 +17249,254 @@ 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; +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; +export type DismissVideoExportMutationOptions = Apollo.BaseMutationOptions< + DismissVideoExportMutation, + DismissVideoExportMutationVariables +>; +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( + VideoExportJobDocument, + options, + ); +} +export function useVideoExportJobLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + VideoExportJobQuery, + VideoExportJobQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery( + 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( + MyVideoExportsDocument, + options, + ); +} +export function useMyVideoExportsLazyQuery( + baseOptions?: Apollo.LazyQueryHookOptions< + MyVideoExportsQuery, + MyVideoExportsQueryVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useLazyQuery( + 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! @@ -15632,6 +17657,13 @@ export const GetHlsInitUploadLinkDocument = gql` ... on TooManyInitUploadsErr { linksRequested } + ... on StorageLimitExceededErr { + reason + tierName + retainedStorageUsedBytes + retainedStorageLimitBytes + remainingStorageBytes + } } } } diff --git a/src/schema.gql b/src/schema.gql index 3af0c3a..931af76 100644 --- a/src/schema.gql +++ b/src/schema.gql @@ -31,6 +31,16 @@ type Query { limit: Int! = 50 requiredTags: [String!] = null ): RunLeaderboardGQL! + getDrillRunLeaderboard( + drillTag: String! + interval: TimeInterval = null + limit: Int! = 50 + tableSizeMin: Float = null + tableSizeMax: Float = null + pocketSizeMin: Float = null + pocketSizeMax: Float = null + ): DrillRunLeaderboardGQL! + getMyDrillRuns(drillTag: String!, limit: Int! = 50): [RunGQL!]! getMakesLeaderboard( interval: TimeInterval = null when: DateTime = null @@ -62,6 +72,12 @@ 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 @@ -104,7 +120,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 @@ -114,6 +133,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!]! } @@ -351,6 +372,7 @@ type UserGQL { activeVideoId: Int stripeCustomerId: String profileImageUri: String + bio: String createdAt: DateTime updatedAt: DateTime videosPrivateByDefault: Boolean @@ -524,6 +546,7 @@ type UploadStreamGQL { initPlaylistUploadStatus: InitPlaylistUploadStatusEnum lowestUnuploadedSegmentIndex: Int! uploadCompletionCursor: Int! + lastSegmentUploadedAt: DateTime errors: [StreamErrorGQL!]! createdAt: DateTime! updatedAt: DateTime! @@ -683,10 +706,18 @@ type PlayerSummaryGQL { makePercentage: Float! score: Int longestRun: Int! + runLengths: [Int!]! + spinTypeBreakdown: SpinTypeBreakdownGQL! averageDifficulty: Float averageTimeBetweenShots: Float } +type SpinTypeBreakdownGQL { + draw: Int! + center: Int! + follow: Int! +} + type DeployedConfigGQL { allowNewUsers: Boolean! firebase: Boolean! @@ -695,6 +726,8 @@ type DeployedConfigGQL { minimumAllowedAppVersion: String! subscriptionGatingEnabled: Boolean! quotaEnforcementEnabled: Boolean! + storageLimitEnforcementEnabled: Boolean! + capabilityEnforcementEnabled: Boolean! bannerMessages: [BannerGQL!]! defaultAndroidRecordingFormat: StreamSegmentTypeEnum! bucketUrl: String! @@ -719,6 +752,7 @@ type VideoHistoryGQL { videos: [VideoGQL!]! pageInfo: PageInfoGQL! hasFollowing: Boolean! + followingCount: Int! } type PageInfoGQL { @@ -755,6 +789,13 @@ type RunLeaderboardGQL { entries: [RunGQL!]! } +type DrillRunLeaderboardGQL { + entries: [RunGQL!]! + youRun: RunGQL + youRank: Int + totalPlayers: Int! +} + type CountLeaderboardGQL { entries: [UserShotCountEntry!]! } @@ -839,6 +880,7 @@ enum NotificationTypeEnum { REACTION FOLLOW CHALLENGE_INVITE + EXPORT_READY } input NotificationFilters { @@ -998,6 +1040,76 @@ 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 @@ -1046,6 +1158,7 @@ type UserRelationship { type StripeSubscriptionOptionsGQL { products: [StripeProductGQL!]! trialPeriodDays: Int + appleIap: AppleIapSubscriptionOptionsGQL! } type StripeProductGQL { @@ -1066,6 +1179,12 @@ type StripePriceGQL { active: Boolean! } +type AppleIapSubscriptionOptionsGQL { + enabled: Boolean! + proMonthlyProductId: String + productIds: [String!]! +} + type UserSubscriptionStatusGQL { hasActiveSubscription: Boolean! entitlementSource: EntitlementSourceTypeEnum @@ -1083,6 +1202,7 @@ enum EntitlementSourceTypeEnum { ADMIN MANUAL STRIPE + APPLE ALPHA_LEGACY } @@ -1097,6 +1217,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! @@ -1121,6 +1252,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! } @@ -1156,6 +1308,36 @@ input GameTypeTagMetricsInput { includePrivate: IncludePrivateEnum! = MINE } +type VideoExportJobGQL { + id: Int! + videoId: Int! + mode: VideoExportModeEnum! + status: VideoExportStatusEnum! + videoName: String + videoThumbnailUri: String + 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). """ @@ -1247,6 +1429,9 @@ type Mutation { retireTags(tagIds: [Int!]!): Boolean! ensureStripeCustomerExists: UserGQL! deleteUser: Boolean! + syncAppleSubscription( + input: SyncAppleSubscriptionInputGQL! + ): SyncAppleSubscriptionResultGQL! createSubscription(priceId: String!): CreateSubscriptionResultGQL! createCustomerPortalSession: CreateCustomerPortalSessionResultGQL! cancelSubscription: UserSubscriptionStatusGQL! @@ -1263,6 +1448,8 @@ type Mutation { feedback: String = null metadata: CancellationFeedbackMetadataInput = null ): Boolean! + requestVideoExport(input: RequestVideoExportInput!): VideoExportJobGQL! + dismissVideoExport(jobId: Int!): Boolean! findPrerecordTableLayout(b64Image: String!, videoId: Int!): HomographyInfoGQL createUploadStream( videoMetadata: VideoMetadataInput! @@ -1436,6 +1623,27 @@ input EditUserInputGQL { fargoRating: Int = null videosPrivateByDefault: Boolean = null agreesToMarketing: Boolean = null + bio: String = null +} + +type SyncAppleSubscriptionResultGQL { + ok: Boolean! + errorCode: String + errorMessage: String + hasActiveSubscription: Boolean! + entitlementSource: EntitlementSourceTypeEnum + entitlementStartsAt: DateTime + entitlementEndsAt: DateTime + appleStatus: Int + originalTransactionId: String + latestTransactionId: String + productId: String + expiresAt: DateTime +} + +input SyncAppleSubscriptionInputGQL { + signedTransactionInfo: String! + signedRenewalInfo: String = null } type CreateSubscriptionResultGQL { @@ -1462,6 +1670,13 @@ input CancellationFeedbackMetadataInput { platform: String = null } +input RequestVideoExportInput { + videoId: Int! + mode: VideoExportModeEnum! + shotIds: [Int!] = null + runId: Int = null +} + type CreateUploadStreamReturn { videoId: Int! } @@ -1501,10 +1716,10 @@ type GetUploadLinkReturn { union UploadLinkGetUploadLinkErrors = UploadLink | GetUploadLinkErrors type GetUploadLinkErrors { - error: MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErr! + error: MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErrStorageLimitExceededErr! } -union MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErr = +union MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErrStorageLimitExceededErr = MustHaveSetForUploadLinkErr | SegmentAlreadyUploadedErr | ProcessingFailedErr @@ -1512,6 +1727,7 @@ union MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoI | TooManyProfileImageUploadsErr | InitUploadAlreadyCompletedErr | TooManyInitUploadsErr + | StorageLimitExceededErr type MustHaveSetForUploadLinkErr { resolution: Boolean @@ -1537,3 +1753,11 @@ type InitUploadAlreadyCompletedErr { type TooManyInitUploadsErr { linksRequested: Int! } + +type StorageLimitExceededErr { + reason: String! + tierName: String! + retainedStorageUsedBytes: BigInt! + retainedStorageLimitBytes: BigInt + remainingStorageBytes: BigInt +}