/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 2332b938fac4 */ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { AuthenticationConfiguration, AuthenticationConfiguration$inboundSchema, } from "./authenticationconfiguration.js"; import { AuthenticationType, AuthenticationType$inboundSchema, } from "./authenticationtype.js"; export type CredentialsResponse = { credentials: Array; connectorPresetCredentialsForAuth?: Array | undefined; }; /** @internal */ export const CredentialsResponse$inboundSchema: z.ZodType< CredentialsResponse, unknown > = z.object({ credentials: z.array(AuthenticationConfiguration$inboundSchema), connector_preset_credentials_for_auth: z.array( AuthenticationType$inboundSchema, ).optional(), }).transform((v) => { return remap$(v, { "connector_preset_credentials_for_auth": "connectorPresetCredentialsForAuth", }); }); export function credentialsResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CredentialsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CredentialsResponse' from JSON`, ); }