@htilabs/platform-common-models 0.8.9 → 0.8.12
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/config/index.cjs +191 -0
- package/dist/config/index.cjs.map +1 -0
- package/dist/config/index.d.cts +101 -0
- package/dist/config/index.d.ts +101 -0
- package/dist/config/index.js +165 -0
- package/dist/config/index.js.map +1 -0
- package/dist/constants/index.cjs +2 -0
- 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 +2 -0
- package/dist/constants/index.js.map +1 -1
- package/dist/{cvcEntry-DaDrEuTa.d.cts → cvcEntry-BCj1OWqL.d.cts} +36 -36
- package/dist/{cvcEntry-DaDrEuTa.d.ts → cvcEntry-BCj1OWqL.d.ts} +36 -36
- package/dist/cvcs/index.cjs +1520 -5
- package/dist/cvcs/index.cjs.map +1 -1
- package/dist/cvcs/index.d.cts +3300 -1612
- package/dist/cvcs/index.d.ts +3300 -1612
- package/dist/cvcs/index.js +1513 -5
- package/dist/cvcs/index.js.map +1 -1
- package/dist/{index-EPjPjR0z.d.cts → index-CoVr1jIV.d.cts} +1 -1
- package/dist/{index-C0J3f169.d.ts → index-I-DiX9eQ.d.ts} +1 -1
- package/dist/index.cjs +1705 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +216 -7
- package/dist/index.d.ts +216 -7
- package/dist/index.js +1691 -7
- package/dist/index.js.map +1 -1
- package/dist/models/index.d.cts +2 -2
- package/dist/models/index.d.ts +2 -2
- package/dist/{platform-auth-BSKYSDKe.d.cts → platform-auth-BwfZ0bxU.d.cts} +1 -1
- package/dist/{platform-auth-BSKYSDKe.d.ts → platform-auth-BwfZ0bxU.d.ts} +1 -1
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +11 -11
- package/dist/schemas/index.d.ts +11 -11
- package/dist/schemas/index.js.map +1 -1
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/package.json +7 -1
- package/src/__tests__/__snapshots__/cvc-sot.snap +32 -4
- package/src/__tests__/cvc-sot-snapshot.test.ts +24 -2
- package/src/__tests__/cvc-structural.test.ts +11 -1
- package/src/__tests__/runtime-contract-validator.test.ts +556 -0
- package/src/config/fixtures/valid.yaml +90 -0
- package/src/config/index.ts +352 -0
- package/src/constants/ic.ts +14 -1
- package/src/cvcs/{assertionDomain.v1.0.0.json → assertionDomain.v1.1.0.json} +12 -3
- package/src/cvcs/{checkInPhase.v1.0.0.json → checkInPhase.v1.1.0.json} +20 -2
- package/src/cvcs/coreFunctions.v1.0.0.json +746 -0
- package/src/cvcs/coreReferralOutcome.v1.0.0.json +71 -0
- package/src/cvcs/index.ts +15 -1
- package/src/cvcs/needsAssessmentChangeType.v1.0.0.json +134 -0
- package/src/cvcs/riskBand.v1.0.0.json +98 -0
- package/src/cvcs/riskCategory.v1.0.0.json +134 -0
- package/src/cvcs/roiScope.v1.0.0.json +188 -0
- package/src/cvcs/roiStatus.v1.0.0.json +98 -0
- package/src/generated/cvc-enums.ts +225 -2
package/dist/types/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ek as PlatformToolValue, cR as FunctionStatusValue, eH as RoleLevelValue, eS as ShareViewValue, eg as PermissionStateValue } from '../platform-auth-
|
|
2
|
-
export { h as AccommodationValue, i as AgeBinReportingValue, j as AppScopeValue, k as ApparentAgeValue, cH as DataQualityValue, cP as FormStatusValue, cQ as FormTypeValue, cS as IC13Category, cU as IC13Value, cV as IC22Value, cW as IC23Value, cX as IC24Value, cY as IC25Value, cZ as IC49ReferralOutcomeValue, c_ as IC49ReferralVerificationValue, c$ as IC49Value, d0 as IC4Value, d2 as IC56Value, d3 as IC57Value, d5 as IC58Value, d6 as IC59Value, d7 as IC5Value, dY as IncidentInvolvementRoleValue, dZ as IncidentParticipationRoleValue, d_ as InteractionTypeValue, e1 as MinorAdultStatusValue, eh as PersonDisplayCategoryValue, ei as PersonRoleValue, ej as PersonTypeValue, eq as QuestionFormatValue, er as QuickStartTemplateId, eD as RecordStateValue, eF as RelationshipConcernValue, eG as RelationshipDynamicValue, eR as SessionStateValue, eT as SubmissionStateValue, eX as UserStatusValue } from '../platform-auth-
|
|
1
|
+
import { ek as PlatformToolValue, cR as FunctionStatusValue, eH as RoleLevelValue, eS as ShareViewValue, eg as PermissionStateValue } from '../platform-auth-BwfZ0bxU.cjs';
|
|
2
|
+
export { h as AccommodationValue, i as AgeBinReportingValue, j as AppScopeValue, k as ApparentAgeValue, cH as DataQualityValue, cP as FormStatusValue, cQ as FormTypeValue, cS as IC13Category, cU as IC13Value, cV as IC22Value, cW as IC23Value, cX as IC24Value, cY as IC25Value, cZ as IC49ReferralOutcomeValue, c_ as IC49ReferralVerificationValue, c$ as IC49Value, d0 as IC4Value, d2 as IC56Value, d3 as IC57Value, d5 as IC58Value, d6 as IC59Value, d7 as IC5Value, dY as IncidentInvolvementRoleValue, dZ as IncidentParticipationRoleValue, d_ as InteractionTypeValue, e1 as MinorAdultStatusValue, eh as PersonDisplayCategoryValue, ei as PersonRoleValue, ej as PersonTypeValue, eq as QuestionFormatValue, er as QuickStartTemplateId, eD as RecordStateValue, eF as RelationshipConcernValue, eG as RelationshipDynamicValue, eR as SessionStateValue, eT as SubmissionStateValue, eX as UserStatusValue } from '../platform-auth-BwfZ0bxU.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @htilabs/platform-common-models — Platform Authorization Types
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ek as PlatformToolValue, cR as FunctionStatusValue, eH as RoleLevelValue, eS as ShareViewValue, eg as PermissionStateValue } from '../platform-auth-
|
|
2
|
-
export { h as AccommodationValue, i as AgeBinReportingValue, j as AppScopeValue, k as ApparentAgeValue, cH as DataQualityValue, cP as FormStatusValue, cQ as FormTypeValue, cS as IC13Category, cU as IC13Value, cV as IC22Value, cW as IC23Value, cX as IC24Value, cY as IC25Value, cZ as IC49ReferralOutcomeValue, c_ as IC49ReferralVerificationValue, c$ as IC49Value, d0 as IC4Value, d2 as IC56Value, d3 as IC57Value, d5 as IC58Value, d6 as IC59Value, d7 as IC5Value, dY as IncidentInvolvementRoleValue, dZ as IncidentParticipationRoleValue, d_ as InteractionTypeValue, e1 as MinorAdultStatusValue, eh as PersonDisplayCategoryValue, ei as PersonRoleValue, ej as PersonTypeValue, eq as QuestionFormatValue, er as QuickStartTemplateId, eD as RecordStateValue, eF as RelationshipConcernValue, eG as RelationshipDynamicValue, eR as SessionStateValue, eT as SubmissionStateValue, eX as UserStatusValue } from '../platform-auth-
|
|
1
|
+
import { ek as PlatformToolValue, cR as FunctionStatusValue, eH as RoleLevelValue, eS as ShareViewValue, eg as PermissionStateValue } from '../platform-auth-BwfZ0bxU.js';
|
|
2
|
+
export { h as AccommodationValue, i as AgeBinReportingValue, j as AppScopeValue, k as ApparentAgeValue, cH as DataQualityValue, cP as FormStatusValue, cQ as FormTypeValue, cS as IC13Category, cU as IC13Value, cV as IC22Value, cW as IC23Value, cX as IC24Value, cY as IC25Value, cZ as IC49ReferralOutcomeValue, c_ as IC49ReferralVerificationValue, c$ as IC49Value, d0 as IC4Value, d2 as IC56Value, d3 as IC57Value, d5 as IC58Value, d6 as IC59Value, d7 as IC5Value, dY as IncidentInvolvementRoleValue, dZ as IncidentParticipationRoleValue, d_ as InteractionTypeValue, e1 as MinorAdultStatusValue, eh as PersonDisplayCategoryValue, ei as PersonRoleValue, ej as PersonTypeValue, eq as QuestionFormatValue, er as QuickStartTemplateId, eD as RecordStateValue, eF as RelationshipConcernValue, eG as RelationshipDynamicValue, eR as SessionStateValue, eT as SubmissionStateValue, eX as UserStatusValue } from '../platform-auth-BwfZ0bxU.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @htilabs/platform-common-models — Platform Authorization Types
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@htilabs/platform-common-models",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.12",
|
|
4
4
|
"description": "Shared constants, types, and models for HTI Labs applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -46,6 +46,11 @@
|
|
|
46
46
|
"types": "./dist/cvcs/index.d.ts",
|
|
47
47
|
"import": "./dist/cvcs/index.js",
|
|
48
48
|
"require": "./dist/cvcs/index.cjs"
|
|
49
|
+
},
|
|
50
|
+
"./config": {
|
|
51
|
+
"types": "./dist/config/index.d.ts",
|
|
52
|
+
"import": "./dist/config/index.js",
|
|
53
|
+
"require": "./dist/config/index.cjs"
|
|
49
54
|
}
|
|
50
55
|
},
|
|
51
56
|
"files": [
|
|
@@ -90,6 +95,7 @@
|
|
|
90
95
|
"vitest": "^1.6.1"
|
|
91
96
|
},
|
|
92
97
|
"dependencies": {
|
|
98
|
+
"yaml": "^2.7.0",
|
|
93
99
|
"zod": "^3.22.0"
|
|
94
100
|
},
|
|
95
101
|
"peerDependencies": {
|
|
@@ -251,8 +251,8 @@
|
|
|
251
251
|
"hash": "bcb674f2321ac832eea73553c6b0e0baac6af00ec526226fa1c664267d185122"
|
|
252
252
|
},
|
|
253
253
|
"check_in_phase": {
|
|
254
|
-
"count":
|
|
255
|
-
"hash": "
|
|
254
|
+
"count": 17,
|
|
255
|
+
"hash": "150538e848b5f46ad7340e239f983fb410c543c2ff7c3a43b174d29214e6accb"
|
|
256
256
|
},
|
|
257
257
|
"child_behavioral_concerns": {
|
|
258
258
|
"count": 16,
|
|
@@ -511,8 +511,8 @@
|
|
|
511
511
|
"hash": "4341619e6016822fcc353987a635421c767391a85f2ff7602726ca02bfa0f4f7"
|
|
512
512
|
},
|
|
513
513
|
"assertion_domain": {
|
|
514
|
-
"count":
|
|
515
|
-
"hash": "
|
|
514
|
+
"count": 71,
|
|
515
|
+
"hash": "50b28e967d6bbdf230377c077e1f7e0bef6fb5133911e573289242fc66cc713b"
|
|
516
516
|
},
|
|
517
517
|
"activity_type": {
|
|
518
518
|
"count": 14,
|
|
@@ -569,6 +569,34 @@
|
|
|
569
569
|
"romantic_relationship_change_type": {
|
|
570
570
|
"count": 16,
|
|
571
571
|
"hash": "861a5584a875057a67e0e8727b92c64d48be64a7dba8a1eb4af19268cf6b1ccb"
|
|
572
|
+
},
|
|
573
|
+
"risk_category": {
|
|
574
|
+
"count": 13,
|
|
575
|
+
"hash": "8f650b786261619b2468eb3982c6146c21fa2ee3b1aa4504aa1084ad82543548"
|
|
576
|
+
},
|
|
577
|
+
"risk_band": {
|
|
578
|
+
"count": 9,
|
|
579
|
+
"hash": "9d45121aecfe8f56b104ccd8e538f91a70e70abdfac4e1428ec50355011f43c2"
|
|
580
|
+
},
|
|
581
|
+
"core_functions": {
|
|
582
|
+
"count": 81,
|
|
583
|
+
"hash": "5ed3bb6231e610bd6646f0d37e4bb6474d0c66a8c1e9ff6912ee2c00d1ccf534"
|
|
584
|
+
},
|
|
585
|
+
"needs_assessment_change_type": {
|
|
586
|
+
"count": 13,
|
|
587
|
+
"hash": "17303a3d9171a32d4302d94edfee67432bd46f102c39ef1db083b9628518f91e"
|
|
588
|
+
},
|
|
589
|
+
"roi_scope": {
|
|
590
|
+
"count": 19,
|
|
591
|
+
"hash": "d79ea51997583983e5049338a836b5e016ec443cf6bea91909f89bd53eb48cb9"
|
|
592
|
+
},
|
|
593
|
+
"roi_status": {
|
|
594
|
+
"count": 9,
|
|
595
|
+
"hash": "d47dc0c4bb2cdfac913dfeb9f6f4b070385ac4ffb73e5bbcb00a0959012abac7"
|
|
596
|
+
},
|
|
597
|
+
"core_referral_outcome": {
|
|
598
|
+
"count": 6,
|
|
599
|
+
"hash": "21308ee9fa9e4630e2a9faef4ae3e1754213d4b0acc4447f601a880edf74e2f8"
|
|
572
600
|
}
|
|
573
601
|
}
|
|
574
602
|
}
|
|
@@ -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 },
|
|
@@ -586,7 +586,7 @@ const SOT_SPECS: readonly SotSpec[] = [
|
|
|
586
586
|
// root + 3 canonical missingness children = 16. CVC number is PROVISIONAL
|
|
587
587
|
// pending ratification.
|
|
588
588
|
{ file: "housingSubsidyTypes.v1.0.0.json", domain: "housing_subsidy_types", expectedCount: 16 },
|
|
589
|
-
{ file: "assertionDomain.v1.
|
|
589
|
+
{ file: "assertionDomain.v1.1.0.json", domain: "assertion_domain", expectedCount: 71 },
|
|
590
590
|
{ file: "activityType.v1.0.0.json", domain: "activity_type", expectedCount: 14 },
|
|
591
591
|
{ file: "provenanceSourceId.v1.0.0.json", domain: "provenance_source_id", expectedCount: 13 },
|
|
592
592
|
{ file: "radiusBucket.v1.0.0.json", domain: "radius_bucket", expectedCount: 9 },
|
|
@@ -602,6 +602,28 @@ const SOT_SPECS: readonly SotSpec[] = [
|
|
|
602
602
|
{ file: "immigrationLegalStatusChangeType.v1.0.0.json", domain: "immigration_legal_status_change_type", expectedCount: 14 },
|
|
603
603
|
{ file: "programEnrollmentChangeType.v1.0.0.json", domain: "program_enrollment_change_type", expectedCount: 13 },
|
|
604
604
|
{ file: "romanticRelationshipChangeType.v1.0.0.json", domain: "romantic_relationship_change_type", expectedCount: 16 },
|
|
605
|
+
// ─── Risk taxonomy (names-only projection of the @hti/scoring SOT) ───
|
|
606
|
+
// 9 categories (`I`..`IX`, tree[].kind === "category") + 4 missingness = 13
|
|
607
|
+
{ file: "riskCategory.v1.0.0.json", domain: "risk_category", expectedCount: 13 },
|
|
608
|
+
// 5 bands (severe/elevated/review/watch/stable — `stable` is the cutoff-less
|
|
609
|
+
// fall-through floor, so the count is 5, NOT the 4 numeric BandCutoffs
|
|
610
|
+
// fields) + 4 missingness = 9
|
|
611
|
+
{ file: "riskBand.v1.0.0.json", domain: "risk_band", expectedCount: 9 },
|
|
612
|
+
// ─── 0.8.12 vocabulary batch ───
|
|
613
|
+
// CANONICAL Notion CVC-133 `core - functions` (verified v1.0): 77 functions
|
|
614
|
+
// + 4 missingness = 81
|
|
615
|
+
{ file: "coreFunctions.v1.0.0.json", domain: "core_functions", expectedCount: 81 },
|
|
616
|
+
// 9 fine-grained Needs-Assessment CAR change types (@pave/domain
|
|
617
|
+
// NEEDS_ASSESSMENT_CHANGE_TYPES, casing normalized to lower_snake) + 4 = 13
|
|
618
|
+
{ file: "needsAssessmentChangeType.v1.0.0.json", domain: "needs_assessment_change_type", expectedCount: 13 },
|
|
619
|
+
// 15 ROI scope items (@pave/domain ROI_SCOPE_KEYS — the PAVE-seed-attested
|
|
620
|
+
// subset of the prototype's 27-item UI superset) + 4 = 19
|
|
621
|
+
{ file: "roiScope.v1.0.0.json", domain: "roi_scope", expectedCount: 19 },
|
|
622
|
+
// 5 stored-ROI lifecycle states (@pave/domain ROI_STATUSES) + 4 = 9
|
|
623
|
+
{ file: "roiStatus.v1.0.0.json", domain: "roi_status", expectedCount: 9 },
|
|
624
|
+
// 2 HMIS FY2026 "P2 Referrals Provided" outcomes (attained / not_attained)
|
|
625
|
+
// + 4 = 6. The not-attained REASON is a separate axis, not folded in here.
|
|
626
|
+
{ file: "coreReferralOutcome.v1.0.0.json", domain: "core_referral_outcome", expectedCount: 6 },
|
|
605
627
|
] as const;
|
|
606
628
|
|
|
607
629
|
// ─── 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,16 @@ 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
|
+
{ file: "riskBand.v1.0.0.json", expectedDomain: "risk_band" },
|
|
183
|
+
// ─── 0.8.12 vocabulary batch ───
|
|
184
|
+
{ file: "coreFunctions.v1.0.0.json", expectedDomain: "core_functions" },
|
|
185
|
+
{ file: "needsAssessmentChangeType.v1.0.0.json", expectedDomain: "needs_assessment_change_type" },
|
|
186
|
+
{ file: "roiScope.v1.0.0.json", expectedDomain: "roi_scope" },
|
|
187
|
+
{ file: "roiStatus.v1.0.0.json", expectedDomain: "roi_status" },
|
|
188
|
+
{ file: "coreReferralOutcome.v1.0.0.json", expectedDomain: "core_referral_outcome" },
|
|
189
|
+
{ file: "assertionDomain.v1.1.0.json", expectedDomain: "assertion_domain" },
|
|
180
190
|
] as const;
|
|
181
191
|
|
|
182
192
|
function loadSot(file: string): unknown {
|