/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: a3c3f908ad8a
 */
import * as z from "zod/v4";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
import { AuthenticationConfiguration$inboundSchema, } from "./authenticationconfiguration.js";
import { ConnectionPreference$inboundSchema, } from "./connectionpreference.js";
import { ConnectorLocale$inboundSchema, } from "./connectorlocale.js";
import { ConnectorProtocol$inboundSchema, } from "./connectorprotocol.js";
import { ConnectorTool$inboundSchema } from "./connectortool.js";
import { MCPServerCard$inboundSchema } from "./mcpservercard.js";
import { PublicAuthenticationMethod$inboundSchema, } from "./publicauthenticationmethod.js";
import { PublicConnectionConfig$inboundSchema, } from "./publicconnectionconfig.js";
import { ResourceType$inboundSchema } from "./resourcetype.js";
import { ResourceVisibility$inboundSchema, } from "./resourcevisibility.js";
/** @internal */
export const Connector$inboundSchema = z.object({
    id: z.string(),
    name: z.string(),
    title: z.nullable(z.string()).optional(),
    description: z.string(),
    created_at: z.iso.datetime({ offset: true }).transform(v => new Date(v)),
    modified_at: z.iso.datetime({ offset: true }).transform(v => new Date(v)),
    server: z.nullable(z.string()).optional(),
    protocol: ConnectorProtocol$inboundSchema.optional(),
    icon_url: z.nullable(z.string()).optional(),
    server_card: z.nullable(MCPServerCard$inboundSchema).optional(),
    owner_id: z.nullable(z.string()).optional(),
    owner_type: ResourceType$inboundSchema,
    visibility: ResourceVisibility$inboundSchema,
    locale: z.nullable(ConnectorLocale$inboundSchema).optional(),
    system_prompt: z.nullable(z.string()).optional(),
    supported_auth_methods: z.nullable(z.array(PublicAuthenticationMethod$inboundSchema)).optional(),
    connection_preferences: z.nullable(z.array(ConnectionPreference$inboundSchema)).optional(),
    connection_credentials: z.nullable(z.array(AuthenticationConfiguration$inboundSchema)).optional(),
    active: z.nullable(z.boolean()).optional(),
    private_tool_execution: z.boolean(),
    mistral: z.boolean().default(false),
    is_authenticated: z.nullable(z.boolean()).optional(),
    tools: z.nullable(z.array(ConnectorTool$inboundSchema)).optional(),
    system_prompt_route: z.nullable(z.string()).optional(),
    connection_config: z.nullable(PublicConnectionConfig$inboundSchema)
        .optional(),
}).transform((v) => {
    return remap$(v, {
        "created_at": "createdAt",
        "modified_at": "modifiedAt",
        "icon_url": "iconUrl",
        "server_card": "serverCard",
        "owner_id": "ownerId",
        "owner_type": "ownerType",
        "system_prompt": "systemPrompt",
        "supported_auth_methods": "supportedAuthMethods",
        "connection_preferences": "connectionPreferences",
        "connection_credentials": "connectionCredentials",
        "private_tool_execution": "privateToolExecution",
        "is_authenticated": "isAuthenticated",
        "system_prompt_route": "systemPromptRoute",
        "connection_config": "connectionConfig",
    });
});
export function connectorFromJSON(jsonString) {
    return safeParse(jsonString, (x) => Connector$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Connector' from JSON`);
}
//# sourceMappingURL=connector.js.map