/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as types from "../../types/primitives.js"; import { SDKValidationError } from "../errors/sdk-validation-error.js"; export type RevokeRequest = { keyId: string; }; /** * Revocation result. */ export type RevokeResponse = { success: boolean; keyId: string; }; /** @internal */ export type RevokeRequest$Outbound = { keyId: string; }; /** @internal */ export const RevokeRequest$outboundSchema: z.ZodMiniType< RevokeRequest$Outbound, RevokeRequest > = z.object({ keyId: z.string(), }); export function revokeRequestToJSON(revokeRequest: RevokeRequest): string { return JSON.stringify(RevokeRequest$outboundSchema.parse(revokeRequest)); } /** @internal */ export const RevokeResponse$inboundSchema: z.ZodMiniType< RevokeResponse, unknown > = z.object({ success: types.boolean(), keyId: types.string(), }); export function revokeResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => RevokeResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RevokeResponse' from JSON`, ); }