@dmptool/types 1.0.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 (47) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +41 -0
  3. package/dist/answers.d.ts +558 -0
  4. package/dist/answers.js +87 -0
  5. package/dist/dateQuestions.d.ts +244 -0
  6. package/dist/dateQuestions.js +30 -0
  7. package/dist/graphQLQuestions.d.ts +288 -0
  8. package/dist/graphQLQuestions.js +41 -0
  9. package/dist/optionBasedQuestions.d.ts +236 -0
  10. package/dist/optionBasedQuestions.js +44 -0
  11. package/dist/primitiveQuestions.d.ts +367 -0
  12. package/dist/primitiveQuestions.js +96 -0
  13. package/dist/schemas/anyAnswer.schema.json +267 -0
  14. package/dist/schemas/anyQuestion.schema.json +726 -0
  15. package/dist/schemas/booleanAnswer.schema.json +23 -0
  16. package/dist/schemas/booleanQuestion.schema.json +46 -0
  17. package/dist/schemas/checkboxesAnswer.schema.json +26 -0
  18. package/dist/schemas/checkboxesQuestion.schema.json +73 -0
  19. package/dist/schemas/currencyAnswer.schema.json +23 -0
  20. package/dist/schemas/currencyQuestion.schema.json +45 -0
  21. package/dist/schemas/datePickerAnswer.schema.json +23 -0
  22. package/dist/schemas/datePickerQuestion.schema.json +52 -0
  23. package/dist/schemas/dateRangeAnswer.schema.json +36 -0
  24. package/dist/schemas/dateRangeQuestion.schema.json +106 -0
  25. package/dist/schemas/emailAnswer.schema.json +23 -0
  26. package/dist/schemas/emailQuestion.schema.json +55 -0
  27. package/dist/schemas/filteredSearchAnswer.schema.json +26 -0
  28. package/dist/schemas/filteredSearchQuestion.schema.json +120 -0
  29. package/dist/schemas/numberAnswer.schema.json +23 -0
  30. package/dist/schemas/numberQuestion.schema.json +52 -0
  31. package/dist/schemas/radioButtonsAnswer.schema.json +23 -0
  32. package/dist/schemas/radioButtonsQuestion.schema.json +73 -0
  33. package/dist/schemas/selectBoxAnswer.schema.json +23 -0
  34. package/dist/schemas/selectBoxQuestion.schema.json +83 -0
  35. package/dist/schemas/tableAnswer.schema.json +284 -0
  36. package/dist/schemas/tableQuestion.schema.json +680 -0
  37. package/dist/schemas/textAnswer.schema.json +23 -0
  38. package/dist/schemas/textAreaAnswer.schema.json +23 -0
  39. package/dist/schemas/textAreaQuestion.schema.json +48 -0
  40. package/dist/schemas/textQuestion.schema.json +52 -0
  41. package/dist/schemas/typeaheadSearchAnswer.schema.json +23 -0
  42. package/dist/schemas/typeaheadSearchQuestion.schema.json +110 -0
  43. package/dist/schemas/urlAnswer.schema.json +23 -0
  44. package/dist/schemas/urlQuestion.schema.json +52 -0
  45. package/dist/tableQuestions.d.ts +4195 -0
  46. package/dist/tableQuestions.js +55 -0
  47. package/package.json +41 -0
@@ -0,0 +1,680 @@
1
+ {
2
+ "$ref": "#/definitions/TableQuestion",
3
+ "definitions": {
4
+ "TableQuestion": {
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "table"
10
+ },
11
+ "meta": {
12
+ "type": "object",
13
+ "properties": {
14
+ "schemaVersion": {
15
+ "type": "string",
16
+ "const": "1.0"
17
+ },
18
+ "labelTranslationKey": {
19
+ "type": "string"
20
+ }
21
+ },
22
+ "required": [
23
+ "schemaVersion"
24
+ ],
25
+ "additionalProperties": false
26
+ },
27
+ "columns": {
28
+ "type": "array",
29
+ "items": {
30
+ "anyOf": [
31
+ {
32
+ "type": "object",
33
+ "properties": {
34
+ "type": {
35
+ "type": "string",
36
+ "const": "boolean"
37
+ },
38
+ "meta": {
39
+ "$ref": "#/definitions/TableQuestion/properties/meta"
40
+ },
41
+ "attributes": {
42
+ "type": "object",
43
+ "properties": {
44
+ "checked": {
45
+ "type": "boolean"
46
+ }
47
+ },
48
+ "additionalProperties": false
49
+ }
50
+ },
51
+ "required": [
52
+ "type",
53
+ "meta",
54
+ "attributes"
55
+ ],
56
+ "additionalProperties": false
57
+ },
58
+ {
59
+ "type": "object",
60
+ "properties": {
61
+ "type": {
62
+ "type": "string",
63
+ "const": "checkBoxes"
64
+ },
65
+ "meta": {
66
+ "$ref": "#/definitions/TableQuestion/properties/meta"
67
+ },
68
+ "options": {
69
+ "type": "array",
70
+ "items": {
71
+ "type": "object",
72
+ "properties": {
73
+ "type": {
74
+ "type": "string",
75
+ "const": "option"
76
+ },
77
+ "attributes": {
78
+ "type": "object",
79
+ "properties": {
80
+ "label": {
81
+ "type": "string"
82
+ },
83
+ "value": {
84
+ "type": "string"
85
+ },
86
+ "checked": {
87
+ "type": "boolean"
88
+ }
89
+ },
90
+ "required": [
91
+ "label",
92
+ "value"
93
+ ],
94
+ "additionalProperties": false
95
+ }
96
+ },
97
+ "required": [
98
+ "type",
99
+ "attributes"
100
+ ],
101
+ "additionalProperties": false
102
+ }
103
+ }
104
+ },
105
+ "required": [
106
+ "type",
107
+ "meta",
108
+ "options"
109
+ ],
110
+ "additionalProperties": false
111
+ },
112
+ {
113
+ "type": "object",
114
+ "properties": {
115
+ "type": {
116
+ "type": "string",
117
+ "const": "currency"
118
+ },
119
+ "meta": {
120
+ "type": "object",
121
+ "properties": {
122
+ "denomination": {
123
+ "type": "string"
124
+ }
125
+ },
126
+ "additionalProperties": false
127
+ },
128
+ "attributes": {
129
+ "type": "object",
130
+ "properties": {
131
+ "max": {
132
+ "type": "number"
133
+ },
134
+ "min": {
135
+ "type": "number"
136
+ },
137
+ "step": {
138
+ "type": "number"
139
+ }
140
+ },
141
+ "additionalProperties": false
142
+ }
143
+ },
144
+ "required": [
145
+ "type",
146
+ "meta",
147
+ "attributes"
148
+ ],
149
+ "additionalProperties": false
150
+ },
151
+ {
152
+ "type": "object",
153
+ "properties": {
154
+ "type": {
155
+ "type": "string",
156
+ "const": "datePicker"
157
+ },
158
+ "meta": {
159
+ "$ref": "#/definitions/TableQuestion/properties/meta"
160
+ },
161
+ "attributes": {
162
+ "type": "object",
163
+ "properties": {
164
+ "max": {
165
+ "type": "string"
166
+ },
167
+ "min": {
168
+ "type": "string"
169
+ },
170
+ "step": {
171
+ "type": "number"
172
+ }
173
+ },
174
+ "additionalProperties": false
175
+ }
176
+ },
177
+ "required": [
178
+ "type",
179
+ "meta",
180
+ "attributes"
181
+ ],
182
+ "additionalProperties": false
183
+ },
184
+ {
185
+ "type": "object",
186
+ "properties": {
187
+ "type": {
188
+ "type": "string",
189
+ "const": "dateRange"
190
+ },
191
+ "meta": {
192
+ "$ref": "#/definitions/TableQuestion/properties/meta"
193
+ },
194
+ "columns": {
195
+ "type": "object",
196
+ "properties": {
197
+ "start": {
198
+ "type": "object",
199
+ "properties": {
200
+ "type": {
201
+ "$ref": "#/definitions/TableQuestion/properties/columns/items/anyOf/3/properties/type"
202
+ },
203
+ "meta": {
204
+ "$ref": "#/definitions/TableQuestion/properties/meta"
205
+ },
206
+ "attributes": {
207
+ "type": "object",
208
+ "properties": {
209
+ "label": {
210
+ "type": "string"
211
+ }
212
+ },
213
+ "required": [
214
+ "label"
215
+ ],
216
+ "additionalProperties": false
217
+ }
218
+ },
219
+ "required": [
220
+ "type",
221
+ "meta",
222
+ "attributes"
223
+ ],
224
+ "additionalProperties": false
225
+ },
226
+ "end": {
227
+ "type": "object",
228
+ "properties": {
229
+ "type": {
230
+ "$ref": "#/definitions/TableQuestion/properties/columns/items/anyOf/3/properties/type"
231
+ },
232
+ "meta": {
233
+ "$ref": "#/definitions/TableQuestion/properties/meta"
234
+ },
235
+ "attributes": {
236
+ "type": "object",
237
+ "properties": {
238
+ "label": {
239
+ "type": "string"
240
+ }
241
+ },
242
+ "required": [
243
+ "label"
244
+ ],
245
+ "additionalProperties": false
246
+ }
247
+ },
248
+ "required": [
249
+ "type",
250
+ "meta",
251
+ "attributes"
252
+ ],
253
+ "additionalProperties": false
254
+ }
255
+ },
256
+ "required": [
257
+ "start",
258
+ "end"
259
+ ],
260
+ "additionalProperties": false
261
+ }
262
+ },
263
+ "required": [
264
+ "type",
265
+ "meta",
266
+ "columns"
267
+ ],
268
+ "additionalProperties": false
269
+ },
270
+ {
271
+ "type": "object",
272
+ "properties": {
273
+ "type": {
274
+ "type": "string",
275
+ "const": "email"
276
+ },
277
+ "meta": {
278
+ "$ref": "#/definitions/TableQuestion/properties/meta"
279
+ },
280
+ "attributes": {
281
+ "type": "object",
282
+ "properties": {
283
+ "maxLength": {
284
+ "type": "number"
285
+ },
286
+ "minLength": {
287
+ "type": "number"
288
+ },
289
+ "multiple": {
290
+ "type": "boolean"
291
+ },
292
+ "pattern": {
293
+ "type": "string"
294
+ }
295
+ },
296
+ "additionalProperties": false
297
+ }
298
+ },
299
+ "required": [
300
+ "type",
301
+ "meta",
302
+ "attributes"
303
+ ],
304
+ "additionalProperties": false
305
+ },
306
+ {
307
+ "type": "object",
308
+ "properties": {
309
+ "type": {
310
+ "type": "string",
311
+ "const": "filteredSearch"
312
+ },
313
+ "meta": {
314
+ "$ref": "#/definitions/TableQuestion/properties/meta"
315
+ },
316
+ "graphQL": {
317
+ "type": "object",
318
+ "properties": {
319
+ "displayFields": {
320
+ "type": "array",
321
+ "items": {
322
+ "type": "object",
323
+ "properties": {
324
+ "propertyName": {
325
+ "type": "string"
326
+ },
327
+ "label": {
328
+ "type": "string"
329
+ },
330
+ "labelTranslationKey": {
331
+ "type": "string"
332
+ }
333
+ },
334
+ "required": [
335
+ "propertyName",
336
+ "label"
337
+ ],
338
+ "additionalProperties": false
339
+ }
340
+ },
341
+ "localQueryId": {
342
+ "type": "string"
343
+ },
344
+ "query": {
345
+ "type": "string"
346
+ },
347
+ "responseField": {
348
+ "type": "string"
349
+ },
350
+ "variables": {
351
+ "type": "array",
352
+ "items": {
353
+ "type": "object",
354
+ "properties": {
355
+ "minLength": {
356
+ "type": "number"
357
+ },
358
+ "label": {
359
+ "type": "string"
360
+ },
361
+ "labelTranslationKey": {
362
+ "type": "string"
363
+ },
364
+ "name": {
365
+ "type": "string"
366
+ },
367
+ "type": {
368
+ "type": "string"
369
+ },
370
+ "defaultValue": {
371
+ "type": "string"
372
+ }
373
+ },
374
+ "required": [
375
+ "name",
376
+ "type"
377
+ ],
378
+ "additionalProperties": false
379
+ }
380
+ }
381
+ },
382
+ "required": [
383
+ "displayFields",
384
+ "responseField",
385
+ "variables"
386
+ ],
387
+ "additionalProperties": false
388
+ },
389
+ "attributes": {
390
+ "type": "object",
391
+ "properties": {
392
+ "multiple": {
393
+ "type": "boolean"
394
+ }
395
+ },
396
+ "additionalProperties": false
397
+ }
398
+ },
399
+ "required": [
400
+ "type",
401
+ "meta",
402
+ "graphQL",
403
+ "attributes"
404
+ ],
405
+ "additionalProperties": false
406
+ },
407
+ {
408
+ "type": "object",
409
+ "properties": {
410
+ "type": {
411
+ "type": "string",
412
+ "const": "number"
413
+ },
414
+ "meta": {
415
+ "$ref": "#/definitions/TableQuestion/properties/meta"
416
+ },
417
+ "attributes": {
418
+ "$ref": "#/definitions/TableQuestion/properties/columns/items/anyOf/2/properties/attributes"
419
+ }
420
+ },
421
+ "required": [
422
+ "type",
423
+ "meta",
424
+ "attributes"
425
+ ],
426
+ "additionalProperties": false
427
+ },
428
+ {
429
+ "type": "object",
430
+ "properties": {
431
+ "type": {
432
+ "type": "string",
433
+ "const": "radioButtons"
434
+ },
435
+ "meta": {
436
+ "$ref": "#/definitions/TableQuestion/properties/meta"
437
+ },
438
+ "options": {
439
+ "type": "array",
440
+ "items": {
441
+ "type": "object",
442
+ "properties": {
443
+ "type": {
444
+ "type": "string",
445
+ "const": "option"
446
+ },
447
+ "attributes": {
448
+ "type": "object",
449
+ "properties": {
450
+ "label": {
451
+ "$ref": "#/definitions/TableQuestion/properties/columns/items/anyOf/1/properties/options/items/properties/attributes/properties/label"
452
+ },
453
+ "value": {
454
+ "$ref": "#/definitions/TableQuestion/properties/columns/items/anyOf/1/properties/options/items/properties/attributes/properties/value"
455
+ },
456
+ "selected": {
457
+ "type": "boolean"
458
+ }
459
+ },
460
+ "required": [
461
+ "label",
462
+ "value"
463
+ ],
464
+ "additionalProperties": false
465
+ }
466
+ },
467
+ "required": [
468
+ "type",
469
+ "attributes"
470
+ ],
471
+ "additionalProperties": false
472
+ }
473
+ }
474
+ },
475
+ "required": [
476
+ "type",
477
+ "meta",
478
+ "options"
479
+ ],
480
+ "additionalProperties": false
481
+ },
482
+ {
483
+ "type": "object",
484
+ "properties": {
485
+ "type": {
486
+ "type": "string",
487
+ "const": "selectBox"
488
+ },
489
+ "meta": {
490
+ "$ref": "#/definitions/TableQuestion/properties/meta"
491
+ },
492
+ "options": {
493
+ "type": "array",
494
+ "items": {
495
+ "$ref": "#/definitions/TableQuestion/properties/columns/items/anyOf/8/properties/options/items"
496
+ }
497
+ },
498
+ "attributes": {
499
+ "type": "object",
500
+ "properties": {
501
+ "multiple": {
502
+ "type": "boolean"
503
+ }
504
+ },
505
+ "additionalProperties": false
506
+ }
507
+ },
508
+ "required": [
509
+ "type",
510
+ "meta",
511
+ "options",
512
+ "attributes"
513
+ ],
514
+ "additionalProperties": false
515
+ },
516
+ {
517
+ "type": "object",
518
+ "properties": {
519
+ "type": {
520
+ "type": "string",
521
+ "const": "textArea"
522
+ },
523
+ "meta": {
524
+ "type": "object",
525
+ "properties": {
526
+ "asRichText": {
527
+ "type": "boolean"
528
+ }
529
+ },
530
+ "additionalProperties": false
531
+ },
532
+ "attributes": {
533
+ "type": "object",
534
+ "properties": {
535
+ "cols": {
536
+ "type": "number"
537
+ },
538
+ "maxLength": {
539
+ "type": "number"
540
+ },
541
+ "minLength": {
542
+ "type": "number"
543
+ },
544
+ "rows": {
545
+ "type": "number"
546
+ }
547
+ },
548
+ "additionalProperties": false
549
+ }
550
+ },
551
+ "required": [
552
+ "type",
553
+ "meta",
554
+ "attributes"
555
+ ],
556
+ "additionalProperties": false
557
+ },
558
+ {
559
+ "type": "object",
560
+ "properties": {
561
+ "type": {
562
+ "type": "string",
563
+ "const": "text"
564
+ },
565
+ "meta": {
566
+ "$ref": "#/definitions/TableQuestion/properties/meta"
567
+ },
568
+ "attributes": {
569
+ "type": "object",
570
+ "properties": {
571
+ "maxLength": {
572
+ "type": "number"
573
+ },
574
+ "minLength": {
575
+ "type": "number"
576
+ },
577
+ "pattern": {
578
+ "type": "string"
579
+ }
580
+ },
581
+ "additionalProperties": false
582
+ }
583
+ },
584
+ "required": [
585
+ "type",
586
+ "meta",
587
+ "attributes"
588
+ ],
589
+ "additionalProperties": false
590
+ },
591
+ {
592
+ "type": "object",
593
+ "properties": {
594
+ "type": {
595
+ "type": "string",
596
+ "const": "typeaheadSearch"
597
+ },
598
+ "meta": {
599
+ "$ref": "#/definitions/TableQuestion/properties/meta"
600
+ },
601
+ "graphQL": {
602
+ "$ref": "#/definitions/TableQuestion/properties/columns/items/anyOf/6/properties/graphQL"
603
+ }
604
+ },
605
+ "required": [
606
+ "type",
607
+ "meta",
608
+ "graphQL"
609
+ ],
610
+ "additionalProperties": false
611
+ },
612
+ {
613
+ "type": "object",
614
+ "properties": {
615
+ "type": {
616
+ "type": "string",
617
+ "const": "url"
618
+ },
619
+ "meta": {
620
+ "$ref": "#/definitions/TableQuestion/properties/meta"
621
+ },
622
+ "attributes": {
623
+ "type": "object",
624
+ "properties": {
625
+ "maxLength": {
626
+ "type": "number"
627
+ },
628
+ "minLength": {
629
+ "type": "number"
630
+ },
631
+ "pattern": {
632
+ "type": "string"
633
+ }
634
+ },
635
+ "additionalProperties": false
636
+ }
637
+ },
638
+ "required": [
639
+ "type",
640
+ "meta",
641
+ "attributes"
642
+ ],
643
+ "additionalProperties": false
644
+ }
645
+ ]
646
+ }
647
+ },
648
+ "attributes": {
649
+ "type": "object",
650
+ "properties": {
651
+ "canAddRows": {
652
+ "type": "boolean"
653
+ },
654
+ "canRemoveRows": {
655
+ "type": "boolean"
656
+ },
657
+ "initialRows": {
658
+ "type": "number"
659
+ },
660
+ "maxRows": {
661
+ "type": "number"
662
+ },
663
+ "minRows": {
664
+ "type": "number"
665
+ }
666
+ },
667
+ "additionalProperties": false
668
+ }
669
+ },
670
+ "required": [
671
+ "type",
672
+ "meta",
673
+ "columns",
674
+ "attributes"
675
+ ],
676
+ "additionalProperties": false
677
+ }
678
+ },
679
+ "$schema": "http://json-schema.org/draft-07/schema#"
680
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "$ref": "#/definitions/TextAnswer",
3
+ "definitions": {
4
+ "TextAnswer": {
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "const": "text"
10
+ },
11
+ "answer": {
12
+ "type": "string"
13
+ }
14
+ },
15
+ "required": [
16
+ "type",
17
+ "answer"
18
+ ],
19
+ "additionalProperties": false
20
+ }
21
+ },
22
+ "$schema": "http://json-schema.org/draft-07/schema#"
23
+ }