@kl1/contracts 1.0.98 → 1.0.99-uat

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