/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { remap as remap$ } from "../../lib/primitives.js"; import { ClosedEnum } from "../../types/enums.js"; export const ListTasksEntityType = { Events: "EVENTS", Prices: "PRICES", Customers: "CUSTOMERS", Features: "FEATURES", } as const; export type ListTasksEntityType = ClosedEnum; export const ListTasksOrder = { Asc: "asc", Desc: "desc", } as const; export type ListTasksOrder = ClosedEnum; export const ListTasksStatus = { Published: "published", Deleted: "deleted", Archived: "archived", } as const; export type ListTasksStatus = ClosedEnum; export const ListTasksTaskStatus = { Pending: "PENDING", Processing: "PROCESSING", Completed: "COMPLETED", Failed: "FAILED", } as const; export type ListTasksTaskStatus = ClosedEnum; export const ListTasksTaskType = { Import: "IMPORT", Export: "EXPORT", } as const; export type ListTasksTaskType = ClosedEnum; export type ListTasksRequest = { createdBy?: string | undefined; endTime?: string | undefined; entityType?: ListTasksEntityType | undefined; expand?: string | undefined; limit?: number | undefined; offset?: number | undefined; order?: ListTasksOrder | undefined; scheduledTaskId?: string | undefined; sort?: string | undefined; startTime?: string | undefined; status?: ListTasksStatus | undefined; taskStatus?: ListTasksTaskStatus | undefined; taskType?: ListTasksTaskType | undefined; }; /** @internal */ export const ListTasksEntityType$outboundSchema: z.ZodMiniEnum< typeof ListTasksEntityType > = z.enum(ListTasksEntityType); /** @internal */ export const ListTasksOrder$outboundSchema: z.ZodMiniEnum< typeof ListTasksOrder > = z.enum(ListTasksOrder); /** @internal */ export const ListTasksStatus$outboundSchema: z.ZodMiniEnum< typeof ListTasksStatus > = z.enum(ListTasksStatus); /** @internal */ export const ListTasksTaskStatus$outboundSchema: z.ZodMiniEnum< typeof ListTasksTaskStatus > = z.enum(ListTasksTaskStatus); /** @internal */ export const ListTasksTaskType$outboundSchema: z.ZodMiniEnum< typeof ListTasksTaskType > = z.enum(ListTasksTaskType); /** @internal */ export type ListTasksRequest$Outbound = { created_by?: string | undefined; end_time?: string | undefined; entity_type?: string | undefined; expand?: string | undefined; limit?: number | undefined; offset?: number | undefined; order?: string | undefined; scheduled_task_id?: string | undefined; sort?: string | undefined; start_time?: string | undefined; status?: string | undefined; task_status?: string | undefined; task_type?: string | undefined; }; /** @internal */ export const ListTasksRequest$outboundSchema: z.ZodMiniType< ListTasksRequest$Outbound, ListTasksRequest > = z.pipe( z.object({ createdBy: z.optional(z.string()), endTime: z.optional(z.string()), entityType: z.optional(ListTasksEntityType$outboundSchema), expand: z.optional(z.string()), limit: z.optional(z.int()), offset: z.optional(z.int()), order: z.optional(ListTasksOrder$outboundSchema), scheduledTaskId: z.optional(z.string()), sort: z.optional(z.string()), startTime: z.optional(z.string()), status: z.optional(ListTasksStatus$outboundSchema), taskStatus: z.optional(ListTasksTaskStatus$outboundSchema), taskType: z.optional(ListTasksTaskType$outboundSchema), }), z.transform((v) => { return remap$(v, { createdBy: "created_by", endTime: "end_time", entityType: "entity_type", scheduledTaskId: "scheduled_task_id", startTime: "start_time", taskStatus: "task_status", taskType: "task_type", }); }), ); export function listTasksRequestToJSON( listTasksRequest: ListTasksRequest, ): string { return JSON.stringify( ListTasksRequest$outboundSchema.parse(listTasksRequest), ); }