/* * 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 * as components from "../components/index.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type AuthenticationListSigningKeysSecurity = { apiKeyAuth: string; }; export type AuthenticationListSigningKeysRequest = { /** * The number of entries to return in a single page; Default = 100; Maximum = 1000 */ pageSize?: number | undefined; /** * Page token used for pagination; Supplying a page token returns the next page of results */ pageToken?: string | undefined; }; export type AuthenticationListSigningKeysResponse = { httpMeta: components.HTTPMetadata; /** * OK */ listSigningKeysResponse?: components.ListSigningKeysResponse | undefined; /** * INTERNAL: An internal server error occurred. */ status?: components.Status | undefined; }; /** @internal */ export const AuthenticationListSigningKeysSecurity$inboundSchema: z.ZodType< AuthenticationListSigningKeysSecurity, z.ZodTypeDef, unknown > = z.object({ ApiKeyAuth: z.string(), }).transform((v) => { return remap$(v, { "ApiKeyAuth": "apiKeyAuth", }); }); /** @internal */ export type AuthenticationListSigningKeysSecurity$Outbound = { ApiKeyAuth: string; }; /** @internal */ export const AuthenticationListSigningKeysSecurity$outboundSchema: z.ZodType< AuthenticationListSigningKeysSecurity$Outbound, z.ZodTypeDef, AuthenticationListSigningKeysSecurity > = z.object({ apiKeyAuth: z.string(), }).transform((v) => { return remap$(v, { apiKeyAuth: "ApiKeyAuth", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AuthenticationListSigningKeysSecurity$ { /** @deprecated use `AuthenticationListSigningKeysSecurity$inboundSchema` instead. */ export const inboundSchema = AuthenticationListSigningKeysSecurity$inboundSchema; /** @deprecated use `AuthenticationListSigningKeysSecurity$outboundSchema` instead. */ export const outboundSchema = AuthenticationListSigningKeysSecurity$outboundSchema; /** @deprecated use `AuthenticationListSigningKeysSecurity$Outbound` instead. */ export type Outbound = AuthenticationListSigningKeysSecurity$Outbound; } export function authenticationListSigningKeysSecurityToJSON( authenticationListSigningKeysSecurity: AuthenticationListSigningKeysSecurity, ): string { return JSON.stringify( AuthenticationListSigningKeysSecurity$outboundSchema.parse( authenticationListSigningKeysSecurity, ), ); } export function authenticationListSigningKeysSecurityFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AuthenticationListSigningKeysSecurity$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AuthenticationListSigningKeysSecurity' from JSON`, ); } /** @internal */ export const AuthenticationListSigningKeysRequest$inboundSchema: z.ZodType< AuthenticationListSigningKeysRequest, z.ZodTypeDef, unknown > = z.object({ page_size: z.number().int().optional(), page_token: z.string().optional(), }).transform((v) => { return remap$(v, { "page_size": "pageSize", "page_token": "pageToken", }); }); /** @internal */ export type AuthenticationListSigningKeysRequest$Outbound = { page_size?: number | undefined; page_token?: string | undefined; }; /** @internal */ export const AuthenticationListSigningKeysRequest$outboundSchema: z.ZodType< AuthenticationListSigningKeysRequest$Outbound, z.ZodTypeDef, AuthenticationListSigningKeysRequest > = z.object({ pageSize: z.number().int().optional(), pageToken: z.string().optional(), }).transform((v) => { return remap$(v, { pageSize: "page_size", pageToken: "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 AuthenticationListSigningKeysRequest$ { /** @deprecated use `AuthenticationListSigningKeysRequest$inboundSchema` instead. */ export const inboundSchema = AuthenticationListSigningKeysRequest$inboundSchema; /** @deprecated use `AuthenticationListSigningKeysRequest$outboundSchema` instead. */ export const outboundSchema = AuthenticationListSigningKeysRequest$outboundSchema; /** @deprecated use `AuthenticationListSigningKeysRequest$Outbound` instead. */ export type Outbound = AuthenticationListSigningKeysRequest$Outbound; } export function authenticationListSigningKeysRequestToJSON( authenticationListSigningKeysRequest: AuthenticationListSigningKeysRequest, ): string { return JSON.stringify( AuthenticationListSigningKeysRequest$outboundSchema.parse( authenticationListSigningKeysRequest, ), ); } export function authenticationListSigningKeysRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AuthenticationListSigningKeysRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AuthenticationListSigningKeysRequest' from JSON`, ); } /** @internal */ export const AuthenticationListSigningKeysResponse$inboundSchema: z.ZodType< AuthenticationListSigningKeysResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: components.HTTPMetadata$inboundSchema, ListSigningKeysResponse: components.ListSigningKeysResponse$inboundSchema .optional(), Status: components.Status$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "ListSigningKeysResponse": "listSigningKeysResponse", "Status": "status", }); }); /** @internal */ export type AuthenticationListSigningKeysResponse$Outbound = { HttpMeta: components.HTTPMetadata$Outbound; ListSigningKeysResponse?: | components.ListSigningKeysResponse$Outbound | undefined; Status?: components.Status$Outbound | undefined; }; /** @internal */ export const AuthenticationListSigningKeysResponse$outboundSchema: z.ZodType< AuthenticationListSigningKeysResponse$Outbound, z.ZodTypeDef, AuthenticationListSigningKeysResponse > = z.object({ httpMeta: components.HTTPMetadata$outboundSchema, listSigningKeysResponse: components.ListSigningKeysResponse$outboundSchema .optional(), status: components.Status$outboundSchema.optional(), }).transform((v) => { return remap$(v, { httpMeta: "HttpMeta", listSigningKeysResponse: "ListSigningKeysResponse", status: "Status", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AuthenticationListSigningKeysResponse$ { /** @deprecated use `AuthenticationListSigningKeysResponse$inboundSchema` instead. */ export const inboundSchema = AuthenticationListSigningKeysResponse$inboundSchema; /** @deprecated use `AuthenticationListSigningKeysResponse$outboundSchema` instead. */ export const outboundSchema = AuthenticationListSigningKeysResponse$outboundSchema; /** @deprecated use `AuthenticationListSigningKeysResponse$Outbound` instead. */ export type Outbound = AuthenticationListSigningKeysResponse$Outbound; } export function authenticationListSigningKeysResponseToJSON( authenticationListSigningKeysResponse: AuthenticationListSigningKeysResponse, ): string { return JSON.stringify( AuthenticationListSigningKeysResponse$outboundSchema.parse( authenticationListSigningKeysResponse, ), ); } export function authenticationListSigningKeysResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AuthenticationListSigningKeysResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AuthenticationListSigningKeysResponse' from JSON`, ); }