/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { lazySchema as lazySchema$, safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as types from "../../types/primitives.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type DeleteConsumerResponseData = { /** * Unique consumer identifier. You can freely choose a consumer ID yourself. Most of the time, this is an ID of your internal data model that represents a user or account in your system (for example account:12345). If the consumer doesn't exist yet, Vault will upsert a consumer based on your ID. */ consumerId?: string | undefined; }; /** * Consumer deleted */ export type DeleteConsumerResponse = { /** * HTTP Response Status Code */ statusCode: number; /** * HTTP Response Status */ status: string; data: DeleteConsumerResponseData; /** * Raw response from the integration when raw=true query param is provided */ raw?: { [k: string]: any } | null | undefined; }; /** @internal */ export const DeleteConsumerResponseData$inboundSchema: z.ZodType< DeleteConsumerResponseData, z.ZodTypeDef, unknown > = /* @__PURE__ */ lazySchema$(() => z.object({ consumer_id: types.optional(types.string()), }).transform((v) => { return remap$(v, { "consumer_id": "consumerId", }); }) ); export function deleteConsumerResponseDataFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeleteConsumerResponseData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteConsumerResponseData' from JSON`, ); } /** @internal */ export const DeleteConsumerResponse$inboundSchema: z.ZodType< DeleteConsumerResponse, z.ZodTypeDef, unknown > = /* @__PURE__ */ lazySchema$(() => z.object({ status_code: types.number(), status: types.string(), data: z.lazy(() => DeleteConsumerResponseData$inboundSchema), _raw: z.nullable(z.record(z.any())).optional(), }).transform((v) => { return remap$(v, { "status_code": "statusCode", "_raw": "raw", }); }) ); export function deleteConsumerResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeleteConsumerResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteConsumerResponse' from JSON`, ); }