n8n-nodes-wecom 0.1.24 → 0.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +68 -2
- package/dist/nodes/WeCom/resources/calendar/addScheduleAttendees.d.ts +2 -0
- package/dist/nodes/WeCom/resources/calendar/addScheduleAttendees.js +34 -0
- package/dist/nodes/WeCom/resources/calendar/addScheduleAttendees.js.map +1 -0
- package/dist/nodes/WeCom/resources/calendar/cancelSchedule.d.ts +2 -0
- package/dist/nodes/WeCom/resources/calendar/cancelSchedule.js +22 -0
- package/dist/nodes/WeCom/resources/calendar/cancelSchedule.js.map +1 -0
- package/dist/nodes/WeCom/resources/calendar/createCalendar.d.ts +2 -0
- package/dist/nodes/WeCom/resources/calendar/createCalendar.js +81 -0
- package/dist/nodes/WeCom/resources/calendar/createCalendar.js.map +1 -0
- package/dist/nodes/WeCom/resources/calendar/createSchedule.d.ts +2 -0
- package/dist/nodes/WeCom/resources/calendar/createSchedule.js +33 -0
- package/dist/nodes/WeCom/resources/calendar/createSchedule.js.map +1 -0
- package/dist/nodes/WeCom/resources/calendar/deleteCalendar.d.ts +2 -0
- package/dist/nodes/WeCom/resources/calendar/deleteCalendar.js +22 -0
- package/dist/nodes/WeCom/resources/calendar/deleteCalendar.js.map +1 -0
- package/dist/nodes/WeCom/resources/calendar/deleteScheduleAttendees.d.ts +2 -0
- package/dist/nodes/WeCom/resources/calendar/deleteScheduleAttendees.js +34 -0
- package/dist/nodes/WeCom/resources/calendar/deleteScheduleAttendees.js.map +1 -0
- package/dist/nodes/WeCom/resources/calendar/execute.d.ts +2 -0
- package/dist/nodes/WeCom/resources/calendar/execute.js +189 -0
- package/dist/nodes/WeCom/resources/calendar/execute.js.map +1 -0
- package/dist/nodes/WeCom/resources/calendar/getCalendar.d.ts +2 -0
- package/dist/nodes/WeCom/resources/calendar/getCalendar.js +22 -0
- package/dist/nodes/WeCom/resources/calendar/getCalendar.js.map +1 -0
- package/dist/nodes/WeCom/resources/calendar/getSchedule.d.ts +2 -0
- package/dist/nodes/WeCom/resources/calendar/getSchedule.js +22 -0
- package/dist/nodes/WeCom/resources/calendar/getSchedule.js.map +1 -0
- package/dist/nodes/WeCom/resources/calendar/index.d.ts +2 -0
- package/dist/nodes/WeCom/resources/calendar/index.js +117 -0
- package/dist/nodes/WeCom/resources/calendar/index.js.map +1 -0
- package/dist/nodes/WeCom/resources/calendar/listCalendarSchedules.d.ts +2 -0
- package/dist/nodes/WeCom/resources/calendar/listCalendarSchedules.js +47 -0
- package/dist/nodes/WeCom/resources/calendar/listCalendarSchedules.js.map +1 -0
- package/dist/nodes/WeCom/resources/calendar/updateCalendar.d.ts +2 -0
- package/dist/nodes/WeCom/resources/calendar/updateCalendar.js +80 -0
- package/dist/nodes/WeCom/resources/calendar/updateCalendar.js.map +1 -0
- package/dist/nodes/WeCom/resources/calendar/updateRecurringSchedule.d.ts +2 -0
- package/dist/nodes/WeCom/resources/calendar/updateRecurringSchedule.js +34 -0
- package/dist/nodes/WeCom/resources/calendar/updateRecurringSchedule.js.map +1 -0
- package/dist/nodes/WeCom/resources/calendar/updateSchedule.d.ts +2 -0
- package/dist/nodes/WeCom/resources/calendar/updateSchedule.js +34 -0
- package/dist/nodes/WeCom/resources/calendar/updateSchedule.js.map +1 -0
- package/dist/nodes/WeCom/resources/meeting/allocateMeetingAdvancedAccount.d.ts +2 -0
- package/dist/nodes/WeCom/resources/meeting/allocateMeetingAdvancedAccount.js +22 -0
- package/dist/nodes/WeCom/resources/meeting/allocateMeetingAdvancedAccount.js.map +1 -0
- package/dist/nodes/WeCom/resources/meeting/cancelMeeting.d.ts +2 -0
- package/dist/nodes/WeCom/resources/meeting/cancelMeeting.js +22 -0
- package/dist/nodes/WeCom/resources/meeting/cancelMeeting.js.map +1 -0
- package/dist/nodes/WeCom/resources/meeting/createAdvancedMeeting.d.ts +2 -0
- package/dist/nodes/WeCom/resources/meeting/createAdvancedMeeting.js +22 -0
- package/dist/nodes/WeCom/resources/meeting/createAdvancedMeeting.js.map +1 -0
- package/dist/nodes/WeCom/resources/meeting/createMeeting.d.ts +2 -0
- package/dist/nodes/WeCom/resources/meeting/createMeeting.js +72 -0
- package/dist/nodes/WeCom/resources/meeting/createMeeting.js.map +1 -0
- package/dist/nodes/WeCom/resources/meeting/deallocateMeetingAdvancedAccount.d.ts +2 -0
- package/dist/nodes/WeCom/resources/meeting/deallocateMeetingAdvancedAccount.js +22 -0
- package/dist/nodes/WeCom/resources/meeting/deallocateMeetingAdvancedAccount.js.map +1 -0
- package/dist/nodes/WeCom/resources/meeting/endMeeting.d.ts +2 -0
- package/dist/nodes/WeCom/resources/meeting/endMeeting.js +22 -0
- package/dist/nodes/WeCom/resources/meeting/endMeeting.js.map +1 -0
- package/dist/nodes/WeCom/resources/meeting/execute.d.ts +2 -0
- package/dist/nodes/WeCom/resources/meeting/execute.js +228 -0
- package/dist/nodes/WeCom/resources/meeting/execute.js.map +1 -0
- package/dist/nodes/WeCom/resources/meeting/getLiveParticipants.d.ts +2 -0
- package/dist/nodes/WeCom/resources/meeting/getLiveParticipants.js +47 -0
- package/dist/nodes/WeCom/resources/meeting/getLiveParticipants.js.map +1 -0
- package/dist/nodes/WeCom/resources/meeting/getMeetingAdvancedAccountList.d.ts +2 -0
- package/dist/nodes/WeCom/resources/meeting/getMeetingAdvancedAccountList.js +35 -0
- package/dist/nodes/WeCom/resources/meeting/getMeetingAdvancedAccountList.js.map +1 -0
- package/dist/nodes/WeCom/resources/meeting/getMeetingInfo.d.ts +2 -0
- package/dist/nodes/WeCom/resources/meeting/getMeetingInfo.js +22 -0
- package/dist/nodes/WeCom/resources/meeting/getMeetingInfo.js.map +1 -0
- package/dist/nodes/WeCom/resources/meeting/getMeetingInvitees.d.ts +2 -0
- package/dist/nodes/WeCom/resources/meeting/getMeetingInvitees.js +47 -0
- package/dist/nodes/WeCom/resources/meeting/getMeetingInvitees.js.map +1 -0
- package/dist/nodes/WeCom/resources/meeting/getMeetingRecords.d.ts +2 -0
- package/dist/nodes/WeCom/resources/meeting/getMeetingRecords.js +70 -0
- package/dist/nodes/WeCom/resources/meeting/getMeetingRecords.js.map +1 -0
- package/dist/nodes/WeCom/resources/meeting/getParticipants.d.ts +2 -0
- package/dist/nodes/WeCom/resources/meeting/getParticipants.js +47 -0
- package/dist/nodes/WeCom/resources/meeting/getParticipants.js.map +1 -0
- package/dist/nodes/WeCom/resources/meeting/getRecordingAddress.d.ts +2 -0
- package/dist/nodes/WeCom/resources/meeting/getRecordingAddress.js +22 -0
- package/dist/nodes/WeCom/resources/meeting/getRecordingAddress.js.map +1 -0
- package/dist/nodes/WeCom/resources/meeting/getUserMeetings.d.ts +2 -0
- package/dist/nodes/WeCom/resources/meeting/getUserMeetings.js +47 -0
- package/dist/nodes/WeCom/resources/meeting/getUserMeetings.js.map +1 -0
- package/dist/nodes/WeCom/resources/meeting/index.d.ts +2 -0
- package/dist/nodes/WeCom/resources/meeting/index.js +181 -0
- package/dist/nodes/WeCom/resources/meeting/index.js.map +1 -0
- package/dist/nodes/WeCom/resources/meeting/listRecordings.d.ts +2 -0
- package/dist/nodes/WeCom/resources/meeting/listRecordings.js +22 -0
- package/dist/nodes/WeCom/resources/meeting/listRecordings.js.map +1 -0
- package/dist/nodes/WeCom/resources/meeting/muteMember.d.ts +2 -0
- package/dist/nodes/WeCom/resources/meeting/muteMember.js +50 -0
- package/dist/nodes/WeCom/resources/meeting/muteMember.js.map +1 -0
- package/dist/nodes/WeCom/resources/meeting/removeMember.d.ts +2 -0
- package/dist/nodes/WeCom/resources/meeting/removeMember.js +34 -0
- package/dist/nodes/WeCom/resources/meeting/removeMember.js.map +1 -0
- package/dist/nodes/WeCom/resources/meeting/updateAdvancedMeeting.d.ts +2 -0
- package/dist/nodes/WeCom/resources/meeting/updateAdvancedMeeting.js +34 -0
- package/dist/nodes/WeCom/resources/meeting/updateAdvancedMeeting.js.map +1 -0
- package/dist/nodes/WeCom/resources/meeting/updateMeeting.d.ts +2 -0
- package/dist/nodes/WeCom/resources/meeting/updateMeeting.js +55 -0
- package/dist/nodes/WeCom/resources/meeting/updateMeeting.js.map +1 -0
- package/dist/nodes/WeCom/resources/meeting/updateMeetingInvitees.d.ts +2 -0
- package/dist/nodes/WeCom/resources/meeting/updateMeetingInvitees.js +34 -0
- package/dist/nodes/WeCom/resources/meeting/updateMeetingInvitees.js.map +1 -0
- package/dist/nodes/WeComBase/WeComBase.node.js +1 -1
- package/dist/nodes/WeComBase/WeComBase.node.js.map +1 -1
- package/dist/nodes/WeComOffice/WeComOffice.node.js +28 -6
- package/dist/nodes/WeComOffice/WeComOffice.node.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,6 +21,8 @@
|
|
|
21
21
|
|
|
22
22
|
包含企业微信的协同办公功能:
|
|
23
23
|
|
|
24
|
+
- **日程管理** - 日历和日程管理
|
|
25
|
+
- **会议管理** - 会议预约、会议控制、录制管理
|
|
24
26
|
- **邮件管理** - 企业邮箱、邮件群组、公共邮箱
|
|
25
27
|
- **文档管理** - 在线文档、表格、智能表格
|
|
26
28
|
- **微盘管理** - 微盘空间和文件管理
|
|
@@ -410,7 +412,7 @@ npm install n8n-nodes-wecom
|
|
|
410
412
|
- ✅ [获取客户端专用密码列表](https://developer.work.weixin.qq.com/document/path/100183)
|
|
411
413
|
- ✅ [删除客户端专用密码](https://developer.work.weixin.qq.com/document/path/100184)
|
|
412
414
|
|
|
413
|
-
####
|
|
415
|
+
#### 邮件高级功能账号管理
|
|
414
416
|
|
|
415
417
|
- ✅ [分配高级功能账号](https://developer.work.weixin.qq.com/document/path/99316)
|
|
416
418
|
- ✅ [取消高级功能账号](https://developer.work.weixin.qq.com/document/path/99317)
|
|
@@ -482,7 +484,7 @@ npm install n8n-nodes-wecom
|
|
|
482
484
|
- ✅ [收集表的统计信息查询](https://developer.work.weixin.qq.com/document/path/97818)
|
|
483
485
|
- ✅ [读取收集表答案](https://developer.work.weixin.qq.com/document/path/97819)
|
|
484
486
|
|
|
485
|
-
####
|
|
487
|
+
#### 文档高级功能账号管理
|
|
486
488
|
|
|
487
489
|
- ✅ [分配高级功能账号](https://developer.work.weixin.qq.com/document/path/99516)
|
|
488
490
|
- ✅ [取消高级功能账号](https://developer.work.weixin.qq.com/document/path/99517)
|
|
@@ -492,6 +494,70 @@ npm install n8n-nodes-wecom
|
|
|
492
494
|
|
|
493
495
|
- ✅ [上传文档图片](https://developer.work.weixin.qq.com/document/path/99933)
|
|
494
496
|
|
|
497
|
+
### 📅 日程管理
|
|
498
|
+
|
|
499
|
+
> 📖 [官方文档:日程](https://developer.work.weixin.qq.com/document/path/93647)
|
|
500
|
+
|
|
501
|
+
#### 管理日历
|
|
502
|
+
|
|
503
|
+
- ✅ [创建日历](https://developer.work.weixin.qq.com/document/path/93647)
|
|
504
|
+
- ✅ [更新日历](https://developer.work.weixin.qq.com/document/path/97716)
|
|
505
|
+
- ✅ [获取日历详情](https://developer.work.weixin.qq.com/document/path/97717)
|
|
506
|
+
- ✅ [删除日历](https://developer.work.weixin.qq.com/document/path/97718)
|
|
507
|
+
|
|
508
|
+
#### 管理日程
|
|
509
|
+
|
|
510
|
+
- ✅ [创建日程](https://developer.work.weixin.qq.com/document/path/93648)
|
|
511
|
+
- ✅ [更新日程](https://developer.work.weixin.qq.com/document/path/97720)
|
|
512
|
+
- ✅ [更新重复日程](https://developer.work.weixin.qq.com/document/path/96204)
|
|
513
|
+
- ✅ [新增日程参与者](https://developer.work.weixin.qq.com/document/path/97721)
|
|
514
|
+
- ✅ [删除日程参与者](https://developer.work.weixin.qq.com/document/path/97722)
|
|
515
|
+
- ✅ [获取日历下的日程列表](https://developer.work.weixin.qq.com/document/path/97723)
|
|
516
|
+
- ✅ [获取日程详情](https://developer.work.weixin.qq.com/document/path/97724)
|
|
517
|
+
- ✅ [取消日程](https://developer.work.weixin.qq.com/document/path/97725)
|
|
518
|
+
|
|
519
|
+
### 🎥 会议管理
|
|
520
|
+
|
|
521
|
+
> 📖 [官方文档:会议](https://developer.work.weixin.qq.com/document/path/99104)
|
|
522
|
+
|
|
523
|
+
#### 预约会议基础管理
|
|
524
|
+
|
|
525
|
+
- ✅ [创建预约会议](https://developer.work.weixin.qq.com/document/path/99104)
|
|
526
|
+
- ✅ [修改预约会议](https://developer.work.weixin.qq.com/document/path/99047)
|
|
527
|
+
- ✅ [取消预约会议](https://developer.work.weixin.qq.com/document/path/99048)
|
|
528
|
+
- ✅ [获取会议详情](https://developer.work.weixin.qq.com/document/path/99049)
|
|
529
|
+
- ✅ [获取成员会议ID列表](https://developer.work.weixin.qq.com/document/path/99050)
|
|
530
|
+
|
|
531
|
+
#### 会议统计管理
|
|
532
|
+
|
|
533
|
+
- ✅ [获取会议发起记录](https://developer.work.weixin.qq.com/document/path/99651)
|
|
534
|
+
|
|
535
|
+
#### 预约会议高级管理
|
|
536
|
+
|
|
537
|
+
- ✅ [创建预约会议(高级)](https://developer.work.weixin.qq.com/document/path/98148)
|
|
538
|
+
- ✅ [修改预约会议(高级)](https://developer.work.weixin.qq.com/document/path/98154)
|
|
539
|
+
- ✅ [获取会议受邀成员列表](https://developer.work.weixin.qq.com/document/path/98160)
|
|
540
|
+
- ✅ [更新会议受邀成员列表](https://developer.work.weixin.qq.com/document/path/98162)
|
|
541
|
+
- ✅ [获取实时会中成员列表](https://developer.work.weixin.qq.com/document/path/98157)
|
|
542
|
+
- ✅ [获取已参会成员列表](https://developer.work.weixin.qq.com/document/path/98156)
|
|
543
|
+
|
|
544
|
+
#### 会中控制管理
|
|
545
|
+
|
|
546
|
+
- ✅ [静音成员](https://developer.work.weixin.qq.com/document/path/98184)
|
|
547
|
+
- ✅ [移出成员](https://developer.work.weixin.qq.com/document/path/98181)
|
|
548
|
+
- ✅ [结束会议](https://developer.work.weixin.qq.com/document/path/98187)
|
|
549
|
+
|
|
550
|
+
#### 录制管理
|
|
551
|
+
|
|
552
|
+
- ✅ [获取会议录制列表](https://developer.work.weixin.qq.com/document/path/98192)
|
|
553
|
+
- ✅ [获取会议录制地址](https://developer.work.weixin.qq.com/document/path/98196)
|
|
554
|
+
|
|
555
|
+
#### 会议高级功能账号管理
|
|
556
|
+
|
|
557
|
+
- ✅ [分配高级功能账号](https://developer.work.weixin.qq.com/document/path/99508)
|
|
558
|
+
- ✅ [取消高级功能账号](https://developer.work.weixin.qq.com/document/path/99509)
|
|
559
|
+
- ✅ [获取高级功能账号列表](https://developer.work.weixin.qq.com/document/path/99510)
|
|
560
|
+
|
|
495
561
|
### 💾 微盘管理
|
|
496
562
|
|
|
497
563
|
> 📖 [官方文档:微盘](https://developer.work.weixin.qq.com/document/path/93654)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addScheduleAttendeesDescription = void 0;
|
|
4
|
+
const showOnlyForAdd = {
|
|
5
|
+
resource: ['calendar'],
|
|
6
|
+
operation: ['addScheduleAttendees'],
|
|
7
|
+
};
|
|
8
|
+
exports.addScheduleAttendeesDescription = [
|
|
9
|
+
{
|
|
10
|
+
displayName: '日程ID',
|
|
11
|
+
name: 'schedule_id',
|
|
12
|
+
type: 'string',
|
|
13
|
+
required: true,
|
|
14
|
+
displayOptions: {
|
|
15
|
+
show: showOnlyForAdd,
|
|
16
|
+
},
|
|
17
|
+
default: '',
|
|
18
|
+
description: 'Schedule ID',
|
|
19
|
+
hint: '日程ID',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
displayName: '参与者',
|
|
23
|
+
name: 'attendees',
|
|
24
|
+
type: 'json',
|
|
25
|
+
required: true,
|
|
26
|
+
displayOptions: {
|
|
27
|
+
show: showOnlyForAdd,
|
|
28
|
+
},
|
|
29
|
+
default: '[{"userid": "userid1"}]',
|
|
30
|
+
description: 'Attendees to add, JSON format array. Example: [{"userid": "userid1"}].',
|
|
31
|
+
hint: '要添加的参与者,JSON格式数组',
|
|
32
|
+
},
|
|
33
|
+
];
|
|
34
|
+
//# sourceMappingURL=addScheduleAttendees.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addScheduleAttendees.js","sourceRoot":"","sources":["../../../../../nodes/WeCom/resources/calendar/addScheduleAttendees.ts"],"names":[],"mappings":";;;AAEA,MAAM,cAAc,GAAG;IACtB,QAAQ,EAAE,CAAC,UAAU,CAAC;IACtB,SAAS,EAAE,CAAC,sBAAsB,CAAC;CACnC,CAAC;AAEW,QAAA,+BAA+B,GAAsB;IACjE;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE,cAAc;SACpB;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,aAAa;QAC1B,IAAI,EAAE,MAAM;KACZ;IACD;QACC,WAAW,EAAE,KAAK;QAClB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE,cAAc;SACpB;QACD,OAAO,EAAE,yBAAyB;QAClC,WAAW,EAAE,wEAAwE;QACrF,IAAI,EAAE,kBAAkB;KACxB;CACD,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.cancelScheduleDescription = void 0;
|
|
4
|
+
const showOnlyForCancel = {
|
|
5
|
+
resource: ['calendar'],
|
|
6
|
+
operation: ['cancelSchedule'],
|
|
7
|
+
};
|
|
8
|
+
exports.cancelScheduleDescription = [
|
|
9
|
+
{
|
|
10
|
+
displayName: '日程ID',
|
|
11
|
+
name: 'schedule_id',
|
|
12
|
+
type: 'string',
|
|
13
|
+
required: true,
|
|
14
|
+
displayOptions: {
|
|
15
|
+
show: showOnlyForCancel,
|
|
16
|
+
},
|
|
17
|
+
default: '',
|
|
18
|
+
description: 'Schedule ID to cancel',
|
|
19
|
+
hint: '要取消的日程ID',
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
//# sourceMappingURL=cancelSchedule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cancelSchedule.js","sourceRoot":"","sources":["../../../../../nodes/WeCom/resources/calendar/cancelSchedule.ts"],"names":[],"mappings":";;;AAEA,MAAM,iBAAiB,GAAG;IACzB,QAAQ,EAAE,CAAC,UAAU,CAAC;IACtB,SAAS,EAAE,CAAC,gBAAgB,CAAC;CAC7B,CAAC;AAEW,QAAA,yBAAyB,GAAsB;IAC3D;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE,iBAAiB;SACvB;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,uBAAuB;QACpC,IAAI,EAAE,UAAU;KAChB;CACD,CAAC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createCalendarDescription = void 0;
|
|
4
|
+
const showOnlyForCreate = {
|
|
5
|
+
resource: ['calendar'],
|
|
6
|
+
operation: ['createCalendar'],
|
|
7
|
+
};
|
|
8
|
+
exports.createCalendarDescription = [
|
|
9
|
+
{
|
|
10
|
+
displayName: '日历标题',
|
|
11
|
+
name: 'summary',
|
|
12
|
+
type: 'string',
|
|
13
|
+
required: true,
|
|
14
|
+
displayOptions: {
|
|
15
|
+
show: showOnlyForCreate,
|
|
16
|
+
},
|
|
17
|
+
default: '',
|
|
18
|
+
description: 'Calendar summary, supports Chinese, English, numbers and some special characters',
|
|
19
|
+
hint: '日历标题',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
displayName: '管理员列表',
|
|
23
|
+
name: 'admins',
|
|
24
|
+
type: 'string',
|
|
25
|
+
required: true,
|
|
26
|
+
displayOptions: {
|
|
27
|
+
show: showOnlyForCreate,
|
|
28
|
+
},
|
|
29
|
+
default: '',
|
|
30
|
+
description: 'Administrator UserID list, separated by commas. The first one is the organizer.',
|
|
31
|
+
hint: '管理员UserID列表,用逗号分隔,第一个为组织者',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
displayName: '日历描述',
|
|
35
|
+
name: 'description',
|
|
36
|
+
type: 'string',
|
|
37
|
+
displayOptions: {
|
|
38
|
+
show: showOnlyForCreate,
|
|
39
|
+
},
|
|
40
|
+
default: '',
|
|
41
|
+
description: 'Calendar description, supports Chinese, English, numbers and some special characters',
|
|
42
|
+
hint: '日历描述',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
displayName: '颜色',
|
|
46
|
+
name: 'color',
|
|
47
|
+
type: 'options',
|
|
48
|
+
displayOptions: {
|
|
49
|
+
show: showOnlyForCreate,
|
|
50
|
+
},
|
|
51
|
+
options: [
|
|
52
|
+
{ name: '默认蓝色', value: 0 },
|
|
53
|
+
{ name: '荔枝红', value: 1 },
|
|
54
|
+
{ name: '石榴红', value: 2 },
|
|
55
|
+
{ name: '南瓜橙', value: 3 },
|
|
56
|
+
{ name: '柠檬黄', value: 4 },
|
|
57
|
+
{ name: '嫩草绿', value: 5 },
|
|
58
|
+
{ name: '葱心绿', value: 6 },
|
|
59
|
+
{ name: '天空蓝', value: 7 },
|
|
60
|
+
{ name: '海水蓝', value: 8 },
|
|
61
|
+
{ name: '丁香紫', value: 9 },
|
|
62
|
+
{ name: '芋头紫', value: 10 },
|
|
63
|
+
{ name: '灰', value: 11 },
|
|
64
|
+
],
|
|
65
|
+
default: 0,
|
|
66
|
+
description: 'Calendar color',
|
|
67
|
+
hint: '日历颜色',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
displayName: '共享范围',
|
|
71
|
+
name: 'shares',
|
|
72
|
+
type: 'json',
|
|
73
|
+
displayOptions: {
|
|
74
|
+
show: showOnlyForCreate,
|
|
75
|
+
},
|
|
76
|
+
default: '',
|
|
77
|
+
description: 'Share scope, JSON format array. Example: [{"userid":"userid1"}].',
|
|
78
|
+
hint: '共享范围,JSON格式数组',
|
|
79
|
+
},
|
|
80
|
+
];
|
|
81
|
+
//# sourceMappingURL=createCalendar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createCalendar.js","sourceRoot":"","sources":["../../../../../nodes/WeCom/resources/calendar/createCalendar.ts"],"names":[],"mappings":";;;AAEA,MAAM,iBAAiB,GAAG;IACzB,QAAQ,EAAE,CAAC,UAAU,CAAC;IACtB,SAAS,EAAE,CAAC,gBAAgB,CAAC;CAC7B,CAAC;AAEW,QAAA,yBAAyB,GAAsB;IAC3D;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE,iBAAiB;SACvB;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,kFAAkF;QAC/F,IAAI,EAAE,MAAM;KACZ;IACD;QACC,WAAW,EAAE,OAAO;QACpB,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE,iBAAiB;SACvB;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,iFAAiF;QAC9F,IAAI,EAAE,2BAA2B;KACjC;IACD;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE,iBAAiB;SACvB;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,sFAAsF;QACnG,IAAI,EAAE,MAAM;KACZ;IACD;QACC,WAAW,EAAE,IAAI;QACjB,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,SAAS;QACf,cAAc,EAAE;YACf,IAAI,EAAE,iBAAiB;SACvB;QACD,OAAO,EAAE;YACR,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE;YAC1B,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE;YACzB,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE;YACzB,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE;YACzB,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE;YACzB,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE;YACzB,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE;YACzB,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE;YACzB,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE;YACzB,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE;YACzB,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;YAC1B,EAAE,IAAI,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE;SACxB;QACD,OAAO,EAAE,CAAC;QACV,WAAW,EAAE,gBAAgB;QAC7B,IAAI,EAAE,MAAM;KACZ;IACD;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,MAAM;QACZ,cAAc,EAAE;YACf,IAAI,EAAE,iBAAiB;SACvB;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,kEAAkE;QAC/E,IAAI,EAAE,eAAe;KACrB;CACD,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createScheduleDescription = void 0;
|
|
4
|
+
const showOnlyForCreate = {
|
|
5
|
+
resource: ['calendar'],
|
|
6
|
+
operation: ['createSchedule'],
|
|
7
|
+
};
|
|
8
|
+
exports.createScheduleDescription = [
|
|
9
|
+
{
|
|
10
|
+
displayName: '日程详情',
|
|
11
|
+
name: 'schedule',
|
|
12
|
+
type: 'json',
|
|
13
|
+
required: true,
|
|
14
|
+
displayOptions: {
|
|
15
|
+
show: showOnlyForCreate,
|
|
16
|
+
},
|
|
17
|
+
default: '{\n "organizer": "userid1",\n "start_time": 1577836800,\n "end_time": 1577840400,\n "summary": "会议主题",\n "attendees": [{"userid": "userid2"}]\n}',
|
|
18
|
+
description: 'Schedule details in JSON format. Required fields: organizer, start_time, end_time, summary, attendees.',
|
|
19
|
+
hint: '日程详情,JSON格式',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
displayName: '应用ID',
|
|
23
|
+
name: 'agentid',
|
|
24
|
+
type: 'number',
|
|
25
|
+
displayOptions: {
|
|
26
|
+
show: showOnlyForCreate,
|
|
27
|
+
},
|
|
28
|
+
default: 0,
|
|
29
|
+
description: 'Agent ID, optional, defaults to the current app',
|
|
30
|
+
hint: '应用ID,可选,默认为当前应用',
|
|
31
|
+
},
|
|
32
|
+
];
|
|
33
|
+
//# sourceMappingURL=createSchedule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createSchedule.js","sourceRoot":"","sources":["../../../../../nodes/WeCom/resources/calendar/createSchedule.ts"],"names":[],"mappings":";;;AAEA,MAAM,iBAAiB,GAAG;IACzB,QAAQ,EAAE,CAAC,UAAU,CAAC;IACtB,SAAS,EAAE,CAAC,gBAAgB,CAAC;CAC7B,CAAC;AAEW,QAAA,yBAAyB,GAAsB;IAC3D;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE,iBAAiB;SACvB;QACD,OAAO,EAAE,uJAAuJ;QAChK,WAAW,EAAE,wGAAwG;QACrH,IAAI,EAAE,aAAa;KACnB;IACD;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE,iBAAiB;SACvB;QACD,OAAO,EAAE,CAAC;QACV,WAAW,EAAE,iDAAiD;QAC9D,IAAI,EAAE,iBAAiB;KACvB;CACD,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deleteCalendarDescription = void 0;
|
|
4
|
+
const showOnlyForDelete = {
|
|
5
|
+
resource: ['calendar'],
|
|
6
|
+
operation: ['deleteCalendar'],
|
|
7
|
+
};
|
|
8
|
+
exports.deleteCalendarDescription = [
|
|
9
|
+
{
|
|
10
|
+
displayName: '日历ID',
|
|
11
|
+
name: 'cal_id',
|
|
12
|
+
type: 'string',
|
|
13
|
+
required: true,
|
|
14
|
+
displayOptions: {
|
|
15
|
+
show: showOnlyForDelete,
|
|
16
|
+
},
|
|
17
|
+
default: '',
|
|
18
|
+
description: 'Calendar ID',
|
|
19
|
+
hint: '日历ID',
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
//# sourceMappingURL=deleteCalendar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteCalendar.js","sourceRoot":"","sources":["../../../../../nodes/WeCom/resources/calendar/deleteCalendar.ts"],"names":[],"mappings":";;;AAEA,MAAM,iBAAiB,GAAG;IACzB,QAAQ,EAAE,CAAC,UAAU,CAAC;IACtB,SAAS,EAAE,CAAC,gBAAgB,CAAC;CAC7B,CAAC;AAEW,QAAA,yBAAyB,GAAsB;IAC3D;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE,iBAAiB;SACvB;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,aAAa;QAC1B,IAAI,EAAE,MAAM;KACZ;CACD,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deleteScheduleAttendeesDescription = void 0;
|
|
4
|
+
const showOnlyForDelete = {
|
|
5
|
+
resource: ['calendar'],
|
|
6
|
+
operation: ['deleteScheduleAttendees'],
|
|
7
|
+
};
|
|
8
|
+
exports.deleteScheduleAttendeesDescription = [
|
|
9
|
+
{
|
|
10
|
+
displayName: '日程ID',
|
|
11
|
+
name: 'schedule_id',
|
|
12
|
+
type: 'string',
|
|
13
|
+
required: true,
|
|
14
|
+
displayOptions: {
|
|
15
|
+
show: showOnlyForDelete,
|
|
16
|
+
},
|
|
17
|
+
default: '',
|
|
18
|
+
description: 'Schedule ID',
|
|
19
|
+
hint: '日程ID',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
displayName: '参与者',
|
|
23
|
+
name: 'attendees',
|
|
24
|
+
type: 'json',
|
|
25
|
+
required: true,
|
|
26
|
+
displayOptions: {
|
|
27
|
+
show: showOnlyForDelete,
|
|
28
|
+
},
|
|
29
|
+
default: '[{"userid": "userid1"}]',
|
|
30
|
+
description: 'Attendees to delete, JSON format array. Example: [{"userid": "userid1"}].',
|
|
31
|
+
hint: '要删除的参与者,JSON格式数组',
|
|
32
|
+
},
|
|
33
|
+
];
|
|
34
|
+
//# sourceMappingURL=deleteScheduleAttendees.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deleteScheduleAttendees.js","sourceRoot":"","sources":["../../../../../nodes/WeCom/resources/calendar/deleteScheduleAttendees.ts"],"names":[],"mappings":";;;AAEA,MAAM,iBAAiB,GAAG;IACzB,QAAQ,EAAE,CAAC,UAAU,CAAC;IACtB,SAAS,EAAE,CAAC,yBAAyB,CAAC;CACtC,CAAC;AAEW,QAAA,kCAAkC,GAAsB;IACpE;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE,iBAAiB;SACvB;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,aAAa;QAC1B,IAAI,EAAE,MAAM;KACZ;IACD;QACC,WAAW,EAAE,KAAK;QAClB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE,iBAAiB;SACvB;QACD,OAAO,EAAE,yBAAyB;QAClC,WAAW,EAAE,2EAA2E;QACxF,IAAI,EAAE,kBAAkB;KACxB;CACD,CAAC"}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.executeCalendar = executeCalendar;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
const transport_1 = require("../../shared/transport");
|
|
6
|
+
async function executeCalendar(operation, items) {
|
|
7
|
+
const returnData = [];
|
|
8
|
+
for (let i = 0; i < items.length; i++) {
|
|
9
|
+
try {
|
|
10
|
+
let response;
|
|
11
|
+
if (operation === 'createCalendar') {
|
|
12
|
+
const summary = this.getNodeParameter('summary', i);
|
|
13
|
+
const admins = this.getNodeParameter('admins', i);
|
|
14
|
+
const description = this.getNodeParameter('description', i, '');
|
|
15
|
+
const color = this.getNodeParameter('color', i, 0);
|
|
16
|
+
const shares = this.getNodeParameter('shares', i, '');
|
|
17
|
+
const body = {
|
|
18
|
+
calendar: {
|
|
19
|
+
summary,
|
|
20
|
+
admins: admins.split(',').map((id) => ({ userid: id.trim() })),
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
if (description) {
|
|
24
|
+
body.calendar.description = description;
|
|
25
|
+
}
|
|
26
|
+
if (color) {
|
|
27
|
+
body.calendar.color = color;
|
|
28
|
+
}
|
|
29
|
+
if (shares) {
|
|
30
|
+
body.calendar.shares = JSON.parse(shares);
|
|
31
|
+
}
|
|
32
|
+
response = await transport_1.weComApiRequest.call(this, 'POST', '/cgi-bin/oa/calendar/add', body);
|
|
33
|
+
}
|
|
34
|
+
else if (operation === 'updateCalendar') {
|
|
35
|
+
const cal_id = this.getNodeParameter('cal_id', i);
|
|
36
|
+
const summary = this.getNodeParameter('summary', i, '');
|
|
37
|
+
const description = this.getNodeParameter('description', i, '');
|
|
38
|
+
const color = this.getNodeParameter('color', i, -1);
|
|
39
|
+
const shares = this.getNodeParameter('shares', i, '');
|
|
40
|
+
const calendar = { cal_id };
|
|
41
|
+
if (summary)
|
|
42
|
+
calendar.summary = summary;
|
|
43
|
+
if (description)
|
|
44
|
+
calendar.description = description;
|
|
45
|
+
if (color >= 0)
|
|
46
|
+
calendar.color = color;
|
|
47
|
+
if (shares)
|
|
48
|
+
calendar.shares = JSON.parse(shares);
|
|
49
|
+
response = await transport_1.weComApiRequest.call(this, 'POST', '/cgi-bin/oa/calendar/update', {
|
|
50
|
+
calendar,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
else if (operation === 'getCalendar') {
|
|
54
|
+
const cal_id_list = this.getNodeParameter('cal_id_list', i);
|
|
55
|
+
response = await transport_1.weComApiRequest.call(this, 'POST', '/cgi-bin/oa/calendar/get', {
|
|
56
|
+
cal_id_list: cal_id_list.split(',').map((id) => id.trim()),
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
else if (operation === 'deleteCalendar') {
|
|
60
|
+
const cal_id = this.getNodeParameter('cal_id', i);
|
|
61
|
+
response = await transport_1.weComApiRequest.call(this, 'POST', '/cgi-bin/oa/calendar/del', {
|
|
62
|
+
cal_id,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
else if (operation === 'createSchedule') {
|
|
66
|
+
const schedule = this.getNodeParameter('schedule', i);
|
|
67
|
+
const agentid = this.getNodeParameter('agentid', i, 0);
|
|
68
|
+
let parsedSchedule;
|
|
69
|
+
try {
|
|
70
|
+
parsedSchedule = JSON.parse(schedule);
|
|
71
|
+
}
|
|
72
|
+
catch (error) {
|
|
73
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `schedule 必须是有效的 JSON: ${error.message}`, { itemIndex: i });
|
|
74
|
+
}
|
|
75
|
+
const body = { schedule: parsedSchedule };
|
|
76
|
+
if (agentid)
|
|
77
|
+
body.agentid = agentid;
|
|
78
|
+
response = await transport_1.weComApiRequest.call(this, 'POST', '/cgi-bin/oa/schedule/add', body);
|
|
79
|
+
}
|
|
80
|
+
else if (operation === 'updateSchedule') {
|
|
81
|
+
const schedule_id = this.getNodeParameter('schedule_id', i);
|
|
82
|
+
const schedule = this.getNodeParameter('schedule', i);
|
|
83
|
+
let parsedSchedule;
|
|
84
|
+
try {
|
|
85
|
+
parsedSchedule = JSON.parse(schedule);
|
|
86
|
+
}
|
|
87
|
+
catch (error) {
|
|
88
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `schedule 必须是有效的 JSON: ${error.message}`, { itemIndex: i });
|
|
89
|
+
}
|
|
90
|
+
response = await transport_1.weComApiRequest.call(this, 'POST', '/cgi-bin/oa/schedule/update', {
|
|
91
|
+
schedule: {
|
|
92
|
+
schedule_id,
|
|
93
|
+
...parsedSchedule,
|
|
94
|
+
},
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
else if (operation === 'updateRecurringSchedule') {
|
|
98
|
+
const schedule_id = this.getNodeParameter('schedule_id', i);
|
|
99
|
+
const schedule = this.getNodeParameter('schedule', i);
|
|
100
|
+
let parsedSchedule;
|
|
101
|
+
try {
|
|
102
|
+
parsedSchedule = JSON.parse(schedule);
|
|
103
|
+
}
|
|
104
|
+
catch (error) {
|
|
105
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `schedule 必须是有效的 JSON: ${error.message}`, { itemIndex: i });
|
|
106
|
+
}
|
|
107
|
+
response = await transport_1.weComApiRequest.call(this, 'POST', '/cgi-bin/oa/schedule/update_by_meetingid', {
|
|
108
|
+
schedule: {
|
|
109
|
+
schedule_id,
|
|
110
|
+
...parsedSchedule,
|
|
111
|
+
},
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
else if (operation === 'addScheduleAttendees') {
|
|
115
|
+
const schedule_id = this.getNodeParameter('schedule_id', i);
|
|
116
|
+
const attendees = this.getNodeParameter('attendees', i);
|
|
117
|
+
let parsedAttendees;
|
|
118
|
+
try {
|
|
119
|
+
parsedAttendees = JSON.parse(attendees);
|
|
120
|
+
}
|
|
121
|
+
catch (error) {
|
|
122
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `attendees 必须是有效的 JSON: ${error.message}`, { itemIndex: i });
|
|
123
|
+
}
|
|
124
|
+
response = await transport_1.weComApiRequest.call(this, 'POST', '/cgi-bin/oa/schedule/add_attendees', {
|
|
125
|
+
schedule_id,
|
|
126
|
+
attendees: parsedAttendees,
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
else if (operation === 'deleteScheduleAttendees') {
|
|
130
|
+
const schedule_id = this.getNodeParameter('schedule_id', i);
|
|
131
|
+
const attendees = this.getNodeParameter('attendees', i);
|
|
132
|
+
let parsedAttendees;
|
|
133
|
+
try {
|
|
134
|
+
parsedAttendees = JSON.parse(attendees);
|
|
135
|
+
}
|
|
136
|
+
catch (error) {
|
|
137
|
+
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `attendees 必须是有效的 JSON: ${error.message}`, { itemIndex: i });
|
|
138
|
+
}
|
|
139
|
+
response = await transport_1.weComApiRequest.call(this, 'POST', '/cgi-bin/oa/schedule/del_attendees', {
|
|
140
|
+
schedule_id,
|
|
141
|
+
attendees: parsedAttendees,
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
else if (operation === 'listCalendarSchedules') {
|
|
145
|
+
const cal_id = this.getNodeParameter('cal_id', i);
|
|
146
|
+
const offset = this.getNodeParameter('offset', i, 0);
|
|
147
|
+
const limit = this.getNodeParameter('limit', i, 100);
|
|
148
|
+
response = await transport_1.weComApiRequest.call(this, 'POST', '/cgi-bin/oa/schedule/get_by_calendar', {
|
|
149
|
+
cal_id,
|
|
150
|
+
offset,
|
|
151
|
+
limit,
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
else if (operation === 'getSchedule') {
|
|
155
|
+
const schedule_id_list = this.getNodeParameter('schedule_id_list', i);
|
|
156
|
+
response = await transport_1.weComApiRequest.call(this, 'POST', '/cgi-bin/oa/schedule/get', {
|
|
157
|
+
schedule_id_list: schedule_id_list.split(',').map((id) => id.trim()),
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
else if (operation === 'cancelSchedule') {
|
|
161
|
+
const schedule_id = this.getNodeParameter('schedule_id', i);
|
|
162
|
+
response = await transport_1.weComApiRequest.call(this, 'POST', '/cgi-bin/oa/schedule/del', {
|
|
163
|
+
schedule_id,
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
response = {};
|
|
168
|
+
}
|
|
169
|
+
returnData.push({
|
|
170
|
+
json: response,
|
|
171
|
+
pairedItem: { item: i },
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
catch (error) {
|
|
175
|
+
if (this.continueOnFail()) {
|
|
176
|
+
returnData.push({
|
|
177
|
+
json: {
|
|
178
|
+
error: error.message,
|
|
179
|
+
},
|
|
180
|
+
pairedItem: { item: i },
|
|
181
|
+
});
|
|
182
|
+
continue;
|
|
183
|
+
}
|
|
184
|
+
throw error;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
return returnData;
|
|
188
|
+
}
|
|
189
|
+
//# sourceMappingURL=execute.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../../../nodes/WeCom/resources/calendar/execute.ts"],"names":[],"mappings":";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KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;iBACpE,CAAC,CAAC;YACJ,CAAC;iBAAM,IAAI,SAAS,KAAK,gBAAgB,EAAE,CAAC;gBAC3C,MAAM,WAAW,GAAG,IAAI,CAAC,gBAAgB,CAAC,aAAa,EAAE,CAAC,CAAW,CAAC;gBAEtE,QAAQ,GAAG,MAAM,2BAAe,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,0BAA0B,EAAE;oBAC/E,WAAW;iBACX,CAAC,CAAC;YACJ,CAAC;iBAAM,CAAC;gBACP,QAAQ,GAAG,EAAE,CAAC;YACf,CAAC;YAED,UAAU,CAAC,IAAI,CAAC;gBACf,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;aACvB,CAAC,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,IAAI,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;gBAC3B,UAAU,CAAC,IAAI,CAAC;oBACf,IAAI,EAAE;wBACL,KAAK,EAAE,KAAK,CAAC,OAAO;qBACpB;oBACD,UAAU,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;iBACvB,CAAC,CAAC;gBACH,SAAS;YACV,CAAC;YACD,MAAM,KAAK,CAAC;QACb,CAAC;IACF,CAAC;IAED,OAAO,UAAU,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCalendarDescription = void 0;
|
|
4
|
+
const showOnlyForGet = {
|
|
5
|
+
resource: ['calendar'],
|
|
6
|
+
operation: ['getCalendar'],
|
|
7
|
+
};
|
|
8
|
+
exports.getCalendarDescription = [
|
|
9
|
+
{
|
|
10
|
+
displayName: '日历ID列表',
|
|
11
|
+
name: 'cal_id_list',
|
|
12
|
+
type: 'string',
|
|
13
|
+
required: true,
|
|
14
|
+
displayOptions: {
|
|
15
|
+
show: showOnlyForGet,
|
|
16
|
+
},
|
|
17
|
+
default: '',
|
|
18
|
+
description: 'Calendar ID list, separated by commas',
|
|
19
|
+
hint: '日历ID列表,用逗号分隔',
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
//# sourceMappingURL=getCalendar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getCalendar.js","sourceRoot":"","sources":["../../../../../nodes/WeCom/resources/calendar/getCalendar.ts"],"names":[],"mappings":";;;AAEA,MAAM,cAAc,GAAG;IACtB,QAAQ,EAAE,CAAC,UAAU,CAAC;IACtB,SAAS,EAAE,CAAC,aAAa,CAAC;CAC1B,CAAC;AAEW,QAAA,sBAAsB,GAAsB;IACxD;QACC,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE,cAAc;SACpB;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,uCAAuC;QACpD,IAAI,EAAE,cAAc;KACpB;CACD,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getScheduleDescription = void 0;
|
|
4
|
+
const showOnlyForGet = {
|
|
5
|
+
resource: ['calendar'],
|
|
6
|
+
operation: ['getSchedule'],
|
|
7
|
+
};
|
|
8
|
+
exports.getScheduleDescription = [
|
|
9
|
+
{
|
|
10
|
+
displayName: '日程ID列表',
|
|
11
|
+
name: 'schedule_id_list',
|
|
12
|
+
type: 'string',
|
|
13
|
+
required: true,
|
|
14
|
+
displayOptions: {
|
|
15
|
+
show: showOnlyForGet,
|
|
16
|
+
},
|
|
17
|
+
default: '',
|
|
18
|
+
description: 'Schedule ID list, separated by commas',
|
|
19
|
+
hint: '日程ID列表,用逗号分隔',
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
//# sourceMappingURL=getSchedule.js.map
|