import { b as ClosedEnum, O as OpenEnum, c as CustomerExpand, G as GetOrCreateCustomerParams, R as ResolvedIdentity } from './authTypes-jU7ON-I5.js';
import { z } from 'zod/v4';
import { ProtectedBodyField } from './core/utils/sanitizeBody.js';
import { BackendResult } from './core/types/responseTypes.js';

type Fetcher = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
type Awaitable$1<T> = T | Promise<T>;
type RequestInput = {
    /**
     * The URL the request will use.
     */
    url: URL;
    /**
     * Options used to create a [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request).
     */
    options?: RequestInit | undefined;
};
interface HTTPClientOptions {
    fetcher?: Fetcher;
}
type BeforeRequestHook$1 = (req: Request) => Awaitable$1<Request | void>;
type RequestErrorHook = (err: unknown, req: Request) => Awaitable$1<void>;
type ResponseHook = (res: Response, req: Request) => Awaitable$1<void>;
declare class HTTPClient {
    private options;
    private fetcher;
    private requestHooks;
    private requestErrorHooks;
    private responseHooks;
    constructor(options?: HTTPClientOptions);
    request(request: Request): Promise<Response>;
    /**
     * Registers a hook that is called before a request is made. The hook function
     * can mutate the request or return a new request. This may be useful to add
     * additional information to request such as request IDs and tracing headers.
     */
    addHook(hook: "beforeRequest", fn: BeforeRequestHook$1): this;
    /**
     * Registers a hook that is called when a request cannot be made due to a
     * network error.
     */
    addHook(hook: "requestError", fn: RequestErrorHook): this;
    /**
     * Registers a hook that is called when a response has been received from the
     * server.
     */
    addHook(hook: "response", fn: ResponseHook): this;
    /** Removes a hook that was previously registered with `addHook`. */
    removeHook(hook: "beforeRequest", fn: BeforeRequestHook$1): this;
    /** Removes a hook that was previously registered with `addHook`. */
    removeHook(hook: "requestError", fn: RequestErrorHook): this;
    /** Removes a hook that was previously registered with `addHook`. */
    removeHook(hook: "response", fn: ResponseHook): this;
    clone(): HTTPClient;
}

interface Logger {
    group(label?: string): void;
    groupEnd(): void;
    log(message: any, ...args: any[]): void;
}

type BackoffStrategy = {
    initialInterval: number;
    maxInterval: number;
    exponent: number;
    maxElapsedTime: number;
};
type RetryConfig = {
    strategy: "none";
} | {
    strategy: "backoff";
    backoff?: BackoffStrategy;
    retryConnectionErrors?: boolean;
};

type SDKOptions = {
    secretKey?: string | (() => Promise<string>) | undefined;
    /**
     * Allows setting the xApiVersion parameter for all supported operations
     */
    xApiVersion?: string | undefined;
    /**
     * Allows setting the failOpen parameter for all supported operations
     */
    failOpen?: boolean | undefined;
    httpClient?: HTTPClient;
    /**
     * Allows overriding the default server used by the SDK
     */
    serverIdx?: number | undefined;
    /**
     * Allows overriding the default server URL used by the SDK
     */
    serverURL?: string | undefined;
    /**
     * Allows overriding the default user agent used by the SDK
     */
    userAgent?: string | undefined;
    /**
     * Allows overriding the default retry config used by the SDK
     */
    retryConfig?: RetryConfig;
    timeoutMs?: number;
    debugLogger?: Logger;
};

/**
 * A monad that captures the result of a function call or an error if it was not
 * successful. Railway programming, enabled by this type, can be a nicer
 * alternative to traditional exception throwing because it allows functions to
 * declare all _known_ errors with static types and then check for them
 * exhaustively in application code. Thrown exception have a type of `unknown`
 * and break out of regular control flow of programs making them harder to
 * inspect and more verbose work with due to try-catch blocks.
 */
type Result$1<T, E = unknown> = {
    ok: true;
    value: T;
    error?: never;
} | {
    ok: false;
    value?: never;
    error: E;
};

/**
 * 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;
};

/**
 * 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 BalanceType: {
    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 BalanceType = OpenEnum<typeof BalanceType>;
type BalanceCreditSchema = {
    /**
     * ID of the metered feature that draws from this credit system.
     */
    meteredFeatureId: string;
    /**
     * Credits consumed per unit of the metered feature.
     */
    creditCost: number;
};
type BalanceModelMarkups = {
    markup?: number | undefined;
    inputCost?: number | undefined;
    outputCost?: number | undefined;
};
type BalanceProviderMarkups = {
    markup: number;
};
/**
 * Display names for the feature in billing UI and customer-facing components.
 */
type BalanceDisplay = {
    /**
     * 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 BalanceFeature = {
    /**
     * 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: BalanceType;
    /**
     * 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<BalanceCreditSchema> | undefined;
    /**
     * Per-model markup overrides for AI credit systems.
     */
    modelMarkups?: {
        [k: string]: BalanceModelMarkups;
    } | 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]: BalanceProviderMarkups;
    } | null | undefined;
    /**
     * Display names for the feature in billing UI and customer-facing components.
     */
    display?: BalanceDisplay | undefined;
    /**
     * Whether the feature is archived and hidden from the dashboard.
     */
    archived: boolean;
};
declare const BalanceIntervalEnum: {
    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 BalanceIntervalEnum = OpenEnum<typeof BalanceIntervalEnum>;
type BalanceReset = {
    /**
     * The reset interval (hour, day, week, month, etc.) or 'multiple' if combined from different intervals.
     */
    interval: BalanceIntervalEnum | 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 BalanceTier = {
    to: number | string;
    amount: number;
    flatAmount?: number | undefined;
};
/**
 * How tiers are applied: graduated (split across bands) or volume (flat rate for the matched tier).
 */
declare const BalanceTierBehavior: {
    readonly Graduated: "graduated";
    readonly Volume: "volume";
};
/**
 * How tiers are applied: graduated (split across bands) or volume (flat rate for the matched tier).
 */
type BalanceTierBehavior = OpenEnum<typeof BalanceTierBehavior>;
/**
 * Whether usage is prepaid or billed pay-per-use.
 */
declare const BalanceBillingMethod: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * Whether usage is prepaid or billed pay-per-use.
 */
type BalanceBillingMethod = OpenEnum<typeof BalanceBillingMethod>;
type BalancePrice = {
    /**
     * The per-unit price amount.
     */
    amount?: number | undefined;
    /**
     * Tiered pricing configuration if applicable.
     */
    tiers?: Array<BalanceTier> | undefined;
    /**
     * How tiers are applied: graduated (split across bands) or volume (flat rate for the matched tier).
     */
    tierBehavior?: BalanceTierBehavior | undefined;
    /**
     * The number of units per billing increment (eg. $9 / 250 units).
     */
    billingUnits: number;
    /**
     * Whether usage is prepaid or billed pay-per-use.
     */
    billingMethod: BalanceBillingMethod;
    /**
     * Maximum quantity that can be purchased, or null for unlimited.
     */
    maxPurchase: number | null;
};
type Breakdown = {
    /**
     * The unique identifier for this balance breakdown.
     */
    id: string;
    /**
     * The plan ID this balance originates from, or null for standalone balances.
     */
    planId: string | null;
    /**
     * Amount granted from the plan's included usage.
     */
    includedGrant: number;
    /**
     * Amount granted from prepaid purchases or top-ups.
     */
    prepaidGrant: number;
    /**
     * Remaining balance available for use.
     */
    remaining: number;
    /**
     * Amount consumed in the current period.
     */
    usage: number;
    /**
     * Whether this balance has unlimited usage.
     */
    unlimited: boolean;
    /**
     * Reset configuration for this balance, or null if no reset.
     */
    reset: BalanceReset | null;
    /**
     * Pricing configuration if this balance has usage-based pricing.
     */
    price: BalancePrice | null;
    /**
     * Timestamp when this balance expires, or null for no expiration.
     */
    expiresAt: number | null;
};
type BalanceRollover = {
    /**
     * Amount of balance rolled over from a previous period.
     */
    balance: number;
    /**
     * Timestamp when the rollover balance expires.
     */
    expiresAt: number;
};
type Balance = {
    /**
     * The feature ID this balance is for.
     */
    featureId: string;
    /**
     * The full feature object if expanded.
     */
    feature?: BalanceFeature | undefined;
    /**
     * Total balance granted (included + prepaid).
     */
    granted: number;
    /**
     * Remaining balance available for use.
     */
    remaining: number;
    /**
     * Total usage consumed in the current period.
     */
    usage: number;
    /**
     * Whether this feature has unlimited usage.
     */
    unlimited: boolean;
    /**
     * Whether usage beyond the granted balance is allowed (with overage charges).
     */
    overageAllowed: boolean;
    /**
     * Maximum quantity that can be purchased as a top-up, or null for unlimited.
     */
    maxPurchase: number | null;
    /**
     * Timestamp when the balance will reset, or null for no reset.
     */
    nextResetAt: number | null;
    /**
     * Detailed breakdown of balance sources when stacking multiple plans or grants.
     */
    breakdown?: Array<Breakdown> | undefined;
    /**
     * Rollover balances carried over from previous periods.
     */
    rollovers?: Array<BalanceRollover> | undefined;
};

type BatchTrackLock = {
    /**
     * 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 RequestBody = {
    /**
     * The ID of the customer.
     */
    customerId: string;
    /**
     * The ID of the feature to track usage for. Required if event_name is not provided.
     */
    featureId?: string | undefined;
    /**
     * The ID of the entity for entity-scoped balances (e.g., per-seat limits).
     */
    entityId?: string | undefined;
    /**
     * Event name to track usage for. Use instead of feature_id when multiple features should be tracked from a single event.
     */
    eventName?: string | undefined;
    /**
     * The amount of usage to record. Defaults to 1. Use negative values to credit balance (e.g., when removing a seat).
     */
    value?: number | undefined;
    /**
     * Additional properties to attach to this usage event.
     */
    properties?: {
        [k: string]: any;
    } | undefined;
    /**
     * Unix timestamp in milliseconds to use for the usage event. Defaults to the current time.
     */
    timestamp?: number | undefined;
    /**
     * If true, enqueue the event for asynchronous processing and return 204 immediately. The response will not include balance information.
     */
    async?: boolean | undefined;
    lock?: BatchTrackLock | undefined;
};
/**
 * Batch accepted. All items passed synchronous validation. Enqueue is best-effort: partial failures (some items enqueued, some not) are logged server-side and are NOT surfaced in the response body; clients must not retry on 202. See the endpoint description for full partial-failure semantics.
 */
type BatchTrackResponse = {
    success: true;
};

/**
 * 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 interval at which the balance resets (e.g., 'month', 'day', 'year').
 */
declare const CreateBalanceInterval: {
    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";
};
/**
 * The interval at which the balance resets (e.g., 'month', 'day', 'year').
 */
type CreateBalanceInterval = ClosedEnum<typeof CreateBalanceInterval>;
/**
 * Reset configuration for the balance. If not provided, the balance is a one-time grant that never resets.
 */
type CreateBalanceReset = {
    /**
     * The interval at which the balance resets (e.g., 'month', 'day', 'year').
     */
    interval: CreateBalanceInterval;
    /**
     * Number of intervals between resets. Defaults to 1 (e.g., interval_count: 2 with interval: 'month' resets every 2 months).
     */
    intervalCount?: number | undefined;
};
declare const CreateBalanceDuration: {
    readonly Month: "month";
    readonly Forever: "forever";
};
type CreateBalanceDuration = ClosedEnum<typeof CreateBalanceDuration>;
/**
 * Rollover configuration for the balance.
 */
type CreateBalanceRollover = {
    max?: number | null | undefined;
    maxPercentage?: number | null | undefined;
    duration?: CreateBalanceDuration | undefined;
    length: number;
};
type CreateBalanceParams = {
    /**
     * 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;
    /**
     * The initial balance amount to grant. For metered features, this is the number of units the customer can use.
     */
    includedGrant?: number | undefined;
    /**
     * If true, the balance has unlimited usage. Cannot be combined with 'included_grant'.
     */
    unlimited?: boolean | undefined;
    /**
     * Reset configuration for the balance. If not provided, the balance is a one-time grant that never resets.
     */
    reset?: CreateBalanceReset | undefined;
    /**
     * Rollover configuration for the balance.
     */
    rollover?: CreateBalanceRollover | undefined;
    /**
     * Unix timestamp (milliseconds) when the balance expires. Mutually exclusive with reset.
     */
    expiresAt?: number | undefined;
    /**
     * Unix timestamp (milliseconds) for the first reset boundary, allowing a custom (e.g. shorter) first period. Requires 'reset', and must occur before 'expires_at' if both are provided. Subsequent resets advance by one reset interval from this boundary.
     */
    nextResetAt?: number | undefined;
    /**
     * A unique identifier for this balance. Use this to target the balance in future update / delete calls.
     */
    balanceId?: string | undefined;
};
/**
 * OK
 */
type CreateBalanceResponse = {
    success: boolean;
};

/**
 * 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;
};

/**
 * Billing interval (e.g. 'month', 'year').
 */
declare const PlanPriceInterval: {
    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 PlanPriceInterval = OpenEnum<typeof PlanPriceInterval>;
/**
 * Display text for showing this price in pricing pages.
 */
type PlanPriceDisplay = {
    /**
     * Main display text (e.g. '$10' or '100 messages').
     */
    primaryText: string;
    /**
     * Secondary display text (e.g. 'per month' or 'then $0.5 per 100').
     */
    secondaryText?: string | undefined;
};
type PlanPrice = {
    /**
     * Base price amount for the plan.
     */
    amount: number;
    /**
     * Billing interval (e.g. 'month', 'year').
     */
    interval: PlanPriceInterval;
    /**
     * Number of intervals per billing cycle. Defaults to 1.
     */
    intervalCount?: number | undefined;
    /**
     * Display text for showing this price in pricing pages.
     */
    display?: PlanPriceDisplay | undefined;
};
/**
 * The type of the feature
 */
declare const PlanType: {
    readonly Static: "static";
    readonly Boolean: "boolean";
    readonly SingleUse: "single_use";
    readonly ContinuousUse: "continuous_use";
    readonly CreditSystem: "credit_system";
    readonly AiCreditSystem: "ai_credit_system";
};
/**
 * The type of the feature
 */
type PlanType = OpenEnum<typeof PlanType>;
type PlanFeatureDisplay = {
    /**
     * The singular display name for the feature.
     */
    singular: string;
    /**
     * The plural display name for the feature.
     */
    plural: string;
};
type PlanCreditSchema = {
    /**
     * The ID of the metered feature (should be a single_use feature).
     */
    meteredFeatureId: string;
    /**
     * The credit cost of the metered feature.
     */
    creditCost: number;
};
/**
 * The full feature object if expanded.
 */
type PlanFeature = {
    /**
     * The ID of the feature, used to refer to it in other API calls like /track or /check.
     */
    id: string;
    /**
     * The name of the feature.
     */
    name?: string | null | undefined;
    /**
     * The type of the feature
     */
    type: PlanType;
    /**
     * Singular and plural display names for the feature.
     */
    display?: PlanFeatureDisplay | null | undefined;
    /**
     * Credit cost schema for credit system features.
     */
    creditSchema?: Array<PlanCreditSchema> | null | undefined;
    /**
     * Whether or not the feature is archived.
     */
    archived?: boolean | null | undefined;
};
/**
 * The interval at which the feature balance resets (e.g. 'month', 'year'). For consumable features, usage resets to 0 and included units are restored.
 */
declare const PlanResetItemInterval: {
    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";
};
/**
 * The interval at which the feature balance resets (e.g. 'month', 'year'). For consumable features, usage resets to 0 and included units are restored.
 */
type PlanResetItemInterval = OpenEnum<typeof PlanResetItemInterval>;
type PlanItemReset = {
    /**
     * The interval at which the feature balance resets (e.g. 'month', 'year'). For consumable features, usage resets to 0 and included units are restored.
     */
    interval: PlanResetItemInterval;
    /**
     * Number of intervals between resets. Defaults to 1.
     */
    intervalCount?: number | undefined;
};
type PlanItemTier = {
    to: number | string;
    amount: number;
    flatAmount?: number | undefined;
};
declare const PlanItemTierBehavior: {
    readonly Graduated: "graduated";
    readonly Volume: "volume";
};
type PlanItemTierBehavior = OpenEnum<typeof PlanItemTierBehavior>;
/**
 * Billing interval for this price. For consumable features, should match reset.interval.
 */
declare const PlanPriceItemInterval: {
    readonly OneOff: "one_off";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
/**
 * Billing interval for this price. For consumable features, should match reset.interval.
 */
type PlanPriceItemInterval = OpenEnum<typeof PlanPriceItemInterval>;
/**
 * 'prepaid' for features like seats where customers pay upfront, 'usage_based' for pay-as-you-go after included usage.
 */
declare const PlanItemBillingMethod: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * 'prepaid' for features like seats where customers pay upfront, 'usage_based' for pay-as-you-go after included usage.
 */
type PlanItemBillingMethod = OpenEnum<typeof PlanItemBillingMethod>;
type PlanItemPrice = {
    /**
     * Price per billing_units after included usage is consumed. Mutually exclusive with tiers.
     */
    amount?: number | undefined;
    /**
     * Tiered pricing configuration. Each tier's 'to' INCLUDES the included amount. Either 'tiers' or 'amount' is required.
     */
    tiers?: Array<PlanItemTier> | undefined;
    tierBehavior?: PlanItemTierBehavior | undefined;
    /**
     * Billing interval for this price. For consumable features, should match reset.interval.
     */
    interval: PlanPriceItemInterval;
    /**
     * Number of intervals per billing cycle. Defaults to 1.
     */
    intervalCount?: number | undefined;
    /**
     * Number of units per price increment. Usage is rounded UP to the nearest billing_units when billed (e.g. billing_units=100 means 101 usage rounds to 200).
     */
    billingUnits: number;
    /**
     * 'prepaid' for features like seats where customers pay upfront, 'usage_based' for pay-as-you-go after included usage.
     */
    billingMethod: PlanItemBillingMethod;
    /**
     * Maximum units a customer can purchase beyond included. E.g. if included=100 and max_purchase=300, customer can use up to 400 total before usage is capped. Null for no limit.
     */
    maxPurchase: number | null;
};
/**
 * Display text for showing this item in pricing pages.
 */
type PlanItemDisplay = {
    /**
     * Main display text (e.g. '$10' or '100 messages').
     */
    primaryText: string;
    /**
     * Secondary display text (e.g. 'per month' or 'then $0.5 per 100').
     */
    secondaryText?: string | undefined;
};
/**
 * When rolled over units expire.
 */
declare const ItemExpiryDurationType: {
    readonly Month: "month";
    readonly Forever: "forever";
};
/**
 * When rolled over units expire.
 */
type ItemExpiryDurationType = OpenEnum<typeof ItemExpiryDurationType>;
/**
 * Rollover configuration for unused units. If set, unused included units roll over to the next period.
 */
type PlanItemRollover = {
    /**
     * Maximum rollover units. Null for unlimited rollover.
     */
    max: number | null;
    /**
     * Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
     */
    maxPercentage?: number | null | undefined;
    /**
     * When rolled over units expire.
     */
    expiryDurationType: ItemExpiryDurationType;
    /**
     * Number of periods before expiry.
     */
    expiryDurationLength?: number | undefined;
};
type Item = {
    /**
     * The ID of the feature this item configures.
     */
    featureId: string;
    /**
     * The full feature object if expanded.
     */
    feature?: PlanFeature | undefined;
    /**
     * Number of free units included. For consumable features, balance resets to this number each interval.
     */
    included: number;
    /**
     * Whether the customer has unlimited access to this feature.
     */
    unlimited: boolean;
    /**
     * Reset configuration for consumable features. Null for non-consumable features like seats where usage persists across billing cycles.
     */
    reset: PlanItemReset | null;
    /**
     * Pricing configuration for usage beyond included units. Null if feature is entirely free.
     */
    price: PlanItemPrice | null;
    /**
     * Display text for showing this item in pricing pages.
     */
    display?: PlanItemDisplay | undefined;
    /**
     * Rollover configuration for unused units. If set, unused included units roll over to the next period.
     */
    rollover?: PlanItemRollover | undefined;
};
/**
 * Unit of time for the trial duration ('day', 'month', 'year').
 */
declare const PlanDurationType: {
    readonly Day: "day";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Unit of time for the trial duration ('day', 'month', 'year').
 */
type PlanDurationType = OpenEnum<typeof PlanDurationType>;
declare const OnEnd: {
    readonly Bill: "bill";
    readonly Revert: "revert";
};
type OnEnd = OpenEnum<typeof OnEnd>;
/**
 * Free trial configuration. If set, new customers can try this plan before being charged.
 */
type FreeTrial = {
    /**
     * Number of duration_type periods the trial lasts.
     */
    durationLength: number;
    /**
     * Unit of time for the trial duration ('day', 'month', 'year').
     */
    durationType: PlanDurationType;
    /**
     * Whether a payment method is required to start the trial. If true, customer will be charged after trial ends.
     */
    cardRequired: boolean;
    /**
     * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
     */
    onEnd?: OnEnd | null | undefined;
};
/**
 * Environment this plan belongs to ('sandbox' or 'live').
 */
declare const PlanEnv: {
    readonly Sandbox: "sandbox";
    readonly Live: "live";
};
/**
 * Environment this plan belongs to ('sandbox' or 'live').
 */
type PlanEnv = OpenEnum<typeof PlanEnv>;
/**
 * Billing interval (e.g. 'month', 'year').
 */
declare const PlanPriceVariantDetailsInterval: {
    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 PlanPriceVariantDetailsInterval = OpenEnum<typeof PlanPriceVariantDetailsInterval>;
/**
 * Base price configuration for a plan.
 */
type BasePrice = {
    /**
     * Base price amount for the plan.
     */
    amount: number;
    /**
     * Billing interval (e.g. 'month', 'year').
     */
    interval: PlanPriceVariantDetailsInterval;
    /**
     * 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 PlanAddItemResetInterval: {
    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 PlanAddItemResetInterval = OpenEnum<typeof PlanAddItemResetInterval>;
/**
 * Reset configuration for consumable features. Omit for non-consumable features like seats.
 */
type PlanVariantDetailsReset = {
    /**
     * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
     */
    interval: PlanAddItemResetInterval;
    /**
     * Number of intervals between resets. Defaults to 1.
     */
    intervalCount?: number | undefined;
};
type PlanVariantDetailsTier = {
    to: number | string;
    amount: number;
    flatAmount?: number | undefined;
};
declare const PlanVariantDetailsTierBehavior: {
    readonly Graduated: "graduated";
    readonly Volume: "volume";
};
type PlanVariantDetailsTierBehavior = OpenEnum<typeof PlanVariantDetailsTierBehavior>;
/**
 * Billing interval. For consumable features, should match reset.interval.
 */
declare const PlanAddItemPriceInterval: {
    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 PlanAddItemPriceInterval = OpenEnum<typeof PlanAddItemPriceInterval>;
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
declare const PlanAddItemBillingMethod: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
type PlanAddItemBillingMethod = OpenEnum<typeof PlanAddItemBillingMethod>;
/**
 * Pricing for usage beyond included units. Omit for free features.
 */
type PlanVariantDetailsPrice = {
    /**
     * 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<PlanVariantDetailsTier> | undefined;
    tierBehavior?: PlanVariantDetailsTierBehavior | undefined;
    /**
     * Billing interval. For consumable features, should match reset.interval.
     */
    interval: PlanAddItemPriceInterval;
    /**
     * Number of intervals per billing cycle. Defaults to 1.
     */
    intervalCount: number;
    /**
     * Units per price increment. Usage is rounded UP when billed (e.g. billing_units=100 means 101 rounds to 200).
     */
    billingUnits: number;
    /**
     * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
     */
    billingMethod: PlanAddItemBillingMethod;
    /**
     * 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 OnIncrease: {
    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 OnIncrease = OpenEnum<typeof OnIncrease>;
/**
 * Credit behavior when quantity decreases mid-cycle.
 */
declare const OnDecrease: {
    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 OnDecrease = OpenEnum<typeof OnDecrease>;
/**
 * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
 */
type Proration = {
    /**
     * Billing behavior when quantity increases mid-cycle.
     */
    onIncrease: OnIncrease;
    /**
     * Credit behavior when quantity decreases mid-cycle.
     */
    onDecrease: OnDecrease;
};
/**
 * When rolled over units expire.
 */
declare const VariantDetailsExpiryDurationType: {
    readonly Month: "month";
    readonly Forever: "forever";
};
/**
 * When rolled over units expire.
 */
type VariantDetailsExpiryDurationType = OpenEnum<typeof VariantDetailsExpiryDurationType>;
/**
 * Rollover config for unused units. If set, unused included units carry over.
 */
type PlanVariantDetailsRollover = {
    /**
     * 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: VariantDetailsExpiryDurationType;
    /**
     * Number of periods before expiry.
     */
    expiryDurationLength?: number | undefined;
};
/**
 * Configuration for a feature item in a plan, including usage limits, pricing, and rollover settings.
 */
type PlanItem = {
    /**
     * 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?: PlanVariantDetailsReset | undefined;
    /**
     * Pricing for usage beyond included units. Omit for free features.
     */
    price?: PlanVariantDetailsPrice | undefined;
    /**
     * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
     */
    proration?: Proration | undefined;
    /**
     * Rollover config for unused units. If set, unused included units carry over.
     */
    rollover?: PlanVariantDetailsRollover | undefined;
};
/**
 * Match items with this billing method (prepaid or usage_based).
 */
declare const PlanRemoveItemBillingMethod: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * Match items with this billing method (prepaid or usage_based).
 */
type PlanRemoveItemBillingMethod = OpenEnum<typeof PlanRemoveItemBillingMethod>;
declare const PlanIntervalRemoveItemEnum2: {
    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 PlanIntervalRemoveItemEnum2 = OpenEnum<typeof PlanIntervalRemoveItemEnum2>;
declare const PlanIntervalRemoveItemEnum1: {
    readonly OneOff: "one_off";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
type PlanIntervalRemoveItemEnum1 = OpenEnum<typeof PlanIntervalRemoveItemEnum1>;
/**
 * Filter for matching plan items. All provided fields must match (AND).
 */
type PlanItemFilter = {
    /**
     * Match items linked to this feature.
     */
    featureId?: string | undefined;
    /**
     * Match items with this billing method (prepaid or usage_based).
     */
    billingMethod?: PlanRemoveItemBillingMethod | 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?: PlanIntervalRemoveItemEnum1 | PlanIntervalRemoveItemEnum2 | 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 PlanVariantDetailsDurationType: {
    readonly Day: "day";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Unit of time for the trial ('day', 'month', 'year').
 */
type PlanVariantDetailsDurationType = OpenEnum<typeof PlanVariantDetailsDurationType>;
/**
 * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
 */
declare const VariantDetailsOnEnd: {
    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 VariantDetailsOnEnd = OpenEnum<typeof VariantDetailsOnEnd>;
/**
 * Free trial configuration for a plan.
 */
type FreeTrialParams = {
    /**
     * Number of duration_type periods the trial lasts.
     */
    durationLength: number;
    /**
     * Unit of time for the trial ('day', 'month', 'year').
     */
    durationType: PlanVariantDetailsDurationType;
    /**
     * If true, payment method required to start trial. Customer is charged after trial ends.
     */
    cardRequired: boolean;
    /**
     * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
     */
    onEnd?: VariantDetailsOnEnd | undefined;
};
/**
 * The time interval for the purchase limit window.
 */
declare const PlanVariantDetailsPurchaseLimitInterval: {
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
};
/**
 * The time interval for the purchase limit window.
 */
type PlanVariantDetailsPurchaseLimitInterval = OpenEnum<typeof PlanVariantDetailsPurchaseLimitInterval>;
/**
 * Optional rate limit to cap how often auto top-ups occur.
 */
type PlanVariantDetailsPurchaseLimit = {
    /**
     * The time interval for the purchase limit window.
     */
    interval: PlanVariantDetailsPurchaseLimitInterval;
    /**
     * Number of intervals in the purchase limit window.
     */
    intervalCount: number;
    /**
     * Maximum number of auto top-ups allowed within the interval.
     */
    limit: number;
};
type PlanVariantDetailsAutoTopup = {
    /**
     * 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?: PlanVariantDetailsPurchaseLimit | 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 PlanVariantDetailsLimitType: {
    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 PlanVariantDetailsLimitType = OpenEnum<typeof PlanVariantDetailsLimitType>;
type PlanVariantDetailsSpendLimit = {
    /**
     * 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?: PlanVariantDetailsLimitType | 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 PlanVariantDetailsUsageLimitInterval: {
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
type PlanVariantDetailsUsageLimitInterval = OpenEnum<typeof PlanVariantDetailsUsageLimitInterval>;
/**
 * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
 */
type PlanVariantDetailsFilter = {
    properties: {
        [k: string]: any;
    };
};
type PlanVariantDetailsUsageLimit = {
    /**
     * 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: PlanVariantDetailsUsageLimitInterval;
    /**
     * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
     */
    filter?: PlanVariantDetailsFilter | undefined;
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
declare const PlanVariantDetailsThresholdType: {
    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 PlanVariantDetailsThresholdType = OpenEnum<typeof PlanVariantDetailsThresholdType>;
type PlanVariantDetailsUsageAlert = {
    /**
     * 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: PlanVariantDetailsThresholdType;
    /**
     * Optional user-defined label to distinguish multiple alerts on the same feature.
     */
    name?: string | undefined;
};
type PlanVariantDetailsOverageAllowed = {
    /**
     * The feature ID this overage allowed control applies to.
     */
    featureId: string;
    /**
     * Whether overage is allowed for this feature.
     */
    enabled: boolean;
};
/**
 * Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
 */
type PlanVariantDetailsBillingControls = {
    /**
     * List of auto top-up configurations per feature.
     */
    autoTopups?: Array<PlanVariantDetailsAutoTopup> | undefined;
    /**
     * List of overage spend limits per feature (caps overage spend).
     */
    spendLimits?: Array<PlanVariantDetailsSpendLimit> | undefined;
    /**
     * List of hard usage caps per feature (max units per interval).
     */
    usageLimits?: Array<PlanVariantDetailsUsageLimit> | undefined;
    /**
     * List of usage alert configurations per feature.
     */
    usageAlerts?: Array<PlanVariantDetailsUsageAlert> | undefined;
    /**
     * List of overage allowed controls per feature. When enabled, usage can exceed balance.
     */
    overageAllowed?: Array<PlanVariantDetailsOverageAllowed> | undefined;
};
/**
 * The customization that transforms the base plan into this variant.
 */
type Customize = {
    /**
     * Override the base price of the plan. Pass null to remove the base price.
     */
    price?: BasePrice | null | undefined;
    /**
     * Items to add to the plan.
     */
    addItems?: Array<PlanItem> | undefined;
    /**
     * Filters selecting items to remove from the plan.
     */
    removeItems?: Array<PlanItemFilter> | undefined;
    /**
     * Override the plan's default free trial. Pass an object to set a custom trial, or null to remove the trial entirely.
     */
    freeTrial?: FreeTrialParams | null | undefined;
    /**
     * Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
     */
    billingControls?: PlanVariantDetailsBillingControls | undefined;
};
/**
 * Details about how this variant relates to its latest base plan.
 */
type VariantDetails = {
    /**
     * The ID of the base plan this variant was derived from.
     */
    basePlanId: string;
    /**
     * The customization that transforms the base plan into this variant.
     */
    customize?: Customize | undefined;
};
/**
 * Miscellaneous plan-level configuration flags.
 */
type PlanConfig = {
    /**
     * If true, entitlements attached to this plan will still reset on schedule even when the customer's product is in a past_due state.
     */
    ignorePastDue: boolean;
};
/**
 * The time interval for the purchase limit window.
 */
declare const PlanPurchaseLimitInterval: {
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
};
/**
 * The time interval for the purchase limit window.
 */
type PlanPurchaseLimitInterval = OpenEnum<typeof PlanPurchaseLimitInterval>;
/**
 * Optional rate limit to cap how often auto top-ups occur.
 */
type PlanPurchaseLimit = {
    /**
     * The time interval for the purchase limit window.
     */
    interval: PlanPurchaseLimitInterval;
    /**
     * Number of intervals in the purchase limit window.
     */
    intervalCount: number;
    /**
     * Maximum number of auto top-ups allowed within the interval.
     */
    limit: number;
};
type PlanAutoTopup = {
    /**
     * 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?: PlanPurchaseLimit | 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 PlanLimitType: {
    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 PlanLimitType = OpenEnum<typeof PlanLimitType>;
type PlanSpendLimit = {
    /**
     * 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?: PlanLimitType | 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 PlanUsageLimitInterval: {
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
type PlanUsageLimitInterval = OpenEnum<typeof PlanUsageLimitInterval>;
/**
 * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
 */
type PlanFilter = {
    properties: {
        [k: string]: any;
    };
};
type PlanUsageLimit = {
    /**
     * 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: PlanUsageLimitInterval;
    /**
     * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
     */
    filter?: PlanFilter | undefined;
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
declare const PlanThresholdType: {
    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 PlanThresholdType = OpenEnum<typeof PlanThresholdType>;
type PlanUsageAlert = {
    /**
     * 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: PlanThresholdType;
    /**
     * Optional user-defined label to distinguish multiple alerts on the same feature.
     */
    name?: string | undefined;
};
type PlanOverageAllowed = {
    /**
     * 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 PlanBillingControls = {
    /**
     * List of auto top-up configurations per feature.
     */
    autoTopups?: Array<PlanAutoTopup> | undefined;
    /**
     * List of overage spend limits per feature (caps overage spend).
     */
    spendLimits?: Array<PlanSpendLimit> | undefined;
    /**
     * List of hard usage caps per feature (max units per interval).
     */
    usageLimits?: Array<PlanUsageLimit> | undefined;
    /**
     * List of usage alert configurations per feature.
     */
    usageAlerts?: Array<PlanUsageAlert> | undefined;
    /**
     * List of overage allowed controls per feature. When enabled, usage can exceed balance.
     */
    overageAllowed?: Array<PlanOverageAllowed> | undefined;
};
/**
 * The customer's current status with this plan. 'active' if attached, 'scheduled' if pending activation.
 */
declare const PlanStatus: {
    readonly Active: "active";
    readonly Scheduled: "scheduled";
};
/**
 * The customer's current status with this plan. 'active' if attached, 'scheduled' if pending activation.
 */
type PlanStatus = OpenEnum<typeof PlanStatus>;
/**
 * The action that would occur if this plan were attached to the customer.
 */
declare const AttachAction: {
    readonly Activate: "activate";
    readonly Upgrade: "upgrade";
    readonly Downgrade: "downgrade";
    readonly None: "none";
    readonly Purchase: "purchase";
};
/**
 * The action that would occur if this plan were attached to the customer.
 */
type AttachAction = OpenEnum<typeof AttachAction>;
type CustomerEligibility = {
    /**
     * Whether the trial on this plan is available to this customer. For example, if the customer used the trial in the past, this will be false.
     */
    trialAvailable?: boolean | undefined;
    /**
     * The customer's current status with this plan. 'active' if attached, 'scheduled' if pending activation.
     */
    status?: PlanStatus | undefined;
    /**
     * Whether the customer's active instance of this plan is set to cancel.
     */
    canceling?: boolean | undefined;
    /**
     * Whether the customer is currently on a free trial of this plan.
     */
    trialing?: boolean | undefined;
    /**
     * The action that would occur if this plan were attached to the customer.
     */
    attachAction: AttachAction;
};
type Plan = {
    /**
     * Unique identifier for the plan.
     */
    id: string;
    /**
     * Display name of the plan.
     */
    name: string;
    /**
     * Optional description of the plan.
     */
    description: string | null;
    /**
     * Group identifier for organizing related plans. Plans in the same group are mutually exclusive.
     */
    group: string | null;
    /**
     * Version number of the plan. Incremented when plan configuration changes.
     */
    version: number;
    /**
     * Whether this is an add-on plan that can be attached alongside a main plan.
     */
    addOn: boolean;
    /**
     * If true, this plan is automatically attached when a customer is created. Used for free plans.
     */
    autoEnable: boolean;
    /**
     * Base recurring price for the plan. Null for free plans or usage-only plans.
     */
    price: PlanPrice | null;
    /**
     * Feature configurations included in this plan. Each item defines included units, pricing, and reset behavior for a feature.
     */
    items: Array<Item>;
    /**
     * Free trial configuration. If set, new customers can try this plan before being charged.
     */
    freeTrial?: FreeTrial | undefined;
    /**
     * Unix timestamp (ms) when the plan was created.
     */
    createdAt: number;
    /**
     * Environment this plan belongs to ('sandbox' or 'live').
     */
    env: PlanEnv;
    /**
     * Whether the plan is archived. Archived plans cannot be attached to new customers.
     */
    archived: boolean;
    /**
     * Deprecated. Use variant_details.base_plan_id instead. If this is a variant, the ID of the base plan it was created from.
     */
    baseVariantId: string | null;
    /**
     * Details about how this variant relates to its latest base plan.
     */
    variantDetails?: VariantDetails | undefined;
    /**
     * Miscellaneous plan-level configuration flags.
     */
    config: PlanConfig;
    /**
     * Plan-level billing controls used as customer defaults.
     */
    billingControls?: PlanBillingControls | undefined;
    /**
     * Arbitrary key-value metadata defined by you for your own use. Shared across all versions of the plan.
     */
    metadata: {
        [k: string]: any;
    };
    customerEligibility?: CustomerEligibility | undefined;
};

/**
 * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
 */
declare const CreateEntityLimitTypeRequestBody: {
    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 CreateEntityLimitTypeRequestBody = ClosedEnum<typeof CreateEntityLimitTypeRequestBody>;
type CreateEntitySpendLimitRequest = {
    /**
     * 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?: CreateEntityLimitTypeRequestBody | 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 CreateEntityIntervalRequestBody: {
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
type CreateEntityIntervalRequestBody = ClosedEnum<typeof CreateEntityIntervalRequestBody>;
/**
 * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
 */
type CreateEntityFilterRequest = {
    properties: {
        [k: string]: string | number | boolean;
    };
};
type CreateEntityUsageLimitRequest = {
    /**
     * 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: CreateEntityIntervalRequestBody;
    /**
     * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
     */
    filter?: CreateEntityFilterRequest | undefined;
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
declare const CreateEntityThresholdTypeRequestBody: {
    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 CreateEntityThresholdTypeRequestBody = ClosedEnum<typeof CreateEntityThresholdTypeRequestBody>;
type CreateEntityUsageAlertRequestBody = {
    /**
     * 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: CreateEntityThresholdTypeRequestBody;
    /**
     * Optional user-defined label to distinguish multiple alerts on the same feature.
     */
    name?: string | undefined;
};
type CreateEntityOverageAllowedRequest = {
    /**
     * 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 CreateEntityBillingControlsRequest = {
    /**
     * List of spend limits per feature. Each entry caps overage (overage_limit) and/or per-interval usage (usage_limit).
     */
    spendLimits?: Array<CreateEntitySpendLimitRequest> | undefined;
    /**
     * List of hard usage caps per feature for this entity. An entity entry overrides the customer's for that feature.
     */
    usageLimits?: Array<CreateEntityUsageLimitRequest> | undefined;
    /**
     * List of usage alert configurations per feature.
     */
    usageAlerts?: Array<CreateEntityUsageAlertRequestBody> | undefined;
    /**
     * List of overage allowed controls per feature. When enabled, usage can exceed balance.
     */
    overageAllowed?: Array<CreateEntityOverageAllowedRequest> | undefined;
};
type CreateEntityParams = {
    /**
     * The name of the entity
     */
    name?: string | null | undefined;
    /**
     * The ID of the feature this entity is associated with
     */
    featureId: string;
    /**
     * Billing controls for the entity.
     */
    billingControls?: CreateEntityBillingControlsRequest | undefined;
    /**
     * Customer details to set when creating a customer
     */
    customerData?: CustomerData | undefined;
    /**
     * The ID of the customer to create the entity for.
     */
    customerId: string;
    /**
     * The ID of the entity.
     */
    entityId: string;
};
/**
 * The environment (sandbox/live)
 */
declare const CreateEntityEnv: {
    readonly Sandbox: "sandbox";
    readonly Live: "live";
};
/**
 * The environment (sandbox/live)
 */
type CreateEntityEnv = OpenEnum<typeof CreateEntityEnv>;
/**
 * Current status of the subscription.
 */
declare const CreateEntityStatus: {
    readonly Active: "active";
    readonly Scheduled: "scheduled";
};
/**
 * Current status of the subscription.
 */
type CreateEntityStatus = OpenEnum<typeof CreateEntityStatus>;
/**
 * Whether this subscription is attached at the customer level or entity level.
 */
declare const CreateEntitySubscriptionScope: {
    readonly Customer: "customer";
    readonly Entity: "entity";
};
/**
 * Whether this subscription is attached at the customer level or entity level.
 */
type CreateEntitySubscriptionScope = OpenEnum<typeof CreateEntitySubscriptionScope>;
type CreateEntitySubscription = {
    /**
     * 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: CreateEntityStatus;
    /**
     * 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?: CreateEntitySubscriptionScope | undefined;
};
/**
 * Whether this purchase is attached at the customer level or entity level.
 */
declare const CreateEntityPurchaseScope: {
    readonly Customer: "customer";
    readonly Entity: "entity";
};
/**
 * Whether this purchase is attached at the customer level or entity level.
 */
type CreateEntityPurchaseScope = OpenEnum<typeof CreateEntityPurchaseScope>;
type CreateEntityPurchase = {
    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?: CreateEntityPurchaseScope | 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 CreateEntityType: {
    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 CreateEntityType = OpenEnum<typeof CreateEntityType>;
type CreateEntityCreditSchema = {
    /**
     * ID of the metered feature that draws from this credit system.
     */
    meteredFeatureId: string;
    /**
     * Credits consumed per unit of the metered feature.
     */
    creditCost: number;
};
type CreateEntityModelMarkups = {
    markup?: number | undefined;
    inputCost?: number | undefined;
    outputCost?: number | undefined;
};
type CreateEntityProviderMarkups = {
    markup: number;
};
/**
 * Display names for the feature in billing UI and customer-facing components.
 */
type CreateEntityDisplay = {
    /**
     * 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 CreateEntityFeature = {
    /**
     * 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: CreateEntityType;
    /**
     * 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<CreateEntityCreditSchema> | undefined;
    /**
     * Per-model markup overrides for AI credit systems.
     */
    modelMarkups?: {
        [k: string]: CreateEntityModelMarkups;
    } | 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]: CreateEntityProviderMarkups;
    } | null | undefined;
    /**
     * Display names for the feature in billing UI and customer-facing components.
     */
    display?: CreateEntityDisplay | undefined;
    /**
     * Whether the feature is archived and hidden from the dashboard.
     */
    archived: boolean;
};
type CreateEntityFlags = {
    /**
     * 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?: CreateEntityFeature | undefined;
};
/**
 * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
 */
declare const CreateEntityLimitTypeResponse: {
    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 CreateEntityLimitTypeResponse = OpenEnum<typeof CreateEntityLimitTypeResponse>;
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
declare const CreateEntitySpendLimitSource: {
    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 CreateEntitySpendLimitSource = OpenEnum<typeof CreateEntitySpendLimitSource>;
type CreateEntitySpendLimitResponse = {
    /**
     * 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?: CreateEntityLimitTypeResponse | 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?: CreateEntitySpendLimitSource | undefined;
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
declare const CreateEntityIntervalResponse: {
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
type CreateEntityIntervalResponse = OpenEnum<typeof CreateEntityIntervalResponse>;
/**
 * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
 */
type CreateEntityFilterResponse = {
    properties: {
        [k: string]: any;
    };
};
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
declare const CreateEntityUsageLimitSource: {
    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 CreateEntityUsageLimitSource = OpenEnum<typeof CreateEntityUsageLimitSource>;
type CreateEntityUsageLimitResponse = {
    /**
     * 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: CreateEntityIntervalResponse;
    /**
     * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
     */
    filter?: CreateEntityFilterResponse | 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?: CreateEntityUsageLimitSource | undefined;
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
declare const CreateEntityThresholdTypeResponse: {
    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 CreateEntityThresholdTypeResponse = OpenEnum<typeof CreateEntityThresholdTypeResponse>;
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
declare const CreateEntityUsageAlertSource: {
    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 CreateEntityUsageAlertSource = OpenEnum<typeof CreateEntityUsageAlertSource>;
type CreateEntityUsageAlertResponse = {
    /**
     * 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: CreateEntityThresholdTypeResponse;
    /**
     * 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?: CreateEntityUsageAlertSource | undefined;
};
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
declare const CreateEntityOverageAllowedSource: {
    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 CreateEntityOverageAllowedSource = OpenEnum<typeof CreateEntityOverageAllowedSource>;
type CreateEntityOverageAllowedResponse = {
    /**
     * 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?: CreateEntityOverageAllowedSource | undefined;
};
/**
 * Billing controls for the entity.
 */
type CreateEntityBillingControlsResponse = {
    /**
     * List of spend limits per feature. Each entry caps overage (overage_limit) and/or per-interval usage (usage_limit).
     */
    spendLimits?: Array<CreateEntitySpendLimitResponse> | undefined;
    /**
     * List of hard usage caps per feature for this entity. An entity entry overrides the customer's for that feature.
     */
    usageLimits?: Array<CreateEntityUsageLimitResponse> | undefined;
    /**
     * List of usage alert configurations per feature.
     */
    usageAlerts?: Array<CreateEntityUsageAlertResponse> | undefined;
    /**
     * List of overage allowed controls per feature. When enabled, usage can exceed balance.
     */
    overageAllowed?: Array<CreateEntityOverageAllowedResponse> | undefined;
};
/**
 * The billing processor that owns this invoice.
 */
declare const CreateEntityProcessorType: {
    readonly Stripe: "stripe";
    readonly Revenuecat: "revenuecat";
};
/**
 * The billing processor that owns this invoice.
 */
type CreateEntityProcessorType = OpenEnum<typeof CreateEntityProcessorType>;
type CreateEntityInvoice = {
    /**
     * 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: CreateEntityProcessorType;
    /**
     * 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 CreateEntityResponse = {
    /**
     * 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: CreateEntityEnv;
    subscriptions: Array<CreateEntitySubscription>;
    purchases: Array<CreateEntityPurchase>;
    balances: {
        [k: string]: Balance;
    };
    flags: {
        [k: string]: CreateEntityFlags;
    };
    /**
     * Billing controls for the entity.
     */
    billingControls?: CreateEntityBillingControlsResponse | undefined;
    /**
     * Invoices for this entity (only included when expand=invoices)
     */
    invoices?: Array<CreateEntityInvoice> | undefined;
};

/**
 * The type of the feature. 'single_use' features are consumed, like API calls, tokens, or messages. 'continuous_use' features are allocated, like seats, workspaces, or projects. 'credit_system' features are schemas that unify multiple 'single_use' features into a single credit system.
 */
declare const CreateFeatureTypeRequestBody: {
    readonly Boolean: "boolean";
    readonly Metered: "metered";
    readonly CreditSystem: "credit_system";
    readonly AiCreditSystem: "ai_credit_system";
};
/**
 * The type of the feature. 'single_use' features are consumed, like API calls, tokens, or messages. 'continuous_use' features are allocated, like seats, workspaces, or projects. 'credit_system' features are schemas that unify multiple 'single_use' features into a single credit system.
 */
type CreateFeatureTypeRequestBody = ClosedEnum<typeof CreateFeatureTypeRequestBody>;
/**
 * Singular and plural display names for the feature in your user interface.
 */
type CreateFeatureDisplayRequestBody = {
    singular: string;
    plural: string;
};
type CreateFeatureCreditSchemaRequestBody = {
    meteredFeatureId: string;
    creditCost: number;
};
type CreateFeatureModelMarkupsRequest = {
    markup?: number | undefined;
    inputCost?: number | undefined;
    outputCost?: number | undefined;
};
type CreateFeatureProviderMarkupsRequest = {
    markup: number;
};
type CreateFeatureParams = {
    /**
     * The name of the feature.
     */
    name: string;
    /**
     * The type of the feature. 'single_use' features are consumed, like API calls, tokens, or messages. 'continuous_use' features are allocated, like seats, workspaces, or projects. 'credit_system' features are schemas that unify multiple 'single_use' features into a single credit system.
     */
    type: CreateFeatureTypeRequestBody;
    /**
     * Whether this feature is consumable. A consumable feature is one that periodically resets and is consumed rather than allocated (like credits, API requests, etc.). Applicable only for 'metered' features.
     */
    consumable?: boolean | undefined;
    /**
     * Singular and plural display names for the feature in your user interface.
     */
    display?: CreateFeatureDisplayRequestBody | undefined;
    /**
     * A schema that maps 'single_use' feature IDs to credit costs. For classic credit systems only — AI credit systems use model_markups instead.
     */
    creditSchema?: Array<CreateFeatureCreditSchemaRequestBody> | undefined;
    /**
     * Per-model markup overrides for AI credit systems. Maps model IDs to their markup configuration.
     */
    modelMarkups?: {
        [k: string]: CreateFeatureModelMarkupsRequest;
    } | null | undefined;
    /**
     * Default percentage markup for this AI credit system. Used when no model or provider markup applies. Use -100 to make usage free.
     */
    defaultMarkup?: number | undefined;
    /**
     * Per-provider default markup percentages for AI credit systems. Provider keys match the first segment of model_id.
     */
    providerMarkups?: {
        [k: string]: CreateFeatureProviderMarkupsRequest;
    } | null | undefined;
    eventNames?: Array<string> | undefined;
    /**
     * The ID of the feature to create.
     */
    featureId: 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.
 */
declare const CreateFeatureTypeResponse: {
    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 CreateFeatureTypeResponse = OpenEnum<typeof CreateFeatureTypeResponse>;
type CreateFeatureCreditSchemaResponse = {
    /**
     * ID of the metered feature that draws from this credit system.
     */
    meteredFeatureId: string;
    /**
     * Credits consumed per unit of the metered feature.
     */
    creditCost: number;
};
type CreateFeatureModelMarkupsResponse = {
    markup?: number | undefined;
    inputCost?: number | undefined;
    outputCost?: number | undefined;
};
type CreateFeatureProviderMarkupsResponse = {
    markup: number;
};
/**
 * Display names for the feature in billing UI and customer-facing components.
 */
type CreateFeatureDisplayResponse = {
    /**
     * 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;
};
/**
 * OK
 */
type CreateFeatureResponse = {
    /**
     * 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: CreateFeatureTypeResponse;
    /**
     * 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<CreateFeatureCreditSchemaResponse> | undefined;
    /**
     * Per-model markup overrides for AI credit systems.
     */
    modelMarkups?: {
        [k: string]: CreateFeatureModelMarkupsResponse;
    } | 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]: CreateFeatureProviderMarkupsResponse;
    } | null | undefined;
    /**
     * Display names for the feature in billing UI and customer-facing components.
     */
    display?: CreateFeatureDisplayResponse | undefined;
    /**
     * Whether the feature is archived and hidden from the dashboard.
     */
    archived: boolean;
};

/**
 * Billing interval (e.g. 'month', 'year').
 */
declare const CreatePlanPriceIntervalRequestBody: {
    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 CreatePlanPriceIntervalRequestBody = ClosedEnum<typeof CreatePlanPriceIntervalRequestBody>;
/**
 * Base recurring price for the plan. Omit for free or usage-only plans.
 */
type CreatePlanPriceRequestBody = {
    /**
     * Base price amount for the plan.
     */
    amount: number;
    /**
     * Billing interval (e.g. 'month', 'year').
     */
    interval: CreatePlanPriceIntervalRequestBody;
    /**
     * 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 CreatePlanResetIntervalRequestBody: {
    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 CreatePlanResetIntervalRequestBody = ClosedEnum<typeof CreatePlanResetIntervalRequestBody>;
/**
 * Reset configuration for consumable features. Omit for non-consumable features like seats.
 */
type CreatePlanResetRequestBody = {
    /**
     * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
     */
    interval: CreatePlanResetIntervalRequestBody;
    /**
     * Number of intervals between resets. Defaults to 1.
     */
    intervalCount?: number | undefined;
};
type CreatePlanTierRequestBody = {
    to: number | string;
    amount?: number | undefined;
    flatAmount?: number | undefined;
};
declare const CreatePlanTierBehaviorRequestBody: {
    readonly Graduated: "graduated";
    readonly Volume: "volume";
};
type CreatePlanTierBehaviorRequestBody = ClosedEnum<typeof CreatePlanTierBehaviorRequestBody>;
/**
 * Billing interval. For consumable features, should match reset.interval.
 */
declare const CreatePlanItemPriceIntervalRequestBody: {
    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 CreatePlanItemPriceIntervalRequestBody = ClosedEnum<typeof CreatePlanItemPriceIntervalRequestBody>;
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
declare const CreatePlanBillingMethodRequestBody: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
type CreatePlanBillingMethodRequestBody = ClosedEnum<typeof CreatePlanBillingMethodRequestBody>;
/**
 * Pricing for usage beyond included units. Omit for free features.
 */
type CreatePlanItemPriceRequestBody = {
    /**
     * 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<CreatePlanTierRequestBody> | undefined;
    tierBehavior?: CreatePlanTierBehaviorRequestBody | undefined;
    /**
     * Billing interval. For consumable features, should match reset.interval.
     */
    interval: CreatePlanItemPriceIntervalRequestBody;
    /**
     * 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: CreatePlanBillingMethodRequestBody;
    /**
     * 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 CreatePlanItemOnIncrease: {
    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 CreatePlanItemOnIncrease = ClosedEnum<typeof CreatePlanItemOnIncrease>;
/**
 * Credit behavior when quantity decreases mid-cycle.
 */
declare const CreatePlanItemOnDecrease: {
    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 CreatePlanItemOnDecrease = ClosedEnum<typeof CreatePlanItemOnDecrease>;
/**
 * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
 */
type CreatePlanItemProration = {
    /**
     * Billing behavior when quantity increases mid-cycle.
     */
    onIncrease: CreatePlanItemOnIncrease;
    /**
     * Credit behavior when quantity decreases mid-cycle.
     */
    onDecrease: CreatePlanItemOnDecrease;
};
/**
 * When rolled over units expire.
 */
declare const CreatePlanExpiryDurationTypeRequestBody: {
    readonly Month: "month";
    readonly Forever: "forever";
};
/**
 * When rolled over units expire.
 */
type CreatePlanExpiryDurationTypeRequestBody = ClosedEnum<typeof CreatePlanExpiryDurationTypeRequestBody>;
/**
 * Rollover config for unused units. If set, unused included units carry over.
 */
type CreatePlanRolloverRequestBody = {
    /**
     * 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: CreatePlanExpiryDurationTypeRequestBody;
    /**
     * Number of periods before expiry.
     */
    expiryDurationLength?: number | undefined;
};
/**
 * Configuration for a feature item in a plan, including usage limits, pricing, and rollover settings.
 */
type CreatePlanItemPlanItem = {
    /**
     * 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?: CreatePlanResetRequestBody | undefined;
    /**
     * Pricing for usage beyond included units. Omit for free features.
     */
    price?: CreatePlanItemPriceRequestBody | undefined;
    /**
     * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
     */
    proration?: CreatePlanItemProration | undefined;
    /**
     * Rollover config for unused units. If set, unused included units carry over.
     */
    rollover?: CreatePlanRolloverRequestBody | undefined;
};
/**
 * Unit of time for the trial ('day', 'month', 'year').
 */
declare const CreatePlanDurationTypeRequest: {
    readonly Day: "day";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Unit of time for the trial ('day', 'month', 'year').
 */
type CreatePlanDurationTypeRequest = ClosedEnum<typeof CreatePlanDurationTypeRequest>;
/**
 * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
 */
declare const CreatePlanOnEndRequest: {
    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 CreatePlanOnEndRequest = ClosedEnum<typeof CreatePlanOnEndRequest>;
/**
 * Free trial configuration. Customers can try this plan before being charged.
 */
type FreeTrialRequest = {
    /**
     * Number of duration_type periods the trial lasts.
     */
    durationLength: number;
    /**
     * Unit of time for the trial ('day', 'month', 'year').
     */
    durationType?: CreatePlanDurationTypeRequest | 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?: CreatePlanOnEndRequest | undefined;
};
/**
 * Miscellaneous plan-level configuration flags.
 */
type CreatePlanConfigRequest = {
    /**
     * If true, entitlements attached to this plan will still reset on schedule even when the customer's product is in a past_due state.
     */
    ignorePastDue?: boolean | undefined;
};
/**
 * The time interval for the purchase limit window.
 */
declare const CreatePlanPurchaseLimitIntervalRequestBody: {
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
};
/**
 * The time interval for the purchase limit window.
 */
type CreatePlanPurchaseLimitIntervalRequestBody = ClosedEnum<typeof CreatePlanPurchaseLimitIntervalRequestBody>;
/**
 * Optional rate limit to cap how often auto top-ups occur.
 */
type CreatePlanPurchaseLimitRequest = {
    /**
     * The time interval for the purchase limit window.
     */
    interval: CreatePlanPurchaseLimitIntervalRequestBody;
    /**
     * Number of intervals in the purchase limit window.
     */
    intervalCount?: number | undefined;
    /**
     * Maximum number of auto top-ups allowed within the interval.
     */
    limit: number;
};
type CreatePlanAutoTopupRequest = {
    /**
     * 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?: CreatePlanPurchaseLimitRequest | 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 CreatePlanLimitTypeRequestBody: {
    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 CreatePlanLimitTypeRequestBody = ClosedEnum<typeof CreatePlanLimitTypeRequestBody>;
type CreatePlanSpendLimitRequest = {
    /**
     * 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?: CreatePlanLimitTypeRequestBody | 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 CreatePlanUsageLimitIntervalRequestBody: {
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
type CreatePlanUsageLimitIntervalRequestBody = ClosedEnum<typeof CreatePlanUsageLimitIntervalRequestBody>;
/**
 * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
 */
type CreatePlanFilterRequest = {
    properties: {
        [k: string]: string | number | boolean;
    };
};
type CreatePlanUsageLimitRequest = {
    /**
     * 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: CreatePlanUsageLimitIntervalRequestBody;
    /**
     * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
     */
    filter?: CreatePlanFilterRequest | undefined;
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
declare const CreatePlanThresholdTypeRequestBody: {
    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 CreatePlanThresholdTypeRequestBody = ClosedEnum<typeof CreatePlanThresholdTypeRequestBody>;
type CreatePlanUsageAlertRequestBody = {
    /**
     * 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: CreatePlanThresholdTypeRequestBody;
    /**
     * Optional user-defined label to distinguish multiple alerts on the same feature.
     */
    name?: string | undefined;
};
type CreatePlanOverageAllowedRequest = {
    /**
     * The feature ID this overage allowed control applies to.
     */
    featureId: string;
    /**
     * Whether overage is allowed for this feature.
     */
    enabled?: boolean | undefined;
};
/**
 * Plan-level billing controls used as customer defaults.
 */
type CreatePlanBillingControlsRequest = {
    /**
     * List of auto top-up configurations per feature.
     */
    autoTopups?: Array<CreatePlanAutoTopupRequest> | undefined;
    /**
     * List of overage spend limits per feature (caps overage spend).
     */
    spendLimits?: Array<CreatePlanSpendLimitRequest> | undefined;
    /**
     * List of hard usage caps per feature (max units per interval).
     */
    usageLimits?: Array<CreatePlanUsageLimitRequest> | undefined;
    /**
     * List of usage alert configurations per feature.
     */
    usageAlerts?: Array<CreatePlanUsageAlertRequestBody> | undefined;
    /**
     * List of overage allowed controls per feature. When enabled, usage can exceed balance.
     */
    overageAllowed?: Array<CreatePlanOverageAllowedRequest> | undefined;
};
type CreatePlanParams = {
    /**
     * The ID of the plan to create.
     */
    planId: string;
    /**
     * Group identifier for organizing related plans. Plans in the same group are mutually exclusive.
     */
    group?: string | undefined;
    /**
     * Display name of the plan.
     */
    name: string;
    /**
     * Optional description of the plan.
     */
    description?: string | null | undefined;
    /**
     * If true, this plan can be attached alongside other plans. Otherwise, attaching replaces existing plans in the same group.
     */
    addOn?: boolean | undefined;
    /**
     * If true, plan is automatically attached when a customer is created. Use for free tiers.
     */
    autoEnable?: boolean | undefined;
    /**
     * Base recurring price for the plan. Omit for free or usage-only plans.
     */
    price?: CreatePlanPriceRequestBody | undefined;
    /**
     * Feature configurations for this plan. Each item defines included units, pricing, and reset behavior.
     */
    items?: Array<CreatePlanItemPlanItem> | undefined;
    /**
     * Free trial configuration. Customers can try this plan before being charged.
     */
    freeTrial?: FreeTrialRequest | undefined;
    /**
     * Miscellaneous plan-level configuration flags.
     */
    config?: CreatePlanConfigRequest | undefined;
    /**
     * Plan-level billing controls used as customer defaults.
     */
    billingControls?: CreatePlanBillingControlsRequest | undefined;
    /**
     * Arbitrary key-value metadata defined by you for your own use (e.g. UI copy, feature highlights). Values can be any JSON-serializable value. Shared across all versions of the plan.
     */
    metadata?: {
        [k: string]: any;
    } | undefined;
    createInStripe?: boolean | undefined;
};
/**
 * Billing interval (e.g. 'month', 'year').
 */
declare const CreatePlanPriceIntervalResponse: {
    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 CreatePlanPriceIntervalResponse = OpenEnum<typeof CreatePlanPriceIntervalResponse>;
/**
 * Display text for showing this price in pricing pages.
 */
type CreatePlanPriceDisplay = {
    /**
     * Main display text (e.g. '$10' or '100 messages').
     */
    primaryText: string;
    /**
     * Secondary display text (e.g. 'per month' or 'then $0.5 per 100').
     */
    secondaryText?: string | undefined;
};
type CreatePlanPriceResponse = {
    /**
     * Base price amount for the plan.
     */
    amount: number;
    /**
     * Billing interval (e.g. 'month', 'year').
     */
    interval: CreatePlanPriceIntervalResponse;
    /**
     * Number of intervals per billing cycle. Defaults to 1.
     */
    intervalCount?: number | undefined;
    /**
     * Display text for showing this price in pricing pages.
     */
    display?: CreatePlanPriceDisplay | undefined;
};
/**
 * The type of the feature
 */
declare const CreatePlanType: {
    readonly Static: "static";
    readonly Boolean: "boolean";
    readonly SingleUse: "single_use";
    readonly ContinuousUse: "continuous_use";
    readonly CreditSystem: "credit_system";
    readonly AiCreditSystem: "ai_credit_system";
};
/**
 * The type of the feature
 */
type CreatePlanType = OpenEnum<typeof CreatePlanType>;
type CreatePlanFeatureDisplay = {
    /**
     * The singular display name for the feature.
     */
    singular: string;
    /**
     * The plural display name for the feature.
     */
    plural: string;
};
type CreatePlanCreditSchema = {
    /**
     * The ID of the metered feature (should be a single_use feature).
     */
    meteredFeatureId: string;
    /**
     * The credit cost of the metered feature.
     */
    creditCost: number;
};
/**
 * The full feature object if expanded.
 */
type CreatePlanFeature = {
    /**
     * The ID of the feature, used to refer to it in other API calls like /track or /check.
     */
    id: string;
    /**
     * The name of the feature.
     */
    name?: string | null | undefined;
    /**
     * The type of the feature
     */
    type: CreatePlanType;
    /**
     * Singular and plural display names for the feature.
     */
    display?: CreatePlanFeatureDisplay | null | undefined;
    /**
     * Credit cost schema for credit system features.
     */
    creditSchema?: Array<CreatePlanCreditSchema> | null | undefined;
    /**
     * Whether or not the feature is archived.
     */
    archived?: boolean | null | undefined;
};
/**
 * The interval at which the feature balance resets (e.g. 'month', 'year'). For consumable features, usage resets to 0 and included units are restored.
 */
declare const CreatePlanResetItemIntervalResponse: {
    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";
};
/**
 * The interval at which the feature balance resets (e.g. 'month', 'year'). For consumable features, usage resets to 0 and included units are restored.
 */
type CreatePlanResetItemIntervalResponse = OpenEnum<typeof CreatePlanResetItemIntervalResponse>;
type CreatePlanItemResetResponse = {
    /**
     * The interval at which the feature balance resets (e.g. 'month', 'year'). For consumable features, usage resets to 0 and included units are restored.
     */
    interval: CreatePlanResetItemIntervalResponse;
    /**
     * Number of intervals between resets. Defaults to 1.
     */
    intervalCount?: number | undefined;
};
type CreatePlanItemTierResponse = {
    to: number | string;
    amount: number;
    flatAmount?: number | undefined;
};
declare const CreatePlanItemTierBehaviorResponse: {
    readonly Graduated: "graduated";
    readonly Volume: "volume";
};
type CreatePlanItemTierBehaviorResponse = OpenEnum<typeof CreatePlanItemTierBehaviorResponse>;
/**
 * Billing interval for this price. For consumable features, should match reset.interval.
 */
declare const CreatePlanPriceItemIntervalResponse: {
    readonly OneOff: "one_off";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
/**
 * Billing interval for this price. For consumable features, should match reset.interval.
 */
type CreatePlanPriceItemIntervalResponse = OpenEnum<typeof CreatePlanPriceItemIntervalResponse>;
/**
 * 'prepaid' for features like seats where customers pay upfront, 'usage_based' for pay-as-you-go after included usage.
 */
declare const CreatePlanItemBillingMethodResponse: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * 'prepaid' for features like seats where customers pay upfront, 'usage_based' for pay-as-you-go after included usage.
 */
type CreatePlanItemBillingMethodResponse = OpenEnum<typeof CreatePlanItemBillingMethodResponse>;
type CreatePlanItemPriceResponse = {
    /**
     * Price per billing_units after included usage is consumed. Mutually exclusive with tiers.
     */
    amount?: number | undefined;
    /**
     * Tiered pricing configuration. Each tier's 'to' INCLUDES the included amount. Either 'tiers' or 'amount' is required.
     */
    tiers?: Array<CreatePlanItemTierResponse> | undefined;
    tierBehavior?: CreatePlanItemTierBehaviorResponse | undefined;
    /**
     * Billing interval for this price. For consumable features, should match reset.interval.
     */
    interval: CreatePlanPriceItemIntervalResponse;
    /**
     * Number of intervals per billing cycle. Defaults to 1.
     */
    intervalCount?: number | undefined;
    /**
     * Number of units per price increment. Usage is rounded UP to the nearest billing_units when billed (e.g. billing_units=100 means 101 usage rounds to 200).
     */
    billingUnits: number;
    /**
     * 'prepaid' for features like seats where customers pay upfront, 'usage_based' for pay-as-you-go after included usage.
     */
    billingMethod: CreatePlanItemBillingMethodResponse;
    /**
     * Maximum units a customer can purchase beyond included. E.g. if included=100 and max_purchase=300, customer can use up to 400 total before usage is capped. Null for no limit.
     */
    maxPurchase: number | null;
};
/**
 * Display text for showing this item in pricing pages.
 */
type CreatePlanItemDisplay = {
    /**
     * Main display text (e.g. '$10' or '100 messages').
     */
    primaryText: string;
    /**
     * Secondary display text (e.g. 'per month' or 'then $0.5 per 100').
     */
    secondaryText?: string | undefined;
};
/**
 * When rolled over units expire.
 */
declare const CreatePlanItemExpiryDurationTypeResponse: {
    readonly Month: "month";
    readonly Forever: "forever";
};
/**
 * When rolled over units expire.
 */
type CreatePlanItemExpiryDurationTypeResponse = OpenEnum<typeof CreatePlanItemExpiryDurationTypeResponse>;
/**
 * Rollover configuration for unused units. If set, unused included units roll over to the next period.
 */
type CreatePlanItemRolloverResponse = {
    /**
     * Maximum rollover units. Null for unlimited rollover.
     */
    max: number | null;
    /**
     * Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
     */
    maxPercentage?: number | null | undefined;
    /**
     * When rolled over units expire.
     */
    expiryDurationType: CreatePlanItemExpiryDurationTypeResponse;
    /**
     * Number of periods before expiry.
     */
    expiryDurationLength?: number | undefined;
};
type CreatePlanItem = {
    /**
     * The ID of the feature this item configures.
     */
    featureId: string;
    /**
     * The full feature object if expanded.
     */
    feature?: CreatePlanFeature | undefined;
    /**
     * Number of free units included. For consumable features, balance resets to this number each interval.
     */
    included: number;
    /**
     * Whether the customer has unlimited access to this feature.
     */
    unlimited: boolean;
    /**
     * Reset configuration for consumable features. Null for non-consumable features like seats where usage persists across billing cycles.
     */
    reset: CreatePlanItemResetResponse | null;
    /**
     * Pricing configuration for usage beyond included units. Null if feature is entirely free.
     */
    price: CreatePlanItemPriceResponse | null;
    /**
     * Display text for showing this item in pricing pages.
     */
    display?: CreatePlanItemDisplay | undefined;
    /**
     * Rollover configuration for unused units. If set, unused included units roll over to the next period.
     */
    rollover?: CreatePlanItemRolloverResponse | undefined;
};
/**
 * Unit of time for the trial duration ('day', 'month', 'year').
 */
declare const CreatePlanDurationTypeResponse: {
    readonly Day: "day";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Unit of time for the trial duration ('day', 'month', 'year').
 */
type CreatePlanDurationTypeResponse = OpenEnum<typeof CreatePlanDurationTypeResponse>;
declare const CreatePlanOnEndResponse: {
    readonly Bill: "bill";
    readonly Revert: "revert";
};
type CreatePlanOnEndResponse = OpenEnum<typeof CreatePlanOnEndResponse>;
/**
 * Free trial configuration. If set, new customers can try this plan before being charged.
 */
type CreatePlanFreeTrialResponse = {
    /**
     * Number of duration_type periods the trial lasts.
     */
    durationLength: number;
    /**
     * Unit of time for the trial duration ('day', 'month', 'year').
     */
    durationType: CreatePlanDurationTypeResponse;
    /**
     * Whether a payment method is required to start the trial. If true, customer will be charged after trial ends.
     */
    cardRequired: boolean;
    /**
     * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
     */
    onEnd?: CreatePlanOnEndResponse | null | undefined;
};
/**
 * Environment this plan belongs to ('sandbox' or 'live').
 */
declare const CreatePlanEnv: {
    readonly Sandbox: "sandbox";
    readonly Live: "live";
};
/**
 * Environment this plan belongs to ('sandbox' or 'live').
 */
type CreatePlanEnv = OpenEnum<typeof CreatePlanEnv>;
/**
 * Billing interval (e.g. 'month', 'year').
 */
declare const CreatePlanPriceVariantDetailsInterval: {
    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 CreatePlanPriceVariantDetailsInterval = OpenEnum<typeof CreatePlanPriceVariantDetailsInterval>;
/**
 * Base price configuration for a plan.
 */
type CreatePlanBasePrice = {
    /**
     * Base price amount for the plan.
     */
    amount: number;
    /**
     * Billing interval (e.g. 'month', 'year').
     */
    interval: CreatePlanPriceVariantDetailsInterval;
    /**
     * 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 CreatePlanAddItemResetInterval: {
    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 CreatePlanAddItemResetInterval = OpenEnum<typeof CreatePlanAddItemResetInterval>;
/**
 * Reset configuration for consumable features. Omit for non-consumable features like seats.
 */
type CreatePlanVariantDetailsReset = {
    /**
     * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
     */
    interval: CreatePlanAddItemResetInterval;
    /**
     * Number of intervals between resets. Defaults to 1.
     */
    intervalCount?: number | undefined;
};
type CreatePlanVariantDetailsTier = {
    to: number | string;
    amount: number;
    flatAmount?: number | undefined;
};
declare const CreatePlanVariantDetailsTierBehavior: {
    readonly Graduated: "graduated";
    readonly Volume: "volume";
};
type CreatePlanVariantDetailsTierBehavior = OpenEnum<typeof CreatePlanVariantDetailsTierBehavior>;
/**
 * Billing interval. For consumable features, should match reset.interval.
 */
declare const CreatePlanAddItemPriceInterval: {
    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 CreatePlanAddItemPriceInterval = OpenEnum<typeof CreatePlanAddItemPriceInterval>;
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
declare const CreatePlanAddItemBillingMethod: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
type CreatePlanAddItemBillingMethod = OpenEnum<typeof CreatePlanAddItemBillingMethod>;
/**
 * Pricing for usage beyond included units. Omit for free features.
 */
type CreatePlanVariantDetailsPrice = {
    /**
     * 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<CreatePlanVariantDetailsTier> | undefined;
    tierBehavior?: CreatePlanVariantDetailsTierBehavior | undefined;
    /**
     * Billing interval. For consumable features, should match reset.interval.
     */
    interval: CreatePlanAddItemPriceInterval;
    /**
     * Number of intervals per billing cycle. Defaults to 1.
     */
    intervalCount: number;
    /**
     * Units per price increment. Usage is rounded UP when billed (e.g. billing_units=100 means 101 rounds to 200).
     */
    billingUnits: number;
    /**
     * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
     */
    billingMethod: CreatePlanAddItemBillingMethod;
    /**
     * 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 CreatePlanVariantDetailsOnIncrease: {
    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 CreatePlanVariantDetailsOnIncrease = OpenEnum<typeof CreatePlanVariantDetailsOnIncrease>;
/**
 * Credit behavior when quantity decreases mid-cycle.
 */
declare const CreatePlanVariantDetailsOnDecrease: {
    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 CreatePlanVariantDetailsOnDecrease = OpenEnum<typeof CreatePlanVariantDetailsOnDecrease>;
/**
 * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
 */
type CreatePlanProrationResponse = {
    /**
     * Billing behavior when quantity increases mid-cycle.
     */
    onIncrease: CreatePlanVariantDetailsOnIncrease;
    /**
     * Credit behavior when quantity decreases mid-cycle.
     */
    onDecrease: CreatePlanVariantDetailsOnDecrease;
};
/**
 * When rolled over units expire.
 */
declare const CreatePlanVariantDetailsExpiryDurationType: {
    readonly Month: "month";
    readonly Forever: "forever";
};
/**
 * When rolled over units expire.
 */
type CreatePlanVariantDetailsExpiryDurationType = OpenEnum<typeof CreatePlanVariantDetailsExpiryDurationType>;
/**
 * Rollover config for unused units. If set, unused included units carry over.
 */
type CreatePlanVariantDetailsRollover = {
    /**
     * 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: CreatePlanVariantDetailsExpiryDurationType;
    /**
     * Number of periods before expiry.
     */
    expiryDurationLength?: number | undefined;
};
/**
 * Configuration for a feature item in a plan, including usage limits, pricing, and rollover settings.
 */
type CreatePlanPlanItemResponse = {
    /**
     * 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?: CreatePlanVariantDetailsReset | undefined;
    /**
     * Pricing for usage beyond included units. Omit for free features.
     */
    price?: CreatePlanVariantDetailsPrice | undefined;
    /**
     * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
     */
    proration?: CreatePlanProrationResponse | undefined;
    /**
     * Rollover config for unused units. If set, unused included units carry over.
     */
    rollover?: CreatePlanVariantDetailsRollover | undefined;
};
/**
 * Match items with this billing method (prepaid or usage_based).
 */
declare const CreatePlanRemoveItemBillingMethod: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * Match items with this billing method (prepaid or usage_based).
 */
type CreatePlanRemoveItemBillingMethod = OpenEnum<typeof CreatePlanRemoveItemBillingMethod>;
declare const CreatePlanIntervalRemoveItemEnum2: {
    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 CreatePlanIntervalRemoveItemEnum2 = OpenEnum<typeof CreatePlanIntervalRemoveItemEnum2>;
declare const CreatePlanIntervalRemoveItemEnum1: {
    readonly OneOff: "one_off";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
type CreatePlanIntervalRemoveItemEnum1 = OpenEnum<typeof CreatePlanIntervalRemoveItemEnum1>;
/**
 * Filter for matching plan items. All provided fields must match (AND).
 */
type CreatePlanPlanItemFilter = {
    /**
     * Match items linked to this feature.
     */
    featureId?: string | undefined;
    /**
     * Match items with this billing method (prepaid or usage_based).
     */
    billingMethod?: CreatePlanRemoveItemBillingMethod | 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?: CreatePlanIntervalRemoveItemEnum1 | CreatePlanIntervalRemoveItemEnum2 | 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 CreatePlanVariantDetailsDurationType: {
    readonly Day: "day";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Unit of time for the trial ('day', 'month', 'year').
 */
type CreatePlanVariantDetailsDurationType = OpenEnum<typeof CreatePlanVariantDetailsDurationType>;
/**
 * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
 */
declare const CreatePlanVariantDetailsOnEnd: {
    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 CreatePlanVariantDetailsOnEnd = OpenEnum<typeof CreatePlanVariantDetailsOnEnd>;
/**
 * Free trial configuration for a plan.
 */
type CreatePlanFreeTrialParams = {
    /**
     * Number of duration_type periods the trial lasts.
     */
    durationLength: number;
    /**
     * Unit of time for the trial ('day', 'month', 'year').
     */
    durationType: CreatePlanVariantDetailsDurationType;
    /**
     * If true, payment method required to start trial. Customer is charged after trial ends.
     */
    cardRequired: boolean;
    /**
     * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
     */
    onEnd?: CreatePlanVariantDetailsOnEnd | undefined;
};
/**
 * The time interval for the purchase limit window.
 */
declare const CreatePlanVariantDetailsPurchaseLimitInterval: {
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
};
/**
 * The time interval for the purchase limit window.
 */
type CreatePlanVariantDetailsPurchaseLimitInterval = OpenEnum<typeof CreatePlanVariantDetailsPurchaseLimitInterval>;
/**
 * Optional rate limit to cap how often auto top-ups occur.
 */
type CreatePlanVariantDetailsPurchaseLimit = {
    /**
     * The time interval for the purchase limit window.
     */
    interval: CreatePlanVariantDetailsPurchaseLimitInterval;
    /**
     * Number of intervals in the purchase limit window.
     */
    intervalCount: number;
    /**
     * Maximum number of auto top-ups allowed within the interval.
     */
    limit: number;
};
type CreatePlanVariantDetailsAutoTopup = {
    /**
     * 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?: CreatePlanVariantDetailsPurchaseLimit | 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 CreatePlanVariantDetailsLimitType: {
    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 CreatePlanVariantDetailsLimitType = OpenEnum<typeof CreatePlanVariantDetailsLimitType>;
type CreatePlanVariantDetailsSpendLimit = {
    /**
     * 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?: CreatePlanVariantDetailsLimitType | 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 CreatePlanVariantDetailsUsageLimitInterval: {
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
type CreatePlanVariantDetailsUsageLimitInterval = OpenEnum<typeof CreatePlanVariantDetailsUsageLimitInterval>;
/**
 * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
 */
type CreatePlanVariantDetailsFilter = {
    properties: {
        [k: string]: any;
    };
};
type CreatePlanVariantDetailsUsageLimit = {
    /**
     * 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: CreatePlanVariantDetailsUsageLimitInterval;
    /**
     * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
     */
    filter?: CreatePlanVariantDetailsFilter | undefined;
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
declare const CreatePlanVariantDetailsThresholdType: {
    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 CreatePlanVariantDetailsThresholdType = OpenEnum<typeof CreatePlanVariantDetailsThresholdType>;
type CreatePlanVariantDetailsUsageAlert = {
    /**
     * 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: CreatePlanVariantDetailsThresholdType;
    /**
     * Optional user-defined label to distinguish multiple alerts on the same feature.
     */
    name?: string | undefined;
};
type CreatePlanVariantDetailsOverageAllowed = {
    /**
     * The feature ID this overage allowed control applies to.
     */
    featureId: string;
    /**
     * Whether overage is allowed for this feature.
     */
    enabled: boolean;
};
/**
 * Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
 */
type CreatePlanVariantDetailsBillingControls = {
    /**
     * List of auto top-up configurations per feature.
     */
    autoTopups?: Array<CreatePlanVariantDetailsAutoTopup> | undefined;
    /**
     * List of overage spend limits per feature (caps overage spend).
     */
    spendLimits?: Array<CreatePlanVariantDetailsSpendLimit> | undefined;
    /**
     * List of hard usage caps per feature (max units per interval).
     */
    usageLimits?: Array<CreatePlanVariantDetailsUsageLimit> | undefined;
    /**
     * List of usage alert configurations per feature.
     */
    usageAlerts?: Array<CreatePlanVariantDetailsUsageAlert> | undefined;
    /**
     * List of overage allowed controls per feature. When enabled, usage can exceed balance.
     */
    overageAllowed?: Array<CreatePlanVariantDetailsOverageAllowed> | undefined;
};
/**
 * The customization that transforms the base plan into this variant.
 */
type CreatePlanCustomize = {
    /**
     * Override the base price of the plan. Pass null to remove the base price.
     */
    price?: CreatePlanBasePrice | null | undefined;
    /**
     * Items to add to the plan.
     */
    addItems?: Array<CreatePlanPlanItemResponse> | undefined;
    /**
     * Filters selecting items to remove from the plan.
     */
    removeItems?: Array<CreatePlanPlanItemFilter> | undefined;
    /**
     * Override the plan's default free trial. Pass an object to set a custom trial, or null to remove the trial entirely.
     */
    freeTrial?: CreatePlanFreeTrialParams | null | undefined;
    /**
     * Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
     */
    billingControls?: CreatePlanVariantDetailsBillingControls | undefined;
};
/**
 * Details about how this variant relates to its latest base plan.
 */
type CreatePlanVariantDetails = {
    /**
     * The ID of the base plan this variant was derived from.
     */
    basePlanId: string;
    /**
     * The customization that transforms the base plan into this variant.
     */
    customize?: CreatePlanCustomize | undefined;
};
/**
 * Miscellaneous plan-level configuration flags.
 */
type CreatePlanConfigResponse = {
    /**
     * If true, entitlements attached to this plan will still reset on schedule even when the customer's product is in a past_due state.
     */
    ignorePastDue: boolean;
};
/**
 * The time interval for the purchase limit window.
 */
declare const CreatePlanPurchaseLimitIntervalResponse: {
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
};
/**
 * The time interval for the purchase limit window.
 */
type CreatePlanPurchaseLimitIntervalResponse = OpenEnum<typeof CreatePlanPurchaseLimitIntervalResponse>;
/**
 * Optional rate limit to cap how often auto top-ups occur.
 */
type CreatePlanPurchaseLimitResponse = {
    /**
     * The time interval for the purchase limit window.
     */
    interval: CreatePlanPurchaseLimitIntervalResponse;
    /**
     * Number of intervals in the purchase limit window.
     */
    intervalCount: number;
    /**
     * Maximum number of auto top-ups allowed within the interval.
     */
    limit: number;
};
type CreatePlanAutoTopupResponse = {
    /**
     * 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?: CreatePlanPurchaseLimitResponse | 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 CreatePlanLimitTypeResponse: {
    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 CreatePlanLimitTypeResponse = OpenEnum<typeof CreatePlanLimitTypeResponse>;
type CreatePlanSpendLimitResponse = {
    /**
     * 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?: CreatePlanLimitTypeResponse | 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 CreatePlanUsageLimitIntervalResponse: {
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
type CreatePlanUsageLimitIntervalResponse = OpenEnum<typeof CreatePlanUsageLimitIntervalResponse>;
/**
 * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
 */
type CreatePlanFilterResponse = {
    properties: {
        [k: string]: any;
    };
};
type CreatePlanUsageLimitResponse = {
    /**
     * 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: CreatePlanUsageLimitIntervalResponse;
    /**
     * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
     */
    filter?: CreatePlanFilterResponse | undefined;
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
declare const CreatePlanThresholdTypeResponse: {
    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 CreatePlanThresholdTypeResponse = OpenEnum<typeof CreatePlanThresholdTypeResponse>;
type CreatePlanUsageAlertResponse = {
    /**
     * 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: CreatePlanThresholdTypeResponse;
    /**
     * Optional user-defined label to distinguish multiple alerts on the same feature.
     */
    name?: string | undefined;
};
type CreatePlanOverageAllowedResponse = {
    /**
     * 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 CreatePlanBillingControlsResponse = {
    /**
     * List of auto top-up configurations per feature.
     */
    autoTopups?: Array<CreatePlanAutoTopupResponse> | undefined;
    /**
     * List of overage spend limits per feature (caps overage spend).
     */
    spendLimits?: Array<CreatePlanSpendLimitResponse> | undefined;
    /**
     * List of hard usage caps per feature (max units per interval).
     */
    usageLimits?: Array<CreatePlanUsageLimitResponse> | undefined;
    /**
     * List of usage alert configurations per feature.
     */
    usageAlerts?: Array<CreatePlanUsageAlertResponse> | undefined;
    /**
     * List of overage allowed controls per feature. When enabled, usage can exceed balance.
     */
    overageAllowed?: Array<CreatePlanOverageAllowedResponse> | undefined;
};
/**
 * The customer's current status with this plan. 'active' if attached, 'scheduled' if pending activation.
 */
declare const CreatePlanStatus: {
    readonly Active: "active";
    readonly Scheduled: "scheduled";
};
/**
 * The customer's current status with this plan. 'active' if attached, 'scheduled' if pending activation.
 */
type CreatePlanStatus = OpenEnum<typeof CreatePlanStatus>;
/**
 * The action that would occur if this plan were attached to the customer.
 */
declare const CreatePlanAttachAction: {
    readonly Activate: "activate";
    readonly Upgrade: "upgrade";
    readonly Downgrade: "downgrade";
    readonly None: "none";
    readonly Purchase: "purchase";
};
/**
 * The action that would occur if this plan were attached to the customer.
 */
type CreatePlanAttachAction = OpenEnum<typeof CreatePlanAttachAction>;
type CreatePlanCustomerEligibility = {
    /**
     * Whether the trial on this plan is available to this customer. For example, if the customer used the trial in the past, this will be false.
     */
    trialAvailable?: boolean | undefined;
    /**
     * The customer's current status with this plan. 'active' if attached, 'scheduled' if pending activation.
     */
    status?: CreatePlanStatus | undefined;
    /**
     * Whether the customer's active instance of this plan is set to cancel.
     */
    canceling?: boolean | undefined;
    /**
     * Whether the customer is currently on a free trial of this plan.
     */
    trialing?: boolean | undefined;
    /**
     * The action that would occur if this plan were attached to the customer.
     */
    attachAction: CreatePlanAttachAction;
};
/**
 * A plan defines a set of features, pricing, and entitlements that can be attached to customers.
 */
type CreatePlanResponse = {
    /**
     * Unique identifier for the plan.
     */
    id: string;
    /**
     * Display name of the plan.
     */
    name: string;
    /**
     * Optional description of the plan.
     */
    description: string | null;
    /**
     * Group identifier for organizing related plans. Plans in the same group are mutually exclusive.
     */
    group: string | null;
    /**
     * Version number of the plan. Incremented when plan configuration changes.
     */
    version: number;
    /**
     * Whether this is an add-on plan that can be attached alongside a main plan.
     */
    addOn: boolean;
    /**
     * If true, this plan is automatically attached when a customer is created. Used for free plans.
     */
    autoEnable: boolean;
    /**
     * Base recurring price for the plan. Null for free plans or usage-only plans.
     */
    price: CreatePlanPriceResponse | null;
    /**
     * Feature configurations included in this plan. Each item defines included units, pricing, and reset behavior for a feature.
     */
    items: Array<CreatePlanItem>;
    /**
     * Free trial configuration. If set, new customers can try this plan before being charged.
     */
    freeTrial?: CreatePlanFreeTrialResponse | undefined;
    /**
     * Unix timestamp (ms) when the plan was created.
     */
    createdAt: number;
    /**
     * Environment this plan belongs to ('sandbox' or 'live').
     */
    env: CreatePlanEnv;
    /**
     * Whether the plan is archived. Archived plans cannot be attached to new customers.
     */
    archived: boolean;
    /**
     * Deprecated. Use variant_details.base_plan_id instead. If this is a variant, the ID of the base plan it was created from.
     */
    baseVariantId: string | null;
    /**
     * Details about how this variant relates to its latest base plan.
     */
    variantDetails?: CreatePlanVariantDetails | undefined;
    /**
     * Miscellaneous plan-level configuration flags.
     */
    config: CreatePlanConfigResponse;
    /**
     * Plan-level billing controls used as customer defaults.
     */
    billingControls?: CreatePlanBillingControlsResponse | undefined;
    /**
     * Arbitrary key-value metadata defined by you for your own use. Shared across all versions of the plan.
     */
    metadata: {
        [k: string]: any;
    };
    customerEligibility?: CreatePlanCustomerEligibility | 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;
};

/**
 * Invoice mode creates and sends an invoice instead of charging the customer's payment method immediately for the first phase.
 */
type CreateScheduleInvoiceMode = {
    /**
     * 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 CreateScheduleAttachDiscount = {
    /**
     * 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 for the immediate phase. 'always' forces a confirmation or checkout flow, 'if_required' only redirects when needed, and 'never' disables redirects.
 */
declare const CreateScheduleRedirectMode: {
    readonly Always: "always";
    readonly IfRequired: "if_required";
    readonly Never: "never";
};
/**
 * Controls when to return a checkout URL for the immediate phase. 'always' forces a confirmation or checkout flow, 'if_required' only redirects when needed, and 'never' disables redirects.
 */
type CreateScheduleRedirectMode = ClosedEnum<typeof CreateScheduleRedirectMode>;
/**
 * Whether to prorate the immediate phase. 'none' skips proration charges and credits.
 */
declare const CreateScheduleBillingBehavior: {
    readonly ProrateImmediately: "prorate_immediately";
    readonly None: "none";
};
/**
 * Whether to prorate the immediate phase. 'none' skips proration charges and credits.
 */
type CreateScheduleBillingBehavior = ClosedEnum<typeof CreateScheduleBillingBehavior>;
/**
 * The duration unit to offset this phase from the prior phase.
 */
declare const CreateScheduleDurationType2: {
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * The duration unit to offset this phase from the prior phase.
 */
type CreateScheduleDurationType2 = ClosedEnum<typeof CreateScheduleDurationType2>;
/**
 * Relative start offset from the previous resolved schedule phase.
 */
type StartingAfter2 = {
    /**
     * The duration unit to offset this phase from the prior phase.
     */
    durationType: CreateScheduleDurationType2;
    /**
     * How many duration_type periods after the prior phase to start.
     */
    durationCount: number;
};
/**
 * Quantity configuration for a prepaid feature.
 */
type CreateScheduleFeatureQuantity2 = {
    /**
     * 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 CreateSchedulePriceInterval2: {
    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 CreateSchedulePriceInterval2 = ClosedEnum<typeof CreateSchedulePriceInterval2>;
/**
 * Base price configuration for a plan.
 */
type CreateScheduleBasePrice2 = {
    /**
     * Base price amount for the plan.
     */
    amount: number;
    /**
     * Billing interval (e.g. 'month', 'year').
     */
    interval: CreateSchedulePriceInterval2;
    /**
     * 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 CreateScheduleItemResetInterval2: {
    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 CreateScheduleItemResetInterval2 = ClosedEnum<typeof CreateScheduleItemResetInterval2>;
/**
 * Reset configuration for consumable features. Omit for non-consumable features like seats.
 */
type CreateScheduleItemReset2 = {
    /**
     * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
     */
    interval: CreateScheduleItemResetInterval2;
    /**
     * Number of intervals between resets. Defaults to 1.
     */
    intervalCount?: number | undefined;
};
type CreateScheduleItemTier2 = {
    to?: any | undefined;
    amount?: any | undefined;
    flatAmount?: any | undefined;
};
declare const CreateScheduleItemTierBehavior2: {
    readonly Graduated: "graduated";
    readonly Volume: "volume";
};
type CreateScheduleItemTierBehavior2 = ClosedEnum<typeof CreateScheduleItemTierBehavior2>;
/**
 * Billing interval. For consumable features, should match reset.interval.
 */
declare const CreateScheduleItemPriceInterval2: {
    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 CreateScheduleItemPriceInterval2 = ClosedEnum<typeof CreateScheduleItemPriceInterval2>;
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
declare const CreateScheduleItemBillingMethod2: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
type CreateScheduleItemBillingMethod2 = ClosedEnum<typeof CreateScheduleItemBillingMethod2>;
/**
 * Pricing for usage beyond included units. Omit for free features.
 */
type CreateScheduleItemPrice2 = {
    /**
     * 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<CreateScheduleItemTier2> | undefined;
    tierBehavior?: CreateScheduleItemTierBehavior2 | undefined;
    /**
     * Billing interval. For consumable features, should match reset.interval.
     */
    interval: CreateScheduleItemPriceInterval2;
    /**
     * 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: CreateScheduleItemBillingMethod2;
    /**
     * 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 CreateScheduleItemOnIncrease2: {
    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 CreateScheduleItemOnIncrease2 = ClosedEnum<typeof CreateScheduleItemOnIncrease2>;
/**
 * Credit behavior when quantity decreases mid-cycle.
 */
declare const CreateScheduleItemOnDecrease2: {
    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 CreateScheduleItemOnDecrease2 = ClosedEnum<typeof CreateScheduleItemOnDecrease2>;
/**
 * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
 */
type CreateScheduleItemProration2 = {
    /**
     * Billing behavior when quantity increases mid-cycle.
     */
    onIncrease: CreateScheduleItemOnIncrease2;
    /**
     * Credit behavior when quantity decreases mid-cycle.
     */
    onDecrease: CreateScheduleItemOnDecrease2;
};
/**
 * When rolled over units expire.
 */
declare const CreateScheduleItemExpiryDurationType2: {
    readonly Month: "month";
    readonly Forever: "forever";
};
/**
 * When rolled over units expire.
 */
type CreateScheduleItemExpiryDurationType2 = ClosedEnum<typeof CreateScheduleItemExpiryDurationType2>;
/**
 * Rollover config for unused units. If set, unused included units carry over.
 */
type CreateScheduleItemRollover2 = {
    /**
     * 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: CreateScheduleItemExpiryDurationType2;
    /**
     * Number of periods before expiry.
     */
    expiryDurationLength?: number | undefined;
};
/**
 * Configuration for a feature item in a plan, including usage limits, pricing, and rollover settings.
 */
type CreateScheduleItemPlanItem2 = {
    /**
     * 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?: CreateScheduleItemReset2 | undefined;
    /**
     * Pricing for usage beyond included units. Omit for free features.
     */
    price?: CreateScheduleItemPrice2 | undefined;
    /**
     * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
     */
    proration?: CreateScheduleItemProration2 | undefined;
    /**
     * Rollover config for unused units. If set, unused included units carry over.
     */
    rollover?: CreateScheduleItemRollover2 | undefined;
};
/**
 * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
 */
declare const CreateScheduleAddItemResetInterval2: {
    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 CreateScheduleAddItemResetInterval2 = ClosedEnum<typeof CreateScheduleAddItemResetInterval2>;
/**
 * Reset configuration for consumable features. Omit for non-consumable features like seats.
 */
type CreateScheduleAddItemReset2 = {
    /**
     * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
     */
    interval: CreateScheduleAddItemResetInterval2;
    /**
     * Number of intervals between resets. Defaults to 1.
     */
    intervalCount?: number | undefined;
};
type CreateScheduleAddItemTier2 = {
    to?: any | undefined;
    amount?: any | undefined;
    flatAmount?: any | undefined;
};
declare const CreateScheduleAddItemTierBehavior2: {
    readonly Graduated: "graduated";
    readonly Volume: "volume";
};
type CreateScheduleAddItemTierBehavior2 = ClosedEnum<typeof CreateScheduleAddItemTierBehavior2>;
/**
 * Billing interval. For consumable features, should match reset.interval.
 */
declare const CreateScheduleAddItemPriceInterval2: {
    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 CreateScheduleAddItemPriceInterval2 = ClosedEnum<typeof CreateScheduleAddItemPriceInterval2>;
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
declare const CreateScheduleAddItemBillingMethod2: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
type CreateScheduleAddItemBillingMethod2 = ClosedEnum<typeof CreateScheduleAddItemBillingMethod2>;
/**
 * Pricing for usage beyond included units. Omit for free features.
 */
type CreateScheduleAddItemPrice2 = {
    /**
     * 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<CreateScheduleAddItemTier2> | undefined;
    tierBehavior?: CreateScheduleAddItemTierBehavior2 | undefined;
    /**
     * Billing interval. For consumable features, should match reset.interval.
     */
    interval: CreateScheduleAddItemPriceInterval2;
    /**
     * 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: CreateScheduleAddItemBillingMethod2;
    /**
     * 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 CreateScheduleAddItemOnIncrease2: {
    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 CreateScheduleAddItemOnIncrease2 = ClosedEnum<typeof CreateScheduleAddItemOnIncrease2>;
/**
 * Credit behavior when quantity decreases mid-cycle.
 */
declare const CreateScheduleAddItemOnDecrease2: {
    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 CreateScheduleAddItemOnDecrease2 = ClosedEnum<typeof CreateScheduleAddItemOnDecrease2>;
/**
 * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
 */
type CreateScheduleAddItemProration2 = {
    /**
     * Billing behavior when quantity increases mid-cycle.
     */
    onIncrease: CreateScheduleAddItemOnIncrease2;
    /**
     * Credit behavior when quantity decreases mid-cycle.
     */
    onDecrease: CreateScheduleAddItemOnDecrease2;
};
/**
 * When rolled over units expire.
 */
declare const CreateScheduleAddItemExpiryDurationType2: {
    readonly Month: "month";
    readonly Forever: "forever";
};
/**
 * When rolled over units expire.
 */
type CreateScheduleAddItemExpiryDurationType2 = ClosedEnum<typeof CreateScheduleAddItemExpiryDurationType2>;
/**
 * Rollover config for unused units. If set, unused included units carry over.
 */
type CreateScheduleAddItemRollover2 = {
    /**
     * 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: CreateScheduleAddItemExpiryDurationType2;
    /**
     * Number of periods before expiry.
     */
    expiryDurationLength?: number | undefined;
};
/**
 * Configuration for a feature item in a plan, including usage limits, pricing, and rollover settings.
 */
type CreateScheduleAddItemPlanItem2 = {
    /**
     * 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?: CreateScheduleAddItemReset2 | undefined;
    /**
     * Pricing for usage beyond included units. Omit for free features.
     */
    price?: CreateScheduleAddItemPrice2 | undefined;
    /**
     * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
     */
    proration?: CreateScheduleAddItemProration2 | undefined;
    /**
     * Rollover config for unused units. If set, unused included units carry over.
     */
    rollover?: CreateScheduleAddItemRollover2 | undefined;
};
/**
 * Match items with this billing method (prepaid or usage_based).
 */
declare const CreateScheduleRemoveItemBillingMethod2: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * Match items with this billing method (prepaid or usage_based).
 */
type CreateScheduleRemoveItemBillingMethod2 = ClosedEnum<typeof CreateScheduleRemoveItemBillingMethod2>;
declare const CreateScheduleIntervalRemoveItemEnum4: {
    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 CreateScheduleIntervalRemoveItemEnum4 = ClosedEnum<typeof CreateScheduleIntervalRemoveItemEnum4>;
declare const CreateScheduleIntervalRemoveItemEnum3: {
    readonly OneOff: "one_off";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
type CreateScheduleIntervalRemoveItemEnum3 = ClosedEnum<typeof CreateScheduleIntervalRemoveItemEnum3>;
/**
 * Filter for matching plan items. All provided fields must match (AND).
 */
type CreateSchedulePlanItemFilter2 = {
    /**
     * Match items linked to this feature.
     */
    featureId?: string | undefined;
    /**
     * Match items with this billing method (prepaid or usage_based).
     */
    billingMethod?: CreateScheduleRemoveItemBillingMethod2 | 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?: CreateScheduleIntervalRemoveItemEnum3 | CreateScheduleIntervalRemoveItemEnum4 | undefined;
    /**
     * Match items with this interval_count. Disambiguates between items that share an interval but differ in count.
     */
    intervalCount?: number | undefined;
};
/**
 * The time interval for the purchase limit window.
 */
declare const CreateSchedulePurchaseLimitInterval2: {
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
};
/**
 * The time interval for the purchase limit window.
 */
type CreateSchedulePurchaseLimitInterval2 = ClosedEnum<typeof CreateSchedulePurchaseLimitInterval2>;
/**
 * Optional rate limit to cap how often auto top-ups occur.
 */
type CreateSchedulePurchaseLimit2 = {
    /**
     * The time interval for the purchase limit window.
     */
    interval: CreateSchedulePurchaseLimitInterval2;
    /**
     * Number of intervals in the purchase limit window.
     */
    intervalCount?: number | undefined;
    /**
     * Maximum number of auto top-ups allowed within the interval.
     */
    limit: number;
};
type CreateScheduleAutoTopup2 = {
    /**
     * 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?: CreateSchedulePurchaseLimit2 | 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 CreateScheduleLimitType2: {
    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 CreateScheduleLimitType2 = ClosedEnum<typeof CreateScheduleLimitType2>;
type CreateScheduleSpendLimit2 = {
    /**
     * 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?: CreateScheduleLimitType2 | 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 CreateScheduleUsageLimitInterval2: {
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
type CreateScheduleUsageLimitInterval2 = ClosedEnum<typeof CreateScheduleUsageLimitInterval2>;
/**
 * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
 */
type CreateScheduleFilter2 = {
    properties: {
        [k: string]: any;
    };
};
type CreateScheduleUsageLimit2 = {
    /**
     * 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: CreateScheduleUsageLimitInterval2;
    /**
     * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
     */
    filter?: CreateScheduleFilter2 | undefined;
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
declare const CreateScheduleThresholdType2: {
    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 CreateScheduleThresholdType2 = ClosedEnum<typeof CreateScheduleThresholdType2>;
type CreateScheduleUsageAlert2 = {
    /**
     * 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: CreateScheduleThresholdType2;
    /**
     * Optional user-defined label to distinguish multiple alerts on the same feature.
     */
    name?: string | undefined;
};
type CreateScheduleOverageAllowed2 = {
    /**
     * 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 CreateScheduleBillingControls2 = {
    /**
     * List of auto top-up configurations per feature.
     */
    autoTopups?: Array<CreateScheduleAutoTopup2> | undefined;
    /**
     * List of overage spend limits per feature (caps overage spend).
     */
    spendLimits?: Array<CreateScheduleSpendLimit2> | undefined;
    /**
     * List of hard usage caps per feature (max units per interval).
     */
    usageLimits?: Array<CreateScheduleUsageLimit2> | undefined;
    /**
     * List of usage alert configurations per feature.
     */
    usageAlerts?: Array<CreateScheduleUsageAlert2> | undefined;
    /**
     * List of overage allowed controls per feature. When enabled, usage can exceed balance.
     */
    overageAllowed?: Array<CreateScheduleOverageAllowed2> | undefined;
};
/**
 * Customize the plan to schedule. Can override price, replace items, or patch items with add_items and remove_items.
 */
type CreateScheduleCustomize2 = {
    /**
     * Override the base price of the plan. Pass null to remove the base price.
     */
    price?: CreateScheduleBasePrice2 | 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<CreateScheduleItemPlanItem2> | undefined;
    /**
     * Items to add to the plan.
     */
    addItems?: Array<CreateScheduleAddItemPlanItem2> | undefined;
    /**
     * Filters selecting items to remove from the plan.
     */
    removeItems?: Array<CreateSchedulePlanItemFilter2> | undefined;
    /**
     * Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
     */
    billingControls?: CreateScheduleBillingControls2 | undefined;
};
type CreateSchedulePlan2 = {
    /**
     * The ID of the plan to schedule in this phase.
     */
    planId: string;
    /**
     * Optional prepaid feature quantities for this phase's plan.
     */
    featureQuantities?: Array<CreateScheduleFeatureQuantity2> | undefined;
    /**
     * Optional explicit plan version to schedule.
     */
    version?: number | undefined;
    /**
     * Customize the plan to schedule. Can override price, replace items, or patch items with add_items and remove_items.
     */
    customize?: CreateScheduleCustomize2 | undefined;
    /**
     * A unique ID to identify this subscription. Useful when scheduling the same plan multiple times.
     */
    subscriptionId?: string | undefined;
};
/**
 * Pass 'phase_start' to reset the Stripe billing cycle anchor when this phase starts.
 */
declare const BillingCycleAnchor2: {
    readonly PhaseStart: "phase_start";
};
/**
 * Pass 'phase_start' to reset the Stripe billing cycle anchor when this phase starts.
 */
type BillingCycleAnchor2 = ClosedEnum<typeof BillingCycleAnchor2>;
type PhaseStart = {
    /**
     * When this phase should start, in epoch milliseconds, or 'now' for the immediate phase.
     */
    startsAt?: number | string | undefined;
    /**
     * Relative start offset from the previous resolved schedule phase.
     */
    startingAfter?: StartingAfter2 | undefined;
    /**
     * Plans to materialize for this phase.
     */
    plans: Array<CreateSchedulePlan2>;
    /**
     * Pass 'phase_start' to reset the Stripe billing cycle anchor when this phase starts.
     */
    billingCycleAnchor?: BillingCycleAnchor2 | undefined;
};
type CreateScheduleParams = {
    /**
     * The ID of the customer to create the schedule for.
     */
    customerId: string;
    /**
     * Optional entity ID for an entity-scoped schedule.
     */
    entityId?: string | undefined;
    /**
     * Invoice mode creates and sends an invoice instead of charging the customer's payment method immediately for the first phase.
     */
    invoiceMode?: CreateScheduleInvoiceMode | undefined;
    /**
     * List of discounts to apply to the immediate phase. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code.
     */
    discounts?: Array<CreateScheduleAttachDiscount> | 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 for the immediate phase. 'always' forces a confirmation or checkout flow, 'if_required' only redirects when needed, and 'never' disables redirects.
     */
    redirectMode?: CreateScheduleRedirectMode | undefined;
    /**
     * Whether to prorate the immediate phase. 'none' skips proration charges and credits.
     */
    billingBehavior?: CreateScheduleBillingBehavior | undefined;
    /**
     * Pass 'now' to reset the billing cycle anchor of the immediate phase to the current time.
     */
    billingCycleAnchor?: "now" | undefined;
    /**
     * If true, the immediate-phase cusProducts are activated immediately (and scheduled-phase cusProducts pre-inserted) even when payment is pending via Stripe checkout. The Autumn schedule rows are persisted on checkout.session.completed.
     */
    enablePlanImmediately?: boolean | undefined;
    /**
     * Ordered phase definitions for the schedule.
     */
    phases: Array<PhaseStart>;
};
/**
 * Whether the schedule is fully created or waiting for payment or confirmation to complete.
 */
declare const CreateScheduleStatus: {
    readonly Created: "created";
    readonly PendingPayment: "pending_payment";
};
/**
 * Whether the schedule is fully created or waiting for payment or confirmation to complete.
 */
type CreateScheduleStatus = OpenEnum<typeof CreateScheduleStatus>;
type PhaseResponse = {
    /**
     * The ID of the persisted phase row.
     */
    phaseId: string;
    /**
     * When this phase starts, in epoch milliseconds.
     */
    startsAt: number;
    /**
     * Customer products materialized for this phase.
     */
    customerProductIds: Array<string>;
};
/**
 * Invoice details if an invoice was created. Only present when a charge was made.
 */
type CreateScheduleInvoice = {
    /**
     * 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 CreateScheduleCode: {
    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 CreateScheduleCode = OpenEnum<typeof CreateScheduleCode>;
type CreateScheduleRequiredAction = {
    /**
     * The type of action required to complete the payment.
     */
    code: CreateScheduleCode;
    /**
     * A human-readable explanation of why this action is required.
     */
    reason: string;
};
/**
 * OK
 */
type CreateScheduleResponse = {
    /**
     * The ID of the customer.
     */
    customerId: string;
    /**
     * The entity ID for the schedule, or null when customer-level.
     */
    entityId: string | null;
    /**
     * Whether the schedule is fully created or waiting for payment or confirmation to complete.
     */
    status: CreateScheduleStatus;
    /**
     * The ID of the created schedule. Null when the schedule is waiting on Autumn checkout confirmation.
     */
    scheduleId: string | null;
    /**
     * Persisted phases in ascending starts_at order. Empty when waiting on Autumn checkout confirmation.
     */
    phases: Array<PhaseResponse>;
    /**
     * Invoice details if an invoice was created. Only present when a charge was made.
     */
    invoice?: CreateScheduleInvoice | undefined;
    /**
     * URL to redirect the customer to complete payment. Null if no payment action is required.
     */
    paymentUrl: string | null;
    requiredAction?: CreateScheduleRequiredAction | undefined;
};

/**
 * The environment this customer was created in.
 */
declare const CustomerEnv: {
    readonly Sandbox: "sandbox";
    readonly Live: "live";
};
/**
 * The environment this customer was created in.
 */
type CustomerEnv = OpenEnum<typeof CustomerEnv>;
/**
 * The time interval for the purchase limit window.
 */
declare const CustomerPurchaseLimitInterval2: {
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
};
/**
 * The time interval for the purchase limit window.
 */
type CustomerPurchaseLimitInterval2 = OpenEnum<typeof CustomerPurchaseLimitInterval2>;
type CustomerPurchaseLimit2 = {
    /**
     * The time interval for the purchase limit window.
     */
    interval: CustomerPurchaseLimitInterval2;
    /**
     * Number of intervals in the purchase limit window.
     */
    intervalCount: number;
    /**
     * Maximum number of auto top-ups allowed within the interval.
     */
    limit: number;
};
declare const CustomerPurchaseLimitInterval1: {
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
};
type CustomerPurchaseLimitInterval1 = OpenEnum<typeof CustomerPurchaseLimitInterval1>;
type CustomerPurchaseLimit1 = {
    /**
     * The time interval for the purchase limit window. Null when no purchase limit is configured.
     */
    interval: CustomerPurchaseLimitInterval1 | null;
    /**
     * Number of intervals in the purchase limit window. Null when no purchase limit is configured.
     */
    intervalCount: number | null;
    /**
     * Maximum number of auto top-ups allowed within the interval. Null when no purchase limit is configured.
     */
    limit: number | null;
    /**
     * Number of auto top-ups already consumed in the current window.
     */
    count: number;
    /**
     * Unix ms timestamp when the current purchase window ends and the count resets.
     */
    nextResetAt: number;
};
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
declare const AutoTopupSource: {
    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 AutoTopupSource = OpenEnum<typeof AutoTopupSource>;
type CustomerAutoTopup = {
    /**
     * 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. Expand billing_controls.auto_topups.purchase_limit for a count of top ups and the next_reset_at.
     */
    purchaseLimit?: CustomerPurchaseLimit1 | CustomerPurchaseLimit2 | undefined;
    /**
     * When true, auto top-up creates a send_invoice invoice instead of auto-charging.
     */
    invoiceMode?: boolean | undefined;
    /**
     * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
     */
    source?: AutoTopupSource | undefined;
};
/**
 * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
 */
declare const CustomerLimitType: {
    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 CustomerLimitType = OpenEnum<typeof CustomerLimitType>;
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
declare const SpendLimitSource: {
    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 SpendLimitSource = OpenEnum<typeof SpendLimitSource>;
type CustomerSpendLimit = {
    /**
     * 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?: CustomerLimitType | 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?: SpendLimitSource | undefined;
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
declare const CustomerUsageLimitInterval: {
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
type CustomerUsageLimitInterval = OpenEnum<typeof CustomerUsageLimitInterval>;
/**
 * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
 */
type CustomerFilter = {
    properties: {
        [k: string]: any;
    };
};
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
declare const UsageLimitSource: {
    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 UsageLimitSource = OpenEnum<typeof UsageLimitSource>;
type CustomerUsageLimit = {
    /**
     * 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: CustomerUsageLimitInterval;
    /**
     * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
     */
    filter?: CustomerFilter | 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?: UsageLimitSource | undefined;
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
declare const CustomerThresholdType: {
    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 CustomerThresholdType = OpenEnum<typeof CustomerThresholdType>;
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
declare const UsageAlertSource: {
    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 UsageAlertSource = OpenEnum<typeof UsageAlertSource>;
type CustomerUsageAlert = {
    /**
     * 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: CustomerThresholdType;
    /**
     * 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?: UsageAlertSource | undefined;
};
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
declare const OverageAllowedSource: {
    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 OverageAllowedSource = OpenEnum<typeof OverageAllowedSource>;
type CustomerOverageAllowed = {
    /**
     * 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?: OverageAllowedSource | undefined;
};
/**
 * Billing controls for the customer (auto top-ups, etc.)
 */
type CustomerBillingControls = {
    /**
     * List of auto top-up configurations per feature.
     */
    autoTopups?: Array<CustomerAutoTopup> | undefined;
    /**
     * List of overage spend limits per feature (caps overage spend).
     */
    spendLimits?: Array<CustomerSpendLimit> | undefined;
    /**
     * List of hard usage caps per feature, with current interval usage.
     */
    usageLimits?: Array<CustomerUsageLimit> | undefined;
    /**
     * List of usage alert configurations per feature.
     */
    usageAlerts?: Array<CustomerUsageAlert> | undefined;
    /**
     * List of overage allowed controls per feature. When enabled, usage can exceed balance.
     */
    overageAllowed?: Array<CustomerOverageAllowed> | undefined;
};
/**
 * Current status of the subscription.
 */
declare const CustomerStatus: {
    readonly Active: "active";
    readonly Scheduled: "scheduled";
};
/**
 * Current status of the subscription.
 */
type CustomerStatus = OpenEnum<typeof CustomerStatus>;
/**
 * Whether this subscription is attached at the customer level or entity level.
 */
declare const SubscriptionScope: {
    readonly Customer: "customer";
    readonly Entity: "entity";
};
/**
 * Whether this subscription is attached at the customer level or entity level.
 */
type SubscriptionScope = OpenEnum<typeof SubscriptionScope>;
type Subscription = {
    /**
     * 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: CustomerStatus;
    /**
     * 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?: SubscriptionScope | undefined;
};
/**
 * Whether this purchase is attached at the customer level or entity level.
 */
declare const PurchaseScope: {
    readonly Customer: "customer";
    readonly Entity: "entity";
};
/**
 * Whether this purchase is attached at the customer level or entity level.
 */
type PurchaseScope = OpenEnum<typeof PurchaseScope>;
type Purchase = {
    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?: PurchaseScope | 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 CustomerFlagsType: {
    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 CustomerFlagsType = OpenEnum<typeof CustomerFlagsType>;
type CustomerCreditSchema = {
    /**
     * ID of the metered feature that draws from this credit system.
     */
    meteredFeatureId: string;
    /**
     * Credits consumed per unit of the metered feature.
     */
    creditCost: number;
};
type CustomerModelMarkups = {
    markup?: number | undefined;
    inputCost?: number | undefined;
    outputCost?: number | undefined;
};
type CustomerProviderMarkups = {
    markup: number;
};
/**
 * Display names for the feature in billing UI and customer-facing components.
 */
type CustomerDisplay = {
    /**
     * 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 CustomerFeature = {
    /**
     * 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: CustomerFlagsType;
    /**
     * 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<CustomerCreditSchema> | undefined;
    /**
     * Per-model markup overrides for AI credit systems.
     */
    modelMarkups?: {
        [k: string]: CustomerModelMarkups;
    } | 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]: CustomerProviderMarkups;
    } | null | undefined;
    /**
     * Display names for the feature in billing UI and customer-facing components.
     */
    display?: CustomerDisplay | undefined;
    /**
     * Whether the feature is archived and hidden from the dashboard.
     */
    archived: boolean;
};
type Flags = {
    /**
     * 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?: CustomerFeature | undefined;
};
/**
 * Configuration for the customer.
 */
type CustomerConfig = {
    /**
     * 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;
};
/**
 * Stripe processor connection for the customer.
 */
type Stripe = {
    /**
     * Stripe customer ID.
     */
    id: string;
};
/**
 * Vercel processor connection for the customer (public-safe subset).
 */
type Vercel = {
    /**
     * Vercel marketplace installation ID for this customer.
     */
    installationId: string;
    /**
     * Vercel account ID associated with the installation.
     */
    accountId: string;
};
/**
 * RevenueCat processor connection for the customer.
 */
type Revenuecat = {
    /**
     * Customer's external ID, used as the RevenueCat app user ID. Null if the customer has no external ID set.
     */
    id: string | null;
};
/**
 * Payment processors this customer is connected to (Stripe, Vercel, RevenueCat). Omitted entirely when the customer has not been created in any processor.
 */
type Processors = {
    /**
     * Stripe processor connection for the customer.
     */
    stripe?: Stripe | undefined;
    /**
     * Vercel processor connection for the customer (public-safe subset).
     */
    vercel?: Vercel | undefined;
    /**
     * RevenueCat processor connection for the customer.
     */
    revenuecat?: Revenuecat | undefined;
};
/**
 * The billing processor that owns this invoice.
 */
declare const ProcessorType: {
    readonly Stripe: "stripe";
    readonly Revenuecat: "revenuecat";
};
/**
 * The billing processor that owns this invoice.
 */
type ProcessorType = OpenEnum<typeof ProcessorType>;
type Invoice = {
    /**
     * 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: ProcessorType;
    /**
     * 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;
};
/**
 * The environment (sandbox/live)
 */
declare const CustomerEntityEnv: {
    readonly Sandbox: "sandbox";
    readonly Live: "live";
};
/**
 * The environment (sandbox/live)
 */
type CustomerEntityEnv = OpenEnum<typeof CustomerEntityEnv>;
type Entity = {
    /**
     * 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: CustomerEntityEnv;
};
type TrialsUsed = {
    planId: string;
    customerId: string;
    fingerprint?: string | null | undefined;
};
/**
 * The type of reward
 */
declare const CustomerDiscountType: {
    readonly PercentageDiscount: "percentage_discount";
    readonly FixedDiscount: "fixed_discount";
    readonly FreeProduct: "free_product";
    readonly InvoiceCredits: "invoice_credits";
    readonly FeatureGrant: "feature_grant";
};
/**
 * The type of reward
 */
type CustomerDiscountType = OpenEnum<typeof CustomerDiscountType>;
/**
 * How long the discount lasts
 */
declare const CustomerDurationType: {
    readonly OneOff: "one_off";
    readonly Months: "months";
    readonly Forever: "forever";
};
/**
 * How long the discount lasts
 */
type CustomerDurationType = OpenEnum<typeof CustomerDurationType>;
type Discount = {
    /**
     * The unique identifier for this discount
     */
    id: string;
    /**
     * The name of the discount or coupon
     */
    name: string;
    /**
     * The type of reward
     */
    type: CustomerDiscountType;
    /**
     * The discount value (percentage or fixed amount)
     */
    discountValue: number;
    /**
     * How long the discount lasts
     */
    durationType: CustomerDurationType;
    /**
     * Number of billing periods the discount applies for repeating durations
     */
    durationValue?: number | null | undefined;
    /**
     * The currency code for fixed amount discounts
     */
    currency?: string | null | undefined;
    /**
     * Timestamp when the discount becomes active
     */
    start?: number | null | undefined;
    /**
     * Timestamp when the discount expires
     */
    end?: number | null | undefined;
    /**
     * The Stripe subscription ID this discount is applied to
     */
    subscriptionId?: string | null | undefined;
    /**
     * Total amount saved from this discount
     */
    totalDiscountAmount?: number | null | undefined;
};
type Rewards$1 = {
    /**
     * Array of active discounts applied to the customer
     */
    discounts: Array<Discount>;
};
type ReferralCustomer = {
    id: string;
    name?: string | null | undefined;
    email?: string | null | undefined;
};
type Referral = {
    programId: string;
    customer: ReferralCustomer;
    rewardApplied: boolean;
    createdAt: number;
};
type Customer = {
    /**
     * Your unique identifier for the customer.
     */
    id: string | null;
    /**
     * The name of the customer.
     */
    name: string | null;
    /**
     * The email address of the customer.
     */
    email: string | null;
    /**
     * Timestamp of customer creation in milliseconds since epoch.
     */
    createdAt: number;
    /**
     * A unique identifier (eg. serial number) to de-duplicate customers across devices or browsers. For example: apple device ID.
     */
    fingerprint: string | null;
    /**
     * Stripe customer ID.
     */
    stripeId: string | null;
    /**
     * The environment this customer was created in.
     */
    env: CustomerEnv;
    /**
     * The metadata for the customer.
     */
    metadata: {
        [k: string]: any;
    };
    /**
     * Whether to send email receipts to the customer.
     */
    sendEmailReceipts: boolean;
    /**
     * Billing controls for the customer (auto top-ups, etc.)
     */
    billingControls: CustomerBillingControls;
    /**
     * Active and scheduled recurring plans that this customer has attached.
     */
    subscriptions: Array<Subscription>;
    /**
     * One-time purchases made by the customer.
     */
    purchases: Array<Purchase>;
    /**
     * Feature balances keyed by feature ID, showing usage limits and remaining amounts.
     */
    balances: {
        [k: string]: Balance;
    };
    /**
     * Boolean feature flags keyed by feature ID, showing enabled access for on/off features.
     */
    flags: {
        [k: string]: Flags;
    };
    /**
     * Configuration for the customer.
     */
    config?: CustomerConfig | undefined;
    /**
     * Payment processors this customer is connected to (Stripe, Vercel, RevenueCat). Omitted entirely when the customer has not been created in any processor.
     */
    processors?: Processors | undefined;
    /**
     * Invoices for this customer.
     */
    invoices?: Array<Invoice> | undefined;
    /**
     * Entities associated with this customer.
     */
    entities?: Array<Entity> | undefined;
    /**
     * Trial usage history for this customer.
     */
    trialsUsed?: Array<TrialsUsed> | undefined;
    /**
     * Rewards earned or applied for this customer.
     */
    rewards?: Rewards$1 | null | undefined;
    /**
     * Referral records for this customer.
     */
    referrals?: Array<Referral> | undefined;
    /**
     * The customer's default payment method.
     */
    paymentMethod?: any | null | undefined;
};

/**
 * Target a specific balance by its reset interval. Use when the customer has multiple balances for the same feature with different reset intervals.
 */
declare const DeleteBalanceInterval: {
    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";
};
/**
 * Target a specific balance by its reset interval. Use when the customer has multiple balances for the same feature with different reset intervals.
 */
type DeleteBalanceInterval = ClosedEnum<typeof DeleteBalanceInterval>;
type DeleteBalanceParams = {
    /**
     * The ID of the customer.
     */
    customerId: string;
    /**
     * The ID of the entity.
     */
    entityId?: string | undefined;
    /**
     * The ID of the feature.
     */
    featureId?: string | undefined;
    /**
     * The ID of the balance to delete.
     */
    balanceId?: string | undefined;
    /**
     * If true, deduct the deleted balance's remaining amount from the customer's other balances for the same feature after deletion.
     */
    recalculateBalances?: boolean | undefined;
    /**
     * Target a specific balance by its reset interval. Use when the customer has multiple balances for the same feature with different reset intervals.
     */
    interval?: DeleteBalanceInterval | undefined;
};
/**
 * OK
 */
type DeleteBalanceResponse = {
    success: boolean;
};

type DeleteCustomerParams = {
    /**
     * ID of the customer to delete
     */
    customerId: string;
    /**
     * Whether to also delete the customer in Stripe
     */
    deleteInStripe?: boolean | undefined;
};
/**
 * OK
 */
type DeleteCustomerResponse = {
    success: boolean;
};

type DeleteEntityParams = {
    /**
     * The ID of the customer.
     */
    customerId?: string | undefined;
    /**
     * The ID of the entity.
     */
    entityId: string;
};
/**
 * OK
 */
type DeleteEntityResponse = {
    success: boolean;
};

type DeleteFeatureParams = {
    /**
     * The ID of the feature to delete.
     */
    featureId: string;
};
/**
 * OK
 */
type DeleteFeatureResponse = {
    success: boolean;
};

type DeletePlanParams = {
    /**
     * The ID of the plan to delete.
     */
    planId: string;
    /**
     * If true, deletes all versions of the plan. Otherwise, only deletes the latest version.
     */
    allVersions?: boolean | undefined;
};
/**
 * OK
 */
type DeletePlanResponse = {
    success: boolean;
};

/**
 * Use 'confirm' to commit the deduction, or 'release' to return the held balance.
 */
declare const FinalizeLockAction: {
    readonly Confirm: "confirm";
    readonly Release: "release";
};
/**
 * Use 'confirm' to commit the deduction, or 'release' to return the held balance.
 */
type FinalizeLockAction = ClosedEnum<typeof FinalizeLockAction>;
type FinalizeBalanceParams = {
    /**
     * The lock ID that was passed into the previous check call.
     */
    lockId: string;
    /**
     * Use 'confirm' to commit the deduction, or 'release' to return the held balance.
     */
    action: FinalizeLockAction;
    /**
     * Additional properties to attach to this finalize lock event.
     */
    overrideValue?: number | undefined;
    /**
     * Additional properties to attach to this finalize lock event.
     */
    properties?: {
        [k: string]: any;
    } | undefined;
};
/**
 * Accepted. Autumn is experiencing degraded service from a downstream provider, so the finalize request was allowed fail-open.
 */
type FinalizeLockResponseBody2 = {
    success: boolean;
};
/**
 * OK
 */
type FinalizeLockResponseBody1 = {
    success: boolean;
};
type FinalizeLockResponse = FinalizeLockResponseBody1 | FinalizeLockResponseBody2;

type GetCustomerParams = {
    /**
     * ID of the customer to fetch
     */
    customerId: string;
    /**
     * Expand related customer data like invoices or entities, or expand nested objects like balances.feature, flags.feature, subscriptions.plan, and purchases.plan.
     */
    expand?: Array<CustomerExpand> | undefined;
};
/**
 * The environment this customer was created in.
 */
declare const GetCustomerEnv: {
    readonly Sandbox: "sandbox";
    readonly Live: "live";
};
/**
 * The environment this customer was created in.
 */
type GetCustomerEnv = OpenEnum<typeof GetCustomerEnv>;
/**
 * The time interval for the purchase limit window.
 */
declare const GetCustomerPurchaseLimitInterval2: {
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
};
/**
 * The time interval for the purchase limit window.
 */
type GetCustomerPurchaseLimitInterval2 = OpenEnum<typeof GetCustomerPurchaseLimitInterval2>;
type GetCustomerPurchaseLimit2 = {
    /**
     * The time interval for the purchase limit window.
     */
    interval: GetCustomerPurchaseLimitInterval2;
    /**
     * Number of intervals in the purchase limit window.
     */
    intervalCount: number;
    /**
     * Maximum number of auto top-ups allowed within the interval.
     */
    limit: number;
};
declare const GetCustomerPurchaseLimitInterval1: {
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
};
type GetCustomerPurchaseLimitInterval1 = OpenEnum<typeof GetCustomerPurchaseLimitInterval1>;
type GetCustomerPurchaseLimit1 = {
    /**
     * The time interval for the purchase limit window. Null when no purchase limit is configured.
     */
    interval: GetCustomerPurchaseLimitInterval1 | null;
    /**
     * Number of intervals in the purchase limit window. Null when no purchase limit is configured.
     */
    intervalCount: number | null;
    /**
     * Maximum number of auto top-ups allowed within the interval. Null when no purchase limit is configured.
     */
    limit: number | null;
    /**
     * Number of auto top-ups already consumed in the current window.
     */
    count: number;
    /**
     * Unix ms timestamp when the current purchase window ends and the count resets.
     */
    nextResetAt: number;
};
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
declare const GetCustomerAutoTopupSource: {
    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 GetCustomerAutoTopupSource = OpenEnum<typeof GetCustomerAutoTopupSource>;
type GetCustomerAutoTopup = {
    /**
     * 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. Expand billing_controls.auto_topups.purchase_limit for a count of top ups and the next_reset_at.
     */
    purchaseLimit?: GetCustomerPurchaseLimit1 | GetCustomerPurchaseLimit2 | undefined;
    /**
     * When true, auto top-up creates a send_invoice invoice instead of auto-charging.
     */
    invoiceMode?: boolean | undefined;
    /**
     * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
     */
    source?: GetCustomerAutoTopupSource | undefined;
};
/**
 * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
 */
declare const GetCustomerLimitType: {
    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 GetCustomerLimitType = OpenEnum<typeof GetCustomerLimitType>;
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
declare const GetCustomerSpendLimitSource: {
    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 GetCustomerSpendLimitSource = OpenEnum<typeof GetCustomerSpendLimitSource>;
type GetCustomerSpendLimit = {
    /**
     * 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?: GetCustomerLimitType | 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?: GetCustomerSpendLimitSource | undefined;
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
declare const GetCustomerUsageLimitInterval: {
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
type GetCustomerUsageLimitInterval = OpenEnum<typeof GetCustomerUsageLimitInterval>;
/**
 * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
 */
type GetCustomerFilter = {
    properties: {
        [k: string]: any;
    };
};
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
declare const GetCustomerUsageLimitSource: {
    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 GetCustomerUsageLimitSource = OpenEnum<typeof GetCustomerUsageLimitSource>;
type GetCustomerUsageLimit = {
    /**
     * 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: GetCustomerUsageLimitInterval;
    /**
     * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
     */
    filter?: GetCustomerFilter | 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?: GetCustomerUsageLimitSource | undefined;
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
declare const GetCustomerThresholdType: {
    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 GetCustomerThresholdType = OpenEnum<typeof GetCustomerThresholdType>;
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
declare const GetCustomerUsageAlertSource: {
    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 GetCustomerUsageAlertSource = OpenEnum<typeof GetCustomerUsageAlertSource>;
type GetCustomerUsageAlert = {
    /**
     * 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: GetCustomerThresholdType;
    /**
     * 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?: GetCustomerUsageAlertSource | undefined;
};
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
declare const GetCustomerOverageAllowedSource: {
    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 GetCustomerOverageAllowedSource = OpenEnum<typeof GetCustomerOverageAllowedSource>;
type GetCustomerOverageAllowed = {
    /**
     * 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?: GetCustomerOverageAllowedSource | undefined;
};
/**
 * Billing controls for the customer (auto top-ups, etc.)
 */
type GetCustomerBillingControls = {
    /**
     * List of auto top-up configurations per feature.
     */
    autoTopups?: Array<GetCustomerAutoTopup> | undefined;
    /**
     * List of overage spend limits per feature (caps overage spend).
     */
    spendLimits?: Array<GetCustomerSpendLimit> | undefined;
    /**
     * List of hard usage caps per feature, with current interval usage.
     */
    usageLimits?: Array<GetCustomerUsageLimit> | undefined;
    /**
     * List of usage alert configurations per feature.
     */
    usageAlerts?: Array<GetCustomerUsageAlert> | undefined;
    /**
     * List of overage allowed controls per feature. When enabled, usage can exceed balance.
     */
    overageAllowed?: Array<GetCustomerOverageAllowed> | undefined;
};
/**
 * Current status of the subscription.
 */
declare const GetCustomerStatus: {
    readonly Active: "active";
    readonly Scheduled: "scheduled";
};
/**
 * Current status of the subscription.
 */
type GetCustomerStatus = OpenEnum<typeof GetCustomerStatus>;
/**
 * Whether this subscription is attached at the customer level or entity level.
 */
declare const GetCustomerSubscriptionScope: {
    readonly Customer: "customer";
    readonly Entity: "entity";
};
/**
 * Whether this subscription is attached at the customer level or entity level.
 */
type GetCustomerSubscriptionScope = OpenEnum<typeof GetCustomerSubscriptionScope>;
type GetCustomerSubscription = {
    /**
     * 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: GetCustomerStatus;
    /**
     * 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?: GetCustomerSubscriptionScope | undefined;
};
/**
 * Whether this purchase is attached at the customer level or entity level.
 */
declare const GetCustomerPurchaseScope: {
    readonly Customer: "customer";
    readonly Entity: "entity";
};
/**
 * Whether this purchase is attached at the customer level or entity level.
 */
type GetCustomerPurchaseScope = OpenEnum<typeof GetCustomerPurchaseScope>;
type GetCustomerPurchase = {
    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?: GetCustomerPurchaseScope | 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 GetCustomerFlagsType: {
    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 GetCustomerFlagsType = OpenEnum<typeof GetCustomerFlagsType>;
type GetCustomerCreditSchema = {
    /**
     * ID of the metered feature that draws from this credit system.
     */
    meteredFeatureId: string;
    /**
     * Credits consumed per unit of the metered feature.
     */
    creditCost: number;
};
type GetCustomerModelMarkups = {
    markup?: number | undefined;
    inputCost?: number | undefined;
    outputCost?: number | undefined;
};
type GetCustomerProviderMarkups = {
    markup: number;
};
/**
 * Display names for the feature in billing UI and customer-facing components.
 */
type GetCustomerDisplay = {
    /**
     * 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 GetCustomerFeature = {
    /**
     * 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: GetCustomerFlagsType;
    /**
     * 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<GetCustomerCreditSchema> | undefined;
    /**
     * Per-model markup overrides for AI credit systems.
     */
    modelMarkups?: {
        [k: string]: GetCustomerModelMarkups;
    } | 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]: GetCustomerProviderMarkups;
    } | null | undefined;
    /**
     * Display names for the feature in billing UI and customer-facing components.
     */
    display?: GetCustomerDisplay | undefined;
    /**
     * Whether the feature is archived and hidden from the dashboard.
     */
    archived: boolean;
};
type GetCustomerFlags = {
    /**
     * 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?: GetCustomerFeature | undefined;
};
/**
 * Configuration for the customer.
 */
type GetCustomerConfig = {
    /**
     * 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;
};
/**
 * Stripe processor connection for the customer.
 */
type GetCustomerStripe = {
    /**
     * Stripe customer ID.
     */
    id: string;
};
/**
 * Vercel processor connection for the customer (public-safe subset).
 */
type GetCustomerVercel = {
    /**
     * Vercel marketplace installation ID for this customer.
     */
    installationId: string;
    /**
     * Vercel account ID associated with the installation.
     */
    accountId: string;
};
/**
 * RevenueCat processor connection for the customer.
 */
type GetCustomerRevenuecat = {
    /**
     * Customer's external ID, used as the RevenueCat app user ID. Null if the customer has no external ID set.
     */
    id: string | null;
};
/**
 * Payment processors this customer is connected to (Stripe, Vercel, RevenueCat). Omitted entirely when the customer has not been created in any processor.
 */
type GetCustomerProcessors = {
    /**
     * Stripe processor connection for the customer.
     */
    stripe?: GetCustomerStripe | undefined;
    /**
     * Vercel processor connection for the customer (public-safe subset).
     */
    vercel?: GetCustomerVercel | undefined;
    /**
     * RevenueCat processor connection for the customer.
     */
    revenuecat?: GetCustomerRevenuecat | undefined;
};
/**
 * The billing processor that owns this invoice.
 */
declare const GetCustomerProcessorType: {
    readonly Stripe: "stripe";
    readonly Revenuecat: "revenuecat";
};
/**
 * The billing processor that owns this invoice.
 */
type GetCustomerProcessorType = OpenEnum<typeof GetCustomerProcessorType>;
type GetCustomerInvoice = {
    /**
     * 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: GetCustomerProcessorType;
    /**
     * 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;
};
/**
 * The environment (sandbox/live)
 */
declare const GetCustomerEntityEnv: {
    readonly Sandbox: "sandbox";
    readonly Live: "live";
};
/**
 * The environment (sandbox/live)
 */
type GetCustomerEntityEnv = OpenEnum<typeof GetCustomerEntityEnv>;
type GetCustomerEntity = {
    /**
     * 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: GetCustomerEntityEnv;
};
type GetCustomerTrialsUsed = {
    planId: string;
    customerId: string;
    fingerprint?: string | null | undefined;
};
/**
 * The type of reward
 */
declare const GetCustomerDiscountType: {
    readonly PercentageDiscount: "percentage_discount";
    readonly FixedDiscount: "fixed_discount";
    readonly FreeProduct: "free_product";
    readonly InvoiceCredits: "invoice_credits";
    readonly FeatureGrant: "feature_grant";
};
/**
 * The type of reward
 */
type GetCustomerDiscountType = OpenEnum<typeof GetCustomerDiscountType>;
/**
 * How long the discount lasts
 */
declare const GetCustomerDurationType: {
    readonly OneOff: "one_off";
    readonly Months: "months";
    readonly Forever: "forever";
};
/**
 * How long the discount lasts
 */
type GetCustomerDurationType = OpenEnum<typeof GetCustomerDurationType>;
type GetCustomerDiscount = {
    /**
     * The unique identifier for this discount
     */
    id: string;
    /**
     * The name of the discount or coupon
     */
    name: string;
    /**
     * The type of reward
     */
    type: GetCustomerDiscountType;
    /**
     * The discount value (percentage or fixed amount)
     */
    discountValue: number;
    /**
     * How long the discount lasts
     */
    durationType: GetCustomerDurationType;
    /**
     * Number of billing periods the discount applies for repeating durations
     */
    durationValue?: number | null | undefined;
    /**
     * The currency code for fixed amount discounts
     */
    currency?: string | null | undefined;
    /**
     * Timestamp when the discount becomes active
     */
    start?: number | null | undefined;
    /**
     * Timestamp when the discount expires
     */
    end?: number | null | undefined;
    /**
     * The Stripe subscription ID this discount is applied to
     */
    subscriptionId?: string | null | undefined;
    /**
     * Total amount saved from this discount
     */
    totalDiscountAmount?: number | null | undefined;
};
type GetCustomerRewards = {
    /**
     * Array of active discounts applied to the customer
     */
    discounts: Array<GetCustomerDiscount>;
};
type GetCustomerCustomer = {
    id: string;
    name?: string | null | undefined;
    email?: string | null | undefined;
};
type GetCustomerReferral = {
    programId: string;
    customer: GetCustomerCustomer;
    rewardApplied: boolean;
    createdAt: number;
};
/**
 * OK
 */
type GetCustomerResponse = {
    /**
     * Your unique identifier for the customer.
     */
    id: string | null;
    /**
     * The name of the customer.
     */
    name: string | null;
    /**
     * The email address of the customer.
     */
    email: string | null;
    /**
     * Timestamp of customer creation in milliseconds since epoch.
     */
    createdAt: number;
    /**
     * A unique identifier (eg. serial number) to de-duplicate customers across devices or browsers. For example: apple device ID.
     */
    fingerprint: string | null;
    /**
     * Stripe customer ID.
     */
    stripeId: string | null;
    /**
     * The environment this customer was created in.
     */
    env: GetCustomerEnv;
    /**
     * The metadata for the customer.
     */
    metadata: {
        [k: string]: any;
    };
    /**
     * Whether to send email receipts to the customer.
     */
    sendEmailReceipts: boolean;
    /**
     * Billing controls for the customer (auto top-ups, etc.)
     */
    billingControls: GetCustomerBillingControls;
    /**
     * Active and scheduled recurring plans that this customer has attached.
     */
    subscriptions: Array<GetCustomerSubscription>;
    /**
     * One-time purchases made by the customer.
     */
    purchases: Array<GetCustomerPurchase>;
    /**
     * Feature balances keyed by feature ID, showing usage limits and remaining amounts.
     */
    balances: {
        [k: string]: Balance;
    };
    /**
     * Boolean feature flags keyed by feature ID, showing enabled access for on/off features.
     */
    flags: {
        [k: string]: GetCustomerFlags;
    };
    /**
     * Configuration for the customer.
     */
    config?: GetCustomerConfig | undefined;
    /**
     * Payment processors this customer is connected to (Stripe, Vercel, RevenueCat). Omitted entirely when the customer has not been created in any processor.
     */
    processors?: GetCustomerProcessors | undefined;
    /**
     * Invoices for this customer.
     */
    invoices?: Array<GetCustomerInvoice> | undefined;
    /**
     * Entities associated with this customer.
     */
    entities?: Array<GetCustomerEntity> | undefined;
    /**
     * Trial usage history for this customer.
     */
    trialsUsed?: Array<GetCustomerTrialsUsed> | undefined;
    /**
     * Rewards earned or applied for this customer.
     */
    rewards?: GetCustomerRewards | null | undefined;
    /**
     * Referral records for this customer.
     */
    referrals?: Array<GetCustomerReferral> | undefined;
    /**
     * The customer's default payment method.
     */
    paymentMethod?: any | null | undefined;
};

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;
};

type GetFeatureParams = {
    /**
     * The ID of the feature.
     */
    featureId: 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.
 */
declare const GetFeatureType: {
    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 GetFeatureType = OpenEnum<typeof GetFeatureType>;
type GetFeatureCreditSchema = {
    /**
     * ID of the metered feature that draws from this credit system.
     */
    meteredFeatureId: string;
    /**
     * Credits consumed per unit of the metered feature.
     */
    creditCost: number;
};
type GetFeatureModelMarkups = {
    markup?: number | undefined;
    inputCost?: number | undefined;
    outputCost?: number | undefined;
};
type GetFeatureProviderMarkups = {
    markup: number;
};
/**
 * Display names for the feature in billing UI and customer-facing components.
 */
type GetFeatureDisplay = {
    /**
     * 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;
};
/**
 * OK
 */
type GetFeatureResponse = {
    /**
     * 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: GetFeatureType;
    /**
     * 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<GetFeatureCreditSchema> | undefined;
    /**
     * Per-model markup overrides for AI credit systems.
     */
    modelMarkups?: {
        [k: string]: GetFeatureModelMarkups;
    } | 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]: GetFeatureProviderMarkups;
    } | null | undefined;
    /**
     * Display names for the feature in billing UI and customer-facing components.
     */
    display?: GetFeatureDisplay | undefined;
    /**
     * Whether the feature is archived and hidden from the dashboard.
     */
    archived: boolean;
};

type GetPlanParams = {
    /**
     * The ID of the plan to retrieve.
     */
    planId: string;
    /**
     * The version of the plan to get. Defaults to the latest version.
     */
    version?: number | undefined;
};
/**
 * Billing interval (e.g. 'month', 'year').
 */
declare const GetPlanPriceInterval: {
    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 GetPlanPriceInterval = OpenEnum<typeof GetPlanPriceInterval>;
/**
 * Display text for showing this price in pricing pages.
 */
type GetPlanPriceDisplay = {
    /**
     * Main display text (e.g. '$10' or '100 messages').
     */
    primaryText: string;
    /**
     * Secondary display text (e.g. 'per month' or 'then $0.5 per 100').
     */
    secondaryText?: string | undefined;
};
type GetPlanPrice = {
    /**
     * Base price amount for the plan.
     */
    amount: number;
    /**
     * Billing interval (e.g. 'month', 'year').
     */
    interval: GetPlanPriceInterval;
    /**
     * Number of intervals per billing cycle. Defaults to 1.
     */
    intervalCount?: number | undefined;
    /**
     * Display text for showing this price in pricing pages.
     */
    display?: GetPlanPriceDisplay | undefined;
};
/**
 * The type of the feature
 */
declare const GetPlanType: {
    readonly Static: "static";
    readonly Boolean: "boolean";
    readonly SingleUse: "single_use";
    readonly ContinuousUse: "continuous_use";
    readonly CreditSystem: "credit_system";
    readonly AiCreditSystem: "ai_credit_system";
};
/**
 * The type of the feature
 */
type GetPlanType = OpenEnum<typeof GetPlanType>;
type GetPlanFeatureDisplay = {
    /**
     * The singular display name for the feature.
     */
    singular: string;
    /**
     * The plural display name for the feature.
     */
    plural: string;
};
type GetPlanCreditSchema = {
    /**
     * The ID of the metered feature (should be a single_use feature).
     */
    meteredFeatureId: string;
    /**
     * The credit cost of the metered feature.
     */
    creditCost: number;
};
/**
 * The full feature object if expanded.
 */
type GetPlanFeature = {
    /**
     * The ID of the feature, used to refer to it in other API calls like /track or /check.
     */
    id: string;
    /**
     * The name of the feature.
     */
    name?: string | null | undefined;
    /**
     * The type of the feature
     */
    type: GetPlanType;
    /**
     * Singular and plural display names for the feature.
     */
    display?: GetPlanFeatureDisplay | null | undefined;
    /**
     * Credit cost schema for credit system features.
     */
    creditSchema?: Array<GetPlanCreditSchema> | null | undefined;
    /**
     * Whether or not the feature is archived.
     */
    archived?: boolean | null | undefined;
};
/**
 * The interval at which the feature balance resets (e.g. 'month', 'year'). For consumable features, usage resets to 0 and included units are restored.
 */
declare const GetPlanResetItemInterval: {
    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";
};
/**
 * The interval at which the feature balance resets (e.g. 'month', 'year'). For consumable features, usage resets to 0 and included units are restored.
 */
type GetPlanResetItemInterval = OpenEnum<typeof GetPlanResetItemInterval>;
type GetPlanItemReset = {
    /**
     * The interval at which the feature balance resets (e.g. 'month', 'year'). For consumable features, usage resets to 0 and included units are restored.
     */
    interval: GetPlanResetItemInterval;
    /**
     * Number of intervals between resets. Defaults to 1.
     */
    intervalCount?: number | undefined;
};
type GetPlanItemTier = {
    to: number | string;
    amount: number;
    flatAmount?: number | undefined;
};
declare const GetPlanItemTierBehavior: {
    readonly Graduated: "graduated";
    readonly Volume: "volume";
};
type GetPlanItemTierBehavior = OpenEnum<typeof GetPlanItemTierBehavior>;
/**
 * Billing interval for this price. For consumable features, should match reset.interval.
 */
declare const GetPlanPriceItemInterval: {
    readonly OneOff: "one_off";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
/**
 * Billing interval for this price. For consumable features, should match reset.interval.
 */
type GetPlanPriceItemInterval = OpenEnum<typeof GetPlanPriceItemInterval>;
/**
 * 'prepaid' for features like seats where customers pay upfront, 'usage_based' for pay-as-you-go after included usage.
 */
declare const GetPlanItemBillingMethod: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * 'prepaid' for features like seats where customers pay upfront, 'usage_based' for pay-as-you-go after included usage.
 */
type GetPlanItemBillingMethod = OpenEnum<typeof GetPlanItemBillingMethod>;
type GetPlanItemPrice = {
    /**
     * Price per billing_units after included usage is consumed. Mutually exclusive with tiers.
     */
    amount?: number | undefined;
    /**
     * Tiered pricing configuration. Each tier's 'to' INCLUDES the included amount. Either 'tiers' or 'amount' is required.
     */
    tiers?: Array<GetPlanItemTier> | undefined;
    tierBehavior?: GetPlanItemTierBehavior | undefined;
    /**
     * Billing interval for this price. For consumable features, should match reset.interval.
     */
    interval: GetPlanPriceItemInterval;
    /**
     * Number of intervals per billing cycle. Defaults to 1.
     */
    intervalCount?: number | undefined;
    /**
     * Number of units per price increment. Usage is rounded UP to the nearest billing_units when billed (e.g. billing_units=100 means 101 usage rounds to 200).
     */
    billingUnits: number;
    /**
     * 'prepaid' for features like seats where customers pay upfront, 'usage_based' for pay-as-you-go after included usage.
     */
    billingMethod: GetPlanItemBillingMethod;
    /**
     * Maximum units a customer can purchase beyond included. E.g. if included=100 and max_purchase=300, customer can use up to 400 total before usage is capped. Null for no limit.
     */
    maxPurchase: number | null;
};
/**
 * Display text for showing this item in pricing pages.
 */
type GetPlanItemDisplay = {
    /**
     * Main display text (e.g. '$10' or '100 messages').
     */
    primaryText: string;
    /**
     * Secondary display text (e.g. 'per month' or 'then $0.5 per 100').
     */
    secondaryText?: string | undefined;
};
/**
 * When rolled over units expire.
 */
declare const GetPlanItemExpiryDurationType: {
    readonly Month: "month";
    readonly Forever: "forever";
};
/**
 * When rolled over units expire.
 */
type GetPlanItemExpiryDurationType = OpenEnum<typeof GetPlanItemExpiryDurationType>;
/**
 * Rollover configuration for unused units. If set, unused included units roll over to the next period.
 */
type GetPlanItemRollover = {
    /**
     * Maximum rollover units. Null for unlimited rollover.
     */
    max: number | null;
    /**
     * Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
     */
    maxPercentage?: number | null | undefined;
    /**
     * When rolled over units expire.
     */
    expiryDurationType: GetPlanItemExpiryDurationType;
    /**
     * Number of periods before expiry.
     */
    expiryDurationLength?: number | undefined;
};
type GetPlanItem = {
    /**
     * The ID of the feature this item configures.
     */
    featureId: string;
    /**
     * The full feature object if expanded.
     */
    feature?: GetPlanFeature | undefined;
    /**
     * Number of free units included. For consumable features, balance resets to this number each interval.
     */
    included: number;
    /**
     * Whether the customer has unlimited access to this feature.
     */
    unlimited: boolean;
    /**
     * Reset configuration for consumable features. Null for non-consumable features like seats where usage persists across billing cycles.
     */
    reset: GetPlanItemReset | null;
    /**
     * Pricing configuration for usage beyond included units. Null if feature is entirely free.
     */
    price: GetPlanItemPrice | null;
    /**
     * Display text for showing this item in pricing pages.
     */
    display?: GetPlanItemDisplay | undefined;
    /**
     * Rollover configuration for unused units. If set, unused included units roll over to the next period.
     */
    rollover?: GetPlanItemRollover | undefined;
};
/**
 * Unit of time for the trial duration ('day', 'month', 'year').
 */
declare const GetPlanDurationType: {
    readonly Day: "day";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Unit of time for the trial duration ('day', 'month', 'year').
 */
type GetPlanDurationType = OpenEnum<typeof GetPlanDurationType>;
declare const GetPlanOnEnd: {
    readonly Bill: "bill";
    readonly Revert: "revert";
};
type GetPlanOnEnd = OpenEnum<typeof GetPlanOnEnd>;
/**
 * Free trial configuration. If set, new customers can try this plan before being charged.
 */
type GetPlanFreeTrial = {
    /**
     * Number of duration_type periods the trial lasts.
     */
    durationLength: number;
    /**
     * Unit of time for the trial duration ('day', 'month', 'year').
     */
    durationType: GetPlanDurationType;
    /**
     * Whether a payment method is required to start the trial. If true, customer will be charged after trial ends.
     */
    cardRequired: boolean;
    /**
     * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
     */
    onEnd?: GetPlanOnEnd | null | undefined;
};
/**
 * Environment this plan belongs to ('sandbox' or 'live').
 */
declare const GetPlanEnv: {
    readonly Sandbox: "sandbox";
    readonly Live: "live";
};
/**
 * Environment this plan belongs to ('sandbox' or 'live').
 */
type GetPlanEnv = OpenEnum<typeof GetPlanEnv>;
/**
 * Billing interval (e.g. 'month', 'year').
 */
declare const GetPlanPriceVariantDetailsInterval: {
    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 GetPlanPriceVariantDetailsInterval = OpenEnum<typeof GetPlanPriceVariantDetailsInterval>;
/**
 * Base price configuration for a plan.
 */
type GetPlanBasePrice = {
    /**
     * Base price amount for the plan.
     */
    amount: number;
    /**
     * Billing interval (e.g. 'month', 'year').
     */
    interval: GetPlanPriceVariantDetailsInterval;
    /**
     * 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 GetPlanAddItemResetInterval: {
    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 GetPlanAddItemResetInterval = OpenEnum<typeof GetPlanAddItemResetInterval>;
/**
 * Reset configuration for consumable features. Omit for non-consumable features like seats.
 */
type GetPlanVariantDetailsReset = {
    /**
     * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
     */
    interval: GetPlanAddItemResetInterval;
    /**
     * Number of intervals between resets. Defaults to 1.
     */
    intervalCount?: number | undefined;
};
type GetPlanVariantDetailsTier = {
    to: number | string;
    amount: number;
    flatAmount?: number | undefined;
};
declare const GetPlanVariantDetailsTierBehavior: {
    readonly Graduated: "graduated";
    readonly Volume: "volume";
};
type GetPlanVariantDetailsTierBehavior = OpenEnum<typeof GetPlanVariantDetailsTierBehavior>;
/**
 * Billing interval. For consumable features, should match reset.interval.
 */
declare const GetPlanAddItemPriceInterval: {
    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 GetPlanAddItemPriceInterval = OpenEnum<typeof GetPlanAddItemPriceInterval>;
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
declare const GetPlanAddItemBillingMethod: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
type GetPlanAddItemBillingMethod = OpenEnum<typeof GetPlanAddItemBillingMethod>;
/**
 * Pricing for usage beyond included units. Omit for free features.
 */
type GetPlanVariantDetailsPrice = {
    /**
     * 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<GetPlanVariantDetailsTier> | undefined;
    tierBehavior?: GetPlanVariantDetailsTierBehavior | undefined;
    /**
     * Billing interval. For consumable features, should match reset.interval.
     */
    interval: GetPlanAddItemPriceInterval;
    /**
     * Number of intervals per billing cycle. Defaults to 1.
     */
    intervalCount: number;
    /**
     * Units per price increment. Usage is rounded UP when billed (e.g. billing_units=100 means 101 rounds to 200).
     */
    billingUnits: number;
    /**
     * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
     */
    billingMethod: GetPlanAddItemBillingMethod;
    /**
     * 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 GetPlanOnIncrease: {
    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 GetPlanOnIncrease = OpenEnum<typeof GetPlanOnIncrease>;
/**
 * Credit behavior when quantity decreases mid-cycle.
 */
declare const GetPlanOnDecrease: {
    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 GetPlanOnDecrease = OpenEnum<typeof GetPlanOnDecrease>;
/**
 * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
 */
type GetPlanProration = {
    /**
     * Billing behavior when quantity increases mid-cycle.
     */
    onIncrease: GetPlanOnIncrease;
    /**
     * Credit behavior when quantity decreases mid-cycle.
     */
    onDecrease: GetPlanOnDecrease;
};
/**
 * When rolled over units expire.
 */
declare const GetPlanVariantDetailsExpiryDurationType: {
    readonly Month: "month";
    readonly Forever: "forever";
};
/**
 * When rolled over units expire.
 */
type GetPlanVariantDetailsExpiryDurationType = OpenEnum<typeof GetPlanVariantDetailsExpiryDurationType>;
/**
 * Rollover config for unused units. If set, unused included units carry over.
 */
type GetPlanVariantDetailsRollover = {
    /**
     * 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: GetPlanVariantDetailsExpiryDurationType;
    /**
     * Number of periods before expiry.
     */
    expiryDurationLength?: number | undefined;
};
/**
 * Configuration for a feature item in a plan, including usage limits, pricing, and rollover settings.
 */
type GetPlanPlanItem = {
    /**
     * 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?: GetPlanVariantDetailsReset | undefined;
    /**
     * Pricing for usage beyond included units. Omit for free features.
     */
    price?: GetPlanVariantDetailsPrice | undefined;
    /**
     * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
     */
    proration?: GetPlanProration | undefined;
    /**
     * Rollover config for unused units. If set, unused included units carry over.
     */
    rollover?: GetPlanVariantDetailsRollover | undefined;
};
/**
 * Match items with this billing method (prepaid or usage_based).
 */
declare const GetPlanRemoveItemBillingMethod: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * Match items with this billing method (prepaid or usage_based).
 */
type GetPlanRemoveItemBillingMethod = OpenEnum<typeof GetPlanRemoveItemBillingMethod>;
declare const GetPlanIntervalRemoveItemEnum2: {
    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 GetPlanIntervalRemoveItemEnum2 = OpenEnum<typeof GetPlanIntervalRemoveItemEnum2>;
declare const GetPlanIntervalRemoveItemEnum1: {
    readonly OneOff: "one_off";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
type GetPlanIntervalRemoveItemEnum1 = OpenEnum<typeof GetPlanIntervalRemoveItemEnum1>;
/**
 * Filter for matching plan items. All provided fields must match (AND).
 */
type GetPlanPlanItemFilter = {
    /**
     * Match items linked to this feature.
     */
    featureId?: string | undefined;
    /**
     * Match items with this billing method (prepaid or usage_based).
     */
    billingMethod?: GetPlanRemoveItemBillingMethod | 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?: GetPlanIntervalRemoveItemEnum1 | GetPlanIntervalRemoveItemEnum2 | 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 GetPlanVariantDetailsDurationType: {
    readonly Day: "day";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Unit of time for the trial ('day', 'month', 'year').
 */
type GetPlanVariantDetailsDurationType = OpenEnum<typeof GetPlanVariantDetailsDurationType>;
/**
 * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
 */
declare const GetPlanVariantDetailsOnEnd: {
    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 GetPlanVariantDetailsOnEnd = OpenEnum<typeof GetPlanVariantDetailsOnEnd>;
/**
 * Free trial configuration for a plan.
 */
type GetPlanFreeTrialParams = {
    /**
     * Number of duration_type periods the trial lasts.
     */
    durationLength: number;
    /**
     * Unit of time for the trial ('day', 'month', 'year').
     */
    durationType: GetPlanVariantDetailsDurationType;
    /**
     * If true, payment method required to start trial. Customer is charged after trial ends.
     */
    cardRequired: boolean;
    /**
     * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
     */
    onEnd?: GetPlanVariantDetailsOnEnd | undefined;
};
/**
 * The time interval for the purchase limit window.
 */
declare const GetPlanVariantDetailsPurchaseLimitInterval: {
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
};
/**
 * The time interval for the purchase limit window.
 */
type GetPlanVariantDetailsPurchaseLimitInterval = OpenEnum<typeof GetPlanVariantDetailsPurchaseLimitInterval>;
/**
 * Optional rate limit to cap how often auto top-ups occur.
 */
type GetPlanVariantDetailsPurchaseLimit = {
    /**
     * The time interval for the purchase limit window.
     */
    interval: GetPlanVariantDetailsPurchaseLimitInterval;
    /**
     * Number of intervals in the purchase limit window.
     */
    intervalCount: number;
    /**
     * Maximum number of auto top-ups allowed within the interval.
     */
    limit: number;
};
type GetPlanVariantDetailsAutoTopup = {
    /**
     * 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?: GetPlanVariantDetailsPurchaseLimit | 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 GetPlanVariantDetailsLimitType: {
    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 GetPlanVariantDetailsLimitType = OpenEnum<typeof GetPlanVariantDetailsLimitType>;
type GetPlanVariantDetailsSpendLimit = {
    /**
     * 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?: GetPlanVariantDetailsLimitType | 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 GetPlanVariantDetailsUsageLimitInterval: {
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
type GetPlanVariantDetailsUsageLimitInterval = OpenEnum<typeof GetPlanVariantDetailsUsageLimitInterval>;
/**
 * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
 */
type GetPlanVariantDetailsFilter = {
    properties: {
        [k: string]: any;
    };
};
type GetPlanVariantDetailsUsageLimit = {
    /**
     * 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: GetPlanVariantDetailsUsageLimitInterval;
    /**
     * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
     */
    filter?: GetPlanVariantDetailsFilter | undefined;
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
declare const GetPlanVariantDetailsThresholdType: {
    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 GetPlanVariantDetailsThresholdType = OpenEnum<typeof GetPlanVariantDetailsThresholdType>;
type GetPlanVariantDetailsUsageAlert = {
    /**
     * 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: GetPlanVariantDetailsThresholdType;
    /**
     * Optional user-defined label to distinguish multiple alerts on the same feature.
     */
    name?: string | undefined;
};
type GetPlanVariantDetailsOverageAllowed = {
    /**
     * The feature ID this overage allowed control applies to.
     */
    featureId: string;
    /**
     * Whether overage is allowed for this feature.
     */
    enabled: boolean;
};
/**
 * Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
 */
type GetPlanVariantDetailsBillingControls = {
    /**
     * List of auto top-up configurations per feature.
     */
    autoTopups?: Array<GetPlanVariantDetailsAutoTopup> | undefined;
    /**
     * List of overage spend limits per feature (caps overage spend).
     */
    spendLimits?: Array<GetPlanVariantDetailsSpendLimit> | undefined;
    /**
     * List of hard usage caps per feature (max units per interval).
     */
    usageLimits?: Array<GetPlanVariantDetailsUsageLimit> | undefined;
    /**
     * List of usage alert configurations per feature.
     */
    usageAlerts?: Array<GetPlanVariantDetailsUsageAlert> | undefined;
    /**
     * List of overage allowed controls per feature. When enabled, usage can exceed balance.
     */
    overageAllowed?: Array<GetPlanVariantDetailsOverageAllowed> | undefined;
};
/**
 * The customization that transforms the base plan into this variant.
 */
type GetPlanCustomize = {
    /**
     * Override the base price of the plan. Pass null to remove the base price.
     */
    price?: GetPlanBasePrice | null | undefined;
    /**
     * Items to add to the plan.
     */
    addItems?: Array<GetPlanPlanItem> | undefined;
    /**
     * Filters selecting items to remove from the plan.
     */
    removeItems?: Array<GetPlanPlanItemFilter> | undefined;
    /**
     * Override the plan's default free trial. Pass an object to set a custom trial, or null to remove the trial entirely.
     */
    freeTrial?: GetPlanFreeTrialParams | null | undefined;
    /**
     * Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
     */
    billingControls?: GetPlanVariantDetailsBillingControls | undefined;
};
/**
 * Details about how this variant relates to its latest base plan.
 */
type GetPlanVariantDetails = {
    /**
     * The ID of the base plan this variant was derived from.
     */
    basePlanId: string;
    /**
     * The customization that transforms the base plan into this variant.
     */
    customize?: GetPlanCustomize | undefined;
};
/**
 * Miscellaneous plan-level configuration flags.
 */
type GetPlanConfig = {
    /**
     * If true, entitlements attached to this plan will still reset on schedule even when the customer's product is in a past_due state.
     */
    ignorePastDue: boolean;
};
/**
 * The time interval for the purchase limit window.
 */
declare const GetPlanPurchaseLimitInterval: {
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
};
/**
 * The time interval for the purchase limit window.
 */
type GetPlanPurchaseLimitInterval = OpenEnum<typeof GetPlanPurchaseLimitInterval>;
/**
 * Optional rate limit to cap how often auto top-ups occur.
 */
type GetPlanPurchaseLimit = {
    /**
     * The time interval for the purchase limit window.
     */
    interval: GetPlanPurchaseLimitInterval;
    /**
     * Number of intervals in the purchase limit window.
     */
    intervalCount: number;
    /**
     * Maximum number of auto top-ups allowed within the interval.
     */
    limit: number;
};
type GetPlanAutoTopup = {
    /**
     * 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?: GetPlanPurchaseLimit | 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 GetPlanLimitType: {
    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 GetPlanLimitType = OpenEnum<typeof GetPlanLimitType>;
type GetPlanSpendLimit = {
    /**
     * 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?: GetPlanLimitType | 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 GetPlanUsageLimitInterval: {
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
type GetPlanUsageLimitInterval = OpenEnum<typeof GetPlanUsageLimitInterval>;
/**
 * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
 */
type GetPlanFilter = {
    properties: {
        [k: string]: any;
    };
};
type GetPlanUsageLimit = {
    /**
     * 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: GetPlanUsageLimitInterval;
    /**
     * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
     */
    filter?: GetPlanFilter | undefined;
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
declare const GetPlanThresholdType: {
    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 GetPlanThresholdType = OpenEnum<typeof GetPlanThresholdType>;
type GetPlanUsageAlert = {
    /**
     * 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: GetPlanThresholdType;
    /**
     * Optional user-defined label to distinguish multiple alerts on the same feature.
     */
    name?: string | undefined;
};
type GetPlanOverageAllowed = {
    /**
     * 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 GetPlanBillingControls = {
    /**
     * List of auto top-up configurations per feature.
     */
    autoTopups?: Array<GetPlanAutoTopup> | undefined;
    /**
     * List of overage spend limits per feature (caps overage spend).
     */
    spendLimits?: Array<GetPlanSpendLimit> | undefined;
    /**
     * List of hard usage caps per feature (max units per interval).
     */
    usageLimits?: Array<GetPlanUsageLimit> | undefined;
    /**
     * List of usage alert configurations per feature.
     */
    usageAlerts?: Array<GetPlanUsageAlert> | undefined;
    /**
     * List of overage allowed controls per feature. When enabled, usage can exceed balance.
     */
    overageAllowed?: Array<GetPlanOverageAllowed> | undefined;
};
/**
 * The customer's current status with this plan. 'active' if attached, 'scheduled' if pending activation.
 */
declare const GetPlanStatus: {
    readonly Active: "active";
    readonly Scheduled: "scheduled";
};
/**
 * The customer's current status with this plan. 'active' if attached, 'scheduled' if pending activation.
 */
type GetPlanStatus = OpenEnum<typeof GetPlanStatus>;
/**
 * The action that would occur if this plan were attached to the customer.
 */
declare const GetPlanAttachAction: {
    readonly Activate: "activate";
    readonly Upgrade: "upgrade";
    readonly Downgrade: "downgrade";
    readonly None: "none";
    readonly Purchase: "purchase";
};
/**
 * The action that would occur if this plan were attached to the customer.
 */
type GetPlanAttachAction = OpenEnum<typeof GetPlanAttachAction>;
type GetPlanCustomerEligibility = {
    /**
     * Whether the trial on this plan is available to this customer. For example, if the customer used the trial in the past, this will be false.
     */
    trialAvailable?: boolean | undefined;
    /**
     * The customer's current status with this plan. 'active' if attached, 'scheduled' if pending activation.
     */
    status?: GetPlanStatus | undefined;
    /**
     * Whether the customer's active instance of this plan is set to cancel.
     */
    canceling?: boolean | undefined;
    /**
     * Whether the customer is currently on a free trial of this plan.
     */
    trialing?: boolean | undefined;
    /**
     * The action that would occur if this plan were attached to the customer.
     */
    attachAction: GetPlanAttachAction;
};
/**
 * A plan defines a set of features, pricing, and entitlements that can be attached to customers.
 */
type GetPlanResponse = {
    /**
     * Unique identifier for the plan.
     */
    id: string;
    /**
     * Display name of the plan.
     */
    name: string;
    /**
     * Optional description of the plan.
     */
    description: string | null;
    /**
     * Group identifier for organizing related plans. Plans in the same group are mutually exclusive.
     */
    group: string | null;
    /**
     * Version number of the plan. Incremented when plan configuration changes.
     */
    version: number;
    /**
     * Whether this is an add-on plan that can be attached alongside a main plan.
     */
    addOn: boolean;
    /**
     * If true, this plan is automatically attached when a customer is created. Used for free plans.
     */
    autoEnable: boolean;
    /**
     * Base recurring price for the plan. Null for free plans or usage-only plans.
     */
    price: GetPlanPrice | null;
    /**
     * Feature configurations included in this plan. Each item defines included units, pricing, and reset behavior for a feature.
     */
    items: Array<GetPlanItem>;
    /**
     * Free trial configuration. If set, new customers can try this plan before being charged.
     */
    freeTrial?: GetPlanFreeTrial | undefined;
    /**
     * Unix timestamp (ms) when the plan was created.
     */
    createdAt: number;
    /**
     * Environment this plan belongs to ('sandbox' or 'live').
     */
    env: GetPlanEnv;
    /**
     * Whether the plan is archived. Archived plans cannot be attached to new customers.
     */
    archived: boolean;
    /**
     * Deprecated. Use variant_details.base_plan_id instead. If this is a variant, the ID of the base plan it was created from.
     */
    baseVariantId: string | null;
    /**
     * Details about how this variant relates to its latest base plan.
     */
    variantDetails?: GetPlanVariantDetails | undefined;
    /**
     * Miscellaneous plan-level configuration flags.
     */
    config: GetPlanConfig;
    /**
     * Plan-level billing controls used as customer defaults.
     */
    billingControls?: GetPlanBillingControls | undefined;
    /**
     * Arbitrary key-value metadata defined by you for your own use. Shared across all versions of the plan.
     */
    metadata: {
        [k: string]: any;
    };
    customerEligibility?: GetPlanCustomerEligibility | undefined;
};

/**
 * "test" and "sandbox" both target the sandbox environment
 */
declare const GetRevenueCatKeysEnv: {
    readonly Test: "test";
    readonly Sandbox: "sandbox";
    readonly Live: "live";
};
/**
 * "test" and "sandbox" both target the sandbox environment
 */
type GetRevenueCatKeysEnv = ClosedEnum<typeof GetRevenueCatKeysEnv>;
type GetRevenueCatKeysParams = {
    organizationSlug: string;
    /**
     * "test" and "sandbox" both target the sandbox environment
     */
    env: GetRevenueCatKeysEnv;
};
type ApiKey = {
    id: string;
    /**
     * The public SDK API key value
     */
    key: string;
    /**
     * e.g. "production" / "sandbox"
     */
    environment?: string | null | undefined;
    appId?: string | null | undefined;
    createdAt?: number | undefined;
    [additionalProperties: string]: unknown;
};
type GetRevenueCatKeysApp = {
    appId: string;
    /**
     * RevenueCat store type, e.g. test_store / app_store / play_store
     */
    appType: string;
    name: string;
    apiKeys: Array<ApiKey>;
};
/**
 * OK
 */
type GetRevenueCatKeysResponse = {
    apps: Array<GetRevenueCatKeysApp>;
    /**
     * Freshly-refreshed RevenueCat OAuth access token for the org (null for api-key orgs). The refresh token is never exposed — call this endpoint again for a new access token.
     */
    oauthAccessToken: string | null;
};

/**
 * Base class for all HTTP errors.
 */
declare class HTTPClientError extends Error {
    /** The underlying cause of the error. */
    readonly cause: unknown;
    name: string;
    constructor(message: string, opts?: {
        cause?: unknown;
    });
}
/**
 * An error to capture unrecognised or unexpected errors when making HTTP calls.
 */
declare class UnexpectedClientError extends HTTPClientError {
    name: string;
}
/**
 * An error that is raised when any inputs used to create a request are invalid.
 */
declare class InvalidRequestError extends HTTPClientError {
    name: string;
}
/**
 * An error that is raised when a HTTP request was aborted by the client error.
 */
declare class RequestAbortedError extends HTTPClientError {
    readonly name = "RequestAbortedError";
}
/**
 * An error that is raised when a HTTP request timed out due to an AbortSignal
 * signal timeout.
 */
declare class RequestTimeoutError extends HTTPClientError {
    readonly name = "RequestTimeoutError";
}
/**
 * An error that is raised when a HTTP client is unable to make a request to
 * a server.
 */
declare class ConnectionError extends HTTPClientError {
    readonly name = "ConnectionError";
}

/**
 * Optional identity fields upserted onto the customer (applied to existing customers too).
 */
type ImportCustomerData = {
    /**
     * Display name for the customer.
     */
    name?: string | undefined;
    /**
     * Email address for the customer.
     */
    email?: string | undefined;
    /**
     * Anti-fraud fingerprint for the customer.
     */
    fingerprint?: string | undefined;
};
/**
 * The processor this identity belongs to.
 */
declare const ImportType: {
    readonly Stripe: "stripe";
    readonly Revenuecat: "revenuecat";
};
/**
 * The processor this identity belongs to.
 */
type ImportType = ClosedEnum<typeof ImportType>;
type ImportProcessor = {
    /**
     * The processor this identity belongs to.
     */
    type: ImportType;
    /**
     * The customer's id in that processor (Stripe customer id, or RevenueCat app_user_id).
     */
    id: string;
};
/**
 * The processor that owns this billable (stripe or revenuecat). Omit for plans with no processor, e.g. a free plan.
 */
declare const BillableProcessor: {
    readonly Stripe: "stripe";
    readonly Revenuecat: "revenuecat";
};
/**
 * The processor that owns this billable (stripe or revenuecat). Omit for plans with no processor, e.g. a free plan.
 */
type BillableProcessor = ClosedEnum<typeof BillableProcessor>;
/**
 * Existing processor billing object this billable is adopted from; omit for paid one-offs.
 */
type Link = {
    /**
     * Existing processor subscription id this billable is adopted from.
     */
    subscriptionId?: string | undefined;
    /**
     * Existing processor subscription-schedule id this billable is adopted from.
     */
    scheduleId?: string | undefined;
};
/**
 * Set the status of the plan to be flashed. Active if undefined.
 */
declare const ImportStatus: {
    readonly Active: "active";
    readonly Trialing: "trialing";
    readonly PastDue: "past_due";
    readonly Canceled: "canceled";
    readonly Expired: "expired";
};
/**
 * Set the status of the plan to be flashed. Active if undefined.
 */
type ImportStatus = ClosedEnum<typeof ImportStatus>;
type ImportFeatureQuantity = {
    /**
     * The prepaid feature being quantified.
     */
    featureId: string;
    /**
     * Purchased quantity for this prepaid feature.
     */
    quantity: number;
};
declare const ImportInterval: {
    readonly Lifetime: "lifetime";
    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 ImportInterval = ClosedEnum<typeof ImportInterval>;
/**
 * Selects the included vs prepaid vs usage-based (pay-per-use) entitlement line when a feature has several.
 */
declare const ImportBillingBehavior: {
    readonly Included: "included";
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * Selects the included vs prepaid vs usage-based (pay-per-use) entitlement line when a feature has several.
 */
type ImportBillingBehavior = ClosedEnum<typeof ImportBillingBehavior>;
/**
 * Disambiguates which entitlement line to target when the feature has multiple.
 */
type ImportFilter = {
    /**
     * Reset interval selecting which entitlement line to target when a feature has several ('lifetime' or null = the non-resetting one-off line).
     */
    interval?: ImportInterval | null | undefined;
    /**
     * Selects the included vs prepaid vs usage-based (pay-per-use) entitlement line when a feature has several.
     */
    billingBehavior?: ImportBillingBehavior | undefined;
};
type ImportBalance = {
    /**
     * The feature whose balance is being set.
     */
    featureId: string;
    /**
     * Disambiguates which entitlement line to target when the feature has multiple.
     */
    filter?: ImportFilter | undefined;
    /**
     * Units already consumed; remaining balance is derived from the plan allowance minus this.
     */
    usage?: number | undefined;
    /**
     * Explicit remaining balance override (mutually exclusive with usage).
     */
    balance?: number | undefined;
    /**
     * Unix ms timestamp of this line's next reset.
     */
    nextResetAt?: number | undefined;
};
/**
 * The single plan on this billable (provide either plan or phases, not both).
 */
type ImportPlan = {
    /**
     * The Autumn plan to attach to the customer.
     */
    planId: string;
    /**
     * Specific plan version to attach; defaults to the latest.
     */
    version?: number | undefined;
    /**
     * Set the status of the plan to be flashed. Active if undefined.
     */
    status?: ImportStatus | undefined;
    /**
     * When the plan started (Unix ms). Defaults to the linked subscription's start, else the import time. Set this for one-off purchases to record the real purchase date.
     */
    startedAt?: number | undefined;
    /**
     * Seat/unit quantity for the plan.
     */
    quantity?: number | undefined;
    /**
     * Purchased prepaid quantities per feature.
     */
    featureQuantities?: Array<ImportFeatureQuantity> | undefined;
    /**
     * Per-feature balances to image onto the plan.
     */
    balances?: Array<ImportBalance> | undefined;
};
type Billable = {
    /**
     * The processor that owns this billable (stripe or revenuecat). Omit for plans with no processor, e.g. a free plan.
     */
    processor?: BillableProcessor | undefined;
    /**
     * Existing processor billing object this billable is adopted from; omit for paid one-offs.
     */
    link?: Link | undefined;
    /**
     * Unix ms billing anchor shared by co-billed plans on this billable.
     */
    billingCycleAnchor?: number | undefined;
    /**
     * The single plan on this billable (provide either plan or phases, not both).
     */
    plan?: ImportPlan | undefined;
};
type DfuFlashParams = {
    /**
     * Autumn customer to image into.
     */
    customerId: string;
    /**
     * Optional identity fields upserted onto the customer (applied to existing customers too).
     */
    customerData?: ImportCustomerData | undefined;
    /**
     * The customer's processor identities (e.g. Stripe customer id, RevenueCat app_user_id). Omit for customers with no processor, e.g. those only ever on a free plan.
     */
    processors?: Array<ImportProcessor> | undefined;
    /**
     * The billing objects (subscriptions, one-offs) to image, each carrying its plan.
     */
    billables: Array<Billable>;
    /**
     * If true, validate and compute without persisting; returns what would be flashed.
     */
    dryRun?: boolean | undefined;
};
type Flashed = {
    /**
     * The plan that was imaged.
     */
    planId: string;
    /**
     * The processor that owns the imaged plan.
     */
    processor: string;
    /**
     * The created (or existing) customer product id, if any.
     */
    customerProductId: string | null;
    /**
     * The resulting status of the imaged plan.
     */
    status: string;
    /**
     * True if an active plan already existed and this one was left untouched.
     */
    skipped: boolean;
    /**
     * True if this was an existing active plan expired because it was absent from the imaged desired state.
     */
    expired?: boolean | undefined;
    /**
     * True when the imaged state may be wrong — e.g. a resetting plan with no resolvable billing anchor, or a paid recurring plan with no linked subscription for Autumn to manage. The plan is still imaged; see `reason` and fix by supplying started_at or a subscription_id.
     */
    mismatch?: boolean | undefined;
    /**
     * Why the plan was skipped, expired, or flagged as a mismatch, when applicable.
     */
    reason?: string | undefined;
};
/**
 * OK
 */
type DfuFlashResult = {
    /**
     * The imaged customer's id.
     */
    customerId: string;
    /**
     * Per-plan outcome of the flash.
     */
    flashed: Array<Flashed>;
    /**
     * The freshly-read imaged customer; null for dry_run.
     */
    customer: Customer | null;
};

declare const LinkRevenueCatEnv: {
    readonly Test: "test";
    readonly Live: "live";
};
type LinkRevenueCatEnv = ClosedEnum<typeof LinkRevenueCatEnv>;
type LinkRevenueCatParams = {
    organizationSlug: string;
    env: LinkRevenueCatEnv;
    projectName: string;
    redirectUrl: string;
};
/**
 * OK
 */
type LinkRevenueCatResponse = {
    oauthUrl: string;
};

type ListCustomersPlan = {
    id: string;
    versions?: Array<number> | undefined;
};
/**
 * Filter by customer product status. Defaults to active and scheduled.
 */
declare const ListCustomersSubscriptionStatus: {
    readonly Active: "active";
    readonly Scheduled: "scheduled";
};
/**
 * Filter by customer product status. Defaults to active and scheduled.
 */
type ListCustomersSubscriptionStatus = ClosedEnum<typeof ListCustomersSubscriptionStatus>;
declare const ListCustomersProcessor: {
    readonly Stripe: "stripe";
    readonly Revenuecat: "revenuecat";
    readonly Vercel: "vercel";
};
type ListCustomersProcessor = ClosedEnum<typeof ListCustomersProcessor>;
type ListCustomersParams = {
    /**
     * 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 by plan ID and version. Returns customers with active subscriptions to this plan.
     */
    plans?: Array<ListCustomersPlan> | undefined;
    /**
     * Filter by customer product status. Defaults to active and scheduled.
     */
    subscriptionStatus?: ListCustomersSubscriptionStatus | undefined;
    /**
     * Search customers by id, name, or email.
     */
    search?: string | undefined;
    /**
     * Filter by customer processor type (stripe, revenuecat, vercel).
     */
    processors?: Array<ListCustomersProcessor> | undefined;
};
/**
 * The environment this customer was created in.
 */
declare const ListCustomersEnv: {
    readonly Sandbox: "sandbox";
    readonly Live: "live";
};
/**
 * The environment this customer was created in.
 */
type ListCustomersEnv = OpenEnum<typeof ListCustomersEnv>;
/**
 * The time interval for the purchase limit window.
 */
declare const ListCustomersPurchaseLimitInterval2: {
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
};
/**
 * The time interval for the purchase limit window.
 */
type ListCustomersPurchaseLimitInterval2 = OpenEnum<typeof ListCustomersPurchaseLimitInterval2>;
type ListCustomersPurchaseLimit2 = {
    /**
     * The time interval for the purchase limit window.
     */
    interval: ListCustomersPurchaseLimitInterval2;
    /**
     * Number of intervals in the purchase limit window.
     */
    intervalCount: number;
    /**
     * Maximum number of auto top-ups allowed within the interval.
     */
    limit: number;
};
declare const ListCustomersPurchaseLimitInterval1: {
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
};
type ListCustomersPurchaseLimitInterval1 = OpenEnum<typeof ListCustomersPurchaseLimitInterval1>;
type ListCustomersPurchaseLimit1 = {
    /**
     * The time interval for the purchase limit window. Null when no purchase limit is configured.
     */
    interval: ListCustomersPurchaseLimitInterval1 | null;
    /**
     * Number of intervals in the purchase limit window. Null when no purchase limit is configured.
     */
    intervalCount: number | null;
    /**
     * Maximum number of auto top-ups allowed within the interval. Null when no purchase limit is configured.
     */
    limit: number | null;
    /**
     * Number of auto top-ups already consumed in the current window.
     */
    count: number;
    /**
     * Unix ms timestamp when the current purchase window ends and the count resets.
     */
    nextResetAt: number;
};
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
declare const ListCustomersAutoTopupSource: {
    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 ListCustomersAutoTopupSource = OpenEnum<typeof ListCustomersAutoTopupSource>;
type ListCustomersAutoTopup = {
    /**
     * 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. Expand billing_controls.auto_topups.purchase_limit for a count of top ups and the next_reset_at.
     */
    purchaseLimit?: ListCustomersPurchaseLimit1 | ListCustomersPurchaseLimit2 | undefined;
    /**
     * When true, auto top-up creates a send_invoice invoice instead of auto-charging.
     */
    invoiceMode?: boolean | undefined;
    /**
     * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
     */
    source?: ListCustomersAutoTopupSource | undefined;
};
/**
 * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
 */
declare const ListCustomersLimitType: {
    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 ListCustomersLimitType = OpenEnum<typeof ListCustomersLimitType>;
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
declare const ListCustomersSpendLimitSource: {
    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 ListCustomersSpendLimitSource = OpenEnum<typeof ListCustomersSpendLimitSource>;
type ListCustomersSpendLimit = {
    /**
     * 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?: ListCustomersLimitType | 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?: ListCustomersSpendLimitSource | undefined;
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
declare const ListCustomersUsageLimitInterval: {
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
type ListCustomersUsageLimitInterval = OpenEnum<typeof ListCustomersUsageLimitInterval>;
/**
 * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
 */
type ListCustomersFilter = {
    properties: {
        [k: string]: any;
    };
};
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
declare const ListCustomersUsageLimitSource: {
    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 ListCustomersUsageLimitSource = OpenEnum<typeof ListCustomersUsageLimitSource>;
type ListCustomersUsageLimit = {
    /**
     * 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: ListCustomersUsageLimitInterval;
    /**
     * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
     */
    filter?: ListCustomersFilter | 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?: ListCustomersUsageLimitSource | undefined;
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
declare const ListCustomersThresholdType: {
    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 ListCustomersThresholdType = OpenEnum<typeof ListCustomersThresholdType>;
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
declare const ListCustomersUsageAlertSource: {
    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 ListCustomersUsageAlertSource = OpenEnum<typeof ListCustomersUsageAlertSource>;
type ListCustomersUsageAlert = {
    /**
     * 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: ListCustomersThresholdType;
    /**
     * 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?: ListCustomersUsageAlertSource | undefined;
};
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
declare const ListCustomersOverageAllowedSource: {
    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 ListCustomersOverageAllowedSource = OpenEnum<typeof ListCustomersOverageAllowedSource>;
type ListCustomersOverageAllowed = {
    /**
     * 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?: ListCustomersOverageAllowedSource | undefined;
};
/**
 * Billing controls for the customer (auto top-ups, etc.)
 */
type ListCustomersBillingControls = {
    /**
     * List of auto top-up configurations per feature.
     */
    autoTopups?: Array<ListCustomersAutoTopup> | undefined;
    /**
     * List of overage spend limits per feature (caps overage spend).
     */
    spendLimits?: Array<ListCustomersSpendLimit> | undefined;
    /**
     * List of hard usage caps per feature, with current interval usage.
     */
    usageLimits?: Array<ListCustomersUsageLimit> | undefined;
    /**
     * List of usage alert configurations per feature.
     */
    usageAlerts?: Array<ListCustomersUsageAlert> | undefined;
    /**
     * List of overage allowed controls per feature. When enabled, usage can exceed balance.
     */
    overageAllowed?: Array<ListCustomersOverageAllowed> | undefined;
};
/**
 * Current status of the subscription.
 */
declare const ListCustomersStatus: {
    readonly Active: "active";
    readonly Scheduled: "scheduled";
};
/**
 * Current status of the subscription.
 */
type ListCustomersStatus = OpenEnum<typeof ListCustomersStatus>;
/**
 * Whether this subscription is attached at the customer level or entity level.
 */
declare const ListCustomersSubscriptionScope: {
    readonly Customer: "customer";
    readonly Entity: "entity";
};
/**
 * Whether this subscription is attached at the customer level or entity level.
 */
type ListCustomersSubscriptionScope = OpenEnum<typeof ListCustomersSubscriptionScope>;
type ListCustomersSubscription = {
    /**
     * 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: ListCustomersStatus;
    /**
     * 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?: ListCustomersSubscriptionScope | undefined;
};
/**
 * Whether this purchase is attached at the customer level or entity level.
 */
declare const ListCustomersPurchaseScope: {
    readonly Customer: "customer";
    readonly Entity: "entity";
};
/**
 * Whether this purchase is attached at the customer level or entity level.
 */
type ListCustomersPurchaseScope = OpenEnum<typeof ListCustomersPurchaseScope>;
type ListCustomersPurchase = {
    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?: ListCustomersPurchaseScope | 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 ListCustomersType: {
    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 ListCustomersType = OpenEnum<typeof ListCustomersType>;
type ListCustomersCreditSchema = {
    /**
     * ID of the metered feature that draws from this credit system.
     */
    meteredFeatureId: string;
    /**
     * Credits consumed per unit of the metered feature.
     */
    creditCost: number;
};
type ListCustomersModelMarkups = {
    markup?: number | undefined;
    inputCost?: number | undefined;
    outputCost?: number | undefined;
};
type ListCustomersProviderMarkups = {
    markup: number;
};
/**
 * Display names for the feature in billing UI and customer-facing components.
 */
type ListCustomersDisplay = {
    /**
     * 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 ListCustomersFeature = {
    /**
     * 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: ListCustomersType;
    /**
     * 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<ListCustomersCreditSchema> | undefined;
    /**
     * Per-model markup overrides for AI credit systems.
     */
    modelMarkups?: {
        [k: string]: ListCustomersModelMarkups;
    } | 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]: ListCustomersProviderMarkups;
    } | null | undefined;
    /**
     * Display names for the feature in billing UI and customer-facing components.
     */
    display?: ListCustomersDisplay | undefined;
    /**
     * Whether the feature is archived and hidden from the dashboard.
     */
    archived: boolean;
};
type ListCustomersFlags = {
    /**
     * 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?: ListCustomersFeature | undefined;
};
/**
 * Configuration for the customer.
 */
type ListCustomersConfig = {
    /**
     * 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;
};
/**
 * Stripe processor connection for the customer.
 */
type ListCustomersStripe = {
    /**
     * Stripe customer ID.
     */
    id: string;
};
/**
 * Vercel processor connection for the customer (public-safe subset).
 */
type ListCustomersVercel = {
    /**
     * Vercel marketplace installation ID for this customer.
     */
    installationId: string;
    /**
     * Vercel account ID associated with the installation.
     */
    accountId: string;
};
/**
 * RevenueCat processor connection for the customer.
 */
type ListCustomersRevenuecat = {
    /**
     * Customer's external ID, used as the RevenueCat app user ID. Null if the customer has no external ID set.
     */
    id: string | null;
};
/**
 * Payment processors this customer is connected to (Stripe, Vercel, RevenueCat). Omitted entirely when the customer has not been created in any processor.
 */
type ListCustomersProcessors = {
    /**
     * Stripe processor connection for the customer.
     */
    stripe?: ListCustomersStripe | undefined;
    /**
     * Vercel processor connection for the customer (public-safe subset).
     */
    vercel?: ListCustomersVercel | undefined;
    /**
     * RevenueCat processor connection for the customer.
     */
    revenuecat?: ListCustomersRevenuecat | undefined;
};
type ListCustomersList = {
    /**
     * Your unique identifier for the customer.
     */
    id: string | null;
    /**
     * The name of the customer.
     */
    name: string | null;
    /**
     * The email address of the customer.
     */
    email: string | null;
    /**
     * Timestamp of customer creation in milliseconds since epoch.
     */
    createdAt: number;
    /**
     * A unique identifier (eg. serial number) to de-duplicate customers across devices or browsers. For example: apple device ID.
     */
    fingerprint: string | null;
    /**
     * Stripe customer ID.
     */
    stripeId: string | null;
    /**
     * The environment this customer was created in.
     */
    env: ListCustomersEnv;
    /**
     * The metadata for the customer.
     */
    metadata: {
        [k: string]: any;
    };
    /**
     * Whether to send email receipts to the customer.
     */
    sendEmailReceipts: boolean;
    /**
     * Billing controls for the customer (auto top-ups, etc.)
     */
    billingControls: ListCustomersBillingControls;
    /**
     * Active and scheduled recurring plans that this customer has attached.
     */
    subscriptions: Array<ListCustomersSubscription>;
    /**
     * One-time purchases made by the customer.
     */
    purchases: Array<ListCustomersPurchase>;
    /**
     * Feature balances keyed by feature ID, showing usage limits and remaining amounts.
     */
    balances: {
        [k: string]: Balance;
    };
    /**
     * Boolean feature flags keyed by feature ID, showing enabled access for on/off features.
     */
    flags: {
        [k: string]: ListCustomersFlags;
    };
    /**
     * Configuration for the customer.
     */
    config?: ListCustomersConfig | undefined;
    /**
     * Payment processors this customer is connected to (Stripe, Vercel, RevenueCat). Omitted entirely when the customer has not been created in any processor.
     */
    processors?: ListCustomersProcessors | undefined;
};
/**
 * OK
 */
type ListCustomersResponse = {
    /**
     * Items for current page.
     */
    list: Array<ListCustomersList>;
    /**
     * Opaque cursor for the next page. Null when there are no more results.
     */
    nextCursor: string | null;
};

type ListEntitiesPlan = {
    id: string;
    versions?: Array<number> | undefined;
};
/**
 * Filter customer products used for entity hydration and plan matching. Defaults to active and scheduled.
 */
declare const ListEntitiesSubscriptionStatus: {
    readonly Active: "active";
    readonly Scheduled: "scheduled";
};
/**
 * Filter customer products used for entity hydration and plan matching. Defaults to active and scheduled.
 */
type ListEntitiesSubscriptionStatus = ClosedEnum<typeof ListEntitiesSubscriptionStatus>;
declare const ListEntitiesProcessor: {
    readonly Stripe: "stripe";
    readonly Revenuecat: "revenuecat";
    readonly Vercel: "vercel";
};
type ListEntitiesProcessor = ClosedEnum<typeof ListEntitiesProcessor>;
type ListEntitiesParams = {
    /**
     * 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 by plan ID and version. Returns entities with active subscriptions to this plan, including plans inherited from the parent customer.
     */
    plans?: Array<ListEntitiesPlan> | undefined;
    /**
     * Filter customer products used for entity hydration and plan matching. Defaults to active and scheduled.
     */
    subscriptionStatus?: ListEntitiesSubscriptionStatus | undefined;
    /**
     * Search entities by id or name.
     */
    search?: string | undefined;
    /**
     * Filter by parent customer processor type (stripe, revenuecat, vercel).
     */
    processors?: Array<ListEntitiesProcessor> | undefined;
    /**
     * Restrict the response to entities owned by this customer id. Use to bulk-fetch all entities for one customer in a single paginated call instead of iterating entities.get.
     */
    customerId?: string | undefined;
};
/**
 * The environment (sandbox/live)
 */
declare const ListEntitiesEnv: {
    readonly Sandbox: "sandbox";
    readonly Live: "live";
};
/**
 * The environment (sandbox/live)
 */
type ListEntitiesEnv = OpenEnum<typeof ListEntitiesEnv>;
/**
 * Current status of the subscription.
 */
declare const ListEntitiesStatus: {
    readonly Active: "active";
    readonly Scheduled: "scheduled";
};
/**
 * Current status of the subscription.
 */
type ListEntitiesStatus = OpenEnum<typeof ListEntitiesStatus>;
/**
 * Whether this subscription is attached at the customer level or entity level.
 */
declare const ListEntitiesSubscriptionScope: {
    readonly Customer: "customer";
    readonly Entity: "entity";
};
/**
 * Whether this subscription is attached at the customer level or entity level.
 */
type ListEntitiesSubscriptionScope = OpenEnum<typeof ListEntitiesSubscriptionScope>;
type ListEntitiesSubscription = {
    /**
     * 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: ListEntitiesStatus;
    /**
     * 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?: ListEntitiesSubscriptionScope | undefined;
};
/**
 * Whether this purchase is attached at the customer level or entity level.
 */
declare const ListEntitiesPurchaseScope: {
    readonly Customer: "customer";
    readonly Entity: "entity";
};
/**
 * Whether this purchase is attached at the customer level or entity level.
 */
type ListEntitiesPurchaseScope = OpenEnum<typeof ListEntitiesPurchaseScope>;
type ListEntitiesPurchase = {
    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?: ListEntitiesPurchaseScope | 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 ListEntitiesType: {
    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 ListEntitiesType = OpenEnum<typeof ListEntitiesType>;
type ListEntitiesCreditSchema = {
    /**
     * ID of the metered feature that draws from this credit system.
     */
    meteredFeatureId: string;
    /**
     * Credits consumed per unit of the metered feature.
     */
    creditCost: number;
};
type ListEntitiesModelMarkups = {
    markup?: number | undefined;
    inputCost?: number | undefined;
    outputCost?: number | undefined;
};
type ListEntitiesProviderMarkups = {
    markup: number;
};
/**
 * Display names for the feature in billing UI and customer-facing components.
 */
type ListEntitiesDisplay = {
    /**
     * 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 ListEntitiesFeature = {
    /**
     * 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: ListEntitiesType;
    /**
     * 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<ListEntitiesCreditSchema> | undefined;
    /**
     * Per-model markup overrides for AI credit systems.
     */
    modelMarkups?: {
        [k: string]: ListEntitiesModelMarkups;
    } | 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]: ListEntitiesProviderMarkups;
    } | null | undefined;
    /**
     * Display names for the feature in billing UI and customer-facing components.
     */
    display?: ListEntitiesDisplay | undefined;
    /**
     * Whether the feature is archived and hidden from the dashboard.
     */
    archived: boolean;
};
type ListEntitiesFlags = {
    /**
     * 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?: ListEntitiesFeature | undefined;
};
/**
 * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
 */
declare const ListEntitiesLimitType: {
    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 ListEntitiesLimitType = OpenEnum<typeof ListEntitiesLimitType>;
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
declare const ListEntitiesSpendLimitSource: {
    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 ListEntitiesSpendLimitSource = OpenEnum<typeof ListEntitiesSpendLimitSource>;
type ListEntitiesSpendLimit = {
    /**
     * 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?: ListEntitiesLimitType | 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?: ListEntitiesSpendLimitSource | undefined;
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
declare const ListEntitiesInterval: {
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
type ListEntitiesInterval = OpenEnum<typeof ListEntitiesInterval>;
/**
 * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
 */
type ListEntitiesFilter = {
    properties: {
        [k: string]: any;
    };
};
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
declare const ListEntitiesUsageLimitSource: {
    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 ListEntitiesUsageLimitSource = OpenEnum<typeof ListEntitiesUsageLimitSource>;
type ListEntitiesUsageLimit = {
    /**
     * 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: ListEntitiesInterval;
    /**
     * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
     */
    filter?: ListEntitiesFilter | 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?: ListEntitiesUsageLimitSource | undefined;
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
declare const ListEntitiesThresholdType: {
    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 ListEntitiesThresholdType = OpenEnum<typeof ListEntitiesThresholdType>;
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
declare const ListEntitiesUsageAlertSource: {
    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 ListEntitiesUsageAlertSource = OpenEnum<typeof ListEntitiesUsageAlertSource>;
type ListEntitiesUsageAlert = {
    /**
     * 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: ListEntitiesThresholdType;
    /**
     * 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?: ListEntitiesUsageAlertSource | undefined;
};
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
declare const ListEntitiesOverageAllowedSource: {
    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 ListEntitiesOverageAllowedSource = OpenEnum<typeof ListEntitiesOverageAllowedSource>;
type ListEntitiesOverageAllowed = {
    /**
     * 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?: ListEntitiesOverageAllowedSource | undefined;
};
/**
 * Billing controls for the entity.
 */
type ListEntitiesBillingControls = {
    /**
     * List of spend limits per feature. Each entry caps overage (overage_limit) and/or per-interval usage (usage_limit).
     */
    spendLimits?: Array<ListEntitiesSpendLimit> | undefined;
    /**
     * List of hard usage caps per feature for this entity. An entity entry overrides the customer's for that feature.
     */
    usageLimits?: Array<ListEntitiesUsageLimit> | undefined;
    /**
     * List of usage alert configurations per feature.
     */
    usageAlerts?: Array<ListEntitiesUsageAlert> | undefined;
    /**
     * List of overage allowed controls per feature. When enabled, usage can exceed balance.
     */
    overageAllowed?: Array<ListEntitiesOverageAllowed> | undefined;
};
/**
 * The billing processor that owns this invoice.
 */
declare const ListEntitiesProcessorType: {
    readonly Stripe: "stripe";
    readonly Revenuecat: "revenuecat";
};
/**
 * The billing processor that owns this invoice.
 */
type ListEntitiesProcessorType = OpenEnum<typeof ListEntitiesProcessorType>;
type ListEntitiesInvoice = {
    /**
     * 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: ListEntitiesProcessorType;
    /**
     * 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;
};
type ListEntitiesList = {
    /**
     * 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: ListEntitiesEnv;
    subscriptions: Array<ListEntitiesSubscription>;
    purchases: Array<ListEntitiesPurchase>;
    balances: {
        [k: string]: Balance;
    };
    flags: {
        [k: string]: ListEntitiesFlags;
    };
    /**
     * Billing controls for the entity.
     */
    billingControls?: ListEntitiesBillingControls | undefined;
    /**
     * Invoices for this entity (only included when expand=invoices)
     */
    invoices?: Array<ListEntitiesInvoice> | undefined;
};
/**
 * OK
 */
type ListEntitiesResponse = {
    /**
     * Items for current page.
     */
    list: Array<ListEntitiesList>;
    /**
     * Opaque cursor for the next page. Null when there are no more results.
     */
    nextCursor: string | null;
};

/**
 * 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;
};

type ListFeaturesRequest = {};
/**
 * 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 ListFeaturesType: {
    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 ListFeaturesType = OpenEnum<typeof ListFeaturesType>;
type ListFeaturesCreditSchema = {
    /**
     * ID of the metered feature that draws from this credit system.
     */
    meteredFeatureId: string;
    /**
     * Credits consumed per unit of the metered feature.
     */
    creditCost: number;
};
type ListFeaturesModelMarkups = {
    markup?: number | undefined;
    inputCost?: number | undefined;
    outputCost?: number | undefined;
};
type ListFeaturesProviderMarkups = {
    markup: number;
};
/**
 * Display names for the feature in billing UI and customer-facing components.
 */
type ListFeaturesDisplay = {
    /**
     * 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;
};
type ListFeaturesList = {
    /**
     * 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: ListFeaturesType;
    /**
     * 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<ListFeaturesCreditSchema> | undefined;
    /**
     * Per-model markup overrides for AI credit systems.
     */
    modelMarkups?: {
        [k: string]: ListFeaturesModelMarkups;
    } | 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]: ListFeaturesProviderMarkups;
    } | null | undefined;
    /**
     * Display names for the feature in billing UI and customer-facing components.
     */
    display?: ListFeaturesDisplay | undefined;
    /**
     * Whether the feature is archived and hidden from the dashboard.
     */
    archived: boolean;
};
/**
 * OK
 */
type ListFeaturesResponse = {
    list: Array<ListFeaturesList>;
};

type ListPlansParams = {
    /**
     * Customer ID to include eligibility info (trial availability, attach scenario).
     */
    customerId?: string | undefined;
    /**
     * Entity ID for entity-scoped plans.
     */
    entityId?: string | undefined;
    /**
     * If true, includes archived plans in the response.
     */
    includeArchived?: boolean | undefined;
    /**
     * If true, includes all plan versions.
     */
    allVersions?: boolean | undefined;
};
/**
 * Billing interval (e.g. 'month', 'year').
 */
declare const ListPlansPriceInterval: {
    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 ListPlansPriceInterval = OpenEnum<typeof ListPlansPriceInterval>;
/**
 * Display text for showing this price in pricing pages.
 */
type ListPlansPriceDisplay = {
    /**
     * Main display text (e.g. '$10' or '100 messages').
     */
    primaryText: string;
    /**
     * Secondary display text (e.g. 'per month' or 'then $0.5 per 100').
     */
    secondaryText?: string | undefined;
};
type ListPlansPrice = {
    /**
     * Base price amount for the plan.
     */
    amount: number;
    /**
     * Billing interval (e.g. 'month', 'year').
     */
    interval: ListPlansPriceInterval;
    /**
     * Number of intervals per billing cycle. Defaults to 1.
     */
    intervalCount?: number | undefined;
    /**
     * Display text for showing this price in pricing pages.
     */
    display?: ListPlansPriceDisplay | undefined;
};
/**
 * The type of the feature
 */
declare const ListPlansType: {
    readonly Static: "static";
    readonly Boolean: "boolean";
    readonly SingleUse: "single_use";
    readonly ContinuousUse: "continuous_use";
    readonly CreditSystem: "credit_system";
    readonly AiCreditSystem: "ai_credit_system";
};
/**
 * The type of the feature
 */
type ListPlansType = OpenEnum<typeof ListPlansType>;
type ListPlansFeatureDisplay = {
    /**
     * The singular display name for the feature.
     */
    singular: string;
    /**
     * The plural display name for the feature.
     */
    plural: string;
};
type ListPlansCreditSchema = {
    /**
     * The ID of the metered feature (should be a single_use feature).
     */
    meteredFeatureId: string;
    /**
     * The credit cost of the metered feature.
     */
    creditCost: number;
};
/**
 * The full feature object if expanded.
 */
type ListPlansFeature = {
    /**
     * The ID of the feature, used to refer to it in other API calls like /track or /check.
     */
    id: string;
    /**
     * The name of the feature.
     */
    name?: string | null | undefined;
    /**
     * The type of the feature
     */
    type: ListPlansType;
    /**
     * Singular and plural display names for the feature.
     */
    display?: ListPlansFeatureDisplay | null | undefined;
    /**
     * Credit cost schema for credit system features.
     */
    creditSchema?: Array<ListPlansCreditSchema> | null | undefined;
    /**
     * Whether or not the feature is archived.
     */
    archived?: boolean | null | undefined;
};
/**
 * The interval at which the feature balance resets (e.g. 'month', 'year'). For consumable features, usage resets to 0 and included units are restored.
 */
declare const ListPlansResetItemInterval: {
    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";
};
/**
 * The interval at which the feature balance resets (e.g. 'month', 'year'). For consumable features, usage resets to 0 and included units are restored.
 */
type ListPlansResetItemInterval = OpenEnum<typeof ListPlansResetItemInterval>;
type ListPlansItemReset = {
    /**
     * The interval at which the feature balance resets (e.g. 'month', 'year'). For consumable features, usage resets to 0 and included units are restored.
     */
    interval: ListPlansResetItemInterval;
    /**
     * Number of intervals between resets. Defaults to 1.
     */
    intervalCount?: number | undefined;
};
type ListPlansItemTier = {
    to: number | string;
    amount: number;
    flatAmount?: number | undefined;
};
declare const ListPlansItemTierBehavior: {
    readonly Graduated: "graduated";
    readonly Volume: "volume";
};
type ListPlansItemTierBehavior = OpenEnum<typeof ListPlansItemTierBehavior>;
/**
 * Billing interval for this price. For consumable features, should match reset.interval.
 */
declare const ListPlansPriceItemInterval: {
    readonly OneOff: "one_off";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
/**
 * Billing interval for this price. For consumable features, should match reset.interval.
 */
type ListPlansPriceItemInterval = OpenEnum<typeof ListPlansPriceItemInterval>;
/**
 * 'prepaid' for features like seats where customers pay upfront, 'usage_based' for pay-as-you-go after included usage.
 */
declare const ListPlansItemBillingMethod: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * 'prepaid' for features like seats where customers pay upfront, 'usage_based' for pay-as-you-go after included usage.
 */
type ListPlansItemBillingMethod = OpenEnum<typeof ListPlansItemBillingMethod>;
type ListPlansItemPrice = {
    /**
     * Price per billing_units after included usage is consumed. Mutually exclusive with tiers.
     */
    amount?: number | undefined;
    /**
     * Tiered pricing configuration. Each tier's 'to' INCLUDES the included amount. Either 'tiers' or 'amount' is required.
     */
    tiers?: Array<ListPlansItemTier> | undefined;
    tierBehavior?: ListPlansItemTierBehavior | undefined;
    /**
     * Billing interval for this price. For consumable features, should match reset.interval.
     */
    interval: ListPlansPriceItemInterval;
    /**
     * Number of intervals per billing cycle. Defaults to 1.
     */
    intervalCount?: number | undefined;
    /**
     * Number of units per price increment. Usage is rounded UP to the nearest billing_units when billed (e.g. billing_units=100 means 101 usage rounds to 200).
     */
    billingUnits: number;
    /**
     * 'prepaid' for features like seats where customers pay upfront, 'usage_based' for pay-as-you-go after included usage.
     */
    billingMethod: ListPlansItemBillingMethod;
    /**
     * Maximum units a customer can purchase beyond included. E.g. if included=100 and max_purchase=300, customer can use up to 400 total before usage is capped. Null for no limit.
     */
    maxPurchase: number | null;
};
/**
 * Display text for showing this item in pricing pages.
 */
type ListPlansItemDisplay = {
    /**
     * Main display text (e.g. '$10' or '100 messages').
     */
    primaryText: string;
    /**
     * Secondary display text (e.g. 'per month' or 'then $0.5 per 100').
     */
    secondaryText?: string | undefined;
};
/**
 * When rolled over units expire.
 */
declare const ListPlansItemExpiryDurationType: {
    readonly Month: "month";
    readonly Forever: "forever";
};
/**
 * When rolled over units expire.
 */
type ListPlansItemExpiryDurationType = OpenEnum<typeof ListPlansItemExpiryDurationType>;
/**
 * Rollover configuration for unused units. If set, unused included units roll over to the next period.
 */
type ListPlansItemRollover = {
    /**
     * Maximum rollover units. Null for unlimited rollover.
     */
    max: number | null;
    /**
     * Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
     */
    maxPercentage?: number | null | undefined;
    /**
     * When rolled over units expire.
     */
    expiryDurationType: ListPlansItemExpiryDurationType;
    /**
     * Number of periods before expiry.
     */
    expiryDurationLength?: number | undefined;
};
type ListPlansItem = {
    /**
     * The ID of the feature this item configures.
     */
    featureId: string;
    /**
     * The full feature object if expanded.
     */
    feature?: ListPlansFeature | undefined;
    /**
     * Number of free units included. For consumable features, balance resets to this number each interval.
     */
    included: number;
    /**
     * Whether the customer has unlimited access to this feature.
     */
    unlimited: boolean;
    /**
     * Reset configuration for consumable features. Null for non-consumable features like seats where usage persists across billing cycles.
     */
    reset: ListPlansItemReset | null;
    /**
     * Pricing configuration for usage beyond included units. Null if feature is entirely free.
     */
    price: ListPlansItemPrice | null;
    /**
     * Display text for showing this item in pricing pages.
     */
    display?: ListPlansItemDisplay | undefined;
    /**
     * Rollover configuration for unused units. If set, unused included units roll over to the next period.
     */
    rollover?: ListPlansItemRollover | undefined;
};
/**
 * Unit of time for the trial duration ('day', 'month', 'year').
 */
declare const ListPlansDurationType: {
    readonly Day: "day";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Unit of time for the trial duration ('day', 'month', 'year').
 */
type ListPlansDurationType = OpenEnum<typeof ListPlansDurationType>;
declare const ListPlansOnEnd: {
    readonly Bill: "bill";
    readonly Revert: "revert";
};
type ListPlansOnEnd = OpenEnum<typeof ListPlansOnEnd>;
/**
 * Free trial configuration. If set, new customers can try this plan before being charged.
 */
type ListPlansFreeTrial = {
    /**
     * Number of duration_type periods the trial lasts.
     */
    durationLength: number;
    /**
     * Unit of time for the trial duration ('day', 'month', 'year').
     */
    durationType: ListPlansDurationType;
    /**
     * Whether a payment method is required to start the trial. If true, customer will be charged after trial ends.
     */
    cardRequired: boolean;
    /**
     * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
     */
    onEnd?: ListPlansOnEnd | null | undefined;
};
/**
 * Environment this plan belongs to ('sandbox' or 'live').
 */
declare const ListPlansEnv: {
    readonly Sandbox: "sandbox";
    readonly Live: "live";
};
/**
 * Environment this plan belongs to ('sandbox' or 'live').
 */
type ListPlansEnv = OpenEnum<typeof ListPlansEnv>;
/**
 * Billing interval (e.g. 'month', 'year').
 */
declare const ListPlansPriceVariantDetailsInterval: {
    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 ListPlansPriceVariantDetailsInterval = OpenEnum<typeof ListPlansPriceVariantDetailsInterval>;
/**
 * Base price configuration for a plan.
 */
type ListPlansBasePrice = {
    /**
     * Base price amount for the plan.
     */
    amount: number;
    /**
     * Billing interval (e.g. 'month', 'year').
     */
    interval: ListPlansPriceVariantDetailsInterval;
    /**
     * 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 ListPlansAddItemResetInterval: {
    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 ListPlansAddItemResetInterval = OpenEnum<typeof ListPlansAddItemResetInterval>;
/**
 * Reset configuration for consumable features. Omit for non-consumable features like seats.
 */
type ListPlansVariantDetailsReset = {
    /**
     * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
     */
    interval: ListPlansAddItemResetInterval;
    /**
     * Number of intervals between resets. Defaults to 1.
     */
    intervalCount?: number | undefined;
};
type ListPlansVariantDetailsTier = {
    to?: any | undefined;
    amount: number;
    flatAmount?: number | undefined;
};
declare const ListPlansVariantDetailsTierBehavior: {
    readonly Graduated: "graduated";
    readonly Volume: "volume";
};
type ListPlansVariantDetailsTierBehavior = OpenEnum<typeof ListPlansVariantDetailsTierBehavior>;
/**
 * Billing interval. For consumable features, should match reset.interval.
 */
declare const ListPlansAddItemPriceInterval: {
    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 ListPlansAddItemPriceInterval = OpenEnum<typeof ListPlansAddItemPriceInterval>;
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
declare const ListPlansAddItemBillingMethod: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
type ListPlansAddItemBillingMethod = OpenEnum<typeof ListPlansAddItemBillingMethod>;
/**
 * Pricing for usage beyond included units. Omit for free features.
 */
type ListPlansVariantDetailsPrice = {
    /**
     * 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<ListPlansVariantDetailsTier> | undefined;
    tierBehavior?: ListPlansVariantDetailsTierBehavior | undefined;
    /**
     * Billing interval. For consumable features, should match reset.interval.
     */
    interval: ListPlansAddItemPriceInterval;
    /**
     * Number of intervals per billing cycle. Defaults to 1.
     */
    intervalCount: number;
    /**
     * Units per price increment. Usage is rounded UP when billed (e.g. billing_units=100 means 101 rounds to 200).
     */
    billingUnits: number;
    /**
     * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
     */
    billingMethod: ListPlansAddItemBillingMethod;
    /**
     * 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 ListPlansOnIncrease: {
    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 ListPlansOnIncrease = OpenEnum<typeof ListPlansOnIncrease>;
/**
 * Credit behavior when quantity decreases mid-cycle.
 */
declare const ListPlansOnDecrease: {
    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 ListPlansOnDecrease = OpenEnum<typeof ListPlansOnDecrease>;
/**
 * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
 */
type ListPlansProration = {
    /**
     * Billing behavior when quantity increases mid-cycle.
     */
    onIncrease: ListPlansOnIncrease;
    /**
     * Credit behavior when quantity decreases mid-cycle.
     */
    onDecrease: ListPlansOnDecrease;
};
/**
 * When rolled over units expire.
 */
declare const ListPlansVariantDetailsExpiryDurationType: {
    readonly Month: "month";
    readonly Forever: "forever";
};
/**
 * When rolled over units expire.
 */
type ListPlansVariantDetailsExpiryDurationType = OpenEnum<typeof ListPlansVariantDetailsExpiryDurationType>;
/**
 * Rollover config for unused units. If set, unused included units carry over.
 */
type ListPlansVariantDetailsRollover = {
    /**
     * 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: ListPlansVariantDetailsExpiryDurationType;
    /**
     * Number of periods before expiry.
     */
    expiryDurationLength?: number | undefined;
};
/**
 * Configuration for a feature item in a plan, including usage limits, pricing, and rollover settings.
 */
type ListPlansPlanItem = {
    /**
     * 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?: ListPlansVariantDetailsReset | undefined;
    /**
     * Pricing for usage beyond included units. Omit for free features.
     */
    price?: ListPlansVariantDetailsPrice | undefined;
    /**
     * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
     */
    proration?: ListPlansProration | undefined;
    /**
     * Rollover config for unused units. If set, unused included units carry over.
     */
    rollover?: ListPlansVariantDetailsRollover | undefined;
};
/**
 * Match items with this billing method (prepaid or usage_based).
 */
declare const ListPlansRemoveItemBillingMethod: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * Match items with this billing method (prepaid or usage_based).
 */
type ListPlansRemoveItemBillingMethod = OpenEnum<typeof ListPlansRemoveItemBillingMethod>;
declare const ListPlansIntervalRemoveItemEnum2: {
    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 ListPlansIntervalRemoveItemEnum2 = OpenEnum<typeof ListPlansIntervalRemoveItemEnum2>;
declare const ListPlansIntervalRemoveItemEnum1: {
    readonly OneOff: "one_off";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
type ListPlansIntervalRemoveItemEnum1 = OpenEnum<typeof ListPlansIntervalRemoveItemEnum1>;
/**
 * Filter for matching plan items. All provided fields must match (AND).
 */
type ListPlansPlanItemFilter = {
    /**
     * Match items linked to this feature.
     */
    featureId?: string | undefined;
    /**
     * Match items with this billing method (prepaid or usage_based).
     */
    billingMethod?: ListPlansRemoveItemBillingMethod | 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?: ListPlansIntervalRemoveItemEnum1 | ListPlansIntervalRemoveItemEnum2 | 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 ListPlansVariantDetailsDurationType: {
    readonly Day: "day";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Unit of time for the trial ('day', 'month', 'year').
 */
type ListPlansVariantDetailsDurationType = OpenEnum<typeof ListPlansVariantDetailsDurationType>;
/**
 * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
 */
declare const ListPlansVariantDetailsOnEnd: {
    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 ListPlansVariantDetailsOnEnd = OpenEnum<typeof ListPlansVariantDetailsOnEnd>;
/**
 * Free trial configuration for a plan.
 */
type ListPlansFreeTrialParams = {
    /**
     * Number of duration_type periods the trial lasts.
     */
    durationLength: number;
    /**
     * Unit of time for the trial ('day', 'month', 'year').
     */
    durationType: ListPlansVariantDetailsDurationType;
    /**
     * If true, payment method required to start trial. Customer is charged after trial ends.
     */
    cardRequired: boolean;
    /**
     * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
     */
    onEnd?: ListPlansVariantDetailsOnEnd | undefined;
};
/**
 * The time interval for the purchase limit window.
 */
declare const ListPlansVariantDetailsPurchaseLimitInterval: {
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
};
/**
 * The time interval for the purchase limit window.
 */
type ListPlansVariantDetailsPurchaseLimitInterval = OpenEnum<typeof ListPlansVariantDetailsPurchaseLimitInterval>;
/**
 * Optional rate limit to cap how often auto top-ups occur.
 */
type ListPlansVariantDetailsPurchaseLimit = {
    /**
     * The time interval for the purchase limit window.
     */
    interval: ListPlansVariantDetailsPurchaseLimitInterval;
    /**
     * Number of intervals in the purchase limit window.
     */
    intervalCount: number;
    /**
     * Maximum number of auto top-ups allowed within the interval.
     */
    limit: number;
};
type ListPlansVariantDetailsAutoTopup = {
    /**
     * 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?: ListPlansVariantDetailsPurchaseLimit | 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 ListPlansVariantDetailsLimitType: {
    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 ListPlansVariantDetailsLimitType = OpenEnum<typeof ListPlansVariantDetailsLimitType>;
type ListPlansVariantDetailsSpendLimit = {
    /**
     * 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?: ListPlansVariantDetailsLimitType | 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 ListPlansVariantDetailsUsageLimitInterval: {
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
type ListPlansVariantDetailsUsageLimitInterval = OpenEnum<typeof ListPlansVariantDetailsUsageLimitInterval>;
/**
 * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
 */
type ListPlansVariantDetailsFilter = {
    properties: {
        [k: string]: any;
    };
};
type ListPlansVariantDetailsUsageLimit = {
    /**
     * 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: ListPlansVariantDetailsUsageLimitInterval;
    /**
     * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
     */
    filter?: ListPlansVariantDetailsFilter | undefined;
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
declare const ListPlansVariantDetailsThresholdType: {
    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 ListPlansVariantDetailsThresholdType = OpenEnum<typeof ListPlansVariantDetailsThresholdType>;
type ListPlansVariantDetailsUsageAlert = {
    /**
     * 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: ListPlansVariantDetailsThresholdType;
    /**
     * Optional user-defined label to distinguish multiple alerts on the same feature.
     */
    name?: string | undefined;
};
type ListPlansVariantDetailsOverageAllowed = {
    /**
     * The feature ID this overage allowed control applies to.
     */
    featureId: string;
    /**
     * Whether overage is allowed for this feature.
     */
    enabled: boolean;
};
/**
 * Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
 */
type ListPlansVariantDetailsBillingControls = {
    /**
     * List of auto top-up configurations per feature.
     */
    autoTopups?: Array<ListPlansVariantDetailsAutoTopup> | undefined;
    /**
     * List of overage spend limits per feature (caps overage spend).
     */
    spendLimits?: Array<ListPlansVariantDetailsSpendLimit> | undefined;
    /**
     * List of hard usage caps per feature (max units per interval).
     */
    usageLimits?: Array<ListPlansVariantDetailsUsageLimit> | undefined;
    /**
     * List of usage alert configurations per feature.
     */
    usageAlerts?: Array<ListPlansVariantDetailsUsageAlert> | undefined;
    /**
     * List of overage allowed controls per feature. When enabled, usage can exceed balance.
     */
    overageAllowed?: Array<ListPlansVariantDetailsOverageAllowed> | undefined;
};
/**
 * The customization that transforms the base plan into this variant.
 */
type ListPlansCustomize = {
    /**
     * Override the base price of the plan. Pass null to remove the base price.
     */
    price?: ListPlansBasePrice | null | undefined;
    /**
     * Items to add to the plan.
     */
    addItems?: Array<ListPlansPlanItem> | undefined;
    /**
     * Filters selecting items to remove from the plan.
     */
    removeItems?: Array<ListPlansPlanItemFilter> | undefined;
    /**
     * Override the plan's default free trial. Pass an object to set a custom trial, or null to remove the trial entirely.
     */
    freeTrial?: ListPlansFreeTrialParams | null | undefined;
    /**
     * Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
     */
    billingControls?: ListPlansVariantDetailsBillingControls | undefined;
};
/**
 * Details about how this variant relates to its latest base plan.
 */
type ListPlansVariantDetails = {
    /**
     * The ID of the base plan this variant was derived from.
     */
    basePlanId: string;
    /**
     * The customization that transforms the base plan into this variant.
     */
    customize?: ListPlansCustomize | undefined;
};
/**
 * Miscellaneous plan-level configuration flags.
 */
type ListPlansConfig = {
    /**
     * If true, entitlements attached to this plan will still reset on schedule even when the customer's product is in a past_due state.
     */
    ignorePastDue: boolean;
};
/**
 * The time interval for the purchase limit window.
 */
declare const ListPlansPurchaseLimitInterval: {
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
};
/**
 * The time interval for the purchase limit window.
 */
type ListPlansPurchaseLimitInterval = OpenEnum<typeof ListPlansPurchaseLimitInterval>;
/**
 * Optional rate limit to cap how often auto top-ups occur.
 */
type ListPlansPurchaseLimit = {
    /**
     * The time interval for the purchase limit window.
     */
    interval: ListPlansPurchaseLimitInterval;
    /**
     * Number of intervals in the purchase limit window.
     */
    intervalCount: number;
    /**
     * Maximum number of auto top-ups allowed within the interval.
     */
    limit: number;
};
type ListPlansAutoTopup = {
    /**
     * 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?: ListPlansPurchaseLimit | 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 ListPlansLimitType: {
    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 ListPlansLimitType = OpenEnum<typeof ListPlansLimitType>;
type ListPlansSpendLimit = {
    /**
     * 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?: ListPlansLimitType | 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 ListPlansUsageLimitInterval: {
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
type ListPlansUsageLimitInterval = OpenEnum<typeof ListPlansUsageLimitInterval>;
/**
 * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
 */
type ListPlansFilter = {
    properties: {
        [k: string]: any;
    };
};
type ListPlansUsageLimit = {
    /**
     * 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: ListPlansUsageLimitInterval;
    /**
     * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
     */
    filter?: ListPlansFilter | undefined;
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
declare const ListPlansThresholdType: {
    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 ListPlansThresholdType = OpenEnum<typeof ListPlansThresholdType>;
type ListPlansUsageAlert = {
    /**
     * 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: ListPlansThresholdType;
    /**
     * Optional user-defined label to distinguish multiple alerts on the same feature.
     */
    name?: string | undefined;
};
type ListPlansOverageAllowed = {
    /**
     * 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 ListPlansBillingControls = {
    /**
     * List of auto top-up configurations per feature.
     */
    autoTopups?: Array<ListPlansAutoTopup> | undefined;
    /**
     * List of overage spend limits per feature (caps overage spend).
     */
    spendLimits?: Array<ListPlansSpendLimit> | undefined;
    /**
     * List of hard usage caps per feature (max units per interval).
     */
    usageLimits?: Array<ListPlansUsageLimit> | undefined;
    /**
     * List of usage alert configurations per feature.
     */
    usageAlerts?: Array<ListPlansUsageAlert> | undefined;
    /**
     * List of overage allowed controls per feature. When enabled, usage can exceed balance.
     */
    overageAllowed?: Array<ListPlansOverageAllowed> | undefined;
};
/**
 * The customer's current status with this plan. 'active' if attached, 'scheduled' if pending activation.
 */
declare const ListPlansStatus: {
    readonly Active: "active";
    readonly Scheduled: "scheduled";
};
/**
 * The customer's current status with this plan. 'active' if attached, 'scheduled' if pending activation.
 */
type ListPlansStatus = OpenEnum<typeof ListPlansStatus>;
/**
 * The action that would occur if this plan were attached to the customer.
 */
declare const ListPlansAttachAction: {
    readonly Activate: "activate";
    readonly Upgrade: "upgrade";
    readonly Downgrade: "downgrade";
    readonly None: "none";
    readonly Purchase: "purchase";
};
/**
 * The action that would occur if this plan were attached to the customer.
 */
type ListPlansAttachAction = OpenEnum<typeof ListPlansAttachAction>;
type ListPlansCustomerEligibility = {
    /**
     * Whether the trial on this plan is available to this customer. For example, if the customer used the trial in the past, this will be false.
     */
    trialAvailable?: boolean | undefined;
    /**
     * The customer's current status with this plan. 'active' if attached, 'scheduled' if pending activation.
     */
    status?: ListPlansStatus | undefined;
    /**
     * Whether the customer's active instance of this plan is set to cancel.
     */
    canceling?: boolean | undefined;
    /**
     * Whether the customer is currently on a free trial of this plan.
     */
    trialing?: boolean | undefined;
    /**
     * The action that would occur if this plan were attached to the customer.
     */
    attachAction: ListPlansAttachAction;
};
/**
 * A plan defines a set of features, pricing, and entitlements that can be attached to customers.
 */
type ListPlansList = {
    /**
     * Unique identifier for the plan.
     */
    id: string;
    /**
     * Display name of the plan.
     */
    name: string;
    /**
     * Optional description of the plan.
     */
    description: string | null;
    /**
     * Group identifier for organizing related plans. Plans in the same group are mutually exclusive.
     */
    group: string | null;
    /**
     * Version number of the plan. Incremented when plan configuration changes.
     */
    version: number;
    /**
     * Whether this is an add-on plan that can be attached alongside a main plan.
     */
    addOn: boolean;
    /**
     * If true, this plan is automatically attached when a customer is created. Used for free plans.
     */
    autoEnable: boolean;
    /**
     * Base recurring price for the plan. Null for free plans or usage-only plans.
     */
    price: ListPlansPrice | null;
    /**
     * Feature configurations included in this plan. Each item defines included units, pricing, and reset behavior for a feature.
     */
    items: Array<ListPlansItem>;
    /**
     * Free trial configuration. If set, new customers can try this plan before being charged.
     */
    freeTrial?: ListPlansFreeTrial | undefined;
    /**
     * Unix timestamp (ms) when the plan was created.
     */
    createdAt: number;
    /**
     * Environment this plan belongs to ('sandbox' or 'live').
     */
    env: ListPlansEnv;
    /**
     * Whether the plan is archived. Archived plans cannot be attached to new customers.
     */
    archived: boolean;
    /**
     * Deprecated. Use variant_details.base_plan_id instead. If this is a variant, the ID of the base plan it was created from.
     */
    baseVariantId: string | null;
    /**
     * Details about how this variant relates to its latest base plan.
     */
    variantDetails?: ListPlansVariantDetails | undefined;
    /**
     * Miscellaneous plan-level configuration flags.
     */
    config: ListPlansConfig;
    /**
     * Plan-level billing controls used as customer defaults.
     */
    billingControls?: ListPlansBillingControls | undefined;
    /**
     * Arbitrary key-value metadata defined by you for your own use. Shared across all versions of the plan.
     */
    metadata: {
        [k: string]: any;
    };
    customerEligibility?: ListPlansCustomerEligibility | undefined;
};
/**
 * OK
 */
type ListPlansResponse = {
    list: Array<ListPlansList>;
};

type RewardsListParams = {};
/**
 * The type of discount: percentage_discount, fixed_discount, or invoice_credits.
 */
declare const CouponType: {
    readonly PercentageDiscount: "percentage_discount";
    readonly FixedDiscount: "fixed_discount";
    readonly InvoiceCredits: "invoice_credits";
};
/**
 * The type of discount: percentage_discount, fixed_discount, or invoice_credits.
 */
type CouponType = OpenEnum<typeof CouponType>;
/**
 * The unit of time the duration is measured in.
 */
declare const DurationType: {
    readonly OneOff: "one_off";
    readonly Months: "months";
    readonly Forever: "forever";
};
/**
 * The unit of time the duration is measured in.
 */
type DurationType = OpenEnum<typeof DurationType>;
/**
 * How long the coupon applies once redeemed.
 */
type ListRewardsDuration = {
    /**
     * The unit of time the duration is measured in.
     */
    type: DurationType;
    /**
     * The number of `type` periods the duration lasts, or null when the type has no length (e.g. one_off, forever).
     */
    length: number | null;
};
type CouponPromoCode = {
    /**
     * The promo code customers enter to redeem the coupon.
     */
    code: string;
    /**
     * Maximum number of times this promo code can be redeemed across all customers, or null for unlimited.
     */
    globalMaxRedemption?: number | null | undefined;
    /**
     * Whether this promo code can only be applied to a customer's first transaction.
     */
    firstTimeTransaction?: boolean | null | undefined;
};
type Coupon = {
    /**
     * The unique identifier for the coupon.
     */
    id: string;
    /**
     * A human-readable name for the coupon.
     */
    name?: string | null | undefined;
    /**
     * The type of discount: percentage_discount, fixed_discount, or invoice_credits.
     */
    type: CouponType;
    /**
     * The discount value. A percentage for percentage_discount, or an amount for fixed_discount / invoice_credits.
     */
    value: number;
    /**
     * How long the coupon applies once redeemed.
     */
    duration: ListRewardsDuration;
    /**
     * The plan IDs the coupon applies to, or null when it applies to all plans.
     */
    planIds: Array<string> | null;
    /**
     * The promo codes customers can use to redeem the coupon.
     */
    promoCodes: Array<CouponPromoCode>;
    /**
     * The Unix timestamp (in milliseconds) when the coupon was created.
     */
    createdAt: number;
};
/**
 * The unit of time the duration is measured in.
 */
declare const ExpiryType: {
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * The unit of time the duration is measured in.
 */
type ExpiryType = OpenEnum<typeof ExpiryType>;
type Expiry = {
    /**
     * The unit of time the duration is measured in.
     */
    type: ExpiryType;
    /**
     * The number of `type` periods the duration lasts, or null when the type has no length (e.g. one_off, forever).
     */
    length: number | null;
};
type Grant = {
    /**
     * The feature ID this grant applies to.
     */
    featureId: string;
    /**
     * The amount of the feature granted, or null for boolean features.
     */
    included: number | null;
    /**
     * How long the granted amount lasts before expiring, or null for a permanent grant.
     */
    expiry: Expiry | null;
};
type FeatureGrantPromoCode = {
    /**
     * The promo code customers enter to redeem the feature grant.
     */
    code: string;
    /**
     * Maximum number of times this promo code can be redeemed, or null for unlimited.
     */
    maxUses: number | null;
};
type FeatureGrant = {
    /**
     * The unique identifier for the feature grant.
     */
    id: string;
    /**
     * A human-readable name for the feature grant.
     */
    name?: string | null | undefined;
    /**
     * The feature grants awarded when the grant is redeemed.
     */
    grants: Array<Grant>;
    /**
     * The promo codes customers can use to redeem the feature grant.
     */
    promoCodes: Array<FeatureGrantPromoCode>;
    /**
     * The Unix timestamp (in milliseconds) when the feature grant was created.
     */
    createdAt: number;
};
/**
 * OK
 */
type ListRewardsResponse = {
    /**
     * The list of coupons configured for the organization.
     */
    coupons: Array<Coupon>;
    /**
     * The list of feature grants configured for the organization.
     */
    featureGrants: Array<FeatureGrant>;
};

type MintKeyParams = {
    /**
     * The customer to mint a token for.
     */
    customerId: string;
    /**
     * If true, mint a non-expiring access token (no refresh token). Revoke via keys.revoke.
     */
    indefinite?: boolean | undefined;
};
/**
 * OK
 */
type MintKeyResponse = {
    /**
     * Access token (1h, or non-expiring if indefinite), prefixed `am_jwt_`.
     */
    accessToken: string;
    /**
     * Rotating refresh token (24h). Omitted for indefinite tokens.
     */
    refreshToken?: string | undefined;
    /**
     * Access-token expiry, ms since epoch. null for indefinite tokens.
     */
    expiresAt: number | null;
    /**
     * Refresh-token expiry, ms since epoch. Omitted for indefinite tokens.
     */
    refreshExpiresAt?: number | undefined;
};

/**
 * 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;
};

/**
 * 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 MultiUpdateCancelAction: {
    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 MultiUpdateCancelAction = ClosedEnum<typeof MultiUpdateCancelAction>;
/**
 * How to handle proration for this update. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
 */
declare const MultiUpdateProrationBehavior: {
    readonly ProrateImmediately: "prorate_immediately";
    readonly None: "none";
};
/**
 * How to handle proration for this update. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
 */
type MultiUpdateProrationBehavior = ClosedEnum<typeof MultiUpdateProrationBehavior>;
type MultiUpdateUpdate = {
    /**
     * The ID of the plan to update. Optional if subscription_id is provided.
     */
    planId?: string | undefined;
    /**
     * A unique ID to identify the subscription to update. Useful when a customer has multiple products with the same plan.
     */
    subscriptionId?: string | undefined;
    /**
     * The ID of the entity this update targets. Overrides the top-level entity_id for this update.
     */
    entityId?: 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.
     */
    cancelAction: MultiUpdateCancelAction;
    /**
     * How to handle proration for this update. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
     */
    prorationBehavior?: MultiUpdateProrationBehavior | undefined;
};
type MultiUpdateParams = {
    /**
     * The ID of the customer to update plans for.
     */
    customerId: string;
    /**
     * The ID of the entity to update plans for. Individual updates can override this with their own entity_id.
     */
    entityId?: string | undefined;
    /**
     * The list of plan updates to apply to the customer.
     */
    updates: Array<MultiUpdateUpdate>;
};
/**
 * Invoice details if an invoice was created. Only present when a charge was made.
 */
type MultiUpdateInvoice = {
    /**
     * 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 MultiUpdateCode: {
    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 MultiUpdateCode = OpenEnum<typeof MultiUpdateCode>;
/**
 * Details about any action required to complete the payment. Present when the payment could not be processed automatically.
 */
type MultiUpdateRequiredAction = {
    /**
     * The type of action required to complete the payment.
     */
    code: MultiUpdateCode;
    /**
     * A human-readable explanation of why this action is required.
     */
    reason: string;
};
/**
 * OK
 */
type MultiUpdateResponse = {
    /**
     * 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?: MultiUpdateInvoice | 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?: MultiUpdateRequiredAction | 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;
};

/**
 * 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 PreviewMultiUpdateCancelAction: {
    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 PreviewMultiUpdateCancelAction = ClosedEnum<typeof PreviewMultiUpdateCancelAction>;
/**
 * How to handle proration for this update. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
 */
declare const PreviewMultiUpdateProrationBehavior: {
    readonly ProrateImmediately: "prorate_immediately";
    readonly None: "none";
};
/**
 * How to handle proration for this update. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
 */
type PreviewMultiUpdateProrationBehavior = ClosedEnum<typeof PreviewMultiUpdateProrationBehavior>;
type PreviewMultiUpdateUpdate = {
    /**
     * The ID of the plan to update. Optional if subscription_id is provided.
     */
    planId?: string | undefined;
    /**
     * A unique ID to identify the subscription to update. Useful when a customer has multiple products with the same plan.
     */
    subscriptionId?: string | undefined;
    /**
     * The ID of the entity this update targets. Overrides the top-level entity_id for this update.
     */
    entityId?: 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.
     */
    cancelAction: PreviewMultiUpdateCancelAction;
    /**
     * How to handle proration for this update. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges.
     */
    prorationBehavior?: PreviewMultiUpdateProrationBehavior | undefined;
};
type PreviewMultiUpdateParams = {
    /**
     * The ID of the customer to update plans for.
     */
    customerId: string;
    /**
     * The ID of the entity to update plans for. Individual updates can override this with their own entity_id.
     */
    entityId?: string | undefined;
    /**
     * The list of plan updates to apply to the customer.
     */
    updates: Array<PreviewMultiUpdateUpdate>;
};
type PreviewMultiUpdateDiscount = {
    amountOff: number;
    percentOff?: number | undefined;
    rewardId?: string | undefined;
    rewardName?: string | undefined;
};
/**
 * The period of time that this line item is being charged for.
 */
type PreviewMultiUpdateLineItemPeriod = {
    /**
     * 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 PreviewMultiUpdateLineItem = {
    /**
     * 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<PreviewMultiUpdateDiscount> | 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?: PreviewMultiUpdateLineItemPeriod | undefined;
    /**
     * The quantity of the line item.
     */
    quantity: number;
};
type PreviewMultiUpdateNextCycleDiscount = {
    amountOff: number;
    percentOff?: number | undefined;
    rewardId?: string | undefined;
    rewardName?: string | undefined;
};
/**
 * The period of time that this line item is being charged for.
 */
type PreviewMultiUpdateNextCycleLineItemPeriod = {
    /**
     * 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 PreviewMultiUpdateNextCycleLineItem = {
    /**
     * 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<PreviewMultiUpdateNextCycleDiscount> | 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?: PreviewMultiUpdateNextCycleLineItemPeriod | undefined;
    /**
     * The quantity of the line item.
     */
    quantity: number;
};
/**
 * The period of time that this line item is being charged for.
 */
type PreviewMultiUpdateUsageLineItemPeriod = {
    /**
     * 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 PreviewMultiUpdateUsageLineItem = {
    /**
     * 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?: PreviewMultiUpdateUsageLineItemPeriod | undefined;
};
/**
 * Preview of the next billing cycle, if applicable. This shows what the customer will be charged in subsequent cycles.
 */
type PreviewMultiUpdateNextCycle = {
    /**
     * 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<PreviewMultiUpdateNextCycleLineItem>;
    /**
     * List of line items for usage-based features in the next cycle.
     */
    usageLineItems: Array<PreviewMultiUpdateUsageLineItem>;
};
type PreviewMultiUpdateIncomingFeatureQuantity = {
    /**
     * 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 PreviewMultiUpdateIncoming = {
    /**
     * 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<PreviewMultiUpdateIncomingFeatureQuantity>;
    /**
     * 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 PreviewMultiUpdateOutgoingFeatureQuantity = {
    /**
     * 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 PreviewMultiUpdateOutgoing = {
    /**
     * 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<PreviewMultiUpdateOutgoingFeatureQuantity>;
    /**
     * 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 PreviewMultiUpdateSubscription = {
    /**
     * The ID of the customer.
     */
    customerId: string;
    /**
     * List of line items for the current billing period.
     */
    lineItems: Array<PreviewMultiUpdateLineItem>;
    /**
     * 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?: PreviewMultiUpdateNextCycle | undefined;
    /**
     * Expand the response with additional data.
     */
    expand?: Array<string> | undefined;
    /**
     * Products or subscription changes being added or updated.
     */
    incoming: Array<PreviewMultiUpdateIncoming>;
    /**
     * Products or subscription changes being removed or ended.
     */
    outgoing: Array<PreviewMultiUpdateOutgoing>;
    /**
     * The IDs of the plans updated on this subscription.
     */
    planIds: Array<string>;
};
/**
 * OK
 */
type MultiUpdatePreviewResponse = {
    /**
     * The ID of the customer the preview applies to.
     */
    customerId: string;
    /**
     * The three-letter ISO currency code (e.g., 'usd').
     */
    currency: string;
    /**
     * The combined amount due today across all subscriptions (sum of subscriptions[].total).
     */
    total: number;
    /**
     * One preview per affected Stripe subscription. Updates to plans without a subscription (free plans) produce no entry.
     */
    subscriptions: Array<PreviewMultiUpdateSubscription>;
};

/**
 * 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;
};

type RedeemRewardCodeParams = {
    /**
     * The reward promo code to redeem
     */
    code: string;
    /**
     * The unique identifier of the customer redeeming the code
     */
    customerId: string;
};
type EntitlementsGranted = {
    /**
     * The ID of the feature granted by the reward
     */
    featureId: string;
    /**
     * The balance granted for the feature
     */
    balance: number;
};
/**
 * OK
 */
type RedeemRewardCodeResponse = {
    /**
     * The ID of the redeemed reward
     */
    rewardId: string;
    /**
     * The feature balances granted to the customer
     */
    entitlementsGranted: Array<EntitlementsGranted>;
};

/**
 * No body. The refresh token is supplied as the Bearer credential; the response is a freshly rotated access + refresh pair.
 */
type RefreshKeyParams = {};
/**
 * OK
 */
type RefreshKeyResponse = {
    /**
     * Access token (1h, or non-expiring if indefinite), prefixed `am_jwt_`.
     */
    accessToken: string;
    /**
     * Rotating refresh token (24h). Omitted for indefinite tokens.
     */
    refreshToken?: string | undefined;
    /**
     * Access-token expiry, ms since epoch. null for indefinite tokens.
     */
    expiresAt: number | null;
    /**
     * Refresh-token expiry, ms since epoch. Omitted for indefinite tokens.
     */
    refreshExpiresAt?: number | undefined;
};

type RevokeKeyParams = {
    /**
     * The customer whose tokens (every outstanding access + refresh token) should be revoked.
     */
    customerId: string;
};
/**
 * OK
 */
type RevokeKeyResponse = {
    revoked: true;
};

/**
 * 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;
};

/**
 * "test" and "sandbox" both target the sandbox environment
 */
declare const SyncRevenueCatEnv: {
    readonly Test: "test";
    readonly Sandbox: "sandbox";
    readonly Live: "live";
};
/**
 * "test" and "sandbox" both target the sandbox environment
 */
type SyncRevenueCatEnv = ClosedEnum<typeof SyncRevenueCatEnv>;
type SyncRevenueCatParams = {
    organizationSlug: string;
    /**
     * "test" and "sandbox" both target the sandbox environment
     */
    env: SyncRevenueCatEnv;
    /**
     * Plans to push. Omit to sync every plan in the org/env.
     */
    productIds?: Array<string> | undefined;
};
declare const SyncRevenueCatStatus: {
    readonly Synced: "synced";
    readonly Skipped: "skipped";
    readonly Error: "error";
};
type SyncRevenueCatStatus = OpenEnum<typeof SyncRevenueCatStatus>;
declare const SyncRevenueCatProduct: {
    readonly Created: "created";
    readonly Updated: "updated";
    readonly Exists: "exists";
};
type SyncRevenueCatProduct = OpenEnum<typeof SyncRevenueCatProduct>;
declare const StorePush: {
    readonly Pushed: "pushed";
    readonly Failed: "failed";
    readonly Skipped: "skipped";
};
type StorePush = OpenEnum<typeof StorePush>;
declare const SyncRevenueCatPrice: {
    readonly Set: "set";
    readonly Skipped: "skipped";
    readonly Failed: "failed";
};
type SyncRevenueCatPrice = OpenEnum<typeof SyncRevenueCatPrice>;
type SyncRevenueCatApp = {
    appId: string;
    appType: string;
    product: SyncRevenueCatProduct;
    storePush?: StorePush | undefined;
    price?: SyncRevenueCatPrice | undefined;
    message?: string | undefined;
};
type Result = {
    planId: string;
    status: SyncRevenueCatStatus;
    storeIdentifier?: string | undefined;
    apps?: Array<SyncRevenueCatApp> | undefined;
    message?: string | undefined;
};
/**
 * OK
 */
type SyncRevenueCatResponse = {
    results: Array<Result>;
};

type TrackLock = {
    /**
     * 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 TrackParams = {
    /**
     * The ID of the customer.
     */
    customerId: string;
    /**
     * The ID of the feature to track usage for. Required if event_name is not provided.
     */
    featureId?: string | undefined;
    /**
     * The ID of the entity for entity-scoped balances (e.g., per-seat limits).
     */
    entityId?: string | undefined;
    /**
     * Event name to track usage for. Use instead of feature_id when multiple features should be tracked from a single event.
     */
    eventName?: string | undefined;
    /**
     * The amount of usage to record. Defaults to 1. Use negative values to credit balance (e.g., when removing a seat).
     */
    value?: number | undefined;
    /**
     * Additional properties to attach to this usage event.
     */
    properties?: {
        [k: string]: any;
    } | undefined;
    /**
     * Unix timestamp in milliseconds to use for the usage event. Defaults to the current time.
     */
    timestamp?: number | undefined;
    /**
     * If true, enqueue the event for asynchronous processing and return 204 immediately. The response will not include balance information.
     */
    async?: boolean | undefined;
    lock?: TrackLock | undefined;
};
declare const TrackIntervalEnum2: {
    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 TrackIntervalEnum2 = OpenEnum<typeof TrackIntervalEnum2>;
type TrackReset2 = {
    /**
     * The reset interval (hour, day, week, month, etc.) or 'multiple' if combined from different intervals.
     */
    interval: TrackIntervalEnum2 | 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 TrackDeduction2 = {
    /**
     * 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: TrackReset2 | 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;
};
/**
 * Accepted. Autumn is experiencing degraded service from a downstream provider, so the event was accepted for replay and will be tracked as soon as the service is restored.
 */
type TrackResponseBody2 = {
    /**
     * The ID of the customer whose usage was tracked.
     */
    customerId: string;
    /**
     * The ID of the entity, if entity-scoped tracking was performed.
     */
    entityId?: string | undefined;
    /**
     * The event name that was tracked, if event_name was used instead of feature_id.
     */
    eventName?: string | undefined;
    /**
     * The amount of usage that was recorded.
     */
    value: number;
    /**
     * The updated balance for the tracked feature. Null if tracking by event_name that affects multiple features.
     */
    balance: Balance | null;
    /**
     * Map of feature_id to updated balance for the tracked feature and any related features (e.g. linked credit systems). Value is null when the customer has no balance for that feature.
     */
    balances?: {
        [k: string]: Balance | null;
    } | undefined;
    /**
     * Per-balance breakdown of what this event deducted. A single event can consume from multiple balance rows when credit systems or rollovers are involved; this surfaces each one so callers can build per-feature usage views without polling.
     */
    deductions?: Array<TrackDeduction2> | undefined;
};
declare const TrackIntervalEnum1: {
    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 TrackIntervalEnum1 = OpenEnum<typeof TrackIntervalEnum1>;
type TrackReset1 = {
    /**
     * The reset interval (hour, day, week, month, etc.) or 'multiple' if combined from different intervals.
     */
    interval: TrackIntervalEnum1 | 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 TrackDeduction1 = {
    /**
     * 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: TrackReset1 | 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;
};
/**
 * OK
 */
type TrackResponseBody1 = {
    /**
     * The ID of the customer whose usage was tracked.
     */
    customerId: string;
    /**
     * The ID of the entity, if entity-scoped tracking was performed.
     */
    entityId?: string | undefined;
    /**
     * The event name that was tracked, if event_name was used instead of feature_id.
     */
    eventName?: string | undefined;
    /**
     * The amount of usage that was recorded.
     */
    value: number;
    /**
     * The updated balance for the tracked feature. Null if tracking by event_name that affects multiple features.
     */
    balance: Balance | null;
    /**
     * Map of feature_id to updated balance for the tracked feature and any related features (e.g. linked credit systems). Value is null when the customer has no balance for that feature.
     */
    balances?: {
        [k: string]: Balance | null;
    } | undefined;
    /**
     * Per-balance breakdown of what this event deducted. A single event can consume from multiple balance rows when credit systems or rollovers are involved; this surfaces each one so callers can build per-feature usage views without polling.
     */
    deductions?: Array<TrackDeduction1> | undefined;
};
type TrackResponse = TrackResponseBody1 | TrackResponseBody2;

type TrackTokensParams = {
    /**
     * The ID of the customer.
     */
    customerId: string;
    /**
     * The ID of the entity for entity-scoped balances.
     */
    entityId?: string | undefined;
    /**
     * The ID of the AI credit system feature. Auto-detected from the customer's entitlements if omitted — only required when a customer has multiple AI credit systems.
     */
    featureId?: string | undefined;
    /**
     * The AI model as '[provider]/[model]' (e.g. 'anthropic/claude-opus-4-8', 'openrouter/openai/gpt-4o'). The provider is the first path segment and must match a provider + model key in models.dev.
     */
    modelId: string;
    /**
     * Number of non-cached text input tokens consumed. Exclusive of cache and audio token pools.
     */
    inputTokens: number;
    /**
     * Number of text output tokens consumed. Exclusive of the reasoning and audio output pools.
     */
    outputTokens: number;
    /**
     * Number of cached input tokens read.
     */
    cacheReadTokens?: number | undefined;
    /**
     * Number of input tokens written to the cache.
     */
    cacheWriteTokens?: number | undefined;
    /**
     * Number of audio input tokens consumed.
     */
    audioInputTokens?: number | undefined;
    /**
     * Number of audio output tokens generated.
     */
    audioOutputTokens?: number | undefined;
    /**
     * Number of reasoning tokens generated.
     */
    reasoningTokens?: number | undefined;
    /**
     * Additional properties to attach to this usage event.
     */
    properties?: {
        [k: string]: any;
    } | undefined;
    /**
     * Unix timestamp in milliseconds to use for the usage event. Defaults to the current time.
     */
    timestamp?: number | undefined;
    /**
     * If true, enqueue the event for asynchronous processing and return 204 immediately. The response will not include balance information.
     */
    async?: boolean | undefined;
};
declare const TrackTokensIntervalEnum2: {
    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 TrackTokensIntervalEnum2 = OpenEnum<typeof TrackTokensIntervalEnum2>;
type TrackTokensReset2 = {
    /**
     * The reset interval (hour, day, week, month, etc.) or 'multiple' if combined from different intervals.
     */
    interval: TrackTokensIntervalEnum2 | 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 TrackTokensDeduction2 = {
    /**
     * 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: TrackTokensReset2 | 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;
};
/**
 * Accepted. Autumn is experiencing degraded service from a downstream provider, so the token usage event was accepted for replay and will be tracked as soon as the service is restored.
 */
type TrackTokensResponseBody2 = {
    /**
     * The ID of the customer whose usage was tracked.
     */
    customerId: string;
    /**
     * The ID of the entity, if entity-scoped tracking was performed.
     */
    entityId?: string | undefined;
    /**
     * The event name that was tracked, if event_name was used instead of feature_id.
     */
    eventName?: string | undefined;
    /**
     * The amount of usage that was recorded.
     */
    value: number;
    /**
     * The updated balance for the tracked feature. Null if tracking by event_name that affects multiple features.
     */
    balance: Balance | null;
    /**
     * Map of feature_id to updated balance for the tracked feature and any related features (e.g. linked credit systems). Value is null when the customer has no balance for that feature.
     */
    balances?: {
        [k: string]: Balance | null;
    } | undefined;
    /**
     * Per-balance breakdown of what this event deducted. A single event can consume from multiple balance rows when credit systems or rollovers are involved; this surfaces each one so callers can build per-feature usage views without polling.
     */
    deductions?: Array<TrackTokensDeduction2> | undefined;
};
declare const TrackTokensIntervalEnum1: {
    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 TrackTokensIntervalEnum1 = OpenEnum<typeof TrackTokensIntervalEnum1>;
type TrackTokensReset1 = {
    /**
     * The reset interval (hour, day, week, month, etc.) or 'multiple' if combined from different intervals.
     */
    interval: TrackTokensIntervalEnum1 | 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 TrackTokensDeduction1 = {
    /**
     * 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: TrackTokensReset1 | 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;
};
/**
 * OK
 */
type TrackTokensResponseBody1 = {
    /**
     * The ID of the customer whose usage was tracked.
     */
    customerId: string;
    /**
     * The ID of the entity, if entity-scoped tracking was performed.
     */
    entityId?: string | undefined;
    /**
     * The event name that was tracked, if event_name was used instead of feature_id.
     */
    eventName?: string | undefined;
    /**
     * The amount of usage that was recorded.
     */
    value: number;
    /**
     * The updated balance for the tracked feature. Null if tracking by event_name that affects multiple features.
     */
    balance: Balance | null;
    /**
     * Map of feature_id to updated balance for the tracked feature and any related features (e.g. linked credit systems). Value is null when the customer has no balance for that feature.
     */
    balances?: {
        [k: string]: Balance | null;
    } | undefined;
    /**
     * Per-balance breakdown of what this event deducted. A single event can consume from multiple balance rows when credit systems or rollovers are involved; this surfaces each one so callers can build per-feature usage views without polling.
     */
    deductions?: Array<TrackTokensDeduction1> | undefined;
};
type TrackTokensResponse = TrackTokensResponseBody1 | TrackTokensResponseBody2;

/**
 * Target a specific balance by its reset interval. Use when the customer has multiple balances for the same feature with different reset intervals.
 */
declare const UpdateBalanceInterval: {
    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";
};
/**
 * Target a specific balance by its reset interval. Use when the customer has multiple balances for the same feature with different reset intervals.
 */
type UpdateBalanceInterval = ClosedEnum<typeof UpdateBalanceInterval>;
type UpdateBalanceParams = {
    /**
     * 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;
    /**
     * Set the remaining balance to this exact value. Cannot be combined with add_to_balance.
     */
    remaining?: number | undefined;
    /**
     * Add this amount to the current balance. Use negative values to subtract. Cannot be combined with current_balance.
     */
    addToBalance?: number | undefined;
    /**
     * The usage amount to update. Cannot be combined with remaining or add_to_balance.
     */
    usage?: number | undefined;
    /**
     * Target a specific balance by its reset interval. Use when the customer has multiple balances for the same feature with different reset intervals.
     */
    interval?: UpdateBalanceInterval | undefined;
    /**
     * Set the granted balance to this exact value.
     */
    includedGrant?: number | undefined;
    /**
     * Target a specific balance by its ID (set on create). Use when the customer has multiple balances for the same feature.
     */
    balanceId?: string | undefined;
    /**
     * The next reset time for the balance. If there are multiple breakdowns, this will update the breakdown with the next reset time.
     */
    nextResetAt?: number | undefined;
    /**
     * Unix timestamp (milliseconds) when the balance expires. Targets a specific balance via balance_id / interval when the customer has multiple balances for the same feature.
     */
    expiresAt?: number | undefined;
};
/**
 * OK
 */
type UpdateBalanceResponse = {
    success: boolean;
};

/**
 * The time interval for the purchase limit window.
 */
declare const UpdateCustomerPurchaseLimitIntervalRequestBody: {
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
};
/**
 * The time interval for the purchase limit window.
 */
type UpdateCustomerPurchaseLimitIntervalRequestBody = ClosedEnum<typeof UpdateCustomerPurchaseLimitIntervalRequestBody>;
/**
 * Optional rate limit to cap how often auto top-ups occur.
 */
type UpdateCustomerPurchaseLimitRequest = {
    /**
     * The time interval for the purchase limit window.
     */
    interval: UpdateCustomerPurchaseLimitIntervalRequestBody;
    /**
     * Number of intervals in the purchase limit window.
     */
    intervalCount?: number | undefined;
    /**
     * Maximum number of auto top-ups allowed within the interval.
     */
    limit: number;
};
type UpdateCustomerAutoTopupRequest = {
    /**
     * 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?: UpdateCustomerPurchaseLimitRequest | 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 UpdateCustomerLimitTypeRequestBody: {
    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 UpdateCustomerLimitTypeRequestBody = ClosedEnum<typeof UpdateCustomerLimitTypeRequestBody>;
type UpdateCustomerSpendLimitRequest = {
    /**
     * 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?: UpdateCustomerLimitTypeRequestBody | 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 UpdateCustomerUsageLimitIntervalRequestBody: {
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
type UpdateCustomerUsageLimitIntervalRequestBody = ClosedEnum<typeof UpdateCustomerUsageLimitIntervalRequestBody>;
/**
 * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
 */
type UpdateCustomerFilterRequest = {
    properties: {
        [k: string]: string | number | boolean;
    };
};
type UpdateCustomerUsageLimitRequest = {
    /**
     * 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: UpdateCustomerUsageLimitIntervalRequestBody;
    /**
     * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
     */
    filter?: UpdateCustomerFilterRequest | undefined;
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
declare const UpdateCustomerThresholdTypeRequestBody: {
    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 UpdateCustomerThresholdTypeRequestBody = ClosedEnum<typeof UpdateCustomerThresholdTypeRequestBody>;
type UpdateCustomerUsageAlertRequestBody = {
    /**
     * 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: UpdateCustomerThresholdTypeRequestBody;
    /**
     * Optional user-defined label to distinguish multiple alerts on the same feature.
     */
    name?: string | undefined;
};
type UpdateCustomerOverageAllowedRequest = {
    /**
     * 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 UpdateCustomerBillingControlsRequest = {
    /**
     * List of auto top-up configurations per feature.
     */
    autoTopups?: Array<UpdateCustomerAutoTopupRequest> | undefined;
    /**
     * List of overage spend limits per feature (caps overage spend).
     */
    spendLimits?: Array<UpdateCustomerSpendLimitRequest> | undefined;
    /**
     * List of hard usage caps per feature (max units per interval).
     */
    usageLimits?: Array<UpdateCustomerUsageLimitRequest> | undefined;
    /**
     * List of usage alert configurations per feature.
     */
    usageAlerts?: Array<UpdateCustomerUsageAlertRequestBody> | undefined;
    /**
     * List of overage allowed controls per feature. When enabled, usage can exceed balance.
     */
    overageAllowed?: Array<UpdateCustomerOverageAllowedRequest> | undefined;
};
/**
 * Miscellaneous configurations for the customer.
 */
type UpdateCustomerConfigRequest = {
    /**
     * 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;
};
type UpdateCustomerParams = {
    /**
     * ID of the customer to update
     */
    customerId: string;
    /**
     * 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 send email receipts to this customer
     */
    sendEmailReceipts?: boolean | undefined;
    /**
     * Billing controls for the customer (auto top-ups, etc.)
     */
    billingControls?: UpdateCustomerBillingControlsRequest | undefined;
    /**
     * Miscellaneous configurations for the customer.
     */
    config?: UpdateCustomerConfigRequest | undefined;
    /**
     * Your unique identifier for the customer
     */
    newCustomerId?: string | undefined;
};
/**
 * The environment this customer was created in.
 */
declare const UpdateCustomerEnv: {
    readonly Sandbox: "sandbox";
    readonly Live: "live";
};
/**
 * The environment this customer was created in.
 */
type UpdateCustomerEnv = OpenEnum<typeof UpdateCustomerEnv>;
/**
 * The time interval for the purchase limit window.
 */
declare const UpdateCustomerPurchaseLimitIntervalResponse2: {
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
};
/**
 * The time interval for the purchase limit window.
 */
type UpdateCustomerPurchaseLimitIntervalResponse2 = OpenEnum<typeof UpdateCustomerPurchaseLimitIntervalResponse2>;
type UpdateCustomerPurchaseLimitResponse2 = {
    /**
     * The time interval for the purchase limit window.
     */
    interval: UpdateCustomerPurchaseLimitIntervalResponse2;
    /**
     * Number of intervals in the purchase limit window.
     */
    intervalCount: number;
    /**
     * Maximum number of auto top-ups allowed within the interval.
     */
    limit: number;
};
declare const UpdateCustomerPurchaseLimitIntervalResponse1: {
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
};
type UpdateCustomerPurchaseLimitIntervalResponse1 = OpenEnum<typeof UpdateCustomerPurchaseLimitIntervalResponse1>;
type UpdateCustomerPurchaseLimitResponse1 = {
    /**
     * The time interval for the purchase limit window. Null when no purchase limit is configured.
     */
    interval: UpdateCustomerPurchaseLimitIntervalResponse1 | null;
    /**
     * Number of intervals in the purchase limit window. Null when no purchase limit is configured.
     */
    intervalCount: number | null;
    /**
     * Maximum number of auto top-ups allowed within the interval. Null when no purchase limit is configured.
     */
    limit: number | null;
    /**
     * Number of auto top-ups already consumed in the current window.
     */
    count: number;
    /**
     * Unix ms timestamp when the current purchase window ends and the count resets.
     */
    nextResetAt: number;
};
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
declare const UpdateCustomerAutoTopupSource: {
    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 UpdateCustomerAutoTopupSource = OpenEnum<typeof UpdateCustomerAutoTopupSource>;
type UpdateCustomerAutoTopupResponse = {
    /**
     * 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. Expand billing_controls.auto_topups.purchase_limit for a count of top ups and the next_reset_at.
     */
    purchaseLimit?: UpdateCustomerPurchaseLimitResponse1 | UpdateCustomerPurchaseLimitResponse2 | undefined;
    /**
     * When true, auto top-up creates a send_invoice invoice instead of auto-charging.
     */
    invoiceMode?: boolean | undefined;
    /**
     * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
     */
    source?: UpdateCustomerAutoTopupSource | undefined;
};
/**
 * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
 */
declare const UpdateCustomerLimitTypeResponse: {
    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 UpdateCustomerLimitTypeResponse = OpenEnum<typeof UpdateCustomerLimitTypeResponse>;
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
declare const UpdateCustomerSpendLimitSource: {
    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 UpdateCustomerSpendLimitSource = OpenEnum<typeof UpdateCustomerSpendLimitSource>;
type UpdateCustomerSpendLimitResponse = {
    /**
     * 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?: UpdateCustomerLimitTypeResponse | 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?: UpdateCustomerSpendLimitSource | undefined;
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
declare const UpdateCustomerUsageLimitIntervalResponse: {
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
type UpdateCustomerUsageLimitIntervalResponse = OpenEnum<typeof UpdateCustomerUsageLimitIntervalResponse>;
/**
 * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
 */
type UpdateCustomerFilterResponse = {
    properties: {
        [k: string]: any;
    };
};
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
declare const UpdateCustomerUsageLimitSource: {
    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 UpdateCustomerUsageLimitSource = OpenEnum<typeof UpdateCustomerUsageLimitSource>;
type UpdateCustomerUsageLimitResponse = {
    /**
     * 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: UpdateCustomerUsageLimitIntervalResponse;
    /**
     * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
     */
    filter?: UpdateCustomerFilterResponse | 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?: UpdateCustomerUsageLimitSource | undefined;
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
declare const UpdateCustomerThresholdTypeResponse: {
    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 UpdateCustomerThresholdTypeResponse = OpenEnum<typeof UpdateCustomerThresholdTypeResponse>;
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
declare const UpdateCustomerUsageAlertSource: {
    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 UpdateCustomerUsageAlertSource = OpenEnum<typeof UpdateCustomerUsageAlertSource>;
type UpdateCustomerUsageAlertResponse = {
    /**
     * 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: UpdateCustomerThresholdTypeResponse;
    /**
     * 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?: UpdateCustomerUsageAlertSource | undefined;
};
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
declare const UpdateCustomerOverageAllowedSource: {
    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 UpdateCustomerOverageAllowedSource = OpenEnum<typeof UpdateCustomerOverageAllowedSource>;
type UpdateCustomerOverageAllowedResponse = {
    /**
     * 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?: UpdateCustomerOverageAllowedSource | undefined;
};
/**
 * Billing controls for the customer (auto top-ups, etc.)
 */
type UpdateCustomerBillingControlsResponse = {
    /**
     * List of auto top-up configurations per feature.
     */
    autoTopups?: Array<UpdateCustomerAutoTopupResponse> | undefined;
    /**
     * List of overage spend limits per feature (caps overage spend).
     */
    spendLimits?: Array<UpdateCustomerSpendLimitResponse> | undefined;
    /**
     * List of hard usage caps per feature, with current interval usage.
     */
    usageLimits?: Array<UpdateCustomerUsageLimitResponse> | undefined;
    /**
     * List of usage alert configurations per feature.
     */
    usageAlerts?: Array<UpdateCustomerUsageAlertResponse> | undefined;
    /**
     * List of overage allowed controls per feature. When enabled, usage can exceed balance.
     */
    overageAllowed?: Array<UpdateCustomerOverageAllowedResponse> | undefined;
};
/**
 * Current status of the subscription.
 */
declare const UpdateCustomerStatus: {
    readonly Active: "active";
    readonly Scheduled: "scheduled";
};
/**
 * Current status of the subscription.
 */
type UpdateCustomerStatus = OpenEnum<typeof UpdateCustomerStatus>;
/**
 * Whether this subscription is attached at the customer level or entity level.
 */
declare const UpdateCustomerSubscriptionScope: {
    readonly Customer: "customer";
    readonly Entity: "entity";
};
/**
 * Whether this subscription is attached at the customer level or entity level.
 */
type UpdateCustomerSubscriptionScope = OpenEnum<typeof UpdateCustomerSubscriptionScope>;
type UpdateCustomerSubscription = {
    /**
     * 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: UpdateCustomerStatus;
    /**
     * 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?: UpdateCustomerSubscriptionScope | undefined;
};
/**
 * Whether this purchase is attached at the customer level or entity level.
 */
declare const UpdateCustomerPurchaseScope: {
    readonly Customer: "customer";
    readonly Entity: "entity";
};
/**
 * Whether this purchase is attached at the customer level or entity level.
 */
type UpdateCustomerPurchaseScope = OpenEnum<typeof UpdateCustomerPurchaseScope>;
type UpdateCustomerPurchase = {
    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?: UpdateCustomerPurchaseScope | 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 UpdateCustomerType: {
    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 UpdateCustomerType = OpenEnum<typeof UpdateCustomerType>;
type UpdateCustomerCreditSchema = {
    /**
     * ID of the metered feature that draws from this credit system.
     */
    meteredFeatureId: string;
    /**
     * Credits consumed per unit of the metered feature.
     */
    creditCost: number;
};
type UpdateCustomerModelMarkups = {
    markup?: number | undefined;
    inputCost?: number | undefined;
    outputCost?: number | undefined;
};
type UpdateCustomerProviderMarkups = {
    markup: number;
};
/**
 * Display names for the feature in billing UI and customer-facing components.
 */
type UpdateCustomerDisplay = {
    /**
     * 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 UpdateCustomerFeature = {
    /**
     * 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: UpdateCustomerType;
    /**
     * 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<UpdateCustomerCreditSchema> | undefined;
    /**
     * Per-model markup overrides for AI credit systems.
     */
    modelMarkups?: {
        [k: string]: UpdateCustomerModelMarkups;
    } | 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]: UpdateCustomerProviderMarkups;
    } | null | undefined;
    /**
     * Display names for the feature in billing UI and customer-facing components.
     */
    display?: UpdateCustomerDisplay | undefined;
    /**
     * Whether the feature is archived and hidden from the dashboard.
     */
    archived: boolean;
};
type UpdateCustomerFlags = {
    /**
     * 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?: UpdateCustomerFeature | undefined;
};
/**
 * Configuration for the customer.
 */
type UpdateCustomerConfigResponse = {
    /**
     * 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;
};
/**
 * Stripe processor connection for the customer.
 */
type UpdateCustomerStripe = {
    /**
     * Stripe customer ID.
     */
    id: string;
};
/**
 * Vercel processor connection for the customer (public-safe subset).
 */
type UpdateCustomerVercel = {
    /**
     * Vercel marketplace installation ID for this customer.
     */
    installationId: string;
    /**
     * Vercel account ID associated with the installation.
     */
    accountId: string;
};
/**
 * RevenueCat processor connection for the customer.
 */
type UpdateCustomerRevenuecat = {
    /**
     * Customer's external ID, used as the RevenueCat app user ID. Null if the customer has no external ID set.
     */
    id: string | null;
};
/**
 * Payment processors this customer is connected to (Stripe, Vercel, RevenueCat). Omitted entirely when the customer has not been created in any processor.
 */
type UpdateCustomerProcessors = {
    /**
     * Stripe processor connection for the customer.
     */
    stripe?: UpdateCustomerStripe | undefined;
    /**
     * Vercel processor connection for the customer (public-safe subset).
     */
    vercel?: UpdateCustomerVercel | undefined;
    /**
     * RevenueCat processor connection for the customer.
     */
    revenuecat?: UpdateCustomerRevenuecat | undefined;
};
/**
 * OK
 */
type UpdateCustomerResponse = {
    /**
     * Your unique identifier for the customer.
     */
    id: string | null;
    /**
     * The name of the customer.
     */
    name: string | null;
    /**
     * The email address of the customer.
     */
    email: string | null;
    /**
     * Timestamp of customer creation in milliseconds since epoch.
     */
    createdAt: number;
    /**
     * A unique identifier (eg. serial number) to de-duplicate customers across devices or browsers. For example: apple device ID.
     */
    fingerprint: string | null;
    /**
     * Stripe customer ID.
     */
    stripeId: string | null;
    /**
     * The environment this customer was created in.
     */
    env: UpdateCustomerEnv;
    /**
     * The metadata for the customer.
     */
    metadata: {
        [k: string]: any;
    };
    /**
     * Whether to send email receipts to the customer.
     */
    sendEmailReceipts: boolean;
    /**
     * Billing controls for the customer (auto top-ups, etc.)
     */
    billingControls: UpdateCustomerBillingControlsResponse;
    /**
     * Active and scheduled recurring plans that this customer has attached.
     */
    subscriptions: Array<UpdateCustomerSubscription>;
    /**
     * One-time purchases made by the customer.
     */
    purchases: Array<UpdateCustomerPurchase>;
    /**
     * Feature balances keyed by feature ID, showing usage limits and remaining amounts.
     */
    balances: {
        [k: string]: Balance;
    };
    /**
     * Boolean feature flags keyed by feature ID, showing enabled access for on/off features.
     */
    flags: {
        [k: string]: UpdateCustomerFlags;
    };
    /**
     * Configuration for the customer.
     */
    config?: UpdateCustomerConfigResponse | undefined;
    /**
     * Payment processors this customer is connected to (Stripe, Vercel, RevenueCat). Omitted entirely when the customer has not been created in any processor.
     */
    processors?: UpdateCustomerProcessors | undefined;
};

/**
 * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
 */
declare const UpdateEntityLimitTypeRequestBody: {
    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 UpdateEntityLimitTypeRequestBody = ClosedEnum<typeof UpdateEntityLimitTypeRequestBody>;
type UpdateEntitySpendLimitRequest = {
    /**
     * 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?: UpdateEntityLimitTypeRequestBody | 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 UpdateEntityIntervalRequestBody: {
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
type UpdateEntityIntervalRequestBody = ClosedEnum<typeof UpdateEntityIntervalRequestBody>;
/**
 * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
 */
type UpdateEntityFilterRequest = {
    properties: {
        [k: string]: string | number | boolean;
    };
};
type UpdateEntityUsageLimitRequest = {
    /**
     * 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: UpdateEntityIntervalRequestBody;
    /**
     * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
     */
    filter?: UpdateEntityFilterRequest | undefined;
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
declare const UpdateEntityThresholdTypeRequestBody: {
    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 UpdateEntityThresholdTypeRequestBody = ClosedEnum<typeof UpdateEntityThresholdTypeRequestBody>;
type UpdateEntityUsageAlertRequestBody = {
    /**
     * 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: UpdateEntityThresholdTypeRequestBody;
    /**
     * Optional user-defined label to distinguish multiple alerts on the same feature.
     */
    name?: string | undefined;
};
type UpdateEntityOverageAllowedRequest = {
    /**
     * The feature ID this overage allowed control applies to.
     */
    featureId: string;
    /**
     * Whether overage is allowed for this feature.
     */
    enabled?: boolean | undefined;
};
/**
 * Billing controls to replace on the entity.
 */
type UpdateEntityBillingControlsRequest = {
    /**
     * List of spend limits per feature. Each entry caps overage (overage_limit) and/or per-interval usage (usage_limit).
     */
    spendLimits?: Array<UpdateEntitySpendLimitRequest> | undefined;
    /**
     * List of hard usage caps per feature for this entity. An entity entry overrides the customer's for that feature.
     */
    usageLimits?: Array<UpdateEntityUsageLimitRequest> | undefined;
    /**
     * List of usage alert configurations per feature.
     */
    usageAlerts?: Array<UpdateEntityUsageAlertRequestBody> | undefined;
    /**
     * List of overage allowed controls per feature. When enabled, usage can exceed balance.
     */
    overageAllowed?: Array<UpdateEntityOverageAllowedRequest> | undefined;
};
type UpdateEntityParams = {
    /**
     * The ID of the customer that owns the entity.
     */
    customerId?: string | undefined;
    /**
     * The ID of the entity.
     */
    entityId: string;
    /**
     * Billing controls to replace on the entity.
     */
    billingControls?: UpdateEntityBillingControlsRequest | undefined;
};
/**
 * The environment (sandbox/live)
 */
declare const UpdateEntityEnv: {
    readonly Sandbox: "sandbox";
    readonly Live: "live";
};
/**
 * The environment (sandbox/live)
 */
type UpdateEntityEnv = OpenEnum<typeof UpdateEntityEnv>;
/**
 * Current status of the subscription.
 */
declare const UpdateEntityStatus: {
    readonly Active: "active";
    readonly Scheduled: "scheduled";
};
/**
 * Current status of the subscription.
 */
type UpdateEntityStatus = OpenEnum<typeof UpdateEntityStatus>;
/**
 * Whether this subscription is attached at the customer level or entity level.
 */
declare const UpdateEntitySubscriptionScope: {
    readonly Customer: "customer";
    readonly Entity: "entity";
};
/**
 * Whether this subscription is attached at the customer level or entity level.
 */
type UpdateEntitySubscriptionScope = OpenEnum<typeof UpdateEntitySubscriptionScope>;
type UpdateEntitySubscription = {
    /**
     * 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: UpdateEntityStatus;
    /**
     * 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?: UpdateEntitySubscriptionScope | undefined;
};
/**
 * Whether this purchase is attached at the customer level or entity level.
 */
declare const UpdateEntityPurchaseScope: {
    readonly Customer: "customer";
    readonly Entity: "entity";
};
/**
 * Whether this purchase is attached at the customer level or entity level.
 */
type UpdateEntityPurchaseScope = OpenEnum<typeof UpdateEntityPurchaseScope>;
type UpdateEntityPurchase = {
    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?: UpdateEntityPurchaseScope | 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 UpdateEntityType: {
    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 UpdateEntityType = OpenEnum<typeof UpdateEntityType>;
type UpdateEntityCreditSchema = {
    /**
     * ID of the metered feature that draws from this credit system.
     */
    meteredFeatureId: string;
    /**
     * Credits consumed per unit of the metered feature.
     */
    creditCost: number;
};
type UpdateEntityModelMarkups = {
    markup?: number | undefined;
    inputCost?: number | undefined;
    outputCost?: number | undefined;
};
type UpdateEntityProviderMarkups = {
    markup: number;
};
/**
 * Display names for the feature in billing UI and customer-facing components.
 */
type UpdateEntityDisplay = {
    /**
     * 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 UpdateEntityFeature = {
    /**
     * 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: UpdateEntityType;
    /**
     * 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<UpdateEntityCreditSchema> | undefined;
    /**
     * Per-model markup overrides for AI credit systems.
     */
    modelMarkups?: {
        [k: string]: UpdateEntityModelMarkups;
    } | 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]: UpdateEntityProviderMarkups;
    } | null | undefined;
    /**
     * Display names for the feature in billing UI and customer-facing components.
     */
    display?: UpdateEntityDisplay | undefined;
    /**
     * Whether the feature is archived and hidden from the dashboard.
     */
    archived: boolean;
};
type UpdateEntityFlags = {
    /**
     * 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?: UpdateEntityFeature | undefined;
};
/**
 * How overage_limit is interpreted: an absolute overage cap (default) or a percentage of the main-plan allowance.
 */
declare const UpdateEntityLimitTypeResponse: {
    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 UpdateEntityLimitTypeResponse = OpenEnum<typeof UpdateEntityLimitTypeResponse>;
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
declare const UpdateEntitySpendLimitSource: {
    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 UpdateEntitySpendLimitSource = OpenEnum<typeof UpdateEntitySpendLimitSource>;
type UpdateEntitySpendLimitResponse = {
    /**
     * 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?: UpdateEntityLimitTypeResponse | 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?: UpdateEntitySpendLimitSource | undefined;
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
declare const UpdateEntityIntervalResponse: {
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
type UpdateEntityIntervalResponse = OpenEnum<typeof UpdateEntityIntervalResponse>;
/**
 * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
 */
type UpdateEntityFilterResponse = {
    properties: {
        [k: string]: any;
    };
};
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
declare const UpdateEntityUsageLimitSource: {
    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 UpdateEntityUsageLimitSource = OpenEnum<typeof UpdateEntityUsageLimitSource>;
type UpdateEntityUsageLimitResponse = {
    /**
     * 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: UpdateEntityIntervalResponse;
    /**
     * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
     */
    filter?: UpdateEntityFilterResponse | 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?: UpdateEntityUsageLimitSource | undefined;
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
declare const UpdateEntityThresholdTypeResponse: {
    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 UpdateEntityThresholdTypeResponse = OpenEnum<typeof UpdateEntityThresholdTypeResponse>;
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
declare const UpdateEntityUsageAlertSource: {
    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 UpdateEntityUsageAlertSource = OpenEnum<typeof UpdateEntityUsageAlertSource>;
type UpdateEntityUsageAlertResponse = {
    /**
     * 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: UpdateEntityThresholdTypeResponse;
    /**
     * 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?: UpdateEntityUsageAlertSource | undefined;
};
/**
 * Response-only: whether the entry is a customer-level override or inherited from an attached plan's defaults.
 */
declare const UpdateEntityOverageAllowedSource: {
    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 UpdateEntityOverageAllowedSource = OpenEnum<typeof UpdateEntityOverageAllowedSource>;
type UpdateEntityOverageAllowedResponse = {
    /**
     * 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?: UpdateEntityOverageAllowedSource | undefined;
};
/**
 * Billing controls for the entity.
 */
type UpdateEntityBillingControlsResponse = {
    /**
     * List of spend limits per feature. Each entry caps overage (overage_limit) and/or per-interval usage (usage_limit).
     */
    spendLimits?: Array<UpdateEntitySpendLimitResponse> | undefined;
    /**
     * List of hard usage caps per feature for this entity. An entity entry overrides the customer's for that feature.
     */
    usageLimits?: Array<UpdateEntityUsageLimitResponse> | undefined;
    /**
     * List of usage alert configurations per feature.
     */
    usageAlerts?: Array<UpdateEntityUsageAlertResponse> | undefined;
    /**
     * List of overage allowed controls per feature. When enabled, usage can exceed balance.
     */
    overageAllowed?: Array<UpdateEntityOverageAllowedResponse> | undefined;
};
/**
 * The billing processor that owns this invoice.
 */
declare const UpdateEntityProcessorType: {
    readonly Stripe: "stripe";
    readonly Revenuecat: "revenuecat";
};
/**
 * The billing processor that owns this invoice.
 */
type UpdateEntityProcessorType = OpenEnum<typeof UpdateEntityProcessorType>;
type UpdateEntityInvoice = {
    /**
     * 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: UpdateEntityProcessorType;
    /**
     * 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 UpdateEntityResponse = {
    /**
     * 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: UpdateEntityEnv;
    subscriptions: Array<UpdateEntitySubscription>;
    purchases: Array<UpdateEntityPurchase>;
    balances: {
        [k: string]: Balance;
    };
    flags: {
        [k: string]: UpdateEntityFlags;
    };
    /**
     * Billing controls for the entity.
     */
    billingControls?: UpdateEntityBillingControlsResponse | undefined;
    /**
     * Invoices for this entity (only included when expand=invoices)
     */
    invoices?: Array<UpdateEntityInvoice> | undefined;
};

/**
 * The type of the feature. 'single_use' features are consumed, like API calls, tokens, or messages. 'continuous_use' features are allocated, like seats, workspaces, or projects. 'credit_system' features are schemas that unify multiple 'single_use' features into a single credit system.
 */
declare const UpdateFeatureTypeRequestBody: {
    readonly Boolean: "boolean";
    readonly Metered: "metered";
    readonly CreditSystem: "credit_system";
    readonly AiCreditSystem: "ai_credit_system";
};
/**
 * The type of the feature. 'single_use' features are consumed, like API calls, tokens, or messages. 'continuous_use' features are allocated, like seats, workspaces, or projects. 'credit_system' features are schemas that unify multiple 'single_use' features into a single credit system.
 */
type UpdateFeatureTypeRequestBody = ClosedEnum<typeof UpdateFeatureTypeRequestBody>;
/**
 * Singular and plural display names for the feature in your user interface.
 */
type UpdateFeatureDisplayRequestBody = {
    singular: string;
    plural: string;
};
type UpdateFeatureCreditSchemaRequestBody = {
    meteredFeatureId: string;
    creditCost: number;
};
type UpdateFeatureModelMarkupsRequest = {
    markup?: number | undefined;
    inputCost?: number | undefined;
    outputCost?: number | undefined;
};
type UpdateFeatureProviderMarkupsRequest = {
    markup: number;
};
type UpdateFeatureParams = {
    /**
     * The name of the feature.
     */
    name?: string | undefined;
    /**
     * The type of the feature. 'single_use' features are consumed, like API calls, tokens, or messages. 'continuous_use' features are allocated, like seats, workspaces, or projects. 'credit_system' features are schemas that unify multiple 'single_use' features into a single credit system.
     */
    type?: UpdateFeatureTypeRequestBody | undefined;
    /**
     * Whether this feature is consumable. A consumable feature is one that periodically resets and is consumed rather than allocated (like credits, API requests, etc.). Applicable only for 'metered' features.
     */
    consumable?: boolean | undefined;
    /**
     * Singular and plural display names for the feature in your user interface.
     */
    display?: UpdateFeatureDisplayRequestBody | undefined;
    /**
     * A schema that maps 'single_use' feature IDs to credit costs. For classic credit systems only — AI credit systems use model_markups instead.
     */
    creditSchema?: Array<UpdateFeatureCreditSchemaRequestBody> | undefined;
    /**
     * Per-model markup overrides for AI credit systems. Maps model IDs to their markup configuration.
     */
    modelMarkups?: {
        [k: string]: UpdateFeatureModelMarkupsRequest;
    } | null | undefined;
    /**
     * Default percentage markup for this AI credit system. Used when no model or provider markup applies. Use -100 to make usage free.
     */
    defaultMarkup?: number | undefined;
    /**
     * Per-provider default markup percentages for AI credit systems. Provider keys match the first segment of model_id.
     */
    providerMarkups?: {
        [k: string]: UpdateFeatureProviderMarkupsRequest;
    } | null | undefined;
    eventNames?: Array<string> | undefined;
    /**
     * Whether the feature is archived. Archived features are hidden from the dashboard.
     */
    archived?: boolean | undefined;
    /**
     * The ID of the feature to update.
     */
    featureId: string;
    /**
     * The new ID of the feature. Feature ID can only be updated if it's not being used by any customers.
     */
    newFeatureId?: string | 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 UpdateFeatureTypeResponse: {
    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 UpdateFeatureTypeResponse = OpenEnum<typeof UpdateFeatureTypeResponse>;
type UpdateFeatureCreditSchemaResponse = {
    /**
     * ID of the metered feature that draws from this credit system.
     */
    meteredFeatureId: string;
    /**
     * Credits consumed per unit of the metered feature.
     */
    creditCost: number;
};
type UpdateFeatureModelMarkupsResponse = {
    markup?: number | undefined;
    inputCost?: number | undefined;
    outputCost?: number | undefined;
};
type UpdateFeatureProviderMarkupsResponse = {
    markup: number;
};
/**
 * Display names for the feature in billing UI and customer-facing components.
 */
type UpdateFeatureDisplayResponse = {
    /**
     * 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;
};
/**
 * OK
 */
type UpdateFeatureResponse = {
    /**
     * 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: UpdateFeatureTypeResponse;
    /**
     * 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<UpdateFeatureCreditSchemaResponse> | undefined;
    /**
     * Per-model markup overrides for AI credit systems.
     */
    modelMarkups?: {
        [k: string]: UpdateFeatureModelMarkupsResponse;
    } | 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]: UpdateFeatureProviderMarkupsResponse;
    } | null | undefined;
    /**
     * Display names for the feature in billing UI and customer-facing components.
     */
    display?: UpdateFeatureDisplayResponse | undefined;
    /**
     * Whether the feature is archived and hidden from the dashboard.
     */
    archived: boolean;
};

/**
 * Billing interval (e.g. 'month', 'year').
 */
declare const UpdatePlanPriceIntervalRequestBody: {
    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 UpdatePlanPriceIntervalRequestBody = ClosedEnum<typeof UpdatePlanPriceIntervalRequestBody>;
/**
 * Base price configuration for a plan.
 */
type UpdatePlanBasePriceRequest = {
    /**
     * Base price amount for the plan.
     */
    amount: number;
    /**
     * Billing interval (e.g. 'month', 'year').
     */
    interval: UpdatePlanPriceIntervalRequestBody;
    /**
     * 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 UpdatePlanItemResetIntervalRequestBody: {
    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 UpdatePlanItemResetIntervalRequestBody = ClosedEnum<typeof UpdatePlanItemResetIntervalRequestBody>;
/**
 * Reset configuration for consumable features. Omit for non-consumable features like seats.
 */
type UpdatePlanItemResetRequestBody = {
    /**
     * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
     */
    interval: UpdatePlanItemResetIntervalRequestBody;
    /**
     * Number of intervals between resets. Defaults to 1.
     */
    intervalCount?: number | undefined;
};
type UpdatePlanItemTierRequestBody = {
    to: number | string;
    amount?: number | undefined;
    flatAmount?: number | undefined;
};
declare const UpdatePlanItemTierBehaviorRequestBody: {
    readonly Graduated: "graduated";
    readonly Volume: "volume";
};
type UpdatePlanItemTierBehaviorRequestBody = ClosedEnum<typeof UpdatePlanItemTierBehaviorRequestBody>;
/**
 * Billing interval. For consumable features, should match reset.interval.
 */
declare const UpdatePlanItemPriceIntervalRequestBody: {
    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 UpdatePlanItemPriceIntervalRequestBody = ClosedEnum<typeof UpdatePlanItemPriceIntervalRequestBody>;
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
declare const UpdatePlanItemBillingMethodRequestBody: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
type UpdatePlanItemBillingMethodRequestBody = ClosedEnum<typeof UpdatePlanItemBillingMethodRequestBody>;
/**
 * Pricing for usage beyond included units. Omit for free features.
 */
type UpdatePlanItemPriceRequestBody = {
    /**
     * 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<UpdatePlanItemTierRequestBody> | undefined;
    tierBehavior?: UpdatePlanItemTierBehaviorRequestBody | undefined;
    /**
     * Billing interval. For consumable features, should match reset.interval.
     */
    interval: UpdatePlanItemPriceIntervalRequestBody;
    /**
     * 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: UpdatePlanItemBillingMethodRequestBody;
    /**
     * 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 UpdatePlanItemOnIncrease: {
    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 UpdatePlanItemOnIncrease = ClosedEnum<typeof UpdatePlanItemOnIncrease>;
/**
 * Credit behavior when quantity decreases mid-cycle.
 */
declare const UpdatePlanItemOnDecrease: {
    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 UpdatePlanItemOnDecrease = ClosedEnum<typeof UpdatePlanItemOnDecrease>;
/**
 * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
 */
type UpdatePlanItemProration = {
    /**
     * Billing behavior when quantity increases mid-cycle.
     */
    onIncrease: UpdatePlanItemOnIncrease;
    /**
     * Credit behavior when quantity decreases mid-cycle.
     */
    onDecrease: UpdatePlanItemOnDecrease;
};
/**
 * When rolled over units expire.
 */
declare const UpdatePlanItemExpiryDurationTypeRequestBody: {
    readonly Month: "month";
    readonly Forever: "forever";
};
/**
 * When rolled over units expire.
 */
type UpdatePlanItemExpiryDurationTypeRequestBody = ClosedEnum<typeof UpdatePlanItemExpiryDurationTypeRequestBody>;
/**
 * Rollover config for unused units. If set, unused included units carry over.
 */
type UpdatePlanItemRolloverRequestBody = {
    /**
     * 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: UpdatePlanItemExpiryDurationTypeRequestBody;
    /**
     * Number of periods before expiry.
     */
    expiryDurationLength?: number | undefined;
};
/**
 * Configuration for a feature item in a plan, including usage limits, pricing, and rollover settings.
 */
type UpdatePlanItemPlanItem = {
    /**
     * 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?: UpdatePlanItemResetRequestBody | undefined;
    /**
     * Pricing for usage beyond included units. Omit for free features.
     */
    price?: UpdatePlanItemPriceRequestBody | undefined;
    /**
     * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
     */
    proration?: UpdatePlanItemProration | undefined;
    /**
     * Rollover config for unused units. If set, unused included units carry over.
     */
    rollover?: UpdatePlanItemRolloverRequestBody | undefined;
};
/**
 * Unit of time for the trial ('day', 'month', 'year').
 */
declare const UpdatePlanDurationTypeRequest: {
    readonly Day: "day";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Unit of time for the trial ('day', 'month', 'year').
 */
type UpdatePlanDurationTypeRequest = ClosedEnum<typeof UpdatePlanDurationTypeRequest>;
/**
 * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
 */
declare const UpdatePlanOnEndRequest: {
    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 UpdatePlanOnEndRequest = ClosedEnum<typeof UpdatePlanOnEndRequest>;
/**
 * Free trial configuration for a plan.
 */
type UpdatePlanFreeTrialParamsRequest = {
    /**
     * Number of duration_type periods the trial lasts.
     */
    durationLength: number;
    /**
     * Unit of time for the trial ('day', 'month', 'year').
     */
    durationType?: UpdatePlanDurationTypeRequest | 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?: UpdatePlanOnEndRequest | undefined;
};
/**
 * Miscellaneous plan-level configuration flags.
 */
type UpdatePlanConfigRequest = {
    /**
     * If true, entitlements attached to this plan will still reset on schedule even when the customer's product is in a past_due state.
     */
    ignorePastDue?: boolean | undefined;
};
/**
 * The time interval for the purchase limit window.
 */
declare const UpdatePlanPurchaseLimitIntervalRequestBody: {
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
};
/**
 * The time interval for the purchase limit window.
 */
type UpdatePlanPurchaseLimitIntervalRequestBody = ClosedEnum<typeof UpdatePlanPurchaseLimitIntervalRequestBody>;
/**
 * Optional rate limit to cap how often auto top-ups occur.
 */
type UpdatePlanPurchaseLimitRequest = {
    /**
     * The time interval for the purchase limit window.
     */
    interval: UpdatePlanPurchaseLimitIntervalRequestBody;
    /**
     * Number of intervals in the purchase limit window.
     */
    intervalCount?: number | undefined;
    /**
     * Maximum number of auto top-ups allowed within the interval.
     */
    limit: number;
};
type UpdatePlanAutoTopupRequest = {
    /**
     * 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?: UpdatePlanPurchaseLimitRequest | 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 UpdatePlanLimitTypeRequestBody: {
    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 UpdatePlanLimitTypeRequestBody = ClosedEnum<typeof UpdatePlanLimitTypeRequestBody>;
type UpdatePlanSpendLimitRequest = {
    /**
     * 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?: UpdatePlanLimitTypeRequestBody | 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 UpdatePlanUsageLimitIntervalRequestBody: {
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
type UpdatePlanUsageLimitIntervalRequestBody = ClosedEnum<typeof UpdatePlanUsageLimitIntervalRequestBody>;
/**
 * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
 */
type UpdatePlanFilterRequest = {
    properties: {
        [k: string]: string | number | boolean;
    };
};
type UpdatePlanUsageLimitRequest = {
    /**
     * 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: UpdatePlanUsageLimitIntervalRequestBody;
    /**
     * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
     */
    filter?: UpdatePlanFilterRequest | undefined;
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
declare const UpdatePlanThresholdTypeRequestBody: {
    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 UpdatePlanThresholdTypeRequestBody = ClosedEnum<typeof UpdatePlanThresholdTypeRequestBody>;
type UpdatePlanUsageAlertRequestBody = {
    /**
     * 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: UpdatePlanThresholdTypeRequestBody;
    /**
     * Optional user-defined label to distinguish multiple alerts on the same feature.
     */
    name?: string | undefined;
};
type UpdatePlanOverageAllowedRequest = {
    /**
     * The feature ID this overage allowed control applies to.
     */
    featureId: string;
    /**
     * Whether overage is allowed for this feature.
     */
    enabled?: boolean | undefined;
};
/**
 * Plan-level billing controls used as customer defaults.
 */
type UpdatePlanBillingControlsRequest = {
    /**
     * List of auto top-up configurations per feature.
     */
    autoTopups?: Array<UpdatePlanAutoTopupRequest> | undefined;
    /**
     * List of overage spend limits per feature (caps overage spend).
     */
    spendLimits?: Array<UpdatePlanSpendLimitRequest> | undefined;
    /**
     * List of hard usage caps per feature (max units per interval).
     */
    usageLimits?: Array<UpdatePlanUsageLimitRequest> | undefined;
    /**
     * List of usage alert configurations per feature.
     */
    usageAlerts?: Array<UpdatePlanUsageAlertRequestBody> | undefined;
    /**
     * List of overage allowed controls per feature. When enabled, usage can exceed balance.
     */
    overageAllowed?: Array<UpdatePlanOverageAllowedRequest> | undefined;
};
type Migration = {
    draft?: boolean | undefined;
    includeCustom?: boolean | undefined;
};
/**
 * Billing interval (e.g. 'month', 'year').
 */
declare const PriceVariantInterval: {
    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 PriceVariantInterval = ClosedEnum<typeof PriceVariantInterval>;
/**
 * Base price configuration for a plan.
 */
type VariantBasePrice = {
    /**
     * Base price amount for the plan.
     */
    amount: number;
    /**
     * Billing interval (e.g. 'month', 'year').
     */
    interval: PriceVariantInterval;
    /**
     * 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 VariantResetInterval: {
    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 VariantResetInterval = ClosedEnum<typeof VariantResetInterval>;
/**
 * Reset configuration for consumable features. Omit for non-consumable features like seats.
 */
type VariantReset = {
    /**
     * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
     */
    interval: VariantResetInterval;
    /**
     * Number of intervals between resets. Defaults to 1.
     */
    intervalCount?: number | undefined;
};
type VariantTier = {
    to: number | string;
    amount?: number | undefined;
    flatAmount?: number | undefined;
};
declare const VariantTierBehavior: {
    readonly Graduated: "graduated";
    readonly Volume: "volume";
};
type VariantTierBehavior = ClosedEnum<typeof VariantTierBehavior>;
/**
 * Billing interval. For consumable features, should match reset.interval.
 */
declare const VariantAddItemPriceInterval: {
    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 VariantAddItemPriceInterval = ClosedEnum<typeof VariantAddItemPriceInterval>;
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
declare const VariantAddItemBillingMethod: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
type VariantAddItemBillingMethod = ClosedEnum<typeof VariantAddItemBillingMethod>;
/**
 * Pricing for usage beyond included units. Omit for free features.
 */
type VariantPrice = {
    /**
     * 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<VariantTier> | undefined;
    tierBehavior?: VariantTierBehavior | undefined;
    /**
     * Billing interval. For consumable features, should match reset.interval.
     */
    interval: VariantAddItemPriceInterval;
    /**
     * 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: VariantAddItemBillingMethod;
    /**
     * 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 VariantOnIncrease: {
    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 VariantOnIncrease = ClosedEnum<typeof VariantOnIncrease>;
/**
 * Credit behavior when quantity decreases mid-cycle.
 */
declare const VariantOnDecrease: {
    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 VariantOnDecrease = ClosedEnum<typeof VariantOnDecrease>;
/**
 * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
 */
type VariantProration = {
    /**
     * Billing behavior when quantity increases mid-cycle.
     */
    onIncrease: VariantOnIncrease;
    /**
     * Credit behavior when quantity decreases mid-cycle.
     */
    onDecrease: VariantOnDecrease;
};
/**
 * When rolled over units expire.
 */
declare const VariantExpiryDurationType: {
    readonly Month: "month";
    readonly Forever: "forever";
};
/**
 * When rolled over units expire.
 */
type VariantExpiryDurationType = ClosedEnum<typeof VariantExpiryDurationType>;
/**
 * Rollover config for unused units. If set, unused included units carry over.
 */
type VariantRollover = {
    /**
     * 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: VariantExpiryDurationType;
    /**
     * Number of periods before expiry.
     */
    expiryDurationLength?: number | undefined;
};
/**
 * Configuration for a feature item in a plan, including usage limits, pricing, and rollover settings.
 */
type VariantPlanItem = {
    /**
     * 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?: VariantReset | undefined;
    /**
     * Pricing for usage beyond included units. Omit for free features.
     */
    price?: VariantPrice | undefined;
    /**
     * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
     */
    proration?: VariantProration | undefined;
    /**
     * Rollover config for unused units. If set, unused included units carry over.
     */
    rollover?: VariantRollover | undefined;
};
/**
 * Match items with this billing method (prepaid or usage_based).
 */
declare const VariantRemoveItemBillingMethod: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * Match items with this billing method (prepaid or usage_based).
 */
type VariantRemoveItemBillingMethod = ClosedEnum<typeof VariantRemoveItemBillingMethod>;
declare const IntervalVariantRemoveItemEnum2: {
    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 IntervalVariantRemoveItemEnum2 = ClosedEnum<typeof IntervalVariantRemoveItemEnum2>;
declare const IntervalVariantRemoveItemEnum1: {
    readonly OneOff: "one_off";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
type IntervalVariantRemoveItemEnum1 = ClosedEnum<typeof IntervalVariantRemoveItemEnum1>;
/**
 * Filter for matching plan items. All provided fields must match (AND).
 */
type VariantPlanItemFilter = {
    /**
     * Match items linked to this feature.
     */
    featureId?: string | undefined;
    /**
     * Match items with this billing method (prepaid or usage_based).
     */
    billingMethod?: VariantRemoveItemBillingMethod | 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?: IntervalVariantRemoveItemEnum1 | IntervalVariantRemoveItemEnum2 | 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 VariantDurationType: {
    readonly Day: "day";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Unit of time for the trial ('day', 'month', 'year').
 */
type VariantDurationType = ClosedEnum<typeof VariantDurationType>;
/**
 * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
 */
declare const VariantOnEnd: {
    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 VariantOnEnd = ClosedEnum<typeof VariantOnEnd>;
/**
 * Free trial configuration for a plan.
 */
type VariantFreeTrialParams = {
    /**
     * Number of duration_type periods the trial lasts.
     */
    durationLength: number;
    /**
     * Unit of time for the trial ('day', 'month', 'year').
     */
    durationType?: VariantDurationType | 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?: VariantOnEnd | undefined;
};
/**
 * The time interval for the purchase limit window.
 */
declare const VariantPurchaseLimitInterval: {
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
};
/**
 * The time interval for the purchase limit window.
 */
type VariantPurchaseLimitInterval = ClosedEnum<typeof VariantPurchaseLimitInterval>;
/**
 * Optional rate limit to cap how often auto top-ups occur.
 */
type VariantPurchaseLimit = {
    /**
     * The time interval for the purchase limit window.
     */
    interval: VariantPurchaseLimitInterval;
    /**
     * Number of intervals in the purchase limit window.
     */
    intervalCount?: number | undefined;
    /**
     * Maximum number of auto top-ups allowed within the interval.
     */
    limit: number;
};
type VariantAutoTopup = {
    /**
     * 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?: VariantPurchaseLimit | 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 VariantLimitType: {
    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 VariantLimitType = ClosedEnum<typeof VariantLimitType>;
type VariantSpendLimit = {
    /**
     * 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?: VariantLimitType | 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 VariantUsageLimitInterval: {
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
type VariantUsageLimitInterval = ClosedEnum<typeof VariantUsageLimitInterval>;
/**
 * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
 */
type VariantFilter = {
    properties: {
        [k: string]: string | number | boolean;
    };
};
type VariantUsageLimit = {
    /**
     * 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: VariantUsageLimitInterval;
    /**
     * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
     */
    filter?: VariantFilter | undefined;
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
declare const VariantThresholdType: {
    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 VariantThresholdType = ClosedEnum<typeof VariantThresholdType>;
type VariantUsageAlert = {
    /**
     * 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: VariantThresholdType;
    /**
     * Optional user-defined label to distinguish multiple alerts on the same feature.
     */
    name?: string | undefined;
};
type VariantOverageAllowed = {
    /**
     * 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 VariantBillingControls = {
    /**
     * List of auto top-up configurations per feature.
     */
    autoTopups?: Array<VariantAutoTopup> | undefined;
    /**
     * List of overage spend limits per feature (caps overage spend).
     */
    spendLimits?: Array<VariantSpendLimit> | undefined;
    /**
     * List of hard usage caps per feature (max units per interval).
     */
    usageLimits?: Array<VariantUsageLimit> | undefined;
    /**
     * List of usage alert configurations per feature.
     */
    usageAlerts?: Array<VariantUsageAlert> | undefined;
    /**
     * List of overage allowed controls per feature. When enabled, usage can exceed balance.
     */
    overageAllowed?: Array<VariantOverageAllowed> | undefined;
};
/**
 * The exact customize patch to apply to this variant.
 */
type VariantCustomize = {
    /**
     * Override the base price of the plan. Pass null to remove the base price.
     */
    price?: VariantBasePrice | null | undefined;
    /**
     * Items to add to the plan.
     */
    addItems?: Array<VariantPlanItem> | undefined;
    /**
     * Filters selecting items to remove from the plan.
     */
    removeItems?: Array<VariantPlanItemFilter> | undefined;
    /**
     * Override the plan's default free trial. Pass an object to set a custom trial, or null to remove the trial entirely.
     */
    freeTrial?: VariantFreeTrialParams | null | undefined;
    /**
     * Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
     */
    billingControls?: VariantBillingControls | undefined;
};
/**
 * Migration draft options for an in-place direct variant update.
 */
type VariantMigration = {
    draft?: boolean | undefined;
    includeCustom?: boolean | undefined;
};
type Variant = {
    /**
     * The variant plan ID to update or create.
     */
    variantPlanId: string;
    /**
     * Display name to use when creating the variant if it does not exist.
     */
    name?: string | undefined;
    /**
     * The exact customize patch to apply to this variant.
     */
    customize: VariantCustomize;
    /**
     * Edit this variant in place instead of versioning it for this update.
     */
    disableVersion?: boolean | undefined;
    /**
     * Force this variant update to create a new version.
     */
    forceVersion?: boolean | undefined;
    /**
     * Migration draft options for an in-place direct variant update.
     */
    migration?: VariantMigration | undefined;
};
type UpdatePlanParams = {
    /**
     * The ID of the plan to update.
     */
    planId: string;
    group?: string | undefined;
    /**
     * Display name of the plan.
     */
    name?: string | undefined;
    description?: string | undefined;
    /**
     * Whether the plan is an add-on.
     */
    addOn?: boolean | undefined;
    /**
     * Whether the plan is automatically enabled.
     */
    autoEnable?: boolean | undefined;
    /**
     * The price of the plan. Set to null to remove the base price.
     */
    price?: UpdatePlanBasePriceRequest | null | undefined;
    /**
     * Feature configurations for this plan. Each item defines included units, pricing, and reset behavior.
     */
    items?: Array<UpdatePlanItemPlanItem> | undefined;
    /**
     * The free trial of the plan. Set to null to remove the free trial.
     */
    freeTrial?: UpdatePlanFreeTrialParamsRequest | null | undefined;
    /**
     * Miscellaneous plan-level configuration flags.
     */
    config?: UpdatePlanConfigRequest | undefined;
    /**
     * Plan-level billing controls used as customer defaults.
     */
    billingControls?: UpdatePlanBillingControlsRequest | undefined;
    /**
     * Arbitrary key-value metadata defined by you for your own use (e.g. UI copy, feature highlights). Values can be any JSON-serializable value. Shared across all versions of the plan.
     */
    metadata?: {
        [k: string]: any;
    } | undefined;
    createInStripe?: boolean | undefined;
    version?: number | undefined;
    archived?: boolean | undefined;
    /**
     * The base plan this plan should be linked to as a variant. Set to null to detach it from its base plan.
     */
    basePlanId?: string | null | undefined;
    /**
     * The new ID to use for the plan. Can only be updated if the plan has not been used by any customers.
     */
    newPlanId?: string | undefined;
    disableVersion?: boolean | undefined;
    /**
     * Apply the update diff to all versions of this plan. Mutually exclusive with disable_version.
     */
    allVersions?: boolean | undefined;
    migration?: Migration | undefined;
    /**
     * Force versioning even when no customers exist. Mutually exclusive with disable_version.
     */
    forceVersion?: boolean | undefined;
    /**
     * Variant plan IDs to apply this update to. Empty or omitted means no propagation.
     */
    updateVariantIds?: Array<string> | undefined;
    /**
     * Additive variant updates for this base plan. Missing variants are created when name is provided.
     */
    variants?: Array<Variant> | undefined;
    /**
     * Whether this is the org's default plan. Cannot be true on a variant.
     */
    isDefault?: boolean | undefined;
};
/**
 * Billing interval (e.g. 'month', 'year').
 */
declare const UpdatePlanPriceIntervalResponse: {
    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 UpdatePlanPriceIntervalResponse = OpenEnum<typeof UpdatePlanPriceIntervalResponse>;
/**
 * Display text for showing this price in pricing pages.
 */
type UpdatePlanPriceDisplay = {
    /**
     * Main display text (e.g. '$10' or '100 messages').
     */
    primaryText: string;
    /**
     * Secondary display text (e.g. 'per month' or 'then $0.5 per 100').
     */
    secondaryText?: string | undefined;
};
type UpdatePlanPriceResponse = {
    /**
     * Base price amount for the plan.
     */
    amount: number;
    /**
     * Billing interval (e.g. 'month', 'year').
     */
    interval: UpdatePlanPriceIntervalResponse;
    /**
     * Number of intervals per billing cycle. Defaults to 1.
     */
    intervalCount?: number | undefined;
    /**
     * Display text for showing this price in pricing pages.
     */
    display?: UpdatePlanPriceDisplay | undefined;
};
/**
 * The type of the feature
 */
declare const UpdatePlanType: {
    readonly Static: "static";
    readonly Boolean: "boolean";
    readonly SingleUse: "single_use";
    readonly ContinuousUse: "continuous_use";
    readonly CreditSystem: "credit_system";
    readonly AiCreditSystem: "ai_credit_system";
};
/**
 * The type of the feature
 */
type UpdatePlanType = OpenEnum<typeof UpdatePlanType>;
type UpdatePlanFeatureDisplay = {
    /**
     * The singular display name for the feature.
     */
    singular: string;
    /**
     * The plural display name for the feature.
     */
    plural: string;
};
type UpdatePlanCreditSchema = {
    /**
     * The ID of the metered feature (should be a single_use feature).
     */
    meteredFeatureId: string;
    /**
     * The credit cost of the metered feature.
     */
    creditCost: number;
};
/**
 * The full feature object if expanded.
 */
type UpdatePlanFeature = {
    /**
     * The ID of the feature, used to refer to it in other API calls like /track or /check.
     */
    id: string;
    /**
     * The name of the feature.
     */
    name?: string | null | undefined;
    /**
     * The type of the feature
     */
    type: UpdatePlanType;
    /**
     * Singular and plural display names for the feature.
     */
    display?: UpdatePlanFeatureDisplay | null | undefined;
    /**
     * Credit cost schema for credit system features.
     */
    creditSchema?: Array<UpdatePlanCreditSchema> | null | undefined;
    /**
     * Whether or not the feature is archived.
     */
    archived?: boolean | null | undefined;
};
/**
 * The interval at which the feature balance resets (e.g. 'month', 'year'). For consumable features, usage resets to 0 and included units are restored.
 */
declare const UpdatePlanResetItemIntervalResponse: {
    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";
};
/**
 * The interval at which the feature balance resets (e.g. 'month', 'year'). For consumable features, usage resets to 0 and included units are restored.
 */
type UpdatePlanResetItemIntervalResponse = OpenEnum<typeof UpdatePlanResetItemIntervalResponse>;
type UpdatePlanItemResetResponse = {
    /**
     * The interval at which the feature balance resets (e.g. 'month', 'year'). For consumable features, usage resets to 0 and included units are restored.
     */
    interval: UpdatePlanResetItemIntervalResponse;
    /**
     * Number of intervals between resets. Defaults to 1.
     */
    intervalCount?: number | undefined;
};
type UpdatePlanItemTierResponse = {
    to: number | string;
    amount: number;
    flatAmount?: number | undefined;
};
declare const UpdatePlanItemTierBehaviorResponse: {
    readonly Graduated: "graduated";
    readonly Volume: "volume";
};
type UpdatePlanItemTierBehaviorResponse = OpenEnum<typeof UpdatePlanItemTierBehaviorResponse>;
/**
 * Billing interval for this price. For consumable features, should match reset.interval.
 */
declare const UpdatePlanPriceItemIntervalResponse: {
    readonly OneOff: "one_off";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
/**
 * Billing interval for this price. For consumable features, should match reset.interval.
 */
type UpdatePlanPriceItemIntervalResponse = OpenEnum<typeof UpdatePlanPriceItemIntervalResponse>;
/**
 * 'prepaid' for features like seats where customers pay upfront, 'usage_based' for pay-as-you-go after included usage.
 */
declare const UpdatePlanItemBillingMethodResponse: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * 'prepaid' for features like seats where customers pay upfront, 'usage_based' for pay-as-you-go after included usage.
 */
type UpdatePlanItemBillingMethodResponse = OpenEnum<typeof UpdatePlanItemBillingMethodResponse>;
type UpdatePlanItemPriceResponse = {
    /**
     * Price per billing_units after included usage is consumed. Mutually exclusive with tiers.
     */
    amount?: number | undefined;
    /**
     * Tiered pricing configuration. Each tier's 'to' INCLUDES the included amount. Either 'tiers' or 'amount' is required.
     */
    tiers?: Array<UpdatePlanItemTierResponse> | undefined;
    tierBehavior?: UpdatePlanItemTierBehaviorResponse | undefined;
    /**
     * Billing interval for this price. For consumable features, should match reset.interval.
     */
    interval: UpdatePlanPriceItemIntervalResponse;
    /**
     * Number of intervals per billing cycle. Defaults to 1.
     */
    intervalCount?: number | undefined;
    /**
     * Number of units per price increment. Usage is rounded UP to the nearest billing_units when billed (e.g. billing_units=100 means 101 usage rounds to 200).
     */
    billingUnits: number;
    /**
     * 'prepaid' for features like seats where customers pay upfront, 'usage_based' for pay-as-you-go after included usage.
     */
    billingMethod: UpdatePlanItemBillingMethodResponse;
    /**
     * Maximum units a customer can purchase beyond included. E.g. if included=100 and max_purchase=300, customer can use up to 400 total before usage is capped. Null for no limit.
     */
    maxPurchase: number | null;
};
/**
 * Display text for showing this item in pricing pages.
 */
type UpdatePlanItemDisplay = {
    /**
     * Main display text (e.g. '$10' or '100 messages').
     */
    primaryText: string;
    /**
     * Secondary display text (e.g. 'per month' or 'then $0.5 per 100').
     */
    secondaryText?: string | undefined;
};
/**
 * When rolled over units expire.
 */
declare const UpdatePlanItemExpiryDurationTypeResponse: {
    readonly Month: "month";
    readonly Forever: "forever";
};
/**
 * When rolled over units expire.
 */
type UpdatePlanItemExpiryDurationTypeResponse = OpenEnum<typeof UpdatePlanItemExpiryDurationTypeResponse>;
/**
 * Rollover configuration for unused units. If set, unused included units roll over to the next period.
 */
type UpdatePlanItemRolloverResponse = {
    /**
     * Maximum rollover units. Null for unlimited rollover.
     */
    max: number | null;
    /**
     * Maximum rollover as a percentage (0-100) of included + prepaid grant. Mutually exclusive with max.
     */
    maxPercentage?: number | null | undefined;
    /**
     * When rolled over units expire.
     */
    expiryDurationType: UpdatePlanItemExpiryDurationTypeResponse;
    /**
     * Number of periods before expiry.
     */
    expiryDurationLength?: number | undefined;
};
type UpdatePlanItem = {
    /**
     * The ID of the feature this item configures.
     */
    featureId: string;
    /**
     * The full feature object if expanded.
     */
    feature?: UpdatePlanFeature | undefined;
    /**
     * Number of free units included. For consumable features, balance resets to this number each interval.
     */
    included: number;
    /**
     * Whether the customer has unlimited access to this feature.
     */
    unlimited: boolean;
    /**
     * Reset configuration for consumable features. Null for non-consumable features like seats where usage persists across billing cycles.
     */
    reset: UpdatePlanItemResetResponse | null;
    /**
     * Pricing configuration for usage beyond included units. Null if feature is entirely free.
     */
    price: UpdatePlanItemPriceResponse | null;
    /**
     * Display text for showing this item in pricing pages.
     */
    display?: UpdatePlanItemDisplay | undefined;
    /**
     * Rollover configuration for unused units. If set, unused included units roll over to the next period.
     */
    rollover?: UpdatePlanItemRolloverResponse | undefined;
};
/**
 * Unit of time for the trial duration ('day', 'month', 'year').
 */
declare const UpdatePlanDurationTypeResponse: {
    readonly Day: "day";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Unit of time for the trial duration ('day', 'month', 'year').
 */
type UpdatePlanDurationTypeResponse = OpenEnum<typeof UpdatePlanDurationTypeResponse>;
declare const UpdatePlanOnEndResponse: {
    readonly Bill: "bill";
    readonly Revert: "revert";
};
type UpdatePlanOnEndResponse = OpenEnum<typeof UpdatePlanOnEndResponse>;
/**
 * Free trial configuration. If set, new customers can try this plan before being charged.
 */
type UpdatePlanFreeTrial = {
    /**
     * Number of duration_type periods the trial lasts.
     */
    durationLength: number;
    /**
     * Unit of time for the trial duration ('day', 'month', 'year').
     */
    durationType: UpdatePlanDurationTypeResponse;
    /**
     * Whether a payment method is required to start the trial. If true, customer will be charged after trial ends.
     */
    cardRequired: boolean;
    /**
     * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
     */
    onEnd?: UpdatePlanOnEndResponse | null | undefined;
};
/**
 * Environment this plan belongs to ('sandbox' or 'live').
 */
declare const UpdatePlanEnv: {
    readonly Sandbox: "sandbox";
    readonly Live: "live";
};
/**
 * Environment this plan belongs to ('sandbox' or 'live').
 */
type UpdatePlanEnv = OpenEnum<typeof UpdatePlanEnv>;
/**
 * Billing interval (e.g. 'month', 'year').
 */
declare const UpdatePlanPriceVariantDetailsInterval: {
    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 UpdatePlanPriceVariantDetailsInterval = OpenEnum<typeof UpdatePlanPriceVariantDetailsInterval>;
/**
 * Base price configuration for a plan.
 */
type UpdatePlanBasePriceResponse = {
    /**
     * Base price amount for the plan.
     */
    amount: number;
    /**
     * Billing interval (e.g. 'month', 'year').
     */
    interval: UpdatePlanPriceVariantDetailsInterval;
    /**
     * 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 UpdatePlanVariantDetailsResetInterval: {
    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 UpdatePlanVariantDetailsResetInterval = OpenEnum<typeof UpdatePlanVariantDetailsResetInterval>;
/**
 * Reset configuration for consumable features. Omit for non-consumable features like seats.
 */
type UpdatePlanVariantDetailsReset = {
    /**
     * Interval at which balance resets (e.g. 'month', 'year'). For consumable features only.
     */
    interval: UpdatePlanVariantDetailsResetInterval;
    /**
     * Number of intervals between resets. Defaults to 1.
     */
    intervalCount?: number | undefined;
};
type UpdatePlanVariantDetailsTier = {
    to: number | string;
    amount: number;
    flatAmount?: number | undefined;
};
declare const UpdatePlanVariantDetailsTierBehavior: {
    readonly Graduated: "graduated";
    readonly Volume: "volume";
};
type UpdatePlanVariantDetailsTierBehavior = OpenEnum<typeof UpdatePlanVariantDetailsTierBehavior>;
/**
 * Billing interval. For consumable features, should match reset.interval.
 */
declare const UpdatePlanVariantDetailsAddItemPriceInterval: {
    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 UpdatePlanVariantDetailsAddItemPriceInterval = OpenEnum<typeof UpdatePlanVariantDetailsAddItemPriceInterval>;
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
declare const UpdatePlanVariantDetailsAddItemBillingMethod: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
 */
type UpdatePlanVariantDetailsAddItemBillingMethod = OpenEnum<typeof UpdatePlanVariantDetailsAddItemBillingMethod>;
/**
 * Pricing for usage beyond included units. Omit for free features.
 */
type UpdatePlanVariantDetailsPrice = {
    /**
     * 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<UpdatePlanVariantDetailsTier> | undefined;
    tierBehavior?: UpdatePlanVariantDetailsTierBehavior | undefined;
    /**
     * Billing interval. For consumable features, should match reset.interval.
     */
    interval: UpdatePlanVariantDetailsAddItemPriceInterval;
    /**
     * Number of intervals per billing cycle. Defaults to 1.
     */
    intervalCount: number;
    /**
     * Units per price increment. Usage is rounded UP when billed (e.g. billing_units=100 means 101 rounds to 200).
     */
    billingUnits: number;
    /**
     * 'prepaid' for upfront payment (seats), 'usage_based' for pay-as-you-go.
     */
    billingMethod: UpdatePlanVariantDetailsAddItemBillingMethod;
    /**
     * 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 UpdatePlanVariantDetailsOnIncrease: {
    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 UpdatePlanVariantDetailsOnIncrease = OpenEnum<typeof UpdatePlanVariantDetailsOnIncrease>;
/**
 * Credit behavior when quantity decreases mid-cycle.
 */
declare const UpdatePlanVariantDetailsOnDecrease: {
    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 UpdatePlanVariantDetailsOnDecrease = OpenEnum<typeof UpdatePlanVariantDetailsOnDecrease>;
/**
 * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
 */
type UpdatePlanProrationResponse = {
    /**
     * Billing behavior when quantity increases mid-cycle.
     */
    onIncrease: UpdatePlanVariantDetailsOnIncrease;
    /**
     * Credit behavior when quantity decreases mid-cycle.
     */
    onDecrease: UpdatePlanVariantDetailsOnDecrease;
};
/**
 * When rolled over units expire.
 */
declare const UpdatePlanVariantDetailsExpiryDurationType: {
    readonly Month: "month";
    readonly Forever: "forever";
};
/**
 * When rolled over units expire.
 */
type UpdatePlanVariantDetailsExpiryDurationType = OpenEnum<typeof UpdatePlanVariantDetailsExpiryDurationType>;
/**
 * Rollover config for unused units. If set, unused included units carry over.
 */
type UpdatePlanVariantDetailsRollover = {
    /**
     * 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: UpdatePlanVariantDetailsExpiryDurationType;
    /**
     * Number of periods before expiry.
     */
    expiryDurationLength?: number | undefined;
};
/**
 * Configuration for a feature item in a plan, including usage limits, pricing, and rollover settings.
 */
type UpdatePlanPlanItemResponse = {
    /**
     * 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?: UpdatePlanVariantDetailsReset | undefined;
    /**
     * Pricing for usage beyond included units. Omit for free features.
     */
    price?: UpdatePlanVariantDetailsPrice | undefined;
    /**
     * Proration settings for prepaid features. Controls mid-cycle quantity change billing.
     */
    proration?: UpdatePlanProrationResponse | undefined;
    /**
     * Rollover config for unused units. If set, unused included units carry over.
     */
    rollover?: UpdatePlanVariantDetailsRollover | undefined;
};
/**
 * Match items with this billing method (prepaid or usage_based).
 */
declare const UpdatePlanVariantDetailsRemoveItemBillingMethod: {
    readonly Prepaid: "prepaid";
    readonly UsageBased: "usage_based";
};
/**
 * Match items with this billing method (prepaid or usage_based).
 */
type UpdatePlanVariantDetailsRemoveItemBillingMethod = OpenEnum<typeof UpdatePlanVariantDetailsRemoveItemBillingMethod>;
declare const UpdatePlanIntervalVariantDetailsRemoveItemEnum2: {
    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 UpdatePlanIntervalVariantDetailsRemoveItemEnum2 = OpenEnum<typeof UpdatePlanIntervalVariantDetailsRemoveItemEnum2>;
declare const UpdatePlanIntervalVariantDetailsRemoveItemEnum1: {
    readonly OneOff: "one_off";
    readonly Week: "week";
    readonly Month: "month";
    readonly Quarter: "quarter";
    readonly SemiAnnual: "semi_annual";
    readonly Year: "year";
};
type UpdatePlanIntervalVariantDetailsRemoveItemEnum1 = OpenEnum<typeof UpdatePlanIntervalVariantDetailsRemoveItemEnum1>;
/**
 * Filter for matching plan items. All provided fields must match (AND).
 */
type UpdatePlanPlanItemFilterResponse = {
    /**
     * Match items linked to this feature.
     */
    featureId?: string | undefined;
    /**
     * Match items with this billing method (prepaid or usage_based).
     */
    billingMethod?: UpdatePlanVariantDetailsRemoveItemBillingMethod | 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?: UpdatePlanIntervalVariantDetailsRemoveItemEnum1 | UpdatePlanIntervalVariantDetailsRemoveItemEnum2 | 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 UpdatePlanVariantDetailsDurationType: {
    readonly Day: "day";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Unit of time for the trial ('day', 'month', 'year').
 */
type UpdatePlanVariantDetailsDurationType = OpenEnum<typeof UpdatePlanVariantDetailsDurationType>;
/**
 * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
 */
declare const UpdatePlanVariantDetailsOnEnd: {
    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 UpdatePlanVariantDetailsOnEnd = OpenEnum<typeof UpdatePlanVariantDetailsOnEnd>;
/**
 * Free trial configuration for a plan.
 */
type UpdatePlanFreeTrialParamsResponse = {
    /**
     * Number of duration_type periods the trial lasts.
     */
    durationLength: number;
    /**
     * Unit of time for the trial ('day', 'month', 'year').
     */
    durationType: UpdatePlanVariantDetailsDurationType;
    /**
     * If true, payment method required to start trial. Customer is charged after trial ends.
     */
    cardRequired: boolean;
    /**
     * Behavior when the trial ends. 'bill' charges the customer (default). 'revert' expires the trial and restores the customer's previous plan.
     */
    onEnd?: UpdatePlanVariantDetailsOnEnd | undefined;
};
/**
 * The time interval for the purchase limit window.
 */
declare const UpdatePlanVariantDetailsPurchaseLimitInterval: {
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
};
/**
 * The time interval for the purchase limit window.
 */
type UpdatePlanVariantDetailsPurchaseLimitInterval = OpenEnum<typeof UpdatePlanVariantDetailsPurchaseLimitInterval>;
/**
 * Optional rate limit to cap how often auto top-ups occur.
 */
type UpdatePlanVariantDetailsPurchaseLimit = {
    /**
     * The time interval for the purchase limit window.
     */
    interval: UpdatePlanVariantDetailsPurchaseLimitInterval;
    /**
     * Number of intervals in the purchase limit window.
     */
    intervalCount: number;
    /**
     * Maximum number of auto top-ups allowed within the interval.
     */
    limit: number;
};
type UpdatePlanVariantDetailsAutoTopup = {
    /**
     * 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?: UpdatePlanVariantDetailsPurchaseLimit | 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 UpdatePlanVariantDetailsLimitType: {
    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 UpdatePlanVariantDetailsLimitType = OpenEnum<typeof UpdatePlanVariantDetailsLimitType>;
type UpdatePlanVariantDetailsSpendLimit = {
    /**
     * 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?: UpdatePlanVariantDetailsLimitType | 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 UpdatePlanVariantDetailsUsageLimitInterval: {
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
type UpdatePlanVariantDetailsUsageLimitInterval = OpenEnum<typeof UpdatePlanVariantDetailsUsageLimitInterval>;
/**
 * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
 */
type UpdatePlanVariantDetailsFilter = {
    properties: {
        [k: string]: any;
    };
};
type UpdatePlanVariantDetailsUsageLimit = {
    /**
     * 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: UpdatePlanVariantDetailsUsageLimitInterval;
    /**
     * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
     */
    filter?: UpdatePlanVariantDetailsFilter | undefined;
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
declare const UpdatePlanVariantDetailsThresholdType: {
    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 UpdatePlanVariantDetailsThresholdType = OpenEnum<typeof UpdatePlanVariantDetailsThresholdType>;
type UpdatePlanVariantDetailsUsageAlert = {
    /**
     * 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: UpdatePlanVariantDetailsThresholdType;
    /**
     * Optional user-defined label to distinguish multiple alerts on the same feature.
     */
    name?: string | undefined;
};
type UpdatePlanVariantDetailsOverageAllowed = {
    /**
     * The feature ID this overage allowed control applies to.
     */
    featureId: string;
    /**
     * Whether overage is allowed for this feature.
     */
    enabled: boolean;
};
/**
 * Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
 */
type UpdatePlanVariantDetailsBillingControls = {
    /**
     * List of auto top-up configurations per feature.
     */
    autoTopups?: Array<UpdatePlanVariantDetailsAutoTopup> | undefined;
    /**
     * List of overage spend limits per feature (caps overage spend).
     */
    spendLimits?: Array<UpdatePlanVariantDetailsSpendLimit> | undefined;
    /**
     * List of hard usage caps per feature (max units per interval).
     */
    usageLimits?: Array<UpdatePlanVariantDetailsUsageLimit> | undefined;
    /**
     * List of usage alert configurations per feature.
     */
    usageAlerts?: Array<UpdatePlanVariantDetailsUsageAlert> | undefined;
    /**
     * List of overage allowed controls per feature. When enabled, usage can exceed balance.
     */
    overageAllowed?: Array<UpdatePlanVariantDetailsOverageAllowed> | undefined;
};
/**
 * The customization that transforms the base plan into this variant.
 */
type UpdatePlanCustomizeResponse = {
    /**
     * Override the base price of the plan. Pass null to remove the base price.
     */
    price?: UpdatePlanBasePriceResponse | null | undefined;
    /**
     * Items to add to the plan.
     */
    addItems?: Array<UpdatePlanPlanItemResponse> | undefined;
    /**
     * Filters selecting items to remove from the plan.
     */
    removeItems?: Array<UpdatePlanPlanItemFilterResponse> | undefined;
    /**
     * Override the plan's default free trial. Pass an object to set a custom trial, or null to remove the trial entirely.
     */
    freeTrial?: UpdatePlanFreeTrialParamsResponse | null | undefined;
    /**
     * Override the plan's billing controls (auto top-ups, spend limits, usage limits, usage alerts, overage allowed) for this customer.
     */
    billingControls?: UpdatePlanVariantDetailsBillingControls | undefined;
};
/**
 * Details about how this variant relates to its latest base plan.
 */
type UpdatePlanVariantDetails = {
    /**
     * The ID of the base plan this variant was derived from.
     */
    basePlanId: string;
    /**
     * The customization that transforms the base plan into this variant.
     */
    customize?: UpdatePlanCustomizeResponse | undefined;
};
/**
 * Miscellaneous plan-level configuration flags.
 */
type UpdatePlanConfigResponse = {
    /**
     * If true, entitlements attached to this plan will still reset on schedule even when the customer's product is in a past_due state.
     */
    ignorePastDue: boolean;
};
/**
 * The time interval for the purchase limit window.
 */
declare const UpdatePlanPurchaseLimitIntervalResponse: {
    readonly Hour: "hour";
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
};
/**
 * The time interval for the purchase limit window.
 */
type UpdatePlanPurchaseLimitIntervalResponse = OpenEnum<typeof UpdatePlanPurchaseLimitIntervalResponse>;
/**
 * Optional rate limit to cap how often auto top-ups occur.
 */
type UpdatePlanPurchaseLimitResponse = {
    /**
     * The time interval for the purchase limit window.
     */
    interval: UpdatePlanPurchaseLimitIntervalResponse;
    /**
     * Number of intervals in the purchase limit window.
     */
    intervalCount: number;
    /**
     * Maximum number of auto top-ups allowed within the interval.
     */
    limit: number;
};
type UpdatePlanAutoTopupResponse = {
    /**
     * 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?: UpdatePlanPurchaseLimitResponse | 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 UpdatePlanLimitTypeResponse: {
    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 UpdatePlanLimitTypeResponse = OpenEnum<typeof UpdatePlanLimitTypeResponse>;
type UpdatePlanSpendLimitResponse = {
    /**
     * 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?: UpdatePlanLimitTypeResponse | 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 UpdatePlanUsageLimitIntervalResponse: {
    readonly Day: "day";
    readonly Week: "week";
    readonly Month: "month";
    readonly Year: "year";
};
/**
 * Interval for the cap, aligned to the customer's billing cycle.
 */
type UpdatePlanUsageLimitIntervalResponse = OpenEnum<typeof UpdatePlanUsageLimitIntervalResponse>;
/**
 * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
 */
type UpdatePlanFilterResponse = {
    properties: {
        [k: string]: any;
    };
};
type UpdatePlanUsageLimitResponse = {
    /**
     * 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: UpdatePlanUsageLimitIntervalResponse;
    /**
     * When set, only usage from events whose properties match counts toward this cap. Omit to count all usage of the feature.
     */
    filter?: UpdatePlanFilterResponse | undefined;
};
/**
 * Whether the threshold is an absolute count or a percentage of the usage allowance or remaining balance.
 */
declare const UpdatePlanThresholdTypeResponse: {
    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 UpdatePlanThresholdTypeResponse = OpenEnum<typeof UpdatePlanThresholdTypeResponse>;
type UpdatePlanUsageAlertResponse = {
    /**
     * 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: UpdatePlanThresholdTypeResponse;
    /**
     * Optional user-defined label to distinguish multiple alerts on the same feature.
     */
    name?: string | undefined;
};
type UpdatePlanOverageAllowedResponse = {
    /**
     * 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 UpdatePlanBillingControlsResponse = {
    /**
     * List of auto top-up configurations per feature.
     */
    autoTopups?: Array<UpdatePlanAutoTopupResponse> | undefined;
    /**
     * List of overage spend limits per feature (caps overage spend).
     */
    spendLimits?: Array<UpdatePlanSpendLimitResponse> | undefined;
    /**
     * List of hard usage caps per feature (max units per interval).
     */
    usageLimits?: Array<UpdatePlanUsageLimitResponse> | undefined;
    /**
     * List of usage alert configurations per feature.
     */
    usageAlerts?: Array<UpdatePlanUsageAlertResponse> | undefined;
    /**
     * List of overage allowed controls per feature. When enabled, usage can exceed balance.
     */
    overageAllowed?: Array<UpdatePlanOverageAllowedResponse> | undefined;
};
/**
 * The customer's current status with this plan. 'active' if attached, 'scheduled' if pending activation.
 */
declare const UpdatePlanStatus: {
    readonly Active: "active";
    readonly Scheduled: "scheduled";
};
/**
 * The customer's current status with this plan. 'active' if attached, 'scheduled' if pending activation.
 */
type UpdatePlanStatus = OpenEnum<typeof UpdatePlanStatus>;
/**
 * The action that would occur if this plan were attached to the customer.
 */
declare const UpdatePlanAttachAction: {
    readonly Activate: "activate";
    readonly Upgrade: "upgrade";
    readonly Downgrade: "downgrade";
    readonly None: "none";
    readonly Purchase: "purchase";
};
/**
 * The action that would occur if this plan were attached to the customer.
 */
type UpdatePlanAttachAction = OpenEnum<typeof UpdatePlanAttachAction>;
type UpdatePlanCustomerEligibility = {
    /**
     * Whether the trial on this plan is available to this customer. For example, if the customer used the trial in the past, this will be false.
     */
    trialAvailable?: boolean | undefined;
    /**
     * The customer's current status with this plan. 'active' if attached, 'scheduled' if pending activation.
     */
    status?: UpdatePlanStatus | undefined;
    /**
     * Whether the customer's active instance of this plan is set to cancel.
     */
    canceling?: boolean | undefined;
    /**
     * Whether the customer is currently on a free trial of this plan.
     */
    trialing?: boolean | undefined;
    /**
     * The action that would occur if this plan were attached to the customer.
     */
    attachAction: UpdatePlanAttachAction;
};
/**
 * A plan defines a set of features, pricing, and entitlements that can be attached to customers.
 */
type UpdatePlanResponse = {
    /**
     * Unique identifier for the plan.
     */
    id: string;
    /**
     * Display name of the plan.
     */
    name: string;
    /**
     * Optional description of the plan.
     */
    description: string | null;
    /**
     * Group identifier for organizing related plans. Plans in the same group are mutually exclusive.
     */
    group: string | null;
    /**
     * Version number of the plan. Incremented when plan configuration changes.
     */
    version: number;
    /**
     * Whether this is an add-on plan that can be attached alongside a main plan.
     */
    addOn: boolean;
    /**
     * If true, this plan is automatically attached when a customer is created. Used for free plans.
     */
    autoEnable: boolean;
    /**
     * Base recurring price for the plan. Null for free plans or usage-only plans.
     */
    price: UpdatePlanPriceResponse | null;
    /**
     * Feature configurations included in this plan. Each item defines included units, pricing, and reset behavior for a feature.
     */
    items: Array<UpdatePlanItem>;
    /**
     * Free trial configuration. If set, new customers can try this plan before being charged.
     */
    freeTrial?: UpdatePlanFreeTrial | undefined;
    /**
     * Unix timestamp (ms) when the plan was created.
     */
    createdAt: number;
    /**
     * Environment this plan belongs to ('sandbox' or 'live').
     */
    env: UpdatePlanEnv;
    /**
     * Whether the plan is archived. Archived plans cannot be attached to new customers.
     */
    archived: boolean;
    /**
     * Deprecated. Use variant_details.base_plan_id instead. If this is a variant, the ID of the base plan it was created from.
     */
    baseVariantId: string | null;
    /**
     * Details about how this variant relates to its latest base plan.
     */
    variantDetails?: UpdatePlanVariantDetails | undefined;
    /**
     * Miscellaneous plan-level configuration flags.
     */
    config: UpdatePlanConfigResponse;
    /**
     * Plan-level billing controls used as customer defaults.
     */
    billingControls?: UpdatePlanBillingControlsResponse | undefined;
    /**
     * Arbitrary key-value metadata defined by you for your own use. Shared across all versions of the plan.
     */
    metadata: {
        [k: string]: any;
    };
    customerEligibility?: UpdatePlanCustomerEligibility | undefined;
};

type OAuth2PasswordFlow = {
    username: string;
    password: string;
    clientID?: string | undefined;
    clientSecret?: string | undefined;
    tokenURL: string;
};
type SecurityState = {
    basic: {
        username?: string | undefined;
        password?: string | undefined;
    };
    headers: Record<string, string>;
    queryParams: Record<string, string>;
    cookies: Record<string, string>;
    oauth2: ({
        type: "password";
    } & OAuth2PasswordFlow) | {
        type: "none";
    };
};

type HookContext = {
    baseURL: string | URL;
    operationID: string;
    oAuth2Scopes: string[] | null;
    securitySource?: any | (() => Promise<any>);
    retryConfig: RetryConfig;
    resolvedSecurity: SecurityState | null;
    options: SDKOptions;
};
type Awaitable<T> = T | Promise<T>;
type BeforeCreateRequestContext = HookContext & {};
type BeforeRequestContext = HookContext & {};
type AfterSuccessContext = HookContext & {};
type AfterErrorContext = HookContext & {};
/**
 * SDKInitHook is called when the SDK is initializing. The
 * hook can return a new baseURL and HTTP client to be used by the SDK.
 */
interface SDKInitHook {
    sdkInit: (opts: SDKOptions) => SDKOptions;
}
interface BeforeCreateRequestHook {
    /**
     * A hook that is called before the SDK creates a `Request` object. The hook
     * can modify how a request is constructed since certain modifications, like
     * changing the request URL, cannot be done on a request object directly.
     */
    beforeCreateRequest: (hookCtx: BeforeCreateRequestContext, input: RequestInput) => RequestInput;
}
interface BeforeRequestHook {
    /**
     * A hook that is called before the SDK sends a request. The hook can
     * introduce instrumentation code such as logging, tracing and metrics or
     * replace the request before it is sent or throw an error to stop the
     * request from being sent.
     */
    beforeRequest: (hookCtx: BeforeRequestContext, request: Request) => Awaitable<Request>;
}
interface AfterSuccessHook {
    /**
     * A hook that is called after the SDK receives a response. The hook can
     * introduce instrumentation code such as logging, tracing and metrics or
     * modify the response before it is handled or throw an error to stop the
     * response from being handled.
     */
    afterSuccess: (hookCtx: AfterSuccessContext, response: Response) => Awaitable<Response>;
}
interface AfterErrorHook {
    /**
     * A hook that is called after the SDK encounters an error, or a
     * non-successful response. The hook can introduce instrumentation code such
     * as logging, tracing and metrics or modify the response or error values.
     */
    afterError: (hookCtx: AfterErrorContext, response: Response | null, error: unknown) => Awaitable<{
        response: Response | null;
        error: unknown;
    }>;
}
interface Hooks {
    /** Registers a hook to be used by the SDK for initialization event. */
    registerSDKInitHook(hook: SDKInitHook): void;
    /** Registers a hook to be used by the SDK for to modify `Request` construction. */
    registerBeforeCreateRequestHook(hook: BeforeCreateRequestHook): void;
    /** Registers a hook to be used by the SDK for the before request event. */
    registerBeforeRequestHook(hook: BeforeRequestHook): void;
    /** Registers a hook to be used by the SDK for the after success event. */
    registerAfterSuccessHook(hook: AfterSuccessHook): void;
    /** Registers a hook to be used by the SDK for the after error event. */
    registerAfterErrorHook(hook: AfterErrorHook): void;
}

declare class SDKHooks implements Hooks {
    sdkInitHooks: SDKInitHook[];
    beforeCreateRequestHooks: BeforeCreateRequestHook[];
    beforeRequestHooks: BeforeRequestHook[];
    afterSuccessHooks: AfterSuccessHook[];
    afterErrorHooks: AfterErrorHook[];
    constructor();
    registerSDKInitHook(hook: SDKInitHook): void;
    registerBeforeCreateRequestHook(hook: BeforeCreateRequestHook): void;
    registerBeforeRequestHook(hook: BeforeRequestHook): void;
    registerAfterSuccessHook(hook: AfterSuccessHook): void;
    registerAfterErrorHook(hook: AfterErrorHook): void;
    sdkInit(opts: SDKOptions): SDKOptions;
    beforeCreateRequest(hookCtx: BeforeCreateRequestContext, input: RequestInput): RequestInput;
    beforeRequest(hookCtx: BeforeRequestContext, request: Request): Promise<Request>;
    afterSuccess(hookCtx: AfterSuccessContext, response: Response): Promise<Response>;
    afterError(hookCtx: AfterErrorContext, response: Response | null, error: unknown): Promise<{
        response: Response | null;
        error: unknown;
    }>;
}

type RequestOptions = {
    /**
     * Sets a timeout, in milliseconds, on HTTP requests made by an SDK method. If
     * `fetchOptions.signal` is set then it will take precedence over this option.
     */
    timeoutMs?: number;
    /**
     * Set or override a retry policy on HTTP calls.
     */
    retries?: RetryConfig;
    /**
     * Specifies the status codes which should be retried using the given retry policy.
     */
    retryCodes?: string[];
    /**
     * Overrides the base server URL that will be used by an operation.
     */
    serverURL?: string | URL;
    /**
     * @deprecated `fetchOptions` has been flattened into `RequestOptions`.
     *
     * Sets various request options on the `fetch` call made by an SDK method.
     *
     * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options|Request}
     */
    fetchOptions?: Omit<RequestInit, "method" | "body">;
} & Omit<RequestInit, "method" | "body">;
type RequestConfig = {
    method: string;
    path: string;
    baseURL?: string | URL | undefined;
    query?: string;
    body?: RequestInit["body"];
    headers?: HeadersInit;
    security?: SecurityState | null;
    uaHeader?: string;
    userAgent?: string | undefined;
    timeoutMs?: number;
};
declare class ClientSDK {
    #private;
    readonly _baseURL: URL | null;
    readonly _options: SDKOptions & {
        hooks?: SDKHooks;
    };
    constructor(options?: SDKOptions);
    _createRequest(context: HookContext, conf: RequestConfig, options?: RequestOptions): Result$1<Request, InvalidRequestError | UnexpectedClientError>;
    _do(request: Request, options: {
        context: HookContext;
        isErrorStatusCode: (statusCode: number) => boolean;
        retryConfig: RetryConfig;
        retryCodes: string[];
    }): Promise<Result$1<Response, RequestAbortedError | RequestTimeoutError | ConnectionError | UnexpectedClientError>>;
}

declare class Balances extends ClientSDK {
    /**
     * Create a balance for a customer feature.
     */
    create(request: CreateBalanceParams, options?: RequestOptions): Promise<CreateBalanceResponse>;
    /**
     * Update a customer balance.
     */
    update(request: UpdateBalanceParams, options?: RequestOptions): Promise<UpdateBalanceResponse>;
    /**
     * Delete a balance for a customer feature. Can only delete a balance that is not attached to a price (eg. you cannot delete messages that have an overage price).
     */
    delete(request: DeleteBalanceParams, options?: RequestOptions): Promise<DeleteBalanceResponse>;
    /**
     * Finalize a previously locked balance. Use 'confirm' to commit the deduction, or 'release' to return the held balance.
     */
    finalize(request: FinalizeBalanceParams, options?: RequestOptions): Promise<FinalizeLockResponse>;
}

declare class Billing extends ClientSDK {
    /**
     * Attaches a plan to a customer. Handles new subscriptions, upgrades and downgrades.
     *
     * Use this endpoint to subscribe a customer to a plan, upgrade/downgrade between plans, or add an add-on product.
     *
     * @example
     * ```typescript
     * // Attach a plan to a customer
     * const response = await client.billing.attach({ customerId: "cus_123", planId: "pro_plan" });
     * ```
     *
     * @example
     * ```typescript
     * // Attach with a free trial
     * const response = await client.billing.attach({ customerId: "cus_123", planId: "pro_plan", freeTrial: {"durationLength":14,"durationType":"day"} });
     * ```
     *
     * @example
     * ```typescript
     * // Attach with custom pricing
     * const response = await client.billing.attach({ customerId: "cus_123", planId: "pro_plan", customize: {"price":{"amount":4900,"interval":"month"}} });
     * ```
     *
     * @param customerId - The ID of the customer to attach the plan to.
     * @param entityId - The ID of the entity to attach the plan to. (optional)
     * @param planId - The ID of the plan.
     * @param featureQuantities - 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. (optional)
     * @param version - The version of the plan to attach. (optional)
     * @param customize - Customize the plan to attach. Can override the price, items, free trial, or a combination. (optional)
     * @param invoiceMode - 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. (optional)
     * @param prorationBehavior - How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges. (optional)
     * @param redirectMode - 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. (optional)
     * @param subscriptionId - 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. (optional)
     * @param discounts - List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code. (optional)
     * @param successUrl - URL to redirect to after successful checkout. (optional)
     * @param newBillingSubscription - Only applicable when the customer has an existing Stripe subscription. If true, creates a new separate subscription instead of merging into the existing one. (optional)
     * @param billingCycleAnchor - Reset the billing cycle anchor immediately with 'now'. (optional)
     * @param planSchedule - 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. (optional)
     * @param startsAt - Unix timestamp in milliseconds for when the attached plan should start. Future dates create a scheduled subscription. (optional)
     * @param endsAt - Unix timestamp in milliseconds for when the attached plan should end. (optional)
     * @param checkoutSessionParams - Additional parameters to pass into the creation of the Stripe checkout session. (optional)
     * @param longLivedCheckout - If true, returns an Autumn-hosted checkout link that can create a fresh Stripe checkout session when opened. (optional)
     * @param customLineItems - Custom line items that override the auto-generated proration invoice. Only valid for immediate plan changes (eg. upgrades or one off plans). (optional)
     * @param processorSubscriptionId - The processor subscription ID to link. Use this to attach an existing Stripe subscription instead of creating a new one. (optional)
     * @param carryOverBalances - Whether to carry over balances from the previous plan. (optional)
     * @param carryOverUsages - Whether to carry over usages from the previous plan. (optional)
     * @param metadata - 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. (optional)
     * @param noBillingChanges - If true, skips any billing changes for the attach operation. (optional)
     * @param enablePlanImmediately - 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. (optional)
     * @param taxRateId - Stripe tax rate ID (txr_...) to apply as the default tax rate on the created subscription, invoice, or checkout session line items. (optional)
     *
     * @returns A billing response with customer ID, invoice details, and payment URL (if checkout required).
     */
    attach(request: AttachParams, options?: RequestOptions): Promise<AttachResponse>;
    /**
     * Creates a multi-phase subscription schedule for a customer. The first phase starts immediately and subsequent phases automatically transition at their scheduled start times.
     *
     * Use this endpoint to schedule future plan changes (e.g. switch from a trial plan to a paid plan on a specific date) or to define a sequence of plans that should activate over time.
     *
     * @example
     * ```typescript
     * // Schedule a transition from a trial plan to a paid plan
     * const response = await client.billing.createSchedule({ customerId: "cus_123", phases: [{"startsAt":1783704557304,"plans":[{"planId":"trial_plan"}]},{"startsAt":1784914157304,"plans":[{"planId":"pro_plan"}]}] });
     * ```
     *
     * @param customerId - The ID of the customer to create the schedule for.
     * @param entityId - Optional entity ID for an entity-scoped schedule. (optional)
     * @param invoiceMode - Invoice mode creates and sends an invoice instead of charging the customer's payment method immediately for the first phase. (optional)
     * @param discounts - List of discounts to apply to the immediate phase. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code. (optional)
     * @param successUrl - URL to redirect to after successful checkout. (optional)
     * @param checkoutSessionParams - Additional parameters to pass into the creation of the Stripe checkout session. (optional)
     * @param redirectMode - Controls when to return a checkout URL for the immediate phase. 'always' forces a confirmation or checkout flow, 'if_required' only redirects when needed, and 'never' disables redirects. (optional)
     * @param billingBehavior - Whether to prorate the immediate phase. 'none' skips proration charges and credits. (optional)
     * @param billingCycleAnchor - Pass 'now' to reset the billing cycle anchor of the immediate phase to the current time. (optional)
     * @param enablePlanImmediately - If true, the immediate-phase cusProducts are activated immediately (and scheduled-phase cusProducts pre-inserted) even when payment is pending via Stripe checkout. The Autumn schedule rows are persisted on checkout.session.completed. (optional)
     * @param phases - Ordered phase definitions for the schedule.
     *
     * @returns A create-schedule response with the schedule ID, persisted phases, and any required payment or checkout URL.
     */
    createSchedule(request: CreateScheduleParams, options?: RequestOptions): Promise<CreateScheduleResponse>;
    /**
     * Attaches multiple plans to a customer in a single request. Creates a single Stripe subscription with all plans consolidated.
     *
     * Use this endpoint when you need to subscribe a customer to multiple plans at once, such as a base plan plus add-ons, or to create a bundle of products.
     *
     * @example
     * ```typescript
     * // Attach multiple plans to a customer
     * const response = await client.billing.multiAttach({ customerId: "cus_123", plans: [{"planId":"pro_plan"},{"planId":"addon_seats","featureQuantities":[{"featureId":"seats","quantity":5}]}] });
     * ```
     *
     * @example
     * ```typescript
     * // Attach with free trial applied to all plans
     * const response = await client.billing.multiAttach({ customerId: "cus_123", plans: [{"planId":"pro_plan"},{"planId":"addon_storage"}], freeTrial: {"durationLength":14,"durationType":"day"} });
     * ```
     *
     * @example
     * ```typescript
     * // Attach with custom pricing on one plan
     * const response = await client.billing.multiAttach({ customerId: "cus_123", plans: [{"planId":"pro_plan","customize":{"price":{"amount":4900,"interval":"month"}}},{"planId":"addon_support"}] });
     * ```
     *
     * @param customerId - The ID of the customer to attach the plans to.
     * @param entityId - The ID of the entity to attach the plans to. (optional)
     * @param plans - The list of plans to attach to the customer.
     * @param freeTrial - Free trial configuration applied to all plans. Pass an object to set a custom trial, or null to remove any trial. (optional)
     * @param invoiceMode - Invoice mode creates a draft or open invoice and sends it to the customer, instead of charging their card immediately. (optional)
     * @param discounts - List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code. (optional)
     * @param successUrl - URL to redirect to after successful checkout. (optional)
     * @param checkoutSessionParams - Additional parameters to pass into the creation of the Stripe checkout session. (optional)
     * @param redirectMode - 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. (optional)
     * @param newBillingSubscription - Only applicable when the customer has an existing Stripe subscription. If true, creates a new separate subscription instead of merging into the existing one. (optional)
     * @param enablePlanImmediately - If true, the cusProducts are activated immediately even when payment is pending via Stripe checkout. (optional)
     *
     * @returns A billing response with customer ID, invoice details, and payment URL (if checkout required).
     */
    multiAttach(request: MultiAttachParams, options?: RequestOptions): Promise<MultiAttachResponse>;
    /**
     * Previews the billing changes that would occur when attaching a plan, without actually making any changes.
     *
     * Use this endpoint to show customers what they will be charged before confirming a subscription change.
     *
     * @example
     * ```typescript
     * // Preview attaching a plan
     * const response = await client.billing.previewAttach({ customerId: "cus_123", planId: "pro_plan" });
     * ```
     *
     * @param customerId - The ID of the customer to attach the plan to.
     * @param entityId - The ID of the entity to attach the plan to. (optional)
     * @param planId - The ID of the plan.
     * @param featureQuantities - 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. (optional)
     * @param version - The version of the plan to attach. (optional)
     * @param customize - Customize the plan to attach. Can override the price, items, free trial, or a combination. (optional)
     * @param invoiceMode - 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. (optional)
     * @param prorationBehavior - How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges. (optional)
     * @param redirectMode - 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. (optional)
     * @param subscriptionId - 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. (optional)
     * @param discounts - List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code. (optional)
     * @param successUrl - URL to redirect to after successful checkout. (optional)
     * @param newBillingSubscription - Only applicable when the customer has an existing Stripe subscription. If true, creates a new separate subscription instead of merging into the existing one. (optional)
     * @param billingCycleAnchor - Reset the billing cycle anchor immediately with 'now'. (optional)
     * @param planSchedule - 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. (optional)
     * @param startsAt - Unix timestamp in milliseconds for when the attached plan should start. Future dates create a scheduled subscription. (optional)
     * @param endsAt - Unix timestamp in milliseconds for when the attached plan should end. (optional)
     * @param checkoutSessionParams - Additional parameters to pass into the creation of the Stripe checkout session. (optional)
     * @param longLivedCheckout - If true, returns an Autumn-hosted checkout link that can create a fresh Stripe checkout session when opened. (optional)
     * @param customLineItems - Custom line items that override the auto-generated proration invoice. Only valid for immediate plan changes (eg. upgrades or one off plans). (optional)
     * @param processorSubscriptionId - The processor subscription ID to link. Use this to attach an existing Stripe subscription instead of creating a new one. (optional)
     * @param carryOverBalances - Whether to carry over balances from the previous plan. (optional)
     * @param carryOverUsages - Whether to carry over usages from the previous plan. (optional)
     * @param metadata - 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. (optional)
     * @param noBillingChanges - If true, skips any billing changes for the attach operation. (optional)
     * @param enablePlanImmediately - 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. (optional)
     * @param taxRateId - Stripe tax rate ID (txr_...) to apply as the default tax rate on the created subscription, invoice, or checkout session line items. (optional)
     *
     * @returns A preview response with line items, totals, and effective dates for the proposed changes.
     */
    previewAttach(request: PreviewAttachParams, options?: RequestOptions): Promise<PreviewAttachResponse>;
    /**
     * Previews the billing changes that would occur when attaching multiple plans, without actually making any changes.
     *
     * Use this endpoint to show customers what they will be charged before confirming a multi-plan subscription.
     *
     * @example
     * ```typescript
     * // Preview attaching multiple plans
     * const response = await client.billing.previewMultiAttach({ customerId: "cus_123", plans: [{"planId":"pro_plan"},{"planId":"addon_seats","featureQuantities":[{"featureId":"seats","quantity":5}]}] });
     * ```
     *
     * @param customerId - The ID of the customer to attach the plans to.
     * @param entityId - The ID of the entity to attach the plans to. (optional)
     * @param plans - The list of plans to attach to the customer.
     * @param freeTrial - Free trial configuration applied to all plans. Pass an object to set a custom trial, or null to remove any trial. (optional)
     * @param invoiceMode - Invoice mode creates a draft or open invoice and sends it to the customer, instead of charging their card immediately. (optional)
     * @param discounts - List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code. (optional)
     * @param successUrl - URL to redirect to after successful checkout. (optional)
     * @param checkoutSessionParams - Additional parameters to pass into the creation of the Stripe checkout session. (optional)
     * @param redirectMode - 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. (optional)
     * @param newBillingSubscription - Only applicable when the customer has an existing Stripe subscription. If true, creates a new separate subscription instead of merging into the existing one. (optional)
     * @param enablePlanImmediately - If true, the cusProducts are activated immediately even when payment is pending via Stripe checkout. (optional)
     *
     * @returns A preview response with line items, totals, and effective dates for the proposed multi-plan attachment.
     */
    previewMultiAttach(request: PreviewMultiAttachParams, options?: RequestOptions): Promise<PreviewMultiAttachResponse>;
    /**
     * Updates an existing subscription. Use to modify feature quantities, cancel, or change plan configuration.
     *
     * Use this endpoint to update prepaid quantities, cancel a subscription (immediately or at end of cycle), or modify subscription settings.
     *
     * @example
     * ```typescript
     * // Update prepaid feature quantity
     * const response = await client.billing.update({ customerId: "cus_123", planId: "pro_plan", featureQuantities: [{"featureId":"seats","quantity":10}] });
     * ```
     *
     * @example
     * ```typescript
     * // Cancel a subscription at end of billing cycle
     * const response = await client.billing.update({ customerId: "cus_123", planId: "pro_plan", cancelAction: "cancel_end_of_cycle" });
     * ```
     *
     * @example
     * ```typescript
     * // Uncancel a subscription at the end of the billing cycle
     * const response = await client.billing.update({ customerId: "cus_123", planId: "pro_plan", cancelAction: "uncancel" });
     * ```
     *
     * @param customerId - The ID of the customer to attach the plan to.
     * @param entityId - The ID of the entity to attach the plan to. (optional)
     * @param planId - The ID of the plan to update. Optional if subscription_id is provided, or if the customer has only one product. (optional)
     * @param featureQuantities - 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. (optional)
     * @param version - The version of the plan to attach. (optional)
     * @param customize - Customize the plan to attach. Can override the price, items, free trial, or a combination. (optional)
     * @param invoiceMode - 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. (optional)
     * @param prorationBehavior - How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges. (optional)
     * @param redirectMode - 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. (optional)
     * @param subscriptionId - 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. (optional)
     * @param discounts - List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code. (optional)
     * @param cancelAction - 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. (optional)
     * @param billingCycleAnchor - Reset the billing cycle anchor immediately with 'now' (optional)
     * @param noBillingChanges - If true, the subscription is updated internally without applying billing changes in Stripe. (optional)
     * @param refundLastPayment - Controls how the last payment is refunded on immediate cancellation. 'prorated' refunds the unused portion, 'full' refunds the entire last payment. (optional)
     * @param recalculateBalances - Controls whether balances should be recalculated during the subscription update. (optional)
     * @param carryOverUsages - Whether to carry over usages from the previous plan. (optional)
     *
     * @returns A billing response with customer ID, invoice details, and payment URL (if next action is required).
     */
    update(request: UpdateSubscriptionParams, options?: RequestOptions): Promise<BillingUpdateResponse>;
    /**
     * Previews the billing changes that would occur when updating a subscription, without actually making any changes.
     *
     * Use this endpoint to show customers prorated charges or refunds before confirming subscription modifications.
     *
     * @example
     * ```typescript
     * // Preview updating seat quantity
     * const response = await client.billing.previewUpdate({ customerId: "cus_123", planId: "pro_plan", featureQuantities: [{"featureId":"seats","quantity":15}] });
     * ```
     *
     * @param customerId - The ID of the customer to attach the plan to.
     * @param entityId - The ID of the entity to attach the plan to. (optional)
     * @param planId - The ID of the plan to update. Optional if subscription_id is provided, or if the customer has only one product. (optional)
     * @param featureQuantities - 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. (optional)
     * @param version - The version of the plan to attach. (optional)
     * @param customize - Customize the plan to attach. Can override the price, items, free trial, or a combination. (optional)
     * @param invoiceMode - 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. (optional)
     * @param prorationBehavior - How to handle proration when updating an existing subscription. 'prorate_immediately' charges/credits prorated amounts now, 'none' skips creating any charges. (optional)
     * @param redirectMode - 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. (optional)
     * @param subscriptionId - 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. (optional)
     * @param discounts - List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code. (optional)
     * @param cancelAction - 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. (optional)
     * @param billingCycleAnchor - Reset the billing cycle anchor immediately with 'now' (optional)
     * @param noBillingChanges - If true, the subscription is updated internally without applying billing changes in Stripe. (optional)
     * @param refundLastPayment - Controls how the last payment is refunded on immediate cancellation. 'prorated' refunds the unused portion, 'full' refunds the entire last payment. (optional)
     * @param recalculateBalances - Controls whether balances should be recalculated during the subscription update. (optional)
     * @param carryOverUsages - Whether to carry over usages from the previous plan. (optional)
     *
     * @returns A preview response with line items showing prorated charges or credits for the proposed changes.
     */
    previewUpdate(request: PreviewUpdateParams, options?: RequestOptions): Promise<PreviewUpdateResponse>;
    /**
     * Updates multiple plans on a customer in a single request. Currently supports cancel actions (immediately, end of cycle, or uncancel) across one or more subscriptions.
     *
     * Use this endpoint to cancel or uncancel several plans atomically in one call — for example canceling a main plan together with its add-ons, or plans across multiple entities.
     *
     * @example
     * ```typescript
     * // Cancel a plan and an add-on at end of cycle
     * const response = await client.billing.multiUpdate({ customerId: "cus_123", updates: [{"planId":"pro_plan","cancelAction":"cancel_end_of_cycle"},{"planId":"addon_seats","cancelAction":"cancel_end_of_cycle"}] });
     * ```
     *
     * @example
     * ```typescript
     * // Uncancel one plan and cancel another immediately
     * const response = await client.billing.multiUpdate({ customerId: "cus_123", updates: [{"planId":"pro_plan","cancelAction":"uncancel"},{"planId":"addon_seats","cancelAction":"cancel_immediately"}] });
     * ```
     *
     * @param customerId - The ID of the customer to update plans for.
     * @param entityId - The ID of the entity to update plans for. Individual updates can override this with their own entity_id. (optional)
     * @param updates - The list of plan updates to apply to the customer.
     *
     * @returns A billing response with the resulting invoice summary (one credit invoice per affected subscription for immediate cancels).
     */
    multiUpdate(request: MultiUpdateParams, options?: RequestOptions): Promise<MultiUpdateResponse>;
    /**
     * Previews the billing changes of a multi-plan update without making any changes. Returns one core preview per affected subscription.
     *
     * Use this endpoint to show customers the credits and next-cycle changes of canceling multiple plans before confirming.
     *
     * @example
     * ```typescript
     * // Preview canceling two plans immediately
     * const response = await client.billing.previewMultiUpdate({ customerId: "cus_123", updates: [{"planId":"pro_plan","cancelAction":"cancel_immediately"},{"planId":"addon_seats","cancelAction":"cancel_immediately"}] });
     * ```
     *
     * @param customerId - The ID of the customer to update plans for.
     * @param entityId - The ID of the entity to update plans for. Individual updates can override this with their own entity_id. (optional)
     * @param updates - The list of plan updates to apply to the customer.
     *
     * @returns A preview with the combined total plus one entry per subscription, each with its own line items, totals, and next-cycle preview.
     */
    previewMultiUpdate(request: PreviewMultiUpdateParams, options?: RequestOptions): Promise<MultiUpdatePreviewResponse>;
    /**
     * Create a billing portal session for a customer to manage their subscription.
     */
    openCustomerPortal(request: OpenCustomerPortalParams, options?: RequestOptions): Promise<OpenCustomerPortalResponse>;
    /**
     * Create a payment setup session for a customer to add or update their payment method.
     */
    setupPayment(request: SetupPaymentParams, options?: RequestOptions): Promise<SetupPaymentResponse>;
    /**
     * Import
     *
     * @remarks
     * Image a customer into Autumn for live migration. Read-only against processors.
     */
    import(request: DfuFlashParams, options?: RequestOptions): Promise<DfuFlashResult>;
}

declare class Customers extends ClientSDK {
    /**
     * Creates a customer if they do not exist, or returns the existing customer by your external customer ID.
     *
     * Use this as the primary entrypoint before billing operations so the customer record is always present and up to date.
     *
     * @example
     * ```typescript
     * // Create or fetch a customer by external ID
     * const response = await client.getOrCreate({ customerId: "cus_123", name: "John Doe", email: "john@example.com" });
     * ```
     *
     * @param id - Your unique identifier for the customer (optional)
     * @param name - Customer's name (optional)
     * @param email - Customer's email address (optional)
     * @param fingerprint - Unique identifier (eg, serial number) to detect duplicate customers and prevent free trial abuse (optional)
     * @param metadata - Additional metadata for the customer (optional)
     * @param stripeId - Stripe customer ID if you already have one (optional)
     * @param createInStripe - Whether to create the customer in Stripe (optional)
     * @param autoEnablePlanId - The ID of the free plan to auto-enable for the customer (optional)
     * @param sendEmailReceipts - Whether to send email receipts to this customer (optional)
     * @param billingControls - Billing controls for the customer (auto top-ups, etc.) (optional)
     * @param config - Miscellaneous configurations for the customer. (optional)
     * @param expand - Fields to expand in the returned customer response, such as subscriptions.plan, purchases.plan, balances.feature, or flags.feature. (optional)
     */
    getOrCreate(request: GetOrCreateCustomerParams, options?: RequestOptions): Promise<Customer>;
    /**
     * Fetches a customer by ID, optionally expanding related data such as invoices or entities.
     *
     * Use this when you know the customer exists or assert they exist without creating them.
     *
     * @example
     * ```typescript
     * // Fetch a customer by external ID
     * const response = await client.get({ customerId: "cus_123" });
     * ```
     *
     * @example
     * ```typescript
     * // Fetch a customer with expanded invoices and entities
     * const response = await client.get({ customerId: "cus_123", expand: ["invoices","entities"] });
     * ```
     *
     * @param customerId - ID of the customer to fetch
     * @param expand - Expand related customer data like invoices or entities, or expand nested objects like balances.feature, flags.feature, subscriptions.plan, and purchases.plan. (optional)
     */
    get(request: GetCustomerParams, options?: RequestOptions): Promise<GetCustomerResponse>;
    /**
     * Lists customers with cursor pagination and optional filters. Pass `start_cursor: ""` (or omit) for the first page; use `next_cursor` from a prior response for subsequent pages.
     */
    list(request: ListCustomersParams, options?: RequestOptions): Promise<ListCustomersResponse>;
    /**
     * Updates an existing customer by ID.
     */
    update(request: UpdateCustomerParams, options?: RequestOptions): Promise<UpdateCustomerResponse>;
    /**
     * Deletes a customer by ID.
     */
    delete(request: DeleteCustomerParams, options?: RequestOptions): Promise<DeleteCustomerResponse>;
}

declare class Entities extends ClientSDK {
    /**
     * Creates an entity for a customer and feature, then returns the entity with balances and subscriptions.
     *
     * Use entities when usage and access must be scoped to sub-resources (for example seats, projects, or workspaces) instead of only the customer.
     *
     * @example
     * ```typescript
     * // Create a seat entity
     * const response = await client.entities.create({
     *
     *   customerId: "cus_123",
     *   entityId: "seat_42",
     *   featureId: "seats",
     *   name: "Seat 42",
     * });
     * ```
     *
     * @param name - The name of the entity (optional)
     * @param featureId - The ID of the feature this entity is associated with
     * @param billingControls - Billing controls for the entity. (optional)
     * @param customerData - Customer attributes used to resolve the customer when customer_id is not provided. (optional)
     * @param customerId - The ID of the customer to create the entity for.
     * @param entityId - The ID of the entity.
     *
     * @returns The created entity object including its current subscriptions, purchases, and balances.
     */
    create(request: CreateEntityParams, options?: RequestOptions): Promise<CreateEntityResponse>;
    /**
     * Fetches an entity by its ID.
     *
     * Use this to read one entity's current state. Pass customerId when you want to scope the lookup to a specific customer.
     *
     * @example
     * ```typescript
     * // Fetch a seat entity
     * const response = await client.entities.get({ entityId: "seat_42" });
     * ```
     *
     * @example
     * ```typescript
     * // Fetch a seat entity for a specific customer
     * const response = await client.entities.get({ customerId: "cus_123", entityId: "seat_42" });
     * ```
     *
     * @param customerId - The ID of the customer to create the entity for. (optional)
     * @param entityId - The ID of the entity.
     *
     * @returns The entity object including its current subscriptions, purchases, and balances.
     */
    get(request: GetEntityParams, options?: RequestOptions): Promise<GetEntityResponse>;
    /**
     * Lists entities across the organization with pagination and optional filters.
     *
     * Use this to page through entities globally, including filtering by plans inherited from parent customers or attached directly to entities.
     *
     * @example
     * ```typescript
     * // List entities on a plan
     * const response = await client.entities.list({ plans: [{"id":"pro_plan"}], limit: 10, offset: 0 });
     * ```
     *
     * @example
     * ```typescript
     * // Search entities by ID or name
     * const response = await client.entities.list({ search: "workspace" });
     * ```
     *
     * @param offset - Number of items to skip (optional)
     * @param limit - Number of items to return. Default 10, max 1000. (optional)
     * @param plans - Filter by plan ID and version. Returns entities with active subscriptions to this plan, including plans inherited from the parent customer. (optional)
     * @param subscriptionStatus - Filter customer products used for entity hydration and plan matching. Defaults to active and scheduled. (optional)
     * @param search - Search entities by id or name. (optional)
     * @param processors - Filter by parent customer processor type (stripe, revenuecat, vercel). (optional)
     * @param customerId - Restrict the response to entities owned by this customer id. Use to bulk-fetch all entities for one customer in a single paginated call instead of iterating entities.get. (optional)
     *
     * @returns A paginated list of entity objects including their current subscriptions, purchases, balances, and flags.
     */
    list(request: ListEntitiesParams, options?: RequestOptions): Promise<ListEntitiesResponse>;
    /**
     * Updates an existing entity and returns the refreshed entity object.
     *
     * Use this to change entity billing controls or other mutable entity fields after the entity has already been created.
     *
     * @example
     * ```typescript
     * // Update a seat entity's billing controls
     * const response = await client.entities.update({ customerId: "cus_123", entityId: "seat_42", billingControls: {"spendLimits":[{"featureId":"messages","enabled":true,"overageLimit":25}]} });
     * ```
     *
     * @param customerId - The ID of the customer that owns the entity. (optional)
     * @param entityId - The ID of the entity.
     * @param billingControls - Billing controls to replace on the entity. (optional)
     *
     * @returns The updated entity object including its current subscriptions, purchases, and balances.
     */
    update(request: UpdateEntityParams, options?: RequestOptions): Promise<UpdateEntityResponse>;
    /**
     * Deletes an entity by entity ID.
     *
     * Use this when the underlying resource is removed and you no longer want entity-scoped balances or subscriptions tracked for it.
     *
     * @example
     * ```typescript
     * // Delete a seat entity
     * const response = await client.entities.delete({ entityId: "seat_42" });
     * ```
     *
     * @param customerId - The ID of the customer. (optional)
     * @param entityId - The ID of the entity.
     *
     * @returns A success flag indicating the entity was deleted.
     */
    delete(request: DeleteEntityParams, options?: RequestOptions): Promise<DeleteEntityResponse>;
}

declare class Events extends ClientSDK {
    /**
     * List usage events for your organization. Filter by customer, feature, or time range.
     */
    list(request: EventsListParams, options?: RequestOptions): Promise<ListEventsResponse>;
    /**
     * Aggregate usage events by time period. Returns usage totals grouped by feature and optionally by a custom property.
     */
    aggregate(request: EventsAggregateParams, options?: RequestOptions): Promise<AggregateEventsResponse>;
}

declare class Features extends ClientSDK {
    /**
     * Creates a new feature.
     *
     * Use this to programmatically create features for metering usage, managing access, or building credit systems.
     *
     * @example
     * ```typescript
     * // Create a metered feature for API calls
     * const response = await client.features.create({
     *
     *   featureId: "api-calls",
     *   name: "API Calls",
     *   type: "metered",
     *   consumable: true,
     * });
     * ```
     *
     * @example
     * ```typescript
     * // Create a boolean feature for a premium feature flag
     * const response = await client.features.create({ featureId: "advanced-analytics", name: "Advanced Analytics", type: "boolean" });
     * ```
     *
     * @param name - The name of the feature.
     * @param type - The type of the feature. 'single_use' features are consumed, like API calls, tokens, or messages. 'continuous_use' features are allocated, like seats, workspaces, or projects. 'credit_system' features are schemas that unify multiple 'single_use' features into a single credit system.
     * @param consumable - Whether this feature is consumable. A consumable feature is one that periodically resets and is consumed rather than allocated (like credits, API requests, etc.). Applicable only for 'metered' features. (optional)
     * @param display - Singular and plural display names for the feature in your user interface. (optional)
     * @param creditSchema - A schema that maps 'single_use' feature IDs to credit costs. For classic credit systems only — AI credit systems use model_markups instead. (optional)
     * @param modelMarkups - Per-model markup overrides for AI credit systems. Maps model IDs to their markup configuration. (optional)
     * @param defaultMarkup - Default percentage markup for this AI credit system. Used when no model or provider markup applies. Use -100 to make usage free. (optional)
     * @param providerMarkups - Per-provider default markup percentages for AI credit systems. Provider keys match the first segment of model_id. (optional)
     * @param featureId - The ID of the feature to create.
     *
     * @returns The created feature object.
     */
    create(request: CreateFeatureParams, options?: RequestOptions): Promise<CreateFeatureResponse>;
    /**
     * Retrieves a single feature by its ID.
     *
     * Use this when you need to fetch the details of a specific feature.
     *
     * @example
     * ```typescript
     * // Get a feature by ID
     * const response = await client.features.get({ featureId: "api-calls" });
     * ```
     *
     * @param featureId - The ID of the feature.
     *
     * @returns The feature object with its full configuration.
     */
    get(request: GetFeatureParams, options?: RequestOptions): Promise<GetFeatureResponse>;
    /**
     * Lists all features in the current environment.
     *
     * Use this to retrieve all features configured for your organization to display in dashboards or for feature management.
     *
     * @returns A list of all features with their configuration and metadata.
     */
    list(request?: ListFeaturesRequest | undefined, options?: RequestOptions): Promise<ListFeaturesResponse>;
    /**
     * Updates an existing feature.
     *
     * Use this to modify feature properties like name, display settings, or to archive a feature.
     *
     * @example
     * ```typescript
     * // Update a feature's display name
     * const response = await client.features.update({ featureId: "api-calls", name: "API Requests", display: {"singular":"API request","plural":"API requests"} });
     * ```
     *
     * @example
     * ```typescript
     * // Archive a feature
     * const response = await client.features.update({ featureId: "deprecated-feature", archived: true });
     * ```
     *
     * @param name - The name of the feature. (optional)
     * @param type - The type of the feature. 'single_use' features are consumed, like API calls, tokens, or messages. 'continuous_use' features are allocated, like seats, workspaces, or projects. 'credit_system' features are schemas that unify multiple 'single_use' features into a single credit system. (optional)
     * @param consumable - Whether this feature is consumable. A consumable feature is one that periodically resets and is consumed rather than allocated (like credits, API requests, etc.). Applicable only for 'metered' features. (optional)
     * @param display - Singular and plural display names for the feature in your user interface. (optional)
     * @param creditSchema - A schema that maps 'single_use' feature IDs to credit costs. For classic credit systems only — AI credit systems use model_markups instead. (optional)
     * @param modelMarkups - Per-model markup overrides for AI credit systems. Maps model IDs to their markup configuration. (optional)
     * @param defaultMarkup - Default percentage markup for this AI credit system. Used when no model or provider markup applies. Use -100 to make usage free. (optional)
     * @param providerMarkups - Per-provider default markup percentages for AI credit systems. Provider keys match the first segment of model_id. (optional)
     * @param archived - Whether the feature is archived. Archived features are hidden from the dashboard. (optional)
     * @param featureId - The ID of the feature to update.
     * @param newFeatureId - The new ID of the feature. Feature ID can only be updated if it's not being used by any customers. (optional)
     *
     * @returns The updated feature object.
     */
    update(request: UpdateFeatureParams, options?: RequestOptions): Promise<UpdateFeatureResponse>;
    /**
     * Deletes a feature by its ID.
     *
     * Use this to permanently remove a feature. Note: features that are used in products cannot be deleted - archive them instead.
     *
     * @example
     * ```typescript
     * // Delete an unused feature
     * const response = await client.features.delete({ featureId: "old-feature" });
     * ```
     *
     * @param featureId - The ID of the feature to delete.
     *
     * @returns A success flag indicating the feature was deleted.
     */
    delete(request: DeleteFeatureParams, options?: RequestOptions): Promise<DeleteFeatureResponse>;
}

declare class Keys extends ClientSDK {
    /**
     * Mints a per-customer token (a scoped `am_jwt_` credential) so a downstream / self-hosted app can call Autumn directly without your secret key. Returns a short-lived access token plus a rotating refresh token, both bound to the given customer. Authenticated with your secret key.
     */
    mint(request: MintKeyParams, options?: RequestOptions): Promise<MintKeyResponse>;
    /**
     * Exchanges a refresh token (sent as the Bearer credential) for a freshly rotated access + refresh pair. Self-service for the token holder — no secret key required. The previous refresh token is honored for one rotation as a grace window; replaying an older one revokes the customer's tokens.
     */
    refresh(request: RefreshKeyParams, options?: RequestOptions): Promise<RefreshKeyResponse>;
    /**
     * Revokes every outstanding token (access and refresh) for a customer. Authenticated with your secret key. New tokens can be issued afterwards with `keys.mint`.
     */
    revoke(request: RevokeKeyParams, options?: RequestOptions): Promise<RevokeKeyResponse>;
}

declare class Plans extends ClientSDK {
    /**
     * Create a plan
     *
     * @remarks
     * Creates a new plan with optional base price and feature configurations.
     *
     * Use this to programmatically create pricing plans. See [How plans work](/documentation/pricing/plans) for concepts.
     *
     * @example
     * ```typescript
     * // Create a free plan with limited features
     * const response = await client.plans.create({
     *   planId: "free_plan",
     *   name: "Free",
     *   autoEnable: true,
     *   items: [{"featureId":"messages","included":100,"reset":{"interval":"month"}}],
     * });
     * ```
     *
     * @example
     * ```typescript
     * // Create a paid plan with base price and usage-based feature
     * const response = await client.plans.create({
     *   planId: "pro_plan",
     *   name: "Pro Plan",
     *   price: {"amount":10,"interval":"month"},
     *   items: [{"featureId":"messages","included":1000,"reset":{"interval":"month"},"price":{"amount":0.01,"interval":"month","billingUnits":1,"billingMethod":"usage_based"}}],
     * });
     * ```
     *
     * @example
     * ```typescript
     * // Create a plan with prepaid seats
     * const response = await client.plans.create({
     *   planId: "team_plan",
     *   name: "Team Plan",
     *   price: {"amount":49,"interval":"month"},
     *   items: [{"featureId":"seats","included":5,"price":{"amount":10,"interval":"month","billingUnits":1,"billingMethod":"prepaid"}}],
     * });
     * ```
     *
     * @example
     * ```typescript
     * // Create an add-on plan
     * const response = await client.plans.create({
     *   planId: "analytics_addon",
     *   name: "Advanced Analytics",
     *   addOn: true,
     *   price: {"amount":20,"interval":"month"},
     * });
     * ```
     *
     * @example
     * ```typescript
     * // Create a plan with tiered pricing
     * const response = await client.plans.create({ planId: "api_plan", name: "API Plan", items: [{"featureId":"api_calls","included":1000,"reset":{"interval":"month"},"price":{"tiers":[{"to":10000,"amount":0.001},{"to":100000,"amount":0.0005},{"to":"inf","amount":0.0001}],"interval":"month","billingUnits":1,"billingMethod":"usage_based"}}] });
     * ```
     *
     * @example
     * ```typescript
     * // Create a plan with free trial
     * const response = await client.plans.create({
     *   planId: "premium_plan",
     *   name: "Premium",
     *   price: {"amount":99,"interval":"month"},
     *   freeTrial: {"durationLength":14,"durationType":"day","cardRequired":true},
     * });
     * ```
     *
     * @param planId - The ID of the plan to create.
     * @param group - Group identifier for organizing related plans. Plans in the same group are mutually exclusive. (optional)
     * @param name - Display name of the plan.
     * @param description - Optional description of the plan. (optional)
     * @param addOn - If true, this plan can be attached alongside other plans. Otherwise, attaching replaces existing plans in the same group. (optional)
     * @param autoEnable - If true, plan is automatically attached when a customer is created. Use for free tiers. (optional)
     * @param price - Base recurring price for the plan. Omit for free or usage-only plans. (optional)
     * @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
     * @param freeTrial - Free trial configuration. Customers can try this plan before being charged. (optional)
     * @param config - Miscellaneous plan-level configuration flags. (optional)
     * @param billingControls - Plan-level billing controls used as customer defaults. (optional)
     * @param metadata - Arbitrary key-value metadata defined by you for your own use (e.g. UI copy, feature highlights). Values can be any JSON-serializable value. Shared across all versions of the plan. (optional)
     *
     * @returns The created plan object.
     */
    create(request: CreatePlanParams, options?: RequestOptions): Promise<CreatePlanResponse>;
    /**
     * Get a plan
     *
     * @remarks
     * Retrieves a single plan by its ID.
     *
     * Use this to fetch the full configuration of a specific plan, including its features and pricing.
     *
     * @example
     * ```typescript
     * // Get a plan by ID
     * const response = await client.plans.get({ planId: "pro_plan" });
     * ```
     *
     * @example
     * ```typescript
     * // Get a specific version of a plan
     * const response = await client.plans.get({ planId: "pro_plan", version: 2 });
     * ```
     *
     * @param planId - The ID of the plan to retrieve.
     * @param version - The version of the plan to get. Defaults to the latest version. (optional)
     *
     * @returns The plan object with its full configuration.
     */
    get(request: GetPlanParams, options?: RequestOptions): Promise<GetPlanResponse>;
    /**
     * List all plans
     *
     * @remarks
     * Lists all plans in the current environment.
     *
     * Use this to retrieve all plans for displaying pricing pages or managing plan configurations.
     *
     * @returns A list of all plans with their pricing and feature configurations.
     */
    list(request?: ListPlansParams | undefined, options?: RequestOptions): Promise<ListPlansResponse>;
    /**
     * Update a plan
     *
     * @remarks
     * Updates an existing plan. Creates a new version unless `disableVersion` is set.
     *
     * Use this to modify plan properties, pricing, or feature configurations. See [Adding features to plans](/documentation/pricing/plan-features) for item configuration.
     *
     * @example
     * ```typescript
     * // Update plan name and price
     * const response = await client.plans.update({ planId: "pro_plan", name: "Pro Plan (Updated)", price: {"amount":15,"interval":"month"} });
     * ```
     *
     * @example
     * ```typescript
     * // Add a feature to an existing plan
     * const response = await client.plans.update({ planId: "pro_plan", items: [{"featureId":"messages","included":1000,"reset":{"interval":"month"}},{"featureId":"storage","included":10,"reset":{"interval":"month"}}] });
     * ```
     *
     * @example
     * ```typescript
     * // Remove the base price (make usage-only)
     * const response = await client.plans.update({ planId: "pro_plan", price: null });
     * ```
     *
     * @example
     * ```typescript
     * // Archive a plan
     * const response = await client.plans.update({ planId: "old_plan", archived: true });
     * ```
     *
     * @example
     * ```typescript
     * // Update feature's included amount
     * const response = await client.plans.update({ planId: "pro_plan", items: [{"featureId":"messages","included":2000,"reset":{"interval":"month"}}] });
     * ```
     *
     * @param planId - The ID of the plan to update.
     * @param name - Display name of the plan. (optional)
     * @param addOn - Whether the plan is an add-on. (optional)
     * @param autoEnable - Whether the plan is automatically enabled. (optional)
     * @param price - The price of the plan. Set to null to remove the base price. (optional)
     * @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
     * @param freeTrial - The free trial of the plan. Set to null to remove the free trial. (optional)
     * @param config - Miscellaneous plan-level configuration flags. (optional)
     * @param billingControls - Plan-level billing controls used as customer defaults. (optional)
     * @param metadata - Arbitrary key-value metadata defined by you for your own use (e.g. UI copy, feature highlights). Values can be any JSON-serializable value. Shared across all versions of the plan. (optional)
     * @param basePlanId - The base plan this plan should be linked to as a variant. Set to null to detach it from its base plan. (optional)
     * @param newPlanId - The new ID to use for the plan. Can only be updated if the plan has not been used by any customers. (optional)
     * @param allVersions - Apply the update diff to all versions of this plan. Mutually exclusive with disable_version. (optional)
     * @param forceVersion - Force versioning even when no customers exist. Mutually exclusive with disable_version. (optional)
     * @param updateVariantIds - Variant plan IDs to apply this update to. Empty or omitted means no propagation. (optional)
     * @param variants - Additive variant updates for this base plan. Missing variants are created when name is provided. (optional)
     * @param isDefault - Whether this is the org's default plan. Cannot be true on a variant. (optional)
     *
     * @returns The updated plan object.
     */
    update(request: UpdatePlanParams, options?: RequestOptions): Promise<UpdatePlanResponse>;
    /**
     * Delete a plan
     *
     * @remarks
     * Deletes a plan by its ID.
     *
     * Use this to permanently remove a plan. Plans with active customers cannot be deleted - archive them instead.
     *
     * @example
     * ```typescript
     * // Delete a plan
     * const response = await client.plans.delete({ planId: "unused_plan" });
     * ```
     *
     * @example
     * ```typescript
     * // Delete all versions of a plan
     * const response = await client.plans.delete({ planId: "legacy_plan", allVersions: true });
     * ```
     *
     * @param planId - The ID of the plan to delete.
     * @param allVersions - If true, deletes all versions of the plan. Otherwise, only deletes the latest version. (optional)
     *
     * @returns A success flag indicating the plan was deleted.
     */
    delete(request: DeletePlanParams, options?: RequestOptions): Promise<DeletePlanResponse>;
}

declare class Platform extends ClientSDK {
    /**
     * Generate a RevenueCat OAuth URL for linking a project to an organization.
     */
    linkRevenueCat(request: LinkRevenueCatParams, options?: RequestOptions): Promise<LinkRevenueCatResponse>;
    /**
     * Push an organization's plans into RevenueCat as products (creating or renaming them across the project's apps) and set test-store prices from each plan's price. Requires the org to have linked RevenueCat via OAuth.
     */
    syncRevenueCat(request: SyncRevenueCatParams, options?: RequestOptions): Promise<SyncRevenueCatResponse>;
    /**
     * Retrieve a managed organization's RevenueCat public (SDK) API keys, grouped by app — for the test store, App Store, and Google Play Store. Use these to configure the RevenueCat SDK in the org's mobile app.
     */
    getRevenueCatKeys(request: GetRevenueCatKeysParams, options?: RequestOptions): Promise<GetRevenueCatKeysResponse>;
}

declare class Referrals extends ClientSDK {
    /**
     * Create or fetch a referral code for a customer in a referral program.
     */
    createCode(request: CreateReferralCodeParams, options?: RequestOptions): Promise<CreateReferralCodeResponse>;
    /**
     * Redeem a referral code for a customer.
     */
    redeemCode(request: RedeemReferralCodeParams, options?: RequestOptions): Promise<RedeemReferralCodeResponse>;
}

declare class Rewards extends ClientSDK {
    /**
     * List the coupons and feature grants configured for the org.
     */
    list(request?: RewardsListParams | undefined, options?: RequestOptions): Promise<ListRewardsResponse>;
    /**
     * Redeem a reward promo code for a customer.
     */
    redeemCode(request: RedeemRewardCodeParams, options?: RequestOptions): Promise<RedeemRewardCodeResponse>;
}

declare class Autumn extends ClientSDK {
    private _customers?;
    get customers(): Customers;
    private _plans?;
    get plans(): Plans;
    private _features?;
    get features(): Features;
    private _billing?;
    get billing(): Billing;
    private _balances?;
    get balances(): Balances;
    private _events?;
    get events(): Events;
    private _entities?;
    get entities(): Entities;
    private _referrals?;
    get referrals(): Referrals;
    private _rewards?;
    get rewards(): Rewards;
    private _platform?;
    get platform(): Platform;
    private _keys?;
    get keys(): Keys;
    /**
     * Checks whether a customer currently has enough balance to use a feature.
     *
     * Use this to gate access before a feature action. Enable sendEvent when you want to check and consume balance atomically in one request.
     *
     * @example
     * ```typescript
     * // Check access for a feature
     * const response = await client.check({ customerId: "cus_123", featureId: "messages" });
     * ```
     *
     * @example
     * ```typescript
     * // Check and consume 3 units in one call
     * const response = await client.check({
     *
     *   customerId: "cus_123",
     *   featureId: "messages",
     *   requiredBalance: 3,
     *   sendEvent: true,
     * });
     * ```
     *
     * @param customerId - The ID of the customer.
     * @param featureId - The ID of the feature.
     * @param entityId - The ID of the entity for entity-scoped balances (e.g., per-seat limits). (optional)
     * @param requiredBalance - Minimum balance required for access. Returns allowed: false if the customer's balance is below this value. Defaults to 1. (optional)
     * @param properties - Additional properties to attach to the usage event if send_event is true. (optional)
     * @param sendEvent - 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. (optional)
     * @param lock - Reserve units of a feature upfront by passing a lock_id, then call balances.finalize to confirm or release the hold. (optional)
     * @param withPreview - If true, includes upgrade/upsell information in the response when access is denied. Useful for displaying paywalls. (optional)
     *
     * @returns Whether access is allowed, plus the current balance for that feature. If Autumn is experiencing degraded service from a downstream provider, the API may return 202 and allow access fail-open.
     */
    check(request: CheckParams, options?: RequestOptions): Promise<CheckResponse>;
    /**
     * Records usage for a customer feature and returns updated balances.
     *
     * Use this after an action happens to decrement usage, or send a negative value to credit balance back.
     *
     * @example
     * ```typescript
     * // Track one message event
     * const response = await client.track({ customerId: "cus_123", featureId: "messages", value: 1 });
     * ```
     *
     * @example
     * ```typescript
     * // Track an event mapped to multiple features
     * const response = await client.track({ customerId: "cus_123", eventName: "ai_chat_request", value: 1 });
     * ```
     *
     * @param customerId - The ID of the customer.
     * @param featureId - The ID of the feature to track usage for. Required if event_name is not provided. (optional)
     * @param entityId - The ID of the entity for entity-scoped balances (e.g., per-seat limits). (optional)
     * @param eventName - Event name to track usage for. Use instead of feature_id when multiple features should be tracked from a single event. (optional)
     * @param value - The amount of usage to record. Defaults to 1. Use negative values to credit balance (e.g., when removing a seat). (optional)
     * @param properties - Additional properties to attach to this usage event. (optional)
     * @param timestamp - Unix timestamp in milliseconds to use for the usage event. Defaults to the current time. (optional)
     * @param async - If true, enqueue the event for asynchronous processing and return 204 immediately. The response will not include balance information. (optional)
     *
     * @returns The usage value recorded, with either a single updated balance or a map of updated balances. If Autumn is experiencing degraded service from a downstream provider, the API may return 202 after accepting the event for replay so it can be tracked as soon as the service is restored.
     */
    track(request: TrackParams, options?: RequestOptions): Promise<TrackResponse>;
    /**
     * Records AI token usage for a customer and returns the updated AI credit balance.
     *
     * Use this after an LLM request when you have input and output token counts. Autumn converts token usage to a dollar amount using the configured model pricing and markup, then tracks that value against the customer's AI credit system.
     *
     * @example
     * ```typescript
     * // Track one LLM response
     * const response = await client.trackTokens({
     *
     *   customerId: "cus_123",
     *   featureId: "ai_credits",
     *   modelId: "anthropic/claude-sonnet-4-20250514",
     *   inputTokens: 1000,
     *   outputTokens: 500,
     * });
     * ```
     *
     * @param customerId - The ID of the customer.
     * @param entityId - The ID of the entity for entity-scoped balances. (optional)
     * @param featureId - The ID of the AI credit system feature. Auto-detected from the customer's entitlements if omitted — only required when a customer has multiple AI credit systems. (optional)
     * @param modelId - The AI model as '[provider]/[model]' (e.g. 'anthropic/claude-opus-4-8', 'openrouter/openai/gpt-4o'). The provider is the first path segment and must match a provider + model key in models.dev.
     * @param inputTokens - Number of non-cached text input tokens consumed. Exclusive of cache and audio token pools.
     * @param outputTokens - Number of text output tokens consumed. Exclusive of the reasoning and audio output pools.
     * @param cacheReadTokens - Number of cached input tokens read. (optional)
     * @param cacheWriteTokens - Number of input tokens written to the cache. (optional)
     * @param audioInputTokens - Number of audio input tokens consumed. (optional)
     * @param audioOutputTokens - Number of audio output tokens generated. (optional)
     * @param reasoningTokens - Number of reasoning tokens generated. (optional)
     * @param properties - Additional properties to attach to this usage event. (optional)
     * @param timestamp - Unix timestamp in milliseconds to use for the usage event. Defaults to the current time. (optional)
     * @param async - If true, enqueue the event for asynchronous processing and return 204 immediately. The response will not include balance information. (optional)
     *
     * @returns The dollar value recorded and the updated AI credit system balance. If Autumn is experiencing degraded service from a downstream provider, the API may return 202 after accepting the token usage event for replay so it can be tracked as soon as the service is restored.
     */
    trackTokens(request: TrackTokensParams, options?: RequestOptions): Promise<TrackTokensResponse>;
    /**
     * Enqueue up to 1000 usage events for asynchronous processing. Items are validated synchronously up front; validated items are then enqueued via SQS for background deduction by workers. The response returns 202 immediately and does not include balance information. On partial enqueue failure (some items fail to enqueue, others succeed), the endpoint still returns 202 and logs the failures server-side; clients should NOT retry, because retrying re-enqueues the already-succeeded items. A 503 is returned only when zero items were successfully enqueued (queue entirely unavailable) — that case is safe to retry.
     */
    batchTrack(request: Array<RequestBody>, options?: RequestOptions): Promise<BatchTrackResponse>;
}

/** All supported route names as const for type safety */
declare const ROUTE_NAMES: {
    readonly getOrCreateCustomer: "getOrCreateCustomer";
    readonly getEntity: "getEntity";
    readonly attach: "attach";
    readonly previewAttach: "previewAttach";
    readonly updateSubscription: "updateSubscription";
    readonly previewUpdateSubscription: "previewUpdateSubscription";
    readonly openCustomerPortal: "openCustomerPortal";
    readonly createReferralCode: "createReferralCode";
    readonly redeemReferralCode: "redeemReferralCode";
    readonly listPlans: "listPlans";
    readonly listEvents: "listEvents";
    readonly aggregateEvents: "aggregateEvents";
    readonly multiAttach: "multiAttach";
    readonly previewMultiAttach: "previewMultiAttach";
    readonly setupPayment: "setupPayment";
};
/** Union of all route names */
type RouteName = keyof typeof ROUTE_NAMES;
/** Arguments passed to custom handler functions */
type CustomHandlerArgs = {
    autumn: Autumn;
    identity: ResolvedIdentity | null;
    body: unknown;
};
/** Custom handler function for special route logic */
type CustomHandlerFn = (args: CustomHandlerArgs) => Promise<BackendResult | unknown>;
/** Route definition for the backend router */
type RouteDefinition<T extends RouteName = RouteName> = {
    /** RPC-style route name (e.g., "getOrCreateCustomer", "attach") */
    route: T;
    /** SDK method to call - uses any for dynamic args */
    sdkMethod: (autumn: Autumn, args: any) => Promise<any>;
    /** Custom handler for special cases (bypasses standard flow) */
    customHandler?: CustomHandlerFn;
    /** Whether customer ID is required (default: true) */
    requireCustomer?: boolean;
    /** Body fields that must come from identity, not frontend */
    protectedBodyFields?: readonly ProtectedBodyField[];
    /** Zod schema for request body validation (used by better-auth plugin) */
    bodySchema?: z.ZodTypeAny;
};

export { Autumn as A, type CustomHandlerArgs as C, type RouteDefinition as R, type CustomHandlerFn as a, type RouteName as b, ROUTE_NAMES as c };
