"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.RetrieveToolResponseBody$inboundSchema = exports.RetrieveToolResponseBodyFunctionTool$inboundSchema = exports.RetrieveToolResponseBodyFunction$inboundSchema = exports.RetrieveToolResponseBodyParameters$inboundSchema = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson1Type$inboundSchema = exports.RetrieveToolResponseBodyStatus$inboundSchema = exports.RetrieveToolResponseBodyJSONSchemaTool$inboundSchema = exports.RetrieveToolResponseBodyJsonSchema$inboundSchema = exports.RetrieveToolResponseBodySchema$inboundSchema = exports.RetrieveToolResponseBodyToolsStatus$inboundSchema = exports.RetrieveToolResponseBodyHTTPTool$inboundSchema = exports.RetrieveToolResponseBodyHttp$inboundSchema = exports.RetrieveToolResponseBodyArguments$inboundSchema = exports.RetrieveToolResponseBodyDefaultValue$inboundSchema = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson3Type$inboundSchema = exports.RetrieveToolResponseBodyBlueprint$inboundSchema = exports.RetrieveToolResponseBodyToolsHeaders$inboundSchema = exports.RetrieveToolHeaders2$inboundSchema = exports.RetrieveToolResponseBodyMethod$inboundSchema = exports.RetrieveToolResponseBodyToolsResponseStatus$inboundSchema = exports.RetrieveToolResponseBodyMCPTool$inboundSchema = exports.RetrieveToolResponseBodyMcp$inboundSchema = exports.RetrieveToolResponseBodyConnectionType$inboundSchema = exports.RetrieveToolResponseBodyTools$inboundSchema = exports.RetrieveToolResponseBodyToolsSchema$inboundSchema = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema = exports.RetrieveToolResponseBodyHeaders$inboundSchema = exports.RetrieveToolResponseBodyToolsResponse200Status$inboundSchema = exports.RetrieveToolResponseBodyCodeExecutionTool$inboundSchema = exports.RetrieveToolResponseBodyCodeTool$inboundSchema = exports.RetrieveToolResponseBodyLanguage$inboundSchema = exports.RetrieveToolResponseBodyToolsParameters$inboundSchema = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson5Type$inboundSchema = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus$inboundSchema = exports.RetrieveToolRequest$outboundSchema = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson1Type = exports.RetrieveToolResponseBodyStatus = exports.RetrieveToolResponseBodyToolsStatus = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson3Type = exports.RetrieveToolResponseBodyMethod = exports.RetrieveToolResponseBodyToolsResponseStatus = exports.RetrieveToolResponseBodyConnectionType = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson4Type = exports.RetrieveToolResponseBodyToolsResponse200Status = exports.RetrieveToolResponseBodyLanguage = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson5Type = exports.RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus = void 0;
exports.retrieveToolRequestToJSON = retrieveToolRequestToJSON;
exports.retrieveToolResponseBodyToolsParametersFromJSON = retrieveToolResponseBodyToolsParametersFromJSON;
exports.retrieveToolResponseBodyCodeToolFromJSON = retrieveToolResponseBodyCodeToolFromJSON;
exports.retrieveToolResponseBodyCodeExecutionToolFromJSON = retrieveToolResponseBodyCodeExecutionToolFromJSON;
exports.retrieveToolResponseBodyHeadersFromJSON = retrieveToolResponseBodyHeadersFromJSON;
exports.retrieveToolResponseBodyToolsSchemaFromJSON = retrieveToolResponseBodyToolsSchemaFromJSON;
exports.retrieveToolResponseBodyToolsFromJSON = retrieveToolResponseBodyToolsFromJSON;
exports.retrieveToolResponseBodyMcpFromJSON = retrieveToolResponseBodyMcpFromJSON;
exports.retrieveToolResponseBodyMCPToolFromJSON = retrieveToolResponseBodyMCPToolFromJSON;
exports.retrieveToolHeaders2FromJSON = retrieveToolHeaders2FromJSON;
exports.retrieveToolResponseBodyToolsHeadersFromJSON = retrieveToolResponseBodyToolsHeadersFromJSON;
exports.retrieveToolResponseBodyBlueprintFromJSON = retrieveToolResponseBodyBlueprintFromJSON;
exports.retrieveToolResponseBodyDefaultValueFromJSON = retrieveToolResponseBodyDefaultValueFromJSON;
exports.retrieveToolResponseBodyArgumentsFromJSON = retrieveToolResponseBodyArgumentsFromJSON;
exports.retrieveToolResponseBodyHttpFromJSON = retrieveToolResponseBodyHttpFromJSON;
exports.retrieveToolResponseBodyHTTPToolFromJSON = retrieveToolResponseBodyHTTPToolFromJSON;
exports.retrieveToolResponseBodySchemaFromJSON = retrieveToolResponseBodySchemaFromJSON;
exports.retrieveToolResponseBodyJsonSchemaFromJSON = retrieveToolResponseBodyJsonSchemaFromJSON;
exports.retrieveToolResponseBodyJSONSchemaToolFromJSON = retrieveToolResponseBodyJSONSchemaToolFromJSON;
exports.retrieveToolResponseBodyParametersFromJSON = retrieveToolResponseBodyParametersFromJSON;
exports.retrieveToolResponseBodyFunctionFromJSON = retrieveToolResponseBodyFunctionFromJSON;
exports.retrieveToolResponseBodyFunctionToolFromJSON = retrieveToolResponseBodyFunctionToolFromJSON;
exports.retrieveToolResponseBodyFromJSON = retrieveToolResponseBodyFromJSON;
const z = __importStar(require("zod/v3"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
/**
 * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
 */
exports.RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus = {
    Live: "live",
    Draft: "draft",
    Pending: "pending",
    Published: "published",
};
/**
 * The type must be "object"
 */
exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson5Type = {
    Object: "object",
};
exports.RetrieveToolResponseBodyLanguage = {
    Python: "python",
};
/**
 * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
 */
exports.RetrieveToolResponseBodyToolsResponse200Status = {
    Live: "live",
    Draft: "draft",
    Pending: "pending",
    Published: "published",
};
exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson4Type = {
    Object: "object",
};
/**
 * The connection type used by the MCP server
 */
exports.RetrieveToolResponseBodyConnectionType = {
    Http: "http",
    Sse: "sse",
};
/**
 * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
 */
exports.RetrieveToolResponseBodyToolsResponseStatus = {
    Live: "live",
    Draft: "draft",
    Pending: "pending",
    Published: "published",
};
/**
 * The HTTP method to use.
 */
exports.RetrieveToolResponseBodyMethod = {
    Get: "GET",
    Post: "POST",
    Put: "PUT",
    Delete: "DELETE",
};
/**
 * The type of the argument.
 */
exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson3Type = {
    String: "string",
    Number: "number",
    Boolean: "boolean",
};
/**
 * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
 */
exports.RetrieveToolResponseBodyToolsStatus = {
    Live: "live",
    Draft: "draft",
    Pending: "pending",
    Published: "published",
};
/**
 * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
 */
exports.RetrieveToolResponseBodyStatus = {
    Live: "live",
    Draft: "draft",
    Pending: "pending",
    Published: "published",
};
/**
 * The type must be "object"
 */
exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson1Type = {
    Object: "object",
};
/** @internal */
exports.RetrieveToolRequest$outboundSchema = z.object({
    toolId: z.string(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        toolId: "tool_id",
    });
});
function retrieveToolRequestToJSON(retrieveToolRequest) {
    return JSON.stringify(exports.RetrieveToolRequest$outboundSchema.parse(retrieveToolRequest));
}
/** @internal */
exports.RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus$inboundSchema = z.nativeEnum(exports.RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus);
/** @internal */
exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson5Type$inboundSchema = z.nativeEnum(exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson5Type);
/** @internal */
exports.RetrieveToolResponseBodyToolsParameters$inboundSchema = (0, schemas_js_1.collectExtraKeys)(z.object({
    type: exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson5Type$inboundSchema,
    properties: z.record(z.any()),
    required: z.array(z.string()),
}).catchall(z.any()), "additionalProperties", true);
function retrieveToolResponseBodyToolsParametersFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyToolsParameters$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyToolsParameters' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyLanguage$inboundSchema = z.nativeEnum(exports.RetrieveToolResponseBodyLanguage);
/** @internal */
exports.RetrieveToolResponseBodyCodeTool$inboundSchema = z.object({
    parameters: z.lazy(() => exports.RetrieveToolResponseBodyToolsParameters$inboundSchema).optional(),
    language: exports.RetrieveToolResponseBodyLanguage$inboundSchema,
    code: z.string(),
});
function retrieveToolResponseBodyCodeToolFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyCodeTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyCodeTool' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyCodeExecutionTool$inboundSchema = z.object({
    _id: z.string().default("tool_01KHY5SDW46G6973FJRC0MQQRJ"),
    path: z.string(),
    key: z.string(),
    display_name: z.string().optional(),
    description: z.string(),
    created_by_id: z.string().optional(),
    updated_by_id: z.string().optional(),
    project_id: z.string(),
    workspace_id: z.string(),
    created: z.string(),
    updated: z.string(),
    status: exports.RetrieveToolResponseBodyToolsResponse200ApplicationJSONStatus$inboundSchema
        .default("live"),
    version_hash: z.string().optional(),
    type: z.literal("code"),
    code_tool: z.lazy(() => exports.RetrieveToolResponseBodyCodeTool$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "_id": "id",
        "display_name": "displayName",
        "created_by_id": "createdById",
        "updated_by_id": "updatedById",
        "project_id": "projectId",
        "workspace_id": "workspaceId",
        "version_hash": "versionHash",
        "code_tool": "codeTool",
    });
});
function retrieveToolResponseBodyCodeExecutionToolFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyCodeExecutionTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyCodeExecutionTool' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyToolsResponse200Status$inboundSchema = z
    .nativeEnum(exports.RetrieveToolResponseBodyToolsResponse200Status);
/** @internal */
exports.RetrieveToolResponseBodyHeaders$inboundSchema = z.object({
    value: z.string(),
    encrypted: z.boolean().default(false),
});
function retrieveToolResponseBodyHeadersFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyHeaders$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyHeaders' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema = z.nativeEnum(exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson4Type);
/** @internal */
exports.RetrieveToolResponseBodyToolsSchema$inboundSchema = z.object({
    type: exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson4Type$inboundSchema,
    properties: z.record(z.any()).optional(),
    required: z.array(z.string()).optional(),
});
function retrieveToolResponseBodyToolsSchemaFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyToolsSchema$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyToolsSchema' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyTools$inboundSchema = z.object({
    id: z.string().default("01KHY5SDW33S9Y7T5R3EA4ESHG"),
    name: z.string(),
    description: z.string().optional(),
    schema: z.lazy(() => exports.RetrieveToolResponseBodyToolsSchema$inboundSchema),
});
function retrieveToolResponseBodyToolsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyTools$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyTools' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyConnectionType$inboundSchema = z.nativeEnum(exports.RetrieveToolResponseBodyConnectionType);
/** @internal */
exports.RetrieveToolResponseBodyMcp$inboundSchema = z.object({
    server_url: z.string(),
    headers: z.record(z.lazy(() => exports.RetrieveToolResponseBodyHeaders$inboundSchema))
        .optional(),
    tools: z.array(z.lazy(() => exports.RetrieveToolResponseBodyTools$inboundSchema)),
    connection_type: exports.RetrieveToolResponseBodyConnectionType$inboundSchema,
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "server_url": "serverUrl",
        "connection_type": "connectionType",
    });
});
function retrieveToolResponseBodyMcpFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyMcp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyMcp' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyMCPTool$inboundSchema = z.object({
    _id: z.string().default("tool_01KHY5SDW0KYN26CDPSRKPPQYK"),
    path: z.string(),
    key: z.string(),
    display_name: z.string().optional(),
    description: z.string(),
    created_by_id: z.string().optional(),
    updated_by_id: z.string().optional(),
    project_id: z.string(),
    workspace_id: z.string(),
    created: z.string(),
    updated: z.string(),
    status: exports.RetrieveToolResponseBodyToolsResponse200Status$inboundSchema.default("live"),
    version_hash: z.string().optional(),
    type: z.literal("mcp"),
    mcp: z.lazy(() => exports.RetrieveToolResponseBodyMcp$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "_id": "id",
        "display_name": "displayName",
        "created_by_id": "createdById",
        "updated_by_id": "updatedById",
        "project_id": "projectId",
        "workspace_id": "workspaceId",
        "version_hash": "versionHash",
    });
});
function retrieveToolResponseBodyMCPToolFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyMCPTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyMCPTool' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyToolsResponseStatus$inboundSchema = z
    .nativeEnum(exports.RetrieveToolResponseBodyToolsResponseStatus);
/** @internal */
exports.RetrieveToolResponseBodyMethod$inboundSchema = z.nativeEnum(exports.RetrieveToolResponseBodyMethod);
/** @internal */
exports.RetrieveToolHeaders2$inboundSchema = z.object({
    value: z.string(),
    encrypted: z.boolean().default(false),
});
function retrieveToolHeaders2FromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolHeaders2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolHeaders2' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyToolsHeaders$inboundSchema = z.union([z.lazy(() => exports.RetrieveToolHeaders2$inboundSchema), z.string()]);
function retrieveToolResponseBodyToolsHeadersFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyToolsHeaders$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyToolsHeaders' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyBlueprint$inboundSchema = z.object({
    url: z.string(),
    method: exports.RetrieveToolResponseBodyMethod$inboundSchema,
    headers: z.record(z.union([z.lazy(() => exports.RetrieveToolHeaders2$inboundSchema), z.string()])).optional(),
    body: z.record(z.any()).optional(),
});
function retrieveToolResponseBodyBlueprintFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyBlueprint$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyBlueprint' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson3Type$inboundSchema = z.nativeEnum(exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson3Type);
/** @internal */
exports.RetrieveToolResponseBodyDefaultValue$inboundSchema = z.union([z.string(), z.number(), z.boolean()]);
function retrieveToolResponseBodyDefaultValueFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyDefaultValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyDefaultValue' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyArguments$inboundSchema = z.object({
    type: exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson3Type$inboundSchema,
    description: z.string(),
    send_to_model: z.boolean().default(true),
    default_value: z.union([z.string(), z.number(), z.boolean()]).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "send_to_model": "sendToModel",
        "default_value": "defaultValue",
    });
});
function retrieveToolResponseBodyArgumentsFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyArguments$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyArguments' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyHttp$inboundSchema = z.object({
    blueprint: z.lazy(() => exports.RetrieveToolResponseBodyBlueprint$inboundSchema),
    arguments: z.record(z.lazy(() => exports.RetrieveToolResponseBodyArguments$inboundSchema)).optional(),
});
function retrieveToolResponseBodyHttpFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyHttp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyHttp' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyHTTPTool$inboundSchema = z.object({
    _id: z.string().default("tool_01KHY5SDVVMJWNC4XP99RHAZA3"),
    path: z.string(),
    key: z.string(),
    display_name: z.string().optional(),
    description: z.string(),
    created_by_id: z.string().optional(),
    updated_by_id: z.string().optional(),
    project_id: z.string(),
    workspace_id: z.string(),
    created: z.string(),
    updated: z.string(),
    status: exports.RetrieveToolResponseBodyToolsResponseStatus$inboundSchema.default("live"),
    version_hash: z.string().optional(),
    type: z.literal("http"),
    http: z.lazy(() => exports.RetrieveToolResponseBodyHttp$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "_id": "id",
        "display_name": "displayName",
        "created_by_id": "createdById",
        "updated_by_id": "updatedById",
        "project_id": "projectId",
        "workspace_id": "workspaceId",
        "version_hash": "versionHash",
    });
});
function retrieveToolResponseBodyHTTPToolFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyHTTPTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyHTTPTool' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyToolsStatus$inboundSchema = z.nativeEnum(exports.RetrieveToolResponseBodyToolsStatus);
/** @internal */
exports.RetrieveToolResponseBodySchema$inboundSchema = (0, schemas_js_1.collectExtraKeys)(z.object({
    type: z.string(),
    properties: z.record(z.any()),
    required: z.array(z.string()),
}).catchall(z.any()), "additionalProperties", true);
function retrieveToolResponseBodySchemaFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodySchema$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodySchema' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyJsonSchema$inboundSchema = z.object({
    name: z.string(),
    description: z.string(),
    schema: z.lazy(() => exports.RetrieveToolResponseBodySchema$inboundSchema),
    strict: z.boolean().optional(),
});
function retrieveToolResponseBodyJsonSchemaFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyJsonSchema$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyJsonSchema' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyJSONSchemaTool$inboundSchema = z.object({
    _id: z.string().default("tool_01KHY5SDVS2J5RQMQ02M8FSX53"),
    path: z.string(),
    key: z.string(),
    display_name: z.string().optional(),
    description: z.string(),
    created_by_id: z.string().optional(),
    updated_by_id: z.string().optional(),
    project_id: z.string(),
    workspace_id: z.string(),
    created: z.string(),
    updated: z.string(),
    status: exports.RetrieveToolResponseBodyToolsStatus$inboundSchema.default("live"),
    version_hash: z.string().optional(),
    type: z.literal("json_schema"),
    json_schema: z.lazy(() => exports.RetrieveToolResponseBodyJsonSchema$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "_id": "id",
        "display_name": "displayName",
        "created_by_id": "createdById",
        "updated_by_id": "updatedById",
        "project_id": "projectId",
        "workspace_id": "workspaceId",
        "version_hash": "versionHash",
        "json_schema": "jsonSchema",
    });
});
function retrieveToolResponseBodyJSONSchemaToolFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyJSONSchemaTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyJSONSchemaTool' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyStatus$inboundSchema = z.nativeEnum(exports.RetrieveToolResponseBodyStatus);
/** @internal */
exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson1Type$inboundSchema = z.nativeEnum(exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson1Type);
/** @internal */
exports.RetrieveToolResponseBodyParameters$inboundSchema = (0, schemas_js_1.collectExtraKeys)(z.object({
    type: exports.RetrieveToolResponseBodyToolsResponse200ApplicationJson1Type$inboundSchema,
    properties: z.record(z.any()),
    required: z.array(z.string()),
}).catchall(z.any()), "additionalProperties", true);
function retrieveToolResponseBodyParametersFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyParameters$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyParameters' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyFunction$inboundSchema = z.object({
    name: z.string(),
    description: z.string().optional(),
    strict: z.boolean().optional(),
    parameters: z.lazy(() => exports.RetrieveToolResponseBodyParameters$inboundSchema)
        .optional(),
});
function retrieveToolResponseBodyFunctionFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyFunction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyFunction' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBodyFunctionTool$inboundSchema = z.object({
    _id: z.string().default("tool_01KHY5SDVQP3YHMN0VRBH2JEC0"),
    path: z.string(),
    key: z.string(),
    display_name: z.string().optional(),
    description: z.string(),
    created_by_id: z.string().optional(),
    updated_by_id: z.string().optional(),
    project_id: z.string(),
    workspace_id: z.string(),
    created: z.string(),
    updated: z.string(),
    status: exports.RetrieveToolResponseBodyStatus$inboundSchema.default("live"),
    version_hash: z.string().optional(),
    type: z.literal("function"),
    function: z.lazy(() => exports.RetrieveToolResponseBodyFunction$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "_id": "id",
        "display_name": "displayName",
        "created_by_id": "createdById",
        "updated_by_id": "updatedById",
        "project_id": "projectId",
        "workspace_id": "workspaceId",
        "version_hash": "versionHash",
    });
});
function retrieveToolResponseBodyFunctionToolFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBodyFunctionTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBodyFunctionTool' from JSON`);
}
/** @internal */
exports.RetrieveToolResponseBody$inboundSchema = z.union([
    z.lazy(() => exports.RetrieveToolResponseBodyFunctionTool$inboundSchema),
    z.lazy(() => exports.RetrieveToolResponseBodyJSONSchemaTool$inboundSchema),
    z.lazy(() => exports.RetrieveToolResponseBodyHTTPTool$inboundSchema),
    z.lazy(() => exports.RetrieveToolResponseBodyMCPTool$inboundSchema),
    z.lazy(() => exports.RetrieveToolResponseBodyCodeExecutionTool$inboundSchema),
]);
function retrieveToolResponseBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.RetrieveToolResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RetrieveToolResponseBody' from JSON`);
}
//# sourceMappingURL=retrievetool.js.map