/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { GetBatchIdentityItem, GetBatchIdentityItem$inboundSchema, GetBatchIdentityItem$Outbound, GetBatchIdentityItem$outboundSchema, } from "./getbatchidentityitem.js"; /** * Response body for the V3 Batch Get Identities API. */ export type V3BatchGetIdentitiesResponse = { /** * A pagination token for callers that have more identities left to return. Pass this back in directly to the Get Batch API with the startKey query parameter to get the next page of results. */ lastKey?: string | undefined; /** * The list of identity IDs associated with the client. */ results: Array; }; /** @internal */ export const V3BatchGetIdentitiesResponse$inboundSchema: z.ZodType< V3BatchGetIdentitiesResponse, z.ZodTypeDef, unknown > = z.object({ lastKey: z.string().optional(), results: z.array(GetBatchIdentityItem$inboundSchema), }); /** @internal */ export type V3BatchGetIdentitiesResponse$Outbound = { lastKey?: string | undefined; results: Array; }; /** @internal */ export const V3BatchGetIdentitiesResponse$outboundSchema: z.ZodType< V3BatchGetIdentitiesResponse$Outbound, z.ZodTypeDef, V3BatchGetIdentitiesResponse > = z.object({ lastKey: z.string().optional(), results: z.array(GetBatchIdentityItem$outboundSchema), }); /** * @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`, ); }