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>

96 lines 4.77 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"; export const ListDeploymentAliasesProtectionBypassAccess = { Granted: "granted", Requested: "requested", }; /** @internal */ export const ListDeploymentAliasesRequest$outboundSchema = z.object({ id: z.string(), teamId: z.string().optional(), slug: z.string().optional(), }); export function listDeploymentAliasesRequestToJSON(listDeploymentAliasesRequest) { return JSON.stringify(ListDeploymentAliasesRequest$outboundSchema.parse(listDeploymentAliasesRequest)); } /** @internal */ export const ListDeploymentAliasesProtectionBypass4$inboundSchema = z.object({ createdAt: types.number(), lastUpdatedAt: types.number(), lastUpdatedBy: types.string(), scope: types.literal("email_invite"), }); export function listDeploymentAliasesProtectionBypass4FromJSON(jsonString) { return safeParse(jsonString, (x) => ListDeploymentAliasesProtectionBypass4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListDeploymentAliasesProtectionBypass4' from JSON`); } /** @internal */ export const ListDeploymentAliasesProtectionBypass3$inboundSchema = z.object({ createdAt: types.number(), createdBy: types.string(), scope: types.literal("alias-protection-override"), }); export function listDeploymentAliasesProtectionBypass3FromJSON(jsonString) { return safeParse(jsonString, (x) => ListDeploymentAliasesProtectionBypass3$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListDeploymentAliasesProtectionBypass3' from JSON`); } /** @internal */ export const ListDeploymentAliasesProtectionBypassAccess$inboundSchema = z .nativeEnum(ListDeploymentAliasesProtectionBypassAccess); /** @internal */ export const ListDeploymentAliasesProtectionBypass2$inboundSchema = z.object({ createdAt: types.number(), lastUpdatedAt: types.number(), lastUpdatedBy: types.string(), access: ListDeploymentAliasesProtectionBypassAccess$inboundSchema, scope: types.literal("user"), }); export function listDeploymentAliasesProtectionBypass2FromJSON(jsonString) { return safeParse(jsonString, (x) => ListDeploymentAliasesProtectionBypass2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListDeploymentAliasesProtectionBypass2' from JSON`); } /** @internal */ export const ListDeploymentAliasesProtectionBypass1$inboundSchema = z.object({ createdAt: types.number(), createdBy: types.string(), scope: types.literal("shareable-link"), expires: types.optional(types.number()), }); export function listDeploymentAliasesProtectionBypass1FromJSON(jsonString) { return safeParse(jsonString, (x) => ListDeploymentAliasesProtectionBypass1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListDeploymentAliasesProtectionBypass1' from JSON`); } /** @internal */ export const ListDeploymentAliasesProtectionBypass$inboundSchema = z.union([ z.lazy(() => ListDeploymentAliasesProtectionBypass1$inboundSchema), z.lazy(() => ListDeploymentAliasesProtectionBypass2$inboundSchema), z.lazy(() => ListDeploymentAliasesProtectionBypass3$inboundSchema), z.lazy(() => ListDeploymentAliasesProtectionBypass4$inboundSchema), ]); export function listDeploymentAliasesProtectionBypassFromJSON(jsonString) { return safeParse(jsonString, (x) => ListDeploymentAliasesProtectionBypass$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListDeploymentAliasesProtectionBypass' from JSON`); } /** @internal */ export const Aliases$inboundSchema = z.object({ uid: types.string(), alias: types.string(), created: types.date(), redirect: z.nullable(types.string()).optional(), protectionBypass: types.optional(z.record(z.union([ z.lazy(() => ListDeploymentAliasesProtectionBypass1$inboundSchema), z.lazy(() => ListDeploymentAliasesProtectionBypass2$inboundSchema), z.lazy(() => ListDeploymentAliasesProtectionBypass3$inboundSchema), z.lazy(() => ListDeploymentAliasesProtectionBypass4$inboundSchema), ]))), }); export function aliasesFromJSON(jsonString) { return safeParse(jsonString, (x) => Aliases$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Aliases' from JSON`); } /** @internal */ export const ListDeploymentAliasesResponseBody$inboundSchema = z.object({ aliases: z.array(z.lazy(() => Aliases$inboundSchema)), }); export function listDeploymentAliasesResponseBodyFromJSON(jsonString) { return safeParse(jsonString, (x) => ListDeploymentAliasesResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListDeploymentAliasesResponseBody' from JSON`); } //# sourceMappingURL=listdeploymentaliasesop.js.map