@kl1/contracts 1.0.97 → 1.0.98
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 +855 -758
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +854 -758
- package/dist/index.mjs.map +1 -1
- package/dist/src/chat/index.d.ts +3 -3
- package/dist/src/chat/schema.d.ts.map +1 -1
- package/dist/src/chat/validation.d.ts +8 -8
- package/dist/src/chat/validation.d.ts.map +1 -1
- package/dist/src/contract.d.ts +1399 -559
- package/dist/src/contract.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/instagram/index.d.ts +5 -5
- package/dist/src/line/index.d.ts +5 -5
- package/dist/src/mail/account-contract.d.ts +132 -132
- package/dist/src/mail/mail-contract.d.ts +715 -258
- package/dist/src/mail/mail-contract.d.ts.map +1 -1
- package/dist/src/mail/mail-server-contract.d.ts +477 -18
- 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 +5 -5
- package/dist/src/user/index.d.ts +388 -4
- package/dist/src/user/index.d.ts.map +1 -1
- package/dist/src/user/validation.d.ts +7 -0
- package/dist/src/user/validation.d.ts.map +1 -1
- package/dist/src/viber/index.d.ts +5 -5
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -1278,8 +1278,61 @@ var RepliedMessageSchema = DefaultEntitySchema.extend({
|
|
1278
1278
|
url: z26.string(),
|
1279
1279
|
previewUrl: z26.string(),
|
1280
1280
|
imageSetId: z26.string(),
|
1281
|
+
// room: RoomSchema,
|
1281
1282
|
upload: UploadSchema,
|
1283
|
+
// id: z.string().uuid(),
|
1284
|
+
// createdAt: z.date(),
|
1285
|
+
// updatedAt: z.date(),
|
1286
|
+
// deletedAt: z.date().nullable(),
|
1287
|
+
// name: z.string(),
|
1288
|
+
// email: z.string().email(),
|
1289
|
+
// emailVerifiedAt: z.date().nullable(),
|
1290
|
+
// password: z.string(),
|
1291
|
+
// address: z.string().nullable(),
|
1292
|
+
// phone: z.string().nullable(),
|
1293
|
+
// notificationCount: z.number().nullable(),
|
1294
|
+
// roles: z.array(RoleSchema),
|
1295
|
+
// extension: z.object({
|
1296
|
+
// id: z.string().uuid(),
|
1297
|
+
// createdAt: z.date(),
|
1298
|
+
// updatedAt: z.date(),
|
1299
|
+
// deletedAt: z.date().nullable(),
|
1300
|
+
// userId: z.string().nullable(),
|
1301
|
+
// sipServerUrl: z.string(),
|
1302
|
+
// sipUserName: z.string(),
|
1303
|
+
// webphoneLoginUser: z.string(),
|
1304
|
+
// extensionId: z.string().nullable(),
|
1305
|
+
// extensionName: z.string(),
|
1306
|
+
// telephonySignature: z.string().nullable(),
|
1307
|
+
// }),
|
1308
|
+
// }),
|
1282
1309
|
actor: UserSchema,
|
1310
|
+
// id: z.string().uuid(),
|
1311
|
+
// createdAt: z.date(),
|
1312
|
+
// updatedAt: z.date(),
|
1313
|
+
// deletedAt: z.date().nullable(),
|
1314
|
+
// name: z.string(),
|
1315
|
+
// email: z.string().email(),
|
1316
|
+
// emailVerifiedAt: z.date().nullable(),
|
1317
|
+
// password: z.string(),
|
1318
|
+
// address: z.string().nullable(),
|
1319
|
+
// phone: z.string().nullable(),
|
1320
|
+
// notificationCount: z.number().nullable(),
|
1321
|
+
// roles: z.array(RoleSchema),
|
1322
|
+
// extension: z.object({
|
1323
|
+
// id: z.string().uuid(),
|
1324
|
+
// createdAt: z.date(),
|
1325
|
+
// updatedAt: z.date(),
|
1326
|
+
// deletedAt: z.date().nullable(),
|
1327
|
+
// userId: z.string().nullable(),
|
1328
|
+
// sipServerUrl: z.string(),
|
1329
|
+
// sipUserName: z.string(),
|
1330
|
+
// webphoneLoginUser: z.string(),
|
1331
|
+
// extensionId: z.string().nullable(),
|
1332
|
+
// extensionName: z.string(),
|
1333
|
+
// telephonySignature: z.string().nullable(),
|
1334
|
+
// }),
|
1335
|
+
// }),
|
1283
1336
|
assignee: UserSchema,
|
1284
1337
|
sender: UserSchema
|
1285
1338
|
});
|
@@ -1396,11 +1449,7 @@ var SendMessageSchema = z29.object({
|
|
1396
1449
|
user: UserSchema.optional(),
|
1397
1450
|
sticker: StickerSchema.optional(),
|
1398
1451
|
file: z29.custom().optional(),
|
1399
|
-
messengerTags: z29.union([
|
1400
|
-
z29.literal("post_purchase_update"),
|
1401
|
-
z29.literal("account_update"),
|
1402
|
-
z29.literal("confirmed_event_update")
|
1403
|
-
]).optional()
|
1452
|
+
messengerTags: z29.union([z29.literal(1), z29.literal(2), z29.literal(3)])
|
1404
1453
|
});
|
1405
1454
|
var SolveRoomSchema = z29.object({
|
1406
1455
|
roomId: z29.string(),
|
@@ -1469,11 +1518,7 @@ var SendMessageToPlatformSchema = z29.object({
|
|
1469
1518
|
phone: z29.string().nullable()
|
1470
1519
|
}).nullable(),
|
1471
1520
|
channel: ChannelSchema2,
|
1472
|
-
|
1473
|
-
z29.literal("post_purchase_update"),
|
1474
|
-
z29.literal("account_update"),
|
1475
|
-
z29.literal("confirmed_event_update")
|
1476
|
-
]).optional()
|
1521
|
+
status: z29.number()
|
1477
1522
|
}),
|
1478
1523
|
message: z29.object({
|
1479
1524
|
message: z29.string().optional(),
|
@@ -3981,12 +4026,12 @@ var MailServerSchema = z56.object({
|
|
3981
4026
|
deletedAt: z56.date().nullable(),
|
3982
4027
|
name: z56.string(),
|
3983
4028
|
smtpHost: z56.string(),
|
3984
|
-
smtpPort: z56.
|
3985
|
-
smtpTlsPort: z56.
|
4029
|
+
smtpPort: z56.number(),
|
4030
|
+
smtpTlsPort: z56.number(),
|
3986
4031
|
useTlsForSmtp: z56.boolean(),
|
3987
4032
|
imapHost: z56.string(),
|
3988
|
-
imapPort: z56.
|
3989
|
-
imapTlsPort: z56.
|
4033
|
+
imapPort: z56.number(),
|
4034
|
+
imapTlsPort: z56.number(),
|
3990
4035
|
useTlsForImap: z56.boolean()
|
3991
4036
|
});
|
3992
4037
|
var MailAccountSchema = z56.object({
|
@@ -4435,64 +4480,91 @@ var accountContract = initContract19().router(
|
|
4435
4480
|
|
4436
4481
|
// src/mail/mail-server-contract.ts
|
4437
4482
|
import { initContract as initContract20 } from "@ts-rest/core";
|
4483
|
+
import z63 from "zod";
|
4484
|
+
|
4485
|
+
// src/mail/schemas/servers-validation.schema.ts
|
4438
4486
|
import z62 from "zod";
|
4487
|
+
var CreateMailServerSchema = z62.object({
|
4488
|
+
name: z62.string(),
|
4489
|
+
smtpHost: z62.string(),
|
4490
|
+
smtpPort: z62.number(),
|
4491
|
+
smtpTlsPort: z62.number(),
|
4492
|
+
useTlsForSmtp: z62.boolean(),
|
4493
|
+
imapHost: z62.string(),
|
4494
|
+
imapPort: z62.number(),
|
4495
|
+
imapTlsPort: z62.number(),
|
4496
|
+
useTlsForImap: z62.boolean()
|
4497
|
+
});
|
4498
|
+
|
4499
|
+
// src/mail/mail-server-contract.ts
|
4439
4500
|
var serverContract = initContract20().router(
|
4440
4501
|
{
|
4441
4502
|
create: {
|
4442
4503
|
method: "POST",
|
4443
4504
|
path: "/",
|
4444
4505
|
responses: {
|
4445
|
-
|
4446
|
-
|
4506
|
+
201: DefaultSuccessResponseSchema.extend({
|
4507
|
+
data: MailServerSchema
|
4447
4508
|
}),
|
4448
4509
|
...DefaultResponses
|
4449
4510
|
},
|
4450
|
-
body:
|
4511
|
+
body: CreateMailServerSchema,
|
4451
4512
|
summary: "Register a new mail server"
|
4452
4513
|
},
|
4453
|
-
|
4514
|
+
getById: {
|
4454
4515
|
method: "GET",
|
4455
4516
|
path: "/:id",
|
4456
|
-
pathParams:
|
4457
|
-
id:
|
4517
|
+
pathParams: z63.object({
|
4518
|
+
id: z63.string().uuid()
|
4458
4519
|
}),
|
4459
4520
|
responses: {
|
4460
4521
|
200: DefaultSuccessResponseSchema.extend({
|
4461
|
-
|
4522
|
+
data: MailServerSchema
|
4462
4523
|
}),
|
4463
4524
|
...DefaultResponses
|
4464
4525
|
},
|
4465
4526
|
summary: "Get a mail server by id"
|
4466
4527
|
},
|
4528
|
+
getAll: {
|
4529
|
+
method: "GET",
|
4530
|
+
path: "/",
|
4531
|
+
responses: {
|
4532
|
+
200: DefaultSuccessResponseSchema.extend({
|
4533
|
+
data: z63.array(MailServerSchema)
|
4534
|
+
}),
|
4535
|
+
...DefaultResponses
|
4536
|
+
},
|
4537
|
+
summary: "Get all mail servers"
|
4538
|
+
},
|
4467
4539
|
update: {
|
4468
4540
|
method: "PATCH",
|
4469
4541
|
path: "/:id",
|
4470
|
-
pathParams:
|
4471
|
-
id:
|
4542
|
+
pathParams: z63.object({
|
4543
|
+
id: z63.string().uuid()
|
4472
4544
|
}),
|
4473
4545
|
responses: {
|
4474
4546
|
200: DefaultSuccessResponseSchema.extend({
|
4475
|
-
|
4547
|
+
data: MailServerSchema
|
4476
4548
|
}),
|
4477
4549
|
...DefaultResponses
|
4478
4550
|
},
|
4479
|
-
body:
|
4480
|
-
summary: "Update a mail server
|
4551
|
+
body: CreateMailServerSchema.partial(),
|
4552
|
+
summary: "Update a mail server"
|
4481
4553
|
},
|
4482
4554
|
delete: {
|
4483
|
-
method: "
|
4555
|
+
method: "DELETE",
|
4484
4556
|
path: "/:id",
|
4485
|
-
pathParams:
|
4486
|
-
id:
|
4557
|
+
pathParams: z63.object({
|
4558
|
+
id: z63.string().uuid()
|
4487
4559
|
}),
|
4488
4560
|
responses: {
|
4489
4561
|
200: DefaultSuccessResponseSchema.extend({
|
4490
|
-
|
4562
|
+
data: MailServerSchema
|
4491
4563
|
}),
|
4492
4564
|
...DefaultResponses
|
4493
4565
|
},
|
4494
4566
|
body: null,
|
4495
|
-
summary: "Delete a mail server
|
4567
|
+
summary: "Delete a mail server"
|
4496
4568
|
}
|
4497
4569
|
},
|
4498
4570
|
{
|
@@ -4502,44 +4574,44 @@ var serverContract = initContract20().router(
|
|
4502
4574
|
|
4503
4575
|
// src/mail/message-contract.ts
|
4504
4576
|
import { initContract as initContract21 } from "@ts-rest/core";
|
4505
|
-
import
|
4577
|
+
import z65 from "zod";
|
4506
4578
|
|
4507
4579
|
// src/mail/schemas/message-validation.schema.ts
|
4508
|
-
import
|
4509
|
-
var MailParticipant =
|
4510
|
-
name:
|
4511
|
-
address:
|
4580
|
+
import z64 from "zod";
|
4581
|
+
var MailParticipant = z64.object({
|
4582
|
+
name: z64.string().optional(),
|
4583
|
+
address: z64.string().email()
|
4512
4584
|
});
|
4513
4585
|
var MessageContractsValidationsSchema = {
|
4514
4586
|
submit: {
|
4515
|
-
input:
|
4516
|
-
subject:
|
4517
|
-
text:
|
4518
|
-
html:
|
4587
|
+
input: z64.object({
|
4588
|
+
subject: z64.string(),
|
4589
|
+
text: z64.string(),
|
4590
|
+
html: z64.string(),
|
4519
4591
|
from: MailParticipant,
|
4520
|
-
to:
|
4521
|
-
cc:
|
4522
|
-
bcc:
|
4523
|
-
reference:
|
4524
|
-
messageId:
|
4525
|
-
action:
|
4592
|
+
to: z64.array(MailParticipant),
|
4593
|
+
cc: z64.array(MailParticipant).optional(),
|
4594
|
+
bcc: z64.array(MailParticipant).optional(),
|
4595
|
+
reference: z64.object({
|
4596
|
+
messageId: z64.string(),
|
4597
|
+
action: z64.union([z64.literal("reply"), z64.literal("forward")])
|
4526
4598
|
}).optional(),
|
4527
|
-
attachments:
|
4528
|
-
|
4529
|
-
fileType:
|
4530
|
-
fileName:
|
4531
|
-
fileKey:
|
4532
|
-
fileSize:
|
4533
|
-
bucketName:
|
4534
|
-
presignedUrl:
|
4599
|
+
attachments: z64.array(
|
4600
|
+
z64.object({
|
4601
|
+
fileType: z64.string(),
|
4602
|
+
fileName: z64.string(),
|
4603
|
+
fileKey: z64.string(),
|
4604
|
+
fileSize: z64.number(),
|
4605
|
+
bucketName: z64.string(),
|
4606
|
+
presignedUrl: z64.string()
|
4535
4607
|
})
|
4536
4608
|
).optional()
|
4537
4609
|
}),
|
4538
|
-
output:
|
4539
|
-
response:
|
4540
|
-
messageId:
|
4541
|
-
sendAt:
|
4542
|
-
queueId:
|
4610
|
+
output: z64.object({
|
4611
|
+
response: z64.string(),
|
4612
|
+
messageId: z64.string(),
|
4613
|
+
sendAt: z64.string(),
|
4614
|
+
queueId: z64.string()
|
4543
4615
|
})
|
4544
4616
|
}
|
4545
4617
|
};
|
@@ -4564,8 +4636,8 @@ var messageContract = initContract21().router(
|
|
4564
4636
|
getById: {
|
4565
4637
|
method: "GET",
|
4566
4638
|
path: "/:id",
|
4567
|
-
pathParams:
|
4568
|
-
id:
|
4639
|
+
pathParams: z65.object({
|
4640
|
+
id: z65.string()
|
4569
4641
|
}),
|
4570
4642
|
responses: {
|
4571
4643
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -4592,7 +4664,7 @@ var mailContract = initContract22().router({
|
|
4592
4664
|
|
4593
4665
|
// src/messenger/index.ts
|
4594
4666
|
import { initContract as initContract23 } from "@ts-rest/core";
|
4595
|
-
import
|
4667
|
+
import z66 from "zod";
|
4596
4668
|
var messengerContract = initContract23().router({
|
4597
4669
|
sendMessage: {
|
4598
4670
|
method: "POST",
|
@@ -4626,8 +4698,8 @@ var messengerContract = initContract23().router({
|
|
4626
4698
|
reconnect: {
|
4627
4699
|
method: "POST",
|
4628
4700
|
path: "/reconnect/:channelId",
|
4629
|
-
pathParams:
|
4630
|
-
channelId:
|
4701
|
+
pathParams: z66.object({
|
4702
|
+
channelId: z66.string().uuid()
|
4631
4703
|
}),
|
4632
4704
|
body: null,
|
4633
4705
|
responses: {
|
@@ -4639,8 +4711,8 @@ var messengerContract = initContract23().router({
|
|
4639
4711
|
delete: {
|
4640
4712
|
method: "DELETE",
|
4641
4713
|
path: "/delete/:channelId",
|
4642
|
-
pathParams:
|
4643
|
-
channelId:
|
4714
|
+
pathParams: z66.object({
|
4715
|
+
channelId: z66.string().uuid()
|
4644
4716
|
}),
|
4645
4717
|
body: null,
|
4646
4718
|
responses: {
|
@@ -4672,7 +4744,7 @@ var messengerContract = initContract23().router({
|
|
4672
4744
|
|
4673
4745
|
// src/permission/index.ts
|
4674
4746
|
import { initContract as initContract24 } from "@ts-rest/core";
|
4675
|
-
import
|
4747
|
+
import z67 from "zod";
|
4676
4748
|
var permissionContract = initContract24().router(
|
4677
4749
|
{
|
4678
4750
|
getPermissions: {
|
@@ -4680,9 +4752,9 @@ var permissionContract = initContract24().router(
|
|
4680
4752
|
path: "",
|
4681
4753
|
headers: DefaultHeaderSchema,
|
4682
4754
|
responses: {
|
4683
|
-
200:
|
4684
|
-
400:
|
4685
|
-
message:
|
4755
|
+
200: z67.object({ permissions: PermissionSchema.array() }),
|
4756
|
+
400: z67.object({
|
4757
|
+
message: z67.string()
|
4686
4758
|
}),
|
4687
4759
|
401: DefaultUnauthorizedSchema,
|
4688
4760
|
500: DefaultErrorResponseSchema
|
@@ -4695,15 +4767,15 @@ var permissionContract = initContract24().router(
|
|
4695
4767
|
|
4696
4768
|
// src/role/index.ts
|
4697
4769
|
import { initContract as initContract25 } from "@ts-rest/core";
|
4698
|
-
import
|
4770
|
+
import z69 from "zod";
|
4699
4771
|
|
4700
4772
|
// src/role/validation.ts
|
4701
|
-
import { z as
|
4702
|
-
var CreateRoleSchema =
|
4703
|
-
systemName:
|
4704
|
-
displayName:
|
4705
|
-
description:
|
4706
|
-
permissions:
|
4773
|
+
import { z as z68 } from "zod";
|
4774
|
+
var CreateRoleSchema = z68.object({
|
4775
|
+
systemName: z68.string(),
|
4776
|
+
displayName: z68.string(),
|
4777
|
+
description: z68.string().nullable(),
|
4778
|
+
permissions: z68.array(z68.string())
|
4707
4779
|
});
|
4708
4780
|
var UpdateRoleSchema = CreateRoleSchema;
|
4709
4781
|
|
@@ -4719,8 +4791,8 @@ var roleContract = initContract25().router(
|
|
4719
4791
|
201: DefaultSuccessResponseSchema.extend({
|
4720
4792
|
role: RoleSchema
|
4721
4793
|
}),
|
4722
|
-
400:
|
4723
|
-
message:
|
4794
|
+
400: z69.object({
|
4795
|
+
message: z69.string()
|
4724
4796
|
}),
|
4725
4797
|
401: DefaultUnauthorizedSchema,
|
4726
4798
|
500: DefaultErrorResponseSchema
|
@@ -4730,15 +4802,15 @@ var roleContract = initContract25().router(
|
|
4730
4802
|
getRoles: {
|
4731
4803
|
method: "GET",
|
4732
4804
|
path: "",
|
4733
|
-
query:
|
4734
|
-
page:
|
4735
|
-
pageSize:
|
4805
|
+
query: z69.object({
|
4806
|
+
page: z69.coerce.number().default(1),
|
4807
|
+
pageSize: z69.coerce.number().default(10)
|
4736
4808
|
}).optional(),
|
4737
4809
|
headers: DefaultHeaderSchema,
|
4738
4810
|
responses: {
|
4739
4811
|
200: WithPagination(RoleSchema),
|
4740
|
-
400:
|
4741
|
-
message:
|
4812
|
+
400: z69.object({
|
4813
|
+
message: z69.string()
|
4742
4814
|
}),
|
4743
4815
|
401: DefaultUnauthorizedSchema,
|
4744
4816
|
500: DefaultErrorResponseSchema
|
@@ -4748,15 +4820,15 @@ var roleContract = initContract25().router(
|
|
4748
4820
|
updateRole: {
|
4749
4821
|
method: "PATCH",
|
4750
4822
|
path: "/:id",
|
4751
|
-
pathParams:
|
4823
|
+
pathParams: z69.object({ id: z69.string() }),
|
4752
4824
|
headers: DefaultHeaderSchema,
|
4753
4825
|
body: UpdateRoleSchema,
|
4754
4826
|
responses: {
|
4755
4827
|
201: DefaultSuccessResponseSchema.extend({
|
4756
4828
|
role: RoleSchema
|
4757
4829
|
}),
|
4758
|
-
400:
|
4759
|
-
message:
|
4830
|
+
400: z69.object({
|
4831
|
+
message: z69.string()
|
4760
4832
|
}),
|
4761
4833
|
401: DefaultUnauthorizedSchema,
|
4762
4834
|
500: DefaultErrorResponseSchema
|
@@ -4766,11 +4838,11 @@ var roleContract = initContract25().router(
|
|
4766
4838
|
deleteRole: {
|
4767
4839
|
method: "DELETE",
|
4768
4840
|
path: "/:id",
|
4769
|
-
pathParams:
|
4841
|
+
pathParams: z69.object({ id: z69.string() }),
|
4770
4842
|
headers: DefaultHeaderSchema,
|
4771
4843
|
body: null,
|
4772
4844
|
responses: {
|
4773
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
4845
|
+
200: DefaultSuccessResponseSchema.extend({ message: z69.string() }),
|
4774
4846
|
500: DefaultErrorResponseSchema
|
4775
4847
|
},
|
4776
4848
|
summary: "Delete a role."
|
@@ -4781,19 +4853,19 @@ var roleContract = initContract25().router(
|
|
4781
4853
|
|
4782
4854
|
// src/tag/index.ts
|
4783
4855
|
import { initContract as initContract26 } from "@ts-rest/core";
|
4784
|
-
import
|
4856
|
+
import z71 from "zod";
|
4785
4857
|
|
4786
4858
|
// src/tag/validation.ts
|
4787
|
-
import { z as
|
4788
|
-
var CreateTagSchema =
|
4789
|
-
name:
|
4859
|
+
import { z as z70 } from "zod";
|
4860
|
+
var CreateTagSchema = z70.object({
|
4861
|
+
name: z70.string(),
|
4790
4862
|
group: TagGroupSchema
|
4791
4863
|
});
|
4792
|
-
var GetTagsSchema =
|
4864
|
+
var GetTagsSchema = z70.object({
|
4793
4865
|
group: TagGroupSchema.default("general"),
|
4794
|
-
keyword:
|
4866
|
+
keyword: z70.string()
|
4795
4867
|
}).partial().optional();
|
4796
|
-
var UpdateTagSchema =
|
4868
|
+
var UpdateTagSchema = z70.object({ name: z70.string() });
|
4797
4869
|
|
4798
4870
|
// src/tag/index.ts
|
4799
4871
|
var tagContract = initContract26().router(
|
@@ -4816,7 +4888,7 @@ var tagContract = initContract26().router(
|
|
4816
4888
|
query: GetTagsSchema,
|
4817
4889
|
responses: {
|
4818
4890
|
200: DefaultSuccessResponseSchema.extend({
|
4819
|
-
tags:
|
4891
|
+
tags: z71.array(TagSchema)
|
4820
4892
|
}),
|
4821
4893
|
500: DefaultErrorResponseSchema
|
4822
4894
|
},
|
@@ -4825,7 +4897,7 @@ var tagContract = initContract26().router(
|
|
4825
4897
|
updateTag: {
|
4826
4898
|
method: "PATCH",
|
4827
4899
|
path: "/:id",
|
4828
|
-
pathParams:
|
4900
|
+
pathParams: z71.object({ id: z71.string() }),
|
4829
4901
|
body: UpdateTagSchema,
|
4830
4902
|
responses: {
|
4831
4903
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -4838,11 +4910,11 @@ var tagContract = initContract26().router(
|
|
4838
4910
|
deleteTag: {
|
4839
4911
|
method: "DELETE",
|
4840
4912
|
path: "/:id",
|
4841
|
-
pathParams:
|
4842
|
-
body:
|
4913
|
+
pathParams: z71.object({ id: z71.string() }),
|
4914
|
+
body: z71.any().optional(),
|
4843
4915
|
// We don't need the body.
|
4844
4916
|
responses: {
|
4845
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
4917
|
+
200: DefaultSuccessResponseSchema.extend({ message: z71.string() }),
|
4846
4918
|
500: DefaultErrorResponseSchema
|
4847
4919
|
},
|
4848
4920
|
headers: DefaultHeaderSchema
|
@@ -4855,27 +4927,27 @@ var tagContract = initContract26().router(
|
|
4855
4927
|
|
4856
4928
|
// src/telephony-agent-presence-status/index.ts
|
4857
4929
|
import { initContract as initContract27 } from "@ts-rest/core";
|
4858
|
-
import
|
4930
|
+
import z74 from "zod";
|
4859
4931
|
|
4860
4932
|
// src/telephony-agent-presence-status/schema.ts
|
4861
|
-
import
|
4933
|
+
import z72 from "zod";
|
4862
4934
|
var PresenceStatusSchema = DefaultEntitySchema.extend({
|
4863
|
-
status:
|
4864
|
-
description:
|
4935
|
+
status: z72.string(),
|
4936
|
+
description: z72.string()
|
4865
4937
|
});
|
4866
4938
|
var UserPresenceStatusSchema = DefaultEntitySchema.extend({
|
4867
4939
|
user: UserSchema,
|
4868
4940
|
presenceStatus: PresenceStatusSchema,
|
4869
|
-
customPresenceStatus:
|
4941
|
+
customPresenceStatus: z72.string().nullable().optional()
|
4870
4942
|
});
|
4871
4943
|
|
4872
4944
|
// src/telephony-agent-presence-status/validation.ts
|
4873
|
-
import { z as
|
4874
|
-
var UpdateUserStatusSchema =
|
4875
|
-
userId:
|
4876
|
-
presenceStatusId:
|
4877
|
-
customPreseneStatus:
|
4878
|
-
reason:
|
4945
|
+
import { z as z73 } from "zod";
|
4946
|
+
var UpdateUserStatusSchema = z73.object({
|
4947
|
+
userId: z73.string(),
|
4948
|
+
presenceStatusId: z73.string().nullable().optional(),
|
4949
|
+
customPreseneStatus: z73.string().nullable().optional(),
|
4950
|
+
reason: z73.string()
|
4879
4951
|
});
|
4880
4952
|
|
4881
4953
|
// src/telephony-agent-presence-status/index.ts
|
@@ -4886,9 +4958,9 @@ var telephonyAgentPresenceStatusContract = initContract27().router(
|
|
4886
4958
|
path: "/presence_status",
|
4887
4959
|
headers: DefaultHeaderSchema,
|
4888
4960
|
responses: {
|
4889
|
-
200:
|
4890
|
-
400:
|
4891
|
-
message:
|
4961
|
+
200: z74.array(PresenceStatusSchema),
|
4962
|
+
400: z74.object({
|
4963
|
+
message: z74.string()
|
4892
4964
|
}),
|
4893
4965
|
401: DefaultUnauthorizedSchema,
|
4894
4966
|
500: DefaultErrorResponseSchema
|
@@ -4900,9 +4972,9 @@ var telephonyAgentPresenceStatusContract = initContract27().router(
|
|
4900
4972
|
path: "/agents/presence_status",
|
4901
4973
|
headers: DefaultHeaderSchema,
|
4902
4974
|
responses: {
|
4903
|
-
200:
|
4904
|
-
400:
|
4905
|
-
message:
|
4975
|
+
200: z74.array(UserPresenceStatusSchema),
|
4976
|
+
400: z74.object({
|
4977
|
+
message: z74.string()
|
4906
4978
|
}),
|
4907
4979
|
401: DefaultUnauthorizedSchema,
|
4908
4980
|
500: DefaultErrorResponseSchema
|
@@ -4912,12 +4984,12 @@ var telephonyAgentPresenceStatusContract = initContract27().router(
|
|
4912
4984
|
getAgentStatus: {
|
4913
4985
|
method: "GET",
|
4914
4986
|
path: "/presence_status/check_update/:userId",
|
4915
|
-
pathParams:
|
4987
|
+
pathParams: z74.object({ userId: z74.string() }),
|
4916
4988
|
headers: DefaultHeaderSchema,
|
4917
4989
|
responses: {
|
4918
4990
|
200: UserPresenceStatusSchema,
|
4919
|
-
400:
|
4920
|
-
message:
|
4991
|
+
400: z74.object({
|
4992
|
+
message: z74.string()
|
4921
4993
|
}),
|
4922
4994
|
401: DefaultUnauthorizedSchema,
|
4923
4995
|
500: DefaultErrorResponseSchema
|
@@ -4933,8 +5005,8 @@ var telephonyAgentPresenceStatusContract = initContract27().router(
|
|
4933
5005
|
200: DefaultSuccessResponseSchema.extend({
|
4934
5006
|
userPresenceStatu: UserPresenceStatusSchema
|
4935
5007
|
}),
|
4936
|
-
400:
|
4937
|
-
message:
|
5008
|
+
400: z74.object({
|
5009
|
+
message: z74.string()
|
4938
5010
|
}),
|
4939
5011
|
401: DefaultUnauthorizedSchema,
|
4940
5012
|
500: DefaultErrorResponseSchema
|
@@ -4946,62 +5018,62 @@ var telephonyAgentPresenceStatusContract = initContract27().router(
|
|
4946
5018
|
);
|
4947
5019
|
|
4948
5020
|
// src/telephony-cdr/index.ts
|
4949
|
-
import
|
5021
|
+
import z77 from "zod";
|
4950
5022
|
|
4951
5023
|
// src/telephony-cdr/validation.ts
|
4952
|
-
import
|
4953
|
-
var CreateTelephonyCdrSchema =
|
4954
|
-
uniqueCallId:
|
4955
|
-
timeStart:
|
4956
|
-
callFrom:
|
4957
|
-
callTo:
|
4958
|
-
callDuration:
|
4959
|
-
talkDuration:
|
4960
|
-
srcTrunkName:
|
4961
|
-
dstTrunkName:
|
4962
|
-
pinCode:
|
4963
|
-
status:
|
4964
|
-
type:
|
4965
|
-
recording:
|
4966
|
-
didNumber:
|
4967
|
-
agentRingTime:
|
5024
|
+
import z75 from "zod";
|
5025
|
+
var CreateTelephonyCdrSchema = z75.object({
|
5026
|
+
uniqueCallId: z75.string({ required_error: "uniqueCallId is required" }),
|
5027
|
+
timeStart: z75.string({ required_error: "timeStart is required" }),
|
5028
|
+
callFrom: z75.string({ required_error: "callFrom is required" }),
|
5029
|
+
callTo: z75.string({ required_error: "callTo is required" }),
|
5030
|
+
callDuration: z75.number().nullable(),
|
5031
|
+
talkDuration: z75.number().nullable(),
|
5032
|
+
srcTrunkName: z75.string().nullable(),
|
5033
|
+
dstTrunkName: z75.string().nullable(),
|
5034
|
+
pinCode: z75.string().nullable(),
|
5035
|
+
status: z75.string(),
|
5036
|
+
type: z75.string(),
|
5037
|
+
recording: z75.string().nullable(),
|
5038
|
+
didNumber: z75.string().nullable(),
|
5039
|
+
agentRingTime: z75.number().nullable()
|
4968
5040
|
});
|
4969
5041
|
var GetAllTelephonyCdrSchema = DefaultQueryParamsSchema.extend({
|
4970
|
-
selectedDate:
|
4971
|
-
type:
|
4972
|
-
status:
|
4973
|
-
callFrom:
|
4974
|
-
callTo:
|
4975
|
-
trunk:
|
4976
|
-
userId:
|
4977
|
-
queueStatus:
|
4978
|
-
agentIds:
|
4979
|
-
agentCallsOnly:
|
5042
|
+
selectedDate: z75.string().optional(),
|
5043
|
+
type: z75.array(z75.string()).optional(),
|
5044
|
+
status: z75.array(z75.string()).optional(),
|
5045
|
+
callFrom: z75.string().optional(),
|
5046
|
+
callTo: z75.string().optional(),
|
5047
|
+
trunk: z75.array(z75.string()).optional(),
|
5048
|
+
userId: z75.string().uuid().optional(),
|
5049
|
+
queueStatus: z75.string().optional(),
|
5050
|
+
agentIds: z75.array(z75.string().uuid()).optional(),
|
5051
|
+
agentCallsOnly: z75.coerce.boolean().optional()
|
4980
5052
|
});
|
4981
5053
|
var GetRecentTelephonyCdrSchema = DefaultQueryParamsSchema.extend({
|
4982
|
-
type:
|
4983
|
-
status:
|
4984
|
-
callFrom:
|
4985
|
-
callTo:
|
4986
|
-
result:
|
4987
|
-
callTags:
|
4988
|
-
selectedDate:
|
4989
|
-
agentId:
|
4990
|
-
contact:
|
4991
|
-
callStatus:
|
4992
|
-
queueIds:
|
4993
|
-
notes:
|
5054
|
+
type: z75.array(z75.string()).optional(),
|
5055
|
+
status: z75.array(z75.string()).optional(),
|
5056
|
+
callFrom: z75.string().optional(),
|
5057
|
+
callTo: z75.string().optional(),
|
5058
|
+
result: z75.array(z75.string()).optional(),
|
5059
|
+
callTags: z75.array(z75.string()).optional(),
|
5060
|
+
selectedDate: z75.string().optional(),
|
5061
|
+
agentId: z75.string().optional(),
|
5062
|
+
contact: z75.array(z75.string()).optional(),
|
5063
|
+
callStatus: z75.array(z75.enum(["incoming", "outgoing", "missed", "no_answered"])).optional(),
|
5064
|
+
queueIds: z75.array(z75.string()).optional(),
|
5065
|
+
notes: z75.string().optional()
|
4994
5066
|
});
|
4995
5067
|
var GetExportTelephonyCdrSchema = GetAllTelephonyCdrSchema.merge(
|
4996
|
-
|
4997
|
-
page:
|
4998
|
-
pageSize:
|
5068
|
+
z75.object({
|
5069
|
+
page: z75.coerce.number().positive().optional(),
|
5070
|
+
pageSize: z75.coerce.number().positive().optional()
|
4999
5071
|
})
|
5000
5072
|
);
|
5001
5073
|
var NullEmptyStringUndefined = ["", null, void 0];
|
5002
5074
|
var EmtptyArrayUndefined = [[], void 0];
|
5003
5075
|
var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
|
5004
|
-
reportType:
|
5076
|
+
reportType: z75.enum([
|
5005
5077
|
"extcallstatistics",
|
5006
5078
|
"extcallactivity",
|
5007
5079
|
"trunkactivity",
|
@@ -5011,52 +5083,52 @@ var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
|
|
5011
5083
|
"queueagentmisscalls",
|
5012
5084
|
"queueagentinoutcalls"
|
5013
5085
|
]),
|
5014
|
-
selectedDate:
|
5015
|
-
communicationType:
|
5016
|
-
time:
|
5017
|
-
queueList:
|
5018
|
-
queueId:
|
5019
|
-
trunkList:
|
5020
|
-
extensionList:
|
5086
|
+
selectedDate: z75.string().optional(),
|
5087
|
+
communicationType: z75.union([z75.literal("Inbound"), z75.literal("Outbound"), z75.literal("Internal")]).optional(),
|
5088
|
+
time: z75.string().optional(),
|
5089
|
+
queueList: z75.array(z75.string()).optional(),
|
5090
|
+
queueId: z75.string().optional(),
|
5091
|
+
trunkList: z75.array(z75.string()).optional(),
|
5092
|
+
extensionList: z75.array(z75.string()).optional()
|
5021
5093
|
}).superRefine((input, ctx) => {
|
5022
5094
|
if ((input.reportType === "extcallstatistics" || input.reportType === "queuesatisfaction" || input.reportType === "queueperformance" || input.reportType === "queueagentmisscalls") && NullEmptyStringUndefined.includes(input.selectedDate)) {
|
5023
5095
|
ctx.addIssue({
|
5024
|
-
code:
|
5096
|
+
code: z75.ZodIssueCode.custom,
|
5025
5097
|
path: ["selectedDate"],
|
5026
5098
|
message: "selectedDate is required."
|
5027
5099
|
});
|
5028
5100
|
}
|
5029
5101
|
if ((input.reportType === "extcallactivity" || input.reportType === "queueavgwaittalktime" || input.reportType === "trunkactivity") && NullEmptyStringUndefined.includes(input.time)) {
|
5030
5102
|
ctx.addIssue({
|
5031
|
-
code:
|
5103
|
+
code: z75.ZodIssueCode.custom,
|
5032
5104
|
path: ["time"],
|
5033
5105
|
message: "time is required."
|
5034
5106
|
});
|
5035
5107
|
}
|
5036
5108
|
if ((input.reportType === "queueavgwaittalktime" || input.reportType === "queueperformance") && EmtptyArrayUndefined.includes(input.queueList)) {
|
5037
5109
|
ctx.addIssue({
|
5038
|
-
code:
|
5110
|
+
code: z75.ZodIssueCode.custom,
|
5039
5111
|
path: ["queueList"],
|
5040
5112
|
message: "queueList is required."
|
5041
5113
|
});
|
5042
5114
|
}
|
5043
5115
|
if ((input.reportType === "queuesatisfaction" || input.reportType === "queueagentmisscalls") && NullEmptyStringUndefined.includes(input.queueId)) {
|
5044
5116
|
ctx.addIssue({
|
5045
|
-
code:
|
5117
|
+
code: z75.ZodIssueCode.custom,
|
5046
5118
|
path: ["queueId"],
|
5047
5119
|
message: "queueId is required."
|
5048
5120
|
});
|
5049
5121
|
}
|
5050
5122
|
if (input.reportType === "trunkactivity" && EmtptyArrayUndefined.includes(input.trunkList)) {
|
5051
5123
|
ctx.addIssue({
|
5052
|
-
code:
|
5124
|
+
code: z75.ZodIssueCode.custom,
|
5053
5125
|
path: ["trunkList"],
|
5054
5126
|
message: "trunkList is required."
|
5055
5127
|
});
|
5056
5128
|
}
|
5057
5129
|
if ((input.reportType === "extcallstatistics" || input.reportType === "extcallactivity") && EmtptyArrayUndefined.includes(input.extensionList)) {
|
5058
5130
|
ctx.addIssue({
|
5059
|
-
code:
|
5131
|
+
code: z75.ZodIssueCode.custom,
|
5060
5132
|
path: ["extensionList"],
|
5061
5133
|
message: "extensionList is required."
|
5062
5134
|
});
|
@@ -5067,161 +5139,161 @@ var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
|
|
5067
5139
|
import { initContract as initContract28 } from "@ts-rest/core";
|
5068
5140
|
|
5069
5141
|
// src/telephony-cdr/call-report.schema.ts
|
5070
|
-
import
|
5071
|
-
var ExtCallStatisticsListSchema =
|
5142
|
+
import z76 from "zod";
|
5143
|
+
var ExtCallStatisticsListSchema = z76.object({
|
5072
5144
|
/** @example "ext_num" */
|
5073
|
-
ext_num:
|
5145
|
+
ext_num: z76.string(),
|
5074
5146
|
/** @example "ext_name" */
|
5075
|
-
ext_name:
|
5147
|
+
ext_name: z76.string(),
|
5076
5148
|
/** @example 0 */
|
5077
|
-
answered_calls:
|
5149
|
+
answered_calls: z76.number(),
|
5078
5150
|
/** @example 0 */
|
5079
|
-
no_answer_calls:
|
5151
|
+
no_answer_calls: z76.number(),
|
5080
5152
|
/** @example 0 */
|
5081
|
-
busy_calls:
|
5153
|
+
busy_calls: z76.number(),
|
5082
5154
|
/** @example 0 */
|
5083
|
-
failed_calls:
|
5155
|
+
failed_calls: z76.number(),
|
5084
5156
|
/** @example 0 */
|
5085
|
-
voicemail_calls:
|
5157
|
+
voicemail_calls: z76.number(),
|
5086
5158
|
/** @example 0 */
|
5087
|
-
total_holding_time:
|
5159
|
+
total_holding_time: z76.number(),
|
5088
5160
|
/** @example 0 */
|
5089
|
-
total_talking_time:
|
5161
|
+
total_talking_time: z76.number(),
|
5090
5162
|
/** @example "src_name" */
|
5091
|
-
src_name:
|
5163
|
+
src_name: z76.string(),
|
5092
5164
|
/** @example 0 */
|
5093
|
-
total_call_count:
|
5165
|
+
total_call_count: z76.number(),
|
5094
5166
|
/** @example "mobile" */
|
5095
|
-
mobile:
|
5096
|
-
});
|
5097
|
-
var ExtStatisticSchema =
|
5098
|
-
ext_num:
|
5099
|
-
ext_name:
|
5100
|
-
answered_calls:
|
5101
|
-
no_answer_calls:
|
5102
|
-
busy_calls:
|
5103
|
-
failed_calls:
|
5104
|
-
voicemail_calls:
|
5105
|
-
total_holding_time:
|
5106
|
-
total_talking_time:
|
5107
|
-
time:
|
5108
|
-
mobile:
|
5109
|
-
});
|
5110
|
-
var ExtCallActivityListSchema =
|
5111
|
-
time:
|
5112
|
-
answered_calls:
|
5113
|
-
no_answer_calls:
|
5114
|
-
busy_calls:
|
5115
|
-
failed_calls:
|
5116
|
-
voicemail_calls:
|
5117
|
-
total_holding_time:
|
5118
|
-
total_talking_time:
|
5119
|
-
ext_statistics:
|
5120
|
-
});
|
5121
|
-
var TrunkList =
|
5122
|
-
trunk_name:
|
5123
|
-
total_calls:
|
5124
|
-
});
|
5125
|
-
var TrunkActivityListSchema =
|
5126
|
-
time:
|
5127
|
-
trunk_list:
|
5128
|
-
});
|
5129
|
-
var QueueAvgWaitTalkTimeListSchema =
|
5130
|
-
time:
|
5131
|
-
avg_wait_time:
|
5132
|
-
avg_talk_time:
|
5133
|
-
});
|
5134
|
-
var SatisfactionListSchema =
|
5135
|
-
press_key:
|
5136
|
-
total:
|
5137
|
-
key_point:
|
5138
|
-
});
|
5139
|
-
var agentListSchema =
|
5140
|
-
agent_name:
|
5141
|
-
agent_num:
|
5142
|
-
satisfaction_list:
|
5143
|
-
total_key:
|
5144
|
-
total_point:
|
5145
|
-
average_point:
|
5146
|
-
});
|
5147
|
-
var QueueSatisfactionSchema =
|
5148
|
-
queue_name:
|
5149
|
-
queue_num:
|
5150
|
-
satisfaction_list:
|
5151
|
-
agent_list:
|
5152
|
-
total_key:
|
5153
|
-
total_point:
|
5154
|
-
average_point:
|
5155
|
-
});
|
5156
|
-
var QueuePerformanceListSchema =
|
5157
|
-
queue:
|
5158
|
-
total_calls:
|
5159
|
-
answered_calls:
|
5160
|
-
missed_calls:
|
5161
|
-
abandoned_calls:
|
5162
|
-
average_waiting_time:
|
5163
|
-
average_talking_time:
|
5164
|
-
max_waiting_time:
|
5165
|
-
answered_rate:
|
5166
|
-
missed_rate:
|
5167
|
-
abandoned_rate:
|
5168
|
-
sla:
|
5169
|
-
});
|
5170
|
-
var QueueAgentMissCallsListSchema =
|
5171
|
-
agent_name:
|
5172
|
-
agent_num:
|
5173
|
-
time:
|
5174
|
-
total_wait_time:
|
5175
|
-
src_name:
|
5176
|
-
src_num:
|
5177
|
-
queue_status:
|
5178
|
-
polling_attempts:
|
5179
|
-
missed_reason:
|
5180
|
-
});
|
5181
|
-
var QueueAgentInOutCallsListSchema =
|
5182
|
-
agent_name:
|
5183
|
-
agent_num:
|
5184
|
-
inbound_calls:
|
5185
|
-
inbound_duration:
|
5186
|
-
outbound_calls:
|
5187
|
-
outbound_duration:
|
5188
|
-
total_calls:
|
5189
|
-
total_duration:
|
5190
|
-
average_talk_duration:
|
5191
|
-
});
|
5192
|
-
var CallReportModel =
|
5193
|
-
errcode:
|
5194
|
-
errmsg:
|
5195
|
-
total_number:
|
5196
|
-
is_12hour:
|
5197
|
-
ext_call_statistics_list:
|
5198
|
-
ext_call_activity_list:
|
5199
|
-
trunk_activity_list:
|
5200
|
-
queue_avg_wait_talk_time_list:
|
5167
|
+
mobile: z76.string()
|
5168
|
+
});
|
5169
|
+
var ExtStatisticSchema = z76.object({
|
5170
|
+
ext_num: z76.string(),
|
5171
|
+
ext_name: z76.string(),
|
5172
|
+
answered_calls: z76.number(),
|
5173
|
+
no_answer_calls: z76.number(),
|
5174
|
+
busy_calls: z76.number(),
|
5175
|
+
failed_calls: z76.number(),
|
5176
|
+
voicemail_calls: z76.number(),
|
5177
|
+
total_holding_time: z76.number(),
|
5178
|
+
total_talking_time: z76.number(),
|
5179
|
+
time: z76.number(),
|
5180
|
+
mobile: z76.string()
|
5181
|
+
});
|
5182
|
+
var ExtCallActivityListSchema = z76.object({
|
5183
|
+
time: z76.number(),
|
5184
|
+
answered_calls: z76.number(),
|
5185
|
+
no_answer_calls: z76.number(),
|
5186
|
+
busy_calls: z76.number(),
|
5187
|
+
failed_calls: z76.number(),
|
5188
|
+
voicemail_calls: z76.number(),
|
5189
|
+
total_holding_time: z76.number(),
|
5190
|
+
total_talking_time: z76.number(),
|
5191
|
+
ext_statistics: z76.array(ExtStatisticSchema)
|
5192
|
+
});
|
5193
|
+
var TrunkList = z76.object({
|
5194
|
+
trunk_name: z76.string(),
|
5195
|
+
total_calls: z76.number()
|
5196
|
+
});
|
5197
|
+
var TrunkActivityListSchema = z76.object({
|
5198
|
+
time: z76.number(),
|
5199
|
+
trunk_list: z76.array(TrunkList)
|
5200
|
+
});
|
5201
|
+
var QueueAvgWaitTalkTimeListSchema = z76.object({
|
5202
|
+
time: z76.number(),
|
5203
|
+
avg_wait_time: z76.number(),
|
5204
|
+
avg_talk_time: z76.number()
|
5205
|
+
});
|
5206
|
+
var SatisfactionListSchema = z76.object({
|
5207
|
+
press_key: z76.string(),
|
5208
|
+
total: z76.number(),
|
5209
|
+
key_point: z76.number().optional()
|
5210
|
+
});
|
5211
|
+
var agentListSchema = z76.object({
|
5212
|
+
agent_name: z76.string(),
|
5213
|
+
agent_num: z76.string(),
|
5214
|
+
satisfaction_list: z76.array(SatisfactionListSchema).optional(),
|
5215
|
+
total_key: z76.number().optional(),
|
5216
|
+
total_point: z76.number().optional(),
|
5217
|
+
average_point: z76.number().optional()
|
5218
|
+
});
|
5219
|
+
var QueueSatisfactionSchema = z76.object({
|
5220
|
+
queue_name: z76.string(),
|
5221
|
+
queue_num: z76.string(),
|
5222
|
+
satisfaction_list: z76.array(SatisfactionListSchema).optional(),
|
5223
|
+
agent_list: z76.array(agentListSchema).optional(),
|
5224
|
+
total_key: z76.number().optional(),
|
5225
|
+
total_point: z76.number().optional(),
|
5226
|
+
average_point: z76.number().optional()
|
5227
|
+
});
|
5228
|
+
var QueuePerformanceListSchema = z76.object({
|
5229
|
+
queue: z76.string(),
|
5230
|
+
total_calls: z76.number(),
|
5231
|
+
answered_calls: z76.number(),
|
5232
|
+
missed_calls: z76.number(),
|
5233
|
+
abandoned_calls: z76.number(),
|
5234
|
+
average_waiting_time: z76.number(),
|
5235
|
+
average_talking_time: z76.number(),
|
5236
|
+
max_waiting_time: z76.number(),
|
5237
|
+
answered_rate: z76.number(),
|
5238
|
+
missed_rate: z76.number(),
|
5239
|
+
abandoned_rate: z76.number(),
|
5240
|
+
sla: z76.number()
|
5241
|
+
});
|
5242
|
+
var QueueAgentMissCallsListSchema = z76.object({
|
5243
|
+
agent_name: z76.string(),
|
5244
|
+
agent_num: z76.string(),
|
5245
|
+
time: z76.string(),
|
5246
|
+
total_wait_time: z76.number(),
|
5247
|
+
src_name: z76.string(),
|
5248
|
+
src_num: z76.string(),
|
5249
|
+
queue_status: z76.string(),
|
5250
|
+
polling_attempts: z76.number(),
|
5251
|
+
missed_reason: z76.string()
|
5252
|
+
});
|
5253
|
+
var QueueAgentInOutCallsListSchema = z76.object({
|
5254
|
+
agent_name: z76.string(),
|
5255
|
+
agent_num: z76.string(),
|
5256
|
+
inbound_calls: z76.number(),
|
5257
|
+
inbound_duration: z76.number(),
|
5258
|
+
outbound_calls: z76.number(),
|
5259
|
+
outbound_duration: z76.number(),
|
5260
|
+
total_calls: z76.number(),
|
5261
|
+
total_duration: z76.number(),
|
5262
|
+
average_talk_duration: z76.number()
|
5263
|
+
});
|
5264
|
+
var CallReportModel = z76.object({
|
5265
|
+
errcode: z76.number(),
|
5266
|
+
errmsg: z76.string(),
|
5267
|
+
total_number: z76.number(),
|
5268
|
+
is_12hour: z76.number().optional(),
|
5269
|
+
ext_call_statistics_list: z76.array(ExtCallStatisticsListSchema).optional(),
|
5270
|
+
ext_call_activity_list: z76.array(ExtCallActivityListSchema).optional(),
|
5271
|
+
trunk_activity_list: z76.array(TrunkActivityListSchema).optional(),
|
5272
|
+
queue_avg_wait_talk_time_list: z76.array(QueueAvgWaitTalkTimeListSchema).optional(),
|
5201
5273
|
queue_satisfaction: QueueSatisfactionSchema.optional(),
|
5202
|
-
queue_performance_list:
|
5203
|
-
queue_agent_miss_calls_list:
|
5204
|
-
queue_agent_in_out_calls_list:
|
5205
|
-
callback_result:
|
5206
|
-
page:
|
5207
|
-
pageSize:
|
5208
|
-
});
|
5209
|
-
var CallReportSchema =
|
5210
|
-
errcode:
|
5211
|
-
errmsg:
|
5212
|
-
total_number:
|
5213
|
-
is_12hour:
|
5214
|
-
ext_call_statistics_list:
|
5215
|
-
ext_call_activity_list:
|
5216
|
-
trunk_activity_list:
|
5217
|
-
queue_avg_wait_talk_time_list:
|
5274
|
+
queue_performance_list: z76.array(QueuePerformanceListSchema).optional(),
|
5275
|
+
queue_agent_miss_calls_list: z76.array(QueueAgentMissCallsListSchema).optional(),
|
5276
|
+
queue_agent_in_out_calls_list: z76.array(QueueAgentInOutCallsListSchema).optional(),
|
5277
|
+
callback_result: z76.string(),
|
5278
|
+
page: z76.number().optional(),
|
5279
|
+
pageSize: z76.number().optional()
|
5280
|
+
});
|
5281
|
+
var CallReportSchema = z76.object({
|
5282
|
+
errcode: z76.number(),
|
5283
|
+
errmsg: z76.string(),
|
5284
|
+
total_number: z76.number(),
|
5285
|
+
is_12hour: z76.number().optional(),
|
5286
|
+
ext_call_statistics_list: z76.array(ExtCallStatisticsListSchema).optional(),
|
5287
|
+
ext_call_activity_list: z76.array(ExtCallActivityListSchema).optional(),
|
5288
|
+
trunk_activity_list: z76.array(TrunkActivityListSchema).optional(),
|
5289
|
+
queue_avg_wait_talk_time_list: z76.array(QueueAvgWaitTalkTimeListSchema).optional(),
|
5218
5290
|
queue_satisfaction: QueueSatisfactionSchema.optional(),
|
5219
|
-
queue_performance_list:
|
5220
|
-
queue_agent_miss_calls_list:
|
5221
|
-
queue_agent_in_out_calls_list:
|
5222
|
-
callback_result:
|
5223
|
-
page:
|
5224
|
-
pageSize:
|
5291
|
+
queue_performance_list: z76.array(QueuePerformanceListSchema).optional(),
|
5292
|
+
queue_agent_miss_calls_list: z76.array(QueueAgentMissCallsListSchema).optional(),
|
5293
|
+
queue_agent_in_out_calls_list: z76.array(QueueAgentInOutCallsListSchema).optional(),
|
5294
|
+
callback_result: z76.string(),
|
5295
|
+
page: z76.number().optional(),
|
5296
|
+
pageSize: z76.number().optional()
|
5225
5297
|
});
|
5226
5298
|
|
5227
5299
|
// src/telephony-cdr/index.ts
|
@@ -5234,10 +5306,10 @@ var telephonyCdrContract = initContract28().router(
|
|
5234
5306
|
query: GetAllTelephonyCdrSchema,
|
5235
5307
|
responses: {
|
5236
5308
|
200: DefaultSuccessResponseSchema.extend({
|
5237
|
-
total:
|
5238
|
-
page:
|
5239
|
-
pageSize:
|
5240
|
-
telephonyCdrs:
|
5309
|
+
total: z77.number(),
|
5310
|
+
page: z77.number(),
|
5311
|
+
pageSize: z77.number(),
|
5312
|
+
telephonyCdrs: z77.array(TelephonyCdrSchema)
|
5241
5313
|
}),
|
5242
5314
|
401: DefaultUnauthorizedSchema
|
5243
5315
|
},
|
@@ -5250,10 +5322,10 @@ var telephonyCdrContract = initContract28().router(
|
|
5250
5322
|
query: GetAllTelephonyCdrSchema,
|
5251
5323
|
responses: {
|
5252
5324
|
200: DefaultSuccessResponseSchema.extend({
|
5253
|
-
total:
|
5254
|
-
page:
|
5255
|
-
pageSize:
|
5256
|
-
telephonyCdrs:
|
5325
|
+
total: z77.number(),
|
5326
|
+
page: z77.number(),
|
5327
|
+
pageSize: z77.number(),
|
5328
|
+
telephonyCdrs: z77.array(TelephonyCdrSchema)
|
5257
5329
|
}),
|
5258
5330
|
401: DefaultUnauthorizedSchema
|
5259
5331
|
},
|
@@ -5266,10 +5338,10 @@ var telephonyCdrContract = initContract28().router(
|
|
5266
5338
|
query: GetRecentTelephonyCdrSchema,
|
5267
5339
|
responses: {
|
5268
5340
|
200: DefaultSuccessResponseSchema.extend({
|
5269
|
-
total:
|
5270
|
-
page:
|
5271
|
-
pageSize:
|
5272
|
-
telephonyCdrs:
|
5341
|
+
total: z77.number(),
|
5342
|
+
page: z77.number(),
|
5343
|
+
pageSize: z77.number(),
|
5344
|
+
telephonyCdrs: z77.array(TelephonyCdrSchema)
|
5273
5345
|
}),
|
5274
5346
|
401: DefaultUnauthorizedSchema
|
5275
5347
|
},
|
@@ -5361,35 +5433,35 @@ var telephonyCdrContract = initContract28().router(
|
|
5361
5433
|
|
5362
5434
|
// src/telephony-extension/index.ts
|
5363
5435
|
import { initContract as initContract29 } from "@ts-rest/core";
|
5364
|
-
import
|
5436
|
+
import z79 from "zod";
|
5365
5437
|
|
5366
5438
|
// src/telephony-extension/schema.ts
|
5367
|
-
import
|
5368
|
-
var TelephonyExtensionSchema3 =
|
5369
|
-
errcode:
|
5370
|
-
errmsg:
|
5371
|
-
total_number:
|
5372
|
-
data:
|
5373
|
-
|
5374
|
-
id:
|
5375
|
-
online_status:
|
5376
|
-
fx_phone:
|
5377
|
-
sip_phone:
|
5378
|
-
status:
|
5379
|
-
ext_dev_type:
|
5380
|
-
}),
|
5381
|
-
linkus_desktop:
|
5382
|
-
linkus_mobile:
|
5383
|
-
linkus_web:
|
5384
|
-
status:
|
5385
|
-
ext_dev_type:
|
5439
|
+
import z78 from "zod";
|
5440
|
+
var TelephonyExtensionSchema3 = z78.object({
|
5441
|
+
errcode: z78.coerce.number(),
|
5442
|
+
errmsg: z78.string(),
|
5443
|
+
total_number: z78.coerce.number(),
|
5444
|
+
data: z78.array(
|
5445
|
+
z78.object({
|
5446
|
+
id: z78.coerce.number(),
|
5447
|
+
online_status: z78.object({
|
5448
|
+
fx_phone: z78.object({ status: z78.coerce.number() }),
|
5449
|
+
sip_phone: z78.object({
|
5450
|
+
status: z78.coerce.number(),
|
5451
|
+
ext_dev_type: z78.string().optional()
|
5452
|
+
}),
|
5453
|
+
linkus_desktop: z78.object({ status: z78.coerce.number() }),
|
5454
|
+
linkus_mobile: z78.object({ status: z78.coerce.number() }),
|
5455
|
+
linkus_web: z78.object({
|
5456
|
+
status: z78.coerce.number(),
|
5457
|
+
ext_dev_type: z78.string().optional()
|
5386
5458
|
})
|
5387
5459
|
}).optional(),
|
5388
|
-
presence_status:
|
5389
|
-
number:
|
5390
|
-
caller_id_name:
|
5391
|
-
role_name:
|
5392
|
-
email_addr:
|
5460
|
+
presence_status: z78.string().optional(),
|
5461
|
+
number: z78.string().optional(),
|
5462
|
+
caller_id_name: z78.string().optional(),
|
5463
|
+
role_name: z78.string().optional(),
|
5464
|
+
email_addr: z78.string().optional()
|
5393
5465
|
})
|
5394
5466
|
)
|
5395
5467
|
});
|
@@ -5404,8 +5476,8 @@ var telephonyExtensionContract = initContract29().router(
|
|
5404
5476
|
query: null,
|
5405
5477
|
responses: {
|
5406
5478
|
200: TelephonyExtensionSchema3,
|
5407
|
-
400:
|
5408
|
-
message:
|
5479
|
+
400: z79.object({
|
5480
|
+
message: z79.string()
|
5409
5481
|
}),
|
5410
5482
|
401: DefaultUnauthorizedSchema,
|
5411
5483
|
500: DefaultErrorResponseSchema
|
@@ -5418,10 +5490,10 @@ var telephonyExtensionContract = initContract29().router(
|
|
5418
5490
|
|
5419
5491
|
// src/ticket/index.ts
|
5420
5492
|
import { initContract as initContract30 } from "@ts-rest/core";
|
5421
|
-
import
|
5493
|
+
import z81 from "zod";
|
5422
5494
|
|
5423
5495
|
// src/ticket/validation.ts
|
5424
|
-
import
|
5496
|
+
import z80 from "zod";
|
5425
5497
|
var addErrorMessage2 = (field) => {
|
5426
5498
|
return field.refine(
|
5427
5499
|
({ isRequired, value }) => {
|
@@ -5439,106 +5511,106 @@ var addErrorMessage2 = (field) => {
|
|
5439
5511
|
}
|
5440
5512
|
);
|
5441
5513
|
};
|
5442
|
-
var BaseSchema3 =
|
5443
|
-
isRequired:
|
5444
|
-
attributeId:
|
5514
|
+
var BaseSchema3 = z80.object({
|
5515
|
+
isRequired: z80.boolean(),
|
5516
|
+
attributeId: z80.string()
|
5445
5517
|
});
|
5446
5518
|
var SingleValue2 = addErrorMessage2(
|
5447
5519
|
BaseSchema3.extend({
|
5448
|
-
value:
|
5520
|
+
value: z80.string()
|
5449
5521
|
})
|
5450
5522
|
);
|
5451
|
-
var CreateTicketValidationSchema =
|
5523
|
+
var CreateTicketValidationSchema = z80.object({
|
5452
5524
|
title: SingleValue2,
|
5453
5525
|
description: SingleValue2,
|
5454
5526
|
status: SingleValue2,
|
5455
5527
|
type: SingleValue2,
|
5456
5528
|
priority: SingleValue2,
|
5457
5529
|
contact: SingleValue2,
|
5458
|
-
assignee:
|
5459
|
-
isRequired:
|
5460
|
-
attributeId:
|
5461
|
-
value:
|
5530
|
+
assignee: z80.object({
|
5531
|
+
isRequired: z80.boolean(),
|
5532
|
+
attributeId: z80.string(),
|
5533
|
+
value: z80.string()
|
5462
5534
|
}),
|
5463
5535
|
channel: SingleValue2,
|
5464
|
-
tags: addErrorMessage2(BaseSchema3.extend({ value:
|
5465
|
-
categories: BaseSchema3.extend({ value:
|
5466
|
-
customFields:
|
5536
|
+
tags: addErrorMessage2(BaseSchema3.extend({ value: z80.array(z80.string()) })),
|
5537
|
+
categories: BaseSchema3.extend({ value: z80.array(z80.string()) }),
|
5538
|
+
customFields: z80.array(
|
5467
5539
|
addErrorMessage2(
|
5468
5540
|
BaseSchema3.extend({
|
5469
|
-
value:
|
5470
|
-
type:
|
5471
|
-
isDefaultAttribute:
|
5541
|
+
value: z80.union([z80.string(), z80.array(z80.string())]),
|
5542
|
+
type: z80.string(),
|
5543
|
+
isDefaultAttribute: z80.boolean()
|
5472
5544
|
})
|
5473
5545
|
)
|
5474
5546
|
),
|
5475
|
-
reasonToAssign:
|
5547
|
+
reasonToAssign: z80.object({ value: z80.string() }).optional()
|
5476
5548
|
});
|
5477
5549
|
var UpdateTicketValidationSchema = CreateTicketValidationSchema;
|
5478
|
-
var TicketAttachmentRecordSchema =
|
5479
|
-
bucketName:
|
5480
|
-
fileKey:
|
5481
|
-
fileName:
|
5482
|
-
fileSize:
|
5483
|
-
url:
|
5484
|
-
});
|
5485
|
-
var CreateTicketAttachmentRecordsSchema =
|
5486
|
-
ticketId:
|
5487
|
-
attributeId:
|
5488
|
-
ticketAttachmentRecords:
|
5489
|
-
});
|
5490
|
-
var TicketParamsSchema =
|
5491
|
-
page:
|
5492
|
-
pageSize:
|
5493
|
-
});
|
5494
|
-
var CustomFieldQuery =
|
5495
|
-
attributeId:
|
5496
|
-
type:
|
5497
|
-
value:
|
5498
|
-
});
|
5499
|
-
var GetAllTicketQuerySchema =
|
5500
|
-
page:
|
5501
|
-
pageSize:
|
5502
|
-
selectedDate:
|
5503
|
-
keyword:
|
5504
|
-
title:
|
5505
|
-
description:
|
5506
|
-
status:
|
5507
|
-
priority:
|
5508
|
-
channel:
|
5509
|
-
type:
|
5510
|
-
ticketType:
|
5511
|
-
contact:
|
5512
|
-
tags:
|
5513
|
-
categories:
|
5514
|
-
assignee:
|
5515
|
-
customFields:
|
5516
|
-
|
5517
|
-
attributeId:
|
5518
|
-
type:
|
5519
|
-
value:
|
5550
|
+
var TicketAttachmentRecordSchema = z80.object({
|
5551
|
+
bucketName: z80.string(),
|
5552
|
+
fileKey: z80.string(),
|
5553
|
+
fileName: z80.string(),
|
5554
|
+
fileSize: z80.coerce.number(),
|
5555
|
+
url: z80.string()
|
5556
|
+
});
|
5557
|
+
var CreateTicketAttachmentRecordsSchema = z80.object({
|
5558
|
+
ticketId: z80.string(),
|
5559
|
+
attributeId: z80.string(),
|
5560
|
+
ticketAttachmentRecords: z80.array(TicketAttachmentRecordSchema)
|
5561
|
+
});
|
5562
|
+
var TicketParamsSchema = z80.object({
|
5563
|
+
page: z80.coerce.number().default(1),
|
5564
|
+
pageSize: z80.coerce.number().default(10)
|
5565
|
+
});
|
5566
|
+
var CustomFieldQuery = z80.object({
|
5567
|
+
attributeId: z80.string(),
|
5568
|
+
type: z80.string(),
|
5569
|
+
value: z80.union([z80.string(), z80.array(z80.string())])
|
5570
|
+
});
|
5571
|
+
var GetAllTicketQuerySchema = z80.object({
|
5572
|
+
page: z80.string().transform((value) => Number(value)),
|
5573
|
+
pageSize: z80.string().transform((value) => Number(value)),
|
5574
|
+
selectedDate: z80.string(),
|
5575
|
+
keyword: z80.string(),
|
5576
|
+
title: z80.string(),
|
5577
|
+
description: z80.string(),
|
5578
|
+
status: z80.array(z80.string()),
|
5579
|
+
priority: z80.array(z80.string()),
|
5580
|
+
channel: z80.array(z80.string()),
|
5581
|
+
type: z80.array(z80.string()),
|
5582
|
+
ticketType: z80.array(z80.string()),
|
5583
|
+
contact: z80.array(z80.string()),
|
5584
|
+
tags: z80.array(z80.string().uuid()),
|
5585
|
+
categories: z80.array(z80.string().uuid()),
|
5586
|
+
assignee: z80.array(z80.string().uuid()),
|
5587
|
+
customFields: z80.array(
|
5588
|
+
z80.object({
|
5589
|
+
attributeId: z80.string().uuid(),
|
5590
|
+
type: z80.string(),
|
5591
|
+
value: z80.union([z80.string(), z80.array(z80.string())])
|
5520
5592
|
})
|
5521
5593
|
)
|
5522
5594
|
}).partial();
|
5523
|
-
var ExportAllTicketQuerySchema =
|
5524
|
-
agent:
|
5525
|
-
selectedDate:
|
5526
|
-
keyword:
|
5527
|
-
title:
|
5528
|
-
description:
|
5529
|
-
status:
|
5530
|
-
priority:
|
5531
|
-
channel:
|
5532
|
-
type:
|
5533
|
-
ticketType:
|
5534
|
-
contact:
|
5535
|
-
tags:
|
5536
|
-
categories:
|
5537
|
-
customFields:
|
5538
|
-
|
5539
|
-
attributeId:
|
5540
|
-
type:
|
5541
|
-
value:
|
5595
|
+
var ExportAllTicketQuerySchema = z80.object({
|
5596
|
+
agent: z80.array(z80.string()),
|
5597
|
+
selectedDate: z80.string(),
|
5598
|
+
keyword: z80.string(),
|
5599
|
+
title: z80.string(),
|
5600
|
+
description: z80.string(),
|
5601
|
+
status: z80.array(z80.string()),
|
5602
|
+
priority: z80.array(z80.string()),
|
5603
|
+
channel: z80.array(z80.string()),
|
5604
|
+
type: z80.array(z80.string()),
|
5605
|
+
ticketType: z80.array(z80.string()),
|
5606
|
+
contact: z80.array(z80.string()),
|
5607
|
+
tags: z80.array(z80.string()),
|
5608
|
+
categories: z80.array(z80.string()),
|
5609
|
+
customFields: z80.array(
|
5610
|
+
z80.object({
|
5611
|
+
attributeId: z80.string().uuid(),
|
5612
|
+
type: z80.string(),
|
5613
|
+
value: z80.union([z80.string(), z80.array(z80.string())])
|
5542
5614
|
})
|
5543
5615
|
)
|
5544
5616
|
}).partial();
|
@@ -5554,14 +5626,14 @@ var ticketContract = initContract30().router(
|
|
5554
5626
|
201: DefaultSuccessResponseSchema.extend({
|
5555
5627
|
data: TicketSchema
|
5556
5628
|
}),
|
5557
|
-
400:
|
5558
|
-
message:
|
5629
|
+
400: z81.object({
|
5630
|
+
message: z81.string()
|
5559
5631
|
}),
|
5560
|
-
409:
|
5561
|
-
message:
|
5632
|
+
409: z81.object({
|
5633
|
+
message: z81.string()
|
5562
5634
|
}),
|
5563
|
-
500:
|
5564
|
-
message:
|
5635
|
+
500: z81.object({
|
5636
|
+
message: z81.string()
|
5565
5637
|
}),
|
5566
5638
|
401: DefaultUnauthorizedSchema,
|
5567
5639
|
404: DefaultNotFoundSchema,
|
@@ -5582,8 +5654,8 @@ var ticketContract = initContract30().router(
|
|
5582
5654
|
TicketSchema
|
5583
5655
|
)
|
5584
5656
|
}),
|
5585
|
-
400:
|
5586
|
-
message:
|
5657
|
+
400: z81.object({
|
5658
|
+
message: z81.string()
|
5587
5659
|
}),
|
5588
5660
|
401: DefaultUnauthorizedSchema,
|
5589
5661
|
500: DefaultErrorResponseSchema
|
@@ -5593,14 +5665,14 @@ var ticketContract = initContract30().router(
|
|
5593
5665
|
getTicketById: {
|
5594
5666
|
method: "GET",
|
5595
5667
|
path: "/:id",
|
5596
|
-
pathParams:
|
5668
|
+
pathParams: z81.object({ id: z81.string() }),
|
5597
5669
|
headers: DefaultHeaderSchema,
|
5598
5670
|
responses: {
|
5599
5671
|
200: DefaultSuccessResponseSchema.extend({
|
5600
5672
|
data: TicketSchema
|
5601
5673
|
}),
|
5602
|
-
400:
|
5603
|
-
message:
|
5674
|
+
400: z81.object({
|
5675
|
+
message: z81.string()
|
5604
5676
|
}),
|
5605
5677
|
401: DefaultUnauthorizedSchema,
|
5606
5678
|
500: DefaultErrorResponseSchema
|
@@ -5610,15 +5682,15 @@ var ticketContract = initContract30().router(
|
|
5610
5682
|
getTicketByContactId: {
|
5611
5683
|
method: "GET",
|
5612
5684
|
path: "/contact/:id",
|
5613
|
-
pathParams:
|
5685
|
+
pathParams: z81.object({ id: z81.string() }),
|
5614
5686
|
query: TicketParamsSchema,
|
5615
5687
|
headers: DefaultHeaderSchema,
|
5616
5688
|
responses: {
|
5617
5689
|
200: DefaultSuccessResponseSchema.extend({
|
5618
5690
|
data: WithPagination(TicketSchema)
|
5619
5691
|
}),
|
5620
|
-
400:
|
5621
|
-
message:
|
5692
|
+
400: z81.object({
|
5693
|
+
message: z81.string()
|
5622
5694
|
}),
|
5623
5695
|
401: DefaultUnauthorizedSchema,
|
5624
5696
|
500: DefaultErrorResponseSchema
|
@@ -5628,21 +5700,21 @@ var ticketContract = initContract30().router(
|
|
5628
5700
|
updateTicket: {
|
5629
5701
|
method: "PATCH",
|
5630
5702
|
path: "/:id",
|
5631
|
-
pathParams:
|
5703
|
+
pathParams: z81.object({ id: z81.string() }),
|
5632
5704
|
body: UpdateTicketValidationSchema,
|
5633
5705
|
headers: DefaultHeaderSchema,
|
5634
5706
|
responses: {
|
5635
5707
|
201: DefaultSuccessResponseSchema.extend({
|
5636
5708
|
data: TicketSchema
|
5637
5709
|
}),
|
5638
|
-
400:
|
5639
|
-
message:
|
5710
|
+
400: z81.object({
|
5711
|
+
message: z81.string()
|
5640
5712
|
}),
|
5641
|
-
409:
|
5642
|
-
message:
|
5713
|
+
409: z81.object({
|
5714
|
+
message: z81.string()
|
5643
5715
|
}),
|
5644
|
-
500:
|
5645
|
-
message:
|
5716
|
+
500: z81.object({
|
5717
|
+
message: z81.string()
|
5646
5718
|
}),
|
5647
5719
|
401: DefaultUnauthorizedSchema,
|
5648
5720
|
404: DefaultNotFoundSchema,
|
@@ -5653,11 +5725,11 @@ var ticketContract = initContract30().router(
|
|
5653
5725
|
deleteTicket: {
|
5654
5726
|
method: "DELETE",
|
5655
5727
|
path: "/:id",
|
5656
|
-
pathParams:
|
5728
|
+
pathParams: z81.object({ id: z81.string() }),
|
5657
5729
|
headers: DefaultHeaderSchema,
|
5658
5730
|
body: null,
|
5659
5731
|
responses: {
|
5660
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5732
|
+
200: DefaultSuccessResponseSchema.extend({ message: z81.string() }),
|
5661
5733
|
500: DefaultErrorResponseSchema
|
5662
5734
|
},
|
5663
5735
|
summary: "Delete a extension."
|
@@ -5665,19 +5737,19 @@ var ticketContract = initContract30().router(
|
|
5665
5737
|
updateDescription: {
|
5666
5738
|
method: "PATCH",
|
5667
5739
|
path: "/description/update/:id",
|
5668
|
-
pathParams:
|
5669
|
-
body:
|
5740
|
+
pathParams: z81.object({ id: z81.string() }),
|
5741
|
+
body: z81.object({ description: z81.string() }),
|
5670
5742
|
headers: DefaultHeaderSchema,
|
5671
5743
|
responses: {
|
5672
|
-
201: DefaultSuccessResponseSchema.extend({ message:
|
5673
|
-
400:
|
5674
|
-
message:
|
5744
|
+
201: DefaultSuccessResponseSchema.extend({ message: z81.string() }),
|
5745
|
+
400: z81.object({
|
5746
|
+
message: z81.string()
|
5675
5747
|
}),
|
5676
|
-
409:
|
5677
|
-
message:
|
5748
|
+
409: z81.object({
|
5749
|
+
message: z81.string()
|
5678
5750
|
}),
|
5679
|
-
500:
|
5680
|
-
message:
|
5751
|
+
500: z81.object({
|
5752
|
+
message: z81.string()
|
5681
5753
|
}),
|
5682
5754
|
401: DefaultUnauthorizedSchema,
|
5683
5755
|
404: DefaultNotFoundSchema,
|
@@ -5688,19 +5760,19 @@ var ticketContract = initContract30().router(
|
|
5688
5760
|
updateTitle: {
|
5689
5761
|
method: "PATCH",
|
5690
5762
|
path: "/title/update/:id",
|
5691
|
-
pathParams:
|
5692
|
-
body:
|
5763
|
+
pathParams: z81.object({ id: z81.string() }),
|
5764
|
+
body: z81.object({ title: z81.string() }),
|
5693
5765
|
headers: DefaultHeaderSchema,
|
5694
5766
|
responses: {
|
5695
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5696
|
-
400:
|
5697
|
-
message:
|
5767
|
+
200: DefaultSuccessResponseSchema.extend({ message: z81.string() }),
|
5768
|
+
400: z81.object({
|
5769
|
+
message: z81.string()
|
5698
5770
|
}),
|
5699
|
-
409:
|
5700
|
-
message:
|
5771
|
+
409: z81.object({
|
5772
|
+
message: z81.string()
|
5701
5773
|
}),
|
5702
|
-
500:
|
5703
|
-
message:
|
5774
|
+
500: z81.object({
|
5775
|
+
message: z81.string()
|
5704
5776
|
}),
|
5705
5777
|
401: DefaultUnauthorizedSchema,
|
5706
5778
|
404: DefaultNotFoundSchema,
|
@@ -5711,19 +5783,19 @@ var ticketContract = initContract30().router(
|
|
5711
5783
|
updateType: {
|
5712
5784
|
method: "PATCH",
|
5713
5785
|
path: "/type/update/:id",
|
5714
|
-
pathParams:
|
5715
|
-
body:
|
5786
|
+
pathParams: z81.object({ id: z81.string() }),
|
5787
|
+
body: z81.object({ type: z81.string() }),
|
5716
5788
|
headers: DefaultHeaderSchema,
|
5717
5789
|
responses: {
|
5718
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5719
|
-
400:
|
5720
|
-
message:
|
5790
|
+
200: DefaultSuccessResponseSchema.extend({ message: z81.string() }),
|
5791
|
+
400: z81.object({
|
5792
|
+
message: z81.string()
|
5721
5793
|
}),
|
5722
|
-
409:
|
5723
|
-
message:
|
5794
|
+
409: z81.object({
|
5795
|
+
message: z81.string()
|
5724
5796
|
}),
|
5725
|
-
500:
|
5726
|
-
message:
|
5797
|
+
500: z81.object({
|
5798
|
+
message: z81.string()
|
5727
5799
|
}),
|
5728
5800
|
401: DefaultUnauthorizedSchema,
|
5729
5801
|
404: DefaultNotFoundSchema,
|
@@ -5734,19 +5806,19 @@ var ticketContract = initContract30().router(
|
|
5734
5806
|
updateStatus: {
|
5735
5807
|
method: "PATCH",
|
5736
5808
|
path: "/status/update/:id",
|
5737
|
-
pathParams:
|
5738
|
-
body:
|
5809
|
+
pathParams: z81.object({ id: z81.string() }),
|
5810
|
+
body: z81.object({ status: z81.string() }),
|
5739
5811
|
headers: DefaultHeaderSchema,
|
5740
5812
|
responses: {
|
5741
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5742
|
-
400:
|
5743
|
-
message:
|
5813
|
+
200: DefaultSuccessResponseSchema.extend({ message: z81.string() }),
|
5814
|
+
400: z81.object({
|
5815
|
+
message: z81.string()
|
5744
5816
|
}),
|
5745
|
-
409:
|
5746
|
-
message:
|
5817
|
+
409: z81.object({
|
5818
|
+
message: z81.string()
|
5747
5819
|
}),
|
5748
|
-
500:
|
5749
|
-
message:
|
5820
|
+
500: z81.object({
|
5821
|
+
message: z81.string()
|
5750
5822
|
}),
|
5751
5823
|
401: DefaultUnauthorizedSchema,
|
5752
5824
|
404: DefaultNotFoundSchema,
|
@@ -5757,19 +5829,19 @@ var ticketContract = initContract30().router(
|
|
5757
5829
|
updatePriority: {
|
5758
5830
|
method: "PATCH",
|
5759
5831
|
path: "/priority/update/:id",
|
5760
|
-
pathParams:
|
5761
|
-
body:
|
5832
|
+
pathParams: z81.object({ id: z81.string() }),
|
5833
|
+
body: z81.object({ priority: z81.string() }),
|
5762
5834
|
headers: DefaultHeaderSchema,
|
5763
5835
|
responses: {
|
5764
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5765
|
-
400:
|
5766
|
-
message:
|
5836
|
+
200: DefaultSuccessResponseSchema.extend({ message: z81.string() }),
|
5837
|
+
400: z81.object({
|
5838
|
+
message: z81.string()
|
5767
5839
|
}),
|
5768
|
-
409:
|
5769
|
-
message:
|
5840
|
+
409: z81.object({
|
5841
|
+
message: z81.string()
|
5770
5842
|
}),
|
5771
|
-
500:
|
5772
|
-
message:
|
5843
|
+
500: z81.object({
|
5844
|
+
message: z81.string()
|
5773
5845
|
}),
|
5774
5846
|
401: DefaultUnauthorizedSchema,
|
5775
5847
|
404: DefaultNotFoundSchema,
|
@@ -5780,19 +5852,19 @@ var ticketContract = initContract30().router(
|
|
5780
5852
|
updateChannel: {
|
5781
5853
|
method: "PATCH",
|
5782
5854
|
path: "/channel/update/:id",
|
5783
|
-
pathParams:
|
5784
|
-
body:
|
5855
|
+
pathParams: z81.object({ id: z81.string() }),
|
5856
|
+
body: z81.object({ channel: z81.string() }),
|
5785
5857
|
headers: DefaultHeaderSchema,
|
5786
5858
|
responses: {
|
5787
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5788
|
-
400:
|
5789
|
-
message:
|
5859
|
+
200: DefaultSuccessResponseSchema.extend({ message: z81.string() }),
|
5860
|
+
400: z81.object({
|
5861
|
+
message: z81.string()
|
5790
5862
|
}),
|
5791
|
-
409:
|
5792
|
-
message:
|
5863
|
+
409: z81.object({
|
5864
|
+
message: z81.string()
|
5793
5865
|
}),
|
5794
|
-
500:
|
5795
|
-
message:
|
5866
|
+
500: z81.object({
|
5867
|
+
message: z81.string()
|
5796
5868
|
}),
|
5797
5869
|
401: DefaultUnauthorizedSchema,
|
5798
5870
|
404: DefaultNotFoundSchema,
|
@@ -5803,19 +5875,19 @@ var ticketContract = initContract30().router(
|
|
5803
5875
|
updateTags: {
|
5804
5876
|
method: "PATCH",
|
5805
5877
|
path: "/tags/update/:id",
|
5806
|
-
pathParams:
|
5807
|
-
body:
|
5878
|
+
pathParams: z81.object({ id: z81.string() }),
|
5879
|
+
body: z81.object({ tags: z81.array(z81.string()) }),
|
5808
5880
|
headers: DefaultHeaderSchema,
|
5809
5881
|
responses: {
|
5810
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5811
|
-
400:
|
5812
|
-
message:
|
5882
|
+
200: DefaultSuccessResponseSchema.extend({ message: z81.string() }),
|
5883
|
+
400: z81.object({
|
5884
|
+
message: z81.string()
|
5813
5885
|
}),
|
5814
|
-
409:
|
5815
|
-
message:
|
5886
|
+
409: z81.object({
|
5887
|
+
message: z81.string()
|
5816
5888
|
}),
|
5817
|
-
500:
|
5818
|
-
message:
|
5889
|
+
500: z81.object({
|
5890
|
+
message: z81.string()
|
5819
5891
|
}),
|
5820
5892
|
401: DefaultUnauthorizedSchema,
|
5821
5893
|
404: DefaultNotFoundSchema,
|
@@ -5826,25 +5898,25 @@ var ticketContract = initContract30().router(
|
|
5826
5898
|
changeAssignee: {
|
5827
5899
|
method: "PATCH",
|
5828
5900
|
path: "/assignee/update/:id",
|
5829
|
-
pathParams:
|
5830
|
-
body:
|
5831
|
-
ticketId:
|
5832
|
-
assigneeId:
|
5833
|
-
reason:
|
5901
|
+
pathParams: z81.object({ id: z81.string() }),
|
5902
|
+
body: z81.object({
|
5903
|
+
ticketId: z81.string(),
|
5904
|
+
assigneeId: z81.string(),
|
5905
|
+
reason: z81.string().optional()
|
5834
5906
|
}),
|
5835
5907
|
headers: DefaultHeaderSchema,
|
5836
5908
|
responses: {
|
5837
5909
|
200: DefaultSuccessResponseSchema.extend({
|
5838
5910
|
data: TicketSchema
|
5839
5911
|
}),
|
5840
|
-
400:
|
5841
|
-
message:
|
5912
|
+
400: z81.object({
|
5913
|
+
message: z81.string()
|
5842
5914
|
}),
|
5843
|
-
409:
|
5844
|
-
message:
|
5915
|
+
409: z81.object({
|
5916
|
+
message: z81.string()
|
5845
5917
|
}),
|
5846
|
-
500:
|
5847
|
-
message:
|
5918
|
+
500: z81.object({
|
5919
|
+
message: z81.string()
|
5848
5920
|
}),
|
5849
5921
|
401: DefaultUnauthorizedSchema,
|
5850
5922
|
404: DefaultNotFoundSchema,
|
@@ -5855,14 +5927,14 @@ var ticketContract = initContract30().router(
|
|
5855
5927
|
getTicketCountByContact: {
|
5856
5928
|
method: "GET",
|
5857
5929
|
path: "/ticket_count/contact/:id",
|
5858
|
-
pathParams:
|
5930
|
+
pathParams: z81.object({ id: z81.string() }),
|
5859
5931
|
headers: DefaultHeaderSchema,
|
5860
5932
|
responses: {
|
5861
5933
|
200: DefaultSuccessResponseSchema.extend({
|
5862
5934
|
data: TicketCountByContactSchema
|
5863
5935
|
}),
|
5864
|
-
400:
|
5865
|
-
message:
|
5936
|
+
400: z81.object({
|
5937
|
+
message: z81.string()
|
5866
5938
|
}),
|
5867
5939
|
401: DefaultUnauthorizedSchema,
|
5868
5940
|
500: DefaultErrorResponseSchema
|
@@ -5878,14 +5950,14 @@ var ticketContract = initContract30().router(
|
|
5878
5950
|
201: DefaultSuccessResponseSchema.extend({
|
5879
5951
|
data: TicketCustomFieldSchema
|
5880
5952
|
}),
|
5881
|
-
400:
|
5882
|
-
message:
|
5953
|
+
400: z81.object({
|
5954
|
+
message: z81.string()
|
5883
5955
|
}),
|
5884
|
-
409:
|
5885
|
-
message:
|
5956
|
+
409: z81.object({
|
5957
|
+
message: z81.string()
|
5886
5958
|
}),
|
5887
|
-
500:
|
5888
|
-
message:
|
5959
|
+
500: z81.object({
|
5960
|
+
message: z81.string()
|
5889
5961
|
}),
|
5890
5962
|
401: DefaultUnauthorizedSchema,
|
5891
5963
|
404: DefaultNotFoundSchema,
|
@@ -5910,21 +5982,24 @@ var ticketContract = initContract30().router(
|
|
5910
5982
|
|
5911
5983
|
// src/user/index.ts
|
5912
5984
|
import { initContract as initContract31 } from "@ts-rest/core";
|
5913
|
-
import
|
5985
|
+
import z83 from "zod";
|
5914
5986
|
|
5915
5987
|
// src/user/validation.ts
|
5916
|
-
import { z as
|
5917
|
-
var CreateUserSchema =
|
5918
|
-
name:
|
5919
|
-
email:
|
5920
|
-
address:
|
5921
|
-
phone:
|
5922
|
-
password:
|
5923
|
-
notificationCount:
|
5924
|
-
roles:
|
5988
|
+
import { z as z82 } from "zod";
|
5989
|
+
var CreateUserSchema = z82.object({
|
5990
|
+
name: z82.string(),
|
5991
|
+
email: z82.string().email(),
|
5992
|
+
address: z82.string().nullable(),
|
5993
|
+
phone: z82.string().nullable(),
|
5994
|
+
password: z82.string(),
|
5995
|
+
notificationCount: z82.number().nullable().optional(),
|
5996
|
+
roles: z82.array(z82.string())
|
5925
5997
|
});
|
5926
5998
|
var UpdateUserSchema = CreateUserSchema.extend({
|
5927
|
-
newPassword:
|
5999
|
+
newPassword: z82.string()
|
6000
|
+
});
|
6001
|
+
var UpdateUserProfileSchema = z82.object({
|
6002
|
+
password: z82.string()
|
5928
6003
|
});
|
5929
6004
|
|
5930
6005
|
// src/user/index.ts
|
@@ -5939,8 +6014,8 @@ var userContract = initContract31().router(
|
|
5939
6014
|
201: DefaultSuccessResponseSchema.extend({
|
5940
6015
|
user: UserSchema
|
5941
6016
|
}),
|
5942
|
-
400:
|
5943
|
-
message:
|
6017
|
+
400: z83.object({
|
6018
|
+
message: z83.string()
|
5944
6019
|
}),
|
5945
6020
|
401: DefaultUnauthorizedSchema,
|
5946
6021
|
404: DefaultNotFoundSchema,
|
@@ -5953,16 +6028,16 @@ var userContract = initContract31().router(
|
|
5953
6028
|
method: "GET",
|
5954
6029
|
path: "",
|
5955
6030
|
headers: DefaultHeaderSchema,
|
5956
|
-
query:
|
5957
|
-
page:
|
5958
|
-
pageSize:
|
6031
|
+
query: z83.object({
|
6032
|
+
page: z83.coerce.number().optional(),
|
6033
|
+
pageSize: z83.coerce.number().optional(),
|
5959
6034
|
// Don't add default 10. In some places, we need to fetch all users.
|
5960
|
-
keyword:
|
6035
|
+
keyword: z83.string().optional()
|
5961
6036
|
}).optional(),
|
5962
6037
|
responses: {
|
5963
6038
|
200: WithPagination(UserSchema),
|
5964
|
-
400:
|
5965
|
-
message:
|
6039
|
+
400: z83.object({
|
6040
|
+
message: z83.string()
|
5966
6041
|
}),
|
5967
6042
|
401: DefaultUnauthorizedSchema,
|
5968
6043
|
500: DefaultErrorResponseSchema
|
@@ -5972,12 +6047,12 @@ var userContract = initContract31().router(
|
|
5972
6047
|
getUserById: {
|
5973
6048
|
method: "GET",
|
5974
6049
|
path: "/:id",
|
5975
|
-
pathParams:
|
6050
|
+
pathParams: z83.object({ id: z83.string() }),
|
5976
6051
|
headers: DefaultHeaderSchema,
|
5977
6052
|
responses: {
|
5978
6053
|
200: UserSchema,
|
5979
|
-
400:
|
5980
|
-
message:
|
6054
|
+
400: z83.object({
|
6055
|
+
message: z83.string()
|
5981
6056
|
}),
|
5982
6057
|
401: DefaultUnauthorizedSchema
|
5983
6058
|
},
|
@@ -5986,15 +6061,15 @@ var userContract = initContract31().router(
|
|
5986
6061
|
updateUser: {
|
5987
6062
|
method: "PATCH",
|
5988
6063
|
path: "/:id",
|
5989
|
-
pathParams:
|
6064
|
+
pathParams: z83.object({ id: z83.string() }),
|
5990
6065
|
headers: DefaultHeaderSchema,
|
5991
6066
|
body: UpdateUserSchema,
|
5992
6067
|
responses: {
|
5993
6068
|
201: DefaultSuccessResponseSchema.extend({
|
5994
|
-
|
6069
|
+
user: UserSchema
|
5995
6070
|
}),
|
5996
|
-
400:
|
5997
|
-
message:
|
6071
|
+
400: z83.object({
|
6072
|
+
message: z83.string()
|
5998
6073
|
}),
|
5999
6074
|
401: DefaultUnauthorizedSchema,
|
6000
6075
|
404: DefaultNotFoundSchema,
|
@@ -6003,14 +6078,34 @@ var userContract = initContract31().router(
|
|
6003
6078
|
},
|
6004
6079
|
summary: "Update a user."
|
6005
6080
|
},
|
6081
|
+
updateUserProfile: {
|
6082
|
+
method: "PATCH",
|
6083
|
+
path: "/profile/:id",
|
6084
|
+
pathParams: z83.object({ id: z83.string() }),
|
6085
|
+
headers: DefaultHeaderSchema,
|
6086
|
+
body: UpdateUserProfileSchema,
|
6087
|
+
responses: {
|
6088
|
+
201: DefaultSuccessResponseSchema.extend({
|
6089
|
+
user: UserSchema
|
6090
|
+
}),
|
6091
|
+
400: z83.object({
|
6092
|
+
message: z83.string()
|
6093
|
+
}),
|
6094
|
+
401: DefaultUnauthorizedSchema,
|
6095
|
+
404: DefaultNotFoundSchema,
|
6096
|
+
422: DefaultUnprocessibleSchema,
|
6097
|
+
500: DefaultErrorResponseSchema
|
6098
|
+
},
|
6099
|
+
summary: "Update a user profile."
|
6100
|
+
},
|
6006
6101
|
deleteUser: {
|
6007
6102
|
method: "DELETE",
|
6008
6103
|
path: "/:id",
|
6009
|
-
pathParams:
|
6104
|
+
pathParams: z83.object({ id: z83.string() }),
|
6010
6105
|
headers: DefaultHeaderSchema,
|
6011
6106
|
body: null,
|
6012
6107
|
responses: {
|
6013
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
6108
|
+
200: DefaultSuccessResponseSchema.extend({ message: z83.string() }),
|
6014
6109
|
404: DefaultNotFoundSchema,
|
6015
6110
|
422: DefaultUnprocessibleSchema,
|
6016
6111
|
500: DefaultErrorResponseSchema
|
@@ -6023,26 +6118,26 @@ var userContract = initContract31().router(
|
|
6023
6118
|
|
6024
6119
|
// src/user-presence-status-log/index.ts
|
6025
6120
|
import { initContract as initContract32 } from "@ts-rest/core";
|
6026
|
-
import
|
6121
|
+
import z86 from "zod";
|
6027
6122
|
|
6028
6123
|
// src/user-presence-status-log/schema.ts
|
6029
|
-
import
|
6124
|
+
import z84 from "zod";
|
6030
6125
|
var UserPresenceStatusLogSchema = DefaultEntitySchema.extend({
|
6031
6126
|
user: UserSchema,
|
6032
6127
|
previousPresenceStatus: PresenceStatusSchema,
|
6033
6128
|
newPresenceStatus: PresenceStatusSchema,
|
6034
|
-
reason:
|
6129
|
+
reason: z84.string()
|
6035
6130
|
});
|
6036
6131
|
|
6037
6132
|
// src/user-presence-status-log/validation.ts
|
6038
|
-
import
|
6039
|
-
var UserPresenceStatusLogParamsSchema =
|
6040
|
-
page:
|
6041
|
-
pageSize:
|
6042
|
-
selectedDate:
|
6133
|
+
import z85 from "zod";
|
6134
|
+
var UserPresenceStatusLogParamsSchema = z85.object({
|
6135
|
+
page: z85.coerce.number().default(1),
|
6136
|
+
pageSize: z85.coerce.number().default(10),
|
6137
|
+
selectedDate: z85.string().optional()
|
6043
6138
|
}).optional();
|
6044
|
-
var UserPresenceStatusLogExportParamsSchema =
|
6045
|
-
selectedDate:
|
6139
|
+
var UserPresenceStatusLogExportParamsSchema = z85.object({
|
6140
|
+
selectedDate: z85.string().optional()
|
6046
6141
|
});
|
6047
6142
|
|
6048
6143
|
// src/user-presence-status-log/index.ts
|
@@ -6055,8 +6150,8 @@ var userPresenceStatusLogContract = initContract32().router(
|
|
6055
6150
|
headers: DefaultHeaderSchema,
|
6056
6151
|
responses: {
|
6057
6152
|
200: WithPagination(UserPresenceStatusLogSchema),
|
6058
|
-
400:
|
6059
|
-
message:
|
6153
|
+
400: z86.object({
|
6154
|
+
message: z86.string()
|
6060
6155
|
}),
|
6061
6156
|
401: DefaultUnauthorizedSchema,
|
6062
6157
|
500: DefaultErrorResponseSchema
|
@@ -6070,8 +6165,8 @@ var userPresenceStatusLogContract = initContract32().router(
|
|
6070
6165
|
headers: DefaultHeaderSchema,
|
6071
6166
|
responses: {
|
6072
6167
|
200: null,
|
6073
|
-
400:
|
6074
|
-
message:
|
6168
|
+
400: z86.object({
|
6169
|
+
message: z86.string()
|
6075
6170
|
}),
|
6076
6171
|
401: DefaultUnauthorizedSchema,
|
6077
6172
|
500: DefaultErrorResponseSchema
|
@@ -6083,44 +6178,44 @@ var userPresenceStatusLogContract = initContract32().router(
|
|
6083
6178
|
|
6084
6179
|
// src/widget/index.ts
|
6085
6180
|
import { initContract as initContract33 } from "@ts-rest/core";
|
6086
|
-
import
|
6181
|
+
import z89 from "zod";
|
6087
6182
|
|
6088
6183
|
// src/widget/schema.ts
|
6089
|
-
import
|
6090
|
-
var FieldsSchema =
|
6091
|
-
var WidgetPositionSchema =
|
6092
|
-
|
6093
|
-
|
6094
|
-
|
6184
|
+
import z87 from "zod";
|
6185
|
+
var FieldsSchema = z87.object({ data: z87.array(z87.string()) });
|
6186
|
+
var WidgetPositionSchema = z87.union([
|
6187
|
+
z87.literal("menu"),
|
6188
|
+
z87.literal("ticket_detail"),
|
6189
|
+
z87.literal("contact_detail")
|
6095
6190
|
]);
|
6096
6191
|
var WidgetSchema = DefaultEntitySchema.extend({
|
6097
|
-
name:
|
6098
|
-
description:
|
6192
|
+
name: z87.string(),
|
6193
|
+
description: z87.string().nullable(),
|
6099
6194
|
position: WidgetPositionSchema.nullable(),
|
6100
6195
|
fields: FieldsSchema,
|
6101
|
-
url:
|
6196
|
+
url: z87.string()
|
6102
6197
|
});
|
6103
6198
|
|
6104
6199
|
// src/widget/validation.ts
|
6105
|
-
import
|
6106
|
-
var CreateWidgetSchema =
|
6107
|
-
name:
|
6108
|
-
description:
|
6109
|
-
url:
|
6200
|
+
import z88 from "zod";
|
6201
|
+
var CreateWidgetSchema = z88.object({
|
6202
|
+
name: z88.string(),
|
6203
|
+
description: z88.string(),
|
6204
|
+
url: z88.string(),
|
6110
6205
|
position: WidgetPositionSchema,
|
6111
|
-
fields:
|
6206
|
+
fields: z88.object({
|
6112
6207
|
data: (
|
6113
6208
|
// Array of attribute system names
|
6114
|
-
|
6209
|
+
z88.array(z88.string())
|
6115
6210
|
)
|
6116
6211
|
}).optional()
|
6117
6212
|
});
|
6118
6213
|
var UpdateWidgetSchema = CreateWidgetSchema;
|
6119
|
-
var GetWidgetUrlPathQuerySchema =
|
6120
|
-
widgetId:
|
6214
|
+
var GetWidgetUrlPathQuerySchema = z88.object({
|
6215
|
+
widgetId: z88.string(),
|
6121
6216
|
// Position ID is ticket ID, contact ID, etc.
|
6122
6217
|
// TODO: The name "Position ID" is confusing. Think of a better name.
|
6123
|
-
positionId:
|
6218
|
+
positionId: z88.string()
|
6124
6219
|
});
|
6125
6220
|
|
6126
6221
|
// src/widget/index.ts
|
@@ -6135,8 +6230,8 @@ var widgetContract = initContract33().router(
|
|
6135
6230
|
201: DefaultSuccessResponseSchema.extend({
|
6136
6231
|
widget: WidgetSchema
|
6137
6232
|
}),
|
6138
|
-
400:
|
6139
|
-
message:
|
6233
|
+
400: z89.object({
|
6234
|
+
message: z89.string()
|
6140
6235
|
}),
|
6141
6236
|
401: DefaultUnauthorizedSchema,
|
6142
6237
|
500: DefaultErrorResponseSchema
|
@@ -6146,17 +6241,17 @@ var widgetContract = initContract33().router(
|
|
6146
6241
|
getWidgets: {
|
6147
6242
|
method: "GET",
|
6148
6243
|
path: "",
|
6149
|
-
query:
|
6150
|
-
page:
|
6151
|
-
pageSize:
|
6152
|
-
keyword:
|
6244
|
+
query: z89.object({
|
6245
|
+
page: z89.coerce.number().default(1),
|
6246
|
+
pageSize: z89.coerce.number().default(10),
|
6247
|
+
keyword: z89.coerce.string().optional()
|
6153
6248
|
}).optional(),
|
6154
6249
|
headers: DefaultHeaderSchema,
|
6155
6250
|
responses: {
|
6156
6251
|
200: WithPagination(WidgetSchema),
|
6157
6252
|
500: DefaultErrorResponseSchema,
|
6158
|
-
400:
|
6159
|
-
message:
|
6253
|
+
400: z89.object({
|
6254
|
+
message: z89.string()
|
6160
6255
|
}),
|
6161
6256
|
401: DefaultUnauthorizedSchema
|
6162
6257
|
},
|
@@ -6167,9 +6262,9 @@ var widgetContract = initContract33().router(
|
|
6167
6262
|
path: "/menu",
|
6168
6263
|
headers: DefaultHeaderSchema,
|
6169
6264
|
responses: {
|
6170
|
-
200:
|
6171
|
-
400:
|
6172
|
-
message:
|
6265
|
+
200: z89.array(WidgetSchema),
|
6266
|
+
400: z89.object({
|
6267
|
+
message: z89.string()
|
6173
6268
|
}),
|
6174
6269
|
401: DefaultUnauthorizedSchema,
|
6175
6270
|
500: DefaultErrorResponseSchema
|
@@ -6181,9 +6276,9 @@ var widgetContract = initContract33().router(
|
|
6181
6276
|
path: "/ticket_detail",
|
6182
6277
|
headers: DefaultHeaderSchema,
|
6183
6278
|
responses: {
|
6184
|
-
200:
|
6185
|
-
400:
|
6186
|
-
message:
|
6279
|
+
200: z89.array(WidgetSchema),
|
6280
|
+
400: z89.object({
|
6281
|
+
message: z89.string()
|
6187
6282
|
}),
|
6188
6283
|
401: DefaultUnauthorizedSchema,
|
6189
6284
|
500: DefaultErrorResponseSchema
|
@@ -6195,9 +6290,9 @@ var widgetContract = initContract33().router(
|
|
6195
6290
|
path: "/contact_detail",
|
6196
6291
|
headers: DefaultHeaderSchema,
|
6197
6292
|
responses: {
|
6198
|
-
200:
|
6199
|
-
400:
|
6200
|
-
message:
|
6293
|
+
200: z89.array(WidgetSchema),
|
6294
|
+
400: z89.object({
|
6295
|
+
message: z89.string()
|
6201
6296
|
}),
|
6202
6297
|
401: DefaultUnauthorizedSchema,
|
6203
6298
|
500: DefaultErrorResponseSchema
|
@@ -6207,12 +6302,12 @@ var widgetContract = initContract33().router(
|
|
6207
6302
|
getWidgetById: {
|
6208
6303
|
method: "GET",
|
6209
6304
|
path: "/:id",
|
6210
|
-
pathParams:
|
6305
|
+
pathParams: z89.object({ id: z89.string() }),
|
6211
6306
|
headers: DefaultHeaderSchema,
|
6212
6307
|
responses: {
|
6213
6308
|
200: WidgetSchema,
|
6214
|
-
400:
|
6215
|
-
message:
|
6309
|
+
400: z89.object({
|
6310
|
+
message: z89.string()
|
6216
6311
|
}),
|
6217
6312
|
401: DefaultUnauthorizedSchema,
|
6218
6313
|
500: DefaultErrorResponseSchema
|
@@ -6226,10 +6321,10 @@ var widgetContract = initContract33().router(
|
|
6226
6321
|
headers: DefaultHeaderSchema,
|
6227
6322
|
responses: {
|
6228
6323
|
201: DefaultSuccessResponseSchema.extend({
|
6229
|
-
url:
|
6324
|
+
url: z89.string()
|
6230
6325
|
}),
|
6231
|
-
400:
|
6232
|
-
message:
|
6326
|
+
400: z89.object({
|
6327
|
+
message: z89.string()
|
6233
6328
|
}),
|
6234
6329
|
401: DefaultUnauthorizedSchema
|
6235
6330
|
},
|
@@ -6238,14 +6333,14 @@ var widgetContract = initContract33().router(
|
|
6238
6333
|
updateWidget: {
|
6239
6334
|
method: "PATCH",
|
6240
6335
|
path: "/:id",
|
6241
|
-
pathParams:
|
6336
|
+
pathParams: z89.object({ id: z89.string() }),
|
6242
6337
|
headers: DefaultHeaderSchema,
|
6243
6338
|
responses: {
|
6244
6339
|
201: DefaultSuccessResponseSchema.extend({
|
6245
6340
|
widget: WidgetSchema
|
6246
6341
|
}),
|
6247
|
-
400:
|
6248
|
-
message:
|
6342
|
+
400: z89.object({
|
6343
|
+
message: z89.string()
|
6249
6344
|
}),
|
6250
6345
|
401: DefaultUnauthorizedSchema
|
6251
6346
|
},
|
@@ -6255,11 +6350,11 @@ var widgetContract = initContract33().router(
|
|
6255
6350
|
deleteWidget: {
|
6256
6351
|
method: "DELETE",
|
6257
6352
|
path: "/:id",
|
6258
|
-
pathParams:
|
6353
|
+
pathParams: z89.object({ id: z89.string() }),
|
6259
6354
|
headers: DefaultHeaderSchema,
|
6260
6355
|
body: null,
|
6261
6356
|
responses: {
|
6262
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
6357
|
+
200: DefaultSuccessResponseSchema.extend({ message: z89.string() }),
|
6263
6358
|
500: DefaultErrorResponseSchema
|
6264
6359
|
},
|
6265
6360
|
summary: "Delete a widget."
|
@@ -6270,24 +6365,24 @@ var widgetContract = initContract33().router(
|
|
6270
6365
|
|
6271
6366
|
// src/wrap-up-form/index.ts
|
6272
6367
|
import { initContract as initContract34 } from "@ts-rest/core";
|
6273
|
-
import
|
6368
|
+
import z91 from "zod";
|
6274
6369
|
|
6275
6370
|
// src/wrap-up-form/validation.ts
|
6276
|
-
import { z as
|
6277
|
-
var CreateWrapUpFormSchema =
|
6278
|
-
note:
|
6279
|
-
disposition:
|
6280
|
-
callFrom:
|
6281
|
-
callTo:
|
6371
|
+
import { z as z90 } from "zod";
|
6372
|
+
var CreateWrapUpFormSchema = z90.object({
|
6373
|
+
note: z90.string().nullable().optional(),
|
6374
|
+
disposition: z90.string().nullable().optional(),
|
6375
|
+
callFrom: z90.string().nullable().optional(),
|
6376
|
+
callTo: z90.string().nullable().optional()
|
6282
6377
|
});
|
6283
6378
|
var UpdateWrapUpFormSchema = CreateWrapUpFormSchema.extend({
|
6284
|
-
tags:
|
6379
|
+
tags: z90.array(z90.string()).optional()
|
6285
6380
|
});
|
6286
|
-
var CreateCXLogWrapUpFormSchema =
|
6287
|
-
cxLogId:
|
6288
|
-
disposition:
|
6289
|
-
tagIds:
|
6290
|
-
note:
|
6381
|
+
var CreateCXLogWrapUpFormSchema = z90.object({
|
6382
|
+
cxLogId: z90.string().uuid(),
|
6383
|
+
disposition: z90.string().optional(),
|
6384
|
+
tagIds: z90.array(z90.string().uuid()).optional(),
|
6385
|
+
note: z90.string().optional()
|
6291
6386
|
});
|
6292
6387
|
|
6293
6388
|
// src/wrap-up-form/index.ts
|
@@ -6302,8 +6397,8 @@ var wrapUpFormContract = initContract34().router(
|
|
6302
6397
|
201: DefaultSuccessResponseSchema.extend({
|
6303
6398
|
wrapUpForm: WrapUpFormSchema
|
6304
6399
|
}),
|
6305
|
-
400:
|
6306
|
-
message:
|
6400
|
+
400: z91.object({
|
6401
|
+
message: z91.string()
|
6307
6402
|
}),
|
6308
6403
|
401: DefaultUnauthorizedSchema,
|
6309
6404
|
500: DefaultErrorResponseSchema
|
@@ -6325,15 +6420,15 @@ var wrapUpFormContract = initContract34().router(
|
|
6325
6420
|
getWrapUpForms: {
|
6326
6421
|
method: "GET",
|
6327
6422
|
path: "",
|
6328
|
-
query:
|
6329
|
-
page:
|
6330
|
-
pageSize:
|
6423
|
+
query: z91.object({
|
6424
|
+
page: z91.coerce.number().default(1),
|
6425
|
+
pageSize: z91.coerce.number().default(10)
|
6331
6426
|
}).optional(),
|
6332
6427
|
headers: DefaultHeaderSchema,
|
6333
6428
|
responses: {
|
6334
6429
|
200: WithPagination(WrapUpFormSchema),
|
6335
|
-
400:
|
6336
|
-
message:
|
6430
|
+
400: z91.object({
|
6431
|
+
message: z91.string()
|
6337
6432
|
}),
|
6338
6433
|
401: DefaultUnauthorizedSchema,
|
6339
6434
|
500: DefaultErrorResponseSchema
|
@@ -6343,15 +6438,15 @@ var wrapUpFormContract = initContract34().router(
|
|
6343
6438
|
updateWrapUpForm: {
|
6344
6439
|
method: "PATCH",
|
6345
6440
|
path: "/:id",
|
6346
|
-
pathParams:
|
6441
|
+
pathParams: z91.object({ id: z91.string() }),
|
6347
6442
|
headers: DefaultHeaderSchema,
|
6348
6443
|
body: UpdateWrapUpFormSchema,
|
6349
6444
|
responses: {
|
6350
6445
|
201: DefaultSuccessResponseSchema.extend({
|
6351
6446
|
wrapUpForm: WrapUpFormSchema
|
6352
6447
|
}),
|
6353
|
-
400:
|
6354
|
-
message:
|
6448
|
+
400: z91.object({
|
6449
|
+
message: z91.string()
|
6355
6450
|
}),
|
6356
6451
|
401: DefaultUnauthorizedSchema,
|
6357
6452
|
500: DefaultErrorResponseSchema
|
@@ -6364,28 +6459,28 @@ var wrapUpFormContract = initContract34().router(
|
|
6364
6459
|
|
6365
6460
|
// src/upload/index.ts
|
6366
6461
|
import { initContract as initContract35 } from "@ts-rest/core";
|
6367
|
-
import
|
6462
|
+
import z92 from "zod";
|
6368
6463
|
var uploadContract = initContract35().router(
|
6369
6464
|
{
|
6370
6465
|
rename: {
|
6371
6466
|
method: "POST",
|
6372
6467
|
path: "/:id/rename",
|
6373
|
-
pathParams:
|
6374
|
-
id:
|
6468
|
+
pathParams: z92.object({
|
6469
|
+
id: z92.string()
|
6375
6470
|
}),
|
6376
6471
|
headers: DefaultHeaderSchema,
|
6377
6472
|
responses: {
|
6378
6473
|
201: DefaultSuccessResponseSchema.extend({
|
6379
|
-
message:
|
6474
|
+
message: z92.string()
|
6380
6475
|
}),
|
6381
|
-
400:
|
6382
|
-
message:
|
6476
|
+
400: z92.object({
|
6477
|
+
message: z92.string()
|
6383
6478
|
}),
|
6384
|
-
409:
|
6385
|
-
message:
|
6479
|
+
409: z92.object({
|
6480
|
+
message: z92.string()
|
6386
6481
|
}),
|
6387
|
-
500:
|
6388
|
-
message:
|
6482
|
+
500: z92.object({
|
6483
|
+
message: z92.string()
|
6389
6484
|
}),
|
6390
6485
|
401: DefaultUnauthorizedSchema,
|
6391
6486
|
404: DefaultNotFoundSchema,
|
@@ -6397,23 +6492,23 @@ var uploadContract = initContract35().router(
|
|
6397
6492
|
delete: {
|
6398
6493
|
method: "DELETE",
|
6399
6494
|
path: "/:id",
|
6400
|
-
pathParams:
|
6401
|
-
id:
|
6495
|
+
pathParams: z92.object({
|
6496
|
+
id: z92.string()
|
6402
6497
|
}),
|
6403
6498
|
headers: DefaultHeaderSchema,
|
6404
6499
|
body: null,
|
6405
6500
|
responses: {
|
6406
6501
|
201: DefaultSuccessResponseSchema.extend({
|
6407
|
-
message:
|
6502
|
+
message: z92.string()
|
6408
6503
|
}),
|
6409
|
-
400:
|
6410
|
-
message:
|
6504
|
+
400: z92.object({
|
6505
|
+
message: z92.string()
|
6411
6506
|
}),
|
6412
|
-
409:
|
6413
|
-
message:
|
6507
|
+
409: z92.object({
|
6508
|
+
message: z92.string()
|
6414
6509
|
}),
|
6415
|
-
500:
|
6416
|
-
message:
|
6510
|
+
500: z92.object({
|
6511
|
+
message: z92.string()
|
6417
6512
|
}),
|
6418
6513
|
401: DefaultUnauthorizedSchema,
|
6419
6514
|
404: DefaultNotFoundSchema,
|
@@ -6428,19 +6523,19 @@ var uploadContract = initContract35().router(
|
|
6428
6523
|
);
|
6429
6524
|
|
6430
6525
|
// src/viber/index.ts
|
6431
|
-
import
|
6526
|
+
import z94 from "zod";
|
6432
6527
|
|
6433
6528
|
// src/viber/validation.ts
|
6434
|
-
import
|
6435
|
-
var ViberChannelSchema =
|
6436
|
-
name:
|
6437
|
-
accessToken:
|
6438
|
-
actor:
|
6439
|
-
id:
|
6440
|
-
name:
|
6441
|
-
email:
|
6442
|
-
address:
|
6443
|
-
phone:
|
6529
|
+
import z93 from "zod";
|
6530
|
+
var ViberChannelSchema = z93.object({
|
6531
|
+
name: z93.string(),
|
6532
|
+
accessToken: z93.string(),
|
6533
|
+
actor: z93.object({
|
6534
|
+
id: z93.string().uuid(),
|
6535
|
+
name: z93.string(),
|
6536
|
+
email: z93.string().email(),
|
6537
|
+
address: z93.string().nullable(),
|
6538
|
+
phone: z93.string().nullable()
|
6444
6539
|
}).optional()
|
6445
6540
|
});
|
6446
6541
|
|
@@ -6469,8 +6564,8 @@ var viberContract = initContract36().router({
|
|
6469
6564
|
}),
|
6470
6565
|
400: DefaultErrorResponseSchema
|
6471
6566
|
},
|
6472
|
-
body:
|
6473
|
-
id:
|
6567
|
+
body: z94.object({
|
6568
|
+
id: z94.string().uuid()
|
6474
6569
|
}),
|
6475
6570
|
summary: "Connect viber channel"
|
6476
6571
|
},
|
@@ -6486,8 +6581,8 @@ var viberContract = initContract36().router({
|
|
6486
6581
|
reconnect: {
|
6487
6582
|
method: "POST",
|
6488
6583
|
path: "/reconnect/:channelId",
|
6489
|
-
pathParams:
|
6490
|
-
channelId:
|
6584
|
+
pathParams: z94.object({
|
6585
|
+
channelId: z94.string().uuid()
|
6491
6586
|
}),
|
6492
6587
|
responses: {
|
6493
6588
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -6502,8 +6597,8 @@ var viberContract = initContract36().router({
|
|
6502
6597
|
delete: {
|
6503
6598
|
method: "DELETE",
|
6504
6599
|
path: "/delete/:channelId",
|
6505
|
-
pathParams:
|
6506
|
-
channelId:
|
6600
|
+
pathParams: z94.object({
|
6601
|
+
channelId: z94.string().uuid()
|
6507
6602
|
}),
|
6508
6603
|
body: null,
|
6509
6604
|
responses: {
|
@@ -6516,58 +6611,58 @@ var viberContract = initContract36().router({
|
|
6516
6611
|
|
6517
6612
|
// src/notification/index.ts
|
6518
6613
|
import { initContract as initContract37 } from "@ts-rest/core";
|
6519
|
-
import
|
6614
|
+
import z97 from "zod";
|
6520
6615
|
|
6521
6616
|
// src/notification/validation.ts
|
6522
|
-
import
|
6617
|
+
import z96 from "zod";
|
6523
6618
|
|
6524
6619
|
// src/notification/schema.ts
|
6525
|
-
import
|
6526
|
-
var NotificationChangeSchema =
|
6527
|
-
id:
|
6528
|
-
createdAt:
|
6529
|
-
updatedAt:
|
6530
|
-
deletedAt:
|
6531
|
-
actorId:
|
6620
|
+
import z95 from "zod";
|
6621
|
+
var NotificationChangeSchema = z95.object({
|
6622
|
+
id: z95.string().uuid(),
|
6623
|
+
createdAt: z95.date(),
|
6624
|
+
updatedAt: z95.date(),
|
6625
|
+
deletedAt: z95.date().nullable(),
|
6626
|
+
actorId: z95.string().uuid(),
|
6532
6627
|
actor: UserSchema,
|
6533
|
-
notificationObjectId:
|
6534
|
-
readAt:
|
6535
|
-
});
|
6536
|
-
var NotificationObjectSchema =
|
6537
|
-
id:
|
6538
|
-
createdAt:
|
6539
|
-
updatedAt:
|
6540
|
-
deletedAt:
|
6541
|
-
data:
|
6628
|
+
notificationObjectId: z95.string().uuid(),
|
6629
|
+
readAt: z95.date()
|
6630
|
+
});
|
6631
|
+
var NotificationObjectSchema = z95.object({
|
6632
|
+
id: z95.string().uuid(),
|
6633
|
+
createdAt: z95.date(),
|
6634
|
+
updatedAt: z95.date(),
|
6635
|
+
deletedAt: z95.date().nullable(),
|
6636
|
+
data: z95.string(),
|
6542
6637
|
notificationChange: NotificationChangeSchema
|
6543
6638
|
});
|
6544
|
-
var NotificationSchema =
|
6545
|
-
id:
|
6546
|
-
createdAt:
|
6547
|
-
updatedAt:
|
6548
|
-
deletedAt:
|
6549
|
-
notificationObjectId:
|
6550
|
-
notifierId:
|
6639
|
+
var NotificationSchema = z95.object({
|
6640
|
+
id: z95.string().uuid(),
|
6641
|
+
createdAt: z95.date(),
|
6642
|
+
updatedAt: z95.date(),
|
6643
|
+
deletedAt: z95.date().nullable(),
|
6644
|
+
notificationObjectId: z95.string().uuid(),
|
6645
|
+
notifierId: z95.string().uuid(),
|
6551
6646
|
notificationObject: NotificationObjectSchema,
|
6552
|
-
readAt:
|
6647
|
+
readAt: z95.date()
|
6553
6648
|
});
|
6554
6649
|
|
6555
6650
|
// src/notification/validation.ts
|
6556
|
-
var GetNotificationsRequestSchema =
|
6557
|
-
page:
|
6558
|
-
pageSize:
|
6651
|
+
var GetNotificationsRequestSchema = z96.object({
|
6652
|
+
page: z96.coerce.number().default(1),
|
6653
|
+
pageSize: z96.coerce.number().default(10)
|
6559
6654
|
});
|
6560
|
-
var GetNotificationsResponseSchema =
|
6561
|
-
notificationCount:
|
6562
|
-
notifications:
|
6563
|
-
total:
|
6564
|
-
page:
|
6565
|
-
pageSize:
|
6566
|
-
lastPage:
|
6567
|
-
totalUnreadCount:
|
6655
|
+
var GetNotificationsResponseSchema = z96.object({
|
6656
|
+
notificationCount: z96.number(),
|
6657
|
+
notifications: z96.array(NotificationSchema),
|
6658
|
+
total: z96.number(),
|
6659
|
+
page: z96.number(),
|
6660
|
+
pageSize: z96.number(),
|
6661
|
+
lastPage: z96.number(),
|
6662
|
+
totalUnreadCount: z96.number().optional()
|
6568
6663
|
});
|
6569
|
-
var ResetNotificationRequestSchema =
|
6570
|
-
userId:
|
6664
|
+
var ResetNotificationRequestSchema = z96.object({
|
6665
|
+
userId: z96.string()
|
6571
6666
|
});
|
6572
6667
|
|
6573
6668
|
// src/notification/index.ts
|
@@ -6581,14 +6676,14 @@ var userNotificationContract = initContract37().router(
|
|
6581
6676
|
200: DefaultSuccessResponseSchema.extend({
|
6582
6677
|
data: GetNotificationsResponseSchema
|
6583
6678
|
}),
|
6584
|
-
400:
|
6585
|
-
message:
|
6679
|
+
400: z97.object({
|
6680
|
+
message: z97.string()
|
6586
6681
|
}),
|
6587
|
-
409:
|
6588
|
-
message:
|
6682
|
+
409: z97.object({
|
6683
|
+
message: z97.string()
|
6589
6684
|
}),
|
6590
|
-
500:
|
6591
|
-
message:
|
6685
|
+
500: z97.object({
|
6686
|
+
message: z97.string()
|
6592
6687
|
}),
|
6593
6688
|
401: DefaultUnauthorizedSchema,
|
6594
6689
|
404: DefaultNotFoundSchema,
|
@@ -6601,16 +6696,16 @@ var userNotificationContract = initContract37().router(
|
|
6601
6696
|
path: "/new_notifications_count",
|
6602
6697
|
responses: {
|
6603
6698
|
200: DefaultSuccessResponseSchema.extend({
|
6604
|
-
total:
|
6699
|
+
total: z97.number()
|
6605
6700
|
}),
|
6606
|
-
400:
|
6607
|
-
message:
|
6701
|
+
400: z97.object({
|
6702
|
+
message: z97.string()
|
6608
6703
|
}),
|
6609
|
-
409:
|
6610
|
-
message:
|
6704
|
+
409: z97.object({
|
6705
|
+
message: z97.string()
|
6611
6706
|
}),
|
6612
|
-
500:
|
6613
|
-
message:
|
6707
|
+
500: z97.object({
|
6708
|
+
message: z97.string()
|
6614
6709
|
}),
|
6615
6710
|
401: DefaultUnauthorizedSchema,
|
6616
6711
|
404: DefaultNotFoundSchema,
|
@@ -6625,14 +6720,14 @@ var userNotificationContract = initContract37().router(
|
|
6625
6720
|
201: DefaultSuccessResponseSchema.extend({
|
6626
6721
|
data: UserSchema
|
6627
6722
|
}),
|
6628
|
-
400:
|
6629
|
-
message:
|
6723
|
+
400: z97.object({
|
6724
|
+
message: z97.string()
|
6630
6725
|
}),
|
6631
|
-
409:
|
6632
|
-
message:
|
6726
|
+
409: z97.object({
|
6727
|
+
message: z97.string()
|
6633
6728
|
}),
|
6634
|
-
500:
|
6635
|
-
message:
|
6729
|
+
500: z97.object({
|
6730
|
+
message: z97.string()
|
6636
6731
|
}),
|
6637
6732
|
401: DefaultUnauthorizedSchema,
|
6638
6733
|
404: DefaultNotFoundSchema,
|
@@ -6644,19 +6739,19 @@ var userNotificationContract = initContract37().router(
|
|
6644
6739
|
readNotification: {
|
6645
6740
|
method: "POST",
|
6646
6741
|
path: "/read/:id",
|
6647
|
-
pathParams:
|
6742
|
+
pathParams: z97.object({ id: z97.string() }),
|
6648
6743
|
responses: {
|
6649
6744
|
201: DefaultSuccessResponseSchema.extend({
|
6650
6745
|
data: NotificationSchema
|
6651
6746
|
}),
|
6652
|
-
400:
|
6653
|
-
message:
|
6747
|
+
400: z97.object({
|
6748
|
+
message: z97.string()
|
6654
6749
|
}),
|
6655
|
-
409:
|
6656
|
-
message:
|
6750
|
+
409: z97.object({
|
6751
|
+
message: z97.string()
|
6657
6752
|
}),
|
6658
|
-
500:
|
6659
|
-
message:
|
6753
|
+
500: z97.object({
|
6754
|
+
message: z97.string()
|
6660
6755
|
}),
|
6661
6756
|
401: DefaultUnauthorizedSchema,
|
6662
6757
|
404: DefaultNotFoundSchema,
|
@@ -6738,6 +6833,7 @@ export {
|
|
6738
6833
|
dashboardContract,
|
6739
6834
|
evaluateFormContract,
|
6740
6835
|
extensionContract2 as extensionContract,
|
6836
|
+
mailContract,
|
6741
6837
|
mainChatContract,
|
6742
6838
|
notificationContract,
|
6743
6839
|
permissionContract,
|