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>

76 lines (67 loc) 1.82 kB
/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import * as types from "../types/primitives.js"; import { SDKValidationError } from "./sdkvalidationerror.js"; export type DeleteTeamInviteCodeRequest = { /** * The Team invite code ID. */ inviteId: string; /** * The Team identifier to perform the request on behalf of. */ teamId: string; }; /** * Successfully deleted Team invite code. */ export type DeleteTeamInviteCodeResponseBody = { /** * ID of the team. */ id: string; }; /** @internal */ export type DeleteTeamInviteCodeRequest$Outbound = { inviteId: string; teamId: string; }; /** @internal */ export const DeleteTeamInviteCodeRequest$outboundSchema: z.ZodType< DeleteTeamInviteCodeRequest$Outbound, z.ZodTypeDef, DeleteTeamInviteCodeRequest > = z.object({ inviteId: z.string(), teamId: z.string(), }); export function deleteTeamInviteCodeRequestToJSON( deleteTeamInviteCodeRequest: DeleteTeamInviteCodeRequest, ): string { return JSON.stringify( DeleteTeamInviteCodeRequest$outboundSchema.parse( deleteTeamInviteCodeRequest, ), ); } /** @internal */ export const DeleteTeamInviteCodeResponseBody$inboundSchema: z.ZodType< DeleteTeamInviteCodeResponseBody, z.ZodTypeDef, unknown > = z.object({ id: types.string(), }); export function deleteTeamInviteCodeResponseBodyFromJSON( jsonString: string, ): SafeParseResult<DeleteTeamInviteCodeResponseBody, SDKValidationError> { return safeParse( jsonString, (x) => DeleteTeamInviteCodeResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteTeamInviteCodeResponseBody' from JSON`, ); }