@kl1/contracts 1.0.78 → 1.0.80
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/index.js +1746 -1392
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1745 -1392
- package/dist/index.mjs.map +1 -1
- package/dist/src/call-log/schema.d.ts +6 -6
- package/dist/src/call-log/validation.d.ts +4 -4
- package/dist/src/channel/index.d.ts +59 -59
- package/dist/src/channel/schema.d.ts +4 -4
- package/dist/src/channel/schema.d.ts.map +1 -1
- package/dist/src/channel/validation.d.ts +3 -3
- package/dist/src/chat/index.d.ts +6967 -3685
- package/dist/src/chat/index.d.ts.map +1 -1
- package/dist/src/chat/schema.d.ts +3294 -990
- package/dist/src/chat/schema.d.ts.map +1 -1
- package/dist/src/chat/validation.d.ts +1947 -306
- package/dist/src/chat/validation.d.ts.map +1 -1
- package/dist/src/comment/index.d.ts +584 -584
- package/dist/src/comment/schema.d.ts +144 -144
- package/dist/src/contact/index.d.ts +4 -1
- package/dist/src/contact/index.d.ts.map +1 -1
- package/dist/src/contact/schema.d.ts +156 -0
- package/dist/src/contact/schema.d.ts.map +1 -1
- package/dist/src/contract.d.ts +35549 -20637
- package/dist/src/contract.d.ts.map +1 -1
- package/dist/src/cx-log/index.d.ts +950 -101
- package/dist/src/cx-log/index.d.ts.map +1 -1
- package/dist/src/cx-log/schema.d.ts +810 -71
- package/dist/src/cx-log/schema.d.ts.map +1 -1
- package/dist/src/dashboard/index.d.ts +4 -4
- package/dist/src/dashboard/schema.d.ts +2 -2
- package/dist/src/index.d.ts +0 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/instagram/index.d.ts +2162 -343
- package/dist/src/instagram/index.d.ts.map +1 -1
- package/dist/src/line/index.d.ts +1919 -278
- package/dist/src/line/index.d.ts.map +1 -1
- package/dist/src/mail/mail-contract.d.ts +130 -130
- package/dist/src/mail/message-contract.d.ts +6 -6
- package/dist/src/mail/room-contract.d.ts +124 -124
- package/dist/src/mail/schemas/message.schema.d.ts +4 -4
- package/dist/src/mail/schemas/room-validation.schema.d.ts +40 -40
- package/dist/src/mail/schemas/room.schema.d.ts +30 -30
- package/dist/src/messenger/index.d.ts +2516 -516
- package/dist/src/messenger/index.d.ts.map +1 -1
- package/dist/src/messenger/validation.d.ts +1523 -0
- package/dist/src/messenger/validation.d.ts.map +1 -1
- package/dist/src/notification/index.d.ts +742 -0
- package/dist/src/notification/index.d.ts.map +1 -0
- package/dist/src/notification/schema.d.ts +48 -0
- package/dist/src/notification/schema.d.ts.map +1 -0
- package/dist/src/notification/validation.d.ts +148 -0
- package/dist/src/notification/validation.d.ts.map +1 -0
- package/dist/src/telephony-cdr/index.d.ts +3036 -818
- package/dist/src/telephony-cdr/index.d.ts.map +1 -1
- package/dist/src/telephony-cdr/schema.d.ts +841 -7
- package/dist/src/telephony-cdr/schema.d.ts.map +1 -1
- package/dist/src/telephony-cdr/validation.d.ts +4 -4
- package/dist/src/ticket/index.d.ts +1106 -1106
- package/dist/src/ticket/schema.d.ts +72 -72
- package/dist/src/ticket/validation.d.ts +12 -12
- package/dist/src/viber/index.d.ts +3525 -1159
- package/dist/src/viber/index.d.ts.map +1 -1
- package/dist/src/wrap-up-form/index.d.ts +19 -19
- package/dist/src/wrap-up-form/schema.d.ts +2 -2
- package/dist/src/wrap-up-form/validation.d.ts +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -39,12 +39,13 @@ __export(src_exports, {
|
|
39
39
|
commentActivityContract: () => commentActivityContract,
|
40
40
|
commentContract: () => commentContract,
|
41
41
|
companyContract: () => companyContract,
|
42
|
-
contactContract: () =>
|
42
|
+
contactContract: () => contactContract2,
|
43
43
|
cxLogContract: () => cxLogContract,
|
44
44
|
dashboardContract: () => dashboardContract,
|
45
45
|
evaluateFormContract: () => evaluateFormContract,
|
46
46
|
extensionContract: () => extensionContract2,
|
47
47
|
mainChatContract: () => mainChatContract,
|
48
|
+
notificationContract: () => notificationContract,
|
48
49
|
permissionContract: () => permissionContract,
|
49
50
|
platformContract: () => platformContract,
|
50
51
|
receiveMessageContract: () => receiveMessageContract,
|
@@ -60,7 +61,7 @@ __export(src_exports, {
|
|
60
61
|
module.exports = __toCommonJS(src_exports);
|
61
62
|
|
62
63
|
// src/contract.ts
|
63
|
-
var
|
64
|
+
var import_core38 = require("@ts-rest/core");
|
64
65
|
|
65
66
|
// src/activity-log/index.ts
|
66
67
|
var import_core = require("@ts-rest/core");
|
@@ -680,129 +681,113 @@ var import_core6 = require("@ts-rest/core");
|
|
680
681
|
var import_zod32 = __toESM(require("zod"));
|
681
682
|
|
682
683
|
// src/messenger/validation.ts
|
683
|
-
var
|
684
|
-
var GetFacebookPagesSchema = import_zod16.default.object({
|
685
|
-
data: import_zod16.default.array(
|
686
|
-
import_zod16.default.object({
|
687
|
-
// biome-ignore lint/style/useNamingConvention: <explanation>
|
688
|
-
access_token: import_zod16.default.string(),
|
689
|
-
category: import_zod16.default.string(),
|
690
|
-
// biome-ignore lint/style/useNamingConvention: <explanation>
|
691
|
-
category_list: import_zod16.default.array(
|
692
|
-
import_zod16.default.object({
|
693
|
-
id: import_zod16.default.string(),
|
694
|
-
name: import_zod16.default.string()
|
695
|
-
})
|
696
|
-
),
|
697
|
-
id: import_zod16.default.string(),
|
698
|
-
name: import_zod16.default.string(),
|
699
|
-
tasks: import_zod16.default.string().array()
|
700
|
-
})
|
701
|
-
),
|
702
|
-
paging: import_zod16.default.object({
|
703
|
-
cursors: import_zod16.default.object({
|
704
|
-
before: import_zod16.default.string().optional(),
|
705
|
-
after: import_zod16.default.string().optional()
|
706
|
-
})
|
707
|
-
}).optional()
|
708
|
-
});
|
709
|
-
var GetFacebookPagesQuerySchema = import_zod16.default.object({
|
710
|
-
accessToken: import_zod16.default.string(),
|
711
|
-
userId: import_zod16.default.string()
|
712
|
-
});
|
684
|
+
var import_zod27 = __toESM(require("zod"));
|
713
685
|
|
714
686
|
// src/channel/schema.ts
|
715
|
-
var
|
716
|
-
var ChannelTypeSchema =
|
687
|
+
var import_zod16 = __toESM(require("zod"));
|
688
|
+
var ChannelTypeSchema = import_zod16.default.enum([
|
717
689
|
"whatsapp",
|
718
690
|
"messenger",
|
719
691
|
"telegram",
|
692
|
+
"instagram",
|
720
693
|
"line",
|
721
694
|
"viber",
|
722
695
|
"kakao",
|
723
696
|
"shopee",
|
724
|
-
"lazada"
|
725
|
-
"instagram"
|
697
|
+
"lazada"
|
726
698
|
]);
|
727
|
-
var ChannelStatusTypeSchema =
|
728
|
-
|
699
|
+
var ChannelStatusTypeSchema = import_zod16.default.union([
|
700
|
+
import_zod16.default.literal(true),
|
729
701
|
// on
|
730
|
-
|
702
|
+
import_zod16.default.literal(false)
|
731
703
|
// off
|
732
704
|
]);
|
733
|
-
var ChannelMetadataSchema =
|
734
|
-
id:
|
735
|
-
name:
|
736
|
-
accessToken:
|
737
|
-
channelSecret:
|
738
|
-
additionalCredentials:
|
739
|
-
});
|
740
|
-
var ChannelSchema =
|
741
|
-
id:
|
742
|
-
createdAt:
|
743
|
-
updatedAt:
|
744
|
-
deletedAt:
|
745
|
-
name:
|
705
|
+
var ChannelMetadataSchema = import_zod16.default.object({
|
706
|
+
id: import_zod16.default.string(),
|
707
|
+
name: import_zod16.default.string(),
|
708
|
+
accessToken: import_zod16.default.string(),
|
709
|
+
channelSecret: import_zod16.default.string().optional(),
|
710
|
+
additionalCredentials: import_zod16.default.any().optional()
|
711
|
+
});
|
712
|
+
var ChannelSchema = import_zod16.default.object({
|
713
|
+
id: import_zod16.default.string().uuid(),
|
714
|
+
createdAt: import_zod16.default.date(),
|
715
|
+
updatedAt: import_zod16.default.date(),
|
716
|
+
deletedAt: import_zod16.default.date().nullable(),
|
717
|
+
name: import_zod16.default.string(),
|
746
718
|
type: ChannelTypeSchema,
|
747
719
|
metadata: ChannelMetadataSchema,
|
748
|
-
brandName:
|
749
|
-
platformId:
|
720
|
+
brandName: import_zod16.default.string(),
|
721
|
+
platformId: import_zod16.default.string(),
|
750
722
|
status: ChannelStatusTypeSchema,
|
751
|
-
isReloginRequired:
|
752
|
-
connectedUserName:
|
753
|
-
connectedUserId:
|
754
|
-
actor:
|
755
|
-
id:
|
756
|
-
createdAt:
|
757
|
-
updatedAt:
|
758
|
-
deletedAt:
|
759
|
-
name:
|
760
|
-
email:
|
761
|
-
emailVerifiedAt:
|
762
|
-
password:
|
763
|
-
address:
|
764
|
-
phone:
|
765
|
-
notificationCount:
|
766
|
-
roles:
|
767
|
-
|
768
|
-
id:
|
769
|
-
createdAt:
|
770
|
-
updatedAt:
|
771
|
-
deletedAt:
|
772
|
-
systemName:
|
773
|
-
displayName:
|
774
|
-
description:
|
775
|
-
permissions:
|
776
|
-
|
777
|
-
id:
|
778
|
-
createdAt:
|
779
|
-
updatedAt:
|
780
|
-
deletedAt:
|
781
|
-
systemName:
|
782
|
-
displayName:
|
783
|
-
description:
|
723
|
+
isReloginRequired: import_zod16.default.boolean(),
|
724
|
+
connectedUserName: import_zod16.default.string(),
|
725
|
+
connectedUserId: import_zod16.default.string(),
|
726
|
+
actor: import_zod16.default.object({
|
727
|
+
id: import_zod16.default.string().uuid(),
|
728
|
+
createdAt: import_zod16.default.date(),
|
729
|
+
updatedAt: import_zod16.default.date(),
|
730
|
+
deletedAt: import_zod16.default.date().nullable(),
|
731
|
+
name: import_zod16.default.string(),
|
732
|
+
email: import_zod16.default.string().email(),
|
733
|
+
emailVerifiedAt: import_zod16.default.date().nullable(),
|
734
|
+
password: import_zod16.default.string(),
|
735
|
+
address: import_zod16.default.string().nullable(),
|
736
|
+
phone: import_zod16.default.string().nullable(),
|
737
|
+
notificationCount: import_zod16.default.number().nullable(),
|
738
|
+
roles: import_zod16.default.array(
|
739
|
+
import_zod16.default.object({
|
740
|
+
id: import_zod16.default.string().uuid(),
|
741
|
+
createdAt: import_zod16.default.date(),
|
742
|
+
updatedAt: import_zod16.default.date(),
|
743
|
+
deletedAt: import_zod16.default.date().nullable(),
|
744
|
+
systemName: import_zod16.default.string(),
|
745
|
+
displayName: import_zod16.default.string(),
|
746
|
+
description: import_zod16.default.string().nullable(),
|
747
|
+
permissions: import_zod16.default.array(
|
748
|
+
import_zod16.default.object({
|
749
|
+
id: import_zod16.default.string().uuid(),
|
750
|
+
createdAt: import_zod16.default.date(),
|
751
|
+
updatedAt: import_zod16.default.date(),
|
752
|
+
deletedAt: import_zod16.default.date().nullable(),
|
753
|
+
systemName: import_zod16.default.string(),
|
754
|
+
displayName: import_zod16.default.string(),
|
755
|
+
description: import_zod16.default.string().nullable()
|
784
756
|
})
|
785
757
|
)
|
786
758
|
})
|
787
759
|
),
|
788
|
-
extension:
|
789
|
-
id:
|
790
|
-
createdAt:
|
791
|
-
updatedAt:
|
792
|
-
deletedAt:
|
793
|
-
userId:
|
794
|
-
sipServerUrl:
|
795
|
-
sipUserName:
|
796
|
-
webphoneLoginUser:
|
797
|
-
extensionId:
|
798
|
-
extensionName:
|
799
|
-
telephonySignature:
|
760
|
+
extension: import_zod16.default.object({
|
761
|
+
id: import_zod16.default.string().uuid(),
|
762
|
+
createdAt: import_zod16.default.date(),
|
763
|
+
updatedAt: import_zod16.default.date(),
|
764
|
+
deletedAt: import_zod16.default.date().nullable(),
|
765
|
+
userId: import_zod16.default.string().nullable(),
|
766
|
+
sipServerUrl: import_zod16.default.string(),
|
767
|
+
sipUserName: import_zod16.default.string(),
|
768
|
+
webphoneLoginUser: import_zod16.default.string(),
|
769
|
+
extensionId: import_zod16.default.coerce.string().nullable(),
|
770
|
+
extensionName: import_zod16.default.string(),
|
771
|
+
telephonySignature: import_zod16.default.string().nullable()
|
800
772
|
})
|
801
773
|
})
|
802
774
|
});
|
803
775
|
|
804
|
-
// src/chat/
|
805
|
-
var
|
776
|
+
// src/chat/schema.ts
|
777
|
+
var import_zod26 = __toESM(require("zod"));
|
778
|
+
|
779
|
+
// src/contact/schema.ts
|
780
|
+
var import_zod20 = __toESM(require("zod"));
|
781
|
+
|
782
|
+
// src/tag/schema.ts
|
783
|
+
var import_zod17 = __toESM(require("zod"));
|
784
|
+
var TagSchema = DefaultEntitySchema.extend({
|
785
|
+
name: import_zod17.default.string()
|
786
|
+
});
|
787
|
+
var TagGroupSchema = import_zod17.default.union([
|
788
|
+
import_zod17.default.literal("general"),
|
789
|
+
import_zod17.default.literal("contact")
|
790
|
+
]);
|
806
791
|
|
807
792
|
// src/company/schema.ts
|
808
793
|
var import_zod18 = __toESM(require("zod"));
|
@@ -821,128 +806,319 @@ var CompanySchema = DefaultEntitySchema.extend({
|
|
821
806
|
customFields: import_zod18.default.array(CompanyCustomFieldSchema).optional()
|
822
807
|
});
|
823
808
|
|
824
|
-
// src/contact/schema.ts
|
825
|
-
var import_zod21 = __toESM(require("zod"));
|
826
|
-
|
827
|
-
// src/tag/schema.ts
|
828
|
-
var import_zod19 = __toESM(require("zod"));
|
829
|
-
var TagSchema = DefaultEntitySchema.extend({
|
830
|
-
name: import_zod19.default.string()
|
831
|
-
});
|
832
|
-
var TagGroupSchema = import_zod19.default.union([
|
833
|
-
import_zod19.default.literal("general"),
|
834
|
-
import_zod19.default.literal("contact")
|
835
|
-
]);
|
836
|
-
|
837
809
|
// src/upload/schema.ts
|
838
|
-
var
|
810
|
+
var import_zod19 = __toESM(require("zod"));
|
839
811
|
var UploadSchema = DefaultEntitySchema.extend({
|
840
|
-
bucketName:
|
841
|
-
fileName:
|
842
|
-
fileSize:
|
843
|
-
fileKey:
|
844
|
-
fileUrl:
|
845
|
-
status:
|
846
|
-
});
|
847
|
-
var RenameAttachmentSchema =
|
848
|
-
newName:
|
849
|
-
});
|
850
|
-
var DeleteAttachmentSchema =
|
851
|
-
group:
|
852
|
-
|
853
|
-
|
854
|
-
|
812
|
+
bucketName: import_zod19.default.string(),
|
813
|
+
fileName: import_zod19.default.string(),
|
814
|
+
fileSize: import_zod19.default.number(),
|
815
|
+
fileKey: import_zod19.default.string(),
|
816
|
+
fileUrl: import_zod19.default.string().nullable(),
|
817
|
+
status: import_zod19.default.string().optional()
|
818
|
+
});
|
819
|
+
var RenameAttachmentSchema = import_zod19.default.object({
|
820
|
+
newName: import_zod19.default.string()
|
821
|
+
});
|
822
|
+
var DeleteAttachmentSchema = import_zod19.default.object({
|
823
|
+
group: import_zod19.default.union([
|
824
|
+
import_zod19.default.literal("ticket"),
|
825
|
+
import_zod19.default.literal("contact"),
|
826
|
+
import_zod19.default.literal("company")
|
855
827
|
])
|
856
828
|
});
|
857
829
|
|
858
830
|
// src/contact/schema.ts
|
859
|
-
var ContactPhonesSchema =
|
860
|
-
id:
|
861
|
-
createdAt:
|
862
|
-
updatedAt:
|
863
|
-
deletedAt:
|
864
|
-
phone:
|
865
|
-
isPrimary:
|
866
|
-
});
|
867
|
-
var ContactEmailsSchema =
|
868
|
-
id:
|
869
|
-
createdAt:
|
870
|
-
updatedAt:
|
871
|
-
deletedAt:
|
872
|
-
email:
|
873
|
-
isPrimary:
|
874
|
-
});
|
875
|
-
var ContactCustomFieldSchema =
|
876
|
-
id:
|
877
|
-
createdAt:
|
878
|
-
updatedAt:
|
879
|
-
deletedAt:
|
880
|
-
textValue:
|
881
|
-
booleanValue:
|
882
|
-
numberValue:
|
883
|
-
dateValue:
|
831
|
+
var ContactPhonesSchema = import_zod20.default.object({
|
832
|
+
id: import_zod20.default.string().uuid(),
|
833
|
+
createdAt: import_zod20.default.date(),
|
834
|
+
updatedAt: import_zod20.default.date(),
|
835
|
+
deletedAt: import_zod20.default.date().nullable(),
|
836
|
+
phone: import_zod20.default.string(),
|
837
|
+
isPrimary: import_zod20.default.boolean()
|
838
|
+
});
|
839
|
+
var ContactEmailsSchema = import_zod20.default.object({
|
840
|
+
id: import_zod20.default.string().uuid(),
|
841
|
+
createdAt: import_zod20.default.date(),
|
842
|
+
updatedAt: import_zod20.default.date(),
|
843
|
+
deletedAt: import_zod20.default.date().nullable(),
|
844
|
+
email: import_zod20.default.string(),
|
845
|
+
isPrimary: import_zod20.default.boolean()
|
846
|
+
});
|
847
|
+
var ContactCustomFieldSchema = import_zod20.default.object({
|
848
|
+
id: import_zod20.default.string().uuid(),
|
849
|
+
createdAt: import_zod20.default.date(),
|
850
|
+
updatedAt: import_zod20.default.date(),
|
851
|
+
deletedAt: import_zod20.default.date().nullable(),
|
852
|
+
textValue: import_zod20.default.string().nullable(),
|
853
|
+
booleanValue: import_zod20.default.boolean().nullable(),
|
854
|
+
numberValue: import_zod20.default.number().nullable(),
|
855
|
+
dateValue: import_zod20.default.date().nullable(),
|
884
856
|
attribute: AttributeSchema.omit({ options: true, group: true }),
|
885
|
-
uploads:
|
886
|
-
});
|
887
|
-
var ContactEntityTypesSchema =
|
888
|
-
id:
|
889
|
-
createdAt:
|
890
|
-
updatedAt:
|
891
|
-
deletedAt:
|
892
|
-
entity:
|
893
|
-
description:
|
894
|
-
});
|
895
|
-
var ContactActivitySchema =
|
896
|
-
id:
|
897
|
-
createdAt:
|
898
|
-
updatedAt:
|
899
|
-
deletedAt:
|
900
|
-
entityId:
|
901
|
-
description:
|
857
|
+
uploads: import_zod20.default.array(UploadSchema)
|
858
|
+
});
|
859
|
+
var ContactEntityTypesSchema = import_zod20.default.object({
|
860
|
+
id: import_zod20.default.string().uuid(),
|
861
|
+
createdAt: import_zod20.default.date(),
|
862
|
+
updatedAt: import_zod20.default.date(),
|
863
|
+
deletedAt: import_zod20.default.date().nullable(),
|
864
|
+
entity: import_zod20.default.string(),
|
865
|
+
description: import_zod20.default.string().nullable()
|
866
|
+
});
|
867
|
+
var ContactActivitySchema = import_zod20.default.object({
|
868
|
+
id: import_zod20.default.string().uuid(),
|
869
|
+
createdAt: import_zod20.default.date(),
|
870
|
+
updatedAt: import_zod20.default.date(),
|
871
|
+
deletedAt: import_zod20.default.date().nullable(),
|
872
|
+
entityId: import_zod20.default.string(),
|
873
|
+
description: import_zod20.default.string(),
|
902
874
|
entityType: ContactEntityTypesSchema
|
903
875
|
});
|
904
|
-
var ContactSchema =
|
905
|
-
id:
|
906
|
-
createdAt:
|
907
|
-
updatedAt:
|
908
|
-
deletedAt:
|
909
|
-
name:
|
910
|
-
address:
|
911
|
-
channel:
|
912
|
-
notes:
|
913
|
-
contactProfile:
|
914
|
-
socialProfileUrl:
|
915
|
-
tags:
|
876
|
+
var ContactSchema = import_zod20.default.object({
|
877
|
+
id: import_zod20.default.string().uuid(),
|
878
|
+
createdAt: import_zod20.default.date(),
|
879
|
+
updatedAt: import_zod20.default.date(),
|
880
|
+
deletedAt: import_zod20.default.date().nullable(),
|
881
|
+
name: import_zod20.default.string(),
|
882
|
+
address: import_zod20.default.string().nullable(),
|
883
|
+
channel: import_zod20.default.string().nullable(),
|
884
|
+
notes: import_zod20.default.string().nullable(),
|
885
|
+
contactProfile: import_zod20.default.string().nullable(),
|
886
|
+
socialProfileUrl: import_zod20.default.string().nullable(),
|
887
|
+
tags: import_zod20.default.array(TagSchema),
|
916
888
|
company: CompanySchema.omit({ customFields: true }).nullable(),
|
917
889
|
// room: z.array(RoomSchema).optional(),
|
918
|
-
customFields:
|
919
|
-
contactEmails:
|
920
|
-
contactPhones:
|
921
|
-
activityLogs:
|
890
|
+
customFields: import_zod20.default.array(ContactCustomFieldSchema),
|
891
|
+
contactEmails: import_zod20.default.array(ContactEmailsSchema),
|
892
|
+
contactPhones: import_zod20.default.array(ContactPhonesSchema),
|
893
|
+
activityLogs: import_zod20.default.array(ContactActivitySchema).optional()
|
894
|
+
});
|
895
|
+
var ContactRowSchema = import_zod20.default.object({
|
896
|
+
name: import_zod20.default.string(),
|
897
|
+
address: import_zod20.default.string().nullable(),
|
898
|
+
channel: import_zod20.default.string().nullable(),
|
899
|
+
email: import_zod20.default.string().nullable(),
|
900
|
+
phone: import_zod20.default.string().nullable(),
|
901
|
+
notes: import_zod20.default.string().nullable(),
|
902
|
+
company: import_zod20.default.string().nullable(),
|
903
|
+
"CPE no.": import_zod20.default.string(),
|
904
|
+
"Internet Subscription": import_zod20.default.string(),
|
905
|
+
others: import_zod20.default.null(),
|
906
|
+
_dynamic_data: import_zod20.default.any().optional()
|
907
|
+
});
|
908
|
+
var CustomSchema = import_zod20.default.object({
|
909
|
+
attriuteId: import_zod20.default.string().optional(),
|
910
|
+
systemName: import_zod20.default.string().optional(),
|
911
|
+
displayName: import_zod20.default.string().optional(),
|
912
|
+
isRequired: import_zod20.default.string().optional(),
|
913
|
+
type: import_zod20.default.string().optional()
|
914
|
+
});
|
915
|
+
var ImportBodySchema = import_zod20.default.object({
|
916
|
+
import_id: import_zod20.default.number(),
|
917
|
+
sheet_id: import_zod20.default.number(),
|
918
|
+
sheet_name: import_zod20.default.string(),
|
919
|
+
row_number: import_zod20.default.number(),
|
920
|
+
total_rows: import_zod20.default.number(),
|
921
|
+
custom_fields: import_zod20.default.object({
|
922
|
+
user_id: import_zod20.default.string().optional(),
|
923
|
+
custom: import_zod20.default.any().optional()
|
924
|
+
}).partial(),
|
925
|
+
row_data: ContactRowSchema
|
922
926
|
});
|
923
927
|
|
924
|
-
// src/
|
928
|
+
// src/cx-log/schema.ts
|
929
|
+
var import_zod25 = __toESM(require("zod"));
|
930
|
+
|
931
|
+
// src/evaluate-form/schema.ts
|
932
|
+
var import_zod21 = __toESM(require("zod"));
|
933
|
+
var EvaluateFormSchema = DefaultEntitySchema.extend({
|
934
|
+
cxLogId: import_zod21.default.string().uuid(),
|
935
|
+
sentimentScore: import_zod21.default.string().nullable().optional(),
|
936
|
+
csatScore: import_zod21.default.string().nullable().optional()
|
937
|
+
});
|
938
|
+
|
939
|
+
// src/telephony-cdr/schema.ts
|
940
|
+
var import_zod23 = __toESM(require("zod"));
|
941
|
+
|
942
|
+
// src/extension/schema.ts
|
925
943
|
var import_zod22 = __toESM(require("zod"));
|
926
|
-
var
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
944
|
+
var ExtensionSchema = import_zod22.default.object({
|
945
|
+
id: import_zod22.default.string().uuid(),
|
946
|
+
createdAt: import_zod22.default.date(),
|
947
|
+
updatedAt: import_zod22.default.date(),
|
948
|
+
deletedAt: import_zod22.default.date().nullable(),
|
949
|
+
userId: import_zod22.default.string().nullable(),
|
950
|
+
sipServerUrl: import_zod22.default.string(),
|
951
|
+
sipUserName: import_zod22.default.string(),
|
952
|
+
webphoneLoginUser: import_zod22.default.string(),
|
953
|
+
extensionId: import_zod22.default.string().nullable(),
|
954
|
+
extensionName: import_zod22.default.string(),
|
955
|
+
telephonySignature: import_zod22.default.string().nullable()
|
956
|
+
});
|
957
|
+
|
958
|
+
// src/telephony-cdr/schema.ts
|
959
|
+
var CallUserSchema = import_zod23.default.object({
|
960
|
+
id: import_zod23.default.string(),
|
961
|
+
user: UserSchema.omit({
|
962
|
+
extension: true,
|
963
|
+
roles: true
|
964
|
+
}).nullable(),
|
965
|
+
userId: import_zod23.default.string(),
|
966
|
+
createdAt: import_zod23.default.string().optional(),
|
967
|
+
deletedAt: import_zod23.default.string().nullable(),
|
968
|
+
updatedAt: import_zod23.default.string().optional(),
|
969
|
+
extensionId: import_zod23.default.string().nullable(),
|
970
|
+
sipUserName: import_zod23.default.string().nullable(),
|
971
|
+
sipServerUrl: import_zod23.default.string().nullable(),
|
972
|
+
extensionName: import_zod23.default.string().nullable(),
|
973
|
+
webphoneLoginUser: import_zod23.default.string().nullable(),
|
974
|
+
telephonySignature: import_zod23.default.string().nullable()
|
975
|
+
}).nullable().optional();
|
976
|
+
var TelephonyCdrSchema = DefaultEntitySchema.extend({
|
977
|
+
uniqueCallId: import_zod23.default.string(),
|
978
|
+
timeStart: import_zod23.default.string(),
|
979
|
+
callFrom: import_zod23.default.string(),
|
980
|
+
callTo: import_zod23.default.string(),
|
981
|
+
callDuration: import_zod23.default.number().nullable(),
|
982
|
+
talkDuration: import_zod23.default.number().nullable(),
|
983
|
+
srcTrunkName: import_zod23.default.string().nullable(),
|
984
|
+
dstTrunkName: import_zod23.default.string().nullable(),
|
985
|
+
contact: ContactSchema.optional(),
|
986
|
+
// TODO: refactor this zod schema using TelephonyQueue entity schema
|
987
|
+
telephonyQueue: DefaultEntitySchema.extend({
|
988
|
+
queueId: import_zod23.default.number(),
|
989
|
+
queueName: import_zod23.default.string(),
|
990
|
+
queueNumber: import_zod23.default.string(),
|
991
|
+
maximumWaitingTime: import_zod23.default.number()
|
992
|
+
}).optional().nullable(),
|
993
|
+
pinCode: import_zod23.default.string().nullable(),
|
994
|
+
status: import_zod23.default.string(),
|
995
|
+
type: import_zod23.default.string(),
|
996
|
+
recording: import_zod23.default.string().nullable(),
|
997
|
+
didNumber: import_zod23.default.string().nullable(),
|
998
|
+
agentRingTime: import_zod23.default.number().nullable(),
|
999
|
+
uploadId: import_zod23.default.string().nullable(),
|
1000
|
+
serialNumber: import_zod23.default.string().nullable(),
|
1001
|
+
upload: UploadSchema.optional().nullable(),
|
1002
|
+
callParticipants: import_zod23.default.object({
|
1003
|
+
callTo: CallUserSchema,
|
1004
|
+
callFrom: CallUserSchema
|
1005
|
+
}).nullable(),
|
1006
|
+
isQueueMissedCall: import_zod23.default.boolean(),
|
1007
|
+
extensionId: import_zod23.default.string().uuid().nullable(),
|
1008
|
+
extension: ExtensionSchema.extend({
|
1009
|
+
user: UserSchema.optional().nullable()
|
1010
|
+
}).optional().nullable(),
|
1011
|
+
telephonyQueueId: import_zod23.default.string().uuid().nullable(),
|
1012
|
+
contactId: import_zod23.default.string().nullable()
|
1013
|
+
});
|
1014
|
+
var TelephonyTrunkSchema = DefaultEntitySchema.extend({
|
1015
|
+
trunkId: import_zod23.default.string().nullable(),
|
1016
|
+
trunkName: import_zod23.default.string().nullable()
|
1017
|
+
});
|
1018
|
+
var TelephonyTrunkListSchema = import_zod23.default.array(TelephonyTrunkSchema);
|
1019
|
+
var TelephonyQueueSchema = DefaultEntitySchema.extend({
|
1020
|
+
queueId: import_zod23.default.number(),
|
1021
|
+
queueName: import_zod23.default.string(),
|
1022
|
+
queueNumber: import_zod23.default.string(),
|
1023
|
+
maximumWaitingTime: import_zod23.default.number()
|
1024
|
+
});
|
1025
|
+
var TelephonyQueueListSchmea = import_zod23.default.array(TelephonyQueueSchema);
|
1026
|
+
var TelephonyExtensionSchema = DefaultEntitySchema.extend({
|
1027
|
+
user: UserSchema.omit({ extension: true }).optional().nullable(),
|
1028
|
+
// extension not needed in this schema
|
1029
|
+
sipServerUrl: import_zod23.default.string().nullable(),
|
1030
|
+
sipUserName: import_zod23.default.string().nullable(),
|
1031
|
+
sipPassword: import_zod23.default.string().nullable(),
|
1032
|
+
yeastarSignature: import_zod23.default.string().nullable(),
|
1033
|
+
userId: import_zod23.default.string().uuid().nullable(),
|
1034
|
+
extensionId: import_zod23.default.string().nullable(),
|
1035
|
+
extensionName: import_zod23.default.string().nullable()
|
1036
|
+
});
|
1037
|
+
var TelephonyExtensionListSchema = import_zod23.default.array(TelephonyExtensionSchema);
|
1038
|
+
var TelephonyDropdownListSchema = import_zod23.default.object({
|
1039
|
+
trunks: import_zod23.default.array(
|
1040
|
+
import_zod23.default.object({
|
1041
|
+
id: import_zod23.default.string().uuid(),
|
1042
|
+
trunkName: import_zod23.default.string()
|
1043
|
+
})
|
1044
|
+
),
|
1045
|
+
status: import_zod23.default.array(import_zod23.default.enum(["ANSWERED", "NO ANSWER", "FAILED"])),
|
1046
|
+
type: import_zod23.default.array(import_zod23.default.enum(["Inbound", "Outbound", "Internal"]))
|
1047
|
+
});
|
1048
|
+
|
1049
|
+
// src/wrap-up-form/schema.ts
|
1050
|
+
var import_zod24 = __toESM(require("zod"));
|
1051
|
+
var WrapUpFormSchema = DefaultEntitySchema.extend({
|
1052
|
+
note: import_zod24.default.string().nullable(),
|
1053
|
+
disposition: import_zod24.default.string().nullable(),
|
1054
|
+
callFrom: import_zod24.default.string().nullable(),
|
1055
|
+
callTo: import_zod24.default.string().nullable(),
|
1056
|
+
tags: import_zod24.default.array(TagSchema)
|
933
1057
|
});
|
934
1058
|
|
935
1059
|
// src/cx-log/schema.ts
|
936
|
-
var
|
1060
|
+
var CxLogSchema = DefaultEntitySchema.extend({
|
1061
|
+
caseId: import_zod25.default.number(),
|
1062
|
+
entityId: import_zod25.default.string().uuid(),
|
1063
|
+
entityName: import_zod25.default.string(),
|
1064
|
+
contactId: import_zod25.default.string().uuid().nullable(),
|
1065
|
+
channel: import_zod25.default.string().nullable(),
|
1066
|
+
queueId: import_zod25.default.string().uuid().nullable(),
|
1067
|
+
agentId: import_zod25.default.string().uuid().nullable(),
|
1068
|
+
direction: import_zod25.default.string().nullable(),
|
1069
|
+
startedDate: import_zod25.default.date().nullable(),
|
1070
|
+
handledTime: import_zod25.default.number().nullable(),
|
1071
|
+
firstResponseTime: import_zod25.default.number().nullable(),
|
1072
|
+
wrapUpForm: WrapUpFormSchema.nullable()
|
1073
|
+
});
|
1074
|
+
var CxLogSchemaWithRelations = DefaultEntitySchema.extend({
|
1075
|
+
caseId: import_zod25.default.number(),
|
1076
|
+
entityId: import_zod25.default.string().uuid(),
|
1077
|
+
entityName: import_zod25.default.string(),
|
1078
|
+
customerPhone: import_zod25.default.string().nullable(),
|
1079
|
+
channelType: import_zod25.default.string().nullable(),
|
1080
|
+
channel: import_zod25.default.string().nullable(),
|
1081
|
+
direction: import_zod25.default.string().nullable(),
|
1082
|
+
startedDate: import_zod25.default.string().nullable(),
|
1083
|
+
handledTime: import_zod25.default.string().nullable(),
|
1084
|
+
firstResponseTime: import_zod25.default.string().nullable(),
|
1085
|
+
slaMeet: import_zod25.default.string().nullable(),
|
1086
|
+
evaluateForm: EvaluateFormSchema.nullable(),
|
1087
|
+
wrapUpForm: WrapUpFormSchema.nullable(),
|
1088
|
+
room: import_zod25.default.object({
|
1089
|
+
id: import_zod25.default.string().uuid(),
|
1090
|
+
createdAt: import_zod25.default.date(),
|
1091
|
+
updatedAt: import_zod25.default.date(),
|
1092
|
+
deletedAt: import_zod25.default.date().nullable(),
|
1093
|
+
lastMessage: import_zod25.default.string(),
|
1094
|
+
handleTime: import_zod25.default.number(),
|
1095
|
+
closeAt: import_zod25.default.date(),
|
1096
|
+
unreadCount: import_zod25.default.number(),
|
1097
|
+
firstResponseAt: import_zod25.default.date(),
|
1098
|
+
firstResponseTime: import_zod25.default.number(),
|
1099
|
+
isLatest: import_zod25.default.boolean(),
|
1100
|
+
direction: MessageDirectionTypeSchema,
|
1101
|
+
platformContact: PlatformContactSchema,
|
1102
|
+
actor: UserSchema,
|
1103
|
+
assignee: UserSchema,
|
1104
|
+
channel: ChannelSchema
|
1105
|
+
}).nullable(),
|
1106
|
+
telephonyCdr: TelephonyCdrSchema.nullable(),
|
1107
|
+
queue: import_zod25.default.object({
|
1108
|
+
queueName: import_zod25.default.string().nullable().optional()
|
1109
|
+
}).nullable(),
|
1110
|
+
contact: ContactSchema.nullable(),
|
1111
|
+
agent: UserSchema.nullable(),
|
1112
|
+
contactLabel: import_zod25.default.array(import_zod25.default.string())
|
1113
|
+
});
|
937
1114
|
|
938
1115
|
// src/chat/schema.ts
|
939
|
-
var
|
940
|
-
var MessageDirectionTypeSchema = import_zod23.default.enum([
|
1116
|
+
var MessageDirectionTypeSchema = import_zod26.default.enum([
|
941
1117
|
"incoming",
|
942
1118
|
"outgoing",
|
943
1119
|
"system"
|
944
1120
|
]);
|
945
|
-
var MessageTypeSchema =
|
1121
|
+
var MessageTypeSchema = import_zod26.default.enum([
|
946
1122
|
"text",
|
947
1123
|
"image",
|
948
1124
|
"video",
|
@@ -963,350 +1139,321 @@ var MessageTypeSchema = import_zod23.default.enum([
|
|
963
1139
|
"updated",
|
964
1140
|
"started"
|
965
1141
|
]);
|
966
|
-
var MessageLocaleTypeSchema =
|
967
|
-
var PlatformContactMetadataSchema =
|
968
|
-
id:
|
969
|
-
name:
|
970
|
-
picture:
|
971
|
-
additionalCredentials:
|
972
|
-
});
|
973
|
-
var PlatformContactSchema =
|
974
|
-
|
975
|
-
|
1142
|
+
var MessageLocaleTypeSchema = import_zod26.default.enum(["mm", "en", "th", ""]);
|
1143
|
+
var PlatformContactMetadataSchema = import_zod26.default.object({
|
1144
|
+
id: import_zod26.default.string(),
|
1145
|
+
name: import_zod26.default.string(),
|
1146
|
+
picture: import_zod26.default.string().optional(),
|
1147
|
+
additionalCredentials: import_zod26.default.any()
|
1148
|
+
});
|
1149
|
+
var PlatformContactSchema = import_zod26.default.object({
|
1150
|
+
id: import_zod26.default.string().uuid(),
|
1151
|
+
createdAt: import_zod26.default.date(),
|
1152
|
+
updatedAt: import_zod26.default.date(),
|
1153
|
+
deletedAt: import_zod26.default.date().nullable(),
|
1154
|
+
channelId: import_zod26.default.string().uuid(),
|
1155
|
+
socialPlatformId: import_zod26.default.string(),
|
976
1156
|
type: ChannelTypeSchema,
|
977
1157
|
metadata: PlatformContactMetadataSchema,
|
978
1158
|
contact: ContactSchema
|
979
1159
|
});
|
980
1160
|
var RoomSchema = DefaultEntitySchema.extend({
|
981
|
-
lastMessage:
|
982
|
-
handleTime:
|
983
|
-
closeAt:
|
984
|
-
unreadCount:
|
985
|
-
firstResponseAt:
|
986
|
-
firstResponseTime:
|
987
|
-
isLatest:
|
1161
|
+
lastMessage: import_zod26.default.string(),
|
1162
|
+
handleTime: import_zod26.default.number(),
|
1163
|
+
closeAt: import_zod26.default.date(),
|
1164
|
+
unreadCount: import_zod26.default.number(),
|
1165
|
+
firstResponseAt: import_zod26.default.date(),
|
1166
|
+
firstResponseTime: import_zod26.default.number(),
|
1167
|
+
isLatest: import_zod26.default.boolean(),
|
988
1168
|
direction: MessageDirectionTypeSchema,
|
989
1169
|
platformContact: PlatformContactSchema,
|
990
|
-
actor:
|
991
|
-
id:
|
992
|
-
createdAt:
|
993
|
-
updatedAt:
|
994
|
-
deletedAt:
|
995
|
-
name:
|
996
|
-
email:
|
997
|
-
emailVerifiedAt:
|
998
|
-
password:
|
999
|
-
address:
|
1000
|
-
phone:
|
1001
|
-
notificationCount:
|
1002
|
-
roles:
|
1003
|
-
extension:
|
1004
|
-
id:
|
1005
|
-
createdAt:
|
1006
|
-
updatedAt:
|
1007
|
-
deletedAt:
|
1008
|
-
userId:
|
1009
|
-
sipServerUrl:
|
1010
|
-
sipUserName:
|
1011
|
-
webphoneLoginUser:
|
1012
|
-
extensionId:
|
1013
|
-
extensionName:
|
1014
|
-
telephonySignature:
|
1170
|
+
actor: import_zod26.default.object({
|
1171
|
+
id: import_zod26.default.string().uuid(),
|
1172
|
+
createdAt: import_zod26.default.date(),
|
1173
|
+
updatedAt: import_zod26.default.date(),
|
1174
|
+
deletedAt: import_zod26.default.date().nullable(),
|
1175
|
+
name: import_zod26.default.string(),
|
1176
|
+
email: import_zod26.default.string().email(),
|
1177
|
+
emailVerifiedAt: import_zod26.default.date().nullable(),
|
1178
|
+
password: import_zod26.default.string(),
|
1179
|
+
address: import_zod26.default.string().nullable(),
|
1180
|
+
phone: import_zod26.default.string().nullable(),
|
1181
|
+
notificationCount: import_zod26.default.number().nullable(),
|
1182
|
+
roles: import_zod26.default.array(RoleSchema),
|
1183
|
+
extension: import_zod26.default.object({
|
1184
|
+
id: import_zod26.default.string().uuid(),
|
1185
|
+
createdAt: import_zod26.default.date(),
|
1186
|
+
updatedAt: import_zod26.default.date(),
|
1187
|
+
deletedAt: import_zod26.default.date().nullable(),
|
1188
|
+
userId: import_zod26.default.string().nullable(),
|
1189
|
+
sipServerUrl: import_zod26.default.string(),
|
1190
|
+
sipUserName: import_zod26.default.string(),
|
1191
|
+
webphoneLoginUser: import_zod26.default.string(),
|
1192
|
+
extensionId: import_zod26.default.string().nullable(),
|
1193
|
+
extensionName: import_zod26.default.string(),
|
1194
|
+
telephonySignature: import_zod26.default.string().nullable()
|
1015
1195
|
})
|
1016
1196
|
}),
|
1017
|
-
assignee:
|
1018
|
-
id:
|
1019
|
-
createdAt:
|
1020
|
-
updatedAt:
|
1021
|
-
deletedAt:
|
1022
|
-
name:
|
1023
|
-
email:
|
1024
|
-
emailVerifiedAt:
|
1025
|
-
password:
|
1026
|
-
address:
|
1027
|
-
phone:
|
1028
|
-
notificationCount:
|
1029
|
-
roles:
|
1030
|
-
extension:
|
1031
|
-
id:
|
1032
|
-
createdAt:
|
1033
|
-
updatedAt:
|
1034
|
-
deletedAt:
|
1035
|
-
userId:
|
1036
|
-
sipServerUrl:
|
1037
|
-
sipUserName:
|
1038
|
-
webphoneLoginUser:
|
1039
|
-
extensionId:
|
1040
|
-
extensionName:
|
1041
|
-
telephonySignature:
|
1197
|
+
assignee: import_zod26.default.object({
|
1198
|
+
id: import_zod26.default.string().uuid(),
|
1199
|
+
createdAt: import_zod26.default.date(),
|
1200
|
+
updatedAt: import_zod26.default.date(),
|
1201
|
+
deletedAt: import_zod26.default.date().nullable(),
|
1202
|
+
name: import_zod26.default.string(),
|
1203
|
+
email: import_zod26.default.string().email(),
|
1204
|
+
emailVerifiedAt: import_zod26.default.date().nullable(),
|
1205
|
+
password: import_zod26.default.string(),
|
1206
|
+
address: import_zod26.default.string().nullable(),
|
1207
|
+
phone: import_zod26.default.string().nullable(),
|
1208
|
+
notificationCount: import_zod26.default.number().nullable(),
|
1209
|
+
roles: import_zod26.default.array(RoleSchema),
|
1210
|
+
extension: import_zod26.default.object({
|
1211
|
+
id: import_zod26.default.string().uuid(),
|
1212
|
+
createdAt: import_zod26.default.date(),
|
1213
|
+
updatedAt: import_zod26.default.date(),
|
1214
|
+
deletedAt: import_zod26.default.date().nullable(),
|
1215
|
+
userId: import_zod26.default.string().nullable(),
|
1216
|
+
sipServerUrl: import_zod26.default.string(),
|
1217
|
+
sipUserName: import_zod26.default.string(),
|
1218
|
+
webphoneLoginUser: import_zod26.default.string(),
|
1219
|
+
extensionId: import_zod26.default.string().nullable(),
|
1220
|
+
extensionName: import_zod26.default.string(),
|
1221
|
+
telephonySignature: import_zod26.default.string().nullable()
|
1042
1222
|
})
|
1043
1223
|
}),
|
1044
1224
|
channel: ChannelSchema,
|
1045
1225
|
cxlog: CxLogSchema
|
1046
1226
|
});
|
1047
1227
|
var MessageSchema = DefaultEntitySchema.extend({
|
1048
|
-
message:
|
1228
|
+
message: import_zod26.default.string(),
|
1049
1229
|
direction: MessageDirectionTypeSchema,
|
1050
1230
|
type: MessageTypeSchema,
|
1051
|
-
readAt:
|
1052
|
-
metadata:
|
1053
|
-
platformId:
|
1054
|
-
platformMessageId:
|
1055
|
-
replyPlatformMessageId:
|
1056
|
-
template:
|
1231
|
+
readAt: import_zod26.default.date(),
|
1232
|
+
metadata: import_zod26.default.any(),
|
1233
|
+
platformId: import_zod26.default.string(),
|
1234
|
+
platformMessageId: import_zod26.default.string(),
|
1235
|
+
replyPlatformMessageId: import_zod26.default.string(),
|
1236
|
+
template: import_zod26.default.any(),
|
1057
1237
|
locale: MessageLocaleTypeSchema,
|
1058
|
-
url:
|
1059
|
-
previewUrl:
|
1060
|
-
imageSetId:
|
1238
|
+
url: import_zod26.default.string(),
|
1239
|
+
previewUrl: import_zod26.default.string(),
|
1240
|
+
imageSetId: import_zod26.default.string(),
|
1061
1241
|
room: RoomSchema,
|
1062
1242
|
upload: UploadSchema,
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
1087
|
-
|
1243
|
+
repliedMessage: import_zod26.default.lazy(() => RepliedMessageSchema),
|
1244
|
+
actor: import_zod26.default.object({
|
1245
|
+
id: import_zod26.default.string().uuid(),
|
1246
|
+
createdAt: import_zod26.default.date(),
|
1247
|
+
updatedAt: import_zod26.default.date(),
|
1248
|
+
deletedAt: import_zod26.default.date().nullable(),
|
1249
|
+
name: import_zod26.default.string(),
|
1250
|
+
email: import_zod26.default.string().email(),
|
1251
|
+
emailVerifiedAt: import_zod26.default.date().nullable(),
|
1252
|
+
password: import_zod26.default.string(),
|
1253
|
+
address: import_zod26.default.string().nullable(),
|
1254
|
+
phone: import_zod26.default.string().nullable(),
|
1255
|
+
notificationCount: import_zod26.default.number().nullable(),
|
1256
|
+
roles: import_zod26.default.array(RoleSchema),
|
1257
|
+
extension: import_zod26.default.object({
|
1258
|
+
id: import_zod26.default.string().uuid(),
|
1259
|
+
createdAt: import_zod26.default.date(),
|
1260
|
+
updatedAt: import_zod26.default.date(),
|
1261
|
+
deletedAt: import_zod26.default.date().nullable(),
|
1262
|
+
userId: import_zod26.default.string().nullable(),
|
1263
|
+
sipServerUrl: import_zod26.default.string(),
|
1264
|
+
sipUserName: import_zod26.default.string(),
|
1265
|
+
webphoneLoginUser: import_zod26.default.string(),
|
1266
|
+
extensionId: import_zod26.default.string().nullable(),
|
1267
|
+
extensionName: import_zod26.default.string(),
|
1268
|
+
telephonySignature: import_zod26.default.string().nullable()
|
1088
1269
|
})
|
1089
1270
|
}),
|
1090
|
-
assignee:
|
1091
|
-
id:
|
1092
|
-
createdAt:
|
1093
|
-
updatedAt:
|
1094
|
-
deletedAt:
|
1095
|
-
name:
|
1096
|
-
email:
|
1097
|
-
emailVerifiedAt:
|
1098
|
-
password:
|
1099
|
-
address:
|
1100
|
-
phone:
|
1101
|
-
notificationCount:
|
1102
|
-
roles:
|
1103
|
-
extension:
|
1104
|
-
id:
|
1105
|
-
createdAt:
|
1106
|
-
updatedAt:
|
1107
|
-
deletedAt:
|
1108
|
-
userId:
|
1109
|
-
sipServerUrl:
|
1110
|
-
sipUserName:
|
1111
|
-
webphoneLoginUser:
|
1112
|
-
extensionId:
|
1113
|
-
extensionName:
|
1114
|
-
telephonySignature:
|
1271
|
+
assignee: import_zod26.default.object({
|
1272
|
+
id: import_zod26.default.string().uuid(),
|
1273
|
+
createdAt: import_zod26.default.date(),
|
1274
|
+
updatedAt: import_zod26.default.date(),
|
1275
|
+
deletedAt: import_zod26.default.date().nullable(),
|
1276
|
+
name: import_zod26.default.string(),
|
1277
|
+
email: import_zod26.default.string().email(),
|
1278
|
+
emailVerifiedAt: import_zod26.default.date().nullable(),
|
1279
|
+
password: import_zod26.default.string(),
|
1280
|
+
address: import_zod26.default.string().nullable(),
|
1281
|
+
phone: import_zod26.default.string().nullable(),
|
1282
|
+
notificationCount: import_zod26.default.number().nullable(),
|
1283
|
+
roles: import_zod26.default.array(RoleSchema),
|
1284
|
+
extension: import_zod26.default.object({
|
1285
|
+
id: import_zod26.default.string().uuid(),
|
1286
|
+
createdAt: import_zod26.default.date(),
|
1287
|
+
updatedAt: import_zod26.default.date(),
|
1288
|
+
deletedAt: import_zod26.default.date().nullable(),
|
1289
|
+
userId: import_zod26.default.string().nullable(),
|
1290
|
+
sipServerUrl: import_zod26.default.string(),
|
1291
|
+
sipUserName: import_zod26.default.string(),
|
1292
|
+
webphoneLoginUser: import_zod26.default.string(),
|
1293
|
+
extensionId: import_zod26.default.string().nullable(),
|
1294
|
+
extensionName: import_zod26.default.string(),
|
1295
|
+
telephonySignature: import_zod26.default.string().nullable()
|
1115
1296
|
})
|
1116
1297
|
}),
|
1117
|
-
sender:
|
1118
|
-
id:
|
1119
|
-
createdAt:
|
1120
|
-
updatedAt:
|
1121
|
-
deletedAt:
|
1122
|
-
name:
|
1123
|
-
email:
|
1124
|
-
emailVerifiedAt:
|
1125
|
-
password:
|
1126
|
-
address:
|
1127
|
-
phone:
|
1128
|
-
notificationCount:
|
1129
|
-
roles:
|
1130
|
-
extension:
|
1131
|
-
id:
|
1132
|
-
createdAt:
|
1133
|
-
updatedAt:
|
1134
|
-
deletedAt:
|
1135
|
-
userId:
|
1136
|
-
sipServerUrl:
|
1137
|
-
sipUserName:
|
1138
|
-
webphoneLoginUser:
|
1139
|
-
extensionId:
|
1140
|
-
extensionName:
|
1141
|
-
telephonySignature:
|
1298
|
+
sender: import_zod26.default.object({
|
1299
|
+
id: import_zod26.default.string().uuid(),
|
1300
|
+
createdAt: import_zod26.default.date(),
|
1301
|
+
updatedAt: import_zod26.default.date(),
|
1302
|
+
deletedAt: import_zod26.default.date().nullable(),
|
1303
|
+
name: import_zod26.default.string(),
|
1304
|
+
email: import_zod26.default.string().email(),
|
1305
|
+
emailVerifiedAt: import_zod26.default.date().nullable(),
|
1306
|
+
password: import_zod26.default.string(),
|
1307
|
+
address: import_zod26.default.string().nullable(),
|
1308
|
+
phone: import_zod26.default.string().nullable(),
|
1309
|
+
notificationCount: import_zod26.default.number().nullable(),
|
1310
|
+
roles: import_zod26.default.array(RoleSchema),
|
1311
|
+
extension: import_zod26.default.object({
|
1312
|
+
id: import_zod26.default.string().uuid(),
|
1313
|
+
createdAt: import_zod26.default.date(),
|
1314
|
+
updatedAt: import_zod26.default.date(),
|
1315
|
+
deletedAt: import_zod26.default.date().nullable(),
|
1316
|
+
userId: import_zod26.default.string().nullable(),
|
1317
|
+
sipServerUrl: import_zod26.default.string(),
|
1318
|
+
sipUserName: import_zod26.default.string(),
|
1319
|
+
webphoneLoginUser: import_zod26.default.string(),
|
1320
|
+
extensionId: import_zod26.default.string().nullable(),
|
1321
|
+
extensionName: import_zod26.default.string(),
|
1322
|
+
telephonySignature: import_zod26.default.string().nullable()
|
1142
1323
|
})
|
1143
1324
|
})
|
1144
1325
|
});
|
1145
|
-
var
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1153
|
-
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
1161
|
-
//
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1326
|
+
var RepliedMessageSchema = DefaultEntitySchema.extend({
|
1327
|
+
message: import_zod26.default.string(),
|
1328
|
+
direction: MessageDirectionTypeSchema,
|
1329
|
+
type: MessageTypeSchema,
|
1330
|
+
readAt: import_zod26.default.date(),
|
1331
|
+
metadata: import_zod26.default.any(),
|
1332
|
+
platformId: import_zod26.default.string(),
|
1333
|
+
platformMessageId: import_zod26.default.string(),
|
1334
|
+
replyPlatformMessageId: import_zod26.default.string(),
|
1335
|
+
template: import_zod26.default.any(),
|
1336
|
+
locale: MessageLocaleTypeSchema,
|
1337
|
+
url: import_zod26.default.string(),
|
1338
|
+
previewUrl: import_zod26.default.string(),
|
1339
|
+
imageSetId: import_zod26.default.string(),
|
1340
|
+
// room: RoomSchema,
|
1341
|
+
upload: UploadSchema,
|
1342
|
+
// id: z.string().uuid(),
|
1343
|
+
// createdAt: z.date(),
|
1344
|
+
// updatedAt: z.date(),
|
1345
|
+
// deletedAt: z.date().nullable(),
|
1346
|
+
// name: z.string(),
|
1347
|
+
// email: z.string().email(),
|
1348
|
+
// emailVerifiedAt: z.date().nullable(),
|
1349
|
+
// password: z.string(),
|
1350
|
+
// address: z.string().nullable(),
|
1351
|
+
// phone: z.string().nullable(),
|
1352
|
+
// notificationCount: z.number().nullable(),
|
1353
|
+
// roles: z.array(RoleSchema),
|
1354
|
+
// extension: z.object({
|
1355
|
+
// id: z.string().uuid(),
|
1356
|
+
// createdAt: z.date(),
|
1357
|
+
// updatedAt: z.date(),
|
1358
|
+
// deletedAt: z.date().nullable(),
|
1359
|
+
// userId: z.string().nullable(),
|
1360
|
+
// sipServerUrl: z.string(),
|
1361
|
+
// sipUserName: z.string(),
|
1362
|
+
// webphoneLoginUser: z.string(),
|
1363
|
+
// extensionId: z.string().nullable(),
|
1364
|
+
// extensionName: z.string(),
|
1365
|
+
// telephonySignature: z.string().nullable(),
|
1366
|
+
// }),
|
1367
|
+
// }),
|
1368
|
+
actor: UserSchema,
|
1369
|
+
// id: z.string().uuid(),
|
1370
|
+
// createdAt: z.date(),
|
1371
|
+
// updatedAt: z.date(),
|
1372
|
+
// deletedAt: z.date().nullable(),
|
1373
|
+
// name: z.string(),
|
1374
|
+
// email: z.string().email(),
|
1375
|
+
// emailVerifiedAt: z.date().nullable(),
|
1376
|
+
// password: z.string(),
|
1377
|
+
// address: z.string().nullable(),
|
1378
|
+
// phone: z.string().nullable(),
|
1379
|
+
// notificationCount: z.number().nullable(),
|
1380
|
+
// roles: z.array(RoleSchema),
|
1381
|
+
// extension: z.object({
|
1382
|
+
// id: z.string().uuid(),
|
1383
|
+
// createdAt: z.date(),
|
1384
|
+
// updatedAt: z.date(),
|
1385
|
+
// deletedAt: z.date().nullable(),
|
1386
|
+
// userId: z.string().nullable(),
|
1387
|
+
// sipServerUrl: z.string(),
|
1388
|
+
// sipUserName: z.string(),
|
1389
|
+
// webphoneLoginUser: z.string(),
|
1390
|
+
// extensionId: z.string().nullable(),
|
1391
|
+
// extensionName: z.string(),
|
1392
|
+
// telephonySignature: z.string().nullable(),
|
1393
|
+
// }),
|
1394
|
+
// }),
|
1395
|
+
assignee: UserSchema,
|
1396
|
+
sender: UserSchema
|
1397
|
+
});
|
1398
|
+
var UnreadCountsByAssigneeSchema = import_zod26.default.object({
|
1399
|
+
assigneeId: import_zod26.default.string(),
|
1400
|
+
totalUnreadCount: import_zod26.default.number()
|
1175
1401
|
});
|
1176
1402
|
|
1177
|
-
// src/
|
1178
|
-
var
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
1194
|
-
}).optional().nullable(),
|
1195
|
-
pinCode: import_zod26.default.string().nullable(),
|
1196
|
-
status: import_zod26.default.string(),
|
1197
|
-
type: import_zod26.default.string(),
|
1198
|
-
recording: import_zod26.default.string().nullable(),
|
1199
|
-
didNumber: import_zod26.default.string().nullable(),
|
1200
|
-
agentRingTime: import_zod26.default.number().nullable(),
|
1201
|
-
uploadId: import_zod26.default.string().nullable(),
|
1202
|
-
upload: UploadSchema.optional().nullable(),
|
1203
|
-
serialNumber: import_zod26.default.string().nullable(),
|
1204
|
-
extensionId: import_zod26.default.string().uuid().nullable(),
|
1205
|
-
extension: ExtensionSchema.extend({
|
1206
|
-
user: UserSchema.optional().nullable()
|
1207
|
-
}).optional().nullable(),
|
1208
|
-
telephonyQueueId: import_zod26.default.string().uuid().nullable(),
|
1209
|
-
contactId: import_zod26.default.string().nullable()
|
1210
|
-
});
|
1211
|
-
var TelephonyTrunkSchema = DefaultEntitySchema.extend({
|
1212
|
-
trunkId: import_zod26.default.string().nullable(),
|
1213
|
-
trunkName: import_zod26.default.string().nullable()
|
1214
|
-
});
|
1215
|
-
var TelephonyTrunkListSchema = import_zod26.default.array(TelephonyTrunkSchema);
|
1216
|
-
var TelephonyQueueSchema = DefaultEntitySchema.extend({
|
1217
|
-
queueId: import_zod26.default.number(),
|
1218
|
-
queueName: import_zod26.default.string(),
|
1219
|
-
queueNumber: import_zod26.default.string(),
|
1220
|
-
maximumWaitingTime: import_zod26.default.number()
|
1221
|
-
});
|
1222
|
-
var TelephonyQueueListSchmea = import_zod26.default.array(TelephonyQueueSchema);
|
1223
|
-
var TelephonyExtensionSchema = DefaultEntitySchema.extend({
|
1224
|
-
user: UserSchema.omit({ extension: true }).optional().nullable(),
|
1225
|
-
// extension not needed in this schema
|
1226
|
-
sipServerUrl: import_zod26.default.string().nullable(),
|
1227
|
-
sipUserName: import_zod26.default.string().nullable(),
|
1228
|
-
sipPassword: import_zod26.default.string().nullable(),
|
1229
|
-
yeastarSignature: import_zod26.default.string().nullable(),
|
1230
|
-
userId: import_zod26.default.string().uuid().nullable(),
|
1231
|
-
extensionId: import_zod26.default.string().nullable(),
|
1232
|
-
extensionName: import_zod26.default.string().nullable()
|
1233
|
-
});
|
1234
|
-
var TelephonyExtensionListSchema = import_zod26.default.array(TelephonyExtensionSchema);
|
1235
|
-
var TelephonyDropdownListSchema = import_zod26.default.object({
|
1236
|
-
trunks: import_zod26.default.array(
|
1237
|
-
import_zod26.default.object({
|
1238
|
-
id: import_zod26.default.string().uuid(),
|
1239
|
-
trunkName: import_zod26.default.string()
|
1403
|
+
// src/messenger/validation.ts
|
1404
|
+
var GetFacebookPagesSchema = import_zod27.default.object({
|
1405
|
+
data: import_zod27.default.array(
|
1406
|
+
import_zod27.default.object({
|
1407
|
+
// biome-ignore lint/style/useNamingConvention: <explanation>
|
1408
|
+
access_token: import_zod27.default.string(),
|
1409
|
+
category: import_zod27.default.string(),
|
1410
|
+
// biome-ignore lint/style/useNamingConvention: <explanation>
|
1411
|
+
category_list: import_zod27.default.array(
|
1412
|
+
import_zod27.default.object({
|
1413
|
+
id: import_zod27.default.string(),
|
1414
|
+
name: import_zod27.default.string()
|
1415
|
+
})
|
1416
|
+
),
|
1417
|
+
id: import_zod27.default.string(),
|
1418
|
+
name: import_zod27.default.string(),
|
1419
|
+
tasks: import_zod27.default.string().array()
|
1240
1420
|
})
|
1241
1421
|
),
|
1242
|
-
|
1243
|
-
|
1422
|
+
paging: import_zod27.default.object({
|
1423
|
+
cursors: import_zod27.default.object({
|
1424
|
+
before: import_zod27.default.string().optional(),
|
1425
|
+
after: import_zod27.default.string().optional()
|
1426
|
+
})
|
1427
|
+
}).optional()
|
1244
1428
|
});
|
1429
|
+
var GetFacebookPagesQuerySchema = import_zod27.default.object({
|
1430
|
+
accessToken: import_zod27.default.string(),
|
1431
|
+
userId: import_zod27.default.string()
|
1432
|
+
});
|
1433
|
+
var ReconnectMessengerSchema = ChannelSchema.merge(
|
1434
|
+
import_zod27.default.object({
|
1435
|
+
isReloginRequired: import_zod27.default.boolean(),
|
1436
|
+
platformContacts: import_zod27.default.array(PlatformContactSchema),
|
1437
|
+
id: import_zod27.default.string().uuid(),
|
1438
|
+
name: import_zod27.default.string(),
|
1439
|
+
createdAt: import_zod27.default.date(),
|
1440
|
+
updatedAt: import_zod27.default.date(),
|
1441
|
+
deletedAt: import_zod27.default.date().nullable()
|
1442
|
+
})
|
1443
|
+
);
|
1245
1444
|
|
1246
|
-
// src/
|
1247
|
-
var
|
1248
|
-
var WrapUpFormSchema = DefaultEntitySchema.extend({
|
1249
|
-
note: import_zod27.default.string().nullable(),
|
1250
|
-
disposition: import_zod27.default.string().nullable(),
|
1251
|
-
callFrom: import_zod27.default.string().nullable(),
|
1252
|
-
callTo: import_zod27.default.string().nullable(),
|
1253
|
-
tags: import_zod27.default.array(TagSchema)
|
1254
|
-
});
|
1445
|
+
// src/chat/validation.ts
|
1446
|
+
var import_zod29 = __toESM(require("zod"));
|
1255
1447
|
|
1256
|
-
// src/
|
1257
|
-
var
|
1258
|
-
|
1259
|
-
|
1260
|
-
|
1261
|
-
|
1262
|
-
|
1263
|
-
queueId: import_zod28.default.string().uuid().nullable(),
|
1264
|
-
agentId: import_zod28.default.string().uuid().nullable(),
|
1265
|
-
direction: import_zod28.default.string().nullable(),
|
1266
|
-
startedDate: import_zod28.default.date().nullable(),
|
1267
|
-
handledTime: import_zod28.default.number().nullable(),
|
1268
|
-
firstResponseTime: import_zod28.default.number().nullable(),
|
1269
|
-
wrapUpForm: WrapUpFormSchema.nullable()
|
1270
|
-
});
|
1271
|
-
var CxLogSchemaWithRelations = DefaultEntitySchema.extend({
|
1272
|
-
caseId: import_zod28.default.number(),
|
1448
|
+
// src/custom-field/schema.ts
|
1449
|
+
var import_zod28 = __toESM(require("zod"));
|
1450
|
+
var CustomFieldSchema = DefaultEntitySchema.extend({
|
1451
|
+
textValue: import_zod28.default.string().nullable(),
|
1452
|
+
booleanValue: import_zod28.default.boolean().nullable(),
|
1453
|
+
numberValue: import_zod28.default.number().nullable(),
|
1454
|
+
dateValue: import_zod28.default.date().nullable(),
|
1273
1455
|
entityId: import_zod28.default.string().uuid(),
|
1274
|
-
|
1275
|
-
customerPhone: import_zod28.default.string().nullable(),
|
1276
|
-
channelType: import_zod28.default.string().nullable(),
|
1277
|
-
channel: import_zod28.default.string().nullable(),
|
1278
|
-
direction: import_zod28.default.string().nullable(),
|
1279
|
-
startedDate: import_zod28.default.string().nullable(),
|
1280
|
-
handledTime: import_zod28.default.string().nullable(),
|
1281
|
-
firstResponseTime: import_zod28.default.string().nullable(),
|
1282
|
-
slaMeet: import_zod28.default.string().nullable(),
|
1283
|
-
evaluateForm: EvaluateFormSchema.nullable(),
|
1284
|
-
wrapUpForm: WrapUpFormSchema.nullable(),
|
1285
|
-
room: import_zod28.default.object({
|
1286
|
-
id: import_zod28.default.string().uuid(),
|
1287
|
-
createdAt: import_zod28.default.date(),
|
1288
|
-
updatedAt: import_zod28.default.date(),
|
1289
|
-
deletedAt: import_zod28.default.date().nullable(),
|
1290
|
-
lastMessage: import_zod28.default.string(),
|
1291
|
-
handleTime: import_zod28.default.number(),
|
1292
|
-
closeAt: import_zod28.default.date(),
|
1293
|
-
unreadCount: import_zod28.default.number(),
|
1294
|
-
firstResponseAt: import_zod28.default.date(),
|
1295
|
-
firstResponseTime: import_zod28.default.number(),
|
1296
|
-
isLatest: import_zod28.default.boolean(),
|
1297
|
-
direction: MessageDirectionTypeSchema,
|
1298
|
-
platformContact: PlatformContactSchema,
|
1299
|
-
actor: UserSchema,
|
1300
|
-
assignee: UserSchema,
|
1301
|
-
channel: ChannelSchema
|
1302
|
-
}).nullable(),
|
1303
|
-
telephonyCdr: TelephonyCdrSchema.nullable(),
|
1304
|
-
queue: import_zod28.default.object({
|
1305
|
-
queueName: import_zod28.default.string().nullable().optional()
|
1306
|
-
}).nullable(),
|
1307
|
-
contact: ContactSchema.nullable(),
|
1308
|
-
agent: UserSchema.nullable(),
|
1309
|
-
contactLabel: import_zod28.default.array(import_zod28.default.string())
|
1456
|
+
attributeId: import_zod28.default.string().uuid()
|
1310
1457
|
});
|
1311
1458
|
|
1312
1459
|
// src/chat/validation.ts
|
@@ -3645,6 +3792,7 @@ var extensionContract = (0, import_core14.initContract)().router(
|
|
3645
3792
|
|
3646
3793
|
// src/instagram/index.ts
|
3647
3794
|
var import_core15 = require("@ts-rest/core");
|
3795
|
+
var import_zod51 = __toESM(require("zod"));
|
3648
3796
|
var instagramContract = (0, import_core15.initContract)().router({
|
3649
3797
|
sendMessage: {
|
3650
3798
|
method: "POST",
|
@@ -3685,6 +3833,19 @@ var instagramContract = (0, import_core15.initContract)().router({
|
|
3685
3833
|
400: DefaultErrorResponseSchema
|
3686
3834
|
}
|
3687
3835
|
},
|
3836
|
+
delete: {
|
3837
|
+
method: "DELETE",
|
3838
|
+
path: "/delete/:channelId",
|
3839
|
+
pathParams: import_zod51.default.object({
|
3840
|
+
channelId: import_zod51.default.string().uuid()
|
3841
|
+
}),
|
3842
|
+
body: null,
|
3843
|
+
responses: {
|
3844
|
+
200: ChannelServiceResponseSchema,
|
3845
|
+
500: DefaultErrorResponseSchema,
|
3846
|
+
400: DefaultErrorResponseSchema
|
3847
|
+
}
|
3848
|
+
},
|
3688
3849
|
getInstagramPages: {
|
3689
3850
|
method: "GET",
|
3690
3851
|
path: "/pages",
|
@@ -3698,27 +3859,27 @@ var instagramContract = (0, import_core15.initContract)().router({
|
|
3698
3859
|
|
3699
3860
|
// src/line/index.ts
|
3700
3861
|
var import_core16 = require("@ts-rest/core");
|
3701
|
-
var
|
3862
|
+
var import_zod54 = __toESM(require("zod"));
|
3702
3863
|
|
3703
3864
|
// src/line/schema.ts
|
3704
|
-
var
|
3865
|
+
var import_zod52 = __toESM(require("zod"));
|
3705
3866
|
var ConnectLineService = ConnectLineChannelSchema.extend({
|
3706
|
-
actor:
|
3707
|
-
id:
|
3708
|
-
name:
|
3709
|
-
email:
|
3710
|
-
address:
|
3711
|
-
phone:
|
3867
|
+
actor: import_zod52.default.object({
|
3868
|
+
id: import_zod52.default.string().uuid(),
|
3869
|
+
name: import_zod52.default.string(),
|
3870
|
+
email: import_zod52.default.string().email(),
|
3871
|
+
address: import_zod52.default.string().nullable(),
|
3872
|
+
phone: import_zod52.default.string().nullable()
|
3712
3873
|
}).optional()
|
3713
3874
|
});
|
3714
3875
|
|
3715
3876
|
// src/line/validation.ts
|
3716
|
-
var
|
3717
|
-
var SendLineStickerSchema =
|
3718
|
-
userId:
|
3719
|
-
packageId:
|
3720
|
-
stickerId:
|
3721
|
-
accessToken:
|
3877
|
+
var import_zod53 = __toESM(require("zod"));
|
3878
|
+
var SendLineStickerSchema = import_zod53.default.object({
|
3879
|
+
userId: import_zod53.default.string().uuid(),
|
3880
|
+
packageId: import_zod53.default.string(),
|
3881
|
+
stickerId: import_zod53.default.string(),
|
3882
|
+
accessToken: import_zod53.default.string()
|
3722
3883
|
});
|
3723
3884
|
|
3724
3885
|
// src/line/index.ts
|
@@ -3728,7 +3889,7 @@ var lineContract = (0, import_core16.initContract)().router({
|
|
3728
3889
|
path: "sticker",
|
3729
3890
|
responses: {
|
3730
3891
|
200: DefaultSuccessResponseSchema.extend({
|
3731
|
-
data:
|
3892
|
+
data: import_zod54.default.any()
|
3732
3893
|
}),
|
3733
3894
|
500: DefaultErrorResponseSchema
|
3734
3895
|
},
|
@@ -3740,7 +3901,7 @@ var lineContract = (0, import_core16.initContract)().router({
|
|
3740
3901
|
path: "/connect",
|
3741
3902
|
responses: {
|
3742
3903
|
200: DefaultSuccessResponseSchema.extend({
|
3743
|
-
data:
|
3904
|
+
data: import_zod54.default.any()
|
3744
3905
|
}),
|
3745
3906
|
500: DefaultErrorResponseSchema
|
3746
3907
|
},
|
@@ -3760,7 +3921,7 @@ var lineContract = (0, import_core16.initContract)().router({
|
|
3760
3921
|
|
3761
3922
|
// src/mail/email-engine-webhooks-events.contract.ts
|
3762
3923
|
var import_core17 = require("@ts-rest/core");
|
3763
|
-
var
|
3924
|
+
var import_zod55 = __toESM(require("zod"));
|
3764
3925
|
var emailEngineWebhooksEventsContract = (0, import_core17.initContract)().router({
|
3765
3926
|
handleWebhooksEvents: {
|
3766
3927
|
method: "POST",
|
@@ -3768,7 +3929,7 @@ var emailEngineWebhooksEventsContract = (0, import_core17.initContract)().router
|
|
3768
3929
|
// we don't need to respone anything but added responses just for solving type error
|
3769
3930
|
responses: {
|
3770
3931
|
200: DefaultSuccessResponseSchema.extend({
|
3771
|
-
message:
|
3932
|
+
message: import_zod55.default.string()
|
3772
3933
|
})
|
3773
3934
|
},
|
3774
3935
|
body: null,
|
@@ -3781,173 +3942,173 @@ var import_core22 = require("@ts-rest/core");
|
|
3781
3942
|
|
3782
3943
|
// src/mail/room-contract.ts
|
3783
3944
|
var import_core18 = require("@ts-rest/core");
|
3784
|
-
var
|
3945
|
+
var import_zod59 = __toESM(require("zod"));
|
3785
3946
|
|
3786
3947
|
// src/mail/schemas/room.schema.ts
|
3787
|
-
var
|
3948
|
+
var import_zod58 = __toESM(require("zod"));
|
3788
3949
|
|
3789
3950
|
// src/mail/schemas/account.schema.ts
|
3790
|
-
var import_zod55 = __toESM(require("zod"));
|
3791
|
-
var MailServerSchema = import_zod55.default.object({
|
3792
|
-
id: import_zod55.default.string(),
|
3793
|
-
createdAt: import_zod55.default.date(),
|
3794
|
-
updatedAt: import_zod55.default.date(),
|
3795
|
-
deletedAt: import_zod55.default.date().nullable(),
|
3796
|
-
name: import_zod55.default.string(),
|
3797
|
-
smtpHost: import_zod55.default.string(),
|
3798
|
-
smtpPort: import_zod55.default.string(),
|
3799
|
-
smtpTlsPort: import_zod55.default.string(),
|
3800
|
-
useTlsForSmtp: import_zod55.default.boolean(),
|
3801
|
-
imapHost: import_zod55.default.string(),
|
3802
|
-
imapPort: import_zod55.default.string(),
|
3803
|
-
imapTlsPort: import_zod55.default.string(),
|
3804
|
-
useTlsForImap: import_zod55.default.boolean()
|
3805
|
-
});
|
3806
|
-
var MailAccountSchema = import_zod55.default.object({
|
3807
|
-
id: import_zod55.default.string(),
|
3808
|
-
createdAt: import_zod55.default.date(),
|
3809
|
-
updatedAt: import_zod55.default.date(),
|
3810
|
-
deletedAt: import_zod55.default.date().nullable(),
|
3811
|
-
name: import_zod55.default.string(),
|
3812
|
-
address: import_zod55.default.string(),
|
3813
|
-
accountId: import_zod55.default.string(),
|
3814
|
-
mailServerId: import_zod55.default.string(),
|
3815
|
-
mailServer: MailServerSchema,
|
3816
|
-
state: import_zod55.default.union([
|
3817
|
-
import_zod55.default.literal("init"),
|
3818
|
-
import_zod55.default.literal("syncing"),
|
3819
|
-
import_zod55.default.literal("connecting"),
|
3820
|
-
import_zod55.default.literal("connected"),
|
3821
|
-
import_zod55.default.literal("disconnected"),
|
3822
|
-
import_zod55.default.literal("authenticationError"),
|
3823
|
-
import_zod55.default.literal("connectError"),
|
3824
|
-
import_zod55.default.literal("unset")
|
3825
|
-
])
|
3826
|
-
});
|
3827
|
-
|
3828
|
-
// src/mail/schemas/message.schema.ts
|
3829
3951
|
var import_zod56 = __toESM(require("zod"));
|
3830
|
-
var
|
3952
|
+
var MailServerSchema = import_zod56.default.object({
|
3831
3953
|
id: import_zod56.default.string(),
|
3832
3954
|
createdAt: import_zod56.default.date(),
|
3833
3955
|
updatedAt: import_zod56.default.date(),
|
3834
|
-
deletedAt: import_zod56.default.
|
3835
|
-
|
3836
|
-
|
3837
|
-
|
3838
|
-
|
3839
|
-
|
3840
|
-
|
3841
|
-
|
3842
|
-
|
3843
|
-
|
3844
|
-
|
3845
|
-
|
3846
|
-
bucket_name: import_zod56.default.string(),
|
3847
|
-
file_name: import_zod56.default.string(),
|
3848
|
-
file_key: import_zod56.default.string(),
|
3849
|
-
file_size: import_zod56.default.number(),
|
3850
|
-
file_url: import_zod56.default.string(),
|
3851
|
-
extension_name: import_zod56.default.string()
|
3852
|
-
})
|
3853
|
-
});
|
3854
|
-
var MessageSchema2 = import_zod56.default.object({
|
3956
|
+
deletedAt: import_zod56.default.date().nullable(),
|
3957
|
+
name: import_zod56.default.string(),
|
3958
|
+
smtpHost: import_zod56.default.string(),
|
3959
|
+
smtpPort: import_zod56.default.string(),
|
3960
|
+
smtpTlsPort: import_zod56.default.string(),
|
3961
|
+
useTlsForSmtp: import_zod56.default.boolean(),
|
3962
|
+
imapHost: import_zod56.default.string(),
|
3963
|
+
imapPort: import_zod56.default.string(),
|
3964
|
+
imapTlsPort: import_zod56.default.string(),
|
3965
|
+
useTlsForImap: import_zod56.default.boolean()
|
3966
|
+
});
|
3967
|
+
var MailAccountSchema = import_zod56.default.object({
|
3855
3968
|
id: import_zod56.default.string(),
|
3856
3969
|
createdAt: import_zod56.default.date(),
|
3857
3970
|
updatedAt: import_zod56.default.date(),
|
3858
|
-
deletedAt: import_zod56.default.
|
3859
|
-
|
3860
|
-
|
3861
|
-
|
3862
|
-
|
3863
|
-
|
3864
|
-
|
3865
|
-
|
3866
|
-
|
3867
|
-
|
3868
|
-
|
3869
|
-
|
3870
|
-
|
3871
|
-
|
3872
|
-
|
3873
|
-
|
3874
|
-
cc: import_zod56.default.array(MailUserSchema),
|
3875
|
-
bcc: import_zod56.default.array(MailUserSchema),
|
3876
|
-
attachments: import_zod56.default.array(AttachmentSchema)
|
3971
|
+
deletedAt: import_zod56.default.date().nullable(),
|
3972
|
+
name: import_zod56.default.string(),
|
3973
|
+
address: import_zod56.default.string(),
|
3974
|
+
accountId: import_zod56.default.string(),
|
3975
|
+
mailServerId: import_zod56.default.string(),
|
3976
|
+
mailServer: MailServerSchema,
|
3977
|
+
state: import_zod56.default.union([
|
3978
|
+
import_zod56.default.literal("init"),
|
3979
|
+
import_zod56.default.literal("syncing"),
|
3980
|
+
import_zod56.default.literal("connecting"),
|
3981
|
+
import_zod56.default.literal("connected"),
|
3982
|
+
import_zod56.default.literal("disconnected"),
|
3983
|
+
import_zod56.default.literal("authenticationError"),
|
3984
|
+
import_zod56.default.literal("connectError"),
|
3985
|
+
import_zod56.default.literal("unset")
|
3986
|
+
])
|
3877
3987
|
});
|
3878
3988
|
|
3879
|
-
// src/mail/schemas/
|
3880
|
-
var
|
3881
|
-
|
3882
|
-
createdAt: import_zod57.default.date(),
|
3883
|
-
updatedAt: import_zod57.default.date(),
|
3884
|
-
deletedAt: import_zod57.default.date().nullable(),
|
3885
|
-
name: import_zod57.default.string(),
|
3886
|
-
address: import_zod57.default.string()
|
3887
|
-
});
|
3888
|
-
var TagSchema2 = import_zod57.default.object({
|
3889
|
-
color: import_zod57.default.string(),
|
3890
|
-
id: import_zod57.default.string(),
|
3891
|
-
createdAt: import_zod57.default.date(),
|
3892
|
-
updatedAt: import_zod57.default.date(),
|
3893
|
-
deletedAt: import_zod57.default.date().nullable(),
|
3894
|
-
name: import_zod57.default.string()
|
3895
|
-
});
|
3896
|
-
var UserModel = import_zod57.default.object({
|
3897
|
-
id: import_zod57.default.string().uuid(),
|
3898
|
-
createdAt: import_zod57.default.date(),
|
3899
|
-
updatedAt: import_zod57.default.date(),
|
3900
|
-
deletedAt: import_zod57.default.date().nullable(),
|
3901
|
-
name: import_zod57.default.string(),
|
3902
|
-
email: import_zod57.default.string(),
|
3903
|
-
address: import_zod57.default.string().nullable(),
|
3904
|
-
phone: import_zod57.default.string().nullable(),
|
3905
|
-
notification_count: import_zod57.default.number().nullable()
|
3906
|
-
});
|
3907
|
-
var ActivityLogModel = import_zod57.default.object({
|
3989
|
+
// src/mail/schemas/message.schema.ts
|
3990
|
+
var import_zod57 = __toESM(require("zod"));
|
3991
|
+
var AttachmentSchema = import_zod57.default.object({
|
3908
3992
|
id: import_zod57.default.string(),
|
3909
3993
|
createdAt: import_zod57.default.date(),
|
3910
3994
|
updatedAt: import_zod57.default.date(),
|
3911
|
-
deletedAt: import_zod57.default.nullable(import_zod57.default.
|
3912
|
-
description: import_zod57.default.string(),
|
3913
|
-
actorId: import_zod57.default.string(),
|
3995
|
+
deletedAt: import_zod57.default.nullable(import_zod57.default.date()),
|
3914
3996
|
roomId: import_zod57.default.string(),
|
3915
|
-
|
3997
|
+
messageId: import_zod57.default.string(),
|
3998
|
+
fileName: import_zod57.default.string(),
|
3999
|
+
fileType: import_zod57.default.string(),
|
4000
|
+
emailEngineAttachmentId: import_zod57.default.string(),
|
4001
|
+
uploadId: import_zod57.default.string(),
|
4002
|
+
upload: import_zod57.default.object({
|
4003
|
+
id: import_zod57.default.string(),
|
4004
|
+
createdAt: import_zod57.default.date(),
|
4005
|
+
updatedAt: import_zod57.default.date(),
|
4006
|
+
deletedAt: import_zod57.default.nullable(import_zod57.default.date()),
|
4007
|
+
bucket_name: import_zod57.default.string(),
|
4008
|
+
file_name: import_zod57.default.string(),
|
4009
|
+
file_key: import_zod57.default.string(),
|
4010
|
+
file_size: import_zod57.default.number(),
|
4011
|
+
file_url: import_zod57.default.string(),
|
4012
|
+
extension_name: import_zod57.default.string()
|
4013
|
+
})
|
3916
4014
|
});
|
3917
|
-
var
|
3918
|
-
var MailRoomSchema = import_zod57.default.object({
|
4015
|
+
var MessageSchema2 = import_zod57.default.object({
|
3919
4016
|
id: import_zod57.default.string(),
|
3920
4017
|
createdAt: import_zod57.default.date(),
|
3921
4018
|
updatedAt: import_zod57.default.date(),
|
3922
|
-
deletedAt: import_zod57.default.
|
4019
|
+
deletedAt: import_zod57.default.nullable(import_zod57.default.date()),
|
4020
|
+
roomId: import_zod57.default.string(),
|
3923
4021
|
subject: import_zod57.default.string(),
|
3924
|
-
|
3925
|
-
|
3926
|
-
|
3927
|
-
|
4022
|
+
textPlain: import_zod57.default.string(),
|
4023
|
+
textHtml: import_zod57.default.string(),
|
4024
|
+
textId: import_zod57.default.string(),
|
4025
|
+
emailEngineEmailId: import_zod57.default.string(),
|
4026
|
+
emailEngineMessageId: import_zod57.default.string(),
|
4027
|
+
emailEngineReplyTo: import_zod57.default.nullable(import_zod57.default.string()),
|
3928
4028
|
direction: import_zod57.default.string(),
|
3929
|
-
|
3930
|
-
|
4029
|
+
date: import_zod57.default.date(),
|
4030
|
+
action: import_zod57.default.string(),
|
4031
|
+
unseen: import_zod57.default.boolean(),
|
4032
|
+
seemsLikeNew: import_zod57.default.boolean(),
|
3931
4033
|
from: import_zod57.default.array(MailUserSchema),
|
3932
4034
|
to: import_zod57.default.array(MailUserSchema),
|
3933
4035
|
cc: import_zod57.default.array(MailUserSchema),
|
3934
4036
|
bcc: import_zod57.default.array(MailUserSchema),
|
4037
|
+
attachments: import_zod57.default.array(AttachmentSchema)
|
4038
|
+
});
|
4039
|
+
|
4040
|
+
// src/mail/schemas/room.schema.ts
|
4041
|
+
var MailUserSchema = import_zod58.default.object({
|
4042
|
+
id: import_zod58.default.string(),
|
4043
|
+
createdAt: import_zod58.default.date(),
|
4044
|
+
updatedAt: import_zod58.default.date(),
|
4045
|
+
deletedAt: import_zod58.default.date().nullable(),
|
4046
|
+
name: import_zod58.default.string(),
|
4047
|
+
address: import_zod58.default.string()
|
4048
|
+
});
|
4049
|
+
var TagSchema2 = import_zod58.default.object({
|
4050
|
+
color: import_zod58.default.string(),
|
4051
|
+
id: import_zod58.default.string(),
|
4052
|
+
createdAt: import_zod58.default.date(),
|
4053
|
+
updatedAt: import_zod58.default.date(),
|
4054
|
+
deletedAt: import_zod58.default.date().nullable(),
|
4055
|
+
name: import_zod58.default.string()
|
4056
|
+
});
|
4057
|
+
var UserModel = import_zod58.default.object({
|
4058
|
+
id: import_zod58.default.string().uuid(),
|
4059
|
+
createdAt: import_zod58.default.date(),
|
4060
|
+
updatedAt: import_zod58.default.date(),
|
4061
|
+
deletedAt: import_zod58.default.date().nullable(),
|
4062
|
+
name: import_zod58.default.string(),
|
4063
|
+
email: import_zod58.default.string(),
|
4064
|
+
address: import_zod58.default.string().nullable(),
|
4065
|
+
phone: import_zod58.default.string().nullable(),
|
4066
|
+
notification_count: import_zod58.default.number().nullable()
|
4067
|
+
});
|
4068
|
+
var ActivityLogModel = import_zod58.default.object({
|
4069
|
+
id: import_zod58.default.string(),
|
4070
|
+
createdAt: import_zod58.default.date(),
|
4071
|
+
updatedAt: import_zod58.default.date(),
|
4072
|
+
deletedAt: import_zod58.default.nullable(import_zod58.default.string()),
|
4073
|
+
description: import_zod58.default.string(),
|
4074
|
+
actorId: import_zod58.default.string(),
|
4075
|
+
roomId: import_zod58.default.string(),
|
4076
|
+
actor: UserModel
|
4077
|
+
});
|
4078
|
+
var MessagesAndLogs = import_zod58.default.array(import_zod58.default.union([MessageSchema2, ActivityLogModel]));
|
4079
|
+
var MailRoomSchema = import_zod58.default.object({
|
4080
|
+
id: import_zod58.default.string(),
|
4081
|
+
createdAt: import_zod58.default.date(),
|
4082
|
+
updatedAt: import_zod58.default.date(),
|
4083
|
+
deletedAt: import_zod58.default.date().nullable(),
|
4084
|
+
subject: import_zod58.default.string(),
|
4085
|
+
resolved: import_zod58.default.boolean(),
|
4086
|
+
assigneeId: import_zod58.default.string().nullable(),
|
4087
|
+
note: import_zod58.default.string(),
|
4088
|
+
mailId: import_zod58.default.string(),
|
4089
|
+
direction: import_zod58.default.string(),
|
4090
|
+
lastMessageId: import_zod58.default.string(),
|
4091
|
+
firstMessageId: import_zod58.default.string(),
|
4092
|
+
from: import_zod58.default.array(MailUserSchema),
|
4093
|
+
to: import_zod58.default.array(MailUserSchema),
|
4094
|
+
cc: import_zod58.default.array(MailUserSchema),
|
4095
|
+
bcc: import_zod58.default.array(MailUserSchema),
|
3935
4096
|
firstMessage: MessageSchema2,
|
3936
4097
|
lastMessage: MessageSchema2,
|
3937
|
-
tags:
|
4098
|
+
tags: import_zod58.default.array(TagSchema2),
|
3938
4099
|
assignee: UserModel,
|
3939
|
-
messages:
|
4100
|
+
messages: import_zod58.default.array(MessageSchema2),
|
3940
4101
|
messagesAndLogs: MessagesAndLogs,
|
3941
4102
|
mail: MailAccountSchema,
|
3942
|
-
unReadMessageCount:
|
3943
|
-
});
|
3944
|
-
var AttachmentSchema2 =
|
3945
|
-
fileName:
|
3946
|
-
fileType:
|
3947
|
-
emailEngineAttachmentId:
|
3948
|
-
uploadId:
|
3949
|
-
messageId:
|
3950
|
-
roomId:
|
4103
|
+
unReadMessageCount: import_zod58.default.number()
|
4104
|
+
});
|
4105
|
+
var AttachmentSchema2 = import_zod58.default.object({
|
4106
|
+
fileName: import_zod58.default.string(),
|
4107
|
+
fileType: import_zod58.default.string(),
|
4108
|
+
emailEngineAttachmentId: import_zod58.default.string(),
|
4109
|
+
uploadId: import_zod58.default.string(),
|
4110
|
+
messageId: import_zod58.default.string(),
|
4111
|
+
roomId: import_zod58.default.string(),
|
3951
4112
|
upload: UploadSchema
|
3952
4113
|
});
|
3953
4114
|
|
@@ -3959,7 +4120,7 @@ var roomContract = (0, import_core18.initContract)().router(
|
|
3959
4120
|
path: "/",
|
3960
4121
|
responses: {
|
3961
4122
|
200: DefaultSuccessResponseSchema.extend({
|
3962
|
-
message:
|
4123
|
+
message: import_zod59.default.string()
|
3963
4124
|
}),
|
3964
4125
|
...DefaultResponses
|
3965
4126
|
},
|
@@ -3969,19 +4130,19 @@ var roomContract = (0, import_core18.initContract)().router(
|
|
3969
4130
|
getAll: {
|
3970
4131
|
method: "GET",
|
3971
4132
|
path: "",
|
3972
|
-
query:
|
3973
|
-
page:
|
3974
|
-
pageSize:
|
3975
|
-
keyword:
|
3976
|
-
assigneeId:
|
3977
|
-
resolved:
|
4133
|
+
query: import_zod59.default.object({
|
4134
|
+
page: import_zod59.default.coerce.number().default(1),
|
4135
|
+
pageSize: import_zod59.default.coerce.number().default(10),
|
4136
|
+
keyword: import_zod59.default.string().optional(),
|
4137
|
+
assigneeId: import_zod59.default.string().uuid().optional().nullable(),
|
4138
|
+
resolved: import_zod59.default.boolean().or(import_zod59.default.string().transform((value) => value.toLowerCase() === "true")).optional().nullable()
|
3978
4139
|
}),
|
3979
4140
|
responses: {
|
3980
4141
|
200: DefaultSuccessResponseSchema.extend({
|
3981
|
-
data:
|
3982
|
-
total:
|
3983
|
-
page:
|
3984
|
-
pageSize:
|
4142
|
+
data: import_zod59.default.array(MailRoomSchema),
|
4143
|
+
total: import_zod59.default.number(),
|
4144
|
+
page: import_zod59.default.number(),
|
4145
|
+
pageSize: import_zod59.default.number()
|
3985
4146
|
}),
|
3986
4147
|
...DefaultResponses
|
3987
4148
|
},
|
@@ -3990,8 +4151,8 @@ var roomContract = (0, import_core18.initContract)().router(
|
|
3990
4151
|
getById: {
|
3991
4152
|
method: "GET",
|
3992
4153
|
path: "/:id",
|
3993
|
-
pathParams:
|
3994
|
-
id:
|
4154
|
+
pathParams: import_zod59.default.object({
|
4155
|
+
id: import_zod59.default.string().uuid()
|
3995
4156
|
}),
|
3996
4157
|
responses: {
|
3997
4158
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -4004,12 +4165,12 @@ var roomContract = (0, import_core18.initContract)().router(
|
|
4004
4165
|
getAttachments: {
|
4005
4166
|
method: "GET",
|
4006
4167
|
path: "/:id/attachments",
|
4007
|
-
pathParams:
|
4008
|
-
id:
|
4168
|
+
pathParams: import_zod59.default.object({
|
4169
|
+
id: import_zod59.default.string().uuid()
|
4009
4170
|
}),
|
4010
4171
|
responses: {
|
4011
4172
|
200: DefaultSuccessResponseSchema.extend({
|
4012
|
-
data:
|
4173
|
+
data: import_zod59.default.array(AttachmentSchema2)
|
4013
4174
|
}),
|
4014
4175
|
...DefaultResponses
|
4015
4176
|
},
|
@@ -4018,12 +4179,12 @@ var roomContract = (0, import_core18.initContract)().router(
|
|
4018
4179
|
getParticipants: {
|
4019
4180
|
method: "GET",
|
4020
4181
|
path: "/:id/participants",
|
4021
|
-
pathParams:
|
4022
|
-
id:
|
4182
|
+
pathParams: import_zod59.default.object({
|
4183
|
+
id: import_zod59.default.string().uuid()
|
4023
4184
|
}),
|
4024
4185
|
responses: {
|
4025
4186
|
200: DefaultSuccessResponseSchema.extend({
|
4026
|
-
data:
|
4187
|
+
data: import_zod59.default.array(MailUserSchema)
|
4027
4188
|
}),
|
4028
4189
|
...DefaultResponses
|
4029
4190
|
},
|
@@ -4032,8 +4193,8 @@ var roomContract = (0, import_core18.initContract)().router(
|
|
4032
4193
|
update: {
|
4033
4194
|
method: "PATCH",
|
4034
4195
|
path: "/:id",
|
4035
|
-
pathParams:
|
4036
|
-
id:
|
4196
|
+
pathParams: import_zod59.default.object({
|
4197
|
+
id: import_zod59.default.string()
|
4037
4198
|
}),
|
4038
4199
|
responses: {
|
4039
4200
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -4041,15 +4202,15 @@ var roomContract = (0, import_core18.initContract)().router(
|
|
4041
4202
|
}),
|
4042
4203
|
...DefaultResponses
|
4043
4204
|
},
|
4044
|
-
body:
|
4045
|
-
resolved:
|
4046
|
-
|
4205
|
+
body: import_zod59.default.object({
|
4206
|
+
resolved: import_zod59.default.boolean().or(
|
4207
|
+
import_zod59.default.union([import_zod59.default.literal("true"), import_zod59.default.literal("false")]).transform((value) => value.toLowerCase() === "true")
|
4047
4208
|
).optional().nullable(),
|
4048
|
-
assigneeId:
|
4049
|
-
note:
|
4050
|
-
tags:
|
4051
|
-
handover:
|
4052
|
-
|
4209
|
+
assigneeId: import_zod59.default.string().uuid().optional().nullable(),
|
4210
|
+
note: import_zod59.default.string().optional(),
|
4211
|
+
tags: import_zod59.default.array(import_zod59.default.string().uuid()).optional(),
|
4212
|
+
handover: import_zod59.default.boolean().or(
|
4213
|
+
import_zod59.default.union([import_zod59.default.literal("true"), import_zod59.default.literal("false")]).transform((value) => value.toLowerCase() === "true")
|
4053
4214
|
).optional().nullable()
|
4054
4215
|
}),
|
4055
4216
|
summary: "Update a mail room by id"
|
@@ -4057,12 +4218,12 @@ var roomContract = (0, import_core18.initContract)().router(
|
|
4057
4218
|
markAsRead: {
|
4058
4219
|
method: "GET",
|
4059
4220
|
path: "/:id",
|
4060
|
-
pathParams:
|
4061
|
-
id:
|
4221
|
+
pathParams: import_zod59.default.object({
|
4222
|
+
id: import_zod59.default.string().uuid()
|
4062
4223
|
}),
|
4063
4224
|
responses: {
|
4064
4225
|
200: DefaultSuccessResponseSchema.extend({
|
4065
|
-
message:
|
4226
|
+
message: import_zod59.default.string()
|
4066
4227
|
}),
|
4067
4228
|
...DefaultResponses
|
4068
4229
|
},
|
@@ -4076,47 +4237,47 @@ var roomContract = (0, import_core18.initContract)().router(
|
|
4076
4237
|
|
4077
4238
|
// src/mail/account-contract.ts
|
4078
4239
|
var import_core19 = require("@ts-rest/core");
|
4079
|
-
var
|
4240
|
+
var import_zod61 = __toESM(require("zod"));
|
4080
4241
|
|
4081
4242
|
// src/mail/schemas/account-validation.schema.ts
|
4082
|
-
var
|
4243
|
+
var import_zod60 = __toESM(require("zod"));
|
4083
4244
|
var AccountContractsValidationSchemas = {
|
4084
4245
|
create: {
|
4085
|
-
input:
|
4086
|
-
address:
|
4087
|
-
name:
|
4088
|
-
password:
|
4089
|
-
mailServerId:
|
4246
|
+
input: import_zod60.default.object({
|
4247
|
+
address: import_zod60.default.string().email("Email address must be valid email."),
|
4248
|
+
name: import_zod60.default.string().min(1, "Account name cannot be empty."),
|
4249
|
+
password: import_zod60.default.string().min(1, "Password cannot be empty."),
|
4250
|
+
mailServerId: import_zod60.default.string().uuid("Invalid mail_server_id")
|
4090
4251
|
})
|
4091
4252
|
},
|
4092
4253
|
getById: {
|
4093
|
-
input:
|
4094
|
-
id:
|
4254
|
+
input: import_zod60.default.object({
|
4255
|
+
id: import_zod60.default.string().uuid()
|
4095
4256
|
}),
|
4096
4257
|
output: MailAccountSchema
|
4097
4258
|
},
|
4098
4259
|
getAll: {
|
4099
|
-
output:
|
4260
|
+
output: import_zod60.default.array(MailAccountSchema)
|
4100
4261
|
},
|
4101
4262
|
update: {
|
4102
4263
|
input: MailAccountSchema,
|
4103
4264
|
output: MailAccountSchema
|
4104
4265
|
},
|
4105
4266
|
disconnect: {
|
4106
|
-
input:
|
4107
|
-
id:
|
4267
|
+
input: import_zod60.default.object({
|
4268
|
+
id: import_zod60.default.string().uuid()
|
4108
4269
|
}),
|
4109
4270
|
output: MailAccountSchema
|
4110
4271
|
},
|
4111
4272
|
reconnect: {
|
4112
|
-
input:
|
4113
|
-
id:
|
4273
|
+
input: import_zod60.default.object({
|
4274
|
+
id: import_zod60.default.string()
|
4114
4275
|
}),
|
4115
4276
|
output: MailAccountSchema
|
4116
4277
|
},
|
4117
4278
|
delete: {
|
4118
|
-
input:
|
4119
|
-
id:
|
4279
|
+
input: import_zod60.default.object({
|
4280
|
+
id: import_zod60.default.string()
|
4120
4281
|
}),
|
4121
4282
|
output: MailAccountSchema
|
4122
4283
|
}
|
@@ -4132,16 +4293,16 @@ var accountContract = (0, import_core19.initContract)().router(
|
|
4132
4293
|
responses: {
|
4133
4294
|
201: DefaultSuccessResponseSchema.extend({
|
4134
4295
|
// data: AccountContractsValidationSchemas.create.output,
|
4135
|
-
message:
|
4296
|
+
message: import_zod61.default.string()
|
4136
4297
|
}),
|
4137
|
-
400:
|
4138
|
-
message:
|
4298
|
+
400: import_zod61.default.object({
|
4299
|
+
message: import_zod61.default.string()
|
4139
4300
|
}),
|
4140
|
-
409:
|
4141
|
-
message:
|
4301
|
+
409: import_zod61.default.object({
|
4302
|
+
message: import_zod61.default.string()
|
4142
4303
|
}),
|
4143
|
-
500:
|
4144
|
-
message:
|
4304
|
+
500: import_zod61.default.object({
|
4305
|
+
message: import_zod61.default.string()
|
4145
4306
|
}),
|
4146
4307
|
...DefaultResponses
|
4147
4308
|
},
|
@@ -4170,7 +4331,7 @@ var accountContract = (0, import_core19.initContract)().router(
|
|
4170
4331
|
path: "",
|
4171
4332
|
responses: {
|
4172
4333
|
200: DefaultSuccessResponseSchema.extend({
|
4173
|
-
data:
|
4334
|
+
data: import_zod61.default.any()
|
4174
4335
|
// data: AccountContractsValidationSchemas.getAll.output,
|
4175
4336
|
}),
|
4176
4337
|
...DefaultResponses
|
@@ -4182,8 +4343,8 @@ var accountContract = (0, import_core19.initContract)().router(
|
|
4182
4343
|
update: {
|
4183
4344
|
method: "PATCH",
|
4184
4345
|
path: "/:id",
|
4185
|
-
pathParams:
|
4186
|
-
id:
|
4346
|
+
pathParams: import_zod61.default.object({
|
4347
|
+
id: import_zod61.default.string().uuid()
|
4187
4348
|
}),
|
4188
4349
|
responses: {
|
4189
4350
|
201: DefaultSuccessResponseSchema.extend({
|
@@ -4232,7 +4393,7 @@ var accountContract = (0, import_core19.initContract)().router(
|
|
4232
4393
|
pathParams: AccountContractsValidationSchemas.delete.input,
|
4233
4394
|
responses: {
|
4234
4395
|
200: DefaultSuccessResponseSchema.extend({
|
4235
|
-
message:
|
4396
|
+
message: import_zod61.default.string()
|
4236
4397
|
}),
|
4237
4398
|
...DefaultResponses
|
4238
4399
|
},
|
@@ -4249,7 +4410,7 @@ var accountContract = (0, import_core19.initContract)().router(
|
|
4249
4410
|
|
4250
4411
|
// src/mail/mail-server-contract.ts
|
4251
4412
|
var import_core20 = require("@ts-rest/core");
|
4252
|
-
var
|
4413
|
+
var import_zod62 = __toESM(require("zod"));
|
4253
4414
|
var serverContract = (0, import_core20.initContract)().router(
|
4254
4415
|
{
|
4255
4416
|
create: {
|
@@ -4257,7 +4418,7 @@ var serverContract = (0, import_core20.initContract)().router(
|
|
4257
4418
|
path: "/",
|
4258
4419
|
responses: {
|
4259
4420
|
200: DefaultSuccessResponseSchema.extend({
|
4260
|
-
message:
|
4421
|
+
message: import_zod62.default.string()
|
4261
4422
|
}),
|
4262
4423
|
...DefaultResponses
|
4263
4424
|
},
|
@@ -4267,12 +4428,12 @@ var serverContract = (0, import_core20.initContract)().router(
|
|
4267
4428
|
get: {
|
4268
4429
|
method: "GET",
|
4269
4430
|
path: "/:id",
|
4270
|
-
pathParams:
|
4271
|
-
id:
|
4431
|
+
pathParams: import_zod62.default.object({
|
4432
|
+
id: import_zod62.default.string()
|
4272
4433
|
}),
|
4273
4434
|
responses: {
|
4274
4435
|
200: DefaultSuccessResponseSchema.extend({
|
4275
|
-
message:
|
4436
|
+
message: import_zod62.default.string()
|
4276
4437
|
}),
|
4277
4438
|
...DefaultResponses
|
4278
4439
|
},
|
@@ -4281,12 +4442,12 @@ var serverContract = (0, import_core20.initContract)().router(
|
|
4281
4442
|
update: {
|
4282
4443
|
method: "PATCH",
|
4283
4444
|
path: "/:id",
|
4284
|
-
pathParams:
|
4285
|
-
id:
|
4445
|
+
pathParams: import_zod62.default.object({
|
4446
|
+
id: import_zod62.default.string()
|
4286
4447
|
}),
|
4287
4448
|
responses: {
|
4288
4449
|
200: DefaultSuccessResponseSchema.extend({
|
4289
|
-
message:
|
4450
|
+
message: import_zod62.default.string()
|
4290
4451
|
}),
|
4291
4452
|
...DefaultResponses
|
4292
4453
|
},
|
@@ -4296,12 +4457,12 @@ var serverContract = (0, import_core20.initContract)().router(
|
|
4296
4457
|
delete: {
|
4297
4458
|
method: "PATCH",
|
4298
4459
|
path: "/:id",
|
4299
|
-
pathParams:
|
4300
|
-
id:
|
4460
|
+
pathParams: import_zod62.default.object({
|
4461
|
+
id: import_zod62.default.string()
|
4301
4462
|
}),
|
4302
4463
|
responses: {
|
4303
4464
|
200: DefaultSuccessResponseSchema.extend({
|
4304
|
-
message:
|
4465
|
+
message: import_zod62.default.string()
|
4305
4466
|
}),
|
4306
4467
|
...DefaultResponses
|
4307
4468
|
},
|
@@ -4316,44 +4477,44 @@ var serverContract = (0, import_core20.initContract)().router(
|
|
4316
4477
|
|
4317
4478
|
// src/mail/message-contract.ts
|
4318
4479
|
var import_core21 = require("@ts-rest/core");
|
4319
|
-
var
|
4480
|
+
var import_zod64 = __toESM(require("zod"));
|
4320
4481
|
|
4321
4482
|
// src/mail/schemas/message-validation.schema.ts
|
4322
|
-
var
|
4323
|
-
var MailParticipant =
|
4324
|
-
name:
|
4325
|
-
address:
|
4483
|
+
var import_zod63 = __toESM(require("zod"));
|
4484
|
+
var MailParticipant = import_zod63.default.object({
|
4485
|
+
name: import_zod63.default.string().optional(),
|
4486
|
+
address: import_zod63.default.string().email()
|
4326
4487
|
});
|
4327
4488
|
var MessageContractsValidationsSchema = {
|
4328
4489
|
submit: {
|
4329
|
-
input:
|
4330
|
-
subject:
|
4331
|
-
text:
|
4332
|
-
html:
|
4490
|
+
input: import_zod63.default.object({
|
4491
|
+
subject: import_zod63.default.string(),
|
4492
|
+
text: import_zod63.default.string(),
|
4493
|
+
html: import_zod63.default.string(),
|
4333
4494
|
from: MailParticipant,
|
4334
|
-
to:
|
4335
|
-
cc:
|
4336
|
-
bcc:
|
4337
|
-
reference:
|
4338
|
-
messageId:
|
4339
|
-
action:
|
4495
|
+
to: import_zod63.default.array(MailParticipant),
|
4496
|
+
cc: import_zod63.default.array(MailParticipant).optional(),
|
4497
|
+
bcc: import_zod63.default.array(MailParticipant).optional(),
|
4498
|
+
reference: import_zod63.default.object({
|
4499
|
+
messageId: import_zod63.default.string(),
|
4500
|
+
action: import_zod63.default.union([import_zod63.default.literal("reply"), import_zod63.default.literal("forward")])
|
4340
4501
|
}).optional(),
|
4341
|
-
attachments:
|
4342
|
-
|
4343
|
-
fileType:
|
4344
|
-
fileName:
|
4345
|
-
fileKey:
|
4346
|
-
fileSize:
|
4347
|
-
bucketName:
|
4348
|
-
presignedUrl:
|
4502
|
+
attachments: import_zod63.default.array(
|
4503
|
+
import_zod63.default.object({
|
4504
|
+
fileType: import_zod63.default.string(),
|
4505
|
+
fileName: import_zod63.default.string(),
|
4506
|
+
fileKey: import_zod63.default.string(),
|
4507
|
+
fileSize: import_zod63.default.number(),
|
4508
|
+
bucketName: import_zod63.default.string(),
|
4509
|
+
presignedUrl: import_zod63.default.string()
|
4349
4510
|
})
|
4350
4511
|
).optional()
|
4351
4512
|
}),
|
4352
|
-
output:
|
4353
|
-
response:
|
4354
|
-
messageId:
|
4355
|
-
sendAt:
|
4356
|
-
queueId:
|
4513
|
+
output: import_zod63.default.object({
|
4514
|
+
response: import_zod63.default.string(),
|
4515
|
+
messageId: import_zod63.default.string(),
|
4516
|
+
sendAt: import_zod63.default.string(),
|
4517
|
+
queueId: import_zod63.default.string()
|
4357
4518
|
})
|
4358
4519
|
}
|
4359
4520
|
};
|
@@ -4378,8 +4539,8 @@ var messageContract = (0, import_core21.initContract)().router(
|
|
4378
4539
|
getById: {
|
4379
4540
|
method: "GET",
|
4380
4541
|
path: "/:id",
|
4381
|
-
pathParams:
|
4382
|
-
id:
|
4542
|
+
pathParams: import_zod64.default.object({
|
4543
|
+
id: import_zod64.default.string()
|
4383
4544
|
}),
|
4384
4545
|
responses: {
|
4385
4546
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -4406,6 +4567,7 @@ var mailContract = (0, import_core22.initContract)().router({
|
|
4406
4567
|
|
4407
4568
|
// src/messenger/index.ts
|
4408
4569
|
var import_core23 = require("@ts-rest/core");
|
4570
|
+
var import_zod65 = __toESM(require("zod"));
|
4409
4571
|
var messengerContract = (0, import_core23.initContract)().router({
|
4410
4572
|
sendMessage: {
|
4411
4573
|
method: "POST",
|
@@ -4436,6 +4598,32 @@ var messengerContract = (0, import_core23.initContract)().router({
|
|
4436
4598
|
400: DefaultErrorResponseSchema
|
4437
4599
|
}
|
4438
4600
|
},
|
4601
|
+
reconnect: {
|
4602
|
+
method: "POST",
|
4603
|
+
path: "/reconnect/:channelId",
|
4604
|
+
pathParams: import_zod65.default.object({
|
4605
|
+
channelId: import_zod65.default.string().uuid()
|
4606
|
+
}),
|
4607
|
+
body: null,
|
4608
|
+
responses: {
|
4609
|
+
200: ChannelServiceResponseSchema,
|
4610
|
+
500: DefaultErrorResponseSchema,
|
4611
|
+
400: DefaultErrorResponseSchema
|
4612
|
+
}
|
4613
|
+
},
|
4614
|
+
delete: {
|
4615
|
+
method: "DELETE",
|
4616
|
+
path: "/delete/:channelId",
|
4617
|
+
pathParams: import_zod65.default.object({
|
4618
|
+
channelId: import_zod65.default.string().uuid()
|
4619
|
+
}),
|
4620
|
+
body: null,
|
4621
|
+
responses: {
|
4622
|
+
200: ChannelServiceResponseSchema,
|
4623
|
+
500: DefaultErrorResponseSchema,
|
4624
|
+
400: DefaultErrorResponseSchema
|
4625
|
+
}
|
4626
|
+
},
|
4439
4627
|
relogin: {
|
4440
4628
|
method: "POST",
|
4441
4629
|
path: "/relogin",
|
@@ -4459,7 +4647,7 @@ var messengerContract = (0, import_core23.initContract)().router({
|
|
4459
4647
|
|
4460
4648
|
// src/permission/index.ts
|
4461
4649
|
var import_core24 = require("@ts-rest/core");
|
4462
|
-
var
|
4650
|
+
var import_zod66 = __toESM(require("zod"));
|
4463
4651
|
var permissionContract = (0, import_core24.initContract)().router(
|
4464
4652
|
{
|
4465
4653
|
getPermissions: {
|
@@ -4467,9 +4655,9 @@ var permissionContract = (0, import_core24.initContract)().router(
|
|
4467
4655
|
path: "",
|
4468
4656
|
headers: DefaultHeaderSchema,
|
4469
4657
|
responses: {
|
4470
|
-
200:
|
4471
|
-
400:
|
4472
|
-
message:
|
4658
|
+
200: import_zod66.default.object({ permissions: PermissionSchema.array() }),
|
4659
|
+
400: import_zod66.default.object({
|
4660
|
+
message: import_zod66.default.string()
|
4473
4661
|
}),
|
4474
4662
|
401: DefaultUnauthorizedSchema,
|
4475
4663
|
500: DefaultErrorResponseSchema
|
@@ -4482,15 +4670,15 @@ var permissionContract = (0, import_core24.initContract)().router(
|
|
4482
4670
|
|
4483
4671
|
// src/role/index.ts
|
4484
4672
|
var import_core25 = require("@ts-rest/core");
|
4485
|
-
var
|
4673
|
+
var import_zod68 = __toESM(require("zod"));
|
4486
4674
|
|
4487
4675
|
// src/role/validation.ts
|
4488
|
-
var
|
4489
|
-
var CreateRoleSchema =
|
4490
|
-
systemName:
|
4491
|
-
displayName:
|
4492
|
-
description:
|
4493
|
-
permissions:
|
4676
|
+
var import_zod67 = require("zod");
|
4677
|
+
var CreateRoleSchema = import_zod67.z.object({
|
4678
|
+
systemName: import_zod67.z.string(),
|
4679
|
+
displayName: import_zod67.z.string(),
|
4680
|
+
description: import_zod67.z.string().nullable(),
|
4681
|
+
permissions: import_zod67.z.array(import_zod67.z.string())
|
4494
4682
|
});
|
4495
4683
|
var UpdateRoleSchema = CreateRoleSchema;
|
4496
4684
|
|
@@ -4506,8 +4694,8 @@ var roleContract = (0, import_core25.initContract)().router(
|
|
4506
4694
|
201: DefaultSuccessResponseSchema.extend({
|
4507
4695
|
role: RoleSchema
|
4508
4696
|
}),
|
4509
|
-
400:
|
4510
|
-
message:
|
4697
|
+
400: import_zod68.default.object({
|
4698
|
+
message: import_zod68.default.string()
|
4511
4699
|
}),
|
4512
4700
|
401: DefaultUnauthorizedSchema,
|
4513
4701
|
500: DefaultErrorResponseSchema
|
@@ -4517,15 +4705,15 @@ var roleContract = (0, import_core25.initContract)().router(
|
|
4517
4705
|
getRoles: {
|
4518
4706
|
method: "GET",
|
4519
4707
|
path: "",
|
4520
|
-
query:
|
4521
|
-
page:
|
4522
|
-
pageSize:
|
4708
|
+
query: import_zod68.default.object({
|
4709
|
+
page: import_zod68.default.coerce.number().default(1),
|
4710
|
+
pageSize: import_zod68.default.coerce.number().default(10)
|
4523
4711
|
}).optional(),
|
4524
4712
|
headers: DefaultHeaderSchema,
|
4525
4713
|
responses: {
|
4526
4714
|
200: WithPagination(RoleSchema),
|
4527
|
-
400:
|
4528
|
-
message:
|
4715
|
+
400: import_zod68.default.object({
|
4716
|
+
message: import_zod68.default.string()
|
4529
4717
|
}),
|
4530
4718
|
401: DefaultUnauthorizedSchema,
|
4531
4719
|
500: DefaultErrorResponseSchema
|
@@ -4535,15 +4723,15 @@ var roleContract = (0, import_core25.initContract)().router(
|
|
4535
4723
|
updateRole: {
|
4536
4724
|
method: "PATCH",
|
4537
4725
|
path: "/:id",
|
4538
|
-
pathParams:
|
4726
|
+
pathParams: import_zod68.default.object({ id: import_zod68.default.string() }),
|
4539
4727
|
headers: DefaultHeaderSchema,
|
4540
4728
|
body: UpdateRoleSchema,
|
4541
4729
|
responses: {
|
4542
4730
|
201: DefaultSuccessResponseSchema.extend({
|
4543
4731
|
role: RoleSchema
|
4544
4732
|
}),
|
4545
|
-
400:
|
4546
|
-
message:
|
4733
|
+
400: import_zod68.default.object({
|
4734
|
+
message: import_zod68.default.string()
|
4547
4735
|
}),
|
4548
4736
|
401: DefaultUnauthorizedSchema,
|
4549
4737
|
500: DefaultErrorResponseSchema
|
@@ -4553,11 +4741,11 @@ var roleContract = (0, import_core25.initContract)().router(
|
|
4553
4741
|
deleteRole: {
|
4554
4742
|
method: "DELETE",
|
4555
4743
|
path: "/:id",
|
4556
|
-
pathParams:
|
4744
|
+
pathParams: import_zod68.default.object({ id: import_zod68.default.string() }),
|
4557
4745
|
headers: DefaultHeaderSchema,
|
4558
4746
|
body: null,
|
4559
4747
|
responses: {
|
4560
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
4748
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod68.default.string() }),
|
4561
4749
|
500: DefaultErrorResponseSchema
|
4562
4750
|
},
|
4563
4751
|
summary: "Delete a role."
|
@@ -4568,19 +4756,19 @@ var roleContract = (0, import_core25.initContract)().router(
|
|
4568
4756
|
|
4569
4757
|
// src/tag/index.ts
|
4570
4758
|
var import_core26 = require("@ts-rest/core");
|
4571
|
-
var
|
4759
|
+
var import_zod70 = __toESM(require("zod"));
|
4572
4760
|
|
4573
4761
|
// src/tag/validation.ts
|
4574
|
-
var
|
4575
|
-
var CreateTagSchema =
|
4576
|
-
name:
|
4762
|
+
var import_zod69 = require("zod");
|
4763
|
+
var CreateTagSchema = import_zod69.z.object({
|
4764
|
+
name: import_zod69.z.string(),
|
4577
4765
|
group: TagGroupSchema
|
4578
4766
|
});
|
4579
|
-
var GetTagsSchema =
|
4767
|
+
var GetTagsSchema = import_zod69.z.object({
|
4580
4768
|
group: TagGroupSchema.default("general"),
|
4581
|
-
keyword:
|
4769
|
+
keyword: import_zod69.z.string()
|
4582
4770
|
}).partial().optional();
|
4583
|
-
var UpdateTagSchema =
|
4771
|
+
var UpdateTagSchema = import_zod69.z.object({ name: import_zod69.z.string() });
|
4584
4772
|
|
4585
4773
|
// src/tag/index.ts
|
4586
4774
|
var tagContract = (0, import_core26.initContract)().router(
|
@@ -4603,7 +4791,7 @@ var tagContract = (0, import_core26.initContract)().router(
|
|
4603
4791
|
query: GetTagsSchema,
|
4604
4792
|
responses: {
|
4605
4793
|
200: DefaultSuccessResponseSchema.extend({
|
4606
|
-
tags:
|
4794
|
+
tags: import_zod70.default.array(TagSchema)
|
4607
4795
|
}),
|
4608
4796
|
500: DefaultErrorResponseSchema
|
4609
4797
|
},
|
@@ -4612,7 +4800,7 @@ var tagContract = (0, import_core26.initContract)().router(
|
|
4612
4800
|
updateTag: {
|
4613
4801
|
method: "PATCH",
|
4614
4802
|
path: "/:id",
|
4615
|
-
pathParams:
|
4803
|
+
pathParams: import_zod70.default.object({ id: import_zod70.default.string() }),
|
4616
4804
|
body: UpdateTagSchema,
|
4617
4805
|
responses: {
|
4618
4806
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -4625,11 +4813,11 @@ var tagContract = (0, import_core26.initContract)().router(
|
|
4625
4813
|
deleteTag: {
|
4626
4814
|
method: "DELETE",
|
4627
4815
|
path: "/:id",
|
4628
|
-
pathParams:
|
4629
|
-
body:
|
4816
|
+
pathParams: import_zod70.default.object({ id: import_zod70.default.string() }),
|
4817
|
+
body: import_zod70.default.any().optional(),
|
4630
4818
|
// We don't need the body.
|
4631
4819
|
responses: {
|
4632
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
4820
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod70.default.string() }),
|
4633
4821
|
500: DefaultErrorResponseSchema
|
4634
4822
|
},
|
4635
4823
|
headers: DefaultHeaderSchema
|
@@ -4642,27 +4830,27 @@ var tagContract = (0, import_core26.initContract)().router(
|
|
4642
4830
|
|
4643
4831
|
// src/telephony-agent-presence-status/index.ts
|
4644
4832
|
var import_core27 = require("@ts-rest/core");
|
4645
|
-
var
|
4833
|
+
var import_zod73 = __toESM(require("zod"));
|
4646
4834
|
|
4647
4835
|
// src/telephony-agent-presence-status/schema.ts
|
4648
|
-
var
|
4836
|
+
var import_zod71 = __toESM(require("zod"));
|
4649
4837
|
var PresenceStatusSchema = DefaultEntitySchema.extend({
|
4650
|
-
status:
|
4651
|
-
description:
|
4838
|
+
status: import_zod71.default.string(),
|
4839
|
+
description: import_zod71.default.string()
|
4652
4840
|
});
|
4653
4841
|
var UserPresenceStatusSchema = DefaultEntitySchema.extend({
|
4654
4842
|
user: UserSchema,
|
4655
4843
|
presenceStatus: PresenceStatusSchema,
|
4656
|
-
customPresenceStatus:
|
4844
|
+
customPresenceStatus: import_zod71.default.string().nullable().optional()
|
4657
4845
|
});
|
4658
4846
|
|
4659
4847
|
// src/telephony-agent-presence-status/validation.ts
|
4660
|
-
var
|
4661
|
-
var UpdateUserStatusSchema =
|
4662
|
-
userId:
|
4663
|
-
presenceStatusId:
|
4664
|
-
customPreseneStatus:
|
4665
|
-
reason:
|
4848
|
+
var import_zod72 = require("zod");
|
4849
|
+
var UpdateUserStatusSchema = import_zod72.z.object({
|
4850
|
+
userId: import_zod72.z.string(),
|
4851
|
+
presenceStatusId: import_zod72.z.string().nullable().optional(),
|
4852
|
+
customPreseneStatus: import_zod72.z.string().nullable().optional(),
|
4853
|
+
reason: import_zod72.z.string()
|
4666
4854
|
});
|
4667
4855
|
|
4668
4856
|
// src/telephony-agent-presence-status/index.ts
|
@@ -4673,9 +4861,9 @@ var telephonyAgentPresenceStatusContract = (0, import_core27.initContract)().rou
|
|
4673
4861
|
path: "/presence_status",
|
4674
4862
|
headers: DefaultHeaderSchema,
|
4675
4863
|
responses: {
|
4676
|
-
200:
|
4677
|
-
400:
|
4678
|
-
message:
|
4864
|
+
200: import_zod73.default.array(PresenceStatusSchema),
|
4865
|
+
400: import_zod73.default.object({
|
4866
|
+
message: import_zod73.default.string()
|
4679
4867
|
}),
|
4680
4868
|
401: DefaultUnauthorizedSchema,
|
4681
4869
|
500: DefaultErrorResponseSchema
|
@@ -4687,9 +4875,9 @@ var telephonyAgentPresenceStatusContract = (0, import_core27.initContract)().rou
|
|
4687
4875
|
path: "/agents/presence_status",
|
4688
4876
|
headers: DefaultHeaderSchema,
|
4689
4877
|
responses: {
|
4690
|
-
200:
|
4691
|
-
400:
|
4692
|
-
message:
|
4878
|
+
200: import_zod73.default.array(UserPresenceStatusSchema),
|
4879
|
+
400: import_zod73.default.object({
|
4880
|
+
message: import_zod73.default.string()
|
4693
4881
|
}),
|
4694
4882
|
401: DefaultUnauthorizedSchema,
|
4695
4883
|
500: DefaultErrorResponseSchema
|
@@ -4699,12 +4887,12 @@ var telephonyAgentPresenceStatusContract = (0, import_core27.initContract)().rou
|
|
4699
4887
|
getAgentStatus: {
|
4700
4888
|
method: "GET",
|
4701
4889
|
path: "/presence_status/check_update/:userId",
|
4702
|
-
pathParams:
|
4890
|
+
pathParams: import_zod73.default.object({ userId: import_zod73.default.string() }),
|
4703
4891
|
headers: DefaultHeaderSchema,
|
4704
4892
|
responses: {
|
4705
4893
|
200: UserPresenceStatusSchema,
|
4706
|
-
400:
|
4707
|
-
message:
|
4894
|
+
400: import_zod73.default.object({
|
4895
|
+
message: import_zod73.default.string()
|
4708
4896
|
}),
|
4709
4897
|
401: DefaultUnauthorizedSchema,
|
4710
4898
|
500: DefaultErrorResponseSchema
|
@@ -4720,8 +4908,8 @@ var telephonyAgentPresenceStatusContract = (0, import_core27.initContract)().rou
|
|
4720
4908
|
200: DefaultSuccessResponseSchema.extend({
|
4721
4909
|
userPresenceStatu: UserPresenceStatusSchema
|
4722
4910
|
}),
|
4723
|
-
400:
|
4724
|
-
message:
|
4911
|
+
400: import_zod73.default.object({
|
4912
|
+
message: import_zod73.default.string()
|
4725
4913
|
}),
|
4726
4914
|
401: DefaultUnauthorizedSchema,
|
4727
4915
|
500: DefaultErrorResponseSchema
|
@@ -4733,58 +4921,58 @@ var telephonyAgentPresenceStatusContract = (0, import_core27.initContract)().rou
|
|
4733
4921
|
);
|
4734
4922
|
|
4735
4923
|
// src/telephony-cdr/index.ts
|
4736
|
-
var
|
4924
|
+
var import_zod76 = __toESM(require("zod"));
|
4737
4925
|
|
4738
4926
|
// src/telephony-cdr/validation.ts
|
4739
|
-
var
|
4740
|
-
var CreateTelephonyCdrSchema =
|
4741
|
-
uniqueCallId:
|
4742
|
-
timeStart:
|
4743
|
-
callFrom:
|
4744
|
-
callTo:
|
4745
|
-
callDuration:
|
4746
|
-
talkDuration:
|
4747
|
-
srcTrunkName:
|
4748
|
-
dstTrunkName:
|
4749
|
-
pinCode:
|
4750
|
-
status:
|
4751
|
-
type:
|
4752
|
-
recording:
|
4753
|
-
didNumber:
|
4754
|
-
agentRingTime:
|
4927
|
+
var import_zod74 = __toESM(require("zod"));
|
4928
|
+
var CreateTelephonyCdrSchema = import_zod74.default.object({
|
4929
|
+
uniqueCallId: import_zod74.default.string({ required_error: "uniqueCallId is required" }),
|
4930
|
+
timeStart: import_zod74.default.string({ required_error: "timeStart is required" }),
|
4931
|
+
callFrom: import_zod74.default.string({ required_error: "callFrom is required" }),
|
4932
|
+
callTo: import_zod74.default.string({ required_error: "callTo is required" }),
|
4933
|
+
callDuration: import_zod74.default.number().nullable(),
|
4934
|
+
talkDuration: import_zod74.default.number().nullable(),
|
4935
|
+
srcTrunkName: import_zod74.default.string().nullable(),
|
4936
|
+
dstTrunkName: import_zod74.default.string().nullable(),
|
4937
|
+
pinCode: import_zod74.default.string().nullable(),
|
4938
|
+
status: import_zod74.default.string(),
|
4939
|
+
type: import_zod74.default.string(),
|
4940
|
+
recording: import_zod74.default.string().nullable(),
|
4941
|
+
didNumber: import_zod74.default.string().nullable(),
|
4942
|
+
agentRingTime: import_zod74.default.number().nullable()
|
4755
4943
|
});
|
4756
4944
|
var GetAllTelephonyCdrSchema = DefaultQueryParamsSchema.extend({
|
4757
|
-
selectedDate:
|
4758
|
-
type:
|
4759
|
-
status:
|
4760
|
-
callFrom:
|
4761
|
-
callTo:
|
4762
|
-
trunk:
|
4945
|
+
selectedDate: import_zod74.default.string().optional(),
|
4946
|
+
type: import_zod74.default.array(import_zod74.default.string()).optional(),
|
4947
|
+
status: import_zod74.default.array(import_zod74.default.string()).optional(),
|
4948
|
+
callFrom: import_zod74.default.string().optional(),
|
4949
|
+
callTo: import_zod74.default.string().optional(),
|
4950
|
+
trunk: import_zod74.default.array(import_zod74.default.string()).optional()
|
4763
4951
|
});
|
4764
4952
|
var GetRecentTelephonyCdrSchema = DefaultQueryParamsSchema.extend({
|
4765
|
-
type:
|
4766
|
-
status:
|
4767
|
-
callFrom:
|
4768
|
-
callTo:
|
4769
|
-
result:
|
4770
|
-
callTags:
|
4771
|
-
selectedDate:
|
4772
|
-
agentId:
|
4773
|
-
contact:
|
4774
|
-
callStatus:
|
4775
|
-
queueIds:
|
4776
|
-
notes:
|
4953
|
+
type: import_zod74.default.array(import_zod74.default.string()).optional(),
|
4954
|
+
status: import_zod74.default.array(import_zod74.default.string()).optional(),
|
4955
|
+
callFrom: import_zod74.default.string().optional(),
|
4956
|
+
callTo: import_zod74.default.string().optional(),
|
4957
|
+
result: import_zod74.default.array(import_zod74.default.string()).optional(),
|
4958
|
+
callTags: import_zod74.default.array(import_zod74.default.string()).optional(),
|
4959
|
+
selectedDate: import_zod74.default.string().optional(),
|
4960
|
+
agentId: import_zod74.default.string().optional(),
|
4961
|
+
contact: import_zod74.default.array(import_zod74.default.string()).optional(),
|
4962
|
+
callStatus: import_zod74.default.array(import_zod74.default.enum(["incoming", "outgoing", "missed", "no_answered"])).optional(),
|
4963
|
+
queueIds: import_zod74.default.array(import_zod74.default.string()).optional(),
|
4964
|
+
notes: import_zod74.default.string().optional()
|
4777
4965
|
});
|
4778
4966
|
var GetExportTelephonyCdrSchema = GetAllTelephonyCdrSchema.merge(
|
4779
|
-
|
4780
|
-
page:
|
4781
|
-
pageSize:
|
4967
|
+
import_zod74.default.object({
|
4968
|
+
page: import_zod74.default.coerce.number().positive().optional(),
|
4969
|
+
pageSize: import_zod74.default.coerce.number().positive().optional()
|
4782
4970
|
})
|
4783
4971
|
);
|
4784
4972
|
var NullEmptyStringUndefined = ["", null, void 0];
|
4785
4973
|
var EmtptyArrayUndefined = [[], void 0];
|
4786
4974
|
var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
|
4787
|
-
reportType:
|
4975
|
+
reportType: import_zod74.default.enum([
|
4788
4976
|
"extcallstatistics",
|
4789
4977
|
"extcallactivity",
|
4790
4978
|
"trunkactivity",
|
@@ -4794,59 +4982,59 @@ var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
|
|
4794
4982
|
"queueagentmisscalls",
|
4795
4983
|
"queueagentinoutcalls"
|
4796
4984
|
]),
|
4797
|
-
selectedDate:
|
4798
|
-
communicationType:
|
4799
|
-
time:
|
4800
|
-
queueList:
|
4801
|
-
queueId:
|
4802
|
-
trunkList:
|
4803
|
-
extensionList:
|
4985
|
+
selectedDate: import_zod74.default.string().optional(),
|
4986
|
+
communicationType: import_zod74.default.union([import_zod74.default.literal("Inbound"), import_zod74.default.literal("Outbound"), import_zod74.default.literal("Internal")]).optional(),
|
4987
|
+
time: import_zod74.default.string().optional(),
|
4988
|
+
queueList: import_zod74.default.array(import_zod74.default.string()).optional(),
|
4989
|
+
queueId: import_zod74.default.string().optional(),
|
4990
|
+
trunkList: import_zod74.default.array(import_zod74.default.string()).optional(),
|
4991
|
+
extensionList: import_zod74.default.array(import_zod74.default.string()).optional()
|
4804
4992
|
}).superRefine((input, ctx) => {
|
4805
4993
|
if ((input.reportType === "extcallstatistics" || input.reportType === "queuesatisfaction" || input.reportType === "queueperformance" || input.reportType === "queueagentmisscalls") && NullEmptyStringUndefined.includes(input.selectedDate)) {
|
4806
4994
|
ctx.addIssue({
|
4807
|
-
code:
|
4995
|
+
code: import_zod74.default.ZodIssueCode.custom,
|
4808
4996
|
path: ["selectedDate"],
|
4809
4997
|
message: "selectedDate is required."
|
4810
4998
|
});
|
4811
4999
|
}
|
4812
5000
|
if (input.reportType === "extcallstatistics" && !NullEmptyStringUndefined.includes(input.communicationType)) {
|
4813
5001
|
ctx.addIssue({
|
4814
|
-
code:
|
5002
|
+
code: import_zod74.default.ZodIssueCode.custom,
|
4815
5003
|
path: ["communicationType"],
|
4816
5004
|
message: "communicationType is required."
|
4817
5005
|
});
|
4818
5006
|
}
|
4819
5007
|
if ((input.reportType === "extcallactivity" || input.reportType === "queueavgwaittalktime" || input.reportType === "trunkactivity") && NullEmptyStringUndefined.includes(input.time)) {
|
4820
5008
|
ctx.addIssue({
|
4821
|
-
code:
|
5009
|
+
code: import_zod74.default.ZodIssueCode.custom,
|
4822
5010
|
path: ["time"],
|
4823
5011
|
message: "time is required."
|
4824
5012
|
});
|
4825
5013
|
}
|
4826
5014
|
if ((input.reportType === "queueavgwaittalktime" || input.reportType === "queueperformance") && EmtptyArrayUndefined.includes(input.queueList)) {
|
4827
5015
|
ctx.addIssue({
|
4828
|
-
code:
|
5016
|
+
code: import_zod74.default.ZodIssueCode.custom,
|
4829
5017
|
path: ["queueList"],
|
4830
5018
|
message: "queueList is required."
|
4831
5019
|
});
|
4832
5020
|
}
|
4833
5021
|
if ((input.reportType === "queuesatisfaction" || input.reportType === "queueagentmisscalls") && NullEmptyStringUndefined.includes(input.queueId)) {
|
4834
5022
|
ctx.addIssue({
|
4835
|
-
code:
|
5023
|
+
code: import_zod74.default.ZodIssueCode.custom,
|
4836
5024
|
path: ["queueId"],
|
4837
5025
|
message: "queueId is required."
|
4838
5026
|
});
|
4839
5027
|
}
|
4840
5028
|
if (input.reportType === "trunkactivity" && EmtptyArrayUndefined.includes(input.trunkList)) {
|
4841
5029
|
ctx.addIssue({
|
4842
|
-
code:
|
5030
|
+
code: import_zod74.default.ZodIssueCode.custom,
|
4843
5031
|
path: ["trunkList"],
|
4844
5032
|
message: "trunkList is required."
|
4845
5033
|
});
|
4846
5034
|
}
|
4847
5035
|
if ((input.reportType === "extcallstatistics" || input.reportType === "extcallactivity") && EmtptyArrayUndefined.includes(input.extensionList)) {
|
4848
5036
|
ctx.addIssue({
|
4849
|
-
code:
|
5037
|
+
code: import_zod74.default.ZodIssueCode.custom,
|
4850
5038
|
path: ["extensionList"],
|
4851
5039
|
message: "extensionList is required."
|
4852
5040
|
});
|
@@ -4857,161 +5045,161 @@ var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
|
|
4857
5045
|
var import_core28 = require("@ts-rest/core");
|
4858
5046
|
|
4859
5047
|
// src/telephony-cdr/call-report.schema.ts
|
4860
|
-
var
|
4861
|
-
var ExtCallStatisticsListSchema =
|
5048
|
+
var import_zod75 = __toESM(require("zod"));
|
5049
|
+
var ExtCallStatisticsListSchema = import_zod75.default.object({
|
4862
5050
|
/** @example "ext_num" */
|
4863
|
-
ext_num:
|
5051
|
+
ext_num: import_zod75.default.string(),
|
4864
5052
|
/** @example "ext_name" */
|
4865
|
-
ext_name:
|
5053
|
+
ext_name: import_zod75.default.string(),
|
4866
5054
|
/** @example 0 */
|
4867
|
-
answered_calls:
|
5055
|
+
answered_calls: import_zod75.default.number(),
|
4868
5056
|
/** @example 0 */
|
4869
|
-
no_answer_calls:
|
5057
|
+
no_answer_calls: import_zod75.default.number(),
|
4870
5058
|
/** @example 0 */
|
4871
|
-
busy_calls:
|
5059
|
+
busy_calls: import_zod75.default.number(),
|
4872
5060
|
/** @example 0 */
|
4873
|
-
failed_calls:
|
5061
|
+
failed_calls: import_zod75.default.number(),
|
4874
5062
|
/** @example 0 */
|
4875
|
-
voicemail_calls:
|
5063
|
+
voicemail_calls: import_zod75.default.number(),
|
4876
5064
|
/** @example 0 */
|
4877
|
-
total_holding_time:
|
5065
|
+
total_holding_time: import_zod75.default.number(),
|
4878
5066
|
/** @example 0 */
|
4879
|
-
total_talking_time:
|
5067
|
+
total_talking_time: import_zod75.default.number(),
|
4880
5068
|
/** @example "src_name" */
|
4881
|
-
src_name:
|
5069
|
+
src_name: import_zod75.default.string(),
|
4882
5070
|
/** @example 0 */
|
4883
|
-
total_call_count:
|
5071
|
+
total_call_count: import_zod75.default.number(),
|
4884
5072
|
/** @example "mobile" */
|
4885
|
-
mobile:
|
4886
|
-
});
|
4887
|
-
var ExtStatisticSchema =
|
4888
|
-
ext_num:
|
4889
|
-
ext_name:
|
4890
|
-
answered_calls:
|
4891
|
-
no_answer_calls:
|
4892
|
-
busy_calls:
|
4893
|
-
failed_calls:
|
4894
|
-
voicemail_calls:
|
4895
|
-
total_holding_time:
|
4896
|
-
total_talking_time:
|
4897
|
-
time:
|
4898
|
-
mobile:
|
4899
|
-
});
|
4900
|
-
var ExtCallActivityListSchema =
|
4901
|
-
time:
|
4902
|
-
answered_calls:
|
4903
|
-
no_answer_calls:
|
4904
|
-
busy_calls:
|
4905
|
-
failed_calls:
|
4906
|
-
voicemail_calls:
|
4907
|
-
total_holding_time:
|
4908
|
-
total_talking_time:
|
4909
|
-
ext_statistics:
|
4910
|
-
});
|
4911
|
-
var TrunkList =
|
4912
|
-
trunk_name:
|
4913
|
-
total_calls:
|
4914
|
-
});
|
4915
|
-
var TrunkActivityListSchema =
|
4916
|
-
time:
|
4917
|
-
trunk_list:
|
4918
|
-
});
|
4919
|
-
var QueueAvgWaitTalkTimeListSchema =
|
4920
|
-
time:
|
4921
|
-
avg_wait_time:
|
4922
|
-
avg_talk_time:
|
4923
|
-
});
|
4924
|
-
var SatisfactionListSchema =
|
4925
|
-
press_key:
|
4926
|
-
total:
|
4927
|
-
key_point:
|
4928
|
-
});
|
4929
|
-
var agentListSchema =
|
4930
|
-
agent_name:
|
4931
|
-
agent_num:
|
4932
|
-
satisfaction_list:
|
4933
|
-
total_key:
|
4934
|
-
total_point:
|
4935
|
-
average_point:
|
4936
|
-
});
|
4937
|
-
var QueueSatisfactionSchema =
|
4938
|
-
queue_name:
|
4939
|
-
queue_num:
|
4940
|
-
satisfaction_list:
|
4941
|
-
agent_list:
|
4942
|
-
total_key:
|
4943
|
-
total_point:
|
4944
|
-
average_point:
|
4945
|
-
});
|
4946
|
-
var QueuePerformanceListSchema =
|
4947
|
-
queue:
|
4948
|
-
total_calls:
|
4949
|
-
answered_calls:
|
4950
|
-
missed_calls:
|
4951
|
-
abandoned_calls:
|
4952
|
-
average_waiting_time:
|
4953
|
-
average_talking_time:
|
4954
|
-
max_waiting_time:
|
4955
|
-
answered_rate:
|
4956
|
-
missed_rate:
|
4957
|
-
abandoned_rate:
|
4958
|
-
sla:
|
4959
|
-
});
|
4960
|
-
var QueueAgentMissCallsListSchema =
|
4961
|
-
agent_name:
|
4962
|
-
agent_num:
|
4963
|
-
time:
|
4964
|
-
total_wait_time:
|
4965
|
-
src_name:
|
4966
|
-
src_num:
|
4967
|
-
queue_status:
|
4968
|
-
polling_attempts:
|
4969
|
-
missed_reason:
|
4970
|
-
});
|
4971
|
-
var QueueAgentInOutCallsListSchema =
|
4972
|
-
agent_name:
|
4973
|
-
agent_num:
|
4974
|
-
inbound_calls:
|
4975
|
-
inbound_duration:
|
4976
|
-
outbound_calls:
|
4977
|
-
outbound_duration:
|
4978
|
-
total_calls:
|
4979
|
-
total_duration:
|
4980
|
-
average_talk_duration:
|
4981
|
-
});
|
4982
|
-
var CallReportModel =
|
4983
|
-
errcode:
|
4984
|
-
errmsg:
|
4985
|
-
total_number:
|
4986
|
-
is_12hour:
|
4987
|
-
ext_call_statistics_list:
|
4988
|
-
ext_call_activity_list:
|
4989
|
-
trunk_activity_list:
|
4990
|
-
queue_avg_wait_talk_time_list:
|
5073
|
+
mobile: import_zod75.default.string()
|
5074
|
+
});
|
5075
|
+
var ExtStatisticSchema = import_zod75.default.object({
|
5076
|
+
ext_num: import_zod75.default.string(),
|
5077
|
+
ext_name: import_zod75.default.string(),
|
5078
|
+
answered_calls: import_zod75.default.number(),
|
5079
|
+
no_answer_calls: import_zod75.default.number(),
|
5080
|
+
busy_calls: import_zod75.default.number(),
|
5081
|
+
failed_calls: import_zod75.default.number(),
|
5082
|
+
voicemail_calls: import_zod75.default.number(),
|
5083
|
+
total_holding_time: import_zod75.default.number(),
|
5084
|
+
total_talking_time: import_zod75.default.number(),
|
5085
|
+
time: import_zod75.default.number(),
|
5086
|
+
mobile: import_zod75.default.string()
|
5087
|
+
});
|
5088
|
+
var ExtCallActivityListSchema = import_zod75.default.object({
|
5089
|
+
time: import_zod75.default.number(),
|
5090
|
+
answered_calls: import_zod75.default.number(),
|
5091
|
+
no_answer_calls: import_zod75.default.number(),
|
5092
|
+
busy_calls: import_zod75.default.number(),
|
5093
|
+
failed_calls: import_zod75.default.number(),
|
5094
|
+
voicemail_calls: import_zod75.default.number(),
|
5095
|
+
total_holding_time: import_zod75.default.number(),
|
5096
|
+
total_talking_time: import_zod75.default.number(),
|
5097
|
+
ext_statistics: import_zod75.default.array(ExtStatisticSchema)
|
5098
|
+
});
|
5099
|
+
var TrunkList = import_zod75.default.object({
|
5100
|
+
trunk_name: import_zod75.default.string(),
|
5101
|
+
total_calls: import_zod75.default.number()
|
5102
|
+
});
|
5103
|
+
var TrunkActivityListSchema = import_zod75.default.object({
|
5104
|
+
time: import_zod75.default.number(),
|
5105
|
+
trunk_list: import_zod75.default.array(TrunkList)
|
5106
|
+
});
|
5107
|
+
var QueueAvgWaitTalkTimeListSchema = import_zod75.default.object({
|
5108
|
+
time: import_zod75.default.number(),
|
5109
|
+
avg_wait_time: import_zod75.default.number(),
|
5110
|
+
avg_talk_time: import_zod75.default.number()
|
5111
|
+
});
|
5112
|
+
var SatisfactionListSchema = import_zod75.default.object({
|
5113
|
+
press_key: import_zod75.default.string(),
|
5114
|
+
total: import_zod75.default.number(),
|
5115
|
+
key_point: import_zod75.default.number().optional()
|
5116
|
+
});
|
5117
|
+
var agentListSchema = import_zod75.default.object({
|
5118
|
+
agent_name: import_zod75.default.string(),
|
5119
|
+
agent_num: import_zod75.default.string(),
|
5120
|
+
satisfaction_list: import_zod75.default.array(SatisfactionListSchema).optional(),
|
5121
|
+
total_key: import_zod75.default.number().optional(),
|
5122
|
+
total_point: import_zod75.default.number().optional(),
|
5123
|
+
average_point: import_zod75.default.number().optional()
|
5124
|
+
});
|
5125
|
+
var QueueSatisfactionSchema = import_zod75.default.object({
|
5126
|
+
queue_name: import_zod75.default.string(),
|
5127
|
+
queue_num: import_zod75.default.string(),
|
5128
|
+
satisfaction_list: import_zod75.default.array(SatisfactionListSchema).optional(),
|
5129
|
+
agent_list: import_zod75.default.array(agentListSchema).optional(),
|
5130
|
+
total_key: import_zod75.default.number().optional(),
|
5131
|
+
total_point: import_zod75.default.number().optional(),
|
5132
|
+
average_point: import_zod75.default.number().optional()
|
5133
|
+
});
|
5134
|
+
var QueuePerformanceListSchema = import_zod75.default.object({
|
5135
|
+
queue: import_zod75.default.string(),
|
5136
|
+
total_calls: import_zod75.default.number(),
|
5137
|
+
answered_calls: import_zod75.default.number(),
|
5138
|
+
missed_calls: import_zod75.default.number(),
|
5139
|
+
abandoned_calls: import_zod75.default.number(),
|
5140
|
+
average_waiting_time: import_zod75.default.number(),
|
5141
|
+
average_talking_time: import_zod75.default.number(),
|
5142
|
+
max_waiting_time: import_zod75.default.number(),
|
5143
|
+
answered_rate: import_zod75.default.number(),
|
5144
|
+
missed_rate: import_zod75.default.number(),
|
5145
|
+
abandoned_rate: import_zod75.default.number(),
|
5146
|
+
sla: import_zod75.default.number()
|
5147
|
+
});
|
5148
|
+
var QueueAgentMissCallsListSchema = import_zod75.default.object({
|
5149
|
+
agent_name: import_zod75.default.string(),
|
5150
|
+
agent_num: import_zod75.default.string(),
|
5151
|
+
time: import_zod75.default.string(),
|
5152
|
+
total_wait_time: import_zod75.default.number(),
|
5153
|
+
src_name: import_zod75.default.string(),
|
5154
|
+
src_num: import_zod75.default.string(),
|
5155
|
+
queue_status: import_zod75.default.string(),
|
5156
|
+
polling_attempts: import_zod75.default.number(),
|
5157
|
+
missed_reason: import_zod75.default.string()
|
5158
|
+
});
|
5159
|
+
var QueueAgentInOutCallsListSchema = import_zod75.default.object({
|
5160
|
+
agent_name: import_zod75.default.string(),
|
5161
|
+
agent_num: import_zod75.default.string(),
|
5162
|
+
inbound_calls: import_zod75.default.number(),
|
5163
|
+
inbound_duration: import_zod75.default.number(),
|
5164
|
+
outbound_calls: import_zod75.default.number(),
|
5165
|
+
outbound_duration: import_zod75.default.number(),
|
5166
|
+
total_calls: import_zod75.default.number(),
|
5167
|
+
total_duration: import_zod75.default.number(),
|
5168
|
+
average_talk_duration: import_zod75.default.number()
|
5169
|
+
});
|
5170
|
+
var CallReportModel = import_zod75.default.object({
|
5171
|
+
errcode: import_zod75.default.number(),
|
5172
|
+
errmsg: import_zod75.default.string(),
|
5173
|
+
total_number: import_zod75.default.number(),
|
5174
|
+
is_12hour: import_zod75.default.number().optional(),
|
5175
|
+
ext_call_statistics_list: import_zod75.default.array(ExtCallStatisticsListSchema).optional(),
|
5176
|
+
ext_call_activity_list: import_zod75.default.array(ExtCallActivityListSchema).optional(),
|
5177
|
+
trunk_activity_list: import_zod75.default.array(TrunkActivityListSchema).optional(),
|
5178
|
+
queue_avg_wait_talk_time_list: import_zod75.default.array(QueueAvgWaitTalkTimeListSchema).optional(),
|
4991
5179
|
queue_satisfaction: QueueSatisfactionSchema.optional(),
|
4992
|
-
queue_performance_list:
|
4993
|
-
queue_agent_miss_calls_list:
|
4994
|
-
queue_agent_in_out_calls_list:
|
4995
|
-
callback_result:
|
4996
|
-
page:
|
4997
|
-
pageSize:
|
4998
|
-
});
|
4999
|
-
var CallReportSchema =
|
5000
|
-
errcode:
|
5001
|
-
errmsg:
|
5002
|
-
total_number:
|
5003
|
-
is_12hour:
|
5004
|
-
ext_call_statistics_list:
|
5005
|
-
ext_call_activity_list:
|
5006
|
-
trunk_activity_list:
|
5007
|
-
queue_avg_wait_talk_time_list:
|
5180
|
+
queue_performance_list: import_zod75.default.array(QueuePerformanceListSchema).optional(),
|
5181
|
+
queue_agent_miss_calls_list: import_zod75.default.array(QueueAgentMissCallsListSchema).optional(),
|
5182
|
+
queue_agent_in_out_calls_list: import_zod75.default.array(QueueAgentInOutCallsListSchema).optional(),
|
5183
|
+
callback_result: import_zod75.default.string(),
|
5184
|
+
page: import_zod75.default.number().optional(),
|
5185
|
+
pageSize: import_zod75.default.number().optional()
|
5186
|
+
});
|
5187
|
+
var CallReportSchema = import_zod75.default.object({
|
5188
|
+
errcode: import_zod75.default.number(),
|
5189
|
+
errmsg: import_zod75.default.string(),
|
5190
|
+
total_number: import_zod75.default.number(),
|
5191
|
+
is_12hour: import_zod75.default.number().optional(),
|
5192
|
+
ext_call_statistics_list: import_zod75.default.array(ExtCallStatisticsListSchema).optional(),
|
5193
|
+
ext_call_activity_list: import_zod75.default.array(ExtCallActivityListSchema).optional(),
|
5194
|
+
trunk_activity_list: import_zod75.default.array(TrunkActivityListSchema).optional(),
|
5195
|
+
queue_avg_wait_talk_time_list: import_zod75.default.array(QueueAvgWaitTalkTimeListSchema).optional(),
|
5008
5196
|
queue_satisfaction: QueueSatisfactionSchema.optional(),
|
5009
|
-
queue_performance_list:
|
5010
|
-
queue_agent_miss_calls_list:
|
5011
|
-
queue_agent_in_out_calls_list:
|
5012
|
-
callback_result:
|
5013
|
-
page:
|
5014
|
-
pageSize:
|
5197
|
+
queue_performance_list: import_zod75.default.array(QueuePerformanceListSchema).optional(),
|
5198
|
+
queue_agent_miss_calls_list: import_zod75.default.array(QueueAgentMissCallsListSchema).optional(),
|
5199
|
+
queue_agent_in_out_calls_list: import_zod75.default.array(QueueAgentInOutCallsListSchema).optional(),
|
5200
|
+
callback_result: import_zod75.default.string(),
|
5201
|
+
page: import_zod75.default.number().optional(),
|
5202
|
+
pageSize: import_zod75.default.number().optional()
|
5015
5203
|
});
|
5016
5204
|
|
5017
5205
|
// src/telephony-cdr/index.ts
|
@@ -5024,10 +5212,10 @@ var telephonyCdrContract = (0, import_core28.initContract)().router(
|
|
5024
5212
|
query: GetAllTelephonyCdrSchema,
|
5025
5213
|
responses: {
|
5026
5214
|
200: DefaultSuccessResponseSchema.extend({
|
5027
|
-
total:
|
5028
|
-
page:
|
5029
|
-
pageSize:
|
5030
|
-
telephonyCdrs:
|
5215
|
+
total: import_zod76.default.number(),
|
5216
|
+
page: import_zod76.default.number(),
|
5217
|
+
pageSize: import_zod76.default.number(),
|
5218
|
+
telephonyCdrs: import_zod76.default.array(TelephonyCdrSchema)
|
5031
5219
|
}),
|
5032
5220
|
401: DefaultUnauthorizedSchema
|
5033
5221
|
},
|
@@ -5040,10 +5228,10 @@ var telephonyCdrContract = (0, import_core28.initContract)().router(
|
|
5040
5228
|
query: GetAllTelephonyCdrSchema,
|
5041
5229
|
responses: {
|
5042
5230
|
200: DefaultSuccessResponseSchema.extend({
|
5043
|
-
total:
|
5044
|
-
page:
|
5045
|
-
pageSize:
|
5046
|
-
telephonyCdrs:
|
5231
|
+
total: import_zod76.default.number(),
|
5232
|
+
page: import_zod76.default.number(),
|
5233
|
+
pageSize: import_zod76.default.number(),
|
5234
|
+
telephonyCdrs: import_zod76.default.array(TelephonyCdrSchema)
|
5047
5235
|
}),
|
5048
5236
|
401: DefaultUnauthorizedSchema
|
5049
5237
|
},
|
@@ -5056,10 +5244,10 @@ var telephonyCdrContract = (0, import_core28.initContract)().router(
|
|
5056
5244
|
query: GetRecentTelephonyCdrSchema,
|
5057
5245
|
responses: {
|
5058
5246
|
200: DefaultSuccessResponseSchema.extend({
|
5059
|
-
total:
|
5060
|
-
page:
|
5061
|
-
pageSize:
|
5062
|
-
telephonyCdrs:
|
5247
|
+
total: import_zod76.default.number(),
|
5248
|
+
page: import_zod76.default.number(),
|
5249
|
+
pageSize: import_zod76.default.number(),
|
5250
|
+
telephonyCdrs: import_zod76.default.array(TelephonyCdrSchema)
|
5063
5251
|
}),
|
5064
5252
|
401: DefaultUnauthorizedSchema
|
5065
5253
|
},
|
@@ -5151,35 +5339,35 @@ var telephonyCdrContract = (0, import_core28.initContract)().router(
|
|
5151
5339
|
|
5152
5340
|
// src/telephony-extension/index.ts
|
5153
5341
|
var import_core29 = require("@ts-rest/core");
|
5154
|
-
var
|
5342
|
+
var import_zod78 = __toESM(require("zod"));
|
5155
5343
|
|
5156
5344
|
// src/telephony-extension/schema.ts
|
5157
|
-
var
|
5158
|
-
var TelephonyExtensionSchema3 =
|
5159
|
-
errcode:
|
5160
|
-
errmsg:
|
5161
|
-
total_number:
|
5162
|
-
data:
|
5163
|
-
|
5164
|
-
id:
|
5165
|
-
online_status:
|
5166
|
-
fx_phone:
|
5167
|
-
sip_phone:
|
5168
|
-
status:
|
5169
|
-
ext_dev_type:
|
5170
|
-
}),
|
5171
|
-
linkus_desktop:
|
5172
|
-
linkus_mobile:
|
5173
|
-
linkus_web:
|
5174
|
-
status:
|
5175
|
-
ext_dev_type:
|
5345
|
+
var import_zod77 = __toESM(require("zod"));
|
5346
|
+
var TelephonyExtensionSchema3 = import_zod77.default.object({
|
5347
|
+
errcode: import_zod77.default.coerce.number(),
|
5348
|
+
errmsg: import_zod77.default.string(),
|
5349
|
+
total_number: import_zod77.default.coerce.number(),
|
5350
|
+
data: import_zod77.default.array(
|
5351
|
+
import_zod77.default.object({
|
5352
|
+
id: import_zod77.default.coerce.number(),
|
5353
|
+
online_status: import_zod77.default.object({
|
5354
|
+
fx_phone: import_zod77.default.object({ status: import_zod77.default.coerce.number() }),
|
5355
|
+
sip_phone: import_zod77.default.object({
|
5356
|
+
status: import_zod77.default.coerce.number(),
|
5357
|
+
ext_dev_type: import_zod77.default.string().optional()
|
5358
|
+
}),
|
5359
|
+
linkus_desktop: import_zod77.default.object({ status: import_zod77.default.coerce.number() }),
|
5360
|
+
linkus_mobile: import_zod77.default.object({ status: import_zod77.default.coerce.number() }),
|
5361
|
+
linkus_web: import_zod77.default.object({
|
5362
|
+
status: import_zod77.default.coerce.number(),
|
5363
|
+
ext_dev_type: import_zod77.default.string().optional()
|
5176
5364
|
})
|
5177
5365
|
}).optional(),
|
5178
|
-
presence_status:
|
5179
|
-
number:
|
5180
|
-
caller_id_name:
|
5181
|
-
role_name:
|
5182
|
-
email_addr:
|
5366
|
+
presence_status: import_zod77.default.string().optional(),
|
5367
|
+
number: import_zod77.default.string().optional(),
|
5368
|
+
caller_id_name: import_zod77.default.string().optional(),
|
5369
|
+
role_name: import_zod77.default.string().optional(),
|
5370
|
+
email_addr: import_zod77.default.string().optional()
|
5183
5371
|
})
|
5184
5372
|
)
|
5185
5373
|
});
|
@@ -5194,8 +5382,8 @@ var telephonyExtensionContract = (0, import_core29.initContract)().router(
|
|
5194
5382
|
query: null,
|
5195
5383
|
responses: {
|
5196
5384
|
200: TelephonyExtensionSchema3,
|
5197
|
-
400:
|
5198
|
-
message:
|
5385
|
+
400: import_zod78.default.object({
|
5386
|
+
message: import_zod78.default.string()
|
5199
5387
|
}),
|
5200
5388
|
401: DefaultUnauthorizedSchema,
|
5201
5389
|
500: DefaultErrorResponseSchema
|
@@ -5208,10 +5396,10 @@ var telephonyExtensionContract = (0, import_core29.initContract)().router(
|
|
5208
5396
|
|
5209
5397
|
// src/ticket/index.ts
|
5210
5398
|
var import_core30 = require("@ts-rest/core");
|
5211
|
-
var
|
5399
|
+
var import_zod80 = __toESM(require("zod"));
|
5212
5400
|
|
5213
5401
|
// src/ticket/validation.ts
|
5214
|
-
var
|
5402
|
+
var import_zod79 = __toESM(require("zod"));
|
5215
5403
|
var addErrorMessage2 = (field) => {
|
5216
5404
|
return field.refine(
|
5217
5405
|
({ isRequired, value }) => {
|
@@ -5229,106 +5417,106 @@ var addErrorMessage2 = (field) => {
|
|
5229
5417
|
}
|
5230
5418
|
);
|
5231
5419
|
};
|
5232
|
-
var BaseSchema3 =
|
5233
|
-
isRequired:
|
5234
|
-
attributeId:
|
5420
|
+
var BaseSchema3 = import_zod79.default.object({
|
5421
|
+
isRequired: import_zod79.default.boolean(),
|
5422
|
+
attributeId: import_zod79.default.string()
|
5235
5423
|
});
|
5236
5424
|
var SingleValue2 = addErrorMessage2(
|
5237
5425
|
BaseSchema3.extend({
|
5238
|
-
value:
|
5426
|
+
value: import_zod79.default.string()
|
5239
5427
|
})
|
5240
5428
|
);
|
5241
|
-
var CreateTicketValidationSchema =
|
5429
|
+
var CreateTicketValidationSchema = import_zod79.default.object({
|
5242
5430
|
title: SingleValue2,
|
5243
5431
|
description: SingleValue2,
|
5244
5432
|
status: SingleValue2,
|
5245
5433
|
type: SingleValue2,
|
5246
5434
|
priority: SingleValue2,
|
5247
5435
|
contact: SingleValue2,
|
5248
|
-
assignee:
|
5249
|
-
isRequired:
|
5250
|
-
attributeId:
|
5251
|
-
value:
|
5436
|
+
assignee: import_zod79.default.object({
|
5437
|
+
isRequired: import_zod79.default.boolean(),
|
5438
|
+
attributeId: import_zod79.default.string(),
|
5439
|
+
value: import_zod79.default.string()
|
5252
5440
|
}),
|
5253
5441
|
channel: SingleValue2,
|
5254
|
-
tags: addErrorMessage2(BaseSchema3.extend({ value:
|
5255
|
-
categories: BaseSchema3.extend({ value:
|
5256
|
-
customFields:
|
5442
|
+
tags: addErrorMessage2(BaseSchema3.extend({ value: import_zod79.default.array(import_zod79.default.string()) })),
|
5443
|
+
categories: BaseSchema3.extend({ value: import_zod79.default.array(import_zod79.default.string()) }),
|
5444
|
+
customFields: import_zod79.default.array(
|
5257
5445
|
addErrorMessage2(
|
5258
5446
|
BaseSchema3.extend({
|
5259
|
-
value:
|
5260
|
-
type:
|
5261
|
-
isDefaultAttribute:
|
5447
|
+
value: import_zod79.default.union([import_zod79.default.string(), import_zod79.default.array(import_zod79.default.string())]),
|
5448
|
+
type: import_zod79.default.string(),
|
5449
|
+
isDefaultAttribute: import_zod79.default.boolean()
|
5262
5450
|
})
|
5263
5451
|
)
|
5264
5452
|
),
|
5265
|
-
reasonToAssign:
|
5453
|
+
reasonToAssign: import_zod79.default.object({ value: import_zod79.default.string() }).optional()
|
5266
5454
|
});
|
5267
5455
|
var UpdateTicketValidationSchema = CreateTicketValidationSchema;
|
5268
|
-
var TicketAttachmentRecordSchema =
|
5269
|
-
bucketName:
|
5270
|
-
fileKey:
|
5271
|
-
fileName:
|
5272
|
-
fileSize:
|
5273
|
-
url:
|
5274
|
-
});
|
5275
|
-
var CreateTicketAttachmentRecordsSchema =
|
5276
|
-
ticketId:
|
5277
|
-
attributeId:
|
5278
|
-
ticketAttachmentRecords:
|
5279
|
-
});
|
5280
|
-
var TicketParamsSchema =
|
5281
|
-
page:
|
5282
|
-
pageSize:
|
5283
|
-
});
|
5284
|
-
var CustomFieldQuery =
|
5285
|
-
attributeId:
|
5286
|
-
type:
|
5287
|
-
value:
|
5288
|
-
});
|
5289
|
-
var GetAllTicketQuerySchema =
|
5290
|
-
page:
|
5291
|
-
pageSize:
|
5292
|
-
selectedDate:
|
5293
|
-
keyword:
|
5294
|
-
title:
|
5295
|
-
description:
|
5296
|
-
status:
|
5297
|
-
priority:
|
5298
|
-
channel:
|
5299
|
-
type:
|
5300
|
-
ticketType:
|
5301
|
-
contact:
|
5302
|
-
tags:
|
5303
|
-
categories:
|
5304
|
-
assignee:
|
5305
|
-
customFields:
|
5306
|
-
|
5307
|
-
attributeId:
|
5308
|
-
type:
|
5309
|
-
value:
|
5456
|
+
var TicketAttachmentRecordSchema = import_zod79.default.object({
|
5457
|
+
bucketName: import_zod79.default.string(),
|
5458
|
+
fileKey: import_zod79.default.string(),
|
5459
|
+
fileName: import_zod79.default.string(),
|
5460
|
+
fileSize: import_zod79.default.coerce.number(),
|
5461
|
+
url: import_zod79.default.string()
|
5462
|
+
});
|
5463
|
+
var CreateTicketAttachmentRecordsSchema = import_zod79.default.object({
|
5464
|
+
ticketId: import_zod79.default.string(),
|
5465
|
+
attributeId: import_zod79.default.string(),
|
5466
|
+
ticketAttachmentRecords: import_zod79.default.array(TicketAttachmentRecordSchema)
|
5467
|
+
});
|
5468
|
+
var TicketParamsSchema = import_zod79.default.object({
|
5469
|
+
page: import_zod79.default.coerce.number().default(1),
|
5470
|
+
pageSize: import_zod79.default.coerce.number().default(10)
|
5471
|
+
});
|
5472
|
+
var CustomFieldQuery = import_zod79.default.object({
|
5473
|
+
attributeId: import_zod79.default.string(),
|
5474
|
+
type: import_zod79.default.string(),
|
5475
|
+
value: import_zod79.default.union([import_zod79.default.string(), import_zod79.default.array(import_zod79.default.string())])
|
5476
|
+
});
|
5477
|
+
var GetAllTicketQuerySchema = import_zod79.default.object({
|
5478
|
+
page: import_zod79.default.string().transform((value) => Number(value)),
|
5479
|
+
pageSize: import_zod79.default.string().transform((value) => Number(value)),
|
5480
|
+
selectedDate: import_zod79.default.string(),
|
5481
|
+
keyword: import_zod79.default.string(),
|
5482
|
+
title: import_zod79.default.string(),
|
5483
|
+
description: import_zod79.default.string(),
|
5484
|
+
status: import_zod79.default.array(import_zod79.default.string()),
|
5485
|
+
priority: import_zod79.default.array(import_zod79.default.string()),
|
5486
|
+
channel: import_zod79.default.array(import_zod79.default.string()),
|
5487
|
+
type: import_zod79.default.array(import_zod79.default.string()),
|
5488
|
+
ticketType: import_zod79.default.array(import_zod79.default.string()),
|
5489
|
+
contact: import_zod79.default.array(import_zod79.default.string()),
|
5490
|
+
tags: import_zod79.default.array(import_zod79.default.string().uuid()),
|
5491
|
+
categories: import_zod79.default.array(import_zod79.default.string().uuid()),
|
5492
|
+
assignee: import_zod79.default.array(import_zod79.default.string().uuid()),
|
5493
|
+
customFields: import_zod79.default.array(
|
5494
|
+
import_zod79.default.object({
|
5495
|
+
attributeId: import_zod79.default.string().uuid(),
|
5496
|
+
type: import_zod79.default.string(),
|
5497
|
+
value: import_zod79.default.union([import_zod79.default.string(), import_zod79.default.array(import_zod79.default.string())])
|
5310
5498
|
})
|
5311
5499
|
)
|
5312
5500
|
}).partial();
|
5313
|
-
var ExportAllTicketQuerySchema =
|
5314
|
-
agent:
|
5315
|
-
selectedDate:
|
5316
|
-
keyword:
|
5317
|
-
title:
|
5318
|
-
description:
|
5319
|
-
status:
|
5320
|
-
priority:
|
5321
|
-
channel:
|
5322
|
-
type:
|
5323
|
-
ticketType:
|
5324
|
-
contact:
|
5325
|
-
tags:
|
5326
|
-
categories:
|
5327
|
-
customFields:
|
5328
|
-
|
5329
|
-
attributeId:
|
5330
|
-
type:
|
5331
|
-
value:
|
5501
|
+
var ExportAllTicketQuerySchema = import_zod79.default.object({
|
5502
|
+
agent: import_zod79.default.array(import_zod79.default.string()),
|
5503
|
+
selectedDate: import_zod79.default.string(),
|
5504
|
+
keyword: import_zod79.default.string(),
|
5505
|
+
title: import_zod79.default.string(),
|
5506
|
+
description: import_zod79.default.string(),
|
5507
|
+
status: import_zod79.default.array(import_zod79.default.string()),
|
5508
|
+
priority: import_zod79.default.array(import_zod79.default.string()),
|
5509
|
+
channel: import_zod79.default.array(import_zod79.default.string()),
|
5510
|
+
type: import_zod79.default.array(import_zod79.default.string()),
|
5511
|
+
ticketType: import_zod79.default.array(import_zod79.default.string()),
|
5512
|
+
contact: import_zod79.default.array(import_zod79.default.string()),
|
5513
|
+
tags: import_zod79.default.array(import_zod79.default.string()),
|
5514
|
+
categories: import_zod79.default.array(import_zod79.default.string()),
|
5515
|
+
customFields: import_zod79.default.array(
|
5516
|
+
import_zod79.default.object({
|
5517
|
+
attributeId: import_zod79.default.string().uuid(),
|
5518
|
+
type: import_zod79.default.string(),
|
5519
|
+
value: import_zod79.default.union([import_zod79.default.string(), import_zod79.default.array(import_zod79.default.string())])
|
5332
5520
|
})
|
5333
5521
|
)
|
5334
5522
|
}).partial();
|
@@ -5344,14 +5532,14 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5344
5532
|
201: DefaultSuccessResponseSchema.extend({
|
5345
5533
|
data: TicketSchema
|
5346
5534
|
}),
|
5347
|
-
400:
|
5348
|
-
message:
|
5535
|
+
400: import_zod80.default.object({
|
5536
|
+
message: import_zod80.default.string()
|
5349
5537
|
}),
|
5350
|
-
409:
|
5351
|
-
message:
|
5538
|
+
409: import_zod80.default.object({
|
5539
|
+
message: import_zod80.default.string()
|
5352
5540
|
}),
|
5353
|
-
500:
|
5354
|
-
message:
|
5541
|
+
500: import_zod80.default.object({
|
5542
|
+
message: import_zod80.default.string()
|
5355
5543
|
}),
|
5356
5544
|
401: DefaultUnauthorizedSchema,
|
5357
5545
|
404: DefaultNotFoundSchema,
|
@@ -5372,8 +5560,8 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5372
5560
|
TicketSchema
|
5373
5561
|
)
|
5374
5562
|
}),
|
5375
|
-
400:
|
5376
|
-
message:
|
5563
|
+
400: import_zod80.default.object({
|
5564
|
+
message: import_zod80.default.string()
|
5377
5565
|
}),
|
5378
5566
|
401: DefaultUnauthorizedSchema,
|
5379
5567
|
500: DefaultErrorResponseSchema
|
@@ -5383,14 +5571,14 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5383
5571
|
getTicketById: {
|
5384
5572
|
method: "GET",
|
5385
5573
|
path: "/:id",
|
5386
|
-
pathParams:
|
5574
|
+
pathParams: import_zod80.default.object({ id: import_zod80.default.string() }),
|
5387
5575
|
headers: DefaultHeaderSchema,
|
5388
5576
|
responses: {
|
5389
5577
|
200: DefaultSuccessResponseSchema.extend({
|
5390
5578
|
data: TicketSchema
|
5391
5579
|
}),
|
5392
|
-
400:
|
5393
|
-
message:
|
5580
|
+
400: import_zod80.default.object({
|
5581
|
+
message: import_zod80.default.string()
|
5394
5582
|
}),
|
5395
5583
|
401: DefaultUnauthorizedSchema,
|
5396
5584
|
500: DefaultErrorResponseSchema
|
@@ -5400,15 +5588,15 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5400
5588
|
getTicketByContactId: {
|
5401
5589
|
method: "GET",
|
5402
5590
|
path: "/contact/:id",
|
5403
|
-
pathParams:
|
5591
|
+
pathParams: import_zod80.default.object({ id: import_zod80.default.string() }),
|
5404
5592
|
query: TicketParamsSchema,
|
5405
5593
|
headers: DefaultHeaderSchema,
|
5406
5594
|
responses: {
|
5407
5595
|
200: DefaultSuccessResponseSchema.extend({
|
5408
5596
|
data: WithPagination(TicketSchema)
|
5409
5597
|
}),
|
5410
|
-
400:
|
5411
|
-
message:
|
5598
|
+
400: import_zod80.default.object({
|
5599
|
+
message: import_zod80.default.string()
|
5412
5600
|
}),
|
5413
5601
|
401: DefaultUnauthorizedSchema,
|
5414
5602
|
500: DefaultErrorResponseSchema
|
@@ -5418,21 +5606,21 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5418
5606
|
updateTicket: {
|
5419
5607
|
method: "PATCH",
|
5420
5608
|
path: "/:id",
|
5421
|
-
pathParams:
|
5609
|
+
pathParams: import_zod80.default.object({ id: import_zod80.default.string() }),
|
5422
5610
|
body: UpdateTicketValidationSchema,
|
5423
5611
|
headers: DefaultHeaderSchema,
|
5424
5612
|
responses: {
|
5425
5613
|
201: DefaultSuccessResponseSchema.extend({
|
5426
5614
|
data: TicketSchema
|
5427
5615
|
}),
|
5428
|
-
400:
|
5429
|
-
message:
|
5616
|
+
400: import_zod80.default.object({
|
5617
|
+
message: import_zod80.default.string()
|
5430
5618
|
}),
|
5431
|
-
409:
|
5432
|
-
message:
|
5619
|
+
409: import_zod80.default.object({
|
5620
|
+
message: import_zod80.default.string()
|
5433
5621
|
}),
|
5434
|
-
500:
|
5435
|
-
message:
|
5622
|
+
500: import_zod80.default.object({
|
5623
|
+
message: import_zod80.default.string()
|
5436
5624
|
}),
|
5437
5625
|
401: DefaultUnauthorizedSchema,
|
5438
5626
|
404: DefaultNotFoundSchema,
|
@@ -5443,11 +5631,11 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5443
5631
|
deleteTicket: {
|
5444
5632
|
method: "DELETE",
|
5445
5633
|
path: "/:id",
|
5446
|
-
pathParams:
|
5634
|
+
pathParams: import_zod80.default.object({ id: import_zod80.default.string() }),
|
5447
5635
|
headers: DefaultHeaderSchema,
|
5448
5636
|
body: null,
|
5449
5637
|
responses: {
|
5450
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5638
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod80.default.string() }),
|
5451
5639
|
500: DefaultErrorResponseSchema
|
5452
5640
|
},
|
5453
5641
|
summary: "Delete a extension."
|
@@ -5455,19 +5643,19 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5455
5643
|
updateDescription: {
|
5456
5644
|
method: "PATCH",
|
5457
5645
|
path: "/description/update/:id",
|
5458
|
-
pathParams:
|
5459
|
-
body:
|
5646
|
+
pathParams: import_zod80.default.object({ id: import_zod80.default.string() }),
|
5647
|
+
body: import_zod80.default.object({ description: import_zod80.default.string() }),
|
5460
5648
|
headers: DefaultHeaderSchema,
|
5461
5649
|
responses: {
|
5462
|
-
201: DefaultSuccessResponseSchema.extend({ message:
|
5463
|
-
400:
|
5464
|
-
message:
|
5650
|
+
201: DefaultSuccessResponseSchema.extend({ message: import_zod80.default.string() }),
|
5651
|
+
400: import_zod80.default.object({
|
5652
|
+
message: import_zod80.default.string()
|
5465
5653
|
}),
|
5466
|
-
409:
|
5467
|
-
message:
|
5654
|
+
409: import_zod80.default.object({
|
5655
|
+
message: import_zod80.default.string()
|
5468
5656
|
}),
|
5469
|
-
500:
|
5470
|
-
message:
|
5657
|
+
500: import_zod80.default.object({
|
5658
|
+
message: import_zod80.default.string()
|
5471
5659
|
}),
|
5472
5660
|
401: DefaultUnauthorizedSchema,
|
5473
5661
|
404: DefaultNotFoundSchema,
|
@@ -5478,19 +5666,19 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5478
5666
|
updateTitle: {
|
5479
5667
|
method: "PATCH",
|
5480
5668
|
path: "/title/update/:id",
|
5481
|
-
pathParams:
|
5482
|
-
body:
|
5669
|
+
pathParams: import_zod80.default.object({ id: import_zod80.default.string() }),
|
5670
|
+
body: import_zod80.default.object({ title: import_zod80.default.string() }),
|
5483
5671
|
headers: DefaultHeaderSchema,
|
5484
5672
|
responses: {
|
5485
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5486
|
-
400:
|
5487
|
-
message:
|
5673
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod80.default.string() }),
|
5674
|
+
400: import_zod80.default.object({
|
5675
|
+
message: import_zod80.default.string()
|
5488
5676
|
}),
|
5489
|
-
409:
|
5490
|
-
message:
|
5677
|
+
409: import_zod80.default.object({
|
5678
|
+
message: import_zod80.default.string()
|
5491
5679
|
}),
|
5492
|
-
500:
|
5493
|
-
message:
|
5680
|
+
500: import_zod80.default.object({
|
5681
|
+
message: import_zod80.default.string()
|
5494
5682
|
}),
|
5495
5683
|
401: DefaultUnauthorizedSchema,
|
5496
5684
|
404: DefaultNotFoundSchema,
|
@@ -5501,19 +5689,19 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5501
5689
|
updateType: {
|
5502
5690
|
method: "PATCH",
|
5503
5691
|
path: "/type/update/:id",
|
5504
|
-
pathParams:
|
5505
|
-
body:
|
5692
|
+
pathParams: import_zod80.default.object({ id: import_zod80.default.string() }),
|
5693
|
+
body: import_zod80.default.object({ type: import_zod80.default.string() }),
|
5506
5694
|
headers: DefaultHeaderSchema,
|
5507
5695
|
responses: {
|
5508
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5509
|
-
400:
|
5510
|
-
message:
|
5696
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod80.default.string() }),
|
5697
|
+
400: import_zod80.default.object({
|
5698
|
+
message: import_zod80.default.string()
|
5511
5699
|
}),
|
5512
|
-
409:
|
5513
|
-
message:
|
5700
|
+
409: import_zod80.default.object({
|
5701
|
+
message: import_zod80.default.string()
|
5514
5702
|
}),
|
5515
|
-
500:
|
5516
|
-
message:
|
5703
|
+
500: import_zod80.default.object({
|
5704
|
+
message: import_zod80.default.string()
|
5517
5705
|
}),
|
5518
5706
|
401: DefaultUnauthorizedSchema,
|
5519
5707
|
404: DefaultNotFoundSchema,
|
@@ -5524,19 +5712,19 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5524
5712
|
updateStatus: {
|
5525
5713
|
method: "PATCH",
|
5526
5714
|
path: "/status/update/:id",
|
5527
|
-
pathParams:
|
5528
|
-
body:
|
5715
|
+
pathParams: import_zod80.default.object({ id: import_zod80.default.string() }),
|
5716
|
+
body: import_zod80.default.object({ status: import_zod80.default.string() }),
|
5529
5717
|
headers: DefaultHeaderSchema,
|
5530
5718
|
responses: {
|
5531
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5532
|
-
400:
|
5533
|
-
message:
|
5719
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod80.default.string() }),
|
5720
|
+
400: import_zod80.default.object({
|
5721
|
+
message: import_zod80.default.string()
|
5534
5722
|
}),
|
5535
|
-
409:
|
5536
|
-
message:
|
5723
|
+
409: import_zod80.default.object({
|
5724
|
+
message: import_zod80.default.string()
|
5537
5725
|
}),
|
5538
|
-
500:
|
5539
|
-
message:
|
5726
|
+
500: import_zod80.default.object({
|
5727
|
+
message: import_zod80.default.string()
|
5540
5728
|
}),
|
5541
5729
|
401: DefaultUnauthorizedSchema,
|
5542
5730
|
404: DefaultNotFoundSchema,
|
@@ -5547,19 +5735,19 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5547
5735
|
updatePriority: {
|
5548
5736
|
method: "PATCH",
|
5549
5737
|
path: "/priority/update/:id",
|
5550
|
-
pathParams:
|
5551
|
-
body:
|
5738
|
+
pathParams: import_zod80.default.object({ id: import_zod80.default.string() }),
|
5739
|
+
body: import_zod80.default.object({ priority: import_zod80.default.string() }),
|
5552
5740
|
headers: DefaultHeaderSchema,
|
5553
5741
|
responses: {
|
5554
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5555
|
-
400:
|
5556
|
-
message:
|
5742
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod80.default.string() }),
|
5743
|
+
400: import_zod80.default.object({
|
5744
|
+
message: import_zod80.default.string()
|
5557
5745
|
}),
|
5558
|
-
409:
|
5559
|
-
message:
|
5746
|
+
409: import_zod80.default.object({
|
5747
|
+
message: import_zod80.default.string()
|
5560
5748
|
}),
|
5561
|
-
500:
|
5562
|
-
message:
|
5749
|
+
500: import_zod80.default.object({
|
5750
|
+
message: import_zod80.default.string()
|
5563
5751
|
}),
|
5564
5752
|
401: DefaultUnauthorizedSchema,
|
5565
5753
|
404: DefaultNotFoundSchema,
|
@@ -5570,19 +5758,19 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5570
5758
|
updateChannel: {
|
5571
5759
|
method: "PATCH",
|
5572
5760
|
path: "/channel/update/:id",
|
5573
|
-
pathParams:
|
5574
|
-
body:
|
5761
|
+
pathParams: import_zod80.default.object({ id: import_zod80.default.string() }),
|
5762
|
+
body: import_zod80.default.object({ channel: import_zod80.default.string() }),
|
5575
5763
|
headers: DefaultHeaderSchema,
|
5576
5764
|
responses: {
|
5577
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5578
|
-
400:
|
5579
|
-
message:
|
5765
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod80.default.string() }),
|
5766
|
+
400: import_zod80.default.object({
|
5767
|
+
message: import_zod80.default.string()
|
5580
5768
|
}),
|
5581
|
-
409:
|
5582
|
-
message:
|
5769
|
+
409: import_zod80.default.object({
|
5770
|
+
message: import_zod80.default.string()
|
5583
5771
|
}),
|
5584
|
-
500:
|
5585
|
-
message:
|
5772
|
+
500: import_zod80.default.object({
|
5773
|
+
message: import_zod80.default.string()
|
5586
5774
|
}),
|
5587
5775
|
401: DefaultUnauthorizedSchema,
|
5588
5776
|
404: DefaultNotFoundSchema,
|
@@ -5593,19 +5781,19 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5593
5781
|
updateTags: {
|
5594
5782
|
method: "PATCH",
|
5595
5783
|
path: "/tags/update/:id",
|
5596
|
-
pathParams:
|
5597
|
-
body:
|
5784
|
+
pathParams: import_zod80.default.object({ id: import_zod80.default.string() }),
|
5785
|
+
body: import_zod80.default.object({ tags: import_zod80.default.array(import_zod80.default.string()) }),
|
5598
5786
|
headers: DefaultHeaderSchema,
|
5599
5787
|
responses: {
|
5600
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5601
|
-
400:
|
5602
|
-
message:
|
5788
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod80.default.string() }),
|
5789
|
+
400: import_zod80.default.object({
|
5790
|
+
message: import_zod80.default.string()
|
5603
5791
|
}),
|
5604
|
-
409:
|
5605
|
-
message:
|
5792
|
+
409: import_zod80.default.object({
|
5793
|
+
message: import_zod80.default.string()
|
5606
5794
|
}),
|
5607
|
-
500:
|
5608
|
-
message:
|
5795
|
+
500: import_zod80.default.object({
|
5796
|
+
message: import_zod80.default.string()
|
5609
5797
|
}),
|
5610
5798
|
401: DefaultUnauthorizedSchema,
|
5611
5799
|
404: DefaultNotFoundSchema,
|
@@ -5616,25 +5804,25 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5616
5804
|
changeAssignee: {
|
5617
5805
|
method: "PATCH",
|
5618
5806
|
path: "/assignee/update/:id",
|
5619
|
-
pathParams:
|
5620
|
-
body:
|
5621
|
-
ticketId:
|
5622
|
-
assigneeId:
|
5623
|
-
reason:
|
5807
|
+
pathParams: import_zod80.default.object({ id: import_zod80.default.string() }),
|
5808
|
+
body: import_zod80.default.object({
|
5809
|
+
ticketId: import_zod80.default.string(),
|
5810
|
+
assigneeId: import_zod80.default.string(),
|
5811
|
+
reason: import_zod80.default.string().optional()
|
5624
5812
|
}),
|
5625
5813
|
headers: DefaultHeaderSchema,
|
5626
5814
|
responses: {
|
5627
5815
|
200: DefaultSuccessResponseSchema.extend({
|
5628
5816
|
data: TicketSchema
|
5629
5817
|
}),
|
5630
|
-
400:
|
5631
|
-
message:
|
5818
|
+
400: import_zod80.default.object({
|
5819
|
+
message: import_zod80.default.string()
|
5632
5820
|
}),
|
5633
|
-
409:
|
5634
|
-
message:
|
5821
|
+
409: import_zod80.default.object({
|
5822
|
+
message: import_zod80.default.string()
|
5635
5823
|
}),
|
5636
|
-
500:
|
5637
|
-
message:
|
5824
|
+
500: import_zod80.default.object({
|
5825
|
+
message: import_zod80.default.string()
|
5638
5826
|
}),
|
5639
5827
|
401: DefaultUnauthorizedSchema,
|
5640
5828
|
404: DefaultNotFoundSchema,
|
@@ -5645,14 +5833,14 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5645
5833
|
getTicketCountByContact: {
|
5646
5834
|
method: "GET",
|
5647
5835
|
path: "/ticket_count/contact/:id",
|
5648
|
-
pathParams:
|
5836
|
+
pathParams: import_zod80.default.object({ id: import_zod80.default.string() }),
|
5649
5837
|
headers: DefaultHeaderSchema,
|
5650
5838
|
responses: {
|
5651
5839
|
200: DefaultSuccessResponseSchema.extend({
|
5652
5840
|
data: TicketCountByContactSchema
|
5653
5841
|
}),
|
5654
|
-
400:
|
5655
|
-
message:
|
5842
|
+
400: import_zod80.default.object({
|
5843
|
+
message: import_zod80.default.string()
|
5656
5844
|
}),
|
5657
5845
|
401: DefaultUnauthorizedSchema,
|
5658
5846
|
500: DefaultErrorResponseSchema
|
@@ -5668,14 +5856,14 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5668
5856
|
201: DefaultSuccessResponseSchema.extend({
|
5669
5857
|
data: TicketCustomFieldSchema
|
5670
5858
|
}),
|
5671
|
-
400:
|
5672
|
-
message:
|
5859
|
+
400: import_zod80.default.object({
|
5860
|
+
message: import_zod80.default.string()
|
5673
5861
|
}),
|
5674
|
-
409:
|
5675
|
-
message:
|
5862
|
+
409: import_zod80.default.object({
|
5863
|
+
message: import_zod80.default.string()
|
5676
5864
|
}),
|
5677
|
-
500:
|
5678
|
-
message:
|
5865
|
+
500: import_zod80.default.object({
|
5866
|
+
message: import_zod80.default.string()
|
5679
5867
|
}),
|
5680
5868
|
401: DefaultUnauthorizedSchema,
|
5681
5869
|
404: DefaultNotFoundSchema,
|
@@ -5700,21 +5888,21 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5700
5888
|
|
5701
5889
|
// src/user/index.ts
|
5702
5890
|
var import_core31 = require("@ts-rest/core");
|
5703
|
-
var
|
5891
|
+
var import_zod82 = __toESM(require("zod"));
|
5704
5892
|
|
5705
5893
|
// src/user/validation.ts
|
5706
|
-
var
|
5707
|
-
var CreateUserSchema =
|
5708
|
-
name:
|
5709
|
-
email:
|
5710
|
-
address:
|
5711
|
-
phone:
|
5712
|
-
password:
|
5713
|
-
notificationCount:
|
5714
|
-
roles:
|
5894
|
+
var import_zod81 = require("zod");
|
5895
|
+
var CreateUserSchema = import_zod81.z.object({
|
5896
|
+
name: import_zod81.z.string(),
|
5897
|
+
email: import_zod81.z.string().email(),
|
5898
|
+
address: import_zod81.z.string().nullable(),
|
5899
|
+
phone: import_zod81.z.string().nullable(),
|
5900
|
+
password: import_zod81.z.string(),
|
5901
|
+
notificationCount: import_zod81.z.number().nullable().optional(),
|
5902
|
+
roles: import_zod81.z.array(import_zod81.z.string())
|
5715
5903
|
});
|
5716
5904
|
var UpdateUserSchema = CreateUserSchema.extend({
|
5717
|
-
newPassword:
|
5905
|
+
newPassword: import_zod81.z.string()
|
5718
5906
|
});
|
5719
5907
|
|
5720
5908
|
// src/user/index.ts
|
@@ -5729,8 +5917,8 @@ var userContract = (0, import_core31.initContract)().router(
|
|
5729
5917
|
201: DefaultSuccessResponseSchema.extend({
|
5730
5918
|
user: UserSchema
|
5731
5919
|
}),
|
5732
|
-
400:
|
5733
|
-
message:
|
5920
|
+
400: import_zod82.default.object({
|
5921
|
+
message: import_zod82.default.string()
|
5734
5922
|
}),
|
5735
5923
|
401: DefaultUnauthorizedSchema
|
5736
5924
|
},
|
@@ -5740,16 +5928,16 @@ var userContract = (0, import_core31.initContract)().router(
|
|
5740
5928
|
method: "GET",
|
5741
5929
|
path: "",
|
5742
5930
|
headers: DefaultHeaderSchema,
|
5743
|
-
query:
|
5744
|
-
page:
|
5745
|
-
pageSize:
|
5931
|
+
query: import_zod82.default.object({
|
5932
|
+
page: import_zod82.default.coerce.number().optional(),
|
5933
|
+
pageSize: import_zod82.default.coerce.number().optional(),
|
5746
5934
|
// Don't add default 10. In some places, we need to fetch all users.
|
5747
|
-
keyword:
|
5935
|
+
keyword: import_zod82.default.string().optional()
|
5748
5936
|
}).optional(),
|
5749
5937
|
responses: {
|
5750
5938
|
200: WithPagination(UserSchema),
|
5751
|
-
400:
|
5752
|
-
message:
|
5939
|
+
400: import_zod82.default.object({
|
5940
|
+
message: import_zod82.default.string()
|
5753
5941
|
}),
|
5754
5942
|
401: DefaultUnauthorizedSchema,
|
5755
5943
|
500: DefaultErrorResponseSchema
|
@@ -5759,12 +5947,12 @@ var userContract = (0, import_core31.initContract)().router(
|
|
5759
5947
|
getUserById: {
|
5760
5948
|
method: "GET",
|
5761
5949
|
path: "/:id",
|
5762
|
-
pathParams:
|
5950
|
+
pathParams: import_zod82.default.object({ id: import_zod82.default.string() }),
|
5763
5951
|
headers: DefaultHeaderSchema,
|
5764
5952
|
responses: {
|
5765
5953
|
200: UserSchema,
|
5766
|
-
400:
|
5767
|
-
message:
|
5954
|
+
400: import_zod82.default.object({
|
5955
|
+
message: import_zod82.default.string()
|
5768
5956
|
}),
|
5769
5957
|
401: DefaultUnauthorizedSchema
|
5770
5958
|
},
|
@@ -5773,15 +5961,15 @@ var userContract = (0, import_core31.initContract)().router(
|
|
5773
5961
|
updateUser: {
|
5774
5962
|
method: "PATCH",
|
5775
5963
|
path: "/:id",
|
5776
|
-
pathParams:
|
5964
|
+
pathParams: import_zod82.default.object({ id: import_zod82.default.string() }),
|
5777
5965
|
headers: DefaultHeaderSchema,
|
5778
5966
|
body: UpdateUserSchema,
|
5779
5967
|
responses: {
|
5780
5968
|
201: DefaultSuccessResponseSchema.extend({
|
5781
5969
|
role: UserSchema
|
5782
5970
|
}),
|
5783
|
-
400:
|
5784
|
-
message:
|
5971
|
+
400: import_zod82.default.object({
|
5972
|
+
message: import_zod82.default.string()
|
5785
5973
|
}),
|
5786
5974
|
401: DefaultUnauthorizedSchema
|
5787
5975
|
},
|
@@ -5790,11 +5978,11 @@ var userContract = (0, import_core31.initContract)().router(
|
|
5790
5978
|
deleteUser: {
|
5791
5979
|
method: "DELETE",
|
5792
5980
|
path: "/:id",
|
5793
|
-
pathParams:
|
5981
|
+
pathParams: import_zod82.default.object({ id: import_zod82.default.string() }),
|
5794
5982
|
headers: DefaultHeaderSchema,
|
5795
5983
|
body: null,
|
5796
5984
|
responses: {
|
5797
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5985
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod82.default.string() }),
|
5798
5986
|
500: DefaultErrorResponseSchema
|
5799
5987
|
},
|
5800
5988
|
summary: "Delete a user."
|
@@ -5805,26 +5993,26 @@ var userContract = (0, import_core31.initContract)().router(
|
|
5805
5993
|
|
5806
5994
|
// src/user-presence-status-log/index.ts
|
5807
5995
|
var import_core32 = require("@ts-rest/core");
|
5808
|
-
var
|
5996
|
+
var import_zod85 = __toESM(require("zod"));
|
5809
5997
|
|
5810
5998
|
// src/user-presence-status-log/schema.ts
|
5811
|
-
var
|
5999
|
+
var import_zod83 = __toESM(require("zod"));
|
5812
6000
|
var UserPresenceStatusLogSchema = DefaultEntitySchema.extend({
|
5813
6001
|
user: UserSchema,
|
5814
6002
|
previousPresenceStatus: PresenceStatusSchema,
|
5815
6003
|
newPresenceStatus: PresenceStatusSchema,
|
5816
|
-
reason:
|
6004
|
+
reason: import_zod83.default.string()
|
5817
6005
|
});
|
5818
6006
|
|
5819
6007
|
// src/user-presence-status-log/validation.ts
|
5820
|
-
var
|
5821
|
-
var UserPresenceStatusLogParamsSchema =
|
5822
|
-
page:
|
5823
|
-
pageSize:
|
5824
|
-
selectedDate:
|
6008
|
+
var import_zod84 = __toESM(require("zod"));
|
6009
|
+
var UserPresenceStatusLogParamsSchema = import_zod84.default.object({
|
6010
|
+
page: import_zod84.default.coerce.number().default(1),
|
6011
|
+
pageSize: import_zod84.default.coerce.number().default(10),
|
6012
|
+
selectedDate: import_zod84.default.string().optional()
|
5825
6013
|
}).optional();
|
5826
|
-
var UserPresenceStatusLogExportParamsSchema =
|
5827
|
-
selectedDate:
|
6014
|
+
var UserPresenceStatusLogExportParamsSchema = import_zod84.default.object({
|
6015
|
+
selectedDate: import_zod84.default.string().optional()
|
5828
6016
|
});
|
5829
6017
|
|
5830
6018
|
// src/user-presence-status-log/index.ts
|
@@ -5837,8 +6025,8 @@ var userPresenceStatusLogContract = (0, import_core32.initContract)().router(
|
|
5837
6025
|
headers: DefaultHeaderSchema,
|
5838
6026
|
responses: {
|
5839
6027
|
200: WithPagination(UserPresenceStatusLogSchema),
|
5840
|
-
400:
|
5841
|
-
message:
|
6028
|
+
400: import_zod85.default.object({
|
6029
|
+
message: import_zod85.default.string()
|
5842
6030
|
}),
|
5843
6031
|
401: DefaultUnauthorizedSchema,
|
5844
6032
|
500: DefaultErrorResponseSchema
|
@@ -5852,8 +6040,8 @@ var userPresenceStatusLogContract = (0, import_core32.initContract)().router(
|
|
5852
6040
|
headers: DefaultHeaderSchema,
|
5853
6041
|
responses: {
|
5854
6042
|
200: null,
|
5855
|
-
400:
|
5856
|
-
message:
|
6043
|
+
400: import_zod85.default.object({
|
6044
|
+
message: import_zod85.default.string()
|
5857
6045
|
}),
|
5858
6046
|
401: DefaultUnauthorizedSchema,
|
5859
6047
|
500: DefaultErrorResponseSchema
|
@@ -5865,44 +6053,44 @@ var userPresenceStatusLogContract = (0, import_core32.initContract)().router(
|
|
5865
6053
|
|
5866
6054
|
// src/widget/index.ts
|
5867
6055
|
var import_core33 = require("@ts-rest/core");
|
5868
|
-
var
|
6056
|
+
var import_zod88 = __toESM(require("zod"));
|
5869
6057
|
|
5870
6058
|
// src/widget/schema.ts
|
5871
|
-
var
|
5872
|
-
var FieldsSchema =
|
5873
|
-
var WidgetPositionSchema =
|
5874
|
-
|
5875
|
-
|
5876
|
-
|
6059
|
+
var import_zod86 = __toESM(require("zod"));
|
6060
|
+
var FieldsSchema = import_zod86.default.object({ data: import_zod86.default.array(import_zod86.default.string()) });
|
6061
|
+
var WidgetPositionSchema = import_zod86.default.union([
|
6062
|
+
import_zod86.default.literal("menu"),
|
6063
|
+
import_zod86.default.literal("ticket_detail"),
|
6064
|
+
import_zod86.default.literal("contact_detail")
|
5877
6065
|
]);
|
5878
6066
|
var WidgetSchema = DefaultEntitySchema.extend({
|
5879
|
-
name:
|
5880
|
-
description:
|
6067
|
+
name: import_zod86.default.string(),
|
6068
|
+
description: import_zod86.default.string().nullable(),
|
5881
6069
|
position: WidgetPositionSchema.nullable(),
|
5882
6070
|
fields: FieldsSchema,
|
5883
|
-
url:
|
6071
|
+
url: import_zod86.default.string()
|
5884
6072
|
});
|
5885
6073
|
|
5886
6074
|
// src/widget/validation.ts
|
5887
|
-
var
|
5888
|
-
var CreateWidgetSchema =
|
5889
|
-
name:
|
5890
|
-
description:
|
5891
|
-
url:
|
6075
|
+
var import_zod87 = __toESM(require("zod"));
|
6076
|
+
var CreateWidgetSchema = import_zod87.default.object({
|
6077
|
+
name: import_zod87.default.string(),
|
6078
|
+
description: import_zod87.default.string(),
|
6079
|
+
url: import_zod87.default.string(),
|
5892
6080
|
position: WidgetPositionSchema,
|
5893
|
-
fields:
|
6081
|
+
fields: import_zod87.default.object({
|
5894
6082
|
data: (
|
5895
6083
|
// Array of attribute system names
|
5896
|
-
|
6084
|
+
import_zod87.default.array(import_zod87.default.string())
|
5897
6085
|
)
|
5898
6086
|
}).optional()
|
5899
6087
|
});
|
5900
6088
|
var UpdateWidgetSchema = CreateWidgetSchema;
|
5901
|
-
var GetWidgetUrlPathQuerySchema =
|
5902
|
-
widgetId:
|
6089
|
+
var GetWidgetUrlPathQuerySchema = import_zod87.default.object({
|
6090
|
+
widgetId: import_zod87.default.string(),
|
5903
6091
|
// Position ID is ticket ID, contact ID, etc.
|
5904
6092
|
// TODO: The name "Position ID" is confusing. Think of a better name.
|
5905
|
-
positionId:
|
6093
|
+
positionId: import_zod87.default.string()
|
5906
6094
|
});
|
5907
6095
|
|
5908
6096
|
// src/widget/index.ts
|
@@ -5917,8 +6105,8 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
5917
6105
|
201: DefaultSuccessResponseSchema.extend({
|
5918
6106
|
widget: WidgetSchema
|
5919
6107
|
}),
|
5920
|
-
400:
|
5921
|
-
message:
|
6108
|
+
400: import_zod88.default.object({
|
6109
|
+
message: import_zod88.default.string()
|
5922
6110
|
}),
|
5923
6111
|
401: DefaultUnauthorizedSchema,
|
5924
6112
|
500: DefaultErrorResponseSchema
|
@@ -5928,17 +6116,17 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
5928
6116
|
getWidgets: {
|
5929
6117
|
method: "GET",
|
5930
6118
|
path: "",
|
5931
|
-
query:
|
5932
|
-
page:
|
5933
|
-
pageSize:
|
5934
|
-
keyword:
|
6119
|
+
query: import_zod88.default.object({
|
6120
|
+
page: import_zod88.default.coerce.number().default(1),
|
6121
|
+
pageSize: import_zod88.default.coerce.number().default(10),
|
6122
|
+
keyword: import_zod88.default.coerce.string().optional()
|
5935
6123
|
}).optional(),
|
5936
6124
|
headers: DefaultHeaderSchema,
|
5937
6125
|
responses: {
|
5938
6126
|
200: WithPagination(WidgetSchema),
|
5939
6127
|
500: DefaultErrorResponseSchema,
|
5940
|
-
400:
|
5941
|
-
message:
|
6128
|
+
400: import_zod88.default.object({
|
6129
|
+
message: import_zod88.default.string()
|
5942
6130
|
}),
|
5943
6131
|
401: DefaultUnauthorizedSchema
|
5944
6132
|
},
|
@@ -5949,9 +6137,9 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
5949
6137
|
path: "/menu",
|
5950
6138
|
headers: DefaultHeaderSchema,
|
5951
6139
|
responses: {
|
5952
|
-
200:
|
5953
|
-
400:
|
5954
|
-
message:
|
6140
|
+
200: import_zod88.default.array(WidgetSchema),
|
6141
|
+
400: import_zod88.default.object({
|
6142
|
+
message: import_zod88.default.string()
|
5955
6143
|
}),
|
5956
6144
|
401: DefaultUnauthorizedSchema,
|
5957
6145
|
500: DefaultErrorResponseSchema
|
@@ -5963,9 +6151,9 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
5963
6151
|
path: "/ticket_detail",
|
5964
6152
|
headers: DefaultHeaderSchema,
|
5965
6153
|
responses: {
|
5966
|
-
200:
|
5967
|
-
400:
|
5968
|
-
message:
|
6154
|
+
200: import_zod88.default.array(WidgetSchema),
|
6155
|
+
400: import_zod88.default.object({
|
6156
|
+
message: import_zod88.default.string()
|
5969
6157
|
}),
|
5970
6158
|
401: DefaultUnauthorizedSchema,
|
5971
6159
|
500: DefaultErrorResponseSchema
|
@@ -5977,9 +6165,9 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
5977
6165
|
path: "/contact_detail",
|
5978
6166
|
headers: DefaultHeaderSchema,
|
5979
6167
|
responses: {
|
5980
|
-
200:
|
5981
|
-
400:
|
5982
|
-
message:
|
6168
|
+
200: import_zod88.default.array(WidgetSchema),
|
6169
|
+
400: import_zod88.default.object({
|
6170
|
+
message: import_zod88.default.string()
|
5983
6171
|
}),
|
5984
6172
|
401: DefaultUnauthorizedSchema,
|
5985
6173
|
500: DefaultErrorResponseSchema
|
@@ -5989,12 +6177,12 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
5989
6177
|
getWidgetById: {
|
5990
6178
|
method: "GET",
|
5991
6179
|
path: "/:id",
|
5992
|
-
pathParams:
|
6180
|
+
pathParams: import_zod88.default.object({ id: import_zod88.default.string() }),
|
5993
6181
|
headers: DefaultHeaderSchema,
|
5994
6182
|
responses: {
|
5995
6183
|
200: WidgetSchema,
|
5996
|
-
400:
|
5997
|
-
message:
|
6184
|
+
400: import_zod88.default.object({
|
6185
|
+
message: import_zod88.default.string()
|
5998
6186
|
}),
|
5999
6187
|
401: DefaultUnauthorizedSchema,
|
6000
6188
|
500: DefaultErrorResponseSchema
|
@@ -6008,10 +6196,10 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6008
6196
|
headers: DefaultHeaderSchema,
|
6009
6197
|
responses: {
|
6010
6198
|
201: DefaultSuccessResponseSchema.extend({
|
6011
|
-
url:
|
6199
|
+
url: import_zod88.default.string()
|
6012
6200
|
}),
|
6013
|
-
400:
|
6014
|
-
message:
|
6201
|
+
400: import_zod88.default.object({
|
6202
|
+
message: import_zod88.default.string()
|
6015
6203
|
}),
|
6016
6204
|
401: DefaultUnauthorizedSchema
|
6017
6205
|
},
|
@@ -6020,14 +6208,14 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6020
6208
|
updateWidget: {
|
6021
6209
|
method: "PATCH",
|
6022
6210
|
path: "/:id",
|
6023
|
-
pathParams:
|
6211
|
+
pathParams: import_zod88.default.object({ id: import_zod88.default.string() }),
|
6024
6212
|
headers: DefaultHeaderSchema,
|
6025
6213
|
responses: {
|
6026
6214
|
201: DefaultSuccessResponseSchema.extend({
|
6027
6215
|
widget: WidgetSchema
|
6028
6216
|
}),
|
6029
|
-
400:
|
6030
|
-
message:
|
6217
|
+
400: import_zod88.default.object({
|
6218
|
+
message: import_zod88.default.string()
|
6031
6219
|
}),
|
6032
6220
|
401: DefaultUnauthorizedSchema
|
6033
6221
|
},
|
@@ -6037,11 +6225,11 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6037
6225
|
deleteWidget: {
|
6038
6226
|
method: "DELETE",
|
6039
6227
|
path: "/:id",
|
6040
|
-
pathParams:
|
6228
|
+
pathParams: import_zod88.default.object({ id: import_zod88.default.string() }),
|
6041
6229
|
headers: DefaultHeaderSchema,
|
6042
6230
|
body: null,
|
6043
6231
|
responses: {
|
6044
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
6232
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod88.default.string() }),
|
6045
6233
|
500: DefaultErrorResponseSchema
|
6046
6234
|
},
|
6047
6235
|
summary: "Delete a widget."
|
@@ -6052,24 +6240,24 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6052
6240
|
|
6053
6241
|
// src/wrap-up-form/index.ts
|
6054
6242
|
var import_core34 = require("@ts-rest/core");
|
6055
|
-
var
|
6243
|
+
var import_zod90 = __toESM(require("zod"));
|
6056
6244
|
|
6057
6245
|
// src/wrap-up-form/validation.ts
|
6058
|
-
var
|
6059
|
-
var CreateWrapUpFormSchema =
|
6060
|
-
note:
|
6061
|
-
disposition:
|
6062
|
-
callFrom:
|
6063
|
-
callTo:
|
6246
|
+
var import_zod89 = require("zod");
|
6247
|
+
var CreateWrapUpFormSchema = import_zod89.z.object({
|
6248
|
+
note: import_zod89.z.string().nullable().optional(),
|
6249
|
+
disposition: import_zod89.z.string().nullable().optional(),
|
6250
|
+
callFrom: import_zod89.z.string().nullable().optional(),
|
6251
|
+
callTo: import_zod89.z.string().nullable().optional()
|
6064
6252
|
});
|
6065
6253
|
var UpdateWrapUpFormSchema = CreateWrapUpFormSchema.extend({
|
6066
|
-
tags:
|
6254
|
+
tags: import_zod89.z.array(import_zod89.z.string()).optional()
|
6067
6255
|
});
|
6068
|
-
var CreateCXLogWrapUpFormSchema =
|
6069
|
-
cxLogId:
|
6070
|
-
disposition:
|
6071
|
-
tagIds:
|
6072
|
-
note:
|
6256
|
+
var CreateCXLogWrapUpFormSchema = import_zod89.z.object({
|
6257
|
+
cxLogId: import_zod89.z.string().uuid(),
|
6258
|
+
disposition: import_zod89.z.string().optional(),
|
6259
|
+
tagIds: import_zod89.z.array(import_zod89.z.string().uuid()).optional(),
|
6260
|
+
note: import_zod89.z.string().optional()
|
6073
6261
|
});
|
6074
6262
|
|
6075
6263
|
// src/wrap-up-form/index.ts
|
@@ -6084,8 +6272,8 @@ var wrapUpFormContract = (0, import_core34.initContract)().router(
|
|
6084
6272
|
201: DefaultSuccessResponseSchema.extend({
|
6085
6273
|
wrapUpForm: WrapUpFormSchema
|
6086
6274
|
}),
|
6087
|
-
400:
|
6088
|
-
message:
|
6275
|
+
400: import_zod90.default.object({
|
6276
|
+
message: import_zod90.default.string()
|
6089
6277
|
}),
|
6090
6278
|
401: DefaultUnauthorizedSchema,
|
6091
6279
|
500: DefaultErrorResponseSchema
|
@@ -6107,15 +6295,15 @@ var wrapUpFormContract = (0, import_core34.initContract)().router(
|
|
6107
6295
|
getWrapUpForms: {
|
6108
6296
|
method: "GET",
|
6109
6297
|
path: "",
|
6110
|
-
query:
|
6111
|
-
page:
|
6112
|
-
pageSize:
|
6298
|
+
query: import_zod90.default.object({
|
6299
|
+
page: import_zod90.default.coerce.number().default(1),
|
6300
|
+
pageSize: import_zod90.default.coerce.number().default(10)
|
6113
6301
|
}).optional(),
|
6114
6302
|
headers: DefaultHeaderSchema,
|
6115
6303
|
responses: {
|
6116
6304
|
200: WithPagination(WrapUpFormSchema),
|
6117
|
-
400:
|
6118
|
-
message:
|
6305
|
+
400: import_zod90.default.object({
|
6306
|
+
message: import_zod90.default.string()
|
6119
6307
|
}),
|
6120
6308
|
401: DefaultUnauthorizedSchema,
|
6121
6309
|
500: DefaultErrorResponseSchema
|
@@ -6125,15 +6313,15 @@ var wrapUpFormContract = (0, import_core34.initContract)().router(
|
|
6125
6313
|
updateWrapUpForm: {
|
6126
6314
|
method: "PATCH",
|
6127
6315
|
path: "/:id",
|
6128
|
-
pathParams:
|
6316
|
+
pathParams: import_zod90.default.object({ id: import_zod90.default.string() }),
|
6129
6317
|
headers: DefaultHeaderSchema,
|
6130
6318
|
body: UpdateWrapUpFormSchema,
|
6131
6319
|
responses: {
|
6132
6320
|
201: DefaultSuccessResponseSchema.extend({
|
6133
6321
|
wrapUpForm: WrapUpFormSchema
|
6134
6322
|
}),
|
6135
|
-
400:
|
6136
|
-
message:
|
6323
|
+
400: import_zod90.default.object({
|
6324
|
+
message: import_zod90.default.string()
|
6137
6325
|
}),
|
6138
6326
|
401: DefaultUnauthorizedSchema,
|
6139
6327
|
500: DefaultErrorResponseSchema
|
@@ -6146,28 +6334,28 @@ var wrapUpFormContract = (0, import_core34.initContract)().router(
|
|
6146
6334
|
|
6147
6335
|
// src/upload/index.ts
|
6148
6336
|
var import_core35 = require("@ts-rest/core");
|
6149
|
-
var
|
6337
|
+
var import_zod91 = __toESM(require("zod"));
|
6150
6338
|
var uploadContract = (0, import_core35.initContract)().router(
|
6151
6339
|
{
|
6152
6340
|
rename: {
|
6153
6341
|
method: "POST",
|
6154
6342
|
path: "/:id/rename",
|
6155
|
-
pathParams:
|
6156
|
-
id:
|
6343
|
+
pathParams: import_zod91.default.object({
|
6344
|
+
id: import_zod91.default.string()
|
6157
6345
|
}),
|
6158
6346
|
headers: DefaultHeaderSchema,
|
6159
6347
|
responses: {
|
6160
6348
|
201: DefaultSuccessResponseSchema.extend({
|
6161
|
-
message:
|
6349
|
+
message: import_zod91.default.string()
|
6162
6350
|
}),
|
6163
|
-
400:
|
6164
|
-
message:
|
6351
|
+
400: import_zod91.default.object({
|
6352
|
+
message: import_zod91.default.string()
|
6165
6353
|
}),
|
6166
|
-
409:
|
6167
|
-
message:
|
6354
|
+
409: import_zod91.default.object({
|
6355
|
+
message: import_zod91.default.string()
|
6168
6356
|
}),
|
6169
|
-
500:
|
6170
|
-
message:
|
6357
|
+
500: import_zod91.default.object({
|
6358
|
+
message: import_zod91.default.string()
|
6171
6359
|
}),
|
6172
6360
|
401: DefaultUnauthorizedSchema,
|
6173
6361
|
404: DefaultNotFoundSchema,
|
@@ -6179,23 +6367,23 @@ var uploadContract = (0, import_core35.initContract)().router(
|
|
6179
6367
|
delete: {
|
6180
6368
|
method: "DELETE",
|
6181
6369
|
path: "/:id",
|
6182
|
-
pathParams:
|
6183
|
-
id:
|
6370
|
+
pathParams: import_zod91.default.object({
|
6371
|
+
id: import_zod91.default.string()
|
6184
6372
|
}),
|
6185
6373
|
headers: DefaultHeaderSchema,
|
6186
6374
|
body: null,
|
6187
6375
|
responses: {
|
6188
6376
|
201: DefaultSuccessResponseSchema.extend({
|
6189
|
-
message:
|
6377
|
+
message: import_zod91.default.string()
|
6190
6378
|
}),
|
6191
|
-
400:
|
6192
|
-
message:
|
6379
|
+
400: import_zod91.default.object({
|
6380
|
+
message: import_zod91.default.string()
|
6193
6381
|
}),
|
6194
|
-
409:
|
6195
|
-
message:
|
6382
|
+
409: import_zod91.default.object({
|
6383
|
+
message: import_zod91.default.string()
|
6196
6384
|
}),
|
6197
|
-
500:
|
6198
|
-
message:
|
6385
|
+
500: import_zod91.default.object({
|
6386
|
+
message: import_zod91.default.string()
|
6199
6387
|
}),
|
6200
6388
|
401: DefaultUnauthorizedSchema,
|
6201
6389
|
404: DefaultNotFoundSchema,
|
@@ -6210,19 +6398,19 @@ var uploadContract = (0, import_core35.initContract)().router(
|
|
6210
6398
|
);
|
6211
6399
|
|
6212
6400
|
// src/viber/index.ts
|
6213
|
-
var
|
6401
|
+
var import_zod93 = __toESM(require("zod"));
|
6214
6402
|
|
6215
6403
|
// src/viber/validation.ts
|
6216
|
-
var
|
6217
|
-
var ViberChannelSchema =
|
6218
|
-
name:
|
6219
|
-
accessToken:
|
6220
|
-
actor:
|
6221
|
-
id:
|
6222
|
-
name:
|
6223
|
-
email:
|
6224
|
-
address:
|
6225
|
-
phone:
|
6404
|
+
var import_zod92 = __toESM(require("zod"));
|
6405
|
+
var ViberChannelSchema = import_zod92.default.object({
|
6406
|
+
name: import_zod92.default.string(),
|
6407
|
+
accessToken: import_zod92.default.string(),
|
6408
|
+
actor: import_zod92.default.object({
|
6409
|
+
id: import_zod92.default.string().uuid(),
|
6410
|
+
name: import_zod92.default.string(),
|
6411
|
+
email: import_zod92.default.string().email(),
|
6412
|
+
address: import_zod92.default.string().nullable(),
|
6413
|
+
phone: import_zod92.default.string().nullable()
|
6226
6414
|
}).optional()
|
6227
6415
|
});
|
6228
6416
|
|
@@ -6236,10 +6424,11 @@ var viberContract = (0, import_core36.initContract)().router({
|
|
6236
6424
|
200: DefaultSuccessResponseSchema.extend({
|
6237
6425
|
channel: ChannelSchema
|
6238
6426
|
}),
|
6239
|
-
400: DefaultErrorResponseSchema
|
6427
|
+
400: DefaultErrorResponseSchema,
|
6428
|
+
408: DefaultErrorResponseSchema
|
6240
6429
|
},
|
6241
6430
|
body: ViberChannelSchema,
|
6242
|
-
summary: "Connect
|
6431
|
+
summary: "Connect viber channel"
|
6243
6432
|
},
|
6244
6433
|
disconnect: {
|
6245
6434
|
method: "POST",
|
@@ -6250,10 +6439,10 @@ var viberContract = (0, import_core36.initContract)().router({
|
|
6250
6439
|
}),
|
6251
6440
|
400: DefaultErrorResponseSchema
|
6252
6441
|
},
|
6253
|
-
body:
|
6254
|
-
id:
|
6442
|
+
body: import_zod93.default.object({
|
6443
|
+
id: import_zod93.default.string().uuid()
|
6255
6444
|
}),
|
6256
|
-
summary: "Connect
|
6445
|
+
summary: "Connect viber channel"
|
6257
6446
|
},
|
6258
6447
|
sendMessage: {
|
6259
6448
|
method: "POST",
|
@@ -6263,11 +6452,170 @@ var viberContract = (0, import_core36.initContract)().router({
|
|
6263
6452
|
200: SendMessageResponseSchema,
|
6264
6453
|
500: DefaultErrorResponseSchema
|
6265
6454
|
}
|
6455
|
+
},
|
6456
|
+
reconnect: {
|
6457
|
+
method: "POST",
|
6458
|
+
path: "/reconnect/:channelId",
|
6459
|
+
pathParams: import_zod93.default.object({
|
6460
|
+
channelId: import_zod93.default.string().uuid()
|
6461
|
+
}),
|
6462
|
+
responses: {
|
6463
|
+
200: DefaultSuccessResponseSchema.extend({
|
6464
|
+
channel: ChannelSchema
|
6465
|
+
}),
|
6466
|
+
500: DefaultErrorResponseSchema,
|
6467
|
+
400: DefaultErrorResponseSchema
|
6468
|
+
},
|
6469
|
+
body: null,
|
6470
|
+
summary: "Reconnect viber channel"
|
6471
|
+
},
|
6472
|
+
delete: {
|
6473
|
+
method: "DELETE",
|
6474
|
+
path: "/delete/:channelId",
|
6475
|
+
pathParams: import_zod93.default.object({
|
6476
|
+
channelId: import_zod93.default.string().uuid()
|
6477
|
+
}),
|
6478
|
+
body: null,
|
6479
|
+
responses: {
|
6480
|
+
200: ChannelServiceResponseSchema,
|
6481
|
+
500: DefaultErrorResponseSchema,
|
6482
|
+
400: DefaultErrorResponseSchema
|
6483
|
+
}
|
6266
6484
|
}
|
6267
6485
|
});
|
6268
6486
|
|
6487
|
+
// src/notification/index.ts
|
6488
|
+
var import_core37 = require("@ts-rest/core");
|
6489
|
+
var import_zod96 = __toESM(require("zod"));
|
6490
|
+
|
6491
|
+
// src/notification/validation.ts
|
6492
|
+
var import_zod95 = __toESM(require("zod"));
|
6493
|
+
|
6494
|
+
// src/notification/schema.ts
|
6495
|
+
var import_zod94 = __toESM(require("zod"));
|
6496
|
+
var NotificationObjectSchema = import_zod94.default.object({
|
6497
|
+
data: import_zod94.default.string()
|
6498
|
+
});
|
6499
|
+
var NotificationChangeSchema = import_zod94.default.object({
|
6500
|
+
actorId: import_zod94.default.string().uuid(),
|
6501
|
+
notificationObjectId: import_zod94.default.string().uuid(),
|
6502
|
+
readAt: import_zod94.default.date()
|
6503
|
+
});
|
6504
|
+
var NotificationSchema = import_zod94.default.object({
|
6505
|
+
notificationObjectId: import_zod94.default.string().uuid(),
|
6506
|
+
notifierId: import_zod94.default.string().uuid(),
|
6507
|
+
notificationObject: NotificationObjectSchema,
|
6508
|
+
readAt: import_zod94.default.date()
|
6509
|
+
});
|
6510
|
+
|
6511
|
+
// src/notification/validation.ts
|
6512
|
+
var GetNotificationsRequestSchema = import_zod95.default.object({
|
6513
|
+
page: import_zod95.default.coerce.number().default(1),
|
6514
|
+
pageSize: import_zod95.default.coerce.number().default(10)
|
6515
|
+
});
|
6516
|
+
var GetNotificationsResponseSchema = import_zod95.default.object({
|
6517
|
+
notificationCount: import_zod95.default.number(),
|
6518
|
+
notifications: import_zod95.default.object({
|
6519
|
+
data: import_zod95.default.array(NotificationSchema),
|
6520
|
+
total: import_zod95.default.number(),
|
6521
|
+
page: import_zod95.default.number(),
|
6522
|
+
pageSize: import_zod95.default.number(),
|
6523
|
+
lastPage: import_zod95.default.number(),
|
6524
|
+
totalUnreadCount: import_zod95.default.number().optional(),
|
6525
|
+
unreadRoomCount: import_zod95.default.number().optional(),
|
6526
|
+
unreadCountsByAssigneeList: import_zod95.default.array(
|
6527
|
+
import_zod95.default.object({
|
6528
|
+
assigneeId: import_zod95.default.string().optional(),
|
6529
|
+
totalUnreadCount: import_zod95.default.string().optional()
|
6530
|
+
})
|
6531
|
+
)
|
6532
|
+
})
|
6533
|
+
});
|
6534
|
+
var ResetNotificationRequestSchema = import_zod95.default.object({
|
6535
|
+
userId: import_zod95.default.string()
|
6536
|
+
});
|
6537
|
+
|
6538
|
+
// src/notification/index.ts
|
6539
|
+
var userNotificationContract = (0, import_core37.initContract)().router(
|
6540
|
+
{
|
6541
|
+
getNotifications: {
|
6542
|
+
method: "GET",
|
6543
|
+
path: "",
|
6544
|
+
query: GetNotificationsRequestSchema,
|
6545
|
+
responses: {
|
6546
|
+
201: DefaultSuccessResponseSchema.extend({
|
6547
|
+
GetNotificationsResponseSchema
|
6548
|
+
}),
|
6549
|
+
400: import_zod96.default.object({
|
6550
|
+
message: import_zod96.default.string()
|
6551
|
+
}),
|
6552
|
+
409: import_zod96.default.object({
|
6553
|
+
message: import_zod96.default.string()
|
6554
|
+
}),
|
6555
|
+
500: import_zod96.default.object({
|
6556
|
+
message: import_zod96.default.string()
|
6557
|
+
}),
|
6558
|
+
401: DefaultUnauthorizedSchema,
|
6559
|
+
404: DefaultNotFoundSchema,
|
6560
|
+
422: DefaultUnprocessibleSchema
|
6561
|
+
},
|
6562
|
+
summary: "Get user's notification"
|
6563
|
+
},
|
6564
|
+
resetNotifications: {
|
6565
|
+
method: "POST",
|
6566
|
+
path: "/reset",
|
6567
|
+
responses: {
|
6568
|
+
201: DefaultSuccessResponseSchema.extend({
|
6569
|
+
data: UserSchema
|
6570
|
+
}),
|
6571
|
+
400: import_zod96.default.object({
|
6572
|
+
message: import_zod96.default.string()
|
6573
|
+
}),
|
6574
|
+
409: import_zod96.default.object({
|
6575
|
+
message: import_zod96.default.string()
|
6576
|
+
}),
|
6577
|
+
500: import_zod96.default.object({
|
6578
|
+
message: import_zod96.default.string()
|
6579
|
+
}),
|
6580
|
+
401: DefaultUnauthorizedSchema,
|
6581
|
+
404: DefaultNotFoundSchema,
|
6582
|
+
422: DefaultUnprocessibleSchema
|
6583
|
+
},
|
6584
|
+
body: ResetNotificationRequestSchema,
|
6585
|
+
summary: "Reset notification count to zero"
|
6586
|
+
},
|
6587
|
+
readNotification: {
|
6588
|
+
method: "POST",
|
6589
|
+
path: "/read/:id",
|
6590
|
+
pathParams: import_zod96.default.object({ id: import_zod96.default.string() }),
|
6591
|
+
responses: {
|
6592
|
+
201: DefaultSuccessResponseSchema.extend({
|
6593
|
+
data: NotificationSchema
|
6594
|
+
}),
|
6595
|
+
400: import_zod96.default.object({
|
6596
|
+
message: import_zod96.default.string()
|
6597
|
+
}),
|
6598
|
+
409: import_zod96.default.object({
|
6599
|
+
message: import_zod96.default.string()
|
6600
|
+
}),
|
6601
|
+
500: import_zod96.default.object({
|
6602
|
+
message: import_zod96.default.string()
|
6603
|
+
}),
|
6604
|
+
401: DefaultUnauthorizedSchema,
|
6605
|
+
404: DefaultNotFoundSchema,
|
6606
|
+
422: DefaultUnprocessibleSchema
|
6607
|
+
},
|
6608
|
+
body: ResetNotificationRequestSchema,
|
6609
|
+
summary: "Mark a notification as read"
|
6610
|
+
}
|
6611
|
+
},
|
6612
|
+
{
|
6613
|
+
pathPrefix: "notification"
|
6614
|
+
}
|
6615
|
+
);
|
6616
|
+
|
6269
6617
|
// src/contract.ts
|
6270
|
-
var apiContract = (0,
|
6618
|
+
var apiContract = (0, import_core38.initContract)().router({
|
6271
6619
|
auth: authContract,
|
6272
6620
|
mail: mailContract,
|
6273
6621
|
cxLog: cxLogContract,
|
@@ -6286,33 +6634,38 @@ var apiContract = (0, import_core37.initContract)().router({
|
|
6286
6634
|
aws: awsContract,
|
6287
6635
|
agentPresenceStatus: telephonyAgentPresenceStatusContract,
|
6288
6636
|
userPresenceStatusLog: userPresenceStatusLogContract,
|
6289
|
-
contact: contactContract,
|
6290
6637
|
company: companyContract,
|
6291
6638
|
evaluateForm: evaluateFormContract,
|
6292
6639
|
upload: uploadContract
|
6293
6640
|
});
|
6294
|
-
var
|
6641
|
+
var contactContract2 = (0, import_core38.initContract)().router({
|
6642
|
+
contact: contactContract
|
6643
|
+
});
|
6644
|
+
var ticketContract2 = (0, import_core38.initContract)().router({
|
6295
6645
|
ticket: ticketContract
|
6296
6646
|
});
|
6297
|
-
var extensionContract2 = (0,
|
6647
|
+
var extensionContract2 = (0, import_core38.initContract)().router({
|
6298
6648
|
extension: extensionContract
|
6299
6649
|
});
|
6300
|
-
var commentActivityContract = (0,
|
6650
|
+
var commentActivityContract = (0, import_core38.initContract)().router({
|
6301
6651
|
comment: commentContract,
|
6302
6652
|
activityLog: activityLogContract
|
6303
6653
|
});
|
6304
|
-
var platformContract = (0,
|
6654
|
+
var platformContract = (0, import_core38.initContract)().router({
|
6305
6655
|
line: lineContract,
|
6306
6656
|
messenger: messengerContract,
|
6307
6657
|
instagram: instagramContract,
|
6308
6658
|
viber: viberContract
|
6309
6659
|
});
|
6310
|
-
var chatContract = (0,
|
6660
|
+
var chatContract = (0, import_core38.initContract)().router({
|
6311
6661
|
main: mainChatContract
|
6312
6662
|
});
|
6313
|
-
var telephonyContract = (0,
|
6663
|
+
var telephonyContract = (0, import_core38.initContract)().router({
|
6314
6664
|
telephonyCdr: telephonyCdrContract
|
6315
6665
|
});
|
6666
|
+
var notificationContract = (0, import_core38.initContract)().router({
|
6667
|
+
notification: userNotificationContract
|
6668
|
+
});
|
6316
6669
|
// Annotate the CommonJS export names for ESM import in node:
|
6317
6670
|
0 && (module.exports = {
|
6318
6671
|
activityLogContract,
|
@@ -6330,6 +6683,7 @@ var telephonyContract = (0, import_core37.initContract)().router({
|
|
6330
6683
|
evaluateFormContract,
|
6331
6684
|
extensionContract,
|
6332
6685
|
mainChatContract,
|
6686
|
+
notificationContract,
|
6333
6687
|
permissionContract,
|
6334
6688
|
platformContract,
|
6335
6689
|
receiveMessageContract,
|