import * as z from "zod/v4-mini"; import { OpenEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { CustomerStateSubscriptionMeter, CustomerStateSubscriptionMeter$Outbound } from "./customerstatesubscriptionmeter.js"; import { MetadataOutputType, MetadataOutputType$Outbound } from "./metadataoutputtype.js"; import { SubscriptionRecurringInterval } from "./subscriptionrecurringinterval.js"; export type CustomerStateSubscriptionCustomFieldData = string | number | boolean | Date; export declare const Status: { readonly Active: "active"; readonly Trialing: "trialing"; }; export type Status = OpenEnum; /** * An active customer subscription. */ export type CustomerStateSubscription = { /** * The ID of the subscription. */ id: string; /** * Creation timestamp of the object. */ createdAt: Date; /** * Last modification timestamp of the object. */ modifiedAt: Date | null; /** * Key-value object storing custom field values. */ customFieldData?: { [k: string]: string | number | boolean | Date | null; } | undefined; metadata: { [k: string]: MetadataOutputType; }; status: Status; /** * The amount of the subscription. */ amount: number; /** * The currency of the subscription. */ currency: string; recurringInterval: SubscriptionRecurringInterval; /** * 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 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 ID of the subscribed product. */ productId: string; /** * The ID of the applied discount, if any. */ discountId: string | null; /** * List of meters associated with the subscription. */ meters: Array; }; /** @internal */ export declare const CustomerStateSubscriptionCustomFieldData$inboundSchema: z.ZodMiniType; /** @internal */ export type CustomerStateSubscriptionCustomFieldData$Outbound = string | number | boolean | string; /** @internal */ export declare const CustomerStateSubscriptionCustomFieldData$outboundSchema: z.ZodMiniType; export declare function customerStateSubscriptionCustomFieldDataToJSON(customerStateSubscriptionCustomFieldData: CustomerStateSubscriptionCustomFieldData): string; export declare function customerStateSubscriptionCustomFieldDataFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Status$inboundSchema: z.ZodMiniType; /** @internal */ export declare const Status$outboundSchema: z.ZodMiniType; /** @internal */ export declare const CustomerStateSubscription$inboundSchema: z.ZodMiniType; /** @internal */ export type CustomerStateSubscription$Outbound = { id: string; created_at: string; modified_at: string | null; custom_field_data?: { [k: string]: string | number | boolean | string | null; } | undefined; metadata: { [k: string]: MetadataOutputType$Outbound; }; status: string; amount: number; currency: string; recurring_interval: string; current_period_start: string; current_period_end: string; 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; product_id: string; discount_id: string | null; meters: Array; }; /** @internal */ export declare const CustomerStateSubscription$outboundSchema: z.ZodMiniType; export declare function customerStateSubscriptionToJSON(customerStateSubscription: CustomerStateSubscription): string; export declare function customerStateSubscriptionFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=customerstatesubscription.d.ts.map