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>

83 lines 4.03 kB
/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../lib/schemas.js"; import * as types from "../types/primitives.js"; /** * The metric this check evaluates. */ export const GetRollingReleaseConfigType = { ErrorRate5xx: "error-rate-5xx", }; /** * What to do when the gate trips: pause the rollout, or roll it back. */ export const GetRollingReleaseConfigAction = { Pause: "pause", Rollback: "rollback", }; /** @internal */ export const GetRollingReleaseConfigRequest$outboundSchema = z.object({ idOrName: z.string(), teamId: z.string().optional(), slug: z.string().optional(), }); export function getRollingReleaseConfigRequestToJSON(getRollingReleaseConfigRequest) { return JSON.stringify(GetRollingReleaseConfigRequest$outboundSchema.parse(getRollingReleaseConfigRequest)); } /** @internal */ export const GetRollingReleaseConfigStages$inboundSchema = z.object({ targetPercentage: types.number(), requireApproval: types.optional(types.boolean()), duration: types.optional(types.number()), linearShift: types.optional(types.boolean()), }); export function getRollingReleaseConfigStagesFromJSON(jsonString) { return safeParse(jsonString, (x) => GetRollingReleaseConfigStages$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetRollingReleaseConfigStages' from JSON`); } /** @internal */ export const GetRollingReleaseConfigType$inboundSchema = z.nativeEnum(GetRollingReleaseConfigType); /** @internal */ export const GetRollingReleaseConfigChecks$inboundSchema = z.object({ type: GetRollingReleaseConfigType$inboundSchema, minSampleSize: types.optional(types.number()), excludeStatusCodes: types.optional(z.array(types.number())), excludePaths: types.optional(z.array(types.string())), ingestWatermarkSeconds: types.optional(types.number()), }); export function getRollingReleaseConfigChecksFromJSON(jsonString) { return safeParse(jsonString, (x) => GetRollingReleaseConfigChecks$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetRollingReleaseConfigChecks' from JSON`); } /** @internal */ export const GetRollingReleaseConfigAction$inboundSchema = z.nativeEnum(GetRollingReleaseConfigAction); /** @internal */ export const GetRollingReleaseConfigGate$inboundSchema = z.object({ enabled: types.boolean(), checks: z.array(z.lazy(() => GetRollingReleaseConfigChecks$inboundSchema)), failureThreshold: types.optional(types.number()), windowSize: types.optional(types.number()), action: GetRollingReleaseConfigAction$inboundSchema, dryRun: types.boolean(), }); export function getRollingReleaseConfigGateFromJSON(jsonString) { return safeParse(jsonString, (x) => GetRollingReleaseConfigGate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetRollingReleaseConfigGate' from JSON`); } /** @internal */ export const GetRollingReleaseConfigRollingRelease$inboundSchema = z.object({ target: types.string(), stages: z.nullable(z.array(z.lazy(() => GetRollingReleaseConfigStages$inboundSchema))).optional(), canaryResponseHeader: types.optional(types.boolean()), gate: types.optional(z.lazy(() => GetRollingReleaseConfigGate$inboundSchema)), }); export function getRollingReleaseConfigRollingReleaseFromJSON(jsonString) { return safeParse(jsonString, (x) => GetRollingReleaseConfigRollingRelease$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetRollingReleaseConfigRollingRelease' from JSON`); } /** @internal */ export const GetRollingReleaseConfigResponseBody$inboundSchema = z.object({ rollingRelease: types.nullable(z.lazy(() => GetRollingReleaseConfigRollingRelease$inboundSchema)), }); export function getRollingReleaseConfigResponseBodyFromJSON(jsonString) { return safeParse(jsonString, (x) => GetRollingReleaseConfigResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetRollingReleaseConfigResponseBody' from JSON`); } //# sourceMappingURL=getrollingreleaseconfigop.js.map