import { C as ClosedEnum, O as OpenEnum, a as Balance, P as Plan } from './plan-CUExbmy9.mjs';

/**
 * Time range to aggregate events for. Either range or custom_range must be provided
 */
declare const Range: {
    readonly TwentyFourh: "24h";
    readonly Sevend: "7d";
    readonly Thirtyd: "30d";
    readonly Ninetyd: "90d";
    readonly LastCycle: "last_cycle";
    readonly Onebc: "1bc";
    readonly Threebc: "3bc";
};
/**
 * Time range to aggregate events for. Either range or custom_range must be provided
 */
type Range = ClosedEnum<typeof Range>;
/**
 * Size of the time bins to aggregate events for. Defaults to hour if range is 24h, otherwise day
 */
declare const BinSize: {
    readonly Day: "day";
    readonly Hour: "hour";
    readonly Week: "week";
    readonly Month: "month";
};
/**
 * Size of the time bins to aggregate events for. Defaults to hour if range is 24h, otherwise day
 */
type BinSize = ClosedEnum<typeof BinSize>;
/**
 * Custom time range to aggregate events for. If provided, range must not be provided
 */
type AggregateEventsCustomRange = {
    start: number;
    end: number;
};
type EventsAggregateParams = {
    /**
     * Customer ID to aggregate events for
     */
    customerId?: string | undefined;
    /**
     * Entity ID to filter aggregated events for (e.g., per-seat or per-resource limits)
     */
    entityId?: string | undefined;
    /**
     * Feature ID(s) to aggregate events for
     */
    featureId: string | Array<string>;
    /**
     * Property to group events by (e.g. "properties.region"), or "$customer_id" / "$entity_id" / "$plan_id" to group by those columns
     */
    groupBy?: string | undefined;
    /**
     * Time range to aggregate events for. Either range or custom_range must be provided
     */
    range?: Range | undefined;
    /**
     * Size of the time bins to aggregate events for. Defaults to hour if range is 24h, otherwise day
     */
    binSize?: BinSize | undefined;
    /**
     * Custom time range to aggregate events for. If provided, range must not be provided
     */
    customRange?: AggregateEventsCustomRange | undefined;
    /**
     * Filter events by property values, e.g. {"model": "gpt-4", "region": "us"}. Maximum 5 filters.
     */
    filterBy?: {
        [k: string]: string;
    } | undefined;
    /**
     * Maximum number of distinct group values to return per time bin when using group_by. Remaining values are bundled into an 'Other' bucket. Defaults to 9
     */
    maxGroups?: number | undefined;
};
type AggregateEventsList = {
    /**
     * Unix timestamp (epoch ms) for this time period
     */
    period: number;
    /**
     * Aggregated values per feature: { [featureId]: number }
     */
    values: {
        [k: string]: number;
    };
    /**
     * Values broken down by group (only present when group_by is used): { [featureId]: { [groupValue]: number } }
     */
    groupedValues?: {
        [k: string]: {
            [k: string]: number;
        };
    } | undefined;
};
type Total = {
    /**
     * Number of events for this feature
     */
    count: number;
    /**
     * Sum of event values for this feature
     */
    sum: number;
};
/**
 * OK
 */
type AggregateEventsResponse = {
    /**
     * Array of time periods with aggregated values
     */
    list: Array<AggregateEventsList>;
    /**
     * Total aggregations per feature. Keys are feature IDs, values contain count and sum.
     */
    total: {
        [k: string]: Total;
    };
};

/**
 * Quantity configuration for a prepaid feature.
 */
type AttachFeatureQuantity = {
    /**
     * The ID of the feature to set quantity for.
     */
    featureId: string;
    /**
     * The quantity of the feature.
     */
    quantity?: number | undefined;
    /**
     * Whether the customer can adjust the quantity.
     */
    adjustable?: boolean | undefined;
};
/**
 * Billing interval (e.g. 'month', 'year').
 */
declare const AttachPriceInterval: {
    readonly OneOff: "one_off";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
/**
 * Billing interval (e.g. 'month', 'year').
 */
type AttachPriceInterval = ClosedEnum<typeof AttachPriceInterval>;
/**
 * Base price configuration for a plan.
 */
type AttachBasePrice = {
    /**
     * Base price amount for the plan.
     */
    amount: number;
    /**
     * Billing interval (e.g. 'month', 'year').
     */
    interval: AttachPriceInterval;
    /**
     * Number of intervals per billing cycle. Defaults to 1.
     */
    intervalCount?: number | undefined;
};
/**
 * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
 */
declare const AttachItemResetInterval: {
    readonly OneOff: "one_off";
    readonly Minute: "minute";
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
/**
 * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
 */
type AttachItemResetInterval = ClosedEnum<typeof AttachItemResetInterval>;
/**
 * Reset configuration for consumable features. Omit for non-consumable features like seats.
 */
type AttachItemReset = {
    /**
     * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
     */
    interval: AttachItemResetInterval;
    /**
     * Number of intervals between resets. Defaults to 1.
     */
    intervalCount?: number | undefined;
};
type AttachItemTier = {
    to: number | string;
    amount?: number | undefined;
    flatAmount?: number | undefined;
};
declare const AttachItemTierBehavior: {
    readonly Graduated: "graduated";
    readonly Volume: "volume";
};
type AttachItemTierBehavior = ClosedEnum<typeof AttachItemTierBehavior>;
/**
 * Billing interval. For consumable features, should match reset.interval.
 */
declare const AttachItemPriceInterval: {
    readonly OneOff: "one_off";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
/**
 * Billing interval. For consumable features, should match reset.interval.
 */
type AttachItemPriceInterval = ClosedEnum<typeof AttachItemPriceInterval>;
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
declare const AttachItemBillingMethod: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
type AttachItemBillingMethod = ClosedEnum<typeof AttachItemBillingMethod>;
/**
 * Pricing for usage beyond included units. Omit for free features.
 */
type AttachItemPrice = {
    /**
     * Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
     */
    amount?: number | undefined;
    /**
     * Tiered pricing.  Either 'amount' or 'tiers' is required.
     */
    tiers?: Array<AttachItemTier> | undefined;
    tierBehavior?: AttachItemTierBehavior | undefined;
    /**
     * Billing interval. For consumable features, should match reset.interval.
     */
    interval: AttachItemPriceInterval;
    /**
     * Number of intervals per billing cycle. Defaults to 1.
     */
    intervalCount?: number | undefined;
    /**
     * Units per price increment. Usage is rounded UP when billed (e.g. billing_units=100 means 101 rounds to 200).
     */
    billingUnits?: number | undefined;
    /**
     * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
     */
    billingMethod: AttachItemBillingMethod;
    /**
     * Max units purchasable beyond included. E.g. included=100, max_purchase=300 allows 400 total. Null for no limit.
     */
    maxPurchase?: number | null | undefined;
};
/**
 * Billing behavior when quantity increases mid-cycle.
 */
declare const AttachItemOnIncrease: {
    readonly BillImmediately: "bill_immediately";
    readonly ProrateImmediately: "prorate_immediately";
    readonly ProrateNextCycle: "prorate_next_cycle";
    readonly BillNextCycle: "bill_next_cycle";
};
/**
 * Billing behavior when quantity increases mid-cycle.
 */
type AttachItemOnIncrease = ClosedEnum<typeof AttachItemOnIncrease>;
/**
 * Credit behavior when quantity decreases mid-cycle.
 */
declare const AttachItemOnDecrease: {
    readonly Prorate: "prorate";
    readonly ProrateImmediately: "prorate_immediately";
    readonly ProrateNextCycle: "prorate_next_cycle";
    readonly None: "none";
    readonly NoProrations: "no_prorations";
};
/**
 * Credit behavior when quantity decreases mid-cycle.
 */
type AttachItemOnDecrease = ClosedEnum<typeof AttachItemOnDecrease>;
/**
 * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
 */
type AttachItemProration = {
    /**
     * Billing behavior when quantity increases mid-cycle.
     */
    onIncrease: AttachItemOnIncrease;
    /**
     * Credit behavior when quantity decreases mid-cycle.
     */
    onDecrease: AttachItemOnDecrease;
};
/**
 * When rolled over units expire.
 */
declare const AttachItemExpiryDurationType: {
    readonly Month: "month";
    readonly Forever: "forever";
};
/**
 * When rolled over units expire.
 */
type AttachItemExpiryDurationType = ClosedEnum<typeof AttachItemExpiryDurationType>;
/**
 * Rollover config for unused units. If set, unused included units carry over.
 */
type AttachItemRollover = {
    /**
     * Max rollover units. Omit for unlimited rollover.
     */
    max?: number | undefined;
    /**
     * Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
     */
    maxPercentage?: number | undefined;
    /**
     * When rolled over units expire.
     */
    expiryDurationType: AttachItemExpiryDurationType;
    /**
     * Number of periods before expiry.
     */
    expiryDurationLength?: number | undefined;
};
/**
 * Configuration for a feature item in a plan, including usage limits, pricing, and rollover settings.
 */
type AttachItemPlanItem = {
    /**
     * The ID of the feature to configure.
     */
    featureId: string;
    /**
     * Number of free units included. Balance resets to this each interval for consumable features.
     */
    included?: number | undefined;
    /**
     * If true, customer has unlimited access to this feature.
     */
    unlimited?: boolean | undefined;
    /**
     * Reset configuration for consumable features. Omit for non-consumable features like seats.
     */
    reset?: AttachItemReset | undefined;
    /**
     * Pricing for usage beyond included units. Omit for free features.
     */
    price?: AttachItemPrice | undefined;
    /**
     * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
     */
    proration?: AttachItemProration | undefined;
    /**
     * Rollover config for unused units. If set, unused included units carry over.
     */
    rollover?: AttachItemRollover | undefined;
};
/**
 * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
 */
declare const AttachAddItemResetInterval: {
    readonly OneOff: "one_off";
    readonly Minute: "minute";
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
/**
 * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
 */
type AttachAddItemResetInterval = ClosedEnum<typeof AttachAddItemResetInterval>;
/**
 * Reset configuration for consumable features. Omit for non-consumable features like seats.
 */
type AttachAddItemReset = {
    /**
     * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
     */
    interval: AttachAddItemResetInterval;
    /**
     * Number of intervals between resets. Defaults to 1.
     */
    intervalCount?: number | undefined;
};
type AttachAddItemTier = {
    to: number | string;
    amount?: number | undefined;
    flatAmount?: number | undefined;
};
declare const AttachAddItemTierBehavior: {
    readonly Graduated: "graduated";
    readonly Volume: "volume";
};
type AttachAddItemTierBehavior = ClosedEnum<typeof AttachAddItemTierBehavior>;
/**
 * Billing interval. For consumable features, should match reset.interval.
 */
declare const AttachAddItemPriceInterval: {
    readonly OneOff: "one_off";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
/**
 * Billing interval. For consumable features, should match reset.interval.
 */
type AttachAddItemPriceInterval = ClosedEnum<typeof AttachAddItemPriceInterval>;
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
declare const AttachAddItemBillingMethod: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
type AttachAddItemBillingMethod = ClosedEnum<typeof AttachAddItemBillingMethod>;
/**
 * Pricing for usage beyond included units. Omit for free features.
 */
type AttachAddItemPrice = {
    /**
     * Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
     */
    amount?: number | undefined;
    /**
     * Tiered pricing.  Either 'amount' or 'tiers' is required.
     */
    tiers?: Array<AttachAddItemTier> | undefined;
    tierBehavior?: AttachAddItemTierBehavior | undefined;
    /**
     * Billing interval. For consumable features, should match reset.interval.
     */
    interval: AttachAddItemPriceInterval;
    /**
     * Number of intervals per billing cycle. Defaults to 1.
     */
    intervalCount?: number | undefined;
    /**
     * Units per price increment. Usage is rounded UP when billed (e.g. billing_units=100 means 101 rounds to 200).
     */
    billingUnits?: number | undefined;
    /**
     * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
     */
    billingMethod: AttachAddItemBillingMethod;
    /**
     * Max units purchasable beyond included. E.g. included=100, max_purchase=300 allows 400 total. Null for no limit.
     */
    maxPurchase?: number | null | undefined;
};
/**
 * Billing behavior when quantity increases mid-cycle.
 */
declare const AttachAddItemOnIncrease: {
    readonly BillImmediately: "bill_immediately";
    readonly ProrateImmediately: "prorate_immediately";
    readonly ProrateNextCycle: "prorate_next_cycle";
    readonly BillNextCycle: "bill_next_cycle";
};
/**
 * Billing behavior when quantity increases mid-cycle.
 */
type AttachAddItemOnIncrease = ClosedEnum<typeof AttachAddItemOnIncrease>;
/**
 * Credit behavior when quantity decreases mid-cycle.
 */
declare const AttachAddItemOnDecrease: {
    readonly Prorate: "prorate";
    readonly ProrateImmediately: "prorate_immediately";
    readonly ProrateNextCycle: "prorate_next_cycle";
    readonly None: "none";
    readonly NoProrations: "no_prorations";
};
/**
 * Credit behavior when quantity decreases mid-cycle.
 */
type AttachAddItemOnDecrease = ClosedEnum<typeof AttachAddItemOnDecrease>;
/**
 * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
 */
type AttachAddItemProration = {
    /**
     * Billing behavior when quantity increases mid-cycle.
     */
    onIncrease: AttachAddItemOnIncrease;
    /**
     * Credit behavior when quantity decreases mid-cycle.
     */
    onDecrease: AttachAddItemOnDecrease;
};
/**
 * When rolled over units expire.
 */
declare const AttachAddItemExpiryDurationType: {
    readonly Month: "month";
    readonly Forever: "forever";
};
/**
 * When rolled over units expire.
 */
type AttachAddItemExpiryDurationType = ClosedEnum<typeof AttachAddItemExpiryDurationType>;
/**
 * Rollover config for unused units. If set, unused included units carry over.
 */
type AttachAddItemRollover = {
    /**
     * Max rollover units. Omit for unlimited rollover.
     */
    max?: number | undefined;
    /**
     * Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
     */
    maxPercentage?: number | undefined;
    /**
     * When rolled over units expire.
     */
    expiryDurationType: AttachAddItemExpiryDurationType;
    /**
     * Number of periods before expiry.
     */
    expiryDurationLength?: number | undefined;
};
/**
 * Configuration for a feature item in a plan, including usage limits, pricing, and rollover settings.
 */
type AttachAddItemPlanItem = {
    /**
     * The ID of the feature to configure.
     */
    featureId: string;
    /**
     * Number of free units included. Balance resets to this each interval for consumable features.
     */
    included?: number | undefined;
    /**
     * If true, customer has unlimited access to this feature.
     */
    unlimited?: boolean | undefined;
    /**
     * Reset configuration for consumable features. Omit for non-consumable features like seats.
     */
    reset?: AttachAddItemReset | undefined;
    /**
     * Pricing for usage beyond included units. Omit for free features.
     */
    price?: AttachAddItemPrice | undefined;
    /**
     * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
     */
    proration?: AttachAddItemProration | undefined;
    /**
     * Rollover config for unused units. If set, unused included units carry over.
     */
    rollover?: AttachAddItemRollover | undefined;
};
/**
 * Match items with this billing method (prepaid or usage_based).
 */
declare const AttachRemoveItemBillingMethod: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * Match items with this billing method (prepaid or usage_based).
 */
type AttachRemoveItemBillingMethod = ClosedEnum<typeof AttachRemoveItemBillingMethod>;
declare const AttachIntervalRemoveItemEnum2: {
    readonly OneOff: "one_off";
    readonly Minute: "minute";
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
type AttachIntervalRemoveItemEnum2 = ClosedEnum<typeof AttachIntervalRemoveItemEnum2>;
declare const AttachIntervalRemoveItemEnum1: {
    readonly OneOff: "one_off";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
type AttachIntervalRemoveItemEnum1 = ClosedEnum<typeof AttachIntervalRemoveItemEnum1>;
/**
 * Filter for matching plan items. All provided fields must match (AND).
 */
type AttachPlanItemFilter = {
    /**
     * Match items linked to this feature.
     */
    featureId?: string | undefined;
    /**
     * Match items with this billing method (prepaid or usage_based).
     */
    billingMethod?: AttachRemoveItemBillingMethod | undefined;
    /**
     * Match items with this interval. Accepts either a BillingInterval (price-side) or a ResetInterval (reset-side, includes day/hour/minute) so price-less items keyed by reset.interval can be disambiguated.
     */
    interval?: AttachIntervalRemoveItemEnum1 | AttachIntervalRemoveItemEnum2 | undefined;
    /**
     * Match items with this interval_count. Disambiguates between items that share an interval but differ in count.
     */
    intervalCount?: number | undefined;
};
/**
 * Unit of time for the trial ('day', 'month', 'year').
 */
declare const AttachDurationType: {
    readonly Day: "day";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Unit of time for the trial ('day', 'month', 'year').
 */
type AttachDurationType = ClosedEnum<typeof AttachDurationType>;
/**
 * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
 */
declare const AttachOnEnd: {
    readonly Bill: "bill";
    readonly Revert: "revert";
};
/**
 * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
 */
type AttachOnEnd = ClosedEnum<typeof AttachOnEnd>;
/**
 * Free trial configuration for a plan.
 */
type AttachFreeTrialParams = {
    /**
     * Number of duration_type periods the trial lasts.
     */
    durationLength: number;
    /**
     * Unit of time for the trial ('day', 'month', 'year').
     */
    durationType?: AttachDurationType | undefined;
    /**
     * If true, payment method required to start trial. Customer is charged after trial ends.
     */
    cardRequired?: boolean | undefined;
    /**
     * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
     */
    onEnd?: AttachOnEnd | undefined;
};
/**
 * The time interval for the purchase limit window.
 */
declare const AttachPurchaseLimitInterval: {
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
};
/**
 * The time interval for the purchase limit window.
 */
type AttachPurchaseLimitInterval = ClosedEnum<typeof AttachPurchaseLimitInterval>;
/**
 * Optional rate limit to cap how often auto top-ups occur.
 */
type AttachPurchaseLimit = {
    /**
     * The time interval for the purchase limit window.
     */
    interval: AttachPurchaseLimitInterval;
    /**
     * Number of intervals in the purchase limit window.
     */
    intervalCount?: number | undefined;
    /**
     * Maximum number of auto top-ups allowed within the interval.
     */
    limit: number;
};
type AttachAutoTopup = {
    /**
     * The ID of the feature (credit balance) to auto top-up.
     */
    featureId: string;
    /**
     * Whether auto top-up is enabled.
     */
    enabled?: boolean | undefined;
    /**
     * When the balance drops below this threshold, an auto top-up will be purchased.
     */
    threshold: number;
    /**
     * Amount of credits to add per auto top-up.
     */
    quantity: number;
    /**
     * Optional rate limit to cap how often auto top-ups occur.
     */
    purchaseLimit?: AttachPurchaseLimit | undefined;
    /**
     * When true, auto top-up creates a send_invoice invoice instead of auto-charging.
     */
    invoiceMode?: boolean | undefined;
};
/**
 * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
 */
declare const AttachLimitType: {
    readonly Absolute: "absolute";
    readonly UsagePercentage: "usage_percentage";
};
/**
 * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
 */
type AttachLimitType = ClosedEnum<typeof AttachLimitType>;
type AttachSpendLimit = {
    /**
     * Optional feature ID this spend limit applies to.
     */
    featureId?: string | undefined;
    /**
     * Whether the overage spend limit is enabled.
     */
    enabled?: boolean | undefined;
    /**
     * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
     */
    limitType?: AttachLimitType | undefined;
    /**
     * Overage cap for the feature: absolute units, or a percent (e.g. 120) when limit_type is usage_percentage.
     */
    overageLimit?: number | undefined;
    /**
     * When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.
     */
    skipOverageBilling?: boolean | undefined;
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
declare const AttachUsageLimitInterval: {
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
type AttachUsageLimitInterval = ClosedEnum<typeof AttachUsageLimitInterval>;
/**
 * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
 */
type AttachFilter = {
    properties: {
        [k: string]: string | number | boolean;
    };
};
type AttachUsageLimit = {
    /**
     * The feature this usage limit applies to.
     */
    featureId: string;
    /**
     * Whether this usage limit is enabled.
     */
    enabled?: boolean | undefined;
    /**
     * Maximum units allowed per interval.
     */
    limit: number;
    /**
     * Interval for the cap, aligned to the customer's billing cycle.
     */
    interval: AttachUsageLimitInterval;
    /**
     * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
     */
    filter?: AttachFilter | undefined;
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
declare const AttachThresholdType: {
    readonly Usage: "usage";
    readonly UsagePercentage: "usage_percentage";
    readonly Remaining: "remaining";
    readonly RemainingPercentage: "remaining_percentage";
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
type AttachThresholdType = ClosedEnum<typeof AttachThresholdType>;
type AttachUsageAlert = {
    /**
     * The feature ID this alert applies to.
     */
    featureId?: string | undefined;
    /**
     * Whether this usage alert is enabled.
     */
    enabled?: boolean | undefined;
    /**
     * The threshold value that triggers the alert. For usage or remaining, this is an absolute count. For usage_percentage or remaining_percentage, this is a percentage (0-100).
     */
    threshold: number;
    /**
     * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
     */
    thresholdType: AttachThresholdType;
    /**
     * Optional user-defined label to distinguish multiple alerts on the same feature.
     */
    name?: string | undefined;
};
type AttachOverageAllowed = {
    /**
     * The feature ID this overage allowed control applies to.
     */
    featureId: string;
    /**
     * Whether overage is allowed for this feature.
     */
    enabled?: boolean | undefined;
};
/**
 * Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
 */
type AttachBillingControls = {
    /**
     * List of auto top-up configurations per feature.
     */
    autoTopups?: Array<AttachAutoTopup> | undefined;
    /**
     * List of overage spend limits per feature (caps overage spend).
     */
    spendLimits?: Array<AttachSpendLimit> | undefined;
    /**
     * List of hard usage caps per feature (max units per interval).
     */
    usageLimits?: Array<AttachUsageLimit> | undefined;
    /**
     * List of usage alert configurations per feature.
     */
    usageAlerts?: Array<AttachUsageAlert> | undefined;
    /**
     * List of overage allowed controls per feature. When enabled, usage can exceed balance.
     */
    overageAllowed?: Array<AttachOverageAllowed> | undefined;
};
/**
 * Customize the plan to attach. Can override the price, items, free trial, or a combination.
 */
type AttachCustomize = {
    /**
     * Override the base price of the plan. Pass null to remove the base price.
     */
    price?: AttachBasePrice | null | undefined;
    /**
     * Override the items in the plan (PUT-style — replaces all existing items). Mutually exclusive with add_items / remove_items / deprecated update_items.
     */
    items?: Array<AttachItemPlanItem> | undefined;
    /**
     * Items to add to the plan.
     */
    addItems?: Array<AttachAddItemPlanItem> | undefined;
    /**
     * Filters selecting items to remove from the plan.
     */
    removeItems?: Array<AttachPlanItemFilter> | undefined;
    /**
     * Override the plan's default free trial. Pass an object to set a custom trial, or null to remove the trial entirely.
     */
    freeTrial?: AttachFreeTrialParams | null | undefined;
    /**
     * Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
     */
    billingControls?: AttachBillingControls | undefined;
};
/**
 * Invoice mode creates a draft or open invoice and sends it to the customer, instead of charging their card immediately. This uses Stripe's send_invoice collection method.
 */
type AttachInvoiceMode = {
    /**
     * When true, creates an invoice and sends it to the customer instead of charging their card immediately. Uses Stripe's send_invoice collection method.
     */
    enabled: boolean;
    /**
     * If true, enables the plan immediately even though the invoice is not paid yet.
     */
    enablePlanImmediately?: boolean | undefined;
    /**
     * If true, finalizes the invoice so it can be sent to the customer. If false, keeps it as a draft for manual review.
     */
    finalize?: boolean | undefined;
    /**
     * ID of an invoice template (configured in billing settings) whose footer (e.g. bank details) is applied to the invoice.
     */
    invoiceTemplateId?: string | undefined;
    /**
     * Number of days the customer has to pay the invoice before it is due (Stripe days_until_due).
     */
    netTermsDays?: number | undefined;
};
/**
 * How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
 */
declare const AttachProrationBehavior: {
    readonly ProrateImmediately: "prorate_immediately";
    readonly None: "none";
};
/**
 * How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
 */
type AttachProrationBehavior = ClosedEnum<typeof AttachProrationBehavior>;
/**
 * Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects.
 */
declare const AttachRedirectMode: {
    readonly Always: "always";
    readonly IfRequired: "if_required";
    readonly Never: "never";
};
/**
 * Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects.
 */
type AttachRedirectMode = ClosedEnum<typeof AttachRedirectMode>;
/**
 * A discount to apply. Can be either a reward ID or a promotion code.
 */
type AttachAttachDiscount = {
    /**
     * The ID of the reward to apply as a discount.
     */
    rewardId?: string | undefined;
    /**
     * The promotion code to apply as a discount.
     */
    promotionCode?: string | undefined;
};
/**
 * When the plan change should take effect. 'immediate' applies now, 'end_of_cycle' schedules for the end of the current billing cycle. By default, upgrades are immediate and downgrades are scheduled.
 */
declare const AttachPlanSchedule: {
    readonly Immediate: "immediate";
    readonly EndOfCycle: "end_of_cycle";
};
/**
 * When the plan change should take effect. 'immediate' applies now, 'end_of_cycle' schedules for the end of the current billing cycle. By default, upgrades are immediate and downgrades are scheduled.
 */
type AttachPlanSchedule = ClosedEnum<typeof AttachPlanSchedule>;
type AttachCustomLineItem = {
    /**
     * Amount in dollars for this line item (e.g. 10.50). Can be negative for credits.
     */
    amount: number;
    /**
     * Description for the line item.
     */
    description: string;
};
/**
 * Whether to carry over balances from the previous plan.
 */
type AttachCarryOverBalances = {
    /**
     * Whether to carry over balances from the previous plan.
     */
    enabled: boolean;
    /**
     * The IDs of the features to carry over balances from. If left undefined, all features will be carried over.
     */
    featureIds?: Array<string> | undefined;
};
/**
 * Whether to carry over usages from the previous plan.
 */
type AttachCarryOverUsages = {
    /**
     * Whether to carry over usages from the previous plan.
     */
    enabled: boolean;
    /**
     * The IDs of the features to carry over usages for. If left undefined, all consumable features will be carried over.
     */
    featureIds?: Array<string> | undefined;
};
type AttachParams = {
    /**
     * The ID of the customer to attach the plan to.
     */
    customerId: string;
    /**
     * The ID of the entity to attach the plan to.
     */
    entityId?: string | undefined;
    /**
     * The ID of the plan.
     */
    planId: string;
    /**
     * If this plan contains prepaid features, use this field to specify the quantity of each prepaid feature. This quantity includes the included amount and billing units defined when setting up the plan.
     */
    featureQuantities?: Array<AttachFeatureQuantity> | undefined;
    /**
     * The version of the plan to attach.
     */
    version?: number | undefined;
    /**
     * Customize the plan to attach. Can override the price, items, free trial, or a combination.
     */
    customize?: AttachCustomize | undefined;
    /**
     * Invoice mode creates a draft or open invoice and sends it to the customer, instead of charging their card immediately. This uses Stripe's send_invoice collection method.
     */
    invoiceMode?: AttachInvoiceMode | undefined;
    /**
     * How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
     */
    prorationBehavior?: AttachProrationBehavior | undefined;
    /**
     * Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects.
     */
    redirectMode?: AttachRedirectMode | undefined;
    /**
     * A unique ID to identify this subscription. Can be used to target specific subscriptions in update operations when a customer has multiple products with the same plan.
     */
    subscriptionId?: string | undefined;
    /**
     * List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code.
     */
    discounts?: Array<AttachAttachDiscount> | undefined;
    /**
     * URL to redirect to after successful checkout.
     */
    successUrl?: string | undefined;
    /**
     * Only applicable when the customer has an existing Stripe subscription. If true, creates a new separate subscription instead of merging into the existing one.
     */
    newBillingSubscription?: boolean | undefined;
    /**
     * Reset the billing cycle anchor immediately with 'now'.
     */
    billingCycleAnchor?: "now" | undefined;
    /**
     * When the plan change should take effect. 'immediate' applies now, 'end_of_cycle' schedules for the end of the current billing cycle. By default, upgrades are immediate and downgrades are scheduled.
     */
    planSchedule?: AttachPlanSchedule | undefined;
    /**
     * Unix timestamp in milliseconds for when the attached plan should start. Future dates create a scheduled subscription.
     */
    startsAt?: number | undefined;
    /**
     * Unix timestamp in milliseconds for when the attached plan should end.
     */
    endsAt?: number | undefined;
    /**
     * Additional parameters to pass into the creation of the Stripe checkout session.
     */
    checkoutSessionParams?: {
        [k: string]: any;
    } | undefined;
    /**
     * If true, returns an Autumn-hosted checkout link that can create a fresh Stripe checkout session when opened.
     */
    longLivedCheckout?: boolean | undefined;
    /**
     * Custom line items that override the auto-generated proration invoice. Only valid for immediate plan changes (eg. upgrades or one off plans).
     */
    customLineItems?: Array<AttachCustomLineItem> | undefined;
    /**
     * The processor subscription ID to link. Use this to attach an existing Stripe subscription instead of creating a new one.
     */
    processorSubscriptionId?: string | undefined;
    /**
     * Whether to carry over balances from the previous plan.
     */
    carryOverBalances?: AttachCarryOverBalances | undefined;
    /**
     * Whether to carry over usages from the previous plan.
     */
    carryOverUsages?: AttachCarryOverUsages | undefined;
    /**
     * Key-value metadata to attach to the Stripe subscription, invoice, and checkout session created during this attach flow. Keys prefixed with 'autumn_' are reserved and will be stripped.
     */
    metadata?: {
        [k: string]: string;
    } | undefined;
    /**
     * If true, skips any billing changes for the attach operation.
     */
    noBillingChanges?: boolean | undefined;
    /**
     * If true, the customer's plan is activated immediately even when payment is deferred (invoice mode) or pending (Stripe checkout). For Stripe checkout, the customer_product is inserted before the customer completes the hosted form.
     */
    enablePlanImmediately?: boolean | undefined;
    /**
     * Stripe tax rate ID (txr_...) to apply as the default tax rate on the created subscription, invoice, or checkout session line items.
     */
    taxRateId?: string | undefined;
};
/**
 * Invoice details if an invoice was created. Only present when a charge was made.
 */
type AttachInvoice = {
    /**
     * The status of the invoice (e.g., 'paid', 'open', 'draft').
     */
    status: string | null;
    /**
     * The Stripe invoice ID.
     */
    stripeId: string;
    /**
     * The total amount of the invoice in cents.
     */
    total: number;
    /**
     * The three-letter ISO currency code (e.g., 'usd').
     */
    currency: string;
    /**
     * URL to the hosted invoice page where the customer can view and pay the invoice.
     */
    hostedInvoiceUrl: string | null;
};
/**
 * The type of action required to complete the payment.
 */
declare const AttachCode: {
    readonly ThreedsRequired: "3ds_required";
    readonly PaymentMethodRequired: "payment_method_required";
    readonly PaymentFailed: "payment_failed";
    readonly PaymentProcessing: "payment_processing";
};
/**
 * The type of action required to complete the payment.
 */
type AttachCode = OpenEnum<typeof AttachCode>;
/**
 * Details about any action required to complete the payment. Present when the payment could not be processed automatically.
 */
type AttachRequiredAction = {
    /**
     * The type of action required to complete the payment.
     */
    code: AttachCode;
    /**
     * A human-readable explanation of why this action is required.
     */
    reason: string;
};
/**
 * OK
 */
type AttachResponse = {
    /**
     * The ID of the customer.
     */
    customerId: string;
    /**
     * The ID of the entity, if the plan was attached to an entity.
     */
    entityId?: string | undefined;
    /**
     * Invoice details if an invoice was created. Only present when a charge was made.
     */
    invoice?: AttachInvoice | undefined;
    /**
     * URL to redirect the customer to complete payment. Null if no payment action is required.
     */
    paymentUrl: string | null;
    /**
     * Details about any action required to complete the payment. Present when the payment could not be processed automatically.
     */
    requiredAction?: AttachRequiredAction | undefined;
};

/**
 * Quantity configuration for a prepaid feature.
 */
type BillingUpdateFeatureQuantity = {
    /**
     * The ID of the feature to set quantity for.
     */
    featureId: string;
    /**
     * The quantity of the feature.
     */
    quantity?: number | undefined;
    /**
     * Whether the customer can adjust the quantity.
     */
    adjustable?: boolean | undefined;
};
/**
 * Billing interval (e.g. 'month', 'year').
 */
declare const BillingUpdatePriceInterval: {
    readonly OneOff: "one_off";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
/**
 * Billing interval (e.g. 'month', 'year').
 */
type BillingUpdatePriceInterval = ClosedEnum<typeof BillingUpdatePriceInterval>;
/**
 * Base price configuration for a plan.
 */
type BillingUpdateBasePrice = {
    /**
     * Base price amount for the plan.
     */
    amount: number;
    /**
     * Billing interval (e.g. 'month', 'year').
     */
    interval: BillingUpdatePriceInterval;
    /**
     * Number of intervals per billing cycle. Defaults to 1.
     */
    intervalCount?: number | undefined;
};
/**
 * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
 */
declare const BillingUpdateItemResetInterval: {
    readonly OneOff: "one_off";
    readonly Minute: "minute";
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
/**
 * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
 */
type BillingUpdateItemResetInterval = ClosedEnum<typeof BillingUpdateItemResetInterval>;
/**
 * Reset configuration for consumable features. Omit for non-consumable features like seats.
 */
type BillingUpdateItemReset = {
    /**
     * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
     */
    interval: BillingUpdateItemResetInterval;
    /**
     * Number of intervals between resets. Defaults to 1.
     */
    intervalCount?: number | undefined;
};
type BillingUpdateItemTier = {
    to: number | string;
    amount?: number | undefined;
    flatAmount?: number | undefined;
};
declare const BillingUpdateItemTierBehavior: {
    readonly Graduated: "graduated";
    readonly Volume: "volume";
};
type BillingUpdateItemTierBehavior = ClosedEnum<typeof BillingUpdateItemTierBehavior>;
/**
 * Billing interval. For consumable features, should match reset.interval.
 */
declare const BillingUpdateItemPriceInterval: {
    readonly OneOff: "one_off";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
/**
 * Billing interval. For consumable features, should match reset.interval.
 */
type BillingUpdateItemPriceInterval = ClosedEnum<typeof BillingUpdateItemPriceInterval>;
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
declare const BillingUpdateItemBillingMethod: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
type BillingUpdateItemBillingMethod = ClosedEnum<typeof BillingUpdateItemBillingMethod>;
/**
 * Pricing for usage beyond included units. Omit for free features.
 */
type BillingUpdateItemPrice = {
    /**
     * Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
     */
    amount?: number | undefined;
    /**
     * Tiered pricing.  Either 'amount' or 'tiers' is required.
     */
    tiers?: Array<BillingUpdateItemTier> | undefined;
    tierBehavior?: BillingUpdateItemTierBehavior | undefined;
    /**
     * Billing interval. For consumable features, should match reset.interval.
     */
    interval: BillingUpdateItemPriceInterval;
    /**
     * Number of intervals per billing cycle. Defaults to 1.
     */
    intervalCount?: number | undefined;
    /**
     * Units per price increment. Usage is rounded UP when billed (e.g. billing_units=100 means 101 rounds to 200).
     */
    billingUnits?: number | undefined;
    /**
     * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
     */
    billingMethod: BillingUpdateItemBillingMethod;
    /**
     * Max units purchasable beyond included. E.g. included=100, max_purchase=300 allows 400 total. Null for no limit.
     */
    maxPurchase?: number | null | undefined;
};
/**
 * Billing behavior when quantity increases mid-cycle.
 */
declare const BillingUpdateItemOnIncrease: {
    readonly BillImmediately: "bill_immediately";
    readonly ProrateImmediately: "prorate_immediately";
    readonly ProrateNextCycle: "prorate_next_cycle";
    readonly BillNextCycle: "bill_next_cycle";
};
/**
 * Billing behavior when quantity increases mid-cycle.
 */
type BillingUpdateItemOnIncrease = ClosedEnum<typeof BillingUpdateItemOnIncrease>;
/**
 * Credit behavior when quantity decreases mid-cycle.
 */
declare const BillingUpdateItemOnDecrease: {
    readonly Prorate: "prorate";
    readonly ProrateImmediately: "prorate_immediately";
    readonly ProrateNextCycle: "prorate_next_cycle";
    readonly None: "none";
    readonly NoProrations: "no_prorations";
};
/**
 * Credit behavior when quantity decreases mid-cycle.
 */
type BillingUpdateItemOnDecrease = ClosedEnum<typeof BillingUpdateItemOnDecrease>;
/**
 * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
 */
type BillingUpdateItemProration = {
    /**
     * Billing behavior when quantity increases mid-cycle.
     */
    onIncrease: BillingUpdateItemOnIncrease;
    /**
     * Credit behavior when quantity decreases mid-cycle.
     */
    onDecrease: BillingUpdateItemOnDecrease;
};
/**
 * When rolled over units expire.
 */
declare const BillingUpdateItemExpiryDurationType: {
    readonly Month: "month";
    readonly Forever: "forever";
};
/**
 * When rolled over units expire.
 */
type BillingUpdateItemExpiryDurationType = ClosedEnum<typeof BillingUpdateItemExpiryDurationType>;
/**
 * Rollover config for unused units. If set, unused included units carry over.
 */
type BillingUpdateItemRollover = {
    /**
     * Max rollover units. Omit for unlimited rollover.
     */
    max?: number | undefined;
    /**
     * Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
     */
    maxPercentage?: number | undefined;
    /**
     * When rolled over units expire.
     */
    expiryDurationType: BillingUpdateItemExpiryDurationType;
    /**
     * Number of periods before expiry.
     */
    expiryDurationLength?: number | undefined;
};
/**
 * Configuration for a feature item in a plan, including usage limits, pricing, and rollover settings.
 */
type BillingUpdateItemPlanItem = {
    /**
     * The ID of the feature to configure.
     */
    featureId: string;
    /**
     * Number of free units included. Balance resets to this each interval for consumable features.
     */
    included?: number | undefined;
    /**
     * If true, customer has unlimited access to this feature.
     */
    unlimited?: boolean | undefined;
    /**
     * Reset configuration for consumable features. Omit for non-consumable features like seats.
     */
    reset?: BillingUpdateItemReset | undefined;
    /**
     * Pricing for usage beyond included units. Omit for free features.
     */
    price?: BillingUpdateItemPrice | undefined;
    /**
     * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
     */
    proration?: BillingUpdateItemProration | undefined;
    /**
     * Rollover config for unused units. If set, unused included units carry over.
     */
    rollover?: BillingUpdateItemRollover | undefined;
};
/**
 * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
 */
declare const BillingUpdateAddItemResetInterval: {
    readonly OneOff: "one_off";
    readonly Minute: "minute";
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
/**
 * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
 */
type BillingUpdateAddItemResetInterval = ClosedEnum<typeof BillingUpdateAddItemResetInterval>;
/**
 * Reset configuration for consumable features. Omit for non-consumable features like seats.
 */
type BillingUpdateAddItemReset = {
    /**
     * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
     */
    interval: BillingUpdateAddItemResetInterval;
    /**
     * Number of intervals between resets. Defaults to 1.
     */
    intervalCount?: number | undefined;
};
type BillingUpdateAddItemTier = {
    to: number | string;
    amount?: number | undefined;
    flatAmount?: number | undefined;
};
declare const BillingUpdateAddItemTierBehavior: {
    readonly Graduated: "graduated";
    readonly Volume: "volume";
};
type BillingUpdateAddItemTierBehavior = ClosedEnum<typeof BillingUpdateAddItemTierBehavior>;
/**
 * Billing interval. For consumable features, should match reset.interval.
 */
declare const BillingUpdateAddItemPriceInterval: {
    readonly OneOff: "one_off";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
/**
 * Billing interval. For consumable features, should match reset.interval.
 */
type BillingUpdateAddItemPriceInterval = ClosedEnum<typeof BillingUpdateAddItemPriceInterval>;
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
declare const BillingUpdateAddItemBillingMethod: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
type BillingUpdateAddItemBillingMethod = ClosedEnum<typeof BillingUpdateAddItemBillingMethod>;
/**
 * Pricing for usage beyond included units. Omit for free features.
 */
type BillingUpdateAddItemPrice = {
    /**
     * Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
     */
    amount?: number | undefined;
    /**
     * Tiered pricing.  Either 'amount' or 'tiers' is required.
     */
    tiers?: Array<BillingUpdateAddItemTier> | undefined;
    tierBehavior?: BillingUpdateAddItemTierBehavior | undefined;
    /**
     * Billing interval. For consumable features, should match reset.interval.
     */
    interval: BillingUpdateAddItemPriceInterval;
    /**
     * Number of intervals per billing cycle. Defaults to 1.
     */
    intervalCount?: number | undefined;
    /**
     * Units per price increment. Usage is rounded UP when billed (e.g. billing_units=100 means 101 rounds to 200).
     */
    billingUnits?: number | undefined;
    /**
     * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
     */
    billingMethod: BillingUpdateAddItemBillingMethod;
    /**
     * Max units purchasable beyond included. E.g. included=100, max_purchase=300 allows 400 total. Null for no limit.
     */
    maxPurchase?: number | null | undefined;
};
/**
 * Billing behavior when quantity increases mid-cycle.
 */
declare const BillingUpdateAddItemOnIncrease: {
    readonly BillImmediately: "bill_immediately";
    readonly ProrateImmediately: "prorate_immediately";
    readonly ProrateNextCycle: "prorate_next_cycle";
    readonly BillNextCycle: "bill_next_cycle";
};
/**
 * Billing behavior when quantity increases mid-cycle.
 */
type BillingUpdateAddItemOnIncrease = ClosedEnum<typeof BillingUpdateAddItemOnIncrease>;
/**
 * Credit behavior when quantity decreases mid-cycle.
 */
declare const BillingUpdateAddItemOnDecrease: {
    readonly Prorate: "prorate";
    readonly ProrateImmediately: "prorate_immediately";
    readonly ProrateNextCycle: "prorate_next_cycle";
    readonly None: "none";
    readonly NoProrations: "no_prorations";
};
/**
 * Credit behavior when quantity decreases mid-cycle.
 */
type BillingUpdateAddItemOnDecrease = ClosedEnum<typeof BillingUpdateAddItemOnDecrease>;
/**
 * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
 */
type BillingUpdateAddItemProration = {
    /**
     * Billing behavior when quantity increases mid-cycle.
     */
    onIncrease: BillingUpdateAddItemOnIncrease;
    /**
     * Credit behavior when quantity decreases mid-cycle.
     */
    onDecrease: BillingUpdateAddItemOnDecrease;
};
/**
 * When rolled over units expire.
 */
declare const BillingUpdateAddItemExpiryDurationType: {
    readonly Month: "month";
    readonly Forever: "forever";
};
/**
 * When rolled over units expire.
 */
type BillingUpdateAddItemExpiryDurationType = ClosedEnum<typeof BillingUpdateAddItemExpiryDurationType>;
/**
 * Rollover config for unused units. If set, unused included units carry over.
 */
type BillingUpdateAddItemRollover = {
    /**
     * Max rollover units. Omit for unlimited rollover.
     */
    max?: number | undefined;
    /**
     * Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
     */
    maxPercentage?: number | undefined;
    /**
     * When rolled over units expire.
     */
    expiryDurationType: BillingUpdateAddItemExpiryDurationType;
    /**
     * Number of periods before expiry.
     */
    expiryDurationLength?: number | undefined;
};
/**
 * Configuration for a feature item in a plan, including usage limits, pricing, and rollover settings.
 */
type BillingUpdateAddItemPlanItem = {
    /**
     * The ID of the feature to configure.
     */
    featureId: string;
    /**
     * Number of free units included. Balance resets to this each interval for consumable features.
     */
    included?: number | undefined;
    /**
     * If true, customer has unlimited access to this feature.
     */
    unlimited?: boolean | undefined;
    /**
     * Reset configuration for consumable features. Omit for non-consumable features like seats.
     */
    reset?: BillingUpdateAddItemReset | undefined;
    /**
     * Pricing for usage beyond included units. Omit for free features.
     */
    price?: BillingUpdateAddItemPrice | undefined;
    /**
     * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
     */
    proration?: BillingUpdateAddItemProration | undefined;
    /**
     * Rollover config for unused units. If set, unused included units carry over.
     */
    rollover?: BillingUpdateAddItemRollover | undefined;
};
/**
 * Match items with this billing method (prepaid or usage_based).
 */
declare const BillingUpdateRemoveItemBillingMethod: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * Match items with this billing method (prepaid or usage_based).
 */
type BillingUpdateRemoveItemBillingMethod = ClosedEnum<typeof BillingUpdateRemoveItemBillingMethod>;
declare const BillingUpdateIntervalRemoveItemEnum2: {
    readonly OneOff: "one_off";
    readonly Minute: "minute";
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
type BillingUpdateIntervalRemoveItemEnum2 = ClosedEnum<typeof BillingUpdateIntervalRemoveItemEnum2>;
declare const BillingUpdateIntervalRemoveItemEnum1: {
    readonly OneOff: "one_off";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
type BillingUpdateIntervalRemoveItemEnum1 = ClosedEnum<typeof BillingUpdateIntervalRemoveItemEnum1>;
/**
 * Filter for matching plan items. All provided fields must match (AND).
 */
type BillingUpdatePlanItemFilter = {
    /**
     * Match items linked to this feature.
     */
    featureId?: string | undefined;
    /**
     * Match items with this billing method (prepaid or usage_based).
     */
    billingMethod?: BillingUpdateRemoveItemBillingMethod | undefined;
    /**
     * Match items with this interval. Accepts either a BillingInterval (price-side) or a ResetInterval (reset-side, includes day/hour/minute) so price-less items keyed by reset.interval can be disambiguated.
     */
    interval?: BillingUpdateIntervalRemoveItemEnum1 | BillingUpdateIntervalRemoveItemEnum2 | undefined;
    /**
     * Match items with this interval_count. Disambiguates between items that share an interval but differ in count.
     */
    intervalCount?: number | undefined;
};
/**
 * Unit of time for the trial ('day', 'month', 'year').
 */
declare const BillingUpdateDurationType: {
    readonly Day: "day";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Unit of time for the trial ('day', 'month', 'year').
 */
type BillingUpdateDurationType = ClosedEnum<typeof BillingUpdateDurationType>;
/**
 * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
 */
declare const BillingUpdateOnEnd: {
    readonly Bill: "bill";
    readonly Revert: "revert";
};
/**
 * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
 */
type BillingUpdateOnEnd = ClosedEnum<typeof BillingUpdateOnEnd>;
/**
 * Free trial configuration for a plan.
 */
type BillingUpdateFreeTrialParams = {
    /**
     * Number of duration_type periods the trial lasts.
     */
    durationLength: number;
    /**
     * Unit of time for the trial ('day', 'month', 'year').
     */
    durationType?: BillingUpdateDurationType | undefined;
    /**
     * If true, payment method required to start trial. Customer is charged after trial ends.
     */
    cardRequired?: boolean | undefined;
    /**
     * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
     */
    onEnd?: BillingUpdateOnEnd | undefined;
};
/**
 * The time interval for the purchase limit window.
 */
declare const BillingUpdatePurchaseLimitInterval: {
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
};
/**
 * The time interval for the purchase limit window.
 */
type BillingUpdatePurchaseLimitInterval = ClosedEnum<typeof BillingUpdatePurchaseLimitInterval>;
/**
 * Optional rate limit to cap how often auto top-ups occur.
 */
type BillingUpdatePurchaseLimit = {
    /**
     * The time interval for the purchase limit window.
     */
    interval: BillingUpdatePurchaseLimitInterval;
    /**
     * Number of intervals in the purchase limit window.
     */
    intervalCount?: number | undefined;
    /**
     * Maximum number of auto top-ups allowed within the interval.
     */
    limit: number;
};
type BillingUpdateAutoTopup = {
    /**
     * The ID of the feature (credit balance) to auto top-up.
     */
    featureId: string;
    /**
     * Whether auto top-up is enabled.
     */
    enabled?: boolean | undefined;
    /**
     * When the balance drops below this threshold, an auto top-up will be purchased.
     */
    threshold: number;
    /**
     * Amount of credits to add per auto top-up.
     */
    quantity: number;
    /**
     * Optional rate limit to cap how often auto top-ups occur.
     */
    purchaseLimit?: BillingUpdatePurchaseLimit | undefined;
    /**
     * When true, auto top-up creates a send_invoice invoice instead of auto-charging.
     */
    invoiceMode?: boolean | undefined;
};
/**
 * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
 */
declare const BillingUpdateLimitType: {
    readonly Absolute: "absolute";
    readonly UsagePercentage: "usage_percentage";
};
/**
 * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
 */
type BillingUpdateLimitType = ClosedEnum<typeof BillingUpdateLimitType>;
type BillingUpdateSpendLimit = {
    /**
     * Optional feature ID this spend limit applies to.
     */
    featureId?: string | undefined;
    /**
     * Whether the overage spend limit is enabled.
     */
    enabled?: boolean | undefined;
    /**
     * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
     */
    limitType?: BillingUpdateLimitType | undefined;
    /**
     * Overage cap for the feature: absolute units, or a percent (e.g. 120) when limit_type is usage_percentage.
     */
    overageLimit?: number | undefined;
    /**
     * When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.
     */
    skipOverageBilling?: boolean | undefined;
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
declare const BillingUpdateUsageLimitInterval: {
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
type BillingUpdateUsageLimitInterval = ClosedEnum<typeof BillingUpdateUsageLimitInterval>;
/**
 * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
 */
type BillingUpdateFilter = {
    properties: {
        [k: string]: string | number | boolean;
    };
};
type BillingUpdateUsageLimit = {
    /**
     * The feature this usage limit applies to.
     */
    featureId: string;
    /**
     * Whether this usage limit is enabled.
     */
    enabled?: boolean | undefined;
    /**
     * Maximum units allowed per interval.
     */
    limit: number;
    /**
     * Interval for the cap, aligned to the customer's billing cycle.
     */
    interval: BillingUpdateUsageLimitInterval;
    /**
     * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
     */
    filter?: BillingUpdateFilter | undefined;
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
declare const BillingUpdateThresholdType: {
    readonly Usage: "usage";
    readonly UsagePercentage: "usage_percentage";
    readonly Remaining: "remaining";
    readonly RemainingPercentage: "remaining_percentage";
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
type BillingUpdateThresholdType = ClosedEnum<typeof BillingUpdateThresholdType>;
type BillingUpdateUsageAlert = {
    /**
     * The feature ID this alert applies to.
     */
    featureId?: string | undefined;
    /**
     * Whether this usage alert is enabled.
     */
    enabled?: boolean | undefined;
    /**
     * The threshold value that triggers the alert. For usage or remaining, this is an absolute count. For usage_percentage or remaining_percentage, this is a percentage (0-100).
     */
    threshold: number;
    /**
     * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
     */
    thresholdType: BillingUpdateThresholdType;
    /**
     * Optional user-defined label to distinguish multiple alerts on the same feature.
     */
    name?: string | undefined;
};
type BillingUpdateOverageAllowed = {
    /**
     * The feature ID this overage allowed control applies to.
     */
    featureId: string;
    /**
     * Whether overage is allowed for this feature.
     */
    enabled?: boolean | undefined;
};
/**
 * Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
 */
type BillingUpdateBillingControls = {
    /**
     * List of auto top-up configurations per feature.
     */
    autoTopups?: Array<BillingUpdateAutoTopup> | undefined;
    /**
     * List of overage spend limits per feature (caps overage spend).
     */
    spendLimits?: Array<BillingUpdateSpendLimit> | undefined;
    /**
     * List of hard usage caps per feature (max units per interval).
     */
    usageLimits?: Array<BillingUpdateUsageLimit> | undefined;
    /**
     * List of usage alert configurations per feature.
     */
    usageAlerts?: Array<BillingUpdateUsageAlert> | undefined;
    /**
     * List of overage allowed controls per feature. When enabled, usage can exceed balance.
     */
    overageAllowed?: Array<BillingUpdateOverageAllowed> | undefined;
};
/**
 * Customize the plan to attach. Can override the price, items, free trial, or a combination.
 */
type BillingUpdateCustomize = {
    /**
     * Override the base price of the plan. Pass null to remove the base price.
     */
    price?: BillingUpdateBasePrice | null | undefined;
    /**
     * Override the items in the plan (PUT-style — replaces all existing items). Mutually exclusive with add_items / remove_items / deprecated update_items.
     */
    items?: Array<BillingUpdateItemPlanItem> | undefined;
    /**
     * Items to add to the plan.
     */
    addItems?: Array<BillingUpdateAddItemPlanItem> | undefined;
    /**
     * Filters selecting items to remove from the plan.
     */
    removeItems?: Array<BillingUpdatePlanItemFilter> | undefined;
    /**
     * Override the plan's default free trial. Pass an object to set a custom trial, or null to remove the trial entirely.
     */
    freeTrial?: BillingUpdateFreeTrialParams | null | undefined;
    /**
     * Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
     */
    billingControls?: BillingUpdateBillingControls | undefined;
};
/**
 * Invoice mode creates a draft or open invoice and sends it to the customer, instead of charging their card immediately. This uses Stripe's send_invoice collection method.
 */
type BillingUpdateInvoiceMode = {
    /**
     * When true, creates an invoice and sends it to the customer instead of charging their card immediately. Uses Stripe's send_invoice collection method.
     */
    enabled: boolean;
    /**
     * If true, enables the plan immediately even though the invoice is not paid yet.
     */
    enablePlanImmediately?: boolean | undefined;
    /**
     * If true, finalizes the invoice so it can be sent to the customer. If false, keeps it as a draft for manual review.
     */
    finalize?: boolean | undefined;
    /**
     * ID of an invoice template (configured in billing settings) whose footer (e.g. bank details) is applied to the invoice.
     */
    invoiceTemplateId?: string | undefined;
    /**
     * Number of days the customer has to pay the invoice before it is due (Stripe days_until_due).
     */
    netTermsDays?: number | undefined;
};
/**
 * How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
 */
declare const BillingUpdateProrationBehavior: {
    readonly ProrateImmediately: "prorate_immediately";
    readonly None: "none";
};
/**
 * How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
 */
type BillingUpdateProrationBehavior = ClosedEnum<typeof BillingUpdateProrationBehavior>;
/**
 * Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects.
 */
declare const BillingUpdateRedirectMode: {
    readonly Always: "always";
    readonly IfRequired: "if_required";
    readonly Never: "never";
};
/**
 * Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects.
 */
type BillingUpdateRedirectMode = ClosedEnum<typeof BillingUpdateRedirectMode>;
/**
 * A discount to apply. Can be either a reward ID or a promotion code.
 */
type BillingUpdateAttachDiscount = {
    /**
     * The ID of the reward to apply as a discount.
     */
    rewardId?: string | undefined;
    /**
     * The promotion code to apply as a discount.
     */
    promotionCode?: string | undefined;
};
/**
 * Action to perform for cancellation. 'cancel_immediately' cancels now with prorated refund, 'cancel_end_of_cycle' cancels at period end, 'uncancel' reverses a pending cancellation.
 */
declare const BillingUpdateCancelAction: {
    readonly CancelImmediately: "cancel_immediately";
    readonly CancelEndOfCycle: "cancel_end_of_cycle";
    readonly Uncancel: "uncancel";
};
/**
 * Action to perform for cancellation. 'cancel_immediately' cancels now with prorated refund, 'cancel_end_of_cycle' cancels at period end, 'uncancel' reverses a pending cancellation.
 */
type BillingUpdateCancelAction = ClosedEnum<typeof BillingUpdateCancelAction>;
/**
 * Controls how the last payment is refunded on immediate cancellation. 'prorated' refunds the unused portion, 'full' refunds the entire last payment.
 */
declare const BillingUpdateRefundLastPayment: {
    readonly Prorated: "prorated";
    readonly Full: "full";
};
/**
 * Controls how the last payment is refunded on immediate cancellation. 'prorated' refunds the unused portion, 'full' refunds the entire last payment.
 */
type BillingUpdateRefundLastPayment = ClosedEnum<typeof BillingUpdateRefundLastPayment>;
/**
 * Controls whether balances should be recalculated during the subscription update.
 */
type BillingUpdateRecalculateBalances = {
    /**
     * If true, recalculates balances during the subscription update. Only applicable when updating feature quantities.
     */
    enabled: boolean;
};
/**
 * Whether to carry over usages from the previous plan.
 */
type BillingUpdateCarryOverUsages = {
    /**
     * Whether to carry over usages from the previous plan.
     */
    enabled: boolean;
    /**
     * The IDs of the features to carry over usages for. If left undefined, all consumable features will be carried over.
     */
    featureIds?: Array<string> | undefined;
};
type UpdateSubscriptionParams = {
    /**
     * The ID of the customer to attach the plan to.
     */
    customerId: string;
    /**
     * The ID of the entity to attach the plan to.
     */
    entityId?: string | undefined;
    /**
     * The ID of the plan to update. Optional if subscription_id is provided, or if the customer has only one product.
     */
    planId?: string | undefined;
    /**
     * If this plan contains prepaid features, use this field to specify the quantity of each prepaid feature. This quantity includes the included amount and billing units defined when setting up the plan.
     */
    featureQuantities?: Array<BillingUpdateFeatureQuantity> | undefined;
    /**
     * The version of the plan to attach.
     */
    version?: number | undefined;
    /**
     * Customize the plan to attach. Can override the price, items, free trial, or a combination.
     */
    customize?: BillingUpdateCustomize | undefined;
    /**
     * Invoice mode creates a draft or open invoice and sends it to the customer, instead of charging their card immediately. This uses Stripe's send_invoice collection method.
     */
    invoiceMode?: BillingUpdateInvoiceMode | undefined;
    /**
     * How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
     */
    prorationBehavior?: BillingUpdateProrationBehavior | undefined;
    /**
     * Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects.
     */
    redirectMode?: BillingUpdateRedirectMode | undefined;
    /**
     * A unique ID to identify this subscription. Can be used to target specific subscriptions in update operations when a customer has multiple products with the same plan.
     */
    subscriptionId?: string | undefined;
    /**
     * List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code.
     */
    discounts?: Array<BillingUpdateAttachDiscount> | undefined;
    /**
     * Action to perform for cancellation. 'cancel_immediately' cancels now with prorated refund, 'cancel_end_of_cycle' cancels at period end, 'uncancel' reverses a pending cancellation.
     */
    cancelAction?: BillingUpdateCancelAction | undefined;
    /**
     * Reset the billing cycle anchor immediately with 'now'
     */
    billingCycleAnchor?: "now" | undefined;
    /**
     * If true, the subscription is updated internally without applying billing changes in Stripe.
     */
    noBillingChanges?: boolean | undefined;
    /**
     * Controls how the last payment is refunded on immediate cancellation. 'prorated' refunds the unused portion, 'full' refunds the entire last payment.
     */
    refundLastPayment?: BillingUpdateRefundLastPayment | undefined;
    /**
     * Controls whether balances should be recalculated during the subscription update.
     */
    recalculateBalances?: BillingUpdateRecalculateBalances | undefined;
    /**
     * Whether to carry over usages from the previous plan.
     */
    carryOverUsages?: BillingUpdateCarryOverUsages | undefined;
};
/**
 * Invoice details if an invoice was created. Only present when a charge was made.
 */
type BillingUpdateInvoice = {
    /**
     * The status of the invoice (e.g., 'paid', 'open', 'draft').
     */
    status: string | null;
    /**
     * The Stripe invoice ID.
     */
    stripeId: string;
    /**
     * The total amount of the invoice in cents.
     */
    total: number;
    /**
     * The three-letter ISO currency code (e.g., 'usd').
     */
    currency: string;
    /**
     * URL to the hosted invoice page where the customer can view and pay the invoice.
     */
    hostedInvoiceUrl: string | null;
};
/**
 * The type of action required to complete the payment.
 */
declare const BillingUpdateCode: {
    readonly ThreedsRequired: "3ds_required";
    readonly PaymentMethodRequired: "payment_method_required";
    readonly PaymentFailed: "payment_failed";
    readonly PaymentProcessing: "payment_processing";
};
/**
 * The type of action required to complete the payment.
 */
type BillingUpdateCode = OpenEnum<typeof BillingUpdateCode>;
/**
 * Details about any action required to complete the payment. Present when the payment could not be processed automatically.
 */
type BillingUpdateRequiredAction = {
    /**
     * The type of action required to complete the payment.
     */
    code: BillingUpdateCode;
    /**
     * A human-readable explanation of why this action is required.
     */
    reason: string;
};
/**
 * OK
 */
type BillingUpdateResponse = {
    /**
     * The ID of the customer.
     */
    customerId: string;
    /**
     * The ID of the entity, if the plan was attached to an entity.
     */
    entityId?: string | undefined;
    /**
     * Invoice details if an invoice was created. Only present when a charge was made.
     */
    invoice?: BillingUpdateInvoice | undefined;
    /**
     * URL to redirect the customer to complete payment. Null if no payment action is required.
     */
    paymentUrl: string | null;
    /**
     * Details about any action required to complete the payment. Present when the payment could not be processed automatically.
     */
    requiredAction?: BillingUpdateRequiredAction | undefined;
};

/**
 * Reserve units of a feature upfront by passing a lock_id, then call balances.finalize to confirm or release the hold.
 */
type CheckLock = {
    /**
     * A unique identifier for this lock. Used to finalize the lock later via balances.finalize.
     */
    lockId: string;
    /**
     * Must be true to enable locking.
     */
    enabled: true;
    /**
     * Unix timestamp (ms) when the lock automatically expires and releases the held balance.
     */
    expiresAt?: number | undefined;
};
type CheckParams = {
    /**
     * The ID of the customer.
     */
    customerId: string;
    /**
     * The ID of the feature.
     */
    featureId: string;
    /**
     * The ID of the entity for entity-scoped balances (e.g., per-seat limits).
     */
    entityId?: string | undefined;
    /**
     * Minimum balance required for access. Returns allowed: false if the customer's balance is below this value. Defaults to 1.
     */
    requiredBalance?: number | undefined;
    /**
     * Additional properties to attach to the usage event if send_event is true.
     */
    properties?: {
        [k: string]: any;
    } | undefined;
    /**
     * If true, atomically records a usage event while checking access. The required_balance value is used as the usage amount. Combines check + track in one call.
     */
    sendEvent?: boolean | undefined;
    /**
     * Reserve units of a feature upfront by passing a lock_id, then call balances.finalize to confirm or release the hold.
     */
    lock?: CheckLock | undefined;
    /**
     * If true, includes upgrade/upsell information in the response when access is denied. Useful for displaying paywalls.
     */
    withPreview?: boolean | undefined;
};
/**
 * Feature type: 'boolean' for on/off access, 'metered' for usage-tracked features, 'credit_system' for unified credit pools, 'ai_credit_system' for model-based token pricing.
 */
declare const FlagType2: {
    readonly Boolean: "boolean";
    readonly Metered: "metered";
    readonly CreditSystem: "credit_system";
    readonly AiCreditSystem: "ai_credit_system";
};
/**
 * Feature type: 'boolean' for on/off access, 'metered' for usage-tracked features, 'credit_system' for unified credit pools, 'ai_credit_system' for model-based token pricing.
 */
type FlagType2 = OpenEnum<typeof FlagType2>;
type CheckCreditSchema2 = {
    /**
     * ID of the metered feature that draws from this credit system.
     */
    meteredFeatureId: string;
    /**
     * Credits consumed per unit of the metered feature.
     */
    creditCost: number;
};
type CheckModelMarkups2 = {
    markup?: number | undefined;
    inputCost?: number | undefined;
    outputCost?: number | undefined;
};
type CheckProviderMarkups2 = {
    markup: number;
};
/**
 * Display names for the feature in billing UI and customer-facing components.
 */
type FlagDisplay2 = {
    /**
     * Singular form for UI display (e.g., 'API call', 'seat').
     */
    singular?: string | null | undefined;
    /**
     * Plural form for UI display (e.g., 'API calls', 'seats').
     */
    plural?: string | null | undefined;
};
/**
 * The full feature object if expanded.
 */
type CheckFeature2 = {
    /**
     * The unique identifier for this feature, used in /check and /track calls.
     */
    id: string;
    /**
     * Human-readable name displayed in the dashboard and billing UI.
     */
    name: string;
    /**
     * Feature type: 'boolean' for on/off access, 'metered' for usage-tracked features, 'credit_system' for unified credit pools, 'ai_credit_system' for model-based token pricing.
     */
    type: FlagType2;
    /**
     * For metered features: true if usage resets periodically (API calls, credits), false if allocated persistently (seats, storage).
     */
    consumable: boolean;
    /**
     * Event names that trigger this feature's balance. Allows multiple features to respond to a single event.
     */
    eventNames?: Array<string> | undefined;
    /**
     * For credit_system features: maps metered features to their credit costs.
     */
    creditSchema?: Array<CheckCreditSchema2> | undefined;
    /**
     * Per-model markup overrides for AI credit systems.
     */
    modelMarkups?: {
        [k: string]: CheckModelMarkups2;
    } | null | undefined;
    /**
     * Default percentage markup for AI credit systems. Use -100 to make usage free.
     */
    defaultMarkup?: number | undefined;
    /**
     * Per-provider default markup percentages for AI credit systems.
     */
    providerMarkups?: {
        [k: string]: CheckProviderMarkups2;
    } | null | undefined;
    /**
     * Display names for the feature in billing UI and customer-facing components.
     */
    display?: FlagDisplay2 | undefined;
    /**
     * Whether the feature is archived and hidden from the dashboard.
     */
    archived: boolean;
};
type Flag2 = {
    /**
     * The unique identifier for this flag.
     */
    id: string;
    /**
     * The plan ID this flag originates from, or null for standalone flags.
     */
    planId: string | null;
    /**
     * Timestamp when this flag expires, or null for no expiration.
     */
    expiresAt: number | null;
    /**
     * The feature ID this flag is for.
     */
    featureId: string;
    /**
     * The full feature object if expanded.
     */
    feature?: CheckFeature2 | undefined;
};
/**
 * The reason access was denied. 'usage_limit' means the customer exceeded their balance, 'feature_flag' means the feature is not included in their plan.
 */
declare const Scenario2: {
    readonly UsageLimit: "usage_limit";
    readonly FeatureFlag: "feature_flag";
};
/**
 * The reason access was denied. 'usage_limit' means the customer exceeded their balance, 'feature_flag' means the feature is not included in their plan.
 */
type Scenario2 = OpenEnum<typeof Scenario2>;
/**
 * The environment of the product
 */
declare const CheckEnv2: {
    readonly Sandbox: "sandbox";
    readonly Live: "live";
};
/**
 * The environment of the product
 */
type CheckEnv2 = OpenEnum<typeof CheckEnv2>;
declare const ProductType2: {
    readonly Feature: "feature";
    readonly PricedFeature: "priced_feature";
    readonly Price: "price";
};
type ProductType2 = OpenEnum<typeof ProductType2>;
declare const FeatureType2: {
    readonly SingleUse: "single_use";
    readonly ContinuousUse: "continuous_use";
    readonly Boolean: "boolean";
    readonly Static: "static";
};
type FeatureType2 = OpenEnum<typeof FeatureType2>;
declare const CheckItemInterval2: {
    readonly Minute: "minute";
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
type CheckItemInterval2 = OpenEnum<typeof CheckItemInterval2>;
declare const CheckTierBehavior2: {
    readonly Graduated: "graduated";
    readonly Volume: "volume";
};
type CheckTierBehavior2 = OpenEnum<typeof CheckTierBehavior2>;
declare const UsageModel2: {
    readonly Prepaid: "prepaid";
    readonly PayPerUse: "pay_per_use";
};
type UsageModel2 = OpenEnum<typeof UsageModel2>;
type ProductDisplay2 = {
    primaryText: string;
    secondaryText?: string | null | undefined;
};
declare const ConfigDuration2: {
    readonly Month: "month";
    readonly Forever: "forever";
};
type ConfigDuration2 = OpenEnum<typeof ConfigDuration2>;
type CheckRollover2 = {
    max?: number | null | undefined;
    maxPercentage?: number | null | undefined;
    duration: ConfigDuration2;
    length: number;
};
declare const CheckOnIncrease2: {
    readonly BillImmediately: "bill_immediately";
    readonly ProrateImmediately: "prorate_immediately";
    readonly ProrateNextCycle: "prorate_next_cycle";
    readonly BillNextCycle: "bill_next_cycle";
};
type CheckOnIncrease2 = OpenEnum<typeof CheckOnIncrease2>;
declare const CheckOnDecrease2: {
    readonly Prorate: "prorate";
    readonly ProrateImmediately: "prorate_immediately";
    readonly ProrateNextCycle: "prorate_next_cycle";
    readonly None: "none";
    readonly NoProrations: "no_prorations";
};
type CheckOnDecrease2 = OpenEnum<typeof CheckOnDecrease2>;
type CheckConfig2 = {
    rollover?: CheckRollover2 | null | undefined;
    onIncrease?: CheckOnIncrease2 | null | undefined;
    onDecrease?: CheckOnDecrease2 | null | undefined;
};
/**
 * Product item defining features and pricing within a product
 */
type CheckItem2 = {
    /**
     * The type of the product item
     */
    type?: ProductType2 | null | undefined;
    /**
     * The feature ID of the product item. If the item is a fixed price, should be `null`
     */
    featureId?: string | null | undefined;
    /**
     * Single use features are used once and then depleted, like API calls or credits. Continuous use features are those being used on an ongoing-basis, like storage or seats.
     */
    featureType?: FeatureType2 | null | undefined;
    /**
     * The amount of usage included for this feature.
     */
    includedUsage?: number | string | null | undefined;
    /**
     * The reset or billing interval of the product item. If null, feature will have no reset date, and if there's a price, it will be billed one-off.
     */
    interval?: CheckItemInterval2 | null | undefined;
    /**
     * The interval count of the product item.
     */
    intervalCount?: number | null | undefined;
    /**
     * The price of the product item. Should be `null` if tiered pricing is set.
     */
    price?: number | null | undefined;
    /**
     * Tiered pricing for the product item. Not applicable for fixed price items.
     */
    tiers?: Array<any | null> | null | undefined;
    /**
     * How tiers are applied: graduated (split across bands) or volume (flat rate for the matched tier). Defaults to graduated.
     */
    tierBehavior?: CheckTierBehavior2 | null | undefined;
    /**
     * Whether the feature should be prepaid upfront or billed for how much they use end of billing period.
     */
    usageModel?: UsageModel2 | null | undefined;
    /**
     * The amount per billing unit (eg. $9 / 250 units)
     */
    billingUnits?: number | null | undefined;
    /**
     * Whether the usage should be reset when the product is enabled.
     */
    resetUsageWhenEnabled?: boolean | null | undefined;
    /**
     * The entity feature ID of the product item if applicable.
     */
    entityFeatureId?: string | null | undefined;
    /**
     * The display of the product item.
     */
    display?: ProductDisplay2 | null | undefined;
    /**
     * Used in customer context. Quantity of the feature the customer has prepaid for.
     */
    quantity?: number | null | undefined;
    /**
     * Used in customer context. Quantity of the feature the customer will prepay for in the next cycle.
     */
    nextCycleQuantity?: number | null | undefined;
    /**
     * Configuration for rollover and proration behavior of the feature.
     */
    config?: CheckConfig2 | null | undefined;
};
/**
 * The duration type of the free trial
 */
declare const FreeTrialDuration2: {
    readonly Day: "day";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * The duration type of the free trial
 */
type FreeTrialDuration2 = OpenEnum<typeof FreeTrialDuration2>;
declare const CheckOnEnd2: {
    readonly Bill: "bill";
    readonly Revert: "revert";
};
type CheckOnEnd2 = OpenEnum<typeof CheckOnEnd2>;
type CheckFreeTrial2 = {
    /**
     * The duration type of the free trial
     */
    duration: FreeTrialDuration2;
    /**
     * The length of the duration type specified
     */
    length: number;
    /**
     * Whether the free trial is limited to one per customer fingerprint
     */
    uniqueFingerprint: boolean;
    /**
     * Whether the free trial requires a card. If false, the customer can attach the product without going through a checkout flow or having a card on file.
     */
    cardRequired: boolean;
    /**
     * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
     */
    onEnd?: CheckOnEnd2 | null | undefined;
    /**
     * Used in customer context. Whether the free trial is available for the customer if they were to attach the product.
     */
    trialAvailable: boolean | null;
};
/**
 * The time interval for the purchase limit window.
 */
declare const CheckPurchaseLimitInterval2: {
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
};
/**
 * The time interval for the purchase limit window.
 */
type CheckPurchaseLimitInterval2 = OpenEnum<typeof CheckPurchaseLimitInterval2>;
/**
 * Optional rate limit to cap how often auto top-ups occur.
 */
type CheckPurchaseLimit2 = {
    /**
     * The time interval for the purchase limit window.
     */
    interval: CheckPurchaseLimitInterval2;
    /**
     * Number of intervals in the purchase limit window.
     */
    intervalCount: number;
    /**
     * Maximum number of auto top-ups allowed within the interval.
     */
    limit: number;
};
type CheckAutoTopup2 = {
    /**
     * The ID of the feature (credit balance) to auto top-up.
     */
    featureId: string;
    /**
     * Whether auto top-up is enabled.
     */
    enabled: boolean;
    /**
     * When the balance drops below this threshold, an auto top-up will be purchased.
     */
    threshold: number;
    /**
     * Amount of credits to add per auto top-up.
     */
    quantity: number;
    /**
     * Optional rate limit to cap how often auto top-ups occur.
     */
    purchaseLimit?: CheckPurchaseLimit2 | undefined;
    /**
     * When true, auto top-up creates a send_invoice invoice instead of auto-charging.
     */
    invoiceMode?: boolean | undefined;
};
/**
 * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
 */
declare const CheckLimitType2: {
    readonly Absolute: "absolute";
    readonly UsagePercentage: "usage_percentage";
};
/**
 * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
 */
type CheckLimitType2 = OpenEnum<typeof CheckLimitType2>;
type CheckSpendLimit2 = {
    /**
     * Optional feature ID this spend limit applies to.
     */
    featureId?: string | undefined;
    /**
     * Whether the overage spend limit is enabled.
     */
    enabled: boolean;
    /**
     * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
     */
    limitType?: CheckLimitType2 | undefined;
    /**
     * Overage cap for the feature: absolute units, or a percent (e.g. 120) when limit_type is usage_percentage.
     */
    overageLimit?: number | undefined;
    /**
     * When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.
     */
    skipOverageBilling?: boolean | undefined;
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
declare const CheckUsageLimitInterval2: {
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
type CheckUsageLimitInterval2 = OpenEnum<typeof CheckUsageLimitInterval2>;
/**
 * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
 */
type CheckFilter2 = {
    properties: {
        [k: string]: any;
    };
};
type CheckUsageLimit2 = {
    /**
     * The feature this usage limit applies to.
     */
    featureId: string;
    /**
     * Whether this usage limit is enabled.
     */
    enabled: boolean;
    /**
     * Maximum units allowed per interval.
     */
    limit: number;
    /**
     * Interval for the cap, aligned to the customer's billing cycle.
     */
    interval: CheckUsageLimitInterval2;
    /**
     * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
     */
    filter?: CheckFilter2 | undefined;
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
declare const CheckThresholdType2: {
    readonly Usage: "usage";
    readonly UsagePercentage: "usage_percentage";
    readonly Remaining: "remaining";
    readonly RemainingPercentage: "remaining_percentage";
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
type CheckThresholdType2 = OpenEnum<typeof CheckThresholdType2>;
type CheckUsageAlert2 = {
    /**
     * The feature ID this alert applies to.
     */
    featureId?: string | undefined;
    /**
     * Whether this usage alert is enabled.
     */
    enabled: boolean;
    /**
     * The threshold value that triggers the alert. For usage or remaining, this is an absolute count. For usage_percentage or remaining_percentage, this is a percentage (0-100).
     */
    threshold: number;
    /**
     * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
     */
    thresholdType: CheckThresholdType2;
    /**
     * Optional user-defined label to distinguish multiple alerts on the same feature.
     */
    name?: string | undefined;
};
type CheckOverageAllowed2 = {
    /**
     * The feature ID this overage allowed control applies to.
     */
    featureId: string;
    /**
     * Whether overage is allowed for this feature.
     */
    enabled: boolean;
};
/**
 * Plan-level billing controls used as customer defaults
 */
type CheckBillingControls2 = {
    /**
     * List of auto top-up configurations per feature.
     */
    autoTopups?: Array<CheckAutoTopup2> | undefined;
    /**
     * List of overage spend limits per feature (caps overage spend).
     */
    spendLimits?: Array<CheckSpendLimit2> | undefined;
    /**
     * List of hard usage caps per feature (max units per interval).
     */
    usageLimits?: Array<CheckUsageLimit2> | undefined;
    /**
     * List of usage alert configurations per feature.
     */
    usageAlerts?: Array<CheckUsageAlert2> | undefined;
    /**
     * List of overage allowed controls per feature. When enabled, usage can exceed balance.
     */
    overageAllowed?: Array<CheckOverageAllowed2> | undefined;
};
/**
 * Scenario for when this product is used in attach flows
 */
declare const ProductScenario2: {
    readonly Scheduled: "scheduled";
    readonly Active: "active";
    readonly New: "new";
    readonly Renew: "renew";
    readonly Upgrade: "upgrade";
    readonly UpdatePrepaidQuantity: "update_prepaid_quantity";
    readonly Downgrade: "downgrade";
    readonly Cancel: "cancel";
    readonly Expired: "expired";
    readonly PastDue: "past_due";
};
/**
 * Scenario for when this product is used in attach flows
 */
type ProductScenario2 = OpenEnum<typeof ProductScenario2>;
type CheckProperties2 = {
    /**
     * True if the product has no base price or usage prices
     */
    isFree: boolean;
    /**
     * True if the product only contains a one-time price
     */
    isOneOff: boolean;
    /**
     * The billing interval group for recurring products (e.g., 'monthly', 'yearly')
     */
    intervalGroup?: string | null | undefined;
    /**
     * True if the product includes a free trial
     */
    hasTrial?: boolean | null | undefined;
    /**
     * True if the product can be updated after creation (only applicable if there are prepaid recurring prices)
     */
    updateable?: boolean | null | undefined;
};
type CheckProduct2 = {
    /**
     * The ID of the product you set when creating the product
     */
    id: string;
    /**
     * The name of the product
     */
    name: string;
    /**
     * Product group which this product belongs to
     */
    group: string | null;
    /**
     * The environment of the product
     */
    env: CheckEnv2;
    /**
     * Whether the product is an add-on and can be purchased alongside other products
     */
    isAddOn: boolean;
    /**
     * Whether the product is the default product
     */
    isDefault: boolean;
    /**
     * Whether this product has been archived and is no longer available
     */
    archived: boolean;
    /**
     * The current version of the product
     */
    version: number;
    /**
     * The timestamp of when the product was created in milliseconds since epoch
     */
    createdAt: number;
    /**
     * Array of product items that define the product's features and pricing
     */
    items: Array<CheckItem2>;
    /**
     * Free trial configuration for this product, if available
     */
    freeTrial: CheckFreeTrial2 | null;
    /**
     * ID of the base variant this product is derived from
     */
    baseVariantId: string | null;
    /**
     * Plan-level billing controls used as customer defaults
     */
    billingControls?: CheckBillingControls2 | undefined;
    /**
     * Scenario for when this product is used in attach flows
     */
    scenario?: ProductScenario2 | undefined;
    properties?: CheckProperties2 | undefined;
};
/**
 * Upgrade/upsell information when access is denied. Only present if with_preview was true and allowed is false.
 */
type Preview2 = {
    /**
     * The reason access was denied. 'usage_limit' means the customer exceeded their balance, 'feature_flag' means the feature is not included in their plan.
     */
    scenario: Scenario2;
    /**
     * A title suitable for displaying in a paywall or upgrade modal.
     */
    title: string;
    /**
     * A message explaining why access was denied.
     */
    message: string;
    /**
     * The ID of the feature that was checked.
     */
    featureId: string;
    /**
     * The display name of the feature.
     */
    featureName: string;
    /**
     * Products that would grant access to this feature. Use to display upgrade options.
     */
    products: Array<CheckProduct2>;
};
/**
 * Accepted. Autumn is experiencing degraded service from a downstream provider, so access was allowed fail-open.
 */
type CheckResponseBody2 = {
    /**
     * Whether the customer is allowed to use the feature. True if they have sufficient balance or the feature is unlimited/boolean.
     */
    allowed: boolean;
    /**
     * The ID of the customer that was checked.
     */
    customerId: string;
    /**
     * The ID of the entity, if an entity-scoped check was performed.
     */
    entityId?: string | null | undefined;
    /**
     * The required balance that was checked against.
     */
    requiredBalance?: number | undefined;
    /**
     * The customer's balance for this feature. Null if the customer has no balance for this feature.
     */
    balance: Balance | null;
    /**
     * Map of feature_id to balance for the checked feature and any related features (e.g. linked credit systems).
     */
    balances?: {
        [k: string]: Balance | null;
    } | undefined;
    /**
     * The flag associated with this check, if any.
     */
    flag: Flag2 | null;
    /**
     * Upgrade/upsell information when access is denied. Only present if with_preview was true and allowed is false.
     */
    preview?: Preview2 | undefined;
};
/**
 * Feature type: 'boolean' for on/off access, 'metered' for usage-tracked features, 'credit_system' for unified credit pools, 'ai_credit_system' for model-based token pricing.
 */
declare const FlagType1: {
    readonly Boolean: "boolean";
    readonly Metered: "metered";
    readonly CreditSystem: "credit_system";
    readonly AiCreditSystem: "ai_credit_system";
};
/**
 * Feature type: 'boolean' for on/off access, 'metered' for usage-tracked features, 'credit_system' for unified credit pools, 'ai_credit_system' for model-based token pricing.
 */
type FlagType1 = OpenEnum<typeof FlagType1>;
type CheckCreditSchema1 = {
    /**
     * ID of the metered feature that draws from this credit system.
     */
    meteredFeatureId: string;
    /**
     * Credits consumed per unit of the metered feature.
     */
    creditCost: number;
};
type CheckModelMarkups1 = {
    markup?: number | undefined;
    inputCost?: number | undefined;
    outputCost?: number | undefined;
};
type CheckProviderMarkups1 = {
    markup: number;
};
/**
 * Display names for the feature in billing UI and customer-facing components.
 */
type FlagDisplay1 = {
    /**
     * Singular form for UI display (e.g., 'API call', 'seat').
     */
    singular?: string | null | undefined;
    /**
     * Plural form for UI display (e.g., 'API calls', 'seats').
     */
    plural?: string | null | undefined;
};
/**
 * The full feature object if expanded.
 */
type CheckFeature1 = {
    /**
     * The unique identifier for this feature, used in /check and /track calls.
     */
    id: string;
    /**
     * Human-readable name displayed in the dashboard and billing UI.
     */
    name: string;
    /**
     * Feature type: 'boolean' for on/off access, 'metered' for usage-tracked features, 'credit_system' for unified credit pools, 'ai_credit_system' for model-based token pricing.
     */
    type: FlagType1;
    /**
     * For metered features: true if usage resets periodically (API calls, credits), false if allocated persistently (seats, storage).
     */
    consumable: boolean;
    /**
     * Event names that trigger this feature's balance. Allows multiple features to respond to a single event.
     */
    eventNames?: Array<string> | undefined;
    /**
     * For credit_system features: maps metered features to their credit costs.
     */
    creditSchema?: Array<CheckCreditSchema1> | undefined;
    /**
     * Per-model markup overrides for AI credit systems.
     */
    modelMarkups?: {
        [k: string]: CheckModelMarkups1;
    } | null | undefined;
    /**
     * Default percentage markup for AI credit systems. Use -100 to make usage free.
     */
    defaultMarkup?: number | undefined;
    /**
     * Per-provider default markup percentages for AI credit systems.
     */
    providerMarkups?: {
        [k: string]: CheckProviderMarkups1;
    } | null | undefined;
    /**
     * Display names for the feature in billing UI and customer-facing components.
     */
    display?: FlagDisplay1 | undefined;
    /**
     * Whether the feature is archived and hidden from the dashboard.
     */
    archived: boolean;
};
type Flag1 = {
    /**
     * The unique identifier for this flag.
     */
    id: string;
    /**
     * The plan ID this flag originates from, or null for standalone flags.
     */
    planId: string | null;
    /**
     * Timestamp when this flag expires, or null for no expiration.
     */
    expiresAt: number | null;
    /**
     * The feature ID this flag is for.
     */
    featureId: string;
    /**
     * The full feature object if expanded.
     */
    feature?: CheckFeature1 | undefined;
};
/**
 * The reason access was denied. 'usage_limit' means the customer exceeded their balance, 'feature_flag' means the feature is not included in their plan.
 */
declare const Scenario1: {
    readonly UsageLimit: "usage_limit";
    readonly FeatureFlag: "feature_flag";
};
/**
 * The reason access was denied. 'usage_limit' means the customer exceeded their balance, 'feature_flag' means the feature is not included in their plan.
 */
type Scenario1 = OpenEnum<typeof Scenario1>;
/**
 * The environment of the product
 */
declare const CheckEnv1: {
    readonly Sandbox: "sandbox";
    readonly Live: "live";
};
/**
 * The environment of the product
 */
type CheckEnv1 = OpenEnum<typeof CheckEnv1>;
declare const ProductType1: {
    readonly Feature: "feature";
    readonly PricedFeature: "priced_feature";
    readonly Price: "price";
};
type ProductType1 = OpenEnum<typeof ProductType1>;
declare const FeatureType1: {
    readonly SingleUse: "single_use";
    readonly ContinuousUse: "continuous_use";
    readonly Boolean: "boolean";
    readonly Static: "static";
};
type FeatureType1 = OpenEnum<typeof FeatureType1>;
declare const CheckItemInterval1: {
    readonly Minute: "minute";
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
type CheckItemInterval1 = OpenEnum<typeof CheckItemInterval1>;
declare const CheckTierBehavior1: {
    readonly Graduated: "graduated";
    readonly Volume: "volume";
};
type CheckTierBehavior1 = OpenEnum<typeof CheckTierBehavior1>;
declare const UsageModel1: {
    readonly Prepaid: "prepaid";
    readonly PayPerUse: "pay_per_use";
};
type UsageModel1 = OpenEnum<typeof UsageModel1>;
type ProductDisplay1 = {
    primaryText: string;
    secondaryText?: string | null | undefined;
};
declare const ConfigDuration1: {
    readonly Month: "month";
    readonly Forever: "forever";
};
type ConfigDuration1 = OpenEnum<typeof ConfigDuration1>;
type CheckRollover1 = {
    max?: number | null | undefined;
    maxPercentage?: number | null | undefined;
    duration: ConfigDuration1;
    length: number;
};
declare const CheckOnIncrease1: {
    readonly BillImmediately: "bill_immediately";
    readonly ProrateImmediately: "prorate_immediately";
    readonly ProrateNextCycle: "prorate_next_cycle";
    readonly BillNextCycle: "bill_next_cycle";
};
type CheckOnIncrease1 = OpenEnum<typeof CheckOnIncrease1>;
declare const CheckOnDecrease1: {
    readonly Prorate: "prorate";
    readonly ProrateImmediately: "prorate_immediately";
    readonly ProrateNextCycle: "prorate_next_cycle";
    readonly None: "none";
    readonly NoProrations: "no_prorations";
};
type CheckOnDecrease1 = OpenEnum<typeof CheckOnDecrease1>;
type CheckConfig1 = {
    rollover?: CheckRollover1 | null | undefined;
    onIncrease?: CheckOnIncrease1 | null | undefined;
    onDecrease?: CheckOnDecrease1 | null | undefined;
};
/**
 * Product item defining features and pricing within a product
 */
type CheckItem1 = {
    /**
     * The type of the product item
     */
    type?: ProductType1 | null | undefined;
    /**
     * The feature ID of the product item. If the item is a fixed price, should be `null`
     */
    featureId?: string | null | undefined;
    /**
     * Single use features are used once and then depleted, like API calls or credits. Continuous use features are those being used on an ongoing-basis, like storage or seats.
     */
    featureType?: FeatureType1 | null | undefined;
    /**
     * The amount of usage included for this feature.
     */
    includedUsage?: number | string | null | undefined;
    /**
     * The reset or billing interval of the product item. If null, feature will have no reset date, and if there's a price, it will be billed one-off.
     */
    interval?: CheckItemInterval1 | null | undefined;
    /**
     * The interval count of the product item.
     */
    intervalCount?: number | null | undefined;
    /**
     * The price of the product item. Should be `null` if tiered pricing is set.
     */
    price?: number | null | undefined;
    /**
     * Tiered pricing for the product item. Not applicable for fixed price items.
     */
    tiers?: Array<any | null> | null | undefined;
    /**
     * How tiers are applied: graduated (split across bands) or volume (flat rate for the matched tier). Defaults to graduated.
     */
    tierBehavior?: CheckTierBehavior1 | null | undefined;
    /**
     * Whether the feature should be prepaid upfront or billed for how much they use end of billing period.
     */
    usageModel?: UsageModel1 | null | undefined;
    /**
     * The amount per billing unit (eg. $9 / 250 units)
     */
    billingUnits?: number | null | undefined;
    /**
     * Whether the usage should be reset when the product is enabled.
     */
    resetUsageWhenEnabled?: boolean | null | undefined;
    /**
     * The entity feature ID of the product item if applicable.
     */
    entityFeatureId?: string | null | undefined;
    /**
     * The display of the product item.
     */
    display?: ProductDisplay1 | null | undefined;
    /**
     * Used in customer context. Quantity of the feature the customer has prepaid for.
     */
    quantity?: number | null | undefined;
    /**
     * Used in customer context. Quantity of the feature the customer will prepay for in the next cycle.
     */
    nextCycleQuantity?: number | null | undefined;
    /**
     * Configuration for rollover and proration behavior of the feature.
     */
    config?: CheckConfig1 | null | undefined;
};
/**
 * The duration type of the free trial
 */
declare const FreeTrialDuration1: {
    readonly Day: "day";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * The duration type of the free trial
 */
type FreeTrialDuration1 = OpenEnum<typeof FreeTrialDuration1>;
declare const CheckOnEnd1: {
    readonly Bill: "bill";
    readonly Revert: "revert";
};
type CheckOnEnd1 = OpenEnum<typeof CheckOnEnd1>;
type CheckFreeTrial1 = {
    /**
     * The duration type of the free trial
     */
    duration: FreeTrialDuration1;
    /**
     * The length of the duration type specified
     */
    length: number;
    /**
     * Whether the free trial is limited to one per customer fingerprint
     */
    uniqueFingerprint: boolean;
    /**
     * Whether the free trial requires a card. If false, the customer can attach the product without going through a checkout flow or having a card on file.
     */
    cardRequired: boolean;
    /**
     * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
     */
    onEnd?: CheckOnEnd1 | null | undefined;
    /**
     * Used in customer context. Whether the free trial is available for the customer if they were to attach the product.
     */
    trialAvailable: boolean | null;
};
/**
 * The time interval for the purchase limit window.
 */
declare const CheckPurchaseLimitInterval1: {
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
};
/**
 * The time interval for the purchase limit window.
 */
type CheckPurchaseLimitInterval1 = OpenEnum<typeof CheckPurchaseLimitInterval1>;
/**
 * Optional rate limit to cap how often auto top-ups occur.
 */
type CheckPurchaseLimit1 = {
    /**
     * The time interval for the purchase limit window.
     */
    interval: CheckPurchaseLimitInterval1;
    /**
     * Number of intervals in the purchase limit window.
     */
    intervalCount: number;
    /**
     * Maximum number of auto top-ups allowed within the interval.
     */
    limit: number;
};
type CheckAutoTopup1 = {
    /**
     * The ID of the feature (credit balance) to auto top-up.
     */
    featureId: string;
    /**
     * Whether auto top-up is enabled.
     */
    enabled: boolean;
    /**
     * When the balance drops below this threshold, an auto top-up will be purchased.
     */
    threshold: number;
    /**
     * Amount of credits to add per auto top-up.
     */
    quantity: number;
    /**
     * Optional rate limit to cap how often auto top-ups occur.
     */
    purchaseLimit?: CheckPurchaseLimit1 | undefined;
    /**
     * When true, auto top-up creates a send_invoice invoice instead of auto-charging.
     */
    invoiceMode?: boolean | undefined;
};
/**
 * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
 */
declare const CheckLimitType1: {
    readonly Absolute: "absolute";
    readonly UsagePercentage: "usage_percentage";
};
/**
 * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
 */
type CheckLimitType1 = OpenEnum<typeof CheckLimitType1>;
type CheckSpendLimit1 = {
    /**
     * Optional feature ID this spend limit applies to.
     */
    featureId?: string | undefined;
    /**
     * Whether the overage spend limit is enabled.
     */
    enabled: boolean;
    /**
     * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
     */
    limitType?: CheckLimitType1 | undefined;
    /**
     * Overage cap for the feature: absolute units, or a percent (e.g. 120) when limit_type is usage_percentage.
     */
    overageLimit?: number | undefined;
    /**
     * When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.
     */
    skipOverageBilling?: boolean | undefined;
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
declare const CheckUsageLimitInterval1: {
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
type CheckUsageLimitInterval1 = OpenEnum<typeof CheckUsageLimitInterval1>;
/**
 * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
 */
type CheckFilter1 = {
    properties: {
        [k: string]: any;
    };
};
type CheckUsageLimit1 = {
    /**
     * The feature this usage limit applies to.
     */
    featureId: string;
    /**
     * Whether this usage limit is enabled.
     */
    enabled: boolean;
    /**
     * Maximum units allowed per interval.
     */
    limit: number;
    /**
     * Interval for the cap, aligned to the customer's billing cycle.
     */
    interval: CheckUsageLimitInterval1;
    /**
     * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
     */
    filter?: CheckFilter1 | undefined;
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
declare const CheckThresholdType1: {
    readonly Usage: "usage";
    readonly UsagePercentage: "usage_percentage";
    readonly Remaining: "remaining";
    readonly RemainingPercentage: "remaining_percentage";
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
type CheckThresholdType1 = OpenEnum<typeof CheckThresholdType1>;
type CheckUsageAlert1 = {
    /**
     * The feature ID this alert applies to.
     */
    featureId?: string | undefined;
    /**
     * Whether this usage alert is enabled.
     */
    enabled: boolean;
    /**
     * The threshold value that triggers the alert. For usage or remaining, this is an absolute count. For usage_percentage or remaining_percentage, this is a percentage (0-100).
     */
    threshold: number;
    /**
     * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
     */
    thresholdType: CheckThresholdType1;
    /**
     * Optional user-defined label to distinguish multiple alerts on the same feature.
     */
    name?: string | undefined;
};
type CheckOverageAllowed1 = {
    /**
     * The feature ID this overage allowed control applies to.
     */
    featureId: string;
    /**
     * Whether overage is allowed for this feature.
     */
    enabled: boolean;
};
/**
 * Plan-level billing controls used as customer defaults
 */
type CheckBillingControls1 = {
    /**
     * List of auto top-up configurations per feature.
     */
    autoTopups?: Array<CheckAutoTopup1> | undefined;
    /**
     * List of overage spend limits per feature (caps overage spend).
     */
    spendLimits?: Array<CheckSpendLimit1> | undefined;
    /**
     * List of hard usage caps per feature (max units per interval).
     */
    usageLimits?: Array<CheckUsageLimit1> | undefined;
    /**
     * List of usage alert configurations per feature.
     */
    usageAlerts?: Array<CheckUsageAlert1> | undefined;
    /**
     * List of overage allowed controls per feature. When enabled, usage can exceed balance.
     */
    overageAllowed?: Array<CheckOverageAllowed1> | undefined;
};
/**
 * Scenario for when this product is used in attach flows
 */
declare const ProductScenario1: {
    readonly Scheduled: "scheduled";
    readonly Active: "active";
    readonly New: "new";
    readonly Renew: "renew";
    readonly Upgrade: "upgrade";
    readonly UpdatePrepaidQuantity: "update_prepaid_quantity";
    readonly Downgrade: "downgrade";
    readonly Cancel: "cancel";
    readonly Expired: "expired";
    readonly PastDue: "past_due";
};
/**
 * Scenario for when this product is used in attach flows
 */
type ProductScenario1 = OpenEnum<typeof ProductScenario1>;
type CheckProperties1 = {
    /**
     * True if the product has no base price or usage prices
     */
    isFree: boolean;
    /**
     * True if the product only contains a one-time price
     */
    isOneOff: boolean;
    /**
     * The billing interval group for recurring products (e.g., 'monthly', 'yearly')
     */
    intervalGroup?: string | null | undefined;
    /**
     * True if the product includes a free trial
     */
    hasTrial?: boolean | null | undefined;
    /**
     * True if the product can be updated after creation (only applicable if there are prepaid recurring prices)
     */
    updateable?: boolean | null | undefined;
};
type CheckProduct1 = {
    /**
     * The ID of the product you set when creating the product
     */
    id: string;
    /**
     * The name of the product
     */
    name: string;
    /**
     * Product group which this product belongs to
     */
    group: string | null;
    /**
     * The environment of the product
     */
    env: CheckEnv1;
    /**
     * Whether the product is an add-on and can be purchased alongside other products
     */
    isAddOn: boolean;
    /**
     * Whether the product is the default product
     */
    isDefault: boolean;
    /**
     * Whether this product has been archived and is no longer available
     */
    archived: boolean;
    /**
     * The current version of the product
     */
    version: number;
    /**
     * The timestamp of when the product was created in milliseconds since epoch
     */
    createdAt: number;
    /**
     * Array of product items that define the product's features and pricing
     */
    items: Array<CheckItem1>;
    /**
     * Free trial configuration for this product, if available
     */
    freeTrial: CheckFreeTrial1 | null;
    /**
     * ID of the base variant this product is derived from
     */
    baseVariantId: string | null;
    /**
     * Plan-level billing controls used as customer defaults
     */
    billingControls?: CheckBillingControls1 | undefined;
    /**
     * Scenario for when this product is used in attach flows
     */
    scenario?: ProductScenario1 | undefined;
    properties?: CheckProperties1 | undefined;
};
/**
 * Upgrade/upsell information when access is denied. Only present if with_preview was true and allowed is false.
 */
type Preview1 = {
    /**
     * The reason access was denied. 'usage_limit' means the customer exceeded their balance, 'feature_flag' means the feature is not included in their plan.
     */
    scenario: Scenario1;
    /**
     * A title suitable for displaying in a paywall or upgrade modal.
     */
    title: string;
    /**
     * A message explaining why access was denied.
     */
    message: string;
    /**
     * The ID of the feature that was checked.
     */
    featureId: string;
    /**
     * The display name of the feature.
     */
    featureName: string;
    /**
     * Products that would grant access to this feature. Use to display upgrade options.
     */
    products: Array<CheckProduct1>;
};
/**
 * OK
 */
type CheckResponseBody1 = {
    /**
     * Whether the customer is allowed to use the feature. True if they have sufficient balance or the feature is unlimited/boolean.
     */
    allowed: boolean;
    /**
     * The ID of the customer that was checked.
     */
    customerId: string;
    /**
     * The ID of the entity, if an entity-scoped check was performed.
     */
    entityId?: string | null | undefined;
    /**
     * The required balance that was checked against.
     */
    requiredBalance?: number | undefined;
    /**
     * The customer's balance for this feature. Null if the customer has no balance for this feature.
     */
    balance: Balance | null;
    /**
     * Map of feature_id to balance for the checked feature and any related features (e.g. linked credit systems).
     */
    balances?: {
        [k: string]: Balance | null;
    } | undefined;
    /**
     * The flag associated with this check, if any.
     */
    flag: Flag1 | null;
    /**
     * Upgrade/upsell information when access is denied. Only present if with_preview was true and allowed is false.
     */
    preview?: Preview1 | undefined;
};
type CheckResponse = CheckResponseBody1 | CheckResponseBody2;

/**
 * The time interval for the purchase limit window.
 */
declare const CustomerDataPurchaseLimitInterval: {
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
};
/**
 * The time interval for the purchase limit window.
 */
type CustomerDataPurchaseLimitInterval = ClosedEnum<typeof CustomerDataPurchaseLimitInterval>;
/**
 * Optional rate limit to cap how often auto top-ups occur.
 */
type CustomerDataPurchaseLimit = {
    /**
     * The time interval for the purchase limit window.
     */
    interval: CustomerDataPurchaseLimitInterval;
    /**
     * Number of intervals in the purchase limit window.
     */
    intervalCount?: number | undefined;
    /**
     * Maximum number of auto top-ups allowed within the interval.
     */
    limit: number;
};
type CustomerDataAutoTopup = {
    /**
     * The ID of the feature (credit balance) to auto top-up.
     */
    featureId: string;
    /**
     * Whether auto top-up is enabled.
     */
    enabled?: boolean | undefined;
    /**
     * When the balance drops below this threshold, an auto top-up will be purchased.
     */
    threshold: number;
    /**
     * Amount of credits to add per auto top-up.
     */
    quantity: number;
    /**
     * Optional rate limit to cap how often auto top-ups occur.
     */
    purchaseLimit?: CustomerDataPurchaseLimit | undefined;
    /**
     * When true, auto top-up creates a send_invoice invoice instead of auto-charging.
     */
    invoiceMode?: boolean | undefined;
};
/**
 * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
 */
declare const CustomerDataLimitType: {
    readonly Absolute: "absolute";
    readonly UsagePercentage: "usage_percentage";
};
/**
 * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
 */
type CustomerDataLimitType = ClosedEnum<typeof CustomerDataLimitType>;
type CustomerDataSpendLimit = {
    /**
     * Optional feature ID this spend limit applies to.
     */
    featureId?: string | undefined;
    /**
     * Whether the overage spend limit is enabled.
     */
    enabled?: boolean | undefined;
    /**
     * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
     */
    limitType?: CustomerDataLimitType | undefined;
    /**
     * Overage cap for the feature: absolute units, or a percent (e.g. 120) when limit_type is usage_percentage.
     */
    overageLimit?: number | undefined;
    /**
     * When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.
     */
    skipOverageBilling?: boolean | undefined;
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
declare const CustomerDataUsageLimitInterval: {
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
type CustomerDataUsageLimitInterval = ClosedEnum<typeof CustomerDataUsageLimitInterval>;
/**
 * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
 */
type CustomerDataFilter = {
    properties: {
        [k: string]: string | number | boolean;
    };
};
type CustomerDataUsageLimit = {
    /**
     * The feature this usage limit applies to.
     */
    featureId: string;
    /**
     * Whether this usage limit is enabled.
     */
    enabled?: boolean | undefined;
    /**
     * Maximum units allowed per interval.
     */
    limit: number;
    /**
     * Interval for the cap, aligned to the customer's billing cycle.
     */
    interval: CustomerDataUsageLimitInterval;
    /**
     * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
     */
    filter?: CustomerDataFilter | undefined;
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
declare const CustomerDataThresholdType: {
    readonly Usage: "usage";
    readonly UsagePercentage: "usage_percentage";
    readonly Remaining: "remaining";
    readonly RemainingPercentage: "remaining_percentage";
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
type CustomerDataThresholdType = ClosedEnum<typeof CustomerDataThresholdType>;
type CustomerDataUsageAlert = {
    /**
     * The feature ID this alert applies to.
     */
    featureId?: string | undefined;
    /**
     * Whether this usage alert is enabled.
     */
    enabled?: boolean | undefined;
    /**
     * The threshold value that triggers the alert. For usage or remaining, this is an absolute count. For usage_percentage or remaining_percentage, this is a percentage (0-100).
     */
    threshold: number;
    /**
     * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
     */
    thresholdType: CustomerDataThresholdType;
    /**
     * Optional user-defined label to distinguish multiple alerts on the same feature.
     */
    name?: string | undefined;
};
type CustomerDataOverageAllowed = {
    /**
     * The feature ID this overage allowed control applies to.
     */
    featureId: string;
    /**
     * Whether overage is allowed for this feature.
     */
    enabled?: boolean | undefined;
};
/**
 * Billing controls for the customer (auto top-ups, etc.)
 */
type CustomerDataBillingControls = {
    /**
     * List of auto top-up configurations per feature.
     */
    autoTopups?: Array<CustomerDataAutoTopup> | undefined;
    /**
     * List of overage spend limits per feature (caps overage spend).
     */
    spendLimits?: Array<CustomerDataSpendLimit> | undefined;
    /**
     * List of hard usage caps per feature (max units per interval).
     */
    usageLimits?: Array<CustomerDataUsageLimit> | undefined;
    /**
     * List of usage alert configurations per feature.
     */
    usageAlerts?: Array<CustomerDataUsageAlert> | undefined;
    /**
     * List of overage allowed controls per feature. When enabled, usage can exceed balance.
     */
    overageAllowed?: Array<CustomerDataOverageAllowed> | undefined;
};
/**
 * Miscellaneous configurations for the customer.
 */
type CustomerDataConfig = {
    /**
     * Whether to disable the shared customer-level pool for entities.
     */
    disablePooledBalance?: boolean | undefined;
    /**
     * Stops Autumn from posting usage-overage line items to Stripe for this customer. Check/track and balance resets still behave normally. When set, this overrides the organization-level disable_overage_billing setting.
     */
    disableOverageBilling?: boolean | undefined;
};
/**
 * Customer details to set when creating a customer
 */
type CustomerData = {
    /**
     * Customer's name
     */
    name?: string | null | undefined;
    /**
     * Customer's email address
     */
    email?: string | null | undefined;
    /**
     * Unique identifier (eg, serial number) to detect duplicate customers and prevent free trial abuse
     */
    fingerprint?: string | null | undefined;
    /**
     * Additional metadata for the customer
     */
    metadata?: {
        [k: string]: any;
    } | null | undefined;
    /**
     * Stripe customer ID if you already have one
     */
    stripeId?: string | null | undefined;
    /**
     * Whether to create the customer in Stripe
     */
    createInStripe?: boolean | undefined;
    /**
     * The ID of the free plan to auto-enable for the customer
     */
    autoEnablePlanId?: string | undefined;
    /**
     * Whether to send email receipts to this customer
     */
    sendEmailReceipts?: boolean | undefined;
    /**
     * Billing controls for the customer (auto top-ups, etc.)
     */
    billingControls?: CustomerDataBillingControls | undefined;
    /**
     * Miscellaneous configurations for the customer.
     */
    config?: CustomerDataConfig | undefined;
};

type CreateReferralCodeParams = {
    /**
     * The unique identifier of the customer
     */
    customerId: string;
    /**
     * ID of your referral program
     */
    programId: string;
};
/**
 * OK
 */
type CreateReferralCodeResponse = {
    /**
     * The referral code that can be shared with customers
     */
    code: string;
    /**
     * Your unique identifier for the customer
     */
    customerId: string;
    /**
     * The timestamp of when the referral code was created
     */
    createdAt: number;
};

type GetEntityParams = {
    /**
     * The ID of the customer to create the entity for.
     */
    customerId?: string | undefined;
    /**
     * The ID of the entity.
     */
    entityId: string;
};
/**
 * The environment (sandbox/live)
 */
declare const GetEntityEnv: {
    readonly Sandbox: "sandbox";
    readonly Live: "live";
};
/**
 * The environment (sandbox/live)
 */
type GetEntityEnv = OpenEnum<typeof GetEntityEnv>;
/**
 * Current status of the subscription.
 */
declare const GetEntityStatus: {
    readonly Active: "active";
    readonly Scheduled: "scheduled";
};
/**
 * Current status of the subscription.
 */
type GetEntityStatus = OpenEnum<typeof GetEntityStatus>;
/**
 * Whether this subscription is attached at the customer level or entity level.
 */
declare const GetEntitySubscriptionScope: {
    readonly Customer: "customer";
    readonly Entity: "entity";
};
/**
 * Whether this subscription is attached at the customer level or entity level.
 */
type GetEntitySubscriptionScope = OpenEnum<typeof GetEntitySubscriptionScope>;
type GetEntitySubscription = {
    /**
     * The unique identifier of this subscription. If a subscription_id was provided at attach time, it is used; otherwise, falls back to the internal ID.
     */
    id: string;
    plan?: Plan | undefined;
    /**
     * The unique identifier of the subscribed plan.
     */
    planId: string;
    /**
     * Whether the plan was automatically enabled for the customer.
     */
    autoEnable: boolean;
    /**
     * Whether this is an add-on plan rather than a base subscription.
     */
    addOn: boolean;
    /**
     * Current status of the subscription.
     */
    status: GetEntityStatus;
    /**
     * Whether the subscription has overdue payments.
     */
    pastDue: boolean;
    /**
     * Timestamp when the subscription was canceled, or null if not canceled.
     */
    canceledAt: number | null;
    /**
     * Timestamp when the subscription will expire, or null if no expiry set.
     */
    expiresAt: number | null;
    /**
     * Timestamp when the trial period ends, or null if not on trial.
     */
    trialEndsAt: number | null;
    /**
     * Timestamp when the subscription started.
     */
    startedAt: number;
    /**
     * Start timestamp of the current billing period.
     */
    currentPeriodStart: number | null;
    /**
     * End timestamp of the current billing period.
     */
    currentPeriodEnd: number | null;
    /**
     * Number of units of this subscription (for per-seat plans).
     */
    quantity: number;
    /**
     * Whether this subscription is attached at the customer level or entity level.
     */
    scope?: GetEntitySubscriptionScope | undefined;
};
/**
 * Whether this purchase is attached at the customer level or entity level.
 */
declare const GetEntityPurchaseScope: {
    readonly Customer: "customer";
    readonly Entity: "entity";
};
/**
 * Whether this purchase is attached at the customer level or entity level.
 */
type GetEntityPurchaseScope = OpenEnum<typeof GetEntityPurchaseScope>;
type GetEntityPurchase = {
    plan?: Plan | undefined;
    /**
     * The unique identifier of the purchased plan.
     */
    planId: string;
    /**
     * Timestamp when the purchase expires, or null for lifetime access.
     */
    expiresAt: number | null;
    /**
     * Timestamp when the purchase was made.
     */
    startedAt: number;
    /**
     * Number of units purchased.
     */
    quantity: number;
    /**
     * Whether this purchase is attached at the customer level or entity level.
     */
    scope?: GetEntityPurchaseScope | undefined;
};
/**
 * Feature type: 'boolean' for on/off access, 'metered' for usage-tracked features, 'credit_system' for unified credit pools, 'ai_credit_system' for model-based token pricing.
 */
declare const GetEntityType: {
    readonly Boolean: "boolean";
    readonly Metered: "metered";
    readonly CreditSystem: "credit_system";
    readonly AiCreditSystem: "ai_credit_system";
};
/**
 * Feature type: 'boolean' for on/off access, 'metered' for usage-tracked features, 'credit_system' for unified credit pools, 'ai_credit_system' for model-based token pricing.
 */
type GetEntityType = OpenEnum<typeof GetEntityType>;
type GetEntityCreditSchema = {
    /**
     * ID of the metered feature that draws from this credit system.
     */
    meteredFeatureId: string;
    /**
     * Credits consumed per unit of the metered feature.
     */
    creditCost: number;
};
type GetEntityModelMarkups = {
    markup?: number | undefined;
    inputCost?: number | undefined;
    outputCost?: number | undefined;
};
type GetEntityProviderMarkups = {
    markup: number;
};
/**
 * Display names for the feature in billing UI and customer-facing components.
 */
type GetEntityDisplay = {
    /**
     * Singular form for UI display (e.g., 'API call', 'seat').
     */
    singular?: string | null | undefined;
    /**
     * Plural form for UI display (e.g., 'API calls', 'seats').
     */
    plural?: string | null | undefined;
};
/**
 * The full feature object if expanded.
 */
type GetEntityFeature = {
    /**
     * The unique identifier for this feature, used in /check and /track calls.
     */
    id: string;
    /**
     * Human-readable name displayed in the dashboard and billing UI.
     */
    name: string;
    /**
     * Feature type: 'boolean' for on/off access, 'metered' for usage-tracked features, 'credit_system' for unified credit pools, 'ai_credit_system' for model-based token pricing.
     */
    type: GetEntityType;
    /**
     * For metered features: true if usage resets periodically (API calls, credits), false if allocated persistently (seats, storage).
     */
    consumable: boolean;
    /**
     * Event names that trigger this feature's balance. Allows multiple features to respond to a single event.
     */
    eventNames?: Array<string> | undefined;
    /**
     * For credit_system features: maps metered features to their credit costs.
     */
    creditSchema?: Array<GetEntityCreditSchema> | undefined;
    /**
     * Per-model markup overrides for AI credit systems.
     */
    modelMarkups?: {
        [k: string]: GetEntityModelMarkups;
    } | null | undefined;
    /**
     * Default percentage markup for AI credit systems. Use -100 to make usage free.
     */
    defaultMarkup?: number | undefined;
    /**
     * Per-provider default markup percentages for AI credit systems.
     */
    providerMarkups?: {
        [k: string]: GetEntityProviderMarkups;
    } | null | undefined;
    /**
     * Display names for the feature in billing UI and customer-facing components.
     */
    display?: GetEntityDisplay | undefined;
    /**
     * Whether the feature is archived and hidden from the dashboard.
     */
    archived: boolean;
};
type GetEntityFlags = {
    /**
     * The unique identifier for this flag.
     */
    id: string;
    /**
     * The plan ID this flag originates from, or null for standalone flags.
     */
    planId: string | null;
    /**
     * Timestamp when this flag expires, or null for no expiration.
     */
    expiresAt: number | null;
    /**
     * The feature ID this flag is for.
     */
    featureId: string;
    /**
     * The full feature object if expanded.
     */
    feature?: GetEntityFeature | undefined;
};
/**
 * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
 */
declare const GetEntityLimitType: {
    readonly Absolute: "absolute";
    readonly UsagePercentage: "usage_percentage";
};
/**
 * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
 */
type GetEntityLimitType = OpenEnum<typeof GetEntityLimitType>;
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
declare const GetEntitySpendLimitSource: {
    readonly Customer: "customer";
    readonly Plan: "plan";
};
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
type GetEntitySpendLimitSource = OpenEnum<typeof GetEntitySpendLimitSource>;
type GetEntitySpendLimit = {
    /**
     * Optional feature ID this spend limit applies to.
     */
    featureId?: string | undefined;
    /**
     * Whether the overage spend limit is enabled.
     */
    enabled: boolean;
    /**
     * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
     */
    limitType?: GetEntityLimitType | undefined;
    /**
     * Overage cap for the feature: absolute units, or a percent (e.g. 120) when limit_type is usage_percentage.
     */
    overageLimit?: number | undefined;
    /**
     * When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.
     */
    skipOverageBilling?: boolean | undefined;
    /**
     * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
     */
    source?: GetEntitySpendLimitSource | undefined;
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
declare const GetEntityInterval: {
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
type GetEntityInterval = OpenEnum<typeof GetEntityInterval>;
/**
 * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
 */
type GetEntityFilter = {
    properties: {
        [k: string]: any;
    };
};
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
declare const GetEntityUsageLimitSource: {
    readonly Customer: "customer";
    readonly Plan: "plan";
};
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
type GetEntityUsageLimitSource = OpenEnum<typeof GetEntityUsageLimitSource>;
type GetEntityUsageLimit = {
    /**
     * The feature this usage limit applies to.
     */
    featureId: string;
    /**
     * Whether this usage limit is enabled.
     */
    enabled: boolean;
    /**
     * Maximum units allowed per interval.
     */
    limit: number;
    /**
     * Interval for the cap, aligned to the customer's billing cycle.
     */
    interval: GetEntityInterval;
    /**
     * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
     */
    filter?: GetEntityFilter | undefined;
    /**
     * Current usage already consumed in the active interval. Response-only; not stored on billing controls.
     */
    usage?: number | undefined;
    /**
     * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
     */
    source?: GetEntityUsageLimitSource | undefined;
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
declare const GetEntityThresholdType: {
    readonly Usage: "usage";
    readonly UsagePercentage: "usage_percentage";
    readonly Remaining: "remaining";
    readonly RemainingPercentage: "remaining_percentage";
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
type GetEntityThresholdType = OpenEnum<typeof GetEntityThresholdType>;
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
declare const GetEntityUsageAlertSource: {
    readonly Customer: "customer";
    readonly Plan: "plan";
};
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
type GetEntityUsageAlertSource = OpenEnum<typeof GetEntityUsageAlertSource>;
type GetEntityUsageAlert = {
    /**
     * The feature ID this alert applies to.
     */
    featureId?: string | undefined;
    /**
     * Whether this usage alert is enabled.
     */
    enabled: boolean;
    /**
     * The threshold value that triggers the alert. For usage or remaining, this is an absolute count. For usage_percentage or remaining_percentage, this is a percentage (0-100).
     */
    threshold: number;
    /**
     * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
     */
    thresholdType: GetEntityThresholdType;
    /**
     * Optional user-defined label to distinguish multiple alerts on the same feature.
     */
    name?: string | undefined;
    /**
     * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
     */
    source?: GetEntityUsageAlertSource | undefined;
};
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
declare const GetEntityOverageAllowedSource: {
    readonly Customer: "customer";
    readonly Plan: "plan";
};
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
type GetEntityOverageAllowedSource = OpenEnum<typeof GetEntityOverageAllowedSource>;
type GetEntityOverageAllowed = {
    /**
     * The feature ID this overage allowed control applies to.
     */
    featureId: string;
    /**
     * Whether overage is allowed for this feature.
     */
    enabled: boolean;
    /**
     * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
     */
    source?: GetEntityOverageAllowedSource | undefined;
};
/**
 * Billing controls for the entity.
 */
type GetEntityBillingControls = {
    /**
     * List of spend limits per feature. Each entry caps overage (overage_limit) and/or per-interval usage (usage_limit).
     */
    spendLimits?: Array<GetEntitySpendLimit> | undefined;
    /**
     * List of hard usage caps per feature for this entity. An entity entry overrides the customer's for that feature.
     */
    usageLimits?: Array<GetEntityUsageLimit> | undefined;
    /**
     * List of usage alert configurations per feature.
     */
    usageAlerts?: Array<GetEntityUsageAlert> | undefined;
    /**
     * List of overage allowed controls per feature. When enabled, usage can exceed balance.
     */
    overageAllowed?: Array<GetEntityOverageAllowed> | undefined;
};
/**
 * The billing processor that owns this invoice.
 */
declare const GetEntityProcessorType: {
    readonly Stripe: "stripe";
    readonly Revenuecat: "revenuecat";
};
/**
 * The billing processor that owns this invoice.
 */
type GetEntityProcessorType = OpenEnum<typeof GetEntityProcessorType>;
type GetEntityInvoice = {
    /**
     * Array of plan IDs included in this invoice
     */
    planIds: Array<string>;
    /**
     * The Stripe invoice ID
     */
    stripeId: string;
    /**
     * The billing processor that owns this invoice.
     */
    processorType: GetEntityProcessorType;
    /**
     * The status of the invoice
     */
    status: string;
    /**
     * The total amount of the invoice
     */
    total: number;
    /**
     * The currency code for the invoice
     */
    currency: string;
    /**
     * Timestamp when the invoice was created
     */
    createdAt: number;
    /**
     * URL to the Stripe-hosted invoice page
     */
    hostedInvoiceUrl?: string | null | undefined;
};
/**
 * OK
 */
type GetEntityResponse = {
    /**
     * The unique identifier of the entity
     */
    id: string | null;
    /**
     * The name of the entity
     */
    name: string | null;
    /**
     * The customer ID this entity belongs to
     */
    customerId?: string | null | undefined;
    /**
     * The feature ID this entity belongs to
     */
    featureId?: string | null | undefined;
    /**
     * Unix timestamp when the entity was created
     */
    createdAt: number;
    /**
     * The environment (sandbox/live)
     */
    env: GetEntityEnv;
    subscriptions: Array<GetEntitySubscription>;
    purchases: Array<GetEntityPurchase>;
    balances: {
        [k: string]: Balance;
    };
    flags: {
        [k: string]: GetEntityFlags;
    };
    /**
     * Billing controls for the entity.
     */
    billingControls?: GetEntityBillingControls | undefined;
    /**
     * Invoices for this entity (only included when expand=invoices)
     */
    invoices?: Array<GetEntityInvoice> | undefined;
};

/**
 * Filter events by time range
 */
type ListEventsCustomRange = {
    /**
     * Filter events after this timestamp (epoch milliseconds)
     */
    start?: number | undefined;
    /**
     * Filter events before this timestamp (epoch milliseconds)
     */
    end?: number | undefined;
};
type EventsListParams = {
    /**
     * Opaque pagination cursor. Empty string (default) requests the first page; use next_cursor from a prior response for subsequent pages.
     */
    startCursor?: string | undefined;
    /**
     * Number of items to return. Default 50, hard ceiling 5000.
     */
    limit?: number | undefined;
    /**
     * Filter events by customer ID
     */
    customerId?: string | undefined;
    /**
     * Filter events by entity ID (e.g., per-seat or per-resource)
     */
    entityId?: string | undefined;
    /**
     * Filter by specific feature ID(s)
     */
    featureId?: string | Array<string> | undefined;
    /**
     * Filter events by time range
     */
    customRange?: ListEventsCustomRange | undefined;
};
declare const ListEventsIntervalEnum: {
    readonly OneOff: "one_off";
    readonly Minute: "minute";
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
type ListEventsIntervalEnum = OpenEnum<typeof ListEventsIntervalEnum>;
type ListEventsReset = {
    /**
     * The reset interval (hour, day, week, month, etc.) or 'multiple' if combined from different intervals.
     */
    interval: ListEventsIntervalEnum | string;
    /**
     * Number of intervals between resets (eg. 2 for bi-monthly).
     */
    intervalCount?: number | undefined;
    /**
     * Timestamp when the balance will next reset.
     */
    resetsAt: number | null;
};
type Deductions = {
    /**
     * ID of the underlying balance row that was deducted from (customer_entitlement or rollover).
     */
    balanceId: string;
    /**
     * The feature this balance belongs to.
     */
    featureId: string;
    /**
     * ID of the plan/product this balance belongs to. Null when the balance can't be attributed to a single plan (e.g. it spans multiple).
     */
    planId: string | null;
    /**
     * Reset configuration for the balance this deduction came from, or null if the balance doesn't reset.
     */
    reset: ListEventsReset | null;
    /**
     * Amount deducted from this balance. Positive when usage was consumed, negative when credit was restored (e.g. a refund via negative track value).
     */
    value: number;
};
type ListEventsList = {
    /**
     * Event ID (KSUID)
     */
    id: string;
    /**
     * Event timestamp (epoch milliseconds)
     */
    timestamp: number;
    /**
     * ID of the feature that the event belongs to
     */
    featureId: string;
    /**
     * Customer identifier
     */
    customerId: string;
    /**
     * Event value/count
     */
    value: number;
    /**
     * Event properties (JSON)
     */
    properties: {
        [k: string]: any;
    };
    /**
     * Per-balance breakdown of what this event deducted. Null for events ingested before deductions were tracked; an empty array means the event was accepted but no balance moved.
     */
    deductions: Array<Deductions> | null;
};
/**
 * OK
 */
type ListEventsResponse = {
    /**
     * Items for current page.
     */
    list: Array<ListEventsList>;
    /**
     * Opaque cursor for the next page. Null when there are no more results.
     */
    nextCursor: string | null;
};

/**
 * Billing interval (e.g. 'month', 'year').
 */
declare const MultiAttachPriceInterval: {
    readonly OneOff: "one_off";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
/**
 * Billing interval (e.g. 'month', 'year').
 */
type MultiAttachPriceInterval = ClosedEnum<typeof MultiAttachPriceInterval>;
/**
 * Base price configuration for a plan.
 */
type MultiAttachBasePrice = {
    /**
     * Base price amount for the plan.
     */
    amount: number;
    /**
     * Billing interval (e.g. 'month', 'year').
     */
    interval: MultiAttachPriceInterval;
    /**
     * Number of intervals per billing cycle. Defaults to 1.
     */
    intervalCount?: number | undefined;
};
/**
 * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
 */
declare const MultiAttachResetInterval: {
    readonly OneOff: "one_off";
    readonly Minute: "minute";
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
/**
 * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
 */
type MultiAttachResetInterval = ClosedEnum<typeof MultiAttachResetInterval>;
/**
 * Reset configuration for consumable features. Omit for non-consumable features like seats.
 */
type MultiAttachReset = {
    /**
     * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
     */
    interval: MultiAttachResetInterval;
    /**
     * Number of intervals between resets. Defaults to 1.
     */
    intervalCount?: number | undefined;
};
type MultiAttachTier = {
    to: number | string;
    amount?: number | undefined;
    flatAmount?: number | undefined;
};
declare const MultiAttachTierBehavior: {
    readonly Graduated: "graduated";
    readonly Volume: "volume";
};
type MultiAttachTierBehavior = ClosedEnum<typeof MultiAttachTierBehavior>;
/**
 * Billing interval. For consumable features, should match reset.interval.
 */
declare const MultiAttachItemPriceInterval: {
    readonly OneOff: "one_off";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
/**
 * Billing interval. For consumable features, should match reset.interval.
 */
type MultiAttachItemPriceInterval = ClosedEnum<typeof MultiAttachItemPriceInterval>;
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
declare const MultiAttachBillingMethod: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
type MultiAttachBillingMethod = ClosedEnum<typeof MultiAttachBillingMethod>;
/**
 * Pricing for usage beyond included units. Omit for free features.
 */
type MultiAttachPrice = {
    /**
     * Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
     */
    amount?: number | undefined;
    /**
     * Tiered pricing.  Either 'amount' or 'tiers' is required.
     */
    tiers?: Array<MultiAttachTier> | undefined;
    tierBehavior?: MultiAttachTierBehavior | undefined;
    /**
     * Billing interval. For consumable features, should match reset.interval.
     */
    interval: MultiAttachItemPriceInterval;
    /**
     * Number of intervals per billing cycle. Defaults to 1.
     */
    intervalCount?: number | undefined;
    /**
     * Units per price increment. Usage is rounded UP when billed (e.g. billing_units=100 means 101 rounds to 200).
     */
    billingUnits?: number | undefined;
    /**
     * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
     */
    billingMethod: MultiAttachBillingMethod;
    /**
     * Max units purchasable beyond included. E.g. included=100, max_purchase=300 allows 400 total. Null for no limit.
     */
    maxPurchase?: number | null | undefined;
};
/**
 * Billing behavior when quantity increases mid-cycle.
 */
declare const MultiAttachOnIncrease: {
    readonly BillImmediately: "bill_immediately";
    readonly ProrateImmediately: "prorate_immediately";
    readonly ProrateNextCycle: "prorate_next_cycle";
    readonly BillNextCycle: "bill_next_cycle";
};
/**
 * Billing behavior when quantity increases mid-cycle.
 */
type MultiAttachOnIncrease = ClosedEnum<typeof MultiAttachOnIncrease>;
/**
 * Credit behavior when quantity decreases mid-cycle.
 */
declare const MultiAttachOnDecrease: {
    readonly Prorate: "prorate";
    readonly ProrateImmediately: "prorate_immediately";
    readonly ProrateNextCycle: "prorate_next_cycle";
    readonly None: "none";
    readonly NoProrations: "no_prorations";
};
/**
 * Credit behavior when quantity decreases mid-cycle.
 */
type MultiAttachOnDecrease = ClosedEnum<typeof MultiAttachOnDecrease>;
/**
 * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
 */
type MultiAttachProration = {
    /**
     * Billing behavior when quantity increases mid-cycle.
     */
    onIncrease: MultiAttachOnIncrease;
    /**
     * Credit behavior when quantity decreases mid-cycle.
     */
    onDecrease: MultiAttachOnDecrease;
};
/**
 * When rolled over units expire.
 */
declare const MultiAttachExpiryDurationType: {
    readonly Month: "month";
    readonly Forever: "forever";
};
/**
 * When rolled over units expire.
 */
type MultiAttachExpiryDurationType = ClosedEnum<typeof MultiAttachExpiryDurationType>;
/**
 * Rollover config for unused units. If set, unused included units carry over.
 */
type MultiAttachRollover = {
    /**
     * Max rollover units. Omit for unlimited rollover.
     */
    max?: number | undefined;
    /**
     * Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
     */
    maxPercentage?: number | undefined;
    /**
     * When rolled over units expire.
     */
    expiryDurationType: MultiAttachExpiryDurationType;
    /**
     * Number of periods before expiry.
     */
    expiryDurationLength?: number | undefined;
};
/**
 * Configuration for a feature item in a plan, including usage limits, pricing, and rollover settings.
 */
type MultiAttachPlanItem = {
    /**
     * The ID of the feature to configure.
     */
    featureId: string;
    /**
     * Number of free units included. Balance resets to this each interval for consumable features.
     */
    included?: number | undefined;
    /**
     * If true, customer has unlimited access to this feature.
     */
    unlimited?: boolean | undefined;
    /**
     * Reset configuration for consumable features. Omit for non-consumable features like seats.
     */
    reset?: MultiAttachReset | undefined;
    /**
     * Pricing for usage beyond included units. Omit for free features.
     */
    price?: MultiAttachPrice | undefined;
    /**
     * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
     */
    proration?: MultiAttachProration | undefined;
    /**
     * Rollover config for unused units. If set, unused included units carry over.
     */
    rollover?: MultiAttachRollover | undefined;
};
/**
 * Customize the plan to attach. Can override the price or items.
 */
type MultiAttachCustomize = {
    /**
     * Override the base price of the plan. Pass null to remove the base price.
     */
    price?: MultiAttachBasePrice | null | undefined;
    /**
     * Override the items in the plan.
     */
    items?: Array<MultiAttachPlanItem> | undefined;
};
/**
 * Quantity configuration for a prepaid feature.
 */
type MultiAttachFeatureQuantity = {
    /**
     * The ID of the feature to set quantity for.
     */
    featureId: string;
    /**
     * The quantity of the feature.
     */
    quantity?: number | undefined;
    /**
     * Whether the customer can adjust the quantity.
     */
    adjustable?: boolean | undefined;
};
type MultiAttachPlan = {
    /**
     * The ID of the plan to attach.
     */
    planId: string;
    /**
     * Customize the plan to attach. Can override the price or items.
     */
    customize?: MultiAttachCustomize | undefined;
    /**
     * If this plan contains prepaid features, use this field to specify the quantity of each prepaid feature.
     */
    featureQuantities?: Array<MultiAttachFeatureQuantity> | undefined;
    /**
     * The version of the plan to attach.
     */
    version?: number | undefined;
    /**
     * A unique ID to identify this subscription. Useful when attaching the same plan multiple times.
     */
    subscriptionId?: string | undefined;
};
/**
 * Unit of time for the trial ('day', 'month', 'year').
 */
declare const MultiAttachDurationType: {
    readonly Day: "day";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Unit of time for the trial ('day', 'month', 'year').
 */
type MultiAttachDurationType = ClosedEnum<typeof MultiAttachDurationType>;
/**
 * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
 */
declare const MultiAttachOnEnd: {
    readonly Bill: "bill";
    readonly Revert: "revert";
};
/**
 * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
 */
type MultiAttachOnEnd = ClosedEnum<typeof MultiAttachOnEnd>;
/**
 * Free trial configuration for a plan.
 */
type MultiAttachFreeTrialParams = {
    /**
     * Number of duration_type periods the trial lasts.
     */
    durationLength: number;
    /**
     * Unit of time for the trial ('day', 'month', 'year').
     */
    durationType?: MultiAttachDurationType | undefined;
    /**
     * If true, payment method required to start trial. Customer is charged after trial ends.
     */
    cardRequired?: boolean | undefined;
    /**
     * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
     */
    onEnd?: MultiAttachOnEnd | undefined;
};
/**
 * Invoice mode creates a draft or open invoice and sends it to the customer, instead of charging their card immediately.
 */
type MultiAttachInvoiceMode = {
    /**
     * When true, creates an invoice and sends it to the customer instead of charging their card immediately. Uses Stripe's send_invoice collection method.
     */
    enabled: boolean;
    /**
     * If true, enables the plan immediately even though the invoice is not paid yet.
     */
    enablePlanImmediately?: boolean | undefined;
    /**
     * If true, finalizes the invoice so it can be sent to the customer. If false, keeps it as a draft for manual review.
     */
    finalize?: boolean | undefined;
    /**
     * ID of an invoice template (configured in billing settings) whose footer (e.g. bank details) is applied to the invoice.
     */
    invoiceTemplateId?: string | undefined;
    /**
     * Number of days the customer has to pay the invoice before it is due (Stripe days_until_due).
     */
    netTermsDays?: number | undefined;
};
/**
 * A discount to apply. Can be either a reward ID or a promotion code.
 */
type MultiAttachAttachDiscount = {
    /**
     * The ID of the reward to apply as a discount.
     */
    rewardId?: string | undefined;
    /**
     * The promotion code to apply as a discount.
     */
    promotionCode?: string | undefined;
};
/**
 * Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects.
 */
declare const MultiAttachRedirectMode: {
    readonly Always: "always";
    readonly IfRequired: "if_required";
    readonly Never: "never";
};
/**
 * Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects.
 */
type MultiAttachRedirectMode = ClosedEnum<typeof MultiAttachRedirectMode>;
/**
 * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
 */
declare const MultiAttachLimitType: {
    readonly Absolute: "absolute";
    readonly UsagePercentage: "usage_percentage";
};
/**
 * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
 */
type MultiAttachLimitType = ClosedEnum<typeof MultiAttachLimitType>;
type MultiAttachSpendLimit = {
    /**
     * Optional feature ID this spend limit applies to.
     */
    featureId?: string | undefined;
    /**
     * Whether the overage spend limit is enabled.
     */
    enabled?: boolean | undefined;
    /**
     * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
     */
    limitType?: MultiAttachLimitType | undefined;
    /**
     * Overage cap for the feature: absolute units, or a percent (e.g. 120) when limit_type is usage_percentage.
     */
    overageLimit?: number | undefined;
    /**
     * When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.
     */
    skipOverageBilling?: boolean | undefined;
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
declare const MultiAttachEntityDataInterval: {
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
type MultiAttachEntityDataInterval = ClosedEnum<typeof MultiAttachEntityDataInterval>;
/**
 * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
 */
type MultiAttachFilter = {
    properties: {
        [k: string]: string | number | boolean;
    };
};
type MultiAttachUsageLimit = {
    /**
     * The feature this usage limit applies to.
     */
    featureId: string;
    /**
     * Whether this usage limit is enabled.
     */
    enabled?: boolean | undefined;
    /**
     * Maximum units allowed per interval.
     */
    limit: number;
    /**
     * Interval for the cap, aligned to the customer's billing cycle.
     */
    interval: MultiAttachEntityDataInterval;
    /**
     * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
     */
    filter?: MultiAttachFilter | undefined;
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
declare const MultiAttachThresholdType: {
    readonly Usage: "usage";
    readonly UsagePercentage: "usage_percentage";
    readonly Remaining: "remaining";
    readonly RemainingPercentage: "remaining_percentage";
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
type MultiAttachThresholdType = ClosedEnum<typeof MultiAttachThresholdType>;
type MultiAttachUsageAlert = {
    /**
     * The feature ID this alert applies to.
     */
    featureId?: string | undefined;
    /**
     * Whether this usage alert is enabled.
     */
    enabled?: boolean | undefined;
    /**
     * The threshold value that triggers the alert. For usage or remaining, this is an absolute count. For usage_percentage or remaining_percentage, this is a percentage (0-100).
     */
    threshold: number;
    /**
     * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
     */
    thresholdType: MultiAttachThresholdType;
    /**
     * Optional user-defined label to distinguish multiple alerts on the same feature.
     */
    name?: string | undefined;
};
type MultiAttachOverageAllowed = {
    /**
     * The feature ID this overage allowed control applies to.
     */
    featureId: string;
    /**
     * Whether overage is allowed for this feature.
     */
    enabled?: boolean | undefined;
};
/**
 * Billing controls for the entity.
 */
type MultiAttachBillingControls = {
    /**
     * List of spend limits per feature. Each entry caps overage (overage_limit) and/or per-interval usage (usage_limit).
     */
    spendLimits?: Array<MultiAttachSpendLimit> | undefined;
    /**
     * List of hard usage caps per feature for this entity. An entity entry overrides the customer's for that feature.
     */
    usageLimits?: Array<MultiAttachUsageLimit> | undefined;
    /**
     * List of usage alert configurations per feature.
     */
    usageAlerts?: Array<MultiAttachUsageAlert> | undefined;
    /**
     * List of overage allowed controls per feature. When enabled, usage can exceed balance.
     */
    overageAllowed?: Array<MultiAttachOverageAllowed> | undefined;
};
type MultiAttachEntityData = {
    /**
     * The feature ID that this entity is associated with
     */
    featureId: string;
    /**
     * Name of the entity
     */
    name?: string | undefined;
    /**
     * Billing controls for the entity.
     */
    billingControls?: MultiAttachBillingControls | undefined;
};
type MultiAttachParams = {
    /**
     * The ID of the customer to attach the plans to.
     */
    customerId: string;
    /**
     * The ID of the entity to attach the plans to.
     */
    entityId?: string | undefined;
    /**
     * The list of plans to attach to the customer.
     */
    plans: Array<MultiAttachPlan>;
    /**
     * Free trial configuration applied to all plans. Pass an object to set a custom trial, or null to remove any trial.
     */
    freeTrial?: MultiAttachFreeTrialParams | null | undefined;
    /**
     * Invoice mode creates a draft or open invoice and sends it to the customer, instead of charging their card immediately.
     */
    invoiceMode?: MultiAttachInvoiceMode | undefined;
    /**
     * List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code.
     */
    discounts?: Array<MultiAttachAttachDiscount> | undefined;
    /**
     * URL to redirect to after successful checkout.
     */
    successUrl?: string | undefined;
    /**
     * Additional parameters to pass into the creation of the Stripe checkout session.
     */
    checkoutSessionParams?: {
        [k: string]: any;
    } | undefined;
    /**
     * Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects.
     */
    redirectMode?: MultiAttachRedirectMode | undefined;
    /**
     * Only applicable when the customer has an existing Stripe subscription. If true, creates a new separate subscription instead of merging into the existing one.
     */
    newBillingSubscription?: boolean | undefined;
    /**
     * If true, the cusProducts are activated immediately even when payment is pending via Stripe checkout.
     */
    enablePlanImmediately?: boolean | undefined;
    /**
     * Customer details to set when creating a customer
     */
    customerData?: CustomerData | undefined;
    entityData?: MultiAttachEntityData | undefined;
};
/**
 * Invoice details if an invoice was created. Only present when a charge was made.
 */
type MultiAttachInvoice = {
    /**
     * The status of the invoice (e.g., 'paid', 'open', 'draft').
     */
    status: string | null;
    /**
     * The Stripe invoice ID.
     */
    stripeId: string;
    /**
     * The total amount of the invoice in cents.
     */
    total: number;
    /**
     * The three-letter ISO currency code (e.g., 'usd').
     */
    currency: string;
    /**
     * URL to the hosted invoice page where the customer can view and pay the invoice.
     */
    hostedInvoiceUrl: string | null;
};
/**
 * The type of action required to complete the payment.
 */
declare const MultiAttachCode: {
    readonly ThreedsRequired: "3ds_required";
    readonly PaymentMethodRequired: "payment_method_required";
    readonly PaymentFailed: "payment_failed";
    readonly PaymentProcessing: "payment_processing";
};
/**
 * The type of action required to complete the payment.
 */
type MultiAttachCode = OpenEnum<typeof MultiAttachCode>;
/**
 * Details about any action required to complete the payment. Present when the payment could not be processed automatically.
 */
type MultiAttachRequiredAction = {
    /**
     * The type of action required to complete the payment.
     */
    code: MultiAttachCode;
    /**
     * A human-readable explanation of why this action is required.
     */
    reason: string;
};
/**
 * OK
 */
type MultiAttachResponse = {
    /**
     * The ID of the customer.
     */
    customerId: string;
    /**
     * The ID of the entity, if the plan was attached to an entity.
     */
    entityId?: string | undefined;
    /**
     * Invoice details if an invoice was created. Only present when a charge was made.
     */
    invoice?: MultiAttachInvoice | undefined;
    /**
     * URL to redirect the customer to complete payment. Null if no payment action is required.
     */
    paymentUrl: string | null;
    /**
     * Details about any action required to complete the payment. Present when the payment could not be processed automatically.
     */
    requiredAction?: MultiAttachRequiredAction | undefined;
};

type OpenCustomerPortalParams = {
    /**
     * The ID of the customer to open the billing portal for.
     */
    customerId: string;
    /**
     * Stripe billing portal configuration ID. Create configurations in your Stripe dashboard.
     */
    configurationId?: string | undefined;
    /**
     * URL to redirect to when back button is clicked in the billing portal
     */
    returnUrl?: string | undefined;
};
/**
 * OK
 */
type OpenCustomerPortalResponse = {
    /**
     * The ID of the billing portal session
     */
    customerId: string;
    /**
     * URL to the billing portal
     */
    url: string;
};

/**
 * Quantity configuration for a prepaid feature.
 */
type PreviewAttachFeatureQuantityRequest = {
    /**
     * The ID of the feature to set quantity for.
     */
    featureId: string;
    /**
     * The quantity of the feature.
     */
    quantity?: number | undefined;
    /**
     * Whether the customer can adjust the quantity.
     */
    adjustable?: boolean | undefined;
};
/**
 * Billing interval (e.g. 'month', 'year').
 */
declare const PreviewAttachPriceInterval: {
    readonly OneOff: "one_off";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
/**
 * Billing interval (e.g. 'month', 'year').
 */
type PreviewAttachPriceInterval = ClosedEnum<typeof PreviewAttachPriceInterval>;
/**
 * Base price configuration for a plan.
 */
type PreviewAttachBasePrice = {
    /**
     * Base price amount for the plan.
     */
    amount: number;
    /**
     * Billing interval (e.g. 'month', 'year').
     */
    interval: PreviewAttachPriceInterval;
    /**
     * Number of intervals per billing cycle. Defaults to 1.
     */
    intervalCount?: number | undefined;
};
/**
 * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
 */
declare const PreviewAttachItemResetInterval: {
    readonly OneOff: "one_off";
    readonly Minute: "minute";
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
/**
 * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
 */
type PreviewAttachItemResetInterval = ClosedEnum<typeof PreviewAttachItemResetInterval>;
/**
 * Reset configuration for consumable features. Omit for non-consumable features like seats.
 */
type PreviewAttachItemReset = {
    /**
     * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
     */
    interval: PreviewAttachItemResetInterval;
    /**
     * Number of intervals between resets. Defaults to 1.
     */
    intervalCount?: number | undefined;
};
type PreviewAttachItemTier = {
    to: number | string;
    amount?: number | undefined;
    flatAmount?: number | undefined;
};
declare const PreviewAttachItemTierBehavior: {
    readonly Graduated: "graduated";
    readonly Volume: "volume";
};
type PreviewAttachItemTierBehavior = ClosedEnum<typeof PreviewAttachItemTierBehavior>;
/**
 * Billing interval. For consumable features, should match reset.interval.
 */
declare const PreviewAttachItemPriceInterval: {
    readonly OneOff: "one_off";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
/**
 * Billing interval. For consumable features, should match reset.interval.
 */
type PreviewAttachItemPriceInterval = ClosedEnum<typeof PreviewAttachItemPriceInterval>;
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
declare const PreviewAttachItemBillingMethod: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
type PreviewAttachItemBillingMethod = ClosedEnum<typeof PreviewAttachItemBillingMethod>;
/**
 * Pricing for usage beyond included units. Omit for free features.
 */
type PreviewAttachItemPrice = {
    /**
     * Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
     */
    amount?: number | undefined;
    /**
     * Tiered pricing.  Either 'amount' or 'tiers' is required.
     */
    tiers?: Array<PreviewAttachItemTier> | undefined;
    tierBehavior?: PreviewAttachItemTierBehavior | undefined;
    /**
     * Billing interval. For consumable features, should match reset.interval.
     */
    interval: PreviewAttachItemPriceInterval;
    /**
     * Number of intervals per billing cycle. Defaults to 1.
     */
    intervalCount?: number | undefined;
    /**
     * Units per price increment. Usage is rounded UP when billed (e.g. billing_units=100 means 101 rounds to 200).
     */
    billingUnits?: number | undefined;
    /**
     * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
     */
    billingMethod: PreviewAttachItemBillingMethod;
    /**
     * Max units purchasable beyond included. E.g. included=100, max_purchase=300 allows 400 total. Null for no limit.
     */
    maxPurchase?: number | null | undefined;
};
/**
 * Billing behavior when quantity increases mid-cycle.
 */
declare const PreviewAttachItemOnIncrease: {
    readonly BillImmediately: "bill_immediately";
    readonly ProrateImmediately: "prorate_immediately";
    readonly ProrateNextCycle: "prorate_next_cycle";
    readonly BillNextCycle: "bill_next_cycle";
};
/**
 * Billing behavior when quantity increases mid-cycle.
 */
type PreviewAttachItemOnIncrease = ClosedEnum<typeof PreviewAttachItemOnIncrease>;
/**
 * Credit behavior when quantity decreases mid-cycle.
 */
declare const PreviewAttachItemOnDecrease: {
    readonly Prorate: "prorate";
    readonly ProrateImmediately: "prorate_immediately";
    readonly ProrateNextCycle: "prorate_next_cycle";
    readonly None: "none";
    readonly NoProrations: "no_prorations";
};
/**
 * Credit behavior when quantity decreases mid-cycle.
 */
type PreviewAttachItemOnDecrease = ClosedEnum<typeof PreviewAttachItemOnDecrease>;
/**
 * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
 */
type PreviewAttachItemProration = {
    /**
     * Billing behavior when quantity increases mid-cycle.
     */
    onIncrease: PreviewAttachItemOnIncrease;
    /**
     * Credit behavior when quantity decreases mid-cycle.
     */
    onDecrease: PreviewAttachItemOnDecrease;
};
/**
 * When rolled over units expire.
 */
declare const PreviewAttachItemExpiryDurationType: {
    readonly Month: "month";
    readonly Forever: "forever";
};
/**
 * When rolled over units expire.
 */
type PreviewAttachItemExpiryDurationType = ClosedEnum<typeof PreviewAttachItemExpiryDurationType>;
/**
 * Rollover config for unused units. If set, unused included units carry over.
 */
type PreviewAttachItemRollover = {
    /**
     * Max rollover units. Omit for unlimited rollover.
     */
    max?: number | undefined;
    /**
     * Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
     */
    maxPercentage?: number | undefined;
    /**
     * When rolled over units expire.
     */
    expiryDurationType: PreviewAttachItemExpiryDurationType;
    /**
     * Number of periods before expiry.
     */
    expiryDurationLength?: number | undefined;
};
/**
 * Configuration for a feature item in a plan, including usage limits, pricing, and rollover settings.
 */
type PreviewAttachItemPlanItem = {
    /**
     * The ID of the feature to configure.
     */
    featureId: string;
    /**
     * Number of free units included. Balance resets to this each interval for consumable features.
     */
    included?: number | undefined;
    /**
     * If true, customer has unlimited access to this feature.
     */
    unlimited?: boolean | undefined;
    /**
     * Reset configuration for consumable features. Omit for non-consumable features like seats.
     */
    reset?: PreviewAttachItemReset | undefined;
    /**
     * Pricing for usage beyond included units. Omit for free features.
     */
    price?: PreviewAttachItemPrice | undefined;
    /**
     * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
     */
    proration?: PreviewAttachItemProration | undefined;
    /**
     * Rollover config for unused units. If set, unused included units carry over.
     */
    rollover?: PreviewAttachItemRollover | undefined;
};
/**
 * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
 */
declare const PreviewAttachAddItemResetInterval: {
    readonly OneOff: "one_off";
    readonly Minute: "minute";
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
/**
 * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
 */
type PreviewAttachAddItemResetInterval = ClosedEnum<typeof PreviewAttachAddItemResetInterval>;
/**
 * Reset configuration for consumable features. Omit for non-consumable features like seats.
 */
type PreviewAttachAddItemReset = {
    /**
     * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
     */
    interval: PreviewAttachAddItemResetInterval;
    /**
     * Number of intervals between resets. Defaults to 1.
     */
    intervalCount?: number | undefined;
};
type PreviewAttachAddItemTier = {
    to: number | string;
    amount?: number | undefined;
    flatAmount?: number | undefined;
};
declare const PreviewAttachAddItemTierBehavior: {
    readonly Graduated: "graduated";
    readonly Volume: "volume";
};
type PreviewAttachAddItemTierBehavior = ClosedEnum<typeof PreviewAttachAddItemTierBehavior>;
/**
 * Billing interval. For consumable features, should match reset.interval.
 */
declare const PreviewAttachAddItemPriceInterval: {
    readonly OneOff: "one_off";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
/**
 * Billing interval. For consumable features, should match reset.interval.
 */
type PreviewAttachAddItemPriceInterval = ClosedEnum<typeof PreviewAttachAddItemPriceInterval>;
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
declare const PreviewAttachAddItemBillingMethod: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
type PreviewAttachAddItemBillingMethod = ClosedEnum<typeof PreviewAttachAddItemBillingMethod>;
/**
 * Pricing for usage beyond included units. Omit for free features.
 */
type PreviewAttachAddItemPrice = {
    /**
     * Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
     */
    amount?: number | undefined;
    /**
     * Tiered pricing.  Either 'amount' or 'tiers' is required.
     */
    tiers?: Array<PreviewAttachAddItemTier> | undefined;
    tierBehavior?: PreviewAttachAddItemTierBehavior | undefined;
    /**
     * Billing interval. For consumable features, should match reset.interval.
     */
    interval: PreviewAttachAddItemPriceInterval;
    /**
     * Number of intervals per billing cycle. Defaults to 1.
     */
    intervalCount?: number | undefined;
    /**
     * Units per price increment. Usage is rounded UP when billed (e.g. billing_units=100 means 101 rounds to 200).
     */
    billingUnits?: number | undefined;
    /**
     * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
     */
    billingMethod: PreviewAttachAddItemBillingMethod;
    /**
     * Max units purchasable beyond included. E.g. included=100, max_purchase=300 allows 400 total. Null for no limit.
     */
    maxPurchase?: number | null | undefined;
};
/**
 * Billing behavior when quantity increases mid-cycle.
 */
declare const PreviewAttachAddItemOnIncrease: {
    readonly BillImmediately: "bill_immediately";
    readonly ProrateImmediately: "prorate_immediately";
    readonly ProrateNextCycle: "prorate_next_cycle";
    readonly BillNextCycle: "bill_next_cycle";
};
/**
 * Billing behavior when quantity increases mid-cycle.
 */
type PreviewAttachAddItemOnIncrease = ClosedEnum<typeof PreviewAttachAddItemOnIncrease>;
/**
 * Credit behavior when quantity decreases mid-cycle.
 */
declare const PreviewAttachAddItemOnDecrease: {
    readonly Prorate: "prorate";
    readonly ProrateImmediately: "prorate_immediately";
    readonly ProrateNextCycle: "prorate_next_cycle";
    readonly None: "none";
    readonly NoProrations: "no_prorations";
};
/**
 * Credit behavior when quantity decreases mid-cycle.
 */
type PreviewAttachAddItemOnDecrease = ClosedEnum<typeof PreviewAttachAddItemOnDecrease>;
/**
 * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
 */
type PreviewAttachAddItemProration = {
    /**
     * Billing behavior when quantity increases mid-cycle.
     */
    onIncrease: PreviewAttachAddItemOnIncrease;
    /**
     * Credit behavior when quantity decreases mid-cycle.
     */
    onDecrease: PreviewAttachAddItemOnDecrease;
};
/**
 * When rolled over units expire.
 */
declare const PreviewAttachAddItemExpiryDurationType: {
    readonly Month: "month";
    readonly Forever: "forever";
};
/**
 * When rolled over units expire.
 */
type PreviewAttachAddItemExpiryDurationType = ClosedEnum<typeof PreviewAttachAddItemExpiryDurationType>;
/**
 * Rollover config for unused units. If set, unused included units carry over.
 */
type PreviewAttachAddItemRollover = {
    /**
     * Max rollover units. Omit for unlimited rollover.
     */
    max?: number | undefined;
    /**
     * Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
     */
    maxPercentage?: number | undefined;
    /**
     * When rolled over units expire.
     */
    expiryDurationType: PreviewAttachAddItemExpiryDurationType;
    /**
     * Number of periods before expiry.
     */
    expiryDurationLength?: number | undefined;
};
/**
 * Configuration for a feature item in a plan, including usage limits, pricing, and rollover settings.
 */
type PreviewAttachAddItemPlanItem = {
    /**
     * The ID of the feature to configure.
     */
    featureId: string;
    /**
     * Number of free units included. Balance resets to this each interval for consumable features.
     */
    included?: number | undefined;
    /**
     * If true, customer has unlimited access to this feature.
     */
    unlimited?: boolean | undefined;
    /**
     * Reset configuration for consumable features. Omit for non-consumable features like seats.
     */
    reset?: PreviewAttachAddItemReset | undefined;
    /**
     * Pricing for usage beyond included units. Omit for free features.
     */
    price?: PreviewAttachAddItemPrice | undefined;
    /**
     * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
     */
    proration?: PreviewAttachAddItemProration | undefined;
    /**
     * Rollover config for unused units. If set, unused included units carry over.
     */
    rollover?: PreviewAttachAddItemRollover | undefined;
};
/**
 * Match items with this billing method (prepaid or usage_based).
 */
declare const PreviewAttachRemoveItemBillingMethod: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * Match items with this billing method (prepaid or usage_based).
 */
type PreviewAttachRemoveItemBillingMethod = ClosedEnum<typeof PreviewAttachRemoveItemBillingMethod>;
declare const PreviewAttachIntervalRemoveItemEnum2: {
    readonly OneOff: "one_off";
    readonly Minute: "minute";
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
type PreviewAttachIntervalRemoveItemEnum2 = ClosedEnum<typeof PreviewAttachIntervalRemoveItemEnum2>;
declare const PreviewAttachIntervalRemoveItemEnum1: {
    readonly OneOff: "one_off";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
type PreviewAttachIntervalRemoveItemEnum1 = ClosedEnum<typeof PreviewAttachIntervalRemoveItemEnum1>;
/**
 * Filter for matching plan items. All provided fields must match (AND).
 */
type PreviewAttachPlanItemFilter = {
    /**
     * Match items linked to this feature.
     */
    featureId?: string | undefined;
    /**
     * Match items with this billing method (prepaid or usage_based).
     */
    billingMethod?: PreviewAttachRemoveItemBillingMethod | undefined;
    /**
     * Match items with this interval. Accepts either a BillingInterval (price-side) or a ResetInterval (reset-side, includes day/hour/minute) so price-less items keyed by reset.interval can be disambiguated.
     */
    interval?: PreviewAttachIntervalRemoveItemEnum1 | PreviewAttachIntervalRemoveItemEnum2 | undefined;
    /**
     * Match items with this interval_count. Disambiguates between items that share an interval but differ in count.
     */
    intervalCount?: number | undefined;
};
/**
 * Unit of time for the trial ('day', 'month', 'year').
 */
declare const PreviewAttachDurationType: {
    readonly Day: "day";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Unit of time for the trial ('day', 'month', 'year').
 */
type PreviewAttachDurationType = ClosedEnum<typeof PreviewAttachDurationType>;
/**
 * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
 */
declare const PreviewAttachOnEnd: {
    readonly Bill: "bill";
    readonly Revert: "revert";
};
/**
 * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
 */
type PreviewAttachOnEnd = ClosedEnum<typeof PreviewAttachOnEnd>;
/**
 * Free trial configuration for a plan.
 */
type PreviewAttachFreeTrialParams = {
    /**
     * Number of duration_type periods the trial lasts.
     */
    durationLength: number;
    /**
     * Unit of time for the trial ('day', 'month', 'year').
     */
    durationType?: PreviewAttachDurationType | undefined;
    /**
     * If true, payment method required to start trial. Customer is charged after trial ends.
     */
    cardRequired?: boolean | undefined;
    /**
     * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
     */
    onEnd?: PreviewAttachOnEnd | undefined;
};
/**
 * The time interval for the purchase limit window.
 */
declare const PreviewAttachPurchaseLimitInterval: {
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
};
/**
 * The time interval for the purchase limit window.
 */
type PreviewAttachPurchaseLimitInterval = ClosedEnum<typeof PreviewAttachPurchaseLimitInterval>;
/**
 * Optional rate limit to cap how often auto top-ups occur.
 */
type PreviewAttachPurchaseLimit = {
    /**
     * The time interval for the purchase limit window.
     */
    interval: PreviewAttachPurchaseLimitInterval;
    /**
     * Number of intervals in the purchase limit window.
     */
    intervalCount?: number | undefined;
    /**
     * Maximum number of auto top-ups allowed within the interval.
     */
    limit: number;
};
type PreviewAttachAutoTopup = {
    /**
     * The ID of the feature (credit balance) to auto top-up.
     */
    featureId: string;
    /**
     * Whether auto top-up is enabled.
     */
    enabled?: boolean | undefined;
    /**
     * When the balance drops below this threshold, an auto top-up will be purchased.
     */
    threshold: number;
    /**
     * Amount of credits to add per auto top-up.
     */
    quantity: number;
    /**
     * Optional rate limit to cap how often auto top-ups occur.
     */
    purchaseLimit?: PreviewAttachPurchaseLimit | undefined;
    /**
     * When true, auto top-up creates a send_invoice invoice instead of auto-charging.
     */
    invoiceMode?: boolean | undefined;
};
/**
 * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
 */
declare const PreviewAttachLimitType: {
    readonly Absolute: "absolute";
    readonly UsagePercentage: "usage_percentage";
};
/**
 * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
 */
type PreviewAttachLimitType = ClosedEnum<typeof PreviewAttachLimitType>;
type PreviewAttachSpendLimit = {
    /**
     * Optional feature ID this spend limit applies to.
     */
    featureId?: string | undefined;
    /**
     * Whether the overage spend limit is enabled.
     */
    enabled?: boolean | undefined;
    /**
     * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
     */
    limitType?: PreviewAttachLimitType | undefined;
    /**
     * Overage cap for the feature: absolute units, or a percent (e.g. 120) when limit_type is usage_percentage.
     */
    overageLimit?: number | undefined;
    /**
     * When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.
     */
    skipOverageBilling?: boolean | undefined;
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
declare const PreviewAttachUsageLimitInterval: {
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
type PreviewAttachUsageLimitInterval = ClosedEnum<typeof PreviewAttachUsageLimitInterval>;
/**
 * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
 */
type PreviewAttachFilter = {
    properties: {
        [k: string]: string | number | boolean;
    };
};
type PreviewAttachUsageLimit = {
    /**
     * The feature this usage limit applies to.
     */
    featureId: string;
    /**
     * Whether this usage limit is enabled.
     */
    enabled?: boolean | undefined;
    /**
     * Maximum units allowed per interval.
     */
    limit: number;
    /**
     * Interval for the cap, aligned to the customer's billing cycle.
     */
    interval: PreviewAttachUsageLimitInterval;
    /**
     * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
     */
    filter?: PreviewAttachFilter | undefined;
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
declare const PreviewAttachThresholdType: {
    readonly Usage: "usage";
    readonly UsagePercentage: "usage_percentage";
    readonly Remaining: "remaining";
    readonly RemainingPercentage: "remaining_percentage";
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
type PreviewAttachThresholdType = ClosedEnum<typeof PreviewAttachThresholdType>;
type PreviewAttachUsageAlert = {
    /**
     * The feature ID this alert applies to.
     */
    featureId?: string | undefined;
    /**
     * Whether this usage alert is enabled.
     */
    enabled?: boolean | undefined;
    /**
     * The threshold value that triggers the alert. For usage or remaining, this is an absolute count. For usage_percentage or remaining_percentage, this is a percentage (0-100).
     */
    threshold: number;
    /**
     * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
     */
    thresholdType: PreviewAttachThresholdType;
    /**
     * Optional user-defined label to distinguish multiple alerts on the same feature.
     */
    name?: string | undefined;
};
type PreviewAttachOverageAllowed = {
    /**
     * The feature ID this overage allowed control applies to.
     */
    featureId: string;
    /**
     * Whether overage is allowed for this feature.
     */
    enabled?: boolean | undefined;
};
/**
 * Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
 */
type PreviewAttachBillingControls = {
    /**
     * List of auto top-up configurations per feature.
     */
    autoTopups?: Array<PreviewAttachAutoTopup> | undefined;
    /**
     * List of overage spend limits per feature (caps overage spend).
     */
    spendLimits?: Array<PreviewAttachSpendLimit> | undefined;
    /**
     * List of hard usage caps per feature (max units per interval).
     */
    usageLimits?: Array<PreviewAttachUsageLimit> | undefined;
    /**
     * List of usage alert configurations per feature.
     */
    usageAlerts?: Array<PreviewAttachUsageAlert> | undefined;
    /**
     * List of overage allowed controls per feature. When enabled, usage can exceed balance.
     */
    overageAllowed?: Array<PreviewAttachOverageAllowed> | undefined;
};
/**
 * Customize the plan to attach. Can override the price, items, free trial, or a combination.
 */
type PreviewAttachCustomize = {
    /**
     * Override the base price of the plan. Pass null to remove the base price.
     */
    price?: PreviewAttachBasePrice | null | undefined;
    /**
     * Override the items in the plan (PUT-style — replaces all existing items). Mutually exclusive with add_items / remove_items / deprecated update_items.
     */
    items?: Array<PreviewAttachItemPlanItem> | undefined;
    /**
     * Items to add to the plan.
     */
    addItems?: Array<PreviewAttachAddItemPlanItem> | undefined;
    /**
     * Filters selecting items to remove from the plan.
     */
    removeItems?: Array<PreviewAttachPlanItemFilter> | undefined;
    /**
     * Override the plan's default free trial. Pass an object to set a custom trial, or null to remove the trial entirely.
     */
    freeTrial?: PreviewAttachFreeTrialParams | null | undefined;
    /**
     * Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
     */
    billingControls?: PreviewAttachBillingControls | undefined;
};
/**
 * Invoice mode creates a draft or open invoice and sends it to the customer, instead of charging their card immediately. This uses Stripe's send_invoice collection method.
 */
type PreviewAttachInvoiceMode = {
    /**
     * When true, creates an invoice and sends it to the customer instead of charging their card immediately. Uses Stripe's send_invoice collection method.
     */
    enabled: boolean;
    /**
     * If true, enables the plan immediately even though the invoice is not paid yet.
     */
    enablePlanImmediately?: boolean | undefined;
    /**
     * If true, finalizes the invoice so it can be sent to the customer. If false, keeps it as a draft for manual review.
     */
    finalize?: boolean | undefined;
    /**
     * ID of an invoice template (configured in billing settings) whose footer (e.g. bank details) is applied to the invoice.
     */
    invoiceTemplateId?: string | undefined;
    /**
     * Number of days the customer has to pay the invoice before it is due (Stripe days_until_due).
     */
    netTermsDays?: number | undefined;
};
/**
 * How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
 */
declare const PreviewAttachProrationBehavior: {
    readonly ProrateImmediately: "prorate_immediately";
    readonly None: "none";
};
/**
 * How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
 */
type PreviewAttachProrationBehavior = ClosedEnum<typeof PreviewAttachProrationBehavior>;
/**
 * Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects.
 */
declare const PreviewAttachRedirectMode: {
    readonly Always: "always";
    readonly IfRequired: "if_required";
    readonly Never: "never";
};
/**
 * Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects.
 */
type PreviewAttachRedirectMode = ClosedEnum<typeof PreviewAttachRedirectMode>;
/**
 * A discount to apply. Can be either a reward ID or a promotion code.
 */
type PreviewAttachAttachDiscount = {
    /**
     * The ID of the reward to apply as a discount.
     */
    rewardId?: string | undefined;
    /**
     * The promotion code to apply as a discount.
     */
    promotionCode?: string | undefined;
};
/**
 * When the plan change should take effect. 'immediate' applies now, 'end_of_cycle' schedules for the end of the current billing cycle. By default, upgrades are immediate and downgrades are scheduled.
 */
declare const PreviewAttachPlanSchedule: {
    readonly Immediate: "immediate";
    readonly EndOfCycle: "end_of_cycle";
};
/**
 * When the plan change should take effect. 'immediate' applies now, 'end_of_cycle' schedules for the end of the current billing cycle. By default, upgrades are immediate and downgrades are scheduled.
 */
type PreviewAttachPlanSchedule = ClosedEnum<typeof PreviewAttachPlanSchedule>;
type PreviewAttachCustomLineItem = {
    /**
     * Amount in dollars for this line item (e.g. 10.50). Can be negative for credits.
     */
    amount: number;
    /**
     * Description for the line item.
     */
    description: string;
};
/**
 * Whether to carry over balances from the previous plan.
 */
type PreviewAttachCarryOverBalances = {
    /**
     * Whether to carry over balances from the previous plan.
     */
    enabled: boolean;
    /**
     * The IDs of the features to carry over balances from. If left undefined, all features will be carried over.
     */
    featureIds?: Array<string> | undefined;
};
/**
 * Whether to carry over usages from the previous plan.
 */
type PreviewAttachCarryOverUsages = {
    /**
     * Whether to carry over usages from the previous plan.
     */
    enabled: boolean;
    /**
     * The IDs of the features to carry over usages for. If left undefined, all consumable features will be carried over.
     */
    featureIds?: Array<string> | undefined;
};
type PreviewAttachParams = {
    /**
     * The ID of the customer to attach the plan to.
     */
    customerId: string;
    /**
     * The ID of the entity to attach the plan to.
     */
    entityId?: string | undefined;
    /**
     * The ID of the plan.
     */
    planId: string;
    /**
     * If this plan contains prepaid features, use this field to specify the quantity of each prepaid feature. This quantity includes the included amount and billing units defined when setting up the plan.
     */
    featureQuantities?: Array<PreviewAttachFeatureQuantityRequest> | undefined;
    /**
     * The version of the plan to attach.
     */
    version?: number | undefined;
    /**
     * Customize the plan to attach. Can override the price, items, free trial, or a combination.
     */
    customize?: PreviewAttachCustomize | undefined;
    /**
     * Invoice mode creates a draft or open invoice and sends it to the customer, instead of charging their card immediately. This uses Stripe's send_invoice collection method.
     */
    invoiceMode?: PreviewAttachInvoiceMode | undefined;
    /**
     * How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
     */
    prorationBehavior?: PreviewAttachProrationBehavior | undefined;
    /**
     * Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects.
     */
    redirectMode?: PreviewAttachRedirectMode | undefined;
    /**
     * A unique ID to identify this subscription. Can be used to target specific subscriptions in update operations when a customer has multiple products with the same plan.
     */
    subscriptionId?: string | undefined;
    /**
     * List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code.
     */
    discounts?: Array<PreviewAttachAttachDiscount> | undefined;
    /**
     * URL to redirect to after successful checkout.
     */
    successUrl?: string | undefined;
    /**
     * Only applicable when the customer has an existing Stripe subscription. If true, creates a new separate subscription instead of merging into the existing one.
     */
    newBillingSubscription?: boolean | undefined;
    /**
     * Reset the billing cycle anchor immediately with 'now'.
     */
    billingCycleAnchor?: "now" | undefined;
    /**
     * When the plan change should take effect. 'immediate' applies now, 'end_of_cycle' schedules for the end of the current billing cycle. By default, upgrades are immediate and downgrades are scheduled.
     */
    planSchedule?: PreviewAttachPlanSchedule | undefined;
    /**
     * Unix timestamp in milliseconds for when the attached plan should start. Future dates create a scheduled subscription.
     */
    startsAt?: number | undefined;
    /**
     * Unix timestamp in milliseconds for when the attached plan should end.
     */
    endsAt?: number | undefined;
    /**
     * Additional parameters to pass into the creation of the Stripe checkout session.
     */
    checkoutSessionParams?: {
        [k: string]: any;
    } | undefined;
    /**
     * If true, returns an Autumn-hosted checkout link that can create a fresh Stripe checkout session when opened.
     */
    longLivedCheckout?: boolean | undefined;
    /**
     * Custom line items that override the auto-generated proration invoice. Only valid for immediate plan changes (eg. upgrades or one off plans).
     */
    customLineItems?: Array<PreviewAttachCustomLineItem> | undefined;
    /**
     * The processor subscription ID to link. Use this to attach an existing Stripe subscription instead of creating a new one.
     */
    processorSubscriptionId?: string | undefined;
    /**
     * Whether to carry over balances from the previous plan.
     */
    carryOverBalances?: PreviewAttachCarryOverBalances | undefined;
    /**
     * Whether to carry over usages from the previous plan.
     */
    carryOverUsages?: PreviewAttachCarryOverUsages | undefined;
    /**
     * Key-value metadata to attach to the Stripe subscription, invoice, and checkout session created during this attach flow. Keys prefixed with 'autumn_' are reserved and will be stripped.
     */
    metadata?: {
        [k: string]: string;
    } | undefined;
    /**
     * If true, skips any billing changes for the attach operation.
     */
    noBillingChanges?: boolean | undefined;
    /**
     * If true, the customer's plan is activated immediately even when payment is deferred (invoice mode) or pending (Stripe checkout). For Stripe checkout, the customer_product is inserted before the customer completes the hosted form.
     */
    enablePlanImmediately?: boolean | undefined;
    /**
     * Stripe tax rate ID (txr_...) to apply as the default tax rate on the created subscription, invoice, or checkout session line items.
     */
    taxRateId?: string | undefined;
};
type PreviewAttachDiscount = {
    amountOff: number;
    percentOff?: number | undefined;
    rewardId?: string | undefined;
    rewardName?: string | undefined;
};
/**
 * The period of time that this line item is being charged for.
 */
type PreviewAttachLineItemPeriod = {
    /**
     * The start of the period in milliseconds since the Unix epoch.
     */
    start: number;
    /**
     * The end of the period in milliseconds since the Unix epoch.
     */
    end: number;
};
type PreviewAttachLineItem = {
    /**
     * The name of the line item to display to the customer if you're building a UI. It will either be the plan name or the feature name.
     */
    displayName: string;
    /**
     * A detailed description of the line item.
     */
    description: string;
    /**
     * The amount in cents before discounts and tax for this line item.
     */
    subtotal: number;
    /**
     * The final amount in cents after discounts and tax for this line item.
     */
    total: number;
    /**
     * List of discounts applied to this line item.
     */
    discounts?: Array<PreviewAttachDiscount> | undefined;
    /**
     * The ID of the plan that this line item belongs to.
     */
    planId: string;
    /**
     * The ID of the feature that this line item belongs to.
     */
    featureId: string | null;
    /**
     * The period of time that this line item is being charged for.
     */
    period?: PreviewAttachLineItemPeriod | undefined;
    /**
     * The quantity of the line item.
     */
    quantity: number;
};
type PreviewAttachNextCycleDiscount = {
    amountOff: number;
    percentOff?: number | undefined;
    rewardId?: string | undefined;
    rewardName?: string | undefined;
};
/**
 * The period of time that this line item is being charged for.
 */
type PreviewAttachNextCycleLineItemPeriod = {
    /**
     * The start of the period in milliseconds since the Unix epoch.
     */
    start: number;
    /**
     * The end of the period in milliseconds since the Unix epoch.
     */
    end: number;
};
type PreviewAttachNextCycleLineItem = {
    /**
     * The name of the line item to display to the customer if you're building a UI. It will either be the plan name or the feature name.
     */
    displayName: string;
    /**
     * A detailed description of the line item.
     */
    description: string;
    /**
     * The amount in cents before discounts and tax for this line item.
     */
    subtotal: number;
    /**
     * The final amount in cents after discounts and tax for this line item.
     */
    total: number;
    /**
     * List of discounts applied to this line item.
     */
    discounts?: Array<PreviewAttachNextCycleDiscount> | undefined;
    /**
     * The ID of the plan that this line item belongs to.
     */
    planId: string;
    /**
     * The ID of the feature that this line item belongs to.
     */
    featureId: string | null;
    /**
     * The period of time that this line item is being charged for.
     */
    period?: PreviewAttachNextCycleLineItemPeriod | undefined;
    /**
     * The quantity of the line item.
     */
    quantity: number;
};
/**
 * The period of time that this line item is being charged for.
 */
type PreviewAttachUsageLineItemPeriod = {
    /**
     * The start of the period in milliseconds since the Unix epoch.
     */
    start: number;
    /**
     * The end of the period in milliseconds since the Unix epoch.
     */
    end: number;
};
type PreviewAttachUsageLineItem = {
    /**
     * The name of the line item to display to the customer if you're building a UI. It will either be the plan name or the feature name.
     */
    displayName: string;
    /**
     * The ID of the plan that this line item belongs to.
     */
    planId: string;
    /**
     * The ID of the feature that this line item belongs to.
     */
    featureId: string | null;
    /**
     * The period of time that this line item is being charged for.
     */
    period?: PreviewAttachUsageLineItemPeriod | undefined;
};
/**
 * Preview of the next billing cycle, if applicable. This shows what the customer will be charged in subsequent cycles.
 */
type PreviewAttachNextCycle = {
    /**
     * Unix timestamp (milliseconds) when the next billing cycle starts.
     */
    startsAt: number;
    /**
     * The total amount in cents before discounts and tax for the next cycle.
     */
    subtotal: number;
    /**
     * The final amount in cents after discounts and tax for the next cycle.
     */
    total: number;
    /**
     * List of line items for the next billing cycle.
     */
    lineItems: Array<PreviewAttachNextCycleLineItem>;
    /**
     * List of line items for usage-based features in the next cycle.
     */
    usageLineItems: Array<PreviewAttachUsageLineItem>;
};
type PreviewAttachIncomingFeatureQuantity = {
    /**
     * The ID of the adjustable feature included in this change.
     */
    featureId: string;
    /**
     * The quantity that will apply for this feature in the change.
     */
    quantity: number;
};
type PreviewAttachIncoming = {
    /**
     * The ID of the plan affected by this preview change.
     */
    planId: string;
    plan?: Plan | undefined;
    /**
     * The feature quantity selections associated with this plan change.
     */
    featureQuantities: Array<PreviewAttachIncomingFeatureQuantity>;
    /**
     * When this change takes effect, in milliseconds since the Unix epoch, or null if it applies immediately.
     */
    effectiveAt: number | null;
    /**
     * When this plan was canceled, in milliseconds since the Unix epoch, or null if it is not canceled.
     */
    canceledAt: number | null;
    /**
     * When this plan expires, in milliseconds since the Unix epoch, or null if it does not expire.
     */
    expiresAt: number | null;
};
type PreviewAttachOutgoingFeatureQuantity = {
    /**
     * The ID of the adjustable feature included in this change.
     */
    featureId: string;
    /**
     * The quantity that will apply for this feature in the change.
     */
    quantity: number;
};
type PreviewAttachOutgoing = {
    /**
     * The ID of the plan affected by this preview change.
     */
    planId: string;
    plan?: Plan | undefined;
    /**
     * The feature quantity selections associated with this plan change.
     */
    featureQuantities: Array<PreviewAttachOutgoingFeatureQuantity>;
    /**
     * When this change takes effect, in milliseconds since the Unix epoch, or null if it applies immediately.
     */
    effectiveAt: number | null;
    /**
     * When this plan was canceled, in milliseconds since the Unix epoch, or null if it is not canceled.
     */
    canceledAt: number | null;
    /**
     * When this plan expires, in milliseconds since the Unix epoch, or null if it does not expire.
     */
    expiresAt: number | null;
};
declare const PreviewAttachCheckoutType: {
    readonly StripeCheckout: "stripe_checkout";
    readonly AutumnCheckout: "autumn_checkout";
};
type PreviewAttachCheckoutType = OpenEnum<typeof PreviewAttachCheckoutType>;
/**
 * Calculation status ('complete' when Stripe Tax succeeds or 'incomplete' when Stripe Tax returned 0 or errored).
 */
declare const PreviewAttachStatus: {
    readonly Complete: "complete";
    readonly Incomplete: "incomplete";
};
/**
 * Calculation status ('complete' when Stripe Tax succeeds or 'incomplete' when Stripe Tax returned 0 or errored).
 */
type PreviewAttachStatus = OpenEnum<typeof PreviewAttachStatus>;
/**
 * Tax preview for the immediate charge. Contact us to enable the tax flag on your organisation. Shows only with flag enabled, a Stripe customer exists and has a location.
 */
type PreviewAttachTax = {
    /**
     * Total tax amount in major currency units.
     */
    total: number;
    /**
     * Tax included in line item subtotals.
     */
    amountInclusive: number;
    /**
     * Tax added on top of subtotals.
     */
    amountExclusive: number;
    /**
     * Three-letter currency code.
     */
    currency: string;
    /**
     * Calculation status ('complete' when Stripe Tax succeeds or 'incomplete' when Stripe Tax returned 0 or errored).
     */
    status: PreviewAttachStatus;
};
/**
 * Stripe customer invoice credits preview.
 */
type PreviewAttachInvoiceCredits = {
    /**
     * Stripe customer credit balance available, expressed as a positive number in major currency units.
     */
    balance: number;
    /**
     * Three-letter currency code.
     */
    currency: string;
};
/**
 * OK
 */
type PreviewAttachResponse = {
    /**
     * The ID of the customer.
     */
    customerId: string;
    lineItems: Array<PreviewAttachLineItem>;
    /**
     * The total amount in cents before discounts and tax for the current billing period.
     */
    subtotal: number;
    /**
     * The final amount in cents after discounts and tax for the current billing period.
     */
    total: number;
    /**
     * The three-letter ISO currency code (e.g., 'usd').
     */
    currency: string;
    /**
     * Preview of the next billing cycle, if applicable. This shows what the customer will be charged in subsequent cycles.
     */
    nextCycle?: PreviewAttachNextCycle | undefined;
    /**
     * Expand the response with additional data.
     */
    expand?: Array<string> | undefined;
    /**
     * Products or subscription changes being added or updated.
     */
    incoming: Array<PreviewAttachIncoming>;
    /**
     * Products or subscription changes being removed or ended.
     */
    outgoing: Array<PreviewAttachOutgoing>;
    /**
     * Whether the customer will be redirected to a checkout page if attach is called.
     */
    redirectToCheckout: boolean;
    /**
     * The type of checkout that will be used if the customer is redirected to a checkout page.
     */
    checkoutType: PreviewAttachCheckoutType | null;
    /**
     * Tax preview for the immediate charge. Contact us to enable the tax flag on your organisation. Shows only with flag enabled, a Stripe customer exists and has a location.
     */
    tax?: PreviewAttachTax | undefined;
    /**
     * Stripe customer invoice credits preview.
     */
    invoiceCredits?: PreviewAttachInvoiceCredits | undefined;
};

/**
 * Billing interval (e.g. 'month', 'year').
 */
declare const PreviewMultiAttachPriceInterval: {
    readonly OneOff: "one_off";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
/**
 * Billing interval (e.g. 'month', 'year').
 */
type PreviewMultiAttachPriceInterval = ClosedEnum<typeof PreviewMultiAttachPriceInterval>;
/**
 * Base price configuration for a plan.
 */
type PreviewMultiAttachBasePrice = {
    /**
     * Base price amount for the plan.
     */
    amount: number;
    /**
     * Billing interval (e.g. 'month', 'year').
     */
    interval: PreviewMultiAttachPriceInterval;
    /**
     * Number of intervals per billing cycle. Defaults to 1.
     */
    intervalCount?: number | undefined;
};
/**
 * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
 */
declare const PreviewMultiAttachResetInterval: {
    readonly OneOff: "one_off";
    readonly Minute: "minute";
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
/**
 * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
 */
type PreviewMultiAttachResetInterval = ClosedEnum<typeof PreviewMultiAttachResetInterval>;
/**
 * Reset configuration for consumable features. Omit for non-consumable features like seats.
 */
type PreviewMultiAttachReset = {
    /**
     * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
     */
    interval: PreviewMultiAttachResetInterval;
    /**
     * Number of intervals between resets. Defaults to 1.
     */
    intervalCount?: number | undefined;
};
type PreviewMultiAttachTier = {
    to: number | string;
    amount?: number | undefined;
    flatAmount?: number | undefined;
};
declare const PreviewMultiAttachTierBehavior: {
    readonly Graduated: "graduated";
    readonly Volume: "volume";
};
type PreviewMultiAttachTierBehavior = ClosedEnum<typeof PreviewMultiAttachTierBehavior>;
/**
 * Billing interval. For consumable features, should match reset.interval.
 */
declare const PreviewMultiAttachItemPriceInterval: {
    readonly OneOff: "one_off";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
/**
 * Billing interval. For consumable features, should match reset.interval.
 */
type PreviewMultiAttachItemPriceInterval = ClosedEnum<typeof PreviewMultiAttachItemPriceInterval>;
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
declare const PreviewMultiAttachBillingMethod: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
type PreviewMultiAttachBillingMethod = ClosedEnum<typeof PreviewMultiAttachBillingMethod>;
/**
 * Pricing for usage beyond included units. Omit for free features.
 */
type PreviewMultiAttachPrice = {
    /**
     * Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
     */
    amount?: number | undefined;
    /**
     * Tiered pricing.  Either 'amount' or 'tiers' is required.
     */
    tiers?: Array<PreviewMultiAttachTier> | undefined;
    tierBehavior?: PreviewMultiAttachTierBehavior | undefined;
    /**
     * Billing interval. For consumable features, should match reset.interval.
     */
    interval: PreviewMultiAttachItemPriceInterval;
    /**
     * Number of intervals per billing cycle. Defaults to 1.
     */
    intervalCount?: number | undefined;
    /**
     * Units per price increment. Usage is rounded UP when billed (e.g. billing_units=100 means 101 rounds to 200).
     */
    billingUnits?: number | undefined;
    /**
     * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
     */
    billingMethod: PreviewMultiAttachBillingMethod;
    /**
     * Max units purchasable beyond included. E.g. included=100, max_purchase=300 allows 400 total. Null for no limit.
     */
    maxPurchase?: number | null | undefined;
};
/**
 * Billing behavior when quantity increases mid-cycle.
 */
declare const PreviewMultiAttachOnIncrease: {
    readonly BillImmediately: "bill_immediately";
    readonly ProrateImmediately: "prorate_immediately";
    readonly ProrateNextCycle: "prorate_next_cycle";
    readonly BillNextCycle: "bill_next_cycle";
};
/**
 * Billing behavior when quantity increases mid-cycle.
 */
type PreviewMultiAttachOnIncrease = ClosedEnum<typeof PreviewMultiAttachOnIncrease>;
/**
 * Credit behavior when quantity decreases mid-cycle.
 */
declare const PreviewMultiAttachOnDecrease: {
    readonly Prorate: "prorate";
    readonly ProrateImmediately: "prorate_immediately";
    readonly ProrateNextCycle: "prorate_next_cycle";
    readonly None: "none";
    readonly NoProrations: "no_prorations";
};
/**
 * Credit behavior when quantity decreases mid-cycle.
 */
type PreviewMultiAttachOnDecrease = ClosedEnum<typeof PreviewMultiAttachOnDecrease>;
/**
 * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
 */
type PreviewMultiAttachProration = {
    /**
     * Billing behavior when quantity increases mid-cycle.
     */
    onIncrease: PreviewMultiAttachOnIncrease;
    /**
     * Credit behavior when quantity decreases mid-cycle.
     */
    onDecrease: PreviewMultiAttachOnDecrease;
};
/**
 * When rolled over units expire.
 */
declare const PreviewMultiAttachExpiryDurationType: {
    readonly Month: "month";
    readonly Forever: "forever";
};
/**
 * When rolled over units expire.
 */
type PreviewMultiAttachExpiryDurationType = ClosedEnum<typeof PreviewMultiAttachExpiryDurationType>;
/**
 * Rollover config for unused units. If set, unused included units carry over.
 */
type PreviewMultiAttachRollover = {
    /**
     * Max rollover units. Omit for unlimited rollover.
     */
    max?: number | undefined;
    /**
     * Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
     */
    maxPercentage?: number | undefined;
    /**
     * When rolled over units expire.
     */
    expiryDurationType: PreviewMultiAttachExpiryDurationType;
    /**
     * Number of periods before expiry.
     */
    expiryDurationLength?: number | undefined;
};
/**
 * Configuration for a feature item in a plan, including usage limits, pricing, and rollover settings.
 */
type PreviewMultiAttachPlanItem = {
    /**
     * The ID of the feature to configure.
     */
    featureId: string;
    /**
     * Number of free units included. Balance resets to this each interval for consumable features.
     */
    included?: number | undefined;
    /**
     * If true, customer has unlimited access to this feature.
     */
    unlimited?: boolean | undefined;
    /**
     * Reset configuration for consumable features. Omit for non-consumable features like seats.
     */
    reset?: PreviewMultiAttachReset | undefined;
    /**
     * Pricing for usage beyond included units. Omit for free features.
     */
    price?: PreviewMultiAttachPrice | undefined;
    /**
     * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
     */
    proration?: PreviewMultiAttachProration | undefined;
    /**
     * Rollover config for unused units. If set, unused included units carry over.
     */
    rollover?: PreviewMultiAttachRollover | undefined;
};
/**
 * Customize the plan to attach. Can override the price or items.
 */
type PreviewMultiAttachCustomize = {
    /**
     * Override the base price of the plan. Pass null to remove the base price.
     */
    price?: PreviewMultiAttachBasePrice | null | undefined;
    /**
     * Override the items in the plan.
     */
    items?: Array<PreviewMultiAttachPlanItem> | undefined;
};
/**
 * Quantity configuration for a prepaid feature.
 */
type PreviewMultiAttachPlanFeatureQuantity = {
    /**
     * The ID of the feature to set quantity for.
     */
    featureId: string;
    /**
     * The quantity of the feature.
     */
    quantity?: number | undefined;
    /**
     * Whether the customer can adjust the quantity.
     */
    adjustable?: boolean | undefined;
};
type PreviewMultiAttachPlan = {
    /**
     * The ID of the plan to attach.
     */
    planId: string;
    /**
     * Customize the plan to attach. Can override the price or items.
     */
    customize?: PreviewMultiAttachCustomize | undefined;
    /**
     * If this plan contains prepaid features, use this field to specify the quantity of each prepaid feature.
     */
    featureQuantities?: Array<PreviewMultiAttachPlanFeatureQuantity> | undefined;
    /**
     * The version of the plan to attach.
     */
    version?: number | undefined;
    /**
     * A unique ID to identify this subscription. Useful when attaching the same plan multiple times.
     */
    subscriptionId?: string | undefined;
};
/**
 * Unit of time for the trial ('day', 'month', 'year').
 */
declare const PreviewMultiAttachDurationType: {
    readonly Day: "day";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Unit of time for the trial ('day', 'month', 'year').
 */
type PreviewMultiAttachDurationType = ClosedEnum<typeof PreviewMultiAttachDurationType>;
/**
 * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
 */
declare const PreviewMultiAttachOnEnd: {
    readonly Bill: "bill";
    readonly Revert: "revert";
};
/**
 * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
 */
type PreviewMultiAttachOnEnd = ClosedEnum<typeof PreviewMultiAttachOnEnd>;
/**
 * Free trial configuration for a plan.
 */
type PreviewMultiAttachFreeTrialParams = {
    /**
     * Number of duration_type periods the trial lasts.
     */
    durationLength: number;
    /**
     * Unit of time for the trial ('day', 'month', 'year').
     */
    durationType?: PreviewMultiAttachDurationType | undefined;
    /**
     * If true, payment method required to start trial. Customer is charged after trial ends.
     */
    cardRequired?: boolean | undefined;
    /**
     * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
     */
    onEnd?: PreviewMultiAttachOnEnd | undefined;
};
/**
 * Invoice mode creates a draft or open invoice and sends it to the customer, instead of charging their card immediately.
 */
type PreviewMultiAttachInvoiceMode = {
    /**
     * When true, creates an invoice and sends it to the customer instead of charging their card immediately. Uses Stripe's send_invoice collection method.
     */
    enabled: boolean;
    /**
     * If true, enables the plan immediately even though the invoice is not paid yet.
     */
    enablePlanImmediately?: boolean | undefined;
    /**
     * If true, finalizes the invoice so it can be sent to the customer. If false, keeps it as a draft for manual review.
     */
    finalize?: boolean | undefined;
    /**
     * ID of an invoice template (configured in billing settings) whose footer (e.g. bank details) is applied to the invoice.
     */
    invoiceTemplateId?: string | undefined;
    /**
     * Number of days the customer has to pay the invoice before it is due (Stripe days_until_due).
     */
    netTermsDays?: number | undefined;
};
/**
 * A discount to apply. Can be either a reward ID or a promotion code.
 */
type PreviewMultiAttachAttachDiscount = {
    /**
     * The ID of the reward to apply as a discount.
     */
    rewardId?: string | undefined;
    /**
     * The promotion code to apply as a discount.
     */
    promotionCode?: string | undefined;
};
/**
 * Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects.
 */
declare const PreviewMultiAttachRedirectMode: {
    readonly Always: "always";
    readonly IfRequired: "if_required";
    readonly Never: "never";
};
/**
 * Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects.
 */
type PreviewMultiAttachRedirectMode = ClosedEnum<typeof PreviewMultiAttachRedirectMode>;
/**
 * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
 */
declare const PreviewMultiAttachLimitType: {
    readonly Absolute: "absolute";
    readonly UsagePercentage: "usage_percentage";
};
/**
 * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
 */
type PreviewMultiAttachLimitType = ClosedEnum<typeof PreviewMultiAttachLimitType>;
type PreviewMultiAttachSpendLimit = {
    /**
     * Optional feature ID this spend limit applies to.
     */
    featureId?: string | undefined;
    /**
     * Whether the overage spend limit is enabled.
     */
    enabled?: boolean | undefined;
    /**
     * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
     */
    limitType?: PreviewMultiAttachLimitType | undefined;
    /**
     * Overage cap for the feature: absolute units, or a percent (e.g. 120) when limit_type is usage_percentage.
     */
    overageLimit?: number | undefined;
    /**
     * When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.
     */
    skipOverageBilling?: boolean | undefined;
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
declare const PreviewMultiAttachEntityDataInterval: {
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
type PreviewMultiAttachEntityDataInterval = ClosedEnum<typeof PreviewMultiAttachEntityDataInterval>;
/**
 * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
 */
type PreviewMultiAttachFilter = {
    properties: {
        [k: string]: string | number | boolean;
    };
};
type PreviewMultiAttachUsageLimit = {
    /**
     * The feature this usage limit applies to.
     */
    featureId: string;
    /**
     * Whether this usage limit is enabled.
     */
    enabled?: boolean | undefined;
    /**
     * Maximum units allowed per interval.
     */
    limit: number;
    /**
     * Interval for the cap, aligned to the customer's billing cycle.
     */
    interval: PreviewMultiAttachEntityDataInterval;
    /**
     * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
     */
    filter?: PreviewMultiAttachFilter | undefined;
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
declare const PreviewMultiAttachThresholdType: {
    readonly Usage: "usage";
    readonly UsagePercentage: "usage_percentage";
    readonly Remaining: "remaining";
    readonly RemainingPercentage: "remaining_percentage";
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
type PreviewMultiAttachThresholdType = ClosedEnum<typeof PreviewMultiAttachThresholdType>;
type PreviewMultiAttachUsageAlert = {
    /**
     * The feature ID this alert applies to.
     */
    featureId?: string | undefined;
    /**
     * Whether this usage alert is enabled.
     */
    enabled?: boolean | undefined;
    /**
     * The threshold value that triggers the alert. For usage or remaining, this is an absolute count. For usage_percentage or remaining_percentage, this is a percentage (0-100).
     */
    threshold: number;
    /**
     * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
     */
    thresholdType: PreviewMultiAttachThresholdType;
    /**
     * Optional user-defined label to distinguish multiple alerts on the same feature.
     */
    name?: string | undefined;
};
type PreviewMultiAttachOverageAllowed = {
    /**
     * The feature ID this overage allowed control applies to.
     */
    featureId: string;
    /**
     * Whether overage is allowed for this feature.
     */
    enabled?: boolean | undefined;
};
/**
 * Billing controls for the entity.
 */
type PreviewMultiAttachBillingControls = {
    /**
     * List of spend limits per feature. Each entry caps overage (overage_limit) and/or per-interval usage (usage_limit).
     */
    spendLimits?: Array<PreviewMultiAttachSpendLimit> | undefined;
    /**
     * List of hard usage caps per feature for this entity. An entity entry overrides the customer's for that feature.
     */
    usageLimits?: Array<PreviewMultiAttachUsageLimit> | undefined;
    /**
     * List of usage alert configurations per feature.
     */
    usageAlerts?: Array<PreviewMultiAttachUsageAlert> | undefined;
    /**
     * List of overage allowed controls per feature. When enabled, usage can exceed balance.
     */
    overageAllowed?: Array<PreviewMultiAttachOverageAllowed> | undefined;
};
type PreviewMultiAttachEntityData = {
    /**
     * The feature ID that this entity is associated with
     */
    featureId: string;
    /**
     * Name of the entity
     */
    name?: string | undefined;
    /**
     * Billing controls for the entity.
     */
    billingControls?: PreviewMultiAttachBillingControls | undefined;
};
type PreviewMultiAttachParams = {
    /**
     * The ID of the customer to attach the plans to.
     */
    customerId: string;
    /**
     * The ID of the entity to attach the plans to.
     */
    entityId?: string | undefined;
    /**
     * The list of plans to attach to the customer.
     */
    plans: Array<PreviewMultiAttachPlan>;
    /**
     * Free trial configuration applied to all plans. Pass an object to set a custom trial, or null to remove any trial.
     */
    freeTrial?: PreviewMultiAttachFreeTrialParams | null | undefined;
    /**
     * Invoice mode creates a draft or open invoice and sends it to the customer, instead of charging their card immediately.
     */
    invoiceMode?: PreviewMultiAttachInvoiceMode | undefined;
    /**
     * List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code.
     */
    discounts?: Array<PreviewMultiAttachAttachDiscount> | undefined;
    /**
     * URL to redirect to after successful checkout.
     */
    successUrl?: string | undefined;
    /**
     * Additional parameters to pass into the creation of the Stripe checkout session.
     */
    checkoutSessionParams?: {
        [k: string]: any;
    } | undefined;
    /**
     * Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects.
     */
    redirectMode?: PreviewMultiAttachRedirectMode | undefined;
    /**
     * Only applicable when the customer has an existing Stripe subscription. If true, creates a new separate subscription instead of merging into the existing one.
     */
    newBillingSubscription?: boolean | undefined;
    /**
     * If true, the cusProducts are activated immediately even when payment is pending via Stripe checkout.
     */
    enablePlanImmediately?: boolean | undefined;
    /**
     * Customer details to set when creating a customer
     */
    customerData?: CustomerData | undefined;
    entityData?: PreviewMultiAttachEntityData | undefined;
};
type PreviewMultiAttachDiscount = {
    amountOff: number;
    percentOff?: number | undefined;
    rewardId?: string | undefined;
    rewardName?: string | undefined;
};
/**
 * The period of time that this line item is being charged for.
 */
type PreviewMultiAttachLineItemPeriod = {
    /**
     * The start of the period in milliseconds since the Unix epoch.
     */
    start: number;
    /**
     * The end of the period in milliseconds since the Unix epoch.
     */
    end: number;
};
type PreviewMultiAttachLineItem = {
    /**
     * The name of the line item to display to the customer if you're building a UI. It will either be the plan name or the feature name.
     */
    displayName: string;
    /**
     * A detailed description of the line item.
     */
    description: string;
    /**
     * The amount in cents before discounts and tax for this line item.
     */
    subtotal: number;
    /**
     * The final amount in cents after discounts and tax for this line item.
     */
    total: number;
    /**
     * List of discounts applied to this line item.
     */
    discounts?: Array<PreviewMultiAttachDiscount> | undefined;
    /**
     * The ID of the plan that this line item belongs to.
     */
    planId: string;
    /**
     * The ID of the feature that this line item belongs to.
     */
    featureId: string | null;
    /**
     * The period of time that this line item is being charged for.
     */
    period?: PreviewMultiAttachLineItemPeriod | undefined;
    /**
     * The quantity of the line item.
     */
    quantity: number;
};
type PreviewMultiAttachNextCycleDiscount = {
    amountOff: number;
    percentOff?: number | undefined;
    rewardId?: string | undefined;
    rewardName?: string | undefined;
};
/**
 * The period of time that this line item is being charged for.
 */
type PreviewMultiAttachNextCycleLineItemPeriod = {
    /**
     * The start of the period in milliseconds since the Unix epoch.
     */
    start: number;
    /**
     * The end of the period in milliseconds since the Unix epoch.
     */
    end: number;
};
type PreviewMultiAttachNextCycleLineItem = {
    /**
     * The name of the line item to display to the customer if you're building a UI. It will either be the plan name or the feature name.
     */
    displayName: string;
    /**
     * A detailed description of the line item.
     */
    description: string;
    /**
     * The amount in cents before discounts and tax for this line item.
     */
    subtotal: number;
    /**
     * The final amount in cents after discounts and tax for this line item.
     */
    total: number;
    /**
     * List of discounts applied to this line item.
     */
    discounts?: Array<PreviewMultiAttachNextCycleDiscount> | undefined;
    /**
     * The ID of the plan that this line item belongs to.
     */
    planId: string;
    /**
     * The ID of the feature that this line item belongs to.
     */
    featureId: string | null;
    /**
     * The period of time that this line item is being charged for.
     */
    period?: PreviewMultiAttachNextCycleLineItemPeriod | undefined;
    /**
     * The quantity of the line item.
     */
    quantity: number;
};
/**
 * The period of time that this line item is being charged for.
 */
type PreviewMultiAttachUsageLineItemPeriod = {
    /**
     * The start of the period in milliseconds since the Unix epoch.
     */
    start: number;
    /**
     * The end of the period in milliseconds since the Unix epoch.
     */
    end: number;
};
type PreviewMultiAttachUsageLineItem = {
    /**
     * The name of the line item to display to the customer if you're building a UI. It will either be the plan name or the feature name.
     */
    displayName: string;
    /**
     * The ID of the plan that this line item belongs to.
     */
    planId: string;
    /**
     * The ID of the feature that this line item belongs to.
     */
    featureId: string | null;
    /**
     * The period of time that this line item is being charged for.
     */
    period?: PreviewMultiAttachUsageLineItemPeriod | undefined;
};
/**
 * Preview of the next billing cycle, if applicable. This shows what the customer will be charged in subsequent cycles.
 */
type PreviewMultiAttachNextCycle = {
    /**
     * Unix timestamp (milliseconds) when the next billing cycle starts.
     */
    startsAt: number;
    /**
     * The total amount in cents before discounts and tax for the next cycle.
     */
    subtotal: number;
    /**
     * The final amount in cents after discounts and tax for the next cycle.
     */
    total: number;
    /**
     * List of line items for the next billing cycle.
     */
    lineItems: Array<PreviewMultiAttachNextCycleLineItem>;
    /**
     * List of line items for usage-based features in the next cycle.
     */
    usageLineItems: Array<PreviewMultiAttachUsageLineItem>;
};
type PreviewMultiAttachIncomingFeatureQuantity = {
    /**
     * The ID of the adjustable feature included in this change.
     */
    featureId: string;
    /**
     * The quantity that will apply for this feature in the change.
     */
    quantity: number;
};
type PreviewMultiAttachIncoming = {
    /**
     * The ID of the plan affected by this preview change.
     */
    planId: string;
    plan?: Plan | undefined;
    /**
     * The feature quantity selections associated with this plan change.
     */
    featureQuantities: Array<PreviewMultiAttachIncomingFeatureQuantity>;
    /**
     * When this change takes effect, in milliseconds since the Unix epoch, or null if it applies immediately.
     */
    effectiveAt: number | null;
    /**
     * When this plan was canceled, in milliseconds since the Unix epoch, or null if it is not canceled.
     */
    canceledAt: number | null;
    /**
     * When this plan expires, in milliseconds since the Unix epoch, or null if it does not expire.
     */
    expiresAt: number | null;
};
type PreviewMultiAttachOutgoingFeatureQuantity = {
    /**
     * The ID of the adjustable feature included in this change.
     */
    featureId: string;
    /**
     * The quantity that will apply for this feature in the change.
     */
    quantity: number;
};
type PreviewMultiAttachOutgoing = {
    /**
     * The ID of the plan affected by this preview change.
     */
    planId: string;
    plan?: Plan | undefined;
    /**
     * The feature quantity selections associated with this plan change.
     */
    featureQuantities: Array<PreviewMultiAttachOutgoingFeatureQuantity>;
    /**
     * When this change takes effect, in milliseconds since the Unix epoch, or null if it applies immediately.
     */
    effectiveAt: number | null;
    /**
     * When this plan was canceled, in milliseconds since the Unix epoch, or null if it is not canceled.
     */
    canceledAt: number | null;
    /**
     * When this plan expires, in milliseconds since the Unix epoch, or null if it does not expire.
     */
    expiresAt: number | null;
};
declare const PreviewMultiAttachCheckoutType: {
    readonly StripeCheckout: "stripe_checkout";
    readonly AutumnCheckout: "autumn_checkout";
};
type PreviewMultiAttachCheckoutType = OpenEnum<typeof PreviewMultiAttachCheckoutType>;
/**
 * Calculation status ('complete' when Stripe Tax succeeds or 'incomplete' when Stripe Tax returned 0 or errored).
 */
declare const PreviewMultiAttachStatus: {
    readonly Complete: "complete";
    readonly Incomplete: "incomplete";
};
/**
 * Calculation status ('complete' when Stripe Tax succeeds or 'incomplete' when Stripe Tax returned 0 or errored).
 */
type PreviewMultiAttachStatus = OpenEnum<typeof PreviewMultiAttachStatus>;
/**
 * Tax preview for the immediate charge. Contact us to enable the tax flag on your organisation. Shows only with flag enabled, a Stripe customer exists and has a location.
 */
type PreviewMultiAttachTax = {
    /**
     * Total tax amount in major currency units.
     */
    total: number;
    /**
     * Tax included in line item subtotals.
     */
    amountInclusive: number;
    /**
     * Tax added on top of subtotals.
     */
    amountExclusive: number;
    /**
     * Three-letter currency code.
     */
    currency: string;
    /**
     * Calculation status ('complete' when Stripe Tax succeeds or 'incomplete' when Stripe Tax returned 0 or errored).
     */
    status: PreviewMultiAttachStatus;
};
/**
 * Stripe customer invoice credits preview.
 */
type PreviewMultiAttachInvoiceCredits = {
    /**
     * Stripe customer credit balance available, expressed as a positive number in major currency units.
     */
    balance: number;
    /**
     * Three-letter currency code.
     */
    currency: string;
};
/**
 * OK
 */
type PreviewMultiAttachResponse = {
    /**
     * The ID of the customer.
     */
    customerId: string;
    lineItems: Array<PreviewMultiAttachLineItem>;
    /**
     * The total amount in cents before discounts and tax for the current billing period.
     */
    subtotal: number;
    /**
     * The final amount in cents after discounts and tax for the current billing period.
     */
    total: number;
    /**
     * The three-letter ISO currency code (e.g., 'usd').
     */
    currency: string;
    /**
     * Preview of the next billing cycle, if applicable. This shows what the customer will be charged in subsequent cycles.
     */
    nextCycle?: PreviewMultiAttachNextCycle | undefined;
    /**
     * Expand the response with additional data.
     */
    expand?: Array<string> | undefined;
    /**
     * Products or subscription changes being added or updated.
     */
    incoming: Array<PreviewMultiAttachIncoming>;
    /**
     * Products or subscription changes being removed or ended.
     */
    outgoing: Array<PreviewMultiAttachOutgoing>;
    /**
     * Whether the customer will be redirected to a checkout page if attach is called.
     */
    redirectToCheckout: boolean;
    /**
     * The type of checkout that will be used if the customer is redirected to a checkout page.
     */
    checkoutType: PreviewMultiAttachCheckoutType | null;
    /**
     * Tax preview for the immediate charge. Contact us to enable the tax flag on your organisation. Shows only with flag enabled, a Stripe customer exists and has a location.
     */
    tax?: PreviewMultiAttachTax | undefined;
    /**
     * Stripe customer invoice credits preview.
     */
    invoiceCredits?: PreviewMultiAttachInvoiceCredits | undefined;
};

/**
 * Quantity configuration for a prepaid feature.
 */
type PreviewUpdateFeatureQuantityRequest = {
    /**
     * The ID of the feature to set quantity for.
     */
    featureId: string;
    /**
     * The quantity of the feature.
     */
    quantity?: number | undefined;
    /**
     * Whether the customer can adjust the quantity.
     */
    adjustable?: boolean | undefined;
};
/**
 * Billing interval (e.g. 'month', 'year').
 */
declare const PreviewUpdatePriceInterval: {
    readonly OneOff: "one_off";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
/**
 * Billing interval (e.g. 'month', 'year').
 */
type PreviewUpdatePriceInterval = ClosedEnum<typeof PreviewUpdatePriceInterval>;
/**
 * Base price configuration for a plan.
 */
type PreviewUpdateBasePrice = {
    /**
     * Base price amount for the plan.
     */
    amount: number;
    /**
     * Billing interval (e.g. 'month', 'year').
     */
    interval: PreviewUpdatePriceInterval;
    /**
     * Number of intervals per billing cycle. Defaults to 1.
     */
    intervalCount?: number | undefined;
};
/**
 * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
 */
declare const PreviewUpdateItemResetInterval: {
    readonly OneOff: "one_off";
    readonly Minute: "minute";
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
/**
 * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
 */
type PreviewUpdateItemResetInterval = ClosedEnum<typeof PreviewUpdateItemResetInterval>;
/**
 * Reset configuration for consumable features. Omit for non-consumable features like seats.
 */
type PreviewUpdateItemReset = {
    /**
     * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
     */
    interval: PreviewUpdateItemResetInterval;
    /**
     * Number of intervals between resets. Defaults to 1.
     */
    intervalCount?: number | undefined;
};
type PreviewUpdateItemTier = {
    to: number | string;
    amount?: number | undefined;
    flatAmount?: number | undefined;
};
declare const PreviewUpdateItemTierBehavior: {
    readonly Graduated: "graduated";
    readonly Volume: "volume";
};
type PreviewUpdateItemTierBehavior = ClosedEnum<typeof PreviewUpdateItemTierBehavior>;
/**
 * Billing interval. For consumable features, should match reset.interval.
 */
declare const PreviewUpdateItemPriceInterval: {
    readonly OneOff: "one_off";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
/**
 * Billing interval. For consumable features, should match reset.interval.
 */
type PreviewUpdateItemPriceInterval = ClosedEnum<typeof PreviewUpdateItemPriceInterval>;
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
declare const PreviewUpdateItemBillingMethod: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
type PreviewUpdateItemBillingMethod = ClosedEnum<typeof PreviewUpdateItemBillingMethod>;
/**
 * Pricing for usage beyond included units. Omit for free features.
 */
type PreviewUpdateItemPrice = {
    /**
     * Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
     */
    amount?: number | undefined;
    /**
     * Tiered pricing.  Either 'amount' or 'tiers' is required.
     */
    tiers?: Array<PreviewUpdateItemTier> | undefined;
    tierBehavior?: PreviewUpdateItemTierBehavior | undefined;
    /**
     * Billing interval. For consumable features, should match reset.interval.
     */
    interval: PreviewUpdateItemPriceInterval;
    /**
     * Number of intervals per billing cycle. Defaults to 1.
     */
    intervalCount?: number | undefined;
    /**
     * Units per price increment. Usage is rounded UP when billed (e.g. billing_units=100 means 101 rounds to 200).
     */
    billingUnits?: number | undefined;
    /**
     * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
     */
    billingMethod: PreviewUpdateItemBillingMethod;
    /**
     * Max units purchasable beyond included. E.g. included=100, max_purchase=300 allows 400 total. Null for no limit.
     */
    maxPurchase?: number | null | undefined;
};
/**
 * Billing behavior when quantity increases mid-cycle.
 */
declare const PreviewUpdateItemOnIncrease: {
    readonly BillImmediately: "bill_immediately";
    readonly ProrateImmediately: "prorate_immediately";
    readonly ProrateNextCycle: "prorate_next_cycle";
    readonly BillNextCycle: "bill_next_cycle";
};
/**
 * Billing behavior when quantity increases mid-cycle.
 */
type PreviewUpdateItemOnIncrease = ClosedEnum<typeof PreviewUpdateItemOnIncrease>;
/**
 * Credit behavior when quantity decreases mid-cycle.
 */
declare const PreviewUpdateItemOnDecrease: {
    readonly Prorate: "prorate";
    readonly ProrateImmediately: "prorate_immediately";
    readonly ProrateNextCycle: "prorate_next_cycle";
    readonly None: "none";
    readonly NoProrations: "no_prorations";
};
/**
 * Credit behavior when quantity decreases mid-cycle.
 */
type PreviewUpdateItemOnDecrease = ClosedEnum<typeof PreviewUpdateItemOnDecrease>;
/**
 * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
 */
type PreviewUpdateItemProration = {
    /**
     * Billing behavior when quantity increases mid-cycle.
     */
    onIncrease: PreviewUpdateItemOnIncrease;
    /**
     * Credit behavior when quantity decreases mid-cycle.
     */
    onDecrease: PreviewUpdateItemOnDecrease;
};
/**
 * When rolled over units expire.
 */
declare const PreviewUpdateItemExpiryDurationType: {
    readonly Month: "month";
    readonly Forever: "forever";
};
/**
 * When rolled over units expire.
 */
type PreviewUpdateItemExpiryDurationType = ClosedEnum<typeof PreviewUpdateItemExpiryDurationType>;
/**
 * Rollover config for unused units. If set, unused included units carry over.
 */
type PreviewUpdateItemRollover = {
    /**
     * Max rollover units. Omit for unlimited rollover.
     */
    max?: number | undefined;
    /**
     * Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
     */
    maxPercentage?: number | undefined;
    /**
     * When rolled over units expire.
     */
    expiryDurationType: PreviewUpdateItemExpiryDurationType;
    /**
     * Number of periods before expiry.
     */
    expiryDurationLength?: number | undefined;
};
/**
 * Configuration for a feature item in a plan, including usage limits, pricing, and rollover settings.
 */
type PreviewUpdateItemPlanItem = {
    /**
     * The ID of the feature to configure.
     */
    featureId: string;
    /**
     * Number of free units included. Balance resets to this each interval for consumable features.
     */
    included?: number | undefined;
    /**
     * If true, customer has unlimited access to this feature.
     */
    unlimited?: boolean | undefined;
    /**
     * Reset configuration for consumable features. Omit for non-consumable features like seats.
     */
    reset?: PreviewUpdateItemReset | undefined;
    /**
     * Pricing for usage beyond included units. Omit for free features.
     */
    price?: PreviewUpdateItemPrice | undefined;
    /**
     * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
     */
    proration?: PreviewUpdateItemProration | undefined;
    /**
     * Rollover config for unused units. If set, unused included units carry over.
     */
    rollover?: PreviewUpdateItemRollover | undefined;
};
/**
 * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
 */
declare const PreviewUpdateAddItemResetInterval: {
    readonly OneOff: "one_off";
    readonly Minute: "minute";
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
/**
 * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
 */
type PreviewUpdateAddItemResetInterval = ClosedEnum<typeof PreviewUpdateAddItemResetInterval>;
/**
 * Reset configuration for consumable features. Omit for non-consumable features like seats.
 */
type PreviewUpdateAddItemReset = {
    /**
     * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
     */
    interval: PreviewUpdateAddItemResetInterval;
    /**
     * Number of intervals between resets. Defaults to 1.
     */
    intervalCount?: number | undefined;
};
type PreviewUpdateAddItemTier = {
    to: number | string;
    amount?: number | undefined;
    flatAmount?: number | undefined;
};
declare const PreviewUpdateAddItemTierBehavior: {
    readonly Graduated: "graduated";
    readonly Volume: "volume";
};
type PreviewUpdateAddItemTierBehavior = ClosedEnum<typeof PreviewUpdateAddItemTierBehavior>;
/**
 * Billing interval. For consumable features, should match reset.interval.
 */
declare const PreviewUpdateAddItemPriceInterval: {
    readonly OneOff: "one_off";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
/**
 * Billing interval. For consumable features, should match reset.interval.
 */
type PreviewUpdateAddItemPriceInterval = ClosedEnum<typeof PreviewUpdateAddItemPriceInterval>;
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
declare const PreviewUpdateAddItemBillingMethod: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
type PreviewUpdateAddItemBillingMethod = ClosedEnum<typeof PreviewUpdateAddItemBillingMethod>;
/**
 * Pricing for usage beyond included units. Omit for free features.
 */
type PreviewUpdateAddItemPrice = {
    /**
     * Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
     */
    amount?: number | undefined;
    /**
     * Tiered pricing.  Either 'amount' or 'tiers' is required.
     */
    tiers?: Array<PreviewUpdateAddItemTier> | undefined;
    tierBehavior?: PreviewUpdateAddItemTierBehavior | undefined;
    /**
     * Billing interval. For consumable features, should match reset.interval.
     */
    interval: PreviewUpdateAddItemPriceInterval;
    /**
     * Number of intervals per billing cycle. Defaults to 1.
     */
    intervalCount?: number | undefined;
    /**
     * Units per price increment. Usage is rounded UP when billed (e.g. billing_units=100 means 101 rounds to 200).
     */
    billingUnits?: number | undefined;
    /**
     * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
     */
    billingMethod: PreviewUpdateAddItemBillingMethod;
    /**
     * Max units purchasable beyond included. E.g. included=100, max_purchase=300 allows 400 total. Null for no limit.
     */
    maxPurchase?: number | null | undefined;
};
/**
 * Billing behavior when quantity increases mid-cycle.
 */
declare const PreviewUpdateAddItemOnIncrease: {
    readonly BillImmediately: "bill_immediately";
    readonly ProrateImmediately: "prorate_immediately";
    readonly ProrateNextCycle: "prorate_next_cycle";
    readonly BillNextCycle: "bill_next_cycle";
};
/**
 * Billing behavior when quantity increases mid-cycle.
 */
type PreviewUpdateAddItemOnIncrease = ClosedEnum<typeof PreviewUpdateAddItemOnIncrease>;
/**
 * Credit behavior when quantity decreases mid-cycle.
 */
declare const PreviewUpdateAddItemOnDecrease: {
    readonly Prorate: "prorate";
    readonly ProrateImmediately: "prorate_immediately";
    readonly ProrateNextCycle: "prorate_next_cycle";
    readonly None: "none";
    readonly NoProrations: "no_prorations";
};
/**
 * Credit behavior when quantity decreases mid-cycle.
 */
type PreviewUpdateAddItemOnDecrease = ClosedEnum<typeof PreviewUpdateAddItemOnDecrease>;
/**
 * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
 */
type PreviewUpdateAddItemProration = {
    /**
     * Billing behavior when quantity increases mid-cycle.
     */
    onIncrease: PreviewUpdateAddItemOnIncrease;
    /**
     * Credit behavior when quantity decreases mid-cycle.
     */
    onDecrease: PreviewUpdateAddItemOnDecrease;
};
/**
 * When rolled over units expire.
 */
declare const PreviewUpdateAddItemExpiryDurationType: {
    readonly Month: "month";
    readonly Forever: "forever";
};
/**
 * When rolled over units expire.
 */
type PreviewUpdateAddItemExpiryDurationType = ClosedEnum<typeof PreviewUpdateAddItemExpiryDurationType>;
/**
 * Rollover config for unused units. If set, unused included units carry over.
 */
type PreviewUpdateAddItemRollover = {
    /**
     * Max rollover units. Omit for unlimited rollover.
     */
    max?: number | undefined;
    /**
     * Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
     */
    maxPercentage?: number | undefined;
    /**
     * When rolled over units expire.
     */
    expiryDurationType: PreviewUpdateAddItemExpiryDurationType;
    /**
     * Number of periods before expiry.
     */
    expiryDurationLength?: number | undefined;
};
/**
 * Configuration for a feature item in a plan, including usage limits, pricing, and rollover settings.
 */
type PreviewUpdateAddItemPlanItem = {
    /**
     * The ID of the feature to configure.
     */
    featureId: string;
    /**
     * Number of free units included. Balance resets to this each interval for consumable features.
     */
    included?: number | undefined;
    /**
     * If true, customer has unlimited access to this feature.
     */
    unlimited?: boolean | undefined;
    /**
     * Reset configuration for consumable features. Omit for non-consumable features like seats.
     */
    reset?: PreviewUpdateAddItemReset | undefined;
    /**
     * Pricing for usage beyond included units. Omit for free features.
     */
    price?: PreviewUpdateAddItemPrice | undefined;
    /**
     * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
     */
    proration?: PreviewUpdateAddItemProration | undefined;
    /**
     * Rollover config for unused units. If set, unused included units carry over.
     */
    rollover?: PreviewUpdateAddItemRollover | undefined;
};
/**
 * Match items with this billing method (prepaid or usage_based).
 */
declare const PreviewUpdateRemoveItemBillingMethod: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * Match items with this billing method (prepaid or usage_based).
 */
type PreviewUpdateRemoveItemBillingMethod = ClosedEnum<typeof PreviewUpdateRemoveItemBillingMethod>;
declare const PreviewUpdateIntervalRemoveItemEnum2: {
    readonly OneOff: "one_off";
    readonly Minute: "minute";
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
type PreviewUpdateIntervalRemoveItemEnum2 = ClosedEnum<typeof PreviewUpdateIntervalRemoveItemEnum2>;
declare const PreviewUpdateIntervalRemoveItemEnum1: {
    readonly OneOff: "one_off";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
type PreviewUpdateIntervalRemoveItemEnum1 = ClosedEnum<typeof PreviewUpdateIntervalRemoveItemEnum1>;
/**
 * Filter for matching plan items. All provided fields must match (AND).
 */
type PreviewUpdatePlanItemFilter = {
    /**
     * Match items linked to this feature.
     */
    featureId?: string | undefined;
    /**
     * Match items with this billing method (prepaid or usage_based).
     */
    billingMethod?: PreviewUpdateRemoveItemBillingMethod | undefined;
    /**
     * Match items with this interval. Accepts either a BillingInterval (price-side) or a ResetInterval (reset-side, includes day/hour/minute) so price-less items keyed by reset.interval can be disambiguated.
     */
    interval?: PreviewUpdateIntervalRemoveItemEnum1 | PreviewUpdateIntervalRemoveItemEnum2 | undefined;
    /**
     * Match items with this interval_count. Disambiguates between items that share an interval but differ in count.
     */
    intervalCount?: number | undefined;
};
/**
 * Unit of time for the trial ('day', 'month', 'year').
 */
declare const PreviewUpdateDurationType: {
    readonly Day: "day";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Unit of time for the trial ('day', 'month', 'year').
 */
type PreviewUpdateDurationType = ClosedEnum<typeof PreviewUpdateDurationType>;
/**
 * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
 */
declare const PreviewUpdateOnEnd: {
    readonly Bill: "bill";
    readonly Revert: "revert";
};
/**
 * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
 */
type PreviewUpdateOnEnd = ClosedEnum<typeof PreviewUpdateOnEnd>;
/**
 * Free trial configuration for a plan.
 */
type PreviewUpdateFreeTrialParams = {
    /**
     * Number of duration_type periods the trial lasts.
     */
    durationLength: number;
    /**
     * Unit of time for the trial ('day', 'month', 'year').
     */
    durationType?: PreviewUpdateDurationType | undefined;
    /**
     * If true, payment method required to start trial. Customer is charged after trial ends.
     */
    cardRequired?: boolean | undefined;
    /**
     * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
     */
    onEnd?: PreviewUpdateOnEnd | undefined;
};
/**
 * The time interval for the purchase limit window.
 */
declare const PreviewUpdatePurchaseLimitInterval: {
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
};
/**
 * The time interval for the purchase limit window.
 */
type PreviewUpdatePurchaseLimitInterval = ClosedEnum<typeof PreviewUpdatePurchaseLimitInterval>;
/**
 * Optional rate limit to cap how often auto top-ups occur.
 */
type PreviewUpdatePurchaseLimit = {
    /**
     * The time interval for the purchase limit window.
     */
    interval: PreviewUpdatePurchaseLimitInterval;
    /**
     * Number of intervals in the purchase limit window.
     */
    intervalCount?: number | undefined;
    /**
     * Maximum number of auto top-ups allowed within the interval.
     */
    limit: number;
};
type PreviewUpdateAutoTopup = {
    /**
     * The ID of the feature (credit balance) to auto top-up.
     */
    featureId: string;
    /**
     * Whether auto top-up is enabled.
     */
    enabled?: boolean | undefined;
    /**
     * When the balance drops below this threshold, an auto top-up will be purchased.
     */
    threshold: number;
    /**
     * Amount of credits to add per auto top-up.
     */
    quantity: number;
    /**
     * Optional rate limit to cap how often auto top-ups occur.
     */
    purchaseLimit?: PreviewUpdatePurchaseLimit | undefined;
    /**
     * When true, auto top-up creates a send_invoice invoice instead of auto-charging.
     */
    invoiceMode?: boolean | undefined;
};
/**
 * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
 */
declare const PreviewUpdateLimitType: {
    readonly Absolute: "absolute";
    readonly UsagePercentage: "usage_percentage";
};
/**
 * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
 */
type PreviewUpdateLimitType = ClosedEnum<typeof PreviewUpdateLimitType>;
type PreviewUpdateSpendLimit = {
    /**
     * Optional feature ID this spend limit applies to.
     */
    featureId?: string | undefined;
    /**
     * Whether the overage spend limit is enabled.
     */
    enabled?: boolean | undefined;
    /**
     * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
     */
    limitType?: PreviewUpdateLimitType | undefined;
    /**
     * Overage cap for the feature: absolute units, or a percent (e.g. 120) when limit_type is usage_percentage.
     */
    overageLimit?: number | undefined;
    /**
     * When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.
     */
    skipOverageBilling?: boolean | undefined;
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
declare const PreviewUpdateUsageLimitInterval: {
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
type PreviewUpdateUsageLimitInterval = ClosedEnum<typeof PreviewUpdateUsageLimitInterval>;
/**
 * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
 */
type PreviewUpdateFilter = {
    properties: {
        [k: string]: string | number | boolean;
    };
};
type PreviewUpdateUsageLimit = {
    /**
     * The feature this usage limit applies to.
     */
    featureId: string;
    /**
     * Whether this usage limit is enabled.
     */
    enabled?: boolean | undefined;
    /**
     * Maximum units allowed per interval.
     */
    limit: number;
    /**
     * Interval for the cap, aligned to the customer's billing cycle.
     */
    interval: PreviewUpdateUsageLimitInterval;
    /**
     * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
     */
    filter?: PreviewUpdateFilter | undefined;
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
declare const PreviewUpdateThresholdType: {
    readonly Usage: "usage";
    readonly UsagePercentage: "usage_percentage";
    readonly Remaining: "remaining";
    readonly RemainingPercentage: "remaining_percentage";
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
type PreviewUpdateThresholdType = ClosedEnum<typeof PreviewUpdateThresholdType>;
type PreviewUpdateUsageAlert = {
    /**
     * The feature ID this alert applies to.
     */
    featureId?: string | undefined;
    /**
     * Whether this usage alert is enabled.
     */
    enabled?: boolean | undefined;
    /**
     * The threshold value that triggers the alert. For usage or remaining, this is an absolute count. For usage_percentage or remaining_percentage, this is a percentage (0-100).
     */
    threshold: number;
    /**
     * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
     */
    thresholdType: PreviewUpdateThresholdType;
    /**
     * Optional user-defined label to distinguish multiple alerts on the same feature.
     */
    name?: string | undefined;
};
type PreviewUpdateOverageAllowed = {
    /**
     * The feature ID this overage allowed control applies to.
     */
    featureId: string;
    /**
     * Whether overage is allowed for this feature.
     */
    enabled?: boolean | undefined;
};
/**
 * Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
 */
type PreviewUpdateBillingControls = {
    /**
     * List of auto top-up configurations per feature.
     */
    autoTopups?: Array<PreviewUpdateAutoTopup> | undefined;
    /**
     * List of overage spend limits per feature (caps overage spend).
     */
    spendLimits?: Array<PreviewUpdateSpendLimit> | undefined;
    /**
     * List of hard usage caps per feature (max units per interval).
     */
    usageLimits?: Array<PreviewUpdateUsageLimit> | undefined;
    /**
     * List of usage alert configurations per feature.
     */
    usageAlerts?: Array<PreviewUpdateUsageAlert> | undefined;
    /**
     * List of overage allowed controls per feature. When enabled, usage can exceed balance.
     */
    overageAllowed?: Array<PreviewUpdateOverageAllowed> | undefined;
};
/**
 * Customize the plan to attach. Can override the price, items, free trial, or a combination.
 */
type PreviewUpdateCustomize = {
    /**
     * Override the base price of the plan. Pass null to remove the base price.
     */
    price?: PreviewUpdateBasePrice | null | undefined;
    /**
     * Override the items in the plan (PUT-style — replaces all existing items). Mutually exclusive with add_items / remove_items / deprecated update_items.
     */
    items?: Array<PreviewUpdateItemPlanItem> | undefined;
    /**
     * Items to add to the plan.
     */
    addItems?: Array<PreviewUpdateAddItemPlanItem> | undefined;
    /**
     * Filters selecting items to remove from the plan.
     */
    removeItems?: Array<PreviewUpdatePlanItemFilter> | undefined;
    /**
     * Override the plan's default free trial. Pass an object to set a custom trial, or null to remove the trial entirely.
     */
    freeTrial?: PreviewUpdateFreeTrialParams | null | undefined;
    /**
     * Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
     */
    billingControls?: PreviewUpdateBillingControls | undefined;
};
/**
 * Invoice mode creates a draft or open invoice and sends it to the customer, instead of charging their card immediately. This uses Stripe's send_invoice collection method.
 */
type PreviewUpdateInvoiceMode = {
    /**
     * When true, creates an invoice and sends it to the customer instead of charging their card immediately. Uses Stripe's send_invoice collection method.
     */
    enabled: boolean;
    /**
     * If true, enables the plan immediately even though the invoice is not paid yet.
     */
    enablePlanImmediately?: boolean | undefined;
    /**
     * If true, finalizes the invoice so it can be sent to the customer. If false, keeps it as a draft for manual review.
     */
    finalize?: boolean | undefined;
    /**
     * ID of an invoice template (configured in billing settings) whose footer (e.g. bank details) is applied to the invoice.
     */
    invoiceTemplateId?: string | undefined;
    /**
     * Number of days the customer has to pay the invoice before it is due (Stripe days_until_due).
     */
    netTermsDays?: number | undefined;
};
/**
 * How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
 */
declare const PreviewUpdateProrationBehavior: {
    readonly ProrateImmediately: "prorate_immediately";
    readonly None: "none";
};
/**
 * How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
 */
type PreviewUpdateProrationBehavior = ClosedEnum<typeof PreviewUpdateProrationBehavior>;
/**
 * Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects.
 */
declare const PreviewUpdateRedirectMode: {
    readonly Always: "always";
    readonly IfRequired: "if_required";
    readonly Never: "never";
};
/**
 * Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects.
 */
type PreviewUpdateRedirectMode = ClosedEnum<typeof PreviewUpdateRedirectMode>;
/**
 * A discount to apply. Can be either a reward ID or a promotion code.
 */
type PreviewUpdateAttachDiscount = {
    /**
     * The ID of the reward to apply as a discount.
     */
    rewardId?: string | undefined;
    /**
     * The promotion code to apply as a discount.
     */
    promotionCode?: string | undefined;
};
/**
 * Action to perform for cancellation. 'cancel_immediately' cancels now with prorated refund, 'cancel_end_of_cycle' cancels at period end, 'uncancel' reverses a pending cancellation.
 */
declare const PreviewUpdateCancelAction: {
    readonly CancelImmediately: "cancel_immediately";
    readonly CancelEndOfCycle: "cancel_end_of_cycle";
    readonly Uncancel: "uncancel";
};
/**
 * Action to perform for cancellation. 'cancel_immediately' cancels now with prorated refund, 'cancel_end_of_cycle' cancels at period end, 'uncancel' reverses a pending cancellation.
 */
type PreviewUpdateCancelAction = ClosedEnum<typeof PreviewUpdateCancelAction>;
/**
 * Controls how the last payment is refunded on immediate cancellation. 'prorated' refunds the unused portion, 'full' refunds the entire last payment.
 */
declare const PreviewUpdateRefundLastPayment: {
    readonly Prorated: "prorated";
    readonly Full: "full";
};
/**
 * Controls how the last payment is refunded on immediate cancellation. 'prorated' refunds the unused portion, 'full' refunds the entire last payment.
 */
type PreviewUpdateRefundLastPayment = ClosedEnum<typeof PreviewUpdateRefundLastPayment>;
/**
 * Controls whether balances should be recalculated during the subscription update.
 */
type PreviewUpdateRecalculateBalances = {
    /**
     * If true, recalculates balances during the subscription update. Only applicable when updating feature quantities.
     */
    enabled: boolean;
};
/**
 * Whether to carry over usages from the previous plan.
 */
type PreviewUpdateCarryOverUsages = {
    /**
     * Whether to carry over usages from the previous plan.
     */
    enabled: boolean;
    /**
     * The IDs of the features to carry over usages for. If left undefined, all consumable features will be carried over.
     */
    featureIds?: Array<string> | undefined;
};
type PreviewUpdateParams = {
    /**
     * The ID of the customer to attach the plan to.
     */
    customerId: string;
    /**
     * The ID of the entity to attach the plan to.
     */
    entityId?: string | undefined;
    /**
     * The ID of the plan to update. Optional if subscription_id is provided, or if the customer has only one product.
     */
    planId?: string | undefined;
    /**
     * If this plan contains prepaid features, use this field to specify the quantity of each prepaid feature. This quantity includes the included amount and billing units defined when setting up the plan.
     */
    featureQuantities?: Array<PreviewUpdateFeatureQuantityRequest> | undefined;
    /**
     * The version of the plan to attach.
     */
    version?: number | undefined;
    /**
     * Customize the plan to attach. Can override the price, items, free trial, or a combination.
     */
    customize?: PreviewUpdateCustomize | undefined;
    /**
     * Invoice mode creates a draft or open invoice and sends it to the customer, instead of charging their card immediately. This uses Stripe's send_invoice collection method.
     */
    invoiceMode?: PreviewUpdateInvoiceMode | undefined;
    /**
     * How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
     */
    prorationBehavior?: PreviewUpdateProrationBehavior | undefined;
    /**
     * Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects.
     */
    redirectMode?: PreviewUpdateRedirectMode | undefined;
    /**
     * A unique ID to identify this subscription. Can be used to target specific subscriptions in update operations when a customer has multiple products with the same plan.
     */
    subscriptionId?: string | undefined;
    /**
     * List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code.
     */
    discounts?: Array<PreviewUpdateAttachDiscount> | undefined;
    /**
     * Action to perform for cancellation. 'cancel_immediately' cancels now with prorated refund, 'cancel_end_of_cycle' cancels at period end, 'uncancel' reverses a pending cancellation.
     */
    cancelAction?: PreviewUpdateCancelAction | undefined;
    /**
     * Reset the billing cycle anchor immediately with 'now'
     */
    billingCycleAnchor?: "now" | undefined;
    /**
     * If true, the subscription is updated internally without applying billing changes in Stripe.
     */
    noBillingChanges?: boolean | undefined;
    /**
     * Controls how the last payment is refunded on immediate cancellation. 'prorated' refunds the unused portion, 'full' refunds the entire last payment.
     */
    refundLastPayment?: PreviewUpdateRefundLastPayment | undefined;
    /**
     * Controls whether balances should be recalculated during the subscription update.
     */
    recalculateBalances?: PreviewUpdateRecalculateBalances | undefined;
    /**
     * Whether to carry over usages from the previous plan.
     */
    carryOverUsages?: PreviewUpdateCarryOverUsages | undefined;
};
type PreviewUpdateDiscount = {
    amountOff: number;
    percentOff?: number | undefined;
    rewardId?: string | undefined;
    rewardName?: string | undefined;
};
/**
 * The period of time that this line item is being charged for.
 */
type PreviewUpdateLineItemPeriod = {
    /**
     * The start of the period in milliseconds since the Unix epoch.
     */
    start: number;
    /**
     * The end of the period in milliseconds since the Unix epoch.
     */
    end: number;
};
type PreviewUpdateLineItem = {
    /**
     * The name of the line item to display to the customer if you're building a UI. It will either be the plan name or the feature name.
     */
    displayName: string;
    /**
     * A detailed description of the line item.
     */
    description: string;
    /**
     * The amount in cents before discounts and tax for this line item.
     */
    subtotal: number;
    /**
     * The final amount in cents after discounts and tax for this line item.
     */
    total: number;
    /**
     * List of discounts applied to this line item.
     */
    discounts?: Array<PreviewUpdateDiscount> | undefined;
    /**
     * The ID of the plan that this line item belongs to.
     */
    planId: string;
    /**
     * The ID of the feature that this line item belongs to.
     */
    featureId: string | null;
    /**
     * The period of time that this line item is being charged for.
     */
    period?: PreviewUpdateLineItemPeriod | undefined;
    /**
     * The quantity of the line item.
     */
    quantity: number;
};
type PreviewUpdateNextCycleDiscount = {
    amountOff: number;
    percentOff?: number | undefined;
    rewardId?: string | undefined;
    rewardName?: string | undefined;
};
/**
 * The period of time that this line item is being charged for.
 */
type PreviewUpdateNextCycleLineItemPeriod = {
    /**
     * The start of the period in milliseconds since the Unix epoch.
     */
    start: number;
    /**
     * The end of the period in milliseconds since the Unix epoch.
     */
    end: number;
};
type PreviewUpdateNextCycleLineItem = {
    /**
     * The name of the line item to display to the customer if you're building a UI. It will either be the plan name or the feature name.
     */
    displayName: string;
    /**
     * A detailed description of the line item.
     */
    description: string;
    /**
     * The amount in cents before discounts and tax for this line item.
     */
    subtotal: number;
    /**
     * The final amount in cents after discounts and tax for this line item.
     */
    total: number;
    /**
     * List of discounts applied to this line item.
     */
    discounts?: Array<PreviewUpdateNextCycleDiscount> | undefined;
    /**
     * The ID of the plan that this line item belongs to.
     */
    planId: string;
    /**
     * The ID of the feature that this line item belongs to.
     */
    featureId: string | null;
    /**
     * The period of time that this line item is being charged for.
     */
    period?: PreviewUpdateNextCycleLineItemPeriod | undefined;
    /**
     * The quantity of the line item.
     */
    quantity: number;
};
/**
 * The period of time that this line item is being charged for.
 */
type PreviewUpdateUsageLineItemPeriod = {
    /**
     * The start of the period in milliseconds since the Unix epoch.
     */
    start: number;
    /**
     * The end of the period in milliseconds since the Unix epoch.
     */
    end: number;
};
type PreviewUpdateUsageLineItem = {
    /**
     * The name of the line item to display to the customer if you're building a UI. It will either be the plan name or the feature name.
     */
    displayName: string;
    /**
     * The ID of the plan that this line item belongs to.
     */
    planId: string;
    /**
     * The ID of the feature that this line item belongs to.
     */
    featureId: string | null;
    /**
     * The period of time that this line item is being charged for.
     */
    period?: PreviewUpdateUsageLineItemPeriod | undefined;
};
/**
 * Preview of the next billing cycle, if applicable. This shows what the customer will be charged in subsequent cycles.
 */
type PreviewUpdateNextCycle = {
    /**
     * Unix timestamp (milliseconds) when the next billing cycle starts.
     */
    startsAt: number;
    /**
     * The total amount in cents before discounts and tax for the next cycle.
     */
    subtotal: number;
    /**
     * The final amount in cents after discounts and tax for the next cycle.
     */
    total: number;
    /**
     * List of line items for the next billing cycle.
     */
    lineItems: Array<PreviewUpdateNextCycleLineItem>;
    /**
     * List of line items for usage-based features in the next cycle.
     */
    usageLineItems: Array<PreviewUpdateUsageLineItem>;
};
type PreviewUpdateIncomingFeatureQuantity = {
    /**
     * The ID of the adjustable feature included in this change.
     */
    featureId: string;
    /**
     * The quantity that will apply for this feature in the change.
     */
    quantity: number;
};
type PreviewUpdateIncoming = {
    /**
     * The ID of the plan affected by this preview change.
     */
    planId: string;
    plan?: Plan | undefined;
    /**
     * The feature quantity selections associated with this plan change.
     */
    featureQuantities: Array<PreviewUpdateIncomingFeatureQuantity>;
    /**
     * When this change takes effect, in milliseconds since the Unix epoch, or null if it applies immediately.
     */
    effectiveAt: number | null;
    /**
     * When this plan was canceled, in milliseconds since the Unix epoch, or null if it is not canceled.
     */
    canceledAt: number | null;
    /**
     * When this plan expires, in milliseconds since the Unix epoch, or null if it does not expire.
     */
    expiresAt: number | null;
};
type PreviewUpdateOutgoingFeatureQuantity = {
    /**
     * The ID of the adjustable feature included in this change.
     */
    featureId: string;
    /**
     * The quantity that will apply for this feature in the change.
     */
    quantity: number;
};
type PreviewUpdateOutgoing = {
    /**
     * The ID of the plan affected by this preview change.
     */
    planId: string;
    plan?: Plan | undefined;
    /**
     * The feature quantity selections associated with this plan change.
     */
    featureQuantities: Array<PreviewUpdateOutgoingFeatureQuantity>;
    /**
     * When this change takes effect, in milliseconds since the Unix epoch, or null if it applies immediately.
     */
    effectiveAt: number | null;
    /**
     * When this plan was canceled, in milliseconds since the Unix epoch, or null if it is not canceled.
     */
    canceledAt: number | null;
    /**
     * When this plan expires, in milliseconds since the Unix epoch, or null if it does not expire.
     */
    expiresAt: number | null;
};
declare const Intent: {
    readonly UpdatePlan: "update_plan";
    readonly UpdateQuantity: "update_quantity";
    readonly CancelImmediately: "cancel_immediately";
    readonly CancelEndOfCycle: "cancel_end_of_cycle";
    readonly Uncancel: "uncancel";
    readonly None: "none";
};
type Intent = OpenEnum<typeof Intent>;
/**
 * Calculation status ('complete' when Stripe Tax succeeds or 'incomplete' when Stripe Tax returned 0 or errored).
 */
declare const PreviewUpdateStatus: {
    readonly Complete: "complete";
    readonly Incomplete: "incomplete";
};
/**
 * Calculation status ('complete' when Stripe Tax succeeds or 'incomplete' when Stripe Tax returned 0 or errored).
 */
type PreviewUpdateStatus = OpenEnum<typeof PreviewUpdateStatus>;
/**
 * Tax preview for the immediate charge. Contact us to enable the tax flag on your organisation. Shows only with flag enabled, a Stripe customer exists and has a location.
 */
type PreviewUpdateTax = {
    /**
     * Total tax amount in major currency units.
     */
    total: number;
    /**
     * Tax included in line item subtotals.
     */
    amountInclusive: number;
    /**
     * Tax added on top of subtotals.
     */
    amountExclusive: number;
    /**
     * Three-letter currency code.
     */
    currency: string;
    /**
     * Calculation status ('complete' when Stripe Tax succeeds or 'incomplete' when Stripe Tax returned 0 or errored).
     */
    status: PreviewUpdateStatus;
};
/**
 * Stripe customer invoice credits preview.
 */
type PreviewUpdateInvoiceCredits = {
    /**
     * Stripe customer credit balance available, expressed as a positive number in major currency units.
     */
    balance: number;
    /**
     * Three-letter currency code.
     */
    currency: string;
};
/**
 * OK
 */
type PreviewUpdateResponse = {
    /**
     * The ID of the customer.
     */
    customerId: string;
    /**
     * List of line items for the current billing period.
     */
    lineItems: Array<PreviewUpdateLineItem>;
    /**
     * The total amount in cents before discounts and tax for the current billing period.
     */
    subtotal: number;
    /**
     * The final amount in cents after discounts and tax for the current billing period.
     */
    total: number;
    /**
     * The three-letter ISO currency code (e.g., 'usd').
     */
    currency: string;
    /**
     * Preview of the next billing cycle, if applicable. This shows what the customer will be charged in subsequent cycles.
     */
    nextCycle?: PreviewUpdateNextCycle | undefined;
    /**
     * Expand the response with additional data.
     */
    expand?: Array<string> | undefined;
    /**
     * Products or subscription changes being added or updated.
     */
    incoming: Array<PreviewUpdateIncoming>;
    /**
     * Products or subscription changes being removed or ended.
     */
    outgoing: Array<PreviewUpdateOutgoing>;
    intent: Intent;
    /**
     * Tax preview for the immediate charge. Contact us to enable the tax flag on your organisation. Shows only with flag enabled, a Stripe customer exists and has a location.
     */
    tax?: PreviewUpdateTax | undefined;
    /**
     * Stripe customer invoice credits preview.
     */
    invoiceCredits?: PreviewUpdateInvoiceCredits | undefined;
};

type RedeemReferralCodeParams = {
    /**
     * The referral code to redeem
     */
    code: string;
    /**
     * The unique identifier of the customer redeeming the code
     */
    customerId: string;
};
/**
 * OK
 */
type RedeemReferralCodeResponse = {
    /**
     * The ID of the redemption event
     */
    id: string;
    /**
     * Your unique identifier for the customer
     */
    customerId: string;
    /**
     * The ID of the reward that will be granted
     */
    rewardId: string;
};

/**
 * Quantity configuration for a prepaid feature.
 */
type SetupPaymentFeatureQuantity = {
    /**
     * The ID of the feature to set quantity for.
     */
    featureId: string;
    /**
     * The quantity of the feature.
     */
    quantity?: number | undefined;
    /**
     * Whether the customer can adjust the quantity.
     */
    adjustable?: boolean | undefined;
};
/**
 * Billing interval (e.g. 'month', 'year').
 */
declare const SetupPaymentPriceInterval: {
    readonly OneOff: "one_off";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
/**
 * Billing interval (e.g. 'month', 'year').
 */
type SetupPaymentPriceInterval = ClosedEnum<typeof SetupPaymentPriceInterval>;
/**
 * Base price configuration for a plan.
 */
type SetupPaymentBasePrice = {
    /**
     * Base price amount for the plan.
     */
    amount: number;
    /**
     * Billing interval (e.g. 'month', 'year').
     */
    interval: SetupPaymentPriceInterval;
    /**
     * Number of intervals per billing cycle. Defaults to 1.
     */
    intervalCount?: number | undefined;
};
/**
 * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
 */
declare const SetupPaymentItemResetInterval: {
    readonly OneOff: "one_off";
    readonly Minute: "minute";
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
/**
 * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
 */
type SetupPaymentItemResetInterval = ClosedEnum<typeof SetupPaymentItemResetInterval>;
/**
 * Reset configuration for consumable features. Omit for non-consumable features like seats.
 */
type SetupPaymentItemReset = {
    /**
     * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
     */
    interval: SetupPaymentItemResetInterval;
    /**
     * Number of intervals between resets. Defaults to 1.
     */
    intervalCount?: number | undefined;
};
type SetupPaymentItemTier = {
    to: number | string;
    amount?: number | undefined;
    flatAmount?: number | undefined;
};
declare const SetupPaymentItemTierBehavior: {
    readonly Graduated: "graduated";
    readonly Volume: "volume";
};
type SetupPaymentItemTierBehavior = ClosedEnum<typeof SetupPaymentItemTierBehavior>;
/**
 * Billing interval. For consumable features, should match reset.interval.
 */
declare const SetupPaymentItemPriceInterval: {
    readonly OneOff: "one_off";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
/**
 * Billing interval. For consumable features, should match reset.interval.
 */
type SetupPaymentItemPriceInterval = ClosedEnum<typeof SetupPaymentItemPriceInterval>;
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
declare const SetupPaymentItemBillingMethod: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
type SetupPaymentItemBillingMethod = ClosedEnum<typeof SetupPaymentItemBillingMethod>;
/**
 * Pricing for usage beyond included units. Omit for free features.
 */
type SetupPaymentItemPrice = {
    /**
     * Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
     */
    amount?: number | undefined;
    /**
     * Tiered pricing.  Either 'amount' or 'tiers' is required.
     */
    tiers?: Array<SetupPaymentItemTier> | undefined;
    tierBehavior?: SetupPaymentItemTierBehavior | undefined;
    /**
     * Billing interval. For consumable features, should match reset.interval.
     */
    interval: SetupPaymentItemPriceInterval;
    /**
     * Number of intervals per billing cycle. Defaults to 1.
     */
    intervalCount?: number | undefined;
    /**
     * Units per price increment. Usage is rounded UP when billed (e.g. billing_units=100 means 101 rounds to 200).
     */
    billingUnits?: number | undefined;
    /**
     * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
     */
    billingMethod: SetupPaymentItemBillingMethod;
    /**
     * Max units purchasable beyond included. E.g. included=100, max_purchase=300 allows 400 total. Null for no limit.
     */
    maxPurchase?: number | null | undefined;
};
/**
 * Billing behavior when quantity increases mid-cycle.
 */
declare const SetupPaymentItemOnIncrease: {
    readonly BillImmediately: "bill_immediately";
    readonly ProrateImmediately: "prorate_immediately";
    readonly ProrateNextCycle: "prorate_next_cycle";
    readonly BillNextCycle: "bill_next_cycle";
};
/**
 * Billing behavior when quantity increases mid-cycle.
 */
type SetupPaymentItemOnIncrease = ClosedEnum<typeof SetupPaymentItemOnIncrease>;
/**
 * Credit behavior when quantity decreases mid-cycle.
 */
declare const SetupPaymentItemOnDecrease: {
    readonly Prorate: "prorate";
    readonly ProrateImmediately: "prorate_immediately";
    readonly ProrateNextCycle: "prorate_next_cycle";
    readonly None: "none";
    readonly NoProrations: "no_prorations";
};
/**
 * Credit behavior when quantity decreases mid-cycle.
 */
type SetupPaymentItemOnDecrease = ClosedEnum<typeof SetupPaymentItemOnDecrease>;
/**
 * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
 */
type SetupPaymentItemProration = {
    /**
     * Billing behavior when quantity increases mid-cycle.
     */
    onIncrease: SetupPaymentItemOnIncrease;
    /**
     * Credit behavior when quantity decreases mid-cycle.
     */
    onDecrease: SetupPaymentItemOnDecrease;
};
/**
 * When rolled over units expire.
 */
declare const SetupPaymentItemExpiryDurationType: {
    readonly Month: "month";
    readonly Forever: "forever";
};
/**
 * When rolled over units expire.
 */
type SetupPaymentItemExpiryDurationType = ClosedEnum<typeof SetupPaymentItemExpiryDurationType>;
/**
 * Rollover config for unused units. If set, unused included units carry over.
 */
type SetupPaymentItemRollover = {
    /**
     * Max rollover units. Omit for unlimited rollover.
     */
    max?: number | undefined;
    /**
     * Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
     */
    maxPercentage?: number | undefined;
    /**
     * When rolled over units expire.
     */
    expiryDurationType: SetupPaymentItemExpiryDurationType;
    /**
     * Number of periods before expiry.
     */
    expiryDurationLength?: number | undefined;
};
/**
 * Configuration for a feature item in a plan, including usage limits, pricing, and rollover settings.
 */
type SetupPaymentItemPlanItem = {
    /**
     * The ID of the feature to configure.
     */
    featureId: string;
    /**
     * Number of free units included. Balance resets to this each interval for consumable features.
     */
    included?: number | undefined;
    /**
     * If true, customer has unlimited access to this feature.
     */
    unlimited?: boolean | undefined;
    /**
     * Reset configuration for consumable features. Omit for non-consumable features like seats.
     */
    reset?: SetupPaymentItemReset | undefined;
    /**
     * Pricing for usage beyond included units. Omit for free features.
     */
    price?: SetupPaymentItemPrice | undefined;
    /**
     * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
     */
    proration?: SetupPaymentItemProration | undefined;
    /**
     * Rollover config for unused units. If set, unused included units carry over.
     */
    rollover?: SetupPaymentItemRollover | undefined;
};
/**
 * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
 */
declare const SetupPaymentAddItemResetInterval: {
    readonly OneOff: "one_off";
    readonly Minute: "minute";
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
/**
 * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
 */
type SetupPaymentAddItemResetInterval = ClosedEnum<typeof SetupPaymentAddItemResetInterval>;
/**
 * Reset configuration for consumable features. Omit for non-consumable features like seats.
 */
type SetupPaymentAddItemReset = {
    /**
     * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
     */
    interval: SetupPaymentAddItemResetInterval;
    /**
     * Number of intervals between resets. Defaults to 1.
     */
    intervalCount?: number | undefined;
};
type SetupPaymentAddItemTier = {
    to: number | string;
    amount?: number | undefined;
    flatAmount?: number | undefined;
};
declare const SetupPaymentAddItemTierBehavior: {
    readonly Graduated: "graduated";
    readonly Volume: "volume";
};
type SetupPaymentAddItemTierBehavior = ClosedEnum<typeof SetupPaymentAddItemTierBehavior>;
/**
 * Billing interval. For consumable features, should match reset.interval.
 */
declare const SetupPaymentAddItemPriceInterval: {
    readonly OneOff: "one_off";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
/**
 * Billing interval. For consumable features, should match reset.interval.
 */
type SetupPaymentAddItemPriceInterval = ClosedEnum<typeof SetupPaymentAddItemPriceInterval>;
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
declare const SetupPaymentAddItemBillingMethod: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
type SetupPaymentAddItemBillingMethod = ClosedEnum<typeof SetupPaymentAddItemBillingMethod>;
/**
 * Pricing for usage beyond included units. Omit for free features.
 */
type SetupPaymentAddItemPrice = {
    /**
     * Price per billing_units after included usage. Either 'amount' or 'tiers' is required.
     */
    amount?: number | undefined;
    /**
     * Tiered pricing.  Either 'amount' or 'tiers' is required.
     */
    tiers?: Array<SetupPaymentAddItemTier> | undefined;
    tierBehavior?: SetupPaymentAddItemTierBehavior | undefined;
    /**
     * Billing interval. For consumable features, should match reset.interval.
     */
    interval: SetupPaymentAddItemPriceInterval;
    /**
     * Number of intervals per billing cycle. Defaults to 1.
     */
    intervalCount?: number | undefined;
    /**
     * Units per price increment. Usage is rounded UP when billed (e.g. billing_units=100 means 101 rounds to 200).
     */
    billingUnits?: number | undefined;
    /**
     * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
     */
    billingMethod: SetupPaymentAddItemBillingMethod;
    /**
     * Max units purchasable beyond included. E.g. included=100, max_purchase=300 allows 400 total. Null for no limit.
     */
    maxPurchase?: number | null | undefined;
};
/**
 * Billing behavior when quantity increases mid-cycle.
 */
declare const SetupPaymentAddItemOnIncrease: {
    readonly BillImmediately: "bill_immediately";
    readonly ProrateImmediately: "prorate_immediately";
    readonly ProrateNextCycle: "prorate_next_cycle";
    readonly BillNextCycle: "bill_next_cycle";
};
/**
 * Billing behavior when quantity increases mid-cycle.
 */
type SetupPaymentAddItemOnIncrease = ClosedEnum<typeof SetupPaymentAddItemOnIncrease>;
/**
 * Credit behavior when quantity decreases mid-cycle.
 */
declare const SetupPaymentAddItemOnDecrease: {
    readonly Prorate: "prorate";
    readonly ProrateImmediately: "prorate_immediately";
    readonly ProrateNextCycle: "prorate_next_cycle";
    readonly None: "none";
    readonly NoProrations: "no_prorations";
};
/**
 * Credit behavior when quantity decreases mid-cycle.
 */
type SetupPaymentAddItemOnDecrease = ClosedEnum<typeof SetupPaymentAddItemOnDecrease>;
/**
 * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
 */
type SetupPaymentAddItemProration = {
    /**
     * Billing behavior when quantity increases mid-cycle.
     */
    onIncrease: SetupPaymentAddItemOnIncrease;
    /**
     * Credit behavior when quantity decreases mid-cycle.
     */
    onDecrease: SetupPaymentAddItemOnDecrease;
};
/**
 * When rolled over units expire.
 */
declare const SetupPaymentAddItemExpiryDurationType: {
    readonly Month: "month";
    readonly Forever: "forever";
};
/**
 * When rolled over units expire.
 */
type SetupPaymentAddItemExpiryDurationType = ClosedEnum<typeof SetupPaymentAddItemExpiryDurationType>;
/**
 * Rollover config for unused units. If set, unused included units carry over.
 */
type SetupPaymentAddItemRollover = {
    /**
     * Max rollover units. Omit for unlimited rollover.
     */
    max?: number | undefined;
    /**
     * Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
     */
    maxPercentage?: number | undefined;
    /**
     * When rolled over units expire.
     */
    expiryDurationType: SetupPaymentAddItemExpiryDurationType;
    /**
     * Number of periods before expiry.
     */
    expiryDurationLength?: number | undefined;
};
/**
 * Configuration for a feature item in a plan, including usage limits, pricing, and rollover settings.
 */
type SetupPaymentAddItemPlanItem = {
    /**
     * The ID of the feature to configure.
     */
    featureId: string;
    /**
     * Number of free units included. Balance resets to this each interval for consumable features.
     */
    included?: number | undefined;
    /**
     * If true, customer has unlimited access to this feature.
     */
    unlimited?: boolean | undefined;
    /**
     * Reset configuration for consumable features. Omit for non-consumable features like seats.
     */
    reset?: SetupPaymentAddItemReset | undefined;
    /**
     * Pricing for usage beyond included units. Omit for free features.
     */
    price?: SetupPaymentAddItemPrice | undefined;
    /**
     * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
     */
    proration?: SetupPaymentAddItemProration | undefined;
    /**
     * Rollover config for unused units. If set, unused included units carry over.
     */
    rollover?: SetupPaymentAddItemRollover | undefined;
};
/**
 * Match items with this billing method (prepaid or usage_based).
 */
declare const SetupPaymentRemoveItemBillingMethod: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * Match items with this billing method (prepaid or usage_based).
 */
type SetupPaymentRemoveItemBillingMethod = ClosedEnum<typeof SetupPaymentRemoveItemBillingMethod>;
declare const SetupPaymentIntervalRemoveItemEnum2: {
    readonly OneOff: "one_off";
    readonly Minute: "minute";
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
type SetupPaymentIntervalRemoveItemEnum2 = ClosedEnum<typeof SetupPaymentIntervalRemoveItemEnum2>;
declare const SetupPaymentIntervalRemoveItemEnum1: {
    readonly OneOff: "one_off";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
type SetupPaymentIntervalRemoveItemEnum1 = ClosedEnum<typeof SetupPaymentIntervalRemoveItemEnum1>;
/**
 * Filter for matching plan items. All provided fields must match (AND).
 */
type SetupPaymentPlanItemFilter = {
    /**
     * Match items linked to this feature.
     */
    featureId?: string | undefined;
    /**
     * Match items with this billing method (prepaid or usage_based).
     */
    billingMethod?: SetupPaymentRemoveItemBillingMethod | undefined;
    /**
     * Match items with this interval. Accepts either a BillingInterval (price-side) or a ResetInterval (reset-side, includes day/hour/minute) so price-less items keyed by reset.interval can be disambiguated.
     */
    interval?: SetupPaymentIntervalRemoveItemEnum1 | SetupPaymentIntervalRemoveItemEnum2 | undefined;
    /**
     * Match items with this interval_count. Disambiguates between items that share an interval but differ in count.
     */
    intervalCount?: number | undefined;
};
/**
 * Unit of time for the trial ('day', 'month', 'year').
 */
declare const SetupPaymentDurationType: {
    readonly Day: "day";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Unit of time for the trial ('day', 'month', 'year').
 */
type SetupPaymentDurationType = ClosedEnum<typeof SetupPaymentDurationType>;
/**
 * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
 */
declare const SetupPaymentOnEnd: {
    readonly Bill: "bill";
    readonly Revert: "revert";
};
/**
 * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
 */
type SetupPaymentOnEnd = ClosedEnum<typeof SetupPaymentOnEnd>;
/**
 * Free trial configuration for a plan.
 */
type SetupPaymentFreeTrialParams = {
    /**
     * Number of duration_type periods the trial lasts.
     */
    durationLength: number;
    /**
     * Unit of time for the trial ('day', 'month', 'year').
     */
    durationType?: SetupPaymentDurationType | undefined;
    /**
     * If true, payment method required to start trial. Customer is charged after trial ends.
     */
    cardRequired?: boolean | undefined;
    /**
     * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
     */
    onEnd?: SetupPaymentOnEnd | undefined;
};
/**
 * The time interval for the purchase limit window.
 */
declare const SetupPaymentPurchaseLimitInterval: {
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
};
/**
 * The time interval for the purchase limit window.
 */
type SetupPaymentPurchaseLimitInterval = ClosedEnum<typeof SetupPaymentPurchaseLimitInterval>;
/**
 * Optional rate limit to cap how often auto top-ups occur.
 */
type SetupPaymentPurchaseLimit = {
    /**
     * The time interval for the purchase limit window.
     */
    interval: SetupPaymentPurchaseLimitInterval;
    /**
     * Number of intervals in the purchase limit window.
     */
    intervalCount?: number | undefined;
    /**
     * Maximum number of auto top-ups allowed within the interval.
     */
    limit: number;
};
type SetupPaymentAutoTopup = {
    /**
     * The ID of the feature (credit balance) to auto top-up.
     */
    featureId: string;
    /**
     * Whether auto top-up is enabled.
     */
    enabled?: boolean | undefined;
    /**
     * When the balance drops below this threshold, an auto top-up will be purchased.
     */
    threshold: number;
    /**
     * Amount of credits to add per auto top-up.
     */
    quantity: number;
    /**
     * Optional rate limit to cap how often auto top-ups occur.
     */
    purchaseLimit?: SetupPaymentPurchaseLimit | undefined;
    /**
     * When true, auto top-up creates a send_invoice invoice instead of auto-charging.
     */
    invoiceMode?: boolean | undefined;
};
/**
 * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
 */
declare const SetupPaymentLimitType: {
    readonly Absolute: "absolute";
    readonly UsagePercentage: "usage_percentage";
};
/**
 * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
 */
type SetupPaymentLimitType = ClosedEnum<typeof SetupPaymentLimitType>;
type SetupPaymentSpendLimit = {
    /**
     * Optional feature ID this spend limit applies to.
     */
    featureId?: string | undefined;
    /**
     * Whether the overage spend limit is enabled.
     */
    enabled?: boolean | undefined;
    /**
     * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
     */
    limitType?: SetupPaymentLimitType | undefined;
    /**
     * Overage cap for the feature: absolute units, or a percent (e.g. 120) when limit_type is usage_percentage.
     */
    overageLimit?: number | undefined;
    /**
     * When true, overage for this feature is not posted to Stripe. Usage tracking and balance resets still behave normally.
     */
    skipOverageBilling?: boolean | undefined;
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
declare const SetupPaymentUsageLimitInterval: {
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
type SetupPaymentUsageLimitInterval = ClosedEnum<typeof SetupPaymentUsageLimitInterval>;
/**
 * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
 */
type SetupPaymentFilter = {
    properties: {
        [k: string]: string | number | boolean;
    };
};
type SetupPaymentUsageLimit = {
    /**
     * The feature this usage limit applies to.
     */
    featureId: string;
    /**
     * Whether this usage limit is enabled.
     */
    enabled?: boolean | undefined;
    /**
     * Maximum units allowed per interval.
     */
    limit: number;
    /**
     * Interval for the cap, aligned to the customer's billing cycle.
     */
    interval: SetupPaymentUsageLimitInterval;
    /**
     * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
     */
    filter?: SetupPaymentFilter | undefined;
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
declare const SetupPaymentThresholdType: {
    readonly Usage: "usage";
    readonly UsagePercentage: "usage_percentage";
    readonly Remaining: "remaining";
    readonly RemainingPercentage: "remaining_percentage";
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
type SetupPaymentThresholdType = ClosedEnum<typeof SetupPaymentThresholdType>;
type SetupPaymentUsageAlert = {
    /**
     * The feature ID this alert applies to.
     */
    featureId?: string | undefined;
    /**
     * Whether this usage alert is enabled.
     */
    enabled?: boolean | undefined;
    /**
     * The threshold value that triggers the alert. For usage or remaining, this is an absolute count. For usage_percentage or remaining_percentage, this is a percentage (0-100).
     */
    threshold: number;
    /**
     * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
     */
    thresholdType: SetupPaymentThresholdType;
    /**
     * Optional user-defined label to distinguish multiple alerts on the same feature.
     */
    name?: string | undefined;
};
type SetupPaymentOverageAllowed = {
    /**
     * The feature ID this overage allowed control applies to.
     */
    featureId: string;
    /**
     * Whether overage is allowed for this feature.
     */
    enabled?: boolean | undefined;
};
/**
 * Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
 */
type SetupPaymentBillingControls = {
    /**
     * List of auto top-up configurations per feature.
     */
    autoTopups?: Array<SetupPaymentAutoTopup> | undefined;
    /**
     * List of overage spend limits per feature (caps overage spend).
     */
    spendLimits?: Array<SetupPaymentSpendLimit> | undefined;
    /**
     * List of hard usage caps per feature (max units per interval).
     */
    usageLimits?: Array<SetupPaymentUsageLimit> | undefined;
    /**
     * List of usage alert configurations per feature.
     */
    usageAlerts?: Array<SetupPaymentUsageAlert> | undefined;
    /**
     * List of overage allowed controls per feature. When enabled, usage can exceed balance.
     */
    overageAllowed?: Array<SetupPaymentOverageAllowed> | undefined;
};
/**
 * Customize the plan to attach. Can override the price, items, free trial, or a combination.
 */
type SetupPaymentCustomize = {
    /**
     * Override the base price of the plan. Pass null to remove the base price.
     */
    price?: SetupPaymentBasePrice | null | undefined;
    /**
     * Override the items in the plan (PUT-style — replaces all existing items). Mutually exclusive with add_items / remove_items / deprecated update_items.
     */
    items?: Array<SetupPaymentItemPlanItem> | undefined;
    /**
     * Items to add to the plan.
     */
    addItems?: Array<SetupPaymentAddItemPlanItem> | undefined;
    /**
     * Filters selecting items to remove from the plan.
     */
    removeItems?: Array<SetupPaymentPlanItemFilter> | undefined;
    /**
     * Override the plan's default free trial. Pass an object to set a custom trial, or null to remove the trial entirely.
     */
    freeTrial?: SetupPaymentFreeTrialParams | null | undefined;
    /**
     * Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
     */
    billingControls?: SetupPaymentBillingControls | undefined;
};
/**
 * How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
 */
declare const SetupPaymentProrationBehavior: {
    readonly ProrateImmediately: "prorate_immediately";
    readonly None: "none";
};
/**
 * How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
 */
type SetupPaymentProrationBehavior = ClosedEnum<typeof SetupPaymentProrationBehavior>;
/**
 * A discount to apply. Can be either a reward ID or a promotion code.
 */
type SetupPaymentAttachDiscount = {
    /**
     * The ID of the reward to apply as a discount.
     */
    rewardId?: string | undefined;
    /**
     * The promotion code to apply as a discount.
     */
    promotionCode?: string | undefined;
};
type SetupPaymentCustomLineItem = {
    /**
     * Amount in dollars for this line item (e.g. 10.50). Can be negative for credits.
     */
    amount: number;
    /**
     * Description for the line item.
     */
    description: string;
};
/**
 * Whether to carry over balances from the previous plan.
 */
type SetupPaymentCarryOverBalances = {
    /**
     * Whether to carry over balances from the previous plan.
     */
    enabled: boolean;
    /**
     * The IDs of the features to carry over balances from. If left undefined, all features will be carried over.
     */
    featureIds?: Array<string> | undefined;
};
/**
 * Whether to carry over usages from the previous plan.
 */
type SetupPaymentCarryOverUsages = {
    /**
     * Whether to carry over usages from the previous plan.
     */
    enabled: boolean;
    /**
     * The IDs of the features to carry over usages for. If left undefined, all consumable features will be carried over.
     */
    featureIds?: Array<string> | undefined;
};
type SetupPaymentParams = {
    /**
     * The ID of the customer to attach the plan to.
     */
    customerId: string;
    /**
     * The ID of the entity to attach the plan to.
     */
    entityId?: string | undefined;
    /**
     * If specified, the plan will be attached to the customer after setup.
     */
    planId?: string | undefined;
    /**
     * If this plan contains prepaid features, use this field to specify the quantity of each prepaid feature. This quantity includes the included amount and billing units defined when setting up the plan.
     */
    featureQuantities?: Array<SetupPaymentFeatureQuantity> | undefined;
    /**
     * The version of the plan to attach.
     */
    version?: number | undefined;
    /**
     * Customize the plan to attach. Can override the price, items, free trial, or a combination.
     */
    customize?: SetupPaymentCustomize | undefined;
    /**
     * How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
     */
    prorationBehavior?: SetupPaymentProrationBehavior | undefined;
    /**
     * A unique ID to identify this subscription. Can be used to target specific subscriptions in update operations when a customer has multiple products with the same plan.
     */
    subscriptionId?: string | undefined;
    /**
     * List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code.
     */
    discounts?: Array<SetupPaymentAttachDiscount> | undefined;
    /**
     * URL to redirect to after successful checkout.
     */
    successUrl?: string | undefined;
    /**
     * Reset the billing cycle anchor immediately with 'now'.
     */
    billingCycleAnchor?: "now" | undefined;
    /**
     * Unix timestamp in milliseconds for when the attached plan should start. Future dates create a scheduled subscription.
     */
    startsAt?: number | undefined;
    /**
     * Unix timestamp in milliseconds for when the attached plan should end.
     */
    endsAt?: number | undefined;
    /**
     * Additional parameters to pass into the creation of the Stripe checkout session.
     */
    checkoutSessionParams?: {
        [k: string]: any;
    } | undefined;
    /**
     * Custom line items that override the auto-generated proration invoice. Only valid for immediate plan changes (eg. upgrades or one off plans).
     */
    customLineItems?: Array<SetupPaymentCustomLineItem> | undefined;
    /**
     * The processor subscription ID to link. Use this to attach an existing Stripe subscription instead of creating a new one.
     */
    processorSubscriptionId?: string | undefined;
    /**
     * Whether to carry over balances from the previous plan.
     */
    carryOverBalances?: SetupPaymentCarryOverBalances | undefined;
    /**
     * Whether to carry over usages from the previous plan.
     */
    carryOverUsages?: SetupPaymentCarryOverUsages | undefined;
    /**
     * Key-value metadata to attach to the Stripe subscription, invoice, and checkout session created during this attach flow. Keys prefixed with 'autumn_' are reserved and will be stripped.
     */
    metadata?: {
        [k: string]: string;
    } | undefined;
    /**
     * If true, skips any billing changes for the attach operation.
     */
    noBillingChanges?: boolean | undefined;
    /**
     * If true, the customer's plan is activated immediately even when payment is deferred (invoice mode) or pending (Stripe checkout). For Stripe checkout, the customer_product is inserted before the customer completes the hosted form.
     */
    enablePlanImmediately?: boolean | undefined;
    /**
     * Stripe tax rate ID (txr_...) to apply as the default tax rate on the created subscription, invoice, or checkout session line items.
     */
    taxRateId?: string | undefined;
};
/**
 * OK
 */
type SetupPaymentResponse = {
    /**
     * The ID of the customer
     */
    customerId: string;
    /**
     * The ID of the entity the plan (if specified) will be attached to after setup.
     */
    entityId?: string | undefined;
    /**
     * URL to redirect the customer to setup their payment.
     */
    url: string;
};

/** Flattens Omit/Pick/intersection types so hover shows all fields */
type Prettify<T> = {
    [K in keyof T]: T[K];
} & {};
/** Fields injected by backend - stripped from frontend params */
type ProtectedFields = "customerId" | "customerData";
/** GetOrCreateCustomer params without protected fields (for frontend use) */
type ClientGetOrCreateCustomerParams = {
    errorOnNotFound?: boolean;
    expand?: string[];
};
/** Check params for local balance check */
type ClientCheckParams = Prettify<Omit<CheckParams, ProtectedFields>>;
/** Attach params without protected fields (for frontend use) */
type ClientAttachParams = Prettify<Omit<AttachParams, ProtectedFields | "sendEvent" | "properties" | "withPreview"> & {
    openInNewTab?: boolean;
}>;
/** Open customer portal params without protected fields (for frontend use) */
type ClientOpenCustomerPortalParams = Omit<OpenCustomerPortalParams, ProtectedFields> & {
    openInNewTab?: boolean;
};
/** Create referral code params without protected fields (for frontend use) */
type ClientCreateReferralCodeParams = Omit<CreateReferralCodeParams, ProtectedFields>;
/** Redeem referral code params without protected fields (for frontend use) */
type ClientRedeemReferralCodeParams = Omit<RedeemReferralCodeParams, ProtectedFields>;
/** List events params without protected fields (for frontend use) */
type ClientListEventsParams = Omit<EventsListParams, ProtectedFields>;
/** Aggregate events params without protected fields (for frontend use) */
type ClientAggregateEventsParams = Omit<EventsAggregateParams, ProtectedFields>;
/** List plans params without protected fields (for frontend use) */
type ClientListPlansParams = {
    customerId?: string;
    entityId?: string;
    includeArchived?: boolean;
};
/** Preview attach params without protected fields (for frontend use) */
type ClientPreviewAttachParams = Omit<PreviewAttachParams, ProtectedFields>;
/** Update subscription params without protected fields (for frontend use) */
type ClientUpdateSubscriptionParams = Omit<UpdateSubscriptionParams, ProtectedFields> & {
    openInNewTab?: boolean;
};
/** Preview update subscription params without protected fields (for frontend use) */
type ClientPreviewUpdateSubscriptionParams = Omit<PreviewUpdateParams, ProtectedFields>;
/** Multi-attach params without protected fields (for frontend use) */
type ClientMultiAttachParams = Omit<MultiAttachParams, ProtectedFields> & {
    openInNewTab?: boolean;
};
/** Preview multi-attach params without protected fields (for frontend use) */
type ClientPreviewMultiAttachParams = Omit<PreviewMultiAttachParams, ProtectedFields>;
/** Setup payment params without protected fields (for frontend use) */
type ClientSetupPaymentParams = Omit<SetupPaymentParams, ProtectedFields> & {
    openInNewTab?: boolean;
};
/** Get entity params without protected fields (for frontend use) */
type ClientGetEntityParams = Prettify<Omit<GetEntityParams, ProtectedFields>>;

export type { AttachResponse as A, BillingUpdateResponse as B, ClientAggregateEventsParams as C, GetEntityResponse as G, ListEventsResponse as L, MultiAttachResponse as M, OpenCustomerPortalResponse as O, ProtectedFields as P, RedeemReferralCodeResponse as R, SetupPaymentResponse as S, Total as T, ClientAttachParams as a, ClientCreateReferralCodeParams as b, ClientGetEntityParams as c, ClientGetOrCreateCustomerParams as d, ClientListEventsParams as e, ClientMultiAttachParams as f, ClientOpenCustomerPortalParams as g, ClientPreviewAttachParams as h, ClientPreviewMultiAttachParams as i, ClientPreviewUpdateSubscriptionParams as j, ClientRedeemReferralCodeParams as k, ClientSetupPaymentParams as l, ClientUpdateSubscriptionParams as m, ClientCheckParams as n, CheckResponse as o, PreviewAttachResponse as p, PreviewUpdateResponse as q, PreviewMultiAttachResponse as r, CreateReferralCodeResponse as s, ClientListPlansParams as t, AggregateEventsResponse as u, AggregateEventsList as v, ListEventsList as w };
