@luka-cat-mimi/n8n-nodes-feishu-project
Version:
飞书项目 N8N 集成插件,支持附件管理等功能
59 lines • 2.16 kB
JavaScript
;
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 NodeUtils_1 = __importDefault(require("../../../help/utils/NodeUtils"));
const ViewPanoramicOperate = {
name: '获取视图下工作项列表(全景视图)',
value: 'view:panoramic',
options: [
{
displayName: '项目Key',
name: 'project_key',
type: 'string',
required: true,
default: '',
description: '项目的唯一标识Key',
},
{
displayName: '视图ID',
name: 'view_id',
type: 'string',
required: true,
default: '',
description: '视图的唯一标识ID',
},
{
displayName: '请求体参数',
name: 'body',
type: 'json',
default: JSON.stringify({
"page_size": 10,
"page_num": 1,
"expand": {
"need_workflow": true,
"relation_fields_detail": true,
"need_multi_text": true,
"need_user_detail": true,
"need_sub_task_parent": true
}
}, null, 2),
description: '完整的请求体参数,JSON格式',
},
],
async call(index) {
const project_key = this.getNodeParameter('project_key', index);
const view_id = this.getNodeParameter('view_id', index);
const bodyParam = this.getNodeParameter('body', index);
const body = NodeUtils_1.default.parseJsonParameter(bodyParam, '请求体参数');
return RequestUtils_1.default.request.call(this, {
method: 'POST',
url: `/open_api/${project_key}/view/${view_id}`,
body: body,
});
}
};
exports.default = ViewPanoramicOperate;
//# sourceMappingURL=ViewPanoramicOperate.js.map