Add tier-aware subscription options
All checks were successful
Tests / Tests (pull_request) Successful in 9s

This commit is contained in:
2026-07-07 16:10:43 -07:00
parent 8dd9f6df40
commit 338798ea5a
3 changed files with 76 additions and 0 deletions

View File

@@ -3727,6 +3727,7 @@ export type StripeSubscriptionOptionsGql = {
__typename?: "StripeSubscriptionOptionsGQL"; __typename?: "StripeSubscriptionOptionsGQL";
appleIap: AppleIapSubscriptionOptionsGql; appleIap: AppleIapSubscriptionOptionsGql;
products: Array<StripeProductGql>; products: Array<StripeProductGql>;
tierOptions: Array<SubscriptionTierPurchaseOptionGql>;
trialPeriodDays?: Maybe<Scalars["Int"]["output"]>; trialPeriodDays?: Maybe<Scalars["Int"]["output"]>;
}; };
@@ -3741,6 +3742,22 @@ export enum StripeSubscriptionStatusEnum {
Unpaid = "UNPAID", Unpaid = "UNPAID",
} }
export type SubscriptionTierPurchaseOptionGql = {
__typename?: "SubscriptionTierPurchaseOptionGQL";
appleProductId?: Maybe<Scalars["String"]["output"]>;
billingInterval: Scalars["String"]["output"];
currency?: Maybe<Scalars["String"]["output"]>;
isAvailable: Scalars["Boolean"]["output"];
isConfigured: Scalars["Boolean"]["output"];
platform: Scalars["String"]["output"];
recurringIntervalCount?: Maybe<Scalars["Int"]["output"]>;
stripePriceId?: Maybe<Scalars["String"]["output"]>;
stripeProductId?: Maybe<Scalars["String"]["output"]>;
tierDisplayName: Scalars["String"]["output"];
tierName: Scalars["String"]["output"];
unitAmount?: Maybe<Scalars["Int"]["output"]>;
};
export type SuccessfulAdd = { export type SuccessfulAdd = {
__typename?: "SuccessfulAdd"; __typename?: "SuccessfulAdd";
value: Scalars["Boolean"]["output"]; value: Scalars["Boolean"]["output"];
@@ -5458,6 +5475,21 @@ export type GetAvailableSubscriptionOptionsQuery = {
proMonthlyProductId?: string | null; proMonthlyProductId?: string | null;
productIds: Array<string>; productIds: Array<string>;
}; };
tierOptions: Array<{
__typename?: "SubscriptionTierPurchaseOptionGQL";
tierName: string;
tierDisplayName: string;
billingInterval: string;
platform: string;
isConfigured: boolean;
isAvailable: boolean;
stripeProductId?: string | null;
stripePriceId?: string | null;
appleProductId?: string | null;
currency?: string | null;
unitAmount?: number | null;
recurringIntervalCount?: number | null;
}>;
}; };
}; };
@@ -12297,6 +12329,20 @@ export const GetAvailableSubscriptionOptionsDocument = gql`
proMonthlyProductId proMonthlyProductId
productIds productIds
} }
tierOptions {
tierName
tierDisplayName
billingInterval
platform
isConfigured
isAvailable
stripeProductId
stripePriceId
appleProductId
currency
unitAmount
recurringIntervalCount
}
} }
} }
`; `;

View File

@@ -49,6 +49,20 @@ query GetAvailableSubscriptionOptions {
proMonthlyProductId proMonthlyProductId
productIds productIds
} }
tierOptions {
tierName
tierDisplayName
billingInterval
platform
isConfigured
isAvailable
stripeProductId
stripePriceId
appleProductId
currency
unitAmount
recurringIntervalCount
}
} }
} }

View File

@@ -1168,6 +1168,7 @@ type StripeSubscriptionOptionsGQL {
products: [StripeProductGQL!]! products: [StripeProductGQL!]!
trialPeriodDays: Int trialPeriodDays: Int
appleIap: AppleIapSubscriptionOptionsGQL! appleIap: AppleIapSubscriptionOptionsGQL!
tierOptions: [SubscriptionTierPurchaseOptionGQL!]!
} }
type StripeProductGQL { type StripeProductGQL {
@@ -1194,6 +1195,21 @@ type AppleIapSubscriptionOptionsGQL {
productIds: [String!]! productIds: [String!]!
} }
type SubscriptionTierPurchaseOptionGQL {
tierName: String!
tierDisplayName: String!
billingInterval: String!
platform: String!
isConfigured: Boolean!
isAvailable: Boolean!
stripeProductId: String
stripePriceId: String
appleProductId: String
currency: String
unitAmount: Int
recurringIntervalCount: Int
}
type UserSubscriptionStatusGQL { type UserSubscriptionStatusGQL {
hasActiveSubscription: Boolean! hasActiveSubscription: Boolean!
entitlementSource: EntitlementSourceTypeEnum entitlementSource: EntitlementSourceTypeEnum