@htilabs/platform-common-models 0.8.10 → 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.
- package/dist/constants/index.cjs +133 -285
- package/dist/constants/index.cjs.map +1 -1
- package/dist/constants/index.d.cts +1 -1
- package/dist/constants/index.d.ts +1 -1
- package/dist/constants/index.js +133 -273
- package/dist/constants/index.js.map +1 -1
- package/dist/cvcs/index.cjs +13075 -859
- package/dist/cvcs/index.cjs.map +1 -1
- package/dist/cvcs/index.d.cts +15852 -2457
- package/dist/cvcs/index.d.ts +15852 -2457
- package/dist/cvcs/index.js +13042 -859
- package/dist/cvcs/index.js.map +1 -1
- package/dist/index.cjs +14288 -1232
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1201 -108
- package/dist/index.d.ts +1201 -108
- package/dist/index.js +14229 -1219
- package/dist/index.js.map +1 -1
- package/dist/{platform-auth-BSKYSDKe.d.cts → platform-auth-BfCMuAlC.d.cts} +2 -74
- package/dist/{platform-auth-BSKYSDKe.d.ts → platform-auth-BfCMuAlC.d.ts} +2 -74
- package/dist/schemas/index.cjs +0 -152
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.js +0 -152
- package/dist/schemas/index.js.map +1 -1
- package/dist/services/index.cjs +0 -3
- package/dist/services/index.cjs.map +1 -1
- package/dist/services/index.js +0 -3
- package/dist/services/index.js.map +1 -1
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/package.json +4 -1
- package/src/__sot__/README.md +56 -0
- package/src/__sot__/coreIndicators.pin.json +215 -0
- package/src/__sot__/cvcIndex.pin.json +268 -0
- package/src/__sot__/scoringEmits.pin.json +176 -0
- package/src/__tests__/__snapshots__/cvc-sot.snap +132 -32
- package/src/__tests__/cvc-136-scoring-invariant.test.ts +323 -0
- package/src/__tests__/cvc-drift-gate.test.ts +596 -0
- package/src/__tests__/cvc-sot-snapshot.test.ts +59 -7
- package/src/__tests__/cvc-structural.test.ts +47 -1
- package/src/constants/ic.ts +185 -321
- package/src/constants/service-catalog.ts +4 -2
- package/src/cvcs/adminRoles.v1.0.0.json +153 -0
- package/src/cvcs/administeringJurisdiction.v1.0.0.json +40 -40
- package/src/cvcs/ageBinReporting.v1.0.0.json +40 -40
- package/src/cvcs/{assertionDomain.v1.0.0.json → assertionDomain.v1.1.0.json} +78 -96
- package/src/cvcs/{checkInPhase.v1.0.0.json → checkInPhase.v1.1.0.json} +20 -2
- package/src/cvcs/citizenship.v1.0.0.json +3062 -0
- package/src/cvcs/contactInfoTypes.v1.0.0.json +40 -40
- package/src/cvcs/coreDhState.v1.0.0.json +113 -0
- package/src/cvcs/coreFunctions.v1.0.0.json +746 -0
- package/src/cvcs/coreIndicators.v1.0.0.json +2840 -0
- package/src/cvcs/coreReferralOutcome.v1.0.0.json +71 -0
- package/src/cvcs/employmentStatus.v1.0.0.json +60 -60
- package/src/cvcs/exploitationType.v1.0.0.json +106 -0
- package/src/cvcs/facilitatorEntityType.v1.0.0.json +40 -40
- package/src/cvcs/highestEducationLevelCompleted.v1.0.0.json +50 -50
- package/src/cvcs/hmisCurrentLivingSituation.v1.0.0.json +409 -0
- package/src/cvcs/homelessStatus.v1.0.0.json +27 -27
- package/src/cvcs/housingSubsidyTypes.v1.0.0.json +26 -24
- package/src/cvcs/incarcerationEpisodeType.v1.0.0.json +106 -0
- package/src/cvcs/incidentInvolvementRoles.v1.0.0.json +40 -40
- package/src/cvcs/incidentParticipationRoles.v1.0.0.json +40 -40
- package/src/cvcs/index.ts +68 -1
- package/src/cvcs/juvenileJusticeEpisodeType.v1.0.0.json +106 -0
- package/src/cvcs/juvenileJusticeInvolvementStatus.v1.0.0.json +32 -32
- package/src/cvcs/militaryBranch.v1.0.0.json +20 -20
- package/src/cvcs/militaryStatus.v1.0.0.json +20 -20
- package/src/cvcs/nameType.v1.0.0.json +40 -40
- package/src/cvcs/needsAssessmentChangeType.v1.0.0.json +134 -0
- package/src/cvcs/offenderStatus.v1.0.0.json +40 -40
- package/src/cvcs/offenderStatusFamily.v1.0.0.json +36 -36
- package/src/cvcs/poPetitionBasis.v1.0.0.json +96 -0
- package/src/cvcs/poStatus.v1.0.0.json +144 -0
- package/src/cvcs/poViolationStatus.v1.0.0.json +76 -0
- package/src/cvcs/radiusBucket.v1.0.0.json +23 -11
- package/src/cvcs/recencyBand.v1.0.0.json +126 -42
- package/src/cvcs/referralEntityCategory.v1.0.0.json +40 -40
- package/src/cvcs/riskCategory.v1.0.0.json +134 -0
- package/src/cvcs/riskSeverityBand.v1.0.0.json +139 -0
- package/src/cvcs/roiScope.v1.0.0.json +296 -0
- package/src/cvcs/roiStatus.v1.0.0.json +106 -0
- package/src/cvcs/romanticRelationshipChangeType.v1.0.0.json +2 -1
- package/src/cvcs/serviceCategories.v1.0.0.json +44 -44
- package/src/cvcs/serviceDeliveryChannel.v1.0.0.json +147 -0
- package/src/cvcs/serviceMechanisms.v1.0.0.json +36 -36
- package/src/cvcs/serviceStates.v1.0.0.json +40 -40
- package/src/cvcs/sessionTemplate.v1.0.0.json +261 -0
- package/src/cvcs/sexProviderSubrole.v1.0.0.json +35 -28
- package/src/cvcs/smtType.v1.0.0.json +40 -40
- package/src/cvcs/sourceCategory.v1.1.0.json +8 -1
- package/src/cvcs/sourceInstrument.v1.0.0.json +458 -0
- package/src/cvcs/sourceSystem.v1.0.0.json +203 -0
- package/src/cvcs/traffickingRelevantRole.v1.0.0.json +104 -0
- package/src/cvcs/userRoles.v1.0.0.json +203 -0
- package/src/cvcs/victimStatusFamily.v1.0.0.json +40 -40
- package/src/cvcs/whyNots.v1.0.0.json +385 -0
- package/src/generated/cvc-enums.ts +1248 -105
- package/src/services/cvcRegistryService.ts +1 -1
|
@@ -492,7 +492,7 @@ const SOT_SPECS: readonly SotSpec[] = [
|
|
|
492
492
|
{ file: "announcementResponseType.v1.0.0.json", domain: "announcement_response_type", expectedCount: 8 },
|
|
493
493
|
{ file: "basisQuickPicks.v1.0.0.json", domain: "basis_quick_picks", expectedCount: 11 },
|
|
494
494
|
{ file: "checkInActivity.v1.0.0.json", domain: "check_in_activity", expectedCount: 24 },
|
|
495
|
-
{ file: "checkInPhase.v1.
|
|
495
|
+
{ file: "checkInPhase.v1.1.0.json", domain: "check_in_phase", expectedCount: 17 },
|
|
496
496
|
{ file: "childBehavioralConcerns.v1.0.0.json", domain: "child_behavioral_concerns", expectedCount: 16 },
|
|
497
497
|
{ file: "childCustodyArrangement.v1.0.0.json", domain: "child_custody_arrangement", expectedCount: 19 },
|
|
498
498
|
{ file: "collectionContext.v1.0.0.json", domain: "collection_context", expectedCount: 8 },
|
|
@@ -572,11 +572,13 @@ const SOT_SPECS: readonly SotSpec[] = [
|
|
|
572
572
|
// codes + 1 missingness root + 3 canonical missingness children = 11.
|
|
573
573
|
// CVC number is PROVISIONAL pending codebook-session ratification.
|
|
574
574
|
{ file: "relationshipConcern.v1.0.0.json", domain: "relationship_concern", expectedCount: 11 },
|
|
575
|
-
//
|
|
576
|
-
//
|
|
577
|
-
//
|
|
578
|
-
//
|
|
579
|
-
|
|
575
|
+
// CVC-137 recency_band — the CANONICAL 8-band key system adopted in 0.8.13
|
|
576
|
+
// (w3m, m3_6, m6_12, y1p, y1_3, y3_10, y10p, ylt3 — the lowercase
|
|
577
|
+
// transliterations of W3M/M3_6/M6_12/Y1P/Y1_3/Y3_10/Y10P/YLT3, carried
|
|
578
|
+
// verbatim in `canonicalCode`) + 1 missingness root + 3 canonical missingness
|
|
579
|
+
// children = 12. Replaces the 6 semantic slugs shipped before 0.8.13; all 6
|
|
580
|
+
// map 1:1 onto a canonical band, and y1_3 / ylt3 are net-new.
|
|
581
|
+
{ file: "recencyBand.v1.0.0.json", domain: "recency_band", expectedCount: 12 },
|
|
580
582
|
// PROVISIONAL CVC-233 housing_subsidy_types — 12 HMIS-aligned subsidy types
|
|
581
583
|
// (housing_choice_voucher, public_housing, project_based_rental_assistance,
|
|
582
584
|
// permanent_supportive_housing, rapid_rehousing_assistance,
|
|
@@ -586,7 +588,7 @@ const SOT_SPECS: readonly SotSpec[] = [
|
|
|
586
588
|
// root + 3 canonical missingness children = 16. CVC number is PROVISIONAL
|
|
587
589
|
// pending ratification.
|
|
588
590
|
{ file: "housingSubsidyTypes.v1.0.0.json", domain: "housing_subsidy_types", expectedCount: 16 },
|
|
589
|
-
{ file: "assertionDomain.v1.
|
|
591
|
+
{ file: "assertionDomain.v1.1.0.json", domain: "assertion_domain", expectedCount: 68 },
|
|
590
592
|
{ file: "activityType.v1.0.0.json", domain: "activity_type", expectedCount: 14 },
|
|
591
593
|
{ file: "provenanceSourceId.v1.0.0.json", domain: "provenance_source_id", expectedCount: 13 },
|
|
592
594
|
{ file: "radiusBucket.v1.0.0.json", domain: "radius_bucket", expectedCount: 9 },
|
|
@@ -602,6 +604,56 @@ const SOT_SPECS: readonly SotSpec[] = [
|
|
|
602
604
|
{ file: "immigrationLegalStatusChangeType.v1.0.0.json", domain: "immigration_legal_status_change_type", expectedCount: 14 },
|
|
603
605
|
{ file: "programEnrollmentChangeType.v1.0.0.json", domain: "program_enrollment_change_type", expectedCount: 13 },
|
|
604
606
|
{ file: "romanticRelationshipChangeType.v1.0.0.json", domain: "romantic_relationship_change_type", expectedCount: 16 },
|
|
607
|
+
// ─── Risk taxonomy (names-only projection of the @hti/scoring SOT) ───
|
|
608
|
+
// 9 categories (`I`..`IX`, tree[].kind === "category") + 4 missingness = 13
|
|
609
|
+
{ file: "riskCategory.v1.0.0.json", domain: "risk_category", expectedCount: 13 },
|
|
610
|
+
// 5 bands (severe/elevated/review/watch/stable — `stable` is the cutoff-less
|
|
611
|
+
// fall-through floor, so the count is 5, NOT the 4 numeric BandCutoffs
|
|
612
|
+
// fields) + 4 missingness = 9
|
|
613
|
+
// ─── 0.8.12 vocabulary batch ───
|
|
614
|
+
// CANONICAL Notion CVC-133 `core - functions` (verified v1.0): 77 functions
|
|
615
|
+
// + 4 missingness = 81
|
|
616
|
+
{ file: "coreFunctions.v1.0.0.json", domain: "core_functions", expectedCount: 81 },
|
|
617
|
+
// 9 fine-grained Needs-Assessment CAR change types (@pave/domain
|
|
618
|
+
// NEEDS_ASSESSMENT_CHANGE_TYPES, casing normalized to lower_snake) + 4 = 13
|
|
619
|
+
{ file: "needsAssessmentChangeType.v1.0.0.json", domain: "needs_assessment_change_type", expectedCount: 13 },
|
|
620
|
+
// 15 ROI scope items (@pave/domain ROI_SCOPE_KEYS — the PAVE-seed-attested
|
|
621
|
+
// subset of the prototype's 27-item UI superset) + 4 = 19
|
|
622
|
+
{ file: "roiScope.v1.0.0.json", domain: "roi_scope", expectedCount: 31 },
|
|
623
|
+
// 5 stored-ROI lifecycle states (@pave/domain ROI_STATUSES) + 4 = 9
|
|
624
|
+
{ file: "roiStatus.v1.0.0.json", domain: "roi_status", expectedCount: 9 },
|
|
625
|
+
// 2 HMIS FY2026 "P2 Referrals Provided" outcomes (attained / not_attained)
|
|
626
|
+
// + 4 = 6. The not-attained REASON is a separate axis, not folded in here.
|
|
627
|
+
{ file: "coreReferralOutcome.v1.0.0.json", domain: "core_referral_outcome", expectedCount: 6 },
|
|
628
|
+
// ─── 0.8.13 canonical CVC batch ───
|
|
629
|
+
{ file: "coreDhState.v1.0.0.json", domain: "dh_state", expectedCount: 9 },
|
|
630
|
+
{ file: "coreIndicators.v1.0.0.json", domain: "core_indicators", expectedCount: 214 },
|
|
631
|
+
{ file: "riskSeverityBand.v1.0.0.json", domain: "risk_severity_band", expectedCount: 9 },
|
|
632
|
+
{ file: "adminRoles.v1.0.0.json", domain: "admin_roles", expectedCount: 14 },
|
|
633
|
+
{ file: "userRoles.v1.0.0.json", domain: "user_roles", expectedCount: 19 },
|
|
634
|
+
{ file: "hmisCurrentLivingSituation.v1.0.0.json", domain: "hmis_current_living_situation", expectedCount: 33 },
|
|
635
|
+
{ file: "juvenileJusticeEpisodeType.v1.0.0.json", domain: "juvenile_justice_episode_type", expectedCount: 9 },
|
|
636
|
+
{ file: "incarcerationEpisodeType.v1.0.0.json", domain: "incarceration_episode_type", expectedCount: 9 },
|
|
637
|
+
{ file: "exploitationType.v1.0.0.json", domain: "exploitation_type", expectedCount: 9 },
|
|
638
|
+
{ file: "sourceSystem.v1.0.0.json", domain: "source_system", expectedCount: 19 },
|
|
639
|
+
{ file: "sourceInstrument.v1.0.0.json", domain: "source_instrument", expectedCount: 41 },
|
|
640
|
+
{ file: "poPetitionBasis.v1.0.0.json", domain: "po_petition_basis", expectedCount: 8 },
|
|
641
|
+
{ file: "poStatus.v1.0.0.json", domain: "po_status", expectedCount: 12 },
|
|
642
|
+
{ file: "poViolationStatus.v1.0.0.json", domain: "po_violation_status", expectedCount: 6 },
|
|
643
|
+
{ file: "sessionTemplate.v1.0.0.json", domain: "session_template", expectedCount: 23 },
|
|
644
|
+
{ file: "serviceDeliveryChannel.v1.0.0.json", domain: "service_delivery_channel", expectedCount: 11 },
|
|
645
|
+
{ file: "whyNots.v1.0.0.json", domain: "why_nots", expectedCount: 32 },
|
|
646
|
+
// CVC-182 — 249 countries (codes MINTED; upstream Code column is blank) + 1
|
|
647
|
+
// missingness root + 3 canonical missingness children (Unknown / Declined to
|
|
648
|
+
// asnwer / Not collected, carried verbatim from the codebook) = 253.
|
|
649
|
+
{ file: "citizenship.v1.0.0.json", domain: "citizenship", expectedCount: 253 },
|
|
650
|
+
// CVC-235 — 4 L1 trafficking-relevant roles + 1 missingness root + 3 canonical
|
|
651
|
+
// missingness children = 8.
|
|
652
|
+
{
|
|
653
|
+
file: "traffickingRelevantRole.v1.0.0.json",
|
|
654
|
+
domain: "trafficking_relevant_role",
|
|
655
|
+
expectedCount: 8,
|
|
656
|
+
},
|
|
605
657
|
] as const;
|
|
606
658
|
|
|
607
659
|
// ─── Helpers ────────────────────────────────────────────────────────────────
|
|
@@ -111,7 +111,7 @@ const SOT_FILES: readonly SotFile[] = [
|
|
|
111
111
|
{ file: "announcementResponseType.v1.0.0.json", expectedDomain: "announcement_response_type" },
|
|
112
112
|
{ file: "basisQuickPicks.v1.0.0.json", expectedDomain: "basis_quick_picks" },
|
|
113
113
|
{ file: "checkInActivity.v1.0.0.json", expectedDomain: "check_in_activity" },
|
|
114
|
-
{ file: "checkInPhase.v1.
|
|
114
|
+
{ file: "checkInPhase.v1.1.0.json", expectedDomain: "check_in_phase" },
|
|
115
115
|
{ file: "childBehavioralConcerns.v1.0.0.json", expectedDomain: "child_behavioral_concerns" },
|
|
116
116
|
{ file: "childCustodyArrangement.v1.0.0.json", expectedDomain: "child_custody_arrangement" },
|
|
117
117
|
{ file: "collectionContext.v1.0.0.json", expectedDomain: "collection_context" },
|
|
@@ -177,6 +177,52 @@ const SOT_FILES: readonly SotFile[] = [
|
|
|
177
177
|
{ file: "relationshipConcern.v1.0.0.json", expectedDomain: "relationship_concern" },
|
|
178
178
|
{ file: "recencyBand.v1.0.0.json", expectedDomain: "recency_band" },
|
|
179
179
|
{ file: "housingSubsidyTypes.v1.0.0.json", expectedDomain: "housing_subsidy_types" },
|
|
180
|
+
// ─── Risk taxonomy (names-only projection of the @hti/scoring SOT) ───
|
|
181
|
+
{ file: "riskCategory.v1.0.0.json", expectedDomain: "risk_category" },
|
|
182
|
+
// ─── 0.8.12 vocabulary batch ───
|
|
183
|
+
{ file: "coreFunctions.v1.0.0.json", expectedDomain: "core_functions" },
|
|
184
|
+
{ file: "needsAssessmentChangeType.v1.0.0.json", expectedDomain: "needs_assessment_change_type" },
|
|
185
|
+
{ file: "roiScope.v1.0.0.json", expectedDomain: "roi_scope" },
|
|
186
|
+
{ file: "roiStatus.v1.0.0.json", expectedDomain: "roi_status" },
|
|
187
|
+
{ file: "coreReferralOutcome.v1.0.0.json", expectedDomain: "core_referral_outcome" },
|
|
188
|
+
{ file: "assertionDomain.v1.1.0.json", expectedDomain: "assertion_domain" },
|
|
189
|
+
// ─── 0.8.13 canonical CVC batch ───
|
|
190
|
+
{ file: "coreDhState.v1.0.0.json", expectedDomain: "dh_state" },
|
|
191
|
+
{ file: "coreIndicators.v1.0.0.json", expectedDomain: "core_indicators" },
|
|
192
|
+
{ file: "riskSeverityBand.v1.0.0.json", expectedDomain: "risk_severity_band" },
|
|
193
|
+
{ file: "adminRoles.v1.0.0.json", expectedDomain: "admin_roles" },
|
|
194
|
+
{ file: "userRoles.v1.0.0.json", expectedDomain: "user_roles" },
|
|
195
|
+
{ file: "hmisCurrentLivingSituation.v1.0.0.json", expectedDomain: "hmis_current_living_situation" },
|
|
196
|
+
{ file: "juvenileJusticeEpisodeType.v1.0.0.json", expectedDomain: "juvenile_justice_episode_type" },
|
|
197
|
+
{ file: "incarcerationEpisodeType.v1.0.0.json", expectedDomain: "incarceration_episode_type" },
|
|
198
|
+
{ file: "exploitationType.v1.0.0.json", expectedDomain: "exploitation_type" },
|
|
199
|
+
{ file: "sourceSystem.v1.0.0.json", expectedDomain: "source_system" },
|
|
200
|
+
{ file: "sourceInstrument.v1.0.0.json", expectedDomain: "source_instrument" },
|
|
201
|
+
{ file: "poPetitionBasis.v1.0.0.json", expectedDomain: "po_petition_basis" },
|
|
202
|
+
{ file: "poStatus.v1.0.0.json", expectedDomain: "po_status" },
|
|
203
|
+
{ file: "poViolationStatus.v1.0.0.json", expectedDomain: "po_violation_status" },
|
|
204
|
+
{ file: "sessionTemplate.v1.0.0.json", expectedDomain: "session_template" },
|
|
205
|
+
{ file: "serviceDeliveryChannel.v1.0.0.json", expectedDomain: "service_delivery_channel" },
|
|
206
|
+
{ file: "whyNots.v1.0.0.json", expectedDomain: "why_nots" },
|
|
207
|
+
// ─── 0.8.13 held-item resolutions (Job A) ───
|
|
208
|
+
{ file: "citizenship.v1.0.0.json", expectedDomain: "citizenship" },
|
|
209
|
+
{ file: "traffickingRelevantRole.v1.0.0.json", expectedDomain: "trafficking_relevant_role" },
|
|
210
|
+
// ─── Domains the hand-maintained list previously OMITTED (found by the
|
|
211
|
+
// CVC drift gate, which scans the directory instead of a list). ───
|
|
212
|
+
{ file: "activityType.v1.0.0.json", expectedDomain: "activity_type" },
|
|
213
|
+
{ file: "childChangeType.v1.0.0.json", expectedDomain: "child_change_type" },
|
|
214
|
+
{ file: "contactLinkType.v1.0.0.json", expectedDomain: "contact_link_type" },
|
|
215
|
+
{ file: "hivStatus.v1.0.0.json", expectedDomain: "hiv_status" },
|
|
216
|
+
{ file: "immigrationLegalStatusChangeType.v1.0.0.json", expectedDomain: "immigration_legal_status_change_type" },
|
|
217
|
+
{ file: "mentalHealthStatus.v1.0.0.json", expectedDomain: "mental_health_status" },
|
|
218
|
+
{ file: "programEnrollmentChangeType.v1.0.0.json", expectedDomain: "program_enrollment_change_type" },
|
|
219
|
+
{ file: "provenanceSourceId.v1.0.0.json", expectedDomain: "provenance_source_id" },
|
|
220
|
+
{ file: "radiusBucket.v1.0.0.json", expectedDomain: "radius_bucket" },
|
|
221
|
+
{ file: "roiMethod.v1.0.0.json", expectedDomain: "roi_method" },
|
|
222
|
+
{ file: "romanticRelationshipChangeType.v1.0.0.json", expectedDomain: "romantic_relationship_change_type" },
|
|
223
|
+
{ file: "sessionNoteVisibility.v1.0.0.json", expectedDomain: "session_note_visibility" },
|
|
224
|
+
{ file: "specialNeedsDisabilities.v1.0.0.json", expectedDomain: "special_needs_disabilities" },
|
|
225
|
+
{ file: "suggestionSource.v1.0.0.json", expectedDomain: "suggestion_source" },
|
|
180
226
|
] as const;
|
|
181
227
|
|
|
182
228
|
function loadSot(file: string): unknown {
|