n8n-nodes-whaapy 0.3.0 → 0.3.2

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.
@@ -44,10 +44,10 @@ function buildInteractivePayload(params) {
44
44
  };
45
45
  }
46
46
  }
47
- // Add footer if specified
48
- if (params.footerText) {
47
+ // Add footer if specified and not empty
48
+ if (params.footerText && params.footerText.trim()) {
49
49
  interactive.footer = {
50
- text: params.footerText,
50
+ text: params.footerText.trim(),
51
51
  };
52
52
  }
53
53
  // Build action based on type
@@ -98,13 +98,6 @@ class Whaapy {
98
98
  required: true,
99
99
  },
100
100
  ],
101
- requestDefaults: {
102
- baseURL: '={{$credentials.baseUrl}}',
103
- headers: {
104
- Accept: 'application/json',
105
- 'Content-Type': 'application/json',
106
- },
107
- },
108
101
  properties: [
109
102
  // ===========================================
110
103
  // RESOURCE SELECTOR
@@ -142,24 +135,12 @@ class Whaapy {
142
135
  value: 'send',
143
136
  action: 'Send a message',
144
137
  description: 'Send a WhatsApp message',
145
- routing: {
146
- request: {
147
- method: 'POST',
148
- url: '/messages/v1',
149
- },
150
- },
151
138
  },
152
139
  {
153
140
  name: 'Retry',
154
141
  value: 'retry',
155
142
  action: 'Retry a failed message',
156
143
  description: 'Retry sending a failed message',
157
- routing: {
158
- request: {
159
- method: 'POST',
160
- url: '=/messages/v1/{{$parameter.messageId}}/retry',
161
- },
162
- },
163
144
  },
164
145
  ],
165
146
  default: 'send',
@@ -176,9 +157,6 @@ class Whaapy {
176
157
  displayOptions: {
177
158
  show: { resource: ['message'], operation: ['send'] },
178
159
  },
179
- routing: {
180
- send: { type: 'body', property: 'to' },
181
- },
182
160
  },
183
161
  // Message: Send - Type
184
162
  {
@@ -203,9 +181,6 @@ class Whaapy {
203
181
  displayOptions: {
204
182
  show: { resource: ['message'], operation: ['send'] },
205
183
  },
206
- routing: {
207
- send: { type: 'body', property: 'type' },
208
- },
209
184
  },
210
185
  // Message: Send - Text content
211
186
  {
@@ -218,10 +193,7 @@ class Whaapy {
218
193
  description: 'The text content of the message',
219
194
  displayOptions: {
220
195
  show: { resource: ['message'], operation: ['send'], messageType: ['text'] },
221
- },
222
- routing: {
223
- send: { type: 'body', property: 'content' },
224
- },
196
+ }
225
197
  },
226
198
  // Message: Send - Media URL (for image, video, audio, document, sticker)
227
199
  {
@@ -239,9 +211,6 @@ class Whaapy {
239
211
  messageType: ['image', 'video', 'audio', 'document', 'sticker'],
240
212
  },
241
213
  },
242
- routing: {
243
- send: { type: 'body', property: '={{$parameter.messageType}}.link' },
244
- },
245
214
  },
246
215
  // Message: Send - Caption (for media)
247
216
  {
@@ -257,9 +226,6 @@ class Whaapy {
257
226
  messageType: ['image', 'video', 'document'],
258
227
  },
259
228
  },
260
- routing: {
261
- send: { type: 'body', property: '={{$parameter.messageType}}.caption' },
262
- },
263
229
  },
264
230
  // Message: Send - Template name
265
231
  {
@@ -272,10 +238,7 @@ class Whaapy {
272
238
  description: 'Exact name of the WhatsApp template as it appears in Meta Business Manager',
273
239
  displayOptions: {
274
240
  show: { resource: ['message'], operation: ['send'], messageType: ['template'] },
275
- },
276
- routing: {
277
- send: { type: 'body', property: 'templateName' },
278
- },
241
+ }
279
242
  },
280
243
  // Message: Send - Template Language
281
244
  {
@@ -297,10 +260,7 @@ class Whaapy {
297
260
  { name: 'French', value: 'fr' },
298
261
  { name: 'German', value: 'de' },
299
262
  { name: 'Italian', value: 'it' },
300
- ],
301
- routing: {
302
- send: { type: 'body', property: 'language' },
303
- },
263
+ ]
304
264
  },
305
265
  // Message: Send - Template Additional Options
306
266
  {
@@ -320,13 +280,6 @@ class Whaapy {
320
280
  default: '',
321
281
  placeholder: 'Juan Pérez, #ORD-12345, $1500',
322
282
  description: 'Comma-separated values for {{1}}, {{2}}, etc. placeholders in the template body',
323
- routing: {
324
- send: {
325
- type: 'body',
326
- property: 'template_parameters',
327
- value: '={{ $value ? $value.split(",").map(v => v.trim()) : undefined }}',
328
- },
329
- },
330
283
  },
331
284
  {
332
285
  displayName: 'Header Media Type',
@@ -337,10 +290,7 @@ class Whaapy {
337
290
  { name: 'Image', value: 'image' },
338
291
  { name: 'Video', value: 'video' },
339
292
  { name: 'Document', value: 'document' },
340
- ],
341
- routing: {
342
- send: { type: 'body', property: 'header_media.type' },
343
- },
293
+ ]
344
294
  },
345
295
  {
346
296
  displayName: 'Header Media URL',
@@ -348,10 +298,7 @@ class Whaapy {
348
298
  type: 'string',
349
299
  default: '',
350
300
  placeholder: 'https://example.com/image.jpg',
351
- description: 'Public URL of the media file for header',
352
- routing: {
353
- send: { type: 'body', property: 'header_media.url' },
354
- },
301
+ description: 'Public URL of the media file for header'
355
302
  },
356
303
  ],
357
304
  },
@@ -371,7 +318,7 @@ class Whaapy {
371
318
  default: 'button',
372
319
  description: 'Type of interactive message. Buttons show up to 3 options, Lists show a menu with sections.',
373
320
  displayOptions: {
374
- show: { resource: ['message'], operation: ['send'], messageType: ['interactive'] },
321
+ show: { resource: ['message'], operation: ['send'], messageType: ['interactive'], interactiveUseRawJson: [false] },
375
322
  },
376
323
  },
377
324
  // Interactive: Body text (required)
@@ -385,7 +332,7 @@ class Whaapy {
385
332
  placeholder: '¿Cómo podemos ayudarte hoy?',
386
333
  description: 'Main text of the message. Max 1024 characters.',
387
334
  displayOptions: {
388
- show: { resource: ['message'], operation: ['send'], messageType: ['interactive'] },
335
+ show: { resource: ['message'], operation: ['send'], messageType: ['interactive'], interactiveUseRawJson: [false] },
389
336
  },
390
337
  },
391
338
  // Interactive: Header type (optional)
@@ -403,7 +350,7 @@ class Whaapy {
403
350
  ],
404
351
  description: 'Optional header for the message',
405
352
  displayOptions: {
406
- show: { resource: ['message'], operation: ['send'], messageType: ['interactive'] },
353
+ show: { resource: ['message'], operation: ['send'], messageType: ['interactive'], interactiveUseRawJson: [false] },
407
354
  },
408
355
  },
409
356
  // Interactive: Header text (if type=text)
@@ -420,6 +367,7 @@ class Whaapy {
420
367
  operation: ['send'],
421
368
  messageType: ['interactive'],
422
369
  interactiveHeaderType: ['text'],
370
+ interactiveUseRawJson: [false],
423
371
  },
424
372
  },
425
373
  },
@@ -437,6 +385,7 @@ class Whaapy {
437
385
  operation: ['send'],
438
386
  messageType: ['interactive'],
439
387
  interactiveHeaderType: ['image', 'video', 'document'],
388
+ interactiveUseRawJson: [false],
440
389
  },
441
390
  },
442
391
  },
@@ -447,9 +396,9 @@ class Whaapy {
447
396
  type: 'string',
448
397
  default: '',
449
398
  placeholder: 'Responde con una opción',
450
- description: 'Optional footer text in gray. Max 60 characters.',
399
+ description: 'Optional footer text in gray. Max 60 characters. Leave empty to omit.',
451
400
  displayOptions: {
452
- show: { resource: ['message'], operation: ['send'], messageType: ['interactive'] },
401
+ show: { resource: ['message'], operation: ['send'], messageType: ['interactive'], interactiveUseRawJson: [false] },
453
402
  },
454
403
  },
455
404
  // Interactive: Buttons (if type=button)
@@ -469,6 +418,7 @@ class Whaapy {
469
418
  operation: ['send'],
470
419
  messageType: ['interactive'],
471
420
  interactiveType: ['button'],
421
+ interactiveUseRawJson: [false],
472
422
  },
473
423
  },
474
424
  options: [
@@ -512,6 +462,7 @@ class Whaapy {
512
462
  operation: ['send'],
513
463
  messageType: ['interactive'],
514
464
  interactiveType: ['list'],
465
+ interactiveUseRawJson: [false],
515
466
  },
516
467
  },
517
468
  },
@@ -532,6 +483,7 @@ class Whaapy {
532
483
  operation: ['send'],
533
484
  messageType: ['interactive'],
534
485
  interactiveType: ['list'],
486
+ interactiveUseRawJson: [false],
535
487
  },
536
488
  },
537
489
  options: [
@@ -630,10 +582,7 @@ class Whaapy {
630
582
  default: 0,
631
583
  displayOptions: {
632
584
  show: { resource: ['message'], operation: ['send'], messageType: ['location'] },
633
- },
634
- routing: {
635
- send: { type: 'body', property: 'location.latitude' },
636
- },
585
+ }
637
586
  },
638
587
  {
639
588
  displayName: 'Longitude',
@@ -643,10 +592,7 @@ class Whaapy {
643
592
  default: 0,
644
593
  displayOptions: {
645
594
  show: { resource: ['message'], operation: ['send'], messageType: ['location'] },
646
- },
647
- routing: {
648
- send: { type: 'body', property: 'location.longitude' },
649
- },
595
+ }
650
596
  },
651
597
  {
652
598
  displayName: 'Location Name',
@@ -655,10 +601,7 @@ class Whaapy {
655
601
  default: '',
656
602
  displayOptions: {
657
603
  show: { resource: ['message'], operation: ['send'], messageType: ['location'] },
658
- },
659
- routing: {
660
- send: { type: 'body', property: 'location.name' },
661
- },
604
+ }
662
605
  },
663
606
  // Message: Send - Contacts
664
607
  {
@@ -688,10 +631,7 @@ class Whaapy {
688
631
  description: 'Array of contact cards to send. Each contact needs: name.formatted_name (required), phones[].phone (required). Optional: emails, org, addresses.',
689
632
  displayOptions: {
690
633
  show: { resource: ['message'], operation: ['send'], messageType: ['contacts'] },
691
- },
692
- routing: {
693
- send: { type: 'body', property: 'contacts' },
694
- },
634
+ }
695
635
  },
696
636
  // Message: Send - Reaction
697
637
  {
@@ -702,10 +642,7 @@ class Whaapy {
702
642
  default: '',
703
643
  displayOptions: {
704
644
  show: { resource: ['message'], operation: ['send'], messageType: ['reaction'] },
705
- },
706
- routing: {
707
- send: { type: 'body', property: 'reaction.message_id' },
708
- },
645
+ }
709
646
  },
710
647
  {
711
648
  displayName: 'Emoji',
@@ -715,10 +652,7 @@ class Whaapy {
715
652
  default: '👍',
716
653
  displayOptions: {
717
654
  show: { resource: ['message'], operation: ['send'], messageType: ['reaction'] },
718
- },
719
- routing: {
720
- send: { type: 'body', property: 'reaction.emoji' },
721
- },
655
+ }
722
656
  },
723
657
  // Message: Send - Additional Fields
724
658
  {
@@ -736,60 +670,42 @@ class Whaapy {
736
670
  name: 'pauseAi',
737
671
  type: 'boolean',
738
672
  default: false,
739
- description: 'Pause AI after sending this message',
740
- routing: {
741
- send: { type: 'body', property: 'ai.pause' },
742
- },
673
+ description: 'Pause AI after sending this message'
743
674
  },
744
675
  {
745
676
  displayName: 'Pause Duration (Minutes)',
746
677
  name: 'pauseDuration',
747
678
  type: 'number',
748
679
  default: 5,
749
- description: 'How long to pause AI (1-1440 minutes)',
750
- routing: {
751
- send: { type: 'body', property: 'ai.pauseDuration' },
752
- },
680
+ description: 'How long to pause AI (1-1440 minutes)'
753
681
  },
754
682
  {
755
683
  displayName: 'Disable AI',
756
684
  name: 'disableAi',
757
685
  type: 'boolean',
758
686
  default: false,
759
- description: 'Permanently disable AI for this conversation',
760
- routing: {
761
- send: { type: 'body', property: 'ai.disable' },
762
- },
687
+ description: 'Permanently disable AI for this conversation'
763
688
  },
764
689
  {
765
690
  displayName: 'Reply To Message ID',
766
691
  name: 'replyTo',
767
692
  type: 'string',
768
693
  default: '',
769
- description: 'Message ID to reply to',
770
- routing: {
771
- send: { type: 'body', property: 'context.message_id' },
772
- },
694
+ description: 'Message ID to reply to'
773
695
  },
774
696
  {
775
697
  displayName: 'Create Conversation',
776
698
  name: 'createConversation',
777
699
  type: 'boolean',
778
700
  default: true,
779
- description: 'Create a conversation if it doesn\'t exist',
780
- routing: {
781
- send: { type: 'body', property: 'createConversation' },
782
- },
701
+ description: 'Create a conversation if it doesn\'t exist'
783
702
  },
784
703
  {
785
704
  displayName: 'Metadata',
786
705
  name: 'metadata',
787
706
  type: 'json',
788
707
  default: '{}',
789
- description: 'Custom metadata to attach to the message',
790
- routing: {
791
- send: { type: 'body', property: 'metadata' },
792
- },
708
+ description: 'Custom metadata to attach to the message'
793
709
  },
794
710
  ],
795
711
  },
@@ -821,13 +737,7 @@ class Whaapy {
821
737
  name: 'Upload',
822
738
  value: 'upload',
823
739
  action: 'Upload media',
824
- description: 'Upload media to WhatsApp CDN',
825
- routing: {
826
- request: {
827
- method: 'POST',
828
- url: '/media/v1',
829
- },
830
- },
740
+ description: 'Upload media to WhatsApp CDN'
831
741
  },
832
742
  ],
833
743
  default: 'upload',
@@ -848,10 +758,7 @@ class Whaapy {
848
758
  default: 'image',
849
759
  displayOptions: {
850
760
  show: { resource: ['media'], operation: ['upload'] },
851
- },
852
- routing: {
853
- send: { type: 'body', property: 'type' },
854
- },
761
+ }
855
762
  },
856
763
  // Media: Upload - Binary property
857
764
  {
@@ -881,121 +788,61 @@ class Whaapy {
881
788
  name: 'List',
882
789
  value: 'list',
883
790
  action: 'List conversations',
884
- description: 'Get all conversations',
885
- routing: {
886
- request: {
887
- method: 'GET',
888
- url: '/conversations/v1',
889
- },
890
- },
791
+ description: 'Get all conversations'
891
792
  },
892
793
  {
893
794
  name: 'Get',
894
795
  value: 'get',
895
796
  action: 'Get a conversation',
896
797
  description: 'Get a specific conversation',
897
- routing: {
898
- request: {
899
- method: 'GET',
900
- url: '=/conversations/v1/{{$parameter.conversationId}}',
901
- },
902
- },
903
798
  },
904
799
  {
905
800
  name: 'Get by Phone',
906
801
  value: 'getByPhone',
907
802
  action: 'Get conversation by phone',
908
803
  description: 'Find conversation by phone number',
909
- routing: {
910
- request: {
911
- method: 'GET',
912
- url: '=/conversations/v1/by-phone/{{$parameter.phoneNumber}}',
913
- },
914
- },
915
804
  },
916
805
  {
917
806
  name: 'Get Messages',
918
807
  value: 'getMessages',
919
808
  action: 'Get conversation messages',
920
809
  description: 'Get message history of a conversation',
921
- routing: {
922
- request: {
923
- method: 'GET',
924
- url: '=/conversations/v1/{{$parameter.conversationId}}/messages',
925
- },
926
- },
927
810
  },
928
811
  {
929
812
  name: 'Close',
930
813
  value: 'close',
931
814
  action: 'Close a conversation',
932
815
  description: 'Close a conversation',
933
- routing: {
934
- request: {
935
- method: 'POST',
936
- url: '=/conversations/v1/{{$parameter.conversationId}}/close',
937
- },
938
- },
939
816
  },
940
817
  {
941
818
  name: 'Archive',
942
819
  value: 'archive',
943
820
  action: 'Archive a conversation',
944
821
  description: 'Archive a conversation',
945
- routing: {
946
- request: {
947
- method: 'POST',
948
- url: '=/conversations/v1/{{$parameter.conversationId}}/archive',
949
- },
950
- },
951
822
  },
952
823
  {
953
824
  name: 'Mark Read',
954
825
  value: 'markRead',
955
826
  action: 'Mark conversation as read',
956
827
  description: 'Mark a conversation as read',
957
- routing: {
958
- request: {
959
- method: 'PATCH',
960
- url: '=/conversations/v1/{{$parameter.conversationId}}/mark-read',
961
- },
962
- },
963
828
  },
964
829
  {
965
830
  name: 'Set AI',
966
831
  value: 'setAi',
967
832
  action: 'Enable/disable AI',
968
833
  description: 'Enable or disable AI for a conversation',
969
- routing: {
970
- request: {
971
- method: 'PATCH',
972
- url: '=/conversations/v1/{{$parameter.conversationId}}/ai',
973
- },
974
- },
975
834
  },
976
835
  {
977
836
  name: 'Pause AI',
978
837
  value: 'pauseAi',
979
838
  action: 'Pause AI temporarily',
980
839
  description: 'Pause AI for a conversation',
981
- routing: {
982
- request: {
983
- method: 'POST',
984
- url: '=/conversations/v1/{{$parameter.conversationId}}/ai/pause',
985
- },
986
- },
987
840
  },
988
841
  {
989
842
  name: 'AI Suggest',
990
843
  value: 'aiSuggest',
991
844
  action: 'Get AI suggestion',
992
845
  description: 'Get an AI suggestion without sending',
993
- routing: {
994
- request: {
995
- method: 'POST',
996
- url: '=/conversations/v1/{{$parameter.conversationId}}/ai-suggest',
997
- },
998
- },
999
846
  },
1000
847
  ],
1001
848
  default: 'list',
@@ -1035,10 +882,7 @@ class Whaapy {
1035
882
  default: true,
1036
883
  displayOptions: {
1037
884
  show: { resource: ['conversation'], operation: ['setAi'] },
1038
- },
1039
- routing: {
1040
- send: { type: 'body', property: 'aiEnabled' },
1041
- },
885
+ }
1042
886
  },
1043
887
  // Conversation: Pause AI - Duration
1044
888
  {
@@ -1050,10 +894,7 @@ class Whaapy {
1050
894
  description: 'How long to pause AI (1-1440 minutes)',
1051
895
  displayOptions: {
1052
896
  show: { resource: ['conversation'], operation: ['pauseAi'] },
1053
- },
1054
- routing: {
1055
- send: { type: 'body', property: 'duration' },
1056
- },
897
+ }
1057
898
  },
1058
899
  // Conversation: List - Filters
1059
900
  {
@@ -1071,10 +912,7 @@ class Whaapy {
1071
912
  name: 'search',
1072
913
  type: 'string',
1073
914
  default: '',
1074
- description: 'Search by name or phone',
1075
- routing: {
1076
- send: { type: 'query', property: 'search' },
1077
- },
915
+ description: 'Search by name or phone'
1078
916
  },
1079
917
  {
1080
918
  displayName: 'Status',
@@ -1086,29 +924,20 @@ class Whaapy {
1086
924
  { name: 'Closed', value: 'closed' },
1087
925
  { name: 'Archived', value: 'archived' },
1088
926
  ],
1089
- default: 'all',
1090
- routing: {
1091
- send: { type: 'query', property: 'status' },
1092
- },
927
+ default: 'all'
1093
928
  },
1094
929
  {
1095
930
  displayName: 'Limit',
1096
931
  name: 'limit',
1097
932
  type: 'number',
1098
933
  default: 20,
1099
- description: 'Max results (1-100)',
1100
- routing: {
1101
- send: { type: 'query', property: 'limit' },
1102
- },
934
+ description: 'Max results (1-100)'
1103
935
  },
1104
936
  {
1105
937
  displayName: 'Offset',
1106
938
  name: 'offset',
1107
939
  type: 'number',
1108
- default: 0,
1109
- routing: {
1110
- send: { type: 'query', property: 'offset' },
1111
- },
940
+ default: 0
1112
941
  },
1113
942
  ],
1114
943
  },
@@ -1127,20 +956,14 @@ class Whaapy {
1127
956
  displayName: 'Limit',
1128
957
  name: 'limit',
1129
958
  type: 'number',
1130
- default: 50,
1131
- routing: {
1132
- send: { type: 'query', property: 'limit' },
1133
- },
959
+ default: 50
1134
960
  },
1135
961
  {
1136
962
  displayName: 'Cursor',
1137
963
  name: 'cursor',
1138
964
  type: 'string',
1139
965
  default: '',
1140
- description: 'Pagination cursor',
1141
- routing: {
1142
- send: { type: 'query', property: 'cursor' },
1143
- },
966
+ description: 'Pagination cursor'
1144
967
  },
1145
968
  ],
1146
969
  },
@@ -1160,25 +983,13 @@ class Whaapy {
1160
983
  name: 'Toggle',
1161
984
  value: 'toggle',
1162
985
  action: 'Toggle AI globally',
1163
- description: 'Enable or disable AI globally',
1164
- routing: {
1165
- request: {
1166
- method: 'POST',
1167
- url: '/agent/v1/toggle',
1168
- },
1169
- },
986
+ description: 'Enable or disable AI globally'
1170
987
  },
1171
988
  {
1172
989
  name: 'Pause',
1173
990
  value: 'pause',
1174
991
  action: 'Pause AI globally',
1175
- description: 'Pause AI globally for X minutes',
1176
- routing: {
1177
- request: {
1178
- method: 'POST',
1179
- url: '/agent/v1/pause',
1180
- },
1181
- },
992
+ description: 'Pause AI globally for X minutes'
1182
993
  },
1183
994
  ],
1184
995
  default: 'toggle',
@@ -1192,10 +1003,7 @@ class Whaapy {
1192
1003
  default: true,
1193
1004
  displayOptions: {
1194
1005
  show: { resource: ['agent'], operation: ['toggle'] },
1195
- },
1196
- routing: {
1197
- send: { type: 'body', property: 'enabled' },
1198
- },
1006
+ }
1199
1007
  },
1200
1008
  // Agent: Pause - Duration
1201
1009
  {
@@ -1207,10 +1015,7 @@ class Whaapy {
1207
1015
  description: 'How long to pause AI globally',
1208
1016
  displayOptions: {
1209
1017
  show: { resource: ['agent'], operation: ['pause'] },
1210
- },
1211
- routing: {
1212
- send: { type: 'body', property: 'duration' },
1213
- },
1018
+ }
1214
1019
  },
1215
1020
  // ===========================================
1216
1021
  // TEMPLATE OPERATIONS
@@ -1228,49 +1033,25 @@ class Whaapy {
1228
1033
  name: 'List',
1229
1034
  value: 'list',
1230
1035
  action: 'List templates',
1231
- description: 'Get all WhatsApp templates',
1232
- routing: {
1233
- request: {
1234
- method: 'GET',
1235
- url: '/templates/v1',
1236
- },
1237
- },
1036
+ description: 'Get all WhatsApp templates'
1238
1037
  },
1239
1038
  {
1240
1039
  name: 'Get',
1241
1040
  value: 'get',
1242
1041
  action: 'Get a template',
1243
1042
  description: 'Get a specific template',
1244
- routing: {
1245
- request: {
1246
- method: 'GET',
1247
- url: '=/templates/v1/{{$parameter.templateId}}',
1248
- },
1249
- },
1250
1043
  },
1251
1044
  {
1252
1045
  name: 'Get Variables',
1253
1046
  value: 'getVariables',
1254
1047
  action: 'Get template variables',
1255
- description: 'Get available template variables',
1256
- routing: {
1257
- request: {
1258
- method: 'GET',
1259
- url: '/templates/v1/variables',
1260
- },
1261
- },
1048
+ description: 'Get available template variables'
1262
1049
  },
1263
1050
  {
1264
1051
  name: 'Sync',
1265
1052
  value: 'sync',
1266
1053
  action: 'Sync templates',
1267
- description: 'Sync templates from Meta',
1268
- routing: {
1269
- request: {
1270
- method: 'POST',
1271
- url: '/templates/v1/sync',
1272
- },
1273
- },
1054
+ description: 'Sync templates from Meta'
1274
1055
  },
1275
1056
  ],
1276
1057
  default: 'list',
@@ -1302,28 +1083,19 @@ class Whaapy {
1302
1083
  name: 'status',
1303
1084
  type: 'string',
1304
1085
  default: '',
1305
- description: 'Filter by template status',
1306
- routing: {
1307
- send: { type: 'query', property: 'status' },
1308
- },
1086
+ description: 'Filter by template status'
1309
1087
  },
1310
1088
  {
1311
1089
  displayName: 'Limit',
1312
1090
  name: 'limit',
1313
1091
  type: 'number',
1314
- default: 20,
1315
- routing: {
1316
- send: { type: 'query', property: 'limit' },
1317
- },
1092
+ default: 20
1318
1093
  },
1319
1094
  {
1320
1095
  displayName: 'Offset',
1321
1096
  name: 'offset',
1322
1097
  type: 'number',
1323
- default: 0,
1324
- routing: {
1325
- send: { type: 'query', property: 'offset' },
1326
- },
1098
+ default: 0
1327
1099
  },
1328
1100
  ],
1329
1101
  },
@@ -1343,121 +1115,61 @@ class Whaapy {
1343
1115
  name: 'List',
1344
1116
  value: 'list',
1345
1117
  action: 'List contacts',
1346
- description: 'Get all contacts',
1347
- routing: {
1348
- request: {
1349
- method: 'GET',
1350
- url: '/contacts/v1',
1351
- },
1352
- },
1118
+ description: 'Get all contacts'
1353
1119
  },
1354
1120
  {
1355
1121
  name: 'Get',
1356
1122
  value: 'get',
1357
1123
  action: 'Get a contact',
1358
1124
  description: 'Get a specific contact',
1359
- routing: {
1360
- request: {
1361
- method: 'GET',
1362
- url: '=/contacts/v1/{{$parameter.contactId}}',
1363
- },
1364
- },
1365
1125
  },
1366
1126
  {
1367
1127
  name: 'Create',
1368
1128
  value: 'create',
1369
1129
  action: 'Create a contact',
1370
- description: 'Create a new contact',
1371
- routing: {
1372
- request: {
1373
- method: 'POST',
1374
- url: '/contacts/v1',
1375
- },
1376
- },
1130
+ description: 'Create a new contact'
1377
1131
  },
1378
1132
  {
1379
1133
  name: 'Update',
1380
1134
  value: 'update',
1381
1135
  action: 'Update a contact',
1382
1136
  description: 'Update an existing contact',
1383
- routing: {
1384
- request: {
1385
- method: 'PATCH',
1386
- url: '=/contacts/v1/{{$parameter.contactId}}',
1387
- },
1388
- },
1389
1137
  },
1390
1138
  {
1391
1139
  name: 'Delete',
1392
1140
  value: 'delete',
1393
1141
  action: 'Delete a contact',
1394
1142
  description: 'Delete a contact',
1395
- routing: {
1396
- request: {
1397
- method: 'DELETE',
1398
- url: '=/contacts/v1/{{$parameter.contactId}}',
1399
- },
1400
- },
1401
1143
  },
1402
1144
  {
1403
1145
  name: 'Search',
1404
1146
  value: 'search',
1405
1147
  action: 'Search contacts',
1406
- description: 'Advanced search for contacts',
1407
- routing: {
1408
- request: {
1409
- method: 'POST',
1410
- url: '/contacts/v1/search',
1411
- },
1412
- },
1148
+ description: 'Advanced search for contacts'
1413
1149
  },
1414
1150
  {
1415
1151
  name: 'Bulk',
1416
1152
  value: 'bulk',
1417
1153
  action: 'Bulk operations',
1418
- description: 'Perform bulk operations on contacts',
1419
- routing: {
1420
- request: {
1421
- method: 'POST',
1422
- url: '/contacts/v1/bulk',
1423
- },
1424
- },
1154
+ description: 'Perform bulk operations on contacts'
1425
1155
  },
1426
1156
  {
1427
1157
  name: 'Merge',
1428
1158
  value: 'merge',
1429
1159
  action: 'Merge contacts',
1430
1160
  description: 'Merge two contacts',
1431
- routing: {
1432
- request: {
1433
- method: 'POST',
1434
- url: '=/contacts/v1/{{$parameter.contactId}}/merge',
1435
- },
1436
- },
1437
1161
  },
1438
1162
  {
1439
1163
  name: 'Get Tags',
1440
1164
  value: 'getTags',
1441
1165
  action: 'Get all tags',
1442
- description: 'Get all available tags',
1443
- routing: {
1444
- request: {
1445
- method: 'GET',
1446
- url: '/contacts/v1/tags',
1447
- },
1448
- },
1166
+ description: 'Get all available tags'
1449
1167
  },
1450
1168
  {
1451
1169
  name: 'Get Fields',
1452
1170
  value: 'getFields',
1453
1171
  action: 'Get custom fields',
1454
- description: 'Get available custom fields',
1455
- routing: {
1456
- request: {
1457
- method: 'GET',
1458
- url: '/contacts/v1/fields',
1459
- },
1460
- },
1172
+ description: 'Get available custom fields'
1461
1173
  },
1462
1174
  ],
1463
1175
  default: 'list',
@@ -1485,10 +1197,7 @@ class Whaapy {
1485
1197
  default: '',
1486
1198
  displayOptions: {
1487
1199
  show: { resource: ['contact'], operation: ['create'] },
1488
- },
1489
- routing: {
1490
- send: { type: 'body', property: 'name' },
1491
- },
1200
+ }
1492
1201
  },
1493
1202
  {
1494
1203
  displayName: 'Phone Number',
@@ -1499,10 +1208,7 @@ class Whaapy {
1499
1208
  placeholder: '+5215512345678',
1500
1209
  displayOptions: {
1501
1210
  show: { resource: ['contact'], operation: ['create'] },
1502
- },
1503
- routing: {
1504
- send: { type: 'body', property: 'phoneNumber' },
1505
- },
1211
+ }
1506
1212
  },
1507
1213
  {
1508
1214
  displayName: 'Additional Fields',
@@ -1518,38 +1224,26 @@ class Whaapy {
1518
1224
  displayName: 'Email',
1519
1225
  name: 'email',
1520
1226
  type: 'string',
1521
- default: '',
1522
- routing: {
1523
- send: { type: 'body', property: 'email' },
1524
- },
1227
+ default: ''
1525
1228
  },
1526
1229
  {
1527
1230
  displayName: 'Tags',
1528
1231
  name: 'tags',
1529
1232
  type: 'string',
1530
1233
  default: '',
1531
- description: 'Comma-separated list of tags',
1532
- routing: {
1533
- send: { type: 'body', property: 'tags' },
1534
- },
1234
+ description: 'Comma-separated list of tags'
1535
1235
  },
1536
1236
  {
1537
1237
  displayName: 'Custom Fields',
1538
1238
  name: 'customFields',
1539
1239
  type: 'json',
1540
- default: '{}',
1541
- routing: {
1542
- send: { type: 'body', property: 'customFields' },
1543
- },
1240
+ default: '{}'
1544
1241
  },
1545
1242
  {
1546
1243
  displayName: 'Metadata',
1547
1244
  name: 'metadata',
1548
1245
  type: 'json',
1549
- default: '{}',
1550
- routing: {
1551
- send: { type: 'body', property: 'metadata' },
1552
- },
1246
+ default: '{}'
1553
1247
  },
1554
1248
  ],
1555
1249
  },
@@ -1568,47 +1262,32 @@ class Whaapy {
1568
1262
  displayName: 'Name',
1569
1263
  name: 'name',
1570
1264
  type: 'string',
1571
- default: '',
1572
- routing: {
1573
- send: { type: 'body', property: 'name' },
1574
- },
1265
+ default: ''
1575
1266
  },
1576
1267
  {
1577
1268
  displayName: 'Phone Number',
1578
1269
  name: 'phoneNumber',
1579
1270
  type: 'string',
1580
- default: '',
1581
- routing: {
1582
- send: { type: 'body', property: 'phoneNumber' },
1583
- },
1271
+ default: ''
1584
1272
  },
1585
1273
  {
1586
1274
  displayName: 'Email',
1587
1275
  name: 'email',
1588
1276
  type: 'string',
1589
- default: '',
1590
- routing: {
1591
- send: { type: 'body', property: 'email' },
1592
- },
1277
+ default: ''
1593
1278
  },
1594
1279
  {
1595
1280
  displayName: 'Tags',
1596
1281
  name: 'tags',
1597
1282
  type: 'string',
1598
1283
  default: '',
1599
- description: 'Comma-separated list of tags',
1600
- routing: {
1601
- send: { type: 'body', property: 'tags' },
1602
- },
1284
+ description: 'Comma-separated list of tags'
1603
1285
  },
1604
1286
  {
1605
1287
  displayName: 'Custom Fields',
1606
1288
  name: 'customFields',
1607
1289
  type: 'json',
1608
- default: '{}',
1609
- routing: {
1610
- send: { type: 'body', property: 'customFields' },
1611
- },
1290
+ default: '{}'
1612
1291
  },
1613
1292
  ],
1614
1293
  },
@@ -1621,10 +1300,7 @@ class Whaapy {
1621
1300
  default: '',
1622
1301
  displayOptions: {
1623
1302
  show: { resource: ['contact'], operation: ['search'] },
1624
- },
1625
- routing: {
1626
- send: { type: 'body', property: 'query' },
1627
- },
1303
+ }
1628
1304
  },
1629
1305
  {
1630
1306
  displayName: 'Search Options',
@@ -1640,28 +1316,19 @@ class Whaapy {
1640
1316
  displayName: 'Filters',
1641
1317
  name: 'filters',
1642
1318
  type: 'json',
1643
- default: '{}',
1644
- routing: {
1645
- send: { type: 'body', property: 'filters' },
1646
- },
1319
+ default: '{}'
1647
1320
  },
1648
1321
  {
1649
1322
  displayName: 'Limit',
1650
1323
  name: 'limit',
1651
1324
  type: 'number',
1652
- default: 20,
1653
- routing: {
1654
- send: { type: 'body', property: 'limit' },
1655
- },
1325
+ default: 20
1656
1326
  },
1657
1327
  {
1658
1328
  displayName: 'Cursor',
1659
1329
  name: 'cursor',
1660
1330
  type: 'string',
1661
- default: '',
1662
- routing: {
1663
- send: { type: 'body', property: 'cursor' },
1664
- },
1331
+ default: ''
1665
1332
  },
1666
1333
  ],
1667
1334
  },
@@ -1681,10 +1348,7 @@ class Whaapy {
1681
1348
  default: 'create',
1682
1349
  displayOptions: {
1683
1350
  show: { resource: ['contact'], operation: ['bulk'] },
1684
- },
1685
- routing: {
1686
- send: { type: 'body', property: 'operation' },
1687
- },
1351
+ }
1688
1352
  },
1689
1353
  {
1690
1354
  displayName: 'Contacts Data',
@@ -1695,10 +1359,7 @@ class Whaapy {
1695
1359
  description: 'Array of contacts or contact IDs',
1696
1360
  displayOptions: {
1697
1361
  show: { resource: ['contact'], operation: ['bulk'] },
1698
- },
1699
- routing: {
1700
- send: { type: 'body', property: 'contacts' },
1701
- },
1362
+ }
1702
1363
  },
1703
1364
  {
1704
1365
  displayName: 'Operation Data',
@@ -1708,10 +1369,7 @@ class Whaapy {
1708
1369
  description: 'Additional data for the operation',
1709
1370
  displayOptions: {
1710
1371
  show: { resource: ['contact'], operation: ['bulk'] },
1711
- },
1712
- routing: {
1713
- send: { type: 'body', property: 'data' },
1714
- },
1372
+ }
1715
1373
  },
1716
1374
  // Contact: Merge - Merge With ID
1717
1375
  {
@@ -1723,10 +1381,7 @@ class Whaapy {
1723
1381
  description: 'ID of the contact to merge into the primary contact',
1724
1382
  displayOptions: {
1725
1383
  show: { resource: ['contact'], operation: ['merge'] },
1726
- },
1727
- routing: {
1728
- send: { type: 'body', property: 'mergeWith' },
1729
- },
1384
+ }
1730
1385
  },
1731
1386
  // Contact: List - Filters
1732
1387
  {
@@ -1743,38 +1398,26 @@ class Whaapy {
1743
1398
  displayName: 'Search',
1744
1399
  name: 'search',
1745
1400
  type: 'string',
1746
- default: '',
1747
- routing: {
1748
- send: { type: 'query', property: 'search' },
1749
- },
1401
+ default: ''
1750
1402
  },
1751
1403
  {
1752
1404
  displayName: 'Tags',
1753
1405
  name: 'tags',
1754
1406
  type: 'string',
1755
1407
  default: '',
1756
- description: 'Comma-separated list of tags',
1757
- routing: {
1758
- send: { type: 'query', property: 'tags' },
1759
- },
1408
+ description: 'Comma-separated list of tags'
1760
1409
  },
1761
1410
  {
1762
1411
  displayName: 'Funnel Stage ID',
1763
1412
  name: 'funnelStageId',
1764
1413
  type: 'string',
1765
- default: '',
1766
- routing: {
1767
- send: { type: 'query', property: 'funnel_stage_id' },
1768
- },
1414
+ default: ''
1769
1415
  },
1770
1416
  {
1771
1417
  displayName: 'Source',
1772
1418
  name: 'source',
1773
1419
  type: 'string',
1774
- default: '',
1775
- routing: {
1776
- send: { type: 'query', property: 'source' },
1777
- },
1420
+ default: ''
1778
1421
  },
1779
1422
  {
1780
1423
  displayName: 'Sort By',
@@ -1785,10 +1428,7 @@ class Whaapy {
1785
1428
  { name: 'Updated At', value: 'updated_at' },
1786
1429
  { name: 'Name', value: 'name' },
1787
1430
  ],
1788
- default: 'created_at',
1789
- routing: {
1790
- send: { type: 'query', property: 'sort_by' },
1791
- },
1431
+ default: 'created_at'
1792
1432
  },
1793
1433
  {
1794
1434
  displayName: 'Sort Order',
@@ -1798,28 +1438,19 @@ class Whaapy {
1798
1438
  { name: 'Ascending', value: 'asc' },
1799
1439
  { name: 'Descending', value: 'desc' },
1800
1440
  ],
1801
- default: 'desc',
1802
- routing: {
1803
- send: { type: 'query', property: 'sort_order' },
1804
- },
1441
+ default: 'desc'
1805
1442
  },
1806
1443
  {
1807
1444
  displayName: 'Limit',
1808
1445
  name: 'limit',
1809
1446
  type: 'number',
1810
- default: 20,
1811
- routing: {
1812
- send: { type: 'query', property: 'limit' },
1813
- },
1447
+ default: 20
1814
1448
  },
1815
1449
  {
1816
1450
  displayName: 'Cursor',
1817
1451
  name: 'cursor',
1818
1452
  type: 'string',
1819
- default: '',
1820
- routing: {
1821
- send: { type: 'query', property: 'cursor' },
1822
- },
1453
+ default: ''
1823
1454
  },
1824
1455
  ],
1825
1456
  },
@@ -1839,85 +1470,43 @@ class Whaapy {
1839
1470
  name: 'List Stages',
1840
1471
  value: 'listStages',
1841
1472
  action: 'List funnel stages',
1842
- description: 'Get all funnel stages',
1843
- routing: {
1844
- request: {
1845
- method: 'GET',
1846
- url: '/funnel/v1/stages',
1847
- },
1848
- },
1473
+ description: 'Get all funnel stages'
1849
1474
  },
1850
1475
  {
1851
1476
  name: 'Get Stage',
1852
1477
  value: 'getStage',
1853
1478
  action: 'Get a funnel stage',
1854
1479
  description: 'Get a specific funnel stage',
1855
- routing: {
1856
- request: {
1857
- method: 'GET',
1858
- url: '=/funnel/v1/stages/{{$parameter.stageId}}',
1859
- },
1860
- },
1861
1480
  },
1862
1481
  {
1863
1482
  name: 'Create Stage',
1864
1483
  value: 'createStage',
1865
1484
  action: 'Create a funnel stage',
1866
- description: 'Create a new funnel stage',
1867
- routing: {
1868
- request: {
1869
- method: 'POST',
1870
- url: '/funnel/v1/stages',
1871
- },
1872
- },
1485
+ description: 'Create a new funnel stage'
1873
1486
  },
1874
1487
  {
1875
1488
  name: 'Update Stage',
1876
1489
  value: 'updateStage',
1877
1490
  action: 'Update a funnel stage',
1878
1491
  description: 'Update an existing funnel stage',
1879
- routing: {
1880
- request: {
1881
- method: 'PATCH',
1882
- url: '=/funnel/v1/stages/{{$parameter.stageId}}',
1883
- },
1884
- },
1885
1492
  },
1886
1493
  {
1887
1494
  name: 'Delete Stage',
1888
1495
  value: 'deleteStage',
1889
1496
  action: 'Delete a funnel stage',
1890
1497
  description: 'Delete a funnel stage',
1891
- routing: {
1892
- request: {
1893
- method: 'DELETE',
1894
- url: '=/funnel/v1/stages/{{$parameter.stageId}}',
1895
- },
1896
- },
1897
1498
  },
1898
1499
  {
1899
1500
  name: 'Reorder Stages',
1900
1501
  value: 'reorderStages',
1901
1502
  action: 'Reorder funnel stages',
1902
- description: 'Reorder the funnel stages',
1903
- routing: {
1904
- request: {
1905
- method: 'PATCH',
1906
- url: '/funnel/v1/stages/reorder',
1907
- },
1908
- },
1503
+ description: 'Reorder the funnel stages'
1909
1504
  },
1910
1505
  {
1911
1506
  name: 'Move Contact',
1912
1507
  value: 'moveContact',
1913
1508
  action: 'Move contact to stage',
1914
1509
  description: 'Move a contact to a funnel stage',
1915
- routing: {
1916
- request: {
1917
- method: 'POST',
1918
- url: '=/funnel/v1/contacts/{{$parameter.contactIdFunnel}}/move',
1919
- },
1920
- },
1921
1510
  },
1922
1511
  ],
1923
1512
  default: 'listStages',
@@ -1945,10 +1534,7 @@ class Whaapy {
1945
1534
  default: '',
1946
1535
  displayOptions: {
1947
1536
  show: { resource: ['funnel'], operation: ['createStage'] },
1948
- },
1949
- routing: {
1950
- send: { type: 'body', property: 'name' },
1951
- },
1537
+ }
1952
1538
  },
1953
1539
  {
1954
1540
  displayName: 'Stage Options',
@@ -1964,29 +1550,20 @@ class Whaapy {
1964
1550
  displayName: 'Position',
1965
1551
  name: 'position',
1966
1552
  type: 'number',
1967
- default: 0,
1968
- routing: {
1969
- send: { type: 'body', property: 'position' },
1970
- },
1553
+ default: 0
1971
1554
  },
1972
1555
  {
1973
1556
  displayName: 'Color',
1974
1557
  name: 'color',
1975
1558
  type: 'string',
1976
1559
  default: '#3B82F6',
1977
- description: 'Hex color code',
1978
- routing: {
1979
- send: { type: 'body', property: 'color' },
1980
- },
1560
+ description: 'Hex color code'
1981
1561
  },
1982
1562
  {
1983
1563
  displayName: 'Description',
1984
1564
  name: 'description',
1985
1565
  type: 'string',
1986
- default: '',
1987
- routing: {
1988
- send: { type: 'body', property: 'description' },
1989
- },
1566
+ default: ''
1990
1567
  },
1991
1568
  ],
1992
1569
  },
@@ -2005,37 +1582,25 @@ class Whaapy {
2005
1582
  displayName: 'Name',
2006
1583
  name: 'name',
2007
1584
  type: 'string',
2008
- default: '',
2009
- routing: {
2010
- send: { type: 'body', property: 'name' },
2011
- },
1585
+ default: ''
2012
1586
  },
2013
1587
  {
2014
1588
  displayName: 'Position',
2015
1589
  name: 'position',
2016
1590
  type: 'number',
2017
- default: 0,
2018
- routing: {
2019
- send: { type: 'body', property: 'position' },
2020
- },
1591
+ default: 0
2021
1592
  },
2022
1593
  {
2023
1594
  displayName: 'Color',
2024
1595
  name: 'color',
2025
1596
  type: 'string',
2026
- default: '',
2027
- routing: {
2028
- send: { type: 'body', property: 'color' },
2029
- },
1597
+ default: ''
2030
1598
  },
2031
1599
  {
2032
1600
  displayName: 'Description',
2033
1601
  name: 'description',
2034
1602
  type: 'string',
2035
- default: '',
2036
- routing: {
2037
- send: { type: 'body', property: 'description' },
2038
- },
1603
+ default: ''
2039
1604
  },
2040
1605
  ],
2041
1606
  },
@@ -2049,10 +1614,7 @@ class Whaapy {
2049
1614
  description: 'Array of objects with id and position',
2050
1615
  displayOptions: {
2051
1616
  show: { resource: ['funnel'], operation: ['reorderStages'] },
2052
- },
2053
- routing: {
2054
- send: { type: 'body', property: 'stages' },
2055
- },
1617
+ }
2056
1618
  },
2057
1619
  // Funnel: Move Contact - Fields
2058
1620
  {
@@ -2073,10 +1635,7 @@ class Whaapy {
2073
1635
  default: '',
2074
1636
  displayOptions: {
2075
1637
  show: { resource: ['funnel'], operation: ['moveContact'] },
2076
- },
2077
- routing: {
2078
- send: { type: 'body', property: 'stageId' },
2079
- },
1638
+ }
2080
1639
  },
2081
1640
  // Funnel: List Stages - Filters
2082
1641
  {
@@ -2093,19 +1652,13 @@ class Whaapy {
2093
1652
  displayName: 'Limit',
2094
1653
  name: 'limit',
2095
1654
  type: 'number',
2096
- default: 20,
2097
- routing: {
2098
- send: { type: 'query', property: 'limit' },
2099
- },
1655
+ default: 20
2100
1656
  },
2101
1657
  {
2102
1658
  displayName: 'Offset',
2103
1659
  name: 'offset',
2104
1660
  type: 'number',
2105
- default: 0,
2106
- routing: {
2107
- send: { type: 'query', property: 'offset' },
2108
- },
1661
+ default: 0
2109
1662
  },
2110
1663
  ],
2111
1664
  },