@htilabs/platform-common-models 0.15.0 → 0.17.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.
- package/dist/cvcs/index.cjs +68 -15
- package/dist/cvcs/index.cjs.map +1 -1
- package/dist/cvcs/index.d.cts +76 -20
- package/dist/cvcs/index.d.ts +76 -20
- package/dist/cvcs/index.js +68 -15
- package/dist/cvcs/index.js.map +1 -1
- package/dist/enums/index.cjs +2 -1
- package/dist/enums/index.cjs.map +1 -1
- package/dist/enums/index.d.cts +5 -4
- package/dist/enums/index.d.ts +5 -4
- package/dist/enums/index.js +2 -1
- package/dist/enums/index.js.map +1 -1
- package/dist/{index-C0J3f169.d.ts → index-4DiJrn7y.d.ts} +1 -1
- package/dist/{index-EPjPjR0z.d.cts → index-qreOzXYS.d.cts} +1 -1
- package/dist/index.cjs +70 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +70 -16
- 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/schemas/index.d.cts +25 -25
- package/dist/schemas/index.d.ts +25 -25
- package/package.json +1 -1
- package/src/__tests__/__snapshots__/cvc-sot.snap +3 -3
- package/src/__tests__/core-functions-canon.test.ts +53 -0
- package/src/__tests__/core-information-scope-invariant.test.ts +94 -4
- package/src/__tests__/cvc-sot-snapshot.test.ts +8 -5
- package/src/__tests__/cvc-status-parser.test.ts +1 -1
- package/src/__tests__/cvc-structural.test.ts +2 -2
- package/src/cvcs/{coreFunctions.v1.0.0.json → coreFunctions.v1.1.0.json} +11 -2
- package/src/cvcs/index.ts +2 -2
- package/src/cvcs/{roiScope.v1.0.0.json → roiScope.v1.2.0.json} +51 -7
- package/src/generated/cvc-enums.ts +5 -4
- package/dist/{cvcEntry-DaDrEuTa.d.cts → cvcEntry-ctHTp2df.d.cts} +8 -8
- package/dist/{cvcEntry-DaDrEuTa.d.ts → cvcEntry-ctHTp2df.d.ts} +8 -8
|
@@ -1,9 +1,51 @@
|
|
|
1
1
|
{
|
|
2
2
|
"domain": "roi_scope",
|
|
3
3
|
"name": "ROI Scope",
|
|
4
|
-
"version": "1.
|
|
5
|
-
"_status": "DRAFT — TEMPORARY: net-new value-CVC not yet in Notion; provisional 900+ numbering. 0.8.13: COMPLETED against the canonical 27-item source. 0.8.12 shipped 15 of the canonical 27; the missing 12 are added here. Nothing PAVE shipped was invented — this was purely a gap. Canonical source: `HTI_SHARE_SCOPE_GROUPS` in HTI-LEADS-PAVE-Thread-prototype.html @ HEAD a596eb9 (7 groups x items = 27): identifying (5) + risk (4) + contact (3) + notes (3) + health_accommodation (6) + immigration_legal_status (5) + system (1). The GROUP axis (identifying / risk / contact / notes / health_accommodation / immigration_legal_status / system) is a separate presentation concern and is deliberately NOT modelled as hierarchy rows here — this CVC is the flat item vocabulary that an ROI authorizes. PENDING canonical Notion authoring + steward ratification.",
|
|
6
|
-
"_source": "htilabstech/prototype@a596eb9 HTI-LEADS-PAVE-Thread-prototype.html HTI_SHARE_SCOPE_GROUPS",
|
|
4
|
+
"version": "1.2.0",
|
|
5
|
+
"_status": "DRAFT — TEMPORARY: net-new value-CVC not yet in Notion; provisional 900+ numbering. 0.8.13: COMPLETED against the canonical 27-item source. 0.8.12 shipped 15 of the canonical 27; the missing 12 are added here. Nothing PAVE shipped was invented — this was purely a gap. Canonical source: `HTI_SHARE_SCOPE_GROUPS` in HTI-LEADS-PAVE-Thread-prototype.html @ HEAD a596eb9 (7 groups x items = 27): identifying (5) + risk (4) + contact (3) + notes (3) + health_accommodation (6) + immigration_legal_status (5) + system (1). The GROUP axis (identifying / risk / contact / notes / health_accommodation / immigration_legal_status / system) is a separate presentation concern and is deliberately NOT modelled as hierarchy rows here — this CVC is the flat item vocabulary that an ROI authorizes. PENDING canonical Notion authoring + steward ratification. VERSION 1.2.0 supersedes 1.1.0 (co-bwc): `screen_notes` (983-012) and `background` (983-014) are RETIRED TOMBSTONES, matching CVC-236 `core_information_scope` v1.1.0 (retired 2026-10-05, Narrative notes, signed Spec v2 rule 5). Each keeps its published code (never reused), is `selectable: false` + `retired: true`, and includes nothing: a stored ROI that names one resolves to \"retired\", not \"unknown\". Not additive, hence the version (ADR-CVC-0.8.13 Addendum 2026-10-05; see `_supersedes`). This flat vocabulary is LEGACY: new units (e.g. `session_summary`, 236-005-004) are minted in CVC-236 only and are not mirrored here.",
|
|
6
|
+
"_source": "htilabstech/prototype@a596eb9 HTI-LEADS-PAVE-Thread-prototype.html HTI_SHARE_SCOPE_GROUPS; v1.2.0 retirements: htilabstech/prototype/data/cvcs/core_information_scope.yaml @ 9ef79748 retired_units (L467)",
|
|
7
|
+
"_supersedes": {
|
|
8
|
+
"version": "1.1.0",
|
|
9
|
+
"keyMap": {
|
|
10
|
+
"missingness_root": "missingness_root",
|
|
11
|
+
"unknown": "unknown",
|
|
12
|
+
"anonymous": "anonymous",
|
|
13
|
+
"data_not_collected": "data_not_collected",
|
|
14
|
+
"names": "names",
|
|
15
|
+
"dob": "dob",
|
|
16
|
+
"addresses": "addresses",
|
|
17
|
+
"additional_ids": "additional_ids",
|
|
18
|
+
"demographics": "demographics",
|
|
19
|
+
"screen_indicators": "screen_indicators",
|
|
20
|
+
"victimization": "victimization",
|
|
21
|
+
"ida_full": "ida_full",
|
|
22
|
+
"ida_consid": "ida_consid",
|
|
23
|
+
"contact_info": "contact_info",
|
|
24
|
+
"service_history": "service_history",
|
|
25
|
+
"screen_notes": "screen_notes",
|
|
26
|
+
"case_notes": "case_notes",
|
|
27
|
+
"background": "background",
|
|
28
|
+
"system_info": "system_info",
|
|
29
|
+
"contact_history": "contact_history",
|
|
30
|
+
"accommodation_needs": "accommodation_needs",
|
|
31
|
+
"disability_subtypes": "disability_subtypes",
|
|
32
|
+
"mental_health_status": "mental_health_status",
|
|
33
|
+
"substance_use_status": "substance_use_status",
|
|
34
|
+
"chronic_health_status": "chronic_health_status",
|
|
35
|
+
"hiv_status": "hiv_status",
|
|
36
|
+
"immigration_status": "immigration_status",
|
|
37
|
+
"uscis_alien_number": "uscis_alien_number",
|
|
38
|
+
"federal_protection_applications": "federal_protection_applications",
|
|
39
|
+
"tvap_enrollment": "tvap_enrollment",
|
|
40
|
+
"le_report_status": "le_report_status"
|
|
41
|
+
},
|
|
42
|
+
"retiredCodes": [],
|
|
43
|
+
"notes": {
|
|
44
|
+
"summary": "Every v1.1.0 key is still an entry in v1.2.0, at its v1.1.0 code, so `keyMap` is the identity and `retiredCodes` is empty: no code was withdrawn. Non-additive because 2 published items are now RETIRED tombstones (notes below), matching CVC-236 `core_information_scope` v1.1.0, which retired the same two keys; nothing was added. Before this version the package gave two answers to \"is screen_notes offerable\" (co-bwc). The file was named `roiScope.v1.0.0.json` while declaring version 1.1.0 (the 0.8.13 completion); the published version superseded here is the declared 1.1.0.",
|
|
45
|
+
"screen_notes": "v1.1.0 `screen_notes` was a selectable item. Retired 2026-10-05 (Narrative notes, signed Spec v2 rule 5): The Initial Screen's notes box is an instrument note and belongs to the Initial Screen. It stays at 983-012 as a tombstone (`selectable: false`, `retired: true`) with NO successor key, and includes nothing — a stored ROI that names it narrows, never widens. CVC-236 v1.1.0 retired the same key (canon `data/cvcs/core_information_scope.yaml` `retired_units` L467 @ prototype 9ef79748); canon records that only demo data named it (Crysta 2026-10-04).",
|
|
46
|
+
"background": "v1.1.0 `background` was a selectable item. Retired 2026-10-05 (Narrative notes, signed Spec v2 rule 5): Nothing ever captured it. It stays at 983-014 as a tombstone (`selectable: false`, `retired: true`) with NO successor key, and includes nothing — a stored ROI that names it narrows, never widens. CVC-236 v1.1.0 retired the same key (canon `data/cvcs/core_information_scope.yaml` `retired_units` L467 @ prototype 9ef79748); canon records that only demo data named it (Crysta 2026-10-04)."
|
|
47
|
+
}
|
|
48
|
+
},
|
|
7
49
|
"levels": {
|
|
8
50
|
"0": "Unknown or Missing",
|
|
9
51
|
"1": "ROI scope item"
|
|
@@ -152,10 +194,11 @@
|
|
|
152
194
|
"code": "983-012-000-000-000-000-000",
|
|
153
195
|
"key": "screen_notes",
|
|
154
196
|
"title": "Screen notes",
|
|
155
|
-
"selectable":
|
|
197
|
+
"selectable": false,
|
|
156
198
|
"parentCode": null,
|
|
157
199
|
"childCodes": [],
|
|
158
|
-
"definition": "Narrative notes
|
|
200
|
+
"definition": "RETIRED 2026-10-05 (Narrative notes, signed Spec v2 rule 5), matching its CVC-236 `core_information_scope` v1.1.0 twin. The Initial Screen's notes box is an instrument note and belongs to the Initial Screen. No longer offered in an ROI; a stored code resolves here so a reader can tell retired from unknown, and includes nothing.",
|
|
201
|
+
"retired": true
|
|
159
202
|
},
|
|
160
203
|
{
|
|
161
204
|
"code": "983-013-000-000-000-000-000",
|
|
@@ -170,10 +213,11 @@
|
|
|
170
213
|
"code": "983-014-000-000-000-000-000",
|
|
171
214
|
"key": "background",
|
|
172
215
|
"title": "Background information",
|
|
173
|
-
"selectable":
|
|
216
|
+
"selectable": false,
|
|
174
217
|
"parentCode": null,
|
|
175
218
|
"childCodes": [],
|
|
176
|
-
"definition": "
|
|
219
|
+
"definition": "RETIRED 2026-10-05 (Narrative notes, signed Spec v2 rule 5), matching its CVC-236 `core_information_scope` v1.1.0 twin. Nothing ever captured it. No longer offered in an ROI; a stored code resolves here so a reader can tell retired from unknown, and includes nothing.",
|
|
220
|
+
"retired": true
|
|
177
221
|
},
|
|
178
222
|
{
|
|
179
223
|
"code": "983-015-000-000-000-000-000",
|
|
@@ -3986,9 +3986,9 @@ export const RiskCategoryKeys = {
|
|
|
3986
3986
|
export type RiskCategoryKey = keyof typeof RiskCategoryKeys;
|
|
3987
3987
|
|
|
3988
3988
|
/**
|
|
3989
|
-
* Key → positional code map for the `core_functions` CVC domain (CANONICAL Notion CVC-133 `core - functions`, verified v1.0 — the Canonical Authorization Model function registry:
|
|
3989
|
+
* Key → positional code map for the `core_functions` CVC domain (CANONICAL Notion CVC-133 `core - functions`, verified v1.0 — the Canonical Authorization Model function registry: 78 functions (the verified 77 + `note_open_departed_author`, 133-078, appended 2026-10-05) the roles → functions → gates/tiers graph is built over. NOT provisional numbering. Per-entry lifecycle Status (v1 / future / not-started), Platform Relevance, user/admin relevance and Category are carried in each entry's definition, since the CVC entry schema has no fields for them).
|
|
3990
3990
|
*
|
|
3991
|
-
* Domain: `core_functions` · Version: 1.
|
|
3991
|
+
* Domain: `core_functions` · Version: 1.1.0 · Entries: 82
|
|
3992
3992
|
*/
|
|
3993
3993
|
export const CoreFunctionsKeys = {
|
|
3994
3994
|
missingness_root: "133-000-000-000-000-000-000",
|
|
@@ -4072,6 +4072,7 @@ export const CoreFunctionsKeys = {
|
|
|
4072
4072
|
training_content_upload: "133-075-000-000-000-000-000",
|
|
4073
4073
|
training_gate_manage: "133-076-000-000-000-000-000",
|
|
4074
4074
|
usr_manage: "133-077-000-000-000-000-000",
|
|
4075
|
+
note_open_departed_author: "133-078-000-000-000-000-000",
|
|
4075
4076
|
} as const;
|
|
4076
4077
|
|
|
4077
4078
|
export type CoreFunctionsKey = keyof typeof CoreFunctionsKeys;
|
|
@@ -4183,9 +4184,9 @@ export const CoreInformationScopeKeys = {
|
|
|
4183
4184
|
export type CoreInformationScopeKey = keyof typeof CoreInformationScopeKeys;
|
|
4184
4185
|
|
|
4185
4186
|
/**
|
|
4186
|
-
* Key → positional code map for the `roi_scope` CVC domain (DRAFT-TEMPORARY;
|
|
4187
|
+
* Key → positional code map for the `roi_scope` CVC domain (DRAFT-TEMPORARY; LEGACY flat item vocabulary, superseded for new work by `core_information_scope` (CVC-236). 27 ROI scope ITEMS: 25 live + 2 RETIRED tombstones (`screen_notes`, `background`; retired 2026-10-05, matching CVC-236 v1.1.0) that keep their codes so a stored value resolves, but are `selectable: false` + `retired: true` and include nothing — never offer them. The item axis only — named bundles over these items are ROI_SCOPE_PRESET_NAMES).
|
|
4187
4188
|
*
|
|
4188
|
-
* Domain: `roi_scope` · Version: 1.
|
|
4189
|
+
* Domain: `roi_scope` · Version: 1.2.0 · Entries: 31
|
|
4189
4190
|
*/
|
|
4190
4191
|
export const RoiScopeKeys = {
|
|
4191
4192
|
missingness_root: "983-000-000-000-000-000-000",
|
|
@@ -233,18 +233,18 @@ type SectionQuestionRef = InferRawDocType<typeof sectionQuestionRefSchema>;
|
|
|
233
233
|
declare const guidanceSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
234
234
|
_id: false;
|
|
235
235
|
}, {
|
|
236
|
-
text: string;
|
|
237
236
|
type: "tip" | "warning" | "prompt";
|
|
238
|
-
}, mongoose.Document<unknown, {}, {
|
|
239
237
|
text: string;
|
|
238
|
+
}, mongoose.Document<unknown, {}, {
|
|
240
239
|
type: "tip" | "warning" | "prompt";
|
|
240
|
+
text: string;
|
|
241
241
|
}, {
|
|
242
242
|
id: string;
|
|
243
243
|
}, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
|
|
244
244
|
_id: false;
|
|
245
245
|
}>> & Omit<{
|
|
246
|
-
text: string;
|
|
247
246
|
type: "tip" | "warning" | "prompt";
|
|
247
|
+
text: string;
|
|
248
248
|
} & {
|
|
249
249
|
_id: mongoose.Types.ObjectId;
|
|
250
250
|
} & {
|
|
@@ -252,8 +252,8 @@ declare const guidanceSchema: Schema<any, mongoose.Model<any, any, any, any, any
|
|
|
252
252
|
}, "id"> & {
|
|
253
253
|
id: string;
|
|
254
254
|
}, unknown, {
|
|
255
|
-
text: string;
|
|
256
255
|
type: "tip" | "warning" | "prompt";
|
|
256
|
+
text: string;
|
|
257
257
|
} & {
|
|
258
258
|
_id: mongoose.Types.ObjectId;
|
|
259
259
|
} & {
|
|
@@ -294,18 +294,18 @@ declare const sectionSchemaDefinition: {
|
|
|
294
294
|
type: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
295
295
|
_id: false;
|
|
296
296
|
}, {
|
|
297
|
-
text: string;
|
|
298
297
|
type: "tip" | "warning" | "prompt";
|
|
299
|
-
}, mongoose.Document<unknown, {}, {
|
|
300
298
|
text: string;
|
|
299
|
+
}, mongoose.Document<unknown, {}, {
|
|
301
300
|
type: "tip" | "warning" | "prompt";
|
|
301
|
+
text: string;
|
|
302
302
|
}, {
|
|
303
303
|
id: string;
|
|
304
304
|
}, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
|
|
305
305
|
_id: false;
|
|
306
306
|
}>> & Omit<{
|
|
307
|
-
text: string;
|
|
308
307
|
type: "tip" | "warning" | "prompt";
|
|
308
|
+
text: string;
|
|
309
309
|
} & {
|
|
310
310
|
_id: mongoose.Types.ObjectId;
|
|
311
311
|
} & {
|
|
@@ -313,8 +313,8 @@ declare const sectionSchemaDefinition: {
|
|
|
313
313
|
}, "id"> & {
|
|
314
314
|
id: string;
|
|
315
315
|
}, unknown, {
|
|
316
|
-
text: string;
|
|
317
316
|
type: "tip" | "warning" | "prompt";
|
|
317
|
+
text: string;
|
|
318
318
|
} & {
|
|
319
319
|
_id: mongoose.Types.ObjectId;
|
|
320
320
|
} & {
|
|
@@ -233,18 +233,18 @@ type SectionQuestionRef = InferRawDocType<typeof sectionQuestionRefSchema>;
|
|
|
233
233
|
declare const guidanceSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
234
234
|
_id: false;
|
|
235
235
|
}, {
|
|
236
|
-
text: string;
|
|
237
236
|
type: "tip" | "warning" | "prompt";
|
|
238
|
-
}, mongoose.Document<unknown, {}, {
|
|
239
237
|
text: string;
|
|
238
|
+
}, mongoose.Document<unknown, {}, {
|
|
240
239
|
type: "tip" | "warning" | "prompt";
|
|
240
|
+
text: string;
|
|
241
241
|
}, {
|
|
242
242
|
id: string;
|
|
243
243
|
}, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
|
|
244
244
|
_id: false;
|
|
245
245
|
}>> & Omit<{
|
|
246
|
-
text: string;
|
|
247
246
|
type: "tip" | "warning" | "prompt";
|
|
247
|
+
text: string;
|
|
248
248
|
} & {
|
|
249
249
|
_id: mongoose.Types.ObjectId;
|
|
250
250
|
} & {
|
|
@@ -252,8 +252,8 @@ declare const guidanceSchema: Schema<any, mongoose.Model<any, any, any, any, any
|
|
|
252
252
|
}, "id"> & {
|
|
253
253
|
id: string;
|
|
254
254
|
}, unknown, {
|
|
255
|
-
text: string;
|
|
256
255
|
type: "tip" | "warning" | "prompt";
|
|
256
|
+
text: string;
|
|
257
257
|
} & {
|
|
258
258
|
_id: mongoose.Types.ObjectId;
|
|
259
259
|
} & {
|
|
@@ -294,18 +294,18 @@ declare const sectionSchemaDefinition: {
|
|
|
294
294
|
type: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
295
295
|
_id: false;
|
|
296
296
|
}, {
|
|
297
|
-
text: string;
|
|
298
297
|
type: "tip" | "warning" | "prompt";
|
|
299
|
-
}, mongoose.Document<unknown, {}, {
|
|
300
298
|
text: string;
|
|
299
|
+
}, mongoose.Document<unknown, {}, {
|
|
301
300
|
type: "tip" | "warning" | "prompt";
|
|
301
|
+
text: string;
|
|
302
302
|
}, {
|
|
303
303
|
id: string;
|
|
304
304
|
}, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
|
|
305
305
|
_id: false;
|
|
306
306
|
}>> & Omit<{
|
|
307
|
-
text: string;
|
|
308
307
|
type: "tip" | "warning" | "prompt";
|
|
308
|
+
text: string;
|
|
309
309
|
} & {
|
|
310
310
|
_id: mongoose.Types.ObjectId;
|
|
311
311
|
} & {
|
|
@@ -313,8 +313,8 @@ declare const sectionSchemaDefinition: {
|
|
|
313
313
|
}, "id"> & {
|
|
314
314
|
id: string;
|
|
315
315
|
}, unknown, {
|
|
316
|
-
text: string;
|
|
317
316
|
type: "tip" | "warning" | "prompt";
|
|
317
|
+
text: string;
|
|
318
318
|
} & {
|
|
319
319
|
_id: mongoose.Types.ObjectId;
|
|
320
320
|
} & {
|