@genesislcap/foundation-utils 14.148.1-alpha-eef6f33.0 → 14.149.0

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.
Files changed (2) hide show
  1. package/dist/custom-elements.json +613 -613
  2. package/package.json +10 -10
@@ -153,53 +153,198 @@
153
153
  },
154
154
  {
155
155
  "kind": "javascript-module",
156
- "path": "src/decorators/index.ts",
157
- "declarations": [],
158
- "exports": [
159
- {
160
- "kind": "js",
161
- "name": "*",
162
- "declaration": {
163
- "name": "*",
164
- "package": "./renderOnChange"
165
- }
166
- }
167
- ]
168
- },
169
- {
170
- "kind": "javascript-module",
171
- "path": "src/decorators/renderOnChange.ts",
156
+ "path": "src/data/inMemoryDatabase.ts",
172
157
  "declarations": [
173
158
  {
174
- "kind": "function",
175
- "name": "renderOnChange",
176
- "parameters": [
159
+ "kind": "class",
160
+ "description": "An in memory database of specific DatabaseRecord types.",
161
+ "name": "InMemoryDatabase",
162
+ "members": [
177
163
  {
178
- "name": "target",
164
+ "kind": "field",
165
+ "name": "isWorking",
179
166
  "type": {
180
- "text": "FASTElement & { render(): void }"
167
+ "text": "boolean"
181
168
  },
182
- "description": "The target to define the property change handler on."
169
+ "privacy": "public",
170
+ "default": "false"
183
171
  },
184
172
  {
185
- "name": "name",
173
+ "kind": "field",
174
+ "name": "records",
186
175
  "type": {
187
- "text": "string"
176
+ "text": "Record<string, T>"
188
177
  },
189
- "description": "The property name."
178
+ "privacy": "private",
179
+ "default": "{}"
180
+ },
181
+ {
182
+ "kind": "field",
183
+ "name": "beforeUpdateListeners",
184
+ "privacy": "private"
185
+ },
186
+ {
187
+ "kind": "field",
188
+ "name": "afterUpdateListeners",
189
+ "privacy": "private"
190
+ },
191
+ {
192
+ "kind": "method",
193
+ "name": "create",
194
+ "privacy": "public",
195
+ "return": {
196
+ "type": {
197
+ "text": "Promise<DatabaseAccessResult.Create<T>>"
198
+ }
199
+ },
200
+ "parameters": [
201
+ {
202
+ "name": "newValue",
203
+ "type": {
204
+ "text": "Omit<T, 'id'>"
205
+ }
206
+ }
207
+ ]
208
+ },
209
+ {
210
+ "kind": "method",
211
+ "name": "read",
212
+ "privacy": "public",
213
+ "return": {
214
+ "type": {
215
+ "text": "Promise<DatabaseAccessResult.Read<T>>"
216
+ }
217
+ },
218
+ "parameters": [
219
+ {
220
+ "name": "id",
221
+ "type": {
222
+ "text": "string"
223
+ }
224
+ }
225
+ ]
226
+ },
227
+ {
228
+ "kind": "method",
229
+ "name": "update",
230
+ "privacy": "public",
231
+ "return": {
232
+ "type": {
233
+ "text": "Promise<DatabaseAccessResult.Update<T>>"
234
+ }
235
+ },
236
+ "parameters": [
237
+ {
238
+ "name": "id",
239
+ "type": {
240
+ "text": "string"
241
+ }
242
+ },
243
+ {
244
+ "name": "newValue",
245
+ "type": {
246
+ "text": "Omit<Partial<T>, 'id'>"
247
+ }
248
+ }
249
+ ]
250
+ },
251
+ {
252
+ "kind": "method",
253
+ "name": "delete",
254
+ "privacy": "public",
255
+ "return": {
256
+ "type": {
257
+ "text": "Promise<DatabaseAccessResult.Delete>"
258
+ }
259
+ },
260
+ "parameters": [
261
+ {
262
+ "name": "id",
263
+ "type": {
264
+ "text": "string"
265
+ }
266
+ }
267
+ ]
268
+ },
269
+ {
270
+ "kind": "method",
271
+ "name": "visit",
272
+ "privacy": "public",
273
+ "return": {
274
+ "type": {
275
+ "text": "Promise<void>"
276
+ }
277
+ },
278
+ "parameters": [
279
+ {
280
+ "name": "visitor",
281
+ "type": {
282
+ "text": "(record: T) => void"
283
+ }
284
+ }
285
+ ]
286
+ },
287
+ {
288
+ "kind": "method",
289
+ "name": "onBeforeUpdate",
290
+ "privacy": "public",
291
+ "return": {
292
+ "type": {
293
+ "text": "() => void"
294
+ }
295
+ },
296
+ "parameters": [
297
+ {
298
+ "name": "listener",
299
+ "type": {
300
+ "text": "Listener<DatabaseEvent.BeforeUpdate<T>>"
301
+ }
302
+ }
303
+ ]
304
+ },
305
+ {
306
+ "kind": "method",
307
+ "name": "onAfterUpdate",
308
+ "privacy": "public",
309
+ "return": {
310
+ "type": {
311
+ "text": "() => void"
312
+ }
313
+ },
314
+ "parameters": [
315
+ {
316
+ "name": "listener",
317
+ "type": {
318
+ "text": "Listener<DatabaseEvent.AfterUpdate<T>>"
319
+ }
320
+ }
321
+ ]
190
322
  }
191
- ],
192
- "description": "Defines a property changed handler that calls a render() method on the target as an internal observation enhancement.",
193
- "privacy": "public"
323
+ ]
194
324
  }
195
325
  ],
196
326
  "exports": [
197
327
  {
198
328
  "kind": "js",
199
- "name": "renderOnChange",
329
+ "name": "InMemoryDatabase",
200
330
  "declaration": {
201
- "name": "renderOnChange",
202
- "module": "src/decorators/renderOnChange.ts"
331
+ "name": "InMemoryDatabase",
332
+ "module": "src/data/inMemoryDatabase.ts"
333
+ }
334
+ }
335
+ ]
336
+ },
337
+ {
338
+ "kind": "javascript-module",
339
+ "path": "src/data/index.ts",
340
+ "declarations": [],
341
+ "exports": [
342
+ {
343
+ "kind": "js",
344
+ "name": "*",
345
+ "declaration": {
346
+ "name": "*",
347
+ "package": "./inMemoryDatabase"
203
348
  }
204
349
  }
205
350
  ]
@@ -279,747 +424,666 @@
279
424
  },
280
425
  {
281
426
  "kind": "javascript-module",
282
- "path": "src/error/errorMap.ts",
427
+ "path": "src/decorators/index.ts",
428
+ "declarations": [],
429
+ "exports": [
430
+ {
431
+ "kind": "js",
432
+ "name": "*",
433
+ "declaration": {
434
+ "name": "*",
435
+ "package": "./renderOnChange"
436
+ }
437
+ }
438
+ ]
439
+ },
440
+ {
441
+ "kind": "javascript-module",
442
+ "path": "src/decorators/renderOnChange.ts",
283
443
  "declarations": [
284
444
  {
285
- "kind": "class",
286
- "description": "",
287
- "name": "DefaultErrorMap",
288
- "members": [
289
- {
290
- "kind": "field",
291
- "name": "map",
292
- "privacy": "private",
293
- "default": "new Map<keyof TErrorDetailMap, Error>()"
294
- },
445
+ "kind": "function",
446
+ "name": "renderOnChange",
447
+ "parameters": [
295
448
  {
296
- "kind": "field",
297
- "name": "lastError",
449
+ "name": "target",
298
450
  "type": {
299
- "text": "Error"
451
+ "text": "FASTElement & { render(): void }"
300
452
  },
301
- "description": "{@inheritDoc ErrorMap.lastError}"
453
+ "description": "The target to define the property change handler on."
302
454
  },
303
455
  {
304
- "kind": "method",
305
- "name": "set",
306
- "return": {
307
- "type": {
308
- "text": "void"
309
- }
456
+ "name": "name",
457
+ "type": {
458
+ "text": "string"
310
459
  },
311
- "parameters": [
312
- {
313
- "name": "key",
314
- "type": {
315
- "text": "keyof TErrorDetailMap"
316
- }
317
- },
318
- {
319
- "name": "error",
320
- "type": {
321
- "text": "Error"
322
- }
323
- }
324
- ],
325
- "description": "{@inheritDoc ErrorMap.set}"
326
- },
327
- {
328
- "kind": "method",
329
- "name": "get",
330
- "return": {
331
- "type": {
332
- "text": ""
333
- }
334
- },
335
- "parameters": [
336
- {
337
- "name": "key",
338
- "type": {
339
- "text": "keyof TErrorDetailMap"
340
- },
341
- "description": "The key."
342
- }
343
- ],
344
- "description": "Get an error by key.",
345
- "privacy": "public"
346
- },
347
- {
348
- "kind": "method",
349
- "name": "has",
350
- "return": {
351
- "type": {
352
- "text": ""
353
- }
354
- },
355
- "parameters": [
356
- {
357
- "name": "key",
358
- "type": {
359
- "text": "keyof TErrorDetailMap"
360
- },
361
- "description": "The key."
362
- }
363
- ],
364
- "description": "Has an error for key.",
365
- "privacy": "public"
366
- },
367
- {
368
- "kind": "method",
369
- "name": "delete",
370
- "return": {
371
- "type": {
372
- "text": ""
373
- }
374
- },
375
- "parameters": [
376
- {
377
- "name": "key",
378
- "type": {
379
- "text": "keyof TErrorDetailMap"
380
- },
381
- "description": "The key."
382
- }
383
- ],
384
- "description": "Delete an error.",
385
- "privacy": "public"
386
- },
387
- {
388
- "kind": "method",
389
- "name": "clear",
390
- "description": "Clear errors.",
391
- "privacy": "public"
392
- },
393
- {
394
- "kind": "field",
395
- "name": "size",
396
- "type": {
397
- "text": "number"
398
- },
399
- "description": "The size of the error map.",
400
- "return": {
401
- "type": {
402
- "text": ""
403
- }
404
- },
405
- "privacy": "public",
406
- "readonly": true
407
- },
408
- {
409
- "kind": "method",
410
- "name": "values",
411
- "privacy": "public"
412
- },
413
- {
414
- "kind": "field",
415
- "name": "messages",
416
- "type": {
417
- "text": "string"
418
- },
419
- "description": "{@inheritDoc ErrorMap.messages}",
420
- "readonly": true
421
- }
422
- ]
423
- },
424
- {
425
- "kind": "function",
426
- "name": "createErrorMap",
427
- "return": {
428
- "type": {
429
- "text": ""
430
- }
431
- },
432
- "parameters": [
433
- {
434
- "name": "logger",
435
- "type": {
436
- "text": "ErrorMapLogger"
437
- },
438
- "description": "A logger error method reference."
460
+ "description": "The property name."
439
461
  }
440
462
  ],
441
- "description": "A factory to create the error map.",
463
+ "description": "Defines a property changed handler that calls a render() method on the target as an internal observation enhancement.",
442
464
  "privacy": "public"
443
465
  }
444
466
  ],
445
467
  "exports": [
446
468
  {
447
469
  "kind": "js",
448
- "name": "DefaultErrorMap",
470
+ "name": "renderOnChange",
449
471
  "declaration": {
450
- "name": "DefaultErrorMap",
451
- "module": "src/error/errorMap.ts"
472
+ "name": "renderOnChange",
473
+ "module": "src/decorators/renderOnChange.ts"
474
+ }
475
+ }
476
+ ]
477
+ },
478
+ {
479
+ "kind": "javascript-module",
480
+ "path": "src/env/index.ts",
481
+ "declarations": [],
482
+ "exports": [
483
+ {
484
+ "kind": "js",
485
+ "name": "*",
486
+ "declaration": {
487
+ "name": "*",
488
+ "package": "./is-dev"
452
489
  }
453
490
  },
454
491
  {
455
492
  "kind": "js",
456
- "name": "createErrorMap",
493
+ "name": "*",
457
494
  "declaration": {
458
- "name": "createErrorMap",
459
- "module": "src/error/errorMap.ts"
495
+ "name": "*",
496
+ "package": "./variables"
460
497
  }
461
498
  }
462
499
  ]
463
500
  },
464
501
  {
465
502
  "kind": "javascript-module",
466
- "path": "src/error/index.ts",
467
- "declarations": [],
503
+ "path": "src/env/is-dev.ts",
504
+ "declarations": [
505
+ {
506
+ "kind": "function",
507
+ "name": "isDev",
508
+ "description": "Determines if the current environment is a development environment.",
509
+ "privacy": "public"
510
+ }
511
+ ],
468
512
  "exports": [
469
513
  {
470
514
  "kind": "js",
471
- "name": "*",
515
+ "name": "isDev",
472
516
  "declaration": {
473
- "name": "*",
474
- "package": "./errorMap"
517
+ "name": "isDev",
518
+ "module": "src/env/is-dev.ts"
475
519
  }
476
520
  }
477
521
  ]
478
522
  },
479
523
  {
480
524
  "kind": "javascript-module",
481
- "path": "src/formatters/datetime.ts",
525
+ "path": "src/env/variables.ts",
482
526
  "declarations": [
483
527
  {
484
- "kind": "function",
485
- "name": "formatDateTimestamp",
486
- "return": {
487
- "type": {
488
- "text": "string"
489
- }
528
+ "kind": "variable",
529
+ "name": "SOCKET_EXT",
530
+ "type": {
531
+ "text": "string"
532
+ }
533
+ },
534
+ {
535
+ "kind": "variable",
536
+ "name": "_SOCKET_EXT",
537
+ "type": {
538
+ "text": "string"
490
539
  },
491
- "parameters": [
492
- {
493
- "name": "timestamp",
494
- "type": {
495
- "text": "number"
496
- }
497
- }
498
- ],
499
- "description": "Formats [DATE] UNIX Timestamps (without time) to readable strings",
540
+ "default": "'gwf'",
541
+ "description": "The sub-path used for WebSocket connections when API_HOST is not set",
500
542
  "privacy": "public"
501
543
  },
502
544
  {
503
- "kind": "function",
504
- "name": "formatDateTimeTimestamp",
505
- "return": {
506
- "type": {
507
- "text": "string"
508
- }
545
+ "kind": "variable",
546
+ "name": "FORCE_HTTP",
547
+ "type": {
548
+ "text": "string"
549
+ }
550
+ },
551
+ {
552
+ "kind": "variable",
553
+ "name": "_FORCE_HTTP",
554
+ "type": {
555
+ "text": "string"
509
556
  },
510
- "parameters": [
511
- {
512
- "name": "timestamp",
513
- "type": {
514
- "text": "number"
515
- }
516
- }
517
- ],
518
- "description": "Formats [DATETIME] UNIX Timestamps (with time) to readable strings",
557
+ "description": "The path to a JSON config file for the HTTP mode.",
519
558
  "privacy": "public"
520
559
  },
521
560
  {
522
- "kind": "function",
523
- "name": "formatTimestamp",
524
- "return": {
525
- "type": {
526
- "text": "string"
527
- }
561
+ "kind": "variable",
562
+ "name": "API_HOST",
563
+ "type": {
564
+ "text": "string"
565
+ }
566
+ },
567
+ {
568
+ "kind": "variable",
569
+ "name": "_API_HOST",
570
+ "type": {
571
+ "text": "string"
528
572
  },
529
- "parameters": [
530
- {
531
- "name": "timestamp",
532
- "type": {
533
- "text": "number"
534
- },
535
- "description": "The UNIX Timestamp."
536
- },
537
- {
538
- "name": "withTime",
539
- "type": {
540
- "text": "boolean"
541
- },
542
- "description": "The flag to determine if formatted value should contain 'time' info."
543
- }
544
- ],
545
- "description": "Formats [DATE|DATETIME] Unix Timestamps to readable strings",
573
+ "default": "`${PROTOCOL}//${location.host}/${_SOCKET_EXT}/`",
574
+ "description": "The Genesis Server URL (WebSocket or HTTP).",
575
+ "privacy": "public"
576
+ },
577
+ {
578
+ "kind": "variable",
579
+ "name": "HTTP_CONFIG",
580
+ "type": {
581
+ "text": "string"
582
+ }
583
+ },
584
+ {
585
+ "kind": "variable",
586
+ "name": "_HTTP_CONFIG",
587
+ "type": {
588
+ "text": "string"
589
+ },
590
+ "description": "Configuration settings for HTTP, used in http connect flow [`genesislcap-foundation-comms.HttpConnectConfig`](https://link-to-docs).",
591
+ "privacy": "public"
592
+ },
593
+ {
594
+ "kind": "variable",
595
+ "name": "DEFAULT_ORGANISATION",
596
+ "type": {
597
+ "text": "string"
598
+ }
599
+ },
600
+ {
601
+ "kind": "variable",
602
+ "name": "_DEFAULT_ORGANISATION",
603
+ "type": {
604
+ "text": "string"
605
+ },
606
+ "description": "The default Organisation value, used in auth/login flow [`genesislcap-foundation-login`](https://link-to-docs).",
607
+ "privacy": "public"
608
+ },
609
+ {
610
+ "kind": "variable",
611
+ "name": "DEFAULT_PASSWORD",
612
+ "type": {
613
+ "text": "string"
614
+ }
615
+ },
616
+ {
617
+ "kind": "variable",
618
+ "name": "_DEFAULT_PASSWORD",
619
+ "type": {
620
+ "text": "string"
621
+ },
622
+ "description": "The default Password value, used in auth/login flow [`genesislcap-foundation-login`](https://link-to-docs).",
623
+ "privacy": "public"
624
+ },
625
+ {
626
+ "kind": "variable",
627
+ "name": "DEFAULT_USER",
628
+ "type": {
629
+ "text": "string"
630
+ }
631
+ },
632
+ {
633
+ "kind": "variable",
634
+ "name": "_DEFAULT_USER",
635
+ "type": {
636
+ "text": "string"
637
+ },
638
+ "description": "The default Username value, used in auth/login flow [`genesislcap-foundation-login`](https://link-to-docs).",
546
639
  "privacy": "public"
547
640
  }
548
641
  ],
549
642
  "exports": [
550
643
  {
551
644
  "kind": "js",
552
- "name": "formatDateTimestamp",
645
+ "name": "SOCKET_EXT",
553
646
  "declaration": {
554
- "name": "formatDateTimestamp",
555
- "module": "src/formatters/datetime.ts"
647
+ "name": "_SOCKET_EXT",
648
+ "module": "src/env/variables.ts"
556
649
  }
557
650
  },
558
651
  {
559
652
  "kind": "js",
560
- "name": "formatDateTimeTimestamp",
653
+ "name": "FORCE_HTTP",
561
654
  "declaration": {
562
- "name": "formatDateTimeTimestamp",
563
- "module": "src/formatters/datetime.ts"
655
+ "name": "_FORCE_HTTP",
656
+ "module": "src/env/variables.ts"
564
657
  }
565
658
  },
566
659
  {
567
660
  "kind": "js",
568
- "name": "formatTimestamp",
661
+ "name": "API_HOST",
569
662
  "declaration": {
570
- "name": "formatTimestamp",
571
- "module": "src/formatters/datetime.ts"
663
+ "name": "_API_HOST",
664
+ "module": "src/env/variables.ts"
572
665
  }
573
- }
574
- ]
575
- },
576
- {
577
- "kind": "javascript-module",
578
- "path": "src/formatters/index.ts",
579
- "declarations": [],
580
- "exports": [
666
+ },
581
667
  {
582
668
  "kind": "js",
583
- "name": "*",
669
+ "name": "HTTP_CONFIG",
584
670
  "declaration": {
585
- "name": "*",
586
- "package": "./datetime"
671
+ "name": "_HTTP_CONFIG",
672
+ "module": "src/env/variables.ts"
587
673
  }
588
674
  },
589
675
  {
590
676
  "kind": "js",
591
- "name": "*",
677
+ "name": "DEFAULT_ORGANISATION",
592
678
  "declaration": {
593
- "name": "*",
594
- "package": "./localeNumberParser"
679
+ "name": "_DEFAULT_ORGANISATION",
680
+ "module": "src/env/variables.ts"
681
+ }
682
+ },
683
+ {
684
+ "kind": "js",
685
+ "name": "DEFAULT_PASSWORD",
686
+ "declaration": {
687
+ "name": "_DEFAULT_PASSWORD",
688
+ "module": "src/env/variables.ts"
689
+ }
690
+ },
691
+ {
692
+ "kind": "js",
693
+ "name": "DEFAULT_USER",
694
+ "declaration": {
695
+ "name": "_DEFAULT_USER",
696
+ "module": "src/env/variables.ts"
595
697
  }
596
698
  }
597
699
  ]
598
700
  },
599
701
  {
600
702
  "kind": "javascript-module",
601
- "path": "src/formatters/localeNumberParser.ts",
703
+ "path": "src/error/errorMap.ts",
602
704
  "declarations": [
603
705
  {
604
706
  "kind": "class",
605
707
  "description": "",
606
- "name": "NumberParser",
708
+ "name": "DefaultErrorMap",
607
709
  "members": [
608
710
  {
609
711
  "kind": "field",
610
- "name": "_decimal",
611
- "type": {
612
- "text": "RegExp"
613
- },
712
+ "name": "map",
614
713
  "privacy": "private",
615
- "default": "new RegExp(`[${parts.find((d) => d.type === 'decimal').value}]`)"
714
+ "default": "new Map<keyof TErrorDetailMap, Error>()"
616
715
  },
617
716
  {
618
717
  "kind": "field",
619
- "name": "_separator",
718
+ "name": "lastError",
620
719
  "type": {
621
- "text": "RegExp"
720
+ "text": "Error"
622
721
  },
623
- "privacy": "private",
624
- "default": "new RegExp(\n `[$${parts.find((d) => d.type === 'decimal').value}](?:0*$|[^0]0+$)`,\n )"
722
+ "description": "{@inheritDoc ErrorMap.lastError}"
625
723
  },
626
724
  {
627
- "kind": "field",
628
- "name": "_numeral",
629
- "type": {
630
- "text": "RegExp"
725
+ "kind": "method",
726
+ "name": "set",
727
+ "return": {
728
+ "type": {
729
+ "text": "void"
730
+ }
631
731
  },
632
- "privacy": "private",
633
- "default": "new RegExp(`[${numerals.join('')}]`, 'g')"
732
+ "parameters": [
733
+ {
734
+ "name": "key",
735
+ "type": {
736
+ "text": "keyof TErrorDetailMap"
737
+ }
738
+ },
739
+ {
740
+ "name": "error",
741
+ "type": {
742
+ "text": "Error"
743
+ }
744
+ }
745
+ ],
746
+ "description": "{@inheritDoc ErrorMap.set}"
634
747
  },
635
748
  {
636
- "kind": "field",
637
- "name": "_index",
638
- "type": {
639
- "text": "any"
749
+ "kind": "method",
750
+ "name": "get",
751
+ "return": {
752
+ "type": {
753
+ "text": ""
754
+ }
755
+ },
756
+ "parameters": [
757
+ {
758
+ "name": "key",
759
+ "type": {
760
+ "text": "keyof TErrorDetailMap"
761
+ },
762
+ "description": "The key."
763
+ }
764
+ ],
765
+ "description": "Get an error by key.",
766
+ "privacy": "public"
767
+ },
768
+ {
769
+ "kind": "method",
770
+ "name": "has",
771
+ "return": {
772
+ "type": {
773
+ "text": ""
774
+ }
640
775
  },
641
- "privacy": "private"
642
- },
643
- {
644
- "kind": "method",
645
- "name": "parse",
646
776
  "parameters": [
647
777
  {
648
- "name": "localeNumber",
778
+ "name": "key",
649
779
  "type": {
650
- "text": "string"
651
- }
780
+ "text": "keyof TErrorDetailMap"
781
+ },
782
+ "description": "The key."
652
783
  }
653
- ]
784
+ ],
785
+ "description": "Has an error for key.",
786
+ "privacy": "public"
654
787
  },
655
788
  {
656
789
  "kind": "method",
657
- "name": "hasSeparator",
790
+ "name": "delete",
658
791
  "return": {
659
792
  "type": {
660
- "text": "boolean"
793
+ "text": ""
661
794
  }
662
795
  },
663
796
  "parameters": [
664
797
  {
665
- "name": "localeNumber",
798
+ "name": "key",
666
799
  "type": {
667
- "text": "string"
668
- }
800
+ "text": "keyof TErrorDetailMap"
801
+ },
802
+ "description": "The key."
669
803
  }
670
- ]
804
+ ],
805
+ "description": "Delete an error.",
806
+ "privacy": "public"
807
+ },
808
+ {
809
+ "kind": "method",
810
+ "name": "clear",
811
+ "description": "Clear errors.",
812
+ "privacy": "public"
671
813
  },
672
814
  {
673
815
  "kind": "field",
674
- "name": "_group",
675
- "default": "new RegExp(`[${parts.find((d) => d.type === 'group').value}]`, 'g')"
816
+ "name": "size",
817
+ "type": {
818
+ "text": "number"
819
+ },
820
+ "description": "The size of the error map.",
821
+ "return": {
822
+ "type": {
823
+ "text": ""
824
+ }
825
+ },
826
+ "privacy": "public",
827
+ "readonly": true
828
+ },
829
+ {
830
+ "kind": "method",
831
+ "name": "values",
832
+ "privacy": "public"
833
+ },
834
+ {
835
+ "kind": "field",
836
+ "name": "messages",
837
+ "type": {
838
+ "text": "string"
839
+ },
840
+ "description": "{@inheritDoc ErrorMap.messages}",
841
+ "readonly": true
676
842
  }
677
843
  ]
678
- }
679
- ],
680
- "exports": [
844
+ },
681
845
  {
682
- "kind": "js",
683
- "name": "NumberParser",
684
- "declaration": {
685
- "name": "NumberParser",
686
- "module": "src/formatters/localeNumberParser.ts"
687
- }
846
+ "kind": "function",
847
+ "name": "createErrorMap",
848
+ "return": {
849
+ "type": {
850
+ "text": ""
851
+ }
852
+ },
853
+ "parameters": [
854
+ {
855
+ "name": "logger",
856
+ "type": {
857
+ "text": "ErrorMapLogger"
858
+ },
859
+ "description": "A logger error method reference."
860
+ }
861
+ ],
862
+ "description": "A factory to create the error map.",
863
+ "privacy": "public"
688
864
  }
689
- ]
690
- },
691
- {
692
- "kind": "javascript-module",
693
- "path": "src/env/index.ts",
694
- "declarations": [],
865
+ ],
695
866
  "exports": [
696
867
  {
697
868
  "kind": "js",
698
- "name": "*",
869
+ "name": "DefaultErrorMap",
699
870
  "declaration": {
700
- "name": "*",
701
- "package": "./is-dev"
871
+ "name": "DefaultErrorMap",
872
+ "module": "src/error/errorMap.ts"
702
873
  }
703
874
  },
704
875
  {
705
876
  "kind": "js",
706
- "name": "*",
877
+ "name": "createErrorMap",
707
878
  "declaration": {
708
- "name": "*",
709
- "package": "./variables"
879
+ "name": "createErrorMap",
880
+ "module": "src/error/errorMap.ts"
710
881
  }
711
882
  }
712
883
  ]
713
884
  },
714
885
  {
715
886
  "kind": "javascript-module",
716
- "path": "src/env/is-dev.ts",
717
- "declarations": [
718
- {
719
- "kind": "function",
720
- "name": "isDev",
721
- "description": "Determines if the current environment is a development environment.",
722
- "privacy": "public"
723
- }
724
- ],
887
+ "path": "src/error/index.ts",
888
+ "declarations": [],
725
889
  "exports": [
726
890
  {
727
891
  "kind": "js",
728
- "name": "isDev",
892
+ "name": "*",
729
893
  "declaration": {
730
- "name": "isDev",
731
- "module": "src/env/is-dev.ts"
894
+ "name": "*",
895
+ "package": "./errorMap"
732
896
  }
733
897
  }
734
898
  ]
735
899
  },
736
900
  {
737
901
  "kind": "javascript-module",
738
- "path": "src/env/variables.ts",
902
+ "path": "src/formatters/datetime.ts",
739
903
  "declarations": [
740
904
  {
741
- "kind": "variable",
742
- "name": "SOCKET_EXT",
743
- "type": {
744
- "text": "string"
745
- }
746
- },
747
- {
748
- "kind": "variable",
749
- "name": "_SOCKET_EXT",
750
- "type": {
751
- "text": "string"
752
- },
753
- "default": "'gwf'",
754
- "description": "The sub-path used for WebSocket connections when API_HOST is not set",
755
- "privacy": "public"
756
- },
757
- {
758
- "kind": "variable",
759
- "name": "FORCE_HTTP",
760
- "type": {
761
- "text": "string"
762
- }
763
- },
764
- {
765
- "kind": "variable",
766
- "name": "_FORCE_HTTP",
767
- "type": {
768
- "text": "string"
769
- },
770
- "description": "The path to a JSON config file for the HTTP mode.",
771
- "privacy": "public"
772
- },
773
- {
774
- "kind": "variable",
775
- "name": "API_HOST",
776
- "type": {
777
- "text": "string"
778
- }
779
- },
780
- {
781
- "kind": "variable",
782
- "name": "_API_HOST",
783
- "type": {
784
- "text": "string"
785
- },
786
- "default": "`${PROTOCOL}//${location.host}/${_SOCKET_EXT}/`",
787
- "description": "The Genesis Server URL (WebSocket or HTTP).",
788
- "privacy": "public"
789
- },
790
- {
791
- "kind": "variable",
792
- "name": "HTTP_CONFIG",
793
- "type": {
794
- "text": "string"
795
- }
796
- },
797
- {
798
- "kind": "variable",
799
- "name": "_HTTP_CONFIG",
800
- "type": {
801
- "text": "string"
802
- },
803
- "description": "Configuration settings for HTTP, used in http connect flow [`genesislcap-foundation-comms.HttpConnectConfig`](https://link-to-docs).",
804
- "privacy": "public"
805
- },
806
- {
807
- "kind": "variable",
808
- "name": "DEFAULT_ORGANISATION",
809
- "type": {
810
- "text": "string"
811
- }
812
- },
813
- {
814
- "kind": "variable",
815
- "name": "_DEFAULT_ORGANISATION",
816
- "type": {
817
- "text": "string"
905
+ "kind": "function",
906
+ "name": "formatDateTimestamp",
907
+ "return": {
908
+ "type": {
909
+ "text": "string"
910
+ }
818
911
  },
819
- "description": "The default Organisation value, used in auth/login flow [`genesislcap-foundation-login`](https://link-to-docs).",
912
+ "parameters": [
913
+ {
914
+ "name": "timestamp",
915
+ "type": {
916
+ "text": "number"
917
+ }
918
+ }
919
+ ],
920
+ "description": "Formats [DATE] UNIX Timestamps (without time) to readable strings",
820
921
  "privacy": "public"
821
922
  },
822
923
  {
823
- "kind": "variable",
824
- "name": "DEFAULT_PASSWORD",
825
- "type": {
826
- "text": "string"
827
- }
828
- },
829
- {
830
- "kind": "variable",
831
- "name": "_DEFAULT_PASSWORD",
832
- "type": {
833
- "text": "string"
924
+ "kind": "function",
925
+ "name": "formatDateTimeTimestamp",
926
+ "return": {
927
+ "type": {
928
+ "text": "string"
929
+ }
834
930
  },
835
- "description": "The default Password value, used in auth/login flow [`genesislcap-foundation-login`](https://link-to-docs).",
836
- "privacy": "public"
837
- },
838
- {
839
- "kind": "variable",
840
- "name": "DEFAULT_USER",
841
- "type": {
842
- "text": "string"
843
- }
931
+ "parameters": [
932
+ {
933
+ "name": "timestamp",
934
+ "type": {
935
+ "text": "number"
936
+ }
937
+ }
938
+ ],
939
+ "description": "Formats [DATETIME] UNIX Timestamps (with time) to readable strings",
940
+ "privacy": "public"
844
941
  },
845
942
  {
846
- "kind": "variable",
847
- "name": "_DEFAULT_USER",
848
- "type": {
849
- "text": "string"
943
+ "kind": "function",
944
+ "name": "formatTimestamp",
945
+ "return": {
946
+ "type": {
947
+ "text": "string"
948
+ }
850
949
  },
851
- "description": "The default Username value, used in auth/login flow [`genesislcap-foundation-login`](https://link-to-docs).",
950
+ "parameters": [
951
+ {
952
+ "name": "timestamp",
953
+ "type": {
954
+ "text": "number"
955
+ },
956
+ "description": "The UNIX Timestamp."
957
+ },
958
+ {
959
+ "name": "withTime",
960
+ "type": {
961
+ "text": "boolean"
962
+ },
963
+ "description": "The flag to determine if formatted value should contain 'time' info."
964
+ }
965
+ ],
966
+ "description": "Formats [DATE|DATETIME] Unix Timestamps to readable strings",
852
967
  "privacy": "public"
853
968
  }
854
969
  ],
855
970
  "exports": [
856
971
  {
857
972
  "kind": "js",
858
- "name": "SOCKET_EXT",
859
- "declaration": {
860
- "name": "_SOCKET_EXT",
861
- "module": "src/env/variables.ts"
862
- }
863
- },
864
- {
865
- "kind": "js",
866
- "name": "FORCE_HTTP",
867
- "declaration": {
868
- "name": "_FORCE_HTTP",
869
- "module": "src/env/variables.ts"
870
- }
871
- },
872
- {
873
- "kind": "js",
874
- "name": "API_HOST",
973
+ "name": "formatDateTimestamp",
875
974
  "declaration": {
876
- "name": "_API_HOST",
877
- "module": "src/env/variables.ts"
975
+ "name": "formatDateTimestamp",
976
+ "module": "src/formatters/datetime.ts"
878
977
  }
879
978
  },
880
979
  {
881
980
  "kind": "js",
882
- "name": "HTTP_CONFIG",
981
+ "name": "formatDateTimeTimestamp",
883
982
  "declaration": {
884
- "name": "_HTTP_CONFIG",
885
- "module": "src/env/variables.ts"
983
+ "name": "formatDateTimeTimestamp",
984
+ "module": "src/formatters/datetime.ts"
886
985
  }
887
986
  },
888
987
  {
889
988
  "kind": "js",
890
- "name": "DEFAULT_ORGANISATION",
989
+ "name": "formatTimestamp",
891
990
  "declaration": {
892
- "name": "_DEFAULT_ORGANISATION",
893
- "module": "src/env/variables.ts"
991
+ "name": "formatTimestamp",
992
+ "module": "src/formatters/datetime.ts"
894
993
  }
895
- },
994
+ }
995
+ ]
996
+ },
997
+ {
998
+ "kind": "javascript-module",
999
+ "path": "src/formatters/index.ts",
1000
+ "declarations": [],
1001
+ "exports": [
896
1002
  {
897
1003
  "kind": "js",
898
- "name": "DEFAULT_PASSWORD",
1004
+ "name": "*",
899
1005
  "declaration": {
900
- "name": "_DEFAULT_PASSWORD",
901
- "module": "src/env/variables.ts"
1006
+ "name": "*",
1007
+ "package": "./datetime"
902
1008
  }
903
1009
  },
904
1010
  {
905
1011
  "kind": "js",
906
- "name": "DEFAULT_USER",
1012
+ "name": "*",
907
1013
  "declaration": {
908
- "name": "_DEFAULT_USER",
909
- "module": "src/env/variables.ts"
1014
+ "name": "*",
1015
+ "package": "./localeNumberParser"
910
1016
  }
911
1017
  }
912
1018
  ]
913
1019
  },
914
1020
  {
915
1021
  "kind": "javascript-module",
916
- "path": "src/data/inMemoryDatabase.ts",
1022
+ "path": "src/formatters/localeNumberParser.ts",
917
1023
  "declarations": [
918
1024
  {
919
1025
  "kind": "class",
920
- "description": "An in memory database of specific DatabaseRecord types.",
921
- "name": "InMemoryDatabase",
1026
+ "description": "",
1027
+ "name": "NumberParser",
922
1028
  "members": [
923
1029
  {
924
1030
  "kind": "field",
925
- "name": "isWorking",
1031
+ "name": "_decimal",
926
1032
  "type": {
927
- "text": "boolean"
1033
+ "text": "RegExp"
928
1034
  },
929
- "privacy": "public",
930
- "default": "false"
1035
+ "privacy": "private",
1036
+ "default": "new RegExp(`[${parts.find((d) => d.type === 'decimal').value}]`)"
931
1037
  },
932
1038
  {
933
1039
  "kind": "field",
934
- "name": "records",
1040
+ "name": "_separator",
935
1041
  "type": {
936
- "text": "Record<string, T>"
1042
+ "text": "RegExp"
937
1043
  },
938
1044
  "privacy": "private",
939
- "default": "{}"
940
- },
941
- {
942
- "kind": "field",
943
- "name": "beforeUpdateListeners",
944
- "privacy": "private"
1045
+ "default": "new RegExp(\n `[$${parts.find((d) => d.type === 'decimal').value}](?:0*$|[^0]0+$)`,\n )"
945
1046
  },
946
1047
  {
947
1048
  "kind": "field",
948
- "name": "afterUpdateListeners",
949
- "privacy": "private"
950
- },
951
- {
952
- "kind": "method",
953
- "name": "create",
954
- "privacy": "public",
955
- "return": {
956
- "type": {
957
- "text": "Promise<DatabaseAccessResult.Create<T>>"
958
- }
1049
+ "name": "_numeral",
1050
+ "type": {
1051
+ "text": "RegExp"
959
1052
  },
960
- "parameters": [
961
- {
962
- "name": "newValue",
963
- "type": {
964
- "text": "Omit<T, 'id'>"
965
- }
966
- }
967
- ]
1053
+ "privacy": "private",
1054
+ "default": "new RegExp(`[${numerals.join('')}]`, 'g')"
968
1055
  },
969
1056
  {
970
- "kind": "method",
971
- "name": "read",
972
- "privacy": "public",
973
- "return": {
974
- "type": {
975
- "text": "Promise<DatabaseAccessResult.Read<T>>"
976
- }
1057
+ "kind": "field",
1058
+ "name": "_index",
1059
+ "type": {
1060
+ "text": "any"
977
1061
  },
978
- "parameters": [
979
- {
980
- "name": "id",
981
- "type": {
982
- "text": "string"
983
- }
984
- }
985
- ]
1062
+ "privacy": "private"
986
1063
  },
987
1064
  {
988
1065
  "kind": "method",
989
- "name": "update",
990
- "privacy": "public",
991
- "return": {
992
- "type": {
993
- "text": "Promise<DatabaseAccessResult.Update<T>>"
994
- }
995
- },
1066
+ "name": "parse",
996
1067
  "parameters": [
997
1068
  {
998
- "name": "id",
1069
+ "name": "localeNumber",
999
1070
  "type": {
1000
1071
  "text": "string"
1001
1072
  }
1002
- },
1003
- {
1004
- "name": "newValue",
1005
- "type": {
1006
- "text": "Omit<Partial<T>, 'id'>"
1007
- }
1008
1073
  }
1009
1074
  ]
1010
1075
  },
1011
1076
  {
1012
1077
  "kind": "method",
1013
- "name": "delete",
1014
- "privacy": "public",
1078
+ "name": "hasSeparator",
1015
1079
  "return": {
1016
1080
  "type": {
1017
- "text": "Promise<DatabaseAccessResult.Delete>"
1081
+ "text": "boolean"
1018
1082
  }
1019
1083
  },
1020
1084
  "parameters": [
1021
1085
  {
1022
- "name": "id",
1086
+ "name": "localeNumber",
1023
1087
  "type": {
1024
1088
  "text": "string"
1025
1089
  }
@@ -1027,58 +1091,9 @@
1027
1091
  ]
1028
1092
  },
1029
1093
  {
1030
- "kind": "method",
1031
- "name": "visit",
1032
- "privacy": "public",
1033
- "return": {
1034
- "type": {
1035
- "text": "Promise<void>"
1036
- }
1037
- },
1038
- "parameters": [
1039
- {
1040
- "name": "visitor",
1041
- "type": {
1042
- "text": "(record: T) => void"
1043
- }
1044
- }
1045
- ]
1046
- },
1047
- {
1048
- "kind": "method",
1049
- "name": "onBeforeUpdate",
1050
- "privacy": "public",
1051
- "return": {
1052
- "type": {
1053
- "text": "() => void"
1054
- }
1055
- },
1056
- "parameters": [
1057
- {
1058
- "name": "listener",
1059
- "type": {
1060
- "text": "Listener<DatabaseEvent.BeforeUpdate<T>>"
1061
- }
1062
- }
1063
- ]
1064
- },
1065
- {
1066
- "kind": "method",
1067
- "name": "onAfterUpdate",
1068
- "privacy": "public",
1069
- "return": {
1070
- "type": {
1071
- "text": "() => void"
1072
- }
1073
- },
1074
- "parameters": [
1075
- {
1076
- "name": "listener",
1077
- "type": {
1078
- "text": "Listener<DatabaseEvent.AfterUpdate<T>>"
1079
- }
1080
- }
1081
- ]
1094
+ "kind": "field",
1095
+ "name": "_group",
1096
+ "default": "new RegExp(`[${parts.find((d) => d.type === 'group').value}]`, 'g')"
1082
1097
  }
1083
1098
  ]
1084
1099
  }
@@ -1086,25 +1101,10 @@
1086
1101
  "exports": [
1087
1102
  {
1088
1103
  "kind": "js",
1089
- "name": "InMemoryDatabase",
1090
- "declaration": {
1091
- "name": "InMemoryDatabase",
1092
- "module": "src/data/inMemoryDatabase.ts"
1093
- }
1094
- }
1095
- ]
1096
- },
1097
- {
1098
- "kind": "javascript-module",
1099
- "path": "src/data/index.ts",
1100
- "declarations": [],
1101
- "exports": [
1102
- {
1103
- "kind": "js",
1104
- "name": "*",
1104
+ "name": "NumberParser",
1105
1105
  "declaration": {
1106
- "name": "*",
1107
- "package": "./inMemoryDatabase"
1106
+ "name": "NumberParser",
1107
+ "module": "src/formatters/localeNumberParser.ts"
1108
1108
  }
1109
1109
  }
1110
1110
  ]