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>

32 lines 1.46 kB
/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../lib/schemas.js"; import { smartUnion } from "../types/smartUnion.js"; import { Pagination$inboundSchema } from "./pagination.js"; import { Team$inboundSchema } from "./team.js"; import { TeamLimited$inboundSchema } from "./teamlimited.js"; /** @internal */ export const GetTeamsRequest$outboundSchema = z.object({ limit: z.number().optional(), since: z.number().optional(), until: z.number().optional(), }); export function getTeamsRequestToJSON(getTeamsRequest) { return JSON.stringify(GetTeamsRequest$outboundSchema.parse(getTeamsRequest)); } /** @internal */ export const GetTeamsTeams$inboundSchema = smartUnion([Team$inboundSchema, TeamLimited$inboundSchema]); export function getTeamsTeamsFromJSON(jsonString) { return safeParse(jsonString, (x) => GetTeamsTeams$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetTeamsTeams' from JSON`); } /** @internal */ export const GetTeamsResponseBody$inboundSchema = z.object({ teams: z.array(smartUnion([Team$inboundSchema, TeamLimited$inboundSchema])), pagination: Pagination$inboundSchema, }); export function getTeamsResponseBodyFromJSON(jsonString) { return safeParse(jsonString, (x) => GetTeamsResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetTeamsResponseBody' from JSON`); } //# sourceMappingURL=getteamsop.js.map