/* * 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 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 = { /** * 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 const VaultConnectionsAllGlobals$inboundSchema: z.ZodType< VaultConnectionsAllGlobals, z.ZodTypeDef, unknown > = z.object({ consumerId: z.string().optional(), appId: z.string().optional(), }); /** @internal */ export type VaultConnectionsAllGlobals$Outbound = { consumerId?: string | undefined; appId?: string | undefined; }; /** @internal */ export const VaultConnectionsAllGlobals$outboundSchema: z.ZodType< VaultConnectionsAllGlobals$Outbound, z.ZodTypeDef, VaultConnectionsAllGlobals > = z.object({ consumerId: z.string().optional(), appId: z.string().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace VaultConnectionsAllGlobals$ { /** @deprecated use `VaultConnectionsAllGlobals$inboundSchema` instead. */ export const inboundSchema = VaultConnectionsAllGlobals$inboundSchema; /** @deprecated use `VaultConnectionsAllGlobals$outboundSchema` instead. */ export const outboundSchema = VaultConnectionsAllGlobals$outboundSchema; /** @deprecated use `VaultConnectionsAllGlobals$Outbound` instead. */ export type Outbound = VaultConnectionsAllGlobals$Outbound; } export function vaultConnectionsAllGlobalsToJSON( vaultConnectionsAllGlobals: VaultConnectionsAllGlobals, ): string { return JSON.stringify( VaultConnectionsAllGlobals$outboundSchema.parse(vaultConnectionsAllGlobals), ); } export function vaultConnectionsAllGlobalsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => VaultConnectionsAllGlobals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'VaultConnectionsAllGlobals' from JSON`, ); } /** @internal */ export const VaultConnectionsAllRequest$inboundSchema: z.ZodType< VaultConnectionsAllRequest, z.ZodTypeDef, unknown > = z.object({ api: z.string().optional(), configured: z.boolean().optional(), }); /** @internal */ export type VaultConnectionsAllRequest$Outbound = { api?: string | undefined; configured?: boolean | undefined; }; /** @internal */ export const VaultConnectionsAllRequest$outboundSchema: z.ZodType< VaultConnectionsAllRequest$Outbound, z.ZodTypeDef, VaultConnectionsAllRequest > = z.object({ api: z.string().optional(), configured: z.boolean().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace VaultConnectionsAllRequest$ { /** @deprecated use `VaultConnectionsAllRequest$inboundSchema` instead. */ export const inboundSchema = VaultConnectionsAllRequest$inboundSchema; /** @deprecated use `VaultConnectionsAllRequest$outboundSchema` instead. */ export const outboundSchema = VaultConnectionsAllRequest$outboundSchema; /** @deprecated use `VaultConnectionsAllRequest$Outbound` instead. */ export type Outbound = VaultConnectionsAllRequest$Outbound; } export function vaultConnectionsAllRequestToJSON( vaultConnectionsAllRequest: VaultConnectionsAllRequest, ): string { return JSON.stringify( VaultConnectionsAllRequest$outboundSchema.parse(vaultConnectionsAllRequest), ); } export function vaultConnectionsAllRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => VaultConnectionsAllRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'VaultConnectionsAllRequest' from JSON`, ); } /** @internal */ export const VaultConnectionsAllResponse$inboundSchema: z.ZodType< VaultConnectionsAllResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: components.HTTPMetadata$inboundSchema, GetConnectionsResponse: components.GetConnectionsResponse$inboundSchema .optional(), UnexpectedErrorResponse: components.UnexpectedErrorResponse$inboundSchema .optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "GetConnectionsResponse": "getConnectionsResponse", "UnexpectedErrorResponse": "unexpectedErrorResponse", }); }); /** @internal */ export type VaultConnectionsAllResponse$Outbound = { HttpMeta: components.HTTPMetadata$Outbound; GetConnectionsResponse?: | components.GetConnectionsResponse$Outbound | undefined; UnexpectedErrorResponse?: | components.UnexpectedErrorResponse$Outbound | undefined; }; /** @internal */ export const VaultConnectionsAllResponse$outboundSchema: z.ZodType< VaultConnectionsAllResponse$Outbound, z.ZodTypeDef, VaultConnectionsAllResponse > = z.object({ httpMeta: components.HTTPMetadata$outboundSchema, getConnectionsResponse: components.GetConnectionsResponse$outboundSchema .optional(), unexpectedErrorResponse: components.UnexpectedErrorResponse$outboundSchema .optional(), }).transform((v) => { return remap$(v, { httpMeta: "HttpMeta", getConnectionsResponse: "GetConnectionsResponse", unexpectedErrorResponse: "UnexpectedErrorResponse", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace VaultConnectionsAllResponse$ { /** @deprecated use `VaultConnectionsAllResponse$inboundSchema` instead. */ export const inboundSchema = VaultConnectionsAllResponse$inboundSchema; /** @deprecated use `VaultConnectionsAllResponse$outboundSchema` instead. */ export const outboundSchema = VaultConnectionsAllResponse$outboundSchema; /** @deprecated use `VaultConnectionsAllResponse$Outbound` instead. */ export type Outbound = VaultConnectionsAllResponse$Outbound; } export function vaultConnectionsAllResponseToJSON( vaultConnectionsAllResponse: VaultConnectionsAllResponse, ): string { return JSON.stringify( VaultConnectionsAllResponse$outboundSchema.parse( vaultConnectionsAllResponse, ), ); } export function vaultConnectionsAllResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => VaultConnectionsAllResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'VaultConnectionsAllResponse' from JSON`, ); }