@justair/justair-library 6.9.0-alpha.d61eca7 → 6.9.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 (61) hide show
  1. package/dist/constants/pollutants.d.ts +206 -44
  2. package/dist/models/admin.d.ts.map +1 -1
  3. package/dist/models/measurements.d.ts +6 -6
  4. package/package.json +3 -14
  5. package/src/constants/pollutants.js +90 -0
  6. package/src/models/admin.js +1 -11
  7. package/tsconfig.json +0 -4
  8. package/dist/modules/audit/actions.d.ts +0 -28
  9. package/dist/modules/audit/actions.d.ts.map +0 -1
  10. package/dist/modules/audit/auditLog.d.ts +0 -32
  11. package/dist/modules/audit/auditLog.d.ts.map +0 -1
  12. package/dist/modules/audit/index.d.ts +0 -4
  13. package/dist/modules/audit/index.d.ts.map +0 -1
  14. package/dist/modules/audit/schema.d.ts +0 -321
  15. package/dist/modules/audit/schema.d.ts.map +0 -1
  16. package/dist/modules/audit/tests/actions.test.d.ts +0 -2
  17. package/dist/modules/audit/tests/actions.test.d.ts.map +0 -1
  18. package/dist/modules/audit/tests/auditLog.test.d.ts +0 -2
  19. package/dist/modules/audit/tests/auditLog.test.d.ts.map +0 -1
  20. package/dist/modules/audit/tests/schema.test.d.ts +0 -2
  21. package/dist/modules/audit/tests/schema.test.d.ts.map +0 -1
  22. package/dist/modules/auth/cookieConfig.d.ts +0 -42
  23. package/dist/modules/auth/cookieConfig.d.ts.map +0 -1
  24. package/dist/modules/auth/extractClaims.d.ts +0 -22
  25. package/dist/modules/auth/extractClaims.d.ts.map +0 -1
  26. package/dist/modules/auth/index.d.ts +0 -6
  27. package/dist/modules/auth/index.d.ts.map +0 -1
  28. package/dist/modules/auth/oidcVerifier.d.ts +0 -22
  29. package/dist/modules/auth/oidcVerifier.d.ts.map +0 -1
  30. package/dist/modules/auth/requestContext.d.ts +0 -25
  31. package/dist/modules/auth/requestContext.d.ts.map +0 -1
  32. package/dist/modules/auth/silentRefresh.d.ts +0 -33
  33. package/dist/modules/auth/silentRefresh.d.ts.map +0 -1
  34. package/dist/modules/auth/tests/cookieConfig.test.d.ts +0 -2
  35. package/dist/modules/auth/tests/cookieConfig.test.d.ts.map +0 -1
  36. package/dist/modules/auth/tests/extractClaims.test.d.ts +0 -2
  37. package/dist/modules/auth/tests/extractClaims.test.d.ts.map +0 -1
  38. package/dist/modules/auth/tests/oidcVerifier.test.d.ts +0 -2
  39. package/dist/modules/auth/tests/oidcVerifier.test.d.ts.map +0 -1
  40. package/dist/modules/auth/tests/requestContext.test.d.ts +0 -2
  41. package/dist/modules/auth/tests/requestContext.test.d.ts.map +0 -1
  42. package/dist/modules/auth/tests/silentRefresh.test.d.ts +0 -2
  43. package/dist/modules/auth/tests/silentRefresh.test.d.ts.map +0 -1
  44. package/src/modules/audit/actions.js +0 -28
  45. package/src/modules/audit/auditLog.js +0 -39
  46. package/src/modules/audit/index.js +0 -8
  47. package/src/modules/audit/schema.js +0 -44
  48. package/src/modules/audit/tests/actions.test.js +0 -26
  49. package/src/modules/audit/tests/auditLog.test.js +0 -47
  50. package/src/modules/audit/tests/schema.test.js +0 -50
  51. package/src/modules/auth/cookieConfig.js +0 -40
  52. package/src/modules/auth/extractClaims.js +0 -26
  53. package/src/modules/auth/index.js +0 -16
  54. package/src/modules/auth/oidcVerifier.js +0 -66
  55. package/src/modules/auth/requestContext.js +0 -20
  56. package/src/modules/auth/silentRefresh.js +0 -77
  57. package/src/modules/auth/tests/cookieConfig.test.js +0 -41
  58. package/src/modules/auth/tests/extractClaims.test.js +0 -36
  59. package/src/modules/auth/tests/oidcVerifier.test.js +0 -101
  60. package/src/modules/auth/tests/requestContext.test.js +0 -17
  61. package/src/modules/auth/tests/silentRefresh.test.js +0 -54
@@ -351,9 +351,7 @@ export namespace PARAMETERS {
351
351
  let impacts_19: any;
352
352
  export { impacts_19 as impacts };
353
353
  }
354
- }
355
- export namespace HEAVY_METALS {
356
- export namespace AS {
354
+ namespace GS {
357
355
  let id_20: string;
358
356
  export { id_20 as id };
359
357
  let label_20: string;
@@ -364,14 +362,14 @@ export namespace HEAVY_METALS {
364
362
  export { unit_20 as unit };
365
363
  let type_20: string;
366
364
  export { type_20 as type };
367
- let rfc_20: number;
365
+ let rfc_20: any;
368
366
  export { rfc_20 as rfc };
369
- let origin_20: string;
367
+ let origin_20: any;
370
368
  export { origin_20 as origin };
371
- let impacts_20: string;
369
+ let impacts_20: any;
372
370
  export { impacts_20 as impacts };
373
371
  }
374
- export namespace BA {
372
+ namespace R {
375
373
  let id_21: string;
376
374
  export { id_21 as id };
377
375
  let label_21: string;
@@ -384,12 +382,12 @@ export namespace HEAVY_METALS {
384
382
  export { type_21 as type };
385
383
  let rfc_21: any;
386
384
  export { rfc_21 as rfc };
387
- let origin_21: string;
385
+ let origin_21: any;
388
386
  export { origin_21 as origin };
389
- let impacts_21: string;
387
+ let impacts_21: any;
390
388
  export { impacts_21 as impacts };
391
389
  }
392
- export namespace C6H6 {
390
+ namespace SR {
393
391
  let id_22: string;
394
392
  export { id_22 as id };
395
393
  let label_22: string;
@@ -400,14 +398,14 @@ export namespace HEAVY_METALS {
400
398
  export { unit_22 as unit };
401
399
  let type_22: string;
402
400
  export { type_22 as type };
403
- let rfc_22: number;
401
+ let rfc_22: any;
404
402
  export { rfc_22 as rfc };
405
- let origin_22: string;
403
+ let origin_22: any;
406
404
  export { origin_22 as origin };
407
- let impacts_22: string;
405
+ let impacts_22: any;
408
406
  export { impacts_22 as impacts };
409
407
  }
410
- export namespace BE {
408
+ namespace P {
411
409
  let id_23: string;
412
410
  export { id_23 as id };
413
411
  let label_23: string;
@@ -418,14 +416,14 @@ export namespace HEAVY_METALS {
418
416
  export { unit_23 as unit };
419
417
  let type_23: string;
420
418
  export { type_23 as type };
421
- let rfc_23: number;
419
+ let rfc_23: any;
422
420
  export { rfc_23 as rfc };
423
- let origin_23: string;
421
+ let origin_23: any;
424
422
  export { origin_23 as origin };
425
- let impacts_23: string;
423
+ let impacts_23: any;
426
424
  export { impacts_23 as impacts };
427
425
  }
428
- export namespace CD {
426
+ namespace PAR {
429
427
  let id_24: string;
430
428
  export { id_24 as id };
431
429
  let label_24: string;
@@ -436,14 +434,14 @@ export namespace HEAVY_METALS {
436
434
  export { unit_24 as unit };
437
435
  let type_24: string;
438
436
  export { type_24 as type };
439
- let rfc_24: number;
437
+ let rfc_24: any;
440
438
  export { rfc_24 as rfc };
441
- let origin_24: string;
439
+ let origin_24: any;
442
440
  export { origin_24 as origin };
443
- let impacts_24: string;
441
+ let impacts_24: any;
444
442
  export { impacts_24 as impacts };
445
443
  }
446
- export namespace CR {
444
+ namespace ARM {
447
445
  let id_25: string;
448
446
  export { id_25 as id };
449
447
  let label_25: string;
@@ -454,14 +452,14 @@ export namespace HEAVY_METALS {
454
452
  export { unit_25 as unit };
455
453
  let type_25: string;
456
454
  export { type_25 as type };
457
- let rfc_25: number;
455
+ let rfc_25: any;
458
456
  export { rfc_25 as rfc };
459
- let origin_25: string;
457
+ let origin_25: any;
460
458
  export { origin_25 as origin };
461
- let impacts_25: string;
459
+ let impacts_25: any;
462
460
  export { impacts_25 as impacts };
463
461
  }
464
- export namespace CO_1 {
462
+ namespace ARW {
465
463
  let id_26: string;
466
464
  export { id_26 as id };
467
465
  let label_26: string;
@@ -474,13 +472,12 @@ export namespace HEAVY_METALS {
474
472
  export { type_26 as type };
475
473
  let rfc_26: any;
476
474
  export { rfc_26 as rfc };
477
- let origin_26: string;
475
+ let origin_26: any;
478
476
  export { origin_26 as origin };
479
- let impacts_26: string;
477
+ let impacts_26: any;
480
478
  export { impacts_26 as impacts };
481
479
  }
482
- export { CO_1 as CO };
483
- export namespace CU {
480
+ namespace ARD {
484
481
  let id_27: string;
485
482
  export { id_27 as id };
486
483
  let label_27: string;
@@ -493,12 +490,12 @@ export namespace HEAVY_METALS {
493
490
  export { type_27 as type };
494
491
  let rfc_27: any;
495
492
  export { rfc_27 as rfc };
496
- let origin_27: string;
493
+ let origin_27: any;
497
494
  export { origin_27 as origin };
498
- let impacts_27: string;
495
+ let impacts_27: any;
499
496
  export { impacts_27 as impacts };
500
497
  }
501
- export namespace FE {
498
+ namespace ARH {
502
499
  let id_28: string;
503
500
  export { id_28 as id };
504
501
  let label_28: string;
@@ -511,12 +508,14 @@ export namespace HEAVY_METALS {
511
508
  export { type_28 as type };
512
509
  let rfc_28: any;
513
510
  export { rfc_28 as rfc };
514
- let origin_28: string;
511
+ let origin_28: any;
515
512
  export { origin_28 as origin };
516
- let impacts_28: string;
513
+ let impacts_28: any;
517
514
  export { impacts_28 as impacts };
518
515
  }
519
- export namespace PB {
516
+ }
517
+ export namespace HEAVY_METALS {
518
+ export namespace AS {
520
519
  let id_29: string;
521
520
  export { id_29 as id };
522
521
  let label_29: string;
@@ -534,7 +533,7 @@ export namespace HEAVY_METALS {
534
533
  let impacts_29: string;
535
534
  export { impacts_29 as impacts };
536
535
  }
537
- export namespace MN {
536
+ export namespace BA {
538
537
  let id_30: string;
539
538
  export { id_30 as id };
540
539
  let label_30: string;
@@ -545,14 +544,14 @@ export namespace HEAVY_METALS {
545
544
  export { unit_30 as unit };
546
545
  let type_30: string;
547
546
  export { type_30 as type };
548
- let rfc_30: number;
547
+ let rfc_30: any;
549
548
  export { rfc_30 as rfc };
550
549
  let origin_30: string;
551
550
  export { origin_30 as origin };
552
551
  let impacts_30: string;
553
552
  export { impacts_30 as impacts };
554
553
  }
555
- export namespace NI {
554
+ export namespace C6H6 {
556
555
  let id_31: string;
557
556
  export { id_31 as id };
558
557
  let label_31: string;
@@ -563,14 +562,14 @@ export namespace HEAVY_METALS {
563
562
  export { unit_31 as unit };
564
563
  let type_31: string;
565
564
  export { type_31 as type };
566
- let rfc_31: any;
565
+ let rfc_31: number;
567
566
  export { rfc_31 as rfc };
568
567
  let origin_31: string;
569
568
  export { origin_31 as origin };
570
569
  let impacts_31: string;
571
570
  export { impacts_31 as impacts };
572
571
  }
573
- export namespace SE {
572
+ export namespace BE {
574
573
  let id_32: string;
575
574
  export { id_32 as id };
576
575
  let label_32: string;
@@ -581,14 +580,14 @@ export namespace HEAVY_METALS {
581
580
  export { unit_32 as unit };
582
581
  let type_32: string;
583
582
  export { type_32 as type };
584
- let rfc_32: any;
583
+ let rfc_32: number;
585
584
  export { rfc_32 as rfc };
586
585
  let origin_32: string;
587
586
  export { origin_32 as origin };
588
587
  let impacts_32: string;
589
588
  export { impacts_32 as impacts };
590
589
  }
591
- export namespace ZN {
590
+ export namespace CD {
592
591
  let id_33: string;
593
592
  export { id_33 as id };
594
593
  let label_33: string;
@@ -599,12 +598,175 @@ export namespace HEAVY_METALS {
599
598
  export { unit_33 as unit };
600
599
  let type_33: string;
601
600
  export { type_33 as type };
602
- let rfc_33: any;
601
+ let rfc_33: number;
603
602
  export { rfc_33 as rfc };
604
603
  let origin_33: string;
605
604
  export { origin_33 as origin };
606
605
  let impacts_33: string;
607
606
  export { impacts_33 as impacts };
608
607
  }
608
+ export namespace CR {
609
+ let id_34: string;
610
+ export { id_34 as id };
611
+ let label_34: string;
612
+ export { label_34 as label };
613
+ let name_34: string;
614
+ export { name_34 as name };
615
+ let unit_34: string;
616
+ export { unit_34 as unit };
617
+ let type_34: string;
618
+ export { type_34 as type };
619
+ let rfc_34: number;
620
+ export { rfc_34 as rfc };
621
+ let origin_34: string;
622
+ export { origin_34 as origin };
623
+ let impacts_34: string;
624
+ export { impacts_34 as impacts };
625
+ }
626
+ export namespace CO_1 {
627
+ let id_35: string;
628
+ export { id_35 as id };
629
+ let label_35: string;
630
+ export { label_35 as label };
631
+ let name_35: string;
632
+ export { name_35 as name };
633
+ let unit_35: string;
634
+ export { unit_35 as unit };
635
+ let type_35: string;
636
+ export { type_35 as type };
637
+ let rfc_35: any;
638
+ export { rfc_35 as rfc };
639
+ let origin_35: string;
640
+ export { origin_35 as origin };
641
+ let impacts_35: string;
642
+ export { impacts_35 as impacts };
643
+ }
644
+ export { CO_1 as CO };
645
+ export namespace CU {
646
+ let id_36: string;
647
+ export { id_36 as id };
648
+ let label_36: string;
649
+ export { label_36 as label };
650
+ let name_36: string;
651
+ export { name_36 as name };
652
+ let unit_36: string;
653
+ export { unit_36 as unit };
654
+ let type_36: string;
655
+ export { type_36 as type };
656
+ let rfc_36: any;
657
+ export { rfc_36 as rfc };
658
+ let origin_36: string;
659
+ export { origin_36 as origin };
660
+ let impacts_36: string;
661
+ export { impacts_36 as impacts };
662
+ }
663
+ export namespace FE {
664
+ let id_37: string;
665
+ export { id_37 as id };
666
+ let label_37: string;
667
+ export { label_37 as label };
668
+ let name_37: string;
669
+ export { name_37 as name };
670
+ let unit_37: string;
671
+ export { unit_37 as unit };
672
+ let type_37: string;
673
+ export { type_37 as type };
674
+ let rfc_37: any;
675
+ export { rfc_37 as rfc };
676
+ let origin_37: string;
677
+ export { origin_37 as origin };
678
+ let impacts_37: string;
679
+ export { impacts_37 as impacts };
680
+ }
681
+ export namespace PB {
682
+ let id_38: string;
683
+ export { id_38 as id };
684
+ let label_38: string;
685
+ export { label_38 as label };
686
+ let name_38: string;
687
+ export { name_38 as name };
688
+ let unit_38: string;
689
+ export { unit_38 as unit };
690
+ let type_38: string;
691
+ export { type_38 as type };
692
+ let rfc_38: number;
693
+ export { rfc_38 as rfc };
694
+ let origin_38: string;
695
+ export { origin_38 as origin };
696
+ let impacts_38: string;
697
+ export { impacts_38 as impacts };
698
+ }
699
+ export namespace MN {
700
+ let id_39: string;
701
+ export { id_39 as id };
702
+ let label_39: string;
703
+ export { label_39 as label };
704
+ let name_39: string;
705
+ export { name_39 as name };
706
+ let unit_39: string;
707
+ export { unit_39 as unit };
708
+ let type_39: string;
709
+ export { type_39 as type };
710
+ let rfc_39: number;
711
+ export { rfc_39 as rfc };
712
+ let origin_39: string;
713
+ export { origin_39 as origin };
714
+ let impacts_39: string;
715
+ export { impacts_39 as impacts };
716
+ }
717
+ export namespace NI {
718
+ let id_40: string;
719
+ export { id_40 as id };
720
+ let label_40: string;
721
+ export { label_40 as label };
722
+ let name_40: string;
723
+ export { name_40 as name };
724
+ let unit_40: string;
725
+ export { unit_40 as unit };
726
+ let type_40: string;
727
+ export { type_40 as type };
728
+ let rfc_40: any;
729
+ export { rfc_40 as rfc };
730
+ let origin_40: string;
731
+ export { origin_40 as origin };
732
+ let impacts_40: string;
733
+ export { impacts_40 as impacts };
734
+ }
735
+ export namespace SE {
736
+ let id_41: string;
737
+ export { id_41 as id };
738
+ let label_41: string;
739
+ export { label_41 as label };
740
+ let name_41: string;
741
+ export { name_41 as name };
742
+ let unit_41: string;
743
+ export { unit_41 as unit };
744
+ let type_41: string;
745
+ export { type_41 as type };
746
+ let rfc_41: any;
747
+ export { rfc_41 as rfc };
748
+ let origin_41: string;
749
+ export { origin_41 as origin };
750
+ let impacts_41: string;
751
+ export { impacts_41 as impacts };
752
+ }
753
+ export namespace ZN {
754
+ let id_42: string;
755
+ export { id_42 as id };
756
+ let label_42: string;
757
+ export { label_42 as label };
758
+ let name_42: string;
759
+ export { name_42 as name };
760
+ let unit_42: string;
761
+ export { unit_42 as unit };
762
+ let type_42: string;
763
+ export { type_42 as type };
764
+ let rfc_42: any;
765
+ export { rfc_42 as rfc };
766
+ let origin_42: string;
767
+ export { origin_42 as origin };
768
+ let impacts_42: string;
769
+ export { impacts_42 as impacts };
770
+ }
609
771
  }
610
772
  //# sourceMappingURL=pollutants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../src/models/admin.js"],"names":[],"mappings":"AAEA,8BAsBG;AAcH,wBAAmD"}
1
+ {"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../src/models/admin.js"],"names":[],"mappings":"AAEA,8BAgBG;AAUH,wBAAmD"}
@@ -6,10 +6,10 @@ export const annotationSchema: mongoose.Schema<any, mongoose.Model<any, any, any
6
6
  _id: true;
7
7
  timestamps: false;
8
8
  }, {
9
- comment: string;
10
- measurementIdentifier: string;
11
9
  source: "admin" | "processing_engine";
12
10
  timestamp: Date;
11
+ comment: string;
12
+ measurementIdentifier: string;
13
13
  adminId?: {
14
14
  prototype?: mongoose.Types.ObjectId;
15
15
  cacheHexString?: unknown;
@@ -20,10 +20,10 @@ export const annotationSchema: mongoose.Schema<any, mongoose.Model<any, any, any
20
20
  isValid?: {};
21
21
  };
22
22
  }, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
23
- comment: string;
24
- measurementIdentifier: string;
25
23
  source: "admin" | "processing_engine";
26
24
  timestamp: Date;
25
+ comment: string;
26
+ measurementIdentifier: string;
27
27
  adminId?: {
28
28
  prototype?: mongoose.Types.ObjectId;
29
29
  cacheHexString?: unknown;
@@ -34,10 +34,10 @@ export const annotationSchema: mongoose.Schema<any, mongoose.Model<any, any, any
34
34
  isValid?: {};
35
35
  };
36
36
  }>> & mongoose.FlatRecord<{
37
- comment: string;
38
- measurementIdentifier: string;
39
37
  source: "admin" | "processing_engine";
40
38
  timestamp: Date;
39
+ comment: string;
40
+ measurementIdentifier: string;
41
41
  adminId?: {
42
42
  prototype?: mongoose.Types.ObjectId;
43
43
  cacheHexString?: unknown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@justair/justair-library",
3
- "version": "6.9.0-alpha.d61eca7",
3
+ "version": "6.9.0",
4
4
  "description": "JustAir Internal Library",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -13,18 +13,10 @@
13
13
  "./constants": {
14
14
  "types": "./dist/constants/pollutants.d.ts",
15
15
  "default": "./src/constants/pollutants.js"
16
- },
17
- "./auth": {
18
- "types": "./dist/modules/auth/index.d.ts",
19
- "default": "./src/modules/auth/index.js"
20
- },
21
- "./audit": {
22
- "types": "./dist/modules/audit/index.d.ts",
23
- "default": "./src/modules/audit/index.js"
24
16
  }
25
17
  },
26
18
  "scripts": {
27
- "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
19
+ "test": "node --experimental-vm-modules node_modules/.bin/jest",
28
20
  "build": "tsc",
29
21
  "prepublish": "npm run build"
30
22
  },
@@ -34,21 +26,18 @@
34
26
  "author": "Britney Epps",
35
27
  "license": "ISC",
36
28
  "dependencies": {
37
- "jose": "^5.10.0",
38
29
  "mongoose": "^7.8.3",
39
30
  "nanoid": "^5.1.6",
40
31
  "winston": "^3.10.0"
41
32
  },
42
33
  "jest": {
43
34
  "testEnvironment": "node",
44
- "transform": {},
45
- "testTimeout": 60000
35
+ "transform": {}
46
36
  },
47
37
  "devDependencies": {
48
38
  "@jest/globals": "^29",
49
39
  "@types/node": "^16.0.0",
50
40
  "jest": "^29",
51
- "mongodb-memory-server": "^11.2.0",
52
41
  "jest-environment-node": "^29",
53
42
  "ts-node": "^10.0.0",
54
43
  "typescript": "^5.3.2"
@@ -201,6 +201,96 @@ export const PARAMETERS = {
201
201
  origin: null,
202
202
  impacts: null,
203
203
  },
204
+ GS: {
205
+ id: "GS",
206
+ label: "Gust Speed",
207
+ name: "Wind Gust Speed (GS)",
208
+ unit: "mph",
209
+ type: "Weather",
210
+ rfc: null,
211
+ origin: null,
212
+ impacts: null,
213
+ },
214
+ R: {
215
+ id: "R",
216
+ label: "Rain",
217
+ name: "Rain (R)",
218
+ unit: "in",
219
+ type: "Weather",
220
+ rfc: null,
221
+ origin: null,
222
+ impacts: null,
223
+ },
224
+ SR: {
225
+ id: "SR",
226
+ label: "Solar Radiation",
227
+ name: "Solar Radiation (SR)",
228
+ unit: "W/m²",
229
+ type: "Weather",
230
+ rfc: null,
231
+ origin: null,
232
+ impacts: null,
233
+ },
234
+ P: {
235
+ id: "P",
236
+ label: "Pressure",
237
+ name: "Air Pressure (P)",
238
+ unit: "inHg",
239
+ type: "Weather",
240
+ rfc: null,
241
+ origin: null,
242
+ impacts: null,
243
+ },
244
+ PAR: {
245
+ id: "PAR",
246
+ label: "PAR",
247
+ name: "Photosynthetically Active Radiation (PAR)",
248
+ unit: "µmol/m²/s",
249
+ type: "Weather",
250
+ rfc: null,
251
+ origin: null,
252
+ impacts: null,
253
+ },
254
+ ARM: {
255
+ id: "ARM",
256
+ label: "Accumulated Rain - Monthly",
257
+ name: "Accumulated Rain - Monthly (ARM)",
258
+ unit: "in",
259
+ type: "Weather",
260
+ rfc: null,
261
+ origin: null,
262
+ impacts: null,
263
+ },
264
+ ARW: {
265
+ id: "ARW",
266
+ label: "Accumulated Rain - Weekly",
267
+ name: "Accumulated Rain - Weekly (ARW)",
268
+ unit: "in",
269
+ type: "Weather",
270
+ rfc: null,
271
+ origin: null,
272
+ impacts: null,
273
+ },
274
+ ARD: {
275
+ id: "ARD",
276
+ label: "Accumulated Rain - Daily",
277
+ name: "Accumulated Rain - Daily (ARD)",
278
+ unit: "in",
279
+ type: "Weather",
280
+ rfc: null,
281
+ origin: null,
282
+ impacts: null,
283
+ },
284
+ ARH: {
285
+ id: "ARH",
286
+ label: "Accumulated Rain - Hourly",
287
+ name: "Accumulated Rain - Hourly (ARH)",
288
+ unit: "in",
289
+ type: "Weather",
290
+ rfc: null,
291
+ origin: null,
292
+ impacts: null,
293
+ },
204
294
  };
205
295
 
206
296
  // Parameters analyzed from physical air samples in a laboratory.
@@ -13,12 +13,6 @@ const adminSchema = mongoose.Schema({
13
13
  authorized: { type: Boolean, default: false },
14
14
  isActive: { type: Boolean, default: false },
15
15
  hasSeenWelcomeScreen: { type: Boolean, default: false },
16
- // Keycloak migration (JA-2814, auth-contracts #5). externalAuthId = Keycloak `sub`.
17
- // Intentionally NO default: it must stay `undefined` (not null) until the migration
18
- // writes it, so the sparse-unique index below skips un-migrated admins instead of
19
- // colliding on many nulls. ssoProvider is reserved for future IdP brokering.
20
- externalAuthId: { type: String },
21
- ssoProvider: { type: String, default: null },
22
16
  },
23
17
  {
24
18
  timestamps: true
@@ -30,12 +24,8 @@ adminSchema.index({ orgId: 1, isActive: 1 });
30
24
  adminSchema.index({ email: 1, isActive: 1 });
31
25
  // Permission-based queries
32
26
  adminSchema.index({ orgId: 1, permissionName: 1 });
33
- // Keycloak subject join key — unique per migrated admin; sparse so absent values
34
- // (un-migrated admins, where externalAuthId is undefined) are not indexed and do
35
- // not collide. Depends on externalAuthId having NO schema default (see above).
36
- adminSchema.index({ externalAuthId: 1 }, { unique: true, sparse: true });
37
27
 
38
28
 
39
29
  const Admin = mongoose.model('Admin', adminSchema);
40
30
 
41
- export {adminSchema, Admin};
31
+ export {adminSchema, Admin};
package/tsconfig.json CHANGED
@@ -2,10 +2,6 @@
2
2
  "include": ["src/**/*"],
3
3
  "compilerOptions": {
4
4
  "allowJs": true,
5
- // Don't type-check dependency .d.ts files (e.g. mongodb-memory-server's bundled
6
- // mongodb types use AsyncDisposable/Symbol.asyncDispose from a newer lib). Our own
7
- // src is still fully checked; this only skips node_modules declarations.
8
- "skipLibCheck": true,
9
5
  // Generate d.ts files
10
6
  "declaration": true,
11
7
  "emitDeclarationOnly": true,
@@ -1,28 +0,0 @@
1
- /**
2
- * Auth/compliance audit action enum (auth-contracts #4 — EXACT strings, frozen).
3
- * Distinct domain from the measurement-lineage `Audit` model in
4
- * models/measurements.js: this tracks WHO did WHAT to admin/auth state, for the
5
- * government-compliance audit trail.
6
- *
7
- * Emit sites (in the services): login (success/failure), logout, forgot-password
8
- * (requested/completed), silent refresh, and the admin mutation sites
9
- * (create/update/delete, role.change when permissionName changes,
10
- * deactivate/reactivate when isActive toggles).
11
- */
12
- export const AUDIT_ACTIONS: Readonly<{
13
- LOGIN_SUCCESS: "auth.login.success";
14
- LOGIN_FAILURE: "auth.login.failure";
15
- LOGOUT: "auth.logout";
16
- PASSWORD_RESET_REQUESTED: "auth.password.reset.requested";
17
- PASSWORD_RESET_COMPLETED: "auth.password.reset.completed";
18
- TOKEN_REFRESH: "auth.token.refresh";
19
- ADMIN_CREATE: "admin.create";
20
- ADMIN_UPDATE: "admin.update";
21
- ADMIN_DELETE: "admin.delete";
22
- ADMIN_ROLE_CHANGE: "admin.role.change";
23
- ADMIN_DEACTIVATE: "admin.deactivate";
24
- ADMIN_REACTIVATE: "admin.reactivate";
25
- }>;
26
- /** Frozen list of all valid action strings — used as the AuditLog schema enum. */
27
- export const AUDIT_ACTION_VALUES: readonly ("auth.login.success" | "auth.login.failure" | "auth.logout" | "auth.password.reset.requested" | "auth.password.reset.completed" | "auth.token.refresh" | "admin.create" | "admin.update" | "admin.delete" | "admin.role.change" | "admin.deactivate" | "admin.reactivate")[];
28
- //# sourceMappingURL=actions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/modules/audit/actions.js"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH;;;;;;;;;;;;;GAaG;AAEH,kFAAkF;AAClF,yTAA+E"}