n8n-nodes-wecom 0.1.23 → 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.
Files changed (133) hide show
  1. package/README.md +120 -2
  2. package/dist/nodes/WeCom/resources/calendar/addScheduleAttendees.d.ts +2 -0
  3. package/dist/nodes/WeCom/resources/calendar/addScheduleAttendees.js +34 -0
  4. package/dist/nodes/WeCom/resources/calendar/addScheduleAttendees.js.map +1 -0
  5. package/dist/nodes/WeCom/resources/calendar/cancelSchedule.d.ts +2 -0
  6. package/dist/nodes/WeCom/resources/calendar/cancelSchedule.js +22 -0
  7. package/dist/nodes/WeCom/resources/calendar/cancelSchedule.js.map +1 -0
  8. package/dist/nodes/WeCom/resources/calendar/createCalendar.d.ts +2 -0
  9. package/dist/nodes/WeCom/resources/calendar/createCalendar.js +81 -0
  10. package/dist/nodes/WeCom/resources/calendar/createCalendar.js.map +1 -0
  11. package/dist/nodes/WeCom/resources/calendar/createSchedule.d.ts +2 -0
  12. package/dist/nodes/WeCom/resources/calendar/createSchedule.js +33 -0
  13. package/dist/nodes/WeCom/resources/calendar/createSchedule.js.map +1 -0
  14. package/dist/nodes/WeCom/resources/calendar/deleteCalendar.d.ts +2 -0
  15. package/dist/nodes/WeCom/resources/calendar/deleteCalendar.js +22 -0
  16. package/dist/nodes/WeCom/resources/calendar/deleteCalendar.js.map +1 -0
  17. package/dist/nodes/WeCom/resources/calendar/deleteScheduleAttendees.d.ts +2 -0
  18. package/dist/nodes/WeCom/resources/calendar/deleteScheduleAttendees.js +34 -0
  19. package/dist/nodes/WeCom/resources/calendar/deleteScheduleAttendees.js.map +1 -0
  20. package/dist/nodes/WeCom/resources/calendar/execute.d.ts +2 -0
  21. package/dist/nodes/WeCom/resources/calendar/execute.js +189 -0
  22. package/dist/nodes/WeCom/resources/calendar/execute.js.map +1 -0
  23. package/dist/nodes/WeCom/resources/calendar/getCalendar.d.ts +2 -0
  24. package/dist/nodes/WeCom/resources/calendar/getCalendar.js +22 -0
  25. package/dist/nodes/WeCom/resources/calendar/getCalendar.js.map +1 -0
  26. package/dist/nodes/WeCom/resources/calendar/getSchedule.d.ts +2 -0
  27. package/dist/nodes/WeCom/resources/calendar/getSchedule.js +22 -0
  28. package/dist/nodes/WeCom/resources/calendar/getSchedule.js.map +1 -0
  29. package/dist/nodes/WeCom/resources/calendar/index.d.ts +2 -0
  30. package/dist/nodes/WeCom/resources/calendar/index.js +117 -0
  31. package/dist/nodes/WeCom/resources/calendar/index.js.map +1 -0
  32. package/dist/nodes/WeCom/resources/calendar/listCalendarSchedules.d.ts +2 -0
  33. package/dist/nodes/WeCom/resources/calendar/listCalendarSchedules.js +47 -0
  34. package/dist/nodes/WeCom/resources/calendar/listCalendarSchedules.js.map +1 -0
  35. package/dist/nodes/WeCom/resources/calendar/updateCalendar.d.ts +2 -0
  36. package/dist/nodes/WeCom/resources/calendar/updateCalendar.js +80 -0
  37. package/dist/nodes/WeCom/resources/calendar/updateCalendar.js.map +1 -0
  38. package/dist/nodes/WeCom/resources/calendar/updateRecurringSchedule.d.ts +2 -0
  39. package/dist/nodes/WeCom/resources/calendar/updateRecurringSchedule.js +34 -0
  40. package/dist/nodes/WeCom/resources/calendar/updateRecurringSchedule.js.map +1 -0
  41. package/dist/nodes/WeCom/resources/calendar/updateSchedule.d.ts +2 -0
  42. package/dist/nodes/WeCom/resources/calendar/updateSchedule.js +34 -0
  43. package/dist/nodes/WeCom/resources/calendar/updateSchedule.js.map +1 -0
  44. package/dist/nodes/WeCom/resources/meeting/allocateMeetingAdvancedAccount.d.ts +2 -0
  45. package/dist/nodes/WeCom/resources/meeting/allocateMeetingAdvancedAccount.js +22 -0
  46. package/dist/nodes/WeCom/resources/meeting/allocateMeetingAdvancedAccount.js.map +1 -0
  47. package/dist/nodes/WeCom/resources/meeting/cancelMeeting.d.ts +2 -0
  48. package/dist/nodes/WeCom/resources/meeting/cancelMeeting.js +22 -0
  49. package/dist/nodes/WeCom/resources/meeting/cancelMeeting.js.map +1 -0
  50. package/dist/nodes/WeCom/resources/meeting/createAdvancedMeeting.d.ts +2 -0
  51. package/dist/nodes/WeCom/resources/meeting/createAdvancedMeeting.js +22 -0
  52. package/dist/nodes/WeCom/resources/meeting/createAdvancedMeeting.js.map +1 -0
  53. package/dist/nodes/WeCom/resources/meeting/createMeeting.d.ts +2 -0
  54. package/dist/nodes/WeCom/resources/meeting/createMeeting.js +72 -0
  55. package/dist/nodes/WeCom/resources/meeting/createMeeting.js.map +1 -0
  56. package/dist/nodes/WeCom/resources/meeting/deallocateMeetingAdvancedAccount.d.ts +2 -0
  57. package/dist/nodes/WeCom/resources/meeting/deallocateMeetingAdvancedAccount.js +22 -0
  58. package/dist/nodes/WeCom/resources/meeting/deallocateMeetingAdvancedAccount.js.map +1 -0
  59. package/dist/nodes/WeCom/resources/meeting/endMeeting.d.ts +2 -0
  60. package/dist/nodes/WeCom/resources/meeting/endMeeting.js +22 -0
  61. package/dist/nodes/WeCom/resources/meeting/endMeeting.js.map +1 -0
  62. package/dist/nodes/WeCom/resources/meeting/execute.d.ts +2 -0
  63. package/dist/nodes/WeCom/resources/meeting/execute.js +228 -0
  64. package/dist/nodes/WeCom/resources/meeting/execute.js.map +1 -0
  65. package/dist/nodes/WeCom/resources/meeting/getLiveParticipants.d.ts +2 -0
  66. package/dist/nodes/WeCom/resources/meeting/getLiveParticipants.js +47 -0
  67. package/dist/nodes/WeCom/resources/meeting/getLiveParticipants.js.map +1 -0
  68. package/dist/nodes/WeCom/resources/meeting/getMeetingAdvancedAccountList.d.ts +2 -0
  69. package/dist/nodes/WeCom/resources/meeting/getMeetingAdvancedAccountList.js +35 -0
  70. package/dist/nodes/WeCom/resources/meeting/getMeetingAdvancedAccountList.js.map +1 -0
  71. package/dist/nodes/WeCom/resources/meeting/getMeetingInfo.d.ts +2 -0
  72. package/dist/nodes/WeCom/resources/meeting/getMeetingInfo.js +22 -0
  73. package/dist/nodes/WeCom/resources/meeting/getMeetingInfo.js.map +1 -0
  74. package/dist/nodes/WeCom/resources/meeting/getMeetingInvitees.d.ts +2 -0
  75. package/dist/nodes/WeCom/resources/meeting/getMeetingInvitees.js +47 -0
  76. package/dist/nodes/WeCom/resources/meeting/getMeetingInvitees.js.map +1 -0
  77. package/dist/nodes/WeCom/resources/meeting/getMeetingRecords.d.ts +2 -0
  78. package/dist/nodes/WeCom/resources/meeting/getMeetingRecords.js +70 -0
  79. package/dist/nodes/WeCom/resources/meeting/getMeetingRecords.js.map +1 -0
  80. package/dist/nodes/WeCom/resources/meeting/getParticipants.d.ts +2 -0
  81. package/dist/nodes/WeCom/resources/meeting/getParticipants.js +47 -0
  82. package/dist/nodes/WeCom/resources/meeting/getParticipants.js.map +1 -0
  83. package/dist/nodes/WeCom/resources/meeting/getRecordingAddress.d.ts +2 -0
  84. package/dist/nodes/WeCom/resources/meeting/getRecordingAddress.js +22 -0
  85. package/dist/nodes/WeCom/resources/meeting/getRecordingAddress.js.map +1 -0
  86. package/dist/nodes/WeCom/resources/meeting/getUserMeetings.d.ts +2 -0
  87. package/dist/nodes/WeCom/resources/meeting/getUserMeetings.js +47 -0
  88. package/dist/nodes/WeCom/resources/meeting/getUserMeetings.js.map +1 -0
  89. package/dist/nodes/WeCom/resources/meeting/index.d.ts +2 -0
  90. package/dist/nodes/WeCom/resources/meeting/index.js +181 -0
  91. package/dist/nodes/WeCom/resources/meeting/index.js.map +1 -0
  92. package/dist/nodes/WeCom/resources/meeting/listRecordings.d.ts +2 -0
  93. package/dist/nodes/WeCom/resources/meeting/listRecordings.js +22 -0
  94. package/dist/nodes/WeCom/resources/meeting/listRecordings.js.map +1 -0
  95. package/dist/nodes/WeCom/resources/meeting/muteMember.d.ts +2 -0
  96. package/dist/nodes/WeCom/resources/meeting/muteMember.js +50 -0
  97. package/dist/nodes/WeCom/resources/meeting/muteMember.js.map +1 -0
  98. package/dist/nodes/WeCom/resources/meeting/removeMember.d.ts +2 -0
  99. package/dist/nodes/WeCom/resources/meeting/removeMember.js +34 -0
  100. package/dist/nodes/WeCom/resources/meeting/removeMember.js.map +1 -0
  101. package/dist/nodes/WeCom/resources/meeting/updateAdvancedMeeting.d.ts +2 -0
  102. package/dist/nodes/WeCom/resources/meeting/updateAdvancedMeeting.js +34 -0
  103. package/dist/nodes/WeCom/resources/meeting/updateAdvancedMeeting.js.map +1 -0
  104. package/dist/nodes/WeCom/resources/meeting/updateMeeting.d.ts +2 -0
  105. package/dist/nodes/WeCom/resources/meeting/updateMeeting.js +55 -0
  106. package/dist/nodes/WeCom/resources/meeting/updateMeeting.js.map +1 -0
  107. package/dist/nodes/WeCom/resources/meeting/updateMeetingInvitees.d.ts +2 -0
  108. package/dist/nodes/WeCom/resources/meeting/updateMeetingInvitees.js +34 -0
  109. package/dist/nodes/WeCom/resources/meeting/updateMeetingInvitees.js.map +1 -0
  110. package/dist/nodes/WeCom/resources/system/execute.d.ts +2 -0
  111. package/dist/nodes/WeCom/resources/system/execute.js +21 -0
  112. package/dist/nodes/WeCom/resources/system/execute.js.map +1 -0
  113. package/dist/nodes/WeCom/resources/system/getApiDomainIp.d.ts +2 -0
  114. package/dist/nodes/WeCom/resources/system/getApiDomainIp.js +9 -0
  115. package/dist/nodes/WeCom/resources/system/getApiDomainIp.js.map +1 -0
  116. package/dist/nodes/WeCom/resources/system/getCallbackIp.d.ts +2 -0
  117. package/dist/nodes/WeCom/resources/system/getCallbackIp.js +9 -0
  118. package/dist/nodes/WeCom/resources/system/getCallbackIp.js.map +1 -0
  119. package/dist/nodes/WeCom/resources/system/index.d.ts +2 -0
  120. package/dist/nodes/WeCom/resources/system/index.js +32 -0
  121. package/dist/nodes/WeCom/resources/system/index.js.map +1 -0
  122. package/dist/nodes/WeCom/shared/crypto.d.ts +2 -0
  123. package/dist/nodes/WeCom/shared/crypto.js +70 -0
  124. package/dist/nodes/WeCom/shared/crypto.js.map +1 -1
  125. package/dist/nodes/WeComBase/WeComBase.node.js +17 -2
  126. package/dist/nodes/WeComBase/WeComBase.node.js.map +1 -1
  127. package/dist/nodes/WeComOffice/WeComOffice.node.js +28 -6
  128. package/dist/nodes/WeComOffice/WeComOffice.node.js.map +1 -1
  129. package/dist/nodes/WeComTrigger/WeComTrigger.node.js +152 -1
  130. package/dist/nodes/WeComTrigger/WeComTrigger.node.js.map +1 -1
  131. package/dist/package.json +1 -1
  132. package/dist/tsconfig.tsbuildinfo +1 -1
  133. 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
  - **微盘管理** - 微盘空间和文件管理
@@ -126,6 +128,23 @@ npm install n8n-nodes-wecom
126
128
  5. 复制节点的 Webhook URL
127
129
  6. 在企业微信应用管理后台配置接收消息时,使用**相同的** Token 和 EncodingAESKey
128
130
 
131
+ **被动回复消息配置:**
132
+
133
+ 如果需要在接收到用户消息后自动回复,可以启用"被动回复消息"功能:
134
+
135
+ 1. 在触发器节点中,启用"被动回复消息"选项
136
+ 2. 选择回复消息类型(文本、图片、语音、视频、图文)
137
+ 3. 配置对应的字段名称
138
+ 4. 在工作流中通过后续节点设置回复内容到指定字段
139
+
140
+ **注意事项:**
141
+
142
+ - 被动回复消息会自动进行加密和签名,无需手动处理
143
+ - 如果未在工作流中设置相应字段,文本消息会返回默认内容"感谢您的消息,我们已收到!"
144
+ - 媒体类型消息必须先通过素材管理接口上传获得 media_id,否则会报错
145
+ - 图文消息需要提供包含 Title、Url 等字段的数组
146
+ - 被动回复失败时会在输出数据的 `_passiveReplyError` 字段中记录错误信息
147
+
129
148
  ## 已实现功能
130
149
 
131
150
  以下功能按照企业微信官方文档分类组织:
@@ -138,6 +157,8 @@ npm install n8n-nodes-wecom
138
157
 
139
158
  > 📖 [官方文档:接收消息与事件](https://developer.work.weixin.qq.com/document/path/90238)
140
159
 
160
+ **接收消息功能:**
161
+
141
162
  - ✅ [接收企业微信应用消息回调](https://developer.work.weixin.qq.com/document/path/90238)
142
163
  - ✅ [接收文本消息](https://developer.work.weixin.qq.com/document/path/90239)
143
164
  - ✅ [接收图片消息](https://developer.work.weixin.qq.com/document/path/90239)
@@ -150,6 +171,23 @@ npm install n8n-nodes-wecom
150
171
  - ✅ 消息加解密
151
172
  - ✅ 签名验证
152
173
 
174
+ **被动回复消息功能:**
175
+
176
+ > 📖 [官方文档:被动回复消息](https://developer.work.weixin.qq.com/document/path/90241)
177
+
178
+ - ✅ [被动回复文本消息](https://developer.work.weixin.qq.com/document/path/90241)
179
+ - ✅ [被动回复图片消息](https://developer.work.weixin.qq.com/document/path/90241)
180
+ - ✅ [被动回复语音消息](https://developer.work.weixin.qq.com/document/path/90241)
181
+ - ✅ [被动回复视频消息](https://developer.work.weixin.qq.com/document/path/90241)
182
+ - ✅ [被动回复图文消息](https://developer.work.weixin.qq.com/document/path/90241)
183
+ - ✅ 自动加密和签名
184
+ - ✅ 支持从工作流输出中读取回复内容
185
+
186
+ **回调机制参考文档:**
187
+
188
+ - 📖 [回调机制说明](https://developer.work.weixin.qq.com/document/path/92520)
189
+ - 📖 [回调机制示例代码](https://developer.work.weixin.qq.com/document/path/92521)
190
+
153
191
  ### 📩 消息推送(群机器人)
154
192
 
155
193
  > 📖 [官方文档:消息推送配置说明](https://developer.work.weixin.qq.com/document/path/99110)
@@ -313,6 +351,22 @@ npm install n8n-nodes-wecom
313
351
  - ✅ [新增对接规则](https://developer.work.weixin.qq.com/document/path/95634)
314
352
  - ✅ [更新对接规则](https://developer.work.weixin.qq.com/document/path/95635)
315
353
 
354
+ ### ⚙️ 系统
355
+
356
+ > 📖 [官方文档:获取企业微信服务器IP段](https://developer.work.weixin.qq.com/document/path/92520)
357
+
358
+ - ✅ [获取企业微信接口IP段](https://developer.work.weixin.qq.com/document/path/92520)
359
+ - ✅ [获取企业微信回调IP段](https://developer.work.weixin.qq.com/document/path/92521)
360
+
361
+ **用途说明:**
362
+
363
+ 这些接口用于获取企业微信服务器的IP地址段,可用于:
364
+
365
+ - **安全配置**:将获取到的IP段添加到防火墙白名单,只允许企业微信服务器访问
366
+ - **接口调用安全**:配置API接口IP段白名单,防止非法调用
367
+ - **回调安全**:配置回调服务器IP段白名单,确保只接收来自企业微信官方服务器的回调请求
368
+ - **网络隔离**:在专网或VPN环境中,只开放对企业微信服务器IP段的访问权限
369
+
316
370
  ---
317
371
 
318
372
  ## 二、办公功能(企业微信-办公 节点)
@@ -358,7 +412,7 @@ npm install n8n-nodes-wecom
358
412
  - ✅ [获取客户端专用密码列表](https://developer.work.weixin.qq.com/document/path/100183)
359
413
  - ✅ [删除客户端专用密码](https://developer.work.weixin.qq.com/document/path/100184)
360
414
 
361
- #### 高级功能账号管理
415
+ #### 邮件高级功能账号管理
362
416
 
363
417
  - ✅ [分配高级功能账号](https://developer.work.weixin.qq.com/document/path/99316)
364
418
  - ✅ [取消高级功能账号](https://developer.work.weixin.qq.com/document/path/99317)
@@ -430,7 +484,7 @@ npm install n8n-nodes-wecom
430
484
  - ✅ [收集表的统计信息查询](https://developer.work.weixin.qq.com/document/path/97818)
431
485
  - ✅ [读取收集表答案](https://developer.work.weixin.qq.com/document/path/97819)
432
486
 
433
- #### 高级功能账号管理
487
+ #### 文档高级功能账号管理
434
488
 
435
489
  - ✅ [分配高级功能账号](https://developer.work.weixin.qq.com/document/path/99516)
436
490
  - ✅ [取消高级功能账号](https://developer.work.weixin.qq.com/document/path/99517)
@@ -440,6 +494,70 @@ npm install n8n-nodes-wecom
440
494
 
441
495
  - ✅ [上传文档图片](https://developer.work.weixin.qq.com/document/path/99933)
442
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
+
443
561
  ### 💾 微盘管理
444
562
 
445
563
  > 📖 [官方文档:微盘](https://developer.work.weixin.qq.com/document/path/93654)
@@ -0,0 +1,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const addScheduleAttendeesDescription: INodeProperties[];
@@ -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,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const cancelScheduleDescription: INodeProperties[];
@@ -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,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const createCalendarDescription: INodeProperties[];
@@ -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,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const createScheduleDescription: INodeProperties[];
@@ -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,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const deleteCalendarDescription: INodeProperties[];
@@ -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,2 @@
1
+ import type { INodeProperties } from 'n8n-workflow';
2
+ export declare const deleteScheduleAttendeesDescription: INodeProperties[];
@@ -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,2 @@
1
+ import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
2
+ export declare function executeCalendar(this: IExecuteFunctions, operation: string, items: INodeExecutionData[]): Promise<INodeExecutionData[]>;
@@ -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