@kl1/contracts 1.0.98 → 1.0.99
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 +754 -785
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +754 -784
- package/dist/index.mjs.map +1 -1
- package/dist/src/chat/index.d.ts +0 -3
- package/dist/src/chat/index.d.ts.map +1 -1
- package/dist/src/chat/validation.d.ts +0 -8
- package/dist/src/chat/validation.d.ts.map +1 -1
- package/dist/src/contract.d.ts +258 -738
- package/dist/src/contract.d.ts.map +1 -1
- package/dist/src/index.d.ts +0 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/instagram/index.d.ts +0 -5
- package/dist/src/instagram/index.d.ts.map +1 -1
- package/dist/src/line/index.d.ts +0 -5
- package/dist/src/line/index.d.ts.map +1 -1
- package/dist/src/mail/account-contract.d.ts +132 -132
- package/dist/src/mail/mail-contract.d.ts +258 -715
- package/dist/src/mail/mail-contract.d.ts.map +1 -1
- package/dist/src/mail/mail-server-contract.d.ts +18 -477
- package/dist/src/mail/mail-server-contract.d.ts.map +1 -1
- package/dist/src/mail/room-contract.d.ts +108 -108
- package/dist/src/mail/schemas/account-validation.schema.d.ts +140 -140
- package/dist/src/mail/schemas/account.schema.d.ts +32 -32
- package/dist/src/mail/schemas/room-validation.schema.d.ts +36 -36
- package/dist/src/mail/schemas/room.schema.d.ts +28 -28
- package/dist/src/messenger/index.d.ts +0 -5
- package/dist/src/messenger/index.d.ts.map +1 -1
- package/dist/src/viber/index.d.ts +0 -5
- package/dist/src/viber/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -44,7 +44,6 @@ __export(src_exports, {
|
|
44
44
|
dashboardContract: () => dashboardContract,
|
45
45
|
evaluateFormContract: () => evaluateFormContract,
|
46
46
|
extensionContract: () => extensionContract2,
|
47
|
-
mailContract: () => mailContract,
|
48
47
|
mainChatContract: () => mainChatContract,
|
49
48
|
notificationContract: () => notificationContract,
|
50
49
|
permissionContract: () => permissionContract,
|
@@ -1512,8 +1511,7 @@ var SendMessageSchema = import_zod29.default.object({
|
|
1512
1511
|
messageAttachments: MessageAttachmentSchema.optional(),
|
1513
1512
|
user: UserSchema.optional(),
|
1514
1513
|
sticker: StickerSchema.optional(),
|
1515
|
-
file: import_zod29.default.custom().optional()
|
1516
|
-
messengerTags: import_zod29.default.union([import_zod29.default.literal(1), import_zod29.default.literal(2), import_zod29.default.literal(3)])
|
1514
|
+
file: import_zod29.default.custom().optional()
|
1517
1515
|
});
|
1518
1516
|
var SolveRoomSchema = import_zod29.default.object({
|
1519
1517
|
roomId: import_zod29.default.string(),
|
@@ -1581,8 +1579,7 @@ var SendMessageToPlatformSchema = import_zod29.default.object({
|
|
1581
1579
|
address: import_zod29.default.string().nullable(),
|
1582
1580
|
phone: import_zod29.default.string().nullable()
|
1583
1581
|
}).nullable(),
|
1584
|
-
channel: ChannelSchema2
|
1585
|
-
status: import_zod29.default.number()
|
1582
|
+
channel: ChannelSchema2
|
1586
1583
|
}),
|
1587
1584
|
message: import_zod29.default.object({
|
1588
1585
|
message: import_zod29.default.string().optional(),
|
@@ -4090,12 +4087,12 @@ var MailServerSchema = import_zod56.default.object({
|
|
4090
4087
|
deletedAt: import_zod56.default.date().nullable(),
|
4091
4088
|
name: import_zod56.default.string(),
|
4092
4089
|
smtpHost: import_zod56.default.string(),
|
4093
|
-
smtpPort: import_zod56.default.
|
4094
|
-
smtpTlsPort: import_zod56.default.
|
4090
|
+
smtpPort: import_zod56.default.string(),
|
4091
|
+
smtpTlsPort: import_zod56.default.string(),
|
4095
4092
|
useTlsForSmtp: import_zod56.default.boolean(),
|
4096
4093
|
imapHost: import_zod56.default.string(),
|
4097
|
-
imapPort: import_zod56.default.
|
4098
|
-
imapTlsPort: import_zod56.default.
|
4094
|
+
imapPort: import_zod56.default.string(),
|
4095
|
+
imapTlsPort: import_zod56.default.string(),
|
4099
4096
|
useTlsForImap: import_zod56.default.boolean()
|
4100
4097
|
});
|
4101
4098
|
var MailAccountSchema = import_zod56.default.object({
|
@@ -4544,91 +4541,64 @@ var accountContract = (0, import_core19.initContract)().router(
|
|
4544
4541
|
|
4545
4542
|
// src/mail/mail-server-contract.ts
|
4546
4543
|
var import_core20 = require("@ts-rest/core");
|
4547
|
-
var import_zod63 = __toESM(require("zod"));
|
4548
|
-
|
4549
|
-
// src/mail/schemas/servers-validation.schema.ts
|
4550
4544
|
var import_zod62 = __toESM(require("zod"));
|
4551
|
-
var CreateMailServerSchema = import_zod62.default.object({
|
4552
|
-
name: import_zod62.default.string(),
|
4553
|
-
smtpHost: import_zod62.default.string(),
|
4554
|
-
smtpPort: import_zod62.default.number(),
|
4555
|
-
smtpTlsPort: import_zod62.default.number(),
|
4556
|
-
useTlsForSmtp: import_zod62.default.boolean(),
|
4557
|
-
imapHost: import_zod62.default.string(),
|
4558
|
-
imapPort: import_zod62.default.number(),
|
4559
|
-
imapTlsPort: import_zod62.default.number(),
|
4560
|
-
useTlsForImap: import_zod62.default.boolean()
|
4561
|
-
});
|
4562
|
-
|
4563
|
-
// src/mail/mail-server-contract.ts
|
4564
4545
|
var serverContract = (0, import_core20.initContract)().router(
|
4565
4546
|
{
|
4566
4547
|
create: {
|
4567
4548
|
method: "POST",
|
4568
4549
|
path: "/",
|
4569
4550
|
responses: {
|
4570
|
-
|
4571
|
-
|
4551
|
+
200: DefaultSuccessResponseSchema.extend({
|
4552
|
+
message: import_zod62.default.string()
|
4572
4553
|
}),
|
4573
4554
|
...DefaultResponses
|
4574
4555
|
},
|
4575
|
-
body:
|
4556
|
+
body: null,
|
4576
4557
|
summary: "Register a new mail server"
|
4577
4558
|
},
|
4578
|
-
|
4559
|
+
get: {
|
4579
4560
|
method: "GET",
|
4580
4561
|
path: "/:id",
|
4581
|
-
pathParams:
|
4582
|
-
id:
|
4562
|
+
pathParams: import_zod62.default.object({
|
4563
|
+
id: import_zod62.default.string()
|
4583
4564
|
}),
|
4584
4565
|
responses: {
|
4585
4566
|
200: DefaultSuccessResponseSchema.extend({
|
4586
|
-
|
4567
|
+
message: import_zod62.default.string()
|
4587
4568
|
}),
|
4588
4569
|
...DefaultResponses
|
4589
4570
|
},
|
4590
4571
|
summary: "Get a mail server by id"
|
4591
4572
|
},
|
4592
|
-
getAll: {
|
4593
|
-
method: "GET",
|
4594
|
-
path: "/",
|
4595
|
-
responses: {
|
4596
|
-
200: DefaultSuccessResponseSchema.extend({
|
4597
|
-
data: import_zod63.default.array(MailServerSchema)
|
4598
|
-
}),
|
4599
|
-
...DefaultResponses
|
4600
|
-
},
|
4601
|
-
summary: "Get all mail servers"
|
4602
|
-
},
|
4603
4573
|
update: {
|
4604
4574
|
method: "PATCH",
|
4605
4575
|
path: "/:id",
|
4606
|
-
pathParams:
|
4607
|
-
id:
|
4576
|
+
pathParams: import_zod62.default.object({
|
4577
|
+
id: import_zod62.default.string()
|
4608
4578
|
}),
|
4609
4579
|
responses: {
|
4610
4580
|
200: DefaultSuccessResponseSchema.extend({
|
4611
|
-
|
4581
|
+
message: import_zod62.default.string()
|
4612
4582
|
}),
|
4613
4583
|
...DefaultResponses
|
4614
4584
|
},
|
4615
|
-
body:
|
4616
|
-
summary: "Update a mail server"
|
4585
|
+
body: null,
|
4586
|
+
summary: "Update a mail server by id"
|
4617
4587
|
},
|
4618
4588
|
delete: {
|
4619
|
-
method: "
|
4589
|
+
method: "PATCH",
|
4620
4590
|
path: "/:id",
|
4621
|
-
pathParams:
|
4622
|
-
id:
|
4591
|
+
pathParams: import_zod62.default.object({
|
4592
|
+
id: import_zod62.default.string()
|
4623
4593
|
}),
|
4624
4594
|
responses: {
|
4625
4595
|
200: DefaultSuccessResponseSchema.extend({
|
4626
|
-
|
4596
|
+
message: import_zod62.default.string()
|
4627
4597
|
}),
|
4628
4598
|
...DefaultResponses
|
4629
4599
|
},
|
4630
4600
|
body: null,
|
4631
|
-
summary: "Delete a mail server"
|
4601
|
+
summary: "Delete a mail server by id"
|
4632
4602
|
}
|
4633
4603
|
},
|
4634
4604
|
{
|
@@ -4638,44 +4608,44 @@ var serverContract = (0, import_core20.initContract)().router(
|
|
4638
4608
|
|
4639
4609
|
// src/mail/message-contract.ts
|
4640
4610
|
var import_core21 = require("@ts-rest/core");
|
4641
|
-
var
|
4611
|
+
var import_zod64 = __toESM(require("zod"));
|
4642
4612
|
|
4643
4613
|
// src/mail/schemas/message-validation.schema.ts
|
4644
|
-
var
|
4645
|
-
var MailParticipant =
|
4646
|
-
name:
|
4647
|
-
address:
|
4614
|
+
var import_zod63 = __toESM(require("zod"));
|
4615
|
+
var MailParticipant = import_zod63.default.object({
|
4616
|
+
name: import_zod63.default.string().optional(),
|
4617
|
+
address: import_zod63.default.string().email()
|
4648
4618
|
});
|
4649
4619
|
var MessageContractsValidationsSchema = {
|
4650
4620
|
submit: {
|
4651
|
-
input:
|
4652
|
-
subject:
|
4653
|
-
text:
|
4654
|
-
html:
|
4621
|
+
input: import_zod63.default.object({
|
4622
|
+
subject: import_zod63.default.string(),
|
4623
|
+
text: import_zod63.default.string(),
|
4624
|
+
html: import_zod63.default.string(),
|
4655
4625
|
from: MailParticipant,
|
4656
|
-
to:
|
4657
|
-
cc:
|
4658
|
-
bcc:
|
4659
|
-
reference:
|
4660
|
-
messageId:
|
4661
|
-
action:
|
4626
|
+
to: import_zod63.default.array(MailParticipant),
|
4627
|
+
cc: import_zod63.default.array(MailParticipant).optional(),
|
4628
|
+
bcc: import_zod63.default.array(MailParticipant).optional(),
|
4629
|
+
reference: import_zod63.default.object({
|
4630
|
+
messageId: import_zod63.default.string(),
|
4631
|
+
action: import_zod63.default.union([import_zod63.default.literal("reply"), import_zod63.default.literal("forward")])
|
4662
4632
|
}).optional(),
|
4663
|
-
attachments:
|
4664
|
-
|
4665
|
-
fileType:
|
4666
|
-
fileName:
|
4667
|
-
fileKey:
|
4668
|
-
fileSize:
|
4669
|
-
bucketName:
|
4670
|
-
presignedUrl:
|
4633
|
+
attachments: import_zod63.default.array(
|
4634
|
+
import_zod63.default.object({
|
4635
|
+
fileType: import_zod63.default.string(),
|
4636
|
+
fileName: import_zod63.default.string(),
|
4637
|
+
fileKey: import_zod63.default.string(),
|
4638
|
+
fileSize: import_zod63.default.number(),
|
4639
|
+
bucketName: import_zod63.default.string(),
|
4640
|
+
presignedUrl: import_zod63.default.string()
|
4671
4641
|
})
|
4672
4642
|
).optional()
|
4673
4643
|
}),
|
4674
|
-
output:
|
4675
|
-
response:
|
4676
|
-
messageId:
|
4677
|
-
sendAt:
|
4678
|
-
queueId:
|
4644
|
+
output: import_zod63.default.object({
|
4645
|
+
response: import_zod63.default.string(),
|
4646
|
+
messageId: import_zod63.default.string(),
|
4647
|
+
sendAt: import_zod63.default.string(),
|
4648
|
+
queueId: import_zod63.default.string()
|
4679
4649
|
})
|
4680
4650
|
}
|
4681
4651
|
};
|
@@ -4700,8 +4670,8 @@ var messageContract = (0, import_core21.initContract)().router(
|
|
4700
4670
|
getById: {
|
4701
4671
|
method: "GET",
|
4702
4672
|
path: "/:id",
|
4703
|
-
pathParams:
|
4704
|
-
id:
|
4673
|
+
pathParams: import_zod64.default.object({
|
4674
|
+
id: import_zod64.default.string()
|
4705
4675
|
}),
|
4706
4676
|
responses: {
|
4707
4677
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -4728,7 +4698,7 @@ var mailContract = (0, import_core22.initContract)().router({
|
|
4728
4698
|
|
4729
4699
|
// src/messenger/index.ts
|
4730
4700
|
var import_core23 = require("@ts-rest/core");
|
4731
|
-
var
|
4701
|
+
var import_zod65 = __toESM(require("zod"));
|
4732
4702
|
var messengerContract = (0, import_core23.initContract)().router({
|
4733
4703
|
sendMessage: {
|
4734
4704
|
method: "POST",
|
@@ -4762,8 +4732,8 @@ var messengerContract = (0, import_core23.initContract)().router({
|
|
4762
4732
|
reconnect: {
|
4763
4733
|
method: "POST",
|
4764
4734
|
path: "/reconnect/:channelId",
|
4765
|
-
pathParams:
|
4766
|
-
channelId:
|
4735
|
+
pathParams: import_zod65.default.object({
|
4736
|
+
channelId: import_zod65.default.string().uuid()
|
4767
4737
|
}),
|
4768
4738
|
body: null,
|
4769
4739
|
responses: {
|
@@ -4775,8 +4745,8 @@ var messengerContract = (0, import_core23.initContract)().router({
|
|
4775
4745
|
delete: {
|
4776
4746
|
method: "DELETE",
|
4777
4747
|
path: "/delete/:channelId",
|
4778
|
-
pathParams:
|
4779
|
-
channelId:
|
4748
|
+
pathParams: import_zod65.default.object({
|
4749
|
+
channelId: import_zod65.default.string().uuid()
|
4780
4750
|
}),
|
4781
4751
|
body: null,
|
4782
4752
|
responses: {
|
@@ -4808,7 +4778,7 @@ var messengerContract = (0, import_core23.initContract)().router({
|
|
4808
4778
|
|
4809
4779
|
// src/permission/index.ts
|
4810
4780
|
var import_core24 = require("@ts-rest/core");
|
4811
|
-
var
|
4781
|
+
var import_zod66 = __toESM(require("zod"));
|
4812
4782
|
var permissionContract = (0, import_core24.initContract)().router(
|
4813
4783
|
{
|
4814
4784
|
getPermissions: {
|
@@ -4816,9 +4786,9 @@ var permissionContract = (0, import_core24.initContract)().router(
|
|
4816
4786
|
path: "",
|
4817
4787
|
headers: DefaultHeaderSchema,
|
4818
4788
|
responses: {
|
4819
|
-
200:
|
4820
|
-
400:
|
4821
|
-
message:
|
4789
|
+
200: import_zod66.default.object({ permissions: PermissionSchema.array() }),
|
4790
|
+
400: import_zod66.default.object({
|
4791
|
+
message: import_zod66.default.string()
|
4822
4792
|
}),
|
4823
4793
|
401: DefaultUnauthorizedSchema,
|
4824
4794
|
500: DefaultErrorResponseSchema
|
@@ -4831,15 +4801,15 @@ var permissionContract = (0, import_core24.initContract)().router(
|
|
4831
4801
|
|
4832
4802
|
// src/role/index.ts
|
4833
4803
|
var import_core25 = require("@ts-rest/core");
|
4834
|
-
var
|
4804
|
+
var import_zod68 = __toESM(require("zod"));
|
4835
4805
|
|
4836
4806
|
// src/role/validation.ts
|
4837
|
-
var
|
4838
|
-
var CreateRoleSchema =
|
4839
|
-
systemName:
|
4840
|
-
displayName:
|
4841
|
-
description:
|
4842
|
-
permissions:
|
4807
|
+
var import_zod67 = require("zod");
|
4808
|
+
var CreateRoleSchema = import_zod67.z.object({
|
4809
|
+
systemName: import_zod67.z.string(),
|
4810
|
+
displayName: import_zod67.z.string(),
|
4811
|
+
description: import_zod67.z.string().nullable(),
|
4812
|
+
permissions: import_zod67.z.array(import_zod67.z.string())
|
4843
4813
|
});
|
4844
4814
|
var UpdateRoleSchema = CreateRoleSchema;
|
4845
4815
|
|
@@ -4855,8 +4825,8 @@ var roleContract = (0, import_core25.initContract)().router(
|
|
4855
4825
|
201: DefaultSuccessResponseSchema.extend({
|
4856
4826
|
role: RoleSchema
|
4857
4827
|
}),
|
4858
|
-
400:
|
4859
|
-
message:
|
4828
|
+
400: import_zod68.default.object({
|
4829
|
+
message: import_zod68.default.string()
|
4860
4830
|
}),
|
4861
4831
|
401: DefaultUnauthorizedSchema,
|
4862
4832
|
500: DefaultErrorResponseSchema
|
@@ -4866,15 +4836,15 @@ var roleContract = (0, import_core25.initContract)().router(
|
|
4866
4836
|
getRoles: {
|
4867
4837
|
method: "GET",
|
4868
4838
|
path: "",
|
4869
|
-
query:
|
4870
|
-
page:
|
4871
|
-
pageSize:
|
4839
|
+
query: import_zod68.default.object({
|
4840
|
+
page: import_zod68.default.coerce.number().default(1),
|
4841
|
+
pageSize: import_zod68.default.coerce.number().default(10)
|
4872
4842
|
}).optional(),
|
4873
4843
|
headers: DefaultHeaderSchema,
|
4874
4844
|
responses: {
|
4875
4845
|
200: WithPagination(RoleSchema),
|
4876
|
-
400:
|
4877
|
-
message:
|
4846
|
+
400: import_zod68.default.object({
|
4847
|
+
message: import_zod68.default.string()
|
4878
4848
|
}),
|
4879
4849
|
401: DefaultUnauthorizedSchema,
|
4880
4850
|
500: DefaultErrorResponseSchema
|
@@ -4884,15 +4854,15 @@ var roleContract = (0, import_core25.initContract)().router(
|
|
4884
4854
|
updateRole: {
|
4885
4855
|
method: "PATCH",
|
4886
4856
|
path: "/:id",
|
4887
|
-
pathParams:
|
4857
|
+
pathParams: import_zod68.default.object({ id: import_zod68.default.string() }),
|
4888
4858
|
headers: DefaultHeaderSchema,
|
4889
4859
|
body: UpdateRoleSchema,
|
4890
4860
|
responses: {
|
4891
4861
|
201: DefaultSuccessResponseSchema.extend({
|
4892
4862
|
role: RoleSchema
|
4893
4863
|
}),
|
4894
|
-
400:
|
4895
|
-
message:
|
4864
|
+
400: import_zod68.default.object({
|
4865
|
+
message: import_zod68.default.string()
|
4896
4866
|
}),
|
4897
4867
|
401: DefaultUnauthorizedSchema,
|
4898
4868
|
500: DefaultErrorResponseSchema
|
@@ -4902,11 +4872,11 @@ var roleContract = (0, import_core25.initContract)().router(
|
|
4902
4872
|
deleteRole: {
|
4903
4873
|
method: "DELETE",
|
4904
4874
|
path: "/:id",
|
4905
|
-
pathParams:
|
4875
|
+
pathParams: import_zod68.default.object({ id: import_zod68.default.string() }),
|
4906
4876
|
headers: DefaultHeaderSchema,
|
4907
4877
|
body: null,
|
4908
4878
|
responses: {
|
4909
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
4879
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod68.default.string() }),
|
4910
4880
|
500: DefaultErrorResponseSchema
|
4911
4881
|
},
|
4912
4882
|
summary: "Delete a role."
|
@@ -4917,19 +4887,19 @@ var roleContract = (0, import_core25.initContract)().router(
|
|
4917
4887
|
|
4918
4888
|
// src/tag/index.ts
|
4919
4889
|
var import_core26 = require("@ts-rest/core");
|
4920
|
-
var
|
4890
|
+
var import_zod70 = __toESM(require("zod"));
|
4921
4891
|
|
4922
4892
|
// src/tag/validation.ts
|
4923
|
-
var
|
4924
|
-
var CreateTagSchema =
|
4925
|
-
name:
|
4893
|
+
var import_zod69 = require("zod");
|
4894
|
+
var CreateTagSchema = import_zod69.z.object({
|
4895
|
+
name: import_zod69.z.string(),
|
4926
4896
|
group: TagGroupSchema
|
4927
4897
|
});
|
4928
|
-
var GetTagsSchema =
|
4898
|
+
var GetTagsSchema = import_zod69.z.object({
|
4929
4899
|
group: TagGroupSchema.default("general"),
|
4930
|
-
keyword:
|
4900
|
+
keyword: import_zod69.z.string()
|
4931
4901
|
}).partial().optional();
|
4932
|
-
var UpdateTagSchema =
|
4902
|
+
var UpdateTagSchema = import_zod69.z.object({ name: import_zod69.z.string() });
|
4933
4903
|
|
4934
4904
|
// src/tag/index.ts
|
4935
4905
|
var tagContract = (0, import_core26.initContract)().router(
|
@@ -4952,7 +4922,7 @@ var tagContract = (0, import_core26.initContract)().router(
|
|
4952
4922
|
query: GetTagsSchema,
|
4953
4923
|
responses: {
|
4954
4924
|
200: DefaultSuccessResponseSchema.extend({
|
4955
|
-
tags:
|
4925
|
+
tags: import_zod70.default.array(TagSchema)
|
4956
4926
|
}),
|
4957
4927
|
500: DefaultErrorResponseSchema
|
4958
4928
|
},
|
@@ -4961,7 +4931,7 @@ var tagContract = (0, import_core26.initContract)().router(
|
|
4961
4931
|
updateTag: {
|
4962
4932
|
method: "PATCH",
|
4963
4933
|
path: "/:id",
|
4964
|
-
pathParams:
|
4934
|
+
pathParams: import_zod70.default.object({ id: import_zod70.default.string() }),
|
4965
4935
|
body: UpdateTagSchema,
|
4966
4936
|
responses: {
|
4967
4937
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -4974,11 +4944,11 @@ var tagContract = (0, import_core26.initContract)().router(
|
|
4974
4944
|
deleteTag: {
|
4975
4945
|
method: "DELETE",
|
4976
4946
|
path: "/:id",
|
4977
|
-
pathParams:
|
4978
|
-
body:
|
4947
|
+
pathParams: import_zod70.default.object({ id: import_zod70.default.string() }),
|
4948
|
+
body: import_zod70.default.any().optional(),
|
4979
4949
|
// We don't need the body.
|
4980
4950
|
responses: {
|
4981
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
4951
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod70.default.string() }),
|
4982
4952
|
500: DefaultErrorResponseSchema
|
4983
4953
|
},
|
4984
4954
|
headers: DefaultHeaderSchema
|
@@ -4991,27 +4961,27 @@ var tagContract = (0, import_core26.initContract)().router(
|
|
4991
4961
|
|
4992
4962
|
// src/telephony-agent-presence-status/index.ts
|
4993
4963
|
var import_core27 = require("@ts-rest/core");
|
4994
|
-
var
|
4964
|
+
var import_zod73 = __toESM(require("zod"));
|
4995
4965
|
|
4996
4966
|
// src/telephony-agent-presence-status/schema.ts
|
4997
|
-
var
|
4967
|
+
var import_zod71 = __toESM(require("zod"));
|
4998
4968
|
var PresenceStatusSchema = DefaultEntitySchema.extend({
|
4999
|
-
status:
|
5000
|
-
description:
|
4969
|
+
status: import_zod71.default.string(),
|
4970
|
+
description: import_zod71.default.string()
|
5001
4971
|
});
|
5002
4972
|
var UserPresenceStatusSchema = DefaultEntitySchema.extend({
|
5003
4973
|
user: UserSchema,
|
5004
4974
|
presenceStatus: PresenceStatusSchema,
|
5005
|
-
customPresenceStatus:
|
4975
|
+
customPresenceStatus: import_zod71.default.string().nullable().optional()
|
5006
4976
|
});
|
5007
4977
|
|
5008
4978
|
// src/telephony-agent-presence-status/validation.ts
|
5009
|
-
var
|
5010
|
-
var UpdateUserStatusSchema =
|
5011
|
-
userId:
|
5012
|
-
presenceStatusId:
|
5013
|
-
customPreseneStatus:
|
5014
|
-
reason:
|
4979
|
+
var import_zod72 = require("zod");
|
4980
|
+
var UpdateUserStatusSchema = import_zod72.z.object({
|
4981
|
+
userId: import_zod72.z.string(),
|
4982
|
+
presenceStatusId: import_zod72.z.string().nullable().optional(),
|
4983
|
+
customPreseneStatus: import_zod72.z.string().nullable().optional(),
|
4984
|
+
reason: import_zod72.z.string()
|
5015
4985
|
});
|
5016
4986
|
|
5017
4987
|
// src/telephony-agent-presence-status/index.ts
|
@@ -5022,9 +4992,9 @@ var telephonyAgentPresenceStatusContract = (0, import_core27.initContract)().rou
|
|
5022
4992
|
path: "/presence_status",
|
5023
4993
|
headers: DefaultHeaderSchema,
|
5024
4994
|
responses: {
|
5025
|
-
200:
|
5026
|
-
400:
|
5027
|
-
message:
|
4995
|
+
200: import_zod73.default.array(PresenceStatusSchema),
|
4996
|
+
400: import_zod73.default.object({
|
4997
|
+
message: import_zod73.default.string()
|
5028
4998
|
}),
|
5029
4999
|
401: DefaultUnauthorizedSchema,
|
5030
5000
|
500: DefaultErrorResponseSchema
|
@@ -5036,9 +5006,9 @@ var telephonyAgentPresenceStatusContract = (0, import_core27.initContract)().rou
|
|
5036
5006
|
path: "/agents/presence_status",
|
5037
5007
|
headers: DefaultHeaderSchema,
|
5038
5008
|
responses: {
|
5039
|
-
200:
|
5040
|
-
400:
|
5041
|
-
message:
|
5009
|
+
200: import_zod73.default.array(UserPresenceStatusSchema),
|
5010
|
+
400: import_zod73.default.object({
|
5011
|
+
message: import_zod73.default.string()
|
5042
5012
|
}),
|
5043
5013
|
401: DefaultUnauthorizedSchema,
|
5044
5014
|
500: DefaultErrorResponseSchema
|
@@ -5048,12 +5018,12 @@ var telephonyAgentPresenceStatusContract = (0, import_core27.initContract)().rou
|
|
5048
5018
|
getAgentStatus: {
|
5049
5019
|
method: "GET",
|
5050
5020
|
path: "/presence_status/check_update/:userId",
|
5051
|
-
pathParams:
|
5021
|
+
pathParams: import_zod73.default.object({ userId: import_zod73.default.string() }),
|
5052
5022
|
headers: DefaultHeaderSchema,
|
5053
5023
|
responses: {
|
5054
5024
|
200: UserPresenceStatusSchema,
|
5055
|
-
400:
|
5056
|
-
message:
|
5025
|
+
400: import_zod73.default.object({
|
5026
|
+
message: import_zod73.default.string()
|
5057
5027
|
}),
|
5058
5028
|
401: DefaultUnauthorizedSchema,
|
5059
5029
|
500: DefaultErrorResponseSchema
|
@@ -5069,8 +5039,8 @@ var telephonyAgentPresenceStatusContract = (0, import_core27.initContract)().rou
|
|
5069
5039
|
200: DefaultSuccessResponseSchema.extend({
|
5070
5040
|
userPresenceStatu: UserPresenceStatusSchema
|
5071
5041
|
}),
|
5072
|
-
400:
|
5073
|
-
message:
|
5042
|
+
400: import_zod73.default.object({
|
5043
|
+
message: import_zod73.default.string()
|
5074
5044
|
}),
|
5075
5045
|
401: DefaultUnauthorizedSchema,
|
5076
5046
|
500: DefaultErrorResponseSchema
|
@@ -5082,62 +5052,62 @@ var telephonyAgentPresenceStatusContract = (0, import_core27.initContract)().rou
|
|
5082
5052
|
);
|
5083
5053
|
|
5084
5054
|
// src/telephony-cdr/index.ts
|
5085
|
-
var
|
5055
|
+
var import_zod76 = __toESM(require("zod"));
|
5086
5056
|
|
5087
5057
|
// src/telephony-cdr/validation.ts
|
5088
|
-
var
|
5089
|
-
var CreateTelephonyCdrSchema =
|
5090
|
-
uniqueCallId:
|
5091
|
-
timeStart:
|
5092
|
-
callFrom:
|
5093
|
-
callTo:
|
5094
|
-
callDuration:
|
5095
|
-
talkDuration:
|
5096
|
-
srcTrunkName:
|
5097
|
-
dstTrunkName:
|
5098
|
-
pinCode:
|
5099
|
-
status:
|
5100
|
-
type:
|
5101
|
-
recording:
|
5102
|
-
didNumber:
|
5103
|
-
agentRingTime:
|
5058
|
+
var import_zod74 = __toESM(require("zod"));
|
5059
|
+
var CreateTelephonyCdrSchema = import_zod74.default.object({
|
5060
|
+
uniqueCallId: import_zod74.default.string({ required_error: "uniqueCallId is required" }),
|
5061
|
+
timeStart: import_zod74.default.string({ required_error: "timeStart is required" }),
|
5062
|
+
callFrom: import_zod74.default.string({ required_error: "callFrom is required" }),
|
5063
|
+
callTo: import_zod74.default.string({ required_error: "callTo is required" }),
|
5064
|
+
callDuration: import_zod74.default.number().nullable(),
|
5065
|
+
talkDuration: import_zod74.default.number().nullable(),
|
5066
|
+
srcTrunkName: import_zod74.default.string().nullable(),
|
5067
|
+
dstTrunkName: import_zod74.default.string().nullable(),
|
5068
|
+
pinCode: import_zod74.default.string().nullable(),
|
5069
|
+
status: import_zod74.default.string(),
|
5070
|
+
type: import_zod74.default.string(),
|
5071
|
+
recording: import_zod74.default.string().nullable(),
|
5072
|
+
didNumber: import_zod74.default.string().nullable(),
|
5073
|
+
agentRingTime: import_zod74.default.number().nullable()
|
5104
5074
|
});
|
5105
5075
|
var GetAllTelephonyCdrSchema = DefaultQueryParamsSchema.extend({
|
5106
|
-
selectedDate:
|
5107
|
-
type:
|
5108
|
-
status:
|
5109
|
-
callFrom:
|
5110
|
-
callTo:
|
5111
|
-
trunk:
|
5112
|
-
userId:
|
5113
|
-
queueStatus:
|
5114
|
-
agentIds:
|
5115
|
-
agentCallsOnly:
|
5076
|
+
selectedDate: import_zod74.default.string().optional(),
|
5077
|
+
type: import_zod74.default.array(import_zod74.default.string()).optional(),
|
5078
|
+
status: import_zod74.default.array(import_zod74.default.string()).optional(),
|
5079
|
+
callFrom: import_zod74.default.string().optional(),
|
5080
|
+
callTo: import_zod74.default.string().optional(),
|
5081
|
+
trunk: import_zod74.default.array(import_zod74.default.string()).optional(),
|
5082
|
+
userId: import_zod74.default.string().uuid().optional(),
|
5083
|
+
queueStatus: import_zod74.default.string().optional(),
|
5084
|
+
agentIds: import_zod74.default.array(import_zod74.default.string().uuid()).optional(),
|
5085
|
+
agentCallsOnly: import_zod74.default.coerce.boolean().optional()
|
5116
5086
|
});
|
5117
5087
|
var GetRecentTelephonyCdrSchema = DefaultQueryParamsSchema.extend({
|
5118
|
-
type:
|
5119
|
-
status:
|
5120
|
-
callFrom:
|
5121
|
-
callTo:
|
5122
|
-
result:
|
5123
|
-
callTags:
|
5124
|
-
selectedDate:
|
5125
|
-
agentId:
|
5126
|
-
contact:
|
5127
|
-
callStatus:
|
5128
|
-
queueIds:
|
5129
|
-
notes:
|
5088
|
+
type: import_zod74.default.array(import_zod74.default.string()).optional(),
|
5089
|
+
status: import_zod74.default.array(import_zod74.default.string()).optional(),
|
5090
|
+
callFrom: import_zod74.default.string().optional(),
|
5091
|
+
callTo: import_zod74.default.string().optional(),
|
5092
|
+
result: import_zod74.default.array(import_zod74.default.string()).optional(),
|
5093
|
+
callTags: import_zod74.default.array(import_zod74.default.string()).optional(),
|
5094
|
+
selectedDate: import_zod74.default.string().optional(),
|
5095
|
+
agentId: import_zod74.default.string().optional(),
|
5096
|
+
contact: import_zod74.default.array(import_zod74.default.string()).optional(),
|
5097
|
+
callStatus: import_zod74.default.array(import_zod74.default.enum(["incoming", "outgoing", "missed", "no_answered"])).optional(),
|
5098
|
+
queueIds: import_zod74.default.array(import_zod74.default.string()).optional(),
|
5099
|
+
notes: import_zod74.default.string().optional()
|
5130
5100
|
});
|
5131
5101
|
var GetExportTelephonyCdrSchema = GetAllTelephonyCdrSchema.merge(
|
5132
|
-
|
5133
|
-
page:
|
5134
|
-
pageSize:
|
5102
|
+
import_zod74.default.object({
|
5103
|
+
page: import_zod74.default.coerce.number().positive().optional(),
|
5104
|
+
pageSize: import_zod74.default.coerce.number().positive().optional()
|
5135
5105
|
})
|
5136
5106
|
);
|
5137
5107
|
var NullEmptyStringUndefined = ["", null, void 0];
|
5138
5108
|
var EmtptyArrayUndefined = [[], void 0];
|
5139
5109
|
var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
|
5140
|
-
reportType:
|
5110
|
+
reportType: import_zod74.default.enum([
|
5141
5111
|
"extcallstatistics",
|
5142
5112
|
"extcallactivity",
|
5143
5113
|
"trunkactivity",
|
@@ -5147,52 +5117,52 @@ var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
|
|
5147
5117
|
"queueagentmisscalls",
|
5148
5118
|
"queueagentinoutcalls"
|
5149
5119
|
]),
|
5150
|
-
selectedDate:
|
5151
|
-
communicationType:
|
5152
|
-
time:
|
5153
|
-
queueList:
|
5154
|
-
queueId:
|
5155
|
-
trunkList:
|
5156
|
-
extensionList:
|
5120
|
+
selectedDate: import_zod74.default.string().optional(),
|
5121
|
+
communicationType: import_zod74.default.union([import_zod74.default.literal("Inbound"), import_zod74.default.literal("Outbound"), import_zod74.default.literal("Internal")]).optional(),
|
5122
|
+
time: import_zod74.default.string().optional(),
|
5123
|
+
queueList: import_zod74.default.array(import_zod74.default.string()).optional(),
|
5124
|
+
queueId: import_zod74.default.string().optional(),
|
5125
|
+
trunkList: import_zod74.default.array(import_zod74.default.string()).optional(),
|
5126
|
+
extensionList: import_zod74.default.array(import_zod74.default.string()).optional()
|
5157
5127
|
}).superRefine((input, ctx) => {
|
5158
5128
|
if ((input.reportType === "extcallstatistics" || input.reportType === "queuesatisfaction" || input.reportType === "queueperformance" || input.reportType === "queueagentmisscalls") && NullEmptyStringUndefined.includes(input.selectedDate)) {
|
5159
5129
|
ctx.addIssue({
|
5160
|
-
code:
|
5130
|
+
code: import_zod74.default.ZodIssueCode.custom,
|
5161
5131
|
path: ["selectedDate"],
|
5162
5132
|
message: "selectedDate is required."
|
5163
5133
|
});
|
5164
5134
|
}
|
5165
5135
|
if ((input.reportType === "extcallactivity" || input.reportType === "queueavgwaittalktime" || input.reportType === "trunkactivity") && NullEmptyStringUndefined.includes(input.time)) {
|
5166
5136
|
ctx.addIssue({
|
5167
|
-
code:
|
5137
|
+
code: import_zod74.default.ZodIssueCode.custom,
|
5168
5138
|
path: ["time"],
|
5169
5139
|
message: "time is required."
|
5170
5140
|
});
|
5171
5141
|
}
|
5172
5142
|
if ((input.reportType === "queueavgwaittalktime" || input.reportType === "queueperformance") && EmtptyArrayUndefined.includes(input.queueList)) {
|
5173
5143
|
ctx.addIssue({
|
5174
|
-
code:
|
5144
|
+
code: import_zod74.default.ZodIssueCode.custom,
|
5175
5145
|
path: ["queueList"],
|
5176
5146
|
message: "queueList is required."
|
5177
5147
|
});
|
5178
5148
|
}
|
5179
5149
|
if ((input.reportType === "queuesatisfaction" || input.reportType === "queueagentmisscalls") && NullEmptyStringUndefined.includes(input.queueId)) {
|
5180
5150
|
ctx.addIssue({
|
5181
|
-
code:
|
5151
|
+
code: import_zod74.default.ZodIssueCode.custom,
|
5182
5152
|
path: ["queueId"],
|
5183
5153
|
message: "queueId is required."
|
5184
5154
|
});
|
5185
5155
|
}
|
5186
5156
|
if (input.reportType === "trunkactivity" && EmtptyArrayUndefined.includes(input.trunkList)) {
|
5187
5157
|
ctx.addIssue({
|
5188
|
-
code:
|
5158
|
+
code: import_zod74.default.ZodIssueCode.custom,
|
5189
5159
|
path: ["trunkList"],
|
5190
5160
|
message: "trunkList is required."
|
5191
5161
|
});
|
5192
5162
|
}
|
5193
5163
|
if ((input.reportType === "extcallstatistics" || input.reportType === "extcallactivity") && EmtptyArrayUndefined.includes(input.extensionList)) {
|
5194
5164
|
ctx.addIssue({
|
5195
|
-
code:
|
5165
|
+
code: import_zod74.default.ZodIssueCode.custom,
|
5196
5166
|
path: ["extensionList"],
|
5197
5167
|
message: "extensionList is required."
|
5198
5168
|
});
|
@@ -5203,161 +5173,161 @@ var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
|
|
5203
5173
|
var import_core28 = require("@ts-rest/core");
|
5204
5174
|
|
5205
5175
|
// src/telephony-cdr/call-report.schema.ts
|
5206
|
-
var
|
5207
|
-
var ExtCallStatisticsListSchema =
|
5176
|
+
var import_zod75 = __toESM(require("zod"));
|
5177
|
+
var ExtCallStatisticsListSchema = import_zod75.default.object({
|
5208
5178
|
/** @example "ext_num" */
|
5209
|
-
ext_num:
|
5179
|
+
ext_num: import_zod75.default.string(),
|
5210
5180
|
/** @example "ext_name" */
|
5211
|
-
ext_name:
|
5181
|
+
ext_name: import_zod75.default.string(),
|
5212
5182
|
/** @example 0 */
|
5213
|
-
answered_calls:
|
5183
|
+
answered_calls: import_zod75.default.number(),
|
5214
5184
|
/** @example 0 */
|
5215
|
-
no_answer_calls:
|
5185
|
+
no_answer_calls: import_zod75.default.number(),
|
5216
5186
|
/** @example 0 */
|
5217
|
-
busy_calls:
|
5187
|
+
busy_calls: import_zod75.default.number(),
|
5218
5188
|
/** @example 0 */
|
5219
|
-
failed_calls:
|
5189
|
+
failed_calls: import_zod75.default.number(),
|
5220
5190
|
/** @example 0 */
|
5221
|
-
voicemail_calls:
|
5191
|
+
voicemail_calls: import_zod75.default.number(),
|
5222
5192
|
/** @example 0 */
|
5223
|
-
total_holding_time:
|
5193
|
+
total_holding_time: import_zod75.default.number(),
|
5224
5194
|
/** @example 0 */
|
5225
|
-
total_talking_time:
|
5195
|
+
total_talking_time: import_zod75.default.number(),
|
5226
5196
|
/** @example "src_name" */
|
5227
|
-
src_name:
|
5197
|
+
src_name: import_zod75.default.string(),
|
5228
5198
|
/** @example 0 */
|
5229
|
-
total_call_count:
|
5199
|
+
total_call_count: import_zod75.default.number(),
|
5230
5200
|
/** @example "mobile" */
|
5231
|
-
mobile:
|
5232
|
-
});
|
5233
|
-
var ExtStatisticSchema =
|
5234
|
-
ext_num:
|
5235
|
-
ext_name:
|
5236
|
-
answered_calls:
|
5237
|
-
no_answer_calls:
|
5238
|
-
busy_calls:
|
5239
|
-
failed_calls:
|
5240
|
-
voicemail_calls:
|
5241
|
-
total_holding_time:
|
5242
|
-
total_talking_time:
|
5243
|
-
time:
|
5244
|
-
mobile:
|
5245
|
-
});
|
5246
|
-
var ExtCallActivityListSchema =
|
5247
|
-
time:
|
5248
|
-
answered_calls:
|
5249
|
-
no_answer_calls:
|
5250
|
-
busy_calls:
|
5251
|
-
failed_calls:
|
5252
|
-
voicemail_calls:
|
5253
|
-
total_holding_time:
|
5254
|
-
total_talking_time:
|
5255
|
-
ext_statistics:
|
5256
|
-
});
|
5257
|
-
var TrunkList =
|
5258
|
-
trunk_name:
|
5259
|
-
total_calls:
|
5260
|
-
});
|
5261
|
-
var TrunkActivityListSchema =
|
5262
|
-
time:
|
5263
|
-
trunk_list:
|
5264
|
-
});
|
5265
|
-
var QueueAvgWaitTalkTimeListSchema =
|
5266
|
-
time:
|
5267
|
-
avg_wait_time:
|
5268
|
-
avg_talk_time:
|
5269
|
-
});
|
5270
|
-
var SatisfactionListSchema =
|
5271
|
-
press_key:
|
5272
|
-
total:
|
5273
|
-
key_point:
|
5274
|
-
});
|
5275
|
-
var agentListSchema =
|
5276
|
-
agent_name:
|
5277
|
-
agent_num:
|
5278
|
-
satisfaction_list:
|
5279
|
-
total_key:
|
5280
|
-
total_point:
|
5281
|
-
average_point:
|
5282
|
-
});
|
5283
|
-
var QueueSatisfactionSchema =
|
5284
|
-
queue_name:
|
5285
|
-
queue_num:
|
5286
|
-
satisfaction_list:
|
5287
|
-
agent_list:
|
5288
|
-
total_key:
|
5289
|
-
total_point:
|
5290
|
-
average_point:
|
5291
|
-
});
|
5292
|
-
var QueuePerformanceListSchema =
|
5293
|
-
queue:
|
5294
|
-
total_calls:
|
5295
|
-
answered_calls:
|
5296
|
-
missed_calls:
|
5297
|
-
abandoned_calls:
|
5298
|
-
average_waiting_time:
|
5299
|
-
average_talking_time:
|
5300
|
-
max_waiting_time:
|
5301
|
-
answered_rate:
|
5302
|
-
missed_rate:
|
5303
|
-
abandoned_rate:
|
5304
|
-
sla:
|
5305
|
-
});
|
5306
|
-
var QueueAgentMissCallsListSchema =
|
5307
|
-
agent_name:
|
5308
|
-
agent_num:
|
5309
|
-
time:
|
5310
|
-
total_wait_time:
|
5311
|
-
src_name:
|
5312
|
-
src_num:
|
5313
|
-
queue_status:
|
5314
|
-
polling_attempts:
|
5315
|
-
missed_reason:
|
5316
|
-
});
|
5317
|
-
var QueueAgentInOutCallsListSchema =
|
5318
|
-
agent_name:
|
5319
|
-
agent_num:
|
5320
|
-
inbound_calls:
|
5321
|
-
inbound_duration:
|
5322
|
-
outbound_calls:
|
5323
|
-
outbound_duration:
|
5324
|
-
total_calls:
|
5325
|
-
total_duration:
|
5326
|
-
average_talk_duration:
|
5327
|
-
});
|
5328
|
-
var CallReportModel =
|
5329
|
-
errcode:
|
5330
|
-
errmsg:
|
5331
|
-
total_number:
|
5332
|
-
is_12hour:
|
5333
|
-
ext_call_statistics_list:
|
5334
|
-
ext_call_activity_list:
|
5335
|
-
trunk_activity_list:
|
5336
|
-
queue_avg_wait_talk_time_list:
|
5201
|
+
mobile: import_zod75.default.string()
|
5202
|
+
});
|
5203
|
+
var ExtStatisticSchema = import_zod75.default.object({
|
5204
|
+
ext_num: import_zod75.default.string(),
|
5205
|
+
ext_name: import_zod75.default.string(),
|
5206
|
+
answered_calls: import_zod75.default.number(),
|
5207
|
+
no_answer_calls: import_zod75.default.number(),
|
5208
|
+
busy_calls: import_zod75.default.number(),
|
5209
|
+
failed_calls: import_zod75.default.number(),
|
5210
|
+
voicemail_calls: import_zod75.default.number(),
|
5211
|
+
total_holding_time: import_zod75.default.number(),
|
5212
|
+
total_talking_time: import_zod75.default.number(),
|
5213
|
+
time: import_zod75.default.number(),
|
5214
|
+
mobile: import_zod75.default.string()
|
5215
|
+
});
|
5216
|
+
var ExtCallActivityListSchema = import_zod75.default.object({
|
5217
|
+
time: import_zod75.default.number(),
|
5218
|
+
answered_calls: import_zod75.default.number(),
|
5219
|
+
no_answer_calls: import_zod75.default.number(),
|
5220
|
+
busy_calls: import_zod75.default.number(),
|
5221
|
+
failed_calls: import_zod75.default.number(),
|
5222
|
+
voicemail_calls: import_zod75.default.number(),
|
5223
|
+
total_holding_time: import_zod75.default.number(),
|
5224
|
+
total_talking_time: import_zod75.default.number(),
|
5225
|
+
ext_statistics: import_zod75.default.array(ExtStatisticSchema)
|
5226
|
+
});
|
5227
|
+
var TrunkList = import_zod75.default.object({
|
5228
|
+
trunk_name: import_zod75.default.string(),
|
5229
|
+
total_calls: import_zod75.default.number()
|
5230
|
+
});
|
5231
|
+
var TrunkActivityListSchema = import_zod75.default.object({
|
5232
|
+
time: import_zod75.default.number(),
|
5233
|
+
trunk_list: import_zod75.default.array(TrunkList)
|
5234
|
+
});
|
5235
|
+
var QueueAvgWaitTalkTimeListSchema = import_zod75.default.object({
|
5236
|
+
time: import_zod75.default.number(),
|
5237
|
+
avg_wait_time: import_zod75.default.number(),
|
5238
|
+
avg_talk_time: import_zod75.default.number()
|
5239
|
+
});
|
5240
|
+
var SatisfactionListSchema = import_zod75.default.object({
|
5241
|
+
press_key: import_zod75.default.string(),
|
5242
|
+
total: import_zod75.default.number(),
|
5243
|
+
key_point: import_zod75.default.number().optional()
|
5244
|
+
});
|
5245
|
+
var agentListSchema = import_zod75.default.object({
|
5246
|
+
agent_name: import_zod75.default.string(),
|
5247
|
+
agent_num: import_zod75.default.string(),
|
5248
|
+
satisfaction_list: import_zod75.default.array(SatisfactionListSchema).optional(),
|
5249
|
+
total_key: import_zod75.default.number().optional(),
|
5250
|
+
total_point: import_zod75.default.number().optional(),
|
5251
|
+
average_point: import_zod75.default.number().optional()
|
5252
|
+
});
|
5253
|
+
var QueueSatisfactionSchema = import_zod75.default.object({
|
5254
|
+
queue_name: import_zod75.default.string(),
|
5255
|
+
queue_num: import_zod75.default.string(),
|
5256
|
+
satisfaction_list: import_zod75.default.array(SatisfactionListSchema).optional(),
|
5257
|
+
agent_list: import_zod75.default.array(agentListSchema).optional(),
|
5258
|
+
total_key: import_zod75.default.number().optional(),
|
5259
|
+
total_point: import_zod75.default.number().optional(),
|
5260
|
+
average_point: import_zod75.default.number().optional()
|
5261
|
+
});
|
5262
|
+
var QueuePerformanceListSchema = import_zod75.default.object({
|
5263
|
+
queue: import_zod75.default.string(),
|
5264
|
+
total_calls: import_zod75.default.number(),
|
5265
|
+
answered_calls: import_zod75.default.number(),
|
5266
|
+
missed_calls: import_zod75.default.number(),
|
5267
|
+
abandoned_calls: import_zod75.default.number(),
|
5268
|
+
average_waiting_time: import_zod75.default.number(),
|
5269
|
+
average_talking_time: import_zod75.default.number(),
|
5270
|
+
max_waiting_time: import_zod75.default.number(),
|
5271
|
+
answered_rate: import_zod75.default.number(),
|
5272
|
+
missed_rate: import_zod75.default.number(),
|
5273
|
+
abandoned_rate: import_zod75.default.number(),
|
5274
|
+
sla: import_zod75.default.number()
|
5275
|
+
});
|
5276
|
+
var QueueAgentMissCallsListSchema = import_zod75.default.object({
|
5277
|
+
agent_name: import_zod75.default.string(),
|
5278
|
+
agent_num: import_zod75.default.string(),
|
5279
|
+
time: import_zod75.default.string(),
|
5280
|
+
total_wait_time: import_zod75.default.number(),
|
5281
|
+
src_name: import_zod75.default.string(),
|
5282
|
+
src_num: import_zod75.default.string(),
|
5283
|
+
queue_status: import_zod75.default.string(),
|
5284
|
+
polling_attempts: import_zod75.default.number(),
|
5285
|
+
missed_reason: import_zod75.default.string()
|
5286
|
+
});
|
5287
|
+
var QueueAgentInOutCallsListSchema = import_zod75.default.object({
|
5288
|
+
agent_name: import_zod75.default.string(),
|
5289
|
+
agent_num: import_zod75.default.string(),
|
5290
|
+
inbound_calls: import_zod75.default.number(),
|
5291
|
+
inbound_duration: import_zod75.default.number(),
|
5292
|
+
outbound_calls: import_zod75.default.number(),
|
5293
|
+
outbound_duration: import_zod75.default.number(),
|
5294
|
+
total_calls: import_zod75.default.number(),
|
5295
|
+
total_duration: import_zod75.default.number(),
|
5296
|
+
average_talk_duration: import_zod75.default.number()
|
5297
|
+
});
|
5298
|
+
var CallReportModel = import_zod75.default.object({
|
5299
|
+
errcode: import_zod75.default.number(),
|
5300
|
+
errmsg: import_zod75.default.string(),
|
5301
|
+
total_number: import_zod75.default.number(),
|
5302
|
+
is_12hour: import_zod75.default.number().optional(),
|
5303
|
+
ext_call_statistics_list: import_zod75.default.array(ExtCallStatisticsListSchema).optional(),
|
5304
|
+
ext_call_activity_list: import_zod75.default.array(ExtCallActivityListSchema).optional(),
|
5305
|
+
trunk_activity_list: import_zod75.default.array(TrunkActivityListSchema).optional(),
|
5306
|
+
queue_avg_wait_talk_time_list: import_zod75.default.array(QueueAvgWaitTalkTimeListSchema).optional(),
|
5337
5307
|
queue_satisfaction: QueueSatisfactionSchema.optional(),
|
5338
|
-
queue_performance_list:
|
5339
|
-
queue_agent_miss_calls_list:
|
5340
|
-
queue_agent_in_out_calls_list:
|
5341
|
-
callback_result:
|
5342
|
-
page:
|
5343
|
-
pageSize:
|
5344
|
-
});
|
5345
|
-
var CallReportSchema =
|
5346
|
-
errcode:
|
5347
|
-
errmsg:
|
5348
|
-
total_number:
|
5349
|
-
is_12hour:
|
5350
|
-
ext_call_statistics_list:
|
5351
|
-
ext_call_activity_list:
|
5352
|
-
trunk_activity_list:
|
5353
|
-
queue_avg_wait_talk_time_list:
|
5308
|
+
queue_performance_list: import_zod75.default.array(QueuePerformanceListSchema).optional(),
|
5309
|
+
queue_agent_miss_calls_list: import_zod75.default.array(QueueAgentMissCallsListSchema).optional(),
|
5310
|
+
queue_agent_in_out_calls_list: import_zod75.default.array(QueueAgentInOutCallsListSchema).optional(),
|
5311
|
+
callback_result: import_zod75.default.string(),
|
5312
|
+
page: import_zod75.default.number().optional(),
|
5313
|
+
pageSize: import_zod75.default.number().optional()
|
5314
|
+
});
|
5315
|
+
var CallReportSchema = import_zod75.default.object({
|
5316
|
+
errcode: import_zod75.default.number(),
|
5317
|
+
errmsg: import_zod75.default.string(),
|
5318
|
+
total_number: import_zod75.default.number(),
|
5319
|
+
is_12hour: import_zod75.default.number().optional(),
|
5320
|
+
ext_call_statistics_list: import_zod75.default.array(ExtCallStatisticsListSchema).optional(),
|
5321
|
+
ext_call_activity_list: import_zod75.default.array(ExtCallActivityListSchema).optional(),
|
5322
|
+
trunk_activity_list: import_zod75.default.array(TrunkActivityListSchema).optional(),
|
5323
|
+
queue_avg_wait_talk_time_list: import_zod75.default.array(QueueAvgWaitTalkTimeListSchema).optional(),
|
5354
5324
|
queue_satisfaction: QueueSatisfactionSchema.optional(),
|
5355
|
-
queue_performance_list:
|
5356
|
-
queue_agent_miss_calls_list:
|
5357
|
-
queue_agent_in_out_calls_list:
|
5358
|
-
callback_result:
|
5359
|
-
page:
|
5360
|
-
pageSize:
|
5325
|
+
queue_performance_list: import_zod75.default.array(QueuePerformanceListSchema).optional(),
|
5326
|
+
queue_agent_miss_calls_list: import_zod75.default.array(QueueAgentMissCallsListSchema).optional(),
|
5327
|
+
queue_agent_in_out_calls_list: import_zod75.default.array(QueueAgentInOutCallsListSchema).optional(),
|
5328
|
+
callback_result: import_zod75.default.string(),
|
5329
|
+
page: import_zod75.default.number().optional(),
|
5330
|
+
pageSize: import_zod75.default.number().optional()
|
5361
5331
|
});
|
5362
5332
|
|
5363
5333
|
// src/telephony-cdr/index.ts
|
@@ -5370,10 +5340,10 @@ var telephonyCdrContract = (0, import_core28.initContract)().router(
|
|
5370
5340
|
query: GetAllTelephonyCdrSchema,
|
5371
5341
|
responses: {
|
5372
5342
|
200: DefaultSuccessResponseSchema.extend({
|
5373
|
-
total:
|
5374
|
-
page:
|
5375
|
-
pageSize:
|
5376
|
-
telephonyCdrs:
|
5343
|
+
total: import_zod76.default.number(),
|
5344
|
+
page: import_zod76.default.number(),
|
5345
|
+
pageSize: import_zod76.default.number(),
|
5346
|
+
telephonyCdrs: import_zod76.default.array(TelephonyCdrSchema)
|
5377
5347
|
}),
|
5378
5348
|
401: DefaultUnauthorizedSchema
|
5379
5349
|
},
|
@@ -5386,10 +5356,10 @@ var telephonyCdrContract = (0, import_core28.initContract)().router(
|
|
5386
5356
|
query: GetAllTelephonyCdrSchema,
|
5387
5357
|
responses: {
|
5388
5358
|
200: DefaultSuccessResponseSchema.extend({
|
5389
|
-
total:
|
5390
|
-
page:
|
5391
|
-
pageSize:
|
5392
|
-
telephonyCdrs:
|
5359
|
+
total: import_zod76.default.number(),
|
5360
|
+
page: import_zod76.default.number(),
|
5361
|
+
pageSize: import_zod76.default.number(),
|
5362
|
+
telephonyCdrs: import_zod76.default.array(TelephonyCdrSchema)
|
5393
5363
|
}),
|
5394
5364
|
401: DefaultUnauthorizedSchema
|
5395
5365
|
},
|
@@ -5402,10 +5372,10 @@ var telephonyCdrContract = (0, import_core28.initContract)().router(
|
|
5402
5372
|
query: GetRecentTelephonyCdrSchema,
|
5403
5373
|
responses: {
|
5404
5374
|
200: DefaultSuccessResponseSchema.extend({
|
5405
|
-
total:
|
5406
|
-
page:
|
5407
|
-
pageSize:
|
5408
|
-
telephonyCdrs:
|
5375
|
+
total: import_zod76.default.number(),
|
5376
|
+
page: import_zod76.default.number(),
|
5377
|
+
pageSize: import_zod76.default.number(),
|
5378
|
+
telephonyCdrs: import_zod76.default.array(TelephonyCdrSchema)
|
5409
5379
|
}),
|
5410
5380
|
401: DefaultUnauthorizedSchema
|
5411
5381
|
},
|
@@ -5497,35 +5467,35 @@ var telephonyCdrContract = (0, import_core28.initContract)().router(
|
|
5497
5467
|
|
5498
5468
|
// src/telephony-extension/index.ts
|
5499
5469
|
var import_core29 = require("@ts-rest/core");
|
5500
|
-
var
|
5470
|
+
var import_zod78 = __toESM(require("zod"));
|
5501
5471
|
|
5502
5472
|
// src/telephony-extension/schema.ts
|
5503
|
-
var
|
5504
|
-
var TelephonyExtensionSchema3 =
|
5505
|
-
errcode:
|
5506
|
-
errmsg:
|
5507
|
-
total_number:
|
5508
|
-
data:
|
5509
|
-
|
5510
|
-
id:
|
5511
|
-
online_status:
|
5512
|
-
fx_phone:
|
5513
|
-
sip_phone:
|
5514
|
-
status:
|
5515
|
-
ext_dev_type:
|
5516
|
-
}),
|
5517
|
-
linkus_desktop:
|
5518
|
-
linkus_mobile:
|
5519
|
-
linkus_web:
|
5520
|
-
status:
|
5521
|
-
ext_dev_type:
|
5473
|
+
var import_zod77 = __toESM(require("zod"));
|
5474
|
+
var TelephonyExtensionSchema3 = import_zod77.default.object({
|
5475
|
+
errcode: import_zod77.default.coerce.number(),
|
5476
|
+
errmsg: import_zod77.default.string(),
|
5477
|
+
total_number: import_zod77.default.coerce.number(),
|
5478
|
+
data: import_zod77.default.array(
|
5479
|
+
import_zod77.default.object({
|
5480
|
+
id: import_zod77.default.coerce.number(),
|
5481
|
+
online_status: import_zod77.default.object({
|
5482
|
+
fx_phone: import_zod77.default.object({ status: import_zod77.default.coerce.number() }),
|
5483
|
+
sip_phone: import_zod77.default.object({
|
5484
|
+
status: import_zod77.default.coerce.number(),
|
5485
|
+
ext_dev_type: import_zod77.default.string().optional()
|
5486
|
+
}),
|
5487
|
+
linkus_desktop: import_zod77.default.object({ status: import_zod77.default.coerce.number() }),
|
5488
|
+
linkus_mobile: import_zod77.default.object({ status: import_zod77.default.coerce.number() }),
|
5489
|
+
linkus_web: import_zod77.default.object({
|
5490
|
+
status: import_zod77.default.coerce.number(),
|
5491
|
+
ext_dev_type: import_zod77.default.string().optional()
|
5522
5492
|
})
|
5523
5493
|
}).optional(),
|
5524
|
-
presence_status:
|
5525
|
-
number:
|
5526
|
-
caller_id_name:
|
5527
|
-
role_name:
|
5528
|
-
email_addr:
|
5494
|
+
presence_status: import_zod77.default.string().optional(),
|
5495
|
+
number: import_zod77.default.string().optional(),
|
5496
|
+
caller_id_name: import_zod77.default.string().optional(),
|
5497
|
+
role_name: import_zod77.default.string().optional(),
|
5498
|
+
email_addr: import_zod77.default.string().optional()
|
5529
5499
|
})
|
5530
5500
|
)
|
5531
5501
|
});
|
@@ -5540,8 +5510,8 @@ var telephonyExtensionContract = (0, import_core29.initContract)().router(
|
|
5540
5510
|
query: null,
|
5541
5511
|
responses: {
|
5542
5512
|
200: TelephonyExtensionSchema3,
|
5543
|
-
400:
|
5544
|
-
message:
|
5513
|
+
400: import_zod78.default.object({
|
5514
|
+
message: import_zod78.default.string()
|
5545
5515
|
}),
|
5546
5516
|
401: DefaultUnauthorizedSchema,
|
5547
5517
|
500: DefaultErrorResponseSchema
|
@@ -5554,10 +5524,10 @@ var telephonyExtensionContract = (0, import_core29.initContract)().router(
|
|
5554
5524
|
|
5555
5525
|
// src/ticket/index.ts
|
5556
5526
|
var import_core30 = require("@ts-rest/core");
|
5557
|
-
var
|
5527
|
+
var import_zod80 = __toESM(require("zod"));
|
5558
5528
|
|
5559
5529
|
// src/ticket/validation.ts
|
5560
|
-
var
|
5530
|
+
var import_zod79 = __toESM(require("zod"));
|
5561
5531
|
var addErrorMessage2 = (field) => {
|
5562
5532
|
return field.refine(
|
5563
5533
|
({ isRequired, value }) => {
|
@@ -5575,106 +5545,106 @@ var addErrorMessage2 = (field) => {
|
|
5575
5545
|
}
|
5576
5546
|
);
|
5577
5547
|
};
|
5578
|
-
var BaseSchema3 =
|
5579
|
-
isRequired:
|
5580
|
-
attributeId:
|
5548
|
+
var BaseSchema3 = import_zod79.default.object({
|
5549
|
+
isRequired: import_zod79.default.boolean(),
|
5550
|
+
attributeId: import_zod79.default.string()
|
5581
5551
|
});
|
5582
5552
|
var SingleValue2 = addErrorMessage2(
|
5583
5553
|
BaseSchema3.extend({
|
5584
|
-
value:
|
5554
|
+
value: import_zod79.default.string()
|
5585
5555
|
})
|
5586
5556
|
);
|
5587
|
-
var CreateTicketValidationSchema =
|
5557
|
+
var CreateTicketValidationSchema = import_zod79.default.object({
|
5588
5558
|
title: SingleValue2,
|
5589
5559
|
description: SingleValue2,
|
5590
5560
|
status: SingleValue2,
|
5591
5561
|
type: SingleValue2,
|
5592
5562
|
priority: SingleValue2,
|
5593
5563
|
contact: SingleValue2,
|
5594
|
-
assignee:
|
5595
|
-
isRequired:
|
5596
|
-
attributeId:
|
5597
|
-
value:
|
5564
|
+
assignee: import_zod79.default.object({
|
5565
|
+
isRequired: import_zod79.default.boolean(),
|
5566
|
+
attributeId: import_zod79.default.string(),
|
5567
|
+
value: import_zod79.default.string()
|
5598
5568
|
}),
|
5599
5569
|
channel: SingleValue2,
|
5600
|
-
tags: addErrorMessage2(BaseSchema3.extend({ value:
|
5601
|
-
categories: BaseSchema3.extend({ value:
|
5602
|
-
customFields:
|
5570
|
+
tags: addErrorMessage2(BaseSchema3.extend({ value: import_zod79.default.array(import_zod79.default.string()) })),
|
5571
|
+
categories: BaseSchema3.extend({ value: import_zod79.default.array(import_zod79.default.string()) }),
|
5572
|
+
customFields: import_zod79.default.array(
|
5603
5573
|
addErrorMessage2(
|
5604
5574
|
BaseSchema3.extend({
|
5605
|
-
value:
|
5606
|
-
type:
|
5607
|
-
isDefaultAttribute:
|
5575
|
+
value: import_zod79.default.union([import_zod79.default.string(), import_zod79.default.array(import_zod79.default.string())]),
|
5576
|
+
type: import_zod79.default.string(),
|
5577
|
+
isDefaultAttribute: import_zod79.default.boolean()
|
5608
5578
|
})
|
5609
5579
|
)
|
5610
5580
|
),
|
5611
|
-
reasonToAssign:
|
5581
|
+
reasonToAssign: import_zod79.default.object({ value: import_zod79.default.string() }).optional()
|
5612
5582
|
});
|
5613
5583
|
var UpdateTicketValidationSchema = CreateTicketValidationSchema;
|
5614
|
-
var TicketAttachmentRecordSchema =
|
5615
|
-
bucketName:
|
5616
|
-
fileKey:
|
5617
|
-
fileName:
|
5618
|
-
fileSize:
|
5619
|
-
url:
|
5620
|
-
});
|
5621
|
-
var CreateTicketAttachmentRecordsSchema =
|
5622
|
-
ticketId:
|
5623
|
-
attributeId:
|
5624
|
-
ticketAttachmentRecords:
|
5625
|
-
});
|
5626
|
-
var TicketParamsSchema =
|
5627
|
-
page:
|
5628
|
-
pageSize:
|
5629
|
-
});
|
5630
|
-
var CustomFieldQuery =
|
5631
|
-
attributeId:
|
5632
|
-
type:
|
5633
|
-
value:
|
5634
|
-
});
|
5635
|
-
var GetAllTicketQuerySchema =
|
5636
|
-
page:
|
5637
|
-
pageSize:
|
5638
|
-
selectedDate:
|
5639
|
-
keyword:
|
5640
|
-
title:
|
5641
|
-
description:
|
5642
|
-
status:
|
5643
|
-
priority:
|
5644
|
-
channel:
|
5645
|
-
type:
|
5646
|
-
ticketType:
|
5647
|
-
contact:
|
5648
|
-
tags:
|
5649
|
-
categories:
|
5650
|
-
assignee:
|
5651
|
-
customFields:
|
5652
|
-
|
5653
|
-
attributeId:
|
5654
|
-
type:
|
5655
|
-
value:
|
5584
|
+
var TicketAttachmentRecordSchema = import_zod79.default.object({
|
5585
|
+
bucketName: import_zod79.default.string(),
|
5586
|
+
fileKey: import_zod79.default.string(),
|
5587
|
+
fileName: import_zod79.default.string(),
|
5588
|
+
fileSize: import_zod79.default.coerce.number(),
|
5589
|
+
url: import_zod79.default.string()
|
5590
|
+
});
|
5591
|
+
var CreateTicketAttachmentRecordsSchema = import_zod79.default.object({
|
5592
|
+
ticketId: import_zod79.default.string(),
|
5593
|
+
attributeId: import_zod79.default.string(),
|
5594
|
+
ticketAttachmentRecords: import_zod79.default.array(TicketAttachmentRecordSchema)
|
5595
|
+
});
|
5596
|
+
var TicketParamsSchema = import_zod79.default.object({
|
5597
|
+
page: import_zod79.default.coerce.number().default(1),
|
5598
|
+
pageSize: import_zod79.default.coerce.number().default(10)
|
5599
|
+
});
|
5600
|
+
var CustomFieldQuery = import_zod79.default.object({
|
5601
|
+
attributeId: import_zod79.default.string(),
|
5602
|
+
type: import_zod79.default.string(),
|
5603
|
+
value: import_zod79.default.union([import_zod79.default.string(), import_zod79.default.array(import_zod79.default.string())])
|
5604
|
+
});
|
5605
|
+
var GetAllTicketQuerySchema = import_zod79.default.object({
|
5606
|
+
page: import_zod79.default.string().transform((value) => Number(value)),
|
5607
|
+
pageSize: import_zod79.default.string().transform((value) => Number(value)),
|
5608
|
+
selectedDate: import_zod79.default.string(),
|
5609
|
+
keyword: import_zod79.default.string(),
|
5610
|
+
title: import_zod79.default.string(),
|
5611
|
+
description: import_zod79.default.string(),
|
5612
|
+
status: import_zod79.default.array(import_zod79.default.string()),
|
5613
|
+
priority: import_zod79.default.array(import_zod79.default.string()),
|
5614
|
+
channel: import_zod79.default.array(import_zod79.default.string()),
|
5615
|
+
type: import_zod79.default.array(import_zod79.default.string()),
|
5616
|
+
ticketType: import_zod79.default.array(import_zod79.default.string()),
|
5617
|
+
contact: import_zod79.default.array(import_zod79.default.string()),
|
5618
|
+
tags: import_zod79.default.array(import_zod79.default.string().uuid()),
|
5619
|
+
categories: import_zod79.default.array(import_zod79.default.string().uuid()),
|
5620
|
+
assignee: import_zod79.default.array(import_zod79.default.string().uuid()),
|
5621
|
+
customFields: import_zod79.default.array(
|
5622
|
+
import_zod79.default.object({
|
5623
|
+
attributeId: import_zod79.default.string().uuid(),
|
5624
|
+
type: import_zod79.default.string(),
|
5625
|
+
value: import_zod79.default.union([import_zod79.default.string(), import_zod79.default.array(import_zod79.default.string())])
|
5656
5626
|
})
|
5657
5627
|
)
|
5658
5628
|
}).partial();
|
5659
|
-
var ExportAllTicketQuerySchema =
|
5660
|
-
agent:
|
5661
|
-
selectedDate:
|
5662
|
-
keyword:
|
5663
|
-
title:
|
5664
|
-
description:
|
5665
|
-
status:
|
5666
|
-
priority:
|
5667
|
-
channel:
|
5668
|
-
type:
|
5669
|
-
ticketType:
|
5670
|
-
contact:
|
5671
|
-
tags:
|
5672
|
-
categories:
|
5673
|
-
customFields:
|
5674
|
-
|
5675
|
-
attributeId:
|
5676
|
-
type:
|
5677
|
-
value:
|
5629
|
+
var ExportAllTicketQuerySchema = import_zod79.default.object({
|
5630
|
+
agent: import_zod79.default.array(import_zod79.default.string()),
|
5631
|
+
selectedDate: import_zod79.default.string(),
|
5632
|
+
keyword: import_zod79.default.string(),
|
5633
|
+
title: import_zod79.default.string(),
|
5634
|
+
description: import_zod79.default.string(),
|
5635
|
+
status: import_zod79.default.array(import_zod79.default.string()),
|
5636
|
+
priority: import_zod79.default.array(import_zod79.default.string()),
|
5637
|
+
channel: import_zod79.default.array(import_zod79.default.string()),
|
5638
|
+
type: import_zod79.default.array(import_zod79.default.string()),
|
5639
|
+
ticketType: import_zod79.default.array(import_zod79.default.string()),
|
5640
|
+
contact: import_zod79.default.array(import_zod79.default.string()),
|
5641
|
+
tags: import_zod79.default.array(import_zod79.default.string()),
|
5642
|
+
categories: import_zod79.default.array(import_zod79.default.string()),
|
5643
|
+
customFields: import_zod79.default.array(
|
5644
|
+
import_zod79.default.object({
|
5645
|
+
attributeId: import_zod79.default.string().uuid(),
|
5646
|
+
type: import_zod79.default.string(),
|
5647
|
+
value: import_zod79.default.union([import_zod79.default.string(), import_zod79.default.array(import_zod79.default.string())])
|
5678
5648
|
})
|
5679
5649
|
)
|
5680
5650
|
}).partial();
|
@@ -5690,14 +5660,14 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5690
5660
|
201: DefaultSuccessResponseSchema.extend({
|
5691
5661
|
data: TicketSchema
|
5692
5662
|
}),
|
5693
|
-
400:
|
5694
|
-
message:
|
5663
|
+
400: import_zod80.default.object({
|
5664
|
+
message: import_zod80.default.string()
|
5695
5665
|
}),
|
5696
|
-
409:
|
5697
|
-
message:
|
5666
|
+
409: import_zod80.default.object({
|
5667
|
+
message: import_zod80.default.string()
|
5698
5668
|
}),
|
5699
|
-
500:
|
5700
|
-
message:
|
5669
|
+
500: import_zod80.default.object({
|
5670
|
+
message: import_zod80.default.string()
|
5701
5671
|
}),
|
5702
5672
|
401: DefaultUnauthorizedSchema,
|
5703
5673
|
404: DefaultNotFoundSchema,
|
@@ -5718,8 +5688,8 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5718
5688
|
TicketSchema
|
5719
5689
|
)
|
5720
5690
|
}),
|
5721
|
-
400:
|
5722
|
-
message:
|
5691
|
+
400: import_zod80.default.object({
|
5692
|
+
message: import_zod80.default.string()
|
5723
5693
|
}),
|
5724
5694
|
401: DefaultUnauthorizedSchema,
|
5725
5695
|
500: DefaultErrorResponseSchema
|
@@ -5729,14 +5699,14 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5729
5699
|
getTicketById: {
|
5730
5700
|
method: "GET",
|
5731
5701
|
path: "/:id",
|
5732
|
-
pathParams:
|
5702
|
+
pathParams: import_zod80.default.object({ id: import_zod80.default.string() }),
|
5733
5703
|
headers: DefaultHeaderSchema,
|
5734
5704
|
responses: {
|
5735
5705
|
200: DefaultSuccessResponseSchema.extend({
|
5736
5706
|
data: TicketSchema
|
5737
5707
|
}),
|
5738
|
-
400:
|
5739
|
-
message:
|
5708
|
+
400: import_zod80.default.object({
|
5709
|
+
message: import_zod80.default.string()
|
5740
5710
|
}),
|
5741
5711
|
401: DefaultUnauthorizedSchema,
|
5742
5712
|
500: DefaultErrorResponseSchema
|
@@ -5746,15 +5716,15 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5746
5716
|
getTicketByContactId: {
|
5747
5717
|
method: "GET",
|
5748
5718
|
path: "/contact/:id",
|
5749
|
-
pathParams:
|
5719
|
+
pathParams: import_zod80.default.object({ id: import_zod80.default.string() }),
|
5750
5720
|
query: TicketParamsSchema,
|
5751
5721
|
headers: DefaultHeaderSchema,
|
5752
5722
|
responses: {
|
5753
5723
|
200: DefaultSuccessResponseSchema.extend({
|
5754
5724
|
data: WithPagination(TicketSchema)
|
5755
5725
|
}),
|
5756
|
-
400:
|
5757
|
-
message:
|
5726
|
+
400: import_zod80.default.object({
|
5727
|
+
message: import_zod80.default.string()
|
5758
5728
|
}),
|
5759
5729
|
401: DefaultUnauthorizedSchema,
|
5760
5730
|
500: DefaultErrorResponseSchema
|
@@ -5764,21 +5734,21 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5764
5734
|
updateTicket: {
|
5765
5735
|
method: "PATCH",
|
5766
5736
|
path: "/:id",
|
5767
|
-
pathParams:
|
5737
|
+
pathParams: import_zod80.default.object({ id: import_zod80.default.string() }),
|
5768
5738
|
body: UpdateTicketValidationSchema,
|
5769
5739
|
headers: DefaultHeaderSchema,
|
5770
5740
|
responses: {
|
5771
5741
|
201: DefaultSuccessResponseSchema.extend({
|
5772
5742
|
data: TicketSchema
|
5773
5743
|
}),
|
5774
|
-
400:
|
5775
|
-
message:
|
5744
|
+
400: import_zod80.default.object({
|
5745
|
+
message: import_zod80.default.string()
|
5776
5746
|
}),
|
5777
|
-
409:
|
5778
|
-
message:
|
5747
|
+
409: import_zod80.default.object({
|
5748
|
+
message: import_zod80.default.string()
|
5779
5749
|
}),
|
5780
|
-
500:
|
5781
|
-
message:
|
5750
|
+
500: import_zod80.default.object({
|
5751
|
+
message: import_zod80.default.string()
|
5782
5752
|
}),
|
5783
5753
|
401: DefaultUnauthorizedSchema,
|
5784
5754
|
404: DefaultNotFoundSchema,
|
@@ -5789,11 +5759,11 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5789
5759
|
deleteTicket: {
|
5790
5760
|
method: "DELETE",
|
5791
5761
|
path: "/:id",
|
5792
|
-
pathParams:
|
5762
|
+
pathParams: import_zod80.default.object({ id: import_zod80.default.string() }),
|
5793
5763
|
headers: DefaultHeaderSchema,
|
5794
5764
|
body: null,
|
5795
5765
|
responses: {
|
5796
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5766
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod80.default.string() }),
|
5797
5767
|
500: DefaultErrorResponseSchema
|
5798
5768
|
},
|
5799
5769
|
summary: "Delete a extension."
|
@@ -5801,19 +5771,19 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5801
5771
|
updateDescription: {
|
5802
5772
|
method: "PATCH",
|
5803
5773
|
path: "/description/update/:id",
|
5804
|
-
pathParams:
|
5805
|
-
body:
|
5774
|
+
pathParams: import_zod80.default.object({ id: import_zod80.default.string() }),
|
5775
|
+
body: import_zod80.default.object({ description: import_zod80.default.string() }),
|
5806
5776
|
headers: DefaultHeaderSchema,
|
5807
5777
|
responses: {
|
5808
|
-
201: DefaultSuccessResponseSchema.extend({ message:
|
5809
|
-
400:
|
5810
|
-
message:
|
5778
|
+
201: DefaultSuccessResponseSchema.extend({ message: import_zod80.default.string() }),
|
5779
|
+
400: import_zod80.default.object({
|
5780
|
+
message: import_zod80.default.string()
|
5811
5781
|
}),
|
5812
|
-
409:
|
5813
|
-
message:
|
5782
|
+
409: import_zod80.default.object({
|
5783
|
+
message: import_zod80.default.string()
|
5814
5784
|
}),
|
5815
|
-
500:
|
5816
|
-
message:
|
5785
|
+
500: import_zod80.default.object({
|
5786
|
+
message: import_zod80.default.string()
|
5817
5787
|
}),
|
5818
5788
|
401: DefaultUnauthorizedSchema,
|
5819
5789
|
404: DefaultNotFoundSchema,
|
@@ -5824,19 +5794,19 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5824
5794
|
updateTitle: {
|
5825
5795
|
method: "PATCH",
|
5826
5796
|
path: "/title/update/:id",
|
5827
|
-
pathParams:
|
5828
|
-
body:
|
5797
|
+
pathParams: import_zod80.default.object({ id: import_zod80.default.string() }),
|
5798
|
+
body: import_zod80.default.object({ title: import_zod80.default.string() }),
|
5829
5799
|
headers: DefaultHeaderSchema,
|
5830
5800
|
responses: {
|
5831
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5832
|
-
400:
|
5833
|
-
message:
|
5801
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod80.default.string() }),
|
5802
|
+
400: import_zod80.default.object({
|
5803
|
+
message: import_zod80.default.string()
|
5834
5804
|
}),
|
5835
|
-
409:
|
5836
|
-
message:
|
5805
|
+
409: import_zod80.default.object({
|
5806
|
+
message: import_zod80.default.string()
|
5837
5807
|
}),
|
5838
|
-
500:
|
5839
|
-
message:
|
5808
|
+
500: import_zod80.default.object({
|
5809
|
+
message: import_zod80.default.string()
|
5840
5810
|
}),
|
5841
5811
|
401: DefaultUnauthorizedSchema,
|
5842
5812
|
404: DefaultNotFoundSchema,
|
@@ -5847,19 +5817,19 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5847
5817
|
updateType: {
|
5848
5818
|
method: "PATCH",
|
5849
5819
|
path: "/type/update/:id",
|
5850
|
-
pathParams:
|
5851
|
-
body:
|
5820
|
+
pathParams: import_zod80.default.object({ id: import_zod80.default.string() }),
|
5821
|
+
body: import_zod80.default.object({ type: import_zod80.default.string() }),
|
5852
5822
|
headers: DefaultHeaderSchema,
|
5853
5823
|
responses: {
|
5854
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5855
|
-
400:
|
5856
|
-
message:
|
5824
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod80.default.string() }),
|
5825
|
+
400: import_zod80.default.object({
|
5826
|
+
message: import_zod80.default.string()
|
5857
5827
|
}),
|
5858
|
-
409:
|
5859
|
-
message:
|
5828
|
+
409: import_zod80.default.object({
|
5829
|
+
message: import_zod80.default.string()
|
5860
5830
|
}),
|
5861
|
-
500:
|
5862
|
-
message:
|
5831
|
+
500: import_zod80.default.object({
|
5832
|
+
message: import_zod80.default.string()
|
5863
5833
|
}),
|
5864
5834
|
401: DefaultUnauthorizedSchema,
|
5865
5835
|
404: DefaultNotFoundSchema,
|
@@ -5870,19 +5840,19 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5870
5840
|
updateStatus: {
|
5871
5841
|
method: "PATCH",
|
5872
5842
|
path: "/status/update/:id",
|
5873
|
-
pathParams:
|
5874
|
-
body:
|
5843
|
+
pathParams: import_zod80.default.object({ id: import_zod80.default.string() }),
|
5844
|
+
body: import_zod80.default.object({ status: import_zod80.default.string() }),
|
5875
5845
|
headers: DefaultHeaderSchema,
|
5876
5846
|
responses: {
|
5877
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5878
|
-
400:
|
5879
|
-
message:
|
5847
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod80.default.string() }),
|
5848
|
+
400: import_zod80.default.object({
|
5849
|
+
message: import_zod80.default.string()
|
5880
5850
|
}),
|
5881
|
-
409:
|
5882
|
-
message:
|
5851
|
+
409: import_zod80.default.object({
|
5852
|
+
message: import_zod80.default.string()
|
5883
5853
|
}),
|
5884
|
-
500:
|
5885
|
-
message:
|
5854
|
+
500: import_zod80.default.object({
|
5855
|
+
message: import_zod80.default.string()
|
5886
5856
|
}),
|
5887
5857
|
401: DefaultUnauthorizedSchema,
|
5888
5858
|
404: DefaultNotFoundSchema,
|
@@ -5893,19 +5863,19 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5893
5863
|
updatePriority: {
|
5894
5864
|
method: "PATCH",
|
5895
5865
|
path: "/priority/update/:id",
|
5896
|
-
pathParams:
|
5897
|
-
body:
|
5866
|
+
pathParams: import_zod80.default.object({ id: import_zod80.default.string() }),
|
5867
|
+
body: import_zod80.default.object({ priority: import_zod80.default.string() }),
|
5898
5868
|
headers: DefaultHeaderSchema,
|
5899
5869
|
responses: {
|
5900
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5901
|
-
400:
|
5902
|
-
message:
|
5870
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod80.default.string() }),
|
5871
|
+
400: import_zod80.default.object({
|
5872
|
+
message: import_zod80.default.string()
|
5903
5873
|
}),
|
5904
|
-
409:
|
5905
|
-
message:
|
5874
|
+
409: import_zod80.default.object({
|
5875
|
+
message: import_zod80.default.string()
|
5906
5876
|
}),
|
5907
|
-
500:
|
5908
|
-
message:
|
5877
|
+
500: import_zod80.default.object({
|
5878
|
+
message: import_zod80.default.string()
|
5909
5879
|
}),
|
5910
5880
|
401: DefaultUnauthorizedSchema,
|
5911
5881
|
404: DefaultNotFoundSchema,
|
@@ -5916,19 +5886,19 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5916
5886
|
updateChannel: {
|
5917
5887
|
method: "PATCH",
|
5918
5888
|
path: "/channel/update/:id",
|
5919
|
-
pathParams:
|
5920
|
-
body:
|
5889
|
+
pathParams: import_zod80.default.object({ id: import_zod80.default.string() }),
|
5890
|
+
body: import_zod80.default.object({ channel: import_zod80.default.string() }),
|
5921
5891
|
headers: DefaultHeaderSchema,
|
5922
5892
|
responses: {
|
5923
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5924
|
-
400:
|
5925
|
-
message:
|
5893
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod80.default.string() }),
|
5894
|
+
400: import_zod80.default.object({
|
5895
|
+
message: import_zod80.default.string()
|
5926
5896
|
}),
|
5927
|
-
409:
|
5928
|
-
message:
|
5897
|
+
409: import_zod80.default.object({
|
5898
|
+
message: import_zod80.default.string()
|
5929
5899
|
}),
|
5930
|
-
500:
|
5931
|
-
message:
|
5900
|
+
500: import_zod80.default.object({
|
5901
|
+
message: import_zod80.default.string()
|
5932
5902
|
}),
|
5933
5903
|
401: DefaultUnauthorizedSchema,
|
5934
5904
|
404: DefaultNotFoundSchema,
|
@@ -5939,19 +5909,19 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5939
5909
|
updateTags: {
|
5940
5910
|
method: "PATCH",
|
5941
5911
|
path: "/tags/update/:id",
|
5942
|
-
pathParams:
|
5943
|
-
body:
|
5912
|
+
pathParams: import_zod80.default.object({ id: import_zod80.default.string() }),
|
5913
|
+
body: import_zod80.default.object({ tags: import_zod80.default.array(import_zod80.default.string()) }),
|
5944
5914
|
headers: DefaultHeaderSchema,
|
5945
5915
|
responses: {
|
5946
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5947
|
-
400:
|
5948
|
-
message:
|
5916
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod80.default.string() }),
|
5917
|
+
400: import_zod80.default.object({
|
5918
|
+
message: import_zod80.default.string()
|
5949
5919
|
}),
|
5950
|
-
409:
|
5951
|
-
message:
|
5920
|
+
409: import_zod80.default.object({
|
5921
|
+
message: import_zod80.default.string()
|
5952
5922
|
}),
|
5953
|
-
500:
|
5954
|
-
message:
|
5923
|
+
500: import_zod80.default.object({
|
5924
|
+
message: import_zod80.default.string()
|
5955
5925
|
}),
|
5956
5926
|
401: DefaultUnauthorizedSchema,
|
5957
5927
|
404: DefaultNotFoundSchema,
|
@@ -5962,25 +5932,25 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5962
5932
|
changeAssignee: {
|
5963
5933
|
method: "PATCH",
|
5964
5934
|
path: "/assignee/update/:id",
|
5965
|
-
pathParams:
|
5966
|
-
body:
|
5967
|
-
ticketId:
|
5968
|
-
assigneeId:
|
5969
|
-
reason:
|
5935
|
+
pathParams: import_zod80.default.object({ id: import_zod80.default.string() }),
|
5936
|
+
body: import_zod80.default.object({
|
5937
|
+
ticketId: import_zod80.default.string(),
|
5938
|
+
assigneeId: import_zod80.default.string(),
|
5939
|
+
reason: import_zod80.default.string().optional()
|
5970
5940
|
}),
|
5971
5941
|
headers: DefaultHeaderSchema,
|
5972
5942
|
responses: {
|
5973
5943
|
200: DefaultSuccessResponseSchema.extend({
|
5974
5944
|
data: TicketSchema
|
5975
5945
|
}),
|
5976
|
-
400:
|
5977
|
-
message:
|
5946
|
+
400: import_zod80.default.object({
|
5947
|
+
message: import_zod80.default.string()
|
5978
5948
|
}),
|
5979
|
-
409:
|
5980
|
-
message:
|
5949
|
+
409: import_zod80.default.object({
|
5950
|
+
message: import_zod80.default.string()
|
5981
5951
|
}),
|
5982
|
-
500:
|
5983
|
-
message:
|
5952
|
+
500: import_zod80.default.object({
|
5953
|
+
message: import_zod80.default.string()
|
5984
5954
|
}),
|
5985
5955
|
401: DefaultUnauthorizedSchema,
|
5986
5956
|
404: DefaultNotFoundSchema,
|
@@ -5991,14 +5961,14 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
5991
5961
|
getTicketCountByContact: {
|
5992
5962
|
method: "GET",
|
5993
5963
|
path: "/ticket_count/contact/:id",
|
5994
|
-
pathParams:
|
5964
|
+
pathParams: import_zod80.default.object({ id: import_zod80.default.string() }),
|
5995
5965
|
headers: DefaultHeaderSchema,
|
5996
5966
|
responses: {
|
5997
5967
|
200: DefaultSuccessResponseSchema.extend({
|
5998
5968
|
data: TicketCountByContactSchema
|
5999
5969
|
}),
|
6000
|
-
400:
|
6001
|
-
message:
|
5970
|
+
400: import_zod80.default.object({
|
5971
|
+
message: import_zod80.default.string()
|
6002
5972
|
}),
|
6003
5973
|
401: DefaultUnauthorizedSchema,
|
6004
5974
|
500: DefaultErrorResponseSchema
|
@@ -6014,14 +5984,14 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
6014
5984
|
201: DefaultSuccessResponseSchema.extend({
|
6015
5985
|
data: TicketCustomFieldSchema
|
6016
5986
|
}),
|
6017
|
-
400:
|
6018
|
-
message:
|
5987
|
+
400: import_zod80.default.object({
|
5988
|
+
message: import_zod80.default.string()
|
6019
5989
|
}),
|
6020
|
-
409:
|
6021
|
-
message:
|
5990
|
+
409: import_zod80.default.object({
|
5991
|
+
message: import_zod80.default.string()
|
6022
5992
|
}),
|
6023
|
-
500:
|
6024
|
-
message:
|
5993
|
+
500: import_zod80.default.object({
|
5994
|
+
message: import_zod80.default.string()
|
6025
5995
|
}),
|
6026
5996
|
401: DefaultUnauthorizedSchema,
|
6027
5997
|
404: DefaultNotFoundSchema,
|
@@ -6046,24 +6016,24 @@ var ticketContract = (0, import_core30.initContract)().router(
|
|
6046
6016
|
|
6047
6017
|
// src/user/index.ts
|
6048
6018
|
var import_core31 = require("@ts-rest/core");
|
6049
|
-
var
|
6019
|
+
var import_zod82 = __toESM(require("zod"));
|
6050
6020
|
|
6051
6021
|
// src/user/validation.ts
|
6052
|
-
var
|
6053
|
-
var CreateUserSchema =
|
6054
|
-
name:
|
6055
|
-
email:
|
6056
|
-
address:
|
6057
|
-
phone:
|
6058
|
-
password:
|
6059
|
-
notificationCount:
|
6060
|
-
roles:
|
6022
|
+
var import_zod81 = require("zod");
|
6023
|
+
var CreateUserSchema = import_zod81.z.object({
|
6024
|
+
name: import_zod81.z.string(),
|
6025
|
+
email: import_zod81.z.string().email(),
|
6026
|
+
address: import_zod81.z.string().nullable(),
|
6027
|
+
phone: import_zod81.z.string().nullable(),
|
6028
|
+
password: import_zod81.z.string(),
|
6029
|
+
notificationCount: import_zod81.z.number().nullable().optional(),
|
6030
|
+
roles: import_zod81.z.array(import_zod81.z.string())
|
6061
6031
|
});
|
6062
6032
|
var UpdateUserSchema = CreateUserSchema.extend({
|
6063
|
-
newPassword:
|
6033
|
+
newPassword: import_zod81.z.string()
|
6064
6034
|
});
|
6065
|
-
var UpdateUserProfileSchema =
|
6066
|
-
password:
|
6035
|
+
var UpdateUserProfileSchema = import_zod81.z.object({
|
6036
|
+
password: import_zod81.z.string()
|
6067
6037
|
});
|
6068
6038
|
|
6069
6039
|
// src/user/index.ts
|
@@ -6078,8 +6048,8 @@ var userContract = (0, import_core31.initContract)().router(
|
|
6078
6048
|
201: DefaultSuccessResponseSchema.extend({
|
6079
6049
|
user: UserSchema
|
6080
6050
|
}),
|
6081
|
-
400:
|
6082
|
-
message:
|
6051
|
+
400: import_zod82.default.object({
|
6052
|
+
message: import_zod82.default.string()
|
6083
6053
|
}),
|
6084
6054
|
401: DefaultUnauthorizedSchema,
|
6085
6055
|
404: DefaultNotFoundSchema,
|
@@ -6092,16 +6062,16 @@ var userContract = (0, import_core31.initContract)().router(
|
|
6092
6062
|
method: "GET",
|
6093
6063
|
path: "",
|
6094
6064
|
headers: DefaultHeaderSchema,
|
6095
|
-
query:
|
6096
|
-
page:
|
6097
|
-
pageSize:
|
6065
|
+
query: import_zod82.default.object({
|
6066
|
+
page: import_zod82.default.coerce.number().optional(),
|
6067
|
+
pageSize: import_zod82.default.coerce.number().optional(),
|
6098
6068
|
// Don't add default 10. In some places, we need to fetch all users.
|
6099
|
-
keyword:
|
6069
|
+
keyword: import_zod82.default.string().optional()
|
6100
6070
|
}).optional(),
|
6101
6071
|
responses: {
|
6102
6072
|
200: WithPagination(UserSchema),
|
6103
|
-
400:
|
6104
|
-
message:
|
6073
|
+
400: import_zod82.default.object({
|
6074
|
+
message: import_zod82.default.string()
|
6105
6075
|
}),
|
6106
6076
|
401: DefaultUnauthorizedSchema,
|
6107
6077
|
500: DefaultErrorResponseSchema
|
@@ -6111,12 +6081,12 @@ var userContract = (0, import_core31.initContract)().router(
|
|
6111
6081
|
getUserById: {
|
6112
6082
|
method: "GET",
|
6113
6083
|
path: "/:id",
|
6114
|
-
pathParams:
|
6084
|
+
pathParams: import_zod82.default.object({ id: import_zod82.default.string() }),
|
6115
6085
|
headers: DefaultHeaderSchema,
|
6116
6086
|
responses: {
|
6117
6087
|
200: UserSchema,
|
6118
|
-
400:
|
6119
|
-
message:
|
6088
|
+
400: import_zod82.default.object({
|
6089
|
+
message: import_zod82.default.string()
|
6120
6090
|
}),
|
6121
6091
|
401: DefaultUnauthorizedSchema
|
6122
6092
|
},
|
@@ -6125,15 +6095,15 @@ var userContract = (0, import_core31.initContract)().router(
|
|
6125
6095
|
updateUser: {
|
6126
6096
|
method: "PATCH",
|
6127
6097
|
path: "/:id",
|
6128
|
-
pathParams:
|
6098
|
+
pathParams: import_zod82.default.object({ id: import_zod82.default.string() }),
|
6129
6099
|
headers: DefaultHeaderSchema,
|
6130
6100
|
body: UpdateUserSchema,
|
6131
6101
|
responses: {
|
6132
6102
|
201: DefaultSuccessResponseSchema.extend({
|
6133
6103
|
user: UserSchema
|
6134
6104
|
}),
|
6135
|
-
400:
|
6136
|
-
message:
|
6105
|
+
400: import_zod82.default.object({
|
6106
|
+
message: import_zod82.default.string()
|
6137
6107
|
}),
|
6138
6108
|
401: DefaultUnauthorizedSchema,
|
6139
6109
|
404: DefaultNotFoundSchema,
|
@@ -6145,15 +6115,15 @@ var userContract = (0, import_core31.initContract)().router(
|
|
6145
6115
|
updateUserProfile: {
|
6146
6116
|
method: "PATCH",
|
6147
6117
|
path: "/profile/:id",
|
6148
|
-
pathParams:
|
6118
|
+
pathParams: import_zod82.default.object({ id: import_zod82.default.string() }),
|
6149
6119
|
headers: DefaultHeaderSchema,
|
6150
6120
|
body: UpdateUserProfileSchema,
|
6151
6121
|
responses: {
|
6152
6122
|
201: DefaultSuccessResponseSchema.extend({
|
6153
6123
|
user: UserSchema
|
6154
6124
|
}),
|
6155
|
-
400:
|
6156
|
-
message:
|
6125
|
+
400: import_zod82.default.object({
|
6126
|
+
message: import_zod82.default.string()
|
6157
6127
|
}),
|
6158
6128
|
401: DefaultUnauthorizedSchema,
|
6159
6129
|
404: DefaultNotFoundSchema,
|
@@ -6165,11 +6135,11 @@ var userContract = (0, import_core31.initContract)().router(
|
|
6165
6135
|
deleteUser: {
|
6166
6136
|
method: "DELETE",
|
6167
6137
|
path: "/:id",
|
6168
|
-
pathParams:
|
6138
|
+
pathParams: import_zod82.default.object({ id: import_zod82.default.string() }),
|
6169
6139
|
headers: DefaultHeaderSchema,
|
6170
6140
|
body: null,
|
6171
6141
|
responses: {
|
6172
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
6142
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod82.default.string() }),
|
6173
6143
|
404: DefaultNotFoundSchema,
|
6174
6144
|
422: DefaultUnprocessibleSchema,
|
6175
6145
|
500: DefaultErrorResponseSchema
|
@@ -6182,26 +6152,26 @@ var userContract = (0, import_core31.initContract)().router(
|
|
6182
6152
|
|
6183
6153
|
// src/user-presence-status-log/index.ts
|
6184
6154
|
var import_core32 = require("@ts-rest/core");
|
6185
|
-
var
|
6155
|
+
var import_zod85 = __toESM(require("zod"));
|
6186
6156
|
|
6187
6157
|
// src/user-presence-status-log/schema.ts
|
6188
|
-
var
|
6158
|
+
var import_zod83 = __toESM(require("zod"));
|
6189
6159
|
var UserPresenceStatusLogSchema = DefaultEntitySchema.extend({
|
6190
6160
|
user: UserSchema,
|
6191
6161
|
previousPresenceStatus: PresenceStatusSchema,
|
6192
6162
|
newPresenceStatus: PresenceStatusSchema,
|
6193
|
-
reason:
|
6163
|
+
reason: import_zod83.default.string()
|
6194
6164
|
});
|
6195
6165
|
|
6196
6166
|
// src/user-presence-status-log/validation.ts
|
6197
|
-
var
|
6198
|
-
var UserPresenceStatusLogParamsSchema =
|
6199
|
-
page:
|
6200
|
-
pageSize:
|
6201
|
-
selectedDate:
|
6167
|
+
var import_zod84 = __toESM(require("zod"));
|
6168
|
+
var UserPresenceStatusLogParamsSchema = import_zod84.default.object({
|
6169
|
+
page: import_zod84.default.coerce.number().default(1),
|
6170
|
+
pageSize: import_zod84.default.coerce.number().default(10),
|
6171
|
+
selectedDate: import_zod84.default.string().optional()
|
6202
6172
|
}).optional();
|
6203
|
-
var UserPresenceStatusLogExportParamsSchema =
|
6204
|
-
selectedDate:
|
6173
|
+
var UserPresenceStatusLogExportParamsSchema = import_zod84.default.object({
|
6174
|
+
selectedDate: import_zod84.default.string().optional()
|
6205
6175
|
});
|
6206
6176
|
|
6207
6177
|
// src/user-presence-status-log/index.ts
|
@@ -6214,8 +6184,8 @@ var userPresenceStatusLogContract = (0, import_core32.initContract)().router(
|
|
6214
6184
|
headers: DefaultHeaderSchema,
|
6215
6185
|
responses: {
|
6216
6186
|
200: WithPagination(UserPresenceStatusLogSchema),
|
6217
|
-
400:
|
6218
|
-
message:
|
6187
|
+
400: import_zod85.default.object({
|
6188
|
+
message: import_zod85.default.string()
|
6219
6189
|
}),
|
6220
6190
|
401: DefaultUnauthorizedSchema,
|
6221
6191
|
500: DefaultErrorResponseSchema
|
@@ -6229,8 +6199,8 @@ var userPresenceStatusLogContract = (0, import_core32.initContract)().router(
|
|
6229
6199
|
headers: DefaultHeaderSchema,
|
6230
6200
|
responses: {
|
6231
6201
|
200: null,
|
6232
|
-
400:
|
6233
|
-
message:
|
6202
|
+
400: import_zod85.default.object({
|
6203
|
+
message: import_zod85.default.string()
|
6234
6204
|
}),
|
6235
6205
|
401: DefaultUnauthorizedSchema,
|
6236
6206
|
500: DefaultErrorResponseSchema
|
@@ -6242,44 +6212,44 @@ var userPresenceStatusLogContract = (0, import_core32.initContract)().router(
|
|
6242
6212
|
|
6243
6213
|
// src/widget/index.ts
|
6244
6214
|
var import_core33 = require("@ts-rest/core");
|
6245
|
-
var
|
6215
|
+
var import_zod88 = __toESM(require("zod"));
|
6246
6216
|
|
6247
6217
|
// src/widget/schema.ts
|
6248
|
-
var
|
6249
|
-
var FieldsSchema =
|
6250
|
-
var WidgetPositionSchema =
|
6251
|
-
|
6252
|
-
|
6253
|
-
|
6218
|
+
var import_zod86 = __toESM(require("zod"));
|
6219
|
+
var FieldsSchema = import_zod86.default.object({ data: import_zod86.default.array(import_zod86.default.string()) });
|
6220
|
+
var WidgetPositionSchema = import_zod86.default.union([
|
6221
|
+
import_zod86.default.literal("menu"),
|
6222
|
+
import_zod86.default.literal("ticket_detail"),
|
6223
|
+
import_zod86.default.literal("contact_detail")
|
6254
6224
|
]);
|
6255
6225
|
var WidgetSchema = DefaultEntitySchema.extend({
|
6256
|
-
name:
|
6257
|
-
description:
|
6226
|
+
name: import_zod86.default.string(),
|
6227
|
+
description: import_zod86.default.string().nullable(),
|
6258
6228
|
position: WidgetPositionSchema.nullable(),
|
6259
6229
|
fields: FieldsSchema,
|
6260
|
-
url:
|
6230
|
+
url: import_zod86.default.string()
|
6261
6231
|
});
|
6262
6232
|
|
6263
6233
|
// src/widget/validation.ts
|
6264
|
-
var
|
6265
|
-
var CreateWidgetSchema =
|
6266
|
-
name:
|
6267
|
-
description:
|
6268
|
-
url:
|
6234
|
+
var import_zod87 = __toESM(require("zod"));
|
6235
|
+
var CreateWidgetSchema = import_zod87.default.object({
|
6236
|
+
name: import_zod87.default.string(),
|
6237
|
+
description: import_zod87.default.string(),
|
6238
|
+
url: import_zod87.default.string(),
|
6269
6239
|
position: WidgetPositionSchema,
|
6270
|
-
fields:
|
6240
|
+
fields: import_zod87.default.object({
|
6271
6241
|
data: (
|
6272
6242
|
// Array of attribute system names
|
6273
|
-
|
6243
|
+
import_zod87.default.array(import_zod87.default.string())
|
6274
6244
|
)
|
6275
6245
|
}).optional()
|
6276
6246
|
});
|
6277
6247
|
var UpdateWidgetSchema = CreateWidgetSchema;
|
6278
|
-
var GetWidgetUrlPathQuerySchema =
|
6279
|
-
widgetId:
|
6248
|
+
var GetWidgetUrlPathQuerySchema = import_zod87.default.object({
|
6249
|
+
widgetId: import_zod87.default.string(),
|
6280
6250
|
// Position ID is ticket ID, contact ID, etc.
|
6281
6251
|
// TODO: The name "Position ID" is confusing. Think of a better name.
|
6282
|
-
positionId:
|
6252
|
+
positionId: import_zod87.default.string()
|
6283
6253
|
});
|
6284
6254
|
|
6285
6255
|
// src/widget/index.ts
|
@@ -6294,8 +6264,8 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6294
6264
|
201: DefaultSuccessResponseSchema.extend({
|
6295
6265
|
widget: WidgetSchema
|
6296
6266
|
}),
|
6297
|
-
400:
|
6298
|
-
message:
|
6267
|
+
400: import_zod88.default.object({
|
6268
|
+
message: import_zod88.default.string()
|
6299
6269
|
}),
|
6300
6270
|
401: DefaultUnauthorizedSchema,
|
6301
6271
|
500: DefaultErrorResponseSchema
|
@@ -6305,17 +6275,17 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6305
6275
|
getWidgets: {
|
6306
6276
|
method: "GET",
|
6307
6277
|
path: "",
|
6308
|
-
query:
|
6309
|
-
page:
|
6310
|
-
pageSize:
|
6311
|
-
keyword:
|
6278
|
+
query: import_zod88.default.object({
|
6279
|
+
page: import_zod88.default.coerce.number().default(1),
|
6280
|
+
pageSize: import_zod88.default.coerce.number().default(10),
|
6281
|
+
keyword: import_zod88.default.coerce.string().optional()
|
6312
6282
|
}).optional(),
|
6313
6283
|
headers: DefaultHeaderSchema,
|
6314
6284
|
responses: {
|
6315
6285
|
200: WithPagination(WidgetSchema),
|
6316
6286
|
500: DefaultErrorResponseSchema,
|
6317
|
-
400:
|
6318
|
-
message:
|
6287
|
+
400: import_zod88.default.object({
|
6288
|
+
message: import_zod88.default.string()
|
6319
6289
|
}),
|
6320
6290
|
401: DefaultUnauthorizedSchema
|
6321
6291
|
},
|
@@ -6326,9 +6296,9 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6326
6296
|
path: "/menu",
|
6327
6297
|
headers: DefaultHeaderSchema,
|
6328
6298
|
responses: {
|
6329
|
-
200:
|
6330
|
-
400:
|
6331
|
-
message:
|
6299
|
+
200: import_zod88.default.array(WidgetSchema),
|
6300
|
+
400: import_zod88.default.object({
|
6301
|
+
message: import_zod88.default.string()
|
6332
6302
|
}),
|
6333
6303
|
401: DefaultUnauthorizedSchema,
|
6334
6304
|
500: DefaultErrorResponseSchema
|
@@ -6340,9 +6310,9 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6340
6310
|
path: "/ticket_detail",
|
6341
6311
|
headers: DefaultHeaderSchema,
|
6342
6312
|
responses: {
|
6343
|
-
200:
|
6344
|
-
400:
|
6345
|
-
message:
|
6313
|
+
200: import_zod88.default.array(WidgetSchema),
|
6314
|
+
400: import_zod88.default.object({
|
6315
|
+
message: import_zod88.default.string()
|
6346
6316
|
}),
|
6347
6317
|
401: DefaultUnauthorizedSchema,
|
6348
6318
|
500: DefaultErrorResponseSchema
|
@@ -6354,9 +6324,9 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6354
6324
|
path: "/contact_detail",
|
6355
6325
|
headers: DefaultHeaderSchema,
|
6356
6326
|
responses: {
|
6357
|
-
200:
|
6358
|
-
400:
|
6359
|
-
message:
|
6327
|
+
200: import_zod88.default.array(WidgetSchema),
|
6328
|
+
400: import_zod88.default.object({
|
6329
|
+
message: import_zod88.default.string()
|
6360
6330
|
}),
|
6361
6331
|
401: DefaultUnauthorizedSchema,
|
6362
6332
|
500: DefaultErrorResponseSchema
|
@@ -6366,12 +6336,12 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6366
6336
|
getWidgetById: {
|
6367
6337
|
method: "GET",
|
6368
6338
|
path: "/:id",
|
6369
|
-
pathParams:
|
6339
|
+
pathParams: import_zod88.default.object({ id: import_zod88.default.string() }),
|
6370
6340
|
headers: DefaultHeaderSchema,
|
6371
6341
|
responses: {
|
6372
6342
|
200: WidgetSchema,
|
6373
|
-
400:
|
6374
|
-
message:
|
6343
|
+
400: import_zod88.default.object({
|
6344
|
+
message: import_zod88.default.string()
|
6375
6345
|
}),
|
6376
6346
|
401: DefaultUnauthorizedSchema,
|
6377
6347
|
500: DefaultErrorResponseSchema
|
@@ -6385,10 +6355,10 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6385
6355
|
headers: DefaultHeaderSchema,
|
6386
6356
|
responses: {
|
6387
6357
|
201: DefaultSuccessResponseSchema.extend({
|
6388
|
-
url:
|
6358
|
+
url: import_zod88.default.string()
|
6389
6359
|
}),
|
6390
|
-
400:
|
6391
|
-
message:
|
6360
|
+
400: import_zod88.default.object({
|
6361
|
+
message: import_zod88.default.string()
|
6392
6362
|
}),
|
6393
6363
|
401: DefaultUnauthorizedSchema
|
6394
6364
|
},
|
@@ -6397,14 +6367,14 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6397
6367
|
updateWidget: {
|
6398
6368
|
method: "PATCH",
|
6399
6369
|
path: "/:id",
|
6400
|
-
pathParams:
|
6370
|
+
pathParams: import_zod88.default.object({ id: import_zod88.default.string() }),
|
6401
6371
|
headers: DefaultHeaderSchema,
|
6402
6372
|
responses: {
|
6403
6373
|
201: DefaultSuccessResponseSchema.extend({
|
6404
6374
|
widget: WidgetSchema
|
6405
6375
|
}),
|
6406
|
-
400:
|
6407
|
-
message:
|
6376
|
+
400: import_zod88.default.object({
|
6377
|
+
message: import_zod88.default.string()
|
6408
6378
|
}),
|
6409
6379
|
401: DefaultUnauthorizedSchema
|
6410
6380
|
},
|
@@ -6414,11 +6384,11 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6414
6384
|
deleteWidget: {
|
6415
6385
|
method: "DELETE",
|
6416
6386
|
path: "/:id",
|
6417
|
-
pathParams:
|
6387
|
+
pathParams: import_zod88.default.object({ id: import_zod88.default.string() }),
|
6418
6388
|
headers: DefaultHeaderSchema,
|
6419
6389
|
body: null,
|
6420
6390
|
responses: {
|
6421
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
6391
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod88.default.string() }),
|
6422
6392
|
500: DefaultErrorResponseSchema
|
6423
6393
|
},
|
6424
6394
|
summary: "Delete a widget."
|
@@ -6429,24 +6399,24 @@ var widgetContract = (0, import_core33.initContract)().router(
|
|
6429
6399
|
|
6430
6400
|
// src/wrap-up-form/index.ts
|
6431
6401
|
var import_core34 = require("@ts-rest/core");
|
6432
|
-
var
|
6402
|
+
var import_zod90 = __toESM(require("zod"));
|
6433
6403
|
|
6434
6404
|
// src/wrap-up-form/validation.ts
|
6435
|
-
var
|
6436
|
-
var CreateWrapUpFormSchema =
|
6437
|
-
note:
|
6438
|
-
disposition:
|
6439
|
-
callFrom:
|
6440
|
-
callTo:
|
6405
|
+
var import_zod89 = require("zod");
|
6406
|
+
var CreateWrapUpFormSchema = import_zod89.z.object({
|
6407
|
+
note: import_zod89.z.string().nullable().optional(),
|
6408
|
+
disposition: import_zod89.z.string().nullable().optional(),
|
6409
|
+
callFrom: import_zod89.z.string().nullable().optional(),
|
6410
|
+
callTo: import_zod89.z.string().nullable().optional()
|
6441
6411
|
});
|
6442
6412
|
var UpdateWrapUpFormSchema = CreateWrapUpFormSchema.extend({
|
6443
|
-
tags:
|
6413
|
+
tags: import_zod89.z.array(import_zod89.z.string()).optional()
|
6444
6414
|
});
|
6445
|
-
var CreateCXLogWrapUpFormSchema =
|
6446
|
-
cxLogId:
|
6447
|
-
disposition:
|
6448
|
-
tagIds:
|
6449
|
-
note:
|
6415
|
+
var CreateCXLogWrapUpFormSchema = import_zod89.z.object({
|
6416
|
+
cxLogId: import_zod89.z.string().uuid(),
|
6417
|
+
disposition: import_zod89.z.string().optional(),
|
6418
|
+
tagIds: import_zod89.z.array(import_zod89.z.string().uuid()).optional(),
|
6419
|
+
note: import_zod89.z.string().optional()
|
6450
6420
|
});
|
6451
6421
|
|
6452
6422
|
// src/wrap-up-form/index.ts
|
@@ -6461,8 +6431,8 @@ var wrapUpFormContract = (0, import_core34.initContract)().router(
|
|
6461
6431
|
201: DefaultSuccessResponseSchema.extend({
|
6462
6432
|
wrapUpForm: WrapUpFormSchema
|
6463
6433
|
}),
|
6464
|
-
400:
|
6465
|
-
message:
|
6434
|
+
400: import_zod90.default.object({
|
6435
|
+
message: import_zod90.default.string()
|
6466
6436
|
}),
|
6467
6437
|
401: DefaultUnauthorizedSchema,
|
6468
6438
|
500: DefaultErrorResponseSchema
|
@@ -6484,15 +6454,15 @@ var wrapUpFormContract = (0, import_core34.initContract)().router(
|
|
6484
6454
|
getWrapUpForms: {
|
6485
6455
|
method: "GET",
|
6486
6456
|
path: "",
|
6487
|
-
query:
|
6488
|
-
page:
|
6489
|
-
pageSize:
|
6457
|
+
query: import_zod90.default.object({
|
6458
|
+
page: import_zod90.default.coerce.number().default(1),
|
6459
|
+
pageSize: import_zod90.default.coerce.number().default(10)
|
6490
6460
|
}).optional(),
|
6491
6461
|
headers: DefaultHeaderSchema,
|
6492
6462
|
responses: {
|
6493
6463
|
200: WithPagination(WrapUpFormSchema),
|
6494
|
-
400:
|
6495
|
-
message:
|
6464
|
+
400: import_zod90.default.object({
|
6465
|
+
message: import_zod90.default.string()
|
6496
6466
|
}),
|
6497
6467
|
401: DefaultUnauthorizedSchema,
|
6498
6468
|
500: DefaultErrorResponseSchema
|
@@ -6502,15 +6472,15 @@ var wrapUpFormContract = (0, import_core34.initContract)().router(
|
|
6502
6472
|
updateWrapUpForm: {
|
6503
6473
|
method: "PATCH",
|
6504
6474
|
path: "/:id",
|
6505
|
-
pathParams:
|
6475
|
+
pathParams: import_zod90.default.object({ id: import_zod90.default.string() }),
|
6506
6476
|
headers: DefaultHeaderSchema,
|
6507
6477
|
body: UpdateWrapUpFormSchema,
|
6508
6478
|
responses: {
|
6509
6479
|
201: DefaultSuccessResponseSchema.extend({
|
6510
6480
|
wrapUpForm: WrapUpFormSchema
|
6511
6481
|
}),
|
6512
|
-
400:
|
6513
|
-
message:
|
6482
|
+
400: import_zod90.default.object({
|
6483
|
+
message: import_zod90.default.string()
|
6514
6484
|
}),
|
6515
6485
|
401: DefaultUnauthorizedSchema,
|
6516
6486
|
500: DefaultErrorResponseSchema
|
@@ -6523,28 +6493,28 @@ var wrapUpFormContract = (0, import_core34.initContract)().router(
|
|
6523
6493
|
|
6524
6494
|
// src/upload/index.ts
|
6525
6495
|
var import_core35 = require("@ts-rest/core");
|
6526
|
-
var
|
6496
|
+
var import_zod91 = __toESM(require("zod"));
|
6527
6497
|
var uploadContract = (0, import_core35.initContract)().router(
|
6528
6498
|
{
|
6529
6499
|
rename: {
|
6530
6500
|
method: "POST",
|
6531
6501
|
path: "/:id/rename",
|
6532
|
-
pathParams:
|
6533
|
-
id:
|
6502
|
+
pathParams: import_zod91.default.object({
|
6503
|
+
id: import_zod91.default.string()
|
6534
6504
|
}),
|
6535
6505
|
headers: DefaultHeaderSchema,
|
6536
6506
|
responses: {
|
6537
6507
|
201: DefaultSuccessResponseSchema.extend({
|
6538
|
-
message:
|
6508
|
+
message: import_zod91.default.string()
|
6539
6509
|
}),
|
6540
|
-
400:
|
6541
|
-
message:
|
6510
|
+
400: import_zod91.default.object({
|
6511
|
+
message: import_zod91.default.string()
|
6542
6512
|
}),
|
6543
|
-
409:
|
6544
|
-
message:
|
6513
|
+
409: import_zod91.default.object({
|
6514
|
+
message: import_zod91.default.string()
|
6545
6515
|
}),
|
6546
|
-
500:
|
6547
|
-
message:
|
6516
|
+
500: import_zod91.default.object({
|
6517
|
+
message: import_zod91.default.string()
|
6548
6518
|
}),
|
6549
6519
|
401: DefaultUnauthorizedSchema,
|
6550
6520
|
404: DefaultNotFoundSchema,
|
@@ -6556,23 +6526,23 @@ var uploadContract = (0, import_core35.initContract)().router(
|
|
6556
6526
|
delete: {
|
6557
6527
|
method: "DELETE",
|
6558
6528
|
path: "/:id",
|
6559
|
-
pathParams:
|
6560
|
-
id:
|
6529
|
+
pathParams: import_zod91.default.object({
|
6530
|
+
id: import_zod91.default.string()
|
6561
6531
|
}),
|
6562
6532
|
headers: DefaultHeaderSchema,
|
6563
6533
|
body: null,
|
6564
6534
|
responses: {
|
6565
6535
|
201: DefaultSuccessResponseSchema.extend({
|
6566
|
-
message:
|
6536
|
+
message: import_zod91.default.string()
|
6567
6537
|
}),
|
6568
|
-
400:
|
6569
|
-
message:
|
6538
|
+
400: import_zod91.default.object({
|
6539
|
+
message: import_zod91.default.string()
|
6570
6540
|
}),
|
6571
|
-
409:
|
6572
|
-
message:
|
6541
|
+
409: import_zod91.default.object({
|
6542
|
+
message: import_zod91.default.string()
|
6573
6543
|
}),
|
6574
|
-
500:
|
6575
|
-
message:
|
6544
|
+
500: import_zod91.default.object({
|
6545
|
+
message: import_zod91.default.string()
|
6576
6546
|
}),
|
6577
6547
|
401: DefaultUnauthorizedSchema,
|
6578
6548
|
404: DefaultNotFoundSchema,
|
@@ -6587,19 +6557,19 @@ var uploadContract = (0, import_core35.initContract)().router(
|
|
6587
6557
|
);
|
6588
6558
|
|
6589
6559
|
// src/viber/index.ts
|
6590
|
-
var
|
6560
|
+
var import_zod93 = __toESM(require("zod"));
|
6591
6561
|
|
6592
6562
|
// src/viber/validation.ts
|
6593
|
-
var
|
6594
|
-
var ViberChannelSchema =
|
6595
|
-
name:
|
6596
|
-
accessToken:
|
6597
|
-
actor:
|
6598
|
-
id:
|
6599
|
-
name:
|
6600
|
-
email:
|
6601
|
-
address:
|
6602
|
-
phone:
|
6563
|
+
var import_zod92 = __toESM(require("zod"));
|
6564
|
+
var ViberChannelSchema = import_zod92.default.object({
|
6565
|
+
name: import_zod92.default.string(),
|
6566
|
+
accessToken: import_zod92.default.string(),
|
6567
|
+
actor: import_zod92.default.object({
|
6568
|
+
id: import_zod92.default.string().uuid(),
|
6569
|
+
name: import_zod92.default.string(),
|
6570
|
+
email: import_zod92.default.string().email(),
|
6571
|
+
address: import_zod92.default.string().nullable(),
|
6572
|
+
phone: import_zod92.default.string().nullable()
|
6603
6573
|
}).optional()
|
6604
6574
|
});
|
6605
6575
|
|
@@ -6628,8 +6598,8 @@ var viberContract = (0, import_core36.initContract)().router({
|
|
6628
6598
|
}),
|
6629
6599
|
400: DefaultErrorResponseSchema
|
6630
6600
|
},
|
6631
|
-
body:
|
6632
|
-
id:
|
6601
|
+
body: import_zod93.default.object({
|
6602
|
+
id: import_zod93.default.string().uuid()
|
6633
6603
|
}),
|
6634
6604
|
summary: "Connect viber channel"
|
6635
6605
|
},
|
@@ -6645,8 +6615,8 @@ var viberContract = (0, import_core36.initContract)().router({
|
|
6645
6615
|
reconnect: {
|
6646
6616
|
method: "POST",
|
6647
6617
|
path: "/reconnect/:channelId",
|
6648
|
-
pathParams:
|
6649
|
-
channelId:
|
6618
|
+
pathParams: import_zod93.default.object({
|
6619
|
+
channelId: import_zod93.default.string().uuid()
|
6650
6620
|
}),
|
6651
6621
|
responses: {
|
6652
6622
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -6661,8 +6631,8 @@ var viberContract = (0, import_core36.initContract)().router({
|
|
6661
6631
|
delete: {
|
6662
6632
|
method: "DELETE",
|
6663
6633
|
path: "/delete/:channelId",
|
6664
|
-
pathParams:
|
6665
|
-
channelId:
|
6634
|
+
pathParams: import_zod93.default.object({
|
6635
|
+
channelId: import_zod93.default.string().uuid()
|
6666
6636
|
}),
|
6667
6637
|
body: null,
|
6668
6638
|
responses: {
|
@@ -6675,58 +6645,58 @@ var viberContract = (0, import_core36.initContract)().router({
|
|
6675
6645
|
|
6676
6646
|
// src/notification/index.ts
|
6677
6647
|
var import_core37 = require("@ts-rest/core");
|
6678
|
-
var
|
6648
|
+
var import_zod96 = __toESM(require("zod"));
|
6679
6649
|
|
6680
6650
|
// src/notification/validation.ts
|
6681
|
-
var
|
6651
|
+
var import_zod95 = __toESM(require("zod"));
|
6682
6652
|
|
6683
6653
|
// src/notification/schema.ts
|
6684
|
-
var
|
6685
|
-
var NotificationChangeSchema =
|
6686
|
-
id:
|
6687
|
-
createdAt:
|
6688
|
-
updatedAt:
|
6689
|
-
deletedAt:
|
6690
|
-
actorId:
|
6654
|
+
var import_zod94 = __toESM(require("zod"));
|
6655
|
+
var NotificationChangeSchema = import_zod94.default.object({
|
6656
|
+
id: import_zod94.default.string().uuid(),
|
6657
|
+
createdAt: import_zod94.default.date(),
|
6658
|
+
updatedAt: import_zod94.default.date(),
|
6659
|
+
deletedAt: import_zod94.default.date().nullable(),
|
6660
|
+
actorId: import_zod94.default.string().uuid(),
|
6691
6661
|
actor: UserSchema,
|
6692
|
-
notificationObjectId:
|
6693
|
-
readAt:
|
6694
|
-
});
|
6695
|
-
var NotificationObjectSchema =
|
6696
|
-
id:
|
6697
|
-
createdAt:
|
6698
|
-
updatedAt:
|
6699
|
-
deletedAt:
|
6700
|
-
data:
|
6662
|
+
notificationObjectId: import_zod94.default.string().uuid(),
|
6663
|
+
readAt: import_zod94.default.date()
|
6664
|
+
});
|
6665
|
+
var NotificationObjectSchema = import_zod94.default.object({
|
6666
|
+
id: import_zod94.default.string().uuid(),
|
6667
|
+
createdAt: import_zod94.default.date(),
|
6668
|
+
updatedAt: import_zod94.default.date(),
|
6669
|
+
deletedAt: import_zod94.default.date().nullable(),
|
6670
|
+
data: import_zod94.default.string(),
|
6701
6671
|
notificationChange: NotificationChangeSchema
|
6702
6672
|
});
|
6703
|
-
var NotificationSchema =
|
6704
|
-
id:
|
6705
|
-
createdAt:
|
6706
|
-
updatedAt:
|
6707
|
-
deletedAt:
|
6708
|
-
notificationObjectId:
|
6709
|
-
notifierId:
|
6673
|
+
var NotificationSchema = import_zod94.default.object({
|
6674
|
+
id: import_zod94.default.string().uuid(),
|
6675
|
+
createdAt: import_zod94.default.date(),
|
6676
|
+
updatedAt: import_zod94.default.date(),
|
6677
|
+
deletedAt: import_zod94.default.date().nullable(),
|
6678
|
+
notificationObjectId: import_zod94.default.string().uuid(),
|
6679
|
+
notifierId: import_zod94.default.string().uuid(),
|
6710
6680
|
notificationObject: NotificationObjectSchema,
|
6711
|
-
readAt:
|
6681
|
+
readAt: import_zod94.default.date()
|
6712
6682
|
});
|
6713
6683
|
|
6714
6684
|
// src/notification/validation.ts
|
6715
|
-
var GetNotificationsRequestSchema =
|
6716
|
-
page:
|
6717
|
-
pageSize:
|
6685
|
+
var GetNotificationsRequestSchema = import_zod95.default.object({
|
6686
|
+
page: import_zod95.default.coerce.number().default(1),
|
6687
|
+
pageSize: import_zod95.default.coerce.number().default(10)
|
6718
6688
|
});
|
6719
|
-
var GetNotificationsResponseSchema =
|
6720
|
-
notificationCount:
|
6721
|
-
notifications:
|
6722
|
-
total:
|
6723
|
-
page:
|
6724
|
-
pageSize:
|
6725
|
-
lastPage:
|
6726
|
-
totalUnreadCount:
|
6689
|
+
var GetNotificationsResponseSchema = import_zod95.default.object({
|
6690
|
+
notificationCount: import_zod95.default.number(),
|
6691
|
+
notifications: import_zod95.default.array(NotificationSchema),
|
6692
|
+
total: import_zod95.default.number(),
|
6693
|
+
page: import_zod95.default.number(),
|
6694
|
+
pageSize: import_zod95.default.number(),
|
6695
|
+
lastPage: import_zod95.default.number(),
|
6696
|
+
totalUnreadCount: import_zod95.default.number().optional()
|
6727
6697
|
});
|
6728
|
-
var ResetNotificationRequestSchema =
|
6729
|
-
userId:
|
6698
|
+
var ResetNotificationRequestSchema = import_zod95.default.object({
|
6699
|
+
userId: import_zod95.default.string()
|
6730
6700
|
});
|
6731
6701
|
|
6732
6702
|
// src/notification/index.ts
|
@@ -6740,14 +6710,14 @@ var userNotificationContract = (0, import_core37.initContract)().router(
|
|
6740
6710
|
200: DefaultSuccessResponseSchema.extend({
|
6741
6711
|
data: GetNotificationsResponseSchema
|
6742
6712
|
}),
|
6743
|
-
400:
|
6744
|
-
message:
|
6713
|
+
400: import_zod96.default.object({
|
6714
|
+
message: import_zod96.default.string()
|
6745
6715
|
}),
|
6746
|
-
409:
|
6747
|
-
message:
|
6716
|
+
409: import_zod96.default.object({
|
6717
|
+
message: import_zod96.default.string()
|
6748
6718
|
}),
|
6749
|
-
500:
|
6750
|
-
message:
|
6719
|
+
500: import_zod96.default.object({
|
6720
|
+
message: import_zod96.default.string()
|
6751
6721
|
}),
|
6752
6722
|
401: DefaultUnauthorizedSchema,
|
6753
6723
|
404: DefaultNotFoundSchema,
|
@@ -6760,16 +6730,16 @@ var userNotificationContract = (0, import_core37.initContract)().router(
|
|
6760
6730
|
path: "/new_notifications_count",
|
6761
6731
|
responses: {
|
6762
6732
|
200: DefaultSuccessResponseSchema.extend({
|
6763
|
-
total:
|
6733
|
+
total: import_zod96.default.number()
|
6764
6734
|
}),
|
6765
|
-
400:
|
6766
|
-
message:
|
6735
|
+
400: import_zod96.default.object({
|
6736
|
+
message: import_zod96.default.string()
|
6767
6737
|
}),
|
6768
|
-
409:
|
6769
|
-
message:
|
6738
|
+
409: import_zod96.default.object({
|
6739
|
+
message: import_zod96.default.string()
|
6770
6740
|
}),
|
6771
|
-
500:
|
6772
|
-
message:
|
6741
|
+
500: import_zod96.default.object({
|
6742
|
+
message: import_zod96.default.string()
|
6773
6743
|
}),
|
6774
6744
|
401: DefaultUnauthorizedSchema,
|
6775
6745
|
404: DefaultNotFoundSchema,
|
@@ -6784,14 +6754,14 @@ var userNotificationContract = (0, import_core37.initContract)().router(
|
|
6784
6754
|
201: DefaultSuccessResponseSchema.extend({
|
6785
6755
|
data: UserSchema
|
6786
6756
|
}),
|
6787
|
-
400:
|
6788
|
-
message:
|
6757
|
+
400: import_zod96.default.object({
|
6758
|
+
message: import_zod96.default.string()
|
6789
6759
|
}),
|
6790
|
-
409:
|
6791
|
-
message:
|
6760
|
+
409: import_zod96.default.object({
|
6761
|
+
message: import_zod96.default.string()
|
6792
6762
|
}),
|
6793
|
-
500:
|
6794
|
-
message:
|
6763
|
+
500: import_zod96.default.object({
|
6764
|
+
message: import_zod96.default.string()
|
6795
6765
|
}),
|
6796
6766
|
401: DefaultUnauthorizedSchema,
|
6797
6767
|
404: DefaultNotFoundSchema,
|
@@ -6803,19 +6773,19 @@ var userNotificationContract = (0, import_core37.initContract)().router(
|
|
6803
6773
|
readNotification: {
|
6804
6774
|
method: "POST",
|
6805
6775
|
path: "/read/:id",
|
6806
|
-
pathParams:
|
6776
|
+
pathParams: import_zod96.default.object({ id: import_zod96.default.string() }),
|
6807
6777
|
responses: {
|
6808
6778
|
201: DefaultSuccessResponseSchema.extend({
|
6809
6779
|
data: NotificationSchema
|
6810
6780
|
}),
|
6811
|
-
400:
|
6812
|
-
message:
|
6781
|
+
400: import_zod96.default.object({
|
6782
|
+
message: import_zod96.default.string()
|
6813
6783
|
}),
|
6814
|
-
409:
|
6815
|
-
message:
|
6784
|
+
409: import_zod96.default.object({
|
6785
|
+
message: import_zod96.default.string()
|
6816
6786
|
}),
|
6817
|
-
500:
|
6818
|
-
message:
|
6787
|
+
500: import_zod96.default.object({
|
6788
|
+
message: import_zod96.default.string()
|
6819
6789
|
}),
|
6820
6790
|
401: DefaultUnauthorizedSchema,
|
6821
6791
|
404: DefaultNotFoundSchema,
|
@@ -6898,7 +6868,6 @@ var notificationContract = (0, import_core38.initContract)().router({
|
|
6898
6868
|
dashboardContract,
|
6899
6869
|
evaluateFormContract,
|
6900
6870
|
extensionContract,
|
6901
|
-
mailContract,
|
6902
6871
|
mainChatContract,
|
6903
6872
|
notificationContract,
|
6904
6873
|
permissionContract,
|