@luka-cat-mimi/n8n-nodes-feishu-project
Version:
飞书项目 N8N 集成插件,支持附件管理等功能
40 lines • 1.54 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 SpaceDetailOperate = {
name: '获取空间详情',
value: 'space:detail',
options: [
{
displayName: '请求体参数',
name: 'body',
type: 'json',
default: JSON.stringify({
"project_keys": [""],
"simple_names": [""],
"user_key": "",
"tenant_group_id": 0
}, null, 2),
description: '完整的请求体参数,JSON格式。user_key留空时将使用凭据中的用户ID',
},
],
async call(index) {
const bodyParam = this.getNodeParameter('body', index);
const body = NodeUtils_1.default.parseJsonParameter(bodyParam, '请求体参数');
if (!body.user_key) {
const credentials = await this.getCredentials('feishuProjectApi');
body.user_key = credentials.userId;
}
return RequestUtils_1.default.request.call(this, {
method: 'POST',
url: `/open_api/projects/detail`,
body: body,
});
}
};
exports.default = SpaceDetailOperate;
//# sourceMappingURL=SpaceDetailOperate.js.map