@htilabs/platform-common-models 0.1.0-beta.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 (48) hide show
  1. package/dist/constants/index.cjs +1379 -0
  2. package/dist/constants/index.cjs.map +1 -0
  3. package/dist/constants/index.d.cts +528 -0
  4. package/dist/constants/index.d.ts +528 -0
  5. package/dist/constants/index.js +1252 -0
  6. package/dist/constants/index.js.map +1 -0
  7. package/dist/index.cjs +2138 -0
  8. package/dist/index.cjs.map +1 -0
  9. package/dist/index.d.cts +5 -0
  10. package/dist/index.d.ts +5 -0
  11. package/dist/index.js +1986 -0
  12. package/dist/index.js.map +1 -0
  13. package/dist/models/index.cjs +661 -0
  14. package/dist/models/index.cjs.map +1 -0
  15. package/dist/models/index.d.cts +204 -0
  16. package/dist/models/index.d.ts +204 -0
  17. package/dist/models/index.js +636 -0
  18. package/dist/models/index.js.map +1 -0
  19. package/dist/schemas/index.cjs +1405 -0
  20. package/dist/schemas/index.cjs.map +1 -0
  21. package/dist/schemas/index.d.cts +312 -0
  22. package/dist/schemas/index.d.ts +312 -0
  23. package/dist/schemas/index.js +1353 -0
  24. package/dist/schemas/index.js.map +1 -0
  25. package/dist/scoring-rule-BOkG46I3.d.cts +1179 -0
  26. package/dist/scoring-rule-BOkG46I3.d.ts +1179 -0
  27. package/dist/types/index.cjs +19 -0
  28. package/dist/types/index.cjs.map +1 -0
  29. package/dist/types/index.d.cts +1 -0
  30. package/dist/types/index.d.ts +1 -0
  31. package/dist/types/index.js +1 -0
  32. package/dist/types/index.js.map +1 -0
  33. package/package.json +81 -0
  34. package/src/constants/ic.ts +1630 -0
  35. package/src/constants/index.ts +11 -0
  36. package/src/index.ts +30 -0
  37. package/src/models/formModel.ts +30 -0
  38. package/src/models/index.ts +72 -0
  39. package/src/models/questionModel.ts +30 -0
  40. package/src/models/scoringRuleModel.ts +33 -0
  41. package/src/models/sectionModel.ts +30 -0
  42. package/src/schemas/common.ts +118 -0
  43. package/src/schemas/form.ts +125 -0
  44. package/src/schemas/index.ts +70 -0
  45. package/src/schemas/question.ts +297 -0
  46. package/src/schemas/scoring-rule.ts +169 -0
  47. package/src/schemas/section.ts +158 -0
  48. package/src/types/index.ts +47 -0
@@ -0,0 +1,1179 @@
1
+ import * as mongoose from 'mongoose';
2
+ import { InferRawDocType, Schema } from 'mongoose';
3
+
4
+ declare const formSectionRefSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
5
+ _id: false;
6
+ }, {
7
+ index: number;
8
+ sectionId: string;
9
+ sectionVersion: string;
10
+ isStep: boolean;
11
+ wizardStep?: number | null | undefined;
12
+ label?: string | null | undefined;
13
+ presetsType?: string | null | undefined;
14
+ }, mongoose.Document<unknown, {}, {
15
+ index: number;
16
+ sectionId: string;
17
+ sectionVersion: string;
18
+ isStep: boolean;
19
+ wizardStep?: number | null | undefined;
20
+ label?: string | null | undefined;
21
+ presetsType?: string | null | undefined;
22
+ }, {
23
+ id: string;
24
+ }, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
25
+ _id: false;
26
+ }>> & Omit<{
27
+ index: number;
28
+ sectionId: string;
29
+ sectionVersion: string;
30
+ isStep: boolean;
31
+ wizardStep?: number | null | undefined;
32
+ label?: string | null | undefined;
33
+ presetsType?: string | null | undefined;
34
+ } & {
35
+ _id: mongoose.Types.ObjectId;
36
+ } & {
37
+ __v: number;
38
+ }, "id"> & {
39
+ id: string;
40
+ }, unknown, {
41
+ index: number;
42
+ sectionId: string;
43
+ sectionVersion: string;
44
+ isStep: boolean;
45
+ wizardStep?: number | null | undefined;
46
+ label?: string | null | undefined;
47
+ presetsType?: string | null | undefined;
48
+ } & {
49
+ _id: mongoose.Types.ObjectId;
50
+ } & {
51
+ __v: number;
52
+ }>;
53
+ type FormSectionRef = InferRawDocType<typeof formSectionRefSchema>;
54
+ declare const formSchemaDefinition: {
55
+ _schemaVersion: {
56
+ type: NumberConstructor;
57
+ required: boolean;
58
+ default: number;
59
+ };
60
+ createdUser: {
61
+ type: typeof Schema.Types.ObjectId;
62
+ required: boolean;
63
+ index: boolean;
64
+ };
65
+ updatedUser: {
66
+ type: typeof Schema.Types.ObjectId;
67
+ index: boolean;
68
+ };
69
+ key: {
70
+ type: StringConstructor;
71
+ required: boolean;
72
+ };
73
+ version: {
74
+ type: StringConstructor;
75
+ required: boolean;
76
+ };
77
+ name: {
78
+ type: StringConstructor;
79
+ required: boolean;
80
+ };
81
+ description: {
82
+ type: StringConstructor;
83
+ };
84
+ formType: {
85
+ type: StringConstructor;
86
+ index: boolean;
87
+ };
88
+ appScope: {
89
+ type: StringConstructor[];
90
+ enum: string[];
91
+ default: never[];
92
+ };
93
+ sections: {
94
+ type: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
95
+ _id: false;
96
+ }, {
97
+ index: number;
98
+ sectionId: string;
99
+ sectionVersion: string;
100
+ isStep: boolean;
101
+ wizardStep?: number | null | undefined;
102
+ label?: string | null | undefined;
103
+ presetsType?: string | null | undefined;
104
+ }, mongoose.Document<unknown, {}, {
105
+ index: number;
106
+ sectionId: string;
107
+ sectionVersion: string;
108
+ isStep: boolean;
109
+ wizardStep?: number | null | undefined;
110
+ label?: string | null | undefined;
111
+ presetsType?: string | null | undefined;
112
+ }, {
113
+ id: string;
114
+ }, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
115
+ _id: false;
116
+ }>> & Omit<{
117
+ index: number;
118
+ sectionId: string;
119
+ sectionVersion: string;
120
+ isStep: boolean;
121
+ wizardStep?: number | null | undefined;
122
+ label?: string | null | undefined;
123
+ presetsType?: string | null | undefined;
124
+ } & {
125
+ _id: mongoose.Types.ObjectId;
126
+ } & {
127
+ __v: number;
128
+ }, "id"> & {
129
+ id: string;
130
+ }, unknown, {
131
+ index: number;
132
+ sectionId: string;
133
+ sectionVersion: string;
134
+ isStep: boolean;
135
+ wizardStep?: number | null | undefined;
136
+ label?: string | null | undefined;
137
+ presetsType?: string | null | undefined;
138
+ } & {
139
+ _id: mongoose.Types.ObjectId;
140
+ } & {
141
+ __v: number;
142
+ }>[];
143
+ default: never[];
144
+ };
145
+ status: {
146
+ type: StringConstructor;
147
+ required: boolean;
148
+ enum: string[];
149
+ default: string;
150
+ index: boolean;
151
+ };
152
+ supersedes: {
153
+ type: StringConstructor;
154
+ };
155
+ };
156
+ declare const formSchemaOptions: {
157
+ timestamps: {
158
+ createdAt: string;
159
+ updatedAt: string;
160
+ };
161
+ collection: string;
162
+ };
163
+ /**
164
+ * Build the Form schema.
165
+ * @returns Mongoose Schema for Form
166
+ */
167
+ declare function buildFormSchema(): Schema;
168
+ declare const _formSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
169
+ [x: number]: unknown;
170
+ [x: symbol]: unknown;
171
+ [x: string]: unknown;
172
+ }, mongoose.Document<unknown, {}, {
173
+ [x: number]: unknown;
174
+ [x: symbol]: unknown;
175
+ [x: string]: unknown;
176
+ }, {
177
+ id: string;
178
+ }, mongoose.DefaultSchemaOptions> & Omit<{
179
+ [x: number]: unknown;
180
+ [x: symbol]: unknown;
181
+ [x: string]: unknown;
182
+ } & Required<{
183
+ _id: unknown;
184
+ }> & {
185
+ __v: number;
186
+ }, "id"> & {
187
+ id: string;
188
+ }, unknown, {
189
+ [x: number]: {};
190
+ [x: symbol]: {};
191
+ [x: string]: {};
192
+ } & Required<{
193
+ _id: unknown;
194
+ }> & {
195
+ __v: number;
196
+ }>;
197
+ type Form = InferRawDocType<typeof _formSchema>;
198
+
199
+ declare const sectionQuestionRefSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
200
+ _id: false;
201
+ }, {
202
+ index: number;
203
+ questionId: string;
204
+ questionVersion: string;
205
+ }, mongoose.Document<unknown, {}, {
206
+ index: number;
207
+ questionId: string;
208
+ questionVersion: string;
209
+ }, {
210
+ id: string;
211
+ }, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
212
+ _id: false;
213
+ }>> & Omit<{
214
+ index: number;
215
+ questionId: string;
216
+ questionVersion: string;
217
+ } & {
218
+ _id: mongoose.Types.ObjectId;
219
+ } & {
220
+ __v: number;
221
+ }, "id"> & {
222
+ id: string;
223
+ }, unknown, {
224
+ index: number;
225
+ questionId: string;
226
+ questionVersion: string;
227
+ } & {
228
+ _id: mongoose.Types.ObjectId;
229
+ } & {
230
+ __v: number;
231
+ }>;
232
+ type SectionQuestionRef = InferRawDocType<typeof sectionQuestionRefSchema>;
233
+ declare const guidanceSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
234
+ _id: false;
235
+ }, {
236
+ text: string;
237
+ type: "tip" | "warning" | "prompt";
238
+ }, mongoose.Document<unknown, {}, {
239
+ text: string;
240
+ type: "tip" | "warning" | "prompt";
241
+ }, {
242
+ id: string;
243
+ }, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
244
+ _id: false;
245
+ }>> & Omit<{
246
+ text: string;
247
+ type: "tip" | "warning" | "prompt";
248
+ } & {
249
+ _id: mongoose.Types.ObjectId;
250
+ } & {
251
+ __v: number;
252
+ }, "id"> & {
253
+ id: string;
254
+ }, unknown, {
255
+ text: string;
256
+ type: "tip" | "warning" | "prompt";
257
+ } & {
258
+ _id: mongoose.Types.ObjectId;
259
+ } & {
260
+ __v: number;
261
+ }>;
262
+ type Guidance = InferRawDocType<typeof guidanceSchema>;
263
+ declare const sectionSchemaDefinition: {
264
+ _schemaVersion: {
265
+ type: NumberConstructor;
266
+ required: boolean;
267
+ default: number;
268
+ };
269
+ createdUser: {
270
+ type: typeof Schema.Types.ObjectId;
271
+ required: boolean;
272
+ index: boolean;
273
+ };
274
+ updatedUser: {
275
+ type: typeof Schema.Types.ObjectId;
276
+ index: boolean;
277
+ };
278
+ key: {
279
+ type: StringConstructor;
280
+ required: boolean;
281
+ };
282
+ version: {
283
+ type: StringConstructor;
284
+ required: boolean;
285
+ };
286
+ name: {
287
+ type: StringConstructor;
288
+ required: boolean;
289
+ };
290
+ directions: {
291
+ type: StringConstructor;
292
+ };
293
+ guidance: {
294
+ type: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
295
+ _id: false;
296
+ }, {
297
+ text: string;
298
+ type: "tip" | "warning" | "prompt";
299
+ }, mongoose.Document<unknown, {}, {
300
+ text: string;
301
+ type: "tip" | "warning" | "prompt";
302
+ }, {
303
+ id: string;
304
+ }, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
305
+ _id: false;
306
+ }>> & Omit<{
307
+ text: string;
308
+ type: "tip" | "warning" | "prompt";
309
+ } & {
310
+ _id: mongoose.Types.ObjectId;
311
+ } & {
312
+ __v: number;
313
+ }, "id"> & {
314
+ id: string;
315
+ }, unknown, {
316
+ text: string;
317
+ type: "tip" | "warning" | "prompt";
318
+ } & {
319
+ _id: mongoose.Types.ObjectId;
320
+ } & {
321
+ __v: number;
322
+ }>[];
323
+ default: never[];
324
+ };
325
+ questions: {
326
+ type: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
327
+ _id: false;
328
+ }, {
329
+ index: number;
330
+ questionId: string;
331
+ questionVersion: string;
332
+ }, mongoose.Document<unknown, {}, {
333
+ index: number;
334
+ questionId: string;
335
+ questionVersion: string;
336
+ }, {
337
+ id: string;
338
+ }, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
339
+ _id: false;
340
+ }>> & Omit<{
341
+ index: number;
342
+ questionId: string;
343
+ questionVersion: string;
344
+ } & {
345
+ _id: mongoose.Types.ObjectId;
346
+ } & {
347
+ __v: number;
348
+ }, "id"> & {
349
+ id: string;
350
+ }, unknown, {
351
+ index: number;
352
+ questionId: string;
353
+ questionVersion: string;
354
+ } & {
355
+ _id: mongoose.Types.ObjectId;
356
+ } & {
357
+ __v: number;
358
+ }>[];
359
+ default: never[];
360
+ };
361
+ templateScope: {
362
+ type: StringConstructor[];
363
+ default: undefined;
364
+ };
365
+ collapsible: {
366
+ type: BooleanConstructor;
367
+ default: boolean;
368
+ };
369
+ defaultCollapsed: {
370
+ type: BooleanConstructor;
371
+ default: boolean;
372
+ };
373
+ status: {
374
+ type: StringConstructor;
375
+ required: boolean;
376
+ enum: string[];
377
+ default: string;
378
+ index: boolean;
379
+ };
380
+ supersedes: {
381
+ type: StringConstructor;
382
+ };
383
+ rephrasing: {
384
+ type: StringConstructor;
385
+ };
386
+ script: {
387
+ type: StringConstructor;
388
+ };
389
+ };
390
+ declare const sectionSchemaOptions: {
391
+ timestamps: {
392
+ createdAt: string;
393
+ updatedAt: string;
394
+ };
395
+ collection: string;
396
+ };
397
+ /**
398
+ * Build the Section schema.
399
+ * @returns Mongoose Schema for Section
400
+ */
401
+ declare function buildSectionSchema(): Schema;
402
+ declare const _sectionSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
403
+ [x: number]: unknown;
404
+ [x: symbol]: unknown;
405
+ [x: string]: unknown;
406
+ }, mongoose.Document<unknown, {}, {
407
+ [x: number]: unknown;
408
+ [x: symbol]: unknown;
409
+ [x: string]: unknown;
410
+ }, {
411
+ id: string;
412
+ }, mongoose.DefaultSchemaOptions> & Omit<{
413
+ [x: number]: unknown;
414
+ [x: symbol]: unknown;
415
+ [x: string]: unknown;
416
+ } & Required<{
417
+ _id: unknown;
418
+ }> & {
419
+ __v: number;
420
+ }, "id"> & {
421
+ id: string;
422
+ }, unknown, {
423
+ [x: number]: {};
424
+ [x: symbol]: {};
425
+ [x: string]: {};
426
+ } & Required<{
427
+ _id: unknown;
428
+ }> & {
429
+ __v: number;
430
+ }>;
431
+ type Section = InferRawDocType<typeof _sectionSchema>;
432
+
433
+ declare const choiceSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
434
+ _id: false;
435
+ }, {
436
+ text: string;
437
+ val: any;
438
+ trigger: string[];
439
+ tip?: string | null | undefined;
440
+ }, mongoose.Document<unknown, {}, {
441
+ text: string;
442
+ val: any;
443
+ trigger: string[];
444
+ tip?: string | null | undefined;
445
+ }, {
446
+ id: string;
447
+ }, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
448
+ _id: false;
449
+ }>> & Omit<{
450
+ text: string;
451
+ val: any;
452
+ trigger: string[];
453
+ tip?: string | null | undefined;
454
+ } & {
455
+ _id: mongoose.Types.ObjectId;
456
+ } & {
457
+ __v: number;
458
+ }, "id"> & {
459
+ id: string;
460
+ }, unknown, {
461
+ text: string;
462
+ val: any;
463
+ trigger: string[];
464
+ tip?: string | null | undefined;
465
+ } & {
466
+ _id: mongoose.Types.ObjectId;
467
+ } & {
468
+ __v: number;
469
+ }>;
470
+ type Choice = InferRawDocType<typeof choiceSchema>;
471
+ declare const visibilityRuleSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
472
+ _id: false;
473
+ }, {
474
+ values: any[];
475
+ source: "session" | "form";
476
+ dependsOn: string;
477
+ condition: "equals" | "not_equals" | "any_of" | "in_range";
478
+ }, mongoose.Document<unknown, {}, {
479
+ values: any[];
480
+ source: "session" | "form";
481
+ dependsOn: string;
482
+ condition: "equals" | "not_equals" | "any_of" | "in_range";
483
+ }, {
484
+ id: string;
485
+ }, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
486
+ _id: false;
487
+ }>> & Omit<{
488
+ values: any[];
489
+ source: "session" | "form";
490
+ dependsOn: string;
491
+ condition: "equals" | "not_equals" | "any_of" | "in_range";
492
+ } & {
493
+ _id: mongoose.Types.ObjectId;
494
+ } & {
495
+ __v: number;
496
+ }, "id"> & {
497
+ id: string;
498
+ }, unknown, {
499
+ values: any[];
500
+ source: "session" | "form";
501
+ dependsOn: string;
502
+ condition: "equals" | "not_equals" | "any_of" | "in_range";
503
+ } & {
504
+ _id: mongoose.Types.ObjectId;
505
+ } & {
506
+ __v: number;
507
+ }>;
508
+ type VisibilityRule = InferRawDocType<typeof visibilityRuleSchema>;
509
+ declare const layoutSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
510
+ _id: false;
511
+ }, {
512
+ collapsible: boolean;
513
+ columns: number;
514
+ groupKey?: string | null | undefined;
515
+ }, mongoose.Document<unknown, {}, {
516
+ collapsible: boolean;
517
+ columns: number;
518
+ groupKey?: string | null | undefined;
519
+ }, {
520
+ id: string;
521
+ }, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
522
+ _id: false;
523
+ }>> & Omit<{
524
+ collapsible: boolean;
525
+ columns: number;
526
+ groupKey?: string | null | undefined;
527
+ } & {
528
+ _id: mongoose.Types.ObjectId;
529
+ } & {
530
+ __v: number;
531
+ }, "id"> & {
532
+ id: string;
533
+ }, unknown, {
534
+ collapsible: boolean;
535
+ columns: number;
536
+ groupKey?: string | null | undefined;
537
+ } & {
538
+ _id: mongoose.Types.ObjectId;
539
+ } & {
540
+ __v: number;
541
+ }>;
542
+ type Layout = InferRawDocType<typeof layoutSchema>;
543
+ declare const questionSchemaDefinition: {
544
+ _schemaVersion: {
545
+ type: NumberConstructor;
546
+ required: boolean;
547
+ default: number;
548
+ };
549
+ createdUser: {
550
+ type: typeof Schema.Types.ObjectId;
551
+ required: boolean;
552
+ index: boolean;
553
+ };
554
+ updatedUser: {
555
+ type: typeof Schema.Types.ObjectId;
556
+ index: boolean;
557
+ };
558
+ key: {
559
+ type: StringConstructor;
560
+ required: boolean;
561
+ };
562
+ version: {
563
+ type: StringConstructor;
564
+ required: boolean;
565
+ };
566
+ index: {
567
+ type: NumberConstructor;
568
+ required: boolean;
569
+ };
570
+ text: {
571
+ type: StringConstructor;
572
+ required: boolean;
573
+ };
574
+ format: {
575
+ type: StringConstructor;
576
+ required: boolean;
577
+ };
578
+ sectionId: {
579
+ type: StringConstructor;
580
+ required: boolean;
581
+ };
582
+ required: {
583
+ type: BooleanConstructor;
584
+ default: boolean;
585
+ };
586
+ allowMultiple: {
587
+ type: BooleanConstructor;
588
+ default: boolean;
589
+ };
590
+ isNested: {
591
+ type: BooleanConstructor;
592
+ default: boolean;
593
+ };
594
+ nested: {
595
+ type: StringConstructor[];
596
+ default: never[];
597
+ };
598
+ isTriggered: {
599
+ type: BooleanConstructor;
600
+ default: boolean;
601
+ };
602
+ triggersWhenAnswered: {
603
+ type: StringConstructor[];
604
+ default: never[];
605
+ };
606
+ header: {
607
+ type: StringConstructor;
608
+ };
609
+ directions: {
610
+ type: StringConstructor;
611
+ };
612
+ tip: {
613
+ type: StringConstructor;
614
+ };
615
+ hasDynamicChoices: {
616
+ type: BooleanConstructor;
617
+ default: boolean;
618
+ };
619
+ dynamicChoiceSet: {
620
+ type: StringConstructor;
621
+ };
622
+ group: {
623
+ type: StringConstructor;
624
+ };
625
+ choices: {
626
+ type: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
627
+ _id: false;
628
+ }, {
629
+ text: string;
630
+ val: any;
631
+ trigger: string[];
632
+ tip?: string | null | undefined;
633
+ }, mongoose.Document<unknown, {}, {
634
+ text: string;
635
+ val: any;
636
+ trigger: string[];
637
+ tip?: string | null | undefined;
638
+ }, {
639
+ id: string;
640
+ }, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
641
+ _id: false;
642
+ }>> & Omit<{
643
+ text: string;
644
+ val: any;
645
+ trigger: string[];
646
+ tip?: string | null | undefined;
647
+ } & {
648
+ _id: mongoose.Types.ObjectId;
649
+ } & {
650
+ __v: number;
651
+ }, "id"> & {
652
+ id: string;
653
+ }, unknown, {
654
+ text: string;
655
+ val: any;
656
+ trigger: string[];
657
+ tip?: string | null | undefined;
658
+ } & {
659
+ _id: mongoose.Types.ObjectId;
660
+ } & {
661
+ __v: number;
662
+ }>[];
663
+ default: never[];
664
+ };
665
+ componentProps: {
666
+ type: typeof Schema.Types.Mixed;
667
+ };
668
+ autofillRules: {
669
+ type: typeof Schema.Types.Mixed;
670
+ default: never[];
671
+ };
672
+ formType: {
673
+ type: StringConstructor[];
674
+ enum: string[];
675
+ default: never[];
676
+ };
677
+ icCode: {
678
+ type: StringConstructor;
679
+ };
680
+ status: {
681
+ type: StringConstructor;
682
+ required: boolean;
683
+ enum: string[];
684
+ default: string;
685
+ index: boolean;
686
+ };
687
+ supersedes: {
688
+ type: StringConstructor;
689
+ };
690
+ targetEntity: {
691
+ type: StringConstructor;
692
+ enum: string[];
693
+ };
694
+ targetField: {
695
+ type: StringConstructor;
696
+ };
697
+ visibilityRule: {
698
+ type: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
699
+ _id: false;
700
+ }, {
701
+ values: any[];
702
+ source: "session" | "form";
703
+ dependsOn: string;
704
+ condition: "equals" | "not_equals" | "any_of" | "in_range";
705
+ }, mongoose.Document<unknown, {}, {
706
+ values: any[];
707
+ source: "session" | "form";
708
+ dependsOn: string;
709
+ condition: "equals" | "not_equals" | "any_of" | "in_range";
710
+ }, {
711
+ id: string;
712
+ }, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
713
+ _id: false;
714
+ }>> & Omit<{
715
+ values: any[];
716
+ source: "session" | "form";
717
+ dependsOn: string;
718
+ condition: "equals" | "not_equals" | "any_of" | "in_range";
719
+ } & {
720
+ _id: mongoose.Types.ObjectId;
721
+ } & {
722
+ __v: number;
723
+ }, "id"> & {
724
+ id: string;
725
+ }, unknown, {
726
+ values: any[];
727
+ source: "session" | "form";
728
+ dependsOn: string;
729
+ condition: "equals" | "not_equals" | "any_of" | "in_range";
730
+ } & {
731
+ _id: mongoose.Types.ObjectId;
732
+ } & {
733
+ __v: number;
734
+ }>;
735
+ };
736
+ layout: {
737
+ type: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
738
+ _id: false;
739
+ }, {
740
+ collapsible: boolean;
741
+ columns: number;
742
+ groupKey?: string | null | undefined;
743
+ }, mongoose.Document<unknown, {}, {
744
+ collapsible: boolean;
745
+ columns: number;
746
+ groupKey?: string | null | undefined;
747
+ }, {
748
+ id: string;
749
+ }, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
750
+ _id: false;
751
+ }>> & Omit<{
752
+ collapsible: boolean;
753
+ columns: number;
754
+ groupKey?: string | null | undefined;
755
+ } & {
756
+ _id: mongoose.Types.ObjectId;
757
+ } & {
758
+ __v: number;
759
+ }, "id"> & {
760
+ id: string;
761
+ }, unknown, {
762
+ collapsible: boolean;
763
+ columns: number;
764
+ groupKey?: string | null | undefined;
765
+ } & {
766
+ _id: mongoose.Types.ObjectId;
767
+ } & {
768
+ __v: number;
769
+ }>;
770
+ };
771
+ microcopy: {
772
+ type: StringConstructor;
773
+ };
774
+ sensitivity: {
775
+ type: StringConstructor;
776
+ enum: string[];
777
+ };
778
+ scoringGroup: {
779
+ type: StringConstructor;
780
+ };
781
+ groups: {
782
+ type: StringConstructor[];
783
+ default: undefined;
784
+ };
785
+ rephrasingSelector: {
786
+ type: typeof Schema.Types.Mixed;
787
+ };
788
+ textSelector: {
789
+ type: typeof Schema.Types.Mixed;
790
+ };
791
+ tipSelector: {
792
+ type: typeof Schema.Types.Mixed;
793
+ };
794
+ sortChoices: {
795
+ type: BooleanConstructor;
796
+ };
797
+ isAllRequired: {
798
+ type: BooleanConstructor;
799
+ };
800
+ itemLabel: {
801
+ type: StringConstructor;
802
+ };
803
+ prompts: {
804
+ type: StringConstructor[];
805
+ default: undefined;
806
+ };
807
+ rephrasing: {
808
+ type: StringConstructor;
809
+ };
810
+ dynamicChoiceTrigger: {
811
+ type: StringConstructor;
812
+ };
813
+ };
814
+ declare const questionSchemaOptions: {
815
+ timestamps: {
816
+ createdAt: string;
817
+ updatedAt: string;
818
+ };
819
+ collection: string;
820
+ };
821
+ /**
822
+ * Build the Question schema.
823
+ * @returns Mongoose Schema for Question
824
+ */
825
+ declare function buildQuestionSchema(): Schema;
826
+ declare const _questionSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
827
+ [x: number]: unknown;
828
+ [x: symbol]: unknown;
829
+ [x: string]: unknown;
830
+ }, mongoose.Document<unknown, {}, {
831
+ [x: number]: unknown;
832
+ [x: symbol]: unknown;
833
+ [x: string]: unknown;
834
+ }, {
835
+ id: string;
836
+ }, mongoose.DefaultSchemaOptions> & Omit<{
837
+ [x: number]: unknown;
838
+ [x: symbol]: unknown;
839
+ [x: string]: unknown;
840
+ } & Required<{
841
+ _id: unknown;
842
+ }> & {
843
+ __v: number;
844
+ }, "id"> & {
845
+ id: string;
846
+ }, unknown, {
847
+ [x: number]: {};
848
+ [x: symbol]: {};
849
+ [x: string]: {};
850
+ } & Required<{
851
+ _id: unknown;
852
+ }> & {
853
+ __v: number;
854
+ }>;
855
+ type Question = InferRawDocType<typeof _questionSchema>;
856
+
857
+ declare const scoringConditionSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
858
+ _id: false;
859
+ }, {
860
+ value: any;
861
+ questionKey: string;
862
+ operator: "eq" | "ne" | "in" | "not_in" | "gt" | "gte" | "lt" | "lte";
863
+ weight: number;
864
+ }, mongoose.Document<unknown, {}, {
865
+ value: any;
866
+ questionKey: string;
867
+ operator: "eq" | "ne" | "in" | "not_in" | "gt" | "gte" | "lt" | "lte";
868
+ weight: number;
869
+ }, {
870
+ id: string;
871
+ }, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
872
+ _id: false;
873
+ }>> & Omit<{
874
+ value: any;
875
+ questionKey: string;
876
+ operator: "eq" | "ne" | "in" | "not_in" | "gt" | "gte" | "lt" | "lte";
877
+ weight: number;
878
+ } & {
879
+ _id: mongoose.Types.ObjectId;
880
+ } & {
881
+ __v: number;
882
+ }, "id"> & {
883
+ id: string;
884
+ }, unknown, {
885
+ value: any;
886
+ questionKey: string;
887
+ operator: "eq" | "ne" | "in" | "not_in" | "gt" | "gte" | "lt" | "lte";
888
+ weight: number;
889
+ } & {
890
+ _id: mongoose.Types.ObjectId;
891
+ } & {
892
+ __v: number;
893
+ }>;
894
+ type ScoringCondition = InferRawDocType<typeof scoringConditionSchema>;
895
+ declare const scoringThresholdSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
896
+ _id: false;
897
+ }, {
898
+ label: string;
899
+ minScore: number;
900
+ maxScore: number;
901
+ riskLevel: string;
902
+ }, mongoose.Document<unknown, {}, {
903
+ label: string;
904
+ minScore: number;
905
+ maxScore: number;
906
+ riskLevel: string;
907
+ }, {
908
+ id: string;
909
+ }, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
910
+ _id: false;
911
+ }>> & Omit<{
912
+ label: string;
913
+ minScore: number;
914
+ maxScore: number;
915
+ riskLevel: string;
916
+ } & {
917
+ _id: mongoose.Types.ObjectId;
918
+ } & {
919
+ __v: number;
920
+ }, "id"> & {
921
+ id: string;
922
+ }, unknown, {
923
+ label: string;
924
+ minScore: number;
925
+ maxScore: number;
926
+ riskLevel: string;
927
+ } & {
928
+ _id: mongoose.Types.ObjectId;
929
+ } & {
930
+ __v: number;
931
+ }>;
932
+ type ScoringThreshold = InferRawDocType<typeof scoringThresholdSchema>;
933
+ declare const scoringRecommendationSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
934
+ _id: false;
935
+ }, {
936
+ description: string;
937
+ riskLevel: string;
938
+ action: string;
939
+ }, mongoose.Document<unknown, {}, {
940
+ description: string;
941
+ riskLevel: string;
942
+ action: string;
943
+ }, {
944
+ id: string;
945
+ }, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
946
+ _id: false;
947
+ }>> & Omit<{
948
+ description: string;
949
+ riskLevel: string;
950
+ action: string;
951
+ } & {
952
+ _id: mongoose.Types.ObjectId;
953
+ } & {
954
+ __v: number;
955
+ }, "id"> & {
956
+ id: string;
957
+ }, unknown, {
958
+ description: string;
959
+ riskLevel: string;
960
+ action: string;
961
+ } & {
962
+ _id: mongoose.Types.ObjectId;
963
+ } & {
964
+ __v: number;
965
+ }>;
966
+ type ScoringRecommendation = InferRawDocType<typeof scoringRecommendationSchema>;
967
+ declare const scoringRuleSchemaDefinition: {
968
+ _schemaVersion: {
969
+ type: NumberConstructor;
970
+ required: boolean;
971
+ default: number;
972
+ };
973
+ createdUser: {
974
+ type: typeof Schema.Types.ObjectId;
975
+ required: boolean;
976
+ index: boolean;
977
+ };
978
+ updatedUser: {
979
+ type: typeof Schema.Types.ObjectId;
980
+ index: boolean;
981
+ };
982
+ formId: {
983
+ type: StringConstructor;
984
+ required: boolean;
985
+ };
986
+ formVersion: {
987
+ type: StringConstructor;
988
+ required: boolean;
989
+ };
990
+ name: {
991
+ type: StringConstructor;
992
+ required: boolean;
993
+ };
994
+ version: {
995
+ type: StringConstructor;
996
+ required: boolean;
997
+ };
998
+ appScope: {
999
+ type: StringConstructor[];
1000
+ enum: string[];
1001
+ default: never[];
1002
+ };
1003
+ status: {
1004
+ type: StringConstructor;
1005
+ required: boolean;
1006
+ enum: string[];
1007
+ default: string;
1008
+ index: boolean;
1009
+ };
1010
+ effectiveDate: {
1011
+ type: DateConstructor;
1012
+ };
1013
+ deprecatedDate: {
1014
+ type: DateConstructor;
1015
+ };
1016
+ replacedBy: {
1017
+ type: StringConstructor;
1018
+ };
1019
+ conditions: {
1020
+ type: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
1021
+ _id: false;
1022
+ }, {
1023
+ value: any;
1024
+ questionKey: string;
1025
+ operator: "eq" | "ne" | "in" | "not_in" | "gt" | "gte" | "lt" | "lte";
1026
+ weight: number;
1027
+ }, mongoose.Document<unknown, {}, {
1028
+ value: any;
1029
+ questionKey: string;
1030
+ operator: "eq" | "ne" | "in" | "not_in" | "gt" | "gte" | "lt" | "lte";
1031
+ weight: number;
1032
+ }, {
1033
+ id: string;
1034
+ }, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
1035
+ _id: false;
1036
+ }>> & Omit<{
1037
+ value: any;
1038
+ questionKey: string;
1039
+ operator: "eq" | "ne" | "in" | "not_in" | "gt" | "gte" | "lt" | "lte";
1040
+ weight: number;
1041
+ } & {
1042
+ _id: mongoose.Types.ObjectId;
1043
+ } & {
1044
+ __v: number;
1045
+ }, "id"> & {
1046
+ id: string;
1047
+ }, unknown, {
1048
+ value: any;
1049
+ questionKey: string;
1050
+ operator: "eq" | "ne" | "in" | "not_in" | "gt" | "gte" | "lt" | "lte";
1051
+ weight: number;
1052
+ } & {
1053
+ _id: mongoose.Types.ObjectId;
1054
+ } & {
1055
+ __v: number;
1056
+ }>[];
1057
+ default: never[];
1058
+ };
1059
+ thresholds: {
1060
+ type: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
1061
+ _id: false;
1062
+ }, {
1063
+ label: string;
1064
+ minScore: number;
1065
+ maxScore: number;
1066
+ riskLevel: string;
1067
+ }, mongoose.Document<unknown, {}, {
1068
+ label: string;
1069
+ minScore: number;
1070
+ maxScore: number;
1071
+ riskLevel: string;
1072
+ }, {
1073
+ id: string;
1074
+ }, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
1075
+ _id: false;
1076
+ }>> & Omit<{
1077
+ label: string;
1078
+ minScore: number;
1079
+ maxScore: number;
1080
+ riskLevel: string;
1081
+ } & {
1082
+ _id: mongoose.Types.ObjectId;
1083
+ } & {
1084
+ __v: number;
1085
+ }, "id"> & {
1086
+ id: string;
1087
+ }, unknown, {
1088
+ label: string;
1089
+ minScore: number;
1090
+ maxScore: number;
1091
+ riskLevel: string;
1092
+ } & {
1093
+ _id: mongoose.Types.ObjectId;
1094
+ } & {
1095
+ __v: number;
1096
+ }>[];
1097
+ default: never[];
1098
+ };
1099
+ recommendations: {
1100
+ type: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, {
1101
+ _id: false;
1102
+ }, {
1103
+ description: string;
1104
+ riskLevel: string;
1105
+ action: string;
1106
+ }, mongoose.Document<unknown, {}, {
1107
+ description: string;
1108
+ riskLevel: string;
1109
+ action: string;
1110
+ }, {
1111
+ id: string;
1112
+ }, mongoose.MergeType<mongoose.DefaultSchemaOptions, {
1113
+ _id: false;
1114
+ }>> & Omit<{
1115
+ description: string;
1116
+ riskLevel: string;
1117
+ action: string;
1118
+ } & {
1119
+ _id: mongoose.Types.ObjectId;
1120
+ } & {
1121
+ __v: number;
1122
+ }, "id"> & {
1123
+ id: string;
1124
+ }, unknown, {
1125
+ description: string;
1126
+ riskLevel: string;
1127
+ action: string;
1128
+ } & {
1129
+ _id: mongoose.Types.ObjectId;
1130
+ } & {
1131
+ __v: number;
1132
+ }>[];
1133
+ default: never[];
1134
+ };
1135
+ };
1136
+ declare const scoringRuleSchemaOptions: {
1137
+ timestamps: {
1138
+ createdAt: string;
1139
+ updatedAt: string;
1140
+ };
1141
+ collection: string;
1142
+ };
1143
+ /**
1144
+ * Build the ScoringRule schema.
1145
+ * @returns Mongoose Schema for ScoringRule
1146
+ */
1147
+ declare function buildScoringRuleSchema(): Schema;
1148
+ declare const _scoringRuleSchema: Schema<any, mongoose.Model<any, any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
1149
+ [x: number]: unknown;
1150
+ [x: symbol]: unknown;
1151
+ [x: string]: unknown;
1152
+ }, mongoose.Document<unknown, {}, {
1153
+ [x: number]: unknown;
1154
+ [x: symbol]: unknown;
1155
+ [x: string]: unknown;
1156
+ }, {
1157
+ id: string;
1158
+ }, mongoose.DefaultSchemaOptions> & Omit<{
1159
+ [x: number]: unknown;
1160
+ [x: symbol]: unknown;
1161
+ [x: string]: unknown;
1162
+ } & Required<{
1163
+ _id: unknown;
1164
+ }> & {
1165
+ __v: number;
1166
+ }, "id"> & {
1167
+ id: string;
1168
+ }, unknown, {
1169
+ [x: number]: {};
1170
+ [x: symbol]: {};
1171
+ [x: string]: {};
1172
+ } & Required<{
1173
+ _id: unknown;
1174
+ }> & {
1175
+ __v: number;
1176
+ }>;
1177
+ type ScoringRule = InferRawDocType<typeof _scoringRuleSchema>;
1178
+
1179
+ export { visibilityRuleSchema as A, type Choice as C, type Form as F, type Guidance as G, type Layout as L, type Question as Q, type ScoringCondition as S, type VisibilityRule as V, type FormSectionRef as a, type ScoringRecommendation as b, type ScoringRule as c, type ScoringThreshold as d, type Section as e, type SectionQuestionRef as f, buildFormSchema as g, buildQuestionSchema as h, buildScoringRuleSchema as i, buildSectionSchema as j, choiceSchema as k, formSchemaDefinition as l, formSchemaOptions as m, formSectionRefSchema as n, guidanceSchema as o, layoutSchema as p, questionSchemaDefinition as q, questionSchemaOptions as r, scoringConditionSchema as s, scoringRecommendationSchema as t, scoringRuleSchemaDefinition as u, scoringRuleSchemaOptions as v, scoringThresholdSchema as w, sectionQuestionRefSchema as x, sectionSchemaDefinition as y, sectionSchemaOptions as z };