@htilabs/platform-common-models 0.23.0 → 0.25.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.
Files changed (82) hide show
  1. package/README.md +104 -0
  2. package/dist/authz/index.cjs +143 -12
  3. package/dist/authz/index.cjs.map +1 -1
  4. package/dist/authz/index.d.cts +121 -12
  5. package/dist/authz/index.d.ts +121 -12
  6. package/dist/authz/index.js +136 -12
  7. package/dist/authz/index.js.map +1 -1
  8. package/dist/constants/index.cjs +30 -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 +26 -0
  13. package/dist/constants/index.js.map +1 -1
  14. package/dist/{cvcEntry-0BIB9sen.d.cts → cvcEntry-Asg7mxjB.d.cts} +12 -9
  15. package/dist/{cvcEntry-0BIB9sen.d.ts → cvcEntry-Asg7mxjB.d.ts} +12 -9
  16. package/dist/{index-CDoqrfc1.d.ts → index-ClTjjJ_S.d.ts} +1 -1
  17. package/dist/{index-Zu_mOJRn.d.cts → index-Pt82NxQg.d.cts} +1 -1
  18. package/dist/index.cjs +604 -15
  19. package/dist/index.cjs.map +1 -1
  20. package/dist/index.d.cts +7 -5
  21. package/dist/index.d.ts +7 -5
  22. package/dist/index.js +577 -15
  23. package/dist/index.js.map +1 -1
  24. package/dist/information-scope/index.d.cts +3 -350
  25. package/dist/information-scope/index.d.ts +3 -350
  26. package/dist/informationScopeResolver-BzYu97DE.d.cts +351 -0
  27. package/dist/informationScopeResolver-BzYu97DE.d.ts +351 -0
  28. package/dist/models/index.cjs +26 -1
  29. package/dist/models/index.cjs.map +1 -1
  30. package/dist/models/index.d.cts +2 -2
  31. package/dist/models/index.d.ts +2 -2
  32. package/dist/models/index.js +26 -1
  33. package/dist/models/index.js.map +1 -1
  34. package/dist/{platform-auth-B49Ly57B.d.cts → platform-auth-DJO-r9Pf.d.cts} +48 -1
  35. package/dist/{platform-auth-B49Ly57B.d.ts → platform-auth-DJO-r9Pf.d.ts} +48 -1
  36. package/dist/schemas/index.cjs +26 -1
  37. package/dist/schemas/index.cjs.map +1 -1
  38. package/dist/schemas/index.d.cts +25 -25
  39. package/dist/schemas/index.d.ts +25 -25
  40. package/dist/schemas/index.js +26 -1
  41. package/dist/schemas/index.js.map +1 -1
  42. package/dist/services/index.cjs +26 -1
  43. package/dist/services/index.cjs.map +1 -1
  44. package/dist/services/index.d.cts +2 -1
  45. package/dist/services/index.d.ts +2 -1
  46. package/dist/services/index.js +26 -1
  47. package/dist/services/index.js.map +1 -1
  48. package/dist/sharing-ceiling/index.cjs +497 -0
  49. package/dist/sharing-ceiling/index.cjs.map +1 -0
  50. package/dist/sharing-ceiling/index.d.cts +318 -0
  51. package/dist/sharing-ceiling/index.d.ts +318 -0
  52. package/dist/sharing-ceiling/index.js +451 -0
  53. package/dist/sharing-ceiling/index.js.map +1 -0
  54. package/dist/types/index.d.cts +11 -3
  55. package/dist/types/index.d.ts +11 -3
  56. package/dist/validation/index.cjs +22 -0
  57. package/dist/validation/index.cjs.map +1 -1
  58. package/dist/validation/index.js +22 -0
  59. package/dist/validation/index.js.map +1 -1
  60. package/package.json +7 -1
  61. package/src/__sot__/README.md +2 -1
  62. package/src/__sot__/coreFunctionFields.ts +88 -4
  63. package/src/__sot__/coreFunctions.pin.json +1040 -113
  64. package/src/__sot__/sharingStarter.pin.json +229 -0
  65. package/src/__tests__/authz-resolve.test.ts +115 -31
  66. package/src/__tests__/core-function-default-bounds.test.ts +374 -0
  67. package/src/__tests__/core-functions-case-close.test.ts +82 -0
  68. package/src/__tests__/sharing-starter-canon.test.ts +178 -0
  69. package/src/authz/defaultBounds.ts +69 -0
  70. package/src/authz/index.ts +12 -3
  71. package/src/authz/resolveEffectiveFunctions.ts +69 -29
  72. package/src/constants/platform-auth.ts +60 -0
  73. package/src/generated/coreFunctionDefaultBounds.ts +109 -0
  74. package/src/generated/sharingPlatformStarter.ts +165 -0
  75. package/src/index.ts +5 -0
  76. package/src/schemas/platform-role.ts +4 -1
  77. package/src/sharingCeiling/__tests__/sharingCeiling.test.ts +678 -0
  78. package/src/sharingCeiling/chain.ts +269 -0
  79. package/src/sharingCeiling/coverage.ts +346 -0
  80. package/src/sharingCeiling/index.ts +14 -0
  81. package/src/sharingCeiling/starter.ts +89 -0
  82. package/src/types/platform-auth.ts +9 -2
@@ -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-0BIB9sen.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-Asg7mxjB.cjs';
4
4
  export { A as AGENCY_ORG_TYPE_VALIDATED_UPDATE_OPS, a as AddAgencyOrgTypeFieldsOptions, b as AgencyOrgTypeFields, O as ORG_TYPE_FIELD_NAMES, c as OrgTypeFieldName, d as OrgTypeFields, e as OrgTypeFieldsHolder, V as VSP_TWO_STEP_ISSUE, f as addAgencyOrgTypeFields, g as addOrgTypeFields, h as agencyOrgTypeSchemaDefinition, i as applyRunValidatorsIfUnset, m as mirrorOrgTypeFields, o as orgTypeFieldsDiffer, j as orgTypeSchemaDefinition, r as resolveEffectiveOrgType, k as resolveEffectiveOrgTypeFields, v as vspTwoStepHolds, l as vspTwoStepHoldsOnUpdate } from '../agency-DYCv839V.cjs';
5
5
  import '../org-type-D_FG4KdN.cjs';
6
6
  import '../enums/index.cjs';
@@ -135,12 +135,12 @@ declare const phoneSchema: Schema<any, mongoose.Model<any, any, any, any, any, a
135
135
  number?: string | null | undefined;
136
136
  type?: string | null | undefined;
137
137
  safeToContact?: boolean | null | undefined;
138
- dataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
138
+ dataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
139
139
  }, mongoose.Document<unknown, {}, {
140
140
  number?: string | null | undefined;
141
141
  type?: string | null | undefined;
142
142
  safeToContact?: boolean | null | undefined;
143
- dataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
143
+ dataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
144
144
  }, {
145
145
  id: string;
146
146
  }, Omit<mongoose.DefaultSchemaOptions, "_id"> & {
@@ -149,7 +149,7 @@ declare const phoneSchema: Schema<any, mongoose.Model<any, any, any, any, any, a
149
149
  number?: string | null | undefined;
150
150
  type?: string | null | undefined;
151
151
  safeToContact?: boolean | null | undefined;
152
- dataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
152
+ dataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
153
153
  } & {
154
154
  _id: mongoose.Types.ObjectId;
155
155
  } & {
@@ -160,7 +160,7 @@ declare const phoneSchema: Schema<any, mongoose.Model<any, any, any, any, any, a
160
160
  number?: string | null | undefined;
161
161
  type?: string | null | undefined;
162
162
  safeToContact?: boolean | null | undefined;
163
- dataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
163
+ dataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
164
164
  } & {
165
165
  _id: mongoose.Types.ObjectId;
166
166
  } & {
@@ -222,11 +222,11 @@ declare const demographicsSchema: Schema<any, mongoose.Model<any, any, any, any,
222
222
  raceOtherText?: string | null | undefined;
223
223
  genderOtherText?: string | null | undefined;
224
224
  accommodationOtherText?: string | null | undefined;
225
- ageDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
226
- sexDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
227
- genderDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
228
- raceDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
229
- ethnicityDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
225
+ ageDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
226
+ sexDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
227
+ genderDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
228
+ raceDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
229
+ ethnicityDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
230
230
  }, mongoose.Document<unknown, {}, {
231
231
  race: number[];
232
232
  ethnicity: number[];
@@ -246,11 +246,11 @@ declare const demographicsSchema: Schema<any, mongoose.Model<any, any, any, any,
246
246
  raceOtherText?: string | null | undefined;
247
247
  genderOtherText?: string | null | undefined;
248
248
  accommodationOtherText?: string | null | undefined;
249
- ageDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
250
- sexDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
251
- genderDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
252
- raceDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
253
- ethnicityDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
249
+ ageDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
250
+ sexDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
251
+ genderDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
252
+ raceDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
253
+ ethnicityDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
254
254
  }, {
255
255
  id: string;
256
256
  }, Omit<mongoose.DefaultSchemaOptions, "_id"> & {
@@ -274,11 +274,11 @@ declare const demographicsSchema: Schema<any, mongoose.Model<any, any, any, any,
274
274
  raceOtherText?: string | null | undefined;
275
275
  genderOtherText?: string | null | undefined;
276
276
  accommodationOtherText?: string | null | undefined;
277
- ageDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
278
- sexDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
279
- genderDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
280
- raceDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
281
- ethnicityDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
277
+ ageDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
278
+ sexDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
279
+ genderDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
280
+ raceDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
281
+ ethnicityDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
282
282
  } & {
283
283
  _id: mongoose.Types.ObjectId;
284
284
  } & {
@@ -304,11 +304,11 @@ declare const demographicsSchema: Schema<any, mongoose.Model<any, any, any, any,
304
304
  raceOtherText?: string | null | undefined;
305
305
  genderOtherText?: string | null | undefined;
306
306
  accommodationOtherText?: string | null | undefined;
307
- ageDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
308
- sexDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
309
- genderDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
310
- raceDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
311
- ethnicityDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
307
+ ageDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
308
+ sexDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
309
+ genderDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
310
+ raceDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
311
+ ethnicityDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
312
312
  } & {
313
313
  _id: mongoose.Types.ObjectId;
314
314
  } & {
@@ -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-0BIB9sen.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-Asg7mxjB.js';
4
4
  export { A as AGENCY_ORG_TYPE_VALIDATED_UPDATE_OPS, a as AddAgencyOrgTypeFieldsOptions, b as AgencyOrgTypeFields, O as ORG_TYPE_FIELD_NAMES, c as OrgTypeFieldName, d as OrgTypeFields, e as OrgTypeFieldsHolder, V as VSP_TWO_STEP_ISSUE, f as addAgencyOrgTypeFields, g as addOrgTypeFields, h as agencyOrgTypeSchemaDefinition, i as applyRunValidatorsIfUnset, m as mirrorOrgTypeFields, o as orgTypeFieldsDiffer, j as orgTypeSchemaDefinition, r as resolveEffectiveOrgType, k as resolveEffectiveOrgTypeFields, v as vspTwoStepHolds, l as vspTwoStepHoldsOnUpdate } from '../agency-Ca4pCOOf.js';
5
5
  import '../org-type-BYQb9Qzq.js';
6
6
  import '../enums/index.js';
@@ -135,12 +135,12 @@ declare const phoneSchema: Schema<any, mongoose.Model<any, any, any, any, any, a
135
135
  number?: string | null | undefined;
136
136
  type?: string | null | undefined;
137
137
  safeToContact?: boolean | null | undefined;
138
- dataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
138
+ dataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
139
139
  }, mongoose.Document<unknown, {}, {
140
140
  number?: string | null | undefined;
141
141
  type?: string | null | undefined;
142
142
  safeToContact?: boolean | null | undefined;
143
- dataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
143
+ dataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
144
144
  }, {
145
145
  id: string;
146
146
  }, Omit<mongoose.DefaultSchemaOptions, "_id"> & {
@@ -149,7 +149,7 @@ declare const phoneSchema: Schema<any, mongoose.Model<any, any, any, any, any, a
149
149
  number?: string | null | undefined;
150
150
  type?: string | null | undefined;
151
151
  safeToContact?: boolean | null | undefined;
152
- dataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
152
+ dataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
153
153
  } & {
154
154
  _id: mongoose.Types.ObjectId;
155
155
  } & {
@@ -160,7 +160,7 @@ declare const phoneSchema: Schema<any, mongoose.Model<any, any, any, any, any, a
160
160
  number?: string | null | undefined;
161
161
  type?: string | null | undefined;
162
162
  safeToContact?: boolean | null | undefined;
163
- dataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
163
+ dataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
164
164
  } & {
165
165
  _id: mongoose.Types.ObjectId;
166
166
  } & {
@@ -222,11 +222,11 @@ declare const demographicsSchema: Schema<any, mongoose.Model<any, any, any, any,
222
222
  raceOtherText?: string | null | undefined;
223
223
  genderOtherText?: string | null | undefined;
224
224
  accommodationOtherText?: string | null | undefined;
225
- ageDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
226
- sexDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
227
- genderDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
228
- raceDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
229
- ethnicityDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
225
+ ageDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
226
+ sexDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
227
+ genderDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
228
+ raceDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
229
+ ethnicityDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
230
230
  }, mongoose.Document<unknown, {}, {
231
231
  race: number[];
232
232
  ethnicity: number[];
@@ -246,11 +246,11 @@ declare const demographicsSchema: Schema<any, mongoose.Model<any, any, any, any,
246
246
  raceOtherText?: string | null | undefined;
247
247
  genderOtherText?: string | null | undefined;
248
248
  accommodationOtherText?: string | null | undefined;
249
- ageDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
250
- sexDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
251
- genderDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
252
- raceDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
253
- ethnicityDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
249
+ ageDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
250
+ sexDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
251
+ genderDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
252
+ raceDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
253
+ ethnicityDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
254
254
  }, {
255
255
  id: string;
256
256
  }, Omit<mongoose.DefaultSchemaOptions, "_id"> & {
@@ -274,11 +274,11 @@ declare const demographicsSchema: Schema<any, mongoose.Model<any, any, any, any,
274
274
  raceOtherText?: string | null | undefined;
275
275
  genderOtherText?: string | null | undefined;
276
276
  accommodationOtherText?: string | null | undefined;
277
- ageDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
278
- sexDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
279
- genderDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
280
- raceDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
281
- ethnicityDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
277
+ ageDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
278
+ sexDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
279
+ genderDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
280
+ raceDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
281
+ ethnicityDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
282
282
  } & {
283
283
  _id: mongoose.Types.ObjectId;
284
284
  } & {
@@ -304,11 +304,11 @@ declare const demographicsSchema: Schema<any, mongoose.Model<any, any, any, any,
304
304
  raceOtherText?: string | null | undefined;
305
305
  genderOtherText?: string | null | undefined;
306
306
  accommodationOtherText?: string | null | undefined;
307
- ageDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
308
- sexDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
309
- genderDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
310
- raceDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
311
- ethnicityDataQuality?: "data_not_collected" | "client_doesnt_know" | "client_prefers_not_to_answer" | null | undefined;
307
+ ageDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
308
+ sexDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
309
+ genderDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
310
+ raceDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
311
+ ethnicityDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
312
312
  } & {
313
313
  _id: mongoose.Types.ObjectId;
314
314
  } & {
@@ -4401,6 +4401,28 @@ var PERMISSION_STATE_DISPLAY = {
4401
4401
  icon: "\u{1F512}"
4402
4402
  }
4403
4403
  };
4404
+ var DEFAULT_BOUND_STATE = {
4405
+ ...PERMISSION_STATE,
4406
+ /** Not relevant — canon's `not_applicable_roles` for this function. */
4407
+ NA: "NA"
4408
+ };
4409
+ var DEFAULT_BOUND_STATE_VALUES = [
4410
+ ...PERMISSION_STATE_VALUES,
4411
+ DEFAULT_BOUND_STATE.NA
4412
+ ];
4413
+ var DEFAULT_BOUND_STATE_LABELS = {
4414
+ ...PERMISSION_STATE_LABELS,
4415
+ [DEFAULT_BOUND_STATE.NA]: "Not relevant"
4416
+ };
4417
+ var DEFAULT_BOUND_STATE_DISPLAY = {
4418
+ ...PERMISSION_STATE_DISPLAY,
4419
+ [DEFAULT_BOUND_STATE.NA]: {
4420
+ label: "Not relevant",
4421
+ color: "#616161",
4422
+ bgColor: "#f5f5f5",
4423
+ icon: "\u25CC"
4424
+ }
4425
+ };
4404
4426
  var SHARE_VIEW = {
4405
4427
  /** System metadata only (partial access). */
4406
4428
  SYS_INFO: "sys_info",
@@ -4594,7 +4616,10 @@ var platformRoleSchemaDefinition = {
4594
4616
  type: Boolean,
4595
4617
  default: false
4596
4618
  },
4597
- /** Dynamic map of functionCode → PermissionStateValue. */
4619
+ /**
4620
+ * Dynamic map of functionCode → DefaultBoundStateValue (a PERMISSION_STATE
4621
+ * value or the codebook's `NA`); an unlisted function is unbound.
4622
+ */
4598
4623
  functions: {
4599
4624
  type: Schema7.Types.Mixed,
4600
4625
  default: {}