"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.RetrieveToolResponseBodyBlueprint$inboundSchema = exports.RetrieveToolResponseBodyMethod$outboundSchema = exports.RetrieveToolResponseBodyMethod$inboundSchema = exports.RetrieveToolResponseBodyToolsResponseType$outboundSchema = exports.RetrieveToolResponseBodyToolsResponseType$inboundSchema = exports.RetrieveToolResponseBodyToolsResponseStatus$outboundSchema = exports.RetrieveToolResponseBodyToolsResponseStatus$inboundSchema = exports.RetrieveToolResponseBody4$outboundSchema = exports.RetrieveToolResponseBody4$inboundSchema = exports.RetrieveToolResponseBodyMcp$outboundSchema = exports.RetrieveToolResponseBodyMcp$inboundSchema = exports.RetrieveToolResponseBodyConnectionType$outboundSchema = exports.RetrieveToolResponseBodyConnectionType$inboundSchema = exports.RetrieveToolResponseBodyInputSchema$outboundSchema = exports.RetrieveToolResponseBodyInputSchema$inboundSchema = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson4Type$outboundSchema = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema = exports.RetrieveToolResponseBodyHeaders$outboundSchema = exports.RetrieveToolResponseBodyHeaders$inboundSchema = exports.RetrieveToolResponseBodyToolsResponse200Type$outboundSchema = exports.RetrieveToolResponseBodyToolsResponse200Type$inboundSchema = exports.RetrieveToolResponseBodyToolsResponse200Status$outboundSchema = exports.RetrieveToolResponseBodyToolsResponse200Status$inboundSchema = exports.RetrieveToolResponseBody5$outboundSchema = exports.RetrieveToolResponseBody5$inboundSchema = exports.RetrieveToolResponseBodyCodeTool$outboundSchema = exports.RetrieveToolResponseBodyCodeTool$inboundSchema = exports.RetrieveToolResponseBodyLanguage$outboundSchema = exports.RetrieveToolResponseBodyLanguage$inboundSchema = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJSONType$outboundSchema = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJSONType$inboundSchema = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus$outboundSchema = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus$inboundSchema = exports.RetrieveToolRequest$outboundSchema = exports.RetrieveToolRequest$inboundSchema = exports.RetrieveToolResponseBodyType = exports.RetrieveToolResponseBodyStatus = exports.RetrieveToolResponseBodyToolsType = exports.RetrieveToolResponseBodyToolsStatus = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson3Type = exports.RetrieveToolResponseBodyMethod = exports.RetrieveToolResponseBodyToolsResponseType = exports.RetrieveToolResponseBodyToolsResponseStatus = exports.RetrieveToolResponseBodyConnectionType = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson4Type = exports.RetrieveToolResponseBodyToolsResponse200Type = exports.RetrieveToolResponseBodyToolsResponse200Status = exports.RetrieveToolResponseBodyLanguage = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJSONType = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus = void 0;
exports.RetrieveToolResponseBody$outboundSchema = exports.RetrieveToolResponseBody$inboundSchema = exports.RetrieveToolResponseBody1$outboundSchema = exports.RetrieveToolResponseBody1$inboundSchema = exports.RetrieveToolResponseBodyFunction$outboundSchema = exports.RetrieveToolResponseBodyFunction$inboundSchema = exports.RetrieveToolResponseBodyType$outboundSchema = exports.RetrieveToolResponseBodyType$inboundSchema = exports.RetrieveToolResponseBodyStatus$outboundSchema = exports.RetrieveToolResponseBodyStatus$inboundSchema = exports.RetrieveToolResponseBody2$outboundSchema = exports.RetrieveToolResponseBody2$inboundSchema = exports.RetrieveToolResponseBodyJsonSchema$outboundSchema = exports.RetrieveToolResponseBodyJsonSchema$inboundSchema = exports.RetrieveToolResponseBodyToolsType$outboundSchema = exports.RetrieveToolResponseBodyToolsType$inboundSchema = exports.RetrieveToolResponseBodyToolsStatus$outboundSchema = exports.RetrieveToolResponseBodyToolsStatus$inboundSchema = exports.RetrieveToolResponseBody3$outboundSchema = exports.RetrieveToolResponseBody3$inboundSchema = exports.RetrieveToolResponseBodyHttp$outboundSchema = exports.RetrieveToolResponseBodyHttp$inboundSchema = exports.RetrieveToolResponseBodyArguments$outboundSchema = exports.RetrieveToolResponseBodyArguments$inboundSchema = exports.RetrieveToolResponseBodyDefaultValue$outboundSchema = exports.RetrieveToolResponseBodyDefaultValue$inboundSchema = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson3Type$outboundSchema = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson3Type$inboundSchema = exports.RetrieveToolResponseBodyBlueprint$outboundSchema = void 0;
exports.retrieveToolRequestToJSON = retrieveToolRequestToJSON;
exports.retrieveToolRequestFromJSON = retrieveToolRequestFromJSON;
exports.retrieveToolResponseBodyCodeToolToJSON = retrieveToolResponseBodyCodeToolToJSON;
exports.retrieveToolResponseBodyCodeToolFromJSON = retrieveToolResponseBodyCodeToolFromJSON;
exports.retrieveToolResponseBody5ToJSON = retrieveToolResponseBody5ToJSON;
exports.retrieveToolResponseBody5FromJSON = retrieveToolResponseBody5FromJSON;
exports.retrieveToolResponseBodyHeadersToJSON = retrieveToolResponseBodyHeadersToJSON;
exports.retrieveToolResponseBodyHeadersFromJSON = retrieveToolResponseBodyHeadersFromJSON;
exports.retrieveToolResponseBodyInputSchemaToJSON = retrieveToolResponseBodyInputSchemaToJSON;
exports.retrieveToolResponseBodyInputSchemaFromJSON = retrieveToolResponseBodyInputSchemaFromJSON;
exports.retrieveToolResponseBodyMcpToJSON = retrieveToolResponseBodyMcpToJSON;
exports.retrieveToolResponseBodyMcpFromJSON = retrieveToolResponseBodyMcpFromJSON;
exports.retrieveToolResponseBody4ToJSON = retrieveToolResponseBody4ToJSON;
exports.retrieveToolResponseBody4FromJSON = retrieveToolResponseBody4FromJSON;
exports.retrieveToolResponseBodyBlueprintToJSON = retrieveToolResponseBodyBlueprintToJSON;
exports.retrieveToolResponseBodyBlueprintFromJSON = retrieveToolResponseBodyBlueprintFromJSON;
exports.retrieveToolResponseBodyDefaultValueToJSON = retrieveToolResponseBodyDefaultValueToJSON;
exports.retrieveToolResponseBodyDefaultValueFromJSON = retrieveToolResponseBodyDefaultValueFromJSON;
exports.retrieveToolResponseBodyArgumentsToJSON = retrieveToolResponseBodyArgumentsToJSON;
exports.retrieveToolResponseBodyArgumentsFromJSON = retrieveToolResponseBodyArgumentsFromJSON;
exports.retrieveToolResponseBodyHttpToJSON = retrieveToolResponseBodyHttpToJSON;
exports.retrieveToolResponseBodyHttpFromJSON = retrieveToolResponseBodyHttpFromJSON;
exports.retrieveToolResponseBody3ToJSON = retrieveToolResponseBody3ToJSON;
exports.retrieveToolResponseBody3FromJSON = retrieveToolResponseBody3FromJSON;
exports.retrieveToolResponseBodyJsonSchemaToJSON = retrieveToolResponseBodyJsonSchemaToJSON;
exports.retrieveToolResponseBodyJsonSchemaFromJSON = retrieveToolResponseBodyJsonSchemaFromJSON;
exports.retrieveToolResponseBody2ToJSON = retrieveToolResponseBody2ToJSON;
exports.retrieveToolResponseBody2FromJSON = retrieveToolResponseBody2FromJSON;
exports.retrieveToolResponseBodyFunctionToJSON = retrieveToolResponseBodyFunctionToJSON;
exports.retrieveToolResponseBodyFunctionFromJSON = retrieveToolResponseBodyFunctionFromJSON;
exports.retrieveToolResponseBody1ToJSON = retrieveToolResponseBody1ToJSON;
exports.retrieveToolResponseBody1FromJSON = retrieveToolResponseBody1FromJSON;
exports.retrieveToolResponseBodyToJSON = retrieveToolResponseBodyToJSON;
exports.retrieveToolResponseBodyFromJSON = retrieveToolResponseBodyFromJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
/**
 * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
 */
exports.RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus = {
    Live: "live",
    Draft: "draft",
    Pending: "pending",
    Published: "published",
};
exports.RetrieveToolResponseBodyToolsResponse200ApplicationJSONType = {
    Code: "code",
};
exports.RetrieveToolResponseBodyLanguage = {
    Python: "python",
};
/**
 * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
 */
exports.RetrieveToolResponseBodyToolsResponse200Status = {
    Live: "live",
    Draft: "draft",
    Pending: "pending",
    Published: "published",
};
exports.RetrieveToolResponseBodyToolsResponse200Type = {
    Mcp: "mcp",
};
exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson4Type = {
    Object: "object",
};
/**
 * The connection type used by the MCP server
 */
exports.RetrieveToolResponseBodyConnectionType = {
    Http: "http",
    Sse: "sse",
};
/**
 * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
 */
exports.RetrieveToolResponseBodyToolsResponseStatus = {
    Live: "live",
    Draft: "draft",
    Pending: "pending",
    Published: "published",
};
exports.RetrieveToolResponseBodyToolsResponseType = {
    Http: "http",
};
/**
 * The HTTP method to use.
 */
exports.RetrieveToolResponseBodyMethod = {
    Get: "GET",
    Post: "POST",
    Put: "PUT",
    Delete: "DELETE",
};
/**
 * The type of the argument.
 */
exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson3Type = {
    String: "string",
    Number: "number",
    Boolean: "boolean",
};
/**
 * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
 */
exports.RetrieveToolResponseBodyToolsStatus = {
    Live: "live",
    Draft: "draft",
    Pending: "pending",
    Published: "published",
};
exports.RetrieveToolResponseBodyToolsType = {
    JsonSchema: "json_schema",
};
/**
 * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
 */
exports.RetrieveToolResponseBodyStatus = {
    Live: "live",
    Draft: "draft",
    Pending: "pending",
    Published: "published",
};
exports.RetrieveToolResponseBodyType = {
    Function: "function",
};
/** @internal */
exports.RetrieveToolRequest$inboundSchema = z.object({
    tool_id: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "tool_id": "toolId",
    });
});
/** @internal */
exports.RetrieveToolRequest$outboundSchema = z.object({
    toolId: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        toolId: "tool_id",
    });
});
function retrieveToolRequestToJSON(retrieveToolRequest) {
    return JSON.stringify(exports.RetrieveToolRequest$outboundSchema.parse(retrieveToolRequest));
}
function retrieveToolRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolRequest' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus$inboundSchema = z.nativeEnum(exports.RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus);
/** @internal */
exports.RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus$outboundSchema = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus$inboundSchema;
/** @internal */
exports.RetrieveToolResponseBodyToolsResponse200ApplicationJSONType$inboundSchema = z.nativeEnum(exports.RetrieveToolResponseBodyToolsResponse200ApplicationJSONType);
/** @internal */
exports.RetrieveToolResponseBodyToolsResponse200ApplicationJSONType$outboundSchema = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJSONType$inboundSchema;
/** @internal */
exports.RetrieveToolResponseBodyLanguage$inboundSchema = z.nativeEnum(exports.RetrieveToolResponseBodyLanguage);
/** @internal */
exports.RetrieveToolResponseBodyLanguage$outboundSchema = exports.RetrieveToolResponseBodyLanguage$inboundSchema;
/** @internal */
exports.RetrieveToolResponseBodyCodeTool$inboundSchema = z.object({
    parameters: z.record(z.any()).optional(),
    language: exports.RetrieveToolResponseBodyLanguage$inboundSchema,
    code: z.string(),
});
/** @internal */
exports.RetrieveToolResponseBodyCodeTool$outboundSchema = z.object({
    parameters: z.record(z.any()).optional(),
    language: exports.RetrieveToolResponseBodyLanguage$outboundSchema,
    code: z.string(),
});
function retrieveToolResponseBodyCodeToolToJSON(retrieveToolResponseBodyCodeTool) {
    return JSON.stringify(exports.RetrieveToolResponseBodyCodeTool$outboundSchema.parse(retrieveToolResponseBodyCodeTool));
}
function retrieveToolResponseBodyCodeToolFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyCodeTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyCodeTool' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBody5$inboundSchema = z.object({
    _id: z.string().default("01K9QRS4YY146G5Q2PTTE10GRX"),
    path: z.string(),
    key: z.string(),
    display_name: z.string().optional(),
    description: z.string(),
    created_by_id: z.string().optional(),
    updated_by_id: z.string().optional(),
    project_id: z.string(),
    workspace_id: z.string(),
    created: z.string(),
    updated: z.string(),
    status: exports.RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus$inboundSchema
        .default("live"),
    version_hash: z.string().optional(),
    type: exports.RetrieveToolResponseBodyToolsResponse200ApplicationJSONType$inboundSchema,
    code_tool: z.lazy(() => exports.RetrieveToolResponseBodyCodeTool$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "_id": "id",
        "display_name": "displayName",
        "created_by_id": "createdById",
        "updated_by_id": "updatedById",
        "project_id": "projectId",
        "workspace_id": "workspaceId",
        "version_hash": "versionHash",
        "code_tool": "codeTool",
    });
});
/** @internal */
exports.RetrieveToolResponseBody5$outboundSchema = z.object({
    id: z.string().default("01K9QRS4YY146G5Q2PTTE10GRX"),
    path: z.string(),
    key: z.string(),
    displayName: z.string().optional(),
    description: z.string(),
    createdById: z.string().optional(),
    updatedById: z.string().optional(),
    projectId: z.string(),
    workspaceId: z.string(),
    created: z.string(),
    updated: z.string(),
    status: exports.RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus$outboundSchema
        .default("live"),
    versionHash: z.string().optional(),
    type: exports.RetrieveToolResponseBodyToolsResponse200ApplicationJSONType$outboundSchema,
    codeTool: z.lazy(() => exports.RetrieveToolResponseBodyCodeTool$outboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        id: "_id",
        displayName: "display_name",
        createdById: "created_by_id",
        updatedById: "updated_by_id",
        projectId: "project_id",
        workspaceId: "workspace_id",
        versionHash: "version_hash",
        codeTool: "code_tool",
    });
});
function retrieveToolResponseBody5ToJSON(retrieveToolResponseBody5) {
    return JSON.stringify(exports.RetrieveToolResponseBody5$outboundSchema.parse(retrieveToolResponseBody5));
}
function retrieveToolResponseBody5FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBody5$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBody5' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyToolsResponse200Status$inboundSchema = z
    .nativeEnum(exports.RetrieveToolResponseBodyToolsResponse200Status);
/** @internal */
exports.RetrieveToolResponseBodyToolsResponse200Status$outboundSchema = exports.RetrieveToolResponseBodyToolsResponse200Status$inboundSchema;
/** @internal */
exports.RetrieveToolResponseBodyToolsResponse200Type$inboundSchema = z
    .nativeEnum(exports.RetrieveToolResponseBodyToolsResponse200Type);
/** @internal */
exports.RetrieveToolResponseBodyToolsResponse200Type$outboundSchema = exports.RetrieveToolResponseBodyToolsResponse200Type$inboundSchema;
/** @internal */
exports.RetrieveToolResponseBodyHeaders$inboundSchema = z.object({
    value: z.string(),
    encrypted: z.boolean().default(false),
});
/** @internal */
exports.RetrieveToolResponseBodyHeaders$outboundSchema = z.object({
    value: z.string(),
    encrypted: z.boolean().default(false),
});
function retrieveToolResponseBodyHeadersToJSON(retrieveToolResponseBodyHeaders) {
    return JSON.stringify(exports.RetrieveToolResponseBodyHeaders$outboundSchema.parse(retrieveToolResponseBodyHeaders));
}
function retrieveToolResponseBodyHeadersFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyHeaders$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyHeaders' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema = z.nativeEnum(exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson4Type);
/** @internal */
exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson4Type$outboundSchema = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema;
/** @internal */
exports.RetrieveToolResponseBodyInputSchema$inboundSchema = z.object({
    type: exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema,
    properties: z.record(z.any()).optional(),
    required: z.array(z.string()).optional(),
});
/** @internal */
exports.RetrieveToolResponseBodyInputSchema$outboundSchema = z.object({
    type: exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson4Type$outboundSchema,
    properties: z.record(z.any()).optional(),
    required: z.array(z.string()).optional(),
});
function retrieveToolResponseBodyInputSchemaToJSON(retrieveToolResponseBodyInputSchema) {
    return JSON.stringify(exports.RetrieveToolResponseBodyInputSchema$outboundSchema.parse(retrieveToolResponseBodyInputSchema));
}
function retrieveToolResponseBodyInputSchemaFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyInputSchema$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyInputSchema' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyConnectionType$inboundSchema = z.nativeEnum(exports.RetrieveToolResponseBodyConnectionType);
/** @internal */
exports.RetrieveToolResponseBodyConnectionType$outboundSchema = exports.RetrieveToolResponseBodyConnectionType$inboundSchema;
/** @internal */
exports.RetrieveToolResponseBodyMcp$inboundSchema = z.object({
    server_id: z.string(),
    tool_name: z.string(),
    server_url: z.string(),
    headers: z.record(z.lazy(() => exports.RetrieveToolResponseBodyHeaders$inboundSchema))
        .optional(),
    input_schema: z.lazy(() => exports.RetrieveToolResponseBodyInputSchema$inboundSchema),
    connection_type: exports.RetrieveToolResponseBodyConnectionType$inboundSchema,
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "server_id": "serverId",
        "tool_name": "toolName",
        "server_url": "serverUrl",
        "input_schema": "inputSchema",
        "connection_type": "connectionType",
    });
});
/** @internal */
exports.RetrieveToolResponseBodyMcp$outboundSchema = z.object({
    serverId: z.string(),
    toolName: z.string(),
    serverUrl: z.string(),
    headers: z.record(z.lazy(() => exports.RetrieveToolResponseBodyHeaders$outboundSchema)).optional(),
    inputSchema: z.lazy(() => exports.RetrieveToolResponseBodyInputSchema$outboundSchema),
    connectionType: exports.RetrieveToolResponseBodyConnectionType$outboundSchema,
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        serverId: "server_id",
        toolName: "tool_name",
        serverUrl: "server_url",
        inputSchema: "input_schema",
        connectionType: "connection_type",
    });
});
function retrieveToolResponseBodyMcpToJSON(retrieveToolResponseBodyMcp) {
    return JSON.stringify(exports.RetrieveToolResponseBodyMcp$outboundSchema.parse(retrieveToolResponseBodyMcp));
}
function retrieveToolResponseBodyMcpFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyMcp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyMcp' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBody4$inboundSchema = z.object({
    _id: z.string().default("01K9QRS4YW6RR6SAAFVHRJ95HT"),
    path: z.string(),
    key: z.string(),
    display_name: z.string().optional(),
    description: z.string(),
    created_by_id: z.string().optional(),
    updated_by_id: z.string().optional(),
    project_id: z.string(),
    workspace_id: z.string(),
    created: z.string(),
    updated: z.string(),
    status: exports.RetrieveToolResponseBodyToolsResponse200Status$inboundSchema.default("live"),
    version_hash: z.string().optional(),
    type: exports.RetrieveToolResponseBodyToolsResponse200Type$inboundSchema,
    mcp: z.lazy(() => exports.RetrieveToolResponseBodyMcp$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "_id": "id",
        "display_name": "displayName",
        "created_by_id": "createdById",
        "updated_by_id": "updatedById",
        "project_id": "projectId",
        "workspace_id": "workspaceId",
        "version_hash": "versionHash",
    });
});
/** @internal */
exports.RetrieveToolResponseBody4$outboundSchema = z.object({
    id: z.string().default("01K9QRS4YW6RR6SAAFVHRJ95HT"),
    path: z.string(),
    key: z.string(),
    displayName: z.string().optional(),
    description: z.string(),
    createdById: z.string().optional(),
    updatedById: z.string().optional(),
    projectId: z.string(),
    workspaceId: z.string(),
    created: z.string(),
    updated: z.string(),
    status: exports.RetrieveToolResponseBodyToolsResponse200Status$outboundSchema.default("live"),
    versionHash: z.string().optional(),
    type: exports.RetrieveToolResponseBodyToolsResponse200Type$outboundSchema,
    mcp: z.lazy(() => exports.RetrieveToolResponseBodyMcp$outboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        id: "_id",
        displayName: "display_name",
        createdById: "created_by_id",
        updatedById: "updated_by_id",
        projectId: "project_id",
        workspaceId: "workspace_id",
        versionHash: "version_hash",
    });
});
function retrieveToolResponseBody4ToJSON(retrieveToolResponseBody4) {
    return JSON.stringify(exports.RetrieveToolResponseBody4$outboundSchema.parse(retrieveToolResponseBody4));
}
function retrieveToolResponseBody4FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBody4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBody4' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyToolsResponseStatus$inboundSchema = z
    .nativeEnum(exports.RetrieveToolResponseBodyToolsResponseStatus);
/** @internal */
exports.RetrieveToolResponseBodyToolsResponseStatus$outboundSchema = exports.RetrieveToolResponseBodyToolsResponseStatus$inboundSchema;
/** @internal */
exports.RetrieveToolResponseBodyToolsResponseType$inboundSchema = z
    .nativeEnum(exports.RetrieveToolResponseBodyToolsResponseType);
/** @internal */
exports.RetrieveToolResponseBodyToolsResponseType$outboundSchema = exports.RetrieveToolResponseBodyToolsResponseType$inboundSchema;
/** @internal */
exports.RetrieveToolResponseBodyMethod$inboundSchema = z.nativeEnum(exports.RetrieveToolResponseBodyMethod);
/** @internal */
exports.RetrieveToolResponseBodyMethod$outboundSchema = exports.RetrieveToolResponseBodyMethod$inboundSchema;
/** @internal */
exports.RetrieveToolResponseBodyBlueprint$inboundSchema = z.object({
    url: z.string(),
    method: exports.RetrieveToolResponseBodyMethod$inboundSchema,
    headers: z.record(z.string()).optional(),
    body: z.record(z.any()).optional(),
});
/** @internal */
exports.RetrieveToolResponseBodyBlueprint$outboundSchema = z.object({
    url: z.string(),
    method: exports.RetrieveToolResponseBodyMethod$outboundSchema,
    headers: z.record(z.string()).optional(),
    body: z.record(z.any()).optional(),
});
function retrieveToolResponseBodyBlueprintToJSON(retrieveToolResponseBodyBlueprint) {
    return JSON.stringify(exports.RetrieveToolResponseBodyBlueprint$outboundSchema.parse(retrieveToolResponseBodyBlueprint));
}
function retrieveToolResponseBodyBlueprintFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyBlueprint$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyBlueprint' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson3Type$inboundSchema = z.nativeEnum(exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson3Type);
/** @internal */
exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson3Type$outboundSchema = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson3Type$inboundSchema;
/** @internal */
exports.RetrieveToolResponseBodyDefaultValue$inboundSchema = z.union([z.string(), z.number(), z.boolean()]);
/** @internal */
exports.RetrieveToolResponseBodyDefaultValue$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function retrieveToolResponseBodyDefaultValueToJSON(retrieveToolResponseBodyDefaultValue) {
    return JSON.stringify(exports.RetrieveToolResponseBodyDefaultValue$outboundSchema.parse(retrieveToolResponseBodyDefaultValue));
}
function retrieveToolResponseBodyDefaultValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyDefaultValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyDefaultValue' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyArguments$inboundSchema = z.object({
    type: exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson3Type$inboundSchema,
    description: z.string(),
    send_to_model: z.boolean().default(true),
    default_value: z.union([z.string(), z.number(), z.boolean()]).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "send_to_model": "sendToModel",
        "default_value": "defaultValue",
    });
});
/** @internal */
exports.RetrieveToolResponseBodyArguments$outboundSchema = z.object({
    type: exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson3Type$outboundSchema,
    description: z.string(),
    sendToModel: z.boolean().default(true),
    defaultValue: z.union([z.string(), z.number(), z.boolean()]).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        sendToModel: "send_to_model",
        defaultValue: "default_value",
    });
});
function retrieveToolResponseBodyArgumentsToJSON(retrieveToolResponseBodyArguments) {
    return JSON.stringify(exports.RetrieveToolResponseBodyArguments$outboundSchema.parse(retrieveToolResponseBodyArguments));
}
function retrieveToolResponseBodyArgumentsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyArguments$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyArguments' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyHttp$inboundSchema = z.object({
    blueprint: z.lazy(() => exports.RetrieveToolResponseBodyBlueprint$inboundSchema),
    arguments: z.record(z.lazy(() => exports.RetrieveToolResponseBodyArguments$inboundSchema)).optional(),
});
/** @internal */
exports.RetrieveToolResponseBodyHttp$outboundSchema = z.object({
    blueprint: z.lazy(() => exports.RetrieveToolResponseBodyBlueprint$outboundSchema),
    arguments: z.record(z.lazy(() => exports.RetrieveToolResponseBodyArguments$outboundSchema)).optional(),
});
function retrieveToolResponseBodyHttpToJSON(retrieveToolResponseBodyHttp) {
    return JSON.stringify(exports.RetrieveToolResponseBodyHttp$outboundSchema.parse(retrieveToolResponseBodyHttp));
}
function retrieveToolResponseBodyHttpFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyHttp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyHttp' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBody3$inboundSchema = z.object({
    _id: z.string().default("01K9QRS4YVN0VQ9S0JM02SZR76"),
    path: z.string(),
    key: z.string(),
    display_name: z.string().optional(),
    description: z.string(),
    created_by_id: z.string().optional(),
    updated_by_id: z.string().optional(),
    project_id: z.string(),
    workspace_id: z.string(),
    created: z.string(),
    updated: z.string(),
    status: exports.RetrieveToolResponseBodyToolsResponseStatus$inboundSchema.default("live"),
    version_hash: z.string().optional(),
    type: exports.RetrieveToolResponseBodyToolsResponseType$inboundSchema,
    http: z.lazy(() => exports.RetrieveToolResponseBodyHttp$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "_id": "id",
        "display_name": "displayName",
        "created_by_id": "createdById",
        "updated_by_id": "updatedById",
        "project_id": "projectId",
        "workspace_id": "workspaceId",
        "version_hash": "versionHash",
    });
});
/** @internal */
exports.RetrieveToolResponseBody3$outboundSchema = z.object({
    id: z.string().default("01K9QRS4YVN0VQ9S0JM02SZR76"),
    path: z.string(),
    key: z.string(),
    displayName: z.string().optional(),
    description: z.string(),
    createdById: z.string().optional(),
    updatedById: z.string().optional(),
    projectId: z.string(),
    workspaceId: z.string(),
    created: z.string(),
    updated: z.string(),
    status: exports.RetrieveToolResponseBodyToolsResponseStatus$outboundSchema.default("live"),
    versionHash: z.string().optional(),
    type: exports.RetrieveToolResponseBodyToolsResponseType$outboundSchema,
    http: z.lazy(() => exports.RetrieveToolResponseBodyHttp$outboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        id: "_id",
        displayName: "display_name",
        createdById: "created_by_id",
        updatedById: "updated_by_id",
        projectId: "project_id",
        workspaceId: "workspace_id",
        versionHash: "version_hash",
    });
});
function retrieveToolResponseBody3ToJSON(retrieveToolResponseBody3) {
    return JSON.stringify(exports.RetrieveToolResponseBody3$outboundSchema.parse(retrieveToolResponseBody3));
}
function retrieveToolResponseBody3FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBody3$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBody3' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyToolsStatus$inboundSchema = z.nativeEnum(exports.RetrieveToolResponseBodyToolsStatus);
/** @internal */
exports.RetrieveToolResponseBodyToolsStatus$outboundSchema = exports.RetrieveToolResponseBodyToolsStatus$inboundSchema;
/** @internal */
exports.RetrieveToolResponseBodyToolsType$inboundSchema = z.nativeEnum(exports.RetrieveToolResponseBodyToolsType);
/** @internal */
exports.RetrieveToolResponseBodyToolsType$outboundSchema = exports.RetrieveToolResponseBodyToolsType$inboundSchema;
/** @internal */
exports.RetrieveToolResponseBodyJsonSchema$inboundSchema = z.object({
    name: z.string(),
    description: z.string().optional(),
    schema: z.record(z.any()),
    strict: z.boolean().optional(),
});
/** @internal */
exports.RetrieveToolResponseBodyJsonSchema$outboundSchema = z.object({
    name: z.string(),
    description: z.string().optional(),
    schema: z.record(z.any()),
    strict: z.boolean().optional(),
});
function retrieveToolResponseBodyJsonSchemaToJSON(retrieveToolResponseBodyJsonSchema) {
    return JSON.stringify(exports.RetrieveToolResponseBodyJsonSchema$outboundSchema.parse(retrieveToolResponseBodyJsonSchema));
}
function retrieveToolResponseBodyJsonSchemaFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyJsonSchema$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyJsonSchema' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBody2$inboundSchema = z.object({
    _id: z.string().default("01K9QRS4YSFF06RE78NAM3Z0QS"),
    path: z.string(),
    key: z.string(),
    display_name: z.string().optional(),
    description: z.string(),
    created_by_id: z.string().optional(),
    updated_by_id: z.string().optional(),
    project_id: z.string(),
    workspace_id: z.string(),
    created: z.string(),
    updated: z.string(),
    status: exports.RetrieveToolResponseBodyToolsStatus$inboundSchema.default("live"),
    version_hash: z.string().optional(),
    type: exports.RetrieveToolResponseBodyToolsType$inboundSchema,
    json_schema: z.lazy(() => exports.RetrieveToolResponseBodyJsonSchema$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "_id": "id",
        "display_name": "displayName",
        "created_by_id": "createdById",
        "updated_by_id": "updatedById",
        "project_id": "projectId",
        "workspace_id": "workspaceId",
        "version_hash": "versionHash",
        "json_schema": "jsonSchema",
    });
});
/** @internal */
exports.RetrieveToolResponseBody2$outboundSchema = z.object({
    id: z.string().default("01K9QRS4YSFF06RE78NAM3Z0QS"),
    path: z.string(),
    key: z.string(),
    displayName: z.string().optional(),
    description: z.string(),
    createdById: z.string().optional(),
    updatedById: z.string().optional(),
    projectId: z.string(),
    workspaceId: z.string(),
    created: z.string(),
    updated: z.string(),
    status: exports.RetrieveToolResponseBodyToolsStatus$outboundSchema.default("live"),
    versionHash: z.string().optional(),
    type: exports.RetrieveToolResponseBodyToolsType$outboundSchema,
    jsonSchema: z.lazy(() => exports.RetrieveToolResponseBodyJsonSchema$outboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        id: "_id",
        displayName: "display_name",
        createdById: "created_by_id",
        updatedById: "updated_by_id",
        projectId: "project_id",
        workspaceId: "workspace_id",
        versionHash: "version_hash",
        jsonSchema: "json_schema",
    });
});
function retrieveToolResponseBody2ToJSON(retrieveToolResponseBody2) {
    return JSON.stringify(exports.RetrieveToolResponseBody2$outboundSchema.parse(retrieveToolResponseBody2));
}
function retrieveToolResponseBody2FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBody2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBody2' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyStatus$inboundSchema = z.nativeEnum(exports.RetrieveToolResponseBodyStatus);
/** @internal */
exports.RetrieveToolResponseBodyStatus$outboundSchema = exports.RetrieveToolResponseBodyStatus$inboundSchema;
/** @internal */
exports.RetrieveToolResponseBodyType$inboundSchema = z.nativeEnum(exports.RetrieveToolResponseBodyType);
/** @internal */
exports.RetrieveToolResponseBodyType$outboundSchema = exports.RetrieveToolResponseBodyType$inboundSchema;
/** @internal */
exports.RetrieveToolResponseBodyFunction$inboundSchema = z.object({
    name: z.string(),
    description: z.string().optional(),
    strict: z.boolean().optional(),
    parameters: z.record(z.any()).optional(),
});
/** @internal */
exports.RetrieveToolResponseBodyFunction$outboundSchema = z.object({
    name: z.string(),
    description: z.string().optional(),
    strict: z.boolean().optional(),
    parameters: z.record(z.any()).optional(),
});
function retrieveToolResponseBodyFunctionToJSON(retrieveToolResponseBodyFunction) {
    return JSON.stringify(exports.RetrieveToolResponseBodyFunction$outboundSchema.parse(retrieveToolResponseBodyFunction));
}
function retrieveToolResponseBodyFunctionFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyFunction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyFunction' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBody1$inboundSchema = z.object({
    _id: z.string().default("01K9QRS4YR2SRQARBG49608M3R"),
    path: z.string(),
    key: z.string(),
    display_name: z.string().optional(),
    description: z.string(),
    created_by_id: z.string().optional(),
    updated_by_id: z.string().optional(),
    project_id: z.string(),
    workspace_id: z.string(),
    created: z.string(),
    updated: z.string(),
    status: exports.RetrieveToolResponseBodyStatus$inboundSchema.default("live"),
    version_hash: z.string().optional(),
    type: exports.RetrieveToolResponseBodyType$inboundSchema,
    function: z.lazy(() => exports.RetrieveToolResponseBodyFunction$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "_id": "id",
        "display_name": "displayName",
        "created_by_id": "createdById",
        "updated_by_id": "updatedById",
        "project_id": "projectId",
        "workspace_id": "workspaceId",
        "version_hash": "versionHash",
    });
});
/** @internal */
exports.RetrieveToolResponseBody1$outboundSchema = z.object({
    id: z.string().default("01K9QRS4YR2SRQARBG49608M3R"),
    path: z.string(),
    key: z.string(),
    displayName: z.string().optional(),
    description: z.string(),
    createdById: z.string().optional(),
    updatedById: z.string().optional(),
    projectId: z.string(),
    workspaceId: z.string(),
    created: z.string(),
    updated: z.string(),
    status: exports.RetrieveToolResponseBodyStatus$outboundSchema.default("live"),
    versionHash: z.string().optional(),
    type: exports.RetrieveToolResponseBodyType$outboundSchema,
    function: z.lazy(() => exports.RetrieveToolResponseBodyFunction$outboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        id: "_id",
        displayName: "display_name",
        createdById: "created_by_id",
        updatedById: "updated_by_id",
        projectId: "project_id",
        workspaceId: "workspace_id",
        versionHash: "version_hash",
    });
});
function retrieveToolResponseBody1ToJSON(retrieveToolResponseBody1) {
    return JSON.stringify(exports.RetrieveToolResponseBody1$outboundSchema.parse(retrieveToolResponseBody1));
}
function retrieveToolResponseBody1FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBody1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBody1' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBody$inboundSchema = z.union([
    z.lazy(() => exports.RetrieveToolResponseBody1$inboundSchema),
    z.lazy(() => exports.RetrieveToolResponseBody2$inboundSchema),
    z.lazy(() => exports.RetrieveToolResponseBody3$inboundSchema),
    z.lazy(() => exports.RetrieveToolResponseBody4$inboundSchema),
    z.lazy(() => exports.RetrieveToolResponseBody5$inboundSchema),
]);
/** @internal */
exports.RetrieveToolResponseBody$outboundSchema = z.union([
    z.lazy(() => exports.RetrieveToolResponseBody1$outboundSchema),
    z.lazy(() => exports.RetrieveToolResponseBody2$outboundSchema),
    z.lazy(() => exports.RetrieveToolResponseBody3$outboundSchema),
    z.lazy(() => exports.RetrieveToolResponseBody4$outboundSchema),
    z.lazy(() => exports.RetrieveToolResponseBody5$outboundSchema),
]);
function retrieveToolResponseBodyToJSON(retrieveToolResponseBody) {
    return JSON.stringify(exports.RetrieveToolResponseBody$outboundSchema.parse(retrieveToolResponseBody));
}
function retrieveToolResponseBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBody' from JSON`);
}
//# sourceMappingURL=retrievetool.js.map