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>

122 lines 5.56 kB
/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import * as types from "../types/primitives.js"; /** * Type of matcher. One of "equals", "startsWith", or "endsWith". */ export const UpdateCustomEnvironmentType = { Equals: "equals", StartsWith: "startsWith", EndsWith: "endsWith", }; /** * The type of environment (production, preview, or development) */ export const UpdateCustomEnvironmentEnvironmentType = { Development: "development", Preview: "preview", Production: "production", }; /** * The type of matching to perform */ export const UpdateCustomEnvironmentEnvironmentResponseType = { EndsWith: "endsWith", Equals: "equals", StartsWith: "startsWith", }; /** @internal */ export const UpdateCustomEnvironmentType$outboundSchema = z.nativeEnum(UpdateCustomEnvironmentType); /** @internal */ export const UpdateCustomEnvironmentBranchMatcher$outboundSchema = z.object({ type: UpdateCustomEnvironmentType$outboundSchema, pattern: z.string(), }); export function updateCustomEnvironmentBranchMatcherToJSON(updateCustomEnvironmentBranchMatcher) { return JSON.stringify(UpdateCustomEnvironmentBranchMatcher$outboundSchema.parse(updateCustomEnvironmentBranchMatcher)); } /** @internal */ export const UpdateCustomEnvironmentRequestBody$outboundSchema = z.object({ slug: z.string().optional(), description: z.string().optional(), branchMatcher: z.nullable(z.lazy(() => UpdateCustomEnvironmentBranchMatcher$outboundSchema)).optional(), }); export function updateCustomEnvironmentRequestBodyToJSON(updateCustomEnvironmentRequestBody) { return JSON.stringify(UpdateCustomEnvironmentRequestBody$outboundSchema.parse(updateCustomEnvironmentRequestBody)); } /** @internal */ export const UpdateCustomEnvironmentRequest$outboundSchema = z.object({ idOrName: z.string(), environmentSlugOrId: z.string(), teamId: z.string().optional(), slug: z.string().optional(), requestBody: z.lazy(() => UpdateCustomEnvironmentRequestBody$outboundSchema) .optional(), }).transform((v) => { return remap$(v, { requestBody: "RequestBody", }); }); export function updateCustomEnvironmentRequestToJSON(updateCustomEnvironmentRequest) { return JSON.stringify(UpdateCustomEnvironmentRequest$outboundSchema.parse(updateCustomEnvironmentRequest)); } /** @internal */ export const UpdateCustomEnvironmentEnvironmentType$inboundSchema = z.nativeEnum(UpdateCustomEnvironmentEnvironmentType); /** @internal */ export const UpdateCustomEnvironmentEnvironmentResponseType$inboundSchema = z .nativeEnum(UpdateCustomEnvironmentEnvironmentResponseType); /** @internal */ export const UpdateCustomEnvironmentEnvironmentBranchMatcher$inboundSchema = z.object({ type: UpdateCustomEnvironmentEnvironmentResponseType$inboundSchema, pattern: types.string(), }); export function updateCustomEnvironmentEnvironmentBranchMatcherFromJSON(jsonString) { return safeParse(jsonString, (x) => UpdateCustomEnvironmentEnvironmentBranchMatcher$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateCustomEnvironmentEnvironmentBranchMatcher' from JSON`); } /** @internal */ export const UpdateCustomEnvironmentVerification$inboundSchema = z.object({ type: types.string(), domain: types.string(), value: types.string(), reason: types.string(), }); export function updateCustomEnvironmentVerificationFromJSON(jsonString) { return safeParse(jsonString, (x) => UpdateCustomEnvironmentVerification$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateCustomEnvironmentVerification' from JSON`); } /** @internal */ export const UpdateCustomEnvironmentDomains$inboundSchema = z.object({ name: types.string(), apexName: types.string(), projectId: types.string(), redirect: z.nullable(types.string()).optional(), redirectStatusCode: z.nullable(types.number()).optional(), gitBranch: z.nullable(types.string()).optional(), customEnvironmentId: z.nullable(types.string()).optional(), updatedAt: types.optional(types.number()), createdAt: types.optional(types.number()), verified: types.boolean(), verification: types.optional(z.array(z.lazy(() => UpdateCustomEnvironmentVerification$inboundSchema))), }); export function updateCustomEnvironmentDomainsFromJSON(jsonString) { return safeParse(jsonString, (x) => UpdateCustomEnvironmentDomains$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateCustomEnvironmentDomains' from JSON`); } /** @internal */ export const UpdateCustomEnvironmentResponseBody$inboundSchema = z.object({ id: types.string(), slug: types.string(), type: UpdateCustomEnvironmentEnvironmentType$inboundSchema, description: types.optional(types.string()), branchMatcher: types.optional(z.lazy(() => UpdateCustomEnvironmentEnvironmentBranchMatcher$inboundSchema)), domains: types.optional(z.array(z.lazy(() => UpdateCustomEnvironmentDomains$inboundSchema))), currentDeploymentAliases: types.optional(z.array(types.string())), createdAt: types.number(), updatedAt: types.number(), }); export function updateCustomEnvironmentResponseBodyFromJSON(jsonString) { return safeParse(jsonString, (x) => UpdateCustomEnvironmentResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateCustomEnvironmentResponseBody' from JSON`); } //# sourceMappingURL=updatecustomenvironmentop.js.map