"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.RetrieveToolResponseBodyMCPTool$inboundSchema = exports.RetrieveToolResponseBodyMcp$outboundSchema = exports.RetrieveToolResponseBodyMcp$inboundSchema = exports.RetrieveToolResponseBodyConnectionType$outboundSchema = exports.RetrieveToolResponseBodyConnectionType$inboundSchema = exports.RetrieveToolResponseBodyTools$outboundSchema = exports.RetrieveToolResponseBodyTools$inboundSchema = exports.RetrieveToolResponseBodyToolsSchema$outboundSchema = exports.RetrieveToolResponseBodyToolsSchema$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.RetrieveToolResponseBodyCodeExecutionTool$outboundSchema = exports.RetrieveToolResponseBodyCodeExecutionTool$inboundSchema = exports.RetrieveToolResponseBodyCodeTool$outboundSchema = exports.RetrieveToolResponseBodyCodeTool$inboundSchema = exports.RetrieveToolResponseBodyLanguage$outboundSchema = exports.RetrieveToolResponseBodyLanguage$inboundSchema = exports.RetrieveToolResponseBodyToolsParameters$outboundSchema = exports.RetrieveToolResponseBodyToolsParameters$inboundSchema = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson5Type$outboundSchema = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson5Type$inboundSchema = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJSONType$outboundSchema = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJSONType$inboundSchema = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus$outboundSchema = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus$inboundSchema = exports.RetrieveToolRequest$outboundSchema = exports.RetrieveToolRequest$inboundSchema = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson1Type = 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.RetrieveToolResponseBodyToolsResponse200ApplicationJson5Type = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJSONType = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus = void 0;
exports.RetrieveToolResponseBody$outboundSchema = exports.RetrieveToolResponseBody$inboundSchema = exports.RetrieveToolResponseBodyFunctionTool$outboundSchema = exports.RetrieveToolResponseBodyFunctionTool$inboundSchema = exports.RetrieveToolResponseBodyFunction$outboundSchema = exports.RetrieveToolResponseBodyFunction$inboundSchema = exports.RetrieveToolResponseBodyParameters$outboundSchema = exports.RetrieveToolResponseBodyParameters$inboundSchema = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson1Type$outboundSchema = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson1Type$inboundSchema = exports.RetrieveToolResponseBodyType$outboundSchema = exports.RetrieveToolResponseBodyType$inboundSchema = exports.RetrieveToolResponseBodyStatus$outboundSchema = exports.RetrieveToolResponseBodyStatus$inboundSchema = exports.RetrieveToolResponseBodyJSONSchemaTool$outboundSchema = exports.RetrieveToolResponseBodyJSONSchemaTool$inboundSchema = exports.RetrieveToolResponseBodyJsonSchema$outboundSchema = exports.RetrieveToolResponseBodyJsonSchema$inboundSchema = exports.RetrieveToolResponseBodySchema$outboundSchema = exports.RetrieveToolResponseBodySchema$inboundSchema = exports.RetrieveToolResponseBodyToolsType$outboundSchema = exports.RetrieveToolResponseBodyToolsType$inboundSchema = exports.RetrieveToolResponseBodyToolsStatus$outboundSchema = exports.RetrieveToolResponseBodyToolsStatus$inboundSchema = exports.RetrieveToolResponseBodyHTTPTool$outboundSchema = exports.RetrieveToolResponseBodyHTTPTool$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 = exports.RetrieveToolResponseBodyBlueprint$inboundSchema = exports.RetrieveToolResponseBodyToolsHeaders$outboundSchema = exports.RetrieveToolResponseBodyToolsHeaders$inboundSchema = exports.RetrieveToolHeaders2$outboundSchema = exports.RetrieveToolHeaders2$inboundSchema = exports.RetrieveToolResponseBodyMethod$outboundSchema = exports.RetrieveToolResponseBodyMethod$inboundSchema = exports.RetrieveToolResponseBodyToolsResponseType$outboundSchema = exports.RetrieveToolResponseBodyToolsResponseType$inboundSchema = exports.RetrieveToolResponseBodyToolsResponseStatus$outboundSchema = exports.RetrieveToolResponseBodyToolsResponseStatus$inboundSchema = exports.RetrieveToolResponseBodyMCPTool$outboundSchema = void 0;
exports.retrieveToolRequestToJSON = retrieveToolRequestToJSON;
exports.retrieveToolRequestFromJSON = retrieveToolRequestFromJSON;
exports.retrieveToolResponseBodyToolsParametersToJSON = retrieveToolResponseBodyToolsParametersToJSON;
exports.retrieveToolResponseBodyToolsParametersFromJSON = retrieveToolResponseBodyToolsParametersFromJSON;
exports.retrieveToolResponseBodyCodeToolToJSON = retrieveToolResponseBodyCodeToolToJSON;
exports.retrieveToolResponseBodyCodeToolFromJSON = retrieveToolResponseBodyCodeToolFromJSON;
exports.retrieveToolResponseBodyCodeExecutionToolToJSON = retrieveToolResponseBodyCodeExecutionToolToJSON;
exports.retrieveToolResponseBodyCodeExecutionToolFromJSON = retrieveToolResponseBodyCodeExecutionToolFromJSON;
exports.retrieveToolResponseBodyHeadersToJSON = retrieveToolResponseBodyHeadersToJSON;
exports.retrieveToolResponseBodyHeadersFromJSON = retrieveToolResponseBodyHeadersFromJSON;
exports.retrieveToolResponseBodyToolsSchemaToJSON = retrieveToolResponseBodyToolsSchemaToJSON;
exports.retrieveToolResponseBodyToolsSchemaFromJSON = retrieveToolResponseBodyToolsSchemaFromJSON;
exports.retrieveToolResponseBodyToolsToJSON = retrieveToolResponseBodyToolsToJSON;
exports.retrieveToolResponseBodyToolsFromJSON = retrieveToolResponseBodyToolsFromJSON;
exports.retrieveToolResponseBodyMcpToJSON = retrieveToolResponseBodyMcpToJSON;
exports.retrieveToolResponseBodyMcpFromJSON = retrieveToolResponseBodyMcpFromJSON;
exports.retrieveToolResponseBodyMCPToolToJSON = retrieveToolResponseBodyMCPToolToJSON;
exports.retrieveToolResponseBodyMCPToolFromJSON = retrieveToolResponseBodyMCPToolFromJSON;
exports.retrieveToolHeaders2ToJSON = retrieveToolHeaders2ToJSON;
exports.retrieveToolHeaders2FromJSON = retrieveToolHeaders2FromJSON;
exports.retrieveToolResponseBodyToolsHeadersToJSON = retrieveToolResponseBodyToolsHeadersToJSON;
exports.retrieveToolResponseBodyToolsHeadersFromJSON = retrieveToolResponseBodyToolsHeadersFromJSON;
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.retrieveToolResponseBodyHTTPToolToJSON = retrieveToolResponseBodyHTTPToolToJSON;
exports.retrieveToolResponseBodyHTTPToolFromJSON = retrieveToolResponseBodyHTTPToolFromJSON;
exports.retrieveToolResponseBodySchemaToJSON = retrieveToolResponseBodySchemaToJSON;
exports.retrieveToolResponseBodySchemaFromJSON = retrieveToolResponseBodySchemaFromJSON;
exports.retrieveToolResponseBodyJsonSchemaToJSON = retrieveToolResponseBodyJsonSchemaToJSON;
exports.retrieveToolResponseBodyJsonSchemaFromJSON = retrieveToolResponseBodyJsonSchemaFromJSON;
exports.retrieveToolResponseBodyJSONSchemaToolToJSON = retrieveToolResponseBodyJSONSchemaToolToJSON;
exports.retrieveToolResponseBodyJSONSchemaToolFromJSON = retrieveToolResponseBodyJSONSchemaToolFromJSON;
exports.retrieveToolResponseBodyParametersToJSON = retrieveToolResponseBodyParametersToJSON;
exports.retrieveToolResponseBodyParametersFromJSON = retrieveToolResponseBodyParametersFromJSON;
exports.retrieveToolResponseBodyFunctionToJSON = retrieveToolResponseBodyFunctionToJSON;
exports.retrieveToolResponseBodyFunctionFromJSON = retrieveToolResponseBodyFunctionFromJSON;
exports.retrieveToolResponseBodyFunctionToolToJSON = retrieveToolResponseBodyFunctionToolToJSON;
exports.retrieveToolResponseBodyFunctionToolFromJSON = retrieveToolResponseBodyFunctionToolFromJSON;
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",
};
/**
 * The type must be "object"
 */
exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson5Type = {
    Object: "object",
};
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",
};
/**
 * The type must be "object"
 */
exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson1Type = {
    Object: "object",
};
/** @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.RetrieveToolResponseBodyToolsResponse200ApplicationJson5Type$inboundSchema = z.nativeEnum(exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson5Type);
/** @internal */
exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson5Type$outboundSchema = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson5Type$inboundSchema;
/** @internal */
exports.RetrieveToolResponseBodyToolsParameters$inboundSchema = (0, schemas_js_1.collectExtraKeys)(z.object({
    type: exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson5Type$inboundSchema,
    properties: z.record(z.any()),
    required: z.array(z.string()),
}).catchall(z.any()), "additionalProperties", true);
/** @internal */
exports.RetrieveToolResponseBodyToolsParameters$outboundSchema = z.object({
    type: exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson5Type$outboundSchema,
    properties: z.record(z.any()),
    required: z.array(z.string()),
    additionalProperties: z.record(z.any()).optional(),
}).transform((v) => {
    return {
        ...v.additionalProperties,
        ...(0, primitives_js_1.remap)(v, {
            additionalProperties: null,
        }),
    };
});
function retrieveToolResponseBodyToolsParametersToJSON(retrieveToolResponseBodyToolsParameters) {
    return JSON.stringify(exports.RetrieveToolResponseBodyToolsParameters$outboundSchema.parse(retrieveToolResponseBodyToolsParameters));
}
function retrieveToolResponseBodyToolsParametersFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyToolsParameters$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyToolsParameters' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyLanguage$inboundSchema = z.nativeEnum(exports.RetrieveToolResponseBodyLanguage);
/** @internal */
exports.RetrieveToolResponseBodyLanguage$outboundSchema = exports.RetrieveToolResponseBodyLanguage$inboundSchema;
/** @internal */
exports.RetrieveToolResponseBodyCodeTool$inboundSchema = z.object({
    parameters: z.lazy(() => exports.RetrieveToolResponseBodyToolsParameters$inboundSchema).optional(),
    language: exports.RetrieveToolResponseBodyLanguage$inboundSchema,
    code: z.string(),
});
/** @internal */
exports.RetrieveToolResponseBodyCodeTool$outboundSchema = z.object({
    parameters: z.lazy(() => exports.RetrieveToolResponseBodyToolsParameters$outboundSchema).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.RetrieveToolResponseBodyCodeExecutionTool$inboundSchema = z.object({
    _id: z.string().default("tool_01KAXX9J8MHWMSJTSAWKQN3FQT"),
    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.RetrieveToolResponseBodyCodeExecutionTool$outboundSchema = z.object({
    id: z.string().default("tool_01KAXX9J8MHWMSJTSAWKQN3FQT"),
    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 retrieveToolResponseBodyCodeExecutionToolToJSON(retrieveToolResponseBodyCodeExecutionTool) {
    return JSON.stringify(exports.RetrieveToolResponseBodyCodeExecutionTool$outboundSchema.parse(retrieveToolResponseBodyCodeExecutionTool));
}
function retrieveToolResponseBodyCodeExecutionToolFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyCodeExecutionTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyCodeExecutionTool' 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.RetrieveToolResponseBodyToolsSchema$inboundSchema = z.object({
    type: exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema,
    properties: z.record(z.any()).optional(),
    required: z.array(z.string()).optional(),
});
/** @internal */
exports.RetrieveToolResponseBodyToolsSchema$outboundSchema = z.object({
    type: exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson4Type$outboundSchema,
    properties: z.record(z.any()).optional(),
    required: z.array(z.string()).optional(),
});
function retrieveToolResponseBodyToolsSchemaToJSON(retrieveToolResponseBodyToolsSchema) {
    return JSON.stringify(exports.RetrieveToolResponseBodyToolsSchema$outboundSchema.parse(retrieveToolResponseBodyToolsSchema));
}
function retrieveToolResponseBodyToolsSchemaFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyToolsSchema$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyToolsSchema' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyTools$inboundSchema = z.object({
    id: z.string().default("01KAXX9J8KZ336ZF5MX2QMWJ42"),
    name: z.string(),
    description: z.string().optional(),
    schema: z.lazy(() => exports.RetrieveToolResponseBodyToolsSchema$inboundSchema),
});
/** @internal */
exports.RetrieveToolResponseBodyTools$outboundSchema = z.object({
    id: z.string().default("01KAXX9J8KZ336ZF5MX2QMWJ42"),
    name: z.string(),
    description: z.string().optional(),
    schema: z.lazy(() => exports.RetrieveToolResponseBodyToolsSchema$outboundSchema),
});
function retrieveToolResponseBodyToolsToJSON(retrieveToolResponseBodyTools) {
    return JSON.stringify(exports.RetrieveToolResponseBodyTools$outboundSchema.parse(retrieveToolResponseBodyTools));
}
function retrieveToolResponseBodyToolsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyTools$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyTools' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyConnectionType$inboundSchema = z.nativeEnum(exports.RetrieveToolResponseBodyConnectionType);
/** @internal */
exports.RetrieveToolResponseBodyConnectionType$outboundSchema = exports.RetrieveToolResponseBodyConnectionType$inboundSchema;
/** @internal */
exports.RetrieveToolResponseBodyMcp$inboundSchema = z.object({
    server_url: z.string(),
    headers: z.record(z.lazy(() => exports.RetrieveToolResponseBodyHeaders$inboundSchema))
        .optional(),
    tools: z.array(z.lazy(() => exports.RetrieveToolResponseBodyTools$inboundSchema)),
    connection_type: exports.RetrieveToolResponseBodyConnectionType$inboundSchema,
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "server_url": "serverUrl",
        "connection_type": "connectionType",
    });
});
/** @internal */
exports.RetrieveToolResponseBodyMcp$outboundSchema = z.object({
    serverUrl: z.string(),
    headers: z.record(z.lazy(() => exports.RetrieveToolResponseBodyHeaders$outboundSchema)).optional(),
    tools: z.array(z.lazy(() => exports.RetrieveToolResponseBodyTools$outboundSchema)),
    connectionType: exports.RetrieveToolResponseBodyConnectionType$outboundSchema,
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        serverUrl: "server_url",
        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.RetrieveToolResponseBodyMCPTool$inboundSchema = z.object({
    _id: z.string().default("tool_01KAXX9J8JT30BN5KQX7Z35YBN"),
    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.RetrieveToolResponseBodyMCPTool$outboundSchema = z.object({
    id: z.string().default("tool_01KAXX9J8JT30BN5KQX7Z35YBN"),
    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 retrieveToolResponseBodyMCPToolToJSON(retrieveToolResponseBodyMCPTool) {
    return JSON.stringify(exports.RetrieveToolResponseBodyMCPTool$outboundSchema.parse(retrieveToolResponseBodyMCPTool));
}
function retrieveToolResponseBodyMCPToolFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyMCPTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyMCPTool' 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.RetrieveToolHeaders2$inboundSchema = z.object({
    value: z.string(),
    encrypted: z.boolean().default(false),
});
/** @internal */
exports.RetrieveToolHeaders2$outboundSchema = z.object({
    value: z.string(),
    encrypted: z.boolean().default(false),
});
function retrieveToolHeaders2ToJSON(retrieveToolHeaders2) {
    return JSON.stringify(exports.RetrieveToolHeaders2$outboundSchema.parse(retrieveToolHeaders2));
}
function retrieveToolHeaders2FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolHeaders2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolHeaders2' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyToolsHeaders$inboundSchema = z.union([z.lazy(() => exports.RetrieveToolHeaders2$inboundSchema), z.string()]);
/** @internal */
exports.RetrieveToolResponseBodyToolsHeaders$outboundSchema = z.union([z.lazy(() => exports.RetrieveToolHeaders2$outboundSchema), z.string()]);
function retrieveToolResponseBodyToolsHeadersToJSON(retrieveToolResponseBodyToolsHeaders) {
    return JSON.stringify(exports.RetrieveToolResponseBodyToolsHeaders$outboundSchema.parse(retrieveToolResponseBodyToolsHeaders));
}
function retrieveToolResponseBodyToolsHeadersFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyToolsHeaders$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyToolsHeaders' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyBlueprint$inboundSchema = z.object({
    url: z.string(),
    method: exports.RetrieveToolResponseBodyMethod$inboundSchema,
    headers: z.record(z.union([z.lazy(() => exports.RetrieveToolHeaders2$inboundSchema), 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.union([z.lazy(() => exports.RetrieveToolHeaders2$outboundSchema), 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.RetrieveToolResponseBodyHTTPTool$inboundSchema = z.object({
    _id: z.string().default("tool_01KAXX9J8G9PZPZ26DDA50ERAM"),
    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.RetrieveToolResponseBodyHTTPTool$outboundSchema = z.object({
    id: z.string().default("tool_01KAXX9J8G9PZPZ26DDA50ERAM"),
    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 retrieveToolResponseBodyHTTPToolToJSON(retrieveToolResponseBodyHTTPTool) {
    return JSON.stringify(exports.RetrieveToolResponseBodyHTTPTool$outboundSchema.parse(retrieveToolResponseBodyHTTPTool));
}
function retrieveToolResponseBodyHTTPToolFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyHTTPTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyHTTPTool' 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.RetrieveToolResponseBodySchema$inboundSchema = (0, schemas_js_1.collectExtraKeys)(z.object({
    type: z.string(),
    properties: z.record(z.any()),
    required: z.array(z.string()),
}).catchall(z.any()), "additionalProperties", true);
/** @internal */
exports.RetrieveToolResponseBodySchema$outboundSchema = z.object({
    type: z.string(),
    properties: z.record(z.any()),
    required: z.array(z.string()),
    additionalProperties: z.record(z.any()).optional(),
}).transform((v) => {
    return {
        ...v.additionalProperties,
        ...(0, primitives_js_1.remap)(v, {
            additionalProperties: null,
        }),
    };
});
function retrieveToolResponseBodySchemaToJSON(retrieveToolResponseBodySchema) {
    return JSON.stringify(exports.RetrieveToolResponseBodySchema$outboundSchema.parse(retrieveToolResponseBodySchema));
}
function retrieveToolResponseBodySchemaFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodySchema$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodySchema' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyJsonSchema$inboundSchema = z.object({
    name: z.string(),
    description: z.string(),
    schema: z.lazy(() => exports.RetrieveToolResponseBodySchema$inboundSchema),
    strict: z.boolean().optional(),
});
/** @internal */
exports.RetrieveToolResponseBodyJsonSchema$outboundSchema = z.object({
    name: z.string(),
    description: z.string(),
    schema: z.lazy(() => exports.RetrieveToolResponseBodySchema$outboundSchema),
    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.RetrieveToolResponseBodyJSONSchemaTool$inboundSchema = z.object({
    _id: z.string().default("tool_01KAXX9J8FE6VSDZHC9ZE9EPVJ"),
    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.RetrieveToolResponseBodyJSONSchemaTool$outboundSchema = z.object({
    id: z.string().default("tool_01KAXX9J8FE6VSDZHC9ZE9EPVJ"),
    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 retrieveToolResponseBodyJSONSchemaToolToJSON(retrieveToolResponseBodyJSONSchemaTool) {
    return JSON.stringify(exports.RetrieveToolResponseBodyJSONSchemaTool$outboundSchema.parse(retrieveToolResponseBodyJSONSchemaTool));
}
function retrieveToolResponseBodyJSONSchemaToolFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyJSONSchemaTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyJSONSchemaTool' 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.RetrieveToolResponseBodyToolsResponse200ApplicationJson1Type$inboundSchema = z.nativeEnum(exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson1Type);
/** @internal */
exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson1Type$outboundSchema = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson1Type$inboundSchema;
/** @internal */
exports.RetrieveToolResponseBodyParameters$inboundSchema = (0, schemas_js_1.collectExtraKeys)(z.object({
    type: exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson1Type$inboundSchema,
    properties: z.record(z.any()),
    required: z.array(z.string()),
}).catchall(z.any()), "additionalProperties", true);
/** @internal */
exports.RetrieveToolResponseBodyParameters$outboundSchema = z.object({
    type: exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson1Type$outboundSchema,
    properties: z.record(z.any()),
    required: z.array(z.string()),
    additionalProperties: z.record(z.any()).optional(),
}).transform((v) => {
    return {
        ...v.additionalProperties,
        ...(0, primitives_js_1.remap)(v, {
            additionalProperties: null,
        }),
    };
});
function retrieveToolResponseBodyParametersToJSON(retrieveToolResponseBodyParameters) {
    return JSON.stringify(exports.RetrieveToolResponseBodyParameters$outboundSchema.parse(retrieveToolResponseBodyParameters));
}
function retrieveToolResponseBodyParametersFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyParameters$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyParameters' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyFunction$inboundSchema = z.object({
    name: z.string(),
    description: z.string().optional(),
    strict: z.boolean().optional(),
    parameters: z.lazy(() => exports.RetrieveToolResponseBodyParameters$inboundSchema)
        .optional(),
});
/** @internal */
exports.RetrieveToolResponseBodyFunction$outboundSchema = z.object({
    name: z.string(),
    description: z.string().optional(),
    strict: z.boolean().optional(),
    parameters: z.lazy(() => exports.RetrieveToolResponseBodyParameters$outboundSchema)
        .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.RetrieveToolResponseBodyFunctionTool$inboundSchema = z.object({
    _id: z.string().default("tool_01KAXX9J8DKB7GZC0NSTFEQG8R"),
    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.RetrieveToolResponseBodyFunctionTool$outboundSchema = z.object({
    id: z.string().default("tool_01KAXX9J8DKB7GZC0NSTFEQG8R"),
    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 retrieveToolResponseBodyFunctionToolToJSON(retrieveToolResponseBodyFunctionTool) {
    return JSON.stringify(exports.RetrieveToolResponseBodyFunctionTool$outboundSchema.parse(retrieveToolResponseBodyFunctionTool));
}
function retrieveToolResponseBodyFunctionToolFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyFunctionTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyFunctionTool' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBody$inboundSchema = z.union([
    z.lazy(() => exports.RetrieveToolResponseBodyFunctionTool$inboundSchema),
    z.lazy(() => exports.RetrieveToolResponseBodyJSONSchemaTool$inboundSchema),
    z.lazy(() => exports.RetrieveToolResponseBodyHTTPTool$inboundSchema),
    z.lazy(() => exports.RetrieveToolResponseBodyMCPTool$inboundSchema),
    z.lazy(() => exports.RetrieveToolResponseBodyCodeExecutionTool$inboundSchema),
]);
/** @internal */
exports.RetrieveToolResponseBody$outboundSchema = z.union([
    z.lazy(() => exports.RetrieveToolResponseBodyFunctionTool$outboundSchema),
    z.lazy(() => exports.RetrieveToolResponseBodyJSONSchemaTool$outboundSchema),
    z.lazy(() => exports.RetrieveToolResponseBodyHTTPTool$outboundSchema),
    z.lazy(() => exports.RetrieveToolResponseBodyMCPTool$outboundSchema),
    z.lazy(() => exports.RetrieveToolResponseBodyCodeExecutionTool$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