@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>
103 lines • 5.37 kB
JavaScript
/*
* 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 type of environment (production, preview, or development)
*/
export const GetProjectsByIdOrNameCustomEnvironmentsType = {
Development: "development",
Preview: "preview",
Production: "production",
};
/**
* The type of matching to perform
*/
export const GetProjectsByIdOrNameCustomEnvironmentsEnvironmentType = {
EndsWith: "endsWith",
Equals: "equals",
StartsWith: "startsWith",
};
/** @internal */
export const GetProjectsByIdOrNameCustomEnvironmentsRequest$outboundSchema = z.object({
idOrName: z.string(),
gitBranch: z.string().optional(),
teamId: z.string().optional(),
slug: z.string().optional(),
});
export function getProjectsByIdOrNameCustomEnvironmentsRequestToJSON(getProjectsByIdOrNameCustomEnvironmentsRequest) {
return JSON.stringify(GetProjectsByIdOrNameCustomEnvironmentsRequest$outboundSchema.parse(getProjectsByIdOrNameCustomEnvironmentsRequest));
}
/** @internal */
export const AccountLimit$inboundSchema = z.object({
total: types.number(),
});
export function accountLimitFromJSON(jsonString) {
return safeParse(jsonString, (x) => AccountLimit$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AccountLimit' from JSON`);
}
/** @internal */
export const GetProjectsByIdOrNameCustomEnvironmentsType$inboundSchema = z
.nativeEnum(GetProjectsByIdOrNameCustomEnvironmentsType);
/** @internal */
export const GetProjectsByIdOrNameCustomEnvironmentsVerification$inboundSchema = z.object({
type: types.string(),
domain: types.string(),
value: types.string(),
reason: types.string(),
});
export function getProjectsByIdOrNameCustomEnvironmentsVerificationFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetProjectsByIdOrNameCustomEnvironmentsVerification$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetProjectsByIdOrNameCustomEnvironmentsVerification' from JSON`);
}
/** @internal */
export const GetProjectsByIdOrNameCustomEnvironmentsDomains$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(() => GetProjectsByIdOrNameCustomEnvironmentsVerification$inboundSchema))),
});
export function getProjectsByIdOrNameCustomEnvironmentsDomainsFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetProjectsByIdOrNameCustomEnvironmentsDomains$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetProjectsByIdOrNameCustomEnvironmentsDomains' from JSON`);
}
/** @internal */
export const GetProjectsByIdOrNameCustomEnvironmentsEnvironmentType$inboundSchema = z.nativeEnum(GetProjectsByIdOrNameCustomEnvironmentsEnvironmentType);
/** @internal */
export const GetProjectsByIdOrNameCustomEnvironmentsBranchMatcher$inboundSchema = z.object({
type: GetProjectsByIdOrNameCustomEnvironmentsEnvironmentType$inboundSchema,
pattern: types.string(),
});
export function getProjectsByIdOrNameCustomEnvironmentsBranchMatcherFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetProjectsByIdOrNameCustomEnvironmentsBranchMatcher$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetProjectsByIdOrNameCustomEnvironmentsBranchMatcher' from JSON`);
}
/** @internal */
export const GetProjectsByIdOrNameCustomEnvironmentsEnvironments$inboundSchema = z.object({
type: GetProjectsByIdOrNameCustomEnvironmentsType$inboundSchema,
description: types.optional(types.string()),
createdAt: types.number(),
updatedAt: types.number(),
slug: types.string(),
id: types.string(),
domains: types.optional(z.array(z.lazy(() => GetProjectsByIdOrNameCustomEnvironmentsDomains$inboundSchema))),
branchMatcher: types.optional(z.lazy(() => GetProjectsByIdOrNameCustomEnvironmentsBranchMatcher$inboundSchema)),
currentDeploymentAliases: types.optional(z.array(types.string())),
});
export function getProjectsByIdOrNameCustomEnvironmentsEnvironmentsFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetProjectsByIdOrNameCustomEnvironmentsEnvironments$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetProjectsByIdOrNameCustomEnvironmentsEnvironments' from JSON`);
}
/** @internal */
export const GetProjectsByIdOrNameCustomEnvironmentsResponseBody$inboundSchema = z.object({
accountLimit: z.lazy(() => AccountLimit$inboundSchema),
environments: z.array(z.lazy(() => GetProjectsByIdOrNameCustomEnvironmentsEnvironments$inboundSchema)),
});
export function getProjectsByIdOrNameCustomEnvironmentsResponseBodyFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetProjectsByIdOrNameCustomEnvironmentsResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetProjectsByIdOrNameCustomEnvironmentsResponseBody' from JSON`);
}
//# sourceMappingURL=getprojectsbyidornamecustomenvironmentsop.js.map