/* * 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 * as shared from "../shared/index.js"; export type UnlinkConnectionUpdateConnection = { /** * The current authorization status of the data connection. */ status?: shared.DataConnectionStatus | undefined; }; export type UnlinkConnectionRequest = { /** * Unique identifier for a company. */ companyId: string; /** * Unique identifier for a connection. */ connectionId: string; requestBody?: UnlinkConnectionUpdateConnection | undefined; }; /** @internal */ export type UnlinkConnectionUpdateConnection$Outbound = { status?: string | undefined; }; /** @internal */ export const UnlinkConnectionUpdateConnection$outboundSchema: z.ZodType< UnlinkConnectionUpdateConnection$Outbound, z.ZodTypeDef, UnlinkConnectionUpdateConnection > = z.object({ status: shared.DataConnectionStatus$outboundSchema.optional(), }); export function unlinkConnectionUpdateConnectionToJSON( unlinkConnectionUpdateConnection: UnlinkConnectionUpdateConnection, ): string { return JSON.stringify( UnlinkConnectionUpdateConnection$outboundSchema.parse( unlinkConnectionUpdateConnection, ), ); } /** @internal */ export type UnlinkConnectionRequest$Outbound = { companyId: string; connectionId: string; RequestBody?: UnlinkConnectionUpdateConnection$Outbound | undefined; }; /** @internal */ export const UnlinkConnectionRequest$outboundSchema: z.ZodType< UnlinkConnectionRequest$Outbound, z.ZodTypeDef, UnlinkConnectionRequest > = z.object({ companyId: z.string(), connectionId: z.string(), requestBody: z.lazy(() => UnlinkConnectionUpdateConnection$outboundSchema) .optional(), }).transform((v) => { return remap$(v, { requestBody: "RequestBody", }); }); export function unlinkConnectionRequestToJSON( unlinkConnectionRequest: UnlinkConnectionRequest, ): string { return JSON.stringify( UnlinkConnectionRequest$outboundSchema.parse(unlinkConnectionRequest), ); }