UNPKG

chargebee

Version:

A library for integrating with Chargebee.

48 lines (47 loc) 2.51 kB
"use strict"; // Generated Zod schemas: GrantBlock // Actions: listGrantBlocks // Do not edit manually – regenerate via sdk-generator Object.defineProperty(exports, "__esModule", { value: true }); exports.ListGrantBlocksGrantBlockBodySchema = void 0; const zod_1 = require("zod"); //GrantBlock.listGrantBlocks const ListGrantBlocksGrantBlockSubscriptionIdSchema = zod_1.z.object({ is: zod_1.z.string().min(1).optional(), }); const ListGrantBlocksGrantBlockUnitIdSchema = zod_1.z.object({ is: zod_1.z.string().min(1).optional(), }); const ListGrantBlocksGrantBlockEffectiveFromSchema = zod_1.z.object({ after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(), before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(), on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(), between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(), }); const ListGrantBlocksGrantBlockExpiresAtSchema = zod_1.z.object({ after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(), before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(), on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(), between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(), }); const ListGrantBlocksGrantBlockCreatedAtSchema = zod_1.z.object({ after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(), before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(), on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(), between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(), }); const ListGrantBlocksGrantBlockSortBySchema = zod_1.z.looseObject({ asc: zod_1.z.enum(['effective_from', 'expires_at', 'created_at']).optional(), desc: zod_1.z.enum(['effective_from', 'expires_at', 'created_at']).optional(), }); const ListGrantBlocksGrantBlockBodySchema = zod_1.z.looseObject({ limit: zod_1.z.number().int().min(1).max(100).optional(), offset: zod_1.z.string().max(1000).optional(), subscription_id: ListGrantBlocksGrantBlockSubscriptionIdSchema, unit_id: ListGrantBlocksGrantBlockUnitIdSchema.optional(), effective_from: ListGrantBlocksGrantBlockEffectiveFromSchema.optional(), expires_at: ListGrantBlocksGrantBlockExpiresAtSchema.optional(), created_at: ListGrantBlocksGrantBlockCreatedAtSchema.optional(), sort_by: ListGrantBlocksGrantBlockSortBySchema.optional(), }); exports.ListGrantBlocksGrantBlockBodySchema = ListGrantBlocksGrantBlockBodySchema;