"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.UpdateToolRequestBodyBlueprint$outboundSchema = exports.UpdateToolRequestBodyToolsHeaders$outboundSchema = exports.UpdateToolHeaders2$outboundSchema = exports.UpdateToolRequestBodyMethod$outboundSchema = exports.UpdateToolRequestBodyToolsRequestStatus$outboundSchema = exports.UpdateMCPTool$outboundSchema = exports.UpdateToolRequestBodyToolsRequestVersionIncrement$outboundSchema = exports.UpdateToolRequestBodyMcp$outboundSchema = exports.UpdateToolRequestBodyConnectionType$outboundSchema = exports.RequestBodyTools$outboundSchema = exports.UpdateToolRequestBodyToolsSchema$outboundSchema = exports.UpdateToolRequestBodyToolsRequest4McpType$outboundSchema = exports.UpdateToolRequestBodyHeaders$outboundSchema = exports.UpdateToolRequestBodyToolsRequest4Status$outboundSchema = exports.UpdateCodeExecutionTool$outboundSchema = exports.UpdateToolRequestBodyToolsRequest5VersionIncrement$outboundSchema = exports.UpdateToolRequestBodyCodeTool$outboundSchema = exports.UpdateToolRequestBodyLanguage$outboundSchema = exports.UpdateToolRequestBodyToolsParameters$outboundSchema = exports.UpdateToolRequestBodyToolsRequest5CodeToolType$outboundSchema = exports.UpdateToolRequestBodyToolsRequest5Status$outboundSchema = exports.UpdateToolResponseBodyToolsResponse200ApplicationJson1Type = exports.UpdateToolResponseBodyStatus = exports.UpdateToolResponseBodyToolsStatus = exports.UpdateToolResponseBodyToolsResponse200ApplicationJson3Type = exports.UpdateToolResponseBodyMethod = exports.UpdateToolResponseBodyToolsResponseStatus = exports.UpdateToolResponseBodyConnectionType = exports.UpdateToolResponseBodyToolsResponse200ApplicationJson4Type = exports.UpdateToolResponseBodyToolsResponse200Status = exports.UpdateToolResponseBodyLanguage = exports.UpdateToolResponseBodyToolsResponse200ApplicationJson5Type = exports.UpdateToolResponseBodyToolsResponse200ApplicationJSONStatus = exports.RequestBodyVersionIncrement = exports.UpdateToolRequestBodyToolsRequest1Type = exports.UpdateToolRequestBodyStatus = exports.UpdateToolRequestBodyVersionIncrement = exports.UpdateToolRequestBodyToolsStatus = exports.UpdateToolRequestBodyToolsVersionIncrement = exports.UpdateToolRequestBodyToolsRequest3Type = exports.UpdateToolRequestBodyMethod = exports.UpdateToolRequestBodyToolsRequestStatus = exports.UpdateToolRequestBodyToolsRequestVersionIncrement = exports.UpdateToolRequestBodyConnectionType = exports.UpdateToolRequestBodyToolsRequest4McpType = exports.UpdateToolRequestBodyToolsRequest4Status = exports.UpdateToolRequestBodyToolsRequest5VersionIncrement = exports.UpdateToolRequestBodyLanguage = exports.UpdateToolRequestBodyToolsRequest5CodeToolType = exports.UpdateToolRequestBodyToolsRequest5Status = void 0;
exports.UpdateToolResponseBodyParameters$inboundSchema = exports.UpdateToolResponseBodyToolsResponse200ApplicationJson1Type$inboundSchema = exports.UpdateToolResponseBodyStatus$inboundSchema = exports.UpdateToolResponseBodyJSONSchemaTool$inboundSchema = exports.UpdateToolResponseBodyJsonSchema$inboundSchema = exports.UpdateToolResponseBodySchema$inboundSchema = exports.UpdateToolResponseBodyToolsStatus$inboundSchema = exports.UpdateToolResponseBodyHTTPTool$inboundSchema = exports.UpdateToolResponseBodyHttp$inboundSchema = exports.UpdateToolResponseBodyArguments$inboundSchema = exports.UpdateToolResponseBodyDefaultValue$inboundSchema = exports.UpdateToolResponseBodyToolsResponse200ApplicationJson3Type$inboundSchema = exports.UpdateToolResponseBodyBlueprint$inboundSchema = exports.UpdateToolResponseBodyToolsHeaders$inboundSchema = exports.UpdateToolHeadersTools2$inboundSchema = exports.UpdateToolResponseBodyMethod$inboundSchema = exports.UpdateToolResponseBodyToolsResponseStatus$inboundSchema = exports.UpdateToolResponseBodyMCPTool$inboundSchema = exports.UpdateToolResponseBodyMcp$inboundSchema = exports.UpdateToolResponseBodyConnectionType$inboundSchema = exports.UpdateToolResponseBodyTools$inboundSchema = exports.UpdateToolResponseBodyToolsSchema$inboundSchema = exports.UpdateToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema = exports.UpdateToolResponseBodyHeaders$inboundSchema = exports.UpdateToolResponseBodyToolsResponse200Status$inboundSchema = exports.UpdateToolResponseBodyCodeExecutionTool$inboundSchema = exports.UpdateToolResponseBodyCodeTool$inboundSchema = exports.UpdateToolResponseBodyLanguage$inboundSchema = exports.UpdateToolResponseBodyToolsParameters$inboundSchema = exports.UpdateToolResponseBodyToolsResponse200ApplicationJson5Type$inboundSchema = exports.UpdateToolResponseBodyToolsResponse200ApplicationJSONStatus$inboundSchema = exports.UpdateToolRequest$outboundSchema = exports.UpdateToolRequestBody$outboundSchema = exports.UpdateFunctionTool$outboundSchema = exports.RequestBodyVersionIncrement$outboundSchema = exports.UpdateToolRequestBodyFunction$outboundSchema = exports.UpdateToolRequestBodyParameters$outboundSchema = exports.UpdateToolRequestBodyToolsRequest1Type$outboundSchema = exports.UpdateToolRequestBodyStatus$outboundSchema = exports.UpdateJSONSchemaTool$outboundSchema = exports.UpdateToolRequestBodyVersionIncrement$outboundSchema = exports.UpdateToolRequestBodyJsonSchema$outboundSchema = exports.UpdateToolRequestBodySchema$outboundSchema = exports.UpdateToolRequestBodyToolsStatus$outboundSchema = exports.UpdateHTTPTool$outboundSchema = exports.UpdateToolRequestBodyToolsVersionIncrement$outboundSchema = exports.UpdateToolRequestBodyHttp$outboundSchema = exports.UpdateToolRequestBodyArguments$outboundSchema = exports.UpdateToolRequestBodyDefaultValue$outboundSchema = exports.UpdateToolRequestBodyToolsRequest3Type$outboundSchema = void 0;
exports.UpdateToolResponseBody$inboundSchema = exports.UpdateToolResponseBodyFunctionTool$inboundSchema = exports.UpdateToolResponseBodyFunction$inboundSchema = void 0;
exports.updateToolRequestBodyToolsParametersToJSON = updateToolRequestBodyToolsParametersToJSON;
exports.updateToolRequestBodyCodeToolToJSON = updateToolRequestBodyCodeToolToJSON;
exports.updateCodeExecutionToolToJSON = updateCodeExecutionToolToJSON;
exports.updateToolRequestBodyHeadersToJSON = updateToolRequestBodyHeadersToJSON;
exports.updateToolRequestBodyToolsSchemaToJSON = updateToolRequestBodyToolsSchemaToJSON;
exports.requestBodyToolsToJSON = requestBodyToolsToJSON;
exports.updateToolRequestBodyMcpToJSON = updateToolRequestBodyMcpToJSON;
exports.updateMCPToolToJSON = updateMCPToolToJSON;
exports.updateToolHeaders2ToJSON = updateToolHeaders2ToJSON;
exports.updateToolRequestBodyToolsHeadersToJSON = updateToolRequestBodyToolsHeadersToJSON;
exports.updateToolRequestBodyBlueprintToJSON = updateToolRequestBodyBlueprintToJSON;
exports.updateToolRequestBodyDefaultValueToJSON = updateToolRequestBodyDefaultValueToJSON;
exports.updateToolRequestBodyArgumentsToJSON = updateToolRequestBodyArgumentsToJSON;
exports.updateToolRequestBodyHttpToJSON = updateToolRequestBodyHttpToJSON;
exports.updateHTTPToolToJSON = updateHTTPToolToJSON;
exports.updateToolRequestBodySchemaToJSON = updateToolRequestBodySchemaToJSON;
exports.updateToolRequestBodyJsonSchemaToJSON = updateToolRequestBodyJsonSchemaToJSON;
exports.updateJSONSchemaToolToJSON = updateJSONSchemaToolToJSON;
exports.updateToolRequestBodyParametersToJSON = updateToolRequestBodyParametersToJSON;
exports.updateToolRequestBodyFunctionToJSON = updateToolRequestBodyFunctionToJSON;
exports.updateFunctionToolToJSON = updateFunctionToolToJSON;
exports.updateToolRequestBodyToJSON = updateToolRequestBodyToJSON;
exports.updateToolRequestToJSON = updateToolRequestToJSON;
exports.updateToolResponseBodyToolsParametersFromJSON = updateToolResponseBodyToolsParametersFromJSON;
exports.updateToolResponseBodyCodeToolFromJSON = updateToolResponseBodyCodeToolFromJSON;
exports.updateToolResponseBodyCodeExecutionToolFromJSON = updateToolResponseBodyCodeExecutionToolFromJSON;
exports.updateToolResponseBodyHeadersFromJSON = updateToolResponseBodyHeadersFromJSON;
exports.updateToolResponseBodyToolsSchemaFromJSON = updateToolResponseBodyToolsSchemaFromJSON;
exports.updateToolResponseBodyToolsFromJSON = updateToolResponseBodyToolsFromJSON;
exports.updateToolResponseBodyMcpFromJSON = updateToolResponseBodyMcpFromJSON;
exports.updateToolResponseBodyMCPToolFromJSON = updateToolResponseBodyMCPToolFromJSON;
exports.updateToolHeadersTools2FromJSON = updateToolHeadersTools2FromJSON;
exports.updateToolResponseBodyToolsHeadersFromJSON = updateToolResponseBodyToolsHeadersFromJSON;
exports.updateToolResponseBodyBlueprintFromJSON = updateToolResponseBodyBlueprintFromJSON;
exports.updateToolResponseBodyDefaultValueFromJSON = updateToolResponseBodyDefaultValueFromJSON;
exports.updateToolResponseBodyArgumentsFromJSON = updateToolResponseBodyArgumentsFromJSON;
exports.updateToolResponseBodyHttpFromJSON = updateToolResponseBodyHttpFromJSON;
exports.updateToolResponseBodyHTTPToolFromJSON = updateToolResponseBodyHTTPToolFromJSON;
exports.updateToolResponseBodySchemaFromJSON = updateToolResponseBodySchemaFromJSON;
exports.updateToolResponseBodyJsonSchemaFromJSON = updateToolResponseBodyJsonSchemaFromJSON;
exports.updateToolResponseBodyJSONSchemaToolFromJSON = updateToolResponseBodyJSONSchemaToolFromJSON;
exports.updateToolResponseBodyParametersFromJSON = updateToolResponseBodyParametersFromJSON;
exports.updateToolResponseBodyFunctionFromJSON = updateToolResponseBodyFunctionFromJSON;
exports.updateToolResponseBodyFunctionToolFromJSON = updateToolResponseBodyFunctionToolFromJSON;
exports.updateToolResponseBodyFromJSON = updateToolResponseBodyFromJSON;
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.UpdateToolRequestBodyToolsRequest5Status = {
    Live: "live",
    Draft: "draft",
    Pending: "pending",
    Published: "published",
};
/**
 * The type must be "object"
 */
exports.UpdateToolRequestBodyToolsRequest5CodeToolType = {
    Object: "object",
};
exports.UpdateToolRequestBodyLanguage = {
    Python: "python",
};
exports.UpdateToolRequestBodyToolsRequest5VersionIncrement = {
    Major: "major",
    Minor: "minor",
    Patch: "patch",
};
/**
 * 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.UpdateToolRequestBodyToolsRequest4Status = {
    Live: "live",
    Draft: "draft",
    Pending: "pending",
    Published: "published",
};
exports.UpdateToolRequestBodyToolsRequest4McpType = {
    Object: "object",
};
/**
 * The connection type used by the MCP server
 */
exports.UpdateToolRequestBodyConnectionType = {
    Http: "http",
    Sse: "sse",
};
exports.UpdateToolRequestBodyToolsRequestVersionIncrement = {
    Major: "major",
    Minor: "minor",
    Patch: "patch",
};
/**
 * 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.UpdateToolRequestBodyToolsRequestStatus = {
    Live: "live",
    Draft: "draft",
    Pending: "pending",
    Published: "published",
};
/**
 * The HTTP method to use.
 */
exports.UpdateToolRequestBodyMethod = {
    Get: "GET",
    Post: "POST",
    Put: "PUT",
    Delete: "DELETE",
};
/**
 * The type of the argument.
 */
exports.UpdateToolRequestBodyToolsRequest3Type = {
    String: "string",
    Number: "number",
    Boolean: "boolean",
};
exports.UpdateToolRequestBodyToolsVersionIncrement = {
    Major: "major",
    Minor: "minor",
    Patch: "patch",
};
/**
 * 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.UpdateToolRequestBodyToolsStatus = {
    Live: "live",
    Draft: "draft",
    Pending: "pending",
    Published: "published",
};
exports.UpdateToolRequestBodyVersionIncrement = {
    Major: "major",
    Minor: "minor",
    Patch: "patch",
};
/**
 * 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.UpdateToolRequestBodyStatus = {
    Live: "live",
    Draft: "draft",
    Pending: "pending",
    Published: "published",
};
/**
 * The type must be "object"
 */
exports.UpdateToolRequestBodyToolsRequest1Type = {
    Object: "object",
};
exports.RequestBodyVersionIncrement = {
    Major: "major",
    Minor: "minor",
    Patch: "patch",
};
/**
 * 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.UpdateToolResponseBodyToolsResponse200ApplicationJSONStatus = {
    Live: "live",
    Draft: "draft",
    Pending: "pending",
    Published: "published",
};
/**
 * The type must be "object"
 */
exports.UpdateToolResponseBodyToolsResponse200ApplicationJson5Type = {
    Object: "object",
};
exports.UpdateToolResponseBodyLanguage = {
    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.UpdateToolResponseBodyToolsResponse200Status = {
    Live: "live",
    Draft: "draft",
    Pending: "pending",
    Published: "published",
};
exports.UpdateToolResponseBodyToolsResponse200ApplicationJson4Type = {
    Object: "object",
};
/**
 * The connection type used by the MCP server
 */
exports.UpdateToolResponseBodyConnectionType = {
    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.UpdateToolResponseBodyToolsResponseStatus = {
    Live: "live",
    Draft: "draft",
    Pending: "pending",
    Published: "published",
};
/**
 * The HTTP method to use.
 */
exports.UpdateToolResponseBodyMethod = {
    Get: "GET",
    Post: "POST",
    Put: "PUT",
    Delete: "DELETE",
};
/**
 * The type of the argument.
 */
exports.UpdateToolResponseBodyToolsResponse200ApplicationJson3Type = {
    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.UpdateToolResponseBodyToolsStatus = {
    Live: "live",
    Draft: "draft",
    Pending: "pending",
    Published: "published",
};
/**
 * 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.UpdateToolResponseBodyStatus = {
    Live: "live",
    Draft: "draft",
    Pending: "pending",
    Published: "published",
};
/**
 * The type must be "object"
 */
exports.UpdateToolResponseBodyToolsResponse200ApplicationJson1Type = {
    Object: "object",
};
/** @internal */
exports.UpdateToolRequestBodyToolsRequest5Status$outboundSchema = z
    .nativeEnum(exports.UpdateToolRequestBodyToolsRequest5Status);
/** @internal */
exports.UpdateToolRequestBodyToolsRequest5CodeToolType$outboundSchema = z
    .nativeEnum(exports.UpdateToolRequestBodyToolsRequest5CodeToolType);
/** @internal */
exports.UpdateToolRequestBodyToolsParameters$outboundSchema = z.object({
    type: exports.UpdateToolRequestBodyToolsRequest5CodeToolType$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 updateToolRequestBodyToolsParametersToJSON(updateToolRequestBodyToolsParameters) {
    return JSON.stringify(exports.UpdateToolRequestBodyToolsParameters$outboundSchema.parse(updateToolRequestBodyToolsParameters));
}
/** @internal */
exports.UpdateToolRequestBodyLanguage$outboundSchema = z.nativeEnum(exports.UpdateToolRequestBodyLanguage);
/** @internal */
exports.UpdateToolRequestBodyCodeTool$outboundSchema = z.object({
    parameters: z.lazy(() => exports.UpdateToolRequestBodyToolsParameters$outboundSchema)
        .optional(),
    language: exports.UpdateToolRequestBodyLanguage$outboundSchema,
    code: z.string(),
});
function updateToolRequestBodyCodeToolToJSON(updateToolRequestBodyCodeTool) {
    return JSON.stringify(exports.UpdateToolRequestBodyCodeTool$outboundSchema.parse(updateToolRequestBodyCodeTool));
}
/** @internal */
exports.UpdateToolRequestBodyToolsRequest5VersionIncrement$outboundSchema = z
    .nativeEnum(exports.UpdateToolRequestBodyToolsRequest5VersionIncrement);
/** @internal */
exports.UpdateCodeExecutionTool$outboundSchema = z.object({
    path: z.string().optional(),
    key: z.string().optional(),
    displayName: z.string().optional(),
    description: z.string().optional(),
    status: exports.UpdateToolRequestBodyToolsRequest5Status$outboundSchema.default("live"),
    type: z.literal("code"),
    codeTool: z.lazy(() => exports.UpdateToolRequestBodyCodeTool$outboundSchema)
        .optional(),
    versionIncrement: exports.UpdateToolRequestBodyToolsRequest5VersionIncrement$outboundSchema
        .optional(),
    versionDescription: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        displayName: "display_name",
        codeTool: "code_tool",
    });
});
function updateCodeExecutionToolToJSON(updateCodeExecutionTool) {
    return JSON.stringify(exports.UpdateCodeExecutionTool$outboundSchema.parse(updateCodeExecutionTool));
}
/** @internal */
exports.UpdateToolRequestBodyToolsRequest4Status$outboundSchema = z
    .nativeEnum(exports.UpdateToolRequestBodyToolsRequest4Status);
/** @internal */
exports.UpdateToolRequestBodyHeaders$outboundSchema = z.object({
    value: z.string(),
    encrypted: z.boolean().default(false),
});
function updateToolRequestBodyHeadersToJSON(updateToolRequestBodyHeaders) {
    return JSON.stringify(exports.UpdateToolRequestBodyHeaders$outboundSchema.parse(updateToolRequestBodyHeaders));
}
/** @internal */
exports.UpdateToolRequestBodyToolsRequest4McpType$outboundSchema = z
    .nativeEnum(exports.UpdateToolRequestBodyToolsRequest4McpType);
/** @internal */
exports.UpdateToolRequestBodyToolsSchema$outboundSchema = z.object({
    type: exports.UpdateToolRequestBodyToolsRequest4McpType$outboundSchema,
    properties: z.record(z.any()).optional(),
    required: z.array(z.string()).optional(),
});
function updateToolRequestBodyToolsSchemaToJSON(updateToolRequestBodyToolsSchema) {
    return JSON.stringify(exports.UpdateToolRequestBodyToolsSchema$outboundSchema.parse(updateToolRequestBodyToolsSchema));
}
/** @internal */
exports.RequestBodyTools$outboundSchema = z.object({
    id: z.string().default("01KVA7AGRF18GWXA2ABG8AF3H7"),
    name: z.string(),
    description: z.string().optional(),
    schema: z.lazy(() => exports.UpdateToolRequestBodyToolsSchema$outboundSchema),
});
function requestBodyToolsToJSON(requestBodyTools) {
    return JSON.stringify(exports.RequestBodyTools$outboundSchema.parse(requestBodyTools));
}
/** @internal */
exports.UpdateToolRequestBodyConnectionType$outboundSchema = z.nativeEnum(exports.UpdateToolRequestBodyConnectionType);
/** @internal */
exports.UpdateToolRequestBodyMcp$outboundSchema = z.object({
    serverUrl: z.string().optional(),
    headers: z.record(z.lazy(() => exports.UpdateToolRequestBodyHeaders$outboundSchema))
        .optional(),
    tools: z.array(z.lazy(() => exports.RequestBodyTools$outboundSchema)).optional(),
    connectionType: exports.UpdateToolRequestBodyConnectionType$outboundSchema.optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        serverUrl: "server_url",
        connectionType: "connection_type",
    });
});
function updateToolRequestBodyMcpToJSON(updateToolRequestBodyMcp) {
    return JSON.stringify(exports.UpdateToolRequestBodyMcp$outboundSchema.parse(updateToolRequestBodyMcp));
}
/** @internal */
exports.UpdateToolRequestBodyToolsRequestVersionIncrement$outboundSchema = z
    .nativeEnum(exports.UpdateToolRequestBodyToolsRequestVersionIncrement);
/** @internal */
exports.UpdateMCPTool$outboundSchema = z.object({
    path: z.string().optional(),
    key: z.string().optional(),
    displayName: z.string().optional(),
    description: z.string().optional(),
    status: exports.UpdateToolRequestBodyToolsRequest4Status$outboundSchema.default("live"),
    type: z.literal("mcp"),
    mcp: z.lazy(() => exports.UpdateToolRequestBodyMcp$outboundSchema).optional(),
    discoveryVariables: z.record(z.string()).optional(),
    versionIncrement: exports.UpdateToolRequestBodyToolsRequestVersionIncrement$outboundSchema.optional(),
    versionDescription: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        displayName: "display_name",
        discoveryVariables: "discovery_variables",
    });
});
function updateMCPToolToJSON(updateMCPTool) {
    return JSON.stringify(exports.UpdateMCPTool$outboundSchema.parse(updateMCPTool));
}
/** @internal */
exports.UpdateToolRequestBodyToolsRequestStatus$outboundSchema = z
    .nativeEnum(exports.UpdateToolRequestBodyToolsRequestStatus);
/** @internal */
exports.UpdateToolRequestBodyMethod$outboundSchema = z.nativeEnum(exports.UpdateToolRequestBodyMethod);
/** @internal */
exports.UpdateToolHeaders2$outboundSchema = z.object({
    value: z.string(),
    encrypted: z.boolean().default(false),
});
function updateToolHeaders2ToJSON(updateToolHeaders2) {
    return JSON.stringify(exports.UpdateToolHeaders2$outboundSchema.parse(updateToolHeaders2));
}
/** @internal */
exports.UpdateToolRequestBodyToolsHeaders$outboundSchema = z.union([z.lazy(() => exports.UpdateToolHeaders2$outboundSchema), z.string()]);
function updateToolRequestBodyToolsHeadersToJSON(updateToolRequestBodyToolsHeaders) {
    return JSON.stringify(exports.UpdateToolRequestBodyToolsHeaders$outboundSchema.parse(updateToolRequestBodyToolsHeaders));
}
/** @internal */
exports.UpdateToolRequestBodyBlueprint$outboundSchema = z.object({
    url: z.string(),
    method: exports.UpdateToolRequestBodyMethod$outboundSchema,
    headers: z.record(z.union([z.lazy(() => exports.UpdateToolHeaders2$outboundSchema), z.string()])).optional(),
    body: z.record(z.any()).optional(),
});
function updateToolRequestBodyBlueprintToJSON(updateToolRequestBodyBlueprint) {
    return JSON.stringify(exports.UpdateToolRequestBodyBlueprint$outboundSchema.parse(updateToolRequestBodyBlueprint));
}
/** @internal */
exports.UpdateToolRequestBodyToolsRequest3Type$outboundSchema = z.nativeEnum(exports.UpdateToolRequestBodyToolsRequest3Type);
/** @internal */
exports.UpdateToolRequestBodyDefaultValue$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function updateToolRequestBodyDefaultValueToJSON(updateToolRequestBodyDefaultValue) {
    return JSON.stringify(exports.UpdateToolRequestBodyDefaultValue$outboundSchema.parse(updateToolRequestBodyDefaultValue));
}
/** @internal */
exports.UpdateToolRequestBodyArguments$outboundSchema = z.object({
    type: exports.UpdateToolRequestBodyToolsRequest3Type$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 updateToolRequestBodyArgumentsToJSON(updateToolRequestBodyArguments) {
    return JSON.stringify(exports.UpdateToolRequestBodyArguments$outboundSchema.parse(updateToolRequestBodyArguments));
}
/** @internal */
exports.UpdateToolRequestBodyHttp$outboundSchema = z.object({
    blueprint: z.lazy(() => exports.UpdateToolRequestBodyBlueprint$outboundSchema),
    arguments: z.record(z.lazy(() => exports.UpdateToolRequestBodyArguments$outboundSchema)).optional(),
});
function updateToolRequestBodyHttpToJSON(updateToolRequestBodyHttp) {
    return JSON.stringify(exports.UpdateToolRequestBodyHttp$outboundSchema.parse(updateToolRequestBodyHttp));
}
/** @internal */
exports.UpdateToolRequestBodyToolsVersionIncrement$outboundSchema = z
    .nativeEnum(exports.UpdateToolRequestBodyToolsVersionIncrement);
/** @internal */
exports.UpdateHTTPTool$outboundSchema = z.object({
    path: z.string().optional(),
    key: z.string().optional(),
    displayName: z.string().optional(),
    description: z.string().optional(),
    status: exports.UpdateToolRequestBodyToolsRequestStatus$outboundSchema.default("live"),
    type: z.literal("http"),
    http: z.lazy(() => exports.UpdateToolRequestBodyHttp$outboundSchema).optional(),
    versionIncrement: exports.UpdateToolRequestBodyToolsVersionIncrement$outboundSchema
        .optional(),
    versionDescription: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        displayName: "display_name",
    });
});
function updateHTTPToolToJSON(updateHTTPTool) {
    return JSON.stringify(exports.UpdateHTTPTool$outboundSchema.parse(updateHTTPTool));
}
/** @internal */
exports.UpdateToolRequestBodyToolsStatus$outboundSchema = z.nativeEnum(exports.UpdateToolRequestBodyToolsStatus);
/** @internal */
exports.UpdateToolRequestBodySchema$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 updateToolRequestBodySchemaToJSON(updateToolRequestBodySchema) {
    return JSON.stringify(exports.UpdateToolRequestBodySchema$outboundSchema.parse(updateToolRequestBodySchema));
}
/** @internal */
exports.UpdateToolRequestBodyJsonSchema$outboundSchema = z.object({
    name: z.string(),
    description: z.string(),
    schema: z.lazy(() => exports.UpdateToolRequestBodySchema$outboundSchema),
    strict: z.boolean().optional(),
});
function updateToolRequestBodyJsonSchemaToJSON(updateToolRequestBodyJsonSchema) {
    return JSON.stringify(exports.UpdateToolRequestBodyJsonSchema$outboundSchema.parse(updateToolRequestBodyJsonSchema));
}
/** @internal */
exports.UpdateToolRequestBodyVersionIncrement$outboundSchema = z.nativeEnum(exports.UpdateToolRequestBodyVersionIncrement);
/** @internal */
exports.UpdateJSONSchemaTool$outboundSchema = z.object({
    path: z.string().optional(),
    key: z.string().optional(),
    displayName: z.string().optional(),
    description: z.string().optional(),
    status: exports.UpdateToolRequestBodyToolsStatus$outboundSchema.default("live"),
    type: z.literal("json_schema"),
    jsonSchema: z.lazy(() => exports.UpdateToolRequestBodyJsonSchema$outboundSchema)
        .optional(),
    versionIncrement: exports.UpdateToolRequestBodyVersionIncrement$outboundSchema
        .optional(),
    versionDescription: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        displayName: "display_name",
        jsonSchema: "json_schema",
    });
});
function updateJSONSchemaToolToJSON(updateJSONSchemaTool) {
    return JSON.stringify(exports.UpdateJSONSchemaTool$outboundSchema.parse(updateJSONSchemaTool));
}
/** @internal */
exports.UpdateToolRequestBodyStatus$outboundSchema = z.nativeEnum(exports.UpdateToolRequestBodyStatus);
/** @internal */
exports.UpdateToolRequestBodyToolsRequest1Type$outboundSchema = z.nativeEnum(exports.UpdateToolRequestBodyToolsRequest1Type);
/** @internal */
exports.UpdateToolRequestBodyParameters$outboundSchema = z.object({
    type: exports.UpdateToolRequestBodyToolsRequest1Type$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 updateToolRequestBodyParametersToJSON(updateToolRequestBodyParameters) {
    return JSON.stringify(exports.UpdateToolRequestBodyParameters$outboundSchema.parse(updateToolRequestBodyParameters));
}
/** @internal */
exports.UpdateToolRequestBodyFunction$outboundSchema = z.object({
    name: z.string(),
    description: z.string().optional(),
    strict: z.boolean().optional(),
    parameters: z.lazy(() => exports.UpdateToolRequestBodyParameters$outboundSchema)
        .optional(),
});
function updateToolRequestBodyFunctionToJSON(updateToolRequestBodyFunction) {
    return JSON.stringify(exports.UpdateToolRequestBodyFunction$outboundSchema.parse(updateToolRequestBodyFunction));
}
/** @internal */
exports.RequestBodyVersionIncrement$outboundSchema = z.nativeEnum(exports.RequestBodyVersionIncrement);
/** @internal */
exports.UpdateFunctionTool$outboundSchema = z.object({
    path: z.string().optional(),
    key: z.string().optional(),
    displayName: z.string().optional(),
    description: z.string().optional(),
    status: exports.UpdateToolRequestBodyStatus$outboundSchema.default("live"),
    type: z.literal("function"),
    function: z.lazy(() => exports.UpdateToolRequestBodyFunction$outboundSchema)
        .optional(),
    versionIncrement: exports.RequestBodyVersionIncrement$outboundSchema.optional(),
    versionDescription: z.string().optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        displayName: "display_name",
    });
});
function updateFunctionToolToJSON(updateFunctionTool) {
    return JSON.stringify(exports.UpdateFunctionTool$outboundSchema.parse(updateFunctionTool));
}
/** @internal */
exports.UpdateToolRequestBody$outboundSchema = z.union([
    z.lazy(() => exports.UpdateFunctionTool$outboundSchema),
    z.lazy(() => exports.UpdateJSONSchemaTool$outboundSchema),
    z.lazy(() => exports.UpdateHTTPTool$outboundSchema),
    z.lazy(() => exports.UpdateMCPTool$outboundSchema),
    z.lazy(() => exports.UpdateCodeExecutionTool$outboundSchema),
]);
function updateToolRequestBodyToJSON(updateToolRequestBody) {
    return JSON.stringify(exports.UpdateToolRequestBody$outboundSchema.parse(updateToolRequestBody));
}
/** @internal */
exports.UpdateToolRequest$outboundSchema = z.object({
    toolId: z.string(),
    requestBody: z.union([
        z.lazy(() => exports.UpdateFunctionTool$outboundSchema),
        z.lazy(() => exports.UpdateJSONSchemaTool$outboundSchema),
        z.lazy(() => exports.UpdateHTTPTool$outboundSchema),
        z.lazy(() => exports.UpdateMCPTool$outboundSchema),
        z.lazy(() => exports.UpdateCodeExecutionTool$outboundSchema),
    ]).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        toolId: "tool_id",
        requestBody: "RequestBody",
    });
});
function updateToolRequestToJSON(updateToolRequest) {
    return JSON.stringify(exports.UpdateToolRequest$outboundSchema.parse(updateToolRequest));
}
/** @internal */
exports.UpdateToolResponseBodyToolsResponse200ApplicationJSONStatus$inboundSchema = z.nativeEnum(exports.UpdateToolResponseBodyToolsResponse200ApplicationJSONStatus);
/** @internal */
exports.UpdateToolResponseBodyToolsResponse200ApplicationJson5Type$inboundSchema = z.nativeEnum(exports.UpdateToolResponseBodyToolsResponse200ApplicationJson5Type);
/** @internal */
exports.UpdateToolResponseBodyToolsParameters$inboundSchema = (0, schemas_js_1.collectExtraKeys)(z.object({
    type: exports.UpdateToolResponseBodyToolsResponse200ApplicationJson5Type$inboundSchema,
    properties: z.record(z.any()),
    required: z.array(z.string()),
}).catchall(z.any()), "additionalProperties", true);
function updateToolResponseBodyToolsParametersFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateToolResponseBodyToolsParameters$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateToolResponseBodyToolsParameters' from JSON`);
}
/** @internal */
exports.UpdateToolResponseBodyLanguage$inboundSchema = z.nativeEnum(exports.UpdateToolResponseBodyLanguage);
/** @internal */
exports.UpdateToolResponseBodyCodeTool$inboundSchema = z.object({
    parameters: z.lazy(() => exports.UpdateToolResponseBodyToolsParameters$inboundSchema)
        .optional(),
    language: exports.UpdateToolResponseBodyLanguage$inboundSchema,
    code: z.string(),
});
function updateToolResponseBodyCodeToolFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateToolResponseBodyCodeTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateToolResponseBodyCodeTool' from JSON`);
}
/** @internal */
exports.UpdateToolResponseBodyCodeExecutionTool$inboundSchema = z.object({
    _id: z.string().default("tool_01KVA7AGR9N78D3Z8VSZB9M8EB"),
    path: z.string(),
    key: z.string(),
    display_name: z.string().optional(),
    description: z.string(),
    created_by_id: z.nullable(z.string()).optional(),
    updated_by_id: z.nullable(z.string()).optional(),
    project_id: z.string(),
    workspace_id: z.string(),
    created: z.string(),
    updated: z.string(),
    status: exports.UpdateToolResponseBodyToolsResponse200ApplicationJSONStatus$inboundSchema
        .default("live"),
    type: z.literal("code"),
    code_tool: z.lazy(() => exports.UpdateToolResponseBodyCodeTool$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",
        "code_tool": "codeTool",
    });
});
function updateToolResponseBodyCodeExecutionToolFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateToolResponseBodyCodeExecutionTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateToolResponseBodyCodeExecutionTool' from JSON`);
}
/** @internal */
exports.UpdateToolResponseBodyToolsResponse200Status$inboundSchema = z
    .nativeEnum(exports.UpdateToolResponseBodyToolsResponse200Status);
/** @internal */
exports.UpdateToolResponseBodyHeaders$inboundSchema = z.object({
    value: z.string(),
    encrypted: z.boolean().default(false),
});
function updateToolResponseBodyHeadersFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateToolResponseBodyHeaders$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateToolResponseBodyHeaders' from JSON`);
}
/** @internal */
exports.UpdateToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema = z.nativeEnum(exports.UpdateToolResponseBodyToolsResponse200ApplicationJson4Type);
/** @internal */
exports.UpdateToolResponseBodyToolsSchema$inboundSchema = z.object({
    type: exports.UpdateToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema,
    properties: z.record(z.any()).optional(),
    required: z.array(z.string()).optional(),
});
function updateToolResponseBodyToolsSchemaFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateToolResponseBodyToolsSchema$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateToolResponseBodyToolsSchema' from JSON`);
}
/** @internal */
exports.UpdateToolResponseBodyTools$inboundSchema = z.object({
    id: z.string().default("01KVA7AGR8EX4Z6H05CVNN6S0Q"),
    name: z.string(),
    description: z.string().optional(),
    schema: z.lazy(() => exports.UpdateToolResponseBodyToolsSchema$inboundSchema),
});
function updateToolResponseBodyToolsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateToolResponseBodyTools$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateToolResponseBodyTools' from JSON`);
}
/** @internal */
exports.UpdateToolResponseBodyConnectionType$inboundSchema = z.nativeEnum(exports.UpdateToolResponseBodyConnectionType);
/** @internal */
exports.UpdateToolResponseBodyMcp$inboundSchema = z.object({
    server_url: z.string(),
    headers: z.record(z.lazy(() => exports.UpdateToolResponseBodyHeaders$inboundSchema))
        .optional(),
    tools: z.array(z.lazy(() => exports.UpdateToolResponseBodyTools$inboundSchema)),
    connection_type: exports.UpdateToolResponseBodyConnectionType$inboundSchema,
    template_variables: z.nullable(z.array(z.string())).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "server_url": "serverUrl",
        "connection_type": "connectionType",
        "template_variables": "templateVariables",
    });
});
function updateToolResponseBodyMcpFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateToolResponseBodyMcp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateToolResponseBodyMcp' from JSON`);
}
/** @internal */
exports.UpdateToolResponseBodyMCPTool$inboundSchema = z.object({
    _id: z.string().default("tool_01KVA7AGR645ARWFY2QN735Q3F"),
    path: z.string(),
    key: z.string(),
    display_name: z.string().optional(),
    description: z.string(),
    created_by_id: z.nullable(z.string()).optional(),
    updated_by_id: z.nullable(z.string()).optional(),
    project_id: z.string(),
    workspace_id: z.string(),
    created: z.string(),
    updated: z.string(),
    status: exports.UpdateToolResponseBodyToolsResponse200Status$inboundSchema.default("live"),
    type: z.literal("mcp"),
    mcp: z.lazy(() => exports.UpdateToolResponseBodyMcp$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",
    });
});
function updateToolResponseBodyMCPToolFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateToolResponseBodyMCPTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateToolResponseBodyMCPTool' from JSON`);
}
/** @internal */
exports.UpdateToolResponseBodyToolsResponseStatus$inboundSchema = z
    .nativeEnum(exports.UpdateToolResponseBodyToolsResponseStatus);
/** @internal */
exports.UpdateToolResponseBodyMethod$inboundSchema = z.nativeEnum(exports.UpdateToolResponseBodyMethod);
/** @internal */
exports.UpdateToolHeadersTools2$inboundSchema = z.object({
    value: z.string(),
    encrypted: z.boolean().default(false),
});
function updateToolHeadersTools2FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateToolHeadersTools2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateToolHeadersTools2' from JSON`);
}
/** @internal */
exports.UpdateToolResponseBodyToolsHeaders$inboundSchema = z.union([z.lazy(() => exports.UpdateToolHeadersTools2$inboundSchema), z.string()]);
function updateToolResponseBodyToolsHeadersFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateToolResponseBodyToolsHeaders$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateToolResponseBodyToolsHeaders' from JSON`);
}
/** @internal */
exports.UpdateToolResponseBodyBlueprint$inboundSchema = z.object({
    url: z.string(),
    method: exports.UpdateToolResponseBodyMethod$inboundSchema,
    headers: z.record(z.union([z.lazy(() => exports.UpdateToolHeadersTools2$inboundSchema), z.string()])).optional(),
    body: z.record(z.any()).optional(),
});
function updateToolResponseBodyBlueprintFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateToolResponseBodyBlueprint$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateToolResponseBodyBlueprint' from JSON`);
}
/** @internal */
exports.UpdateToolResponseBodyToolsResponse200ApplicationJson3Type$inboundSchema = z.nativeEnum(exports.UpdateToolResponseBodyToolsResponse200ApplicationJson3Type);
/** @internal */
exports.UpdateToolResponseBodyDefaultValue$inboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function updateToolResponseBodyDefaultValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateToolResponseBodyDefaultValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateToolResponseBodyDefaultValue' from JSON`);
}
/** @internal */
exports.UpdateToolResponseBodyArguments$inboundSchema = z.object({
    type: exports.UpdateToolResponseBodyToolsResponse200ApplicationJson3Type$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",
    });
});
function updateToolResponseBodyArgumentsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateToolResponseBodyArguments$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateToolResponseBodyArguments' from JSON`);
}
/** @internal */
exports.UpdateToolResponseBodyHttp$inboundSchema = z.object({
    blueprint: z.lazy(() => exports.UpdateToolResponseBodyBlueprint$inboundSchema),
    arguments: z.record(z.lazy(() => exports.UpdateToolResponseBodyArguments$inboundSchema)).optional(),
});
function updateToolResponseBodyHttpFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateToolResponseBodyHttp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateToolResponseBodyHttp' from JSON`);
}
/** @internal */
exports.UpdateToolResponseBodyHTTPTool$inboundSchema = z.object({
    _id: z.string().default("tool_01KVA7AGR4CGP3E12CFHFTWGSM"),
    path: z.string(),
    key: z.string(),
    display_name: z.string().optional(),
    description: z.string(),
    created_by_id: z.nullable(z.string()).optional(),
    updated_by_id: z.nullable(z.string()).optional(),
    project_id: z.string(),
    workspace_id: z.string(),
    created: z.string(),
    updated: z.string(),
    status: exports.UpdateToolResponseBodyToolsResponseStatus$inboundSchema.default("live"),
    type: z.literal("http"),
    http: z.lazy(() => exports.UpdateToolResponseBodyHttp$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",
    });
});
function updateToolResponseBodyHTTPToolFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateToolResponseBodyHTTPTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateToolResponseBodyHTTPTool' from JSON`);
}
/** @internal */
exports.UpdateToolResponseBodyToolsStatus$inboundSchema = z.nativeEnum(exports.UpdateToolResponseBodyToolsStatus);
/** @internal */
exports.UpdateToolResponseBodySchema$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);
function updateToolResponseBodySchemaFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateToolResponseBodySchema$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateToolResponseBodySchema' from JSON`);
}
/** @internal */
exports.UpdateToolResponseBodyJsonSchema$inboundSchema = z.object({
    name: z.string(),
    description: z.string(),
    schema: z.lazy(() => exports.UpdateToolResponseBodySchema$inboundSchema),
    strict: z.boolean().optional(),
});
function updateToolResponseBodyJsonSchemaFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateToolResponseBodyJsonSchema$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateToolResponseBodyJsonSchema' from JSON`);
}
/** @internal */
exports.UpdateToolResponseBodyJSONSchemaTool$inboundSchema = z.object({
    _id: z.string().default("tool_01KVA7AGR3EBBRD3NTRYBM6124"),
    path: z.string(),
    key: z.string(),
    display_name: z.string().optional(),
    description: z.string(),
    created_by_id: z.nullable(z.string()).optional(),
    updated_by_id: z.nullable(z.string()).optional(),
    project_id: z.string(),
    workspace_id: z.string(),
    created: z.string(),
    updated: z.string(),
    status: exports.UpdateToolResponseBodyToolsStatus$inboundSchema.default("live"),
    type: z.literal("json_schema"),
    json_schema: z.lazy(() => exports.UpdateToolResponseBodyJsonSchema$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",
        "json_schema": "jsonSchema",
    });
});
function updateToolResponseBodyJSONSchemaToolFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateToolResponseBodyJSONSchemaTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateToolResponseBodyJSONSchemaTool' from JSON`);
}
/** @internal */
exports.UpdateToolResponseBodyStatus$inboundSchema = z.nativeEnum(exports.UpdateToolResponseBodyStatus);
/** @internal */
exports.UpdateToolResponseBodyToolsResponse200ApplicationJson1Type$inboundSchema = z.nativeEnum(exports.UpdateToolResponseBodyToolsResponse200ApplicationJson1Type);
/** @internal */
exports.UpdateToolResponseBodyParameters$inboundSchema = (0, schemas_js_1.collectExtraKeys)(z.object({
    type: exports.UpdateToolResponseBodyToolsResponse200ApplicationJson1Type$inboundSchema,
    properties: z.record(z.any()),
    required: z.array(z.string()),
}).catchall(z.any()), "additionalProperties", true);
function updateToolResponseBodyParametersFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateToolResponseBodyParameters$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateToolResponseBodyParameters' from JSON`);
}
/** @internal */
exports.UpdateToolResponseBodyFunction$inboundSchema = z.object({
    name: z.string(),
    description: z.string().optional(),
    strict: z.boolean().optional(),
    parameters: z.lazy(() => exports.UpdateToolResponseBodyParameters$inboundSchema)
        .optional(),
});
function updateToolResponseBodyFunctionFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateToolResponseBodyFunction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateToolResponseBodyFunction' from JSON`);
}
/** @internal */
exports.UpdateToolResponseBodyFunctionTool$inboundSchema = z.object({
    _id: z.string().default("tool_01KVA7AGR143BFV52Z4HJJGCYY"),
    path: z.string(),
    key: z.string(),
    display_name: z.string().optional(),
    description: z.string(),
    created_by_id: z.nullable(z.string()).optional(),
    updated_by_id: z.nullable(z.string()).optional(),
    project_id: z.string(),
    workspace_id: z.string(),
    created: z.string(),
    updated: z.string(),
    status: exports.UpdateToolResponseBodyStatus$inboundSchema.default("live"),
    type: z.literal("function"),
    function: z.lazy(() => exports.UpdateToolResponseBodyFunction$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",
    });
});
function updateToolResponseBodyFunctionToolFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateToolResponseBodyFunctionTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateToolResponseBodyFunctionTool' from JSON`);
}
/** @internal */
exports.UpdateToolResponseBody$inboundSchema = z.union([
    z.lazy(() => exports.UpdateToolResponseBodyFunctionTool$inboundSchema),
    z.lazy(() => exports.UpdateToolResponseBodyJSONSchemaTool$inboundSchema),
    z.lazy(() => exports.UpdateToolResponseBodyHTTPTool$inboundSchema),
    z.lazy(() => exports.UpdateToolResponseBodyMCPTool$inboundSchema),
    z.lazy(() => exports.UpdateToolResponseBodyCodeExecutionTool$inboundSchema),
]);
function updateToolResponseBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.UpdateToolResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateToolResponseBody' from JSON`);
}
//# sourceMappingURL=updatetool.js.map