@htilabs/platform-common-models 0.3.0-beta.5 → 0.4.0-beta.1
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 +634 -468
- package/dist/cvcs/index.cjs.map +1 -1
- package/dist/cvcs/index.d.cts +570 -505
- package/dist/cvcs/index.d.ts +570 -505
- package/dist/cvcs/index.js +634 -467
- package/dist/cvcs/index.js.map +1 -1
- package/dist/index.cjs +814 -644
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +179 -179
- package/dist/index.d.ts +179 -179
- package/dist/index.js +814 -642
- package/dist/index.js.map +1 -1
- package/dist/models/index.cjs +6 -5
- package/dist/models/index.cjs.map +1 -1
- package/dist/models/index.js +6 -5
- package/dist/models/index.js.map +1 -1
- package/dist/schemas/index.cjs +4 -3
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.js +4 -3
- package/dist/schemas/index.js.map +1 -1
- package/dist/services/index.cjs +6 -5
- package/dist/services/index.cjs.map +1 -1
- package/dist/services/index.js +6 -5
- package/dist/services/index.js.map +1 -1
- package/dist/validation/index.cjs +5 -12
- package/dist/validation/index.cjs.map +1 -1
- package/dist/validation/index.d.cts +32 -31
- package/dist/validation/index.d.ts +32 -31
- package/dist/validation/index.js +5 -12
- package/dist/validation/index.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/__snapshots__/cvc-sot.snap +7 -11
- package/src/__tests__/cvc-sot-snapshot.test.ts +8 -8
- package/src/__tests__/cvc-structural.test.ts +1 -2
- package/src/cvcs/index.ts +5 -6
- package/src/cvcs/serviceCategories.v1.0.0.json +560 -430
- package/src/cvcs/serviceMechanisms.v1.0.0.json +45 -5
- package/src/cvcs/serviceStates.v1.0.0.json +58 -18
- package/src/generated/cvc-enums.ts +177 -179
- package/src/models/cvcEntryModel.ts +1 -1
- package/src/models/cvcRegistryModel.ts +1 -1
- package/src/schemas/cvcEntry.ts +3 -2
- package/src/schemas/cvcRegistry.ts +3 -2
- package/src/validation/cvc.ts +38 -55
- package/src/cvcs/missingness.v1.0.0.json +0 -50
|
@@ -12,176 +12,184 @@
|
|
|
12
12
|
/**
|
|
13
13
|
* Key → positional code map for the `service_categories` CVC domain.
|
|
14
14
|
*
|
|
15
|
-
* Domain: `service_categories` · Version: 1.0.0 · Entries:
|
|
15
|
+
* Domain: `service_categories` · Version: 1.0.0 · Entries: 151
|
|
16
16
|
*/
|
|
17
17
|
export const ServiceCategoryKeys = {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
18
|
+
missingness_root: "022-000-000-000-000-000-000",
|
|
19
|
+
unknown: "022-000-000-000-000-000-001",
|
|
20
|
+
anonymous: "022-000-000-000-000-000-002",
|
|
21
|
+
data_not_collected: "022-000-000-000-000-000-003",
|
|
22
|
+
social_support_community_engagement: "022-002-000-000-000-000-000",
|
|
23
|
+
cultural_needs_support: "022-002-001-000-000-000-000",
|
|
24
|
+
gift_holiday_resources: "022-002-002-000-000-000-000",
|
|
25
|
+
peer_facilitated_supportive_group: "022-002-003-000-000-000-000",
|
|
26
|
+
community_service_learning: "022-002-004-000-000-000-000",
|
|
27
|
+
survivor_support_psychoeducation: "022-002-005-000-000-000-000",
|
|
28
|
+
financial_and_employment: "022-003-000-000-000-000-000",
|
|
29
|
+
financial_support: "022-003-001-000-000-000-000",
|
|
30
|
+
emergency_financial_assistance: "022-003-001-001-000-000-000",
|
|
31
|
+
employment_support: "022-003-002-000-000-000-000",
|
|
32
|
+
supported_employment: "022-003-002-001-000-000-000",
|
|
33
|
+
employment_assistance_job_search: "022-003-002-002-000-000-000",
|
|
34
|
+
job_vocation_training: "022-003-002-003-000-000-000",
|
|
35
|
+
healthcare: "022-004-000-000-000-000-000",
|
|
36
|
+
medical: "022-004-001-000-000-000-000",
|
|
37
|
+
emergency_medical_care: "022-004-001-001-000-000-000",
|
|
38
|
+
forensic_exam_interview: "022-004-001-002-000-000-000",
|
|
39
|
+
dv_exam: "022-004-001-002-001-000-000",
|
|
40
|
+
sane_exam: "022-004-001-002-002-000-000",
|
|
41
|
+
std_testing: "022-004-001-002-003-000-000",
|
|
42
|
+
specialized_assessments: "022-004-001-002-004-000-000",
|
|
43
|
+
counseling_evaluation_assessment: "022-004-001-002-004-001-000",
|
|
44
|
+
stalking_assessment: "022-004-001-002-004-002-000",
|
|
45
|
+
danger_assessment: "022-004-001-002-004-003-000",
|
|
46
|
+
indepth_assessment: "022-004-001-002-004-004-000",
|
|
47
|
+
outpatient_medical: "022-004-001-003-000-000-000",
|
|
48
|
+
dental: "022-004-001-003-001-000-000",
|
|
49
|
+
vision: "022-004-001-003-002-000-000",
|
|
50
|
+
tattoo_removal: "022-004-001-003-003-000-000",
|
|
51
|
+
pet_medical: "022-004-001-003-004-000-000",
|
|
52
|
+
pregnancy_care: "022-004-001-004-000-000-000",
|
|
53
|
+
prenatal_care: "022-004-001-004-001-000-000",
|
|
54
|
+
postnatal_care_client: "022-004-001-004-002-000-000",
|
|
55
|
+
postnatal_care_newborn: "022-004-001-004-003-000-000",
|
|
56
|
+
emotional_support_mental_health: "022-004-002-000-000-000-000",
|
|
57
|
+
individual_counseling: "022-004-002-001-000-000-000",
|
|
58
|
+
group_counseling: "022-004-002-002-000-000-000",
|
|
59
|
+
family_counseling: "022-004-002-003-000-000-000",
|
|
60
|
+
counseling_treatment_planning: "022-004-002-004-000-000-000",
|
|
61
|
+
counseling_treatment_plan_review: "022-004-002-005-000-000-000",
|
|
62
|
+
behavioral_occupational_support: "022-004-002-006-000-000-000",
|
|
63
|
+
substance_abuse_treatment: "022-004-002-006-001-000-000",
|
|
64
|
+
coping_strategy_support: "022-004-002-006-002-000-000",
|
|
65
|
+
other_therapy: "022-004-002-007-000-000-000",
|
|
66
|
+
housing_services: "022-005-000-000-000-000-000",
|
|
67
|
+
emergency_shelter: "022-005-001-000-000-000-000",
|
|
68
|
+
day_shelter_dropin: "022-005-001-001-000-000-000",
|
|
69
|
+
host_homes_safe_homes: "022-005-001-002-000-000-000",
|
|
70
|
+
congregate_shelter_bednight: "022-005-001-003-000-000-000",
|
|
71
|
+
emergency_hotel_motel: "022-005-001-004-000-000-000",
|
|
72
|
+
night_by_night_shelter: "022-005-001-005-000-000-000",
|
|
73
|
+
transitional_housing: "022-005-002-000-000-000-000",
|
|
74
|
+
housing_renovation_modification: "022-005-003-000-000-000-000",
|
|
75
|
+
household_setup_goods: "022-005-003-001-000-000-000",
|
|
76
|
+
housing_navigation_placement: "022-005-004-000-000-000-000",
|
|
77
|
+
housing_financial_assistance: "022-005-004-001-000-000-000",
|
|
78
|
+
rental_payment_assistance: "022-005-004-001-001-000-000",
|
|
79
|
+
security_deposit_allowance: "022-005-004-001-001-001-000",
|
|
80
|
+
utility_assistance: "022-005-004-001-001-002-000",
|
|
81
|
+
relocation_moving_assistance: "022-005-004-002-000-000-000",
|
|
82
|
+
housing_stabilization_eviction_prevention: "022-005-005-000-000-000-000",
|
|
83
|
+
tenant_based_scattered_site: "022-005-006-000-000-000-000",
|
|
84
|
+
legal_services: "022-006-000-000-000-000-000",
|
|
85
|
+
immigration_relief: "022-006-001-000-000-000-000",
|
|
86
|
+
repatriation: "022-006-001-001-000-000-000",
|
|
87
|
+
family_law: "022-006-002-000-000-000-000",
|
|
88
|
+
criminal_support: "022-006-003-000-000-000-000",
|
|
89
|
+
victim_impact_statement: "022-006-003-001-000-000-000",
|
|
90
|
+
perpetrator_accountability: "022-006-003-002-000-000-000",
|
|
91
|
+
victim_compensation: "022-006-003-003-000-000-000",
|
|
92
|
+
victims_rights_representation: "022-006-003-004-000-000-000",
|
|
93
|
+
criminal_record_relief: "022-006-003-005-000-000-000",
|
|
94
|
+
civil_support: "022-006-004-000-000-000-000",
|
|
95
|
+
protection_restraining_orders: "022-006-004-001-000-000-000",
|
|
96
|
+
public_benefits_law: "022-006-004-002-000-000-000",
|
|
97
|
+
emergency_safety_assistance: "022-006-005-000-000-000-000",
|
|
98
|
+
basic_needs: "022-007-000-000-000-000-000",
|
|
99
|
+
clothing_shoes_accessories: "022-007-001-000-000-000-000",
|
|
100
|
+
elder_assistance: "022-007-001-001-000-000-000",
|
|
101
|
+
food: "022-007-002-000-000-000-000",
|
|
102
|
+
over_the_counter_medications: "022-007-003-000-000-000-000",
|
|
103
|
+
immediate_safety_planning: "022-007-004-000-000-000-000",
|
|
104
|
+
emergency_crisis_safety_support: "022-007-004-001-000-000-000",
|
|
105
|
+
hygiene_items_personal_care: "022-007-005-000-000-000-000",
|
|
106
|
+
communications_connectivity: "022-007-006-000-000-000-000",
|
|
107
|
+
interpreter_services: "022-007-007-000-000-000-000",
|
|
108
|
+
informal_education_life_skills: "022-008-000-000-000-000-000",
|
|
109
|
+
basic_life_skills_self_care: "022-008-001-000-000-000-000",
|
|
110
|
+
accessibility_disability_support: "022-008-002-000-000-000-000",
|
|
111
|
+
parenting_education: "022-008-003-000-000-000-000",
|
|
112
|
+
learning_language_classes: "022-008-004-000-000-000-000",
|
|
113
|
+
transportation: "022-009-000-000-000-000-000",
|
|
114
|
+
transportation_assistance_direct: "022-009-001-000-000-000-000",
|
|
115
|
+
transportation_direct_emergency: "022-009-001-001-000-000-000",
|
|
116
|
+
taxi_rideshare_voucher: "022-009-002-000-000-000-000",
|
|
117
|
+
taxi_rideshare_emergency: "022-009-002-001-000-000-000",
|
|
118
|
+
bus_fare_pass: "022-009-003-000-000-000-000",
|
|
119
|
+
bus_fare_pass_emergency: "022-009-003-001-000-000-000",
|
|
120
|
+
gift_card_gas_card: "022-009-004-000-000-000-000",
|
|
121
|
+
gift_card_gas_card_emergency: "022-009-004-001-000-000-000",
|
|
122
|
+
airline_tickets: "022-009-005-000-000-000-000",
|
|
123
|
+
airline_tickets_emergency: "022-009-005-001-000-000-000",
|
|
124
|
+
dependents: "022-010-000-000-000-000-000",
|
|
125
|
+
pet_care: "022-010-001-000-000-000-000",
|
|
126
|
+
child_care: "022-010-002-000-000-000-000",
|
|
127
|
+
childrens_activities: "022-010-002-001-000-000-000",
|
|
128
|
+
children_youth_baby_supplies: "022-010-002-001-001-000-000",
|
|
129
|
+
case_coordination: "022-011-000-000-000-000-000",
|
|
130
|
+
advocacy: "022-011-001-000-000-000-000",
|
|
131
|
+
medical_advocacy: "022-011-001-001-000-000-000",
|
|
132
|
+
advocacy_emergency_medical: "022-011-001-001-001-000-000",
|
|
133
|
+
advocacy_forensic_exam: "022-011-001-001-002-000-000",
|
|
134
|
+
court_advocacy: "022-011-001-002-000-000-000",
|
|
135
|
+
crime_scene_clean_up: "022-011-001-002-001-000-000",
|
|
136
|
+
family_reunification: "022-011-001-002-002-000-000",
|
|
137
|
+
law_enforcement_interview_support: "022-011-001-002-003-000-000",
|
|
138
|
+
prosecution_interview_advocacy: "022-011-001-002-004-000-000",
|
|
139
|
+
immigration_advocacy_support: "022-011-001-002-005-000-000",
|
|
140
|
+
documentation_records_retrieval: "022-011-001-003-000-000-000",
|
|
141
|
+
obtaining_insurance: "022-011-001-003-001-000-000",
|
|
142
|
+
drivers_car_insurance: "022-011-001-003-001-001-000",
|
|
143
|
+
medical_insurance: "022-011-001-003-001-002-000",
|
|
144
|
+
obtaining_drivers_license: "022-011-001-003-002-000-000",
|
|
145
|
+
faith_resource: "022-011-001-004-000-000-000",
|
|
146
|
+
banking_notary: "022-011-001-005-000-000-000",
|
|
147
|
+
income_benefits_navigation: "022-011-001-006-000-000-000",
|
|
148
|
+
government_services_special_programs: "022-011-001-006-001-000-000",
|
|
149
|
+
intervention_employer_creditor_academic: "022-011-001-007-000-000-000",
|
|
150
|
+
formal_education_academic_support: "022-011-001-007-001-000-000",
|
|
151
|
+
adult_school_ged: "022-011-001-007-001-001-000",
|
|
152
|
+
child_school_enrollment: "022-011-001-007-001-002-000",
|
|
153
|
+
intake: "022-011-002-000-000-000-000",
|
|
154
|
+
screening: "022-011-002-001-000-000-000",
|
|
155
|
+
housing_eligibility_determination: "022-011-002-001-001-000-000",
|
|
156
|
+
coordinated_entry: "022-011-002-001-001-001-000",
|
|
157
|
+
behavioral_issues_screen: "022-011-002-001-002-000-000",
|
|
158
|
+
initial_screen: "022-011-002-001-003-000-000",
|
|
159
|
+
needs_assessment: "022-011-002-001-004-000-000",
|
|
160
|
+
tvap: "022-011-002-001-005-000-000",
|
|
161
|
+
case_management_supportive_services: "022-011-003-000-000-000-000",
|
|
162
|
+
intra_agency_provider_coordination: "022-011-003-001-000-000-000",
|
|
163
|
+
inter_agency_consultation: "022-011-003-002-000-000-000",
|
|
164
|
+
service_plan: "022-011-003-003-000-000-000",
|
|
165
|
+
hope_scale_and_plan: "022-011-003-003-001-000-000",
|
|
166
|
+
post_exit_plan: "022-011-003-004-000-000-000",
|
|
167
|
+
advanced_directives: "022-011-003-005-000-000-000",
|
|
168
|
+
other_services: "022-012-000-000-000-000-000",
|
|
165
169
|
} as const;
|
|
166
170
|
|
|
167
171
|
export type ServiceCategoryKey = keyof typeof ServiceCategoryKeys;
|
|
168
172
|
|
|
169
173
|
/**
|
|
170
|
-
* Key → positional code map for the `
|
|
174
|
+
* Key → positional code map for the `service_state` CVC domain.
|
|
171
175
|
*
|
|
172
|
-
* Domain: `
|
|
176
|
+
* Domain: `service_state` · Version: 1.0.0 · Entries: 14
|
|
173
177
|
*/
|
|
174
178
|
export const ServiceStateKeys = {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
179
|
+
missingness_root: "049-000-000-000-000-000-000",
|
|
180
|
+
unknown: "049-000-000-000-000-000-001",
|
|
181
|
+
anonymous: "049-000-000-000-000-000-002",
|
|
182
|
+
data_not_collected: "049-000-000-000-000-000-003",
|
|
183
|
+
need_identified: "049-001-000-000-000-000-000",
|
|
184
|
+
offered: "049-002-000-000-000-000-000",
|
|
185
|
+
scheduled_in_progress: "049-003-000-000-000-000-000",
|
|
186
|
+
delivered: "049-004-000-000-000-000-000",
|
|
187
|
+
completed: "049-005-000-000-000-000-000",
|
|
188
|
+
declined_by_client: "049-006-000-000-000-000-000",
|
|
189
|
+
unable_to_provide: "049-007-000-000-000-000-000",
|
|
190
|
+
unable_to_provide_eligibility: "049-007-001-000-000-000-000",
|
|
191
|
+
unable_to_provide_capacity: "049-007-002-000-000-000-000",
|
|
192
|
+
unable_to_provide_resources: "049-007-003-000-000-000-000",
|
|
185
193
|
} as const;
|
|
186
194
|
|
|
187
195
|
export type ServiceStateKey = keyof typeof ServiceStateKeys;
|
|
@@ -189,27 +197,17 @@ export type ServiceStateKey = keyof typeof ServiceStateKeys;
|
|
|
189
197
|
/**
|
|
190
198
|
* Key → positional code map for the `service_mechanisms` CVC domain.
|
|
191
199
|
*
|
|
192
|
-
* Domain: `service_mechanisms` · Version: 1.0.0 · Entries:
|
|
200
|
+
* Domain: `service_mechanisms` · Version: 1.0.0 · Entries: 8
|
|
193
201
|
*/
|
|
194
202
|
export const ServiceMechanismKeys = {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
203
|
+
missingness_root: "025-000-000-000-000-000-000",
|
|
204
|
+
unknown: "025-000-000-000-000-000-001",
|
|
205
|
+
anonymous: "025-000-000-000-000-000-002",
|
|
206
|
+
data_not_collected: "025-000-000-000-000-000-003",
|
|
207
|
+
support_via_referral: "025-001-000-000-000-000-000",
|
|
208
|
+
informational_support: "025-002-000-000-000-000-000",
|
|
209
|
+
direct_staff_contractor: "025-003-000-000-000-000-000",
|
|
210
|
+
financial_material_assistance: "025-004-000-000-000-000-000",
|
|
199
211
|
} as const;
|
|
200
212
|
|
|
201
213
|
export type ServiceMechanismKey = keyof typeof ServiceMechanismKeys;
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* Key → positional code map for the `missingness` CVC domain.
|
|
205
|
-
*
|
|
206
|
-
* Domain: `missingness` · Version: 1.0.0 · Entries: 4
|
|
207
|
-
*/
|
|
208
|
-
export const MissingnessKeys = {
|
|
209
|
-
missingness_root: "00-00-00-00-00-00-00",
|
|
210
|
-
unknown: "00-00-00-00-00-00-01",
|
|
211
|
-
anonymous: "00-00-00-00-00-00-02",
|
|
212
|
-
data_not_collected: "00-00-00-00-00-00-03",
|
|
213
|
-
} as const;
|
|
214
|
-
|
|
215
|
-
export type MissingnessKey = keyof typeof MissingnessKeys;
|
|
@@ -27,6 +27,6 @@ export function compileModel(
|
|
|
27
27
|
connection: Connection,
|
|
28
28
|
schema = buildCvcEntrySchema(),
|
|
29
29
|
): Model<CvcEntry> {
|
|
30
|
-
return connection.models
|
|
30
|
+
return connection.models.CvcEntry as Model<CvcEntry>
|
|
31
31
|
?? connection.model<CvcEntry>("CvcEntry", schema);
|
|
32
32
|
}
|
|
@@ -30,6 +30,6 @@ export function compileModel(
|
|
|
30
30
|
connection: Connection,
|
|
31
31
|
schema = buildCvcRegistrySchema(),
|
|
32
32
|
): Model<CvcRegistry> {
|
|
33
|
-
return connection.models
|
|
33
|
+
return connection.models.CvcRegistry as Model<CvcRegistry>
|
|
34
34
|
?? connection.model<CvcRegistry>("CvcRegistry", schema);
|
|
35
35
|
}
|
package/src/schemas/cvcEntry.ts
CHANGED
|
@@ -24,10 +24,11 @@ import type { InferRawDocType } from "mongoose";
|
|
|
24
24
|
// ─── Shared validators ───────────────────────────────────────────────────────
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
* Positional 7-segment CVC code: `
|
|
27
|
+
* Positional 7-segment CVC code: `XXX-XXX-XXX-XXX-XXX-XXX-XXX` (format v2,
|
|
28
|
+
* 3-digit segments with a Notion-aligned domain prefix). Mirrors
|
|
28
29
|
* `CvcCodeSchema` in `validation/cvc.ts`. See locked spec §3.
|
|
29
30
|
*/
|
|
30
|
-
const CVC_CODE_PATTERN = /^\d{
|
|
31
|
+
const CVC_CODE_PATTERN = /^\d{3}(-\d{3}){6}$/;
|
|
31
32
|
|
|
32
33
|
/**
|
|
33
34
|
* Stable machine key for a CVC entry. Mirrors `CvcKeySchema` in
|
|
@@ -76,8 +76,9 @@ export const cvcRegistrySchemaDefinition = {
|
|
|
76
76
|
},
|
|
77
77
|
|
|
78
78
|
// Selective inclusion/exclusion lists. Both contain CVC entry codes
|
|
79
|
-
// (positional 7-segment, e.g. "
|
|
80
|
-
// applies excludes after includes when resolving the effective
|
|
79
|
+
// (positional 7-segment, format v2: e.g. "022-002-000-000-000-000-000").
|
|
80
|
+
// The runtime applies excludes after includes when resolving the effective
|
|
81
|
+
// set.
|
|
81
82
|
excludedEntries: {
|
|
82
83
|
type: [String],
|
|
83
84
|
default: [],
|