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