chargebee
Version:
A library for integrating with Chargebee.
29 lines (28 loc) • 1.39 kB
JavaScript
;
// Generated Zod schemas: UsageEvent
// Actions: create, batchIngest
// Do not edit manually – regenerate via sdk-generator
Object.defineProperty(exports, "__esModule", { value: true });
exports.BatchIngestUsageEventBodySchema = exports.CreateUsageEventBodySchema = void 0;
const zod_1 = require("zod");
//UsageEvent.create
const CreateUsageEventPropertiesSchema = zod_1.z.looseObject({});
const CreateUsageEventBodySchema = zod_1.z.looseObject({
deduplication_id: zod_1.z.string().max(36),
subscription_id: zod_1.z.string().max(50),
usage_timestamp: zod_1.z.number().int(),
properties: CreateUsageEventPropertiesSchema,
});
exports.CreateUsageEventBodySchema = CreateUsageEventBodySchema;
//UsageEvent.batchIngest
const BatchIngestUsageEventPropertiesItemSchema = zod_1.z.looseObject({});
const BatchIngestUsageEventEventsSchema = zod_1.z.object({
deduplication_id: zod_1.z.array(zod_1.z.string().max(36).optional()),
subscription_id: zod_1.z.array(zod_1.z.string().max(50).optional()),
usage_timestamp: zod_1.z.array(zod_1.z.number().int().optional()),
properties: zod_1.z.array(BatchIngestUsageEventPropertiesItemSchema.optional()),
});
const BatchIngestUsageEventBodySchema = zod_1.z.looseObject({
events: BatchIngestUsageEventEventsSchema.optional(),
});
exports.BatchIngestUsageEventBodySchema = BatchIngestUsageEventBodySchema;