Compare commits

..

32 Commits

Author SHA1 Message Date
4f661d3c55 Add storage status query
All checks were successful
Tests / Tests (pull_request) Successful in 11s
2026-06-26 09:29:40 -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
Dean Wenstrand
79979b001a Add bio field to user (UserFragment + editUser)
All checks were successful
Tests / Tests (pull_request) Successful in 10s
Expose UserGQL.bio in UserFragment and let editUser set it; regenerated
codegen. Rebased onto current master.
2026-06-19 14:14:24 -07:00
49fbebd0c2 Merge pull request 'Fix duplicate Apple IAP selection' (#263) from loewy/fix-duplicate-apple-iap-selection into master
Reviewed-on: #263
2026-06-18 21:39:20 +00:00
9219451c8d Fix duplicate Apple IAP selection
All checks were successful
Tests / Tests (pull_request) Successful in 11s
2026-06-18 14:32:37 -07:00
42601f9587 Merge pull request 'Add Apple subscription mobile operations' (#255) from apple-iap-pr4-mobile-ops into master
Reviewed-on: #255
2026-06-18 20:03:10 +00:00
acfb750265 Merge pull request 'Add Apple IAP product IDs to subscription options' (#262) from loewy/apple-iap-product-options into master
Reviewed-on: #262
2026-06-18 01:59:53 +00:00
ffa96a24c3 Add Apple subscription mobile operations
All checks were successful
Tests / Tests (pull_request) Successful in 9s
2026-06-17 18:39:36 -07:00
5b73dd3a83 Add Apple IAP product IDs to subscription options
All checks were successful
Tests / Tests (pull_request) Successful in 10s
2026-06-17 18:22:47 -07:00
d1bc29b41b Add Apple IAP product config to subscription options
All checks were successful
Tests / Tests (pull_request) Successful in 11s
2026-06-16 18:31:36 -07:00
853769e183 Add Apple subscription mobile operations 2026-06-16 18:31:36 -07:00
84524d165d Merge pull request 'Add followingCount to GetVideoFeed payload' (#261) from dean/feed-following-count into master
Reviewed-on: #261
2026-06-16 23:51:38 +00:00
Dean Wenstrand
f4c5fcedd6 Add followingCount to GetVideoFeed payload
All checks were successful
Tests / Tests (pull_request) Successful in 9s
Surfaces how many leading feed videos come from followed users so the
client can place the 'Trending' section divider in the blended home feed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-16 16:46:21 -07:00
07ca121a3e Merge pull request 'Add spinTypeBreakdown (draw/center/follow) to PlayerSummaryFields' (#259) from dean/player-spin-types into master
Reviewed-on: #259
2026-06-16 22:24:19 +00:00
5293576947 Merge pull request 'Add runLengths to PlayerSummaryFields (per-player run distribution)' (#258) from dean/player-run-lengths into master
Reviewed-on: #258
2026-06-16 20:57:00 +00:00
655209e1c6 Merge pull request 'Add Apple IAP subscription options schema' (#256) from loewy/apple-iap-product-config into master
Reviewed-on: #256
2026-06-16 18:10:00 +00:00
c9576cf405 Add Apple IAP subscription options schema
All checks were successful
Tests / Tests (pull_request) Successful in 11s
2026-06-16 10:47:07 -07:00
0c0cd7a7bb Merge pull request 'dean/my-drill-runs' (#257) from dean/my-drill-runs into master
Reviewed-on: #257
2026-06-16 04:25:03 +00:00
48b647636e Merge pull request 'Add GetDrillRunLeaderboard query + generated types' (#254) from dean/drill-run-leaderboard into master
Reviewed-on: #254
2026-06-16 00:52:05 +00:00
079e4e8719 Merge pull request 'Add Apple subscription sync schema' (#253) from apple-iap-pr2-backend-schema into master
Reviewed-on: #253
2026-06-12 04:50:36 +00:00
6 changed files with 442 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) */
@@ -83,6 +85,7 @@ export type AppleIapSubscriptionOptionsGql = {
__typename?: "AppleIapSubscriptionOptionsGQL";
enabled: Scalars["Boolean"]["output"];
proMonthlyProductId?: Maybe<Scalars["String"]["output"]>;
productIds: Array<Scalars["String"]["output"]>;
};
export type BankFeaturesGql = {
@@ -326,6 +329,7 @@ export type EditShotReturn = {
export type EditUserInputGql = {
agreesToMarketing?: InputMaybe<Scalars["Boolean"]["input"]>;
bio?: InputMaybe<Scalars["String"]["input"]>;
fargoRating?: InputMaybe<Scalars["Int"]["input"]>;
username?: InputMaybe<Scalars["String"]["input"]>;
videosPrivateByDefault?: InputMaybe<Scalars["Boolean"]["input"]>;
@@ -2851,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;
@@ -3156,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"];
@@ -3368,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"];
@@ -3539,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;
@@ -3555,6 +3588,7 @@ export type UserGql = {
__typename?: "UserGQL";
activeVideoId?: Maybe<Scalars["Int"]["output"]>;
agreesToMarketing?: Maybe<Scalars["Boolean"]["output"]>;
bio?: Maybe<Scalars["String"]["output"]>;
createdAt?: Maybe<Scalars["DateTime"]["output"]>;
fargoRating?: Maybe<Scalars["Int"]["output"]>;
firebaseUid?: Maybe<Scalars["String"]["output"]>;
@@ -3679,6 +3713,7 @@ export type VideoGql = {
export type VideoHistoryGql = {
__typename?: "VideoHistoryGQL";
followingCount: Scalars["Int"]["output"];
hasFollowing: Scalars["Boolean"]["output"];
pageInfo: PageInfoGql;
videos: Array<VideoGql>;
@@ -4279,6 +4314,8 @@ export type GetFeedQuery = {
id: string;
lastIntendedSegmentBound?: number | null;
streamSegmentType: StreamSegmentTypeEnum;
isCompleted: boolean;
lastSegmentUploadedAt?: any | null;
} | null;
tags: Array<{
__typename?: "VideoTag";
@@ -4390,6 +4427,8 @@ export type VideoCardFieldsFragment = {
id: string;
lastIntendedSegmentBound?: number | null;
streamSegmentType: StreamSegmentTypeEnum;
isCompleted: boolean;
lastSegmentUploadedAt?: any | null;
} | null;
tags: Array<{
__typename?: "VideoTag";
@@ -4508,6 +4547,7 @@ export type GetVideoFeedQuery = {
getFeedVideos: {
__typename?: "VideoHistoryGQL";
hasFollowing: boolean;
followingCount: number;
videos: Array<{
__typename?: "VideoGQL";
id: number;
@@ -4533,6 +4573,8 @@ export type GetVideoFeedQuery = {
id: string;
lastIntendedSegmentBound?: number | null;
streamSegmentType: StreamSegmentTypeEnum;
isCompleted: boolean;
lastSegmentUploadedAt?: any | null;
} | null;
tags: Array<{
__typename?: "VideoTag";
@@ -4688,6 +4730,7 @@ export type GetDrillRunLeaderboardQuery = {
__typename?: "VideoGQL";
tableSize: number;
pocketSize?: number | null;
createdAt?: any | null;
};
user: {
__typename?: "UserGQL";
@@ -5055,6 +5098,12 @@ export type GetAvailableSubscriptionOptionsQuery = {
active: boolean;
}>;
}>;
appleIap: {
__typename?: "AppleIapSubscriptionOptionsGQL";
enabled: boolean;
proMonthlyProductId?: string | null;
productIds: Array<string>;
};
};
};
@@ -5067,6 +5116,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;
@@ -5076,6 +5128,57 @@ 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;
}>;
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;
}>;
@@ -5085,6 +5188,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;
@@ -5892,6 +5998,7 @@ export type EditProfileImageUriMutation = {
username: string;
isAdmin?: boolean | null;
profileImageUri?: string | null;
bio?: string | null;
fargoRating?: number | null;
activeVideoId?: number | null;
createdAt?: any | null;
@@ -5912,6 +6019,7 @@ export type GetLoggedInUserQuery = {
username: string;
isAdmin?: boolean | null;
profileImageUri?: string | null;
bio?: string | null;
fargoRating?: number | null;
activeVideoId?: number | null;
createdAt?: any | null;
@@ -5934,6 +6042,7 @@ export type GetUserQuery = {
username: string;
isAdmin?: boolean | null;
profileImageUri?: string | null;
bio?: string | null;
fargoRating?: number | null;
activeVideoId?: number | null;
createdAt?: any | null;
@@ -6123,6 +6232,7 @@ export type EditUserMutationVariables = Exact<{
fargoRating?: InputMaybe<Scalars["Int"]["input"]>;
videosPrivateByDefault?: InputMaybe<Scalars["Boolean"]["input"]>;
agreesToMarketing?: InputMaybe<Scalars["Boolean"]["input"]>;
bio?: InputMaybe<Scalars["String"]["input"]>;
}>;
export type EditUserMutation = {
@@ -6136,6 +6246,7 @@ export type EditUserMutation = {
updatedAt?: any | null;
videosPrivateByDefault?: boolean | null;
agreesToMarketing?: boolean | null;
bio?: string | null;
};
};
@@ -6153,6 +6264,7 @@ export type UserFragmentFragment = {
username: string;
isAdmin?: boolean | null;
profileImageUri?: string | null;
bio?: string | null;
fargoRating?: number | null;
activeVideoId?: number | null;
createdAt?: any | null;
@@ -6176,6 +6288,7 @@ export type GetUsersMatchingQuery = {
username: string;
isAdmin?: boolean | null;
profileImageUri?: string | null;
bio?: string | null;
fargoRating?: number | null;
activeVideoId?: number | null;
createdAt?: any | null;
@@ -6441,6 +6554,8 @@ export type GetVideoCardQuery = {
id: string;
lastIntendedSegmentBound?: number | null;
streamSegmentType: StreamSegmentTypeEnum;
isCompleted: boolean;
lastSegmentUploadedAt?: any | null;
} | null;
tags: Array<{
__typename?: "VideoTag";
@@ -7154,6 +7269,8 @@ export const VideoCardFieldsFragmentDoc = gql`
id
lastIntendedSegmentBound
streamSegmentType
isCompleted
lastSegmentUploadedAt
}
tableSize
pocketSize
@@ -7355,6 +7472,7 @@ export const UserFragmentFragmentDoc = gql`
username
isAdmin
profileImageUri
bio
fargoRating
activeVideoId
createdAt
@@ -9478,6 +9596,7 @@ export const GetVideoFeedDocument = gql`
endCursor
}
hasFollowing
followingCount
}
}
${VideoCardFieldsFragmentDoc}
@@ -9748,6 +9867,7 @@ export const GetDrillRunLeaderboardDocument = gql`
video {
tableSize
pocketSize
createdAt
}
user {
id
@@ -10658,6 +10778,11 @@ export const GetAvailableSubscriptionOptionsDocument = gql`
active
}
}
appleIap {
enabled
proMonthlyProductId
productIds
}
}
}
`;
@@ -10730,6 +10855,9 @@ export const GetSubscriptionStatusDocument = gql`
query GetSubscriptionStatus {
getUserSubscriptionStatus {
hasActiveSubscription
entitlementSource
entitlementStartsAt
entitlementEndsAt
subscriptionStatus
currentPeriodStart
currentPeriodEnd
@@ -10804,10 +10932,227 @@ 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
}
`;
/**
* __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<SyncAppleSubscriptionMutation>;
export type SyncAppleSubscriptionMutationOptions = Apollo.BaseMutationOptions<
SyncAppleSubscriptionMutation,
SyncAppleSubscriptionMutationVariables
>;
export const CancelSubscriptionDocument = gql`
mutation CancelSubscription {
cancelSubscription {
hasActiveSubscription
entitlementSource
entitlementStartsAt
entitlementEndsAt
subscriptionStatus
currentPeriodStart
currentPeriodEnd
@@ -13212,6 +13557,7 @@ export const EditUserDocument = gql`
$fargoRating: Int
$videosPrivateByDefault: Boolean
$agreesToMarketing: Boolean
$bio: String
) {
editUser(
input: {
@@ -13219,6 +13565,7 @@ export const EditUserDocument = gql`
fargoRating: $fargoRating
videosPrivateByDefault: $videosPrivateByDefault
agreesToMarketing: $agreesToMarketing
bio: $bio
}
) {
id
@@ -13228,6 +13575,7 @@ export const EditUserDocument = gql`
updatedAt
videosPrivateByDefault
agreesToMarketing
bio
}
}
`;
@@ -13253,6 +13601,7 @@ export type EditUserMutationFn = Apollo.MutationFunction<
* fargoRating: // value for 'fargoRating'
* videosPrivateByDefault: // value for 'videosPrivateByDefault'
* agreesToMarketing: // value for 'agreesToMarketing'
* bio: // value for 'bio'
* },
* });
*/

View File

@@ -42,6 +42,8 @@ fragment VideoCardFields on VideoGQL {
id
lastIntendedSegmentBound
streamSegmentType
isCompleted
lastSegmentUploadedAt
}
tableSize
pocketSize
@@ -146,5 +148,6 @@ query GetVideoFeed(
endCursor
}
hasFollowing
followingCount
}
}

View File

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

View File

@@ -44,12 +44,20 @@ query GetAvailableSubscriptionOptions {
active
}
}
appleIap {
enabled
proMonthlyProductId
productIds
}
}
}
query GetSubscriptionStatus {
getUserSubscriptionStatus {
hasActiveSubscription
entitlementSource
entitlementStartsAt
entitlementEndsAt
subscriptionStatus
currentPeriodStart
currentPeriodEnd
@@ -59,9 +67,50 @@ query GetSubscriptionStatus {
}
}
query GetStorageStatus {
getStorageStatus {
userId
tierName
retainedStorageUsedBytes
retainedStorageLimitBytes
isUnlimited
policyConfigured
remainingStorageBytes
storageUsageRatio
isNearLimit
isOverLimit
}
}
query GetAppleAppAccountToken {
getAppleAppAccountToken
}
mutation SyncAppleSubscription($signedTransactionInfo: String!) {
syncAppleSubscription(
input: { signedTransactionInfo: $signedTransactionInfo }
) {
ok
errorCode
errorMessage
hasActiveSubscription
entitlementSource
entitlementStartsAt
entitlementEndsAt
appleStatus
originalTransactionId
latestTransactionId
productId
expiresAt
}
}
mutation CancelSubscription {
cancelSubscription {
hasActiveSubscription
entitlementSource
entitlementStartsAt
entitlementEndsAt
subscriptionStatus
currentPeriodStart
currentPeriodEnd

View File

@@ -177,6 +177,7 @@ mutation editUser(
$fargoRating: Int
$videosPrivateByDefault: Boolean
$agreesToMarketing: Boolean
$bio: String
) {
editUser(
input: {
@@ -184,6 +185,7 @@ mutation editUser(
fargoRating: $fargoRating
videosPrivateByDefault: $videosPrivateByDefault
agreesToMarketing: $agreesToMarketing
bio: $bio
}
) {
id
@@ -193,6 +195,7 @@ mutation editUser(
updatedAt
videosPrivateByDefault
agreesToMarketing
bio
}
}
@@ -206,6 +209,7 @@ fragment UserFragment on UserGQL {
username
isAdmin
profileImageUri
bio
fargoRating
activeVideoId
createdAt

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
@@ -356,6 +358,7 @@ type UserGQL {
activeVideoId: Int
stripeCustomerId: String
profileImageUri: String
bio: String
createdAt: DateTime
updatedAt: DateTime
videosPrivateByDefault: Boolean
@@ -529,6 +532,7 @@ type UploadStreamGQL {
initPlaylistUploadStatus: InitPlaylistUploadStatusEnum
lowestUnuploadedSegmentIndex: Int!
uploadCompletionCursor: Int!
lastSegmentUploadedAt: DateTime
errors: [StreamErrorGQL!]!
createdAt: DateTime!
updatedAt: DateTime!
@@ -732,6 +736,7 @@ type VideoHistoryGQL {
videos: [VideoGQL!]!
pageInfo: PageInfoGQL!
hasFollowing: Boolean!
followingCount: Int!
}
type PageInfoGQL {
@@ -1033,6 +1038,7 @@ type StripePriceGQL {
type AppleIapSubscriptionOptionsGQL {
enabled: Boolean!
proMonthlyProductId: String
productIds: [String!]!
}
type UserSubscriptionStatusGQL {
@@ -1067,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!
@@ -1091,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!
}
@@ -1362,6 +1397,7 @@ input EditUserInputGQL {
fargoRating: Int = null
videosPrivateByDefault: Boolean = null
agreesToMarketing: Boolean = null
bio: String = null
}
type SyncAppleSubscriptionResultGQL {