/* * 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 * as components from "../components/index.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type VaultConnectionsDeleteGlobals = { /** * ID of the consumer which you want to get or push data from */ consumerId?: string | undefined; /** * The ID of your Unify application */ appId?: string | undefined; }; export type VaultConnectionsDeleteRequest = { /** * ID of the consumer which you want to get or push data from */ consumerId?: string | undefined; /** * The ID of your Unify application */ appId?: string | undefined; /** * Service ID of the resource to return */ serviceId: string; /** * Unified API */ unifiedApi: string; }; export type VaultConnectionsDeleteResponse = { httpMeta: components.HTTPMetadata; /** * Unexpected error */ unexpectedErrorResponse?: components.UnexpectedErrorResponse | undefined; }; /** @internal */ export type VaultConnectionsDeleteRequest$Outbound = { consumerId?: string | undefined; appId?: string | undefined; service_id: string; unified_api: string; }; /** @internal */ export const VaultConnectionsDeleteRequest$outboundSchema: z.ZodType< VaultConnectionsDeleteRequest$Outbound, z.ZodTypeDef, VaultConnectionsDeleteRequest > = /* @__PURE__ */ lazySchema$(() => z.object({ consumerId: z.string().optional(), appId: z.string().optional(), serviceId: z.string(), unifiedApi: z.string(), }).transform((v) => { return remap$(v, { serviceId: "service_id", unifiedApi: "unified_api", }); }) ); export function vaultConnectionsDeleteRequestToJSON( vaultConnectionsDeleteRequest: VaultConnectionsDeleteRequest, ): string { return JSON.stringify( VaultConnectionsDeleteRequest$outboundSchema.parse( vaultConnectionsDeleteRequest, ), ); } /** @internal */ export const VaultConnectionsDeleteResponse$inboundSchema: z.ZodType< VaultConnectionsDeleteResponse, z.ZodTypeDef, unknown > = /* @__PURE__ */ lazySchema$(() => z.object({ HttpMeta: components.HTTPMetadata$inboundSchema, UnexpectedErrorResponse: types.optional( components.UnexpectedErrorResponse$inboundSchema, ), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "UnexpectedErrorResponse": "unexpectedErrorResponse", }); }) ); export function vaultConnectionsDeleteResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => VaultConnectionsDeleteResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'VaultConnectionsDeleteResponse' from JSON`, ); }