UNPKG

@unkey/api

Version:

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

33 lines 1.27 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 Pagination$inboundSchema = z.object({ cursor: z.string().optional(), hasMore: z.boolean().optional(), }); /** @internal */ export const Pagination$outboundSchema = z.object({ cursor: z.string().optional(), hasMore: z.boolean().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export var Pagination$; (function (Pagination$) { /** @deprecated use `Pagination$inboundSchema` instead. */ Pagination$.inboundSchema = Pagination$inboundSchema; /** @deprecated use `Pagination$outboundSchema` instead. */ Pagination$.outboundSchema = Pagination$outboundSchema; })(Pagination$ || (Pagination$ = {})); export function paginationToJSON(pagination) { return JSON.stringify(Pagination$outboundSchema.parse(pagination)); } export function paginationFromJSON(jsonString) { return safeParse(jsonString, (x) => Pagination$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Pagination' from JSON`); } //# sourceMappingURL=pagination.js.map