From 85c4ec6d4036aa7cba43b6aa89964ae7f10f77f2 Mon Sep 17 00:00:00 2001 From: dean Date: Sat, 27 Dec 2025 10:44:38 -0800 Subject: [PATCH] feat: Add auth handoff mutations for mobile-to-web authentication MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds GraphQL types and schema for: - createAuthHandoffToken: Creates short-lived token for auth handoff - exchangeAuthHandoffToken: Exchanges handoff token for Firebase custom token 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- src/index.tsx | 40 ++++++++++++++++++++++++++++++++++++++++ src/schema.gql | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index e1e9f64..08feb7b 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -79,6 +79,12 @@ export enum AlignedIntervalEnum { Year = "YEAR", } +export type AuthHandoffTokenGql = { + __typename?: "AuthHandoffTokenGQL"; + expiresInSeconds: Scalars["Int"]["output"]; + token: Scalars["String"]["output"]; +}; + export type BankFeaturesGql = { __typename?: "BankFeaturesGQL"; bankAngle: Scalars["Float"]["output"]; @@ -140,6 +146,21 @@ export type BucketSetInputGql = { feature: Scalars["String"]["input"]; }; +export type CancellationFeedbackMetadataInput = { + appVersion?: InputMaybe; + gitRevision?: InputMaybe; + platform?: InputMaybe; +}; + +export enum CancellationReasonEnum { + DataNotAccurate = "DATA_NOT_ACCURATE", + DontPlayEnough = "DONT_PLAY_ENOUGH", + MissingFeatures = "MISSING_FEATURES", + Other = "OTHER", + TechnicalIssues = "TECHNICAL_ISSUES", + TooExpensive = "TOO_EXPENSIVE", +} + export type Challenge = { __typename?: "Challenge"; createdAt: Scalars["DateTime"]["output"]; @@ -303,6 +324,12 @@ export type EnumAggregation = { feature: Scalars["String"]["input"]; }; +export type ExchangeAuthHandoffResultGql = { + __typename?: "ExchangeAuthHandoffResultGQL"; + customToken: Scalars["String"]["output"]; + userId: Scalars["Int"]["output"]; +}; + export type FilterInput = | { andFilters: Array; @@ -2327,6 +2354,7 @@ export type Mutation = { blockUser: Scalars["Boolean"]["output"]; cancelSubscription: UserSubscriptionStatusGql; commentOnVideo: Scalars["Boolean"]["output"]; + createAuthHandoffToken: AuthHandoffTokenGql; createBucketSet: BucketSetGql; createChallenge: Challenge; createRuleSet: RuleSet; @@ -2344,6 +2372,7 @@ export type Mutation = { editUploadStream: Scalars["Boolean"]["output"]; editUser: UserGql; ensureStripeCustomerExists: UserGql; + exchangeAuthHandoffToken: ExchangeAuthHandoffResultGql; findPrerecordTableLayout?: Maybe; followUser: UserGql; getHlsInitUploadLink: GetUploadLinkReturn; @@ -2361,6 +2390,7 @@ export type Mutation = { setLoggerLevel: Scalars["Boolean"]["output"]; setSegmentDuration: Scalars["Boolean"]["output"]; startChallenge: ChallengeEntry; + submitCancellationFeedback: Scalars["Boolean"]["output"]; submitChallengeEntry: ChallengeEntry; undismissChallenge: Scalars["Boolean"]["output"]; unfollowUser: UserGql; @@ -2463,6 +2493,10 @@ export type MutationEditUserArgs = { input: EditUserInputGql; }; +export type MutationExchangeAuthHandoffTokenArgs = { + token: Scalars["String"]["input"]; +}; + export type MutationFindPrerecordTableLayoutArgs = { b64Image: Scalars["String"]["input"]; videoId: Scalars["Int"]["input"]; @@ -2537,6 +2571,12 @@ export type MutationStartChallengeArgs = { challengeId: Scalars["ID"]["input"]; }; +export type MutationSubmitCancellationFeedbackArgs = { + feedback?: InputMaybe; + metadata?: InputMaybe; + reasons?: InputMaybe>; +}; + export type MutationSubmitChallengeEntryArgs = { entryId: Scalars["ID"]["input"]; videoId: Scalars["ID"]["input"]; diff --git a/src/schema.gql b/src/schema.gql index 7f63751..7558a84 100644 --- a/src/schema.gql +++ b/src/schema.gql @@ -1072,6 +1072,13 @@ type Mutation { deleteUser: Boolean! createSubscription(priceId: String!): CreateSubscriptionResultGQL! cancelSubscription: UserSubscriptionStatusGQL! + submitCancellationFeedback( + reasons: [CancellationReasonEnum!] = null + feedback: String = null + metadata: CancellationFeedbackMetadataInput = null + ): Boolean! + createAuthHandoffToken: AuthHandoffTokenGQL! + exchangeAuthHandoffToken(token: String!): ExchangeAuthHandoffResultGQL! findPrerecordTableLayout(b64Image: String!, videoId: Int!): HomographyInfoGQL createUploadStream( videoMetadata: VideoMetadataInput! @@ -1196,6 +1203,31 @@ type CreateSubscriptionResultGQL { sessionId: String! } +enum CancellationReasonEnum { + DONT_PLAY_ENOUGH + TOO_EXPENSIVE + MISSING_FEATURES + TECHNICAL_ISSUES + DATA_NOT_ACCURATE + OTHER +} + +input CancellationFeedbackMetadataInput { + appVersion: String = null + gitRevision: String = null + platform: String = null +} + +type AuthHandoffTokenGQL { + token: String! + expiresInSeconds: Int! +} + +type ExchangeAuthHandoffResultGQL { + customToken: String! + userId: Int! +} + type CreateUploadStreamReturn { videoId: Int! }