@kl1/contracts 1.0.96 → 1.0.97

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