@htilabs/platform-common-models 0.8.13 → 0.8.15

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.
Files changed (75) hide show
  1. package/README.md +44 -0
  2. package/dist/config/index.cjs +4 -0
  3. package/dist/config/index.cjs.map +1 -1
  4. package/dist/config/index.d.cts +16 -1
  5. package/dist/config/index.d.ts +16 -1
  6. package/dist/config/index.js +2 -0
  7. package/dist/config/index.js.map +1 -1
  8. package/dist/constants/index.cjs +10 -0
  9. package/dist/constants/index.cjs.map +1 -1
  10. package/dist/constants/index.d.cts +1 -1
  11. package/dist/constants/index.d.ts +1 -1
  12. package/dist/constants/index.js +10 -0
  13. package/dist/constants/index.js.map +1 -1
  14. package/dist/cvcs/index.cjs +601 -2
  15. package/dist/cvcs/index.cjs.map +1 -1
  16. package/dist/cvcs/index.d.cts +2754 -2084
  17. package/dist/cvcs/index.d.ts +2754 -2084
  18. package/dist/cvcs/index.js +594 -2
  19. package/dist/cvcs/index.js.map +1 -1
  20. package/dist/{index-I-DiX9eQ.d.ts → index-CDoqrfc1.d.ts} +1 -1
  21. package/dist/{index-CoVr1jIV.d.cts → index-Zu_mOJRn.d.cts} +1 -1
  22. package/dist/index.cjs +709 -4
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.d.cts +154 -7
  25. package/dist/index.d.ts +154 -7
  26. package/dist/index.js +693 -4
  27. package/dist/index.js.map +1 -1
  28. package/dist/models/index.d.cts +2 -2
  29. package/dist/models/index.d.ts +2 -2
  30. package/dist/mongo/index.cjs +383 -0
  31. package/dist/mongo/index.cjs.map +1 -0
  32. package/dist/mongo/index.d.cts +221 -0
  33. package/dist/mongo/index.d.ts +221 -0
  34. package/dist/mongo/index.js +351 -0
  35. package/dist/mongo/index.js.map +1 -0
  36. package/dist/{platform-auth-BfCMuAlC.d.cts → platform-auth-AsfnIXfK.d.cts} +2 -2
  37. package/dist/{platform-auth-BfCMuAlC.d.ts → platform-auth-AsfnIXfK.d.ts} +2 -2
  38. package/dist/schemas/index.cjs +5 -1
  39. package/dist/schemas/index.cjs.map +1 -1
  40. package/dist/schemas/index.d.cts +29 -25
  41. package/dist/schemas/index.d.ts +29 -25
  42. package/dist/schemas/index.js +5 -1
  43. package/dist/schemas/index.js.map +1 -1
  44. package/dist/types/index.d.cts +2 -2
  45. package/dist/types/index.d.ts +2 -2
  46. package/package.json +10 -1
  47. package/src/__sot__/coreIndicators.pin.json +6 -1
  48. package/src/__tests__/__snapshots__/cvc-sot.snap +18 -2
  49. package/src/__tests__/cvc-136-scoring-invariant.test.ts +6 -3
  50. package/src/__tests__/cvc-drift-gate.test.ts +14 -3
  51. package/src/__tests__/cvc-sot-snapshot.test.ts +13 -1
  52. package/src/__tests__/cvc-structural.test.ts +6 -0
  53. package/src/__tests__/mongo-verifier.test.ts +502 -0
  54. package/src/config/index.ts +8 -2
  55. package/src/constants/ic.ts +31 -2
  56. package/src/cvcs/assertionStatus.v1.0.0.json +80 -0
  57. package/src/cvcs/caseShareState.v1.0.0.json +62 -0
  58. package/src/cvcs/coreIndicators.v1.0.0.json +67 -2
  59. package/src/cvcs/createdBySystem.v1.0.0.json +89 -0
  60. package/src/cvcs/criminalOrgCategory.v1.0.0.json +116 -0
  61. package/src/cvcs/hmisSex.v1.0.0.json +89 -0
  62. package/src/cvcs/index.ts +22 -0
  63. package/src/cvcs/minorAdultStatus.v1.0.0.json +80 -0
  64. package/src/cvcs/referralOrigin.v1.0.0.json +26 -0
  65. package/src/cvcs/subjectType.v1.0.0.json +80 -0
  66. package/src/generated/cvc-enums.ts +125 -2
  67. package/src/index.ts +20 -0
  68. package/src/mongo/catalog.ts +65 -0
  69. package/src/mongo/contract.ts +157 -0
  70. package/src/mongo/index.ts +343 -0
  71. package/src/mongo/similarity.ts +133 -0
  72. package/src/mongo/uri.ts +53 -0
  73. package/src/schemas/common.ts +4 -0
  74. package/dist/{cvcEntry-BCj1OWqL.d.cts → cvcEntry-0BIB9sen.d.cts} +8 -8
  75. package/dist/{cvcEntry-BCj1OWqL.d.ts → cvcEntry-0BIB9sen.d.ts} +8 -8
@@ -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-BCj1OWqL.cjs';
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-0BIB9sen.cjs';
4
4
 
5
5
  declare const addressSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
6
6
  _id: false;
@@ -76,6 +76,7 @@ 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;
79
80
  }, mongoose.Document<unknown, {}, {
80
81
  alias?: boolean | null | undefined;
81
82
  firstName?: string | null | undefined;
@@ -86,6 +87,7 @@ declare const personNameSchema: Schema<any, mongoose.Model<any, any, any, any, a
86
87
  isPrimary?: boolean | null | undefined;
87
88
  isUnknown?: boolean | null | undefined;
88
89
  isAnonymous?: boolean | null | undefined;
90
+ isMononym?: boolean | null | undefined;
89
91
  }, {
90
92
  id: string;
91
93
  }, Omit<mongoose.DefaultSchemaOptions, "_id"> & {
@@ -100,6 +102,7 @@ declare const personNameSchema: Schema<any, mongoose.Model<any, any, any, any, a
100
102
  isPrimary?: boolean | null | undefined;
101
103
  isUnknown?: boolean | null | undefined;
102
104
  isAnonymous?: boolean | null | undefined;
105
+ isMononym?: boolean | null | undefined;
103
106
  } & {
104
107
  _id: mongoose.Types.ObjectId;
105
108
  } & {
@@ -116,6 +119,7 @@ declare const personNameSchema: Schema<any, mongoose.Model<any, any, any, any, a
116
119
  isPrimary?: boolean | null | undefined;
117
120
  isUnknown?: boolean | null | undefined;
118
121
  isAnonymous?: boolean | null | undefined;
122
+ isMononym?: boolean | null | undefined;
119
123
  } & {
120
124
  _id: mongoose.Types.ObjectId;
121
125
  } & {
@@ -128,12 +132,12 @@ declare const phoneSchema: Schema<any, mongoose.Model<any, any, any, any, any, a
128
132
  number?: string | null | undefined;
129
133
  type?: string | null | undefined;
130
134
  safeToContact?: boolean | null | undefined;
131
- dataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
135
+ dataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
132
136
  }, mongoose.Document<unknown, {}, {
133
137
  number?: string | null | undefined;
134
138
  type?: string | null | undefined;
135
139
  safeToContact?: boolean | null | undefined;
136
- dataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
140
+ dataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
137
141
  }, {
138
142
  id: string;
139
143
  }, Omit<mongoose.DefaultSchemaOptions, "_id"> & {
@@ -142,7 +146,7 @@ declare const phoneSchema: Schema<any, mongoose.Model<any, any, any, any, any, a
142
146
  number?: string | null | undefined;
143
147
  type?: string | null | undefined;
144
148
  safeToContact?: boolean | null | undefined;
145
- dataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
149
+ dataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
146
150
  } & {
147
151
  _id: mongoose.Types.ObjectId;
148
152
  } & {
@@ -153,7 +157,7 @@ declare const phoneSchema: Schema<any, mongoose.Model<any, any, any, any, any, a
153
157
  number?: string | null | undefined;
154
158
  type?: string | null | undefined;
155
159
  safeToContact?: boolean | null | undefined;
156
- dataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
160
+ dataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
157
161
  } & {
158
162
  _id: mongoose.Types.ObjectId;
159
163
  } & {
@@ -215,11 +219,11 @@ declare const demographicsSchema: Schema<any, mongoose.Model<any, any, any, any,
215
219
  raceOtherText?: string | null | undefined;
216
220
  genderOtherText?: string | null | undefined;
217
221
  accommodationOtherText?: string | null | undefined;
218
- ageDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
219
- sexDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
220
- genderDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
221
- raceDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
222
- ethnicityDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
222
+ ageDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
223
+ sexDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
224
+ genderDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
225
+ raceDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
226
+ ethnicityDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
223
227
  }, mongoose.Document<unknown, {}, {
224
228
  race: number[];
225
229
  ethnicity: number[];
@@ -239,11 +243,11 @@ declare const demographicsSchema: Schema<any, mongoose.Model<any, any, any, any,
239
243
  raceOtherText?: string | null | undefined;
240
244
  genderOtherText?: string | null | undefined;
241
245
  accommodationOtherText?: string | null | undefined;
242
- ageDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
243
- sexDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
244
- genderDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
245
- raceDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
246
- ethnicityDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
246
+ ageDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
247
+ sexDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
248
+ genderDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
249
+ raceDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
250
+ ethnicityDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
247
251
  }, {
248
252
  id: string;
249
253
  }, Omit<mongoose.DefaultSchemaOptions, "_id"> & {
@@ -267,11 +271,11 @@ declare const demographicsSchema: Schema<any, mongoose.Model<any, any, any, any,
267
271
  raceOtherText?: string | null | undefined;
268
272
  genderOtherText?: string | null | undefined;
269
273
  accommodationOtherText?: string | null | undefined;
270
- ageDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
271
- sexDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
272
- genderDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
273
- raceDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
274
- ethnicityDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
274
+ ageDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
275
+ sexDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
276
+ genderDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
277
+ raceDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
278
+ ethnicityDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
275
279
  } & {
276
280
  _id: mongoose.Types.ObjectId;
277
281
  } & {
@@ -297,11 +301,11 @@ declare const demographicsSchema: Schema<any, mongoose.Model<any, any, any, any,
297
301
  raceOtherText?: string | null | undefined;
298
302
  genderOtherText?: string | null | undefined;
299
303
  accommodationOtherText?: string | null | undefined;
300
- ageDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
301
- sexDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
302
- genderDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
303
- raceDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
304
- ethnicityDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
304
+ ageDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
305
+ sexDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
306
+ genderDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
307
+ raceDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
308
+ ethnicityDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
305
309
  } & {
306
310
  _id: mongoose.Types.ObjectId;
307
311
  } & {
@@ -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-BCj1OWqL.js';
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-0BIB9sen.js';
4
4
 
5
5
  declare const addressSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
6
6
  _id: false;
@@ -76,6 +76,7 @@ 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;
79
80
  }, mongoose.Document<unknown, {}, {
80
81
  alias?: boolean | null | undefined;
81
82
  firstName?: string | null | undefined;
@@ -86,6 +87,7 @@ declare const personNameSchema: Schema<any, mongoose.Model<any, any, any, any, a
86
87
  isPrimary?: boolean | null | undefined;
87
88
  isUnknown?: boolean | null | undefined;
88
89
  isAnonymous?: boolean | null | undefined;
90
+ isMononym?: boolean | null | undefined;
89
91
  }, {
90
92
  id: string;
91
93
  }, Omit<mongoose.DefaultSchemaOptions, "_id"> & {
@@ -100,6 +102,7 @@ declare const personNameSchema: Schema<any, mongoose.Model<any, any, any, any, a
100
102
  isPrimary?: boolean | null | undefined;
101
103
  isUnknown?: boolean | null | undefined;
102
104
  isAnonymous?: boolean | null | undefined;
105
+ isMononym?: boolean | null | undefined;
103
106
  } & {
104
107
  _id: mongoose.Types.ObjectId;
105
108
  } & {
@@ -116,6 +119,7 @@ declare const personNameSchema: Schema<any, mongoose.Model<any, any, any, any, a
116
119
  isPrimary?: boolean | null | undefined;
117
120
  isUnknown?: boolean | null | undefined;
118
121
  isAnonymous?: boolean | null | undefined;
122
+ isMononym?: boolean | null | undefined;
119
123
  } & {
120
124
  _id: mongoose.Types.ObjectId;
121
125
  } & {
@@ -128,12 +132,12 @@ declare const phoneSchema: Schema<any, mongoose.Model<any, any, any, any, any, a
128
132
  number?: string | null | undefined;
129
133
  type?: string | null | undefined;
130
134
  safeToContact?: boolean | null | undefined;
131
- dataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
135
+ dataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
132
136
  }, mongoose.Document<unknown, {}, {
133
137
  number?: string | null | undefined;
134
138
  type?: string | null | undefined;
135
139
  safeToContact?: boolean | null | undefined;
136
- dataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
140
+ dataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
137
141
  }, {
138
142
  id: string;
139
143
  }, Omit<mongoose.DefaultSchemaOptions, "_id"> & {
@@ -142,7 +146,7 @@ declare const phoneSchema: Schema<any, mongoose.Model<any, any, any, any, any, a
142
146
  number?: string | null | undefined;
143
147
  type?: string | null | undefined;
144
148
  safeToContact?: boolean | null | undefined;
145
- dataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
149
+ dataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
146
150
  } & {
147
151
  _id: mongoose.Types.ObjectId;
148
152
  } & {
@@ -153,7 +157,7 @@ declare const phoneSchema: Schema<any, mongoose.Model<any, any, any, any, any, a
153
157
  number?: string | null | undefined;
154
158
  type?: string | null | undefined;
155
159
  safeToContact?: boolean | null | undefined;
156
- dataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
160
+ dataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
157
161
  } & {
158
162
  _id: mongoose.Types.ObjectId;
159
163
  } & {
@@ -215,11 +219,11 @@ declare const demographicsSchema: Schema<any, mongoose.Model<any, any, any, any,
215
219
  raceOtherText?: string | null | undefined;
216
220
  genderOtherText?: string | null | undefined;
217
221
  accommodationOtherText?: string | null | undefined;
218
- ageDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
219
- sexDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
220
- genderDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
221
- raceDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
222
- ethnicityDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
222
+ ageDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
223
+ sexDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
224
+ genderDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
225
+ raceDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
226
+ ethnicityDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
223
227
  }, mongoose.Document<unknown, {}, {
224
228
  race: number[];
225
229
  ethnicity: number[];
@@ -239,11 +243,11 @@ declare const demographicsSchema: Schema<any, mongoose.Model<any, any, any, any,
239
243
  raceOtherText?: string | null | undefined;
240
244
  genderOtherText?: string | null | undefined;
241
245
  accommodationOtherText?: string | null | undefined;
242
- ageDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
243
- sexDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
244
- genderDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
245
- raceDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
246
- ethnicityDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
246
+ ageDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
247
+ sexDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
248
+ genderDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
249
+ raceDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
250
+ ethnicityDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
247
251
  }, {
248
252
  id: string;
249
253
  }, Omit<mongoose.DefaultSchemaOptions, "_id"> & {
@@ -267,11 +271,11 @@ declare const demographicsSchema: Schema<any, mongoose.Model<any, any, any, any,
267
271
  raceOtherText?: string | null | undefined;
268
272
  genderOtherText?: string | null | undefined;
269
273
  accommodationOtherText?: string | null | undefined;
270
- ageDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
271
- sexDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
272
- genderDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
273
- raceDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
274
- ethnicityDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
274
+ ageDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
275
+ sexDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
276
+ genderDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
277
+ raceDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
278
+ ethnicityDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
275
279
  } & {
276
280
  _id: mongoose.Types.ObjectId;
277
281
  } & {
@@ -297,11 +301,11 @@ declare const demographicsSchema: Schema<any, mongoose.Model<any, any, any, any,
297
301
  raceOtherText?: string | null | undefined;
298
302
  genderOtherText?: string | null | undefined;
299
303
  accommodationOtherText?: string | null | undefined;
300
- ageDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
301
- sexDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
302
- genderDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
303
- raceDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
304
- ethnicityDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
304
+ ageDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
305
+ sexDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
306
+ genderDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
307
+ raceDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
308
+ ethnicityDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
305
309
  } & {
306
310
  _id: mongoose.Types.ObjectId;
307
311
  } & {
@@ -3425,7 +3425,11 @@ var personNameSchema = new Schema(
3425
3425
  isPrimary: Boolean,
3426
3426
  alias: Boolean,
3427
3427
  isUnknown: Boolean,
3428
- isAnonymous: Boolean
3428
+ isAnonymous: Boolean,
3429
+ // Shape flag: this person has only one name (e.g., Madonna). A mononym
3430
+ // can itself be legal, a nickname, a trade name, etc. — it's orthogonal
3431
+ // to nameType, not a value of it.
3432
+ isMononym: Boolean
3429
3433
  },
3430
3434
  { _id: false }
3431
3435
  );