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>

49 lines (44 loc) 1.35 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"; /** * Provider synchronization errors, when synchronization is required. */ export type ConnectServiceSyncError = { /** * Human-readable provider synchronization error. */ message: string; /** * Connector fields that caused the synchronization error. */ fields?: Array<string> | undefined; /** * Provider-specific error details that are safe to expose. */ vendor?: { [k: string]: any } | undefined; }; /** @internal */ export const ConnectServiceSyncError$inboundSchema: z.ZodType< ConnectServiceSyncError, z.ZodTypeDef, unknown > = z.object({ message: types.string(), fields: types.optional(z.array(types.string())), vendor: types.optional(z.record(z.any())), }); export function connectServiceSyncErrorFromJSON( jsonString: string, ): SafeParseResult<ConnectServiceSyncError, SDKValidationError> { return safeParse( jsonString, (x) => ConnectServiceSyncError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ConnectServiceSyncError' from JSON`, ); }