evo360-types 1.1.60 → 1.1.62
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/dist/apps/evo-survey/zod-schemas.d.ts +306 -12
- package/dist/apps/evo-survey/zod-schemas.js +20 -1
- package/dist/apps/evo-survey/zod-schemas.ts +22 -0
- package/dist/types/evo-survey/index.d.ts +20 -3
- package/dist/types/evo-survey/index.js +3 -0
- package/dist/types/evo-survey/index.ts +31 -1
- package/dist/types/shared/maska.d.ts +23 -0
- package/dist/types/shared/maska.js +2 -0
- package/dist/types/shared/maska.ts +26 -0
- package/package.json +1 -1
|
@@ -398,6 +398,300 @@ export declare const zSurveyQuestionMultipleChoiceSchema: z.ZodObject<z.objectUt
|
|
|
398
398
|
options: z.ZodArray<z.ZodString, "many">;
|
|
399
399
|
allow_multiple_selections: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
400
400
|
}>, z.ZodTypeAny, "passthrough">>;
|
|
401
|
+
export declare const zSurveyQuestionDateSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
402
|
+
id: z.ZodString;
|
|
403
|
+
ref: z.ZodAny;
|
|
404
|
+
tenant: z.ZodString;
|
|
405
|
+
model_ver: z.ZodOptional<z.ZodNumber>;
|
|
406
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
407
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
408
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
409
|
+
}, {
|
|
410
|
+
surveyId: z.ZodString;
|
|
411
|
+
sectionId: z.ZodString;
|
|
412
|
+
statement: z.ZodOptional<z.ZodString>;
|
|
413
|
+
description: z.ZodOptional<z.ZodString>;
|
|
414
|
+
description_text: z.ZodOptional<z.ZodString>;
|
|
415
|
+
order: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
416
|
+
required: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
417
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
418
|
+
name: z.ZodString;
|
|
419
|
+
color: z.ZodOptional<z.ZodString>;
|
|
420
|
+
hidden: z.ZodBoolean;
|
|
421
|
+
}, "strip", z.ZodTypeAny, {
|
|
422
|
+
name: string;
|
|
423
|
+
hidden: boolean;
|
|
424
|
+
color?: string | undefined;
|
|
425
|
+
}, {
|
|
426
|
+
name: string;
|
|
427
|
+
hidden: boolean;
|
|
428
|
+
color?: string | undefined;
|
|
429
|
+
}>, "many">>;
|
|
430
|
+
}>, {
|
|
431
|
+
type: z.ZodLiteral<"date">;
|
|
432
|
+
date_min: z.ZodOptional<z.ZodDate>;
|
|
433
|
+
date_max: z.ZodOptional<z.ZodDate>;
|
|
434
|
+
}>, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
435
|
+
id: z.ZodString;
|
|
436
|
+
ref: z.ZodAny;
|
|
437
|
+
tenant: z.ZodString;
|
|
438
|
+
model_ver: z.ZodOptional<z.ZodNumber>;
|
|
439
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
440
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
441
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
442
|
+
}, {
|
|
443
|
+
surveyId: z.ZodString;
|
|
444
|
+
sectionId: z.ZodString;
|
|
445
|
+
statement: z.ZodOptional<z.ZodString>;
|
|
446
|
+
description: z.ZodOptional<z.ZodString>;
|
|
447
|
+
description_text: z.ZodOptional<z.ZodString>;
|
|
448
|
+
order: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
449
|
+
required: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
450
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
451
|
+
name: z.ZodString;
|
|
452
|
+
color: z.ZodOptional<z.ZodString>;
|
|
453
|
+
hidden: z.ZodBoolean;
|
|
454
|
+
}, "strip", z.ZodTypeAny, {
|
|
455
|
+
name: string;
|
|
456
|
+
hidden: boolean;
|
|
457
|
+
color?: string | undefined;
|
|
458
|
+
}, {
|
|
459
|
+
name: string;
|
|
460
|
+
hidden: boolean;
|
|
461
|
+
color?: string | undefined;
|
|
462
|
+
}>, "many">>;
|
|
463
|
+
}>, {
|
|
464
|
+
type: z.ZodLiteral<"date">;
|
|
465
|
+
date_min: z.ZodOptional<z.ZodDate>;
|
|
466
|
+
date_max: z.ZodOptional<z.ZodDate>;
|
|
467
|
+
}>, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
468
|
+
id: z.ZodString;
|
|
469
|
+
ref: z.ZodAny;
|
|
470
|
+
tenant: z.ZodString;
|
|
471
|
+
model_ver: z.ZodOptional<z.ZodNumber>;
|
|
472
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
473
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
474
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
475
|
+
}, {
|
|
476
|
+
surveyId: z.ZodString;
|
|
477
|
+
sectionId: z.ZodString;
|
|
478
|
+
statement: z.ZodOptional<z.ZodString>;
|
|
479
|
+
description: z.ZodOptional<z.ZodString>;
|
|
480
|
+
description_text: z.ZodOptional<z.ZodString>;
|
|
481
|
+
order: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
482
|
+
required: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
483
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
484
|
+
name: z.ZodString;
|
|
485
|
+
color: z.ZodOptional<z.ZodString>;
|
|
486
|
+
hidden: z.ZodBoolean;
|
|
487
|
+
}, "strip", z.ZodTypeAny, {
|
|
488
|
+
name: string;
|
|
489
|
+
hidden: boolean;
|
|
490
|
+
color?: string | undefined;
|
|
491
|
+
}, {
|
|
492
|
+
name: string;
|
|
493
|
+
hidden: boolean;
|
|
494
|
+
color?: string | undefined;
|
|
495
|
+
}>, "many">>;
|
|
496
|
+
}>, {
|
|
497
|
+
type: z.ZodLiteral<"date">;
|
|
498
|
+
date_min: z.ZodOptional<z.ZodDate>;
|
|
499
|
+
date_max: z.ZodOptional<z.ZodDate>;
|
|
500
|
+
}>, z.ZodTypeAny, "passthrough">>;
|
|
501
|
+
export declare const zSurveyQuestionPhoneSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
502
|
+
id: z.ZodString;
|
|
503
|
+
ref: z.ZodAny;
|
|
504
|
+
tenant: z.ZodString;
|
|
505
|
+
model_ver: z.ZodOptional<z.ZodNumber>;
|
|
506
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
507
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
508
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
509
|
+
}, {
|
|
510
|
+
surveyId: z.ZodString;
|
|
511
|
+
sectionId: z.ZodString;
|
|
512
|
+
statement: z.ZodOptional<z.ZodString>;
|
|
513
|
+
description: z.ZodOptional<z.ZodString>;
|
|
514
|
+
description_text: z.ZodOptional<z.ZodString>;
|
|
515
|
+
order: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
516
|
+
required: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
517
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
518
|
+
name: z.ZodString;
|
|
519
|
+
color: z.ZodOptional<z.ZodString>;
|
|
520
|
+
hidden: z.ZodBoolean;
|
|
521
|
+
}, "strip", z.ZodTypeAny, {
|
|
522
|
+
name: string;
|
|
523
|
+
hidden: boolean;
|
|
524
|
+
color?: string | undefined;
|
|
525
|
+
}, {
|
|
526
|
+
name: string;
|
|
527
|
+
hidden: boolean;
|
|
528
|
+
color?: string | undefined;
|
|
529
|
+
}>, "many">>;
|
|
530
|
+
}>, {
|
|
531
|
+
type: z.ZodLiteral<"phone">;
|
|
532
|
+
mask: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
533
|
+
}>, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
534
|
+
id: z.ZodString;
|
|
535
|
+
ref: z.ZodAny;
|
|
536
|
+
tenant: z.ZodString;
|
|
537
|
+
model_ver: z.ZodOptional<z.ZodNumber>;
|
|
538
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
539
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
540
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
541
|
+
}, {
|
|
542
|
+
surveyId: z.ZodString;
|
|
543
|
+
sectionId: z.ZodString;
|
|
544
|
+
statement: z.ZodOptional<z.ZodString>;
|
|
545
|
+
description: z.ZodOptional<z.ZodString>;
|
|
546
|
+
description_text: z.ZodOptional<z.ZodString>;
|
|
547
|
+
order: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
548
|
+
required: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
549
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
550
|
+
name: z.ZodString;
|
|
551
|
+
color: z.ZodOptional<z.ZodString>;
|
|
552
|
+
hidden: z.ZodBoolean;
|
|
553
|
+
}, "strip", z.ZodTypeAny, {
|
|
554
|
+
name: string;
|
|
555
|
+
hidden: boolean;
|
|
556
|
+
color?: string | undefined;
|
|
557
|
+
}, {
|
|
558
|
+
name: string;
|
|
559
|
+
hidden: boolean;
|
|
560
|
+
color?: string | undefined;
|
|
561
|
+
}>, "many">>;
|
|
562
|
+
}>, {
|
|
563
|
+
type: z.ZodLiteral<"phone">;
|
|
564
|
+
mask: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
565
|
+
}>, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
566
|
+
id: z.ZodString;
|
|
567
|
+
ref: z.ZodAny;
|
|
568
|
+
tenant: z.ZodString;
|
|
569
|
+
model_ver: z.ZodOptional<z.ZodNumber>;
|
|
570
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
571
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
572
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
573
|
+
}, {
|
|
574
|
+
surveyId: z.ZodString;
|
|
575
|
+
sectionId: z.ZodString;
|
|
576
|
+
statement: z.ZodOptional<z.ZodString>;
|
|
577
|
+
description: z.ZodOptional<z.ZodString>;
|
|
578
|
+
description_text: z.ZodOptional<z.ZodString>;
|
|
579
|
+
order: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
580
|
+
required: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
581
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
582
|
+
name: z.ZodString;
|
|
583
|
+
color: z.ZodOptional<z.ZodString>;
|
|
584
|
+
hidden: z.ZodBoolean;
|
|
585
|
+
}, "strip", z.ZodTypeAny, {
|
|
586
|
+
name: string;
|
|
587
|
+
hidden: boolean;
|
|
588
|
+
color?: string | undefined;
|
|
589
|
+
}, {
|
|
590
|
+
name: string;
|
|
591
|
+
hidden: boolean;
|
|
592
|
+
color?: string | undefined;
|
|
593
|
+
}>, "many">>;
|
|
594
|
+
}>, {
|
|
595
|
+
type: z.ZodLiteral<"phone">;
|
|
596
|
+
mask: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
597
|
+
}>, z.ZodTypeAny, "passthrough">>;
|
|
598
|
+
export declare const zSurveyQuestionMaskSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
599
|
+
id: z.ZodString;
|
|
600
|
+
ref: z.ZodAny;
|
|
601
|
+
tenant: z.ZodString;
|
|
602
|
+
model_ver: z.ZodOptional<z.ZodNumber>;
|
|
603
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
604
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
605
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
606
|
+
}, {
|
|
607
|
+
surveyId: z.ZodString;
|
|
608
|
+
sectionId: z.ZodString;
|
|
609
|
+
statement: z.ZodOptional<z.ZodString>;
|
|
610
|
+
description: z.ZodOptional<z.ZodString>;
|
|
611
|
+
description_text: z.ZodOptional<z.ZodString>;
|
|
612
|
+
order: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
613
|
+
required: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
614
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
615
|
+
name: z.ZodString;
|
|
616
|
+
color: z.ZodOptional<z.ZodString>;
|
|
617
|
+
hidden: z.ZodBoolean;
|
|
618
|
+
}, "strip", z.ZodTypeAny, {
|
|
619
|
+
name: string;
|
|
620
|
+
hidden: boolean;
|
|
621
|
+
color?: string | undefined;
|
|
622
|
+
}, {
|
|
623
|
+
name: string;
|
|
624
|
+
hidden: boolean;
|
|
625
|
+
color?: string | undefined;
|
|
626
|
+
}>, "many">>;
|
|
627
|
+
}>, {
|
|
628
|
+
type: z.ZodLiteral<"mask">;
|
|
629
|
+
options: z.ZodOptional<z.ZodAny>;
|
|
630
|
+
}>, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
631
|
+
id: z.ZodString;
|
|
632
|
+
ref: z.ZodAny;
|
|
633
|
+
tenant: z.ZodString;
|
|
634
|
+
model_ver: z.ZodOptional<z.ZodNumber>;
|
|
635
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
636
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
637
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
638
|
+
}, {
|
|
639
|
+
surveyId: z.ZodString;
|
|
640
|
+
sectionId: z.ZodString;
|
|
641
|
+
statement: z.ZodOptional<z.ZodString>;
|
|
642
|
+
description: z.ZodOptional<z.ZodString>;
|
|
643
|
+
description_text: z.ZodOptional<z.ZodString>;
|
|
644
|
+
order: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
645
|
+
required: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
646
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
647
|
+
name: z.ZodString;
|
|
648
|
+
color: z.ZodOptional<z.ZodString>;
|
|
649
|
+
hidden: z.ZodBoolean;
|
|
650
|
+
}, "strip", z.ZodTypeAny, {
|
|
651
|
+
name: string;
|
|
652
|
+
hidden: boolean;
|
|
653
|
+
color?: string | undefined;
|
|
654
|
+
}, {
|
|
655
|
+
name: string;
|
|
656
|
+
hidden: boolean;
|
|
657
|
+
color?: string | undefined;
|
|
658
|
+
}>, "many">>;
|
|
659
|
+
}>, {
|
|
660
|
+
type: z.ZodLiteral<"mask">;
|
|
661
|
+
options: z.ZodOptional<z.ZodAny>;
|
|
662
|
+
}>, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
663
|
+
id: z.ZodString;
|
|
664
|
+
ref: z.ZodAny;
|
|
665
|
+
tenant: z.ZodString;
|
|
666
|
+
model_ver: z.ZodOptional<z.ZodNumber>;
|
|
667
|
+
created_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
668
|
+
updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
669
|
+
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
670
|
+
}, {
|
|
671
|
+
surveyId: z.ZodString;
|
|
672
|
+
sectionId: z.ZodString;
|
|
673
|
+
statement: z.ZodOptional<z.ZodString>;
|
|
674
|
+
description: z.ZodOptional<z.ZodString>;
|
|
675
|
+
description_text: z.ZodOptional<z.ZodString>;
|
|
676
|
+
order: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
677
|
+
required: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
678
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
679
|
+
name: z.ZodString;
|
|
680
|
+
color: z.ZodOptional<z.ZodString>;
|
|
681
|
+
hidden: z.ZodBoolean;
|
|
682
|
+
}, "strip", z.ZodTypeAny, {
|
|
683
|
+
name: string;
|
|
684
|
+
hidden: boolean;
|
|
685
|
+
color?: string | undefined;
|
|
686
|
+
}, {
|
|
687
|
+
name: string;
|
|
688
|
+
hidden: boolean;
|
|
689
|
+
color?: string | undefined;
|
|
690
|
+
}>, "many">>;
|
|
691
|
+
}>, {
|
|
692
|
+
type: z.ZodLiteral<"mask">;
|
|
693
|
+
options: z.ZodOptional<z.ZodAny>;
|
|
694
|
+
}>, z.ZodTypeAny, "passthrough">>;
|
|
401
695
|
export declare const zSurveySectionSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
402
696
|
id: z.ZodString;
|
|
403
697
|
ref: z.ZodAny;
|
|
@@ -544,9 +838,9 @@ export declare const zSurveyResponseSchema: z.ZodObject<z.objectUtil.extendShape
|
|
|
544
838
|
}>, "strip", z.ZodTypeAny, {
|
|
545
839
|
id: string;
|
|
546
840
|
tenant: string;
|
|
841
|
+
date: Date;
|
|
547
842
|
question_id: string;
|
|
548
843
|
answer: string | string[];
|
|
549
|
-
date: Date;
|
|
550
844
|
ref?: any;
|
|
551
845
|
model_ver?: number | undefined;
|
|
552
846
|
created_at?: Date | null | undefined;
|
|
@@ -555,9 +849,9 @@ export declare const zSurveyResponseSchema: z.ZodObject<z.objectUtil.extendShape
|
|
|
555
849
|
}, {
|
|
556
850
|
id: string;
|
|
557
851
|
tenant: string;
|
|
852
|
+
date: Date;
|
|
558
853
|
question_id: string;
|
|
559
854
|
answer: string | string[];
|
|
560
|
-
date: Date;
|
|
561
855
|
ref?: any;
|
|
562
856
|
model_ver?: number | undefined;
|
|
563
857
|
created_at?: Date | null | undefined;
|
|
@@ -594,9 +888,9 @@ export declare const zSurveySubmissionSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
594
888
|
}>, "strip", z.ZodTypeAny, {
|
|
595
889
|
id: string;
|
|
596
890
|
tenant: string;
|
|
891
|
+
date: Date;
|
|
597
892
|
question_id: string;
|
|
598
893
|
answer: string | string[];
|
|
599
|
-
date: Date;
|
|
600
894
|
ref?: any;
|
|
601
895
|
model_ver?: number | undefined;
|
|
602
896
|
created_at?: Date | null | undefined;
|
|
@@ -605,9 +899,9 @@ export declare const zSurveySubmissionSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
605
899
|
}, {
|
|
606
900
|
id: string;
|
|
607
901
|
tenant: string;
|
|
902
|
+
date: Date;
|
|
608
903
|
question_id: string;
|
|
609
904
|
answer: string | string[];
|
|
610
|
-
date: Date;
|
|
611
905
|
ref?: any;
|
|
612
906
|
model_ver?: number | undefined;
|
|
613
907
|
created_at?: Date | null | undefined;
|
|
@@ -631,9 +925,9 @@ export declare const zSurveySubmissionSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
631
925
|
responses?: {
|
|
632
926
|
id: string;
|
|
633
927
|
tenant: string;
|
|
928
|
+
date: Date;
|
|
634
929
|
question_id: string;
|
|
635
930
|
answer: string | string[];
|
|
636
|
-
date: Date;
|
|
637
931
|
ref?: any;
|
|
638
932
|
model_ver?: number | undefined;
|
|
639
933
|
created_at?: Date | null | undefined;
|
|
@@ -657,9 +951,9 @@ export declare const zSurveySubmissionSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
657
951
|
responses?: {
|
|
658
952
|
id: string;
|
|
659
953
|
tenant: string;
|
|
954
|
+
date: Date;
|
|
660
955
|
question_id: string;
|
|
661
956
|
answer: string | string[];
|
|
662
|
-
date: Date;
|
|
663
957
|
ref?: any;
|
|
664
958
|
model_ver?: number | undefined;
|
|
665
959
|
created_at?: Date | null | undefined;
|
|
@@ -903,9 +1197,9 @@ export declare const zSurveyDeploymentSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
903
1197
|
}>, "strip", z.ZodTypeAny, {
|
|
904
1198
|
id: string;
|
|
905
1199
|
tenant: string;
|
|
1200
|
+
date: Date;
|
|
906
1201
|
question_id: string;
|
|
907
1202
|
answer: string | string[];
|
|
908
|
-
date: Date;
|
|
909
1203
|
ref?: any;
|
|
910
1204
|
model_ver?: number | undefined;
|
|
911
1205
|
created_at?: Date | null | undefined;
|
|
@@ -914,9 +1208,9 @@ export declare const zSurveyDeploymentSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
914
1208
|
}, {
|
|
915
1209
|
id: string;
|
|
916
1210
|
tenant: string;
|
|
1211
|
+
date: Date;
|
|
917
1212
|
question_id: string;
|
|
918
1213
|
answer: string | string[];
|
|
919
|
-
date: Date;
|
|
920
1214
|
ref?: any;
|
|
921
1215
|
model_ver?: number | undefined;
|
|
922
1216
|
created_at?: Date | null | undefined;
|
|
@@ -940,9 +1234,9 @@ export declare const zSurveyDeploymentSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
940
1234
|
responses?: {
|
|
941
1235
|
id: string;
|
|
942
1236
|
tenant: string;
|
|
1237
|
+
date: Date;
|
|
943
1238
|
question_id: string;
|
|
944
1239
|
answer: string | string[];
|
|
945
|
-
date: Date;
|
|
946
1240
|
ref?: any;
|
|
947
1241
|
model_ver?: number | undefined;
|
|
948
1242
|
created_at?: Date | null | undefined;
|
|
@@ -966,9 +1260,9 @@ export declare const zSurveyDeploymentSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
966
1260
|
responses?: {
|
|
967
1261
|
id: string;
|
|
968
1262
|
tenant: string;
|
|
1263
|
+
date: Date;
|
|
969
1264
|
question_id: string;
|
|
970
1265
|
answer: string | string[];
|
|
971
|
-
date: Date;
|
|
972
1266
|
ref?: any;
|
|
973
1267
|
model_ver?: number | undefined;
|
|
974
1268
|
created_at?: Date | null | undefined;
|
|
@@ -1012,9 +1306,9 @@ export declare const zSurveyDeploymentSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
1012
1306
|
responses?: {
|
|
1013
1307
|
id: string;
|
|
1014
1308
|
tenant: string;
|
|
1309
|
+
date: Date;
|
|
1015
1310
|
question_id: string;
|
|
1016
1311
|
answer: string | string[];
|
|
1017
|
-
date: Date;
|
|
1018
1312
|
ref?: any;
|
|
1019
1313
|
model_ver?: number | undefined;
|
|
1020
1314
|
created_at?: Date | null | undefined;
|
|
@@ -1107,9 +1401,9 @@ export declare const zSurveyDeploymentSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
1107
1401
|
responses?: {
|
|
1108
1402
|
id: string;
|
|
1109
1403
|
tenant: string;
|
|
1404
|
+
date: Date;
|
|
1110
1405
|
question_id: string;
|
|
1111
1406
|
answer: string | string[];
|
|
1112
|
-
date: Date;
|
|
1113
1407
|
ref?: any;
|
|
1114
1408
|
model_ver?: number | undefined;
|
|
1115
1409
|
created_at?: Date | null | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.zSurveyDeploymentSchema = exports.zSurveyInviteeSchema = exports.zSurveySubmissionSchema = exports.zSurveyResponseSchema = exports.zSurveySchema = exports.zSurveySectionSchema = exports.zSurveyQuestionMultipleChoiceSchema = exports.zSurveyQuestionEssaySchema = exports.zSurveyQuestionScaleSchema = exports.zSurveyQuestionSchema = exports.zSurveySubmissionStatusSchema = exports.zSurveyDeploymentStatusSchema = exports.zSurveyQuestionTypeSchema = exports.zSurveyStatusSchema = exports.zSurveyTypeSchema = exports.zSurveyPermissionSchema = exports.zSurveyDeploymentActionSchema = exports.zSurveyActionSchema = void 0;
|
|
3
|
+
exports.zSurveyDeploymentSchema = exports.zSurveyInviteeSchema = exports.zSurveySubmissionSchema = exports.zSurveyResponseSchema = exports.zSurveySchema = exports.zSurveySectionSchema = exports.zSurveyQuestionMaskSchema = exports.zSurveyQuestionPhoneSchema = exports.zSurveyQuestionDateSchema = exports.zSurveyQuestionMultipleChoiceSchema = exports.zSurveyQuestionEssaySchema = exports.zSurveyQuestionScaleSchema = exports.zSurveyQuestionSchema = exports.zSurveySubmissionStatusSchema = exports.zSurveyDeploymentStatusSchema = exports.zSurveyQuestionTypeSchema = exports.zSurveyStatusSchema = exports.zSurveyTypeSchema = exports.zSurveyPermissionSchema = exports.zSurveyDeploymentActionSchema = exports.zSurveyActionSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const zod_schemas_1 = require("../shared/zod-schemas");
|
|
6
6
|
exports.zSurveyActionSchema = zod_1.z.enum([
|
|
@@ -68,6 +68,25 @@ exports.zSurveyQuestionMultipleChoiceSchema = exports.zSurveyQuestionSchema // E
|
|
|
68
68
|
options: zod_1.z.array(zod_1.z.string().min(1).max(512)).min(1).max(20),
|
|
69
69
|
allow_multiple_selections: zod_1.z.boolean().optional().default(false),
|
|
70
70
|
});
|
|
71
|
+
// Question Date
|
|
72
|
+
exports.zSurveyQuestionDateSchema = exports.zSurveyQuestionSchema // Extend from zSurveyQuestionSchema
|
|
73
|
+
.extend({
|
|
74
|
+
type: zod_1.z.literal("date"),
|
|
75
|
+
date_min: zod_1.z.coerce.date().optional(),
|
|
76
|
+
date_max: zod_1.z.coerce.date().optional(),
|
|
77
|
+
});
|
|
78
|
+
// Question Phone
|
|
79
|
+
exports.zSurveyQuestionPhoneSchema = exports.zSurveyQuestionSchema // Extend from zSurveyQuestionSchema
|
|
80
|
+
.extend({
|
|
81
|
+
type: zod_1.z.literal("phone"),
|
|
82
|
+
mask: zod_1.z.string().optional().default("(##) #####-####"),
|
|
83
|
+
});
|
|
84
|
+
// Question Mask
|
|
85
|
+
exports.zSurveyQuestionMaskSchema = exports.zSurveyQuestionSchema // Extend from zSurveyQuestionSchema
|
|
86
|
+
.extend({
|
|
87
|
+
type: zod_1.z.literal("mask"),
|
|
88
|
+
options: zod_1.z.any().optional(), // You might want to create a more specific schema for MaskOptions
|
|
89
|
+
});
|
|
71
90
|
// Survey Section
|
|
72
91
|
exports.zSurveySectionSchema = zod_schemas_1.zFireDocSchema // Extend from FireDocSchema
|
|
73
92
|
.extend({
|
|
@@ -78,6 +78,28 @@ export const zSurveyQuestionMultipleChoiceSchema = zSurveyQuestionSchema // Exte
|
|
|
78
78
|
allow_multiple_selections: z.boolean().optional().default(false),
|
|
79
79
|
});
|
|
80
80
|
|
|
81
|
+
// Question Date
|
|
82
|
+
export const zSurveyQuestionDateSchema = zSurveyQuestionSchema // Extend from zSurveyQuestionSchema
|
|
83
|
+
.extend({
|
|
84
|
+
type: z.literal("date"),
|
|
85
|
+
date_min: z.coerce.date().optional(),
|
|
86
|
+
date_max: z.coerce.date().optional(),
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
// Question Phone
|
|
90
|
+
export const zSurveyQuestionPhoneSchema = zSurveyQuestionSchema // Extend from zSurveyQuestionSchema
|
|
91
|
+
.extend({
|
|
92
|
+
type: z.literal("phone"),
|
|
93
|
+
mask: z.string().optional().default("(##) #####-####"),
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
// Question Mask
|
|
97
|
+
export const zSurveyQuestionMaskSchema = zSurveyQuestionSchema // Extend from zSurveyQuestionSchema
|
|
98
|
+
.extend({
|
|
99
|
+
type: z.literal("mask"),
|
|
100
|
+
options: z.any().optional(), // You might want to create a more specific schema for MaskOptions
|
|
101
|
+
});
|
|
102
|
+
|
|
81
103
|
// Survey Section
|
|
82
104
|
export const zSurveySectionSchema = zFireDocSchema // Extend from FireDocSchema
|
|
83
105
|
.extend({
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from "./fb_collections";
|
|
2
2
|
import { FirestoreDocumentReference, IFireDoc, ITag } from "../shared";
|
|
3
|
+
import { MaskOptions } from "../shared/maska";
|
|
3
4
|
export type SurveyAction = "CREATE_SURVEY" | "DELETE_SURVEY" | "UPDATE_SURVEY";
|
|
4
5
|
export declare enum ISurveyAction {
|
|
5
6
|
Create_survey = "CREATE_SURVEY",
|
|
@@ -29,11 +30,14 @@ export declare enum ISurveyStatus {
|
|
|
29
30
|
Ready = "ready",
|
|
30
31
|
Archived = "archived"
|
|
31
32
|
}
|
|
32
|
-
export type SurveyQuestionType = "scale" | "essay" | "options";
|
|
33
|
+
export type SurveyQuestionType = "scale" | "essay" | "options" | "date" | "phone" | "mask";
|
|
33
34
|
export declare enum ISurveyQuestionType {
|
|
34
35
|
Scale = "scale",
|
|
35
36
|
Essay = "essay",
|
|
36
|
-
Options = "options"
|
|
37
|
+
Options = "options",
|
|
38
|
+
Date = "date",
|
|
39
|
+
Phone = "phone",
|
|
40
|
+
Mask = "mask"
|
|
37
41
|
}
|
|
38
42
|
export interface ISectionCounters {
|
|
39
43
|
deleted: number;
|
|
@@ -69,12 +73,25 @@ export interface ISurveyQuestionMultipleChoice extends ISurveyQuestion {
|
|
|
69
73
|
options: string[];
|
|
70
74
|
allow_multiple_selections?: boolean;
|
|
71
75
|
}
|
|
76
|
+
export interface ISurveyQuestionDate extends ISurveyQuestion {
|
|
77
|
+
type: "date";
|
|
78
|
+
date_min?: Date;
|
|
79
|
+
date_max?: Date;
|
|
80
|
+
}
|
|
81
|
+
export interface ISurveyQuestionPhone extends ISurveyQuestion {
|
|
82
|
+
type: "phone";
|
|
83
|
+
mask?: MaskOptions;
|
|
84
|
+
}
|
|
85
|
+
export interface ISurveyQuestionMask extends ISurveyQuestion {
|
|
86
|
+
type: "mask";
|
|
87
|
+
options?: MaskOptions;
|
|
88
|
+
}
|
|
72
89
|
export interface ISurveySection extends IFireDoc {
|
|
73
90
|
surveyId: string;
|
|
74
91
|
name: string;
|
|
75
92
|
description?: string;
|
|
76
93
|
order?: number;
|
|
77
|
-
questions?: (ISurveyQuestionEssay | ISurveyQuestionScale | ISurveyQuestionMultipleChoice)[];
|
|
94
|
+
questions?: (ISurveyQuestionEssay | ISurveyQuestionScale | ISurveyQuestionMultipleChoice | ISurveyQuestionDate | ISurveyQuestionPhone | ISurveyQuestionMask)[];
|
|
78
95
|
readonly question_counters?: IQuestionCounters;
|
|
79
96
|
}
|
|
80
97
|
export interface ISurvey extends IFireDoc {
|
|
@@ -50,6 +50,9 @@ var ISurveyQuestionType;
|
|
|
50
50
|
ISurveyQuestionType["Scale"] = "scale";
|
|
51
51
|
ISurveyQuestionType["Essay"] = "essay";
|
|
52
52
|
ISurveyQuestionType["Options"] = "options";
|
|
53
|
+
ISurveyQuestionType["Date"] = "date";
|
|
54
|
+
ISurveyQuestionType["Phone"] = "phone";
|
|
55
|
+
ISurveyQuestionType["Mask"] = "mask";
|
|
53
56
|
})(ISurveyQuestionType = exports.ISurveyQuestionType || (exports.ISurveyQuestionType = {}));
|
|
54
57
|
var ISurveyDeploymentStatus;
|
|
55
58
|
(function (ISurveyDeploymentStatus) {
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export * from "./fb_collections";
|
|
2
|
+
|
|
2
3
|
import { FirestoreDocumentReference, IFireDoc, ITag } from "../shared";
|
|
4
|
+
import { MaskOptions } from "../shared/maska";
|
|
5
|
+
|
|
3
6
|
// ---- Survey
|
|
4
7
|
|
|
5
8
|
// Enum for Survey Action - used in Activities tracking
|
|
@@ -41,11 +44,20 @@ export enum ISurveyStatus {
|
|
|
41
44
|
Archived = "archived",
|
|
42
45
|
}
|
|
43
46
|
|
|
44
|
-
export type SurveyQuestionType =
|
|
47
|
+
export type SurveyQuestionType =
|
|
48
|
+
| "scale"
|
|
49
|
+
| "essay"
|
|
50
|
+
| "options"
|
|
51
|
+
| "date"
|
|
52
|
+
| "phone"
|
|
53
|
+
| "mask";
|
|
45
54
|
export enum ISurveyQuestionType {
|
|
46
55
|
Scale = "scale",
|
|
47
56
|
Essay = "essay",
|
|
48
57
|
Options = "options",
|
|
58
|
+
Date = "date",
|
|
59
|
+
Phone = "phone",
|
|
60
|
+
Mask = "mask",
|
|
49
61
|
}
|
|
50
62
|
|
|
51
63
|
export interface ISectionCounters {
|
|
@@ -88,6 +100,21 @@ export interface ISurveyQuestionMultipleChoice extends ISurveyQuestion {
|
|
|
88
100
|
allow_multiple_selections?: boolean;
|
|
89
101
|
}
|
|
90
102
|
|
|
103
|
+
export interface ISurveyQuestionDate extends ISurveyQuestion {
|
|
104
|
+
type: "date";
|
|
105
|
+
date_min?: Date;
|
|
106
|
+
date_max?: Date;
|
|
107
|
+
}
|
|
108
|
+
export interface ISurveyQuestionPhone extends ISurveyQuestion {
|
|
109
|
+
type: "phone";
|
|
110
|
+
mask?: MaskOptions;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export interface ISurveyQuestionMask extends ISurveyQuestion {
|
|
114
|
+
type: "mask";
|
|
115
|
+
options?: MaskOptions;
|
|
116
|
+
}
|
|
117
|
+
|
|
91
118
|
export interface ISurveySection extends IFireDoc {
|
|
92
119
|
surveyId: string;
|
|
93
120
|
name: string;
|
|
@@ -97,6 +124,9 @@ export interface ISurveySection extends IFireDoc {
|
|
|
97
124
|
| ISurveyQuestionEssay
|
|
98
125
|
| ISurveyQuestionScale
|
|
99
126
|
| ISurveyQuestionMultipleChoice
|
|
127
|
+
| ISurveyQuestionDate
|
|
128
|
+
| ISurveyQuestionPhone
|
|
129
|
+
| ISurveyQuestionMask
|
|
100
130
|
)[];
|
|
101
131
|
readonly question_counters?: IQuestionCounters;
|
|
102
132
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface MaskOptions {
|
|
2
|
+
mask?: MaskType;
|
|
3
|
+
tokens?: MaskTokens;
|
|
4
|
+
tokensReplace?: boolean;
|
|
5
|
+
eager?: boolean;
|
|
6
|
+
reversed?: boolean;
|
|
7
|
+
number?: MaskNumber;
|
|
8
|
+
}
|
|
9
|
+
type MaskType = string | string[] | ((input: string) => string) | null;
|
|
10
|
+
interface MaskToken {
|
|
11
|
+
pattern: RegExp;
|
|
12
|
+
multiple?: boolean;
|
|
13
|
+
optional?: boolean;
|
|
14
|
+
repeated?: boolean;
|
|
15
|
+
transform?: (char: string) => string;
|
|
16
|
+
}
|
|
17
|
+
type MaskTokens = Record<string, MaskToken>;
|
|
18
|
+
interface MaskNumber {
|
|
19
|
+
locale?: string;
|
|
20
|
+
fraction?: number;
|
|
21
|
+
unsigned?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface MaskOptions {
|
|
2
|
+
mask?: MaskType;
|
|
3
|
+
tokens?: MaskTokens;
|
|
4
|
+
tokensReplace?: boolean;
|
|
5
|
+
eager?: boolean;
|
|
6
|
+
reversed?: boolean;
|
|
7
|
+
number?: MaskNumber;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
type MaskType = string | string[] | ((input: string) => string) | null;
|
|
11
|
+
|
|
12
|
+
interface MaskToken {
|
|
13
|
+
pattern: RegExp;
|
|
14
|
+
multiple?: boolean;
|
|
15
|
+
optional?: boolean;
|
|
16
|
+
repeated?: boolean;
|
|
17
|
+
transform?: (char: string) => string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
type MaskTokens = Record<string, MaskToken>;
|
|
21
|
+
|
|
22
|
+
interface MaskNumber {
|
|
23
|
+
locale?: string;
|
|
24
|
+
fraction?: number;
|
|
25
|
+
unsigned?: boolean;
|
|
26
|
+
}
|