UNPKG

@unkey/api

Version:

Developer-friendly & type-safe Typescript SDK specifically catered to leverage *@unkey/api* API.

32 lines 1.06 kB
/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { safeParse } from "../../lib/schemas.js"; /** @internal */ export const Meta$inboundSchema = z .object({ requestId: z.string(), }); /** @internal */ export const Meta$outboundSchema = z.object({ requestId: z.string(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var Meta$; (function (Meta$) { /** @deprecated use `Meta$inboundSchema` instead. */ Meta$.inboundSchema = Meta$inboundSchema; /** @deprecated use `Meta$outboundSchema` instead. */ Meta$.outboundSchema = Meta$outboundSchema; })(Meta$ || (Meta$ = {})); export function metaToJSON(meta) { return JSON.stringify(Meta$outboundSchema.parse(meta)); } export function metaFromJSON(jsonString) { return safeParse(jsonString, (x) => Meta$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Meta' from JSON`); } //# sourceMappingURL=meta.js.map