UNPKG

@vercel/sdk

Version:

<p align="center"> <a href="https://vercel.com"> <img src="https://assets.vercel.com/image/upload/v1588805858/repositories/vercel/logo.png" height="96"> <h3 align="center">Vercel</h3> </a> <p align="center">Develop. Preview. Ship.</p> </p>

53 lines (48 loc) 1.85 kB
/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { smartUnion } from "../types/smartUnion.js"; import { GetDeploymentResponseBody3, GetDeploymentResponseBody3$inboundSchema, } from "./getdeploymentgitsourcedeploymentsresponse200type.js"; import { GetDeploymentResponseBody1, GetDeploymentResponseBody1$inboundSchema, GetDeploymentResponseBody2, GetDeploymentResponseBody2$inboundSchema, } from "./getdeploymentresponsebody1.js"; import { SDKValidationError } from "./sdkvalidationerror.js"; /** * Returns a reduced view of the deployment with public information only. Private fields are omitted when the requester is not the deployment owner. * * @remarks * Returns the deployment object for the authenticated owner, including private fields such as environment variables, build log URLs, and internal metadata. * Returns the reduced deployment view for anonymous (`vcn_`) callers. Pool-team details are withheld. */ export type GetDeploymentResponseBody = | GetDeploymentResponseBody2 | GetDeploymentResponseBody3 | GetDeploymentResponseBody1; /** @internal */ export const GetDeploymentResponseBody$inboundSchema: z.ZodType< GetDeploymentResponseBody, z.ZodTypeDef, unknown > = smartUnion([ GetDeploymentResponseBody2$inboundSchema, GetDeploymentResponseBody3$inboundSchema, GetDeploymentResponseBody1$inboundSchema, ]); export function getDeploymentResponseBodyFromJSON( jsonString: string, ): SafeParseResult<GetDeploymentResponseBody, SDKValidationError> { return safeParse( jsonString, (x) => GetDeploymentResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetDeploymentResponseBody' from JSON`, ); }