"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.CreateToolRequestBodyToolsRequest4Type$inboundSchema = exports.CreateToolRequestBodyToolsStatus$outboundSchema = exports.CreateToolRequestBodyToolsStatus$inboundSchema = exports.RequestBodyCodeExecutionTool$outboundSchema = exports.RequestBodyCodeExecutionTool$inboundSchema = exports.RequestBodyCodeTool$outboundSchema = exports.RequestBodyCodeTool$inboundSchema = exports.RequestBodyLanguage$outboundSchema = exports.RequestBodyLanguage$inboundSchema = exports.CreateToolRequestBodyParameters$outboundSchema = exports.CreateToolRequestBodyParameters$inboundSchema = exports.CreateToolRequestBodyToolsRequest5CodeToolType$outboundSchema = exports.CreateToolRequestBodyToolsRequest5CodeToolType$inboundSchema = exports.CreateToolRequestBodyToolsRequest5Type$outboundSchema = exports.CreateToolRequestBodyToolsRequest5Type$inboundSchema = exports.CreateToolRequestBodyToolsRequestStatus$outboundSchema = exports.CreateToolRequestBodyToolsRequestStatus$inboundSchema = exports.CreateToolResponseBodyToolsResponse200ApplicationJson1Type = exports.CreateToolResponseBodyType = exports.ResponseBodyStatus = exports.CreateToolResponseBodyToolsType = exports.CreateToolResponseBodyStatus = exports.CreateToolResponseBodyToolsResponse200ApplicationJson3Type = exports.CreateToolResponseBodyMethod = exports.CreateToolResponseBodyToolsResponseType = exports.CreateToolResponseBodyToolsStatus = exports.ResponseBodyConnectionType = exports.CreateToolResponseBodyToolsResponse200ApplicationJson4Type = exports.CreateToolResponseBodyToolsResponse200Type = exports.CreateToolResponseBodyToolsResponseStatus = exports.ResponseBodyLanguage = exports.CreateToolResponseBodyToolsResponse200ApplicationJson5Type = exports.CreateToolResponseBodyToolsResponse200ApplicationJSONType = exports.CreateToolResponseBodyToolsResponse200Status = exports.CreateToolRequestBodyToolsRequest1Type = exports.CreateToolRequestBodyType = exports.CreateToolRequestBodyToolsRequest1Status = exports.CreateToolRequestBodyToolsType = exports.RequestBodyStatus = exports.CreateToolRequestBodyToolsRequest3Type = exports.CreateToolRequestBodyMethod = exports.CreateToolRequestBodyToolsRequestType = exports.CreateToolRequestBodyStatus = exports.RequestBodyConnectionType = exports.CreateToolRequestBodyToolsRequest4Type = exports.CreateToolRequestBodyToolsStatus = exports.RequestBodyLanguage = exports.CreateToolRequestBodyToolsRequest5CodeToolType = exports.CreateToolRequestBodyToolsRequest5Type = exports.CreateToolRequestBodyToolsRequestStatus = void 0;
exports.RequestBodyFunction$inboundSchema = exports.RequestBodyParameters$outboundSchema = exports.RequestBodyParameters$inboundSchema = exports.CreateToolRequestBodyToolsRequest1Type$outboundSchema = exports.CreateToolRequestBodyToolsRequest1Type$inboundSchema = exports.CreateToolRequestBodyType$outboundSchema = exports.CreateToolRequestBodyType$inboundSchema = exports.CreateToolRequestBodyToolsRequest1Status$outboundSchema = exports.CreateToolRequestBodyToolsRequest1Status$inboundSchema = exports.JSONSchemaTool$outboundSchema = exports.JSONSchemaTool$inboundSchema = exports.RequestBodyJsonSchema$outboundSchema = exports.RequestBodyJsonSchema$inboundSchema = exports.RequestBodySchema$outboundSchema = exports.RequestBodySchema$inboundSchema = exports.CreateToolRequestBodyToolsType$outboundSchema = exports.CreateToolRequestBodyToolsType$inboundSchema = exports.RequestBodyStatus$outboundSchema = exports.RequestBodyStatus$inboundSchema = exports.RequestBodyHTTPTool$outboundSchema = exports.RequestBodyHTTPTool$inboundSchema = exports.CreateToolRequestBodyHttp$outboundSchema = exports.CreateToolRequestBodyHttp$inboundSchema = exports.RequestBodyArguments$outboundSchema = exports.RequestBodyArguments$inboundSchema = exports.RequestBodyDefaultValue$outboundSchema = exports.RequestBodyDefaultValue$inboundSchema = exports.CreateToolRequestBodyToolsRequest3Type$outboundSchema = exports.CreateToolRequestBodyToolsRequest3Type$inboundSchema = exports.RequestBodyBlueprint$outboundSchema = exports.RequestBodyBlueprint$inboundSchema = exports.CreateToolRequestBodyHeaders$outboundSchema = exports.CreateToolRequestBodyHeaders$inboundSchema = exports.CreateToolHeaders2$outboundSchema = exports.CreateToolHeaders2$inboundSchema = exports.CreateToolRequestBodyMethod$outboundSchema = exports.CreateToolRequestBodyMethod$inboundSchema = exports.CreateToolRequestBodyToolsRequestType$outboundSchema = exports.CreateToolRequestBodyToolsRequestType$inboundSchema = exports.CreateToolRequestBodyStatus$outboundSchema = exports.CreateToolRequestBodyStatus$inboundSchema = exports.RequestBodyMCPTool$outboundSchema = exports.RequestBodyMCPTool$inboundSchema = exports.RequestBodyMcp$outboundSchema = exports.RequestBodyMcp$inboundSchema = exports.RequestBodyConnectionType$outboundSchema = exports.RequestBodyConnectionType$inboundSchema = exports.RequestBodyHeaders$outboundSchema = exports.RequestBodyHeaders$inboundSchema = exports.CreateToolRequestBodyToolsRequest4Type$outboundSchema = void 0;
exports.CreateToolResponseBodyToolsResponse200ApplicationJson3Type$inboundSchema = exports.ResponseBodyBlueprint$outboundSchema = exports.ResponseBodyBlueprint$inboundSchema = exports.CreateToolResponseBodyHeaders$outboundSchema = exports.CreateToolResponseBodyHeaders$inboundSchema = exports.CreateToolHeadersTools2$outboundSchema = exports.CreateToolHeadersTools2$inboundSchema = exports.CreateToolResponseBodyMethod$outboundSchema = exports.CreateToolResponseBodyMethod$inboundSchema = exports.CreateToolResponseBodyToolsResponseType$outboundSchema = exports.CreateToolResponseBodyToolsResponseType$inboundSchema = exports.CreateToolResponseBodyToolsStatus$outboundSchema = exports.CreateToolResponseBodyToolsStatus$inboundSchema = exports.ResponseBodyMCPTool$outboundSchema = exports.ResponseBodyMCPTool$inboundSchema = exports.ResponseBodyMcp$outboundSchema = exports.ResponseBodyMcp$inboundSchema = exports.ResponseBodyConnectionType$outboundSchema = exports.ResponseBodyConnectionType$inboundSchema = exports.ResponseBodyTools$outboundSchema = exports.ResponseBodyTools$inboundSchema = exports.CreateToolResponseBodySchema$outboundSchema = exports.CreateToolResponseBodySchema$inboundSchema = exports.CreateToolResponseBodyToolsResponse200ApplicationJson4Type$outboundSchema = exports.CreateToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema = exports.ResponseBodyHeaders$outboundSchema = exports.ResponseBodyHeaders$inboundSchema = exports.CreateToolResponseBodyToolsResponse200Type$outboundSchema = exports.CreateToolResponseBodyToolsResponse200Type$inboundSchema = exports.CreateToolResponseBodyToolsResponseStatus$outboundSchema = exports.CreateToolResponseBodyToolsResponseStatus$inboundSchema = exports.ResponseBodyCodeExecutionTool$outboundSchema = exports.ResponseBodyCodeExecutionTool$inboundSchema = exports.ResponseBodyCodeTool$outboundSchema = exports.ResponseBodyCodeTool$inboundSchema = exports.ResponseBodyLanguage$outboundSchema = exports.ResponseBodyLanguage$inboundSchema = exports.CreateToolResponseBodyParameters$outboundSchema = exports.CreateToolResponseBodyParameters$inboundSchema = exports.CreateToolResponseBodyToolsResponse200ApplicationJson5Type$outboundSchema = exports.CreateToolResponseBodyToolsResponse200ApplicationJson5Type$inboundSchema = exports.CreateToolResponseBodyToolsResponse200ApplicationJSONType$outboundSchema = exports.CreateToolResponseBodyToolsResponse200ApplicationJSONType$inboundSchema = exports.CreateToolResponseBodyToolsResponse200Status$outboundSchema = exports.CreateToolResponseBodyToolsResponse200Status$inboundSchema = exports.CreateToolRequestBody$outboundSchema = exports.CreateToolRequestBody$inboundSchema = exports.RequestBodyFunctionTool$outboundSchema = exports.RequestBodyFunctionTool$inboundSchema = exports.RequestBodyFunction$outboundSchema = void 0;
exports.CreateToolResponseBody$outboundSchema = exports.CreateToolResponseBody$inboundSchema = exports.ResponseBodyFunctionTool$outboundSchema = exports.ResponseBodyFunctionTool$inboundSchema = exports.CreateToolResponseBodyFunction$outboundSchema = exports.CreateToolResponseBodyFunction$inboundSchema = exports.ResponseBodyParameters$outboundSchema = exports.ResponseBodyParameters$inboundSchema = exports.CreateToolResponseBodyToolsResponse200ApplicationJson1Type$outboundSchema = exports.CreateToolResponseBodyToolsResponse200ApplicationJson1Type$inboundSchema = exports.CreateToolResponseBodyType$outboundSchema = exports.CreateToolResponseBodyType$inboundSchema = exports.ResponseBodyStatus$outboundSchema = exports.ResponseBodyStatus$inboundSchema = exports.ResponseBodyJSONSchemaTool$outboundSchema = exports.ResponseBodyJSONSchemaTool$inboundSchema = exports.ResponseBodyJsonSchema$outboundSchema = exports.ResponseBodyJsonSchema$inboundSchema = exports.ResponseBodySchema$outboundSchema = exports.ResponseBodySchema$inboundSchema = exports.CreateToolResponseBodyToolsType$outboundSchema = exports.CreateToolResponseBodyToolsType$inboundSchema = exports.CreateToolResponseBodyStatus$outboundSchema = exports.CreateToolResponseBodyStatus$inboundSchema = exports.ResponseBodyHTTPTool$outboundSchema = exports.ResponseBodyHTTPTool$inboundSchema = exports.CreateToolResponseBodyHttp$outboundSchema = exports.CreateToolResponseBodyHttp$inboundSchema = exports.ResponseBodyArguments$outboundSchema = exports.ResponseBodyArguments$inboundSchema = exports.ResponseBodyDefaultValue$outboundSchema = exports.ResponseBodyDefaultValue$inboundSchema = exports.CreateToolResponseBodyToolsResponse200ApplicationJson3Type$outboundSchema = void 0;
exports.createToolRequestBodyParametersToJSON = createToolRequestBodyParametersToJSON;
exports.createToolRequestBodyParametersFromJSON = createToolRequestBodyParametersFromJSON;
exports.requestBodyCodeToolToJSON = requestBodyCodeToolToJSON;
exports.requestBodyCodeToolFromJSON = requestBodyCodeToolFromJSON;
exports.requestBodyCodeExecutionToolToJSON = requestBodyCodeExecutionToolToJSON;
exports.requestBodyCodeExecutionToolFromJSON = requestBodyCodeExecutionToolFromJSON;
exports.requestBodyHeadersToJSON = requestBodyHeadersToJSON;
exports.requestBodyHeadersFromJSON = requestBodyHeadersFromJSON;
exports.requestBodyMcpToJSON = requestBodyMcpToJSON;
exports.requestBodyMcpFromJSON = requestBodyMcpFromJSON;
exports.requestBodyMCPToolToJSON = requestBodyMCPToolToJSON;
exports.requestBodyMCPToolFromJSON = requestBodyMCPToolFromJSON;
exports.createToolHeaders2ToJSON = createToolHeaders2ToJSON;
exports.createToolHeaders2FromJSON = createToolHeaders2FromJSON;
exports.createToolRequestBodyHeadersToJSON = createToolRequestBodyHeadersToJSON;
exports.createToolRequestBodyHeadersFromJSON = createToolRequestBodyHeadersFromJSON;
exports.requestBodyBlueprintToJSON = requestBodyBlueprintToJSON;
exports.requestBodyBlueprintFromJSON = requestBodyBlueprintFromJSON;
exports.requestBodyDefaultValueToJSON = requestBodyDefaultValueToJSON;
exports.requestBodyDefaultValueFromJSON = requestBodyDefaultValueFromJSON;
exports.requestBodyArgumentsToJSON = requestBodyArgumentsToJSON;
exports.requestBodyArgumentsFromJSON = requestBodyArgumentsFromJSON;
exports.createToolRequestBodyHttpToJSON = createToolRequestBodyHttpToJSON;
exports.createToolRequestBodyHttpFromJSON = createToolRequestBodyHttpFromJSON;
exports.requestBodyHTTPToolToJSON = requestBodyHTTPToolToJSON;
exports.requestBodyHTTPToolFromJSON = requestBodyHTTPToolFromJSON;
exports.requestBodySchemaToJSON = requestBodySchemaToJSON;
exports.requestBodySchemaFromJSON = requestBodySchemaFromJSON;
exports.requestBodyJsonSchemaToJSON = requestBodyJsonSchemaToJSON;
exports.requestBodyJsonSchemaFromJSON = requestBodyJsonSchemaFromJSON;
exports.jsonSchemaToolToJSON = jsonSchemaToolToJSON;
exports.jsonSchemaToolFromJSON = jsonSchemaToolFromJSON;
exports.requestBodyParametersToJSON = requestBodyParametersToJSON;
exports.requestBodyParametersFromJSON = requestBodyParametersFromJSON;
exports.requestBodyFunctionToJSON = requestBodyFunctionToJSON;
exports.requestBodyFunctionFromJSON = requestBodyFunctionFromJSON;
exports.requestBodyFunctionToolToJSON = requestBodyFunctionToolToJSON;
exports.requestBodyFunctionToolFromJSON = requestBodyFunctionToolFromJSON;
exports.createToolRequestBodyToJSON = createToolRequestBodyToJSON;
exports.createToolRequestBodyFromJSON = createToolRequestBodyFromJSON;
exports.createToolResponseBodyParametersToJSON = createToolResponseBodyParametersToJSON;
exports.createToolResponseBodyParametersFromJSON = createToolResponseBodyParametersFromJSON;
exports.responseBodyCodeToolToJSON = responseBodyCodeToolToJSON;
exports.responseBodyCodeToolFromJSON = responseBodyCodeToolFromJSON;
exports.responseBodyCodeExecutionToolToJSON = responseBodyCodeExecutionToolToJSON;
exports.responseBodyCodeExecutionToolFromJSON = responseBodyCodeExecutionToolFromJSON;
exports.responseBodyHeadersToJSON = responseBodyHeadersToJSON;
exports.responseBodyHeadersFromJSON = responseBodyHeadersFromJSON;
exports.createToolResponseBodySchemaToJSON = createToolResponseBodySchemaToJSON;
exports.createToolResponseBodySchemaFromJSON = createToolResponseBodySchemaFromJSON;
exports.responseBodyToolsToJSON = responseBodyToolsToJSON;
exports.responseBodyToolsFromJSON = responseBodyToolsFromJSON;
exports.responseBodyMcpToJSON = responseBodyMcpToJSON;
exports.responseBodyMcpFromJSON = responseBodyMcpFromJSON;
exports.responseBodyMCPToolToJSON = responseBodyMCPToolToJSON;
exports.responseBodyMCPToolFromJSON = responseBodyMCPToolFromJSON;
exports.createToolHeadersTools2ToJSON = createToolHeadersTools2ToJSON;
exports.createToolHeadersTools2FromJSON = createToolHeadersTools2FromJSON;
exports.createToolResponseBodyHeadersToJSON = createToolResponseBodyHeadersToJSON;
exports.createToolResponseBodyHeadersFromJSON = createToolResponseBodyHeadersFromJSON;
exports.responseBodyBlueprintToJSON = responseBodyBlueprintToJSON;
exports.responseBodyBlueprintFromJSON = responseBodyBlueprintFromJSON;
exports.responseBodyDefaultValueToJSON = responseBodyDefaultValueToJSON;
exports.responseBodyDefaultValueFromJSON = responseBodyDefaultValueFromJSON;
exports.responseBodyArgumentsToJSON = responseBodyArgumentsToJSON;
exports.responseBodyArgumentsFromJSON = responseBodyArgumentsFromJSON;
exports.createToolResponseBodyHttpToJSON = createToolResponseBodyHttpToJSON;
exports.createToolResponseBodyHttpFromJSON = createToolResponseBodyHttpFromJSON;
exports.responseBodyHTTPToolToJSON = responseBodyHTTPToolToJSON;
exports.responseBodyHTTPToolFromJSON = responseBodyHTTPToolFromJSON;
exports.responseBodySchemaToJSON = responseBodySchemaToJSON;
exports.responseBodySchemaFromJSON = responseBodySchemaFromJSON;
exports.responseBodyJsonSchemaToJSON = responseBodyJsonSchemaToJSON;
exports.responseBodyJsonSchemaFromJSON = responseBodyJsonSchemaFromJSON;
exports.responseBodyJSONSchemaToolToJSON = responseBodyJSONSchemaToolToJSON;
exports.responseBodyJSONSchemaToolFromJSON = responseBodyJSONSchemaToolFromJSON;
exports.responseBodyParametersToJSON = responseBodyParametersToJSON;
exports.responseBodyParametersFromJSON = responseBodyParametersFromJSON;
exports.createToolResponseBodyFunctionToJSON = createToolResponseBodyFunctionToJSON;
exports.createToolResponseBodyFunctionFromJSON = createToolResponseBodyFunctionFromJSON;
exports.responseBodyFunctionToolToJSON = responseBodyFunctionToolToJSON;
exports.responseBodyFunctionToolFromJSON = responseBodyFunctionToolFromJSON;
exports.createToolResponseBodyToJSON = createToolResponseBodyToJSON;
exports.createToolResponseBodyFromJSON = createToolResponseBodyFromJSON;
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.CreateToolRequestBodyToolsRequestStatus = {
    Live: "live",
    Draft: "draft",
    Pending: "pending",
    Published: "published",
};
exports.CreateToolRequestBodyToolsRequest5Type = {
    Code: "code",
};
/**
 * The type must be "object"
 */
exports.CreateToolRequestBodyToolsRequest5CodeToolType = {
    Object: "object",
};
exports.RequestBodyLanguage = {
    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.CreateToolRequestBodyToolsStatus = {
    Live: "live",
    Draft: "draft",
    Pending: "pending",
    Published: "published",
};
exports.CreateToolRequestBodyToolsRequest4Type = {
    Mcp: "mcp",
};
/**
 * The connection type used by the MCP server
 */
exports.RequestBodyConnectionType = {
    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.CreateToolRequestBodyStatus = {
    Live: "live",
    Draft: "draft",
    Pending: "pending",
    Published: "published",
};
exports.CreateToolRequestBodyToolsRequestType = {
    Http: "http",
};
/**
 * The HTTP method to use.
 */
exports.CreateToolRequestBodyMethod = {
    Get: "GET",
    Post: "POST",
    Put: "PUT",
    Delete: "DELETE",
};
/**
 * The type of the argument.
 */
exports.CreateToolRequestBodyToolsRequest3Type = {
    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.RequestBodyStatus = {
    Live: "live",
    Draft: "draft",
    Pending: "pending",
    Published: "published",
};
exports.CreateToolRequestBodyToolsType = {
    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.CreateToolRequestBodyToolsRequest1Status = {
    Live: "live",
    Draft: "draft",
    Pending: "pending",
    Published: "published",
};
exports.CreateToolRequestBodyType = {
    Function: "function",
};
/**
 * The type must be "object"
 */
exports.CreateToolRequestBodyToolsRequest1Type = {
    Object: "object",
};
/**
 * 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.CreateToolResponseBodyToolsResponse200Status = {
    Live: "live",
    Draft: "draft",
    Pending: "pending",
    Published: "published",
};
exports.CreateToolResponseBodyToolsResponse200ApplicationJSONType = {
    Code: "code",
};
/**
 * The type must be "object"
 */
exports.CreateToolResponseBodyToolsResponse200ApplicationJson5Type = {
    Object: "object",
};
exports.ResponseBodyLanguage = {
    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.CreateToolResponseBodyToolsResponseStatus = {
    Live: "live",
    Draft: "draft",
    Pending: "pending",
    Published: "published",
};
exports.CreateToolResponseBodyToolsResponse200Type = {
    Mcp: "mcp",
};
exports.CreateToolResponseBodyToolsResponse200ApplicationJson4Type = {
    Object: "object",
};
/**
 * The connection type used by the MCP server
 */
exports.ResponseBodyConnectionType = {
    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.CreateToolResponseBodyToolsStatus = {
    Live: "live",
    Draft: "draft",
    Pending: "pending",
    Published: "published",
};
exports.CreateToolResponseBodyToolsResponseType = {
    Http: "http",
};
/**
 * The HTTP method to use.
 */
exports.CreateToolResponseBodyMethod = {
    Get: "GET",
    Post: "POST",
    Put: "PUT",
    Delete: "DELETE",
};
/**
 * The type of the argument.
 */
exports.CreateToolResponseBodyToolsResponse200ApplicationJson3Type = {
    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.CreateToolResponseBodyStatus = {
    Live: "live",
    Draft: "draft",
    Pending: "pending",
    Published: "published",
};
exports.CreateToolResponseBodyToolsType = {
    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.ResponseBodyStatus = {
    Live: "live",
    Draft: "draft",
    Pending: "pending",
    Published: "published",
};
exports.CreateToolResponseBodyType = {
    Function: "function",
};
/**
 * The type must be "object"
 */
exports.CreateToolResponseBodyToolsResponse200ApplicationJson1Type = {
    Object: "object",
};
/** @internal */
exports.CreateToolRequestBodyToolsRequestStatus$inboundSchema = z
    .nativeEnum(exports.CreateToolRequestBodyToolsRequestStatus);
/** @internal */
exports.CreateToolRequestBodyToolsRequestStatus$outboundSchema = exports.CreateToolRequestBodyToolsRequestStatus$inboundSchema;
/** @internal */
exports.CreateToolRequestBodyToolsRequest5Type$inboundSchema = z.nativeEnum(exports.CreateToolRequestBodyToolsRequest5Type);
/** @internal */
exports.CreateToolRequestBodyToolsRequest5Type$outboundSchema = exports.CreateToolRequestBodyToolsRequest5Type$inboundSchema;
/** @internal */
exports.CreateToolRequestBodyToolsRequest5CodeToolType$inboundSchema = z
    .nativeEnum(exports.CreateToolRequestBodyToolsRequest5CodeToolType);
/** @internal */
exports.CreateToolRequestBodyToolsRequest5CodeToolType$outboundSchema = exports.CreateToolRequestBodyToolsRequest5CodeToolType$inboundSchema;
/** @internal */
exports.CreateToolRequestBodyParameters$inboundSchema = (0, schemas_js_1.collectExtraKeys)(z.object({
    type: exports.CreateToolRequestBodyToolsRequest5CodeToolType$inboundSchema,
    properties: z.record(z.any()),
    required: z.array(z.string()),
}).catchall(z.any()), "additionalProperties", true);
/** @internal */
exports.CreateToolRequestBodyParameters$outboundSchema = z.object({
    type: exports.CreateToolRequestBodyToolsRequest5CodeToolType$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 createToolRequestBodyParametersToJSON(createToolRequestBodyParameters) {
    return JSON.stringify(exports.CreateToolRequestBodyParameters$outboundSchema.parse(createToolRequestBodyParameters));
}
function createToolRequestBodyParametersFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateToolRequestBodyParameters$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateToolRequestBodyParameters' from JSON`);
}
/** @internal */
exports.RequestBodyLanguage$inboundSchema = z.nativeEnum(exports.RequestBodyLanguage);
/** @internal */
exports.RequestBodyLanguage$outboundSchema = exports.RequestBodyLanguage$inboundSchema;
/** @internal */
exports.RequestBodyCodeTool$inboundSchema = z.object({
    parameters: z.lazy(() => exports.CreateToolRequestBodyParameters$inboundSchema)
        .optional(),
    language: exports.RequestBodyLanguage$inboundSchema,
    code: z.string(),
});
/** @internal */
exports.RequestBodyCodeTool$outboundSchema = z.object({
    parameters: z.lazy(() => exports.CreateToolRequestBodyParameters$outboundSchema)
        .optional(),
    language: exports.RequestBodyLanguage$outboundSchema,
    code: z.string(),
});
function requestBodyCodeToolToJSON(requestBodyCodeTool) {
    return JSON.stringify(exports.RequestBodyCodeTool$outboundSchema.parse(requestBodyCodeTool));
}
function requestBodyCodeToolFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RequestBodyCodeTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RequestBodyCodeTool' from JSON`);
}
/** @internal */
exports.RequestBodyCodeExecutionTool$inboundSchema = z.object({
    path: z.string(),
    key: z.string(),
    display_name: z.string().optional(),
    description: z.string(),
    status: exports.CreateToolRequestBodyToolsRequestStatus$inboundSchema.default("live"),
    type: exports.CreateToolRequestBodyToolsRequest5Type$inboundSchema,
    code_tool: z.lazy(() => exports.RequestBodyCodeTool$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "display_name": "displayName",
        "code_tool": "codeTool",
    });
});
/** @internal */
exports.RequestBodyCodeExecutionTool$outboundSchema = z.object({
    path: z.string(),
    key: z.string(),
    displayName: z.string().optional(),
    description: z.string(),
    status: exports.CreateToolRequestBodyToolsRequestStatus$outboundSchema.default("live"),
    type: exports.CreateToolRequestBodyToolsRequest5Type$outboundSchema,
    codeTool: z.lazy(() => exports.RequestBodyCodeTool$outboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        displayName: "display_name",
        codeTool: "code_tool",
    });
});
function requestBodyCodeExecutionToolToJSON(requestBodyCodeExecutionTool) {
    return JSON.stringify(exports.RequestBodyCodeExecutionTool$outboundSchema.parse(requestBodyCodeExecutionTool));
}
function requestBodyCodeExecutionToolFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RequestBodyCodeExecutionTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RequestBodyCodeExecutionTool' from JSON`);
}
/** @internal */
exports.CreateToolRequestBodyToolsStatus$inboundSchema = z.nativeEnum(exports.CreateToolRequestBodyToolsStatus);
/** @internal */
exports.CreateToolRequestBodyToolsStatus$outboundSchema = exports.CreateToolRequestBodyToolsStatus$inboundSchema;
/** @internal */
exports.CreateToolRequestBodyToolsRequest4Type$inboundSchema = z.nativeEnum(exports.CreateToolRequestBodyToolsRequest4Type);
/** @internal */
exports.CreateToolRequestBodyToolsRequest4Type$outboundSchema = exports.CreateToolRequestBodyToolsRequest4Type$inboundSchema;
/** @internal */
exports.RequestBodyHeaders$inboundSchema = z.object({
    value: z.string(),
    encrypted: z.boolean().default(false),
});
/** @internal */
exports.RequestBodyHeaders$outboundSchema = z.object({
    value: z.string(),
    encrypted: z.boolean().default(false),
});
function requestBodyHeadersToJSON(requestBodyHeaders) {
    return JSON.stringify(exports.RequestBodyHeaders$outboundSchema.parse(requestBodyHeaders));
}
function requestBodyHeadersFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RequestBodyHeaders$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RequestBodyHeaders' from JSON`);
}
/** @internal */
exports.RequestBodyConnectionType$inboundSchema = z.nativeEnum(exports.RequestBodyConnectionType);
/** @internal */
exports.RequestBodyConnectionType$outboundSchema = exports.RequestBodyConnectionType$inboundSchema;
/** @internal */
exports.RequestBodyMcp$inboundSchema = z.object({
    server_url: z.string(),
    headers: z.record(z.lazy(() => exports.RequestBodyHeaders$inboundSchema)).optional(),
    connection_type: exports.RequestBodyConnectionType$inboundSchema,
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "server_url": "serverUrl",
        "connection_type": "connectionType",
    });
});
/** @internal */
exports.RequestBodyMcp$outboundSchema = z.object({
    serverUrl: z.string(),
    headers: z.record(z.lazy(() => exports.RequestBodyHeaders$outboundSchema)).optional(),
    connectionType: exports.RequestBodyConnectionType$outboundSchema,
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        serverUrl: "server_url",
        connectionType: "connection_type",
    });
});
function requestBodyMcpToJSON(requestBodyMcp) {
    return JSON.stringify(exports.RequestBodyMcp$outboundSchema.parse(requestBodyMcp));
}
function requestBodyMcpFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RequestBodyMcp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RequestBodyMcp' from JSON`);
}
/** @internal */
exports.RequestBodyMCPTool$inboundSchema = z.object({
    path: z.string(),
    key: z.string(),
    display_name: z.string().optional(),
    description: z.string(),
    status: exports.CreateToolRequestBodyToolsStatus$inboundSchema.default("live"),
    type: exports.CreateToolRequestBodyToolsRequest4Type$inboundSchema,
    mcp: z.lazy(() => exports.RequestBodyMcp$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "display_name": "displayName",
    });
});
/** @internal */
exports.RequestBodyMCPTool$outboundSchema = z.object({
    path: z.string(),
    key: z.string(),
    displayName: z.string().optional(),
    description: z.string(),
    status: exports.CreateToolRequestBodyToolsStatus$outboundSchema.default("live"),
    type: exports.CreateToolRequestBodyToolsRequest4Type$outboundSchema,
    mcp: z.lazy(() => exports.RequestBodyMcp$outboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        displayName: "display_name",
    });
});
function requestBodyMCPToolToJSON(requestBodyMCPTool) {
    return JSON.stringify(exports.RequestBodyMCPTool$outboundSchema.parse(requestBodyMCPTool));
}
function requestBodyMCPToolFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RequestBodyMCPTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RequestBodyMCPTool' from JSON`);
}
/** @internal */
exports.CreateToolRequestBodyStatus$inboundSchema = z.nativeEnum(exports.CreateToolRequestBodyStatus);
/** @internal */
exports.CreateToolRequestBodyStatus$outboundSchema = exports.CreateToolRequestBodyStatus$inboundSchema;
/** @internal */
exports.CreateToolRequestBodyToolsRequestType$inboundSchema = z.nativeEnum(exports.CreateToolRequestBodyToolsRequestType);
/** @internal */
exports.CreateToolRequestBodyToolsRequestType$outboundSchema = exports.CreateToolRequestBodyToolsRequestType$inboundSchema;
/** @internal */
exports.CreateToolRequestBodyMethod$inboundSchema = z.nativeEnum(exports.CreateToolRequestBodyMethod);
/** @internal */
exports.CreateToolRequestBodyMethod$outboundSchema = exports.CreateToolRequestBodyMethod$inboundSchema;
/** @internal */
exports.CreateToolHeaders2$inboundSchema = z.object({
    value: z.string(),
    encrypted: z.boolean().default(false),
});
/** @internal */
exports.CreateToolHeaders2$outboundSchema = z.object({
    value: z.string(),
    encrypted: z.boolean().default(false),
});
function createToolHeaders2ToJSON(createToolHeaders2) {
    return JSON.stringify(exports.CreateToolHeaders2$outboundSchema.parse(createToolHeaders2));
}
function createToolHeaders2FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateToolHeaders2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateToolHeaders2' from JSON`);
}
/** @internal */
exports.CreateToolRequestBodyHeaders$inboundSchema = z.union([z.lazy(() => exports.CreateToolHeaders2$inboundSchema), z.string()]);
/** @internal */
exports.CreateToolRequestBodyHeaders$outboundSchema = z.union([z.lazy(() => exports.CreateToolHeaders2$outboundSchema), z.string()]);
function createToolRequestBodyHeadersToJSON(createToolRequestBodyHeaders) {
    return JSON.stringify(exports.CreateToolRequestBodyHeaders$outboundSchema.parse(createToolRequestBodyHeaders));
}
function createToolRequestBodyHeadersFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateToolRequestBodyHeaders$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateToolRequestBodyHeaders' from JSON`);
}
/** @internal */
exports.RequestBodyBlueprint$inboundSchema = z.object({
    url: z.string(),
    method: exports.CreateToolRequestBodyMethod$inboundSchema,
    headers: z.record(z.union([z.lazy(() => exports.CreateToolHeaders2$inboundSchema), z.string()])).optional(),
    body: z.record(z.any()).optional(),
});
/** @internal */
exports.RequestBodyBlueprint$outboundSchema = z.object({
    url: z.string(),
    method: exports.CreateToolRequestBodyMethod$outboundSchema,
    headers: z.record(z.union([z.lazy(() => exports.CreateToolHeaders2$outboundSchema), z.string()])).optional(),
    body: z.record(z.any()).optional(),
});
function requestBodyBlueprintToJSON(requestBodyBlueprint) {
    return JSON.stringify(exports.RequestBodyBlueprint$outboundSchema.parse(requestBodyBlueprint));
}
function requestBodyBlueprintFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RequestBodyBlueprint$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RequestBodyBlueprint' from JSON`);
}
/** @internal */
exports.CreateToolRequestBodyToolsRequest3Type$inboundSchema = z.nativeEnum(exports.CreateToolRequestBodyToolsRequest3Type);
/** @internal */
exports.CreateToolRequestBodyToolsRequest3Type$outboundSchema = exports.CreateToolRequestBodyToolsRequest3Type$inboundSchema;
/** @internal */
exports.RequestBodyDefaultValue$inboundSchema = z.union([z.string(), z.number(), z.boolean()]);
/** @internal */
exports.RequestBodyDefaultValue$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function requestBodyDefaultValueToJSON(requestBodyDefaultValue) {
    return JSON.stringify(exports.RequestBodyDefaultValue$outboundSchema.parse(requestBodyDefaultValue));
}
function requestBodyDefaultValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RequestBodyDefaultValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RequestBodyDefaultValue' from JSON`);
}
/** @internal */
exports.RequestBodyArguments$inboundSchema = z.object({
    type: exports.CreateToolRequestBodyToolsRequest3Type$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.RequestBodyArguments$outboundSchema = z.object({
    type: exports.CreateToolRequestBodyToolsRequest3Type$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 requestBodyArgumentsToJSON(requestBodyArguments) {
    return JSON.stringify(exports.RequestBodyArguments$outboundSchema.parse(requestBodyArguments));
}
function requestBodyArgumentsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RequestBodyArguments$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RequestBodyArguments' from JSON`);
}
/** @internal */
exports.CreateToolRequestBodyHttp$inboundSchema = z.object({
    blueprint: z.lazy(() => exports.RequestBodyBlueprint$inboundSchema),
    arguments: z.record(z.lazy(() => exports.RequestBodyArguments$inboundSchema))
        .optional(),
});
/** @internal */
exports.CreateToolRequestBodyHttp$outboundSchema = z.object({
    blueprint: z.lazy(() => exports.RequestBodyBlueprint$outboundSchema),
    arguments: z.record(z.lazy(() => exports.RequestBodyArguments$outboundSchema))
        .optional(),
});
function createToolRequestBodyHttpToJSON(createToolRequestBodyHttp) {
    return JSON.stringify(exports.CreateToolRequestBodyHttp$outboundSchema.parse(createToolRequestBodyHttp));
}
function createToolRequestBodyHttpFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateToolRequestBodyHttp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateToolRequestBodyHttp' from JSON`);
}
/** @internal */
exports.RequestBodyHTTPTool$inboundSchema = z.object({
    path: z.string(),
    key: z.string(),
    display_name: z.string().optional(),
    description: z.string(),
    status: exports.CreateToolRequestBodyStatus$inboundSchema.default("live"),
    type: exports.CreateToolRequestBodyToolsRequestType$inboundSchema,
    http: z.lazy(() => exports.CreateToolRequestBodyHttp$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "display_name": "displayName",
    });
});
/** @internal */
exports.RequestBodyHTTPTool$outboundSchema = z.object({
    path: z.string(),
    key: z.string(),
    displayName: z.string().optional(),
    description: z.string(),
    status: exports.CreateToolRequestBodyStatus$outboundSchema.default("live"),
    type: exports.CreateToolRequestBodyToolsRequestType$outboundSchema,
    http: z.lazy(() => exports.CreateToolRequestBodyHttp$outboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        displayName: "display_name",
    });
});
function requestBodyHTTPToolToJSON(requestBodyHTTPTool) {
    return JSON.stringify(exports.RequestBodyHTTPTool$outboundSchema.parse(requestBodyHTTPTool));
}
function requestBodyHTTPToolFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RequestBodyHTTPTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RequestBodyHTTPTool' from JSON`);
}
/** @internal */
exports.RequestBodyStatus$inboundSchema = z.nativeEnum(exports.RequestBodyStatus);
/** @internal */
exports.RequestBodyStatus$outboundSchema = exports.RequestBodyStatus$inboundSchema;
/** @internal */
exports.CreateToolRequestBodyToolsType$inboundSchema = z.nativeEnum(exports.CreateToolRequestBodyToolsType);
/** @internal */
exports.CreateToolRequestBodyToolsType$outboundSchema = exports.CreateToolRequestBodyToolsType$inboundSchema;
/** @internal */
exports.RequestBodySchema$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.RequestBodySchema$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 requestBodySchemaToJSON(requestBodySchema) {
    return JSON.stringify(exports.RequestBodySchema$outboundSchema.parse(requestBodySchema));
}
function requestBodySchemaFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RequestBodySchema$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RequestBodySchema' from JSON`);
}
/** @internal */
exports.RequestBodyJsonSchema$inboundSchema = z.object({
    name: z.string(),
    description: z.string(),
    schema: z.lazy(() => exports.RequestBodySchema$inboundSchema),
    strict: z.boolean().optional(),
});
/** @internal */
exports.RequestBodyJsonSchema$outboundSchema = z.object({
    name: z.string(),
    description: z.string(),
    schema: z.lazy(() => exports.RequestBodySchema$outboundSchema),
    strict: z.boolean().optional(),
});
function requestBodyJsonSchemaToJSON(requestBodyJsonSchema) {
    return JSON.stringify(exports.RequestBodyJsonSchema$outboundSchema.parse(requestBodyJsonSchema));
}
function requestBodyJsonSchemaFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RequestBodyJsonSchema$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RequestBodyJsonSchema' from JSON`);
}
/** @internal */
exports.JSONSchemaTool$inboundSchema = z.object({
    path: z.string(),
    key: z.string(),
    display_name: z.string().optional(),
    description: z.string(),
    status: exports.RequestBodyStatus$inboundSchema.default("live"),
    type: exports.CreateToolRequestBodyToolsType$inboundSchema,
    json_schema: z.lazy(() => exports.RequestBodyJsonSchema$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "display_name": "displayName",
        "json_schema": "jsonSchema",
    });
});
/** @internal */
exports.JSONSchemaTool$outboundSchema = z.object({
    path: z.string(),
    key: z.string(),
    displayName: z.string().optional(),
    description: z.string(),
    status: exports.RequestBodyStatus$outboundSchema.default("live"),
    type: exports.CreateToolRequestBodyToolsType$outboundSchema,
    jsonSchema: z.lazy(() => exports.RequestBodyJsonSchema$outboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        displayName: "display_name",
        jsonSchema: "json_schema",
    });
});
function jsonSchemaToolToJSON(jsonSchemaTool) {
    return JSON.stringify(exports.JSONSchemaTool$outboundSchema.parse(jsonSchemaTool));
}
function jsonSchemaToolFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.JSONSchemaTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'JSONSchemaTool' from JSON`);
}
/** @internal */
exports.CreateToolRequestBodyToolsRequest1Status$inboundSchema = z
    .nativeEnum(exports.CreateToolRequestBodyToolsRequest1Status);
/** @internal */
exports.CreateToolRequestBodyToolsRequest1Status$outboundSchema = exports.CreateToolRequestBodyToolsRequest1Status$inboundSchema;
/** @internal */
exports.CreateToolRequestBodyType$inboundSchema = z.nativeEnum(exports.CreateToolRequestBodyType);
/** @internal */
exports.CreateToolRequestBodyType$outboundSchema = exports.CreateToolRequestBodyType$inboundSchema;
/** @internal */
exports.CreateToolRequestBodyToolsRequest1Type$inboundSchema = z.nativeEnum(exports.CreateToolRequestBodyToolsRequest1Type);
/** @internal */
exports.CreateToolRequestBodyToolsRequest1Type$outboundSchema = exports.CreateToolRequestBodyToolsRequest1Type$inboundSchema;
/** @internal */
exports.RequestBodyParameters$inboundSchema = (0, schemas_js_1.collectExtraKeys)(z.object({
    type: exports.CreateToolRequestBodyToolsRequest1Type$inboundSchema,
    properties: z.record(z.any()),
    required: z.array(z.string()),
}).catchall(z.any()), "additionalProperties", true);
/** @internal */
exports.RequestBodyParameters$outboundSchema = z.object({
    type: exports.CreateToolRequestBodyToolsRequest1Type$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 requestBodyParametersToJSON(requestBodyParameters) {
    return JSON.stringify(exports.RequestBodyParameters$outboundSchema.parse(requestBodyParameters));
}
function requestBodyParametersFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RequestBodyParameters$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RequestBodyParameters' from JSON`);
}
/** @internal */
exports.RequestBodyFunction$inboundSchema = z.object({
    name: z.string(),
    description: z.string().optional(),
    strict: z.boolean().optional(),
    parameters: z.lazy(() => exports.RequestBodyParameters$inboundSchema).optional(),
});
/** @internal */
exports.RequestBodyFunction$outboundSchema = z.object({
    name: z.string(),
    description: z.string().optional(),
    strict: z.boolean().optional(),
    parameters: z.lazy(() => exports.RequestBodyParameters$outboundSchema).optional(),
});
function requestBodyFunctionToJSON(requestBodyFunction) {
    return JSON.stringify(exports.RequestBodyFunction$outboundSchema.parse(requestBodyFunction));
}
function requestBodyFunctionFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RequestBodyFunction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RequestBodyFunction' from JSON`);
}
/** @internal */
exports.RequestBodyFunctionTool$inboundSchema = z.object({
    path: z.string(),
    key: z.string(),
    display_name: z.string().optional(),
    description: z.string(),
    status: exports.CreateToolRequestBodyToolsRequest1Status$inboundSchema.default("live"),
    type: exports.CreateToolRequestBodyType$inboundSchema,
    function: z.lazy(() => exports.RequestBodyFunction$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "display_name": "displayName",
    });
});
/** @internal */
exports.RequestBodyFunctionTool$outboundSchema = z.object({
    path: z.string(),
    key: z.string(),
    displayName: z.string().optional(),
    description: z.string(),
    status: exports.CreateToolRequestBodyToolsRequest1Status$outboundSchema.default("live"),
    type: exports.CreateToolRequestBodyType$outboundSchema,
    function: z.lazy(() => exports.RequestBodyFunction$outboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        displayName: "display_name",
    });
});
function requestBodyFunctionToolToJSON(requestBodyFunctionTool) {
    return JSON.stringify(exports.RequestBodyFunctionTool$outboundSchema.parse(requestBodyFunctionTool));
}
function requestBodyFunctionToolFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RequestBodyFunctionTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RequestBodyFunctionTool' from JSON`);
}
/** @internal */
exports.CreateToolRequestBody$inboundSchema = z.union([
    z.lazy(() => exports.RequestBodyFunctionTool$inboundSchema),
    z.lazy(() => exports.JSONSchemaTool$inboundSchema),
    z.lazy(() => exports.RequestBodyHTTPTool$inboundSchema),
    z.lazy(() => exports.RequestBodyMCPTool$inboundSchema),
    z.lazy(() => exports.RequestBodyCodeExecutionTool$inboundSchema),
]);
/** @internal */
exports.CreateToolRequestBody$outboundSchema = z.union([
    z.lazy(() => exports.RequestBodyFunctionTool$outboundSchema),
    z.lazy(() => exports.JSONSchemaTool$outboundSchema),
    z.lazy(() => exports.RequestBodyHTTPTool$outboundSchema),
    z.lazy(() => exports.RequestBodyMCPTool$outboundSchema),
    z.lazy(() => exports.RequestBodyCodeExecutionTool$outboundSchema),
]);
function createToolRequestBodyToJSON(createToolRequestBody) {
    return JSON.stringify(exports.CreateToolRequestBody$outboundSchema.parse(createToolRequestBody));
}
function createToolRequestBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateToolRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateToolRequestBody' from JSON`);
}
/** @internal */
exports.CreateToolResponseBodyToolsResponse200Status$inboundSchema = z
    .nativeEnum(exports.CreateToolResponseBodyToolsResponse200Status);
/** @internal */
exports.CreateToolResponseBodyToolsResponse200Status$outboundSchema = exports.CreateToolResponseBodyToolsResponse200Status$inboundSchema;
/** @internal */
exports.CreateToolResponseBodyToolsResponse200ApplicationJSONType$inboundSchema = z.nativeEnum(exports.CreateToolResponseBodyToolsResponse200ApplicationJSONType);
/** @internal */
exports.CreateToolResponseBodyToolsResponse200ApplicationJSONType$outboundSchema = exports.CreateToolResponseBodyToolsResponse200ApplicationJSONType$inboundSchema;
/** @internal */
exports.CreateToolResponseBodyToolsResponse200ApplicationJson5Type$inboundSchema = z.nativeEnum(exports.CreateToolResponseBodyToolsResponse200ApplicationJson5Type);
/** @internal */
exports.CreateToolResponseBodyToolsResponse200ApplicationJson5Type$outboundSchema = exports.CreateToolResponseBodyToolsResponse200ApplicationJson5Type$inboundSchema;
/** @internal */
exports.CreateToolResponseBodyParameters$inboundSchema = (0, schemas_js_1.collectExtraKeys)(z.object({
    type: exports.CreateToolResponseBodyToolsResponse200ApplicationJson5Type$inboundSchema,
    properties: z.record(z.any()),
    required: z.array(z.string()),
}).catchall(z.any()), "additionalProperties", true);
/** @internal */
exports.CreateToolResponseBodyParameters$outboundSchema = z.object({
    type: exports.CreateToolResponseBodyToolsResponse200ApplicationJson5Type$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 createToolResponseBodyParametersToJSON(createToolResponseBodyParameters) {
    return JSON.stringify(exports.CreateToolResponseBodyParameters$outboundSchema.parse(createToolResponseBodyParameters));
}
function createToolResponseBodyParametersFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateToolResponseBodyParameters$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateToolResponseBodyParameters' from JSON`);
}
/** @internal */
exports.ResponseBodyLanguage$inboundSchema = z.nativeEnum(exports.ResponseBodyLanguage);
/** @internal */
exports.ResponseBodyLanguage$outboundSchema = exports.ResponseBodyLanguage$inboundSchema;
/** @internal */
exports.ResponseBodyCodeTool$inboundSchema = z.object({
    parameters: z.lazy(() => exports.CreateToolResponseBodyParameters$inboundSchema)
        .optional(),
    language: exports.ResponseBodyLanguage$inboundSchema,
    code: z.string(),
});
/** @internal */
exports.ResponseBodyCodeTool$outboundSchema = z.object({
    parameters: z.lazy(() => exports.CreateToolResponseBodyParameters$outboundSchema)
        .optional(),
    language: exports.ResponseBodyLanguage$outboundSchema,
    code: z.string(),
});
function responseBodyCodeToolToJSON(responseBodyCodeTool) {
    return JSON.stringify(exports.ResponseBodyCodeTool$outboundSchema.parse(responseBodyCodeTool));
}
function responseBodyCodeToolFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResponseBodyCodeTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyCodeTool' from JSON`);
}
/** @internal */
exports.ResponseBodyCodeExecutionTool$inboundSchema = z.object({
    _id: z.string().default("tool_01KAXX9J750P3DVWK0W9QEC59P"),
    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.CreateToolResponseBodyToolsResponse200Status$inboundSchema.default("live"),
    version_hash: z.string().optional(),
    type: exports.CreateToolResponseBodyToolsResponse200ApplicationJSONType$inboundSchema,
    code_tool: z.lazy(() => exports.ResponseBodyCodeTool$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.ResponseBodyCodeExecutionTool$outboundSchema = z.object({
    id: z.string().default("tool_01KAXX9J750P3DVWK0W9QEC59P"),
    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.CreateToolResponseBodyToolsResponse200Status$outboundSchema.default("live"),
    versionHash: z.string().optional(),
    type: exports.CreateToolResponseBodyToolsResponse200ApplicationJSONType$outboundSchema,
    codeTool: z.lazy(() => exports.ResponseBodyCodeTool$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 responseBodyCodeExecutionToolToJSON(responseBodyCodeExecutionTool) {
    return JSON.stringify(exports.ResponseBodyCodeExecutionTool$outboundSchema.parse(responseBodyCodeExecutionTool));
}
function responseBodyCodeExecutionToolFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResponseBodyCodeExecutionTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyCodeExecutionTool' from JSON`);
}
/** @internal */
exports.CreateToolResponseBodyToolsResponseStatus$inboundSchema = z
    .nativeEnum(exports.CreateToolResponseBodyToolsResponseStatus);
/** @internal */
exports.CreateToolResponseBodyToolsResponseStatus$outboundSchema = exports.CreateToolResponseBodyToolsResponseStatus$inboundSchema;
/** @internal */
exports.CreateToolResponseBodyToolsResponse200Type$inboundSchema = z
    .nativeEnum(exports.CreateToolResponseBodyToolsResponse200Type);
/** @internal */
exports.CreateToolResponseBodyToolsResponse200Type$outboundSchema = exports.CreateToolResponseBodyToolsResponse200Type$inboundSchema;
/** @internal */
exports.ResponseBodyHeaders$inboundSchema = z.object({
    value: z.string(),
    encrypted: z.boolean().default(false),
});
/** @internal */
exports.ResponseBodyHeaders$outboundSchema = z.object({
    value: z.string(),
    encrypted: z.boolean().default(false),
});
function responseBodyHeadersToJSON(responseBodyHeaders) {
    return JSON.stringify(exports.ResponseBodyHeaders$outboundSchema.parse(responseBodyHeaders));
}
function responseBodyHeadersFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResponseBodyHeaders$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyHeaders' from JSON`);
}
/** @internal */
exports.CreateToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema = z.nativeEnum(exports.CreateToolResponseBodyToolsResponse200ApplicationJson4Type);
/** @internal */
exports.CreateToolResponseBodyToolsResponse200ApplicationJson4Type$outboundSchema = exports.CreateToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema;
/** @internal */
exports.CreateToolResponseBodySchema$inboundSchema = z.object({
    type: exports.CreateToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema,
    properties: z.record(z.any()).optional(),
    required: z.array(z.string()).optional(),
});
/** @internal */
exports.CreateToolResponseBodySchema$outboundSchema = z.object({
    type: exports.CreateToolResponseBodyToolsResponse200ApplicationJson4Type$outboundSchema,
    properties: z.record(z.any()).optional(),
    required: z.array(z.string()).optional(),
});
function createToolResponseBodySchemaToJSON(createToolResponseBodySchema) {
    return JSON.stringify(exports.CreateToolResponseBodySchema$outboundSchema.parse(createToolResponseBodySchema));
}
function createToolResponseBodySchemaFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateToolResponseBodySchema$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateToolResponseBodySchema' from JSON`);
}
/** @internal */
exports.ResponseBodyTools$inboundSchema = z.object({
    id: z.string().default("01KAXX9J74TNQXZH4QZVNS80Y3"),
    name: z.string(),
    description: z.string().optional(),
    schema: z.lazy(() => exports.CreateToolResponseBodySchema$inboundSchema),
});
/** @internal */
exports.ResponseBodyTools$outboundSchema = z.object({
    id: z.string().default("01KAXX9J74TNQXZH4QZVNS80Y3"),
    name: z.string(),
    description: z.string().optional(),
    schema: z.lazy(() => exports.CreateToolResponseBodySchema$outboundSchema),
});
function responseBodyToolsToJSON(responseBodyTools) {
    return JSON.stringify(exports.ResponseBodyTools$outboundSchema.parse(responseBodyTools));
}
function responseBodyToolsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResponseBodyTools$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyTools' from JSON`);
}
/** @internal */
exports.ResponseBodyConnectionType$inboundSchema = z.nativeEnum(exports.ResponseBodyConnectionType);
/** @internal */
exports.ResponseBodyConnectionType$outboundSchema = exports.ResponseBodyConnectionType$inboundSchema;
/** @internal */
exports.ResponseBodyMcp$inboundSchema = z.object({
    server_url: z.string(),
    headers: z.record(z.lazy(() => exports.ResponseBodyHeaders$inboundSchema)).optional(),
    tools: z.array(z.lazy(() => exports.ResponseBodyTools$inboundSchema)),
    connection_type: exports.ResponseBodyConnectionType$inboundSchema,
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "server_url": "serverUrl",
        "connection_type": "connectionType",
    });
});
/** @internal */
exports.ResponseBodyMcp$outboundSchema = z.object({
    serverUrl: z.string(),
    headers: z.record(z.lazy(() => exports.ResponseBodyHeaders$outboundSchema))
        .optional(),
    tools: z.array(z.lazy(() => exports.ResponseBodyTools$outboundSchema)),
    connectionType: exports.ResponseBodyConnectionType$outboundSchema,
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        serverUrl: "server_url",
        connectionType: "connection_type",
    });
});
function responseBodyMcpToJSON(responseBodyMcp) {
    return JSON.stringify(exports.ResponseBodyMcp$outboundSchema.parse(responseBodyMcp));
}
function responseBodyMcpFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResponseBodyMcp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyMcp' from JSON`);
}
/** @internal */
exports.ResponseBodyMCPTool$inboundSchema = z.object({
    _id: z.string().default("tool_01KAXX9J72G5KE7A5SM29F8QWP"),
    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.CreateToolResponseBodyToolsResponseStatus$inboundSchema.default("live"),
    version_hash: z.string().optional(),
    type: exports.CreateToolResponseBodyToolsResponse200Type$inboundSchema,
    mcp: z.lazy(() => exports.ResponseBodyMcp$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.ResponseBodyMCPTool$outboundSchema = z.object({
    id: z.string().default("tool_01KAXX9J72G5KE7A5SM29F8QWP"),
    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.CreateToolResponseBodyToolsResponseStatus$outboundSchema.default("live"),
    versionHash: z.string().optional(),
    type: exports.CreateToolResponseBodyToolsResponse200Type$outboundSchema,
    mcp: z.lazy(() => exports.ResponseBodyMcp$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 responseBodyMCPToolToJSON(responseBodyMCPTool) {
    return JSON.stringify(exports.ResponseBodyMCPTool$outboundSchema.parse(responseBodyMCPTool));
}
function responseBodyMCPToolFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResponseBodyMCPTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyMCPTool' from JSON`);
}
/** @internal */
exports.CreateToolResponseBodyToolsStatus$inboundSchema = z.nativeEnum(exports.CreateToolResponseBodyToolsStatus);
/** @internal */
exports.CreateToolResponseBodyToolsStatus$outboundSchema = exports.CreateToolResponseBodyToolsStatus$inboundSchema;
/** @internal */
exports.CreateToolResponseBodyToolsResponseType$inboundSchema = z
    .nativeEnum(exports.CreateToolResponseBodyToolsResponseType);
/** @internal */
exports.CreateToolResponseBodyToolsResponseType$outboundSchema = exports.CreateToolResponseBodyToolsResponseType$inboundSchema;
/** @internal */
exports.CreateToolResponseBodyMethod$inboundSchema = z.nativeEnum(exports.CreateToolResponseBodyMethod);
/** @internal */
exports.CreateToolResponseBodyMethod$outboundSchema = exports.CreateToolResponseBodyMethod$inboundSchema;
/** @internal */
exports.CreateToolHeadersTools2$inboundSchema = z.object({
    value: z.string(),
    encrypted: z.boolean().default(false),
});
/** @internal */
exports.CreateToolHeadersTools2$outboundSchema = z.object({
    value: z.string(),
    encrypted: z.boolean().default(false),
});
function createToolHeadersTools2ToJSON(createToolHeadersTools2) {
    return JSON.stringify(exports.CreateToolHeadersTools2$outboundSchema.parse(createToolHeadersTools2));
}
function createToolHeadersTools2FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateToolHeadersTools2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateToolHeadersTools2' from JSON`);
}
/** @internal */
exports.CreateToolResponseBodyHeaders$inboundSchema = z.union([z.lazy(() => exports.CreateToolHeadersTools2$inboundSchema), z.string()]);
/** @internal */
exports.CreateToolResponseBodyHeaders$outboundSchema = z.union([z.lazy(() => exports.CreateToolHeadersTools2$outboundSchema), z.string()]);
function createToolResponseBodyHeadersToJSON(createToolResponseBodyHeaders) {
    return JSON.stringify(exports.CreateToolResponseBodyHeaders$outboundSchema.parse(createToolResponseBodyHeaders));
}
function createToolResponseBodyHeadersFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateToolResponseBodyHeaders$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateToolResponseBodyHeaders' from JSON`);
}
/** @internal */
exports.ResponseBodyBlueprint$inboundSchema = z.object({
    url: z.string(),
    method: exports.CreateToolResponseBodyMethod$inboundSchema,
    headers: z.record(z.union([z.lazy(() => exports.CreateToolHeadersTools2$inboundSchema), z.string()])).optional(),
    body: z.record(z.any()).optional(),
});
/** @internal */
exports.ResponseBodyBlueprint$outboundSchema = z.object({
    url: z.string(),
    method: exports.CreateToolResponseBodyMethod$outboundSchema,
    headers: z.record(z.union([z.lazy(() => exports.CreateToolHeadersTools2$outboundSchema), z.string()])).optional(),
    body: z.record(z.any()).optional(),
});
function responseBodyBlueprintToJSON(responseBodyBlueprint) {
    return JSON.stringify(exports.ResponseBodyBlueprint$outboundSchema.parse(responseBodyBlueprint));
}
function responseBodyBlueprintFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResponseBodyBlueprint$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyBlueprint' from JSON`);
}
/** @internal */
exports.CreateToolResponseBodyToolsResponse200ApplicationJson3Type$inboundSchema = z.nativeEnum(exports.CreateToolResponseBodyToolsResponse200ApplicationJson3Type);
/** @internal */
exports.CreateToolResponseBodyToolsResponse200ApplicationJson3Type$outboundSchema = exports.CreateToolResponseBodyToolsResponse200ApplicationJson3Type$inboundSchema;
/** @internal */
exports.ResponseBodyDefaultValue$inboundSchema = z.union([z.string(), z.number(), z.boolean()]);
/** @internal */
exports.ResponseBodyDefaultValue$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function responseBodyDefaultValueToJSON(responseBodyDefaultValue) {
    return JSON.stringify(exports.ResponseBodyDefaultValue$outboundSchema.parse(responseBodyDefaultValue));
}
function responseBodyDefaultValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResponseBodyDefaultValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyDefaultValue' from JSON`);
}
/** @internal */
exports.ResponseBodyArguments$inboundSchema = z.object({
    type: exports.CreateToolResponseBodyToolsResponse200ApplicationJson3Type$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.ResponseBodyArguments$outboundSchema = z.object({
    type: exports.CreateToolResponseBodyToolsResponse200ApplicationJson3Type$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 responseBodyArgumentsToJSON(responseBodyArguments) {
    return JSON.stringify(exports.ResponseBodyArguments$outboundSchema.parse(responseBodyArguments));
}
function responseBodyArgumentsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResponseBodyArguments$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyArguments' from JSON`);
}
/** @internal */
exports.CreateToolResponseBodyHttp$inboundSchema = z.object({
    blueprint: z.lazy(() => exports.ResponseBodyBlueprint$inboundSchema),
    arguments: z.record(z.lazy(() => exports.ResponseBodyArguments$inboundSchema))
        .optional(),
});
/** @internal */
exports.CreateToolResponseBodyHttp$outboundSchema = z.object({
    blueprint: z.lazy(() => exports.ResponseBodyBlueprint$outboundSchema),
    arguments: z.record(z.lazy(() => exports.ResponseBodyArguments$outboundSchema))
        .optional(),
});
function createToolResponseBodyHttpToJSON(createToolResponseBodyHttp) {
    return JSON.stringify(exports.CreateToolResponseBodyHttp$outboundSchema.parse(createToolResponseBodyHttp));
}
function createToolResponseBodyHttpFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateToolResponseBodyHttp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateToolResponseBodyHttp' from JSON`);
}
/** @internal */
exports.ResponseBodyHTTPTool$inboundSchema = z.object({
    _id: z.string().default("tool_01KAXX9J6Z0JGN9MBBGTEC96S3"),
    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.CreateToolResponseBodyToolsStatus$inboundSchema.default("live"),
    version_hash: z.string().optional(),
    type: exports.CreateToolResponseBodyToolsResponseType$inboundSchema,
    http: z.lazy(() => exports.CreateToolResponseBodyHttp$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.ResponseBodyHTTPTool$outboundSchema = z.object({
    id: z.string().default("tool_01KAXX9J6Z0JGN9MBBGTEC96S3"),
    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.CreateToolResponseBodyToolsStatus$outboundSchema.default("live"),
    versionHash: z.string().optional(),
    type: exports.CreateToolResponseBodyToolsResponseType$outboundSchema,
    http: z.lazy(() => exports.CreateToolResponseBodyHttp$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 responseBodyHTTPToolToJSON(responseBodyHTTPTool) {
    return JSON.stringify(exports.ResponseBodyHTTPTool$outboundSchema.parse(responseBodyHTTPTool));
}
function responseBodyHTTPToolFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResponseBodyHTTPTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyHTTPTool' from JSON`);
}
/** @internal */
exports.CreateToolResponseBodyStatus$inboundSchema = z.nativeEnum(exports.CreateToolResponseBodyStatus);
/** @internal */
exports.CreateToolResponseBodyStatus$outboundSchema = exports.CreateToolResponseBodyStatus$inboundSchema;
/** @internal */
exports.CreateToolResponseBodyToolsType$inboundSchema = z.nativeEnum(exports.CreateToolResponseBodyToolsType);
/** @internal */
exports.CreateToolResponseBodyToolsType$outboundSchema = exports.CreateToolResponseBodyToolsType$inboundSchema;
/** @internal */
exports.ResponseBodySchema$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.ResponseBodySchema$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 responseBodySchemaToJSON(responseBodySchema) {
    return JSON.stringify(exports.ResponseBodySchema$outboundSchema.parse(responseBodySchema));
}
function responseBodySchemaFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResponseBodySchema$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodySchema' from JSON`);
}
/** @internal */
exports.ResponseBodyJsonSchema$inboundSchema = z.object({
    name: z.string(),
    description: z.string(),
    schema: z.lazy(() => exports.ResponseBodySchema$inboundSchema),
    strict: z.boolean().optional(),
});
/** @internal */
exports.ResponseBodyJsonSchema$outboundSchema = z.object({
    name: z.string(),
    description: z.string(),
    schema: z.lazy(() => exports.ResponseBodySchema$outboundSchema),
    strict: z.boolean().optional(),
});
function responseBodyJsonSchemaToJSON(responseBodyJsonSchema) {
    return JSON.stringify(exports.ResponseBodyJsonSchema$outboundSchema.parse(responseBodyJsonSchema));
}
function responseBodyJsonSchemaFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResponseBodyJsonSchema$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyJsonSchema' from JSON`);
}
/** @internal */
exports.ResponseBodyJSONSchemaTool$inboundSchema = z.object({
    _id: z.string().default("tool_01KAXX9J6TFKZ889Z6B1KKH174"),
    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.CreateToolResponseBodyStatus$inboundSchema.default("live"),
    version_hash: z.string().optional(),
    type: exports.CreateToolResponseBodyToolsType$inboundSchema,
    json_schema: z.lazy(() => exports.ResponseBodyJsonSchema$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.ResponseBodyJSONSchemaTool$outboundSchema = z.object({
    id: z.string().default("tool_01KAXX9J6TFKZ889Z6B1KKH174"),
    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.CreateToolResponseBodyStatus$outboundSchema.default("live"),
    versionHash: z.string().optional(),
    type: exports.CreateToolResponseBodyToolsType$outboundSchema,
    jsonSchema: z.lazy(() => exports.ResponseBodyJsonSchema$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 responseBodyJSONSchemaToolToJSON(responseBodyJSONSchemaTool) {
    return JSON.stringify(exports.ResponseBodyJSONSchemaTool$outboundSchema.parse(responseBodyJSONSchemaTool));
}
function responseBodyJSONSchemaToolFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResponseBodyJSONSchemaTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyJSONSchemaTool' from JSON`);
}
/** @internal */
exports.ResponseBodyStatus$inboundSchema = z.nativeEnum(exports.ResponseBodyStatus);
/** @internal */
exports.ResponseBodyStatus$outboundSchema = exports.ResponseBodyStatus$inboundSchema;
/** @internal */
exports.CreateToolResponseBodyType$inboundSchema = z.nativeEnum(exports.CreateToolResponseBodyType);
/** @internal */
exports.CreateToolResponseBodyType$outboundSchema = exports.CreateToolResponseBodyType$inboundSchema;
/** @internal */
exports.CreateToolResponseBodyToolsResponse200ApplicationJson1Type$inboundSchema = z.nativeEnum(exports.CreateToolResponseBodyToolsResponse200ApplicationJson1Type);
/** @internal */
exports.CreateToolResponseBodyToolsResponse200ApplicationJson1Type$outboundSchema = exports.CreateToolResponseBodyToolsResponse200ApplicationJson1Type$inboundSchema;
/** @internal */
exports.ResponseBodyParameters$inboundSchema = (0, schemas_js_1.collectExtraKeys)(z.object({
    type: exports.CreateToolResponseBodyToolsResponse200ApplicationJson1Type$inboundSchema,
    properties: z.record(z.any()),
    required: z.array(z.string()),
}).catchall(z.any()), "additionalProperties", true);
/** @internal */
exports.ResponseBodyParameters$outboundSchema = z.object({
    type: exports.CreateToolResponseBodyToolsResponse200ApplicationJson1Type$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 responseBodyParametersToJSON(responseBodyParameters) {
    return JSON.stringify(exports.ResponseBodyParameters$outboundSchema.parse(responseBodyParameters));
}
function responseBodyParametersFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResponseBodyParameters$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyParameters' from JSON`);
}
/** @internal */
exports.CreateToolResponseBodyFunction$inboundSchema = z.object({
    name: z.string(),
    description: z.string().optional(),
    strict: z.boolean().optional(),
    parameters: z.lazy(() => exports.ResponseBodyParameters$inboundSchema).optional(),
});
/** @internal */
exports.CreateToolResponseBodyFunction$outboundSchema = z.object({
    name: z.string(),
    description: z.string().optional(),
    strict: z.boolean().optional(),
    parameters: z.lazy(() => exports.ResponseBodyParameters$outboundSchema).optional(),
});
function createToolResponseBodyFunctionToJSON(createToolResponseBodyFunction) {
    return JSON.stringify(exports.CreateToolResponseBodyFunction$outboundSchema.parse(createToolResponseBodyFunction));
}
function createToolResponseBodyFunctionFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateToolResponseBodyFunction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateToolResponseBodyFunction' from JSON`);
}
/** @internal */
exports.ResponseBodyFunctionTool$inboundSchema = z.object({
    _id: z.string().default("tool_01KAXX9J6P2HCSCF1H2G5ASMN6"),
    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.ResponseBodyStatus$inboundSchema.default("live"),
    version_hash: z.string().optional(),
    type: exports.CreateToolResponseBodyType$inboundSchema,
    function: z.lazy(() => exports.CreateToolResponseBodyFunction$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.ResponseBodyFunctionTool$outboundSchema = z.object({
    id: z.string().default("tool_01KAXX9J6P2HCSCF1H2G5ASMN6"),
    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.ResponseBodyStatus$outboundSchema.default("live"),
    versionHash: z.string().optional(),
    type: exports.CreateToolResponseBodyType$outboundSchema,
    function: z.lazy(() => exports.CreateToolResponseBodyFunction$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 responseBodyFunctionToolToJSON(responseBodyFunctionTool) {
    return JSON.stringify(exports.ResponseBodyFunctionTool$outboundSchema.parse(responseBodyFunctionTool));
}
function responseBodyFunctionToolFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ResponseBodyFunctionTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyFunctionTool' from JSON`);
}
/** @internal */
exports.CreateToolResponseBody$inboundSchema = z.union([
    z.lazy(() => exports.ResponseBodyFunctionTool$inboundSchema),
    z.lazy(() => exports.ResponseBodyJSONSchemaTool$inboundSchema),
    z.lazy(() => exports.ResponseBodyHTTPTool$inboundSchema),
    z.lazy(() => exports.ResponseBodyMCPTool$inboundSchema),
    z.lazy(() => exports.ResponseBodyCodeExecutionTool$inboundSchema),
]);
/** @internal */
exports.CreateToolResponseBody$outboundSchema = z.union([
    z.lazy(() => exports.ResponseBodyFunctionTool$outboundSchema),
    z.lazy(() => exports.ResponseBodyJSONSchemaTool$outboundSchema),
    z.lazy(() => exports.ResponseBodyHTTPTool$outboundSchema),
    z.lazy(() => exports.ResponseBodyMCPTool$outboundSchema),
    z.lazy(() => exports.ResponseBodyCodeExecutionTool$outboundSchema),
]);
function createToolResponseBodyToJSON(createToolResponseBody) {
    return JSON.stringify(exports.CreateToolResponseBody$outboundSchema.parse(createToolResponseBody));
}
function createToolResponseBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.CreateToolResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateToolResponseBody' from JSON`);
}
//# sourceMappingURL=createtool.js.map