/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: a95d2ae4ceb2 */ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { DeploymentWorkerResponse, DeploymentWorkerResponse$inboundSchema, } from "./deploymentworkerresponse.js"; export type DeploymentWorkerListResponse = { /** * Workers registered for the deployment */ workers: Array; /** * Cursor for the next page of results */ nextCursor: string | null; }; /** @internal */ export const DeploymentWorkerListResponse$inboundSchema: z.ZodType< DeploymentWorkerListResponse, unknown > = z.object({ workers: z.array(DeploymentWorkerResponse$inboundSchema), next_cursor: z.nullable(z.string()), }).transform((v) => { return remap$(v, { "next_cursor": "nextCursor", }); }); export function deploymentWorkerListResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentWorkerListResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentWorkerListResponse' from JSON`, ); }