@kl1/contracts 1.0.94 → 1.0.96

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