22 lines
980 B
TypeScript
22 lines
980 B
TypeScript
import { FeatureOptionsParamsV0Schema } from "@api/billing/common/featureOptions/featureOptionsParamsV0.js";
|
|
import { FreeTrialParamsV0Schema } from "@api/common/freeTrial/freeTrialParamsV0.js";
|
|
import { ProductItemSchema } from "@models/productV2Models/productItemModels/productItemModels.js";
|
|
import { z } from "zod/v4";
|
|
import { CustomerDataSchema } from "../../../common/customerData.js";
|
|
import { EntityDataSchema } from "../../../common/entityData.js";
|
|
|
|
export const BillingParamsBaseV0Schema = z.object({
|
|
customer_id: z.string(),
|
|
entity_id: z.string().nullish(),
|
|
customer_data: CustomerDataSchema.optional(),
|
|
entity_data: EntityDataSchema.optional(),
|
|
|
|
// Used for both update and attach
|
|
options: z.array(FeatureOptionsParamsV0Schema).nullish(),
|
|
version: z.number().optional(),
|
|
free_trial: FreeTrialParamsV0Schema.nullable().optional(),
|
|
items: z.array(ProductItemSchema).optional(),
|
|
});
|
|
|
|
export type BillingParamsBaseV0 = z.infer<typeof BillingParamsBaseV0Schema>;
|