@justair/justair-library 7.3.0 → 7.4.0-alpha.5a16ace

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.
package/README.md CHANGED
@@ -97,6 +97,18 @@ The following parameters were added to `HEAVY_METALS` and are now included in `s
97
97
  | `MN` | Manganese |
98
98
  | `SE` | Selenium |
99
99
 
100
+ ### New met parameters in 7.4.0
101
+
102
+ The following parameters were added to `PARAMETERS` and are now included in `parametersEnum`. Consuming services that display or filter parameters without a `type` filter (admin pickers, notification threshold UIs, reporting) will start showing them on install, even though no service writes them yet.
103
+
104
+ | id | Name | Unit |
105
+ |---|---|---|
106
+ | `T_AMB` | Ambient Temperature | `°F` |
107
+ | `RH_AMB` | Ambient Relative Humidity | `%` |
108
+ | `DP_AMB` | Ambient Dew Point | `°F` |
109
+
110
+ These are **not** interchangeable with the bare `T` / `RH` / `DP` ids, which are enclosure-internal readings used only by correction equations and fog detection. Never fall back from one kind to the other. See "Ambient vs internal met parameters" in `CLAUDE.md` before wiring these up. `MET_INTERNAL_TO_AMBIENT_PARAMETERS` exports the pairing as data, and `MET_INTERNAL_PARAMETERS_TO_HIDE` exports the ids that are safe to hide from public surfaces today (`T` and `RH` only; `DP` joins in JA-3061), so consumers filter on data instead of hardcoding the six ids.
111
+
100
112
  ### Object shape
101
113
 
102
114
  Each constant is an object with the following fields:
@@ -279,7 +279,7 @@ export namespace PARAMETERS {
279
279
  let impacts_15: any;
280
280
  export { impacts_15 as impacts };
281
281
  }
282
- namespace RH {
282
+ namespace DP_AMB {
283
283
  let id_16: string;
284
284
  export { id_16 as id };
285
285
  let label_16: string;
@@ -297,7 +297,7 @@ export namespace PARAMETERS {
297
297
  let impacts_16: any;
298
298
  export { impacts_16 as impacts };
299
299
  }
300
- namespace T {
300
+ namespace RH {
301
301
  let id_17: string;
302
302
  export { id_17 as id };
303
303
  let label_17: string;
@@ -315,7 +315,7 @@ export namespace PARAMETERS {
315
315
  let impacts_17: any;
316
316
  export { impacts_17 as impacts };
317
317
  }
318
- namespace WD {
318
+ namespace RH_AMB {
319
319
  let id_18: string;
320
320
  export { id_18 as id };
321
321
  let label_18: string;
@@ -333,7 +333,7 @@ export namespace PARAMETERS {
333
333
  let impacts_18: any;
334
334
  export { impacts_18 as impacts };
335
335
  }
336
- namespace WS {
336
+ namespace T {
337
337
  let id_19: string;
338
338
  export { id_19 as id };
339
339
  let label_19: string;
@@ -351,7 +351,7 @@ export namespace PARAMETERS {
351
351
  let impacts_19: any;
352
352
  export { impacts_19 as impacts };
353
353
  }
354
- namespace GS {
354
+ namespace T_AMB {
355
355
  let id_20: string;
356
356
  export { id_20 as id };
357
357
  let label_20: string;
@@ -369,7 +369,7 @@ export namespace PARAMETERS {
369
369
  let impacts_20: any;
370
370
  export { impacts_20 as impacts };
371
371
  }
372
- namespace R {
372
+ namespace WD {
373
373
  let id_21: string;
374
374
  export { id_21 as id };
375
375
  let label_21: string;
@@ -387,7 +387,7 @@ export namespace PARAMETERS {
387
387
  let impacts_21: any;
388
388
  export { impacts_21 as impacts };
389
389
  }
390
- namespace SR {
390
+ namespace WS {
391
391
  let id_22: string;
392
392
  export { id_22 as id };
393
393
  let label_22: string;
@@ -405,7 +405,7 @@ export namespace PARAMETERS {
405
405
  let impacts_22: any;
406
406
  export { impacts_22 as impacts };
407
407
  }
408
- namespace P {
408
+ namespace GS {
409
409
  let id_23: string;
410
410
  export { id_23 as id };
411
411
  let label_23: string;
@@ -423,7 +423,7 @@ export namespace PARAMETERS {
423
423
  let impacts_23: any;
424
424
  export { impacts_23 as impacts };
425
425
  }
426
- namespace PAR {
426
+ namespace R {
427
427
  let id_24: string;
428
428
  export { id_24 as id };
429
429
  let label_24: string;
@@ -441,7 +441,7 @@ export namespace PARAMETERS {
441
441
  let impacts_24: any;
442
442
  export { impacts_24 as impacts };
443
443
  }
444
- namespace ARM {
444
+ namespace SR {
445
445
  let id_25: string;
446
446
  export { id_25 as id };
447
447
  let label_25: string;
@@ -459,7 +459,7 @@ export namespace PARAMETERS {
459
459
  let impacts_25: any;
460
460
  export { impacts_25 as impacts };
461
461
  }
462
- namespace ARW {
462
+ namespace P {
463
463
  let id_26: string;
464
464
  export { id_26 as id };
465
465
  let label_26: string;
@@ -477,7 +477,7 @@ export namespace PARAMETERS {
477
477
  let impacts_26: any;
478
478
  export { impacts_26 as impacts };
479
479
  }
480
- namespace ARD {
480
+ namespace PAR {
481
481
  let id_27: string;
482
482
  export { id_27 as id };
483
483
  let label_27: string;
@@ -495,7 +495,7 @@ export namespace PARAMETERS {
495
495
  let impacts_27: any;
496
496
  export { impacts_27 as impacts };
497
497
  }
498
- namespace ARH {
498
+ namespace ARM {
499
499
  let id_28: string;
500
500
  export { id_28 as id };
501
501
  let label_28: string;
@@ -513,9 +513,7 @@ export namespace PARAMETERS {
513
513
  let impacts_28: any;
514
514
  export { impacts_28 as impacts };
515
515
  }
516
- }
517
- export namespace HEAVY_METALS {
518
- export namespace AS {
516
+ namespace ARW {
519
517
  let id_29: string;
520
518
  export { id_29 as id };
521
519
  let label_29: string;
@@ -526,14 +524,14 @@ export namespace HEAVY_METALS {
526
524
  export { unit_29 as unit };
527
525
  let type_29: string;
528
526
  export { type_29 as type };
529
- let rfc_29: number;
527
+ let rfc_29: any;
530
528
  export { rfc_29 as rfc };
531
- let origin_29: string;
529
+ let origin_29: any;
532
530
  export { origin_29 as origin };
533
- let impacts_29: string;
531
+ let impacts_29: any;
534
532
  export { impacts_29 as impacts };
535
533
  }
536
- export namespace BA {
534
+ namespace ARD {
537
535
  let id_30: string;
538
536
  export { id_30 as id };
539
537
  let label_30: string;
@@ -546,12 +544,12 @@ export namespace HEAVY_METALS {
546
544
  export { type_30 as type };
547
545
  let rfc_30: any;
548
546
  export { rfc_30 as rfc };
549
- let origin_30: string;
547
+ let origin_30: any;
550
548
  export { origin_30 as origin };
551
- let impacts_30: string;
549
+ let impacts_30: any;
552
550
  export { impacts_30 as impacts };
553
551
  }
554
- export namespace C6H6 {
552
+ namespace ARH {
555
553
  let id_31: string;
556
554
  export { id_31 as id };
557
555
  let label_31: string;
@@ -562,14 +560,22 @@ export namespace HEAVY_METALS {
562
560
  export { unit_31 as unit };
563
561
  let type_31: string;
564
562
  export { type_31 as type };
565
- let rfc_31: number;
563
+ let rfc_31: any;
566
564
  export { rfc_31 as rfc };
567
- let origin_31: string;
565
+ let origin_31: any;
568
566
  export { origin_31 as origin };
569
- let impacts_31: string;
567
+ let impacts_31: any;
570
568
  export { impacts_31 as impacts };
571
569
  }
572
- export namespace BE {
570
+ }
571
+ export const MET_INTERNAL_TO_AMBIENT_PARAMETERS: Readonly<{
572
+ T: "T_AMB";
573
+ RH: "RH_AMB";
574
+ DP: "DP_AMB";
575
+ }>;
576
+ export const MET_INTERNAL_PARAMETERS_TO_HIDE: readonly string[];
577
+ export namespace HEAVY_METALS {
578
+ export namespace AS {
573
579
  let id_32: string;
574
580
  export { id_32 as id };
575
581
  let label_32: string;
@@ -587,7 +593,7 @@ export namespace HEAVY_METALS {
587
593
  let impacts_32: string;
588
594
  export { impacts_32 as impacts };
589
595
  }
590
- export namespace CD {
596
+ export namespace BA {
591
597
  let id_33: string;
592
598
  export { id_33 as id };
593
599
  let label_33: string;
@@ -598,14 +604,14 @@ export namespace HEAVY_METALS {
598
604
  export { unit_33 as unit };
599
605
  let type_33: string;
600
606
  export { type_33 as type };
601
- let rfc_33: number;
607
+ let rfc_33: any;
602
608
  export { rfc_33 as rfc };
603
609
  let origin_33: string;
604
610
  export { origin_33 as origin };
605
611
  let impacts_33: string;
606
612
  export { impacts_33 as impacts };
607
613
  }
608
- export namespace CR {
614
+ export namespace C6H6 {
609
615
  let id_34: string;
610
616
  export { id_34 as id };
611
617
  let label_34: string;
@@ -623,7 +629,7 @@ export namespace HEAVY_METALS {
623
629
  let impacts_34: string;
624
630
  export { impacts_34 as impacts };
625
631
  }
626
- export namespace CO_1 {
632
+ export namespace BE {
627
633
  let id_35: string;
628
634
  export { id_35 as id };
629
635
  let label_35: string;
@@ -634,15 +640,14 @@ export namespace HEAVY_METALS {
634
640
  export { unit_35 as unit };
635
641
  let type_35: string;
636
642
  export { type_35 as type };
637
- let rfc_35: any;
643
+ let rfc_35: number;
638
644
  export { rfc_35 as rfc };
639
645
  let origin_35: string;
640
646
  export { origin_35 as origin };
641
647
  let impacts_35: string;
642
648
  export { impacts_35 as impacts };
643
649
  }
644
- export { CO_1 as CO };
645
- export namespace CU {
650
+ export namespace CD {
646
651
  let id_36: string;
647
652
  export { id_36 as id };
648
653
  let label_36: string;
@@ -653,14 +658,14 @@ export namespace HEAVY_METALS {
653
658
  export { unit_36 as unit };
654
659
  let type_36: string;
655
660
  export { type_36 as type };
656
- let rfc_36: any;
661
+ let rfc_36: number;
657
662
  export { rfc_36 as rfc };
658
663
  let origin_36: string;
659
664
  export { origin_36 as origin };
660
665
  let impacts_36: string;
661
666
  export { impacts_36 as impacts };
662
667
  }
663
- export namespace FE {
668
+ export namespace CR {
664
669
  let id_37: string;
665
670
  export { id_37 as id };
666
671
  let label_37: string;
@@ -671,14 +676,14 @@ export namespace HEAVY_METALS {
671
676
  export { unit_37 as unit };
672
677
  let type_37: string;
673
678
  export { type_37 as type };
674
- let rfc_37: any;
679
+ let rfc_37: number;
675
680
  export { rfc_37 as rfc };
676
681
  let origin_37: string;
677
682
  export { origin_37 as origin };
678
683
  let impacts_37: string;
679
684
  export { impacts_37 as impacts };
680
685
  }
681
- export namespace PB {
686
+ export namespace CO_1 {
682
687
  let id_38: string;
683
688
  export { id_38 as id };
684
689
  let label_38: string;
@@ -689,14 +694,15 @@ export namespace HEAVY_METALS {
689
694
  export { unit_38 as unit };
690
695
  let type_38: string;
691
696
  export { type_38 as type };
692
- let rfc_38: number;
697
+ let rfc_38: any;
693
698
  export { rfc_38 as rfc };
694
699
  let origin_38: string;
695
700
  export { origin_38 as origin };
696
701
  let impacts_38: string;
697
702
  export { impacts_38 as impacts };
698
703
  }
699
- export namespace MN {
704
+ export { CO_1 as CO };
705
+ export namespace CU {
700
706
  let id_39: string;
701
707
  export { id_39 as id };
702
708
  let label_39: string;
@@ -707,14 +713,14 @@ export namespace HEAVY_METALS {
707
713
  export { unit_39 as unit };
708
714
  let type_39: string;
709
715
  export { type_39 as type };
710
- let rfc_39: number;
716
+ let rfc_39: any;
711
717
  export { rfc_39 as rfc };
712
718
  let origin_39: string;
713
719
  export { origin_39 as origin };
714
720
  let impacts_39: string;
715
721
  export { impacts_39 as impacts };
716
722
  }
717
- export namespace NI {
723
+ export namespace FE {
718
724
  let id_40: string;
719
725
  export { id_40 as id };
720
726
  let label_40: string;
@@ -732,7 +738,7 @@ export namespace HEAVY_METALS {
732
738
  let impacts_40: string;
733
739
  export { impacts_40 as impacts };
734
740
  }
735
- export namespace SE {
741
+ export namespace PB {
736
742
  let id_41: string;
737
743
  export { id_41 as id };
738
744
  let label_41: string;
@@ -743,14 +749,14 @@ export namespace HEAVY_METALS {
743
749
  export { unit_41 as unit };
744
750
  let type_41: string;
745
751
  export { type_41 as type };
746
- let rfc_41: any;
752
+ let rfc_41: number;
747
753
  export { rfc_41 as rfc };
748
754
  let origin_41: string;
749
755
  export { origin_41 as origin };
750
756
  let impacts_41: string;
751
757
  export { impacts_41 as impacts };
752
758
  }
753
- export namespace ZN {
759
+ export namespace MN {
754
760
  let id_42: string;
755
761
  export { id_42 as id };
756
762
  let label_42: string;
@@ -761,12 +767,66 @@ export namespace HEAVY_METALS {
761
767
  export { unit_42 as unit };
762
768
  let type_42: string;
763
769
  export { type_42 as type };
764
- let rfc_42: any;
770
+ let rfc_42: number;
765
771
  export { rfc_42 as rfc };
766
772
  let origin_42: string;
767
773
  export { origin_42 as origin };
768
774
  let impacts_42: string;
769
775
  export { impacts_42 as impacts };
770
776
  }
777
+ export namespace NI {
778
+ let id_43: string;
779
+ export { id_43 as id };
780
+ let label_43: string;
781
+ export { label_43 as label };
782
+ let name_43: string;
783
+ export { name_43 as name };
784
+ let unit_43: string;
785
+ export { unit_43 as unit };
786
+ let type_43: string;
787
+ export { type_43 as type };
788
+ let rfc_43: any;
789
+ export { rfc_43 as rfc };
790
+ let origin_43: string;
791
+ export { origin_43 as origin };
792
+ let impacts_43: string;
793
+ export { impacts_43 as impacts };
794
+ }
795
+ export namespace SE {
796
+ let id_44: string;
797
+ export { id_44 as id };
798
+ let label_44: string;
799
+ export { label_44 as label };
800
+ let name_44: string;
801
+ export { name_44 as name };
802
+ let unit_44: string;
803
+ export { unit_44 as unit };
804
+ let type_44: string;
805
+ export { type_44 as type };
806
+ let rfc_44: any;
807
+ export { rfc_44 as rfc };
808
+ let origin_44: string;
809
+ export { origin_44 as origin };
810
+ let impacts_44: string;
811
+ export { impacts_44 as impacts };
812
+ }
813
+ export namespace ZN {
814
+ let id_45: string;
815
+ export { id_45 as id };
816
+ let label_45: string;
817
+ export { label_45 as label };
818
+ let name_45: string;
819
+ export { name_45 as name };
820
+ let unit_45: string;
821
+ export { unit_45 as unit };
822
+ let type_45: string;
823
+ export { type_45 as type };
824
+ let rfc_45: any;
825
+ export { rfc_45 as rfc };
826
+ let origin_45: string;
827
+ export { origin_45 as origin };
828
+ let impacts_45: string;
829
+ export { impacts_45 as impacts };
830
+ }
771
831
  }
772
832
  //# sourceMappingURL=pollutants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pollutants.d.ts","sourceRoot":"","sources":["../../src/constants/pollutants.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"pollutants.d.ts","sourceRoot":"","sources":["../../src/constants/pollutants.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiVA;;;;GAIG;AAOH,gEAA0E"}
package/dist/index.d.ts CHANGED
@@ -101,6 +101,8 @@ import { validateDownloadTimezone as validateDataDownloadTimezone } from "./util
101
101
  import { normalizeDownloadTimezone as normalizeDataDownloadTimezone } from "./utils/dataDownloadValidation.js";
102
102
  import { PARAMETERS } from "./constants/pollutants.js";
103
103
  import { HEAVY_METALS } from "./constants/pollutants.js";
104
+ import { MET_INTERNAL_TO_AMBIENT_PARAMETERS } from "./constants/pollutants.js";
105
+ import { MET_INTERNAL_PARAMETERS_TO_HIDE } from "./constants/pollutants.js";
104
106
  import { ALERT_LEVEL_WEIGHTS } from "./constants/alertLevels.js";
105
107
  import { getAlertWeight } from "./constants/alertLevels.js";
106
108
  import { splitName } from "./utils/splitName.js";
@@ -113,5 +115,5 @@ import { validateQuietHours } from "./utils/quietHours.js";
113
115
  import { getZoneMinutes } from "./utils/quietHours.js";
114
116
  import { isInQuietWindow } from "./utils/quietHours.js";
115
117
  import { resolveQuietHours } from "./utils/quietHours.js";
116
- export { Database, adminSchema, Admin, configurationsSchema, Configurations, measurementsSchema, Measurements, monitorRequestsSchema, MonitorRequests, monitorsSchema, Monitors, organizationsSchema, Organizations, usersSchema, Users, COOKIE_CONSENT_CATEGORIES, COOKIE_CONSENT_VALUES, validateCookieConsent, eventsSchema, Events, lightMonitorSchema, LightMonitors, monitorSuppliersSchema, MonitorSuppliers, contextsSchema, Contexts, parametersSchema, Parameters, announcementSchema, Announcements, jobsSchema, Jobs, apiKeySchema, ApiKey, UsageMetrics, usageMetricsSchema, Audit, auditSchema, EventsAudit, eventsAuditSchema, MonitorAudit, monitorAuditSchema, parametersEnum, deploymentTypesEnum, AlertsAudit, Alerts, alertsSchema, alertsAuditSchema, Features, featuresSchema, dataCompletenessSchema, DataCompleteness, networkMetricsSchema, NetworkMetrics, rateOfChangeSchema, RateOfChange, changeStreamCheckpointsSchema, ChangeStreamCheckpoints, sitesSchema, Sites, sampleSitesSchema, SampleSites, sampleSiteAuditSchema, SampleSiteAudit, sampleParametersEnum, samplesSchema, Samples, samplesAuditSchema, SamplesAudit, sampleParameterReferenceConcentrations, passwordResetTokenSchema, PasswordResetToken, monitorEpisodesSchema, MonitorEpisode, userNotificationsSchema, UserNotification, AqiAlertNotification, DeviceOfflineNotification, WeeklyDigestNotification, AccountNotification, NOTIFICATION_KINDS, NOTIFICATION_CHANNELS, DELIVERY_STATUSES, DATA_DOWNLOAD_TYPES, dataDownloadSchema, DataDownloads, AqiDataDownload, SampleDataDownload, DATA_DOWNLOAD_MAX_RANGE_DAYS, DATA_DOWNLOAD_ERRORS, validateDataDownloadDateOrder, validateDataDownloadMaxDateRange, validateDataDownloadEmail, normalizeDataDownloadEmail, validateDataDownloadTimezone, normalizeDataDownloadTimezone, PARAMETERS, HEAVY_METALS, ALERT_LEVEL_WEIGHTS, getAlertWeight, splitName, DEFAULT_QUIET_HOURS, DEFAULT_TIMEZONE, QUIET_HOURS_ERRORS, isValidTimeString, isValidIANATimezone, validateQuietHours, getZoneMinutes, isInQuietWindow, resolveQuietHours };
118
+ export { Database, adminSchema, Admin, configurationsSchema, Configurations, measurementsSchema, Measurements, monitorRequestsSchema, MonitorRequests, monitorsSchema, Monitors, organizationsSchema, Organizations, usersSchema, Users, COOKIE_CONSENT_CATEGORIES, COOKIE_CONSENT_VALUES, validateCookieConsent, eventsSchema, Events, lightMonitorSchema, LightMonitors, monitorSuppliersSchema, MonitorSuppliers, contextsSchema, Contexts, parametersSchema, Parameters, announcementSchema, Announcements, jobsSchema, Jobs, apiKeySchema, ApiKey, UsageMetrics, usageMetricsSchema, Audit, auditSchema, EventsAudit, eventsAuditSchema, MonitorAudit, monitorAuditSchema, parametersEnum, deploymentTypesEnum, AlertsAudit, Alerts, alertsSchema, alertsAuditSchema, Features, featuresSchema, dataCompletenessSchema, DataCompleteness, networkMetricsSchema, NetworkMetrics, rateOfChangeSchema, RateOfChange, changeStreamCheckpointsSchema, ChangeStreamCheckpoints, sitesSchema, Sites, sampleSitesSchema, SampleSites, sampleSiteAuditSchema, SampleSiteAudit, sampleParametersEnum, samplesSchema, Samples, samplesAuditSchema, SamplesAudit, sampleParameterReferenceConcentrations, passwordResetTokenSchema, PasswordResetToken, monitorEpisodesSchema, MonitorEpisode, userNotificationsSchema, UserNotification, AqiAlertNotification, DeviceOfflineNotification, WeeklyDigestNotification, AccountNotification, NOTIFICATION_KINDS, NOTIFICATION_CHANNELS, DELIVERY_STATUSES, DATA_DOWNLOAD_TYPES, dataDownloadSchema, DataDownloads, AqiDataDownload, SampleDataDownload, DATA_DOWNLOAD_MAX_RANGE_DAYS, DATA_DOWNLOAD_ERRORS, validateDataDownloadDateOrder, validateDataDownloadMaxDateRange, validateDataDownloadEmail, normalizeDataDownloadEmail, validateDataDownloadTimezone, normalizeDataDownloadTimezone, PARAMETERS, HEAVY_METALS, MET_INTERNAL_TO_AMBIENT_PARAMETERS, MET_INTERNAL_PARAMETERS_TO_HIDE, ALERT_LEVEL_WEIGHTS, getAlertWeight, splitName, DEFAULT_QUIET_HOURS, DEFAULT_TIMEZONE, QUIET_HOURS_ERRORS, isValidTimeString, isValidIANATimezone, validateQuietHours, getZoneMinutes, isInQuietWindow, resolveQuietHours };
117
119
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":"A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A0B;mCA0BpD,uBAAuB;kCAAvB,uBAAuB;oCACM,qBAAqB;mCADlD,uBAAuB;+BAAvB,uBAAuB;gCAAvB,uBAAuB;kCAAvB,uBAAuB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@justair/justair-library",
3
- "version": "7.3.0",
3
+ "version": "7.4.0-alpha.5a16ace",
4
4
  "description": "JustAir Internal Library",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -151,6 +151,12 @@ export const PARAMETERS = {
151
151
  origin: null,
152
152
  impacts: null,
153
153
  },
154
+ // ---- T/RH/DP and their _AMB pairs (JA-3058). Does not apply to WD/WS below. ----
155
+ // Bare ids (T/RH/DP) are enclosure-internal, for corrections and fog detection only. The _AMB
156
+ // ids are true ambient and the only ones safe for public display or Heat Index. Never substitute
157
+ // one for the other. Caveat: five suppliers still write outdoor dew point into DP, so DP is
158
+ // exempt from the public-display filter until JA-3061 re-points them. See "Ambient vs internal
159
+ // met parameters" in CLAUDE.md before wiring up.
154
160
  DP: {
155
161
  id: "DP",
156
162
  label: "Dew Point",
@@ -161,6 +167,16 @@ export const PARAMETERS = {
161
167
  origin: null,
162
168
  impacts: null,
163
169
  },
170
+ DP_AMB: {
171
+ id: "DP_AMB",
172
+ label: "Ambient Dew Point",
173
+ name: "Ambient Dew Point (DP_AMB)",
174
+ unit: "°F",
175
+ type: "Weather",
176
+ rfc: null,
177
+ origin: null,
178
+ impacts: null,
179
+ },
164
180
  RH: {
165
181
  id: "RH",
166
182
  label: "Humidity",
@@ -171,6 +187,16 @@ export const PARAMETERS = {
171
187
  origin: null,
172
188
  impacts: null,
173
189
  },
190
+ RH_AMB: {
191
+ id: "RH_AMB",
192
+ label: "Ambient Humidity",
193
+ name: "Ambient Relative Humidity (RH_AMB)",
194
+ unit: "%",
195
+ type: "Weather",
196
+ rfc: null,
197
+ origin: null,
198
+ impacts: null,
199
+ },
174
200
  T: {
175
201
  id: "T",
176
202
  label: "Temperature",
@@ -181,6 +207,16 @@ export const PARAMETERS = {
181
207
  origin: null,
182
208
  impacts: null,
183
209
  },
210
+ T_AMB: {
211
+ id: "T_AMB",
212
+ label: "Ambient Temperature",
213
+ name: "Ambient Temperature (T_AMB)",
214
+ unit: "°F",
215
+ type: "Weather",
216
+ rfc: null,
217
+ origin: null,
218
+ impacts: null,
219
+ },
184
220
  WD: {
185
221
  id: "WD",
186
222
  label: "Wind Direction",
@@ -293,6 +329,25 @@ export const PARAMETERS = {
293
329
  },
294
330
  };
295
331
 
332
+ // Enclosure-internal parameter id -> its ambient counterpart (JA-3058). Lets consumers map
333
+ // between the two kinds on data instead of hardcoding the six met ids. Kept in sync with
334
+ // PARAMETERS by a test in tests/pollutants.test.js.
335
+ //
336
+ // This is a pairing map, not a hide-list. For the hide-list use
337
+ // MET_INTERNAL_PARAMETERS_TO_HIDE below, which leaves DP out on purpose.
338
+ export const MET_INTERNAL_TO_AMBIENT_PARAMETERS = Object.freeze({
339
+ T: "T_AMB",
340
+ RH: "RH_AMB",
341
+ DP: "DP_AMB",
342
+ });
343
+
344
+ // The internal met ids that are safe to hide from public surfaces today. DP is deliberately
345
+ // absent: five suppliers (Kunak, QuantAQ, Davis, HOBOlink, Aeroqual) still write outdoor dew
346
+ // point into DP and nothing writes DP_AMB yet, so hiding DP now would drop dew point from those
347
+ // dashboards entirely. DP joins this list in JA-3061. See "Ambient vs internal met parameters"
348
+ // in CLAUDE.md.
349
+ export const MET_INTERNAL_PARAMETERS_TO_HIDE = Object.freeze(["T", "RH"]);
350
+
296
351
  // Parameters analyzed from physical air samples in a laboratory.
297
352
  // These correspond to SampleSites.parameters and are not measured by real-time sensors.
298
353
  export const HEAVY_METALS = {
@@ -4,14 +4,15 @@
4
4
  // importing PARAMETERS / HEAVY_METALS through the barrel must see the exact
5
5
  // same objects as before.
6
6
  import * as barrel from '../index.js';
7
- import { PARAMETERS, HEAVY_METALS } from '../pollutants.js';
7
+ import { PARAMETERS, HEAVY_METALS, MET_INTERNAL_TO_AMBIENT_PARAMETERS } from '../pollutants.js';
8
8
  import { ALERT_LEVEL_WEIGHTS, getAlertWeight } from '../alertLevels.js';
9
9
  import { DEFAULT_TIMEZONE } from '../timezones.js';
10
10
  import { DATA_DOWNLOAD_TYPES } from '../dataDownloads.js';
11
11
 
12
- test('barrel re-exports PARAMETERS and HEAVY_METALS unchanged (identity, not copies)', () => {
12
+ test('barrel re-exports the pollutants constants unchanged (identity, not copies)', () => {
13
13
  expect(barrel.PARAMETERS).toBe(PARAMETERS);
14
14
  expect(barrel.HEAVY_METALS).toBe(HEAVY_METALS);
15
+ expect(barrel.MET_INTERNAL_TO_AMBIENT_PARAMETERS).toBe(MET_INTERNAL_TO_AMBIENT_PARAMETERS);
15
16
  });
16
17
 
17
18
  test('barrel exports the alert-level constants', () => {
@@ -1,4 +1,4 @@
1
- import { PARAMETERS, HEAVY_METALS } from "../pollutants.js";
1
+ import { PARAMETERS, HEAVY_METALS, MET_INTERNAL_TO_AMBIENT_PARAMETERS } from "../pollutants.js";
2
2
 
3
3
  const REQUIRED_FIELDS = ["id", "label", "name", "unit", "type"];
4
4
  const VALID_TYPES = [
@@ -69,6 +69,28 @@ function sharedAssertions(constants) {
69
69
 
70
70
  describe("PARAMETERS", () => {
71
71
  sharedAssertions(PARAMETERS);
72
+
73
+ // JA-3060: Processing-Engine hardcodes these ids, so lock the ambient/internal pairing.
74
+ const ambientKeys = Object.keys(PARAMETERS).filter((key) => key.endsWith("_AMB"));
75
+
76
+ test("the _AMB parameter set is exactly T, RH and DP", () => {
77
+ expect(ambientKeys.sort()).toEqual(["DP_AMB", "RH_AMB", "T_AMB"]);
78
+ });
79
+
80
+ test("MET_INTERNAL_TO_AMBIENT_PARAMETERS matches the _AMB ids actually defined", () => {
81
+ expect(Object.values(MET_INTERNAL_TO_AMBIENT_PARAMETERS).sort()).toEqual(ambientKeys.sort());
82
+ Object.entries(MET_INTERNAL_TO_AMBIENT_PARAMETERS).forEach(([bare, ambient]) => {
83
+ expect(PARAMETERS[bare]).toBeDefined();
84
+ expect(ambient).toBe(`${bare}_AMB`);
85
+ });
86
+ });
87
+
88
+ test.each(ambientKeys)("%s pairs with its bare parameter on unit and type", (key) => {
89
+ const bare = PARAMETERS[key.replace(/_AMB$/, "")];
90
+ expect(bare).toBeDefined();
91
+ expect(PARAMETERS[key].unit).toBe(bare.unit);
92
+ expect(PARAMETERS[key].type).toBe(bare.type);
93
+ });
72
94
  });
73
95
 
74
96
  describe("HEAVY_METALS", () => {
package/src/index.js CHANGED
@@ -65,7 +65,12 @@ import {
65
65
  } from "./models/changeStreamCheckpoints.js";
66
66
  import Database from "./config/db.js"; // Import the new Database class
67
67
  import CustomLogger from "./config/logger.js";
68
- import { PARAMETERS, HEAVY_METALS } from "./constants/pollutants.js";
68
+ import {
69
+ PARAMETERS,
70
+ HEAVY_METALS,
71
+ MET_INTERNAL_TO_AMBIENT_PARAMETERS,
72
+ MET_INTERNAL_PARAMETERS_TO_HIDE,
73
+ } from "./constants/pollutants.js";
69
74
  import { ALERT_LEVEL_WEIGHTS, getAlertWeight } from "./constants/alertLevels.js";
70
75
  import { DEFAULT_TIMEZONE } from "./constants/timezones.js";
71
76
  import { DATA_DOWNLOAD_TYPES } from "./constants/dataDownloads.js";
@@ -256,6 +261,8 @@ export {
256
261
  // Pollutant constants
257
262
  PARAMETERS,
258
263
  HEAVY_METALS,
264
+ MET_INTERNAL_TO_AMBIENT_PARAMETERS,
265
+ MET_INTERNAL_PARAMETERS_TO_HIDE,
259
266
  // AQI alert-level hierarchy (single source of truth)
260
267
  ALERT_LEVEL_WEIGHTS,
261
268
  getAlertWeight,