/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 7994f20fa99d */ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; import { OAuth2ClientCredentialsInput, OAuth2ClientCredentialsInput$Outbound, OAuth2ClientCredentialsInput$outboundSchema, } from "./oauth2clientcredentialsinput.js"; export type ConnectionCredentialsInput = { oauth?: OAuth2ClientCredentialsInput | null | undefined; headers?: { [k: string]: string } | null | undefined; bearerToken?: string | null | undefined; }; /** @internal */ export type ConnectionCredentialsInput$Outbound = { oauth?: OAuth2ClientCredentialsInput$Outbound | null | undefined; headers?: { [k: string]: string } | null | undefined; bearer_token?: string | null | undefined; }; /** @internal */ export const ConnectionCredentialsInput$outboundSchema: z.ZodType< ConnectionCredentialsInput$Outbound, ConnectionCredentialsInput > = z.object({ oauth: z.nullable(OAuth2ClientCredentialsInput$outboundSchema).optional(), headers: z.nullable(z.record(z.string(), z.string())).optional(), bearerToken: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { bearerToken: "bearer_token", }); }); export function connectionCredentialsInputToJSON( connectionCredentialsInput: ConnectionCredentialsInput, ): string { return JSON.stringify( ConnectionCredentialsInput$outboundSchema.parse(connectionCredentialsInput), ); }