/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * A response to a list signing keys method */ export type ListSigningKeysResponse = { /** * The returned collection of all currently valid signing keys */ keys?: Array<{ [k: string]: any } | null> | undefined; /** * Page token used for pagination; Supplying a page token returns the next page of results */ nextPageToken?: string | undefined; }; /** @internal */ export const ListSigningKeysResponse$inboundSchema: z.ZodType< ListSigningKeysResponse, z.ZodTypeDef, unknown > = z.object({ keys: z.array(z.nullable(z.record(z.any()))).optional(), next_page_token: z.string().optional(), }).transform((v) => { return remap$(v, { "next_page_token": "nextPageToken", }); }); /** @internal */ export type ListSigningKeysResponse$Outbound = { keys?: Array<{ [k: string]: any } | null> | undefined; next_page_token?: string | undefined; }; /** @internal */ export const ListSigningKeysResponse$outboundSchema: z.ZodType< ListSigningKeysResponse$Outbound, z.ZodTypeDef, ListSigningKeysResponse > = z.object({ keys: z.array(z.nullable(z.record(z.any()))).optional(), nextPageToken: z.string().optional(), }).transform((v) => { return remap$(v, { nextPageToken: "next_page_token", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace ListSigningKeysResponse$ { /** @deprecated use `ListSigningKeysResponse$inboundSchema` instead. */ export const inboundSchema = ListSigningKeysResponse$inboundSchema; /** @deprecated use `ListSigningKeysResponse$outboundSchema` instead. */ export const outboundSchema = ListSigningKeysResponse$outboundSchema; /** @deprecated use `ListSigningKeysResponse$Outbound` instead. */ export type Outbound = ListSigningKeysResponse$Outbound; } export function listSigningKeysResponseToJSON( listSigningKeysResponse: ListSigningKeysResponse, ): string { return JSON.stringify( ListSigningKeysResponse$outboundSchema.parse(listSigningKeysResponse), ); } export function listSigningKeysResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ListSigningKeysResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListSigningKeysResponse' from JSON`, ); }