@htilabs/platform-common-models 0.2.0-beta.4 → 0.4.0-beta.1
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 +2350 -0
- package/dist/cvcs/index.cjs.map +1 -0
- package/dist/cvcs/index.d.cts +2449 -0
- package/dist/cvcs/index.d.ts +2449 -0
- package/dist/cvcs/index.js +2321 -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 +3132 -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 +3106 -786
- package/dist/index.js.map +1 -1
- package/dist/models/index.cjs +212 -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 +210 -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 +196 -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 +190 -729
- package/dist/schemas/index.js.map +1 -1
- package/dist/services/index.cjs +1443 -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 +1418 -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 +254 -0
- package/dist/validation/index.cjs.map +1 -0
- package/dist/validation/index.d.cts +252 -0
- package/dist/validation/index.d.ts +252 -0
- package/dist/validation/index.js +221 -0
- package/dist/validation/index.js.map +1 -0
- package/package.json +36 -12
- package/src/__tests__/__snapshots__/cvc-sot.snap +18 -0
- package/src/__tests__/cvc-sot-snapshot.test.ts +184 -0
- package/src/__tests__/cvc-structural.test.ts +129 -0
- package/src/constants/ic.ts +0 -925
- package/src/constants/service-catalog.ts +146 -4
- package/src/cvcs/index.ts +30 -0
- package/src/cvcs/serviceCategories.v1.0.0.json +2077 -0
- package/src/cvcs/serviceMechanisms.v1.0.0.json +87 -0
- package/src/cvcs/serviceStates.v1.0.0.json +146 -0
- package/src/generated/cvc-enums.ts +213 -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 +159 -0
- package/src/schemas/cvcRegistry.ts +150 -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 +397 -0
- package/src/validation/index.ts +15 -0
package/dist/models/index.d.cts
CHANGED
|
@@ -1,292 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
type FormDoc = HydratedDocument<Form>;
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Compile the Form model on a specific connection.
|
|
9
|
-
* @param connection - Mongoose connection to bind the model to
|
|
10
|
-
* @param schema - Optional pre-built schema (uses buildFormSchema() if not provided)
|
|
11
|
-
* @returns Mongoose Model for Form
|
|
12
|
-
*/
|
|
13
|
-
declare function compileModel$5(connection: Connection, schema?: mongoose.Schema<any, Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
|
|
14
|
-
[x: number]: unknown;
|
|
15
|
-
[x: symbol]: unknown;
|
|
16
|
-
[x: string]: unknown;
|
|
17
|
-
}, mongoose.Document<unknown, {}, {
|
|
18
|
-
[x: number]: unknown;
|
|
19
|
-
[x: symbol]: unknown;
|
|
20
|
-
[x: string]: unknown;
|
|
21
|
-
}, {
|
|
22
|
-
id: string;
|
|
23
|
-
}, mongoose.DefaultSchemaOptions> & Omit<{
|
|
24
|
-
[x: number]: unknown;
|
|
25
|
-
[x: symbol]: unknown;
|
|
26
|
-
[x: string]: unknown;
|
|
27
|
-
} & Required<{
|
|
28
|
-
_id: unknown;
|
|
29
|
-
}> & {
|
|
30
|
-
__v: number;
|
|
31
|
-
}, "id"> & {
|
|
32
|
-
id: string;
|
|
33
|
-
}, unknown, {
|
|
34
|
-
[x: number]: {};
|
|
35
|
-
[x: symbol]: {};
|
|
36
|
-
[x: string]: {};
|
|
37
|
-
} & Required<{
|
|
38
|
-
_id: unknown;
|
|
39
|
-
}> & {
|
|
40
|
-
__v: number;
|
|
41
|
-
}>): Model<Form>;
|
|
42
|
-
|
|
43
|
-
type formModel_FormDoc = FormDoc;
|
|
44
|
-
declare namespace formModel {
|
|
45
|
-
export { type formModel_FormDoc as FormDoc, buildFormSchema as buildSchema, compileModel$5 as compileModel };
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
type SectionDoc = HydratedDocument<Section>;
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Compile the Section model on a specific connection.
|
|
52
|
-
* @param connection - Mongoose connection to bind the model to
|
|
53
|
-
* @param schema - Optional pre-built schema (uses buildSectionSchema() if not provided)
|
|
54
|
-
* @returns Mongoose Model for Section
|
|
55
|
-
*/
|
|
56
|
-
declare function compileModel$4(connection: Connection, schema?: mongoose.Schema<any, Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
|
|
57
|
-
[x: number]: unknown;
|
|
58
|
-
[x: symbol]: unknown;
|
|
59
|
-
[x: string]: unknown;
|
|
60
|
-
}, mongoose.Document<unknown, {}, {
|
|
61
|
-
[x: number]: unknown;
|
|
62
|
-
[x: symbol]: unknown;
|
|
63
|
-
[x: string]: unknown;
|
|
64
|
-
}, {
|
|
65
|
-
id: string;
|
|
66
|
-
}, mongoose.DefaultSchemaOptions> & Omit<{
|
|
67
|
-
[x: number]: unknown;
|
|
68
|
-
[x: symbol]: unknown;
|
|
69
|
-
[x: string]: unknown;
|
|
70
|
-
} & Required<{
|
|
71
|
-
_id: unknown;
|
|
72
|
-
}> & {
|
|
73
|
-
__v: number;
|
|
74
|
-
}, "id"> & {
|
|
75
|
-
id: string;
|
|
76
|
-
}, unknown, {
|
|
77
|
-
[x: number]: {};
|
|
78
|
-
[x: symbol]: {};
|
|
79
|
-
[x: string]: {};
|
|
80
|
-
} & Required<{
|
|
81
|
-
_id: unknown;
|
|
82
|
-
}> & {
|
|
83
|
-
__v: number;
|
|
84
|
-
}>): Model<Section>;
|
|
85
|
-
|
|
86
|
-
type sectionModel_SectionDoc = SectionDoc;
|
|
87
|
-
declare namespace sectionModel {
|
|
88
|
-
export { type sectionModel_SectionDoc as SectionDoc, buildSectionSchema as buildSchema, compileModel$4 as compileModel };
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
type QuestionDoc = HydratedDocument<Question>;
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Compile the Question model on a specific connection.
|
|
95
|
-
* @param connection - Mongoose connection to bind the model to
|
|
96
|
-
* @param schema - Optional pre-built schema (uses buildQuestionSchema() if not provided)
|
|
97
|
-
* @returns Mongoose Model for Question
|
|
98
|
-
*/
|
|
99
|
-
declare function compileModel$3(connection: Connection, schema?: mongoose.Schema<any, Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
|
|
100
|
-
[x: number]: unknown;
|
|
101
|
-
[x: symbol]: unknown;
|
|
102
|
-
[x: string]: unknown;
|
|
103
|
-
}, mongoose.Document<unknown, {}, {
|
|
104
|
-
[x: number]: unknown;
|
|
105
|
-
[x: symbol]: unknown;
|
|
106
|
-
[x: string]: unknown;
|
|
107
|
-
}, {
|
|
108
|
-
id: string;
|
|
109
|
-
}, mongoose.DefaultSchemaOptions> & Omit<{
|
|
110
|
-
[x: number]: unknown;
|
|
111
|
-
[x: symbol]: unknown;
|
|
112
|
-
[x: string]: unknown;
|
|
113
|
-
} & Required<{
|
|
114
|
-
_id: unknown;
|
|
115
|
-
}> & {
|
|
116
|
-
__v: number;
|
|
117
|
-
}, "id"> & {
|
|
118
|
-
id: string;
|
|
119
|
-
}, unknown, {
|
|
120
|
-
[x: number]: {};
|
|
121
|
-
[x: symbol]: {};
|
|
122
|
-
[x: string]: {};
|
|
123
|
-
} & Required<{
|
|
124
|
-
_id: unknown;
|
|
125
|
-
}> & {
|
|
126
|
-
__v: number;
|
|
127
|
-
}>): Model<Question>;
|
|
128
|
-
|
|
129
|
-
type questionModel_QuestionDoc = QuestionDoc;
|
|
130
|
-
declare namespace questionModel {
|
|
131
|
-
export { type questionModel_QuestionDoc as QuestionDoc, buildQuestionSchema as buildSchema, compileModel$3 as compileModel };
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
type ScoringRuleDoc = HydratedDocument<ScoringRule>;
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* Compile the ScoringRule model on a specific connection.
|
|
138
|
-
* @param connection - Mongoose connection to bind the model to
|
|
139
|
-
* @param schema - Optional pre-built schema (uses buildScoringRuleSchema() if not provided)
|
|
140
|
-
* @returns Mongoose Model for ScoringRule
|
|
141
|
-
*/
|
|
142
|
-
declare function compileModel$2(connection: Connection, schema?: mongoose.Schema<any, Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
|
|
143
|
-
[x: number]: unknown;
|
|
144
|
-
[x: symbol]: unknown;
|
|
145
|
-
[x: string]: unknown;
|
|
146
|
-
}, mongoose.Document<unknown, {}, {
|
|
147
|
-
[x: number]: unknown;
|
|
148
|
-
[x: symbol]: unknown;
|
|
149
|
-
[x: string]: unknown;
|
|
150
|
-
}, {
|
|
151
|
-
id: string;
|
|
152
|
-
}, mongoose.DefaultSchemaOptions> & Omit<{
|
|
153
|
-
[x: number]: unknown;
|
|
154
|
-
[x: symbol]: unknown;
|
|
155
|
-
[x: string]: unknown;
|
|
156
|
-
} & Required<{
|
|
157
|
-
_id: unknown;
|
|
158
|
-
}> & {
|
|
159
|
-
__v: number;
|
|
160
|
-
}, "id"> & {
|
|
161
|
-
id: string;
|
|
162
|
-
}, unknown, {
|
|
163
|
-
[x: number]: {};
|
|
164
|
-
[x: symbol]: {};
|
|
165
|
-
[x: string]: {};
|
|
166
|
-
} & Required<{
|
|
167
|
-
_id: unknown;
|
|
168
|
-
}> & {
|
|
169
|
-
__v: number;
|
|
170
|
-
}>): Model<ScoringRule>;
|
|
171
|
-
|
|
172
|
-
type scoringRuleModel_ScoringRuleDoc = ScoringRuleDoc;
|
|
173
|
-
declare namespace scoringRuleModel {
|
|
174
|
-
export { type scoringRuleModel_ScoringRuleDoc as ScoringRuleDoc, buildScoringRuleSchema as buildSchema, compileModel$2 as compileModel };
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
type PlatformFunctionDoc = HydratedDocument<PlatformFunction>;
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* Compile the PlatformFunction model on a specific connection.
|
|
181
|
-
* @param connection - Mongoose connection to bind the model to
|
|
182
|
-
* @param schema - Optional pre-built schema (uses buildPlatformFunctionSchema() if not provided)
|
|
183
|
-
* @returns Mongoose Model for PlatformFunction
|
|
184
|
-
*/
|
|
185
|
-
declare function compileModel$1(connection: Connection, schema?: mongoose.Schema<any, Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
|
|
186
|
-
[x: number]: unknown;
|
|
187
|
-
[x: symbol]: unknown;
|
|
188
|
-
[x: string]: unknown;
|
|
189
|
-
}, mongoose.Document<unknown, {}, {
|
|
190
|
-
[x: number]: unknown;
|
|
191
|
-
[x: symbol]: unknown;
|
|
192
|
-
[x: string]: unknown;
|
|
193
|
-
}, {
|
|
194
|
-
id: string;
|
|
195
|
-
}, mongoose.DefaultSchemaOptions> & Omit<{
|
|
196
|
-
[x: number]: unknown;
|
|
197
|
-
[x: symbol]: unknown;
|
|
198
|
-
[x: string]: unknown;
|
|
199
|
-
} & Required<{
|
|
200
|
-
_id: unknown;
|
|
201
|
-
}> & {
|
|
202
|
-
__v: number;
|
|
203
|
-
}, "id"> & {
|
|
204
|
-
id: string;
|
|
205
|
-
}, unknown, {
|
|
206
|
-
[x: number]: {};
|
|
207
|
-
[x: symbol]: {};
|
|
208
|
-
[x: string]: {};
|
|
209
|
-
} & Required<{
|
|
210
|
-
_id: unknown;
|
|
211
|
-
}> & {
|
|
212
|
-
__v: number;
|
|
213
|
-
}>): Model<PlatformFunction>;
|
|
214
|
-
|
|
215
|
-
type platformFunctionModel_PlatformFunctionDoc = PlatformFunctionDoc;
|
|
216
|
-
declare namespace platformFunctionModel {
|
|
217
|
-
export { type platformFunctionModel_PlatformFunctionDoc as PlatformFunctionDoc, buildPlatformFunctionSchema as buildSchema, compileModel$1 as compileModel };
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
type PlatformRoleDoc = HydratedDocument<PlatformRole>;
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* Compile the PlatformRole model on a specific connection.
|
|
224
|
-
* @param connection - Mongoose connection to bind the model to
|
|
225
|
-
* @param schema - Optional pre-built schema (uses buildPlatformRoleSchema() if not provided)
|
|
226
|
-
* @returns Mongoose Model for PlatformRole
|
|
227
|
-
*/
|
|
228
|
-
declare function compileModel(connection: Connection, schema?: mongoose.Schema<any, Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
|
|
229
|
-
[x: number]: unknown;
|
|
230
|
-
[x: symbol]: unknown;
|
|
231
|
-
[x: string]: unknown;
|
|
232
|
-
}, mongoose.Document<unknown, {}, {
|
|
233
|
-
[x: number]: unknown;
|
|
234
|
-
[x: symbol]: unknown;
|
|
235
|
-
[x: string]: unknown;
|
|
236
|
-
}, {
|
|
237
|
-
id: string;
|
|
238
|
-
}, mongoose.DefaultSchemaOptions> & Omit<{
|
|
239
|
-
[x: number]: unknown;
|
|
240
|
-
[x: symbol]: unknown;
|
|
241
|
-
[x: string]: unknown;
|
|
242
|
-
} & Required<{
|
|
243
|
-
_id: unknown;
|
|
244
|
-
}> & {
|
|
245
|
-
__v: number;
|
|
246
|
-
}, "id"> & {
|
|
247
|
-
id: string;
|
|
248
|
-
}, unknown, {
|
|
249
|
-
[x: number]: {};
|
|
250
|
-
[x: symbol]: {};
|
|
251
|
-
[x: string]: {};
|
|
252
|
-
} & Required<{
|
|
253
|
-
_id: unknown;
|
|
254
|
-
}> & {
|
|
255
|
-
__v: number;
|
|
256
|
-
}>): Model<PlatformRole>;
|
|
257
|
-
|
|
258
|
-
type platformRoleModel_PlatformRoleDoc = PlatformRoleDoc;
|
|
259
|
-
declare const platformRoleModel_compileModel: typeof compileModel;
|
|
260
|
-
declare namespace platformRoleModel {
|
|
261
|
-
export { type platformRoleModel_PlatformRoleDoc as PlatformRoleDoc, buildPlatformRoleSchema as buildSchema, platformRoleModel_compileModel as compileModel };
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
/**
|
|
265
|
-
* Platform models interface returned by createPlatformModels.
|
|
266
|
-
*/
|
|
267
|
-
interface PlatformModels {
|
|
268
|
-
FormModel: Model<Form>;
|
|
269
|
-
SectionModel: Model<Section>;
|
|
270
|
-
QuestionModel: Model<Question>;
|
|
271
|
-
ScoringRuleModel: Model<ScoringRule>;
|
|
272
|
-
PlatformFunctionModel: Model<PlatformFunction>;
|
|
273
|
-
PlatformRoleModel: Model<PlatformRole>;
|
|
274
|
-
}
|
|
275
|
-
/**
|
|
276
|
-
* Create all platform models bound to a single connection.
|
|
277
|
-
* Convenience function for apps that need all form-related models.
|
|
278
|
-
*
|
|
279
|
-
* @param connection - Mongoose connection to bind all models to
|
|
280
|
-
* @returns Object with all compiled models
|
|
281
|
-
*
|
|
282
|
-
* @example
|
|
283
|
-
* ```typescript
|
|
284
|
-
* const platformDb = mongoose.createConnection(PLATFORM_DB_URI);
|
|
285
|
-
* const { FormModel, SectionModel, QuestionModel, ScoringRuleModel } = createPlatformModels(platformDb);
|
|
286
|
-
*
|
|
287
|
-
* const forms = await FormModel.find({ status: 'active' });
|
|
288
|
-
* ```
|
|
289
|
-
*/
|
|
290
|
-
declare function createPlatformModels(connection: Connection): PlatformModels;
|
|
291
|
-
|
|
292
|
-
export { Form, type FormDoc, PlatformFunction, type PlatformFunctionDoc, type PlatformModels, PlatformRole, type PlatformRoleDoc, Question, type QuestionDoc, ScoringRule, type ScoringRuleDoc, Section, type SectionDoc, createPlatformModels, formModel, platformFunctionModel, platformRoleModel, questionModel, scoringRuleModel, sectionModel };
|
|
1
|
+
export { a as CvcEntry, b as CvcRegistry, F as Form, P as PlatformFunction, d as PlatformRole, Q as Question, f as ScoringRule, h as Section } from '../cvcEntry-wqktWfzE.cjs';
|
|
2
|
+
import 'mongoose';
|
|
3
|
+
export { C as CvcEntryDoc, a as CvcRegistryDoc, F as FormDoc, P as PlatformFunctionDoc, b as PlatformModels, c as PlatformRoleDoc, Q as QuestionDoc, S as ScoringRuleDoc, d as SectionDoc, g as createPlatformModels, h as cvcEntryModel, i as cvcRegistryModel, j as formModel, p as platformFunctionModel, k as platformRoleModel, q as questionModel, s as scoringRuleModel, l as sectionModel } from '../index--NCIPluF.cjs';
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1,292 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
type FormDoc = HydratedDocument<Form>;
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Compile the Form model on a specific connection.
|
|
9
|
-
* @param connection - Mongoose connection to bind the model to
|
|
10
|
-
* @param schema - Optional pre-built schema (uses buildFormSchema() if not provided)
|
|
11
|
-
* @returns Mongoose Model for Form
|
|
12
|
-
*/
|
|
13
|
-
declare function compileModel$5(connection: Connection, schema?: mongoose.Schema<any, Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
|
|
14
|
-
[x: number]: unknown;
|
|
15
|
-
[x: symbol]: unknown;
|
|
16
|
-
[x: string]: unknown;
|
|
17
|
-
}, mongoose.Document<unknown, {}, {
|
|
18
|
-
[x: number]: unknown;
|
|
19
|
-
[x: symbol]: unknown;
|
|
20
|
-
[x: string]: unknown;
|
|
21
|
-
}, {
|
|
22
|
-
id: string;
|
|
23
|
-
}, mongoose.DefaultSchemaOptions> & Omit<{
|
|
24
|
-
[x: number]: unknown;
|
|
25
|
-
[x: symbol]: unknown;
|
|
26
|
-
[x: string]: unknown;
|
|
27
|
-
} & Required<{
|
|
28
|
-
_id: unknown;
|
|
29
|
-
}> & {
|
|
30
|
-
__v: number;
|
|
31
|
-
}, "id"> & {
|
|
32
|
-
id: string;
|
|
33
|
-
}, unknown, {
|
|
34
|
-
[x: number]: {};
|
|
35
|
-
[x: symbol]: {};
|
|
36
|
-
[x: string]: {};
|
|
37
|
-
} & Required<{
|
|
38
|
-
_id: unknown;
|
|
39
|
-
}> & {
|
|
40
|
-
__v: number;
|
|
41
|
-
}>): Model<Form>;
|
|
42
|
-
|
|
43
|
-
type formModel_FormDoc = FormDoc;
|
|
44
|
-
declare namespace formModel {
|
|
45
|
-
export { type formModel_FormDoc as FormDoc, buildFormSchema as buildSchema, compileModel$5 as compileModel };
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
type SectionDoc = HydratedDocument<Section>;
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Compile the Section model on a specific connection.
|
|
52
|
-
* @param connection - Mongoose connection to bind the model to
|
|
53
|
-
* @param schema - Optional pre-built schema (uses buildSectionSchema() if not provided)
|
|
54
|
-
* @returns Mongoose Model for Section
|
|
55
|
-
*/
|
|
56
|
-
declare function compileModel$4(connection: Connection, schema?: mongoose.Schema<any, Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
|
|
57
|
-
[x: number]: unknown;
|
|
58
|
-
[x: symbol]: unknown;
|
|
59
|
-
[x: string]: unknown;
|
|
60
|
-
}, mongoose.Document<unknown, {}, {
|
|
61
|
-
[x: number]: unknown;
|
|
62
|
-
[x: symbol]: unknown;
|
|
63
|
-
[x: string]: unknown;
|
|
64
|
-
}, {
|
|
65
|
-
id: string;
|
|
66
|
-
}, mongoose.DefaultSchemaOptions> & Omit<{
|
|
67
|
-
[x: number]: unknown;
|
|
68
|
-
[x: symbol]: unknown;
|
|
69
|
-
[x: string]: unknown;
|
|
70
|
-
} & Required<{
|
|
71
|
-
_id: unknown;
|
|
72
|
-
}> & {
|
|
73
|
-
__v: number;
|
|
74
|
-
}, "id"> & {
|
|
75
|
-
id: string;
|
|
76
|
-
}, unknown, {
|
|
77
|
-
[x: number]: {};
|
|
78
|
-
[x: symbol]: {};
|
|
79
|
-
[x: string]: {};
|
|
80
|
-
} & Required<{
|
|
81
|
-
_id: unknown;
|
|
82
|
-
}> & {
|
|
83
|
-
__v: number;
|
|
84
|
-
}>): Model<Section>;
|
|
85
|
-
|
|
86
|
-
type sectionModel_SectionDoc = SectionDoc;
|
|
87
|
-
declare namespace sectionModel {
|
|
88
|
-
export { type sectionModel_SectionDoc as SectionDoc, buildSectionSchema as buildSchema, compileModel$4 as compileModel };
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
type QuestionDoc = HydratedDocument<Question>;
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Compile the Question model on a specific connection.
|
|
95
|
-
* @param connection - Mongoose connection to bind the model to
|
|
96
|
-
* @param schema - Optional pre-built schema (uses buildQuestionSchema() if not provided)
|
|
97
|
-
* @returns Mongoose Model for Question
|
|
98
|
-
*/
|
|
99
|
-
declare function compileModel$3(connection: Connection, schema?: mongoose.Schema<any, Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
|
|
100
|
-
[x: number]: unknown;
|
|
101
|
-
[x: symbol]: unknown;
|
|
102
|
-
[x: string]: unknown;
|
|
103
|
-
}, mongoose.Document<unknown, {}, {
|
|
104
|
-
[x: number]: unknown;
|
|
105
|
-
[x: symbol]: unknown;
|
|
106
|
-
[x: string]: unknown;
|
|
107
|
-
}, {
|
|
108
|
-
id: string;
|
|
109
|
-
}, mongoose.DefaultSchemaOptions> & Omit<{
|
|
110
|
-
[x: number]: unknown;
|
|
111
|
-
[x: symbol]: unknown;
|
|
112
|
-
[x: string]: unknown;
|
|
113
|
-
} & Required<{
|
|
114
|
-
_id: unknown;
|
|
115
|
-
}> & {
|
|
116
|
-
__v: number;
|
|
117
|
-
}, "id"> & {
|
|
118
|
-
id: string;
|
|
119
|
-
}, unknown, {
|
|
120
|
-
[x: number]: {};
|
|
121
|
-
[x: symbol]: {};
|
|
122
|
-
[x: string]: {};
|
|
123
|
-
} & Required<{
|
|
124
|
-
_id: unknown;
|
|
125
|
-
}> & {
|
|
126
|
-
__v: number;
|
|
127
|
-
}>): Model<Question>;
|
|
128
|
-
|
|
129
|
-
type questionModel_QuestionDoc = QuestionDoc;
|
|
130
|
-
declare namespace questionModel {
|
|
131
|
-
export { type questionModel_QuestionDoc as QuestionDoc, buildQuestionSchema as buildSchema, compileModel$3 as compileModel };
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
type ScoringRuleDoc = HydratedDocument<ScoringRule>;
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* Compile the ScoringRule model on a specific connection.
|
|
138
|
-
* @param connection - Mongoose connection to bind the model to
|
|
139
|
-
* @param schema - Optional pre-built schema (uses buildScoringRuleSchema() if not provided)
|
|
140
|
-
* @returns Mongoose Model for ScoringRule
|
|
141
|
-
*/
|
|
142
|
-
declare function compileModel$2(connection: Connection, schema?: mongoose.Schema<any, Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
|
|
143
|
-
[x: number]: unknown;
|
|
144
|
-
[x: symbol]: unknown;
|
|
145
|
-
[x: string]: unknown;
|
|
146
|
-
}, mongoose.Document<unknown, {}, {
|
|
147
|
-
[x: number]: unknown;
|
|
148
|
-
[x: symbol]: unknown;
|
|
149
|
-
[x: string]: unknown;
|
|
150
|
-
}, {
|
|
151
|
-
id: string;
|
|
152
|
-
}, mongoose.DefaultSchemaOptions> & Omit<{
|
|
153
|
-
[x: number]: unknown;
|
|
154
|
-
[x: symbol]: unknown;
|
|
155
|
-
[x: string]: unknown;
|
|
156
|
-
} & Required<{
|
|
157
|
-
_id: unknown;
|
|
158
|
-
}> & {
|
|
159
|
-
__v: number;
|
|
160
|
-
}, "id"> & {
|
|
161
|
-
id: string;
|
|
162
|
-
}, unknown, {
|
|
163
|
-
[x: number]: {};
|
|
164
|
-
[x: symbol]: {};
|
|
165
|
-
[x: string]: {};
|
|
166
|
-
} & Required<{
|
|
167
|
-
_id: unknown;
|
|
168
|
-
}> & {
|
|
169
|
-
__v: number;
|
|
170
|
-
}>): Model<ScoringRule>;
|
|
171
|
-
|
|
172
|
-
type scoringRuleModel_ScoringRuleDoc = ScoringRuleDoc;
|
|
173
|
-
declare namespace scoringRuleModel {
|
|
174
|
-
export { type scoringRuleModel_ScoringRuleDoc as ScoringRuleDoc, buildScoringRuleSchema as buildSchema, compileModel$2 as compileModel };
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
type PlatformFunctionDoc = HydratedDocument<PlatformFunction>;
|
|
178
|
-
|
|
179
|
-
/**
|
|
180
|
-
* Compile the PlatformFunction model on a specific connection.
|
|
181
|
-
* @param connection - Mongoose connection to bind the model to
|
|
182
|
-
* @param schema - Optional pre-built schema (uses buildPlatformFunctionSchema() if not provided)
|
|
183
|
-
* @returns Mongoose Model for PlatformFunction
|
|
184
|
-
*/
|
|
185
|
-
declare function compileModel$1(connection: Connection, schema?: mongoose.Schema<any, Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
|
|
186
|
-
[x: number]: unknown;
|
|
187
|
-
[x: symbol]: unknown;
|
|
188
|
-
[x: string]: unknown;
|
|
189
|
-
}, mongoose.Document<unknown, {}, {
|
|
190
|
-
[x: number]: unknown;
|
|
191
|
-
[x: symbol]: unknown;
|
|
192
|
-
[x: string]: unknown;
|
|
193
|
-
}, {
|
|
194
|
-
id: string;
|
|
195
|
-
}, mongoose.DefaultSchemaOptions> & Omit<{
|
|
196
|
-
[x: number]: unknown;
|
|
197
|
-
[x: symbol]: unknown;
|
|
198
|
-
[x: string]: unknown;
|
|
199
|
-
} & Required<{
|
|
200
|
-
_id: unknown;
|
|
201
|
-
}> & {
|
|
202
|
-
__v: number;
|
|
203
|
-
}, "id"> & {
|
|
204
|
-
id: string;
|
|
205
|
-
}, unknown, {
|
|
206
|
-
[x: number]: {};
|
|
207
|
-
[x: symbol]: {};
|
|
208
|
-
[x: string]: {};
|
|
209
|
-
} & Required<{
|
|
210
|
-
_id: unknown;
|
|
211
|
-
}> & {
|
|
212
|
-
__v: number;
|
|
213
|
-
}>): Model<PlatformFunction>;
|
|
214
|
-
|
|
215
|
-
type platformFunctionModel_PlatformFunctionDoc = PlatformFunctionDoc;
|
|
216
|
-
declare namespace platformFunctionModel {
|
|
217
|
-
export { type platformFunctionModel_PlatformFunctionDoc as PlatformFunctionDoc, buildPlatformFunctionSchema as buildSchema, compileModel$1 as compileModel };
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
type PlatformRoleDoc = HydratedDocument<PlatformRole>;
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* Compile the PlatformRole model on a specific connection.
|
|
224
|
-
* @param connection - Mongoose connection to bind the model to
|
|
225
|
-
* @param schema - Optional pre-built schema (uses buildPlatformRoleSchema() if not provided)
|
|
226
|
-
* @returns Mongoose Model for PlatformRole
|
|
227
|
-
*/
|
|
228
|
-
declare function compileModel(connection: Connection, schema?: mongoose.Schema<any, Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
|
|
229
|
-
[x: number]: unknown;
|
|
230
|
-
[x: symbol]: unknown;
|
|
231
|
-
[x: string]: unknown;
|
|
232
|
-
}, mongoose.Document<unknown, {}, {
|
|
233
|
-
[x: number]: unknown;
|
|
234
|
-
[x: symbol]: unknown;
|
|
235
|
-
[x: string]: unknown;
|
|
236
|
-
}, {
|
|
237
|
-
id: string;
|
|
238
|
-
}, mongoose.DefaultSchemaOptions> & Omit<{
|
|
239
|
-
[x: number]: unknown;
|
|
240
|
-
[x: symbol]: unknown;
|
|
241
|
-
[x: string]: unknown;
|
|
242
|
-
} & Required<{
|
|
243
|
-
_id: unknown;
|
|
244
|
-
}> & {
|
|
245
|
-
__v: number;
|
|
246
|
-
}, "id"> & {
|
|
247
|
-
id: string;
|
|
248
|
-
}, unknown, {
|
|
249
|
-
[x: number]: {};
|
|
250
|
-
[x: symbol]: {};
|
|
251
|
-
[x: string]: {};
|
|
252
|
-
} & Required<{
|
|
253
|
-
_id: unknown;
|
|
254
|
-
}> & {
|
|
255
|
-
__v: number;
|
|
256
|
-
}>): Model<PlatformRole>;
|
|
257
|
-
|
|
258
|
-
type platformRoleModel_PlatformRoleDoc = PlatformRoleDoc;
|
|
259
|
-
declare const platformRoleModel_compileModel: typeof compileModel;
|
|
260
|
-
declare namespace platformRoleModel {
|
|
261
|
-
export { type platformRoleModel_PlatformRoleDoc as PlatformRoleDoc, buildPlatformRoleSchema as buildSchema, platformRoleModel_compileModel as compileModel };
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
/**
|
|
265
|
-
* Platform models interface returned by createPlatformModels.
|
|
266
|
-
*/
|
|
267
|
-
interface PlatformModels {
|
|
268
|
-
FormModel: Model<Form>;
|
|
269
|
-
SectionModel: Model<Section>;
|
|
270
|
-
QuestionModel: Model<Question>;
|
|
271
|
-
ScoringRuleModel: Model<ScoringRule>;
|
|
272
|
-
PlatformFunctionModel: Model<PlatformFunction>;
|
|
273
|
-
PlatformRoleModel: Model<PlatformRole>;
|
|
274
|
-
}
|
|
275
|
-
/**
|
|
276
|
-
* Create all platform models bound to a single connection.
|
|
277
|
-
* Convenience function for apps that need all form-related models.
|
|
278
|
-
*
|
|
279
|
-
* @param connection - Mongoose connection to bind all models to
|
|
280
|
-
* @returns Object with all compiled models
|
|
281
|
-
*
|
|
282
|
-
* @example
|
|
283
|
-
* ```typescript
|
|
284
|
-
* const platformDb = mongoose.createConnection(PLATFORM_DB_URI);
|
|
285
|
-
* const { FormModel, SectionModel, QuestionModel, ScoringRuleModel } = createPlatformModels(platformDb);
|
|
286
|
-
*
|
|
287
|
-
* const forms = await FormModel.find({ status: 'active' });
|
|
288
|
-
* ```
|
|
289
|
-
*/
|
|
290
|
-
declare function createPlatformModels(connection: Connection): PlatformModels;
|
|
291
|
-
|
|
292
|
-
export { Form, type FormDoc, PlatformFunction, type PlatformFunctionDoc, type PlatformModels, PlatformRole, type PlatformRoleDoc, Question, type QuestionDoc, ScoringRule, type ScoringRuleDoc, Section, type SectionDoc, createPlatformModels, formModel, platformFunctionModel, platformRoleModel, questionModel, scoringRuleModel, sectionModel };
|
|
1
|
+
export { a as CvcEntry, b as CvcRegistry, F as Form, P as PlatformFunction, d as PlatformRole, Q as Question, f as ScoringRule, h as Section } from '../cvcEntry-wqktWfzE.js';
|
|
2
|
+
import 'mongoose';
|
|
3
|
+
export { C as CvcEntryDoc, a as CvcRegistryDoc, F as FormDoc, P as PlatformFunctionDoc, b as PlatformModels, c as PlatformRoleDoc, Q as QuestionDoc, S as ScoringRuleDoc, d as SectionDoc, g as createPlatformModels, h as cvcEntryModel, i as cvcRegistryModel, j as formModel, p as platformFunctionModel, k as platformRoleModel, q as questionModel, s as scoringRuleModel, l as sectionModel } from '../index-CFOrHA8l.js';
|