/* * 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 V3BatchGetIdentitiesRequest = { /** * A client-generated unique ID for a specific session. This can be used to identify specific requests. The format of this ID is defined by the client - Prove recommends using a GUID, but any format can be accepted. Do not include Personally Identifiable Information (PII) in this field. */ clientRequestId?: string | undefined; /** * The maximum number of identities to return per call. Default value is 100. */ limit?: number | undefined; /** * The pagination token for the GET /v3/identity API. Use this to retrieve the next page of results after a previous call to GET /v3/identity. This token is returned as lastKey in the GET /v3/identity API response - pass it in directly as startKey to get the next page of results. */ startKey?: string | undefined; /** * Whether to show identities associated with the current client that are currently marked as inactive. Default value is false. */ showInactive?: boolean | undefined; }; export type V3BatchGetIdentitiesResponse = { httpMeta: components.HTTPMetadata; /** * V3BatchGetIdentitiesResponse */ v3BatchGetIdentitiesResponse?: | components.V3BatchGetIdentitiesResponse | undefined; }; /** @internal */ export const V3BatchGetIdentitiesRequest$inboundSchema: z.ZodType< V3BatchGetIdentitiesRequest, z.ZodTypeDef, unknown > = z.object({ clientRequestId: z.string().optional(), limit: z.number().int().optional(), startKey: z.string().optional(), showInactive: z.boolean().optional(), }); /** @internal */ export type V3BatchGetIdentitiesRequest$Outbound = { clientRequestId?: string | undefined; limit?: number | undefined; startKey?: string | undefined; showInactive?: boolean | undefined; }; /** @internal */ export const V3BatchGetIdentitiesRequest$outboundSchema: z.ZodType< V3BatchGetIdentitiesRequest$Outbound, z.ZodTypeDef, V3BatchGetIdentitiesRequest > = z.object({ clientRequestId: z.string().optional(), limit: z.number().int().optional(), startKey: z.string().optional(), showInactive: 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 namespace V3BatchGetIdentitiesRequest$ { /** @deprecated use `V3BatchGetIdentitiesRequest$inboundSchema` instead. */ export const inboundSchema = V3BatchGetIdentitiesRequest$inboundSchema; /** @deprecated use `V3BatchGetIdentitiesRequest$outboundSchema` instead. */ export const outboundSchema = V3BatchGetIdentitiesRequest$outboundSchema; /** @deprecated use `V3BatchGetIdentitiesRequest$Outbound` instead. */ export type Outbound = V3BatchGetIdentitiesRequest$Outbound; } export function v3BatchGetIdentitiesRequestToJSON( v3BatchGetIdentitiesRequest: V3BatchGetIdentitiesRequest, ): string { return JSON.stringify( V3BatchGetIdentitiesRequest$outboundSchema.parse( v3BatchGetIdentitiesRequest, ), ); } export function v3BatchGetIdentitiesRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => V3BatchGetIdentitiesRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'V3BatchGetIdentitiesRequest' from JSON`, ); } /** @internal */ export const V3BatchGetIdentitiesResponse$inboundSchema: z.ZodType< V3BatchGetIdentitiesResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: components.HTTPMetadata$inboundSchema, V3BatchGetIdentitiesResponse: components .V3BatchGetIdentitiesResponse$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "V3BatchGetIdentitiesResponse": "v3BatchGetIdentitiesResponse", }); }); /** @internal */ export type V3BatchGetIdentitiesResponse$Outbound = { HttpMeta: components.HTTPMetadata$Outbound; V3BatchGetIdentitiesResponse?: | components.V3BatchGetIdentitiesResponse$Outbound | undefined; }; /** @internal */ export const V3BatchGetIdentitiesResponse$outboundSchema: z.ZodType< V3BatchGetIdentitiesResponse$Outbound, z.ZodTypeDef, V3BatchGetIdentitiesResponse > = z.object({ httpMeta: components.HTTPMetadata$outboundSchema, v3BatchGetIdentitiesResponse: components .V3BatchGetIdentitiesResponse$outboundSchema.optional(), }).transform((v) => { return remap$(v, { httpMeta: "HttpMeta", v3BatchGetIdentitiesResponse: "V3BatchGetIdentitiesResponse", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace V3BatchGetIdentitiesResponse$ { /** @deprecated use `V3BatchGetIdentitiesResponse$inboundSchema` instead. */ export const inboundSchema = V3BatchGetIdentitiesResponse$inboundSchema; /** @deprecated use `V3BatchGetIdentitiesResponse$outboundSchema` instead. */ export const outboundSchema = V3BatchGetIdentitiesResponse$outboundSchema; /** @deprecated use `V3BatchGetIdentitiesResponse$Outbound` instead. */ export type Outbound = V3BatchGetIdentitiesResponse$Outbound; } export function v3BatchGetIdentitiesResponseToJSON( v3BatchGetIdentitiesResponse: V3BatchGetIdentitiesResponse, ): string { return JSON.stringify( V3BatchGetIdentitiesResponse$outboundSchema.parse( v3BatchGetIdentitiesResponse, ), ); } export function v3BatchGetIdentitiesResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => V3BatchGetIdentitiesResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'V3BatchGetIdentitiesResponse' from JSON`, ); }