autumn-js
Version:
Autumn JS Library
59 lines (56 loc) • 1.55 kB
TypeScript
import { P as ProductItem, b as Product } from './cusTypes-DT2ujoSl.js';
import { z } from 'zod';
declare const AttachFeatureOptionsSchema: z.ZodObject<{
feature_id: z.ZodString;
quantity: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
quantity: number;
feature_id: string;
}, {
quantity: number;
feature_id: string;
}>;
type AttachFeatureOptions = z.infer<typeof AttachFeatureOptionsSchema>;
declare const AttachResultSchema: z.ZodObject<{
checkout_url: z.ZodOptional<z.ZodString>;
customer_id: z.ZodString;
product_ids: z.ZodArray<z.ZodString, "many">;
code: z.ZodString;
message: z.ZodString;
customer_data: z.ZodOptional<z.ZodAny>;
}, "strip", z.ZodTypeAny, {
code: string;
message: string;
customer_id: string;
product_ids: string[];
checkout_url?: string | undefined;
customer_data?: any;
}, {
code: string;
message: string;
customer_id: string;
product_ids: string[];
checkout_url?: string | undefined;
customer_data?: any;
}>;
type AttachResult = z.infer<typeof AttachResultSchema>;
type CheckoutResult = {
url?: string;
customer_id: string;
has_prorations: boolean;
lines: {
description: string;
amount: number;
item: ProductItem;
}[];
total: number;
currency: string;
options: AttachFeatureOptions[];
product: Product;
current_product: Product;
next_cycle?: {
starts_at: number;
total: number;
};
};
export type { AttachResult as A, CheckoutResult as C };