@kl1/contracts 1.0.98 → 1.0.99

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