@coursebuilder/core
Version:
Core package for Course Builder
94 lines (91 loc) • 3.83 kB
text/typescript
import { z } from 'zod';
declare const PurchaseMetadata: z.ZodObject<{
country: z.ZodOptional<z.ZodString>;
appliedPPPStripeCouponId: z.ZodOptional<z.ZodString>;
upgradedFromPurchaseId: z.ZodOptional<z.ZodString>;
usedCouponId: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
country?: string | undefined;
appliedPPPStripeCouponId?: string | undefined;
upgradedFromPurchaseId?: string | undefined;
usedCouponId?: string | undefined;
}, {
country?: string | undefined;
appliedPPPStripeCouponId?: string | undefined;
upgradedFromPurchaseId?: string | undefined;
usedCouponId?: string | undefined;
}>;
declare const PurchaseInfoSchema: z.ZodObject<{
customerIdentifier: z.ZodString;
email: z.ZodNullable<z.ZodString>;
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
productIdentifier: z.ZodString;
product: z.ZodObject<{
name: z.ZodNullable<z.ZodString>;
}, "strip", z.ZodTypeAny, {
name: string | null;
}, {
name: string | null;
}>;
chargeIdentifier: z.ZodString;
couponIdentifier: z.ZodOptional<z.ZodString>;
quantity: z.ZodNumber;
chargeAmount: z.ZodNumber;
metadata: z.ZodOptional<z.ZodObject<{
country: z.ZodOptional<z.ZodString>;
appliedPPPStripeCouponId: z.ZodOptional<z.ZodString>;
upgradedFromPurchaseId: z.ZodOptional<z.ZodString>;
usedCouponId: z.ZodOptional<z.ZodString>;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
country: z.ZodOptional<z.ZodString>;
appliedPPPStripeCouponId: z.ZodOptional<z.ZodString>;
upgradedFromPurchaseId: z.ZodOptional<z.ZodString>;
usedCouponId: z.ZodOptional<z.ZodString>;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
country: z.ZodOptional<z.ZodString>;
appliedPPPStripeCouponId: z.ZodOptional<z.ZodString>;
upgradedFromPurchaseId: z.ZodOptional<z.ZodString>;
usedCouponId: z.ZodOptional<z.ZodString>;
}, z.ZodTypeAny, "passthrough">>>;
purchaseType: z.ZodUnion<[z.ZodLiteral<"EXISTING_BULK_COUPON">, z.ZodLiteral<"NEW_BULK_COUPON">, z.ZodLiteral<"NEW_INDIVIDUAL_PURCHASE">, z.ZodLiteral<"INDIVIDUAL_TO_BULK_UPGRADE">]>;
}, "strip", z.ZodTypeAny, {
product: {
name: string | null;
};
email: string | null;
quantity: number;
customerIdentifier: string;
productIdentifier: string;
chargeIdentifier: string;
chargeAmount: number;
purchaseType: "EXISTING_BULK_COUPON" | "NEW_BULK_COUPON" | "NEW_INDIVIDUAL_PURCHASE" | "INDIVIDUAL_TO_BULK_UPGRADE";
name?: string | null | undefined;
metadata?: z.objectOutputType<{
country: z.ZodOptional<z.ZodString>;
appliedPPPStripeCouponId: z.ZodOptional<z.ZodString>;
upgradedFromPurchaseId: z.ZodOptional<z.ZodString>;
usedCouponId: z.ZodOptional<z.ZodString>;
}, z.ZodTypeAny, "passthrough"> | undefined;
couponIdentifier?: string | undefined;
}, {
product: {
name: string | null;
};
email: string | null;
quantity: number;
customerIdentifier: string;
productIdentifier: string;
chargeIdentifier: string;
chargeAmount: number;
purchaseType: "EXISTING_BULK_COUPON" | "NEW_BULK_COUPON" | "NEW_INDIVIDUAL_PURCHASE" | "INDIVIDUAL_TO_BULK_UPGRADE";
name?: string | null | undefined;
metadata?: z.objectInputType<{
country: z.ZodOptional<z.ZodString>;
appliedPPPStripeCouponId: z.ZodOptional<z.ZodString>;
upgradedFromPurchaseId: z.ZodOptional<z.ZodString>;
usedCouponId: z.ZodOptional<z.ZodString>;
}, z.ZodTypeAny, "passthrough"> | undefined;
couponIdentifier?: string | undefined;
}>;
type PurchaseInfo = z.infer<typeof PurchaseInfoSchema>;
export { type PurchaseInfo, PurchaseInfoSchema, PurchaseMetadata };