import type { RuntimeMode } from '../services/runtime-mode.service.js'; export type GeneratedOfferSetItemKind = 'plan' | 'upsell' | 'downsell'; export type GeneratedOfferSetPlanModeConfig = { readonly provider?: 'stripe' | 'solidgate' | null; readonly providerPlanId?: string | null; readonly paymentMode?: string | null; readonly priceLabel?: string | null; readonly perDayAmount?: string | null; readonly perDayLabel?: string | null; readonly amountCents?: number | null; readonly checkoutSummaryLabel?: string | null; readonly billingInterval?: string | null; readonly billingIntervalCount?: number | null; readonly followUpProviderPlanId?: string | null; readonly followUpBillingInterval?: string | null; readonly followUpBillingIntervalCount?: number | null; readonly introIterations?: number | null; }; export type GeneratedOfferSetPlanItem = { readonly funnelPlanKey: string; readonly runtimePlanKey?: string | null; readonly testProvider?: 'stripe' | 'solidgate' | null; readonly liveProvider?: 'stripe' | 'solidgate' | null; readonly testProviderPlanId?: string | null; readonly liveProviderPlanId?: string | null; readonly followUpTestProviderPlanId?: string | null; readonly followUpLiveProviderPlanId?: string | null; readonly followUpProviderPlanId?: string | null; readonly followUpTitle?: string | null; readonly followUpPlanTitle?: string | null; readonly followUpBillingInterval?: string | null; readonly followUpBillingIntervalCount?: number | null; readonly introIterations?: number | null; readonly title?: string | null; readonly description?: string | null; readonly priceLabel?: string | null; readonly perDayAmount?: string | null; readonly perDayLabel?: string | null; readonly amountCents?: number | null; readonly checkoutSummaryLabel?: string | null; readonly billingInterval?: string | null; readonly billingIntervalCount?: number | null; readonly providerMappingsByMode?: Partial> | null; readonly analyticsPurchaseValue?: number | null; readonly position?: number | null; readonly isDefault?: boolean | null; readonly displayNameOverride?: string | null; readonly featuredTag?: string | null; readonly oldPriceLabel?: string | null; readonly metadata?: Record | null; }; export type GeneratedOfferSetDiscount = { readonly key?: string | null; readonly testProviderCouponId?: string | null; readonly liveProviderCouponId?: string | null; readonly position?: number | null; readonly metadata?: Record | null; }; export type GeneratedOfferSetPaymentProviderModeConfig = { readonly provider?: 'stripe' | 'solidgate' | null; readonly stripePublishableKey?: string | null; }; export type GeneratedOfferSet = { readonly id?: string | null; readonly key: string; readonly paymentProfileId?: string | null; readonly paymentProviderConfigByMode?: Partial> | null; readonly isActive?: boolean | null; readonly metadata?: Record | null; readonly items: readonly GeneratedOfferSetPlanItem[]; }; export type OfferSetRuntimeDiscount = { readonly stage: 'first'; readonly couponId: string; readonly discountPercent: number; readonly durationSeconds: number; readonly previousDiscountPercent?: null; } | { readonly stage: 'second'; readonly couponId: string; readonly discountPercent: number; readonly durationSeconds: number; readonly previousDiscountPercent: number; }; export type OfferSetRuntimePlanOverrides = { offerSetId?: string; offerSetKey?: string; funnelPlanKey?: string; providerPlanId?: string; paymentMode?: 'one_time'; analyticsPurchaseValue?: number; title?: string; description?: string; priceLabel?: string; perDayAmount?: string; perDayLabel?: string; amountCents?: number; checkoutSummaryLabel?: string; billingInterval?: string; billingIntervalCount?: number; followUpProviderPlanId?: string; followUpPlanTitle?: string; followUpBillingInterval?: string; followUpBillingIntervalCount?: number; introIterations?: number; featuredTag?: string; oldPriceLabel?: string; isDefault?: boolean; }; export type OfferSetRuntimeInput> = { offerSets: readonly GeneratedOfferSet[]; offerSetId?: string; /** @deprecated Prefer the immutable offerSetId. */ offerSetKey?: string; baseCatalogsByMode?: Partial>>; fallbackDiscounts?: readonly OfferSetRuntimeDiscount[]; }; export type OfferSetRuntimeResult> = { offerSet: GeneratedOfferSet | null; paymentProvidersByMode: Record; plansByMode: Record>; planKeys: string[]; upsellPlanKeys: string[]; downsellPlanKeys: string[]; defaultPlanKey: string; discountListsByMode: Record; getPlanCatalog: (mode: RuntimeMode) => Record; getPaymentProvider: (mode: RuntimeMode) => 'stripe' | 'solidgate'; getDiscountList: (mode: RuntimeMode) => readonly OfferSetRuntimeDiscount[]; }; export declare const findGeneratedOfferSet: (offerSets: readonly GeneratedOfferSet[], offerSetKey?: string, offerSetId?: string) => GeneratedOfferSet | null; export declare const applyGeneratedOfferSetToPlanCatalog: >(baseCatalog: Record, mode: RuntimeMode, offerSet: GeneratedOfferSet | null) => Record; export declare const buildGeneratedOfferSetDiscountList: (offerSet: GeneratedOfferSet | null, mode: RuntimeMode, fallbackDiscounts?: readonly OfferSetRuntimeDiscount[]) => readonly OfferSetRuntimeDiscount[]; export declare const resolveGeneratedOfferSetRuntime: = Record>(input: OfferSetRuntimeInput) => OfferSetRuntimeResult;