UNPKG

@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>

53 lines 1.86 kB
/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../lib/primitives.js"; /** @internal */ export const Event2$outboundSchema = z.object({ type: z.literal("resource.updated"), productId: z.string().optional(), resourceId: z.string(), }); export function event2ToJSON(event2) { return JSON.stringify(Event2$outboundSchema.parse(event2)); } /** @internal */ export const Event1$outboundSchema = z.object({ type: z.literal("installation.updated"), billingPlanId: z.string().optional(), }); export function event1ToJSON(event1) { return JSON.stringify(Event1$outboundSchema.parse(event1)); } /** @internal */ export const CreateEventEvent$outboundSchema = z.union([ z.lazy(() => Event1$outboundSchema), z.lazy(() => Event2$outboundSchema), ]); export function createEventEventToJSON(createEventEvent) { return JSON.stringify(CreateEventEvent$outboundSchema.parse(createEventEvent)); } /** @internal */ export const CreateEventRequestBody$outboundSchema = z.object({ event: z.union([ z.lazy(() => Event1$outboundSchema), z.lazy(() => Event2$outboundSchema), ]), }); export function createEventRequestBodyToJSON(createEventRequestBody) { return JSON.stringify(CreateEventRequestBody$outboundSchema.parse(createEventRequestBody)); } /** @internal */ export const CreateEventRequest$outboundSchema = z.object({ integrationConfigurationId: z.string(), requestBody: z.lazy(() => CreateEventRequestBody$outboundSchema), }).transform((v) => { return remap$(v, { requestBody: "RequestBody", }); }); export function createEventRequestToJSON(createEventRequest) { return JSON.stringify(CreateEventRequest$outboundSchema.parse(createEventRequest)); } //# sourceMappingURL=createeventop.js.map