@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>
202 lines • 7.54 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";
import { smartUnion } from "../types/smartUnion.js";
export const GetStorageStoresByIdFramework = {
ActixWeb: "actix-web",
Angular: "angular",
Ash: "ash",
Astro: "astro",
Axum: "axum",
Blitzjs: "blitzjs",
Brunch: "brunch",
Bun: "bun",
Container: "container",
CreateReactApp: "create-react-app",
Django: "django",
Docusaurus: "docusaurus",
Docusaurus2: "docusaurus-2",
Dojo: "dojo",
Eleventy: "eleventy",
Elysia: "elysia",
Ember: "ember",
Eve: "eve",
Express: "express",
FactoryEve: "factory-eve",
Fastapi: "fastapi",
Fasthtml: "fasthtml",
Fastify: "fastify",
Flask: "flask",
Gatsby: "gatsby",
Go: "go",
Gridsome: "gridsome",
H3: "h3",
Hexo: "hexo",
Hono: "hono",
Hugo: "hugo",
Hydrogen: "hydrogen",
IonicAngular: "ionic-angular",
IonicReact: "ionic-react",
Jekyll: "jekyll",
Koa: "koa",
Mastra: "mastra",
Middleman: "middleman",
Nestjs: "nestjs",
Nextjs: "nextjs",
Nitro: "nitro",
Node: "node",
Nuxtjs: "nuxtjs",
Parcel: "parcel",
Polymer: "polymer",
Preact: "preact",
Python: "python",
ReactRouter: "react-router",
Redwoodjs: "redwoodjs",
Remix: "remix",
Ruby: "ruby",
Rust: "rust",
Saber: "saber",
Sanity: "sanity",
SanityV2: "sanity-v2",
Sapper: "sapper",
Scully: "scully",
Services: "services",
Solidstart: "solidstart",
Solidstart1: "solidstart-1",
Stencil: "stencil",
Storybook: "storybook",
Svelte: "svelte",
Sveltekit: "sveltekit",
Sveltekit1: "sveltekit-1",
TanstackStart: "tanstack-start",
TanstackStartLovable: "tanstack-start-lovable",
Umijs: "umijs",
Vite: "vite",
Vitepress: "vitepress",
Vue: "vue",
Vuepress: "vuepress",
Xmcp: "xmcp",
Zola: "zola",
};
export const Providers2 = {
Wildcard: "*",
};
export const Providers1 = {
Bitbucket: "bitbucket",
Github: "github",
Gitlab: "gitlab",
};
export const GetStorageStoresByIdStatus = {
Available: "available",
Error: "error",
Initializing: "initializing",
LimitsExceededSuspended: "limits-exceeded-suspended",
LimitsExceededSuspendedStoreCount: "limits-exceeded-suspended-store-count",
Onboarding: "onboarding",
Suspended: "suspended",
Uninstalled: "uninstalled",
};
/** @internal */
export const GetStorageStoresByIdRequest$outboundSchema = z.object({
id: z.string(),
skipMetadata: z.boolean().optional(),
includeGuides: z.boolean().optional(),
}).transform((v) => {
return remap$(v, {
skipMetadata: "skip-metadata",
includeGuides: "include-guides",
});
});
export function getStorageStoresByIdRequestToJSON(getStorageStoresByIdRequest) {
return JSON.stringify(GetStorageStoresByIdRequest$outboundSchema.parse(getStorageStoresByIdRequest));
}
/** @internal */
export const GetStorageStoresByIdFramework$inboundSchema = z.nativeEnum(GetStorageStoresByIdFramework);
/** @internal */
export const GetStorageStoresByIdActions$inboundSchema = z.object({
slug: types.string(),
environments: z.array(types.string()),
});
export function getStorageStoresByIdActionsFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetStorageStoresByIdActions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetStorageStoresByIdActions' from JSON`);
}
/** @internal */
export const GetStorageStoresByIdDeployments$inboundSchema = z.object({
required: types.boolean(),
actions: z.array(z.lazy(() => GetStorageStoresByIdActions$inboundSchema)),
});
export function getStorageStoresByIdDeploymentsFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetStorageStoresByIdDeployments$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetStorageStoresByIdDeployments' from JSON`);
}
/** @internal */
export const GetStorageStoresByIdProjectsMetadata$inboundSchema = z.object({
id: types.string(),
projectId: types.string(),
name: types.string(),
framework: z.nullable(GetStorageStoresByIdFramework$inboundSchema).optional(),
latestDeployment: types.optional(types.string()),
environments: z.array(types.string()),
envVarPrefix: types.nullable(types.string()),
environmentVariables: z.array(types.string()),
deployments: types.optional(z.lazy(() => GetStorageStoresByIdDeployments$inboundSchema)),
makeEnvVarsSensitive: types.optional(types.boolean()),
});
export function getStorageStoresByIdProjectsMetadataFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetStorageStoresByIdProjectsMetadata$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetStorageStoresByIdProjectsMetadata' from JSON`);
}
/** @internal */
export const Providers2$inboundSchema = z
.nativeEnum(Providers2);
/** @internal */
export const Providers1$inboundSchema = z
.nativeEnum(Providers1);
/** @internal */
export const GetStorageStoresByIdProviders$inboundSchema = smartUnion([z.array(Providers1$inboundSchema), Providers2$inboundSchema]);
export function getStorageStoresByIdProvidersFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetStorageStoresByIdProviders$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetStorageStoresByIdProviders' from JSON`);
}
/** @internal */
export const Git$inboundSchema = z
.object({
providers: smartUnion([
z.array(Providers1$inboundSchema),
Providers2$inboundSchema,
]),
owners: types.optional(z.array(types.string())),
repos: types.optional(z.array(types.string())),
});
export function gitFromJSON(jsonString) {
return safeParse(jsonString, (x) => Git$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Git' from JSON`);
}
/** @internal */
export const ProjectFilter$inboundSchema = z.object({
git: types.optional(z.lazy(() => Git$inboundSchema)),
});
export function projectFilterFromJSON(jsonString) {
return safeParse(jsonString, (x) => ProjectFilter$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ProjectFilter' from JSON`);
}
/** @internal */
export const GetStorageStoresByIdStatus$inboundSchema = z.nativeEnum(GetStorageStoresByIdStatus);
/** @internal */
export const GetStorageStoresByIdStore$inboundSchema = z.object({
projectsMetadata: z.array(z.lazy(() => GetStorageStoresByIdProjectsMetadata$inboundSchema)),
projectFilter: types.optional(z.lazy(() => ProjectFilter$inboundSchema)),
totalConnectedProjects: types.optional(types.number()),
usageQuotaExceeded: types.boolean(),
status: types.nullable(GetStorageStoresByIdStatus$inboundSchema),
});
export function getStorageStoresByIdStoreFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetStorageStoresByIdStore$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetStorageStoresByIdStore' from JSON`);
}
/** @internal */
export const GetStorageStoresByIdResponseBody$inboundSchema = z.object({
store: z.lazy(() => GetStorageStoresByIdStore$inboundSchema),
});
export function getStorageStoresByIdResponseBodyFromJSON(jsonString) {
return safeParse(jsonString, (x) => GetStorageStoresByIdResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetStorageStoresByIdResponseBody' from JSON`);
}
//# sourceMappingURL=getstoragestoresbyidop.js.map