@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.
- package/README.md +38 -0
- package/dist/constants/index.cjs +0 -843
- package/dist/constants/index.cjs.map +1 -1
- package/dist/constants/index.d.cts +146 -5
- package/dist/constants/index.d.ts +146 -5
- package/dist/constants/index.js +0 -786
- package/dist/constants/index.js.map +1 -1
- package/dist/{platform-role-AHv1l5Og.d.cts → cvcEntry-wqktWfzE.d.cts} +231 -37
- package/dist/{platform-role-AHv1l5Og.d.ts → cvcEntry-wqktWfzE.d.ts} +231 -37
- package/dist/cvcs/index.cjs +2184 -0
- package/dist/cvcs/index.cjs.map +1 -0
- package/dist/cvcs/index.d.cts +2384 -0
- package/dist/cvcs/index.d.ts +2384 -0
- package/dist/cvcs/index.js +2154 -0
- package/dist/cvcs/index.js.map +1 -0
- package/dist/index--NCIPluF.d.cts +378 -0
- package/dist/index-CFOrHA8l.d.ts +378 -0
- package/dist/index.cjs +2962 -843
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +217 -3
- package/dist/index.d.ts +217 -3
- package/dist/index.js +2934 -786
- package/dist/index.js.map +1 -1
- package/dist/models/index.cjs +211 -0
- package/dist/models/index.cjs.map +1 -1
- package/dist/models/index.d.cts +3 -292
- package/dist/models/index.d.ts +3 -292
- package/dist/models/index.js +209 -0
- package/dist/models/index.js.map +1 -1
- package/dist/{platform-auth-BTbQIY3b.d.cts → platform-auth-C-G2qeGM.d.cts} +1 -297
- package/dist/{platform-auth-BTbQIY3b.d.ts → platform-auth-C-G2qeGM.d.ts} +1 -297
- package/dist/schemas/index.cjs +195 -729
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +11 -11
- package/dist/schemas/index.d.ts +11 -11
- package/dist/schemas/index.js +189 -729
- package/dist/schemas/index.js.map +1 -1
- package/dist/services/index.cjs +1442 -0
- package/dist/services/index.cjs.map +1 -0
- package/dist/services/index.d.cts +305 -0
- package/dist/services/index.d.ts +305 -0
- package/dist/services/index.js +1417 -0
- package/dist/services/index.js.map +1 -0
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/validation/index.cjs +261 -0
- package/dist/validation/index.cjs.map +1 -0
- package/dist/validation/index.d.cts +251 -0
- package/dist/validation/index.d.ts +251 -0
- package/dist/validation/index.js +228 -0
- package/dist/validation/index.js.map +1 -0
- package/package.json +36 -12
- package/src/__tests__/__snapshots__/cvc-sot.snap +22 -0
- package/src/__tests__/cvc-sot-snapshot.test.ts +184 -0
- package/src/__tests__/cvc-structural.test.ts +130 -0
- package/src/constants/ic.ts +0 -925
- package/src/constants/service-catalog.ts +146 -4
- package/src/cvcs/index.ts +31 -0
- package/src/cvcs/missingness.v1.0.0.json +50 -0
- package/src/cvcs/serviceCategories.v1.0.0.json +1947 -0
- package/src/cvcs/serviceMechanisms.v1.0.0.json +47 -0
- package/src/cvcs/serviceStates.v1.0.0.json +106 -0
- package/src/generated/cvc-enums.ts +215 -0
- package/src/index.ts +61 -1
- package/src/models/cvcEntryModel.ts +32 -0
- package/src/models/cvcRegistryModel.ts +35 -0
- package/src/models/index.ts +8 -0
- package/src/schemas/cvcEntry.ts +158 -0
- package/src/schemas/cvcRegistry.ts +149 -0
- package/src/schemas/index.ts +16 -0
- package/src/services/__tests__/cvcRegistryService.test.ts +614 -0
- package/src/services/cvcRegistryService.ts +729 -0
- package/src/services/index.ts +21 -0
- package/src/validation/cvc.ts +414 -0
- package/src/validation/index.ts +15 -0
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, F as Form,
|
|
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
|
-
},
|
|
31
|
+
}, Omit<mongoose.DefaultSchemaOptions, "_id"> & {
|
|
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;
|
|
@@ -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
|
-
},
|
|
91
|
+
}, Omit<mongoose.DefaultSchemaOptions, "_id"> & {
|
|
92
92
|
_id: false;
|
|
93
|
-
}
|
|
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
|
-
},
|
|
139
|
+
}, Omit<mongoose.DefaultSchemaOptions, "_id"> & {
|
|
140
140
|
_id: false;
|
|
141
|
-
}
|
|
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
|
-
},
|
|
175
|
+
}, Omit<mongoose.DefaultSchemaOptions, "_id"> & {
|
|
176
176
|
_id: false;
|
|
177
|
-
}
|
|
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
|
-
},
|
|
249
|
+
}, Omit<mongoose.DefaultSchemaOptions, "_id"> & {
|
|
250
250
|
_id: false;
|
|
251
|
-
}
|
|
251
|
+
}> & Omit<{
|
|
252
252
|
race: number[];
|
|
253
253
|
ethnicity: number[];
|
|
254
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, F as Form,
|
|
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
|
-
},
|
|
31
|
+
}, Omit<mongoose.DefaultSchemaOptions, "_id"> & {
|
|
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;
|
|
@@ -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
|
-
},
|
|
91
|
+
}, Omit<mongoose.DefaultSchemaOptions, "_id"> & {
|
|
92
92
|
_id: false;
|
|
93
|
-
}
|
|
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
|
-
},
|
|
139
|
+
}, Omit<mongoose.DefaultSchemaOptions, "_id"> & {
|
|
140
140
|
_id: false;
|
|
141
|
-
}
|
|
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
|
-
},
|
|
175
|
+
}, Omit<mongoose.DefaultSchemaOptions, "_id"> & {
|
|
176
176
|
_id: false;
|
|
177
|
-
}
|
|
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
|
-
},
|
|
249
|
+
}, Omit<mongoose.DefaultSchemaOptions, "_id"> & {
|
|
250
250
|
_id: false;
|
|
251
|
-
}
|
|
251
|
+
}> & Omit<{
|
|
252
252
|
race: number[];
|
|
253
253
|
ethnicity: number[];
|
|
254
254
|
accommodations: string[];
|