From cd6a33bfed4edf38215b88079037484b540f37cb Mon Sep 17 00:00:00 2001 From: Loewy Date: Tue, 3 Feb 2026 16:30:56 -0800 Subject: [PATCH 1/2] getQuotaStatus, expectedDurationSeconds in createUploadStream --- src/index.tsx | 14 ++++++++++++++ src/schema.gql | 13 +++++++++++++ 2 files changed, 27 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index f6257a5..16946a7 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -2432,6 +2432,7 @@ export type MutationCreateSubscriptionArgs = { }; export type MutationCreateUploadStreamArgs = { + expectedDurationSeconds?: InputMaybe; videoMetadata: VideoMetadataInput; }; @@ -2716,6 +2717,7 @@ export type Query = { getMedals: RequestedMedalsGql; getOrderedShots: GetShotsResult; getPlayTime: UserPlayTimeGql; + getQuotaStatus: QuotaStatusGql; getRuns: GetRunsResult; getShotAnnotationTypes: Array; getShots: Array; @@ -2905,6 +2907,18 @@ export type QueryWaitForArgs = { duration: Scalars["Float"]["input"]; }; +export type QuotaStatusGql = { + __typename?: "QuotaStatusGQL"; + canUpload: Scalars["Boolean"]["output"]; + durationLimitSeconds?: Maybe; + durationRemainingSeconds?: Maybe; + durationUsedSeconds: Scalars["Float"]["output"]; + maxVideoDurationSeconds?: Maybe; + periodEnd: Scalars["DateTime"]["output"]; + periodStart: Scalars["DateTime"]["output"]; + tierName: Scalars["String"]["output"]; +}; + export enum ReactionEnum { Bullseye = "BULLSEYE", Heart = "HEART", diff --git a/src/schema.gql b/src/schema.gql index c8bbf17..e6bf3aa 100644 --- a/src/schema.gql +++ b/src/schema.gql @@ -97,6 +97,7 @@ type Query { ): UserRelationshipsResult! getAvailableSubscriptionOptions: StripeSubscriptionOptionsGQL! getUserSubscriptionStatus: UserSubscriptionStatusGQL! + getQuotaStatus: QuotaStatusGQL! getPlayTime(userId: Int!, filters: VideoFilterInput = null): UserPlayTimeGQL! getUserVideos( userId: Int = null @@ -979,6 +980,17 @@ enum StripeSubscriptionStatusEnum { PAUSED } +type QuotaStatusGQL { + tierName: String! + periodStart: DateTime! + periodEnd: DateTime! + durationUsedSeconds: Float! + durationLimitSeconds: Int + maxVideoDurationSeconds: Int + durationRemainingSeconds: Float + canUpload: Boolean! +} + type UserPlayTimeGQL { totalSeconds: Float! } @@ -1084,6 +1096,7 @@ type Mutation { findPrerecordTableLayout(b64Image: String!, videoId: Int!): HomographyInfoGQL createUploadStream( videoMetadata: VideoMetadataInput! + expectedDurationSeconds: Float = null ): CreateUploadStreamReturn! getUploadLink(videoId: Int!, segmentIndex: Int!): GetUploadLinkReturn! getHlsInitUploadLink(videoId: Int!): GetUploadLinkReturn! From 6ab5286a497785ae28bc19b66f6a025013d13c16 Mon Sep 17 00:00:00 2001 From: Loewy Date: Tue, 17 Mar 2026 17:22:19 -0700 Subject: [PATCH 2/2] add expected durations to operation --- src/index.tsx | 12 ++++++++++-- src/operations/video_upload.gql | 10 ++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 16946a7..e5e8fb8 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -6249,6 +6249,7 @@ export type HomographyInfoFragment = { export type CreateUploadStreamMutationVariables = Exact<{ videoMetadataInput: VideoMetadataInput; + expectedDurationSeconds?: InputMaybe; }>; export type CreateUploadStreamMutation = { @@ -13215,8 +13216,14 @@ export type FindPrerecordTableLayoutMutationOptions = FindPrerecordTableLayoutMutationVariables >; export const CreateUploadStreamDocument = gql` - mutation CreateUploadStream($videoMetadataInput: VideoMetadataInput!) { - createUploadStream(videoMetadata: $videoMetadataInput) { + mutation CreateUploadStream( + $videoMetadataInput: VideoMetadataInput! + $expectedDurationSeconds: Float = null + ) { + createUploadStream( + videoMetadata: $videoMetadataInput + expectedDurationSeconds: $expectedDurationSeconds + ) { videoId } } @@ -13240,6 +13247,7 @@ export type CreateUploadStreamMutationFn = Apollo.MutationFunction< * const [createUploadStreamMutation, { data, loading, error }] = useCreateUploadStreamMutation({ * variables: { * videoMetadataInput: // value for 'videoMetadataInput' + * expectedDurationSeconds: // value for 'expectedDurationSeconds' * }, * }); */ diff --git a/src/operations/video_upload.gql b/src/operations/video_upload.gql index 6c14bf0..18baff0 100644 --- a/src/operations/video_upload.gql +++ b/src/operations/video_upload.gql @@ -1,5 +1,11 @@ -mutation CreateUploadStream($videoMetadataInput: VideoMetadataInput!) { - createUploadStream(videoMetadata: $videoMetadataInput) { +mutation CreateUploadStream( + $videoMetadataInput: VideoMetadataInput! + $expectedDurationSeconds: Float = null +) { + createUploadStream( + videoMetadata: $videoMetadataInput + expectedDurationSeconds: $expectedDurationSeconds + ) { videoId } }