/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: ef48963f9d99 */ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { ReleaseDeploymentItem, ReleaseDeploymentItem$inboundSchema, } from "./releasedeploymentitem.js"; import { ReleaseRolloutStateCounts, ReleaseRolloutStateCounts$inboundSchema, } from "./releaserolloutstatecounts.js"; export type ReleaseDeploymentsResponse = { /** * Items in this page */ items: Array; /** * Cursor for the next page, null if last page */ nextCursor: string | null; /** * Deployment counts per rollout state across all deployments the filters allow (ignores the state filter) */ stateCounts: ReleaseRolloutStateCounts; }; /** @internal */ export const ReleaseDeploymentsResponse$inboundSchema: z.ZodType< ReleaseDeploymentsResponse, unknown > = z.object({ items: z.array(ReleaseDeploymentItem$inboundSchema), nextCursor: z.nullable(z.string()), stateCounts: ReleaseRolloutStateCounts$inboundSchema, }); export function releaseDeploymentsResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ReleaseDeploymentsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ReleaseDeploymentsResponse' from JSON`, ); }