"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.CreateToolRequestBodyToolsRequest1Type$outboundSchema = exports.CreateToolRequestBodyToolsRequest1Status$outboundSchema = exports.RequestBodyJSONSchemaTool$outboundSchema = exports.RequestBodyJsonSchema$outboundSchema = exports.RequestBodySchema$outboundSchema = exports.RequestBodyStatus$outboundSchema = exports.RequestBodyHTTPTool$outboundSchema = exports.RequestBodyHttp$outboundSchema = exports.RequestBodyArguments$outboundSchema = exports.RequestBodyDefaultValue$outboundSchema = exports.CreateToolRequestBodyToolsRequest3Type$outboundSchema = exports.RequestBodyBlueprint$outboundSchema = exports.CreateToolRequestBodyHeaders$outboundSchema = exports.CreateToolHeaders2$outboundSchema = exports.RequestBodyMethod$outboundSchema = exports.CreateToolRequestBodyStatus$outboundSchema = exports.RequestBodyMCPTool$outboundSchema = exports.RequestBodyMcp$outboundSchema = exports.RequestBodyConnectionType$outboundSchema = exports.RequestBodyHeaders$outboundSchema = exports.CreateToolRequestBodyToolsStatus$outboundSchema = exports.RequestBodyCodeExecutionTool$outboundSchema = exports.RequestBodyCodeTool$outboundSchema = exports.RequestBodyLanguage$outboundSchema = exports.CreateToolRequestBodyParameters$outboundSchema = exports.CreateToolRequestBodyToolsRequest5CodeToolType$outboundSchema = exports.CreateToolRequestBodyToolsRequestStatus$outboundSchema = exports.CreateToolResponseBodyToolsResponse200ApplicationJson1Type = exports.ResponseBodyStatus = exports.CreateToolResponseBodyStatus = exports.CreateToolResponseBodyToolsResponse200ApplicationJson3Type = exports.CreateToolResponseBodyMethod = exports.CreateToolResponseBodyToolsStatus = exports.ResponseBodyConnectionType = exports.CreateToolResponseBodyToolsResponse200ApplicationJson4Type = exports.CreateToolResponseBodyToolsResponseStatus = exports.ResponseBodyLanguage = exports.CreateToolResponseBodyToolsResponse200ApplicationJson5Type = exports.CreateToolResponseBodyToolsResponse200Status = exports.CreateToolRequestBodyToolsRequest1Type = exports.CreateToolRequestBodyToolsRequest1Status = exports.RequestBodyStatus = exports.CreateToolRequestBodyToolsRequest3Type = exports.RequestBodyMethod = exports.CreateToolRequestBodyStatus = exports.RequestBodyConnectionType = exports.CreateToolRequestBodyToolsStatus = exports.RequestBodyLanguage = exports.CreateToolRequestBodyToolsRequest5CodeToolType = exports.CreateToolRequestBodyToolsRequestStatus = void 0;
exports.CreateToolResponseBody$inboundSchema = exports.ResponseBodyFunctionTool$inboundSchema = exports.CreateToolResponseBodyFunction$inboundSchema = exports.ResponseBodyParameters$inboundSchema = exports.CreateToolResponseBodyToolsResponse200ApplicationJson1Type$inboundSchema = exports.ResponseBodyStatus$inboundSchema = exports.ResponseBodyJSONSchemaTool$inboundSchema = exports.ResponseBodyJsonSchema$inboundSchema = exports.ResponseBodySchema$inboundSchema = exports.CreateToolResponseBodyStatus$inboundSchema = exports.ResponseBodyHTTPTool$inboundSchema = exports.CreateToolResponseBodyHttp$inboundSchema = exports.ResponseBodyArguments$inboundSchema = exports.ResponseBodyDefaultValue$inboundSchema = exports.CreateToolResponseBodyToolsResponse200ApplicationJson3Type$inboundSchema = exports.ResponseBodyBlueprint$inboundSchema = exports.CreateToolResponseBodyHeaders$inboundSchema = exports.CreateToolHeadersTools2$inboundSchema = exports.CreateToolResponseBodyMethod$inboundSchema = exports.CreateToolResponseBodyToolsStatus$inboundSchema = exports.ResponseBodyMCPTool$inboundSchema = exports.ResponseBodyMcp$inboundSchema = exports.ResponseBodyConnectionType$inboundSchema = exports.ResponseBodyTools$inboundSchema = exports.CreateToolResponseBodySchema$inboundSchema = exports.CreateToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema = exports.ResponseBodyHeaders$inboundSchema = exports.CreateToolResponseBodyToolsResponseStatus$inboundSchema = exports.ResponseBodyCodeExecutionTool$inboundSchema = exports.ResponseBodyCodeTool$inboundSchema = exports.ResponseBodyLanguage$inboundSchema = exports.CreateToolResponseBodyParameters$inboundSchema = exports.CreateToolResponseBodyToolsResponse200ApplicationJson5Type$inboundSchema = exports.CreateToolResponseBodyToolsResponse200Status$inboundSchema = exports.CreateToolRequestBody$outboundSchema = exports.RequestBodyFunctionTool$outboundSchema = exports.RequestBodyFunction$outboundSchema = exports.RequestBodyParameters$outboundSchema = void 0;
exports.createToolRequestBodyParametersToJSON = createToolRequestBodyParametersToJSON;
exports.requestBodyCodeToolToJSON = requestBodyCodeToolToJSON;
exports.requestBodyCodeExecutionToolToJSON = requestBodyCodeExecutionToolToJSON;
exports.requestBodyHeadersToJSON = requestBodyHeadersToJSON;
exports.requestBodyMcpToJSON = requestBodyMcpToJSON;
exports.requestBodyMCPToolToJSON = requestBodyMCPToolToJSON;
exports.createToolHeaders2ToJSON = createToolHeaders2ToJSON;
exports.createToolRequestBodyHeadersToJSON = createToolRequestBodyHeadersToJSON;
exports.requestBodyBlueprintToJSON = requestBodyBlueprintToJSON;
exports.requestBodyDefaultValueToJSON = requestBodyDefaultValueToJSON;
exports.requestBodyArgumentsToJSON = requestBodyArgumentsToJSON;
exports.requestBodyHttpToJSON = requestBodyHttpToJSON;
exports.requestBodyHTTPToolToJSON = requestBodyHTTPToolToJSON;
exports.requestBodySchemaToJSON = requestBodySchemaToJSON;
exports.requestBodyJsonSchemaToJSON = requestBodyJsonSchemaToJSON;
exports.requestBodyJSONSchemaToolToJSON = requestBodyJSONSchemaToolToJSON;
exports.requestBodyParametersToJSON = requestBodyParametersToJSON;
exports.requestBodyFunctionToJSON = requestBodyFunctionToJSON;
exports.requestBodyFunctionToolToJSON = requestBodyFunctionToolToJSON;
exports.createToolRequestBodyToJSON = createToolRequestBodyToJSON;
exports.createToolResponseBodyParametersFromJSON = createToolResponseBodyParametersFromJSON;
exports.responseBodyCodeToolFromJSON = responseBodyCodeToolFromJSON;
exports.responseBodyCodeExecutionToolFromJSON = responseBodyCodeExecutionToolFromJSON;
exports.responseBodyHeadersFromJSON = responseBodyHeadersFromJSON;
exports.createToolResponseBodySchemaFromJSON = createToolResponseBodySchemaFromJSON;
exports.responseBodyToolsFromJSON = responseBodyToolsFromJSON;
exports.responseBodyMcpFromJSON = responseBodyMcpFromJSON;
exports.responseBodyMCPToolFromJSON = responseBodyMCPToolFromJSON;
exports.createToolHeadersTools2FromJSON = createToolHeadersTools2FromJSON;
exports.createToolResponseBodyHeadersFromJSON = createToolResponseBodyHeadersFromJSON;
exports.responseBodyBlueprintFromJSON = responseBodyBlueprintFromJSON;
exports.responseBodyDefaultValueFromJSON = responseBodyDefaultValueFromJSON;
exports.responseBodyArgumentsFromJSON = responseBodyArgumentsFromJSON;
exports.createToolResponseBodyHttpFromJSON = createToolResponseBodyHttpFromJSON;
exports.responseBodyHTTPToolFromJSON = responseBodyHTTPToolFromJSON;
exports.responseBodySchemaFromJSON = responseBodySchemaFromJSON;
exports.responseBodyJsonSchemaFromJSON = responseBodyJsonSchemaFromJSON;
exports.responseBodyJSONSchemaToolFromJSON = responseBodyJSONSchemaToolFromJSON;
exports.responseBodyParametersFromJSON = responseBodyParametersFromJSON;
exports.createToolResponseBodyFunctionFromJSON = createToolResponseBodyFunctionFromJSON;
exports.responseBodyFunctionToolFromJSON = responseBodyFunctionToolFromJSON;
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",
};
/**
 * 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",
};
/**
 * 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",
};
/**
 * The HTTP method to use.
 */
exports.RequestBodyMethod = {
    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",
};
/**
 * 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",
};
/**
 * 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",
};
/**
 * 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.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",
};
/**
 * 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",
};
/**
 * 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",
};
/**
 * The type must be "object"
 */
exports.CreateToolResponseBodyToolsResponse200ApplicationJson1Type = {
    Object: "object",
};
/** @internal */
exports.CreateToolRequestBodyToolsRequestStatus$outboundSchema = z
    .nativeEnum(exports.CreateToolRequestBodyToolsRequestStatus);
/** @internal */
exports.CreateToolRequestBodyToolsRequest5CodeToolType$outboundSchema = z
    .nativeEnum(exports.CreateToolRequestBodyToolsRequest5CodeToolType);
/** @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));
}
/** @internal */
exports.RequestBodyLanguage$outboundSchema = z.nativeEnum(exports.RequestBodyLanguage);
/** @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));
}
/** @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: z.literal("code"),
    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));
}
/** @internal */
exports.CreateToolRequestBodyToolsStatus$outboundSchema = z.nativeEnum(exports.CreateToolRequestBodyToolsStatus);
/** @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));
}
/** @internal */
exports.RequestBodyConnectionType$outboundSchema = z.nativeEnum(exports.RequestBodyConnectionType);
/** @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));
}
/** @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: z.literal("mcp"),
    mcp: z.lazy(() => exports.RequestBodyMcp$outboundSchema),
    discoveryVariables: z.record(z.string()).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        displayName: "display_name",
        discoveryVariables: "discovery_variables",
    });
});
function requestBodyMCPToolToJSON(requestBodyMCPTool) {
    return JSON.stringify(exports.RequestBodyMCPTool$outboundSchema.parse(requestBodyMCPTool));
}
/** @internal */
exports.CreateToolRequestBodyStatus$outboundSchema = z.nativeEnum(exports.CreateToolRequestBodyStatus);
/** @internal */
exports.RequestBodyMethod$outboundSchema = z.nativeEnum(exports.RequestBodyMethod);
/** @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));
}
/** @internal */
exports.CreateToolRequestBodyHeaders$outboundSchema = z.union([z.lazy(() => exports.CreateToolHeaders2$outboundSchema), z.string()]);
function createToolRequestBodyHeadersToJSON(createToolRequestBodyHeaders) {
    return JSON.stringify(exports.CreateToolRequestBodyHeaders$outboundSchema.parse(createToolRequestBodyHeaders));
}
/** @internal */
exports.RequestBodyBlueprint$outboundSchema = z.object({
    url: z.string(),
    method: exports.RequestBodyMethod$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));
}
/** @internal */
exports.CreateToolRequestBodyToolsRequest3Type$outboundSchema = z.nativeEnum(exports.CreateToolRequestBodyToolsRequest3Type);
/** @internal */
exports.RequestBodyDefaultValue$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function requestBodyDefaultValueToJSON(requestBodyDefaultValue) {
    return JSON.stringify(exports.RequestBodyDefaultValue$outboundSchema.parse(requestBodyDefaultValue));
}
/** @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));
}
/** @internal */
exports.RequestBodyHttp$outboundSchema = z.object({
    blueprint: z.lazy(() => exports.RequestBodyBlueprint$outboundSchema),
    arguments: z.record(z.lazy(() => exports.RequestBodyArguments$outboundSchema))
        .optional(),
});
function requestBodyHttpToJSON(requestBodyHttp) {
    return JSON.stringify(exports.RequestBodyHttp$outboundSchema.parse(requestBodyHttp));
}
/** @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: z.literal("http"),
    http: z.lazy(() => exports.RequestBodyHttp$outboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        displayName: "display_name",
    });
});
function requestBodyHTTPToolToJSON(requestBodyHTTPTool) {
    return JSON.stringify(exports.RequestBodyHTTPTool$outboundSchema.parse(requestBodyHTTPTool));
}
/** @internal */
exports.RequestBodyStatus$outboundSchema = z.nativeEnum(exports.RequestBodyStatus);
/** @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));
}
/** @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));
}
/** @internal */
exports.RequestBodyJSONSchemaTool$outboundSchema = z.object({
    path: z.string(),
    key: z.string(),
    displayName: z.string().optional(),
    description: z.string(),
    status: exports.RequestBodyStatus$outboundSchema.default("live"),
    type: z.literal("json_schema"),
    jsonSchema: z.lazy(() => exports.RequestBodyJsonSchema$outboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        displayName: "display_name",
        jsonSchema: "json_schema",
    });
});
function requestBodyJSONSchemaToolToJSON(requestBodyJSONSchemaTool) {
    return JSON.stringify(exports.RequestBodyJSONSchemaTool$outboundSchema.parse(requestBodyJSONSchemaTool));
}
/** @internal */
exports.CreateToolRequestBodyToolsRequest1Status$outboundSchema = z
    .nativeEnum(exports.CreateToolRequestBodyToolsRequest1Status);
/** @internal */
exports.CreateToolRequestBodyToolsRequest1Type$outboundSchema = z.nativeEnum(exports.CreateToolRequestBodyToolsRequest1Type);
/** @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));
}
/** @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));
}
/** @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: z.literal("function"),
    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));
}
/** @internal */
exports.CreateToolRequestBody$outboundSchema = z.union([
    z.lazy(() => exports.RequestBodyFunctionTool$outboundSchema),
    z.lazy(() => exports.RequestBodyJSONSchemaTool$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));
}
/** @internal */
exports.CreateToolResponseBodyToolsResponse200Status$inboundSchema = z
    .nativeEnum(exports.CreateToolResponseBodyToolsResponse200Status);
/** @internal */
exports.CreateToolResponseBodyToolsResponse200ApplicationJson5Type$inboundSchema = z.nativeEnum(exports.CreateToolResponseBodyToolsResponse200ApplicationJson5Type);
/** @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);
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.ResponseBodyCodeTool$inboundSchema = z.object({
    parameters: z.lazy(() => exports.CreateToolResponseBodyParameters$inboundSchema)
        .optional(),
    language: exports.ResponseBodyLanguage$inboundSchema,
    code: z.string(),
});
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_01KW839EZFP6KYXTGHRPKF3X9N"),
    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.CreateToolResponseBodyToolsResponse200Status$inboundSchema.default("live"),
    type: z.literal("code"),
    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",
        "code_tool": "codeTool",
    });
});
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.ResponseBodyHeaders$inboundSchema = z.object({
    value: z.string(),
    encrypted: z.boolean().default(false),
});
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.CreateToolResponseBodySchema$inboundSchema = z.object({
    type: exports.CreateToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema,
    properties: z.record(z.any()).optional(),
    required: z.array(z.string()).optional(),
});
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("01KW839EZE9W46NKBERX847MYG"),
    name: z.string(),
    description: z.string().optional(),
    schema: z.lazy(() => exports.CreateToolResponseBodySchema$inboundSchema),
});
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.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,
    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 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_01KW839EZDZH05VP3Y47YE7XVW"),
    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.CreateToolResponseBodyToolsResponseStatus$inboundSchema.default("live"),
    type: z.literal("mcp"),
    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",
    });
});
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.CreateToolResponseBodyMethod$inboundSchema = z.nativeEnum(exports.CreateToolResponseBodyMethod);
/** @internal */
exports.CreateToolHeadersTools2$inboundSchema = z.object({
    value: z.string(),
    encrypted: z.boolean().default(false),
});
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()]);
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(),
});
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.ResponseBodyDefaultValue$inboundSchema = z.union([z.string(), z.number(), z.boolean()]);
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",
    });
});
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(),
});
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_01KW839EZBDJMR2HVE33N49BK2"),
    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.CreateToolResponseBodyToolsStatus$inboundSchema.default("live"),
    type: z.literal("http"),
    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",
    });
});
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.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);
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(),
});
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_01KW839EZ9PH8J42JHQ3CTN7R5"),
    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.CreateToolResponseBodyStatus$inboundSchema.default("live"),
    type: z.literal("json_schema"),
    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",
        "json_schema": "jsonSchema",
    });
});
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.CreateToolResponseBodyToolsResponse200ApplicationJson1Type$inboundSchema = z.nativeEnum(exports.CreateToolResponseBodyToolsResponse200ApplicationJson1Type);
/** @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);
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(),
});
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_01KW839EZ7N0KZTWT7A99GVCGE"),
    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.ResponseBodyStatus$inboundSchema.default("live"),
    type: z.literal("function"),
    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",
    });
});
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),
]);
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