@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,4 +1,4 @@
|
|
|
1
|
-
import { F as Form, l as buildFormSchema, h as Section, q as buildSectionSchema, Q as Question, o as buildQuestionSchema, f as ScoringRule, p as buildScoringRuleSchema, P as PlatformFunction, m as buildPlatformFunctionSchema, d as PlatformRole, n as buildPlatformRoleSchema, b as CvcRegistry, k as buildCvcRegistrySchema, a as CvcEntry, j as buildCvcEntrySchema } from './cvcEntry-
|
|
1
|
+
import { F as Form, l as buildFormSchema, h as Section, q as buildSectionSchema, Q as Question, o as buildQuestionSchema, f as ScoringRule, p as buildScoringRuleSchema, P as PlatformFunction, m as buildPlatformFunctionSchema, d as PlatformRole, n as buildPlatformRoleSchema, b as CvcRegistry, k as buildCvcRegistrySchema, a as CvcEntry, j as buildCvcEntrySchema } from './cvcEntry-ctHTp2df.js';
|
|
2
2
|
import * as mongoose from 'mongoose';
|
|
3
3
|
import { HydratedDocument, Connection, Model } from 'mongoose';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as Form, l as buildFormSchema, h as Section, q as buildSectionSchema, Q as Question, o as buildQuestionSchema, f as ScoringRule, p as buildScoringRuleSchema, P as PlatformFunction, m as buildPlatformFunctionSchema, d as PlatformRole, n as buildPlatformRoleSchema, b as CvcRegistry, k as buildCvcRegistrySchema, a as CvcEntry, j as buildCvcEntrySchema } from './cvcEntry-
|
|
1
|
+
import { F as Form, l as buildFormSchema, h as Section, q as buildSectionSchema, Q as Question, o as buildQuestionSchema, f as ScoringRule, p as buildScoringRuleSchema, P as PlatformFunction, m as buildPlatformFunctionSchema, d as PlatformRole, n as buildPlatformRoleSchema, b as CvcRegistry, k as buildCvcRegistrySchema, a as CvcEntry, j as buildCvcEntrySchema } from './cvcEntry-ctHTp2df.cjs';
|
|
2
2
|
import * as mongoose from 'mongoose';
|
|
3
3
|
import { HydratedDocument, Connection, Model } from 'mongoose';
|
|
4
4
|
|
package/dist/index.cjs
CHANGED
|
@@ -524,7 +524,7 @@ __export(src_exports, {
|
|
|
524
524
|
contactLinkTypeSot: () => contactLinkType_v1_0_0_default,
|
|
525
525
|
contactSafetyStatusSot: () => contactSafetyStatus_v1_0_0_default,
|
|
526
526
|
coreDhStateSot: () => coreDhState_v1_0_0_default,
|
|
527
|
-
coreFunctionsSot: () =>
|
|
527
|
+
coreFunctionsSot: () => coreFunctions_v1_1_0_default,
|
|
528
528
|
coreIndicatorsSot: () => coreIndicators_v1_1_0_default,
|
|
529
529
|
coreInformationScopeSot: () => coreInformationScope_v1_1_0_default,
|
|
530
530
|
coreReferralOutcomeSot: () => coreReferralOutcome_v1_0_0_default,
|
|
@@ -680,7 +680,7 @@ __export(src_exports, {
|
|
|
680
680
|
riskIdentificationMilestoneSot: () => riskIdentificationMilestone_v1_0_0_default,
|
|
681
681
|
riskSeverityBandSot: () => riskSeverityBand_v1_0_0_default,
|
|
682
682
|
roiMethodSot: () => roiMethod_v1_0_0_default,
|
|
683
|
-
roiScopeSot: () =>
|
|
683
|
+
roiScopeSot: () => roiScope_v1_2_0_default,
|
|
684
684
|
roiStatusSot: () => roiStatus_v1_0_0_default,
|
|
685
685
|
roleContextSot: () => roleContext_v1_0_0_default,
|
|
686
686
|
romanticRelationshipChangeTypeSot: () => romanticRelationshipChangeType_v1_0_0_default,
|
|
@@ -10739,7 +10739,8 @@ var CoreFunctionsKeys = {
|
|
|
10739
10739
|
thread_share_send: "133-074-000-000-000-000-000",
|
|
10740
10740
|
training_content_upload: "133-075-000-000-000-000-000",
|
|
10741
10741
|
training_gate_manage: "133-076-000-000-000-000-000",
|
|
10742
|
-
usr_manage: "133-077-000-000-000-000-000"
|
|
10742
|
+
usr_manage: "133-077-000-000-000-000-000",
|
|
10743
|
+
note_open_departed_author: "133-078-000-000-000-000-000"
|
|
10743
10744
|
};
|
|
10744
10745
|
var NeedsAssessmentChangeTypeKeys = {
|
|
10745
10746
|
missingness_root: "982-000-000-000-000-000-000",
|
|
@@ -38845,12 +38846,12 @@ var riskCategory_v1_0_0_default = {
|
|
|
38845
38846
|
]
|
|
38846
38847
|
};
|
|
38847
38848
|
|
|
38848
|
-
// src/cvcs/coreFunctions.v1.
|
|
38849
|
-
var
|
|
38849
|
+
// src/cvcs/coreFunctions.v1.1.0.json
|
|
38850
|
+
var coreFunctions_v1_1_0_default = {
|
|
38850
38851
|
domain: "core_functions",
|
|
38851
38852
|
name: "Core Functions",
|
|
38852
|
-
version: "1.
|
|
38853
|
-
_status: "DRAFTED \u2014 NEEDS REVIEW: canonical Notion CVC-133 (core - functions), verified v1.0, ported verbatim from the Notion codebook. Canonical numbering (133), NOT provisional. Per-entry lifecycle Status (v1 / future / not-started) is carried in each definition.",
|
|
38853
|
+
version: "1.1.0",
|
|
38854
|
+
_status: "DRAFTED \u2014 NEEDS REVIEW: canonical Notion CVC-133 (core - functions), verified v1.0, ported verbatim from the Notion codebook. Canonical numbering (133), NOT provisional. Per-entry lifecycle Status (v1 / future / not-started) is carried in each definition. VERSION 1.1.0 (additive; ADR-CVC-0.8.13 Addendum 2026-10-05): APPENDS `note_open_departed_author` at 133-078 (added 2026-10-05 while building the Narrative notes Spec v2, rule 10; canon's own logic_notes mark the row as awaiting steward review (Crysta); canon `data/cvcs/core_functions.yaml` L68-93 @ prototype 9ef79748, unchanged at fed744f3, and the codebook_all.csv export). Default Off for Account Admin (MEM-ADM) only; bounds are not carried by this entry schema. Every 1.0.0 code and key is unchanged. Canon carries 112 functions; this SOT carries 78 \u2014 the other 34 canon rows are a separate absorb, not taken here.",
|
|
38854
38855
|
_source: "Notion CVC-133 core - functions (collection://3211ef14-abcd-8024-867d-000be4b35a79)",
|
|
38855
38856
|
levels: {
|
|
38856
38857
|
"0": "Unknown or Missing",
|
|
@@ -39589,6 +39590,15 @@ var coreFunctions_v1_0_0_default = {
|
|
|
39589
39590
|
parentCode: null,
|
|
39590
39591
|
childCodes: [],
|
|
39591
39592
|
definition: "Create, invite, deactivate, and manage user accounts within a member account or platform context. [Status: Defined; existing PAVE function. Platform: PLATFORM. User-relevant: no. Admin-relevant: yes. Category: Identity & access administration, Platform administration (HTI-only).]"
|
|
39593
|
+
},
|
|
39594
|
+
{
|
|
39595
|
+
code: "133-078-000-000-000-000-000",
|
|
39596
|
+
key: "note_open_departed_author",
|
|
39597
|
+
title: "Open a deactivated author's private notes",
|
|
39598
|
+
selectable: true,
|
|
39599
|
+
parentCode: null,
|
|
39600
|
+
childCodes: [],
|
|
39601
|
+
definition: `Move a deactivated author's "Private to me" notes to "Our account only", so the account can read notes whose author no longer has an account. The admin cannot read a note before opening it and cannot move it any further. [Status: Defined; new function. Platform: PAVE, THREAD. User-relevant: no. Admin-relevant: yes. Category: Account administration (member admin).]`
|
|
39592
39602
|
}
|
|
39593
39603
|
]
|
|
39594
39604
|
};
|
|
@@ -41021,13 +41031,55 @@ var coreInformationScope_v1_1_0_default = {
|
|
|
41021
41031
|
]
|
|
41022
41032
|
};
|
|
41023
41033
|
|
|
41024
|
-
// src/cvcs/roiScope.v1.
|
|
41025
|
-
var
|
|
41034
|
+
// src/cvcs/roiScope.v1.2.0.json
|
|
41035
|
+
var roiScope_v1_2_0_default = {
|
|
41026
41036
|
domain: "roi_scope",
|
|
41027
41037
|
name: "ROI Scope",
|
|
41028
|
-
version: "1.
|
|
41029
|
-
_status:
|
|
41030
|
-
_source: "htilabstech/prototype@a596eb9 HTI-LEADS-PAVE-Thread-prototype.html HTI_SHARE_SCOPE_GROUPS",
|
|
41038
|
+
version: "1.2.0",
|
|
41039
|
+
_status: 'DRAFT \u2014 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 \u2014 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 \u2014 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.',
|
|
41040
|
+
_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)",
|
|
41041
|
+
_supersedes: {
|
|
41042
|
+
version: "1.1.0",
|
|
41043
|
+
keyMap: {
|
|
41044
|
+
missingness_root: "missingness_root",
|
|
41045
|
+
unknown: "unknown",
|
|
41046
|
+
anonymous: "anonymous",
|
|
41047
|
+
data_not_collected: "data_not_collected",
|
|
41048
|
+
names: "names",
|
|
41049
|
+
dob: "dob",
|
|
41050
|
+
addresses: "addresses",
|
|
41051
|
+
additional_ids: "additional_ids",
|
|
41052
|
+
demographics: "demographics",
|
|
41053
|
+
screen_indicators: "screen_indicators",
|
|
41054
|
+
victimization: "victimization",
|
|
41055
|
+
ida_full: "ida_full",
|
|
41056
|
+
ida_consid: "ida_consid",
|
|
41057
|
+
contact_info: "contact_info",
|
|
41058
|
+
service_history: "service_history",
|
|
41059
|
+
screen_notes: "screen_notes",
|
|
41060
|
+
case_notes: "case_notes",
|
|
41061
|
+
background: "background",
|
|
41062
|
+
system_info: "system_info",
|
|
41063
|
+
contact_history: "contact_history",
|
|
41064
|
+
accommodation_needs: "accommodation_needs",
|
|
41065
|
+
disability_subtypes: "disability_subtypes",
|
|
41066
|
+
mental_health_status: "mental_health_status",
|
|
41067
|
+
substance_use_status: "substance_use_status",
|
|
41068
|
+
chronic_health_status: "chronic_health_status",
|
|
41069
|
+
hiv_status: "hiv_status",
|
|
41070
|
+
immigration_status: "immigration_status",
|
|
41071
|
+
uscis_alien_number: "uscis_alien_number",
|
|
41072
|
+
federal_protection_applications: "federal_protection_applications",
|
|
41073
|
+
tvap_enrollment: "tvap_enrollment",
|
|
41074
|
+
le_report_status: "le_report_status"
|
|
41075
|
+
},
|
|
41076
|
+
retiredCodes: [],
|
|
41077
|
+
notes: {
|
|
41078
|
+
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.',
|
|
41079
|
+
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 \u2014 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).",
|
|
41080
|
+
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 \u2014 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)."
|
|
41081
|
+
}
|
|
41082
|
+
},
|
|
41031
41083
|
levels: {
|
|
41032
41084
|
"0": "Unknown or Missing",
|
|
41033
41085
|
"1": "ROI scope item"
|
|
@@ -41176,10 +41228,11 @@ var roiScope_v1_0_0_default = {
|
|
|
41176
41228
|
code: "983-012-000-000-000-000-000",
|
|
41177
41229
|
key: "screen_notes",
|
|
41178
41230
|
title: "Screen notes",
|
|
41179
|
-
selectable:
|
|
41231
|
+
selectable: false,
|
|
41180
41232
|
parentCode: null,
|
|
41181
41233
|
childCodes: [],
|
|
41182
|
-
definition: "Narrative notes
|
|
41234
|
+
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.",
|
|
41235
|
+
retired: true
|
|
41183
41236
|
},
|
|
41184
41237
|
{
|
|
41185
41238
|
code: "983-013-000-000-000-000-000",
|
|
@@ -41194,10 +41247,11 @@ var roiScope_v1_0_0_default = {
|
|
|
41194
41247
|
code: "983-014-000-000-000-000-000",
|
|
41195
41248
|
key: "background",
|
|
41196
41249
|
title: "Background information",
|
|
41197
|
-
selectable:
|
|
41250
|
+
selectable: false,
|
|
41198
41251
|
parentCode: null,
|
|
41199
41252
|
childCodes: [],
|
|
41200
|
-
definition: "
|
|
41253
|
+
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.",
|
|
41254
|
+
retired: true
|
|
41201
41255
|
},
|
|
41202
41256
|
{
|
|
41203
41257
|
code: "983-015-000-000-000-000-000",
|