@kl1/contracts 1.0.93 → 1.0.95

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