@htilabs/platform-common-models 0.2.0-beta.4 → 0.3.0-beta.5

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 +38 -0
  2. package/dist/constants/index.cjs +0 -843
  3. package/dist/constants/index.cjs.map +1 -1
  4. package/dist/constants/index.d.cts +146 -5
  5. package/dist/constants/index.d.ts +146 -5
  6. package/dist/constants/index.js +0 -786
  7. package/dist/constants/index.js.map +1 -1
  8. package/dist/{platform-role-AHv1l5Og.d.cts → cvcEntry-wqktWfzE.d.cts} +231 -37
  9. package/dist/{platform-role-AHv1l5Og.d.ts → cvcEntry-wqktWfzE.d.ts} +231 -37
  10. package/dist/cvcs/index.cjs +2184 -0
  11. package/dist/cvcs/index.cjs.map +1 -0
  12. package/dist/cvcs/index.d.cts +2384 -0
  13. package/dist/cvcs/index.d.ts +2384 -0
  14. package/dist/cvcs/index.js +2154 -0
  15. package/dist/cvcs/index.js.map +1 -0
  16. package/dist/index--NCIPluF.d.cts +378 -0
  17. package/dist/index-CFOrHA8l.d.ts +378 -0
  18. package/dist/index.cjs +2962 -843
  19. package/dist/index.cjs.map +1 -1
  20. package/dist/index.d.cts +217 -3
  21. package/dist/index.d.ts +217 -3
  22. package/dist/index.js +2934 -786
  23. package/dist/index.js.map +1 -1
  24. package/dist/models/index.cjs +211 -0
  25. package/dist/models/index.cjs.map +1 -1
  26. package/dist/models/index.d.cts +3 -292
  27. package/dist/models/index.d.ts +3 -292
  28. package/dist/models/index.js +209 -0
  29. package/dist/models/index.js.map +1 -1
  30. package/dist/{platform-auth-BTbQIY3b.d.cts → platform-auth-C-G2qeGM.d.cts} +1 -297
  31. package/dist/{platform-auth-BTbQIY3b.d.ts → platform-auth-C-G2qeGM.d.ts} +1 -297
  32. package/dist/schemas/index.cjs +195 -729
  33. package/dist/schemas/index.cjs.map +1 -1
  34. package/dist/schemas/index.d.cts +11 -11
  35. package/dist/schemas/index.d.ts +11 -11
  36. package/dist/schemas/index.js +189 -729
  37. package/dist/schemas/index.js.map +1 -1
  38. package/dist/services/index.cjs +1442 -0
  39. package/dist/services/index.cjs.map +1 -0
  40. package/dist/services/index.d.cts +305 -0
  41. package/dist/services/index.d.ts +305 -0
  42. package/dist/services/index.js +1417 -0
  43. package/dist/services/index.js.map +1 -0
  44. package/dist/types/index.d.cts +2 -2
  45. package/dist/types/index.d.ts +2 -2
  46. package/dist/validation/index.cjs +261 -0
  47. package/dist/validation/index.cjs.map +1 -0
  48. package/dist/validation/index.d.cts +251 -0
  49. package/dist/validation/index.d.ts +251 -0
  50. package/dist/validation/index.js +228 -0
  51. package/dist/validation/index.js.map +1 -0
  52. package/package.json +36 -12
  53. package/src/__tests__/__snapshots__/cvc-sot.snap +22 -0
  54. package/src/__tests__/cvc-sot-snapshot.test.ts +184 -0
  55. package/src/__tests__/cvc-structural.test.ts +130 -0
  56. package/src/constants/ic.ts +0 -925
  57. package/src/constants/service-catalog.ts +146 -4
  58. package/src/cvcs/index.ts +31 -0
  59. package/src/cvcs/missingness.v1.0.0.json +50 -0
  60. package/src/cvcs/serviceCategories.v1.0.0.json +1947 -0
  61. package/src/cvcs/serviceMechanisms.v1.0.0.json +47 -0
  62. package/src/cvcs/serviceStates.v1.0.0.json +106 -0
  63. package/src/generated/cvc-enums.ts +215 -0
  64. package/src/index.ts +61 -1
  65. package/src/models/cvcEntryModel.ts +32 -0
  66. package/src/models/cvcRegistryModel.ts +35 -0
  67. package/src/models/index.ts +8 -0
  68. package/src/schemas/cvcEntry.ts +158 -0
  69. package/src/schemas/cvcRegistry.ts +149 -0
  70. package/src/schemas/index.ts +16 -0
  71. package/src/services/__tests__/cvcRegistryService.test.ts +614 -0
  72. package/src/services/cvcRegistryService.ts +729 -0
  73. package/src/services/index.ts +21 -0
  74. package/src/validation/cvc.ts +414 -0
  75. package/src/validation/index.ts +15 -0
@@ -1,6 +1,6 @@
1
1
  import * as mongoose from 'mongoose';
2
2
  import { InferRawDocType, Schema } from 'mongoose';
3
- export { C as Choice, F as Form, a as FormSectionRef, G as Guidance, L as Layout, P as PlatformFunction, b as PlatformRole, Q as Question, S as ScoringCondition, c as ScoringRecommendation, d as ScoringRule, e as ScoringThreshold, f as Section, g as SectionQuestionRef, V as VisibilityRule, h as buildFormSchema, i as buildPlatformFunctionSchema, j as buildPlatformRoleSchema, k as buildQuestionSchema, l as buildScoringRuleSchema, m as buildSectionSchema, n as choiceSchema, o as formSchemaDefinition, p as formSchemaOptions, q as formSectionRefSchema, r as guidanceSchema, s as layoutSchema, t as platformFunctionSchemaDefinition, u as platformFunctionSchemaOptions, v as platformRoleSchemaDefinition, w as platformRoleSchemaOptions, x as questionSchemaDefinition, y as questionSchemaOptions, z as scoringConditionSchema, A as scoringRecommendationSchema, B as scoringRuleSchemaDefinition, D as scoringRuleSchemaOptions, E as scoringThresholdSchema, H as sectionQuestionRefSchema, I as sectionSchemaDefinition, J as sectionSchemaOptions, K as visibilityRuleSchema } from '../platform-role-AHv1l5Og.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-wqktWfzE.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
- }, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
31
+ }, Omit<mongoose.DefaultSchemaOptions, "_id"> & {
32
32
  _id: false;
33
- }>> & Omit<{
33
+ }> & Omit<{
34
34
  formattedAddress?: string | null | undefined;
35
35
  street?: string | null | undefined;
36
36
  city?: string | null | undefined;
@@ -88,9 +88,9 @@ declare const personNameSchema: Schema<any, mongoose.Model<any, any, any, any, a
88
88
  isAnonymous?: boolean | null | undefined;
89
89
  }, {
90
90
  id: string;
91
- }, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
91
+ }, Omit<mongoose.DefaultSchemaOptions, "_id"> & {
92
92
  _id: false;
93
- }>> & Omit<{
93
+ }> & Omit<{
94
94
  alias?: boolean | null | undefined;
95
95
  firstName?: string | null | undefined;
96
96
  lastName?: string | null | undefined;
@@ -136,9 +136,9 @@ declare const phoneSchema: Schema<any, mongoose.Model<any, any, any, any, any, a
136
136
  dataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
137
137
  }, {
138
138
  id: string;
139
- }, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
139
+ }, Omit<mongoose.DefaultSchemaOptions, "_id"> & {
140
140
  _id: false;
141
- }>> & Omit<{
141
+ }> & Omit<{
142
142
  number?: string | null | undefined;
143
143
  type?: string | null | undefined;
144
144
  safeToContact?: boolean | null | undefined;
@@ -172,9 +172,9 @@ declare const emailSchema: Schema<any, mongoose.Model<any, any, any, any, any, a
172
172
  address?: string | null | undefined;
173
173
  }, {
174
174
  id: string;
175
- }, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
175
+ }, Omit<mongoose.DefaultSchemaOptions, "_id"> & {
176
176
  _id: false;
177
- }>> & Omit<{
177
+ }> & Omit<{
178
178
  type?: string | null | undefined;
179
179
  safeToContact?: boolean | null | undefined;
180
180
  address?: string | null | undefined;
@@ -246,9 +246,9 @@ declare const demographicsSchema: Schema<any, mongoose.Model<any, any, any, any,
246
246
  ethnicityDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
247
247
  }, {
248
248
  id: string;
249
- }, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
249
+ }, Omit<mongoose.DefaultSchemaOptions, "_id"> & {
250
250
  _id: false;
251
- }>> & Omit<{
251
+ }> & Omit<{
252
252
  race: number[];
253
253
  ethnicity: number[];
254
254
  accommodations: string[];
@@ -1,6 +1,6 @@
1
1
  import * as mongoose from 'mongoose';
2
2
  import { InferRawDocType, Schema } from 'mongoose';
3
- export { C as Choice, F as Form, a as FormSectionRef, G as Guidance, L as Layout, P as PlatformFunction, b as PlatformRole, Q as Question, S as ScoringCondition, c as ScoringRecommendation, d as ScoringRule, e as ScoringThreshold, f as Section, g as SectionQuestionRef, V as VisibilityRule, h as buildFormSchema, i as buildPlatformFunctionSchema, j as buildPlatformRoleSchema, k as buildQuestionSchema, l as buildScoringRuleSchema, m as buildSectionSchema, n as choiceSchema, o as formSchemaDefinition, p as formSchemaOptions, q as formSectionRefSchema, r as guidanceSchema, s as layoutSchema, t as platformFunctionSchemaDefinition, u as platformFunctionSchemaOptions, v as platformRoleSchemaDefinition, w as platformRoleSchemaOptions, x as questionSchemaDefinition, y as questionSchemaOptions, z as scoringConditionSchema, A as scoringRecommendationSchema, B as scoringRuleSchemaDefinition, D as scoringRuleSchemaOptions, E as scoringThresholdSchema, H as sectionQuestionRefSchema, I as sectionSchemaDefinition, J as sectionSchemaOptions, K as visibilityRuleSchema } from '../platform-role-AHv1l5Og.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-wqktWfzE.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
- }, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
31
+ }, Omit<mongoose.DefaultSchemaOptions, "_id"> & {
32
32
  _id: false;
33
- }>> & Omit<{
33
+ }> & Omit<{
34
34
  formattedAddress?: string | null | undefined;
35
35
  street?: string | null | undefined;
36
36
  city?: string | null | undefined;
@@ -88,9 +88,9 @@ declare const personNameSchema: Schema<any, mongoose.Model<any, any, any, any, a
88
88
  isAnonymous?: boolean | null | undefined;
89
89
  }, {
90
90
  id: string;
91
- }, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
91
+ }, Omit<mongoose.DefaultSchemaOptions, "_id"> & {
92
92
  _id: false;
93
- }>> & Omit<{
93
+ }> & Omit<{
94
94
  alias?: boolean | null | undefined;
95
95
  firstName?: string | null | undefined;
96
96
  lastName?: string | null | undefined;
@@ -136,9 +136,9 @@ declare const phoneSchema: Schema<any, mongoose.Model<any, any, any, any, any, a
136
136
  dataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
137
137
  }, {
138
138
  id: string;
139
- }, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
139
+ }, Omit<mongoose.DefaultSchemaOptions, "_id"> & {
140
140
  _id: false;
141
- }>> & Omit<{
141
+ }> & Omit<{
142
142
  number?: string | null | undefined;
143
143
  type?: string | null | undefined;
144
144
  safeToContact?: boolean | null | undefined;
@@ -172,9 +172,9 @@ declare const emailSchema: Schema<any, mongoose.Model<any, any, any, any, any, a
172
172
  address?: string | null | undefined;
173
173
  }, {
174
174
  id: string;
175
- }, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
175
+ }, Omit<mongoose.DefaultSchemaOptions, "_id"> & {
176
176
  _id: false;
177
- }>> & Omit<{
177
+ }> & Omit<{
178
178
  type?: string | null | undefined;
179
179
  safeToContact?: boolean | null | undefined;
180
180
  address?: string | null | undefined;
@@ -246,9 +246,9 @@ declare const demographicsSchema: Schema<any, mongoose.Model<any, any, any, any,
246
246
  ethnicityDataQuality?: "client_doesnt_know" | "client_prefers_not_to_answer" | "data_not_collected" | null | undefined;
247
247
  }, {
248
248
  id: string;
249
- }, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
249
+ }, Omit<mongoose.DefaultSchemaOptions, "_id"> & {
250
250
  _id: false;
251
- }>> & Omit<{
251
+ }> & Omit<{
252
252
  race: number[];
253
253
  ethnicity: number[];
254
254
  accommodations: string[];