n8n-nodes-wecom 0.3.13 → 0.3.15

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.
@@ -59,6 +59,11 @@ exports.passiveReplyDescription = [
59
59
  value: 'news',
60
60
  description: '回复图文消息',
61
61
  },
62
+ {
63
+ name: '模板卡片更新消息',
64
+ value: 'update_template_card',
65
+ description: '更新模板卡片消息',
66
+ },
62
67
  ],
63
68
  default: 'text',
64
69
  description: '被动回复的消息类型',
@@ -188,6 +193,779 @@ exports.passiveReplyDescription = [
188
193
  ],
189
194
  description: '图文消息列表',
190
195
  },
196
+ {
197
+ displayName: '模板卡片类型',
198
+ name: 'cardType',
199
+ type: 'options',
200
+ options: [
201
+ {
202
+ name: '文本通知型',
203
+ value: 'text_notice',
204
+ description: '文本通知型模板卡片',
205
+ },
206
+ {
207
+ name: '图文展示型',
208
+ value: 'news_notice',
209
+ description: '图文展示型模板卡片',
210
+ },
211
+ {
212
+ name: '按钮交互型',
213
+ value: 'button_interaction',
214
+ description: '按钮交互型模板卡片',
215
+ },
216
+ {
217
+ name: '投票选择型',
218
+ value: 'vote_interaction',
219
+ description: '投票选择型模板卡片',
220
+ },
221
+ {
222
+ name: '多项选择型',
223
+ value: 'multiple_interaction',
224
+ description: '多项选择型模板卡片',
225
+ },
226
+ ],
227
+ displayOptions: {
228
+ show: {
229
+ ...showOnlyForPassiveReply,
230
+ operation: ['reply'],
231
+ replyType: ['update_template_card'],
232
+ },
233
+ },
234
+ default: 'text_notice',
235
+ description: '选择模板卡片的类型',
236
+ },
237
+ {
238
+ displayName: '卡片来源',
239
+ name: 'cardSource',
240
+ type: 'fixedCollection',
241
+ default: {},
242
+ placeholder: '添加来源信息',
243
+ displayOptions: {
244
+ show: {
245
+ ...showOnlyForPassiveReply,
246
+ operation: ['reply'],
247
+ replyType: ['update_template_card'],
248
+ },
249
+ },
250
+ description: '可选。模板卡片来源样式信息',
251
+ options: [
252
+ {
253
+ name: 'source',
254
+ displayName: '来源信息',
255
+ values: [
256
+ {
257
+ displayName: '来源图标URL',
258
+ name: 'icon_url',
259
+ type: 'string',
260
+ default: '',
261
+ placeholder: 'https://example.com/icon.png',
262
+ description: '来源图标的URL地址',
263
+ },
264
+ {
265
+ displayName: '来源描述',
266
+ name: 'desc',
267
+ type: 'string',
268
+ default: '',
269
+ placeholder: '企业微信',
270
+ description: '来源的描述文字',
271
+ },
272
+ ],
273
+ },
274
+ ],
275
+ },
276
+ {
277
+ displayName: '一级标题',
278
+ name: 'cardMainTitle',
279
+ type: 'fixedCollection',
280
+ default: {},
281
+ placeholder: '添加标题',
282
+ displayOptions: {
283
+ show: {
284
+ ...showOnlyForPassiveReply,
285
+ operation: ['reply'],
286
+ replyType: ['update_template_card'],
287
+ },
288
+ },
289
+ description: '模板卡片的主要内容,包含一级标题和标题辅助信息',
290
+ options: [
291
+ {
292
+ name: 'mainTitle',
293
+ displayName: '标题内容',
294
+ values: [
295
+ {
296
+ displayName: '标题',
297
+ name: 'title',
298
+ type: 'string',
299
+ default: '',
300
+ placeholder: '欢迎使用',
301
+ description: '一级标题文本',
302
+ },
303
+ {
304
+ displayName: '副标题',
305
+ name: 'desc',
306
+ type: 'string',
307
+ default: '',
308
+ placeholder: '点击查看详情',
309
+ description: '标题辅助信息',
310
+ },
311
+ ],
312
+ },
313
+ ],
314
+ },
315
+ {
316
+ displayName: '关键数据样式',
317
+ name: 'cardEmphasisContent',
318
+ type: 'fixedCollection',
319
+ default: {},
320
+ placeholder: '添加关键数据',
321
+ displayOptions: {
322
+ show: {
323
+ ...showOnlyForPassiveReply,
324
+ operation: ['reply'],
325
+ replyType: ['update_template_card'],
326
+ },
327
+ },
328
+ description: '可选。关键数据样式',
329
+ options: [
330
+ {
331
+ name: 'emphasisContent',
332
+ displayName: '关键数据',
333
+ values: [
334
+ {
335
+ displayName: '数据',
336
+ name: 'title',
337
+ type: 'string',
338
+ default: '',
339
+ placeholder: '100',
340
+ description: '关键数据内容',
341
+ },
342
+ {
343
+ displayName: '数据描述',
344
+ name: 'desc',
345
+ type: 'string',
346
+ default: '',
347
+ placeholder: '已完成',
348
+ description: '数据的描述说明',
349
+ },
350
+ ],
351
+ },
352
+ ],
353
+ },
354
+ {
355
+ displayName: '引用文献样式',
356
+ name: 'cardQuoteArea',
357
+ type: 'fixedCollection',
358
+ default: {},
359
+ placeholder: '添加引用',
360
+ displayOptions: {
361
+ show: {
362
+ ...showOnlyForPassiveReply,
363
+ operation: ['reply'],
364
+ replyType: ['update_template_card'],
365
+ },
366
+ },
367
+ description: '可选。引用文献样式,建议不与关键数据共用',
368
+ options: [
369
+ {
370
+ name: 'quoteArea',
371
+ displayName: '引用内容',
372
+ values: [
373
+ {
374
+ displayName: '引用类型',
375
+ name: 'type',
376
+ type: 'options',
377
+ options: [
378
+ {
379
+ name: '边框类型',
380
+ value: 1,
381
+ },
382
+ {
383
+ name: '卡片类型',
384
+ value: 2,
385
+ },
386
+ ],
387
+ default: 1,
388
+ description: '引用文献的样式类型',
389
+ },
390
+ {
391
+ displayName: '引用链接',
392
+ name: 'url',
393
+ type: 'string',
394
+ default: '',
395
+ placeholder: 'https://example.com',
396
+ description: '点击引用后跳转的链接',
397
+ },
398
+ {
399
+ displayName: '引用标题',
400
+ name: 'title',
401
+ type: 'string',
402
+ default: '',
403
+ placeholder: '引用标题',
404
+ description: '引用文献的标题',
405
+ },
406
+ {
407
+ displayName: '引用文本',
408
+ name: 'quote_text',
409
+ type: 'string',
410
+ typeOptions: {
411
+ rows: 3,
412
+ },
413
+ default: '',
414
+ placeholder: '引用的具体内容',
415
+ description: '引用文献的具体文本内容',
416
+ },
417
+ ],
418
+ },
419
+ ],
420
+ },
421
+ {
422
+ displayName: '二级普通文本',
423
+ name: 'cardSubTitleText',
424
+ type: 'string',
425
+ default: '',
426
+ placeholder: '请输入二级文本内容',
427
+ displayOptions: {
428
+ show: {
429
+ ...showOnlyForPassiveReply,
430
+ operation: ['reply'],
431
+ replyType: ['update_template_card'],
432
+ },
433
+ },
434
+ description: '可选。二级普通文本(支持ID转译),建议不超过160个字',
435
+ },
436
+ {
437
+ displayName: '二级标题+文本列表',
438
+ name: 'cardHorizontalContentList',
439
+ type: 'fixedCollection',
440
+ typeOptions: {
441
+ multipleValues: true,
442
+ },
443
+ default: {},
444
+ placeholder: '添加列表项',
445
+ displayOptions: {
446
+ show: {
447
+ ...showOnlyForPassiveReply,
448
+ operation: ['reply'],
449
+ replyType: ['update_template_card'],
450
+ },
451
+ },
452
+ description: '可选。二级标题+文本列表,列表长度不超过6',
453
+ options: [
454
+ {
455
+ name: 'items',
456
+ displayName: '列表项',
457
+ values: [
458
+ {
459
+ displayName: '标题',
460
+ name: 'keyname',
461
+ type: 'string',
462
+ default: '',
463
+ placeholder: '姓名',
464
+ description: '列表项的标题',
465
+ },
466
+ {
467
+ displayName: '内容',
468
+ name: 'value',
469
+ type: 'string',
470
+ default: '',
471
+ placeholder: '张三',
472
+ description: '列表项的内容',
473
+ },
474
+ {
475
+ displayName: '内容类型',
476
+ name: 'type',
477
+ type: 'options',
478
+ options: [
479
+ {
480
+ name: '普通文本',
481
+ value: 0,
482
+ },
483
+ {
484
+ name: '带跳转链接',
485
+ value: 1,
486
+ },
487
+ ],
488
+ default: 0,
489
+ description: '内容的类型',
490
+ },
491
+ {
492
+ displayName: '跳转链接',
493
+ name: 'url',
494
+ type: 'string',
495
+ default: '',
496
+ placeholder: 'https://example.com',
497
+ description: '点击内容后跳转的链接(仅当类型为带跳转链接时有效)',
498
+ displayOptions: {
499
+ show: {
500
+ type: [1],
501
+ },
502
+ },
503
+ },
504
+ ],
505
+ },
506
+ ],
507
+ },
508
+ {
509
+ displayName: '跳转指引样式列表',
510
+ name: 'cardJumpList',
511
+ type: 'fixedCollection',
512
+ typeOptions: {
513
+ multipleValues: true,
514
+ },
515
+ default: {},
516
+ placeholder: '添加跳转指引',
517
+ displayOptions: {
518
+ show: {
519
+ ...showOnlyForPassiveReply,
520
+ operation: ['reply'],
521
+ replyType: ['update_template_card'],
522
+ },
523
+ },
524
+ description: '可选。跳转指引样式的列表,列表长度不超过3',
525
+ options: [
526
+ {
527
+ name: 'items',
528
+ displayName: '跳转指引',
529
+ values: [
530
+ {
531
+ displayName: '跳转类型',
532
+ name: 'type',
533
+ type: 'options',
534
+ options: [
535
+ {
536
+ name: '跳转URL',
537
+ value: 1,
538
+ },
539
+ {
540
+ name: '跳转小程序',
541
+ value: 2,
542
+ },
543
+ ],
544
+ default: 1,
545
+ description: '跳转目标的类型',
546
+ },
547
+ {
548
+ displayName: '标题',
549
+ name: 'title',
550
+ type: 'string',
551
+ default: '',
552
+ placeholder: '查看详情',
553
+ description: '跳转指引的标题',
554
+ },
555
+ {
556
+ displayName: '跳转链接',
557
+ name: 'url',
558
+ type: 'string',
559
+ default: '',
560
+ placeholder: 'https://example.com',
561
+ description: '跳转的URL地址',
562
+ },
563
+ ],
564
+ },
565
+ ],
566
+ },
567
+ {
568
+ displayName: '整体卡片点击跳转',
569
+ name: 'cardAction',
570
+ type: 'fixedCollection',
571
+ default: {},
572
+ placeholder: '设置卡片跳转',
573
+ displayOptions: {
574
+ show: {
575
+ ...showOnlyForPassiveReply,
576
+ operation: ['reply'],
577
+ replyType: ['update_template_card'],
578
+ cardType: ['text_notice'],
579
+ },
580
+ },
581
+ description: '文本通知型必填。整体卡片的点击跳转事件',
582
+ options: [
583
+ {
584
+ name: 'action',
585
+ displayName: '跳转设置',
586
+ values: [
587
+ {
588
+ displayName: '跳转类型',
589
+ name: 'type',
590
+ type: 'options',
591
+ options: [
592
+ {
593
+ name: '跳转URL',
594
+ value: 1,
595
+ },
596
+ {
597
+ name: '跳转小程序',
598
+ value: 2,
599
+ },
600
+ ],
601
+ default: 1,
602
+ description: '点击卡片后的跳转类型',
603
+ },
604
+ {
605
+ displayName: '跳转链接',
606
+ name: 'url',
607
+ type: 'string',
608
+ default: '',
609
+ placeholder: 'https://example.com',
610
+ description: '跳转的URL地址',
611
+ },
612
+ ],
613
+ },
614
+ ],
615
+ },
616
+ {
617
+ displayName: '任务ID',
618
+ name: 'cardTaskId',
619
+ type: 'string',
620
+ default: '',
621
+ placeholder: 'task_001',
622
+ displayOptions: {
623
+ show: {
624
+ ...showOnlyForPassiveReply,
625
+ operation: ['reply'],
626
+ replyType: ['update_template_card'],
627
+ },
628
+ },
629
+ description: '可选。任务ID,同一个应用任务ID不能重复',
630
+ },
631
+ {
632
+ displayName: '按钮列表',
633
+ name: 'cardButtonList',
634
+ type: 'fixedCollection',
635
+ typeOptions: {
636
+ multipleValues: true,
637
+ },
638
+ default: {},
639
+ placeholder: '添加按钮',
640
+ displayOptions: {
641
+ show: {
642
+ ...showOnlyForPassiveReply,
643
+ operation: ['reply'],
644
+ replyType: ['update_template_card'],
645
+ cardType: ['button_interaction'],
646
+ },
647
+ },
648
+ description: '按钮交互型卡片的按钮列表,列表长度不超过6',
649
+ options: [
650
+ {
651
+ name: 'buttons',
652
+ displayName: '按钮',
653
+ values: [
654
+ {
655
+ displayName: '按钮文本',
656
+ name: 'text',
657
+ type: 'string',
658
+ default: '',
659
+ placeholder: '同意',
660
+ description: '按钮上显示的文字',
661
+ },
662
+ {
663
+ displayName: '按钮样式',
664
+ name: 'style',
665
+ type: 'options',
666
+ options: [
667
+ {
668
+ name: '蓝色样式',
669
+ value: 1,
670
+ },
671
+ {
672
+ name: '灰色样式',
673
+ value: 2,
674
+ },
675
+ ],
676
+ default: 1,
677
+ description: '按钮的样式类型',
678
+ },
679
+ {
680
+ displayName: '按钮Key',
681
+ name: 'key',
682
+ type: 'string',
683
+ default: '',
684
+ placeholder: 'btn_agree',
685
+ description: '按钮的唯一标识,用于回调事件',
686
+ },
687
+ ],
688
+ },
689
+ ],
690
+ },
691
+ {
692
+ displayName: '选择题Key值',
693
+ name: 'cardCheckboxQuestionKey',
694
+ type: 'string',
695
+ default: '',
696
+ placeholder: 'question_001',
697
+ displayOptions: {
698
+ show: {
699
+ ...showOnlyForPassiveReply,
700
+ operation: ['reply'],
701
+ replyType: ['update_template_card'],
702
+ cardType: ['vote_interaction', 'multiple_interaction'],
703
+ },
704
+ },
705
+ description: '可选。选择题key值,用户提交选项后会产生回调事件',
706
+ },
707
+ {
708
+ displayName: '选择题模式',
709
+ name: 'cardCheckboxMode',
710
+ type: 'options',
711
+ options: [
712
+ {
713
+ name: '单选',
714
+ value: 'single',
715
+ },
716
+ {
717
+ name: '多选',
718
+ value: 'multiple',
719
+ },
720
+ ],
721
+ default: 'single',
722
+ displayOptions: {
723
+ show: {
724
+ ...showOnlyForPassiveReply,
725
+ operation: ['reply'],
726
+ replyType: ['update_template_card'],
727
+ cardType: ['vote_interaction', 'multiple_interaction'],
728
+ },
729
+ },
730
+ description: '可选。选择题模式,单选或多选',
731
+ },
732
+ {
733
+ displayName: '选项列表',
734
+ name: 'cardOptionList',
735
+ type: 'fixedCollection',
736
+ typeOptions: {
737
+ multipleValues: true,
738
+ },
739
+ default: {},
740
+ placeholder: '添加选项',
741
+ displayOptions: {
742
+ show: {
743
+ ...showOnlyForPassiveReply,
744
+ operation: ['reply'],
745
+ replyType: ['update_template_card'],
746
+ cardType: ['vote_interaction', 'multiple_interaction'],
747
+ },
748
+ },
749
+ description: '选项列表,列表长度不超过10',
750
+ options: [
751
+ {
752
+ name: 'options',
753
+ displayName: '选项',
754
+ values: [
755
+ {
756
+ displayName: '选项ID',
757
+ name: 'id',
758
+ type: 'string',
759
+ default: '',
760
+ placeholder: 'option1',
761
+ description: '选项的唯一标识',
762
+ },
763
+ {
764
+ displayName: '选项文本',
765
+ name: 'text',
766
+ type: 'string',
767
+ default: '',
768
+ placeholder: '选项一',
769
+ description: '选项显示的文本',
770
+ },
771
+ ],
772
+ },
773
+ ],
774
+ },
775
+ {
776
+ displayName: '提交按钮文案',
777
+ name: 'cardSubmitButtonText',
778
+ type: 'string',
779
+ default: '提交',
780
+ placeholder: '提交',
781
+ displayOptions: {
782
+ show: {
783
+ ...showOnlyForPassiveReply,
784
+ operation: ['reply'],
785
+ replyType: ['update_template_card'],
786
+ cardType: ['vote_interaction', 'multiple_interaction'],
787
+ },
788
+ },
789
+ description: '可选。提交按钮文案,建议不超过10个字',
790
+ },
791
+ {
792
+ displayName: '提交按钮Key值',
793
+ name: 'cardSubmitButtonKey',
794
+ type: 'string',
795
+ default: '',
796
+ placeholder: 'submit_001',
797
+ displayOptions: {
798
+ show: {
799
+ ...showOnlyForPassiveReply,
800
+ operation: ['reply'],
801
+ replyType: ['update_template_card'],
802
+ cardType: ['vote_interaction', 'multiple_interaction'],
803
+ },
804
+ },
805
+ description: '提交按钮key值,用户提交选项后会产生回调事件',
806
+ },
807
+ {
808
+ displayName: '图片样式',
809
+ name: 'cardImageTextArea',
810
+ type: 'fixedCollection',
811
+ default: {},
812
+ placeholder: '添加图片',
813
+ displayOptions: {
814
+ show: {
815
+ ...showOnlyForPassiveReply,
816
+ operation: ['reply'],
817
+ replyType: ['update_template_card'],
818
+ cardType: ['news_notice'],
819
+ },
820
+ },
821
+ description: '可选。左图右文样式',
822
+ options: [
823
+ {
824
+ name: 'imageText',
825
+ displayName: '图片内容',
826
+ values: [
827
+ {
828
+ displayName: '图片类型',
829
+ name: 'type',
830
+ type: 'options',
831
+ options: [
832
+ {
833
+ name: '普通图片',
834
+ value: 0,
835
+ },
836
+ {
837
+ name: '可点击图片',
838
+ value: 1,
839
+ },
840
+ ],
841
+ default: 0,
842
+ description: '图片的类型',
843
+ },
844
+ {
845
+ displayName: '图片链接',
846
+ name: 'image_url',
847
+ type: 'string',
848
+ default: '',
849
+ placeholder: 'https://example.com/image.png',
850
+ description: '图片的URL地址',
851
+ },
852
+ {
853
+ displayName: '跳转链接',
854
+ name: 'url',
855
+ type: 'string',
856
+ default: '',
857
+ placeholder: 'https://example.com',
858
+ description: '点击图片后跳转的链接(仅当类型为可点击图片时有效)',
859
+ displayOptions: {
860
+ show: {
861
+ type: [1],
862
+ },
863
+ },
864
+ },
865
+ {
866
+ displayName: '标题',
867
+ name: 'title',
868
+ type: 'string',
869
+ default: '',
870
+ placeholder: '图片标题',
871
+ description: '图片的标题',
872
+ },
873
+ {
874
+ displayName: '描述',
875
+ name: 'desc',
876
+ type: 'string',
877
+ typeOptions: {
878
+ rows: 2,
879
+ },
880
+ default: '',
881
+ placeholder: '图片描述',
882
+ description: '图片的描述文字',
883
+ },
884
+ ],
885
+ },
886
+ ],
887
+ },
888
+ {
889
+ displayName: '卡片右上角更多操作按钮',
890
+ name: 'cardActionMenu',
891
+ type: 'fixedCollection',
892
+ default: {},
893
+ placeholder: '添加操作菜单',
894
+ displayOptions: {
895
+ show: {
896
+ ...showOnlyForPassiveReply,
897
+ operation: ['reply'],
898
+ replyType: ['update_template_card'],
899
+ },
900
+ },
901
+ description: '可选。卡片右上角更多操作按钮',
902
+ options: [
903
+ {
904
+ name: 'actionMenu',
905
+ displayName: '操作菜单',
906
+ values: [
907
+ {
908
+ displayName: '菜单描述',
909
+ name: 'desc',
910
+ type: 'string',
911
+ default: '',
912
+ placeholder: '更多操作',
913
+ description: '菜单的描述文字',
914
+ },
915
+ {
916
+ displayName: '操作列表',
917
+ name: 'action_list',
918
+ type: 'fixedCollection',
919
+ typeOptions: {
920
+ multipleValues: true,
921
+ },
922
+ default: {},
923
+ placeholder: '添加操作',
924
+ options: [
925
+ {
926
+ name: 'actions',
927
+ displayName: '操作',
928
+ values: [
929
+ {
930
+ displayName: '操作文本',
931
+ name: 'text',
932
+ type: 'string',
933
+ default: '',
934
+ placeholder: '删除',
935
+ description: '操作的文本',
936
+ },
937
+ {
938
+ displayName: '操作Key',
939
+ name: 'key',
940
+ type: 'string',
941
+ default: '',
942
+ placeholder: 'action_delete',
943
+ description: '操作的唯一标识',
944
+ },
945
+ ],
946
+ },
947
+ ],
948
+ },
949
+ ],
950
+ },
951
+ ],
952
+ },
953
+ {
954
+ displayName: '按钮替换名称',
955
+ name: 'buttonReplaceName',
956
+ type: 'string',
957
+ displayOptions: {
958
+ show: {
959
+ ...showOnlyForPassiveReply,
960
+ operation: ['reply'],
961
+ replyType: ['update_template_card'],
962
+ },
963
+ },
964
+ default: '',
965
+ description: '可选。按钮替换名称,用于简单的按钮状态更新',
966
+ placeholder: 'replace_name',
967
+ hint: '如果只需要更新按钮状态,可以只填写此字段而不填写完整卡片内容',
968
+ },
191
969
  {
192
970
  displayName: '使用说明',
193
971
  name: 'passiveReplyNotice',
@@ -199,7 +977,7 @@ exports.passiveReplyDescription = [
199
977
  },
200
978
  },
201
979
  default: '',
202
- description: '参考 Webhook 和 Respond to Webhook 的使用方式:企业微信消息接收(被动回复)触发器 → 处理节点(可选)→ 本节点。本节点通过 sendResponse() 发送响应,必须是工作流的最后一个节点。企业微信要求在 5 秒内返回响应。',
980
+ description: '工作流结构:企业微信消息接收(被动回复)触发器 → 处理节点(可选)→ 本节点。本节点必须是最后一个节点,须在 5 秒内返回响应。',
203
981
  },
204
982
  ];
205
983
  //# sourceMappingURL=index.js.map