import { Metadata } from "../types.mjs"; //#region src/app-store/config.d.ts declare const addMethod: unique symbol; declare class Subscription = Lowercase, PE extends string = string, BP extends string = string, PL extends string = never, PI extends string = never, I extends string = never> { readonly plan: PE; readonly billingPeriod: BP; readonly config: AppStoreConfig; readonly products: Map; defaultProductId: I | null; constructor(config: AppStoreConfig, plan: PE, billingPeriod: BP); /** * Non-default products stay declared on purpose: they keep resolving for * grandfathered subscribers and serve as price-experiment arms. Never * sell a legacy product to new users unless that is intentional. */ product: }`>(productId: K extends PI ? never : K, metadata?: Metadata) => Subscription; default: (defaultProductId: I) => AppStoreConfig; } type Options = { appId: `${number}`; bundleId: string; }; declare class AppStoreConfig = Lowercase, PE extends string = string, BP extends string = string, PL extends string = never, PI extends string = never> { readonly appId: string; readonly bundleId: string; private readonly products; private readonly consumables; private readonly subscriptions; private readonly nonConsumables; get productIds(): string[]; [addMethod]: (subscription: Subscription) => this; private constructor(); static create: , PE_1 extends string, BP_1 extends string = string>(options: Options) => AppStoreConfig; /** The same plan may be declared once per billing period; duplicate pairs are rejected. */ subscription: (plan: K, billingPeriod: `${K}:${P}` extends PL ? never : P) => Subscription; consumable: }`>(productId: K extends PI ? never : K, metadata?: Metadata) => AppStoreConfig; nonConsumable: }`>(productId: K extends PI ? never : K) => AppStoreConfig; /** Product id that new subscribers should purchase for the plan and billing period. */ getDefaultProductId: (plan: PE, billingPeriod: BP) => string; getPlan: (productId: string) => PE; getBillingPeriod: (productId: string) => BP; getMode: (productId: string) => 'payment' | 'subscription'; getCreditAmount: (productId: string) => number; private readonly getCreditExpiresIn; getCreditExpiresAt: (productId: string) => string; } //#endregion export { AppStoreConfig }; //# sourceMappingURL=config.d.mts.map