UNPKG

n8n-nodes-feishu-lark

Version:

n8n custom nodes for n8n to interact with Feishu/Lark, including Lark Bot, Lark MCP, and Lark Trigger.

55 lines 2.3 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const RequestUtils_1 = __importDefault(require("../../../help/utils/RequestUtils")); const wording_1 = require("../../../help/wording"); const description_1 = require("../../../help/description"); exports.default = { name: wording_1.WORDING.DeleteDocumentBlock, value: "deleteBlock", order: 192, options: [ description_1.DESCRIPTIONS.DOCUMENT_ID, description_1.DESCRIPTIONS.DOCUMENT_BLOCK_ID, description_1.DESCRIPTIONS.REQUEST_BODY, { displayName: wording_1.WORDING.Options, name: 'options', type: 'collection', placeholder: wording_1.WORDING.AddField, default: {}, options: [description_1.DESCRIPTIONS.DOCUMENT_REVISION_ID, description_1.DESCRIPTIONS.REQUEST_ID], }, { displayName: `<a target="_blank" href="https://open.feishu.cn/document/server-docs/docs/docs/docx-v1/document-block/batch_delete">${wording_1.WORDING.OpenDocument}</a>`, name: 'notice', type: 'notice', default: '', }, ], async call(index) { const document_id = this.getNodeParameter('document_id', index, undefined, { extractValue: true, }); const block_id = this.getNodeParameter('block_id', index); const body = this.getNodeParameter('body', index, undefined, { ensureType: 'json', }); const options = this.getNodeParameter('options', index, {}); const document_revision_id = options.document_revision_id || -1; const request_id = options.request_id || undefined; const { data } = await RequestUtils_1.default.request.call(this, { method: 'DELETE', url: `/open-apis/docx/v1/documents/${document_id}/blocks/${block_id}/children/batch_delete`, qs: { document_revision_id, ...(request_id && { client_token: request_id }), }, body, }); return data; }, }; //# sourceMappingURL=BlockDelete.operation.js.map