UNPKG

@unkey/api

Version:

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

43 lines (38 loc) 1.55 kB
/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { Meta, Meta$inboundSchema } from "./meta.js"; import { V2IdentitiesCreateIdentityResponseData, V2IdentitiesCreateIdentityResponseData$inboundSchema, } from "./v2identitiescreateidentityresponsedata.js"; export type V2IdentitiesCreateIdentityResponseBody = { /** * Metadata object included in every API response. This provides context about the request and is essential for debugging, audit trails, and support inquiries. The `requestId` is particularly important when troubleshooting issues with the Unkey support team. */ meta: Meta; data: V2IdentitiesCreateIdentityResponseData; }; /** @internal */ export const V2IdentitiesCreateIdentityResponseBody$inboundSchema: z.ZodType< V2IdentitiesCreateIdentityResponseBody, z.ZodTypeDef, unknown > = z.object({ meta: Meta$inboundSchema, data: V2IdentitiesCreateIdentityResponseData$inboundSchema, }); export function v2IdentitiesCreateIdentityResponseBodyFromJSON( jsonString: string, ): SafeParseResult<V2IdentitiesCreateIdentityResponseBody, SDKValidationError> { return safeParse( jsonString, (x) => V2IdentitiesCreateIdentityResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'V2IdentitiesCreateIdentityResponseBody' from JSON`, ); }