/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: a6669dd79a01 */ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; import { ClosedEnum } from "../../types/enums.js"; /** * Filter by worker activity. active=only active, inactive=only inactive, None=no filter */ export const WorkerStatus = { Active: "active", Inactive: "inactive", } as const; /** * Filter by worker activity. active=only active, inactive=only inactive, None=no filter */ export type WorkerStatus = ClosedEnum; export type ListDeploymentWorkersV1WorkflowsDeploymentsNameWorkersGetRequest = { name: string; /** * Filter by worker activity. active=only active, inactive=only inactive, None=no filter */ workerStatus?: WorkerStatus | null | undefined; /** * Maximum number of workers to return */ limit?: number | undefined; /** * Cursor from a previous response's `next_cursor`. Resend `worker_status` unchanged alongside it. */ cursor?: string | null | undefined; }; /** @internal */ export const WorkerStatus$outboundSchema: z.ZodEnum = z .enum(WorkerStatus); /** @internal */ export type ListDeploymentWorkersV1WorkflowsDeploymentsNameWorkersGetRequest$Outbound = { name: string; worker_status?: string | null | undefined; limit: number; cursor?: string | null | undefined; }; /** @internal */ export const ListDeploymentWorkersV1WorkflowsDeploymentsNameWorkersGetRequest$outboundSchema: z.ZodType< ListDeploymentWorkersV1WorkflowsDeploymentsNameWorkersGetRequest$Outbound, ListDeploymentWorkersV1WorkflowsDeploymentsNameWorkersGetRequest > = z.object({ name: z.string(), workerStatus: z.nullable(WorkerStatus$outboundSchema).optional(), limit: z.int().default(50), cursor: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { workerStatus: "worker_status", }); }); export function listDeploymentWorkersV1WorkflowsDeploymentsNameWorkersGetRequestToJSON( listDeploymentWorkersV1WorkflowsDeploymentsNameWorkersGetRequest: ListDeploymentWorkersV1WorkflowsDeploymentsNameWorkersGetRequest, ): string { return JSON.stringify( ListDeploymentWorkersV1WorkflowsDeploymentsNameWorkersGetRequest$outboundSchema .parse(listDeploymentWorkersV1WorkflowsDeploymentsNameWorkersGetRequest), ); }