Compare commits

..

14 Commits

Author SHA1 Message Date
42530ca3c1 Add storage status query 2026-06-26 09:04:50 -07:00
bc52145a9e Merge pull request 'Add storage status schema' (#270) from pr8-storage-status into master
Reviewed-on: #270
2026-06-26 15:33:19 +00:00
5c286f2bcf Add storage status schema
All checks were successful
Tests / Tests (pull_request) Successful in 24s
2026-06-25 17:34:19 -07:00
d636c298f8 Merge pull request 'Add resolved tier capabilities schema' (#269) from tier-capabilities-schema into master
Reviewed-on: #269
2026-06-24 03:37:17 +00:00
681320c62d Add resolved tier capabilities schema
All checks were successful
Tests / Tests (pull_request) Successful in 15s
2026-06-23 15:51:21 -07:00
49f409f60b Merge pull request 'Add resolved tier schema' (#268) from resolved-tier-contract into master
Reviewed-on: #268
2026-06-23 22:10:10 +00:00
e7fc6c147d Add resolved tier schema
All checks were successful
Tests / Tests (pull_request) Successful in 11s
2026-06-23 14:01:32 -07:00
10c3f6de53 Merge pull request 'Add drill leaderboard run dates to gql' (#267) from dean/add-dates-to-leaderboards-gql into master
Reviewed-on: #267
2026-06-23 15:51:28 +00:00
Dean Wenstrand
d7b1aaee13 Add drill leaderboard run dates to gql
All checks were successful
Tests / Tests (pull_request) Successful in 25s
2026-06-23 08:47:08 -07:00
b477590137 Merge pull request 'VideoCardFields: fetch stream isCompleted + lastSegmentUploadedAt' (#266) from dean/feed-upload-status-fields into master
Reviewed-on: #266
2026-06-20 22:45:07 +00:00
Dean Wenstrand
d428a8caa2 VideoCardFields: fetch stream isCompleted + lastSegmentUploadedAt
All checks were successful
Tests / Tests (pull_request) Successful in 10s
Lets the feed derive upload state (uploading vs paused vs processing) per card.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20 15:16:11 -07:00
48207e12ee Merge pull request 'Add lastSegmentUploadedAt to UploadStreamGQL' (#265) from dean/last-uploaded-chunk into master
Reviewed-on: #265
2026-06-20 21:45:32 +00:00
Dean Wenstrand
1d403f8155 Add lastSegmentUploadedAt to UploadStreamGQL
All checks were successful
Tests / Tests (pull_request) Successful in 10s
Surfaces the timestamp of the most recently uploaded chunk so clients can tell
an actively-uploading stream from a partially-uploaded, stalled/paused one
(combined with isCompleted).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20 14:40:40 -07:00
6758f3e77a Merge pull request 'Add bio field to user (UserFragment + editUser)' (#264) from dean/profile-bio into master
Reviewed-on: #264
2026-06-19 21:27:52 +00:00
5 changed files with 193 additions and 0 deletions

View File

@@ -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) */
@@ -2853,11 +2855,13 @@ export type Query = {
getOrderedShots: GetShotsResult;
getPlayTime: UserPlayTimeGql;
getQuotaStatus: QuotaStatusGql;
getResolvedTier: ResolvedTierGql;
getRuns: GetRunsResult;
getShotAnnotationTypes: Array<ShotAnnotationTypeGql>;
getShots: Array<ShotGql>;
getShotsByIds: Array<ShotGql>;
getShotsWithMetadata: GetShotsResult;
getStorageStatus?: Maybe<StorageStatusGql>;
getTableState: TableStateGql;
getUser?: Maybe<UserGql>;
getUserRelationshipsMatching: UserRelationshipsResult;
@@ -3158,6 +3162,18 @@ export type RequestedMedalsGql = {
totalMakes10000?: Maybe<MedalGql>;
};
export type ResolvedTierGql = {
__typename?: "ResolvedTierGQL";
capabilities: Array<Scalars["String"]["output"]>;
entitlementEndsAt?: Maybe<Scalars["DateTime"]["output"]>;
entitlementSource?: Maybe<EntitlementSourceTypeEnum>;
entitlementStartsAt?: Maybe<Scalars["DateTime"]["output"]>;
entitlementStatus?: Maybe<Scalars["String"]["output"]>;
hasActiveSubscription: Scalars["Boolean"]["output"];
tierDisplayName: Scalars["String"]["output"];
tierName: Scalars["String"]["output"];
};
export type RuleSet = {
__typename?: "RuleSet";
createdAt: Scalars["DateTime"]["output"];
@@ -3370,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<Scalars["BigInt"]["output"]>;
retainedStorageLimitBytes?: Maybe<Scalars["BigInt"]["output"]>;
retainedStorageUsedBytes: Scalars["BigInt"]["output"];
storageUsageRatio?: Maybe<Scalars["Float"]["output"]>;
tierName: Scalars["String"]["output"];
userId: Scalars["Int"]["output"];
};
export type StreamErrorGql = {
__typename?: "StreamErrorGQL";
message: Scalars["String"]["output"];
@@ -3541,6 +3571,7 @@ export type UploadStreamGql = {
initPlaylistUploadStatus?: Maybe<InitPlaylistUploadStatusEnum>;
isCompleted: Scalars["Boolean"]["output"];
lastIntendedSegmentBound?: Maybe<Scalars["Int"]["output"]>;
lastSegmentUploadedAt?: Maybe<Scalars["DateTime"]["output"]>;
linksRequested: Scalars["Int"]["output"];
lowestUnuploadedSegmentIndex: Scalars["Int"]["output"];
resolution: VideoResolutionGql;
@@ -4283,6 +4314,8 @@ export type GetFeedQuery = {
id: string;
lastIntendedSegmentBound?: number | null;
streamSegmentType: StreamSegmentTypeEnum;
isCompleted: boolean;
lastSegmentUploadedAt?: any | null;
} | null;
tags: Array<{
__typename?: "VideoTag";
@@ -4394,6 +4427,8 @@ export type VideoCardFieldsFragment = {
id: string;
lastIntendedSegmentBound?: number | null;
streamSegmentType: StreamSegmentTypeEnum;
isCompleted: boolean;
lastSegmentUploadedAt?: any | null;
} | null;
tags: Array<{
__typename?: "VideoTag";
@@ -4538,6 +4573,8 @@ export type GetVideoFeedQuery = {
id: string;
lastIntendedSegmentBound?: number | null;
streamSegmentType: StreamSegmentTypeEnum;
isCompleted: boolean;
lastSegmentUploadedAt?: any | null;
} | null;
tags: Array<{
__typename?: "VideoTag";
@@ -4693,6 +4730,7 @@ export type GetDrillRunLeaderboardQuery = {
__typename?: "VideoGQL";
tableSize: number;
pocketSize?: number | null;
createdAt?: any | null;
};
user: {
__typename?: "UserGQL";
@@ -5090,6 +5128,25 @@ export type GetSubscriptionStatusQuery = {
};
};
export type GetStorageStatusQueryVariables = Exact<{ [key: string]: never }>;
export type GetStorageStatusQuery = {
__typename?: "Query";
getStorageStatus?: {
__typename?: "StorageStatusGQL";
userId: number;
tierName: string;
retainedStorageUsedBytes: any;
retainedStorageLimitBytes?: any | null;
isUnlimited: boolean;
policyConfigured: boolean;
remainingStorageBytes?: any | null;
storageUsageRatio?: number | null;
isNearLimit: boolean;
isOverLimit: boolean;
} | null;
};
export type GetAppleAppAccountTokenQueryVariables = Exact<{
[key: string]: never;
}>;
@@ -6497,6 +6554,8 @@ export type GetVideoCardQuery = {
id: string;
lastIntendedSegmentBound?: number | null;
streamSegmentType: StreamSegmentTypeEnum;
isCompleted: boolean;
lastSegmentUploadedAt?: any | null;
} | null;
tags: Array<{
__typename?: "VideoTag";
@@ -7210,6 +7269,8 @@ export const VideoCardFieldsFragmentDoc = gql`
id
lastIntendedSegmentBound
streamSegmentType
isCompleted
lastSegmentUploadedAt
}
tableSize
pocketSize
@@ -9806,6 +9867,7 @@ export const GetDrillRunLeaderboardDocument = gql`
video {
tableSize
pocketSize
createdAt
}
user {
id
@@ -10870,6 +10932,87 @@ export type GetSubscriptionStatusQueryResult = Apollo.QueryResult<
GetSubscriptionStatusQuery,
GetSubscriptionStatusQueryVariables
>;
export const GetStorageStatusDocument = gql`
query GetStorageStatus {
getStorageStatus {
userId
tierName
retainedStorageUsedBytes
retainedStorageLimitBytes
isUnlimited
policyConfigured
remainingStorageBytes
storageUsageRatio
isNearLimit
isOverLimit
}
}
`;
/**
* __useGetStorageStatusQuery__
*
* To run a query within a React component, call `useGetStorageStatusQuery` and pass it any options that fit your needs.
* When your component renders, `useGetStorageStatusQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
* const { data, loading, error } = useGetStorageStatusQuery({
* variables: {
* },
* });
*/
export function useGetStorageStatusQuery(
baseOptions?: Apollo.QueryHookOptions<
GetStorageStatusQuery,
GetStorageStatusQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useQuery<GetStorageStatusQuery, GetStorageStatusQueryVariables>(
GetStorageStatusDocument,
options,
);
}
export function useGetStorageStatusLazyQuery(
baseOptions?: Apollo.LazyQueryHookOptions<
GetStorageStatusQuery,
GetStorageStatusQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useLazyQuery<
GetStorageStatusQuery,
GetStorageStatusQueryVariables
>(GetStorageStatusDocument, options);
}
export function useGetStorageStatusSuspenseQuery(
baseOptions?: Apollo.SuspenseQueryHookOptions<
GetStorageStatusQuery,
GetStorageStatusQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useSuspenseQuery<
GetStorageStatusQuery,
GetStorageStatusQueryVariables
>(GetStorageStatusDocument, options);
}
export type GetStorageStatusQueryHookResult = ReturnType<
typeof useGetStorageStatusQuery
>;
export type GetStorageStatusLazyQueryHookResult = ReturnType<
typeof useGetStorageStatusLazyQuery
>;
export type GetStorageStatusSuspenseQueryHookResult = ReturnType<
typeof useGetStorageStatusSuspenseQuery
>;
export type GetStorageStatusQueryResult = Apollo.QueryResult<
GetStorageStatusQuery,
GetStorageStatusQueryVariables
>;
export const GetAppleAppAccountTokenDocument = gql`
query GetAppleAppAccountToken {
getAppleAppAccountToken

View File

@@ -42,6 +42,8 @@ fragment VideoCardFields on VideoGQL {
id
lastIntendedSegmentBound
streamSegmentType
isCompleted
lastSegmentUploadedAt
}
tableSize
pocketSize

View File

@@ -56,6 +56,7 @@ query GetDrillRunLeaderboard(
video {
tableSize
pocketSize
createdAt
}
user {
id

View File

@@ -67,6 +67,21 @@ query GetSubscriptionStatus {
}
}
query GetStorageStatus {
getStorageStatus {
userId
tierName
retainedStorageUsedBytes
retainedStorageLimitBytes
isUnlimited
policyConfigured
remainingStorageBytes
storageUsageRatio
isNearLimit
isOverLimit
}
}
query GetAppleAppAccountToken {
getAppleAppAccountToken
}

View File

@@ -108,8 +108,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
@@ -530,6 +532,7 @@ type UploadStreamGQL {
initPlaylistUploadStatus: InitPlaylistUploadStatusEnum
lowestUnuploadedSegmentIndex: Int!
uploadCompletionCursor: Int!
lastSegmentUploadedAt: DateTime
errors: [StreamErrorGQL!]!
createdAt: DateTime!
updatedAt: DateTime!
@@ -1070,6 +1073,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!
@@ -1094,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!
}