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