@n8n/n8n-nodes-langchain
Version:

72 lines • 2.43 kB
JavaScript
;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var deleteStore_operation_exports = {};
__export(deleteStore_operation_exports, {
description: () => description,
execute: () => execute,
properties: () => properties
});
module.exports = __toCommonJS(deleteStore_operation_exports);
var import_n8n_workflow = require("n8n-workflow");
var import_utils = require("../../helpers/utils");
const properties = [
{
displayName: "File Search Store Name",
name: "fileSearchStoreName",
type: "string",
placeholder: "e.g. fileSearchStores/abc123",
description: "The full name of the File Search store to delete (format: fileSearchStores/...)",
default: "",
required: true
},
{
displayName: "Force Delete",
name: "force",
type: "boolean",
description: "Whether to delete related Documents and objects. If false, deletion will fail if the store contains any Documents.",
default: false
}
];
const displayOptions = {
show: {
operation: ["deleteStore"],
resource: ["fileSearch"]
}
};
const description = (0, import_n8n_workflow.updateDisplayOptions)(displayOptions, properties);
async function execute(i) {
const fileSearchStoreName = this.getNodeParameter("fileSearchStoreName", i, "");
const force = this.getNodeParameter("force", i, false);
const response = await import_utils.deleteFileSearchStore.call(this, fileSearchStoreName, force);
return [
{
json: response,
pairedItem: {
item: i
}
}
];
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
description,
execute,
properties
});
//# sourceMappingURL=deleteStore.operation.js.map