/* * 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 V3DeviceRevokeRequestResponse = { httpMeta: components.HTTPMetadata; /** * Successful Request. */ v3DeviceRevokeResponse?: components.V3DeviceRevokeResponse | undefined; headers: { [k: string]: Array }; }; /** @internal */ export const V3DeviceRevokeRequestResponse$inboundSchema: z.ZodType< V3DeviceRevokeRequestResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: components.HTTPMetadata$inboundSchema, V3DeviceRevokeResponse: components.V3DeviceRevokeResponse$inboundSchema .optional(), Headers: z.record(z.array(z.string())), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "V3DeviceRevokeResponse": "v3DeviceRevokeResponse", "Headers": "headers", }); }); /** @internal */ export type V3DeviceRevokeRequestResponse$Outbound = { HttpMeta: components.HTTPMetadata$Outbound; V3DeviceRevokeResponse?: | components.V3DeviceRevokeResponse$Outbound | undefined; Headers: { [k: string]: Array }; }; /** @internal */ export const V3DeviceRevokeRequestResponse$outboundSchema: z.ZodType< V3DeviceRevokeRequestResponse$Outbound, z.ZodTypeDef, V3DeviceRevokeRequestResponse > = z.object({ httpMeta: components.HTTPMetadata$outboundSchema, v3DeviceRevokeResponse: components.V3DeviceRevokeResponse$outboundSchema .optional(), headers: z.record(z.array(z.string())), }).transform((v) => { return remap$(v, { httpMeta: "HttpMeta", v3DeviceRevokeResponse: "V3DeviceRevokeResponse", headers: "Headers", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace V3DeviceRevokeRequestResponse$ { /** @deprecated use `V3DeviceRevokeRequestResponse$inboundSchema` instead. */ export const inboundSchema = V3DeviceRevokeRequestResponse$inboundSchema; /** @deprecated use `V3DeviceRevokeRequestResponse$outboundSchema` instead. */ export const outboundSchema = V3DeviceRevokeRequestResponse$outboundSchema; /** @deprecated use `V3DeviceRevokeRequestResponse$Outbound` instead. */ export type Outbound = V3DeviceRevokeRequestResponse$Outbound; } export function v3DeviceRevokeRequestResponseToJSON( v3DeviceRevokeRequestResponse: V3DeviceRevokeRequestResponse, ): string { return JSON.stringify( V3DeviceRevokeRequestResponse$outboundSchema.parse( v3DeviceRevokeRequestResponse, ), ); } export function v3DeviceRevokeRequestResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => V3DeviceRevokeRequestResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'V3DeviceRevokeRequestResponse' from JSON`, ); }