n8n-nodes-wechat-work
Version:
32 lines • 1.2 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const WechatWorkRequestUtils_1 = __importDefault(require("../../../help/utils/WechatWorkRequestUtils"));
const DeptGetSubDeptOperate = {
name: '获取子部门ID列表',
value: 'dept:getSubDept',
description: '获取指定部门及其下的子部门ID列表',
options: [
{
displayName: '部门ID',
name: 'id',
default: '',
description: '获取指定部门及其下的子部门(以及子部门的子部门等等,递归)。如果不填,默认获取全量组织架构',
type: 'string',
},
],
async call(index) {
const id = this.getNodeParameter('id', index, '');
return WechatWorkRequestUtils_1.default.request.call(this, {
method: 'GET',
url: `/cgi-bin/department/simplelist`,
qs: {
id,
},
});
},
};
exports.default = DeptGetSubDeptOperate;
//# sourceMappingURL=DeptGetSubDeptOperate.js.map