/* * 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 VaultConnectionsAllGlobals = { /** * 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 VaultConnectionsAllRequest = { /** * 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; /** * Scope results to Unified API */ api?: string | undefined; /** * Scopes results to connections that have been configured or not */ configured?: boolean | undefined; }; export type VaultConnectionsAllResponse = { httpMeta: components.HTTPMetadata; /** * Connections */ getConnectionsResponse?: components.GetConnectionsResponse | undefined; /** * Unexpected error */ unexpectedErrorResponse?: components.UnexpectedErrorResponse | undefined; }; /** @internal */ export type VaultConnectionsAllRequest$Outbound = { consumerId?: string | undefined; appId?: string | undefined; api?: string | undefined; configured?: boolean | undefined; }; /** @internal */ export const VaultConnectionsAllRequest$outboundSchema: z.ZodType< VaultConnectionsAllRequest$Outbound, z.ZodTypeDef, VaultConnectionsAllRequest > = /* @__PURE__ */ lazySchema$(() => z.object({ consumerId: z.string().optional(), appId: z.string().optional(), api: z.string().optional(), configured: z.boolean().optional(), }) ); export function vaultConnectionsAllRequestToJSON( vaultConnectionsAllRequest: VaultConnectionsAllRequest, ): string { return JSON.stringify( VaultConnectionsAllRequest$outboundSchema.parse(vaultConnectionsAllRequest), ); } /** @internal */ export const VaultConnectionsAllResponse$inboundSchema: z.ZodType< VaultConnectionsAllResponse, z.ZodTypeDef, unknown > = /* @__PURE__ */ lazySchema$(() => z.object({ HttpMeta: components.HTTPMetadata$inboundSchema, GetConnectionsResponse: types.optional( components.GetConnectionsResponse$inboundSchema, ), UnexpectedErrorResponse: types.optional( components.UnexpectedErrorResponse$inboundSchema, ), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "GetConnectionsResponse": "getConnectionsResponse", "UnexpectedErrorResponse": "unexpectedErrorResponse", }); }) ); export function vaultConnectionsAllResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => VaultConnectionsAllResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'VaultConnectionsAllResponse' from JSON`, ); }