From 5c286f2bcfab726fe060415a42fe15dd485d8221 Mon Sep 17 00:00:00 2001 From: Loewy Date: Thu, 25 Jun 2026 15:47:58 -0700 Subject: [PATCH] Add storage status schema --- src/index.tsx | 17 +++++++++++++++++ src/schema.gql | 19 +++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index 8a08f9b..5abadca 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) */ @@ -2859,6 +2861,7 @@ export type Query = { getShots: Array; getShotsByIds: Array; getShotsWithMetadata: GetShotsResult; + getStorageStatus?: Maybe; getTableState: TableStateGql; getUser?: Maybe; getUserRelationshipsMatching: UserRelationshipsResult; @@ -3383,6 +3386,20 @@ export enum SpinTypeEnum { Unknown = "UNKNOWN", } +export type StorageStatusGql = { + __typename?: "StorageStatusGQL"; + isNearLimit: Scalars["Boolean"]["output"]; + isOverLimit: Scalars["Boolean"]["output"]; + isUnlimited: Scalars["Boolean"]["output"]; + policyConfigured: Scalars["Boolean"]["output"]; + remainingStorageBytes?: Maybe; + retainedStorageLimitBytes?: Maybe; + retainedStorageUsedBytes: Scalars["BigInt"]["output"]; + storageUsageRatio?: Maybe; + tierName: Scalars["String"]["output"]; + userId: Scalars["Int"]["output"]; +}; + export type StreamErrorGql = { __typename?: "StreamErrorGQL"; message: Scalars["String"]["output"]; diff --git a/src/schema.gql b/src/schema.gql index 5df929c..447c740 100644 --- a/src/schema.gql +++ b/src/schema.gql @@ -111,6 +111,7 @@ type Query { getResolvedTier: ResolvedTierGQL! getAppleAppAccountToken: String! getQuotaStatus: QuotaStatusGQL! + getStorageStatus: StorageStatusGQL getPlayTime(userId: Int!, filters: VideoFilterInput = null): UserPlayTimeGQL! getUserVideos( userId: Int = null @@ -1107,6 +1108,24 @@ 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! +} + +""" +Integer value that can exceed GraphQL Int's 32-bit range. +""" +scalar BigInt + type UserPlayTimeGQL { totalSeconds: Float! } -- 2.49.1