@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>
41 lines • 1.53 kB
JavaScript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod/v3";
import { smartUnion } from "../types/smartUnion.js";
/** @internal */
export const CustomEnvironment$outboundSchema = z.object({
projectId: z.string(),
customEnvironmentId: z.string(),
path: z.string().optional(),
});
export function customEnvironmentToJSON(customEnvironment) {
return JSON.stringify(CustomEnvironment$outboundSchema.parse(customEnvironment));
}
/** @internal */
export const Branch$outboundSchema = z.object({
projectId: z.string(),
branch: z.string(),
path: z.string().optional(),
});
export function branchToJSON(branch) {
return JSON.stringify(Branch$outboundSchema.parse(branch));
}
/** @internal */
export const DefaultDeployment$outboundSchema = z.object({
projectId: z.string(),
path: z.string().optional(),
});
export function defaultDeploymentToJSON(defaultDeployment) {
return JSON.stringify(DefaultDeployment$outboundSchema.parse(defaultDeployment));
}
/** @internal */
export const ConnectTriggerDestinationInput$outboundSchema = smartUnion([
z.lazy(() => Branch$outboundSchema),
z.lazy(() => CustomEnvironment$outboundSchema),
z.lazy(() => DefaultDeployment$outboundSchema),
]);
export function connectTriggerDestinationInputToJSON(connectTriggerDestinationInput) {
return JSON.stringify(ConnectTriggerDestinationInput$outboundSchema.parse(connectTriggerDestinationInput));
}
//# sourceMappingURL=connecttriggerdestinationinput.js.map