@htilabs/platform-common-models 0.7.0-beta.1 → 0.8.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/README.md +0 -44
- package/dist/constants/index.cjs +76 -52
- 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 +75 -48
- package/dist/constants/index.js.map +1 -1
- package/dist/{cvcEntry-BCj1OWqL.d.cts → cvcEntry-DaDrEuTa.d.cts} +36 -36
- package/dist/{cvcEntry-BCj1OWqL.d.ts → cvcEntry-DaDrEuTa.d.ts} +36 -36
- package/dist/cvcs/index.cjs +11136 -136
- package/dist/cvcs/index.cjs.map +1 -1
- package/dist/cvcs/index.d.cts +12856 -603
- package/dist/cvcs/index.d.ts +12856 -603
- package/dist/cvcs/index.js +11060 -132
- package/dist/cvcs/index.js.map +1 -1
- package/dist/{index-I-DiX9eQ.d.ts → index-C0J3f169.d.ts} +1 -1
- package/dist/{index-CoVr1jIV.d.cts → index-EPjPjR0z.d.cts} +1 -1
- package/dist/index.cjs +12593 -246
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1686 -98
- package/dist/index.d.ts +1686 -98
- package/dist/index.js +12442 -234
- 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-C97LpsRd.d.cts → platform-auth-7dL99tZh.d.cts} +21 -9
- package/dist/{platform-auth-C97LpsRd.d.ts → platform-auth-7dL99tZh.d.ts} +21 -9
- package/dist/schemas/index.cjs +68 -49
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +11 -15
- package/dist/schemas/index.d.ts +11 -15
- package/dist/schemas/index.js +68 -49
- 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 +19 -25
- package/src/__tests__/__snapshots__/cvc-sot.snap +297 -9
- package/src/__tests__/cvc-sot-snapshot.test.ts +150 -18
- package/src/__tests__/cvc-structural.test.ts +76 -3
- package/src/constants/ic.ts +163 -51
- package/src/cvcs/accommodationType.v1.0.0.json +107 -0
- package/src/cvcs/actionStepCompletionStatus.v1.0.0.json +89 -0
- package/src/cvcs/actionStepType.v1.0.0.json +71 -0
- package/src/cvcs/announcementAudienceScope.v1.0.0.json +80 -0
- package/src/cvcs/announcementResponseType.v1.0.0.json +89 -0
- package/src/cvcs/basisQuickPicks.v1.0.0.json +123 -0
- package/src/cvcs/checkInActivity.v1.0.0.json +233 -0
- package/src/cvcs/checkInPhase.v1.0.0.json +152 -0
- package/src/cvcs/childBehavioralConcerns.v1.0.0.json +161 -0
- package/src/cvcs/childCustodyArrangement.v1.0.0.json +188 -0
- package/src/cvcs/collectionContext.v1.0.0.json +88 -0
- package/src/cvcs/contactInfoUseType.v1.0.0.json +87 -0
- package/src/cvcs/daIncidentArchiveReason.v1.0.0.json +89 -0
- package/src/cvcs/daIncidentConfidence.v1.0.0.json +80 -0
- package/src/cvcs/daIncidentDayApprox.v1.0.0.json +89 -0
- package/src/cvcs/daIncidentSeverity.v1.0.0.json +97 -0
- package/src/cvcs/determinationLevel.v1.0.0.json +96 -0
- package/src/cvcs/disabilitySubtype.v1.0.0.json +126 -0
- package/src/cvcs/discretionLevel.v1.0.0.json +89 -0
- package/src/cvcs/emergencyContactCallReason.v1.0.0.json +107 -0
- package/src/cvcs/emergencyContactPermissions.v1.0.0.json +125 -0
- package/src/cvcs/emergencyExitCascade.v1.0.0.json +89 -0
- package/src/cvcs/exitProcessChecklistItem.v1.0.0.json +152 -0
- package/src/cvcs/exitReasons.v1.0.0.json +224 -0
- package/src/cvcs/facialHair.v1.0.0.json +71 -0
- package/src/cvcs/funder.v1.0.0.json +125 -0
- package/src/cvcs/goalCategory.v1.0.0.json +161 -0
- package/src/cvcs/goalPriority.v1.0.0.json +80 -0
- package/src/cvcs/goalStatus.v1.0.0.json +98 -0
- package/src/cvcs/goalWithdrawalReason.v1.0.0.json +116 -0
- package/src/cvcs/hmisProjectType.v1.0.0.json +178 -0
- package/src/cvcs/hopeScaleCaptureContext.v1.0.0.json +116 -0
- package/src/cvcs/hopeScaleResponseOptions.v1.0.0.json +125 -0
- package/src/cvcs/hopeScaleTier.v1.0.0.json +89 -0
- package/src/cvcs/identificationStatus.v1.0.0.json +80 -0
- package/src/cvcs/index.ts +150 -6
- package/src/cvcs/inferenceType.v1.0.0.json +78 -0
- package/src/cvcs/investigativeRequestType.v1.0.0.json +89 -0
- package/src/cvcs/languages.v1.0.0.json +1924 -0
- package/src/cvcs/leReportStatus.v1.0.0.json +89 -0
- package/src/cvcs/legalActionType.v1.0.0.json +116 -0
- package/src/cvcs/messageReportReason.v1.0.0.json +107 -0
- package/src/cvcs/midStayEventType.v1.0.0.json +116 -0
- package/src/cvcs/milestoneType.v1.0.0.json +170 -0
- package/src/cvcs/needsResidentialAgain.v1.0.0.json +80 -0
- package/src/cvcs/personRelationships.v1.0.0.json +6 -6
- package/src/cvcs/petExitReason.v1.0.0.json +107 -0
- package/src/cvcs/petRelationshipBasis.v1.0.0.json +80 -0
- package/src/cvcs/programSpecificCode.v1.0.0.json +125 -0
- package/src/cvcs/proofOfIdType.v1.0.0.json +188 -0
- package/src/cvcs/qualityFlags.v1.0.0.json +96 -0
- package/src/cvcs/referenceLinkType.v1.0.0.json +125 -0
- package/src/cvcs/relationshipDynamics.v1.0.0.json +445 -0
- package/src/cvcs/returnedToAbuserStatus.v1.0.0.json +80 -0
- package/src/cvcs/roleContext.v1.0.0.json +78 -0
- package/src/cvcs/rsvpResponse.v1.0.0.json +80 -0
- package/src/cvcs/servicePlanClosureReason.v1.0.0.json +125 -0
- package/src/cvcs/servicePlanReviewSnoozeReason.v1.0.0.json +116 -0
- package/src/cvcs/serviceSource.v1.0.0.json +71 -0
- package/src/cvcs/serviceStates.v1.0.0.json +12 -2
- package/src/cvcs/sessionState.v1.0.0.json +96 -0
- package/src/cvcs/severityFollowUp.v1.0.0.json +89 -0
- package/src/cvcs/signatureMethod.v1.0.0.json +89 -0
- package/src/cvcs/signatureType.v1.0.0.json +89 -0
- package/src/cvcs/smtBodyLocation.v1.0.0.json +314 -0
- package/src/cvcs/smtNameRelation.v1.0.0.json +116 -0
- package/src/cvcs/smtSignificanceFlags.v1.0.0.json +116 -0
- package/src/cvcs/sourceCategory.v1.1.0.json +96 -0
- package/src/cvcs/sourceSubtype.v1.1.0.json +330 -0
- package/src/cvcs/substanceUseStatus.v1.0.0.json +90 -0
- package/src/cvcs/supportStrength.v1.0.0.json +114 -0
- package/src/cvcs/supportTopic.v1.0.0.json +116 -0
- package/src/cvcs/threadStatus.v1.0.0.json +80 -0
- package/src/cvcs/threadType.v1.0.0.json +98 -0
- package/src/cvcs/timeScope.v1.0.0.json +69 -0
- package/src/cvcs/verificationMethod.v1.0.0.json +96 -0
- package/src/cvcs/verificationStatus.v1.0.0.json +80 -0
- package/src/cvcs/visaType.v1.0.0.json +378 -0
- package/src/generated/cvc-enums.ts +1816 -46
- package/src/index.ts +0 -20
- package/src/schemas/common.ts +0 -4
- package/dist/config/index.cjs +0 -191
- package/dist/config/index.cjs.map +0 -1
- package/dist/config/index.d.cts +0 -101
- package/dist/config/index.d.ts +0 -101
- package/dist/config/index.js +0 -165
- package/dist/config/index.js.map +0 -1
- package/src/__tests__/runtime-contract-validator.test.ts +0 -556
- package/src/config/fixtures/valid.yaml +0 -90
- package/src/config/index.ts +0 -352
- package/src/cvcs/hmisSex.v1.0.0.json +0 -89
- package/src/cvcs/juvenileJusticeEpisodeType.v1.0.0.json +0 -96
- package/src/cvcs/recencyBand.v1.0.0.json +0 -124
package/dist/schemas/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as mongoose from 'mongoose';
|
|
2
2
|
import { InferRawDocType, Schema } from 'mongoose';
|
|
3
|
-
export { C as Choice, a as CvcEntry, b as CvcRegistry, F as Form, c as FormSectionRef, G as Guidance, L as Layout, P as PlatformFunction, d as PlatformRole, Q as Question, S as ScoringCondition, e as ScoringRecommendation, f as ScoringRule, g as ScoringThreshold, h as Section, i as SectionQuestionRef, V as VisibilityRule, j as buildCvcEntrySchema, k as buildCvcRegistrySchema, l as buildFormSchema, m as buildPlatformFunctionSchema, n as buildPlatformRoleSchema, o as buildQuestionSchema, p as buildScoringRuleSchema, q as buildSectionSchema, r as choiceSchema, s as cvcEntrySchemaDefinition, t as cvcEntrySchemaOptions, u as cvcRegistrySchemaDefinition, v as cvcRegistrySchemaOptions, w as formSchemaDefinition, x as formSchemaOptions, y as formSectionRefSchema, z as guidanceSchema, A as layoutSchema, B as platformFunctionSchemaDefinition, D as platformFunctionSchemaOptions, E as platformRoleSchemaDefinition, H as platformRoleSchemaOptions, I as questionSchemaDefinition, J as questionSchemaOptions, K as scoringConditionSchema, M as scoringRecommendationSchema, N as scoringRuleSchemaDefinition, O as scoringRuleSchemaOptions, R as scoringThresholdSchema, T as sectionQuestionRefSchema, U as sectionSchemaDefinition, W as sectionSchemaOptions, X as visibilityRuleSchema } from '../cvcEntry-
|
|
3
|
+
export { C as Choice, a as CvcEntry, b as CvcRegistry, F as Form, c as FormSectionRef, G as Guidance, L as Layout, P as PlatformFunction, d as PlatformRole, Q as Question, S as ScoringCondition, e as ScoringRecommendation, f as ScoringRule, g as ScoringThreshold, h as Section, i as SectionQuestionRef, V as VisibilityRule, j as buildCvcEntrySchema, k as buildCvcRegistrySchema, l as buildFormSchema, m as buildPlatformFunctionSchema, n as buildPlatformRoleSchema, o as buildQuestionSchema, p as buildScoringRuleSchema, q as buildSectionSchema, r as choiceSchema, s as cvcEntrySchemaDefinition, t as cvcEntrySchemaOptions, u as cvcRegistrySchemaDefinition, v as cvcRegistrySchemaOptions, w as formSchemaDefinition, x as formSchemaOptions, y as formSectionRefSchema, z as guidanceSchema, A as layoutSchema, B as platformFunctionSchemaDefinition, D as platformFunctionSchemaOptions, E as platformRoleSchemaDefinition, H as platformRoleSchemaOptions, I as questionSchemaDefinition, J as questionSchemaOptions, K as scoringConditionSchema, M as scoringRecommendationSchema, N as scoringRuleSchemaDefinition, O as scoringRuleSchemaOptions, R as scoringThresholdSchema, T as sectionQuestionRefSchema, U as sectionSchemaDefinition, W as sectionSchemaOptions, X as visibilityRuleSchema } from '../cvcEntry-DaDrEuTa.cjs';
|
|
4
4
|
|
|
5
5
|
declare const addressSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
6
6
|
_id: false;
|
|
@@ -28,9 +28,9 @@ declare const addressSchema: Schema<any, mongoose.Model<any, any, any, any, any,
|
|
|
28
28
|
placeId?: string | null | undefined;
|
|
29
29
|
}, {
|
|
30
30
|
id: string;
|
|
31
|
-
},
|
|
31
|
+
}, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
|
|
32
32
|
_id: false;
|
|
33
|
-
}
|
|
33
|
+
}>> & Omit<{
|
|
34
34
|
formattedAddress?: string | null | undefined;
|
|
35
35
|
street?: string | null | undefined;
|
|
36
36
|
city?: string | null | undefined;
|
|
@@ -76,7 +76,6 @@ declare const personNameSchema: Schema<any, mongoose.Model<any, any, any, any, a
|
|
|
76
76
|
isPrimary?: boolean | null | undefined;
|
|
77
77
|
isUnknown?: boolean | null | undefined;
|
|
78
78
|
isAnonymous?: boolean | null | undefined;
|
|
79
|
-
isMononym?: boolean | null | undefined;
|
|
80
79
|
}, mongoose.Document<unknown, {}, {
|
|
81
80
|
alias?: boolean | null | undefined;
|
|
82
81
|
firstName?: string | null | undefined;
|
|
@@ -87,12 +86,11 @@ declare const personNameSchema: Schema<any, mongoose.Model<any, any, any, any, a
|
|
|
87
86
|
isPrimary?: boolean | null | undefined;
|
|
88
87
|
isUnknown?: boolean | null | undefined;
|
|
89
88
|
isAnonymous?: boolean | null | undefined;
|
|
90
|
-
isMononym?: boolean | null | undefined;
|
|
91
89
|
}, {
|
|
92
90
|
id: string;
|
|
93
|
-
},
|
|
91
|
+
}, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
|
|
94
92
|
_id: false;
|
|
95
|
-
}
|
|
93
|
+
}>> & Omit<{
|
|
96
94
|
alias?: boolean | null | undefined;
|
|
97
95
|
firstName?: string | null | undefined;
|
|
98
96
|
lastName?: string | null | undefined;
|
|
@@ -102,7 +100,6 @@ declare const personNameSchema: Schema<any, mongoose.Model<any, any, any, any, a
|
|
|
102
100
|
isPrimary?: boolean | null | undefined;
|
|
103
101
|
isUnknown?: boolean | null | undefined;
|
|
104
102
|
isAnonymous?: boolean | null | undefined;
|
|
105
|
-
isMononym?: boolean | null | undefined;
|
|
106
103
|
} & {
|
|
107
104
|
_id: mongoose.Types.ObjectId;
|
|
108
105
|
} & {
|
|
@@ -119,7 +116,6 @@ declare const personNameSchema: Schema<any, mongoose.Model<any, any, any, any, a
|
|
|
119
116
|
isPrimary?: boolean | null | undefined;
|
|
120
117
|
isUnknown?: boolean | null | undefined;
|
|
121
118
|
isAnonymous?: boolean | null | undefined;
|
|
122
|
-
isMononym?: boolean | null | undefined;
|
|
123
119
|
} & {
|
|
124
120
|
_id: mongoose.Types.ObjectId;
|
|
125
121
|
} & {
|
|
@@ -140,9 +136,9 @@ declare const phoneSchema: Schema<any, mongoose.Model<any, any, any, any, any, a
|
|
|
140
136
|
dataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
|
|
141
137
|
}, {
|
|
142
138
|
id: string;
|
|
143
|
-
},
|
|
139
|
+
}, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
|
|
144
140
|
_id: false;
|
|
145
|
-
}
|
|
141
|
+
}>> & Omit<{
|
|
146
142
|
number?: string | null | undefined;
|
|
147
143
|
type?: string | null | undefined;
|
|
148
144
|
safeToContact?: boolean | null | undefined;
|
|
@@ -176,9 +172,9 @@ declare const emailSchema: Schema<any, mongoose.Model<any, any, any, any, any, a
|
|
|
176
172
|
address?: string | null | undefined;
|
|
177
173
|
}, {
|
|
178
174
|
id: string;
|
|
179
|
-
},
|
|
175
|
+
}, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
|
|
180
176
|
_id: false;
|
|
181
|
-
}
|
|
177
|
+
}>> & Omit<{
|
|
182
178
|
type?: string | null | undefined;
|
|
183
179
|
safeToContact?: boolean | null | undefined;
|
|
184
180
|
address?: string | null | undefined;
|
|
@@ -250,9 +246,9 @@ declare const demographicsSchema: Schema<any, mongoose.Model<any, any, any, any,
|
|
|
250
246
|
ethnicityDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
|
|
251
247
|
}, {
|
|
252
248
|
id: string;
|
|
253
|
-
},
|
|
249
|
+
}, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
|
|
254
250
|
_id: false;
|
|
255
|
-
}
|
|
251
|
+
}>> & Omit<{
|
|
256
252
|
race: number[];
|
|
257
253
|
ethnicity: number[];
|
|
258
254
|
accommodations: string[];
|
package/dist/schemas/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as mongoose from 'mongoose';
|
|
2
2
|
import { InferRawDocType, Schema } from 'mongoose';
|
|
3
|
-
export { C as Choice, a as CvcEntry, b as CvcRegistry, F as Form, c as FormSectionRef, G as Guidance, L as Layout, P as PlatformFunction, d as PlatformRole, Q as Question, S as ScoringCondition, e as ScoringRecommendation, f as ScoringRule, g as ScoringThreshold, h as Section, i as SectionQuestionRef, V as VisibilityRule, j as buildCvcEntrySchema, k as buildCvcRegistrySchema, l as buildFormSchema, m as buildPlatformFunctionSchema, n as buildPlatformRoleSchema, o as buildQuestionSchema, p as buildScoringRuleSchema, q as buildSectionSchema, r as choiceSchema, s as cvcEntrySchemaDefinition, t as cvcEntrySchemaOptions, u as cvcRegistrySchemaDefinition, v as cvcRegistrySchemaOptions, w as formSchemaDefinition, x as formSchemaOptions, y as formSectionRefSchema, z as guidanceSchema, A as layoutSchema, B as platformFunctionSchemaDefinition, D as platformFunctionSchemaOptions, E as platformRoleSchemaDefinition, H as platformRoleSchemaOptions, I as questionSchemaDefinition, J as questionSchemaOptions, K as scoringConditionSchema, M as scoringRecommendationSchema, N as scoringRuleSchemaDefinition, O as scoringRuleSchemaOptions, R as scoringThresholdSchema, T as sectionQuestionRefSchema, U as sectionSchemaDefinition, W as sectionSchemaOptions, X as visibilityRuleSchema } from '../cvcEntry-
|
|
3
|
+
export { C as Choice, a as CvcEntry, b as CvcRegistry, F as Form, c as FormSectionRef, G as Guidance, L as Layout, P as PlatformFunction, d as PlatformRole, Q as Question, S as ScoringCondition, e as ScoringRecommendation, f as ScoringRule, g as ScoringThreshold, h as Section, i as SectionQuestionRef, V as VisibilityRule, j as buildCvcEntrySchema, k as buildCvcRegistrySchema, l as buildFormSchema, m as buildPlatformFunctionSchema, n as buildPlatformRoleSchema, o as buildQuestionSchema, p as buildScoringRuleSchema, q as buildSectionSchema, r as choiceSchema, s as cvcEntrySchemaDefinition, t as cvcEntrySchemaOptions, u as cvcRegistrySchemaDefinition, v as cvcRegistrySchemaOptions, w as formSchemaDefinition, x as formSchemaOptions, y as formSectionRefSchema, z as guidanceSchema, A as layoutSchema, B as platformFunctionSchemaDefinition, D as platformFunctionSchemaOptions, E as platformRoleSchemaDefinition, H as platformRoleSchemaOptions, I as questionSchemaDefinition, J as questionSchemaOptions, K as scoringConditionSchema, M as scoringRecommendationSchema, N as scoringRuleSchemaDefinition, O as scoringRuleSchemaOptions, R as scoringThresholdSchema, T as sectionQuestionRefSchema, U as sectionSchemaDefinition, W as sectionSchemaOptions, X as visibilityRuleSchema } from '../cvcEntry-DaDrEuTa.js';
|
|
4
4
|
|
|
5
5
|
declare const addressSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
6
6
|
_id: false;
|
|
@@ -28,9 +28,9 @@ declare const addressSchema: Schema<any, mongoose.Model<any, any, any, any, any,
|
|
|
28
28
|
placeId?: string | null | undefined;
|
|
29
29
|
}, {
|
|
30
30
|
id: string;
|
|
31
|
-
},
|
|
31
|
+
}, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
|
|
32
32
|
_id: false;
|
|
33
|
-
}
|
|
33
|
+
}>> & Omit<{
|
|
34
34
|
formattedAddress?: string | null | undefined;
|
|
35
35
|
street?: string | null | undefined;
|
|
36
36
|
city?: string | null | undefined;
|
|
@@ -76,7 +76,6 @@ declare const personNameSchema: Schema<any, mongoose.Model<any, any, any, any, a
|
|
|
76
76
|
isPrimary?: boolean | null | undefined;
|
|
77
77
|
isUnknown?: boolean | null | undefined;
|
|
78
78
|
isAnonymous?: boolean | null | undefined;
|
|
79
|
-
isMononym?: boolean | null | undefined;
|
|
80
79
|
}, mongoose.Document<unknown, {}, {
|
|
81
80
|
alias?: boolean | null | undefined;
|
|
82
81
|
firstName?: string | null | undefined;
|
|
@@ -87,12 +86,11 @@ declare const personNameSchema: Schema<any, mongoose.Model<any, any, any, any, a
|
|
|
87
86
|
isPrimary?: boolean | null | undefined;
|
|
88
87
|
isUnknown?: boolean | null | undefined;
|
|
89
88
|
isAnonymous?: boolean | null | undefined;
|
|
90
|
-
isMononym?: boolean | null | undefined;
|
|
91
89
|
}, {
|
|
92
90
|
id: string;
|
|
93
|
-
},
|
|
91
|
+
}, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
|
|
94
92
|
_id: false;
|
|
95
|
-
}
|
|
93
|
+
}>> & Omit<{
|
|
96
94
|
alias?: boolean | null | undefined;
|
|
97
95
|
firstName?: string | null | undefined;
|
|
98
96
|
lastName?: string | null | undefined;
|
|
@@ -102,7 +100,6 @@ declare const personNameSchema: Schema<any, mongoose.Model<any, any, any, any, a
|
|
|
102
100
|
isPrimary?: boolean | null | undefined;
|
|
103
101
|
isUnknown?: boolean | null | undefined;
|
|
104
102
|
isAnonymous?: boolean | null | undefined;
|
|
105
|
-
isMononym?: boolean | null | undefined;
|
|
106
103
|
} & {
|
|
107
104
|
_id: mongoose.Types.ObjectId;
|
|
108
105
|
} & {
|
|
@@ -119,7 +116,6 @@ declare const personNameSchema: Schema<any, mongoose.Model<any, any, any, any, a
|
|
|
119
116
|
isPrimary?: boolean | null | undefined;
|
|
120
117
|
isUnknown?: boolean | null | undefined;
|
|
121
118
|
isAnonymous?: boolean | null | undefined;
|
|
122
|
-
isMononym?: boolean | null | undefined;
|
|
123
119
|
} & {
|
|
124
120
|
_id: mongoose.Types.ObjectId;
|
|
125
121
|
} & {
|
|
@@ -140,9 +136,9 @@ declare const phoneSchema: Schema<any, mongoose.Model<any, any, any, any, any, a
|
|
|
140
136
|
dataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
|
|
141
137
|
}, {
|
|
142
138
|
id: string;
|
|
143
|
-
},
|
|
139
|
+
}, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
|
|
144
140
|
_id: false;
|
|
145
|
-
}
|
|
141
|
+
}>> & Omit<{
|
|
146
142
|
number?: string | null | undefined;
|
|
147
143
|
type?: string | null | undefined;
|
|
148
144
|
safeToContact?: boolean | null | undefined;
|
|
@@ -176,9 +172,9 @@ declare const emailSchema: Schema<any, mongoose.Model<any, any, any, any, any, a
|
|
|
176
172
|
address?: string | null | undefined;
|
|
177
173
|
}, {
|
|
178
174
|
id: string;
|
|
179
|
-
},
|
|
175
|
+
}, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
|
|
180
176
|
_id: false;
|
|
181
|
-
}
|
|
177
|
+
}>> & Omit<{
|
|
182
178
|
type?: string | null | undefined;
|
|
183
179
|
safeToContact?: boolean | null | undefined;
|
|
184
180
|
address?: string | null | undefined;
|
|
@@ -250,9 +246,9 @@ declare const demographicsSchema: Schema<any, mongoose.Model<any, any, any, any,
|
|
|
250
246
|
ethnicityDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
|
|
251
247
|
}, {
|
|
252
248
|
id: string;
|
|
253
|
-
},
|
|
249
|
+
}, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
|
|
254
250
|
_id: false;
|
|
255
|
-
}
|
|
251
|
+
}>> & Omit<{
|
|
256
252
|
race: number[];
|
|
257
253
|
ethnicity: number[];
|
|
258
254
|
accommodations: string[];
|
package/dist/schemas/index.js
CHANGED
|
@@ -32,6 +32,8 @@ var CVC_1_NAME_TYPE = {
|
|
|
32
32
|
ALIAS: "alias",
|
|
33
33
|
/** Trade name / business name - single unstructured name field */
|
|
34
34
|
TRADE_NAME: "trade_name",
|
|
35
|
+
/** Single-word name (e.g., "Madonna", "Prince") - single unstructured name field */
|
|
36
|
+
MONONYM: "mononym",
|
|
35
37
|
/** Nickname - single unstructured name field */
|
|
36
38
|
NICKNAME: "nickname",
|
|
37
39
|
/** Online handle or username - single unstructured name field */
|
|
@@ -43,6 +45,7 @@ var CVC_1_VALUES = [
|
|
|
43
45
|
CVC_1_NAME_TYPE.LEGAL,
|
|
44
46
|
CVC_1_NAME_TYPE.ALIAS,
|
|
45
47
|
CVC_1_NAME_TYPE.TRADE_NAME,
|
|
48
|
+
CVC_1_NAME_TYPE.MONONYM,
|
|
46
49
|
CVC_1_NAME_TYPE.NICKNAME,
|
|
47
50
|
CVC_1_NAME_TYPE.HANDLE,
|
|
48
51
|
CVC_1_NAME_TYPE.UNKNOWN
|
|
@@ -51,6 +54,7 @@ var CVC_1_LABELS = {
|
|
|
51
54
|
[CVC_1_NAME_TYPE.LEGAL]: "Legal Name",
|
|
52
55
|
[CVC_1_NAME_TYPE.ALIAS]: "Alias / AKA",
|
|
53
56
|
[CVC_1_NAME_TYPE.TRADE_NAME]: "Trade Name",
|
|
57
|
+
[CVC_1_NAME_TYPE.MONONYM]: "Mononym",
|
|
54
58
|
[CVC_1_NAME_TYPE.NICKNAME]: "Nickname",
|
|
55
59
|
[CVC_1_NAME_TYPE.HANDLE]: "Handle / Username",
|
|
56
60
|
[CVC_1_NAME_TYPE.UNKNOWN]: "Unknown"
|
|
@@ -61,6 +65,7 @@ var CVC_1_STRUCTURED_NAME_TYPES = [
|
|
|
61
65
|
var CVC_1_UNSTRUCTURED_NAME_TYPES = [
|
|
62
66
|
CVC_1_NAME_TYPE.ALIAS,
|
|
63
67
|
CVC_1_NAME_TYPE.TRADE_NAME,
|
|
68
|
+
CVC_1_NAME_TYPE.MONONYM,
|
|
64
69
|
CVC_1_NAME_TYPE.NICKNAME,
|
|
65
70
|
CVC_1_NAME_TYPE.HANDLE,
|
|
66
71
|
CVC_1_NAME_TYPE.UNKNOWN
|
|
@@ -361,13 +366,20 @@ var IC_57_SERVICE_AUDIENCE = {
|
|
|
361
366
|
CLIENT_VICTIM: 1,
|
|
362
367
|
THIRD_PARTY: 2,
|
|
363
368
|
DEPENDENT_SECONDARY: 3,
|
|
364
|
-
CLIENT_GROUPS: 4
|
|
369
|
+
CLIENT_GROUPS: 4,
|
|
370
|
+
// ADDITIVE per Thread Phase-0 SOT Block C. Labels for codes 1-3 intentionally
|
|
371
|
+
// left as-is (they diverge from the prototype semantically, but renaming them
|
|
372
|
+
// is a [TOUCHES EXISTING] change deferred out of this additive pass).
|
|
373
|
+
OFFENDER: 5,
|
|
374
|
+
PERSONNEL: 6
|
|
365
375
|
};
|
|
366
376
|
var IC_57_LABELS = {
|
|
367
377
|
[IC_57_SERVICE_AUDIENCE.CLIENT_VICTIM]: "Client / Victim",
|
|
368
378
|
[IC_57_SERVICE_AUDIENCE.THIRD_PARTY]: "Third-Party",
|
|
369
379
|
[IC_57_SERVICE_AUDIENCE.DEPENDENT_SECONDARY]: "Dependent / Secondary Victim",
|
|
370
|
-
[IC_57_SERVICE_AUDIENCE.CLIENT_GROUPS]: "Client Groups"
|
|
380
|
+
[IC_57_SERVICE_AUDIENCE.CLIENT_GROUPS]: "Client Groups",
|
|
381
|
+
[IC_57_SERVICE_AUDIENCE.OFFENDER]: "Offender",
|
|
382
|
+
[IC_57_SERVICE_AUDIENCE.PERSONNEL]: "Personnel"
|
|
371
383
|
};
|
|
372
384
|
var IC_59_SERVICE_STATE = {
|
|
373
385
|
IDENTIFIED: 1,
|
|
@@ -406,14 +418,20 @@ var SESSION_STATES = {
|
|
|
406
418
|
ACTION_NEEDED: 2,
|
|
407
419
|
PENDING_SAVE: 3,
|
|
408
420
|
CLOSED: 4,
|
|
409
|
-
DISCARDED: 5
|
|
421
|
+
DISCARDED: 5,
|
|
422
|
+
// ADDITIVE per Thread Phase-0 SOT Block G. FLAG — SESSION_STATES has no
|
|
423
|
+
// prototype source (the prototype has a single record `status`, no
|
|
424
|
+
// session-wizard state machine); SUBMITTED=6 rides Thread-local th-tsnf.13
|
|
425
|
+
// authority, not the prototype.
|
|
426
|
+
SUBMITTED: 6
|
|
410
427
|
};
|
|
411
428
|
var SESSION_STATE_LABELS = {
|
|
412
429
|
[SESSION_STATES.INITIALIZED]: "Initialized",
|
|
413
430
|
[SESSION_STATES.ACTION_NEEDED]: "Action Needed",
|
|
414
431
|
[SESSION_STATES.PENDING_SAVE]: "Pending Save",
|
|
415
432
|
[SESSION_STATES.CLOSED]: "Closed",
|
|
416
|
-
[SESSION_STATES.DISCARDED]: "Discarded"
|
|
433
|
+
[SESSION_STATES.DISCARDED]: "Discarded",
|
|
434
|
+
[SESSION_STATES.SUBMITTED]: "Submitted"
|
|
417
435
|
};
|
|
418
436
|
var RECORD_STATES = {
|
|
419
437
|
OPEN: 1,
|
|
@@ -434,6 +452,13 @@ var INTERACTION_TYPES = {
|
|
|
434
452
|
LAP_INCIDENT: 2,
|
|
435
453
|
FIELD_RESPONSE: 3,
|
|
436
454
|
EMAIL_CRISIS: 4,
|
|
455
|
+
// ADDITIVE per Thread Phase-0 SOT Block F. FLAG — numeric INTERACTION_TYPES
|
|
456
|
+
// (incl. these 3 and the pre-existing EMAIL_CRISIS=4) have no prototype
|
|
457
|
+
// source; the prototype models interactions as string template ids + the
|
|
458
|
+
// CVC-47/IC-56 delivery channel. Non-canonical wire/back-compat mirror.
|
|
459
|
+
IN_PERSON: 5,
|
|
460
|
+
TEXT_EMAIL: 6,
|
|
461
|
+
VIRTUAL: 7,
|
|
437
462
|
OTHER: 99
|
|
438
463
|
};
|
|
439
464
|
var VALID_INTERACTION_TYPES = Object.values(
|
|
@@ -447,6 +472,9 @@ var INTERACTION_TYPE_LABELS = {
|
|
|
447
472
|
[INTERACTION_TYPES.LAP_INCIDENT]: "LAP Incident",
|
|
448
473
|
[INTERACTION_TYPES.FIELD_RESPONSE]: "Field Response",
|
|
449
474
|
[INTERACTION_TYPES.EMAIL_CRISIS]: "Email Crisis",
|
|
475
|
+
[INTERACTION_TYPES.IN_PERSON]: "In Person",
|
|
476
|
+
[INTERACTION_TYPES.TEXT_EMAIL]: "Text / Email",
|
|
477
|
+
[INTERACTION_TYPES.VIRTUAL]: "Virtual",
|
|
450
478
|
[INTERACTION_TYPES.OTHER]: "Other"
|
|
451
479
|
};
|
|
452
480
|
var INCIDENT_INVOLVEMENT_ROLE = {
|
|
@@ -514,12 +542,18 @@ var IC_4_LABELS = {
|
|
|
514
542
|
var IC_22_CORE_SEX = {
|
|
515
543
|
FEMALE: 1,
|
|
516
544
|
MALE: 2,
|
|
517
|
-
|
|
545
|
+
NOT_REPORTED: 3,
|
|
546
|
+
NOT_TRACKED: 4,
|
|
547
|
+
// FLAG: no prototype source; relocated from 3 (not deleted) to preserve any
|
|
548
|
+
// out-of-repo persisted data. See migration note above.
|
|
549
|
+
INTERSEX: 5,
|
|
518
550
|
UNKNOWN: 99
|
|
519
551
|
};
|
|
520
552
|
var IC_22_LABELS = {
|
|
521
553
|
[IC_22_CORE_SEX.FEMALE]: "Female",
|
|
522
554
|
[IC_22_CORE_SEX.MALE]: "Male",
|
|
555
|
+
[IC_22_CORE_SEX.NOT_REPORTED]: "Not Reported",
|
|
556
|
+
[IC_22_CORE_SEX.NOT_TRACKED]: "Not Tracked",
|
|
523
557
|
[IC_22_CORE_SEX.INTERSEX]: "Intersex",
|
|
524
558
|
[IC_22_CORE_SEX.UNKNOWN]: "Unknown"
|
|
525
559
|
};
|
|
@@ -529,14 +563,18 @@ var IC_23_CORE_GENDER_IDENTITY = {
|
|
|
529
563
|
NON_BINARY: 3,
|
|
530
564
|
TRANSGENDER_FEMALE: 4,
|
|
531
565
|
TRANSGENDER_MALE: 5,
|
|
566
|
+
TRANSGENDER: 6,
|
|
567
|
+
OTHER: 7,
|
|
532
568
|
UNKNOWN: 99
|
|
533
569
|
};
|
|
534
570
|
var IC_23_LABELS = {
|
|
535
571
|
[IC_23_CORE_GENDER_IDENTITY.FEMALE]: "Female",
|
|
536
572
|
[IC_23_CORE_GENDER_IDENTITY.MALE]: "Male",
|
|
537
573
|
[IC_23_CORE_GENDER_IDENTITY.NON_BINARY]: "Non-Binary",
|
|
538
|
-
[IC_23_CORE_GENDER_IDENTITY.TRANSGENDER_FEMALE]: "Transgender Female",
|
|
539
|
-
[IC_23_CORE_GENDER_IDENTITY.TRANSGENDER_MALE]: "Transgender Male",
|
|
574
|
+
[IC_23_CORE_GENDER_IDENTITY.TRANSGENDER_FEMALE]: "Transgender Female (MTF / trans woman)",
|
|
575
|
+
[IC_23_CORE_GENDER_IDENTITY.TRANSGENDER_MALE]: "Transgender Male (FTM / trans man)",
|
|
576
|
+
[IC_23_CORE_GENDER_IDENTITY.TRANSGENDER]: "Transgender",
|
|
577
|
+
[IC_23_CORE_GENDER_IDENTITY.OTHER]: "Other",
|
|
540
578
|
[IC_23_CORE_GENDER_IDENTITY.UNKNOWN]: "Unknown"
|
|
541
579
|
};
|
|
542
580
|
var CVC_15_CORE_SEX = {
|
|
@@ -583,10 +621,11 @@ var CVC_17_CORE_GENDER_IDENTITY = {
|
|
|
583
621
|
TRANSGENDER: "TRANSGENDER",
|
|
584
622
|
NON_BINARY: "NON_BINARY",
|
|
585
623
|
OTHER: "OTHER",
|
|
586
|
-
// Level 0 - Missingness codes (codebook canonical set)
|
|
587
624
|
UNKNOWN: "UNK",
|
|
588
|
-
|
|
589
|
-
|
|
625
|
+
// Level 0 - Missingness (canonical genderIdentity.v1.0.0.json L0 set).
|
|
626
|
+
// ADDITIVE per Thread Phase-0 SOT Block B step 5.
|
|
627
|
+
PREFER_NOT_TO_ANSWER: "PREFER_NOT_TO_ANSWER",
|
|
628
|
+
DATA_NOT_COLLECTED: "DATA_NOT_COLLECTED",
|
|
590
629
|
// Level 2 - Transgender subcategories
|
|
591
630
|
TRANSGENDER_FTM: "TRANSGENDER_FTM",
|
|
592
631
|
TRANSGENDER_MTF: "TRANSGENDER_MTF"
|
|
@@ -598,8 +637,8 @@ var CVC_17_LABELS = {
|
|
|
598
637
|
[CVC_17_CORE_GENDER_IDENTITY.NON_BINARY]: "Non-Binary",
|
|
599
638
|
[CVC_17_CORE_GENDER_IDENTITY.OTHER]: "Other",
|
|
600
639
|
[CVC_17_CORE_GENDER_IDENTITY.UNKNOWN]: "Unknown",
|
|
601
|
-
[CVC_17_CORE_GENDER_IDENTITY.DATA_NOT_COLLECTED]: "Data not collected",
|
|
602
640
|
[CVC_17_CORE_GENDER_IDENTITY.PREFER_NOT_TO_ANSWER]: "Client prefers not to answer",
|
|
641
|
+
[CVC_17_CORE_GENDER_IDENTITY.DATA_NOT_COLLECTED]: "Data not collected",
|
|
603
642
|
[CVC_17_CORE_GENDER_IDENTITY.TRANSGENDER_FTM]: "Transgender - FTM",
|
|
604
643
|
[CVC_17_CORE_GENDER_IDENTITY.TRANSGENDER_MTF]: "Transgender - MTF"
|
|
605
644
|
};
|
|
@@ -611,6 +650,11 @@ var CVC_17_LEVEL_1_OPTIONS = [
|
|
|
611
650
|
CVC_17_CORE_GENDER_IDENTITY.OTHER,
|
|
612
651
|
CVC_17_CORE_GENDER_IDENTITY.UNKNOWN
|
|
613
652
|
];
|
|
653
|
+
var CVC_17_LEVEL_0_MISSINGNESS_OPTIONS = [
|
|
654
|
+
CVC_17_CORE_GENDER_IDENTITY.UNKNOWN,
|
|
655
|
+
CVC_17_CORE_GENDER_IDENTITY.PREFER_NOT_TO_ANSWER,
|
|
656
|
+
CVC_17_CORE_GENDER_IDENTITY.DATA_NOT_COLLECTED
|
|
657
|
+
];
|
|
614
658
|
var CVC_17_LEVEL_2_TRANSGENDER_OPTIONS = [
|
|
615
659
|
CVC_17_CORE_GENDER_IDENTITY.TRANSGENDER_FTM,
|
|
616
660
|
CVC_17_CORE_GENDER_IDENTITY.TRANSGENDER_MTF
|
|
@@ -620,32 +664,6 @@ var CVC_17_TRANSGENDER_VALUES = [
|
|
|
620
664
|
CVC_17_CORE_GENDER_IDENTITY.TRANSGENDER_FTM,
|
|
621
665
|
CVC_17_CORE_GENDER_IDENTITY.TRANSGENDER_MTF
|
|
622
666
|
];
|
|
623
|
-
var CVC_17_SELECTABLE_VALUES = [
|
|
624
|
-
CVC_17_CORE_GENDER_IDENTITY.MALE,
|
|
625
|
-
CVC_17_CORE_GENDER_IDENTITY.FEMALE,
|
|
626
|
-
CVC_17_CORE_GENDER_IDENTITY.TRANSGENDER,
|
|
627
|
-
CVC_17_CORE_GENDER_IDENTITY.TRANSGENDER_FTM,
|
|
628
|
-
CVC_17_CORE_GENDER_IDENTITY.TRANSGENDER_MTF,
|
|
629
|
-
CVC_17_CORE_GENDER_IDENTITY.NON_BINARY,
|
|
630
|
-
CVC_17_CORE_GENDER_IDENTITY.OTHER
|
|
631
|
-
];
|
|
632
|
-
var CVC_17_MISSINGNESS_VALUES = [
|
|
633
|
-
CVC_17_CORE_GENDER_IDENTITY.UNKNOWN,
|
|
634
|
-
CVC_17_CORE_GENDER_IDENTITY.DATA_NOT_COLLECTED,
|
|
635
|
-
CVC_17_CORE_GENDER_IDENTITY.PREFER_NOT_TO_ANSWER
|
|
636
|
-
];
|
|
637
|
-
var CVC_17_VALUES = [
|
|
638
|
-
CVC_17_CORE_GENDER_IDENTITY.MALE,
|
|
639
|
-
CVC_17_CORE_GENDER_IDENTITY.FEMALE,
|
|
640
|
-
CVC_17_CORE_GENDER_IDENTITY.TRANSGENDER,
|
|
641
|
-
CVC_17_CORE_GENDER_IDENTITY.NON_BINARY,
|
|
642
|
-
CVC_17_CORE_GENDER_IDENTITY.OTHER,
|
|
643
|
-
CVC_17_CORE_GENDER_IDENTITY.UNKNOWN,
|
|
644
|
-
CVC_17_CORE_GENDER_IDENTITY.DATA_NOT_COLLECTED,
|
|
645
|
-
CVC_17_CORE_GENDER_IDENTITY.PREFER_NOT_TO_ANSWER,
|
|
646
|
-
CVC_17_CORE_GENDER_IDENTITY.TRANSGENDER_FTM,
|
|
647
|
-
CVC_17_CORE_GENDER_IDENTITY.TRANSGENDER_MTF
|
|
648
|
-
];
|
|
649
667
|
var IC_24_RACE = {
|
|
650
668
|
AMERICAN_INDIAN_ALASKA_NATIVE: 1,
|
|
651
669
|
ASIAN: 2,
|
|
@@ -765,6 +783,18 @@ var QUICK_START_CONFIG = {
|
|
|
765
783
|
contactMethod: IC_56_SERVICE_DELIVERY_CHANNEL.PHONE,
|
|
766
784
|
interactionType: INTERACTION_TYPES.EMAIL_CRISIS
|
|
767
785
|
},
|
|
786
|
+
text_email: {
|
|
787
|
+
contactMethod: IC_56_SERVICE_DELIVERY_CHANNEL.EMAIL_TEXT_CHAT,
|
|
788
|
+
interactionType: INTERACTION_TYPES.TEXT_EMAIL
|
|
789
|
+
},
|
|
790
|
+
misc_call: {
|
|
791
|
+
contactMethod: IC_56_SERVICE_DELIVERY_CHANNEL.PHONE,
|
|
792
|
+
interactionType: INTERACTION_TYPES.OTHER
|
|
793
|
+
},
|
|
794
|
+
in_person: {
|
|
795
|
+
contactMethod: IC_56_SERVICE_DELIVERY_CHANNEL.IN_PERSON,
|
|
796
|
+
interactionType: INTERACTION_TYPES.IN_PERSON
|
|
797
|
+
},
|
|
768
798
|
other: {
|
|
769
799
|
contactMethod: IC_56_SERVICE_DELIVERY_CHANNEL.PHONE,
|
|
770
800
|
interactionType: INTERACTION_TYPES.OTHER
|
|
@@ -3499,13 +3529,6 @@ var CVC_67_SELECTABLE_VALUES = [
|
|
|
3499
3529
|
var CVC_67_MISSINGNESS_VALUES = [
|
|
3500
3530
|
CVC_67_HMIS_SEX.DATA_NOT_COLLECTED
|
|
3501
3531
|
];
|
|
3502
|
-
var CVC_67_VALUES = [
|
|
3503
|
-
CVC_67_HMIS_SEX.MALE,
|
|
3504
|
-
CVC_67_HMIS_SEX.FEMALE,
|
|
3505
|
-
CVC_67_HMIS_SEX.CLIENT_PREFERS_NOT_TO_ANSWER,
|
|
3506
|
-
CVC_67_HMIS_SEX.CLIENT_DOESNT_KNOW,
|
|
3507
|
-
CVC_67_HMIS_SEX.DATA_NOT_COLLECTED
|
|
3508
|
-
];
|
|
3509
3532
|
|
|
3510
3533
|
// src/schemas/common.ts
|
|
3511
3534
|
var addressSchema = new Schema(
|
|
@@ -3533,11 +3556,7 @@ var personNameSchema = new Schema(
|
|
|
3533
3556
|
isPrimary: Boolean,
|
|
3534
3557
|
alias: Boolean,
|
|
3535
3558
|
isUnknown: Boolean,
|
|
3536
|
-
isAnonymous: Boolean
|
|
3537
|
-
// Shape flag: this person has only one name (e.g., Madonna). A mononym
|
|
3538
|
-
// can itself be legal, a nickname, a trade name, etc. — it's orthogonal
|
|
3539
|
-
// to nameType, not a value of it.
|
|
3540
|
-
isMononym: Boolean
|
|
3559
|
+
isAnonymous: Boolean
|
|
3541
3560
|
},
|
|
3542
3561
|
{ _id: false }
|
|
3543
3562
|
);
|