@gregoriusrippenstein/node-red-contrib-introspection 0.4.5 → 0.5.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.
@@ -1,2609 +1,493 @@
1
1
  [
2
2
  {
3
- "id": "6bab6804614c2612",
4
- "type": "tab",
5
- "label": "Seeker Sink Example",
6
- "disabled": false,
7
- "info": "",
8
- "env": []
9
- },
10
- {
11
- "id": "1f6116ea2b105a8b",
12
- "type": "subflow",
13
- "name": "add dont spam me link",
14
- "info": "",
15
- "category": "",
16
- "in": [
17
- {
18
- "x": 181,
19
- "y": 139.5,
20
- "wires": [
21
- {
22
- "id": "8116a126d363a248"
23
- }
24
- ]
25
- }
26
- ],
27
- "out": [
28
- {
29
- "x": 841,
30
- "y": 139.5,
31
- "wires": [
32
- {
33
- "id": "8116a126d363a248",
34
- "port": 0
35
- }
36
- ]
37
- }
38
- ],
39
- "env": [],
40
- "meta": {},
41
- "color": "#E7E7AE",
42
- "icon": "node-red/envelope.svg"
43
- },
44
- {
45
- "id": "e8bbdc11f1fc0dd8",
46
- "type": "subflow",
47
- "name": "GATEWAY: payload ok?",
48
- "info": "",
49
- "category": "",
50
- "in": [
51
- {
52
- "x": 70,
53
- "y": 80,
54
- "wires": [
55
- {
56
- "id": "b843b09e915a1928"
57
- }
58
- ]
59
- }
60
- ],
61
- "out": [
62
- {
63
- "x": 427,
64
- "y": 74,
65
- "wires": [
66
- {
67
- "id": "b843b09e915a1928",
68
- "port": 0
69
- }
70
- ]
71
- }
72
- ],
73
- "env": [],
74
- "meta": {},
75
- "color": "#D7D7A0",
76
- "icon": "font-awesome/fa-map-signs"
77
- },
78
- {
79
- "id": "fe3f79f21ce302bc",
80
- "type": "subflow",
81
- "name": "Node-RED",
82
- "info": "",
83
- "category": "",
84
- "in": [
85
- {
86
- "x": 50,
87
- "y": 30,
88
- "wires": []
89
- }
90
- ],
91
- "out": [
92
- {
93
- "x": 160,
94
- "y": 30,
95
- "wires": []
96
- },
97
- {
98
- "x": 215,
99
- "y": 30,
100
- "wires": []
101
- },
102
- {
103
- "x": 270,
104
- "y": 30,
105
- "wires": []
106
- },
107
- {
108
- "x": 325,
109
- "y": 30,
110
- "wires": []
111
- },
112
- {
113
- "x": 380,
114
- "y": 30,
115
- "wires": []
116
- },
117
- {
118
- "x": 435,
119
- "y": 30,
120
- "wires": []
121
- }
122
- ],
123
- "env": [],
124
- "meta": {},
125
- "color": "red",
126
- "icon": "font-awesome/fa-registered"
127
- },
128
- {
129
- "id": "7a6324f7fd2436d1",
130
- "type": "group",
131
- "z": "6bab6804614c2612",
132
- "name": "not found",
133
- "style": {
134
- "label": true,
135
- "label-position": "sw",
136
- "color": "#000000"
137
- },
138
- "nodes": [
139
- "e1b0724e61924dba",
140
- "caf61359be50bf6f",
141
- "2b1fc6169ecbb5cd",
142
- "8a48031b3d517039",
143
- "9ae5a4ddd9d2ec17",
144
- "7db6fb278287c73c",
145
- "e7a195c6ac26cb20"
146
- ],
147
- "x": 125.4445104598999,
148
- "y": 1223.4265775680542,
149
- "w": 2581.451729774475,
150
- "h": 90
151
- },
152
- {
153
- "id": "3177d6c9a84b07ad",
154
- "type": "group",
155
- "z": "6bab6804614c2612",
156
- "name": "not found",
157
- "style": {
158
- "label": true,
159
- "label-position": "sw",
160
- "color": "#000000"
161
- },
162
- "nodes": [
163
- "7a7fe72c74429d2d",
164
- "f82076d2d8926cfb",
165
- "9161b8e24fc9b96b"
166
- ],
167
- "x": 1218,
168
- "y": 611.444580078125,
169
- "w": 943.5,
170
- "h": 90
171
- },
172
- {
173
- "id": "9969b30d869201d8",
174
- "type": "group",
175
- "z": "6bab6804614c2612",
176
- "name": "Send Verification Email",
177
- "style": {
178
- "label": true,
179
- "color": "#000000"
180
- },
181
- "nodes": [
182
- "e372772cfbb59b9c",
183
- "7e1fdd1358625e6b",
184
- "bcb8cc00ad1fddd5",
185
- "728b41cdc2db124f",
186
- "15cd4fe283a32563",
187
- "a751fedc12c69357",
188
- "808ccf3ff61f71fb",
189
- "30f35c3706f7e73a",
190
- "449601abfe35007d",
191
- "eae85c0e14c8e75a",
192
- "efed77b7b393022f",
193
- "ea31119eb7bd67a6",
194
- "6354755fd1859629"
195
- ],
196
- "x": 107.44091796875,
197
- "y": 1582.0001249313354,
198
- "w": 1350.558982849121,
199
- "h": 230.99987506866455
200
- },
201
- {
202
- "id": "c402f821d1e47bb7",
203
- "type": "group",
204
- "z": "6bab6804614c2612",
205
- "name": "Resend Verification Email",
206
- "style": {
207
- "label": true,
208
- "color": "#000000"
209
- },
210
- "nodes": [
211
- "2f8ce9b086c68242",
212
- "2826ddd04420b144",
213
- "c11b6bd71ce583e3",
214
- "0e3b4533c3eaa98b",
215
- "8deb22cd14041cb2",
216
- "3483e7b4fb48b41b",
217
- "341d12e103dc8526",
218
- "643213478716e634",
219
- "89d8b3214924329e",
220
- "cc220af0679522fb",
221
- "c25b78919ebc3bd9",
222
- "0c12bbfce1102852",
223
- "b6bd1160913b630a",
224
- "49f9f2430341c884"
225
- ],
226
- "x": 108.44091796875,
227
- "y": 1887.0001249313354,
228
- "w": 1552.558982849121,
229
- "h": 279.999755859375
230
- },
231
- {
232
- "id": "85672f28419095b4",
233
- "type": "postgreSQLConfig",
234
- "name": "bnbc",
235
- "host": "PGHOST",
236
- "hostFieldType": "env",
237
- "port": "5432",
238
- "portFieldType": "num",
239
- "database": "PGDBNAME",
240
- "databaseFieldType": "env",
241
- "ssl": "PGSSLMODE",
242
- "sslFieldType": "env",
243
- "applicationName": "",
244
- "applicationNameType": "str",
245
- "max": "10",
246
- "maxFieldType": "num",
247
- "idle": "1000",
248
- "idleFieldType": "num",
249
- "connectionTimeout": "10000",
250
- "connectionTimeoutFieldType": "num",
251
- "user": "PGUSERNAME",
252
- "userFieldType": "env",
253
- "password": "PGPASSWORD",
254
- "passwordFieldType": "env"
255
- },
256
- {
257
- "id": "8116a126d363a248",
258
- "type": "function",
259
- "z": "1f6116ea2b105a8b",
260
- "name": "create dont spam me link",
261
- "func": "// only create a dont-spam-me link if the email is only\n// going to one user. Else the CC-user could use\n// the link to block the TO-user\nif ( !(\"cc_email\" in msg.email) ) {\n\n var encData = global.get(\"encrypt\")(JSON.stringify({\n em: msg.email.to_email,\n ts: Date.now()\n }));\n \n msg.email.data.dont = {\n spamMeLink: global.get(\"url_dontspammelink\")({\n d: encData\n })\n }\n}\nreturn msg;",
262
- "outputs": 1,
263
- "noerr": 0,
264
- "initialize": "",
265
- "finalize": "",
266
- "libs": [],
267
- "x": 498,
268
- "y": 139.5,
269
- "wires": [
270
- []
271
- ]
272
- },
273
- {
274
- "id": "b843b09e915a1928",
275
- "type": "switch",
276
- "z": "e8bbdc11f1fc0dd8",
277
- "name": "",
278
- "property": "status",
279
- "propertyType": "msg",
280
- "rules": [
281
- {
282
- "t": "eq",
283
- "v": "db_check",
284
- "vt": "str"
285
- },
286
- {
287
- "t": "eq",
288
- "v": "missing_data",
289
- "vt": "str"
290
- }
291
- ],
292
- "checkall": "false",
293
- "repair": false,
294
- "outputs": 2,
295
- "x": 200,
296
- "y": 80,
297
- "wires": [
298
- [],
299
- [
300
- "a0e47f0b6400dad9"
301
- ]
302
- ]
303
- },
304
- {
305
- "id": "a0e47f0b6400dad9",
306
- "type": "http response",
307
- "z": "e8bbdc11f1fc0dd8",
308
- "name": "error: missing parameters",
309
- "statusCode": "",
310
- "headers": {},
311
- "x": 338.99993896484375,
312
- "y": 176.00001525878906,
313
- "wires": []
314
- },
315
- {
316
- "id": "f4fee739bb3b20bd",
317
- "type": "http in",
318
- "z": "6bab6804614c2612",
319
- "name": "",
320
- "url": "/api/:path1",
321
- "method": "get",
322
- "upload": false,
323
- "swaggerDoc": "",
324
- "x": 180,
325
- "y": 1012.000205039978,
326
- "wires": [
327
- [
328
- "7dce3e0bfeda5ea8"
329
- ]
330
- ]
331
- },
332
- {
333
- "id": "30f7cbe1e25e67a1",
334
- "type": "switch",
335
- "z": "6bab6804614c2612",
336
- "name": "POST handler",
337
- "property": "req.params.path1",
338
- "propertyType": "msg",
339
- "rules": [
340
- {
341
- "t": "eq",
342
- "v": "proposals",
343
- "vt": "str"
344
- },
345
- {
346
- "t": "eq",
347
- "v": "users",
348
- "vt": "str"
349
- },
350
- {
351
- "t": "eq",
352
- "v": "proposal",
353
- "vt": "str"
354
- },
355
- {
356
- "t": "eq",
357
- "v": "bid",
358
- "vt": "str"
359
- },
360
- {
361
- "t": "eq",
362
- "v": "user",
363
- "vt": "str"
364
- },
365
- {
366
- "t": "else"
367
- }
368
- ],
369
- "checkall": "false",
370
- "repair": false,
371
- "outputs": 6,
372
- "x": 1098.9999923706055,
373
- "y": 1030.000566482544,
374
- "wires": [
375
- [
376
- "7db6fb278287c73c"
377
- ],
378
- [
379
- "7db6fb278287c73c"
380
- ],
381
- [
382
- "7fea0bddb82386e1"
383
- ],
384
- [
385
- "95be9dbff7197b8d"
386
- ],
387
- [
388
- "c22718ee962f7f66"
389
- ],
390
- [
391
- "7db6fb278287c73c"
392
- ]
393
- ]
394
- },
395
- {
396
- "id": "c67da00652f9e5da",
397
- "type": "http response",
398
- "z": "6bab6804614c2612",
399
- "name": "",
400
- "statusCode": "",
401
- "headers": {},
402
- "x": 1271.000244140625,
403
- "y": 1348.0001220703125,
404
- "wires": []
405
- },
406
- {
407
- "id": "1f9f2326b57594a8",
408
- "type": "link out",
409
- "z": "6bab6804614c2612",
410
- "name": "link out 5",
411
- "mode": "link",
412
- "links": [
413
- "cdfe0a2804636784"
414
- ],
415
- "x": 1889.500605583191,
416
- "y": 454.00020122528076,
417
- "wires": []
418
- },
419
- {
420
- "id": "1afda7340dcb7174",
421
- "type": "link out",
422
- "z": "6bab6804614c2612",
423
- "name": "link out 6",
424
- "mode": "link",
425
- "links": [
426
- "33d7ea129f06d293"
427
- ],
428
- "x": 1617.500244140625,
429
- "y": 311.0001525878906,
430
- "wires": []
431
- },
432
- {
433
- "id": "2aba07ab6a5ae942",
434
- "type": "http in",
435
- "z": "6bab6804614c2612",
436
- "name": "",
437
- "url": "/api/:path1/:path2",
438
- "method": "get",
439
- "upload": false,
440
- "swaggerDoc": "",
441
- "x": 200,
442
- "y": 959.0002021789551,
443
- "wires": [
444
- [
445
- "7dce3e0bfeda5ea8"
446
- ]
447
- ]
448
- },
449
- {
450
- "id": "0a61af4ae49e7114",
451
- "type": "http in",
452
- "z": "6bab6804614c2612",
453
- "name": "",
454
- "url": "/api/:path1/:path2/:path3",
455
- "method": "get",
456
- "upload": false,
457
- "swaggerDoc": "",
458
- "x": 220,
459
- "y": 906.0001411437988,
460
- "wires": [
461
- [
462
- "7dce3e0bfeda5ea8"
463
- ]
464
- ]
465
- },
466
- {
467
- "id": "d2e344f5e0f43775",
468
- "type": "switch",
469
- "z": "6bab6804614c2612",
470
- "name": "auctions handler",
471
- "property": "req.params.path2",
472
- "propertyType": "msg",
473
- "rules": [
474
- {
475
- "t": "eq",
476
- "v": "all",
477
- "vt": "str"
478
- },
479
- {
480
- "t": "else"
481
- }
482
- ],
483
- "checkall": "false",
484
- "repair": false,
485
- "outputs": 2,
486
- "x": 1399.89599609375,
487
- "y": 319.0001525878906,
488
- "wires": [
489
- [
490
- "1afda7340dcb7174"
491
- ],
492
- [
493
- "7a7fe72c74429d2d"
494
- ]
495
- ]
496
- },
497
- {
498
- "id": "1229cb58e46b1655",
499
- "type": "switch",
500
- "z": "6bab6804614c2612",
501
- "name": "proposal handler",
502
- "property": "req.params.path2",
503
- "propertyType": "msg",
504
- "rules": [
505
- {
506
- "t": "regex",
507
- "v": "^[a-z0-9-]{36}$",
508
- "vt": "str",
509
- "case": true
510
- },
511
- {
512
- "t": "else"
513
- }
514
- ],
515
- "checkall": "false",
516
- "repair": false,
517
- "outputs": 2,
518
- "x": 1390.89599609375,
519
- "y": 463.0001516342163,
520
- "wires": [
521
- [
522
- "47562c652d157fb8"
523
- ],
524
- [
525
- "7a7fe72c74429d2d"
526
- ]
527
- ]
528
- },
529
- {
530
- "id": "47562c652d157fb8",
531
- "type": "function",
532
- "z": "6bab6804614c2612",
533
- "name": "set uuid parameter",
534
- "func": "msg.req.params[\"uuid\"] = msg.req.params.path2;\n\nreturn msg;",
535
- "outputs": 1,
536
- "noerr": 0,
537
- "initialize": "",
538
- "finalize": "",
539
- "libs": [],
540
- "x": 1739.5001335144043,
541
- "y": 454.0000858306885,
542
- "wires": [
543
- [
544
- "1f9f2326b57594a8"
545
- ]
546
- ]
547
- },
548
- {
549
- "id": "44d58fb29ae6f47c",
550
- "type": "http in",
551
- "z": "6bab6804614c2612",
552
- "name": "",
553
- "url": "/api",
554
- "method": "get",
555
- "upload": false,
556
- "swaggerDoc": "",
557
- "x": 160,
558
- "y": 1055.0002145767212,
559
- "wires": [
560
- [
561
- "e7a195c6ac26cb20"
562
- ]
563
- ]
564
- },
565
- {
566
- "id": "18ca9448fedf3cad",
567
- "type": "switch",
568
- "z": "6bab6804614c2612",
569
- "name": "users handler",
570
- "property": "req.params.path2",
571
- "propertyType": "msg",
572
- "rules": [
573
- {
574
- "t": "eq",
575
- "v": "all",
576
- "vt": "str"
577
- },
578
- {
579
- "t": "regex",
580
- "v": "^[a-z0-9-]{36}$",
581
- "vt": "str",
582
- "case": true
583
- },
584
- {
585
- "t": "else"
586
- }
587
- ],
588
- "checkall": "false",
589
- "repair": false,
590
- "outputs": 3,
591
- "x": 1400.89599609375,
592
- "y": 395.0001554489136,
593
- "wires": [
594
- [
595
- "1d5f6b6492a9696d"
596
- ],
597
- [
598
- "b90166b1f2c9cf90"
599
- ],
600
- [
601
- "7a7fe72c74429d2d"
602
- ]
603
- ]
604
- },
605
- {
606
- "id": "1d5f6b6492a9696d",
607
- "type": "link out",
608
- "z": "6bab6804614c2612",
609
- "name": "link out 7",
610
- "mode": "link",
611
- "links": [
612
- "48669bbc4153ba14"
613
- ],
614
- "x": 1618.500244140625,
615
- "y": 382.0001525878906,
616
- "wires": []
617
- },
618
- {
619
- "id": "72022eecbbf00bae",
620
- "type": "function",
621
- "z": "6bab6804614c2612",
622
- "name": "not implemented",
623
- "func": "var pa = msg.req.params;\n\nmsg.statusCode = 501;\nmsg.payload = JSON.stringify({\n status: \"not_implemented\",\n msg: \"TODO functionality\",\n path: msg.req.originalUrl\n})\nreturn msg;",
624
- "outputs": 1,
625
- "noerr": 0,
626
- "initialize": "",
627
- "finalize": "",
628
- "libs": [],
629
- "x": 2472.0001831054688,
630
- "y": 813.0002365112305,
631
- "wires": [
632
- [
633
- "bda4160f097a2c6e"
634
- ]
635
- ]
636
- },
637
- {
638
- "id": "f76d97aba04cbac2",
639
- "type": "http in",
640
- "z": "6bab6804614c2612",
641
- "name": "",
642
- "url": "/api/:path1",
643
- "method": "post",
644
- "upload": false,
645
- "swaggerDoc": "",
646
- "x": 180,
647
- "y": 681.0000400543213,
648
- "wires": [
649
- [
650
- "7dce3e0bfeda5ea8"
651
- ]
652
- ]
653
- },
654
- {
655
- "id": "6afac68ec0ec475b",
656
- "type": "http in",
657
- "z": "6bab6804614c2612",
658
- "name": "",
659
- "url": "/api/:path1/:path2",
660
- "method": "post",
661
- "upload": false,
662
- "swaggerDoc": "",
663
- "x": 210,
664
- "y": 621.0000610351562,
665
- "wires": [
666
- [
667
- "7dce3e0bfeda5ea8"
668
- ]
669
- ]
670
- },
671
- {
672
- "id": "51486da0f5b903f2",
673
- "type": "http in",
674
- "z": "6bab6804614c2612",
675
- "name": "",
676
- "url": "/api/:path1/:path2/:path3",
677
- "method": "post",
678
- "upload": false,
679
- "swaggerDoc": "",
680
- "x": 230,
681
- "y": 570.0000610351562,
682
- "wires": [
683
- [
684
- "7dce3e0bfeda5ea8"
685
- ]
686
- ]
687
- },
688
- {
689
- "id": "edb8c2587e0be726",
690
- "type": "http in",
691
- "z": "6bab6804614c2612",
692
- "name": "",
693
- "url": "/api",
694
- "method": "post",
695
- "upload": false,
696
- "swaggerDoc": "",
697
- "x": 160,
698
- "y": 724.0000982284546,
699
- "wires": [
700
- [
701
- "e7a195c6ac26cb20"
702
- ]
703
- ]
704
- },
705
- {
706
- "id": "72ba23fc668f9ff3",
707
- "type": "switch",
708
- "z": "6bab6804614c2612",
709
- "name": "method",
710
- "property": "req.method",
711
- "propertyType": "msg",
712
- "rules": [
713
- {
714
- "t": "eq",
715
- "v": "GET",
716
- "vt": "str"
717
- },
718
- {
719
- "t": "eq",
720
- "v": "POST",
721
- "vt": "str"
722
- },
723
- {
724
- "t": "else"
725
- }
726
- ],
727
- "checkall": "false",
728
- "repair": false,
729
- "outputs": 3,
730
- "x": 851.8960189819336,
731
- "y": 1029.8895378112793,
732
- "wires": [
733
- [
734
- "2324639fdcd82313"
735
- ],
736
- [
737
- "30f7cbe1e25e67a1"
738
- ],
739
- [
740
- "e1b0724e61924dba"
741
- ]
742
- ]
743
- },
744
- {
745
- "id": "ecbf7d99ebf40ae6",
746
- "type": "link out",
747
- "z": "6bab6804614c2612",
748
- "name": "post new offer",
749
- "mode": "link",
750
- "links": [
751
- "25e513171ea468df"
752
- ],
753
- "x": 1631.500244140625,
754
- "y": 758.4242076873779,
755
- "wires": []
756
- },
757
- {
758
- "id": "2324639fdcd82313",
759
- "type": "switch",
760
- "z": "6bab6804614c2612",
761
- "name": "GET handler",
762
- "property": "req.params.path1",
763
- "propertyType": "msg",
764
- "rules": [
765
- {
766
- "t": "eq",
767
- "v": "auctions",
768
- "vt": "str"
769
- },
770
- {
771
- "t": "eq",
772
- "v": "users",
773
- "vt": "str"
774
- },
775
- {
776
- "t": "eq",
777
- "v": "proposal",
778
- "vt": "str"
779
- },
780
- {
781
- "t": "eq",
782
- "v": "bid",
783
- "vt": "str"
784
- },
785
- {
786
- "t": "else"
787
- }
788
- ],
789
- "checkall": "false",
790
- "repair": false,
791
- "outputs": 5,
792
- "x": 1105.8958320617676,
793
- "y": 507.88905239105225,
794
- "wires": [
795
- [
796
- "d2e344f5e0f43775"
797
- ],
798
- [
799
- "18ca9448fedf3cad"
800
- ],
801
- [
802
- "1229cb58e46b1655"
803
- ],
804
- [
805
- "8e43e02fa1211f7a"
806
- ],
807
- [
808
- "9161b8e24fc9b96b"
809
- ]
810
- ]
811
- },
812
- {
813
- "id": "7fea0bddb82386e1",
814
- "type": "switch",
815
- "z": "6bab6804614c2612",
816
- "name": "proposal handler",
817
- "property": "req.params.path2",
818
- "propertyType": "msg",
819
- "rules": [
820
- {
821
- "t": "eq",
822
- "v": "new",
823
- "vt": "str"
824
- },
825
- {
826
- "t": "eq",
827
- "v": "make_decision",
828
- "vt": "str"
829
- },
830
- {
831
- "t": "regex",
832
- "v": "^[a-z0-9-]{36}$",
833
- "vt": "str",
834
- "case": true
835
- },
836
- {
837
- "t": "else"
838
- }
839
- ],
840
- "checkall": "false",
841
- "repair": false,
842
- "outputs": 4,
843
- "x": 1399.8959503173828,
844
- "y": 810.8891887664795,
845
- "wires": [
846
- [
847
- "ecbf7d99ebf40ae6"
848
- ],
849
- [
850
- "22f7cee45229ccb3"
851
- ],
852
- [
853
- "72022eecbbf00bae"
854
- ],
855
- [
856
- "2b1fc6169ecbb5cd"
857
- ]
858
- ]
859
- },
860
- {
861
- "id": "7033b13b3b260799",
862
- "type": "debug",
863
- "z": "6bab6804614c2612",
864
- "name": "NOT FOUND",
865
- "active": true,
866
- "tosidebar": true,
867
- "console": false,
868
- "tostatus": false,
869
- "complete": "true",
870
- "targetType": "full",
871
- "statusVal": "",
872
- "statusType": "auto",
873
- "x": 1269.437744140625,
874
- "y": 1397.1737060546875,
875
- "wires": []
876
- },
877
- {
878
- "id": "95be9dbff7197b8d",
879
- "type": "switch",
880
- "z": "6bab6804614c2612",
881
- "name": "bid handler",
882
- "property": "req.params.path2",
883
- "propertyType": "msg",
884
- "rules": [
885
- {
886
- "t": "eq",
887
- "v": "new",
888
- "vt": "str"
889
- },
890
- {
891
- "t": "else"
892
- }
893
- ],
894
- "checkall": "false",
895
- "repair": false,
896
- "outputs": 2,
897
- "x": 1419.8959503173828,
898
- "y": 917.8891220092773,
899
- "wires": [
900
- [
901
- "f6d9da295c4da5e2"
902
- ],
903
- [
904
- "2b1fc6169ecbb5cd"
905
- ]
906
- ]
907
- },
908
- {
909
- "id": "f6d9da295c4da5e2",
910
- "type": "link out",
911
- "z": "6bab6804614c2612",
912
- "name": "post new bid",
913
- "mode": "link",
914
- "links": [
915
- "a1071b9d620c40d4"
916
- ],
917
- "x": 1631.500244140625,
918
- "y": 911.4239501953125,
919
- "wires": []
920
- },
921
- {
922
- "id": "c22718ee962f7f66",
923
- "type": "switch",
924
- "z": "6bab6804614c2612",
925
- "name": "user handler",
926
- "property": "req.params.path2",
927
- "propertyType": "msg",
928
- "rules": [
929
- {
930
- "t": "eq",
931
- "v": "send",
932
- "vt": "str"
933
- },
934
- {
935
- "t": "eq",
936
- "v": "register",
937
- "vt": "str"
938
- },
939
- {
940
- "t": "eq",
941
- "v": "verify",
942
- "vt": "str"
943
- },
944
- {
945
- "t": "eq",
946
- "v": "login",
947
- "vt": "str"
948
- },
949
- {
950
- "t": "eq",
951
- "v": "dontspamme",
952
- "vt": "str"
953
- },
954
- {
955
- "t": "else"
956
- }
957
- ],
958
- "checkall": "false",
959
- "repair": false,
960
- "outputs": 6,
961
- "x": 1419.8959503173828,
962
- "y": 996.8890571594238,
963
- "wires": [
964
- [
965
- "bd67c779e9aa37a5"
966
- ],
967
- [
968
- "12263fbf60fc80ed"
969
- ],
970
- [
971
- "be657c29d3425c5c"
972
- ],
973
- [
974
- "16ba48ebfc74abfe"
975
- ],
976
- [
977
- "f92db90af07d277d"
978
- ],
979
- [
980
- "2b1fc6169ecbb5cd"
981
- ]
982
- ]
983
- },
984
- {
985
- "id": "12263fbf60fc80ed",
986
- "type": "link out",
987
- "z": "6bab6804614c2612",
988
- "name": "link out 11",
989
- "mode": "link",
990
- "links": [
991
- "142126c28ee25935"
992
- ],
993
- "x": 1631.500244140625,
994
- "y": 956.4171142578125,
995
- "wires": []
996
- },
997
- {
998
- "id": "67a6c6d109f9d6ee",
999
- "type": "link out",
1000
- "z": "6bab6804614c2612",
1001
- "name": "link out 12",
1002
- "mode": "link",
1003
- "links": [
1004
- "ea533ff22bb9c6f9"
1005
- ],
1006
- "x": 2167.5,
1007
- "y": 900.41357421875,
1008
- "wires": []
1009
- },
1010
- {
1011
- "id": "425572e5387b5464",
1012
- "type": "http in",
1013
- "z": "6bab6804614c2612",
1014
- "name": "",
1015
- "url": "/api/:path1/:path2/:path3/:path4",
1016
- "method": "post",
1017
- "upload": false,
1018
- "swaggerDoc": "",
1019
- "x": 250,
1020
- "y": 520.8888721466064,
1021
- "wires": [
1022
- [
1023
- "7dce3e0bfeda5ea8"
1024
- ]
1025
- ]
1026
- },
1027
- {
1028
- "id": "bd67c779e9aa37a5",
1029
- "type": "switch",
1030
- "z": "6bab6804614c2612",
1031
- "name": "/user/send handler",
1032
- "property": "req.params.path3",
1033
- "propertyType": "msg",
1034
- "rules": [
1035
- {
1036
- "t": "eq",
1037
- "v": "verify",
1038
- "vt": "str"
1039
- },
1040
- {
1041
- "t": "else"
1042
- }
1043
- ],
1044
- "checkall": "false",
1045
- "repair": false,
1046
- "outputs": 2,
1047
- "x": 1946.896240234375,
1048
- "y": 873.88916015625,
1049
- "wires": [
1050
- [
1051
- "2d3b572634f410e7"
1052
- ],
1053
- [
1054
- "9ae5a4ddd9d2ec17"
1055
- ]
1056
- ]
1057
- },
1058
- {
1059
- "id": "2d3b572634f410e7",
1060
- "type": "switch",
1061
- "z": "6bab6804614c2612",
1062
- "name": "/user/send/verify handler",
1063
- "property": "req.params.path4",
1064
- "propertyType": "msg",
1065
- "rules": [
1066
- {
1067
- "t": "eq",
1068
- "v": "email",
1069
- "vt": "str"
1070
- },
1071
- {
1072
- "t": "else"
1073
- }
1074
- ],
1075
- "checkall": "false",
1076
- "repair": false,
1077
- "outputs": 2,
1078
- "x": 2445.8964233398438,
1079
- "y": 864.889102935791,
1080
- "wires": [
1081
- [
1082
- "4969a16e91003ab7"
1083
- ],
1084
- [
1085
- "8a48031b3d517039"
1086
- ]
1087
- ]
1088
- },
1089
- {
1090
- "id": "4969a16e91003ab7",
1091
- "type": "link out",
1092
- "z": "6bab6804614c2612",
1093
- "name": "link out 13",
1094
- "mode": "link",
1095
- "links": [
1096
- "30f35c3706f7e73a"
1097
- ],
1098
- "x": 2728.895751953125,
1099
- "y": 858.4169311523438,
1100
- "wires": []
1101
- },
1102
- {
1103
- "id": "f956209cbf4d46fc",
1104
- "type": "http in",
1105
- "z": "6bab6804614c2612",
1106
- "name": "",
1107
- "url": "/api/:path1/:path2/:path3/:path4",
1108
- "method": "get",
1109
- "upload": false,
1110
- "swaggerDoc": "",
1111
- "x": 250,
1112
- "y": 857.88916015625,
1113
- "wires": [
1114
- [
1115
- "7dce3e0bfeda5ea8"
1116
- ]
1117
- ]
1118
- },
1119
- {
1120
- "id": "16ba48ebfc74abfe",
1121
- "type": "switch",
1122
- "z": "6bab6804614c2612",
1123
- "name": "/user/login handler",
1124
- "property": "req.params.path3",
1125
- "propertyType": "msg",
1126
- "rules": [
1127
- {
1128
- "t": "eq",
1129
- "v": "email",
1130
- "vt": "str"
1131
- },
1132
- {
1133
- "t": "eq",
1134
- "v": "loginlink",
1135
- "vt": "str"
1136
- },
1137
- {
1138
- "t": "else"
1139
- }
1140
- ],
1141
- "checkall": "false",
1142
- "repair": false,
1143
- "outputs": 3,
1144
- "x": 1948.896728515625,
1145
- "y": 1035.889536857605,
1146
- "wires": [
1147
- [
1148
- "f0be3c092017e815"
1149
- ],
1150
- [
1151
- "bd62767f7ff71151"
1152
- ],
1153
- [
1154
- "9ae5a4ddd9d2ec17"
1155
- ]
1156
- ]
1157
- },
1158
- {
1159
- "id": "665ee29e0b215e86",
1160
- "type": "comment",
1161
- "z": "6bab6804614c2612",
1162
- "name": ":path1 Handlers",
1163
- "info": "",
1164
- "x": 1065.4445419311523,
1165
- "y": 193.7535104751587,
1166
- "wires": []
1167
- },
1168
- {
1169
- "id": "3ab64107f8cdd28c",
1170
- "type": "comment",
1171
- "z": "6bab6804614c2612",
1172
- "name": ":path2 Handlers",
1173
- "info": "",
1174
- "x": 1415.895751953125,
1175
- "y": 193.7535104751587,
1176
- "wires": []
1177
- },
1178
- {
1179
- "id": "a3557dcfe0c75094",
1180
- "type": "comment",
1181
- "z": "6bab6804614c2612",
1182
- "name": ":path3 Handlers",
1183
- "info": "",
1184
- "x": 1955.896011352539,
1185
- "y": 193.7535104751587,
1186
- "wires": []
1187
- },
1188
- {
1189
- "id": "d35d554efa6ab3a3",
1190
- "type": "comment",
1191
- "z": "6bab6804614c2612",
1192
- "name": ":path4 Handlers",
1193
- "info": "",
1194
- "x": 2455.895980834961,
1195
- "y": 193.7535104751587,
1196
- "wires": []
1197
- },
1198
- {
1199
- "id": "f0be3c092017e815",
1200
- "type": "switch",
1201
- "z": "6bab6804614c2612",
1202
- "name": "/user/login/email handler",
1203
- "property": "req.params.path4",
1204
- "propertyType": "msg",
1205
- "rules": [
1206
- {
1207
- "t": "istype",
1208
- "v": "undefined",
1209
- "vt": "undefined"
1210
- },
1211
- {
1212
- "t": "eq",
1213
- "v": "send",
1214
- "vt": "str"
1215
- },
1216
- {
1217
- "t": "eq",
1218
- "v": "verify",
1219
- "vt": "str"
1220
- },
1221
- {
1222
- "t": "else"
1223
- }
1224
- ],
1225
- "checkall": "false",
1226
- "repair": false,
1227
- "outputs": 4,
1228
- "x": 2451.89599609375,
1229
- "y": 1019.8892211914062,
1230
- "wires": [
1231
- [
1232
- "eca71e1253370760"
1233
- ],
1234
- [
1235
- "dce7b5d86c4942c0"
1236
- ],
1237
- [
1238
- "7858cc0284b46f93"
1239
- ],
1240
- [
1241
- "8a48031b3d517039"
1242
- ]
1243
- ]
1244
- },
1245
- {
1246
- "id": "eca71e1253370760",
1247
- "type": "link out",
1248
- "z": "6bab6804614c2612",
1249
- "name": "link out 14",
1250
- "mode": "link",
1251
- "links": [
1252
- "8fb5538bb33154af"
1253
- ],
1254
- "x": 2728.895751953125,
1255
- "y": 960.4204511642456,
1256
- "wires": []
1257
- },
1258
- {
1259
- "id": "dce7b5d86c4942c0",
1260
- "type": "link out",
1261
- "z": "6bab6804614c2612",
1262
- "name": "link out 15",
1263
- "mode": "link",
1264
- "links": [
1265
- "654a727d5e73414e"
1266
- ],
1267
- "x": 2728.895751953125,
1268
- "y": 1015.8891143798828,
1269
- "wires": []
1270
- },
1271
- {
1272
- "id": "7858cc0284b46f93",
1273
- "type": "link out",
1274
- "z": "6bab6804614c2612",
1275
- "name": "link out 16",
1276
- "mode": "link",
1277
- "links": [
1278
- "317a9744536713d7"
1279
- ],
1280
- "x": 2728.895751953125,
1281
- "y": 1062.8891620635986,
1282
- "wires": []
1283
- },
1284
- {
1285
- "id": "8e43e02fa1211f7a",
1286
- "type": "switch",
1287
- "z": "6bab6804614c2612",
1288
- "name": "bid handler",
1289
- "property": "req.params.path2",
1290
- "propertyType": "msg",
1291
- "rules": [
1292
- {
1293
- "t": "regex",
1294
- "v": "^[a-z0-9-]{36}$",
1295
- "vt": "str",
1296
- "case": false
1297
- },
1298
- {
1299
- "t": "else"
1300
- }
1301
- ],
1302
- "checkall": "false",
1303
- "repair": false,
1304
- "outputs": 2,
1305
- "x": 1410.89599609375,
1306
- "y": 521.8892211914062,
1307
- "wires": [
1308
- [
1309
- "da4018f1e5b957f4"
1310
- ],
1311
- [
1312
- "7a7fe72c74429d2d"
1313
- ]
1314
- ]
1315
- },
1316
- {
1317
- "id": "da4018f1e5b957f4",
1318
- "type": "function",
1319
- "z": "6bab6804614c2612",
1320
- "name": "set uuid parameter",
1321
- "func": "msg.req.params[\"uuid\"] = msg.req.params.path2;\n\nreturn msg;",
1322
- "outputs": 1,
1323
- "noerr": 0,
1324
- "initialize": "",
1325
- "finalize": "",
1326
- "libs": [],
1327
- "x": 1734.34033203125,
1328
- "y": 512.8890075683594,
1329
- "wires": [
1330
- [
1331
- "bc24ba877367af6d"
1332
- ]
1333
- ]
1334
- },
1335
- {
1336
- "id": "bc24ba877367af6d",
1337
- "type": "link out",
1338
- "z": "6bab6804614c2612",
1339
- "name": "link out 18",
1340
- "mode": "link",
1341
- "links": [
1342
- "5454979b74efae5c"
1343
- ],
1344
- "x": 1887.8960590362549,
1345
- "y": 513.4203195571899,
1346
- "wires": []
1347
- },
1348
- {
1349
- "id": "bd62767f7ff71151",
1350
- "type": "link out",
1351
- "z": "6bab6804614c2612",
1352
- "name": "link out 30",
1353
- "mode": "link",
1354
- "links": [
1355
- "3723b83281660ef9"
1356
- ],
1357
- "x": 2167.5,
1358
- "y": 1036.8682661056519,
1359
- "wires": []
1360
- },
1361
- {
1362
- "id": "be657c29d3425c5c",
1363
- "type": "switch",
1364
- "z": "6bab6804614c2612",
1365
- "name": "/user/verify handler",
1366
- "property": "req.params.path3",
1367
- "propertyType": "msg",
1368
- "rules": [
1369
- {
1370
- "t": "istype",
1371
- "v": "undefined",
1372
- "vt": "undefined"
1373
- },
1374
- {
1375
- "t": "eq",
1376
- "v": "resend",
1377
- "vt": "str"
1378
- },
1379
- {
1380
- "t": "eq",
1381
- "v": "linkdata",
1382
- "vt": "str"
1383
- },
1384
- {
1385
- "t": "else"
1386
- }
1387
- ],
1388
- "checkall": "false",
1389
- "repair": false,
1390
- "outputs": 4,
1391
- "x": 1946.5625534057617,
1392
- "y": 949.4445123672485,
1393
- "wires": [
1394
- [
1395
- "67a6c6d109f9d6ee"
1396
- ],
1397
- [
1398
- "2c1745a0ae9a4dd5"
1399
- ],
1400
- [
1401
- "1bbf79a70fcd216c"
1402
- ],
1403
- [
1404
- "9ae5a4ddd9d2ec17"
1405
- ]
1406
- ]
1407
- },
1408
- {
1409
- "id": "1bbf79a70fcd216c",
1410
- "type": "link out",
1411
- "z": "6bab6804614c2612",
1412
- "name": "link out 31",
1413
- "mode": "link",
1414
- "links": [
1415
- "87bcec7ef2a78fca"
1416
- ],
1417
- "x": 2167.5,
1418
- "y": 982.9758911132812,
1419
- "wires": []
1420
- },
1421
- {
1422
- "id": "bda4160f097a2c6e",
1423
- "type": "http response",
1424
- "z": "6bab6804614c2612",
1425
- "name": "",
1426
- "statusCode": "",
1427
- "headers": {},
1428
- "x": 2660.0072479248047,
1429
- "y": 813.7777948379517,
1430
- "wires": []
1431
- },
1432
- {
1433
- "id": "7dce3e0bfeda5ea8",
1434
- "type": "function",
1435
- "z": "6bab6804614c2612",
1436
- "name": "check auth",
1437
- "func": "\nif (msg.req.get(\"X-Auth\") == env.get(\"API_TOKEN\")) {\n msg.status = \"ok\"\n} else {\n msg.status = \"auth token mismatch\";\n msg.req_token = msg.req.get(\"X-Auth\");\n msg.our_token = env.get(\"API_TOKEN\");\n}\nreturn msg;",
1438
- "outputs": 1,
1439
- "noerr": 0,
1440
- "initialize": "",
1441
- "finalize": "",
1442
- "libs": [],
1443
- "x": 654.4446411132812,
1444
- "y": 852.7995796203613,
1445
- "wires": [
1446
- [
1447
- "2e37bc0b86b9c0a7",
1448
- "9bd7b0fa14d4eac3"
1449
- ]
1450
- ]
1451
- },
1452
- {
1453
- "id": "2e37bc0b86b9c0a7",
1454
- "type": "switch",
1455
- "z": "6bab6804614c2612",
1456
- "name": "",
1457
- "property": "status",
1458
- "propertyType": "msg",
1459
- "rules": [
1460
- {
1461
- "t": "eq",
1462
- "v": "ok",
1463
- "vt": "str"
1464
- },
1465
- {
1466
- "t": "else"
1467
- }
1468
- ],
1469
- "checkall": "false",
1470
- "repair": false,
1471
- "outputs": 2,
1472
- "x": 447.0078125,
1473
- "y": 1038.1563110351562,
1474
- "wires": [
1475
- [
1476
- "023380a141fabe09"
1477
- ],
1478
- [
1479
- "e1b0724e61924dba"
1480
- ]
1481
- ]
1482
- },
1483
- {
1484
- "id": "9bd7b0fa14d4eac3",
1485
- "type": "debug",
1486
- "z": "6bab6804614c2612",
1487
- "d": true,
1488
- "name": "AUTH DEBUG",
1489
- "active": false,
1490
- "tosidebar": true,
1491
- "console": false,
1492
- "tostatus": false,
1493
- "complete": "true",
1494
- "targetType": "full",
1495
- "statusVal": "",
1496
- "statusType": "auto",
1497
- "x": 853.4479522705078,
1498
- "y": 747.2743,
1499
- "wires": []
1500
- },
1501
- {
1502
- "id": "22f7cee45229ccb3",
1503
- "type": "link out",
1504
- "z": "6bab6804614c2612",
1505
- "name": "link out 33",
1506
- "mode": "link",
1507
- "links": [
1508
- "2349281462e6046f"
1509
- ],
1510
- "x": 1631.500244140625,
1511
- "y": 797.5244140625,
1512
- "wires": []
1513
- },
1514
- {
1515
- "id": "023380a141fabe09",
1516
- "type": "change",
1517
- "z": "6bab6804614c2612",
1518
- "name": "",
1519
- "rules": [
1520
- {
1521
- "t": "set",
1522
- "p": "origpayload",
1523
- "pt": "msg",
1524
- "to": "payload",
1525
- "tot": "msg",
1526
- "dc": true
1527
- }
1528
- ],
1529
- "action": "",
1530
- "property": "",
1531
- "from": "",
1532
- "to": "",
1533
- "reg": false,
1534
- "x": 651,
1535
- "y": 1031,
1536
- "wires": [
1537
- [
1538
- "72ba23fc668f9ff3"
1539
- ]
1540
- ]
1541
- },
1542
- {
1543
- "id": "f92db90af07d277d",
1544
- "type": "link out",
1545
- "z": "6bab6804614c2612",
1546
- "name": "link out 38",
1547
- "mode": "link",
1548
- "links": [
1549
- "ab0aaf85f16dbce9"
1550
- ],
1551
- "x": 1631.500244140625,
1552
- "y": 1038,
1553
- "wires": []
1554
- },
1555
- {
1556
- "id": "8646c460694154a1",
1557
- "type": "http in",
1558
- "z": "6bab6804614c2612",
1559
- "name": "",
1560
- "url": "/:path1",
1561
- "method": "post",
1562
- "upload": false,
1563
- "swaggerDoc": "",
1564
- "x": 170,
1565
- "y": 779.0001029968262,
1566
- "wires": [
1567
- [
1568
- "e7a195c6ac26cb20"
1569
- ]
1570
- ]
1571
- },
1572
- {
1573
- "id": "a559d962c2f36fd7",
1574
- "type": "http in",
1575
- "z": "6bab6804614c2612",
1576
- "name": "",
1577
- "url": "/:path1",
1578
- "method": "get",
1579
- "upload": false,
1580
- "swaggerDoc": "",
1581
- "x": 170,
1582
- "y": 1099.000244140625,
1583
- "wires": [
1584
- [
1585
- "e7a195c6ac26cb20"
1586
- ]
1587
- ]
1588
- },
1589
- {
1590
- "id": "85cea02b9059e748",
1591
- "type": "switch",
1592
- "z": "6bab6804614c2612",
1593
- "name": "/users/:uuid/ handler",
1594
- "property": "req.params.path3",
1595
- "propertyType": "msg",
1596
- "rules": [
1597
- {
1598
- "t": "istype",
1599
- "v": "undefined",
1600
- "vt": "undefined"
1601
- },
1602
- {
1603
- "t": "eq",
1604
- "v": "proposals",
1605
- "vt": "str"
1606
- },
1607
- {
1608
- "t": "else"
1609
- }
1610
- ],
1611
- "checkall": "false",
1612
- "repair": false,
1613
- "outputs": 3,
1614
- "x": 1958.0000114440918,
1615
- "y": 399.00005531311035,
1616
- "wires": [
1617
- [
1618
- "e876efb8d4a9f5fb"
1619
- ],
1620
- [
1621
- "65a118bcc5a773cd"
1622
- ],
1623
- [
1624
- "f82076d2d8926cfb"
1625
- ]
1626
- ]
1627
- },
1628
- {
1629
- "id": "b90166b1f2c9cf90",
1630
- "type": "function",
1631
- "z": "6bab6804614c2612",
1632
- "name": "set uuid parameter",
1633
- "func": "msg.req.params[\"uuid\"] = msg.req.params.path2;\n\nreturn msg;",
1634
- "outputs": 1,
1635
- "noerr": 0,
1636
- "initialize": "",
1637
- "finalize": "",
1638
- "libs": [],
1639
- "x": 1741.0000114440918,
1640
- "y": 398.00005531311035,
1641
- "wires": [
1642
- [
1643
- "85cea02b9059e748"
1644
- ]
1645
- ]
1646
- },
1647
- {
1648
- "id": "65a118bcc5a773cd",
1649
- "type": "link out",
1650
- "z": "6bab6804614c2612",
1651
- "name": "link out 42",
1652
- "mode": "link",
1653
- "links": [
1654
- "66e4187b8646b82e"
1655
- ],
1656
- "x": 2224.500011444092,
1657
- "y": 422.00005531311035,
1658
- "wires": []
1659
- },
1660
- {
1661
- "id": "e876efb8d4a9f5fb",
1662
- "type": "link out",
1663
- "z": "6bab6804614c2612",
1664
- "name": "link out 43",
1665
- "mode": "link",
1666
- "links": [
1667
- "09089e06e0208be6"
1668
- ],
1669
- "x": 2224.500011444092,
1670
- "y": 385.00005531311035,
1671
- "wires": []
1672
- },
1673
- {
1674
- "id": "2c1745a0ae9a4dd5",
1675
- "type": "link out",
1676
- "z": "6bab6804614c2612",
1677
- "name": "link out 61",
1678
- "mode": "link",
1679
- "links": [
1680
- "6aa9ebe23a27c971",
1681
- "341d12e103dc8526"
1682
- ],
1683
- "x": 2167.5,
1684
- "y": 942,
1685
- "wires": []
1686
- },
1687
- {
1688
- "id": "8d6fee12e9fe1d4e",
1689
- "type": "Seeker",
1690
- "z": "6bab6804614c2612",
1691
- "name": "",
1692
- "x": 281,
1693
- "y": 234,
1694
- "wires": [
1695
- [
1696
- "7dce3e0bfeda5ea8"
1697
- ]
1698
- ]
1699
- },
1700
- {
1701
- "id": "e1b0724e61924dba",
1702
- "type": "function",
1703
- "z": "6bab6804614c2612",
1704
- "g": "7a6324f7fd2436d1",
1705
- "name": "not found",
1706
- "func": "msg.statusCode = 404;\nmsg.payload = {\n status: \"not_found\",\n msg: \"page not found\",\n path: msg.req.originalUrl\n};\nreturn msg;",
1707
- "outputs": 1,
1708
- "noerr": 0,
1709
- "initialize": "",
1710
- "finalize": "",
1711
- "libs": [],
1712
- "x": 1076.500244140625,
1713
- "y": 1264.4265775680542,
1714
- "wires": [
1715
- [
1716
- "c67da00652f9e5da",
1717
- "7033b13b3b260799"
1718
- ]
1719
- ]
1720
- },
1721
- {
1722
- "id": "caf61359be50bf6f",
1723
- "type": "link in",
1724
- "z": "6bab6804614c2612",
1725
- "g": "7a6324f7fd2436d1",
1726
- "name": "API NOT FOUND",
1727
- "links": [
1728
- "e7a195c6ac26cb20",
1729
- "7a7fe72c74429d2d",
1730
- "2b1fc6169ecbb5cd",
1731
- "8a48031b3d517039",
1732
- "9ae5a4ddd9d2ec17",
1733
- "16ce1ec17155ded0",
1734
- "f82076d2d8926cfb",
1735
- "7db6fb278287c73c",
1736
- "9161b8e24fc9b96b"
1737
- ],
1738
- "x": 750.4376831054688,
1739
- "y": 1264.4265775680542,
1740
- "wires": [
1741
- [
1742
- "e1b0724e61924dba"
1743
- ]
1744
- ]
1745
- },
1746
- {
1747
- "id": "2b1fc6169ecbb5cd",
1748
- "type": "link out",
1749
- "z": "6bab6804614c2612",
1750
- "g": "7a6324f7fd2436d1",
1751
- "name": "NOT FOUND",
1752
- "mode": "link",
1753
- "links": [
1754
- "caf61359be50bf6f"
1755
- ],
1756
- "x": 1576.4453125,
1757
- "y": 1264.4265775680542,
1758
- "wires": []
1759
- },
1760
- {
1761
- "id": "8a48031b3d517039",
1762
- "type": "link out",
1763
- "z": "6bab6804614c2612",
1764
- "g": "7a6324f7fd2436d1",
1765
- "name": "NOT FOUND",
1766
- "mode": "link",
1767
- "links": [
1768
- "caf61359be50bf6f"
1769
- ],
1770
- "x": 2665.896240234375,
1771
- "y": 1264.4265775680542,
1772
- "wires": []
1773
- },
1774
- {
1775
- "id": "9ae5a4ddd9d2ec17",
1776
- "type": "link out",
1777
- "z": "6bab6804614c2612",
1778
- "g": "7a6324f7fd2436d1",
1779
- "name": "NOT FOUND",
1780
- "mode": "link",
1781
- "links": [
1782
- "caf61359be50bf6f"
1783
- ],
1784
- "x": 2120.8958740234375,
1785
- "y": 1264.4265775680542,
1786
- "wires": []
1787
- },
1788
- {
1789
- "id": "7db6fb278287c73c",
1790
- "type": "link out",
1791
- "z": "6bab6804614c2612",
1792
- "g": "7a6324f7fd2436d1",
1793
- "name": "NOT FOUND",
1794
- "mode": "link",
1795
- "links": [
1796
- "caf61359be50bf6f"
1797
- ],
1798
- "x": 1263,
1799
- "y": 1264.4265775680542,
1800
- "wires": []
1801
- },
1802
- {
1803
- "id": "e7a195c6ac26cb20",
1804
- "type": "link out",
1805
- "z": "6bab6804614c2612",
1806
- "g": "7a6324f7fd2436d1",
1807
- "name": "link out 9",
1808
- "mode": "link",
1809
- "links": [
1810
- "caf61359be50bf6f"
1811
- ],
1812
- "x": 166.4445104598999,
1813
- "y": 1264.4265775680542,
1814
- "wires": []
1815
- },
1816
- {
1817
- "id": "7a7fe72c74429d2d",
1818
- "type": "link out",
1819
- "z": "6bab6804614c2612",
1820
- "g": "3177d6c9a84b07ad",
1821
- "name": "link out 10",
1822
- "mode": "link",
1823
- "links": [
1824
- "caf61359be50bf6f"
1825
- ],
1826
- "x": 1578.500244140625,
1827
- "y": 652.444580078125,
1828
- "wires": []
1829
- },
1830
- {
1831
- "id": "f82076d2d8926cfb",
1832
- "type": "link out",
1833
- "z": "6bab6804614c2612",
1834
- "g": "3177d6c9a84b07ad",
1835
- "name": "link out 41",
1836
- "mode": "link",
1837
- "links": [
1838
- "caf61359be50bf6f"
1839
- ],
1840
- "x": 2120.5,
1841
- "y": 652.444580078125,
1842
- "wires": []
1843
- },
1844
- {
1845
- "id": "9161b8e24fc9b96b",
1846
- "type": "link out",
1847
- "z": "6bab6804614c2612",
1848
- "g": "3177d6c9a84b07ad",
1849
- "name": "link out 44",
1850
- "mode": "link",
1851
- "links": [
1852
- "caf61359be50bf6f"
1853
- ],
1854
- "x": 1259,
1855
- "y": 652.444580078125,
1856
- "wires": []
1857
- },
1858
- {
1859
- "id": "e372772cfbb59b9c",
1860
- "type": "postgresql",
1861
- "z": "6bab6804614c2612",
1862
- "g": "9969b30d869201d8",
1863
- "name": "update user_verification set email_sent_at",
1864
- "query": "UPDATE user_verification\nset email_sent_at = NOW()\nwhere user_uuid = '{{ msg.payload.user_uuid }}'\nand code = '{{ msg.payload.verification_code }}'\nreturning user_uuid\n;",
1865
- "postgreSQLConfig": "85672f28419095b4",
1866
- "split": false,
1867
- "rowsPerMsg": 1,
1868
- "outputs": 1,
1869
- "x": 340,
1870
- "y": 1748,
1871
- "wires": [
1872
- [
1873
- "a751fedc12c69357",
1874
- "6354755fd1859629"
1875
- ]
1876
- ]
1877
- },
1878
- {
1879
- "id": "7e1fdd1358625e6b",
1880
- "type": "catch",
1881
- "z": "6bab6804614c2612",
1882
- "g": "9969b30d869201d8",
3
+ "id": "644d61288c671091",
4
+ "type": "group",
5
+ "z": "139a816449acd89f",
6
+ "name": "this flow needs refactoring",
7
+ "style": {
8
+ "label": true
9
+ },
10
+ "nodes": [
11
+ "a9f18b308a918307",
12
+ "24cd5ce1ca3f52d7",
13
+ "c108d845246cf5d8",
14
+ "73729a40176391b6",
15
+ "2330ef30ca42509f",
16
+ "b559bb547b6a7efc",
17
+ "7ba5ec934b306519",
18
+ "49b6268a2ba413cf",
19
+ "e8adf1e30363b84c",
20
+ "afaa8ef8c8aa0746",
21
+ "b2264dd04c98a2cc"
22
+ ],
23
+ "x": 126,
24
+ "y": 93,
25
+ "w": 1208,
26
+ "h": 541
27
+ },
28
+ {
29
+ "id": "a9f18b308a918307",
30
+ "type": "Seeker",
31
+ "z": "139a816449acd89f",
32
+ "g": "644d61288c671091",
1883
33
  "name": "",
1884
- "scope": [
1885
- "e372772cfbb59b9c"
1886
- ],
1887
- "uncaught": false,
1888
- "x": 482.9999084472656,
1889
- "y": 1772,
1890
- "wires": [
1891
- [
1892
- "bcb8cc00ad1fddd5"
1893
- ]
1894
- ]
1895
- },
1896
- {
1897
- "id": "bcb8cc00ad1fddd5",
1898
- "type": "function",
1899
- "z": "6bab6804614c2612",
1900
- "g": "9969b30d869201d8",
1901
- "name": "sending too many emails to single email address",
1902
- "func": "msg.payload = {\n status: \"failed\",\n msg: \"too many emails\"\n};\nreturn msg;",
1903
- "outputs": 1,
1904
- "noerr": 0,
1905
- "initialize": "",
1906
- "finalize": "",
1907
- "libs": [],
1908
- "x": 955.9999008178711,
1909
- "y": 1771.000002861023,
1910
- "wires": [
1911
- [
1912
- "efed77b7b393022f"
1913
- ]
1914
- ]
1915
- },
1916
- {
1917
- "id": "728b41cdc2db124f",
1918
- "type": "function",
1919
- "z": "6bab6804614c2612",
1920
- "g": "9969b30d869201d8",
1921
- "name": "setup response, email data and verify link",
1922
- "func": "msg.user = msg.payload[0];\n\nvar encData = global.get(\"encrypt\")(JSON.stringify({\n uu: msg.user.uuid,\n vc: msg.origpayload.verification_code\n}));\n\nmsg.email = {\n to_email: msg.payload[0].email,\n data: {\n verifyLink: global.get(\"url_verifylink\")({ d: encData })\n }\n};\n\nmsg.payload = {\n status: \"ok\",\n msg: \"email sent\"\n};\n\nreturn msg;\n",
1923
- "outputs": 1,
1924
- "noerr": 0,
1925
- "initialize": "",
1926
- "finalize": "",
1927
- "libs": [],
1928
- "x": 1118.0000534057617,
1929
- "y": 1623.0001754760742,
34
+ "x": 202,
35
+ "y": 253,
1930
36
  "wires": [
1931
37
  [
1932
- "449601abfe35007d",
1933
- "efed77b7b393022f"
38
+ "2330ef30ca42509f",
39
+ "c108d845246cf5d8"
1934
40
  ]
1935
41
  ]
1936
42
  },
1937
43
  {
1938
- "id": "15cd4fe283a32563",
1939
- "type": "postgresql",
1940
- "z": "6bab6804614c2612",
1941
- "g": "9969b30d869201d8",
1942
- "name": "get user",
1943
- "query": "SELECT * \nFROM users\nwhere uuid = '{{#msg.payload}}{{user_uuid}}{{/msg.payload}}'\n;\n",
1944
- "postgreSQLConfig": "85672f28419095b4",
1945
- "split": false,
1946
- "rowsPerMsg": 1,
1947
- "outputs": 1,
1948
- "x": 835.9999618530273,
1949
- "y": 1623.0001249313354,
1950
- "wires": [
1951
- [
1952
- "728b41cdc2db124f"
1953
- ]
1954
- ]
44
+ "id": "24cd5ce1ca3f52d7",
45
+ "type": "Sink",
46
+ "z": "139a816449acd89f",
47
+ "g": "644d61288c671091",
48
+ "name": "",
49
+ "x": 1258,
50
+ "y": 386,
51
+ "wires": []
1955
52
  },
1956
53
  {
1957
- "id": "a751fedc12c69357",
54
+ "id": "c108d845246cf5d8",
1958
55
  "type": "switch",
1959
- "z": "6bab6804614c2612",
1960
- "g": "9969b30d869201d8",
1961
- "name": "rowCount",
1962
- "property": "pgsql.rowCount",
56
+ "z": "139a816449acd89f",
57
+ "g": "644d61288c671091",
58
+ "name": "",
59
+ "property": "payload",
1963
60
  "propertyType": "msg",
1964
61
  "rules": [
1965
62
  {
1966
63
  "t": "eq",
1967
- "v": "1",
1968
- "vt": "str"
1969
- },
1970
- {
1971
- "t": "eq",
1972
- "v": "0",
1973
- "vt": "str"
1974
- },
1975
- {
1976
- "t": "gt",
1977
- "v": "1",
64
+ "v": "",
1978
65
  "vt": "str"
1979
66
  }
1980
67
  ],
1981
- "checkall": "false",
68
+ "checkall": "true",
1982
69
  "repair": false,
1983
- "outputs": 3,
1984
- "x": 622.9999618530273,
1985
- "y": 1635.000002861023,
1986
- "wires": [
1987
- [
1988
- "15cd4fe283a32563"
1989
- ],
1990
- [
1991
- "808ccf3ff61f71fb"
1992
- ],
1993
- [
1994
- "bcb8cc00ad1fddd5"
1995
- ]
1996
- ]
1997
- },
1998
- {
1999
- "id": "808ccf3ff61f71fb",
2000
- "type": "function",
2001
- "z": "6bab6804614c2612",
2002
- "g": "9969b30d869201d8",
2003
- "name": "invalid verification code",
2004
- "func": "msg.payload = {\n status: \"failed\",\n msg: \"invalid verification code\"\n};\nreturn msg;\n",
2005
- "outputs": 1,
2006
- "noerr": 0,
2007
- "initialize": "",
2008
- "finalize": "",
2009
- "libs": [],
2010
- "x": 886.9999618530273,
2011
- "y": 1698.0001249313354,
2012
- "wires": [
2013
- [
2014
- "efed77b7b393022f"
2015
- ]
2016
- ]
2017
- },
2018
- {
2019
- "id": "30f35c3706f7e73a",
2020
- "type": "link in",
2021
- "z": "6bab6804614c2612",
2022
- "g": "9969b30d869201d8",
2023
- "name": "[api] send verify email",
2024
- "links": [
2025
- "fb24616382b60b38",
2026
- "4969a16e91003ab7"
2027
- ],
2028
- "x": 148.44091796875,
2029
- "y": 1634.8855590820312,
2030
- "wires": [
2031
- [
2032
- "eae85c0e14c8e75a"
2033
- ]
2034
- ]
2035
- },
2036
- {
2037
- "id": "449601abfe35007d",
2038
- "type": "link out",
2039
- "z": "6bab6804614c2612",
2040
- "g": "9969b30d869201d8",
2041
- "name": "link out 27",
2042
- "mode": "link",
2043
- "links": [
2044
- "06c98db054f5e440"
2045
- ],
2046
- "x": 1390.2257537841797,
2047
- "y": 1623.420069694519,
2048
- "wires": []
2049
- },
2050
- {
2051
- "id": "eae85c0e14c8e75a",
2052
- "type": "function",
2053
- "z": "6bab6804614c2612",
2054
- "g": "9969b30d869201d8",
2055
- "name": "check parameters",
2056
- "func": "var payload = msg.payload;\n\nif ( payload.verification_code && payload.user_uuid ) {\n msg.status = \"db_check\";\n} else {\n msg.status = \"missing_data\";\n msg.payload = {\n status: \"error\",\n msg: \"something missing\"\n };\n}\n\nreturn msg;",
2057
70
  "outputs": 1,
2058
- "noerr": 0,
2059
- "initialize": "",
2060
- "finalize": "",
2061
- "libs": [],
2062
- "x": 298.9999084472656,
2063
- "y": 1633.9998779296875,
71
+ "x": 416,
72
+ "y": 134,
2064
73
  "wires": [
2065
74
  [
2066
- "ea31119eb7bd67a6"
75
+ "73729a40176391b6",
76
+ "e8adf1e30363b84c"
2067
77
  ]
2068
78
  ]
2069
79
  },
2070
80
  {
2071
- "id": "efed77b7b393022f",
2072
- "type": "http response",
2073
- "z": "6bab6804614c2612",
2074
- "g": "9969b30d869201d8",
2075
- "name": "",
2076
- "statusCode": "",
2077
- "headers": {},
2078
- "x": 1381.999900817871,
2079
- "y": 1694.9998807907104,
2080
- "wires": []
2081
- },
2082
- {
2083
- "id": "ea31119eb7bd67a6",
2084
- "type": "subflow:e8bbdc11f1fc0dd8",
2085
- "z": "6bab6804614c2612",
2086
- "g": "9969b30d869201d8",
81
+ "id": "73729a40176391b6",
82
+ "type": "change",
83
+ "z": "139a816449acd89f",
84
+ "g": "644d61288c671091",
2087
85
  "name": "",
2088
- "x": 315.4999008178711,
2089
- "y": 1690.9998807907104,
2090
- "wires": [
2091
- [
2092
- "e372772cfbb59b9c"
2093
- ]
2094
- ]
2095
- },
2096
- {
2097
- "id": "6354755fd1859629",
2098
- "type": "link out",
2099
- "z": "6bab6804614c2612",
2100
- "g": "9969b30d869201d8",
2101
- "name": "link out 54",
2102
- "mode": "link",
2103
- "links": [
2104
- "0a8b1a95c8e544b9"
86
+ "rules": [
87
+ {
88
+ "t": "set",
89
+ "p": "payload",
90
+ "pt": "msg",
91
+ "to": "",
92
+ "tot": "str"
93
+ }
2105
94
  ],
2106
- "x": 577.9999008178711,
2107
- "y": 1747.9998807907104,
2108
- "wires": []
2109
- },
2110
- {
2111
- "id": "2f8ce9b086c68242",
2112
- "type": "postgresql",
2113
- "z": "6bab6804614c2612",
2114
- "g": "c402f821d1e47bb7",
2115
- "name": "update user_verification set email_sent_at",
2116
- "query": "UPDATE user_verification\nset email_sent_at = NOW()\nwhere user_uuid = ( select uuid \n from users \n where email = lower('{{ msg.payload.email }}') )\nreturning user_uuid, code\n;",
2117
- "postgreSQLConfig": "85672f28419095b4",
2118
- "split": false,
2119
- "rowsPerMsg": 1,
2120
- "outputs": 1,
2121
- "x": 341,
2122
- "y": 2100,
95
+ "action": "",
96
+ "property": "",
97
+ "from": "",
98
+ "to": "",
99
+ "reg": false,
100
+ "x": 517,
101
+ "y": 190,
2123
102
  "wires": [
2124
103
  [
2125
- "3483e7b4fb48b41b",
2126
- "0c12bbfce1102852"
104
+ "2330ef30ca42509f",
105
+ "afaa8ef8c8aa0746"
2127
106
  ]
2128
107
  ]
2129
108
  },
2130
109
  {
2131
- "id": "2826ddd04420b144",
2132
- "type": "catch",
2133
- "z": "6bab6804614c2612",
2134
- "g": "c402f821d1e47bb7",
110
+ "id": "2330ef30ca42509f",
111
+ "type": "template",
112
+ "z": "139a816449acd89f",
113
+ "g": "644d61288c671091",
2135
114
  "name": "",
2136
- "scope": [
2137
- "2f8ce9b086c68242"
2138
- ],
2139
- "uncaught": false,
2140
- "x": 483.9999084472656,
2141
- "y": 2124,
2142
- "wires": [
2143
- [
2144
- "c11b6bd71ce583e3"
2145
- ]
2146
- ]
2147
- },
2148
- {
2149
- "id": "c11b6bd71ce583e3",
2150
- "type": "function",
2151
- "z": "6bab6804614c2612",
2152
- "g": "c402f821d1e47bb7",
2153
- "name": "sending too many emails to single email address",
2154
- "func": "msg.payload = {\n status: \"failed\",\n msg: \"too many emails\"\n};\nreturn msg;",
2155
- "outputs": 1,
2156
- "noerr": 0,
2157
- "initialize": "",
2158
- "finalize": "",
2159
- "libs": [],
2160
- "x": 884.9998779296875,
2161
- "y": 2125,
115
+ "field": "payload",
116
+ "fieldType": "msg",
117
+ "format": "handlebars",
118
+ "syntax": "mustache",
119
+ "template": "This is the payload: {{payload}} !",
120
+ "output": "str",
121
+ "x": 620,
122
+ "y": 251,
2162
123
  "wires": [
2163
124
  [
2164
- "cc220af0679522fb"
125
+ "b559bb547b6a7efc",
126
+ "49b6268a2ba413cf"
2165
127
  ]
2166
128
  ]
2167
129
  },
2168
130
  {
2169
- "id": "0e3b4533c3eaa98b",
2170
- "type": "function",
2171
- "z": "6bab6804614c2612",
2172
- "g": "c402f821d1e47bb7",
2173
- "name": "setup response, email data and verify link",
2174
- "func": "msg.user = msg.payload[0];\n\nvar encData = global.get(\"encrypt\")(JSON.stringify({\n uu: msg.user.uuid,\n vc: msg.user.code\n}));\n\nmsg.origpayload = {\n verification_code: msg.user.code\n}\n\nmsg.email = {\n to_email: msg.user.email,\n data: {\n verifyLink: global.get(\"url_verifylink\")({ d: encData })\n }\n};\n\nmsg.payload = {\n status: \"ok\",\n msg: \"email sent\"\n};\n\nreturn msg;\n",
131
+ "id": "b559bb547b6a7efc",
132
+ "type": "delay",
133
+ "z": "139a816449acd89f",
134
+ "g": "644d61288c671091",
135
+ "name": "",
136
+ "pauseType": "delay",
137
+ "timeout": "5",
138
+ "timeoutUnits": "seconds",
139
+ "rate": "1",
140
+ "nbRateUnits": "1",
141
+ "rateUnits": "second",
142
+ "randomFirst": "1",
143
+ "randomLast": "5",
144
+ "randomUnits": "seconds",
145
+ "drop": false,
146
+ "allowrate": false,
2175
147
  "outputs": 1,
2176
- "noerr": 0,
2177
- "initialize": "",
2178
- "finalize": "",
2179
- "libs": [],
2180
- "x": 1330.0000228881836,
2181
- "y": 1982.0001249313354,
148
+ "x": 724,
149
+ "y": 303,
2182
150
  "wires": [
2183
151
  [
2184
- "643213478716e634",
2185
- "cc220af0679522fb"
152
+ "7ba5ec934b306519"
2186
153
  ]
2187
154
  ]
2188
155
  },
2189
156
  {
2190
- "id": "8deb22cd14041cb2",
2191
- "type": "postgresql",
2192
- "z": "6bab6804614c2612",
2193
- "g": "c402f821d1e47bb7",
2194
- "name": "get user",
2195
- "query": "SELECT \n u.* ,\n '{{#msg.payload}}{{code}}{{/msg.payload}}' as code\nFROM \n users u\nwhere \n uuid = '{{#msg.payload}}{{user_uuid}}{{/msg.payload}}'\n;\n",
2196
- "postgreSQLConfig": "85672f28419095b4",
2197
- "split": false,
2198
- "rowsPerMsg": 1,
157
+ "id": "7ba5ec934b306519",
158
+ "type": "trigger",
159
+ "z": "139a816449acd89f",
160
+ "g": "644d61288c671091",
161
+ "name": "",
162
+ "op1": "1",
163
+ "op2": "0",
164
+ "op1type": "val",
165
+ "op2type": "val",
166
+ "duration": "250",
167
+ "extend": "false",
168
+ "overrideDelay": "false",
169
+ "units": "ms",
170
+ "reset": "",
171
+ "bytopic": "all",
172
+ "topic": "topic",
2199
173
  "outputs": 1,
2200
- "x": 1083.9999618530273,
2201
- "y": 1928.0001249313354,
174
+ "x": 796,
175
+ "y": 353,
2202
176
  "wires": [
2203
177
  [
2204
- "0e3b4533c3eaa98b"
178
+ "e8adf1e30363b84c"
2205
179
  ]
2206
180
  ]
2207
181
  },
2208
182
  {
2209
- "id": "3483e7b4fb48b41b",
2210
- "type": "switch",
2211
- "z": "6bab6804614c2612",
2212
- "g": "c402f821d1e47bb7",
2213
- "name": "rowCount",
2214
- "property": "pgsql.rowCount",
2215
- "propertyType": "msg",
2216
- "rules": [
2217
- {
2218
- "t": "eq",
2219
- "v": "1",
2220
- "vt": "str"
2221
- },
2222
- {
2223
- "t": "eq",
2224
- "v": "0",
2225
- "vt": "str"
2226
- },
2227
- {
2228
- "t": "gt",
2229
- "v": "1",
2230
- "vt": "str"
2231
- }
2232
- ],
2233
- "checkall": "false",
2234
- "repair": false,
2235
- "outputs": 3,
2236
- "x": 617.9999618530273,
2237
- "y": 1940.000002861023,
183
+ "id": "49b6268a2ba413cf",
184
+ "type": "exec",
185
+ "z": "139a816449acd89f",
186
+ "g": "644d61288c671091",
187
+ "command": "",
188
+ "addpay": "",
189
+ "append": "",
190
+ "useSpawn": "false",
191
+ "timer": "",
192
+ "winHide": false,
193
+ "oldrc": false,
194
+ "name": "",
195
+ "x": 545,
196
+ "y": 420,
2238
197
  "wires": [
2239
198
  [
2240
- "8deb22cd14041cb2"
199
+ "e8adf1e30363b84c",
200
+ "b559bb547b6a7efc"
2241
201
  ],
2242
202
  [
2243
- "b6bd1160913b630a"
203
+ "afaa8ef8c8aa0746"
2244
204
  ],
2245
205
  [
2246
- "c11b6bd71ce583e3"
206
+ "afaa8ef8c8aa0746"
2247
207
  ]
2248
208
  ]
2249
209
  },
2250
210
  {
2251
- "id": "341d12e103dc8526",
2252
- "type": "link in",
2253
- "z": "6bab6804614c2612",
2254
- "g": "c402f821d1e47bb7",
2255
- "name": "[api] RESEND verify email",
2256
- "links": [
2257
- "762de3a1ad95e96e",
2258
- "2c1745a0ae9a4dd5"
2259
- ],
2260
- "x": 149.44091796875,
2261
- "y": 1986.8855590820312,
211
+ "id": "e8adf1e30363b84c",
212
+ "type": "rbe",
213
+ "z": "139a816449acd89f",
214
+ "g": "644d61288c671091",
215
+ "name": "",
216
+ "func": "rbe",
217
+ "gap": "",
218
+ "start": "",
219
+ "inout": "out",
220
+ "septopics": true,
221
+ "property": "payload",
222
+ "topi": "topic",
223
+ "x": 640,
224
+ "y": 485,
2262
225
  "wires": [
2263
226
  [
2264
- "89d8b3214924329e"
227
+ "b2264dd04c98a2cc"
2265
228
  ]
2266
229
  ]
2267
230
  },
2268
231
  {
2269
- "id": "643213478716e634",
2270
- "type": "link out",
2271
- "z": "6bab6804614c2612",
2272
- "g": "c402f821d1e47bb7",
2273
- "name": "link out 59",
2274
- "mode": "link",
2275
- "links": [
2276
- "06c98db054f5e440"
2277
- ],
2278
- "x": 1552.225730895996,
2279
- "y": 1982.4200468063354,
2280
- "wires": []
2281
- },
2282
- {
2283
- "id": "89d8b3214924329e",
2284
- "type": "function",
2285
- "z": "6bab6804614c2612",
2286
- "g": "c402f821d1e47bb7",
2287
- "name": "check parameters",
2288
- "func": "var payload = msg.payload;\n\nif ( payload.email ) {\n msg.status = \"db_check\";\n} else {\n msg.status = \"missing_data\";\n msg.payload = {\n status: \"error\",\n msg: \"something missing\"\n };\n}\n\nreturn msg;",
2289
- "outputs": 1,
2290
- "noerr": 0,
2291
- "initialize": "",
2292
- "finalize": "",
2293
- "libs": [],
2294
- "x": 299.9999084472656,
2295
- "y": 1985.9998779296875,
232
+ "id": "afaa8ef8c8aa0746",
233
+ "type": "random",
234
+ "z": "139a816449acd89f",
235
+ "g": "644d61288c671091",
236
+ "name": "",
237
+ "low": 1,
238
+ "high": 10,
239
+ "inte": "true",
240
+ "property": "payload",
241
+ "x": 748,
242
+ "y": 551,
2296
243
  "wires": [
2297
244
  [
2298
- "c25b78919ebc3bd9"
245
+ "49b6268a2ba413cf",
246
+ "24cd5ce1ca3f52d7",
247
+ "7ba5ec934b306519"
2299
248
  ]
2300
249
  ]
2301
250
  },
2302
251
  {
2303
- "id": "cc220af0679522fb",
2304
- "type": "http response",
2305
- "z": "6bab6804614c2612",
2306
- "g": "c402f821d1e47bb7",
2307
- "name": "",
2308
- "statusCode": "",
2309
- "headers": {},
2310
- "x": 1584.999900817871,
2311
- "y": 2125.9998807907104,
2312
- "wires": []
2313
- },
2314
- {
2315
- "id": "c25b78919ebc3bd9",
2316
- "type": "subflow:e8bbdc11f1fc0dd8",
2317
- "z": "6bab6804614c2612",
2318
- "g": "c402f821d1e47bb7",
252
+ "id": "b2264dd04c98a2cc",
253
+ "type": "smooth",
254
+ "z": "139a816449acd89f",
255
+ "g": "644d61288c671091",
2319
256
  "name": "",
2320
- "x": 316.4999008178711,
2321
- "y": 2042.9998807907104,
257
+ "property": "payload",
258
+ "action": "mean",
259
+ "count": "10",
260
+ "round": "",
261
+ "mult": "single",
262
+ "reduce": false,
263
+ "x": 855,
264
+ "y": 593,
2322
265
  "wires": [
2323
266
  [
2324
- "2f8ce9b086c68242"
267
+ "afaa8ef8c8aa0746",
268
+ "b559bb547b6a7efc"
2325
269
  ]
2326
270
  ]
2327
271
  },
2328
272
  {
2329
- "id": "0c12bbfce1102852",
2330
- "type": "link out",
2331
- "z": "6bab6804614c2612",
2332
- "g": "c402f821d1e47bb7",
2333
- "name": "link out 60",
2334
- "mode": "link",
2335
- "links": [
2336
- "0a8b1a95c8e544b9"
2337
- ],
2338
- "x": 578.9999008178711,
2339
- "y": 2099.9998807907104,
2340
- "wires": []
2341
- },
2342
- {
2343
- "id": "b6bd1160913b630a",
2344
- "type": "postgresql",
2345
- "z": "6bab6804614c2612",
2346
- "g": "c402f821d1e47bb7",
2347
- "name": "create verification code",
2348
- "query": "INSERT into user_verification(\n user_uuid,\n email_sent_at \n) values (\n (select uuid from users where email = '{{ msg.origpayload.email }}'),\n NOW()\n) \non conflict(user_uuid) do update set created_at = NOW()\nRETURNING user_uuid,code \n;",
2349
- "postgreSQLConfig": "85672f28419095b4",
2350
- "split": false,
2351
- "rowsPerMsg": 1,
2352
- "outputs": 1,
2353
- "x": 856.0000228881836,
2354
- "y": 2044.000002861023,
273
+ "id": "7b2b4035188017d2",
274
+ "type": "group",
275
+ "z": "139a816449acd89f",
276
+ "name": "don't execute this flow it contains a loop",
277
+ "style": {
278
+ "label": true
279
+ },
280
+ "nodes": [
281
+ "7a12d1bd632f72da",
282
+ "489b7ede750a407d",
283
+ "a2e7e963d4fa1c2b",
284
+ "82bcb32e163a6456",
285
+ "37a6ae8572a3c549",
286
+ "f1e2d5fedcf8f5b2",
287
+ "a40bc0a91661f47a",
288
+ "6a085dbc390852c3",
289
+ "a8e0e319494b8ee3",
290
+ "6106ae78b76189cb"
291
+ ],
292
+ "x": 136,
293
+ "y": 673,
294
+ "w": 1186,
295
+ "h": 413
296
+ },
297
+ {
298
+ "id": "7a12d1bd632f72da",
299
+ "type": "Seeker",
300
+ "z": "139a816449acd89f",
301
+ "g": "7b2b4035188017d2",
302
+ "name": "",
303
+ "x": 212,
304
+ "y": 750,
2355
305
  "wires": [
2356
306
  [
2357
- "49f9f2430341c884",
2358
- "8deb22cd14041cb2"
307
+ "a2e7e963d4fa1c2b"
2359
308
  ]
2360
309
  ]
2361
310
  },
2362
311
  {
2363
- "id": "49f9f2430341c884",
2364
- "type": "link out",
2365
- "z": "6bab6804614c2612",
2366
- "g": "c402f821d1e47bb7",
2367
- "name": "link out 69",
2368
- "mode": "link",
2369
- "links": [
2370
- "0a8b1a95c8e544b9"
2371
- ],
2372
- "x": 1062.0000228881836,
2373
- "y": 2044.000002861023,
312
+ "id": "489b7ede750a407d",
313
+ "type": "Sink",
314
+ "z": "139a816449acd89f",
315
+ "g": "7b2b4035188017d2",
316
+ "name": "",
317
+ "x": 1246,
318
+ "y": 899,
2374
319
  "wires": []
2375
320
  },
2376
321
  {
2377
- "id": "06c98db054f5e440",
2378
- "type": "link in",
2379
- "z": "6bab6804614c2612",
2380
- "name": "[Mail] Verify Email",
2381
- "links": [
2382
- "449601abfe35007d",
2383
- "b74cf519d3732d2a",
2384
- "643213478716e634"
2385
- ],
2386
- "x": 1518,
2387
- "y": 2588,
2388
- "wires": [
2389
- [
2390
- "a94909f63091b9d5"
2391
- ]
2392
- ]
2393
- },
2394
- {
2395
- "id": "a94909f63091b9d5",
2396
- "type": "subflow:1f6116ea2b105a8b",
2397
- "z": "6bab6804614c2612",
322
+ "id": "a2e7e963d4fa1c2b",
323
+ "type": "split",
324
+ "z": "139a816449acd89f",
325
+ "g": "7b2b4035188017d2",
2398
326
  "name": "",
2399
- "x": 1707.058837890625,
2400
- "y": 2588,
2401
- "wires": [
2402
- [
2403
- "5351c947bd9e66e8"
2404
- ]
2405
- ]
2406
- },
2407
- {
2408
- "id": "5351c947bd9e66e8",
2409
- "type": "change",
2410
- "z": "6bab6804614c2612",
2411
- "name": "Subject: Verification Email",
2412
- "rules": [
2413
- {
2414
- "t": "set",
2415
- "p": "email.subject",
2416
- "pt": "msg",
2417
- "to": "[Bid'n'Buy Club] Verify your Email",
2418
- "tot": "str"
2419
- }
2420
- ],
2421
- "action": "",
2422
- "property": "",
2423
- "from": "",
2424
- "to": "",
2425
- "reg": false,
2426
- "x": 2209.0000915527344,
2427
- "y": 2587.492670059204,
2428
- "wires": [
2429
- [
2430
- "3f837da97ff0e00b"
2431
- ]
2432
- ]
2433
- },
2434
- {
2435
- "id": "3f837da97ff0e00b",
2436
- "type": "template",
2437
- "z": "6bab6804614c2612",
2438
- "name": "email text",
2439
- "field": "email.text",
2440
- "fieldType": "msg",
2441
- "format": "html",
2442
- "syntax": "mustache",
2443
- "template": "Hi {{ user.firstname }} {{ user.surname }}!\n\nYour verification Code is {{ origpayload.verification_code }}\n\nOr verify and login by following the link {{ email.data.verifyLink }}\n\n- Your team @ Bid'n'Buy.club\n\n{{#email.data.dont}}\nIf you consider this to be spam, our apologies. Please use our no more email link: {{ spamMeLink }}\n{{/email.data.dont}}",
2444
- "output": "str",
2445
- "x": 2259.0000915527344,
2446
- "y": 2540.4473004341125,
327
+ "splt": "\\n",
328
+ "spltType": "str",
329
+ "arraySplt": 1,
330
+ "arraySpltType": "len",
331
+ "stream": false,
332
+ "addname": "",
333
+ "x": 504,
334
+ "y": 746,
2447
335
  "wires": [
2448
336
  [
2449
- "7214adb078318a32"
337
+ "f1e2d5fedcf8f5b2",
338
+ "6106ae78b76189cb"
2450
339
  ]
2451
340
  ]
2452
341
  },
2453
342
  {
2454
- "id": "7214adb078318a32",
2455
- "type": "template",
2456
- "z": "6bab6804614c2612",
2457
- "name": "email html",
2458
- "field": "email.html",
2459
- "fieldType": "msg",
2460
- "format": "handlebars",
2461
- "syntax": "mustache",
2462
- "template": "<!DOCTYPE html>\n<html><head>\n <title>Bid'n'Buy Verification to login</title>\n <style type=\"text/css\">div{font-size:16px}</style>\n</head>\n<body>\n<div>Hi {{ user.firstname }} {{ user.surname }}!\n<p>\nYour verification code is <b>{{ origpayload.verification_code }}</b>\n\n<p>\n Or click <a href=\"{{ email.data.verifyLink }}\">here</a> to verify your email and login.\n<p>\n - Your team @ Bid'n'Buy.club\n\n{{#email.data.dont}}\n<p>\nIf you consider this to be spam, our apologies. Please use our <a href=\"{{ spamMeLink }}\">no more email</a> link.\n{{/email.data.dont}}\n\n</div>\n</body>\n</html>\n",
2463
- "output": "str",
2464
- "x": 2249.0000915527344,
2465
- "y": 2493.401930809021,
343
+ "id": "82bcb32e163a6456",
344
+ "type": "join",
345
+ "z": "139a816449acd89f",
346
+ "g": "7b2b4035188017d2",
347
+ "name": "",
348
+ "mode": "auto",
349
+ "build": "object",
350
+ "property": "payload",
351
+ "propertyType": "msg",
352
+ "key": "topic",
353
+ "joiner": "\\n",
354
+ "joinerType": "str",
355
+ "accumulate": "false",
356
+ "timeout": "",
357
+ "count": "",
358
+ "reduceRight": false,
359
+ "x": 849,
360
+ "y": 919,
2466
361
  "wires": [
2467
362
  [
2468
- "40429d0998b73836",
2469
- "e3262d9d2791ab78"
363
+ "489b7ede750a407d"
2470
364
  ]
2471
365
  ]
2472
366
  },
2473
367
  {
2474
- "id": "40429d0998b73836",
2475
- "type": "link out",
2476
- "z": "6bab6804614c2612",
2477
- "name": "link out 26",
2478
- "mode": "link",
2479
- "links": [
2480
- "dcd3c6b256468cfc"
2481
- ],
2482
- "x": 2615.9029541015625,
2483
- "y": 2607.0792236328125,
2484
- "wires": []
2485
- },
2486
- {
2487
- "id": "e3262d9d2791ab78",
2488
- "type": "Sink",
2489
- "z": "6bab6804614c2612",
368
+ "id": "37a6ae8572a3c549",
369
+ "type": "sort",
370
+ "z": "139a816449acd89f",
371
+ "g": "7b2b4035188017d2",
2490
372
  "name": "",
2491
- "x": 2526.9998474121094,
2492
- "y": 2445.5033626556396,
2493
- "wires": []
2494
- },
2495
- {
2496
- "id": "e601dab9e5205759",
2497
- "type": "template",
2498
- "z": "6bab6804614c2612",
2499
- "name": "email html",
2500
- "field": "email.html",
2501
- "fieldType": "msg",
2502
- "format": "handlebars",
2503
- "syntax": "mustache",
2504
- "template": "<!DOCTYPE html>\n<html><head>\n <title>Bid'n'Buy Login Code</title>\n <style type=\"text/css\">div{font-size:16px}</style>\n</head>\n<body>\n<div>Hi {{ user.firstname }} {{ user.surname }}!\n<p>\n Enter this login code {{ origpayload.verification_code }}\n\n<p>\n Or click <a href=\"{{ email.data.loginLink }}\">here</a> to login.\n<p>\n - Your team @ Bid'n'Buy.club\n\n{{#email.data.dont}}\n<p>\nIf you consider this to be spam, our apologies. Please use our <a href=\"{{ spamMeLink }}\">no more email</a> link.\n{{/email.data.dont}}\n\n</div>\n</body>\n</html>\n",
2505
- "output": "str",
2506
- "x": 2253.0000915527344,
2507
- "y": 2651.614471435547,
373
+ "order": "ascending",
374
+ "as_num": false,
375
+ "target": "payload",
376
+ "targetType": "msg",
377
+ "msgKey": "payload",
378
+ "msgKeyType": "elem",
379
+ "seqKey": "payload",
380
+ "seqKeyType": "msg",
381
+ "x": 541,
382
+ "y": 836,
2508
383
  "wires": [
2509
384
  [
2510
- "40429d0998b73836"
385
+ "f1e2d5fedcf8f5b2",
386
+ "a40bc0a91661f47a"
2511
387
  ]
2512
388
  ]
2513
389
  },
2514
390
  {
2515
- "id": "7d6e9ff48bc8390a",
2516
- "type": "template",
2517
- "z": "6bab6804614c2612",
2518
- "name": "email text",
2519
- "field": "email.text",
2520
- "fieldType": "msg",
2521
- "format": "html",
2522
- "syntax": "mustache",
2523
- "template": "Hi {{ msg.user.firstname }} {{ msg.user.surname }}!\n\nLogin Code {{ msg.origpayload.verification_code }}\n\nOr click on this link {{ msg.email.data.loginLink }}\n\nVery sincerely,\n\n- Your team @ Bid'n'Buy.club\n\n{{#email.data.dont}}\nIf you consider this to be spam, our apologies. Please use our no more email link: {{ spamMeLink }}\n{{/email.data.dont}}",
2524
- "output": "str",
2525
- "x": 2263.0000915527344,
2526
- "y": 2702.6647214889526,
391
+ "id": "f1e2d5fedcf8f5b2",
392
+ "type": "batch",
393
+ "z": "139a816449acd89f",
394
+ "g": "7b2b4035188017d2",
395
+ "name": "",
396
+ "mode": "count",
397
+ "count": 10,
398
+ "overlap": 0,
399
+ "interval": 10,
400
+ "allowEmptySequence": false,
401
+ "topics": [
402
+ {
403
+ "topic": ""
404
+ }
405
+ ],
406
+ "x": 698,
407
+ "y": 800,
2527
408
  "wires": [
2528
409
  [
2529
- "e601dab9e5205759"
410
+ "37a6ae8572a3c549"
2530
411
  ]
2531
412
  ]
2532
413
  },
2533
414
  {
2534
- "id": "836c73d8634ccb3d",
2535
- "type": "change",
2536
- "z": "6bab6804614c2612",
2537
- "name": "Subject: Login Code",
2538
- "rules": [
2539
- {
2540
- "t": "set",
2541
- "p": "email.subject",
2542
- "pt": "msg",
2543
- "to": "[Bid'n'Buy Club] Login Code",
2544
- "tot": "str"
2545
- }
2546
- ],
2547
- "action": "",
2548
- "property": "",
2549
- "from": "",
2550
- "to": "",
2551
- "reg": false,
2552
- "x": 2223.0000915527344,
2553
- "y": 2753.7149715423584,
415
+ "id": "a40bc0a91661f47a",
416
+ "type": "csv",
417
+ "z": "139a816449acd89f",
418
+ "g": "7b2b4035188017d2",
419
+ "name": "",
420
+ "sep": ",",
421
+ "hdrin": "",
422
+ "hdrout": "none",
423
+ "multi": "one",
424
+ "ret": "\\n",
425
+ "temp": "",
426
+ "skip": "0",
427
+ "strings": true,
428
+ "include_empty_strings": "",
429
+ "include_null_values": "",
430
+ "x": 633,
431
+ "y": 912,
2554
432
  "wires": [
2555
433
  [
2556
- "7d6e9ff48bc8390a"
434
+ "82bcb32e163a6456"
2557
435
  ]
2558
436
  ]
2559
437
  },
2560
438
  {
2561
- "id": "93e97f3d36441ebf",
2562
- "type": "subflow:1f6116ea2b105a8b",
2563
- "z": "6bab6804614c2612",
439
+ "id": "6a085dbc390852c3",
440
+ "type": "csv",
441
+ "z": "139a816449acd89f",
442
+ "g": "7b2b4035188017d2",
2564
443
  "name": "",
2565
- "x": 1711.058837890625,
2566
- "y": 2753.5070304870605,
444
+ "sep": ",",
445
+ "hdrin": "",
446
+ "hdrout": "none",
447
+ "multi": "one",
448
+ "ret": "\\n",
449
+ "temp": "",
450
+ "skip": "0",
451
+ "strings": true,
452
+ "include_empty_strings": "",
453
+ "include_null_values": "",
454
+ "x": 693,
455
+ "y": 1008,
2567
456
  "wires": [
2568
457
  [
2569
- "836c73d8634ccb3d"
458
+ "82bcb32e163a6456"
2570
459
  ]
2571
460
  ]
2572
461
  },
2573
462
  {
2574
- "id": "8629ac24837d3d2e",
463
+ "id": "a8e0e319494b8ee3",
2575
464
  "type": "link in",
2576
- "z": "6bab6804614c2612",
2577
- "name": "[Email] Send Login Code",
465
+ "z": "139a816449acd89f",
466
+ "g": "7b2b4035188017d2",
467
+ "name": "link in 1",
2578
468
  "links": [
2579
- "204262a2d05ca231",
2580
- "e265d3d510ea49aa"
469
+ "6106ae78b76189cb"
2581
470
  ],
2582
- "x": 1522,
2583
- "y": 2753.5070304870605,
471
+ "x": 487,
472
+ "y": 1045,
2584
473
  "wires": [
2585
474
  [
2586
- "93e97f3d36441ebf"
475
+ "6a085dbc390852c3"
2587
476
  ]
2588
477
  ]
2589
478
  },
2590
479
  {
2591
- "id": "d95c6f8cf9d996e9",
2592
- "type": "Screenshot",
2593
- "z": "6bab6804614c2612",
2594
- "name": "",
2595
- "screenshot": "please wait ...",
2596
- "x": 140,
2597
- "y": 86,
2598
- "wires": []
2599
- },
2600
- {
2601
- "id": "54966340c77babf9",
2602
- "type": "Orphans",
2603
- "z": "6bab6804614c2612",
2604
- "name": "",
2605
- "x": 360,
2606
- "y": 88,
480
+ "id": "6106ae78b76189cb",
481
+ "type": "link out",
482
+ "z": "139a816449acd89f",
483
+ "g": "7b2b4035188017d2",
484
+ "name": "link out 92",
485
+ "mode": "link",
486
+ "links": [
487
+ "a8e0e319494b8ee3"
488
+ ],
489
+ "x": 753,
490
+ "y": 714,
2607
491
  "wires": []
2608
492
  }
2609
- ]
493
+ ]