evo360-types 1.3.262 → 1.3.267
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-notifications/zod-schemas.d.ts +241 -0
- package/dist/apps/evo-notifications/zod-schemas.js +25 -1
- package/dist/apps/evo-notifications/zod-schemas.ts +26 -0
- package/dist/index.d.ts +4 -4
- package/dist/types/evo-notifications/fb_collections.d.ts +4 -0
- package/dist/types/evo-notifications/fb_collections.js +11 -0
- package/dist/types/evo-notifications/fb_collections.ts +11 -0
- package/dist/types/evo-notifications/index.d.ts +1 -0
- package/dist/types/evo-notifications/index.js +15 -0
- package/dist/types/evo-notifications/index.ts +2 -0
- package/package.json +7 -3
|
@@ -609,3 +609,244 @@ export declare const zNotificationLogSchema: z.ZodObject<{
|
|
|
609
609
|
data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
610
610
|
at: z.ZodDate;
|
|
611
611
|
}, z.ZodTypeAny, "passthrough">>;
|
|
612
|
+
export declare const zDirectSendPayloadSchema: z.ZodObject<{
|
|
613
|
+
tenant: z.ZodString;
|
|
614
|
+
kind: z.ZodLiteral<"notification.send">;
|
|
615
|
+
classification: z.ZodOptional<z.ZodString>;
|
|
616
|
+
importance: z.ZodOptional<z.ZodNumber>;
|
|
617
|
+
recipient: z.ZodObject<{
|
|
618
|
+
kind: z.ZodEnum<["patient", "professional", "preconfigured", "raw"]>;
|
|
619
|
+
id: z.ZodOptional<z.ZodString>;
|
|
620
|
+
ref: z.ZodOptional<z.ZodAny>;
|
|
621
|
+
address: z.ZodOptional<z.ZodString>;
|
|
622
|
+
display_name: z.ZodOptional<z.ZodString>;
|
|
623
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
624
|
+
kind: z.ZodEnum<["patient", "professional", "preconfigured", "raw"]>;
|
|
625
|
+
id: z.ZodOptional<z.ZodString>;
|
|
626
|
+
ref: z.ZodOptional<z.ZodAny>;
|
|
627
|
+
address: z.ZodOptional<z.ZodString>;
|
|
628
|
+
display_name: z.ZodOptional<z.ZodString>;
|
|
629
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
630
|
+
kind: z.ZodEnum<["patient", "professional", "preconfigured", "raw"]>;
|
|
631
|
+
id: z.ZodOptional<z.ZodString>;
|
|
632
|
+
ref: z.ZodOptional<z.ZodAny>;
|
|
633
|
+
address: z.ZodOptional<z.ZodString>;
|
|
634
|
+
display_name: z.ZodOptional<z.ZodString>;
|
|
635
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
636
|
+
channel: z.ZodObject<{
|
|
637
|
+
type: z.ZodEnum<["whatsapp", "email", "sms", "push"]>;
|
|
638
|
+
channel_id: z.ZodString;
|
|
639
|
+
sender_id: z.ZodOptional<z.ZodString>;
|
|
640
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
641
|
+
type: z.ZodEnum<["whatsapp", "email", "sms", "push"]>;
|
|
642
|
+
channel_id: z.ZodString;
|
|
643
|
+
sender_id: z.ZodOptional<z.ZodString>;
|
|
644
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
645
|
+
type: z.ZodEnum<["whatsapp", "email", "sms", "push"]>;
|
|
646
|
+
channel_id: z.ZodString;
|
|
647
|
+
sender_id: z.ZodOptional<z.ZodString>;
|
|
648
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
649
|
+
template: z.ZodOptional<z.ZodObject<{
|
|
650
|
+
template_id: z.ZodString;
|
|
651
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
652
|
+
version: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
653
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
654
|
+
template_id: z.ZodString;
|
|
655
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
656
|
+
version: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
657
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
658
|
+
template_id: z.ZodString;
|
|
659
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
660
|
+
version: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
661
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
662
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
663
|
+
routine: z.ZodOptional<z.ZodObject<{
|
|
664
|
+
id: z.ZodString;
|
|
665
|
+
version: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
666
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
667
|
+
id: z.ZodString;
|
|
668
|
+
version: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
669
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
670
|
+
id: z.ZodString;
|
|
671
|
+
version: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
672
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
673
|
+
idempotency_key: z.ZodOptional<z.ZodString>;
|
|
674
|
+
dedup_key: z.ZodOptional<z.ZodString>;
|
|
675
|
+
dedup_group_key: z.ZodOptional<z.ZodString>;
|
|
676
|
+
externalLinks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
677
|
+
type: z.ZodEnum<["crm_lead", "med_patient", "med_professional", "med_appointment", "chat_contact"]>;
|
|
678
|
+
id: z.ZodString;
|
|
679
|
+
label: z.ZodOptional<z.ZodString>;
|
|
680
|
+
ref: z.ZodOptional<z.ZodAny>;
|
|
681
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
682
|
+
type: z.ZodEnum<["crm_lead", "med_patient", "med_professional", "med_appointment", "chat_contact"]>;
|
|
683
|
+
id: z.ZodString;
|
|
684
|
+
label: z.ZodOptional<z.ZodString>;
|
|
685
|
+
ref: z.ZodOptional<z.ZodAny>;
|
|
686
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
687
|
+
type: z.ZodEnum<["crm_lead", "med_patient", "med_professional", "med_appointment", "chat_contact"]>;
|
|
688
|
+
id: z.ZodString;
|
|
689
|
+
label: z.ZodOptional<z.ZodString>;
|
|
690
|
+
ref: z.ZodOptional<z.ZodAny>;
|
|
691
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
692
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
693
|
+
tenant: z.ZodString;
|
|
694
|
+
kind: z.ZodLiteral<"notification.send">;
|
|
695
|
+
classification: z.ZodOptional<z.ZodString>;
|
|
696
|
+
importance: z.ZodOptional<z.ZodNumber>;
|
|
697
|
+
recipient: z.ZodObject<{
|
|
698
|
+
kind: z.ZodEnum<["patient", "professional", "preconfigured", "raw"]>;
|
|
699
|
+
id: z.ZodOptional<z.ZodString>;
|
|
700
|
+
ref: z.ZodOptional<z.ZodAny>;
|
|
701
|
+
address: z.ZodOptional<z.ZodString>;
|
|
702
|
+
display_name: z.ZodOptional<z.ZodString>;
|
|
703
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
704
|
+
kind: z.ZodEnum<["patient", "professional", "preconfigured", "raw"]>;
|
|
705
|
+
id: z.ZodOptional<z.ZodString>;
|
|
706
|
+
ref: z.ZodOptional<z.ZodAny>;
|
|
707
|
+
address: z.ZodOptional<z.ZodString>;
|
|
708
|
+
display_name: z.ZodOptional<z.ZodString>;
|
|
709
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
710
|
+
kind: z.ZodEnum<["patient", "professional", "preconfigured", "raw"]>;
|
|
711
|
+
id: z.ZodOptional<z.ZodString>;
|
|
712
|
+
ref: z.ZodOptional<z.ZodAny>;
|
|
713
|
+
address: z.ZodOptional<z.ZodString>;
|
|
714
|
+
display_name: z.ZodOptional<z.ZodString>;
|
|
715
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
716
|
+
channel: z.ZodObject<{
|
|
717
|
+
type: z.ZodEnum<["whatsapp", "email", "sms", "push"]>;
|
|
718
|
+
channel_id: z.ZodString;
|
|
719
|
+
sender_id: z.ZodOptional<z.ZodString>;
|
|
720
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
721
|
+
type: z.ZodEnum<["whatsapp", "email", "sms", "push"]>;
|
|
722
|
+
channel_id: z.ZodString;
|
|
723
|
+
sender_id: z.ZodOptional<z.ZodString>;
|
|
724
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
725
|
+
type: z.ZodEnum<["whatsapp", "email", "sms", "push"]>;
|
|
726
|
+
channel_id: z.ZodString;
|
|
727
|
+
sender_id: z.ZodOptional<z.ZodString>;
|
|
728
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
729
|
+
template: z.ZodOptional<z.ZodObject<{
|
|
730
|
+
template_id: z.ZodString;
|
|
731
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
732
|
+
version: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
733
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
734
|
+
template_id: z.ZodString;
|
|
735
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
736
|
+
version: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
737
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
738
|
+
template_id: z.ZodString;
|
|
739
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
740
|
+
version: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
741
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
742
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
743
|
+
routine: z.ZodOptional<z.ZodObject<{
|
|
744
|
+
id: z.ZodString;
|
|
745
|
+
version: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
746
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
747
|
+
id: z.ZodString;
|
|
748
|
+
version: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
749
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
750
|
+
id: z.ZodString;
|
|
751
|
+
version: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
752
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
753
|
+
idempotency_key: z.ZodOptional<z.ZodString>;
|
|
754
|
+
dedup_key: z.ZodOptional<z.ZodString>;
|
|
755
|
+
dedup_group_key: z.ZodOptional<z.ZodString>;
|
|
756
|
+
externalLinks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
757
|
+
type: z.ZodEnum<["crm_lead", "med_patient", "med_professional", "med_appointment", "chat_contact"]>;
|
|
758
|
+
id: z.ZodString;
|
|
759
|
+
label: z.ZodOptional<z.ZodString>;
|
|
760
|
+
ref: z.ZodOptional<z.ZodAny>;
|
|
761
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
762
|
+
type: z.ZodEnum<["crm_lead", "med_patient", "med_professional", "med_appointment", "chat_contact"]>;
|
|
763
|
+
id: z.ZodString;
|
|
764
|
+
label: z.ZodOptional<z.ZodString>;
|
|
765
|
+
ref: z.ZodOptional<z.ZodAny>;
|
|
766
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
767
|
+
type: z.ZodEnum<["crm_lead", "med_patient", "med_professional", "med_appointment", "chat_contact"]>;
|
|
768
|
+
id: z.ZodString;
|
|
769
|
+
label: z.ZodOptional<z.ZodString>;
|
|
770
|
+
ref: z.ZodOptional<z.ZodAny>;
|
|
771
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
772
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
773
|
+
tenant: z.ZodString;
|
|
774
|
+
kind: z.ZodLiteral<"notification.send">;
|
|
775
|
+
classification: z.ZodOptional<z.ZodString>;
|
|
776
|
+
importance: z.ZodOptional<z.ZodNumber>;
|
|
777
|
+
recipient: z.ZodObject<{
|
|
778
|
+
kind: z.ZodEnum<["patient", "professional", "preconfigured", "raw"]>;
|
|
779
|
+
id: z.ZodOptional<z.ZodString>;
|
|
780
|
+
ref: z.ZodOptional<z.ZodAny>;
|
|
781
|
+
address: z.ZodOptional<z.ZodString>;
|
|
782
|
+
display_name: z.ZodOptional<z.ZodString>;
|
|
783
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
784
|
+
kind: z.ZodEnum<["patient", "professional", "preconfigured", "raw"]>;
|
|
785
|
+
id: z.ZodOptional<z.ZodString>;
|
|
786
|
+
ref: z.ZodOptional<z.ZodAny>;
|
|
787
|
+
address: z.ZodOptional<z.ZodString>;
|
|
788
|
+
display_name: z.ZodOptional<z.ZodString>;
|
|
789
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
790
|
+
kind: z.ZodEnum<["patient", "professional", "preconfigured", "raw"]>;
|
|
791
|
+
id: z.ZodOptional<z.ZodString>;
|
|
792
|
+
ref: z.ZodOptional<z.ZodAny>;
|
|
793
|
+
address: z.ZodOptional<z.ZodString>;
|
|
794
|
+
display_name: z.ZodOptional<z.ZodString>;
|
|
795
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
796
|
+
channel: z.ZodObject<{
|
|
797
|
+
type: z.ZodEnum<["whatsapp", "email", "sms", "push"]>;
|
|
798
|
+
channel_id: z.ZodString;
|
|
799
|
+
sender_id: z.ZodOptional<z.ZodString>;
|
|
800
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
801
|
+
type: z.ZodEnum<["whatsapp", "email", "sms", "push"]>;
|
|
802
|
+
channel_id: z.ZodString;
|
|
803
|
+
sender_id: z.ZodOptional<z.ZodString>;
|
|
804
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
805
|
+
type: z.ZodEnum<["whatsapp", "email", "sms", "push"]>;
|
|
806
|
+
channel_id: z.ZodString;
|
|
807
|
+
sender_id: z.ZodOptional<z.ZodString>;
|
|
808
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
809
|
+
template: z.ZodOptional<z.ZodObject<{
|
|
810
|
+
template_id: z.ZodString;
|
|
811
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
812
|
+
version: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
813
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
814
|
+
template_id: z.ZodString;
|
|
815
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
816
|
+
version: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
817
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
818
|
+
template_id: z.ZodString;
|
|
819
|
+
locale: z.ZodOptional<z.ZodString>;
|
|
820
|
+
version: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
821
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
822
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
823
|
+
routine: z.ZodOptional<z.ZodObject<{
|
|
824
|
+
id: z.ZodString;
|
|
825
|
+
version: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
826
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
827
|
+
id: z.ZodString;
|
|
828
|
+
version: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
829
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
830
|
+
id: z.ZodString;
|
|
831
|
+
version: z.ZodOptional<z.ZodUnion<[z.ZodNumber, z.ZodString]>>;
|
|
832
|
+
}, z.ZodTypeAny, "passthrough">>>;
|
|
833
|
+
idempotency_key: z.ZodOptional<z.ZodString>;
|
|
834
|
+
dedup_key: z.ZodOptional<z.ZodString>;
|
|
835
|
+
dedup_group_key: z.ZodOptional<z.ZodString>;
|
|
836
|
+
externalLinks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
837
|
+
type: z.ZodEnum<["crm_lead", "med_patient", "med_professional", "med_appointment", "chat_contact"]>;
|
|
838
|
+
id: z.ZodString;
|
|
839
|
+
label: z.ZodOptional<z.ZodString>;
|
|
840
|
+
ref: z.ZodOptional<z.ZodAny>;
|
|
841
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
842
|
+
type: z.ZodEnum<["crm_lead", "med_patient", "med_professional", "med_appointment", "chat_contact"]>;
|
|
843
|
+
id: z.ZodString;
|
|
844
|
+
label: z.ZodOptional<z.ZodString>;
|
|
845
|
+
ref: z.ZodOptional<z.ZodAny>;
|
|
846
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
847
|
+
type: z.ZodEnum<["crm_lead", "med_patient", "med_professional", "med_appointment", "chat_contact"]>;
|
|
848
|
+
id: z.ZodString;
|
|
849
|
+
label: z.ZodOptional<z.ZodString>;
|
|
850
|
+
ref: z.ZodOptional<z.ZodAny>;
|
|
851
|
+
}, z.ZodTypeAny, "passthrough">>, "many">>;
|
|
852
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.zNotificationLogSchema = exports.zNotificationAttemptSchema = exports.zNotificationMessageSchema = exports.zNotificationErrorSchema = exports.zNotificationProviderMetaSchema = exports.zNotificationTemplateRefSchema = exports.zNotificationChannelRefSchema = exports.zNotificationRecipientSchema = exports.zNotificationLogLevelSchema = exports.zNotificationRecipientKindSchema = exports.zNotificationAttemptStatusSchema = exports.zNotificationMessageStatusSchema = exports.zNotificationChannelTypeSchema = void 0;
|
|
3
|
+
exports.zDirectSendPayloadSchema = exports.zNotificationLogSchema = exports.zNotificationAttemptSchema = exports.zNotificationMessageSchema = exports.zNotificationErrorSchema = exports.zNotificationProviderMetaSchema = exports.zNotificationTemplateRefSchema = exports.zNotificationChannelRefSchema = exports.zNotificationRecipientSchema = exports.zNotificationLogLevelSchema = exports.zNotificationRecipientKindSchema = exports.zNotificationAttemptStatusSchema = exports.zNotificationMessageStatusSchema = exports.zNotificationChannelTypeSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const zod_schemas_1 = require("../shared/zod-schemas");
|
|
6
6
|
const zod_schemas_2 = require("../evo-task/zod-schemas");
|
|
@@ -128,3 +128,27 @@ exports.zNotificationLogSchema = zod_schemas_1.zFireDocSchema
|
|
|
128
128
|
at: zod_1.z.coerce.date(),
|
|
129
129
|
})
|
|
130
130
|
.passthrough();
|
|
131
|
+
// ---- HTTP direct send (INotificationSendPayload + tenant + externalLinks) ----
|
|
132
|
+
exports.zDirectSendPayloadSchema = zod_1.z
|
|
133
|
+
.object({
|
|
134
|
+
tenant: zod_1.z.string().min(1),
|
|
135
|
+
kind: zod_1.z.literal("notification.send"),
|
|
136
|
+
classification: zod_1.z.string().optional(),
|
|
137
|
+
importance: zod_1.z.number().min(0).max(100).optional(),
|
|
138
|
+
recipient: exports.zNotificationRecipientSchema,
|
|
139
|
+
channel: exports.zNotificationChannelRefSchema,
|
|
140
|
+
template: exports.zNotificationTemplateRefSchema.optional(),
|
|
141
|
+
variables: zod_1.z.record(zod_1.z.unknown()).optional(),
|
|
142
|
+
routine: zod_1.z
|
|
143
|
+
.object({
|
|
144
|
+
id: zod_1.z.string(),
|
|
145
|
+
version: zod_1.z.union([zod_1.z.number(), zod_1.z.string()]).optional(),
|
|
146
|
+
})
|
|
147
|
+
.passthrough()
|
|
148
|
+
.optional(),
|
|
149
|
+
idempotency_key: zod_1.z.string().optional(),
|
|
150
|
+
dedup_key: zod_1.z.string().optional(),
|
|
151
|
+
dedup_group_key: zod_1.z.string().optional(),
|
|
152
|
+
externalLinks: zod_1.z.array(zod_schemas_2.zExternalLinkSchema).optional(),
|
|
153
|
+
})
|
|
154
|
+
.passthrough();
|
|
@@ -141,3 +141,29 @@ export const zNotificationLogSchema = zFireDocSchema
|
|
|
141
141
|
at: z.coerce.date(),
|
|
142
142
|
})
|
|
143
143
|
.passthrough();
|
|
144
|
+
|
|
145
|
+
// ---- HTTP direct send (INotificationSendPayload + tenant + externalLinks) ----
|
|
146
|
+
|
|
147
|
+
export const zDirectSendPayloadSchema = z
|
|
148
|
+
.object({
|
|
149
|
+
tenant: z.string().min(1),
|
|
150
|
+
kind: z.literal("notification.send"),
|
|
151
|
+
classification: z.string().optional(),
|
|
152
|
+
importance: z.number().min(0).max(100).optional(),
|
|
153
|
+
recipient: zNotificationRecipientSchema,
|
|
154
|
+
channel: zNotificationChannelRefSchema,
|
|
155
|
+
template: zNotificationTemplateRefSchema.optional(),
|
|
156
|
+
variables: z.record(z.unknown()).optional(),
|
|
157
|
+
routine: z
|
|
158
|
+
.object({
|
|
159
|
+
id: z.string(),
|
|
160
|
+
version: z.union([z.number(), z.string()]).optional(),
|
|
161
|
+
})
|
|
162
|
+
.passthrough()
|
|
163
|
+
.optional(),
|
|
164
|
+
idempotency_key: z.string().optional(),
|
|
165
|
+
dedup_key: z.string().optional(),
|
|
166
|
+
dedup_group_key: z.string().optional(),
|
|
167
|
+
externalLinks: z.array(zExternalLinkSchema).optional(),
|
|
168
|
+
})
|
|
169
|
+
.passthrough();
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// @evo360/types/index.ts
|
|
2
1
|
export * from "./types/shared";
|
|
3
2
|
export * from "./types/firebase/pubsub-sync";
|
|
4
3
|
export * from "./types/evo-core";
|
|
@@ -15,13 +14,13 @@ export * from "./types/evo-med/dic";
|
|
|
15
14
|
export * from "./types/evo-med/insurance";
|
|
16
15
|
export * from "./types/evo-med/people";
|
|
17
16
|
export * from "./types/evo-med/procedure";
|
|
18
|
-
export * from "./types/evo-task";
|
|
19
17
|
export * from "./types/evo-tags";
|
|
18
|
+
export * from "./types/evo-task";
|
|
20
19
|
export * from "./types/evo-survey";
|
|
21
20
|
export * from "./types/evo-finops";
|
|
22
21
|
export * from "./types/evo-notif-user";
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
export * from "./types/evo-notifications";
|
|
23
|
+
export * from "./types/evo-task-runner";
|
|
25
24
|
export * from "./apps/shared/zod-schemas";
|
|
26
25
|
export * from "./apps/evo-core/zod-schemas";
|
|
27
26
|
export * from "./apps/evo-tenant/zod-schemas";
|
|
@@ -44,3 +43,4 @@ export * from "./apps/evo-task/zod-schemas";
|
|
|
44
43
|
export * from "./apps/evo-survey/zod-schemas";
|
|
45
44
|
export * from "./apps/evo-finops/zod-schemas";
|
|
46
45
|
export * from "./apps/evo-notif-user/zod-schemas";
|
|
46
|
+
export * from "./apps/evo-notifications/zod-schemas";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NOTIFICATION_LOGS_COLLECTION = exports.NOTIFICATION_ATTEMPTS_COLLECTION = exports.NOTIFICATION_MESSAGES_COLLECTION = exports.EVO_NOTIFICATIONS_APP = void 0;
|
|
4
|
+
//EVO Notifications Application Doc
|
|
5
|
+
exports.EVO_NOTIFICATIONS_APP = "evo-notifications";
|
|
6
|
+
//Messages collection
|
|
7
|
+
exports.NOTIFICATION_MESSAGES_COLLECTION = "messages";
|
|
8
|
+
//Attempts sub-collection
|
|
9
|
+
exports.NOTIFICATION_ATTEMPTS_COLLECTION = "attempts";
|
|
10
|
+
//Logs sub-collection
|
|
11
|
+
exports.NOTIFICATION_LOGS_COLLECTION = "logs";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//EVO Notifications Application Doc
|
|
2
|
+
export const EVO_NOTIFICATIONS_APP = "evo-notifications";
|
|
3
|
+
|
|
4
|
+
//Messages collection
|
|
5
|
+
export const NOTIFICATION_MESSAGES_COLLECTION = "messages";
|
|
6
|
+
|
|
7
|
+
//Attempts sub-collection
|
|
8
|
+
export const NOTIFICATION_ATTEMPTS_COLLECTION = "attempts";
|
|
9
|
+
|
|
10
|
+
//Logs sub-collection
|
|
11
|
+
export const NOTIFICATION_LOGS_COLLECTION = "logs";
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
17
|
exports.NotificationRecipientKindEnum = exports.NotificationAttemptStatusEnum = exports.NotificationMessageStatusEnum = exports.NotificationChannelTypeEnum = exports.NotificationsTopics = exports.NotificationTaskKindEnum = exports.EvoNotificationsCollections = exports.EvoNotificationsPermissions = void 0;
|
|
18
|
+
__exportStar(require("./fb_collections"), exports);
|
|
4
19
|
// Permissões para as notificações
|
|
5
20
|
exports.EvoNotificationsPermissions = {
|
|
6
21
|
List: "evo_notifications_read",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "evo360-types",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.267",
|
|
4
4
|
"description": "HREVO360 Shared Types",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
],
|
|
10
10
|
"scripts": {
|
|
11
11
|
"prebuild": "node scripts/bump-version.cjs",
|
|
12
|
-
"
|
|
12
|
+
"clean": "rimraf dist",
|
|
13
|
+
"build": "npm run clean && tsc && copyfiles -u 1 -e \"**/*.d.ts\" src/**/*.ts dist",
|
|
13
14
|
"build-bkp": "tsc",
|
|
14
15
|
"compile": "tsc",
|
|
15
16
|
"bump": "node scripts/bump-version.cjs",
|
|
@@ -30,6 +31,9 @@
|
|
|
30
31
|
"zod": "^3.25.76"
|
|
31
32
|
},
|
|
32
33
|
"devDependencies": {
|
|
33
|
-
"
|
|
34
|
+
"copyfiles": "^2.4.1",
|
|
35
|
+
"rimraf": "^6.0.1",
|
|
36
|
+
"semver": "^7.7.2",
|
|
37
|
+
"typescript": "~5.8.3"
|
|
34
38
|
}
|
|
35
39
|
}
|