import * as z from "zod/v3"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { CustomerEntity, CustomerEntity$Outbound } from "./customerentity.js"; import { EnvironmentMode } from "./environmentmode.js"; import { ProductEntity, ProductEntity$Outbound } from "./productentity.js"; import { SubscriptionCollectionMethod } from "./subscriptioncollectionmethod.js"; import { SubscriptionItemEntity, SubscriptionItemEntity$Outbound } from "./subscriptionitementity.js"; import { SubscriptionStatus } from "./subscriptionstatus.js"; import { TransactionEntity, TransactionEntity$Outbound } from "./transactionentity.js"; /** * The product associated with the subscription. */ export type Product = ProductEntity | string; /** * The customer who owns the subscription. */ export type Customer = CustomerEntity | string; /** * The discount code applied to the subscription, if any. */ export type Discount = {}; export type SubscriptionEntity = { /** * Unique identifier for the object. */ id: string; /** * String representing the environment. */ mode: EnvironmentMode; /** * String representing the object's type. Objects of the same type share the same value. */ object: string; /** * The product associated with the subscription. */ product: ProductEntity | string; /** * The customer who owns the subscription. */ customer: CustomerEntity | string; /** * Subscription items. */ items?: Array | undefined; /** * The method used for collecting payments for the subscription. */ collectionMethod: SubscriptionCollectionMethod; /** * The current status of the subscription. */ status: SubscriptionStatus; /** * The ID of the last paid transaction. */ lastTransactionId?: string | undefined; /** * The last paid transaction. */ lastTransaction?: TransactionEntity | undefined; /** * The date of the last paid transaction. */ lastTransactionDate?: Date | undefined; /** * The date when the next subscription transaction will be charged. */ nextTransactionDate?: Date | undefined; /** * The start date of the current subscription period. */ currentPeriodStartDate?: Date | undefined; /** * The end date of the current subscription period. */ currentPeriodEndDate?: Date | undefined; /** * The date and time when the subscription was canceled, if applicable. */ canceledAt?: Date | null | undefined; /** * The date and time when the subscription was created. */ createdAt: Date; /** * The date and time when the subscription was last updated. */ updatedAt: Date; /** * The discount code applied to the subscription, if any. */ discount?: Discount | undefined; }; /** @internal */ export declare const Product$inboundSchema: z.ZodType; /** @internal */ export type Product$Outbound = ProductEntity$Outbound | string; /** @internal */ export declare const Product$outboundSchema: z.ZodType; export declare function productToJSON(product: Product): string; export declare function productFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Customer$inboundSchema: z.ZodType; /** @internal */ export type Customer$Outbound = CustomerEntity$Outbound | string; /** @internal */ export declare const Customer$outboundSchema: z.ZodType; export declare function customerToJSON(customer: Customer): string; export declare function customerFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const Discount$inboundSchema: z.ZodType; /** @internal */ export type Discount$Outbound = {}; /** @internal */ export declare const Discount$outboundSchema: z.ZodType; export declare function discountToJSON(discount: Discount): string; export declare function discountFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const SubscriptionEntity$inboundSchema: z.ZodType; /** @internal */ export type SubscriptionEntity$Outbound = { id: string; mode: string; object: string; product: ProductEntity$Outbound | string; customer: CustomerEntity$Outbound | string; items?: Array | undefined; collection_method: string; status: string; last_transaction_id?: string | undefined; last_transaction?: TransactionEntity$Outbound | undefined; last_transaction_date?: string | undefined; next_transaction_date?: string | undefined; current_period_start_date?: string | undefined; current_period_end_date?: string | undefined; canceled_at?: string | null | undefined; created_at: string; updated_at: string; discount?: Discount$Outbound | undefined; }; /** @internal */ export declare const SubscriptionEntity$outboundSchema: z.ZodType; export declare function subscriptionEntityToJSON(subscriptionEntity: SubscriptionEntity): string; export declare function subscriptionEntityFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=subscriptionentity.d.ts.map