n8n-nodes-test-node 1.0.7 → 1.0.9

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.
@@ -1,739 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SwaggerPetstoreNode = void 0;
4
- class SwaggerPetstoreNode {
5
- constructor() {
6
- this.description = {
7
- displayName: 'Swagger Petstore',
8
- name: 'swaggerPetstore',
9
- icon: 'file:icon.png',
10
- group: ['transform'],
11
- version: 1,
12
- subtitle: '={{$parameter["operation"] + ($parameter["resource"] ? " " + $parameter["resource"] : "")}}',
13
- description: 'This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.',
14
- defaults: {
15
- name: 'Swagger Petstore',
16
- },
17
- inputs: ['main'],
18
- outputs: ['main'],
19
- credentials: [
20
- {
21
- name: 'swaggerPetstoreApi',
22
- required: true,
23
- },
24
- ],
25
- requestDefaults: {
26
- baseURL: '={{$credentials.baseUrl}}',
27
- headers: {
28
- Accept: 'application/json',
29
- },
30
- },
31
- properties: [
32
- {
33
- displayName: 'Resource',
34
- name: 'resource',
35
- type: 'options',
36
- noDataExpression: true,
37
- options: [
38
- { name: 'Pet', value: 'pet' },
39
- { name: 'Store', value: 'store' },
40
- { name: 'User', value: 'user' },
41
- ],
42
- default: 'pet',
43
- },
44
- {
45
- displayName: 'Operation',
46
- name: 'operation',
47
- type: 'options',
48
- noDataExpression: true,
49
- options: [
50
- {
51
- name: 'Find Pet By ID',
52
- value: 'getPetById',
53
- action: 'Find pet by ID',
54
- description: 'Returns a single pet',
55
- routing: {
56
- request: {
57
- method: 'GET',
58
- url: '=/pet/{{$parameter["petId"]}}',
59
- },
60
- },
61
- },
62
- ],
63
- displayOptions: {
64
- show: {
65
- resource: ['pet'],
66
- },
67
- },
68
- default: 'getPetById',
69
- },
70
- {
71
- displayName: 'Operation',
72
- name: 'operation',
73
- type: 'options',
74
- noDataExpression: true,
75
- options: [
76
- {
77
- name: 'Returns Pet Inventories By Status',
78
- value: 'getInventory',
79
- action: 'Returns pet inventories by status',
80
- description: 'Returns a map of status codes to quantities',
81
- routing: {
82
- request: {
83
- method: 'GET',
84
- url: '=/store/inventory',
85
- },
86
- },
87
- },
88
- {
89
- name: 'Place An Order For A Pet',
90
- value: 'placeOrder',
91
- action: 'Place an order for a pet',
92
- description: 'Place an order for a pet',
93
- routing: {
94
- request: {
95
- method: 'POST',
96
- url: '=/store/order',
97
- },
98
- },
99
- },
100
- {
101
- name: 'Find Purchase Order By ID',
102
- value: 'getOrderById',
103
- action: 'Find purchase order by ID',
104
- description: 'For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions',
105
- routing: {
106
- request: {
107
- method: 'GET',
108
- url: '=/store/order/{{$parameter["orderId"]}}',
109
- },
110
- },
111
- },
112
- {
113
- name: 'Delete Purchase Order By ID',
114
- value: 'deleteOrder',
115
- action: 'Delete purchase order by ID',
116
- description: 'For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors',
117
- routing: {
118
- request: {
119
- method: 'DELETE',
120
- url: '=/store/order/{{$parameter["orderId"]}}',
121
- },
122
- },
123
- },
124
- ],
125
- displayOptions: {
126
- show: {
127
- resource: ['store'],
128
- },
129
- },
130
- default: 'getInventory',
131
- },
132
- {
133
- displayName: 'Operation',
134
- name: 'operation',
135
- type: 'options',
136
- noDataExpression: true,
137
- options: [
138
- {
139
- name: 'Creates List Of Users With Given Input Array',
140
- value: 'createUsersWithListInput',
141
- action: 'Creates list of users with given input array',
142
- description: 'Creates list of users with given input array',
143
- routing: {
144
- request: {
145
- method: 'POST',
146
- url: '=/user/createWithList',
147
- },
148
- },
149
- },
150
- {
151
- name: 'Get User By User Name',
152
- value: 'getUserByName',
153
- action: 'Get user by user name',
154
- description: 'Get user by user name',
155
- routing: {
156
- request: {
157
- method: 'GET',
158
- url: '=/user/{{$parameter["username"]}}',
159
- },
160
- },
161
- },
162
- {
163
- name: 'Updated User',
164
- value: 'updateUser',
165
- action: 'Updated user',
166
- description: 'This can only be done by the logged in user.',
167
- routing: {
168
- request: {
169
- method: 'PUT',
170
- url: '=/user/{{$parameter["username"]}}',
171
- },
172
- },
173
- },
174
- {
175
- name: 'Delete User',
176
- value: 'deleteUser',
177
- action: 'Delete user',
178
- description: 'This can only be done by the logged in user.',
179
- routing: {
180
- request: {
181
- method: 'DELETE',
182
- url: '=/user/{{$parameter["username"]}}',
183
- },
184
- },
185
- },
186
- {
187
- name: 'Logs User Into The System',
188
- value: 'loginUser',
189
- action: 'Logs user into the system',
190
- description: 'Logs user into the system',
191
- routing: {
192
- request: {
193
- method: 'GET',
194
- url: '=/user/login',
195
- },
196
- },
197
- },
198
- {
199
- name: 'Logs Out Current Logged In User Session',
200
- value: 'logoutUser',
201
- action: 'Logs out current logged in user session',
202
- description: 'Logs out current logged in user session',
203
- routing: {
204
- request: {
205
- method: 'GET',
206
- url: '=/user/logout',
207
- },
208
- },
209
- },
210
- {
211
- name: 'Creates List Of Users With Given Input Array',
212
- value: 'createUsersWithArrayInput',
213
- action: 'Creates list of users with given input array',
214
- description: 'Creates list of users with given input array',
215
- routing: {
216
- request: {
217
- method: 'POST',
218
- url: '=/user/createWithArray',
219
- },
220
- },
221
- },
222
- {
223
- name: 'Create User',
224
- value: 'createUser',
225
- action: 'Create user',
226
- description: 'This can only be done by the logged in user.',
227
- routing: {
228
- request: {
229
- method: 'POST',
230
- url: '=/user',
231
- },
232
- },
233
- },
234
- ],
235
- displayOptions: {
236
- show: {
237
- resource: ['user'],
238
- },
239
- },
240
- default: 'createUsersWithListInput',
241
- },
242
- {
243
- displayName: 'Pet Id',
244
- name: 'petId',
245
- type: 'number',
246
- default: 0,
247
- required: true,
248
- description: 'ID of pet to return',
249
- displayOptions: {
250
- show: {
251
- resource: ['pet'],
252
- operation: ['getPetById'],
253
- },
254
- },
255
- },
256
- {
257
- displayName: 'Additional Fields',
258
- name: 'additionalFields',
259
- type: 'collection',
260
- placeholder: 'Add Field',
261
- default: {},
262
- displayOptions: {
263
- show: {
264
- resource: ['store'],
265
- operation: ['placeOrder'],
266
- },
267
- },
268
- options: [
269
- {
270
- displayName: 'Id',
271
- name: 'id',
272
- type: 'number',
273
- default: 0,
274
- description: '',
275
- routing: {
276
- send: {
277
- type: 'body',
278
- property: 'id',
279
- },
280
- },
281
- },
282
- {
283
- displayName: 'Pet Id',
284
- name: 'petId',
285
- type: 'number',
286
- default: 0,
287
- description: '',
288
- routing: {
289
- send: {
290
- type: 'body',
291
- property: 'petId',
292
- },
293
- },
294
- },
295
- {
296
- displayName: 'Quantity',
297
- name: 'quantity',
298
- type: 'number',
299
- default: 0,
300
- description: '',
301
- routing: {
302
- send: {
303
- type: 'body',
304
- property: 'quantity',
305
- },
306
- },
307
- },
308
- {
309
- displayName: 'Ship Date',
310
- name: 'shipDate',
311
- type: 'string',
312
- default: '',
313
- description: '',
314
- routing: {
315
- send: {
316
- type: 'body',
317
- property: 'shipDate',
318
- },
319
- },
320
- },
321
- {
322
- displayName: 'Status',
323
- name: 'status',
324
- type: 'string',
325
- default: '',
326
- description: 'Order Status',
327
- routing: {
328
- send: {
329
- type: 'body',
330
- property: 'status',
331
- },
332
- },
333
- },
334
- {
335
- displayName: 'Complete',
336
- name: 'complete',
337
- type: 'boolean',
338
- default: false,
339
- description: '',
340
- routing: {
341
- send: {
342
- type: 'body',
343
- property: 'complete',
344
- },
345
- },
346
- },
347
- ],
348
- },
349
- {
350
- displayName: 'Order Id',
351
- name: 'orderId',
352
- type: 'number',
353
- default: 0,
354
- required: true,
355
- description: 'ID of pet that needs to be fetched',
356
- displayOptions: {
357
- show: {
358
- resource: ['store'],
359
- operation: ['getOrderById'],
360
- },
361
- },
362
- },
363
- {
364
- displayName: 'Order Id',
365
- name: 'orderId',
366
- type: 'number',
367
- default: 0,
368
- required: true,
369
- description: 'ID of the order that needs to be deleted',
370
- displayOptions: {
371
- show: {
372
- resource: ['store'],
373
- operation: ['deleteOrder'],
374
- },
375
- },
376
- },
377
- {
378
- displayName: 'Body (JSON)',
379
- name: 'bodyJson',
380
- type: 'json',
381
- default: '{}',
382
- required: true,
383
- description: "Raw JSON request body. The spec's body schema is too complex to expose as individual fields, so provide the full JSON payload here.",
384
- displayOptions: {
385
- show: {
386
- resource: ['user'],
387
- operation: ['createUsersWithListInput'],
388
- },
389
- },
390
- routing: {
391
- request: {
392
- body: '={{JSON.parse($value)}}',
393
- },
394
- },
395
- },
396
- {
397
- displayName: 'Username',
398
- name: 'username',
399
- type: 'string',
400
- default: '',
401
- required: true,
402
- description: 'The name that needs to be fetched. Use user1 for testing. ',
403
- displayOptions: {
404
- show: {
405
- resource: ['user'],
406
- operation: ['getUserByName'],
407
- },
408
- },
409
- },
410
- {
411
- displayName: 'Username',
412
- name: 'username',
413
- type: 'string',
414
- default: '',
415
- required: true,
416
- description: 'name that need to be updated',
417
- displayOptions: {
418
- show: {
419
- resource: ['user'],
420
- operation: ['updateUser'],
421
- },
422
- },
423
- },
424
- {
425
- displayName: 'Additional Fields',
426
- name: 'additionalFields',
427
- type: 'collection',
428
- placeholder: 'Add Field',
429
- default: {},
430
- displayOptions: {
431
- show: {
432
- resource: ['user'],
433
- operation: ['updateUser'],
434
- },
435
- },
436
- options: [
437
- {
438
- displayName: 'Id',
439
- name: 'id',
440
- type: 'number',
441
- default: 0,
442
- description: '',
443
- routing: {
444
- send: {
445
- type: 'body',
446
- property: 'id',
447
- },
448
- },
449
- },
450
- {
451
- displayName: 'Username',
452
- name: 'username',
453
- type: 'string',
454
- default: '',
455
- description: '',
456
- routing: {
457
- send: {
458
- type: 'body',
459
- property: 'username',
460
- },
461
- },
462
- },
463
- {
464
- displayName: 'First Name',
465
- name: 'firstName',
466
- type: 'string',
467
- default: '',
468
- description: '',
469
- routing: {
470
- send: {
471
- type: 'body',
472
- property: 'firstName',
473
- },
474
- },
475
- },
476
- {
477
- displayName: 'Last Name',
478
- name: 'lastName',
479
- type: 'string',
480
- default: '',
481
- description: '',
482
- routing: {
483
- send: {
484
- type: 'body',
485
- property: 'lastName',
486
- },
487
- },
488
- },
489
- {
490
- displayName: 'Email',
491
- name: 'email',
492
- type: 'string',
493
- default: '',
494
- description: '',
495
- routing: {
496
- send: {
497
- type: 'body',
498
- property: 'email',
499
- },
500
- },
501
- },
502
- {
503
- displayName: 'Password',
504
- name: 'password',
505
- type: 'string',
506
- default: '',
507
- description: '',
508
- routing: {
509
- send: {
510
- type: 'body',
511
- property: 'password',
512
- },
513
- },
514
- },
515
- {
516
- displayName: 'Phone',
517
- name: 'phone',
518
- type: 'string',
519
- default: '',
520
- description: '',
521
- routing: {
522
- send: {
523
- type: 'body',
524
- property: 'phone',
525
- },
526
- },
527
- },
528
- {
529
- displayName: 'User Status',
530
- name: 'userStatus',
531
- type: 'number',
532
- default: 0,
533
- description: 'User Status',
534
- routing: {
535
- send: {
536
- type: 'body',
537
- property: 'userStatus',
538
- },
539
- },
540
- },
541
- ],
542
- },
543
- {
544
- displayName: 'Username',
545
- name: 'username',
546
- type: 'string',
547
- default: '',
548
- required: true,
549
- description: 'The name that needs to be deleted',
550
- displayOptions: {
551
- show: {
552
- resource: ['user'],
553
- operation: ['deleteUser'],
554
- },
555
- },
556
- },
557
- {
558
- displayName: 'Username',
559
- name: 'username',
560
- type: 'string',
561
- default: '',
562
- required: true,
563
- description: 'The user name for login',
564
- displayOptions: {
565
- show: {
566
- resource: ['user'],
567
- operation: ['loginUser'],
568
- },
569
- },
570
- routing: {
571
- send: {
572
- type: 'query',
573
- property: 'username',
574
- },
575
- },
576
- },
577
- {
578
- displayName: 'Password',
579
- name: 'password',
580
- type: 'string',
581
- default: '',
582
- required: true,
583
- description: 'The password for login in clear text',
584
- displayOptions: {
585
- show: {
586
- resource: ['user'],
587
- operation: ['loginUser'],
588
- },
589
- },
590
- routing: {
591
- send: {
592
- type: 'query',
593
- property: 'password',
594
- },
595
- },
596
- },
597
- {
598
- displayName: 'Body (JSON)',
599
- name: 'bodyJson',
600
- type: 'json',
601
- default: '{}',
602
- required: true,
603
- description: "Raw JSON request body. The spec's body schema is too complex to expose as individual fields, so provide the full JSON payload here.",
604
- displayOptions: {
605
- show: {
606
- resource: ['user'],
607
- operation: ['createUsersWithArrayInput'],
608
- },
609
- },
610
- routing: {
611
- request: {
612
- body: '={{JSON.parse($value)}}',
613
- },
614
- },
615
- },
616
- {
617
- displayName: 'Additional Fields',
618
- name: 'additionalFields',
619
- type: 'collection',
620
- placeholder: 'Add Field',
621
- default: {},
622
- displayOptions: {
623
- show: {
624
- resource: ['user'],
625
- operation: ['createUser'],
626
- },
627
- },
628
- options: [
629
- {
630
- displayName: 'Id',
631
- name: 'id',
632
- type: 'number',
633
- default: 0,
634
- description: '',
635
- routing: {
636
- send: {
637
- type: 'body',
638
- property: 'id',
639
- },
640
- },
641
- },
642
- {
643
- displayName: 'Username',
644
- name: 'username',
645
- type: 'string',
646
- default: '',
647
- description: '',
648
- routing: {
649
- send: {
650
- type: 'body',
651
- property: 'username',
652
- },
653
- },
654
- },
655
- {
656
- displayName: 'First Name',
657
- name: 'firstName',
658
- type: 'string',
659
- default: '',
660
- description: '',
661
- routing: {
662
- send: {
663
- type: 'body',
664
- property: 'firstName',
665
- },
666
- },
667
- },
668
- {
669
- displayName: 'Last Name',
670
- name: 'lastName',
671
- type: 'string',
672
- default: '',
673
- description: '',
674
- routing: {
675
- send: {
676
- type: 'body',
677
- property: 'lastName',
678
- },
679
- },
680
- },
681
- {
682
- displayName: 'Email',
683
- name: 'email',
684
- type: 'string',
685
- default: '',
686
- description: '',
687
- routing: {
688
- send: {
689
- type: 'body',
690
- property: 'email',
691
- },
692
- },
693
- },
694
- {
695
- displayName: 'Password',
696
- name: 'password',
697
- type: 'string',
698
- default: '',
699
- description: '',
700
- routing: {
701
- send: {
702
- type: 'body',
703
- property: 'password',
704
- },
705
- },
706
- },
707
- {
708
- displayName: 'Phone',
709
- name: 'phone',
710
- type: 'string',
711
- default: '',
712
- description: '',
713
- routing: {
714
- send: {
715
- type: 'body',
716
- property: 'phone',
717
- },
718
- },
719
- },
720
- {
721
- displayName: 'User Status',
722
- name: 'userStatus',
723
- type: 'number',
724
- default: 0,
725
- description: 'User Status',
726
- routing: {
727
- send: {
728
- type: 'body',
729
- property: 'userStatus',
730
- },
731
- },
732
- },
733
- ],
734
- },
735
- ],
736
- };
737
- }
738
- }
739
- exports.SwaggerPetstoreNode = SwaggerPetstoreNode;