@unkey/api
Version:
Developer-friendly & type-safe Typescript SDK specifically catered to leverage *@unkey/api* API.
35 lines • 2.11 kB
JavaScript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod";
import { safeParse } from "../../lib/schemas.js";
import { IdentitiesCreateIdentityResponseData$inboundSchema, IdentitiesCreateIdentityResponseData$outboundSchema, } from "./identitiescreateidentityresponsedata.js";
import { Meta$inboundSchema, Meta$outboundSchema, } from "./meta.js";
/** @internal */
export const V2IdentitiesCreateIdentityResponseBody$inboundSchema = z.object({
meta: Meta$inboundSchema,
data: IdentitiesCreateIdentityResponseData$inboundSchema,
});
/** @internal */
export const V2IdentitiesCreateIdentityResponseBody$outboundSchema = z.object({
meta: Meta$outboundSchema,
data: IdentitiesCreateIdentityResponseData$outboundSchema,
});
/**
* @internal
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
*/
export var V2IdentitiesCreateIdentityResponseBody$;
(function (V2IdentitiesCreateIdentityResponseBody$) {
/** @deprecated use `V2IdentitiesCreateIdentityResponseBody$inboundSchema` instead. */
V2IdentitiesCreateIdentityResponseBody$.inboundSchema = V2IdentitiesCreateIdentityResponseBody$inboundSchema;
/** @deprecated use `V2IdentitiesCreateIdentityResponseBody$outboundSchema` instead. */
V2IdentitiesCreateIdentityResponseBody$.outboundSchema = V2IdentitiesCreateIdentityResponseBody$outboundSchema;
})(V2IdentitiesCreateIdentityResponseBody$ || (V2IdentitiesCreateIdentityResponseBody$ = {}));
export function v2IdentitiesCreateIdentityResponseBodyToJSON(v2IdentitiesCreateIdentityResponseBody) {
return JSON.stringify(V2IdentitiesCreateIdentityResponseBody$outboundSchema.parse(v2IdentitiesCreateIdentityResponseBody));
}
export function v2IdentitiesCreateIdentityResponseBodyFromJSON(jsonString) {
return safeParse(jsonString, (x) => V2IdentitiesCreateIdentityResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'V2IdentitiesCreateIdentityResponseBody' from JSON`);
}
//# sourceMappingURL=v2identitiescreateidentityresponsebody.js.map