@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>
72 lines • 3.05 kB
JavaScript
/*
* 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";
/**
* Status code for domain redirect
*/
export const MoveProjectDomainRedirectStatusCode = {
ThreeHundredAndOne: 301,
ThreeHundredAndTwo: 302,
ThreeHundredAndSeven: 307,
ThreeHundredAndEight: 308,
};
/** @internal */
export const MoveProjectDomainRedirectStatusCode$outboundSchema = z.nativeEnum(MoveProjectDomainRedirectStatusCode);
/** @internal */
export const MoveProjectDomainRequestBody$outboundSchema = z.object({
projectId: z.string(),
gitBranch: z.nullable(z.string()).optional(),
redirect: z.nullable(z.string()).optional(),
redirectStatusCode: z.nullable(MoveProjectDomainRedirectStatusCode$outboundSchema).optional(),
});
export function moveProjectDomainRequestBodyToJSON(moveProjectDomainRequestBody) {
return JSON.stringify(MoveProjectDomainRequestBody$outboundSchema.parse(moveProjectDomainRequestBody));
}
/** @internal */
export const MoveProjectDomainRequest$outboundSchema = z.object({
idOrName: z.string(),
domain: z.string(),
teamId: z.string().optional(),
slug: z.string().optional(),
requestBody: z.lazy(() => MoveProjectDomainRequestBody$outboundSchema)
.optional(),
}).transform((v) => {
return remap$(v, {
requestBody: "RequestBody",
});
});
export function moveProjectDomainRequestToJSON(moveProjectDomainRequest) {
return JSON.stringify(MoveProjectDomainRequest$outboundSchema.parse(moveProjectDomainRequest));
}
/** @internal */
export const MoveProjectDomainVerification$inboundSchema = z.object({
type: types.string(),
domain: types.string(),
value: types.string(),
reason: types.string(),
});
export function moveProjectDomainVerificationFromJSON(jsonString) {
return safeParse(jsonString, (x) => MoveProjectDomainVerification$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MoveProjectDomainVerification' from JSON`);
}
/** @internal */
export const MoveProjectDomainResponseBody$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(() => MoveProjectDomainVerification$inboundSchema))),
});
export function moveProjectDomainResponseBodyFromJSON(jsonString) {
return safeParse(jsonString, (x) => MoveProjectDomainResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MoveProjectDomainResponseBody' from JSON`);
}
//# sourceMappingURL=moveprojectdomainop.js.map