/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 358f9476aa4b */ 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 * as models from "../index.js"; export type PinDeploymentReleaseGlobals = { /** * Workspace name. Platform API keys already select a workspace; other authentication methods can configure it once on the SDK client. */ workspace?: string | undefined; }; export type PinDeploymentReleaseRequest = { /** * Unique identifier for the deployment. */ id: string; pinReleaseRequest?: models.PinReleaseRequest | undefined; }; /** * Release pin updated successfully. */ export type PinDeploymentReleaseResponse = { message: string; }; /** @internal */ export type PinDeploymentReleaseRequest$Outbound = { id: string; PinReleaseRequest?: models.PinReleaseRequest$Outbound | undefined; }; /** @internal */ export const PinDeploymentReleaseRequest$outboundSchema: z.ZodType< PinDeploymentReleaseRequest$Outbound, PinDeploymentReleaseRequest > = z.object({ id: z.string(), pinReleaseRequest: models.PinReleaseRequest$outboundSchema.optional(), }).transform((v) => { return remap$(v, { pinReleaseRequest: "PinReleaseRequest", }); }); export function pinDeploymentReleaseRequestToJSON( pinDeploymentReleaseRequest: PinDeploymentReleaseRequest, ): string { return JSON.stringify( PinDeploymentReleaseRequest$outboundSchema.parse( pinDeploymentReleaseRequest, ), ); } /** @internal */ export const PinDeploymentReleaseResponse$inboundSchema: z.ZodType< PinDeploymentReleaseResponse, unknown > = z.object({ message: z.string(), }); export function pinDeploymentReleaseResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PinDeploymentReleaseResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PinDeploymentReleaseResponse' from JSON`, ); }