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