import * as z from "zod/v4-mini";
import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
import { CustomerCancellationReason } from "./customercancellationreason.js";
import { DiscountFixedOnceForeverDurationBase, DiscountFixedOnceForeverDurationBase$Outbound } from "./discountfixedonceforeverdurationbase.js";
import { DiscountFixedRepeatDurationBase, DiscountFixedRepeatDurationBase$Outbound } from "./discountfixedrepeatdurationbase.js";
import { DiscountPercentageOnceForeverDurationBase, DiscountPercentageOnceForeverDurationBase$Outbound } from "./discountpercentageonceforeverdurationbase.js";
import { DiscountPercentageRepeatDurationBase, DiscountPercentageRepeatDurationBase$Outbound } from "./discountpercentagerepeatdurationbase.js";
import { LegacyRecurringProductPrice, LegacyRecurringProductPrice$Outbound } from "./legacyrecurringproductprice.js";
import { MetadataOutputType, MetadataOutputType$Outbound } from "./metadataoutputtype.js";
import { PendingSubscriptionUpdate, PendingSubscriptionUpdate$Outbound } from "./pendingsubscriptionupdate.js";
import { Product, Product$Outbound } from "./product.js";
import { ProductPrice, ProductPrice$Outbound } from "./productprice.js";
import { RecurringInterval } from "./recurringinterval.js";
import { SubscriptionCustomer, SubscriptionCustomer$Outbound } from "./subscriptioncustomer.js";
import { SubscriptionMeter, SubscriptionMeter$Outbound } from "./subscriptionmeter.js";
import { SubscriptionStatus } from "./subscriptionstatus.js";
export type CustomFieldData = string | number | boolean | Date;
export type SubscriptionDiscount = DiscountFixedRepeatDurationBase | DiscountFixedOnceForeverDurationBase | DiscountPercentageRepeatDurationBase | DiscountPercentageOnceForeverDurationBase;
export type SubscriptionPrices = LegacyRecurringProductPrice | ProductPrice;
export type Subscription = {
    /**
     * Creation timestamp of the object.
     */
    createdAt: Date;
    /**
     * Last modification timestamp of the object.
     */
    modifiedAt: Date | null;
    /**
     * The ID of the object.
     */
    id: string;
    /**
     * The amount of the subscription.
     */
    amount: number;
    /**
     * The currency of the subscription.
     */
    currency: string;
    recurringInterval: RecurringInterval;
    /**
     * Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on.
     */
    recurringIntervalCount: number;
    status: SubscriptionStatus;
    /**
     * The start timestamp of the current billing period.
     */
    currentPeriodStart: Date;
    /**
     * The end timestamp of the current billing period.
     */
    currentPeriodEnd: Date;
    /**
     * The start timestamp of the current meter period, if the product has a meter cycle set. Metered credits are granted and overage is settled on this cadence.
     */
    currentMeterPeriodStart: Date | null;
    /**
     * The end timestamp of the current meter period, if the product has a meter cycle set. This is when credits next renew.
     */
    currentMeterPeriodEnd: Date | null;
    /**
     * The start timestamp of the trial period, if any.
     */
    trialStart: Date | null;
    /**
     * The end timestamp of the trial period, if any.
     */
    trialEnd: Date | null;
    /**
     * Whether the subscription will be canceled at the end of the current period.
     */
    cancelAtPeriodEnd: boolean;
    /**
     * The timestamp when the subscription was canceled. The subscription might still be active if `cancel_at_period_end` is `true`.
     */
    canceledAt: Date | null;
    /**
     * The timestamp when the subscription started.
     */
    startedAt: Date | null;
    /**
     * The timestamp when the subscription will end.
     */
    endsAt: Date | null;
    /**
     * The timestamp when the subscription ended.
     */
    endedAt: Date | null;
    /**
     * The timestamp when the subscription entered `past_due` status.
     */
    pastDueAt?: Date | null | undefined;
    /**
     * Whether the subscription will be paused at the end of the current period.
     */
    pauseAtPeriodEnd: boolean;
    /**
     * The timestamp when the subscription was paused.
     */
    pausedAt: Date | null;
    /**
     * The timestamp when a paused subscription is scheduled to automatically resume, if set.
     */
    resumesAt: Date | null;
    /**
     * The ID of the subscribed customer.
     */
    customerId: string;
    /**
     * The ID of the subscribed product.
     */
    productId: string;
    /**
     * The ID of the applied discount, if any.
     */
    discountId: string | null;
    checkoutId: string | null;
    /**
     * The number of seats for seat-based subscriptions. None for non-seat subscriptions.
     */
    seats?: number | null | undefined;
    customerCancellationReason: CustomerCancellationReason | null;
    customerCancellationComment: string | null;
    metadata: {
        [k: string]: MetadataOutputType;
    };
    /**
     * Key-value object storing custom field values.
     */
    customFieldData?: {
        [k: string]: string | number | boolean | Date | null;
    } | undefined;
    customer: SubscriptionCustomer;
    /**
     * A product.
     */
    product: Product;
    discount: DiscountFixedRepeatDurationBase | DiscountFixedOnceForeverDurationBase | DiscountPercentageRepeatDurationBase | DiscountPercentageOnceForeverDurationBase | null;
    /**
     * List of enabled prices for the subscription.
     */
    prices: Array<LegacyRecurringProductPrice | ProductPrice>;
    /**
     * List of meters associated with the subscription.
     */
    meters: Array<SubscriptionMeter>;
    /**
     * Pending subscription update that will be applied at the beginning of the next period. If `null`, there is no pending update.
     */
    pendingUpdate: PendingSubscriptionUpdate | null;
};
/** @internal */
export declare const CustomFieldData$inboundSchema: z.ZodMiniType<CustomFieldData, unknown>;
/** @internal */
export type CustomFieldData$Outbound = string | number | boolean | string;
/** @internal */
export declare const CustomFieldData$outboundSchema: z.ZodMiniType<CustomFieldData$Outbound, CustomFieldData>;
export declare function customFieldDataToJSON(customFieldData: CustomFieldData): string;
export declare function customFieldDataFromJSON(jsonString: string): SafeParseResult<CustomFieldData, SDKValidationError>;
/** @internal */
export declare const SubscriptionDiscount$inboundSchema: z.ZodMiniType<SubscriptionDiscount, unknown>;
/** @internal */
export type SubscriptionDiscount$Outbound = DiscountFixedRepeatDurationBase$Outbound | DiscountFixedOnceForeverDurationBase$Outbound | DiscountPercentageRepeatDurationBase$Outbound | DiscountPercentageOnceForeverDurationBase$Outbound;
/** @internal */
export declare const SubscriptionDiscount$outboundSchema: z.ZodMiniType<SubscriptionDiscount$Outbound, SubscriptionDiscount>;
export declare function subscriptionDiscountToJSON(subscriptionDiscount: SubscriptionDiscount): string;
export declare function subscriptionDiscountFromJSON(jsonString: string): SafeParseResult<SubscriptionDiscount, SDKValidationError>;
/** @internal */
export declare const SubscriptionPrices$inboundSchema: z.ZodMiniType<SubscriptionPrices, unknown>;
/** @internal */
export type SubscriptionPrices$Outbound = LegacyRecurringProductPrice$Outbound | ProductPrice$Outbound;
/** @internal */
export declare const SubscriptionPrices$outboundSchema: z.ZodMiniType<SubscriptionPrices$Outbound, SubscriptionPrices>;
export declare function subscriptionPricesToJSON(subscriptionPrices: SubscriptionPrices): string;
export declare function subscriptionPricesFromJSON(jsonString: string): SafeParseResult<SubscriptionPrices, SDKValidationError>;
/** @internal */
export declare const Subscription$inboundSchema: z.ZodMiniType<Subscription, unknown>;
/** @internal */
export type Subscription$Outbound = {
    created_at: string;
    modified_at: string | null;
    id: string;
    amount: number;
    currency: string;
    recurring_interval: string;
    recurring_interval_count: number;
    status: string;
    current_period_start: string;
    current_period_end: string;
    current_meter_period_start: string | null;
    current_meter_period_end: string | null;
    trial_start: string | null;
    trial_end: string | null;
    cancel_at_period_end: boolean;
    canceled_at: string | null;
    started_at: string | null;
    ends_at: string | null;
    ended_at: string | null;
    past_due_at?: string | null | undefined;
    pause_at_period_end: boolean;
    paused_at: string | null;
    resumes_at: string | null;
    customer_id: string;
    product_id: string;
    discount_id: string | null;
    checkout_id: string | null;
    seats?: number | null | undefined;
    customer_cancellation_reason: string | null;
    customer_cancellation_comment: string | null;
    metadata: {
        [k: string]: MetadataOutputType$Outbound;
    };
    custom_field_data?: {
        [k: string]: string | number | boolean | string | null;
    } | undefined;
    customer: SubscriptionCustomer$Outbound;
    product: Product$Outbound;
    discount: DiscountFixedRepeatDurationBase$Outbound | DiscountFixedOnceForeverDurationBase$Outbound | DiscountPercentageRepeatDurationBase$Outbound | DiscountPercentageOnceForeverDurationBase$Outbound | null;
    prices: Array<LegacyRecurringProductPrice$Outbound | ProductPrice$Outbound>;
    meters: Array<SubscriptionMeter$Outbound>;
    pending_update: PendingSubscriptionUpdate$Outbound | null;
};
/** @internal */
export declare const Subscription$outboundSchema: z.ZodMiniType<Subscription$Outbound, Subscription>;
export declare function subscriptionToJSON(subscription: Subscription): string;
export declare function subscriptionFromJSON(jsonString: string): SafeParseResult<Subscription, SDKValidationError>;
//# sourceMappingURL=subscription.d.ts.map