UNPKG

@unkey/api

Version:

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

40 lines (35 loc) 1.39 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 { Identity, Identity$inboundSchema } from "./identity.js"; import { Meta, Meta$inboundSchema } from "./meta.js"; export type V2IdentitiesUpdateIdentityResponseBody = { data: Identity; /** * 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; }; /** @internal */ export const V2IdentitiesUpdateIdentityResponseBody$inboundSchema: z.ZodType< V2IdentitiesUpdateIdentityResponseBody, z.ZodTypeDef, unknown > = z.object({ data: Identity$inboundSchema, meta: Meta$inboundSchema, }); export function v2IdentitiesUpdateIdentityResponseBodyFromJSON( jsonString: string, ): SafeParseResult<V2IdentitiesUpdateIdentityResponseBody, SDKValidationError> { return safeParse( jsonString, (x) => V2IdentitiesUpdateIdentityResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'V2IdentitiesUpdateIdentityResponseBody' from JSON`, ); }