n8n-nodes-nvk-call-api 0.0.1

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.
@@ -0,0 +1,1136 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.nvkBrowserApiDescription = void 0;
4
+ exports.nvkBrowserApiDescription = {
5
+ displayName: 'NVK Browser',
6
+ name: 'nvkBrowserApi',
7
+ icon: 'file:nvk.svg',
8
+ group: ['transform'],
9
+ version: 1,
10
+ subtitle: '={{$parameter["operation"]}}',
11
+ description: 'Interact with NVK Browser API for automation',
12
+ defaults: {
13
+ name: 'NVK Browser',
14
+ },
15
+ inputs: ['main'],
16
+ outputs: ['main'],
17
+ credentials: [],
18
+ properties: [
19
+ {
20
+ displayName: 'Environment',
21
+ name: 'environment',
22
+ type: 'options',
23
+ options: [
24
+ {
25
+ name: 'Local',
26
+ value: 'local',
27
+ },
28
+ {
29
+ name: 'Docker',
30
+ value: 'docker',
31
+ },
32
+ ],
33
+ default: 'local',
34
+ description: 'Choose the environment to connect to',
35
+ },
36
+ {
37
+ displayName: 'Resource',
38
+ name: 'resource',
39
+ type: 'options',
40
+ noDataExpression: true,
41
+ options: [
42
+ {
43
+ name: 'Profile Management',
44
+ value: 'profileManagement',
45
+ },
46
+ {
47
+ name: 'Page Interaction',
48
+ value: 'pageInteraction',
49
+ },
50
+ ],
51
+ default: 'profileManagement',
52
+ },
53
+ {
54
+ displayName: 'Operation',
55
+ name: 'operation',
56
+ type: 'options',
57
+ noDataExpression: true,
58
+ displayOptions: {
59
+ show: {
60
+ resource: ['profileManagement'],
61
+ },
62
+ },
63
+ options: [
64
+ {
65
+ name: 'Create Profile',
66
+ value: 'createProfile',
67
+ action: 'Create a new browser profile',
68
+ },
69
+ {
70
+ name: 'Delete Profile',
71
+ value: 'deleteProfile',
72
+ action: 'Delete a browser profile',
73
+ },
74
+ {
75
+ name: 'Start Profile',
76
+ value: 'startProfile',
77
+ action: 'Start a browser profile',
78
+ },
79
+ {
80
+ name: 'Stop Profile',
81
+ value: 'stopProfile',
82
+ action: 'Stop a browser profile',
83
+ },
84
+ {
85
+ name: 'Update Profile',
86
+ value: 'updateProfile',
87
+ action: 'Update a browser profile',
88
+ },
89
+ {
90
+ name: 'Download Browser',
91
+ value: 'downloadBrowser',
92
+ action: 'Download browser binary',
93
+ },
94
+ ],
95
+ default: 'createProfile',
96
+ },
97
+ {
98
+ displayName: 'Operation',
99
+ name: 'operation',
100
+ type: 'options',
101
+ noDataExpression: true,
102
+ displayOptions: {
103
+ show: {
104
+ resource: ['pageInteraction'],
105
+ },
106
+ },
107
+ options: [
108
+ {
109
+ name: 'Move and Click',
110
+ value: 'moveAndClick',
111
+ action: 'Move and click on elements',
112
+ },
113
+ {
114
+ name: 'Run JavaScript',
115
+ value: 'runJavaScript',
116
+ action: 'Execute JavaScript code',
117
+ },
118
+ {
119
+ name: 'Get Network Response',
120
+ value: 'getNetworkResponse',
121
+ action: 'Capture network responses',
122
+ },
123
+ {
124
+ name: 'Browser HTTP Request',
125
+ value: 'browserHttpRequest',
126
+ action: 'Make HTTP requests using browser context',
127
+ },
128
+ ],
129
+ default: 'moveAndClick',
130
+ },
131
+ // Create Profile Fields
132
+ {
133
+ displayName: 'Profile Name',
134
+ name: 'profileName',
135
+ type: 'string',
136
+ displayOptions: {
137
+ show: {
138
+ resource: ['profileManagement'],
139
+ operation: ['createProfile'],
140
+ },
141
+ },
142
+ default: '',
143
+ required: true,
144
+ description: 'Name of the profile',
145
+ },
146
+ {
147
+ displayName: 'Proxy',
148
+ name: 'proxy',
149
+ type: 'string',
150
+ displayOptions: {
151
+ show: {
152
+ resource: ['profileManagement'],
153
+ operation: ['createProfile'],
154
+ },
155
+ },
156
+ default: 'http:127.0.0.1:8080:user:pass',
157
+ placeholder: 'http:127.0.0.1:8080:user:pass hoặc socks5:127.0.0.1:1080:user:pass',
158
+ description: 'Proxy configuration',
159
+ },
160
+ {
161
+ displayName: 'Note',
162
+ name: 'note',
163
+ type: 'string',
164
+ displayOptions: {
165
+ show: {
166
+ resource: ['profileManagement'],
167
+ operation: ['createProfile'],
168
+ },
169
+ },
170
+ default: '',
171
+ description: 'Additional notes',
172
+ },
173
+ {
174
+ displayName: 'Extensions',
175
+ name: 'extensions',
176
+ type: 'string',
177
+ typeOptions: {
178
+ rows: 4,
179
+ },
180
+ displayOptions: {
181
+ show: {
182
+ resource: ['profileManagement'],
183
+ operation: ['createProfile'],
184
+ },
185
+ },
186
+ default: '',
187
+ description: 'Browser extensions (one per line)',
188
+ },
189
+ // Delete Profile Fields
190
+ {
191
+ displayName: 'Profile ID',
192
+ name: 'profileId',
193
+ type: 'string',
194
+ displayOptions: {
195
+ show: {
196
+ resource: ['profileManagement'],
197
+ operation: ['deleteProfile'],
198
+ },
199
+ },
200
+ default: '',
201
+ required: true,
202
+ description: 'ID of the profile to delete',
203
+ },
204
+ // Start Profile Fields
205
+ {
206
+ displayName: 'Profile ID',
207
+ name: 'profileId',
208
+ type: 'string',
209
+ displayOptions: {
210
+ show: {
211
+ resource: ['profileManagement'],
212
+ operation: ['startProfile'],
213
+ },
214
+ },
215
+ default: '',
216
+ required: true,
217
+ description: 'ID of the profile to start',
218
+ },
219
+ {
220
+ displayName: 'Window Scale',
221
+ name: 'winScale',
222
+ type: 'number',
223
+ displayOptions: {
224
+ show: {
225
+ resource: ['profileManagement'],
226
+ operation: ['startProfile'],
227
+ },
228
+ },
229
+ default: 1,
230
+ description: 'Browser window scale',
231
+ },
232
+ {
233
+ displayName: 'Window Position',
234
+ name: 'winPosition',
235
+ type: 'fixedCollection',
236
+ typeOptions: {
237
+ multipleValues: false,
238
+ },
239
+ displayOptions: {
240
+ show: {
241
+ resource: ['profileManagement'],
242
+ operation: ['startProfile'],
243
+ },
244
+ },
245
+ default: {},
246
+ options: [
247
+ {
248
+ displayName: 'Position',
249
+ name: 'positionValues',
250
+ values: [
251
+ {
252
+ displayName: 'X',
253
+ name: 'x',
254
+ type: 'number',
255
+ default: 0,
256
+ },
257
+ {
258
+ displayName: 'Y',
259
+ name: 'y',
260
+ type: 'number',
261
+ default: 0,
262
+ },
263
+ ],
264
+ },
265
+ ],
266
+ },
267
+ {
268
+ displayName: 'Window Size',
269
+ name: 'winSize',
270
+ type: 'fixedCollection',
271
+ typeOptions: {
272
+ multipleValues: false,
273
+ },
274
+ displayOptions: {
275
+ show: {
276
+ resource: ['profileManagement'],
277
+ operation: ['startProfile'],
278
+ },
279
+ },
280
+ default: {},
281
+ options: [
282
+ {
283
+ displayName: 'Size',
284
+ name: 'sizeValues',
285
+ values: [
286
+ {
287
+ displayName: 'Width',
288
+ name: 'width',
289
+ type: 'number',
290
+ default: 1280,
291
+ },
292
+ {
293
+ displayName: 'Height',
294
+ name: 'height',
295
+ type: 'number',
296
+ default: 720,
297
+ },
298
+ ],
299
+ },
300
+ ],
301
+ },
302
+ {
303
+ displayName: 'Headless Mode',
304
+ name: 'headless',
305
+ type: 'boolean',
306
+ displayOptions: {
307
+ show: {
308
+ resource: ['profileManagement'],
309
+ operation: ['startProfile'],
310
+ },
311
+ },
312
+ default: false,
313
+ description: 'Whether to run browser in headless mode',
314
+ },
315
+ {
316
+ displayName: 'Initial URL',
317
+ name: 'initialUrl',
318
+ type: 'string',
319
+ displayOptions: {
320
+ show: {
321
+ resource: ['profileManagement'],
322
+ operation: ['startProfile'],
323
+ },
324
+ },
325
+ default: 'https://example.com',
326
+ description: 'URL to open on start',
327
+ },
328
+ // Stop Profile Fields
329
+ {
330
+ displayName: 'Profile ID',
331
+ name: 'profileId',
332
+ type: 'string',
333
+ displayOptions: {
334
+ show: {
335
+ resource: ['profileManagement'],
336
+ operation: ['stopProfile'],
337
+ },
338
+ },
339
+ default: '',
340
+ required: true,
341
+ description: 'ID of the profile to stop',
342
+ },
343
+ // Update Profile Fields
344
+ {
345
+ displayName: 'Profile ID',
346
+ name: 'profileId',
347
+ type: 'string',
348
+ displayOptions: {
349
+ show: {
350
+ resource: ['profileManagement'],
351
+ operation: ['updateProfile'],
352
+ },
353
+ },
354
+ default: '',
355
+ required: true,
356
+ description: 'ID of the profile to update',
357
+ },
358
+ {
359
+ displayName: 'Profile Name',
360
+ name: 'profileName',
361
+ type: 'string',
362
+ displayOptions: {
363
+ show: {
364
+ resource: ['profileManagement'],
365
+ operation: ['updateProfile'],
366
+ },
367
+ },
368
+ default: '',
369
+ description: 'New profile name',
370
+ },
371
+ {
372
+ displayName: 'Proxy',
373
+ name: 'proxy',
374
+ type: 'string',
375
+ displayOptions: {
376
+ show: {
377
+ resource: ['profileManagement'],
378
+ operation: ['updateProfile'],
379
+ },
380
+ },
381
+ default: 'http:127.0.0.1:8080:user:pass hoặc socks5:127.0.0.1:1080:user:pass',
382
+ description: 'New proxy configuration',
383
+ },
384
+ {
385
+ displayName: 'Note',
386
+ name: 'note',
387
+ type: 'string',
388
+ displayOptions: {
389
+ show: {
390
+ resource: ['profileManagement'],
391
+ operation: ['updateProfile'],
392
+ },
393
+ },
394
+ default: '',
395
+ description: 'Updated notes',
396
+ },
397
+ {
398
+ displayName: 'Extensions',
399
+ name: 'extensions',
400
+ type: 'string',
401
+ typeOptions: {
402
+ rows: 4,
403
+ },
404
+ displayOptions: {
405
+ show: {
406
+ resource: ['profileManagement'],
407
+ operation: ['updateProfile'],
408
+ },
409
+ },
410
+ default: '',
411
+ description: 'Updated extensions',
412
+ },
413
+ // Move and Click Fields
414
+ {
415
+ displayName: 'Profile ID',
416
+ name: 'profileId',
417
+ type: 'string',
418
+ displayOptions: {
419
+ show: {
420
+ resource: ['pageInteraction'],
421
+ operation: ['moveAndClick'],
422
+ },
423
+ },
424
+ default: '',
425
+ required: true,
426
+ description: 'ID of the profile',
427
+ },
428
+ {
429
+ displayName: 'Selector or Puppeteer Locator Code',
430
+ name: 'selector',
431
+ type: 'string',
432
+ typeOptions: {
433
+ rows: 4,
434
+ },
435
+ displayOptions: {
436
+ show: {
437
+ resource: ['pageInteraction'],
438
+ operation: ['moveAndClick'],
439
+ },
440
+ },
441
+ default: '',
442
+ required: true,
443
+ description: 'CSS selector or Puppeteer locator code',
444
+ },
445
+ {
446
+ displayName: 'Click Method',
447
+ name: 'clickMethod',
448
+ type: 'options',
449
+ displayOptions: {
450
+ show: {
451
+ resource: ['pageInteraction'],
452
+ operation: ['moveAndClick'],
453
+ },
454
+ },
455
+ options: [
456
+ {
457
+ name: 'Puppeteer Locator',
458
+ value: 'puppeteer',
459
+ },
460
+ {
461
+ name: 'Standard',
462
+ value: 'standard',
463
+ },
464
+ ],
465
+ default: 'puppeteer',
466
+ description: 'Method for clicking',
467
+ },
468
+ {
469
+ displayName: 'Timeout (Milliseconds)',
470
+ name: 'timeout',
471
+ type: 'number',
472
+ displayOptions: {
473
+ show: {
474
+ resource: ['pageInteraction'],
475
+ operation: ['moveAndClick'],
476
+ },
477
+ },
478
+ default: 30000,
479
+ description: 'Maximum wait time',
480
+ },
481
+ {
482
+ displayName: 'Tab Index',
483
+ name: 'tabIndex',
484
+ type: 'number',
485
+ displayOptions: {
486
+ show: {
487
+ resource: ['pageInteraction'],
488
+ operation: ['moveAndClick'],
489
+ },
490
+ },
491
+ default: 0,
492
+ description: 'Browser tab index',
493
+ },
494
+ {
495
+ displayName: 'Auto Start Profile',
496
+ name: 'autoStart',
497
+ type: 'boolean',
498
+ displayOptions: {
499
+ show: {
500
+ resource: ['pageInteraction'],
501
+ operation: ['moveAndClick'],
502
+ },
503
+ },
504
+ default: false,
505
+ description: 'Whether to auto-start profile if not running',
506
+ },
507
+ {
508
+ displayName: 'Wait Before Click (Milliseconds)',
509
+ name: 'waitForClick',
510
+ type: 'number',
511
+ displayOptions: {
512
+ show: {
513
+ resource: ['pageInteraction'],
514
+ operation: ['moveAndClick'],
515
+ },
516
+ },
517
+ default: 500,
518
+ description: 'Delay before clicking',
519
+ },
520
+ {
521
+ displayName: 'Mouse Button',
522
+ name: 'button',
523
+ type: 'options',
524
+ displayOptions: {
525
+ show: {
526
+ resource: ['pageInteraction'],
527
+ operation: ['moveAndClick'],
528
+ },
529
+ },
530
+ options: [
531
+ {
532
+ name: 'Left',
533
+ value: 'left',
534
+ },
535
+ {
536
+ name: 'Right',
537
+ value: 'right',
538
+ },
539
+ {
540
+ name: 'Middle',
541
+ value: 'middle',
542
+ },
543
+ ],
544
+ default: 'left',
545
+ description: 'Mouse button to use',
546
+ },
547
+ {
548
+ displayName: 'Click Count',
549
+ name: 'clickCount',
550
+ type: 'number',
551
+ displayOptions: {
552
+ show: {
553
+ resource: ['pageInteraction'],
554
+ operation: ['moveAndClick'],
555
+ },
556
+ },
557
+ default: 1,
558
+ description: 'Number of clicks',
559
+ },
560
+ {
561
+ displayName: 'Use Binary File',
562
+ name: 'useBinaryFile',
563
+ type: 'boolean',
564
+ displayOptions: {
565
+ show: {
566
+ resource: ['pageInteraction'],
567
+ operation: ['moveAndClick'],
568
+ },
569
+ },
570
+ default: false,
571
+ description: 'Whether to upload a binary file',
572
+ },
573
+ {
574
+ displayName: 'Binary Property',
575
+ name: 'binaryPropertyName',
576
+ type: 'string',
577
+ displayOptions: {
578
+ show: {
579
+ resource: ['pageInteraction'],
580
+ operation: ['moveAndClick'],
581
+ useBinaryFile: [true],
582
+ },
583
+ },
584
+ default: 'data',
585
+ required: true,
586
+ description: 'Name of the binary property containing the file',
587
+ },
588
+ // Run JavaScript Fields
589
+ {
590
+ displayName: 'Profile ID',
591
+ name: 'profileId',
592
+ type: 'string',
593
+ displayOptions: {
594
+ show: {
595
+ resource: ['pageInteraction'],
596
+ operation: ['runJavaScript'],
597
+ },
598
+ },
599
+ default: '',
600
+ required: true,
601
+ description: 'ID of the profile',
602
+ },
603
+ {
604
+ displayName: 'JavaScript Code',
605
+ name: 'javascriptCode',
606
+ type: 'string',
607
+ typeOptions: {
608
+ rows: 10,
609
+ },
610
+ displayOptions: {
611
+ show: {
612
+ resource: ['pageInteraction'],
613
+ operation: ['runJavaScript'],
614
+ },
615
+ },
616
+ default: '',
617
+ required: true,
618
+ description: 'JavaScript code to execute',
619
+ },
620
+ {
621
+ displayName: 'Tab Index',
622
+ name: 'tabIndex',
623
+ type: 'number',
624
+ displayOptions: {
625
+ show: {
626
+ resource: ['pageInteraction'],
627
+ operation: ['runJavaScript'],
628
+ },
629
+ },
630
+ default: 0,
631
+ description: 'Browser tab index',
632
+ },
633
+ {
634
+ displayName: 'Auto Start Profile',
635
+ name: 'autoStart',
636
+ type: 'boolean',
637
+ displayOptions: {
638
+ show: {
639
+ resource: ['pageInteraction'],
640
+ operation: ['runJavaScript'],
641
+ },
642
+ },
643
+ default: false,
644
+ description: 'Whether to auto-start profile if not running',
645
+ },
646
+ // Get Network Response Fields
647
+ {
648
+ displayName: 'Profile ID',
649
+ name: 'profileId',
650
+ type: 'string',
651
+ displayOptions: {
652
+ show: {
653
+ resource: ['pageInteraction'],
654
+ operation: ['getNetworkResponse'],
655
+ },
656
+ },
657
+ default: '',
658
+ required: true,
659
+ description: 'ID of the profile',
660
+ },
661
+ {
662
+ displayName: 'Request Name or URL',
663
+ name: 'requestFilter',
664
+ type: 'string',
665
+ displayOptions: {
666
+ show: {
667
+ resource: ['pageInteraction'],
668
+ operation: ['getNetworkResponse'],
669
+ },
670
+ },
671
+ default: '',
672
+ required: true,
673
+ description: 'Filter for network requests',
674
+ },
675
+ {
676
+ displayName: 'Match Type',
677
+ name: 'matchType',
678
+ type: 'options',
679
+ displayOptions: {
680
+ show: {
681
+ resource: ['pageInteraction'],
682
+ operation: ['getNetworkResponse'],
683
+ },
684
+ },
685
+ options: [
686
+ {
687
+ name: 'Contains',
688
+ value: 'contains',
689
+ },
690
+ {
691
+ name: 'Exact',
692
+ value: 'exact',
693
+ },
694
+ {
695
+ name: 'Starts With',
696
+ value: 'startsWith',
697
+ },
698
+ {
699
+ name: 'Ends With',
700
+ value: 'endsWith',
701
+ },
702
+ {
703
+ name: 'Regex',
704
+ value: 'regex',
705
+ },
706
+ ],
707
+ default: 'contains',
708
+ description: 'How to match the request filter',
709
+ },
710
+ {
711
+ displayName: 'Timeout (Milliseconds)',
712
+ name: 'timeout',
713
+ type: 'number',
714
+ displayOptions: {
715
+ show: {
716
+ resource: ['pageInteraction'],
717
+ operation: ['getNetworkResponse'],
718
+ },
719
+ },
720
+ default: 30000,
721
+ description: 'Timeout for waiting',
722
+ },
723
+ {
724
+ displayName: 'Wait For Request',
725
+ name: 'waitForRequest',
726
+ type: 'boolean',
727
+ displayOptions: {
728
+ show: {
729
+ resource: ['pageInteraction'],
730
+ operation: ['getNetworkResponse'],
731
+ },
732
+ },
733
+ default: true,
734
+ description: 'Whether to wait for the request',
735
+ },
736
+ {
737
+ displayName: 'Tab Index',
738
+ name: 'tabIndex',
739
+ type: 'number',
740
+ displayOptions: {
741
+ show: {
742
+ resource: ['pageInteraction'],
743
+ operation: ['getNetworkResponse'],
744
+ },
745
+ },
746
+ default: 0,
747
+ description: 'Browser tab index',
748
+ },
749
+ {
750
+ displayName: 'Auto Start Profile',
751
+ name: 'autoStart',
752
+ type: 'boolean',
753
+ displayOptions: {
754
+ show: {
755
+ resource: ['pageInteraction'],
756
+ operation: ['getNetworkResponse'],
757
+ },
758
+ },
759
+ default: false,
760
+ description: 'Whether to auto-start profile if not running',
761
+ },
762
+ // Browser HTTP Request Fields
763
+ {
764
+ displayName: 'Profile ID',
765
+ name: 'profileId',
766
+ type: 'string',
767
+ displayOptions: {
768
+ show: {
769
+ resource: ['pageInteraction'],
770
+ operation: ['browserHttpRequest'],
771
+ },
772
+ },
773
+ default: '',
774
+ required: true,
775
+ description: 'ID of the profile',
776
+ },
777
+ {
778
+ displayName: 'Method',
779
+ name: 'method',
780
+ type: 'options',
781
+ displayOptions: {
782
+ show: {
783
+ resource: ['pageInteraction'],
784
+ operation: ['browserHttpRequest'],
785
+ },
786
+ },
787
+ options: [
788
+ {
789
+ name: 'GET',
790
+ value: 'GET',
791
+ },
792
+ {
793
+ name: 'POST',
794
+ value: 'POST',
795
+ },
796
+ ],
797
+ default: 'GET',
798
+ description: 'HTTP method',
799
+ },
800
+ {
801
+ displayName: 'URL',
802
+ name: 'url',
803
+ type: 'string',
804
+ displayOptions: {
805
+ show: {
806
+ resource: ['pageInteraction'],
807
+ operation: ['browserHttpRequest'],
808
+ },
809
+ },
810
+ default: '',
811
+ required: true,
812
+ description: 'Request URL',
813
+ },
814
+ {
815
+ displayName: 'Send Body',
816
+ name: 'sendBody',
817
+ type: 'boolean',
818
+ displayOptions: {
819
+ show: {
820
+ resource: ['pageInteraction'],
821
+ operation: ['browserHttpRequest'],
822
+ method: ['POST'],
823
+ },
824
+ },
825
+ default: false,
826
+ description: 'Whether to send request body',
827
+ },
828
+ {
829
+ displayName: 'Body Content Type',
830
+ name: 'bodyContentType',
831
+ type: 'options',
832
+ displayOptions: {
833
+ show: {
834
+ resource: ['pageInteraction'],
835
+ operation: ['browserHttpRequest'],
836
+ method: ['POST'],
837
+ sendBody: [true],
838
+ },
839
+ },
840
+ options: [
841
+ {
842
+ name: 'Form Urlencoded',
843
+ value: 'formUrlencoded',
844
+ },
845
+ {
846
+ name: 'Form-Data',
847
+ value: 'formData',
848
+ },
849
+ {
850
+ name: 'JSON',
851
+ value: 'json',
852
+ },
853
+ {
854
+ name: 'n8n Binary File',
855
+ value: 'binaryFile',
856
+ },
857
+ {
858
+ name: 'Raw',
859
+ value: 'raw',
860
+ },
861
+ ],
862
+ default: 'formData',
863
+ description: 'Type of body content',
864
+ },
865
+ // n8n Binary File - Input Data Field Name
866
+ {
867
+ displayName: 'Input Data Field Name',
868
+ name: 'binaryPropertyName',
869
+ type: 'string',
870
+ displayOptions: {
871
+ show: {
872
+ resource: ['pageInteraction'],
873
+ operation: ['browserHttpRequest'],
874
+ method: ['POST'],
875
+ sendBody: [true],
876
+ bodyContentType: ['binaryFile'],
877
+ },
878
+ },
879
+ default: 'data',
880
+ required: true,
881
+ placeholder: 'data',
882
+ description: 'Name of the binary property to send',
883
+ },
884
+ {
885
+ displayName: 'JSON Body',
886
+ name: 'jsonBody',
887
+ type: 'string',
888
+ typeOptions: {
889
+ rows: 4,
890
+ },
891
+ displayOptions: {
892
+ show: {
893
+ resource: ['pageInteraction'],
894
+ operation: ['browserHttpRequest'],
895
+ method: ['POST'],
896
+ sendBody: [true],
897
+ bodyContentType: ['json'],
898
+ },
899
+ },
900
+ default: '',
901
+ description: 'JSON body content',
902
+ },
903
+ {
904
+ displayName: 'Raw Body',
905
+ name: 'rawBody',
906
+ type: 'string',
907
+ typeOptions: {
908
+ rows: 4,
909
+ },
910
+ displayOptions: {
911
+ show: {
912
+ resource: ['pageInteraction'],
913
+ operation: ['browserHttpRequest'],
914
+ method: ['POST'],
915
+ sendBody: [true],
916
+ bodyContentType: ['raw'],
917
+ },
918
+ },
919
+ default: '',
920
+ description: 'Raw body content',
921
+ },
922
+ // Body Parameters for Form-Data with Parameter Type selector
923
+ {
924
+ displayName: 'Body Parameters',
925
+ name: 'bodyParameters',
926
+ type: 'fixedCollection',
927
+ typeOptions: {
928
+ multipleValues: true,
929
+ },
930
+ displayOptions: {
931
+ show: {
932
+ resource: ['pageInteraction'],
933
+ operation: ['browserHttpRequest'],
934
+ method: ['POST'],
935
+ sendBody: [true],
936
+ bodyContentType: ['formData'],
937
+ },
938
+ },
939
+ default: {},
940
+ placeholder: 'Add Parameter',
941
+ options: [
942
+ {
943
+ displayName: 'Parameter',
944
+ name: 'parameter',
945
+ values: [
946
+ {
947
+ displayName: 'Parameter Type',
948
+ name: 'parameterType',
949
+ type: 'options',
950
+ options: [
951
+ {
952
+ name: 'Form Data',
953
+ value: 'formData',
954
+ },
955
+ {
956
+ name: 'n8n Binary File',
957
+ value: 'binaryFile',
958
+ },
959
+ ],
960
+ default: 'formData',
961
+ description: 'Type of the parameter',
962
+ },
963
+ {
964
+ displayName: 'Name',
965
+ name: 'name',
966
+ type: 'string',
967
+ default: '',
968
+ description: 'Parameter name',
969
+ },
970
+ {
971
+ displayName: 'Value',
972
+ name: 'value',
973
+ type: 'string',
974
+ displayOptions: {
975
+ show: {
976
+ parameterType: ['formData'],
977
+ },
978
+ },
979
+ default: '',
980
+ description: 'Parameter value',
981
+ },
982
+ {
983
+ displayName: 'Input Data Field Name',
984
+ name: 'binaryProperty',
985
+ type: 'string',
986
+ displayOptions: {
987
+ show: {
988
+ parameterType: ['binaryFile'],
989
+ },
990
+ },
991
+ default: 'data',
992
+ placeholder: 'data',
993
+ description: 'Name of the binary property for this parameter',
994
+ },
995
+ ],
996
+ },
997
+ ],
998
+ },
999
+ // Form Urlencoded Parameters
1000
+ {
1001
+ displayName: 'Form Data',
1002
+ name: 'formData',
1003
+ type: 'fixedCollection',
1004
+ typeOptions: {
1005
+ multipleValues: true,
1006
+ },
1007
+ displayOptions: {
1008
+ show: {
1009
+ resource: ['pageInteraction'],
1010
+ operation: ['browserHttpRequest'],
1011
+ method: ['POST'],
1012
+ sendBody: [true],
1013
+ bodyContentType: ['formUrlencoded'],
1014
+ },
1015
+ },
1016
+ default: {},
1017
+ placeholder: 'Add Parameter',
1018
+ options: [
1019
+ {
1020
+ displayName: 'Parameter',
1021
+ name: 'parameter',
1022
+ values: [
1023
+ {
1024
+ displayName: 'Name',
1025
+ name: 'name',
1026
+ type: 'string',
1027
+ default: '',
1028
+ },
1029
+ {
1030
+ displayName: 'Value',
1031
+ name: 'value',
1032
+ type: 'string',
1033
+ default: '',
1034
+ },
1035
+ ],
1036
+ },
1037
+ ],
1038
+ },
1039
+ {
1040
+ displayName: 'Additional Headers',
1041
+ name: 'additionalHeaders',
1042
+ type: 'fixedCollection',
1043
+ typeOptions: {
1044
+ multipleValues: true,
1045
+ },
1046
+ displayOptions: {
1047
+ show: {
1048
+ resource: ['pageInteraction'],
1049
+ operation: ['browserHttpRequest'],
1050
+ },
1051
+ },
1052
+ default: {},
1053
+ options: [
1054
+ {
1055
+ displayName: 'Header',
1056
+ name: 'header',
1057
+ values: [
1058
+ {
1059
+ displayName: 'Name',
1060
+ name: 'name',
1061
+ type: 'string',
1062
+ default: '',
1063
+ },
1064
+ {
1065
+ displayName: 'Value',
1066
+ name: 'value',
1067
+ type: 'string',
1068
+ default: '',
1069
+ },
1070
+ ],
1071
+ },
1072
+ ],
1073
+ },
1074
+ {
1075
+ displayName: 'Query Parameters',
1076
+ name: 'queryParameters',
1077
+ type: 'fixedCollection',
1078
+ typeOptions: {
1079
+ multipleValues: true,
1080
+ },
1081
+ displayOptions: {
1082
+ show: {
1083
+ resource: ['pageInteraction'],
1084
+ operation: ['browserHttpRequest'],
1085
+ },
1086
+ },
1087
+ default: {},
1088
+ options: [
1089
+ {
1090
+ displayName: 'Parameter',
1091
+ name: 'parameter',
1092
+ values: [
1093
+ {
1094
+ displayName: 'Name',
1095
+ name: 'name',
1096
+ type: 'string',
1097
+ default: '',
1098
+ },
1099
+ {
1100
+ displayName: 'Value',
1101
+ name: 'value',
1102
+ type: 'string',
1103
+ default: '',
1104
+ },
1105
+ ],
1106
+ },
1107
+ ],
1108
+ },
1109
+ {
1110
+ displayName: 'Tab Index',
1111
+ name: 'tabIndex',
1112
+ type: 'number',
1113
+ displayOptions: {
1114
+ show: {
1115
+ resource: ['pageInteraction'],
1116
+ operation: ['browserHttpRequest'],
1117
+ },
1118
+ },
1119
+ default: 0,
1120
+ description: 'Browser tab index',
1121
+ },
1122
+ {
1123
+ displayName: 'Auto Start Profile',
1124
+ name: 'autoStart',
1125
+ type: 'boolean',
1126
+ displayOptions: {
1127
+ show: {
1128
+ resource: ['pageInteraction'],
1129
+ operation: ['browserHttpRequest'],
1130
+ },
1131
+ },
1132
+ default: false,
1133
+ description: 'Whether to auto-start profile if not running',
1134
+ },
1135
+ ],
1136
+ };