@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>
201 lines (187 loc) • 5.28 kB
text/typescript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod/v3";
import { safeParse } from "../lib/schemas.js";
import { ClosedEnum } from "../types/enums.js";
import { Result as SafeParseResult } from "../types/fp.js";
import * as types from "../types/primitives.js";
import { SDKValidationError } from "./sdkvalidationerror.js";
export type GetConfigurableLogDrainRequest = {
id: string;
/**
* The Team identifier to perform the request on behalf of.
*/
teamId?: string | undefined;
/**
* The Team slug to perform the request on behalf of.
*/
slug?: string | undefined;
};
export const GetConfigurableLogDrainFramework = {
ActixWeb: "actix-web",
Angular: "angular",
Ash: "ash",
Astro: "astro",
Axum: "axum",
Blitzjs: "blitzjs",
Brunch: "brunch",
Bun: "bun",
CreateReactApp: "create-react-app",
Django: "django",
Docusaurus: "docusaurus",
Docusaurus2: "docusaurus-2",
Dojo: "dojo",
Eleventy: "eleventy",
Elysia: "elysia",
Ember: "ember",
Eve: "eve",
Express: "express",
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",
Umijs: "umijs",
Vite: "vite",
Vitepress: "vitepress",
Vue: "vue",
Vuepress: "vuepress",
Xmcp: "xmcp",
Zola: "zola",
} as const;
export type GetConfigurableLogDrainFramework = ClosedEnum<
typeof GetConfigurableLogDrainFramework
>;
export type ProjectsMetadata = {
id: string;
name: string;
framework?: GetConfigurableLogDrainFramework | null | undefined;
latestDeployment?: string | undefined;
};
export type GetConfigurableLogDrainResponseBody = {
createdFrom: string;
clientId?: string | undefined;
configurationId?: string | undefined;
projectsMetadata?: Array<ProjectsMetadata> | null | undefined;
integrationIcon?: string | undefined;
integrationConfigurationUri?: string | undefined;
integrationWebsite?: string | undefined;
};
/** @internal */
export type GetConfigurableLogDrainRequest$Outbound = {
id: string;
teamId?: string | undefined;
slug?: string | undefined;
};
/** @internal */
export const GetConfigurableLogDrainRequest$outboundSchema: z.ZodType<
GetConfigurableLogDrainRequest$Outbound,
z.ZodTypeDef,
GetConfigurableLogDrainRequest
> = z.object({
id: z.string(),
teamId: z.string().optional(),
slug: z.string().optional(),
});
export function getConfigurableLogDrainRequestToJSON(
getConfigurableLogDrainRequest: GetConfigurableLogDrainRequest,
): string {
return JSON.stringify(
GetConfigurableLogDrainRequest$outboundSchema.parse(
getConfigurableLogDrainRequest,
),
);
}
/** @internal */
export const GetConfigurableLogDrainFramework$inboundSchema: z.ZodNativeEnum<
typeof GetConfigurableLogDrainFramework
> = z.nativeEnum(GetConfigurableLogDrainFramework);
/** @internal */
export const ProjectsMetadata$inboundSchema: z.ZodType<
ProjectsMetadata,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.string(),
framework: z.nullable(GetConfigurableLogDrainFramework$inboundSchema)
.optional(),
latestDeployment: types.optional(types.string()),
});
export function projectsMetadataFromJSON(
jsonString: string,
): SafeParseResult<ProjectsMetadata, SDKValidationError> {
return safeParse(
jsonString,
(x) => ProjectsMetadata$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ProjectsMetadata' from JSON`,
);
}
/** @internal */
export const GetConfigurableLogDrainResponseBody$inboundSchema: z.ZodType<
GetConfigurableLogDrainResponseBody,
z.ZodTypeDef,
unknown
> = z.object({
createdFrom: types.string(),
clientId: types.optional(types.string()),
configurationId: types.optional(types.string()),
projectsMetadata: z.nullable(
z.array(z.lazy(() => ProjectsMetadata$inboundSchema)),
).optional(),
integrationIcon: types.optional(types.string()),
integrationConfigurationUri: types.optional(types.string()),
integrationWebsite: types.optional(types.string()),
});
export function getConfigurableLogDrainResponseBodyFromJSON(
jsonString: string,
): SafeParseResult<GetConfigurableLogDrainResponseBody, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetConfigurableLogDrainResponseBody$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetConfigurableLogDrainResponseBody' from JSON`,
);
}