-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path1.1. (NO-AUTH) Rule-901 End-to-End test - pain001-013 disabled.postman_collection.json
3140 lines (3140 loc) · 166 KB
/
1.1. (NO-AUTH) Rule-901 End-to-End test - pain001-013 disabled.postman_collection.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"info": {
"_postman_id": "02104fad-90bd-4cf1-b686-9740b1b4d160",
"name": "1.1. (NO-AUTH) Rule-901 End-to-End test - pain001/013 disabled",
"description": "# 20240622\n\n- Implemented new TMS API path",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "36724395"
},
"item": [
{
"name": "Message Creation sans pain.001/013",
"item": [
{
"name": "Create messages in memory",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
"utils.setPm(pm); // set the utils _pm to the pre-request script pm\r",
"\r",
"pm.globals.clear();\r",
"\r",
"console.log(`Data Preparation Service - Public Network Map`);\r",
"\r",
"// ## Set up transaction eco-system\r",
"\r",
"messageSet = utils.createTransactionSetInMemory();"
],
"type": "text/javascript",
"packages": {}
}
},
{
"listen": "test",
"script": {
"exec": [
"const activePain001 = JSON.parse(pm.environment.get('activePain001'));\r",
"\r",
"pm.test(\"Status code is 200\", function () {\r",
" pm.response.to.have.status(200);\r",
"});\r",
"\r",
"let dataCache = JSON.parse(pm.globals.get(\"dataCache\"));\r",
"let endToEndId = pm.globals.get(\"endToEndId\");\r",
"let messageIdPacs008 = pm.globals.get(\"messageIdPacs008\");\r",
"let messageIdPacs002 = pm.globals.get(\"messageIdPacs002\");\r",
"let pacs008 = pm.globals.get(\"pacs008\");\r",
"let pacs002 = pm.globals.get(\"pacs002\");\r",
"\r",
"pm.test(`Has a new dataCache:dbtrId value: ${dataCache.dbtrId}`, function() {\r",
" pm.expect(dataCache.dbtrId, `${dataCache.dbtrId}`).to.be.a('string');\r",
"});\r",
"\r",
"pm.test(`Has a new dataCache:cdtrId value: ${dataCache.cdtrId}`, function() {\r",
" pm.expect(dataCache.cdtrId).to.be.a('string');\r",
"});\r",
"\r",
"pm.test(`Has a dataCache:dbtrAcctId value: ${dataCache.dbtrAcctId}`, function() {\r",
" pm.expect(dataCache.dbtrAcctId).to.be.a('string');\r",
"});\r",
"\r",
"pm.test(`Has a dataCache:cdtrAcctId value: ${dataCache.cdtrAcctId}`, function() {\r",
" pm.expect(dataCache.cdtrAcctId).to.be.a('string');\r",
"});\r",
"\r",
"pm.test(`Has a new endToEndId value: ${endToEndId}`, function() {\r",
" pm.expect(endToEndId).to.be.a('string');\r",
"});\r",
"\r",
"\r",
"pm.test(`Has a new pacs.008 msgId value: ${messageIdPacs008}`, function() {\r",
" pm.expect(messageIdPacs008).to.be.a('string');\r",
"});\r",
"\r",
"pm.test(`Has a new pacs.002 msgId value: ${messageIdPacs002}`, function() {\r",
" pm.expect(messageIdPacs002).to.be.a('string');\r",
"});\r",
"\r",
"pm.test(`Has a new pacs.008 body for TMS API`, function() {\r",
" pm.expect(pacs008).to.be.a('string');\r",
"});\r",
"\r",
"pm.test(`Has a new pacs.002 body for Data Preparation`, function() {\r",
" pm.expect(pacs002).to.be.a('string');\r",
"});\r",
"\r",
"if (activePain001) {\r",
" let messageIdPain001 = pm.globals.get(\"messageIdPain001\");\r",
" let messageIdPain013 = pm.globals.get(\"messageIdPain013\");\r",
" let pain001 = pm.globals.get(\"pain001\");\r",
" let pain013 = pm.globals.get(\"pain013\");\r",
" pm.test(`Has a new pain.001 msgId value: ${messageIdPain001}`, function() {\r",
" pm.expect(messageIdPain001).to.be.a('string');\r",
" });\r",
"\r",
" pm.test(`Has a new pain.013 msgId value: ${messageIdPain013}`, function() {\r",
" pm.expect(messageIdPain013).to.be.a('string');\r",
" });\r",
"\r",
" pm.test(`Has a new pain.001 body for TMS API`, function() {\r",
" pm.expect(pain001).to.be.a('string');\r",
" });\r",
"\r",
" pm.test(`Has a new pain.013 body for TMS API`, function() {\r",
" pm.expect(pain013).to.be.a('string');\r",
" });\r",
"} else {\r",
" pm.test(`pain.001/013 messages disabled`, function() {\r",
" pm.expect(activePain001).to.be.false;\r",
" });\r",
"}"
],
"type": "text/javascript",
"packages": {}
}
}
],
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": "",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{tazamaTMSUrl}}",
"host": [
"{{tazamaTMSUrl}}"
]
}
},
"response": []
},
{
"name": "Post pacs.008 to TMS API - unauthenticated",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
"let messageBody = pm.globals.get('pacs008');\r",
"pm.globals.set('messageBody', messageBody);"
],
"type": "text/javascript",
"packages": {}
}
},
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"pacs.008 successfully submitted to TMS API\", function () {\r",
" pm.response.to.have.status(200);\r",
"});"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{{messageBody}}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{tazamaTMSUrl}}{{path-api-version}}/{{path-pacs008}}",
"host": [
"{{tazamaTMSUrl}}{{path-api-version}}"
],
"path": [
"{{path-pacs008}}"
]
}
},
"response": []
},
{
"name": "Post pacs.002 to TMS API - unauthenticated",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
"let messageBody = pm.globals.get('pacs002');\r",
"pm.globals.set('messageBody', messageBody);"
],
"type": "text/javascript",
"packages": {}
}
},
{
"listen": "test",
"script": {
"exec": [
"pm.test(\"pacs.002 successfully submitted to TMS API\", function () {\r",
" pm.response.to.have.status(200);\r",
"});"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{{pacs002}}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{tazamaTMSUrl}}{{path-api-version}}/{{path-pacs002}}",
"host": [
"{{tazamaTMSUrl}}{{path-api-version}}"
],
"path": [
"{{path-pacs002}}"
]
}
},
"response": []
}
]
},
{
"name": "DB update tests",
"item": [
{
"name": "Get Arango Token",
"event": [
{
"listen": "test",
"script": {
"exec": [
"let jsonData = pm.response.json();\r",
"//console.log(jsonData[\"jwt\"])\r",
"\r",
"pm.globals.set(\"arangoToken\", jsonData[\"jwt\"])\r",
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"username\": \"{{arangoUsername}}\",\r\n \"password\": \"{{arangoPassword}}\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{arangoUrl}}/_open/auth",
"host": [
"{{arangoUrl}}"
],
"path": [
"_open",
"auth"
]
}
},
"response": []
},
{
"name": "Fetch created pacs.008 from transactionHistoryPacs008",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
"console.log(`Fetching pacs.008 from transactionHistoryPacs008 using msgId: ${pm.globals.get('messageIdPacs008')}`);"
],
"type": "text/javascript",
"packages": {}
}
},
{
"listen": "test",
"script": {
"exec": [
"const resJson = pm.response.json();\r",
"\r",
"let memPacs008MsgId = pm.globals.get('messageIdPacs008')\r",
"\r",
"pm.test(`pacs.008 with msgId ${memPacs008MsgId} found`, function () {\r",
" pm.expect(resJson.result[0].FIToFICstmrCdtTrf.GrpHdr.MsgId).to.be.equal(memPacs008MsgId);\r",
"});"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{arangoToken}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"query\": \"FOR doc in {{db_coll_msg_transactionHistoryPacs008}} FILTER doc.FIToFICstmrCdtTrf.GrpHdr.MsgId == '{{messageIdPacs008}}' RETURN doc\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{arangoUrl}}/_db/{{db_messagehistory}}/_api/cursor",
"host": [
"{{arangoUrl}}"
],
"path": [
"_db",
"{{db_messagehistory}}",
"_api",
"cursor"
]
}
},
"response": []
},
{
"name": "Fetch created pacs.002 from transactionHistoryPacs002",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
"console.log(`Fetching pacs.002 from transactionHistoryPacs002 using msgId: ${pm.globals.get('messageIdPacs002')}`);"
],
"type": "text/javascript"
}
},
{
"listen": "test",
"script": {
"exec": [
"const resJson = pm.response.json();\r",
"\r",
"let memPacs002MsgId = pm.globals.get('messageIdPacs002')\r",
"\r",
"pm.test(`pacs.002 with msgId ${memPacs002MsgId} found`, function () {\r",
" pm.expect(resJson.result[0].FIToFIPmtSts.GrpHdr.MsgId).to.be.equal(memPacs002MsgId);\r",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{arangoToken}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"query\": \"FOR doc in {{db_coll_msg_transactionHistoryPacs002}} FILTER doc.FIToFIPmtSts.GrpHdr.MsgId == '{{messageIdPacs002}}' RETURN doc\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{arangoUrl}}/_db/{{db_messagehistory}}/_api/cursor",
"host": [
"{{arangoUrl}}"
],
"path": [
"_db",
"{{db_messagehistory}}",
"_api",
"cursor"
]
}
},
"response": []
},
{
"name": "Check graph creation",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
"console.log(`Fetching graph from ${pm.environment.get('db_historygraph')} using creditorAccountKey : ${pm.globals.get('creditorAccountKey')}`);\r",
"\r",
"let qryString = `LET vertices = (FOR v,e,p IN 1..2 ANY 'accounts/${pm.globals.get('creditorAccountKey')}' transactionRelationship, account_holder RETURN distinct v) LET edges = (FOR v,e,p IN 1..2 ANY 'accounts/${pm.globals.get('creditorAccountKey')}' transactionRelationship, account_holder RETURN distinct e) RETURN {v: vertices, e: edges}`\r",
"\r",
"pm.globals.set('qryString', qryString);"
],
"type": "text/javascript",
"packages": {}
}
},
{
"listen": "test",
"script": {
"exec": [
"const resJson = pm.response.json();\r",
"\r",
"let debtor = false;\r",
"let debtorAccount = false;\r",
"let debtorAccountHolder = false;\r",
"let creditor = false\r",
"let creditorAccountHolder = false;\r",
"let creditorAccount = false;\r",
"let pain001 = false;\r",
"let pain013 = false;\r",
"let pacs008 = false;\r",
"let pacs002 = false;\r",
"\r",
"for (let i = 0; i < resJson.result[0].e.length; i++) {\r",
"\r",
" if (resJson.result[0].e[i]._id.search(\"account_holder\") >= 0) {\r",
" if ((resJson.result[0].e[i]._from.search(pm.globals.get('debtorKey')) >= 0) && (resJson.result[0].e[i]._to.search(pm.globals.get('debtorAccountKey')) >= 0)) {\r",
" debtorAccountHolder = true;\r",
" } else if ((resJson.result[0].e[i]._from.search(pm.globals.get('creditorKey')) >= 0) && (resJson.result[0].e[i]._to.search(pm.globals.get('creditorAccountKey')) >= 0))\r",
" {\r",
" creditorAccountHolder = true;\r",
" }\r",
" }\r",
"\r",
" if (resJson.result[0].e[i]._id.search(\"transactionRelationship\") >= 0) {\r",
" if (resJson.result[0].e[i].TxTp.search(\"pain.001.001.11\") >= 0) {\r",
" pain001 = true;\r",
" } else if (resJson.result[0].e[i].TxTp.search(\"pain.013.001.09\") >= 0) {\r",
" pain013 = true;\r",
" } else if (resJson.result[0].e[i].TxTp.search(\"pacs.008.001.10\") >= 0) {\r",
" pacs008 = true;\r",
" } else if (resJson.result[0].e[i].TxTp.search(\"pacs.002.001.12\") >= 0) {\r",
" pacs002 = true;\r",
" }\r",
" }\r",
"}\r",
"\r",
"for (let i = 0; i < resJson.result[0].v.length; i++) {\r",
"\r",
" if (resJson.result[0].v[i]._id.search(\"entities\") >= 0) {\r",
" if (resJson.result[0].v[i]._key == pm.globals.get('debtorKey')) {\r",
" debtor = true;\r",
" } else if (resJson.result[0].v[i]._key == pm.globals.get('creditorKey')) {\r",
" creditor = true;\r",
" }\r",
" }\r",
"\r",
" if (resJson.result[0].v[i]._id.search(\"accounts\") >= 0) {\r",
" if (resJson.result[0].v[i]._key == pm.globals.get('debtorAccountKey')) {\r",
" debtorAccount = true;\r",
" } else if (resJson.result[0].v[i]._key == pm.globals.get('creditorAccountKey')) {\r",
" creditorAccount = true;\r",
" }\r",
" }\r",
"}\r",
"\r",
"pm.test(`Graph contains an entity vertex for debtor entity with debtorKey ${pm.globals.get('debtorKey')}`, function () {\r",
" pm.expect(debtor).to.be.true;\r",
"});\r",
"\r",
"pm.test(`Graph contains an entity vertex for creditor entity with creditorKey ${pm.globals.get('creditorKey')}`, function () {\r",
" pm.expect(creditor).to.be.true;\r",
"});\r",
"\r",
"pm.test(`Graph contains an account vertex for debtor account with debtorAccountKey ${pm.globals.get('debtorAccountKey')}`, function () {\r",
" pm.expect(debtorAccount).to.be.true;\r",
"});\r",
"\r",
"pm.test(`Graph contains an account vertex for creditor account with creditorAccountKey ${pm.globals.get('creditorAccountKey')}`, function () {\r",
" pm.expect(creditorAccount).to.be.true;\r",
"});\r",
"\r",
"pm.test(`Graph contains an account_holder edge for debtor entity with debtorKey ${pm.globals.get('debtorKey')} and debtorAccountKey ${pm.globals.get('debtorAccountKey')}`, function () {\r",
" pm.expect(debtorAccountHolder).to.be.true;\r",
"});\r",
"\r",
"pm.test(`Graph contains an account_holder edge for creditor entity with creditorKey ${pm.globals.get('creditorKey')} and creditorAccountKey ${pm.globals.get('creditorAccountKey')}`, function () {\r",
" pm.expect(creditorAccountHolder).to.be.true;\r",
"});\r",
"\r",
"let activePain001 = JSON.parse(pm.environment.get('activePain001'));\r",
"\r",
"if (activePain001) {\r",
" pm.test(`Pain.001/013 is enabled and graph contains a pain.001 relationship`, function () {\r",
" pm.expect(pain001).to.be.true;\r",
" });\r",
" pm.test(`Pain.001/013 is enabled and graph contains a pain.013 relationship`, function () {\r",
" pm.expect(pain013).to.be.true;\r",
" });\r",
"} else {\r",
" pm.test(`Pain.001/013 is disabled and graph does not contain a pain.001 relationship`, function () {\r",
" pm.expect(pain001).to.be.false;\r",
" });\r",
" pm.test(`Pain.001/013 is disabled and graph does not contain a pain.013 relationship`, function () {\r",
" pm.expect(pain013).to.be.false;\r",
" });\r",
"}\r",
"\r",
"pm.test(`Graph contains a pacs.008 relationship`, function () {\r",
" pm.expect(pacs008).to.be.true;\r",
"});\r",
"pm.test(`Graph contains a pacs.002 relationship`, function () {\r",
" pm.expect(pacs002).to.be.true;\r",
"});\r",
""
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{arangoToken}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"query\": \"{{qryString}}\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{arangoUrl}}/_db/{{db_historygraph}}/_api/cursor",
"host": [
"{{arangoUrl}}"
],
"path": [
"_db",
"{{db_historygraph}}",
"_api",
"cursor"
]
}
},
"response": []
},
{
"name": "Fetch evaluation results with msgId - Rule 901 Network Map Only",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
"console.log(`Fetching result for pacs.002 msgId: ${pm.globals.get('messageIdPacs002')}`);"
],
"type": "text/javascript",
"packages": {}
}
},
{
"listen": "test",
"script": {
"exec": [
"const resJson = pm.response.json();\r",
"\r",
"const rulesPerTypologyCount = [2];\r",
"const totalExpectedTypologies = 1;\r",
"const expectedAlertStatus = \"NALT\";\r",
"const interdictionTypologies = [\r",
" \"000\",\r",
" \"028\",\r",
" \"037\",\r",
" \"044\",\r",
" \"045\",\r",
" \"047\",\r",
" \"095\",\r",
" \"179\",\r",
" \"185\",\r",
" \"999\"\r",
"];\r",
"const ruleDescriptions = {\r",
" \"001\": \"Derived account age - creditor\",\r",
" \"002\": \"Transaction convergence - debtor\",\r",
" \"003\": \"Account dormancy - creditor\",\r",
" \"004\": \"Account dormancy - debtor\",\r",
" \"006\": \"Outgoing transfer similarity - amounts\",\r",
" \"007\": \"Outgoing transfer similarity - descriptions\",\r",
" \"008\": \"Outgoing transfer similarity - creditor\",\r",
" \"010\": \"Increased account activity: volume - debtor\",\r",
" \"011\": \"Increased account activity: volume - creditor\",\r",
" \"016\": \"Transaction convergence - creditor\",\r",
" \"017\": \"Transaction divergence - debtor\",\r",
" \"018\": \"Exceptionally large outgoing transfer - debtor\",\r",
" \"020\": \"Large transaction amount vs history - creditor\",\r",
" \"021\": \"A large number of similar transaction amounts - creditor\",\r",
" \"024\": \"Non-commissioned transaction mirroring - creditor\",\r",
" \"025\": \"Non-commissioned transaction mirroring - debtor\",\r",
" \"026\": \"Commissioned transaction mirroring - creditor\",\r",
" \"027\": \"Commissioned transaction mirroring - debtor\",\r",
" \"028\": \"Age classification - debtor\",\r",
" \"030\": \"Transfer to unfamiliar creditor account - debtor\",\r",
" \"044\": \"Successful transactions from the debtor, including the new transaction\",\r",
" \"045\": \"Successful transactions to the creditor, including the new transaction\",\r",
" \"048\": \"Large transaction amount vs history - debtor\",\r",
" \"054\": \"Synthetic data check - Benford's Law - debtor\",\r",
" \"063\": \"Synthetic data check - Benford's Law - creditor\",\r",
" \"074\": \"Distance over time from last transaction location - debtor\",\r",
" \"075\": \"Distance from habitual locations - debtor\",\r",
" \"076\": \"Time since last transaction - debtor\",\r",
" \"078\": \"Transaction type\",\r",
" \"083\": \"Multiple accounts associated with a debtor\",\r",
" \"084\": \"Multiple accounts associated with a creditor\",\r",
" \"090\": \"Upstream transaction divergence - debtor\",\r",
" \"091\": \"Transaction amount vs regulatory threshold\"\r",
"}\r",
"const typologyDescriptions = {\r",
" \"000\": \"Complete rule coverage\",\r",
" \"001\": \"Use of several currencies, structured transactions, with a great number of persons involved, large number of transactions related to each other during a short time period.\",\r",
" \"002\": \"Receiving funds from high number of senders over a short period of time, large sum transactions compared to person's living standard.\",\r",
" \"003\": \"Large volume of transactions for the same customer with multiple instances of using different name spellings, false addresses or identification that evolves i.e. some parts of the identification change, while other parts remains the same, such as a person whose last name changes while his first name, date of birth, identification number and address remain the same.\",\r",
" \"005\": \"Unusual ratio of sent to received transactions (the direction of the flow of the suspicious ratio imbalance being determined by the context). Large inbound transaction with multiple small withdrawals or payments to multiple individual beneficiaries. Multiple small deposits are made into the account with a single large deposit to another account or large withdrawal from the ATM.\",\r",
" \"010\": \"Series of transactions structured just below the threshold in order to prevent the transaction being reported to the regulatory authority.\",\r",
" \"011\": \"Money transfers from one account to numerous unrelated accounts. The immediate remittance or transfer of funds once they are deposited into an account.\",\r",
" \"013\": \"Holding a large number of accounts with the same Internet payment services provider allows for a customer to access multiple channels through which a transaction is able to be performed. With multiple transacting channels a fraudster or money laundering can structure their activity in order to make it appear more legitimate.\",\r",
" \"024\": \"Large number of transfers between a group of individuals and accounts made in a systematic way\",\r",
" \"028\": \"False promotions, phishing, or social engineering scams.\",\r",
" \"037\": \"Mobile Network Operator Employees/Agents transferring customer funds to personal account.\",\r",
" \"044\": \"Fraudster takes over the account of a legitimate customer and uses monies/credit facilities in them.\",\r",
" \"045\": \"Fraudsters use the personal details of a victim to create bank accounts and apply for credit. The account is then utilised to withdraw the funds or immediate transactions are performed soon after the account is opened\",\r",
" \"047\": \"Fraudsters secure mobile wallet or account details of victims and conduct user-not-present fraud.\",\r",
" \"051\": \"Performing similar transactions (i.e. cash deposits) at multiple branches of the same institution on the same business day\",\r",
" \"052\": \"Accounts of salaried employees credited outside of normal salary scope\",\r",
" \"092\": \"Accounts that show unexpectedly large cash deposits and immediate withdrawals\",\r",
" \"095\": \"Duplication of payments from a single account.\",\r",
" \"098\": \"Customer receives many small incoming wire transfers and then orders a large outgoing wire transfer.\",\r",
" \"105\": \"Associations with multiple accounts under multiple names. Use of aliases for the purpose of opening multiple accounts in different banks, or in different branches of the same bank\",\r",
" \"107\": \"Elaborate movement of funds through different accounts. This may be highlighted through transactional activity on different accounts belonging to the same customer.\",\r",
" \"121\": \"Unexplained deposits into the bank account of an unemployed spouse or minor.\",\r",
" \"124\": \"Large/frequent cash deposits into accounts. This risk can also occur where there are rapid deposits of the same amount into the account. Generally where the deposit is difficult to explain. There are also transfers into the account from other entities. Large amount of cash from unexplained sources. This can also include a large volume of cash and / or cheque deposits into the bank account on a regular basis. Often this is followed up with a number of cheques drawn on the account or suspicious withdrawals.\",\r",
" \"129\": \"Smurfing/scattering illicit funds.\",\r",
" \"137\": \"Transaction in excess of the country's reporting threshold.\",\r",
" \"169\": \"Suspicious transaction amount patterns.\",\r",
" \"179\": \"Improbable transaction location.\",\r",
" \"185\": \"Transaction pattern is not in line with the past transactional patterns. This can be in the value and volume of transactions.\",\r",
" \"191\": \"Cash withdrawal.\",\r",
" \"195\": \"Payments to newly registered accounts.\",\r",
" \"214\": \"Mule accounts.\",\r",
" \"216\": \"The structuring of transactions using the same beneficiaries and a large number of transactions during a short time period.\"\r",
"}\r",
"\r",
"let ruleCount = 0;\r",
"let typologyCount = 0;\r",
"let slowestRule = 0;\r",
"let fastestRule = 999999999;\r",
"let slowestTypology = 0;\r",
"let fastestTypology = 999999999;\r",
"let totalRule = 0;\r",
"let totalTypology = 0;\r",
"let prcgTmDP = resJson.result[0].report.metaData.prcgTmDP;\r",
"let prcgTmED = resJson.result[0].report.metaData.prcgTmED;\r",
"let tadpTime = resJson.result[0].report.tadpResult.prcgTm;\r",
"let whichTypologyIsSlowest = 0;\r",
"let whichTypologyIsFastest = 0;\r",
"let whichRuleIsSlowest = 0;\r",
"\r",
"let typologyTimings = resJson.result[0].report.tadpResult.typologyResult.filter(e => e.prcgTm > 0);\r",
"\r",
"let timingsPerTypology = `Elapsed typology processor time per typology\r",
"====================================================\r",
"`;\r",
"\r",
"let sortedTypologyTimings = typologyTimings.sort((e1, e2) => (e1.prcgTm < e2.prcgTm) ? 1 : (e1.prcgTm > e2.prcgTm) ? -1 : 0);\r",
"\r",
"for (let i = 0; i < sortedTypologyTimings.count(); i++) {\r",
" timingsPerTypology = timingsPerTypology + ` ${sortedTypologyTimings[i].cfg}: ${(sortedTypologyTimings[i].prcgTm/1000000).toFixed(3)}\\n`;\r",
"}\r",
"\r",
"typologyTimings = typologyTimings.filter(e => e.prcgTm > 0).map(e => e.prcgTm);\r",
"\r",
"ruleResults = [];\r",
"for (let i = 0; i < resJson.result[0].report.tadpResult.typologyResult.count(); i++) {\r",
" ruleResultsPerTypology = resJson.result[0].report.tadpResult.typologyResult[i].ruleResults.filter(e => e.prcgTm > 0);\r",
" for (let j = 0; j < ruleResultsPerTypology.count(); j++) {\r",
" ruleResults.push(ruleResultsPerTypology[j]);\r",
" };\r",
" ruleResultsPerTypology = [];\r",
"}\r",
"\r",
"const ruleResultsUnique = [...new Map(ruleResults.map((e) => [e.id, e])).values()];\r",
"ruleTimings = ruleResultsUnique.filter(e => e.prcgTm > 0).map(e => e.prcgTm);\r",
"\r",
"ruleCount = ruleTimings.count();\r",
"typologyCount = typologyTimings.count();\r",
"\r",
"for (let i = 0; i < typologyCount; i++) {\r",
" totalTypology += typologyTimings[i];\r",
" if (typologyTimings[i] > slowestTypology) {\r",
" slowestTypology = typologyTimings[i];\r",
" whichTypologyIsSlowest = i;\r",
" }\r",
" if (typologyTimings[i] < fastestTypology) {\r",
" fastestTypology = typologyTimings[i];\r",
" whichTypologyIsFastest = i;\r",
" }\r",
"}\r",
"\r",
"for (let i = 0; i < ruleCount; i++) {\r",
" totalRule += ruleTimings[i];\r",
" if (ruleTimings[i] > slowestRule) {\r",
" slowestRule = ruleTimings[i];\r",
" }\r",
" if (ruleTimings[i] < fastestRule) {\r",
" fastestRule = ruleTimings[i];\r",
" }\r",
"}\r",
"\r",
"whichRuleIsSlowest = ruleResultsUnique.filter(e => e.prcgTm === slowestRule)[0].id;\r",
"whichRuleIsFastest = ruleResultsUnique.filter(e => e.prcgTm === fastestRule)[0].id;\r",
"\r",
"let totalEstimatedTime = prcgTmDP + prcgTmED + slowestRule + slowestTypology + tadpTime;\r",
"let averageRuleTime = totalRule / ruleCount;\r",
"let averageTypologyTime = totalTypology / typologyCount;\r",
"\r",
"console.log(`====================================================\r",
"Total Estimate Time: ${(totalEstimatedTime/1000000).toFixed(3)}ms;\r",
"====================================================\r",
"Data Preparation Service: ${(prcgTmDP/1000000).toFixed(3)}ms\r",
"ED: ${(prcgTmED/1000000).toFixed(3)}ms\r",
"====================================================\r",
"Number of Rules: ${ruleCount}\r",
"Slowest Rule: ${(slowestRule/1000000).toFixed(3)}ms (Rule ${whichRuleIsSlowest})\r",
"Fastest Rule: ${(fastestRule/1000000).toFixed(3)}ms (Rule ${whichRuleIsFastest})\r",
"Rule Average: ${(averageRuleTime/1000000).toFixed(3)}ms\r",
"====================================================\r",
"Number of Typologies: ${typologyCount}\r",
"Slowest Typology: ${(slowestTypology/1000000).toFixed(3)}ms (Typology ${resJson.result[0].report.tadpResult.typologyResult[whichTypologyIsSlowest].cfg})\r",
"Fastest Typology: ${(fastestTypology/1000000).toFixed(3)}ms (Typology ${resJson.result[0].report.tadpResult.typologyResult[whichTypologyIsFastest].cfg})\r",
"\r",
"Typology Average: ${(averageTypologyTime/1000000).toFixed(3)}ms\r",
"====================================================\r",
"TADP: ${(tadpTime/1000000).toFixed(3)}ms\r",
"====================================================`);\r",
"\r",
"let timingsPerRule = `Elapsed time per rule\r",
"====================================================\r",
"`;\r",
"\r",
"let sortedRuleTimings = ruleResultsUnique.sort((e1, e2) => (e1.prcgTm < e2.prcgTm) ? 1 : (e1.prcgTm > e2.prcgTm) ? -1 : 0);\r",
"\r",
"for (let i = 0; i < sortedRuleTimings.count(); i++) {\r",
" timingsPerRule = timingsPerRule + ` ${sortedRuleTimings[i].id}: ${(sortedRuleTimings[i].prcgTm/1000000).toFixed(3)} - ${ruleDescriptions[sortedRuleTimings[i].id.substring(0,3)]}\\n`;\r",
"}\r",
"\r",
"console.log(timingsPerRule);\r",
"console.log(timingsPerTypology);\r",
"\r",
"let sortedRuleTimingsById = ruleResultsUnique.sort((e1, e2) => (e1.id > e2.id) ? 1 : (e1.id < e2.id) ? -1 : 0);\r",
"\r",
"/* Tests below only apply if the rule reasons are being reported\r",
"================================================================\r",
"pm.test(`Rule 001 result is \"Creditor account is less than 1 day old\"`, function () { pm.expect(sortedRuleTimingsById[0].reason).to.equal(\"Creditor account is less than 1 day old\"); });\r",
"pm.test(`Rule 002 result is \"No transaction convergence detected on debtor account\"`, function () { pm.expect(sortedRuleTimingsById[1].reason).to.equal(\"No transaction convergence detected on debtor account\"); });\r",
"pm.test(`Rule 003 result is \"No verifiable creditor account activity detected\"`, function () { pm.expect(sortedRuleTimingsById[2].reason).to.equal(\"No verifiable creditor account activity detected\"); });\r",
"pm.test(`Rule 004 result is \"No verifiable debtor account activity detected\"`, function () { pm.expect(sortedRuleTimingsById[3].reason).to.equal(\"No verifiable debtor account activity detected\"); });\r",
"pm.test(`Rule 006 result is \"Insufficient transaction history\"`, function () { pm.expect(sortedRuleTimingsById[4].reason).to.equal(\"Insufficient transaction history\"); });\r",
"pm.test(`Rule 007 result is \"Insufficient transaction history\"`, function () { pm.expect(sortedRuleTimingsById[5].reason).to.equal(\"Insufficient transaction history\"); });\r",
"pm.test(`Rule 008 result is \"Insufficient transaction history\"`, function () { pm.expect(sortedRuleTimingsById[6].reason).to.equal(\"Insufficient transaction history\"); });\r",
"pm.test(`Rule 010 result is \"Insufficient transaction history\"`, function () { pm.expect(sortedRuleTimingsById[7].reason).to.equal(\"Insufficient transaction history\"); });\r",
"pm.test(`Rule 011 result is \"Insufficient transaction history\"`, function () { pm.expect(sortedRuleTimingsById[8].reason).to.equal(\"Insufficient transaction history\"); });\r",
"pm.test(`Rule 016 result is \"No Transaction convergence detected on creditor account\"`, function () { pm.expect(sortedRuleTimingsById[9].reason).to.equal(\"No Transaction convergence detected on creditor account\"); });\r",
"pm.test(`Rule 017 result is \"No Transaction divergence detected on source account\"`, function () { pm.expect(sortedRuleTimingsById[10].reason).to.equal(\"No Transaction divergence detected on source account\"); });\r",
"pm.test(`Rule 018 result is \"Insufficient transaction history\"`, function () { pm.expect(sortedRuleTimingsById[11].reason).to.equal(\"Insufficient transaction history\"); });\r",
"pm.test(`Rule 020 result is \"Insufficient transaction history\"`, function () { pm.expect(sortedRuleTimingsById[12].reason).to.equal(\"Insufficient transaction history\"); });\r",
"pm.test(`Rule 021 result is \"Insufficient transaction history\"`, function () { pm.expect(sortedRuleTimingsById[13].reason).to.equal(\"Insufficient transaction history\"); });\r",
"pm.test(`Rule 024 result is \"Insufficient transaction history\"`, function () { pm.expect(sortedRuleTimingsById[14].reason).to.equal(\"Insufficient transaction history\"); });\r",
"pm.test(`Rule 025 result is \"Insufficient transaction history\"`, function () { pm.expect(sortedRuleTimingsById[15].reason).to.equal(\"Insufficient transaction history\"); });\r",
"pm.test(`Rule 026 result is \"Insufficient transaction history\"`, function () { pm.expect(sortedRuleTimingsById[16].reason).to.equal(\"Insufficient transaction history\"); });\r",
"pm.test(`Rule 027 result is \"Insufficient transaction history\"`, function () { pm.expect(sortedRuleTimingsById[17].reason).to.equal(\"Insufficient transaction history\"); });\r",
"pm.test(`Rule 030 result is \"First successful payment from this debtor to creditor account\"`, function () { pm.expect(sortedRuleTimingsById[18].reason).to.equal(\"First successful payment from this debtor to creditor account\"); });\r",
"pm.test(`Rule 044 result is \"To date, one successful payment has been made from debtor account\"`, function () { pm.expect(sortedRuleTimingsById[19].reason).to.equal(\"To date, one successful payment has been made from debtor account\"); });\r",
"pm.test(`Rule 045 result is \"To date, one successful payment has been made to creditor account\"`, function () { pm.expect(sortedRuleTimingsById[20].reason).to.equal(\"To date, one successful payment has been made to creditor account\"); });\r",
"pm.test(`Rule 048 result is \"Insufficient transaction history\"`, function () { pm.expect(sortedRuleTimingsById[21].reason).to.equal(\"Insufficient transaction history\"); });\r",
"pm.test(`Rule 054 result is \"At least 50 historical transactions required\"`, function () { pm.expect(sortedRuleTimingsById[22].reason).to.equal(\"At least 50 historical transactions required\"); });\r",
"pm.test(`Rule 063 result is \"At least 50 historical transactions required\"`, function () { pm.expect(sortedRuleTimingsById[23].reason).to.equal(\"At least 50 historical transactions required\"); });\r",
"pm.test(`Rule 076 result is \"Insufficient transaction history\"`, function () { pm.expect(sortedRuleTimingsById[24].reason).to.equal(\"Insufficient transaction history\"); });\r",
"pm.test(`Rule 083 result is \"Debtor has only one account\"`, function () { pm.expect(sortedRuleTimingsById[25].reason).to.equal(\"Debtor has only one account\"); });\r",
"pm.test(`Rule 084 result is \"Creditor has only one account\"`, function () { pm.expect(sortedRuleTimingsById[26].reason).to.equal(\"Creditor has only one account\"); });\r",
"pm.test(`Rule 090 result is \"Upstream transaction divergence within acceptable limits\"`, function () { pm.expect(sortedRuleTimingsById[27].reason).to.equal(\"Upstream transaction divergence within acceptable limits\"); });\r",
"pm.test(`Rule 091 result is \"Transaction amount within regulatory limits\"`, function () { pm.expect(sortedRuleTimingsById[28].reason).to.equal(\"Transaction amount within regulatory limits\"); });\r",
"*/\r",
"\r",
"for (let i = 0; i < sortedRuleTimingsById.length; i++) {\r",
" pm.test(`Rule ${sortedRuleTimingsById[i].id}@${sortedRuleTimingsById[i].cfg} result.reason omitted`, function () {\r",
" pm.expect(sortedRuleTimingsById[i].reason).to.be.eql(undefined);\r",
" });\r",
"\r",
" pm.test(`Rule ${sortedRuleTimingsById[i].id}@${sortedRuleTimingsById[i].cfg} result.desc omitted`, function () {\r",
" pm.expect(sortedRuleTimingsById[i].desc).to.be.eql(undefined);\r",
" });\r",
"}\r",
"\r",
"pm.test(`Total (estimated) processing time: ${(totalEstimatedTime / 1000000).toFixed(3)} milliseconds`, function () {\r",
" pm.expect(totalEstimatedTime).to.be.greaterThan(0);\r",
"});\r",
"\r",
"pm.test(`Data preparation procesing time: ${(prcgTmDP / 1000000).toFixed(3)} milliseconds`, function () {\r",
" pm.expect(prcgTmDP).to.be.greaterThan(0);\r",
"});\r",
"\r",
"pm.test(`ED procesing time: ${(prcgTmED / 1000000).toFixed(3)} milliseconds`, function () {\r",
" pm.expect(prcgTmED).to.be.greaterThan(0);\r",
"});\r",
"\r",
"pm.test(`Slowest rule procesing time: ${(slowestRule / 1000000).toFixed(3)} milliseconds (Rule ${whichRuleIsSlowest})`, function () {\r",
" pm.expect(slowestRule).to.be.greaterThan(0);\r",
"});\r",
"\r",
"pm.test(`Fastest rule procesing time: ${(fastestRule / 1000000).toFixed(3)} milliseconds (Rule ${whichRuleIsFastest})`, function () {\r",
" pm.expect(fastestRule).to.be.greaterThan(0);\r",
"});\r",
"\r",
"pm.test(`Average rule procesing time: ${(averageRuleTime / 1000000).toFixed(3)} milliseconds`, function () {\r",
" pm.expect(averageRuleTime).to.be.greaterThan(0);\r",
"});\r",
"\r",
"pm.test(`Slowest typology processing time: ${(slowestTypology / 1000000).toFixed(3)} milliseconds (Typology ${resJson.result[0].report.tadpResult.typologyResult[whichTypologyIsSlowest].id})`, function () {\r",
" pm.expect(slowestTypology).to.be.greaterThan(0);\r",
"});\r",
"\r",
"pm.test(`Fastest typology processing time: ${(fastestTypology / 1000000).toFixed(3)} milliseconds (Typology ${resJson.result[0].report.tadpResult.typologyResult[whichTypologyIsFastest].id})`, function () {\r",
" pm.expect(fastestTypology).to.be.lessThan(999999999);\r",
"});\r",
"\r",
"pm.test(`Average typology processing time: ${(averageTypologyTime / 1000000).toFixed(3)} milliseconds`, function () {\r",
" pm.expect(averageTypologyTime).to.be.greaterThan(0);\r",
"});\r",
"\r",
"pm.test(`TADProc processing time: ${(tadpTime / 1000000).toFixed(3)} milliseconds`, function () {\r",
" pm.expect(tadpTime).to.be.greaterThan(0);\r",
"});\r",
"\r",
"pm.test(`Report status is ${expectedAlertStatus}`, function () {\r",
" pm.expect(resJson.result[0].report.status).to.equal(expectedAlertStatus);\r",
"});\r",
"\r",
"let sortedTypologiesById = resJson.result[0].report.tadpResult.typologyResult.sort((e1, e2) => (e1.cfg > e2.cfg) ? 1 : (e1.cfg < e2.cfg) ? -1 : 0);\r",
"\r",
"pm.test(`Evaluation result contains ${totalExpectedTypologies} typology results`, function () {\r",
" pm.expect(sortedTypologiesById.length).to.equal(totalExpectedTypologies);\r",
"});\r",
"\r",
"let ruleWeightingTotal = 0;\r",
"for (let i = 0; i < sortedTypologiesById.length; i++) {\r",
" ruleWeightingTotal = 0;\r",
" for (let j = 0; j < sortedTypologiesById[i].ruleResults.length; j++) {\r",
" ruleWeightingTotal += sortedTypologiesById[i].ruleResults[j].wght;\r",
" }\r",
"\r",
" pm.test(`Typology ${sortedTypologiesById[i].cfg} contains ${rulesPerTypologyCount[i]} rule results`, function () {\r",
" pm.expect(sortedTypologiesById[i].ruleResults.length).to.equal(rulesPerTypologyCount[i]);\r",
" });\r",
"\r",
" pm.test(`Typology ${sortedTypologiesById[i].cfg} result (${sortedTypologiesById[i].result}) matches rule weighting total (${ruleWeightingTotal})`, function () {\r",
" pm.expect(sortedTypologiesById[i].result).to.equal(ruleWeightingTotal);\r",
" });\r",
"\r",
" if (sortedTypologiesById[i].cfg == \"[email protected]\" && expectedAlertStatus == \"ALRT\") {\r",
" pm.test(`Typology ${sortedTypologiesById[i].cfg} result (${sortedTypologiesById[i].result}) breached threshold (${sortedTypologiesById[i].workflow.alertThreshold})`, function () {\r",
" pm.expect(sortedTypologiesById[i].result).to.be.greaterThanOrEqual(sortedTypologiesById[i].workflow.alertThreshold);\r",
" });\r",
" pm.test(`Typology ${sortedTypologiesById[i].cfg} review flag is true`, function () {\r",
" pm.expect(sortedTypologiesById[i].review).to.be.true;\r",
" });\r",
" } else {\r",
" pm.test(`Typology ${sortedTypologiesById[i].cfg} result (${sortedTypologiesById[i].result}) did not breach threshold (${sortedTypologiesById[i].workflow.alertThreshold})`, function () {\r",
" pm.expect(sortedTypologiesById[i].result).to.be.lessThan(sortedTypologiesById[i].workflow.alertThreshold);\r",
" });\r",
" pm.test(`Typology ${sortedTypologiesById[i].cfg} review flag is false`, function () {\r",
" pm.expect(sortedTypologiesById[i].review).to.be.false;\r",
" });\r",
" }\r",
"\r",
" if (interdictionTypologies.includes(sortedTypologiesById[i].cfg.substring(0,3))) {\r",
" pm.test(`Typology ${sortedTypologiesById[i].cfg} interdictionThreshold is greater than zero if not omitted`, function () {\r",
" pm.expect(sortedTypologiesById[i].workflow.interdictionThreshold).to.be.greaterThan(0);\r",
" });\r",
" } else {\r",
" pm.test(`Typology ${sortedTypologiesById[i].cfg} interdictionThreshold is omitted`, function () {\r",
" pm.expect(sortedTypologiesById[i].workflow.interdictionThreshold).to.be.eql(undefined);\r",
" });\r",
" }\r",
"}"
],
"type": "text/javascript",
"packages": {}
}
}
],
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{arangoToken}}",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"query\": \"FOR doc in transactions FILTER doc.transaction.FIToFIPmtSts.GrpHdr.MsgId == '{{messageIdPacs002}}' RETURN doc\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{arangoUrl}}/_db/{{db_results}}/_api/cursor",
"host": [
"{{arangoUrl}}"
],
"path": [
"_db",
"{{db_results}}",
"_api",
"cursor"
]
}
},
"response": []
}
]
}
],
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [
"const uuid = require('uuid');",
"const lodash = require('lodash');",
"",
"const logLevel = \"INFO\";",
"",
"// Message creation defaults",
"const debtorIdType = \"TAZAMA_EID\";",
"const debtorAccountType = \"MSISDN\";",
"const creditorIdType = \"TAZAMA_EID\";",
"const creditorAccountType = \"MSISDN\";",