@htilabs/platform-common-models 0.8.12 → 0.8.13

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 (95) hide show
  1. package/dist/constants/index.cjs +133 -287
  2. package/dist/constants/index.cjs.map +1 -1
  3. package/dist/constants/index.d.cts +1 -1
  4. package/dist/constants/index.d.ts +1 -1
  5. package/dist/constants/index.js +133 -275
  6. package/dist/constants/index.js.map +1 -1
  7. package/dist/cvcs/index.cjs +11670 -969
  8. package/dist/cvcs/index.cjs.map +1 -1
  9. package/dist/cvcs/index.d.cts +14727 -3020
  10. package/dist/cvcs/index.d.ts +14727 -3020
  11. package/dist/cvcs/index.js +11643 -968
  12. package/dist/cvcs/index.js.map +1 -1
  13. package/dist/index.cjs +12718 -1360
  14. package/dist/index.cjs.map +1 -1
  15. package/dist/index.d.cts +1012 -128
  16. package/dist/index.d.ts +1012 -128
  17. package/dist/index.js +12671 -1345
  18. package/dist/index.js.map +1 -1
  19. package/dist/{platform-auth-BwfZ0bxU.d.cts → platform-auth-BfCMuAlC.d.cts} +2 -74
  20. package/dist/{platform-auth-BwfZ0bxU.d.ts → platform-auth-BfCMuAlC.d.ts} +2 -74
  21. package/dist/schemas/index.cjs +0 -152
  22. package/dist/schemas/index.cjs.map +1 -1
  23. package/dist/schemas/index.js +0 -152
  24. package/dist/schemas/index.js.map +1 -1
  25. package/dist/services/index.cjs +0 -3
  26. package/dist/services/index.cjs.map +1 -1
  27. package/dist/services/index.js +0 -3
  28. package/dist/services/index.js.map +1 -1
  29. package/dist/types/index.d.cts +2 -2
  30. package/dist/types/index.d.ts +2 -2
  31. package/package.json +4 -1
  32. package/src/__sot__/README.md +56 -0
  33. package/src/__sot__/coreIndicators.pin.json +215 -0
  34. package/src/__sot__/cvcIndex.pin.json +268 -0
  35. package/src/__sot__/scoringEmits.pin.json +176 -0
  36. package/src/__tests__/__snapshots__/cvc-sot.snap +109 -37
  37. package/src/__tests__/cvc-136-scoring-invariant.test.ts +323 -0
  38. package/src/__tests__/cvc-drift-gate.test.ts +596 -0
  39. package/src/__tests__/cvc-sot-snapshot.test.ts +38 -8
  40. package/src/__tests__/cvc-structural.test.ts +37 -1
  41. package/src/constants/ic.ts +184 -333
  42. package/src/constants/service-catalog.ts +4 -2
  43. package/src/cvcs/adminRoles.v1.0.0.json +153 -0
  44. package/src/cvcs/administeringJurisdiction.v1.0.0.json +40 -40
  45. package/src/cvcs/ageBinReporting.v1.0.0.json +40 -40
  46. package/src/cvcs/assertionDomain.v1.1.0.json +78 -105
  47. package/src/cvcs/citizenship.v1.0.0.json +3062 -0
  48. package/src/cvcs/contactInfoTypes.v1.0.0.json +40 -40
  49. package/src/cvcs/coreDhState.v1.0.0.json +113 -0
  50. package/src/cvcs/coreIndicators.v1.0.0.json +2840 -0
  51. package/src/cvcs/employmentStatus.v1.0.0.json +60 -60
  52. package/src/cvcs/exploitationType.v1.0.0.json +106 -0
  53. package/src/cvcs/facilitatorEntityType.v1.0.0.json +40 -40
  54. package/src/cvcs/highestEducationLevelCompleted.v1.0.0.json +50 -50
  55. package/src/cvcs/hmisCurrentLivingSituation.v1.0.0.json +409 -0
  56. package/src/cvcs/homelessStatus.v1.0.0.json +27 -27
  57. package/src/cvcs/housingSubsidyTypes.v1.0.0.json +26 -24
  58. package/src/cvcs/incarcerationEpisodeType.v1.0.0.json +106 -0
  59. package/src/cvcs/incidentInvolvementRoles.v1.0.0.json +40 -40
  60. package/src/cvcs/incidentParticipationRoles.v1.0.0.json +40 -40
  61. package/src/cvcs/index.ts +55 -2
  62. package/src/cvcs/juvenileJusticeEpisodeType.v1.0.0.json +106 -0
  63. package/src/cvcs/juvenileJusticeInvolvementStatus.v1.0.0.json +32 -32
  64. package/src/cvcs/militaryBranch.v1.0.0.json +20 -20
  65. package/src/cvcs/militaryStatus.v1.0.0.json +20 -20
  66. package/src/cvcs/nameType.v1.0.0.json +40 -40
  67. package/src/cvcs/offenderStatus.v1.0.0.json +40 -40
  68. package/src/cvcs/offenderStatusFamily.v1.0.0.json +36 -36
  69. package/src/cvcs/poPetitionBasis.v1.0.0.json +96 -0
  70. package/src/cvcs/poStatus.v1.0.0.json +144 -0
  71. package/src/cvcs/poViolationStatus.v1.0.0.json +76 -0
  72. package/src/cvcs/radiusBucket.v1.0.0.json +23 -11
  73. package/src/cvcs/recencyBand.v1.0.0.json +126 -42
  74. package/src/cvcs/referralEntityCategory.v1.0.0.json +40 -40
  75. package/src/cvcs/riskSeverityBand.v1.0.0.json +139 -0
  76. package/src/cvcs/roiScope.v1.0.0.json +111 -3
  77. package/src/cvcs/roiStatus.v1.0.0.json +18 -10
  78. package/src/cvcs/romanticRelationshipChangeType.v1.0.0.json +2 -1
  79. package/src/cvcs/serviceCategories.v1.0.0.json +44 -44
  80. package/src/cvcs/serviceDeliveryChannel.v1.0.0.json +147 -0
  81. package/src/cvcs/serviceMechanisms.v1.0.0.json +36 -36
  82. package/src/cvcs/serviceStates.v1.0.0.json +40 -40
  83. package/src/cvcs/sessionTemplate.v1.0.0.json +261 -0
  84. package/src/cvcs/sexProviderSubrole.v1.0.0.json +35 -28
  85. package/src/cvcs/smtType.v1.0.0.json +40 -40
  86. package/src/cvcs/sourceCategory.v1.1.0.json +8 -1
  87. package/src/cvcs/sourceInstrument.v1.0.0.json +458 -0
  88. package/src/cvcs/sourceSystem.v1.0.0.json +203 -0
  89. package/src/cvcs/traffickingRelevantRole.v1.0.0.json +104 -0
  90. package/src/cvcs/userRoles.v1.0.0.json +203 -0
  91. package/src/cvcs/victimStatusFamily.v1.0.0.json +40 -40
  92. package/src/cvcs/whyNots.v1.0.0.json +385 -0
  93. package/src/generated/cvc-enums.ts +1047 -127
  94. package/src/services/cvcRegistryService.ts +1 -1
  95. package/src/cvcs/riskBand.v1.0.0.json +0 -98
@@ -28,7 +28,7 @@
28
28
  * they can be unit-tested without a Mongoose connection.
29
29
  */
30
30
 
31
- import { Types } from "mongoose";
31
+ import type { Types } from "mongoose";
32
32
  import type { Connection, Model } from "mongoose";
33
33
 
34
34
  import { cvcRegistryModel, cvcEntryModel } from "../models/index.js";
@@ -1,98 +0,0 @@
1
- {
2
- "domain": "risk_band",
3
- "name": "Risk Band",
4
- "version": "1.0.0",
5
- "_status": "DRAFT — TEMPORARY: net-new value-CVC not yet in Notion; provisional 900+ numbering; codes/labels sourced verbatim from @hti/scoring (declared SOT) weights/risk.weights.json @ 9b5d654; NAMES ONLY per ADR-CONTRACT-scoring-vocab-model-boundary (weights/cutoffs/leaf-scales stay in @hti/scoring). PENDING canonical Notion authoring + steward ratification.",
6
- "_source": "htilabstech/hti-scoring@9b5d654 weights/risk.weights.json",
7
- "levels": {
8
- "0": "Unknown or Missing",
9
- "1": "Risk band tier"
10
- },
11
- "entries": [
12
- {
13
- "code": "981-000-000-000-000-000-000",
14
- "key": "missingness_root",
15
- "title": "Unknown, Redacted, or Missing",
16
- "selectable": false,
17
- "parentCode": null,
18
- "childCodes": [
19
- "981-000-000-000-000-000-001",
20
- "981-000-000-000-000-000-002",
21
- "981-000-000-000-000-000-003"
22
- ],
23
- "definition": "Root group for values indicating absent, withheld, or uncollected data. Variant: 3-value (unknown, anonymous, data_not_collected) under the workspace standard ANON semantic. The @hti/scoring artifact enumerates only the substantive values, so the triplet is added per SOT convention."
24
- },
25
- {
26
- "code": "981-000-000-000-000-000-001",
27
- "key": "unknown",
28
- "title": "Unknown",
29
- "selectable": true,
30
- "parentCode": "981-000-000-000-000-000-000",
31
- "childCodes": [],
32
- "definition": "Risk band is unknown at time of entry (no scored capture). Distinct from `stable`: an unscored subject has no band, it is not banded low."
33
- },
34
- {
35
- "code": "981-000-000-000-000-000-002",
36
- "key": "anonymous",
37
- "title": "Anonymous / declined to answer",
38
- "selectable": true,
39
- "parentCode": "981-000-000-000-000-000-000",
40
- "childCodes": [],
41
- "definition": "Value is intentionally withheld or redacted. Combines declined-to-answer and redacted/anonymous semantics under the workspace standard ANON sentinel."
42
- },
43
- {
44
- "code": "981-000-000-000-000-000-003",
45
- "key": "data_not_collected",
46
- "title": "Data not collected",
47
- "selectable": true,
48
- "parentCode": "981-000-000-000-000-000-000",
49
- "childCodes": [],
50
- "definition": "No attempt was made to collect the value. System-only sentinel per GLOBAL_DESIGN_RULES."
51
- },
52
- {
53
- "code": "981-001-000-000-000-000-000",
54
- "key": "severe",
55
- "title": "Severe",
56
- "selectable": true,
57
- "parentCode": null,
58
- "childCodes": [],
59
- "definition": "Highest-severity band of the canonical five-tier risk banding (@hti/scoring GDR § 9.17). Assigned when the display score meets or exceeds the `severe` cutoff. Scale pin: banding is applied to the 0–10 DISPLAY score (the internal 0–1 form is never banded). Band cutoffs are calibration, NOT vocabulary: they live in @hti/scoring (`RISK_WEIGHTS.bands` in weights/risk.weights.json, consumed by `riskBand()` in src/core/bands.ts) and can be recalibrated without a CVC change. This CVC names the band; it does not define its boundary."
60
- },
61
- {
62
- "code": "981-002-000-000-000-000-000",
63
- "key": "elevated",
64
- "title": "Elevated",
65
- "selectable": true,
66
- "parentCode": null,
67
- "childCodes": [],
68
- "definition": "Second band of the canonical five-tier risk banding (@hti/scoring GDR § 9.17). Assigned when the display score meets or exceeds the `elevated` cutoff but falls below the `severe` cutoff. Scale pin: banding is applied to the 0–10 DISPLAY score (the internal 0–1 form is never banded). Band cutoffs are calibration, NOT vocabulary: they live in @hti/scoring (`RISK_WEIGHTS.bands` in weights/risk.weights.json, consumed by `riskBand()` in src/core/bands.ts) and can be recalibrated without a CVC change. This CVC names the band; it does not define its boundary."
69
- },
70
- {
71
- "code": "981-003-000-000-000-000-000",
72
- "key": "review",
73
- "title": "Review",
74
- "selectable": true,
75
- "parentCode": null,
76
- "childCodes": [],
77
- "definition": "Middle band of the canonical five-tier risk banding (@hti/scoring GDR § 9.17). Assigned when the display score meets or exceeds the `review` cutoff but falls below the `elevated` cutoff. Scale pin: banding is applied to the 0–10 DISPLAY score (the internal 0–1 form is never banded). Band cutoffs are calibration, NOT vocabulary: they live in @hti/scoring (`RISK_WEIGHTS.bands` in weights/risk.weights.json, consumed by `riskBand()` in src/core/bands.ts) and can be recalibrated without a CVC change. This CVC names the band; it does not define its boundary."
78
- },
79
- {
80
- "code": "981-004-000-000-000-000-000",
81
- "key": "watch",
82
- "title": "Watch",
83
- "selectable": true,
84
- "parentCode": null,
85
- "childCodes": [],
86
- "definition": "Fourth band of the canonical five-tier risk banding (@hti/scoring GDR § 9.17). Assigned when the display score meets or exceeds the `watch` cutoff but falls below the `review` cutoff. Scale pin: banding is applied to the 0–10 DISPLAY score (the internal 0–1 form is never banded). Band cutoffs are calibration, NOT vocabulary: they live in @hti/scoring (`RISK_WEIGHTS.bands` in weights/risk.weights.json, consumed by `riskBand()` in src/core/bands.ts) and can be recalibrated without a CVC change. This CVC names the band; it does not define its boundary."
87
- },
88
- {
89
- "code": "981-005-000-000-000-000-000",
90
- "key": "stable",
91
- "title": "Stable",
92
- "selectable": true,
93
- "parentCode": null,
94
- "childCodes": [],
95
- "definition": "Fall-through floor band of the canonical five-tier risk banding (@hti/scoring GDR § 9.17). Assigned when the display score falls below every cutoff. `stable` is the ONLY band with no cutoff of its own — @hti/scoring's `BandCutoffs` interface (src/core/types.ts) declares exactly four numeric fields (severe, elevated, review, watch) and `riskBand()` returns Stable as the terminal else-branch. NOT a missingness value: an unscored subject (null score) is not banded at all per GDR § 1.2 (missing data is omitted, not labeled) — use the missingness triplet for that, never `stable`. Scale pin: banding is applied to the 0–10 DISPLAY score (the internal 0–1 form is never banded). Band cutoffs are calibration, NOT vocabulary: they live in @hti/scoring (`RISK_WEIGHTS.bands` in weights/risk.weights.json, consumed by `riskBand()` in src/core/bands.ts) and can be recalibrated without a CVC change. This CVC names the band; it does not define its boundary."
96
- }
97
- ]
98
- }