@kl1/contracts 1.1.25 → 1.1.26

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 (58) hide show
  1. package/dist/index.js +935 -924
  2. package/dist/index.js.map +1 -1
  3. package/dist/index.mjs +934 -924
  4. package/dist/index.mjs.map +1 -1
  5. package/dist/src/chat/index.d.ts +4867 -22
  6. package/dist/src/chat/index.d.ts.map +1 -1
  7. package/dist/src/chat/schema.d.ts +773 -22
  8. package/dist/src/chat/schema.d.ts.map +1 -1
  9. package/dist/src/chat/validation.d.ts +975 -5
  10. package/dist/src/chat/validation.d.ts.map +1 -1
  11. package/dist/src/contact/index.d.ts +3 -0
  12. package/dist/src/contact/index.d.ts.map +1 -1
  13. package/dist/src/contact/schema.d.ts.map +1 -1
  14. package/dist/src/contact/validation.d.ts +3 -0
  15. package/dist/src/contact/validation.d.ts.map +1 -1
  16. package/dist/src/contract.d.ts +164160 -131652
  17. package/dist/src/contract.d.ts.map +1 -1
  18. package/dist/src/cx-log/index.d.ts +352 -2
  19. package/dist/src/cx-log/index.d.ts.map +1 -1
  20. package/dist/src/cx-log/schema.d.ts +557 -4
  21. package/dist/src/cx-log/schema.d.ts.map +1 -1
  22. package/dist/src/instagram/index.d.ts +487 -2
  23. package/dist/src/instagram/index.d.ts.map +1 -1
  24. package/dist/src/line/index.d.ts +487 -2
  25. package/dist/src/line/index.d.ts.map +1 -1
  26. package/dist/src/mail/mail-contract.d.ts +30477 -6759
  27. package/dist/src/mail/mail-contract.d.ts.map +1 -1
  28. package/dist/src/mail/message-contract.d.ts +6424 -64
  29. package/dist/src/mail/message-contract.d.ts.map +1 -1
  30. package/dist/src/mail/room-contract.d.ts +19532 -2172
  31. package/dist/src/mail/room-contract.d.ts.map +1 -1
  32. package/dist/src/mail/schemas/message-validation.schema.d.ts +7 -4
  33. package/dist/src/mail/schemas/message-validation.schema.d.ts.map +1 -1
  34. package/dist/src/mail/schemas/message.schema.d.ts +762 -40
  35. package/dist/src/mail/schemas/message.schema.d.ts.map +1 -1
  36. package/dist/src/mail/schemas/room-validation.schema.d.ts +6057 -350
  37. package/dist/src/mail/schemas/room-validation.schema.d.ts.map +1 -1
  38. package/dist/src/mail/schemas/room.schema.d.ts +5984 -308
  39. package/dist/src/mail/schemas/room.schema.d.ts.map +1 -1
  40. package/dist/src/messenger/index.d.ts +487 -2
  41. package/dist/src/messenger/index.d.ts.map +1 -1
  42. package/dist/src/telephony-cdr/call-report.schema.d.ts +62 -62
  43. package/dist/src/telephony-cdr/call-report.schema.d.ts.map +1 -1
  44. package/dist/src/telephony-cdr/index.d.ts +1 -622
  45. package/dist/src/telephony-cdr/index.d.ts.map +1 -1
  46. package/dist/src/viber/index.d.ts +487 -2
  47. package/dist/src/viber/index.d.ts.map +1 -1
  48. package/dist/src/webchat/index.d.ts +487 -2
  49. package/dist/src/webchat/index.d.ts.map +1 -1
  50. package/dist/src/workflow-rule/index.d.ts +834 -4
  51. package/dist/src/workflow-rule/index.d.ts.map +1 -1
  52. package/dist/src/wrap-up-form/index.d.ts +1447 -6
  53. package/dist/src/wrap-up-form/index.d.ts.map +1 -1
  54. package/dist/src/wrap-up-form/schema.d.ts +207 -2
  55. package/dist/src/wrap-up-form/schema.d.ts.map +1 -1
  56. package/dist/src/wrap-up-form/validation.d.ts +29 -0
  57. package/dist/src/wrap-up-form/validation.d.ts.map +1 -1
  58. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -988,12 +988,27 @@ var TelephonyDropdownListSchema = z23.object({
988
988
 
989
989
  // src/wrap-up-form/schema.ts
990
990
  import z24 from "zod";
991
+ var CustomFieldSchema = z24.object({
992
+ id: z24.string().uuid(),
993
+ createdAt: z24.date(),
994
+ updatedAt: z24.date(),
995
+ deletedAt: z24.date().nullable(),
996
+ textValue: z24.string().nullable(),
997
+ booleanValue: z24.boolean().nullable(),
998
+ numberValue: z24.number().nullable(),
999
+ dateValue: z24.date().nullable(),
1000
+ entityId: z24.string().uuid(),
1001
+ attributeId: z24.string().uuid()
1002
+ });
991
1003
  var WrapUpFormSchema = DefaultEntitySchema.extend({
992
1004
  note: z24.string().nullable(),
993
1005
  disposition: z24.string().nullable(),
1006
+ type: z24.string(),
1007
+ tags: z24.array(TagSchema),
1008
+ categories: z24.array(CategorySchema),
994
1009
  callFrom: z24.string().nullable(),
995
1010
  callTo: z24.string().nullable(),
996
- tags: z24.array(TagSchema)
1011
+ customFields: z24.array(CustomFieldSchema).optional().nullable()
997
1012
  });
998
1013
 
999
1014
  // src/cx-log/schema.ts
@@ -1025,6 +1040,7 @@ var CxLogSchemaWithRelations = DefaultEntitySchema.extend({
1025
1040
  firstResponseDate: z25.string(),
1026
1041
  resolutionTime: z25.string().nullable(),
1027
1042
  resolutionDate: z25.string(),
1043
+ wrapUpDuration: z25.string(),
1028
1044
  slaMeet: z25.string().nullable(),
1029
1045
  evaluateForm: EvaluateFormSchema.nullable(),
1030
1046
  wrapUpForm: WrapUpFormSchema.nullable(),
@@ -1351,7 +1367,7 @@ import z30 from "zod";
1351
1367
 
1352
1368
  // src/custom-field/schema.ts
1353
1369
  import z29 from "zod";
1354
- var CustomFieldSchema = DefaultEntitySchema.extend({
1370
+ var CustomFieldSchema2 = DefaultEntitySchema.extend({
1355
1371
  textValue: z29.string().nullable(),
1356
1372
  booleanValue: z29.boolean().nullable(),
1357
1373
  numberValue: z29.number().nullable(),
@@ -1375,7 +1391,7 @@ var GetRoomsSchema = z30.object({
1375
1391
  address: z30.string().optional(),
1376
1392
  contactGroups: z30.string().array().optional(),
1377
1393
  selectedDate: z30.string().optional(),
1378
- customFields: z30.array(CustomFieldSchema).optional(),
1394
+ customFields: z30.array(CustomFieldSchema2).optional(),
1379
1395
  tags: z30.string().array().optional(),
1380
1396
  phone: z30.string().optional(),
1381
1397
  email: z30.string().optional(),
@@ -2732,6 +2748,7 @@ var ContactContractValidationSchema = {
2732
2748
  page: z41.coerce.number().default(1),
2733
2749
  pageSize: z41.coerce.number().default(10),
2734
2750
  keyword: z41.string(),
2751
+ withEmail: z41.coerce.boolean().default(false),
2735
2752
  relations: z41.array(
2736
2753
  z41.union([
2737
2754
  z41.literal("company"),
@@ -2762,7 +2779,7 @@ var ContactContractValidationSchema = {
2762
2779
  })
2763
2780
  )
2764
2781
  }),
2765
- response: CustomFieldSchema
2782
+ response: CustomFieldSchema2
2766
2783
  }
2767
2784
  };
2768
2785
 
@@ -4141,22 +4158,49 @@ var MessageSchema2 = z58.object({
4141
4158
  date: z58.date(),
4142
4159
  action: z58.string(),
4143
4160
  unseen: z58.boolean(),
4161
+ sendAt: z58.date(),
4162
+ starred: z58.boolean(),
4144
4163
  seemsLikeNew: z58.boolean(),
4145
- from: z58.array(MailUserSchema),
4146
- to: z58.array(MailUserSchema),
4147
- cc: z58.array(MailUserSchema),
4148
- bcc: z58.array(MailUserSchema),
4164
+ from: z58.array(MailParticipant),
4165
+ to: z58.array(MailParticipant),
4166
+ cc: z58.array(MailParticipant),
4167
+ bcc: z58.array(MailParticipant),
4149
4168
  attachments: z58.array(AttachmentSchema)
4150
4169
  });
4151
4170
 
4152
4171
  // src/mail/schemas/room.schema.ts
4172
+ var ContactSchema2 = z59.object({
4173
+ id: z59.string().uuid(),
4174
+ createdAt: z59.date(),
4175
+ updatedAt: z59.date(),
4176
+ deletedAt: z59.date().nullable(),
4177
+ name: z59.string(),
4178
+ address: z59.string().nullable(),
4179
+ channel: z59.string().nullable(),
4180
+ notes: z59.string().nullable(),
4181
+ contactProfile: z59.string().nullable(),
4182
+ socialProfileUrl: z59.string().nullable()
4183
+ });
4153
4184
  var MailUserSchema = z59.object({
4154
4185
  id: z59.string(),
4155
4186
  createdAt: z59.date(),
4156
4187
  updatedAt: z59.date(),
4157
4188
  deletedAt: z59.date().nullable(),
4158
4189
  name: z59.string(),
4159
- address: z59.string()
4190
+ address: z59.string(),
4191
+ contactId: z59.string(),
4192
+ contact: ContactSchema2,
4193
+ isNewContact: z59.boolean()
4194
+ });
4195
+ var MailParticipant = z59.object({
4196
+ id: z59.string(),
4197
+ createdAt: z59.date(),
4198
+ updatedAt: z59.date(),
4199
+ deletedAt: z59.date().nullable(),
4200
+ roomId: z59.string(),
4201
+ messageId: z59.string(),
4202
+ mailUserId: z59.string(),
4203
+ mailUser: MailUserSchema
4160
4204
  });
4161
4205
  var TagSchema2 = z59.object({
4162
4206
  color: z59.string(),
@@ -4203,10 +4247,10 @@ var MailRoomSchema = z59.object({
4203
4247
  direction: z59.string(),
4204
4248
  lastMessageId: z59.string(),
4205
4249
  firstMessageId: z59.string(),
4206
- from: z59.array(MailUserSchema),
4207
- to: z59.array(MailUserSchema),
4208
- cc: z59.array(MailUserSchema),
4209
- bcc: z59.array(MailUserSchema),
4250
+ from: z59.array(MailParticipant),
4251
+ to: z59.array(MailParticipant),
4252
+ cc: z59.array(MailParticipant),
4253
+ bcc: z59.array(MailParticipant),
4210
4254
  firstMessage: MessageSchema2,
4211
4255
  lastMessage: MessageSchema2,
4212
4256
  tags: z59.array(TagSchema2),
@@ -4372,12 +4416,28 @@ var roomContract = initContract18().router(
4372
4416
  }),
4373
4417
  responses: {
4374
4418
  200: DefaultSuccessResponseSchema.extend({
4375
- data: z61.array(MailUserSchema)
4419
+ data: z61.array(MailParticipant)
4376
4420
  }),
4377
4421
  ...DefaultResponses
4378
4422
  },
4379
4423
  summary: "Get all the attachments of a room"
4380
4424
  },
4425
+ addNewEmailToContact: {
4426
+ method: "POST",
4427
+ path: "/add_email_to_contact",
4428
+ responses: {
4429
+ 200: DefaultSuccessResponseSchema.extend({
4430
+ data: z61.string()
4431
+ }),
4432
+ ...DefaultResponses
4433
+ },
4434
+ body: z61.object({
4435
+ email: z61.string(),
4436
+ contactId: z61.string(),
4437
+ mailUserId: z61.string()
4438
+ }),
4439
+ summary: "Add a new email of a mail room participant to an existing contact"
4440
+ },
4381
4441
  update: {
4382
4442
  method: "PATCH",
4383
4443
  path: "/:id",
@@ -4715,7 +4775,7 @@ import z67 from "zod";
4715
4775
 
4716
4776
  // src/mail/schemas/message-validation.schema.ts
4717
4777
  import z66 from "zod";
4718
- var MailParticipant = z66.object({
4778
+ var MailParticipant2 = z66.object({
4719
4779
  name: z66.string().optional(),
4720
4780
  address: z66.string().email()
4721
4781
  });
@@ -4725,10 +4785,11 @@ var MessageContractsValidationsSchema = {
4725
4785
  subject: z66.string(),
4726
4786
  text: z66.string(),
4727
4787
  html: z66.string(),
4728
- from: MailParticipant,
4729
- to: z66.array(MailParticipant),
4730
- cc: z66.array(MailParticipant).optional(),
4731
- bcc: z66.array(MailParticipant).optional(),
4788
+ from: MailParticipant2,
4789
+ to: MailParticipant2,
4790
+ cc: z66.array(MailParticipant2).optional(),
4791
+ bcc: z66.array(MailParticipant2).optional(),
4792
+ sendAt: z66.string().optional(),
4732
4793
  reference: z66.object({
4733
4794
  messageId: z66.string(),
4734
4795
  action: z66.union([z66.literal("reply"), z66.literal("forward")])
@@ -4799,9 +4860,60 @@ var messageContract = initContract21().router(
4799
4860
  }),
4800
4861
  ...DefaultResponses
4801
4862
  },
4802
- summary: "Get a message by id"
4803
- }
4863
+ summary: "Get a message"
4864
+ },
4804
4865
  //#endregion get a message
4866
+ //#region update a message
4867
+ update: {
4868
+ method: "PATCH",
4869
+ path: "/:id",
4870
+ pathParams: z67.object({
4871
+ id: z67.string()
4872
+ }),
4873
+ responses: {
4874
+ 200: DefaultSuccessResponseSchema.extend({
4875
+ data: MessageSchema2
4876
+ }),
4877
+ ...DefaultResponses
4878
+ },
4879
+ summary: "Update a message",
4880
+ body: MessageSchema2.partial()
4881
+ },
4882
+ //#endregion update a message
4883
+ //#region delete a message
4884
+ delete: {
4885
+ method: "DELETE",
4886
+ path: "/:id",
4887
+ pathParams: z67.object({
4888
+ id: z67.string()
4889
+ }),
4890
+ responses: {
4891
+ 200: DefaultSuccessResponseSchema.extend({
4892
+ data: MessageSchema2
4893
+ }),
4894
+ ...DefaultResponses
4895
+ },
4896
+ summary: "Delete a message",
4897
+ body: null
4898
+ },
4899
+ //#endregion delete a message
4900
+ //#region cancel a scheduled message
4901
+ cancelScheduledMessage: {
4902
+ method: "DELETE",
4903
+ path: "/scheduled_message/:id",
4904
+ pathParams: z67.object({
4905
+ id: z67.string()
4906
+ }),
4907
+ responses: {
4908
+ 200: DefaultSuccessResponseSchema.extend({
4909
+ data: MessageSchema2
4910
+ }),
4911
+ ...DefaultResponses
4912
+ },
4913
+ summary: "Cancel a scheduled message",
4914
+ body: null
4915
+ }
4916
+ //#endregion cancel a scheduled message
4805
4917
  },
4806
4918
  {
4807
4919
  pathPrefix: "mail/message"
@@ -5173,7 +5285,7 @@ var telephonyAgentPresenceStatusContract = initContract27().router(
5173
5285
  );
5174
5286
 
5175
5287
  // src/telephony-cdr/index.ts
5176
- import z79 from "zod";
5288
+ import z78 from "zod";
5177
5289
 
5178
5290
  // src/telephony-cdr/validation.ts
5179
5291
  import z77 from "zod";
@@ -5293,166 +5405,6 @@ var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
5293
5405
 
5294
5406
  // src/telephony-cdr/index.ts
5295
5407
  import { initContract as initContract28 } from "@ts-rest/core";
5296
-
5297
- // src/telephony-cdr/call-report.schema.ts
5298
- import z78 from "zod";
5299
- var ExtCallStatisticsListSchema = z78.object({
5300
- /** @example "ext_num" */
5301
- ext_num: z78.string(),
5302
- /** @example "ext_name" */
5303
- ext_name: z78.string(),
5304
- /** @example 0 */
5305
- answered_calls: z78.number(),
5306
- /** @example 0 */
5307
- no_answer_calls: z78.number(),
5308
- /** @example 0 */
5309
- busy_calls: z78.number(),
5310
- /** @example 0 */
5311
- failed_calls: z78.number(),
5312
- /** @example 0 */
5313
- voicemail_calls: z78.number(),
5314
- /** @example 0 */
5315
- total_holding_time: z78.number(),
5316
- /** @example 0 */
5317
- total_talking_time: z78.number(),
5318
- /** @example "src_name" */
5319
- src_name: z78.string(),
5320
- /** @example 0 */
5321
- total_call_count: z78.number(),
5322
- /** @example "mobile" */
5323
- mobile: z78.string()
5324
- });
5325
- var ExtStatisticSchema = z78.object({
5326
- ext_num: z78.string(),
5327
- ext_name: z78.string(),
5328
- answered_calls: z78.number(),
5329
- no_answer_calls: z78.number(),
5330
- busy_calls: z78.number(),
5331
- failed_calls: z78.number(),
5332
- voicemail_calls: z78.number(),
5333
- total_holding_time: z78.number(),
5334
- total_talking_time: z78.number(),
5335
- time: z78.number(),
5336
- mobile: z78.string()
5337
- });
5338
- var ExtCallActivityListSchema = z78.object({
5339
- time: z78.number(),
5340
- answered_calls: z78.number(),
5341
- no_answer_calls: z78.number(),
5342
- busy_calls: z78.number(),
5343
- failed_calls: z78.number(),
5344
- voicemail_calls: z78.number(),
5345
- total_holding_time: z78.number(),
5346
- total_talking_time: z78.number(),
5347
- ext_statistics: z78.array(ExtStatisticSchema)
5348
- });
5349
- var TrunkList = z78.object({
5350
- trunk_name: z78.string(),
5351
- total_calls: z78.number()
5352
- });
5353
- var TrunkActivityListSchema = z78.object({
5354
- time: z78.number(),
5355
- trunk_list: z78.array(TrunkList)
5356
- });
5357
- var QueueAvgWaitTalkTimeListSchema = z78.object({
5358
- time: z78.number(),
5359
- avg_wait_time: z78.number(),
5360
- avg_talk_time: z78.number()
5361
- });
5362
- var SatisfactionListSchema = z78.object({
5363
- press_key: z78.string(),
5364
- total: z78.number(),
5365
- key_point: z78.number().optional()
5366
- });
5367
- var agentListSchema = z78.object({
5368
- agent_name: z78.string(),
5369
- agent_num: z78.string(),
5370
- satisfaction_list: z78.array(SatisfactionListSchema).optional(),
5371
- total_key: z78.number().optional(),
5372
- total_point: z78.number().optional(),
5373
- average_point: z78.number().optional()
5374
- });
5375
- var QueueSatisfactionSchema = z78.object({
5376
- queue_name: z78.string(),
5377
- queue_num: z78.string(),
5378
- satisfaction_list: z78.array(SatisfactionListSchema).optional(),
5379
- agent_list: z78.array(agentListSchema).optional(),
5380
- total_key: z78.number().optional(),
5381
- total_point: z78.number().optional(),
5382
- average_point: z78.number().optional()
5383
- });
5384
- var QueuePerformanceListSchema = z78.object({
5385
- queue: z78.string(),
5386
- total_calls: z78.number(),
5387
- answered_calls: z78.number(),
5388
- missed_calls: z78.number(),
5389
- abandoned_calls: z78.number(),
5390
- average_waiting_time: z78.number(),
5391
- average_talking_time: z78.number(),
5392
- max_waiting_time: z78.number(),
5393
- answered_rate: z78.number(),
5394
- missed_rate: z78.number(),
5395
- abandoned_rate: z78.number(),
5396
- sla: z78.number()
5397
- });
5398
- var QueueAgentMissCallsListSchema = z78.object({
5399
- agent_name: z78.string(),
5400
- agent_num: z78.string(),
5401
- time: z78.string(),
5402
- total_wait_time: z78.number(),
5403
- src_name: z78.string(),
5404
- src_num: z78.string(),
5405
- queue_status: z78.string(),
5406
- polling_attempts: z78.number(),
5407
- missed_reason: z78.string()
5408
- });
5409
- var QueueAgentInOutCallsListSchema = z78.object({
5410
- agent_name: z78.string(),
5411
- agent_num: z78.string(),
5412
- inbound_calls: z78.number(),
5413
- inbound_duration: z78.number(),
5414
- outbound_calls: z78.number(),
5415
- outbound_duration: z78.number(),
5416
- total_calls: z78.number(),
5417
- total_duration: z78.number(),
5418
- average_talk_duration: z78.number()
5419
- });
5420
- var CallReportModel = z78.object({
5421
- errcode: z78.number(),
5422
- errmsg: z78.string(),
5423
- total_number: z78.number(),
5424
- is_12hour: z78.number().optional(),
5425
- ext_call_statistics_list: z78.array(ExtCallStatisticsListSchema).optional(),
5426
- ext_call_activity_list: z78.array(ExtCallActivityListSchema).optional(),
5427
- trunk_activity_list: z78.array(TrunkActivityListSchema).optional(),
5428
- queue_avg_wait_talk_time_list: z78.array(QueueAvgWaitTalkTimeListSchema).optional(),
5429
- queue_satisfaction: QueueSatisfactionSchema.optional(),
5430
- queue_performance_list: z78.array(QueuePerformanceListSchema).optional(),
5431
- queue_agent_miss_calls_list: z78.array(QueueAgentMissCallsListSchema).optional(),
5432
- queue_agent_in_out_calls_list: z78.array(QueueAgentInOutCallsListSchema).optional(),
5433
- callback_result: z78.string(),
5434
- page: z78.number().optional(),
5435
- pageSize: z78.number().optional()
5436
- });
5437
- var CallReportSchema = z78.object({
5438
- errcode: z78.number(),
5439
- errmsg: z78.string(),
5440
- total_number: z78.number(),
5441
- is_12hour: z78.number().optional(),
5442
- ext_call_statistics_list: z78.array(ExtCallStatisticsListSchema).optional(),
5443
- ext_call_activity_list: z78.array(ExtCallActivityListSchema).optional(),
5444
- trunk_activity_list: z78.array(TrunkActivityListSchema).optional(),
5445
- queue_avg_wait_talk_time_list: z78.array(QueueAvgWaitTalkTimeListSchema).optional(),
5446
- queue_satisfaction: QueueSatisfactionSchema.optional(),
5447
- queue_performance_list: z78.array(QueuePerformanceListSchema).optional(),
5448
- queue_agent_miss_calls_list: z78.array(QueueAgentMissCallsListSchema).optional(),
5449
- queue_agent_in_out_calls_list: z78.array(QueueAgentInOutCallsListSchema).optional(),
5450
- callback_result: z78.string(),
5451
- page: z78.number().optional(),
5452
- pageSize: z78.number().optional()
5453
- });
5454
-
5455
- // src/telephony-cdr/index.ts
5456
5408
  var telephonyCdrContract = initContract28().router(
5457
5409
  {
5458
5410
  findAll: {
@@ -5462,10 +5414,10 @@ var telephonyCdrContract = initContract28().router(
5462
5414
  query: GetAllTelephonyCdrSchema,
5463
5415
  responses: {
5464
5416
  200: DefaultSuccessResponseSchema.extend({
5465
- total: z79.number(),
5466
- page: z79.number(),
5467
- pageSize: z79.number(),
5468
- telephonyCdrs: z79.array(TelephonyCdrSchema)
5417
+ total: z78.number(),
5418
+ page: z78.number(),
5419
+ pageSize: z78.number(),
5420
+ telephonyCdrs: z78.array(TelephonyCdrSchema)
5469
5421
  }),
5470
5422
  401: DefaultUnauthorizedSchema
5471
5423
  },
@@ -5478,10 +5430,10 @@ var telephonyCdrContract = initContract28().router(
5478
5430
  query: GetAllTelephonyCdrSchema,
5479
5431
  responses: {
5480
5432
  200: DefaultSuccessResponseSchema.extend({
5481
- total: z79.number(),
5482
- page: z79.number(),
5483
- pageSize: z79.number(),
5484
- telephonyCdrs: z79.array(TelephonyCdrSchema)
5433
+ total: z78.number(),
5434
+ page: z78.number(),
5435
+ pageSize: z78.number(),
5436
+ telephonyCdrs: z78.array(TelephonyCdrSchema)
5485
5437
  }),
5486
5438
  401: DefaultUnauthorizedSchema
5487
5439
  },
@@ -5494,10 +5446,10 @@ var telephonyCdrContract = initContract28().router(
5494
5446
  query: GetRecentTelephonyCdrSchema,
5495
5447
  responses: {
5496
5448
  200: DefaultSuccessResponseSchema.extend({
5497
- total: z79.number(),
5498
- page: z79.number(),
5499
- pageSize: z79.number(),
5500
- telephonyCdrs: z79.array(TelephonyCdrSchema)
5449
+ total: z78.number(),
5450
+ page: z78.number(),
5451
+ pageSize: z78.number(),
5452
+ telephonyCdrs: z78.array(TelephonyCdrSchema)
5501
5453
  }),
5502
5454
  401: DefaultUnauthorizedSchema
5503
5455
  },
@@ -5521,7 +5473,8 @@ var telephonyCdrContract = initContract28().router(
5521
5473
  headers: DefaultHeaderSchema,
5522
5474
  body: GetYeastarCallReportSchema,
5523
5475
  responses: {
5524
- 200: CallReportSchema,
5476
+ // 200: CallReportSchema,
5477
+ 200: z78.object({}),
5525
5478
  401: DefaultUnauthorizedSchema
5526
5479
  },
5527
5480
  summary: "Get yeastar call report."
@@ -5589,35 +5542,35 @@ var telephonyCdrContract = initContract28().router(
5589
5542
 
5590
5543
  // src/telephony-extension/index.ts
5591
5544
  import { initContract as initContract29 } from "@ts-rest/core";
5592
- import z81 from "zod";
5545
+ import z80 from "zod";
5593
5546
 
5594
5547
  // src/telephony-extension/schema.ts
5595
- import z80 from "zod";
5596
- var TelephonyExtensionSchema3 = z80.object({
5597
- errcode: z80.coerce.number(),
5598
- errmsg: z80.string(),
5599
- total_number: z80.coerce.number(),
5600
- data: z80.array(
5601
- z80.object({
5602
- id: z80.coerce.number(),
5603
- online_status: z80.object({
5604
- fx_phone: z80.object({ status: z80.coerce.number() }),
5605
- sip_phone: z80.object({
5606
- status: z80.coerce.number(),
5607
- ext_dev_type: z80.string().optional()
5608
- }),
5609
- linkus_desktop: z80.object({ status: z80.coerce.number() }),
5610
- linkus_mobile: z80.object({ status: z80.coerce.number() }),
5611
- linkus_web: z80.object({
5612
- status: z80.coerce.number(),
5613
- ext_dev_type: z80.string().optional()
5548
+ import z79 from "zod";
5549
+ var TelephonyExtensionSchema3 = z79.object({
5550
+ errcode: z79.coerce.number(),
5551
+ errmsg: z79.string(),
5552
+ total_number: z79.coerce.number(),
5553
+ data: z79.array(
5554
+ z79.object({
5555
+ id: z79.coerce.number(),
5556
+ online_status: z79.object({
5557
+ fx_phone: z79.object({ status: z79.coerce.number() }),
5558
+ sip_phone: z79.object({
5559
+ status: z79.coerce.number(),
5560
+ ext_dev_type: z79.string().optional()
5561
+ }),
5562
+ linkus_desktop: z79.object({ status: z79.coerce.number() }),
5563
+ linkus_mobile: z79.object({ status: z79.coerce.number() }),
5564
+ linkus_web: z79.object({
5565
+ status: z79.coerce.number(),
5566
+ ext_dev_type: z79.string().optional()
5614
5567
  })
5615
5568
  }).optional(),
5616
- presence_status: z80.string().optional(),
5617
- number: z80.string().optional(),
5618
- caller_id_name: z80.string().optional(),
5619
- role_name: z80.string().optional(),
5620
- email_addr: z80.string().optional()
5569
+ presence_status: z79.string().optional(),
5570
+ number: z79.string().optional(),
5571
+ caller_id_name: z79.string().optional(),
5572
+ role_name: z79.string().optional(),
5573
+ email_addr: z79.string().optional()
5621
5574
  })
5622
5575
  )
5623
5576
  });
@@ -5632,8 +5585,8 @@ var telephonyExtensionContract = initContract29().router(
5632
5585
  query: null,
5633
5586
  responses: {
5634
5587
  200: TelephonyExtensionSchema3,
5635
- 400: z81.object({
5636
- message: z81.string()
5588
+ 400: z80.object({
5589
+ message: z80.string()
5637
5590
  }),
5638
5591
  401: DefaultUnauthorizedSchema,
5639
5592
  500: DefaultErrorResponseSchema
@@ -5646,10 +5599,10 @@ var telephonyExtensionContract = initContract29().router(
5646
5599
 
5647
5600
  // src/ticket/index.ts
5648
5601
  import { initContract as initContract30 } from "@ts-rest/core";
5649
- import z83 from "zod";
5602
+ import z82 from "zod";
5650
5603
 
5651
5604
  // src/ticket/validation.ts
5652
- import z82 from "zod";
5605
+ import z81 from "zod";
5653
5606
  var addErrorMessage2 = (field) => {
5654
5607
  return field.refine(
5655
5608
  ({ isRequired, value }) => {
@@ -5667,106 +5620,106 @@ var addErrorMessage2 = (field) => {
5667
5620
  }
5668
5621
  );
5669
5622
  };
5670
- var BaseSchema3 = z82.object({
5671
- isRequired: z82.boolean(),
5672
- attributeId: z82.string()
5623
+ var BaseSchema3 = z81.object({
5624
+ isRequired: z81.boolean(),
5625
+ attributeId: z81.string()
5673
5626
  });
5674
5627
  var SingleValue2 = addErrorMessage2(
5675
5628
  BaseSchema3.extend({
5676
- value: z82.string()
5629
+ value: z81.string()
5677
5630
  })
5678
5631
  );
5679
- var CreateTicketValidationSchema = z82.object({
5632
+ var CreateTicketValidationSchema = z81.object({
5680
5633
  title: SingleValue2,
5681
5634
  description: SingleValue2,
5682
5635
  status: SingleValue2,
5683
5636
  type: SingleValue2,
5684
5637
  priority: SingleValue2,
5685
5638
  contact: SingleValue2,
5686
- assignee: z82.object({
5687
- isRequired: z82.boolean(),
5688
- attributeId: z82.string(),
5689
- value: z82.string()
5639
+ assignee: z81.object({
5640
+ isRequired: z81.boolean(),
5641
+ attributeId: z81.string(),
5642
+ value: z81.string()
5690
5643
  }),
5691
5644
  channel: SingleValue2,
5692
- tags: addErrorMessage2(BaseSchema3.extend({ value: z82.array(z82.string()) })),
5693
- categories: BaseSchema3.extend({ value: z82.array(z82.string()) }),
5694
- customFields: z82.array(
5645
+ tags: addErrorMessage2(BaseSchema3.extend({ value: z81.array(z81.string()) })),
5646
+ categories: BaseSchema3.extend({ value: z81.array(z81.string()) }),
5647
+ customFields: z81.array(
5695
5648
  addErrorMessage2(
5696
5649
  BaseSchema3.extend({
5697
- value: z82.union([z82.string(), z82.array(z82.string())]),
5698
- type: z82.string(),
5699
- isDefaultAttribute: z82.boolean()
5650
+ value: z81.union([z81.string(), z81.array(z81.string())]),
5651
+ type: z81.string(),
5652
+ isDefaultAttribute: z81.boolean()
5700
5653
  })
5701
5654
  )
5702
5655
  ),
5703
- reasonToAssign: z82.object({ value: z82.string() }).optional()
5656
+ reasonToAssign: z81.object({ value: z81.string() }).optional()
5704
5657
  });
5705
5658
  var UpdateTicketValidationSchema = CreateTicketValidationSchema;
5706
- var TicketAttachmentRecordSchema = z82.object({
5707
- bucketName: z82.string(),
5708
- fileKey: z82.string(),
5709
- fileName: z82.string(),
5710
- fileSize: z82.coerce.number(),
5711
- url: z82.string()
5712
- });
5713
- var CreateTicketAttachmentRecordsSchema = z82.object({
5714
- ticketId: z82.string(),
5715
- attributeId: z82.string(),
5716
- ticketAttachmentRecords: z82.array(TicketAttachmentRecordSchema)
5717
- });
5718
- var TicketParamsSchema = z82.object({
5719
- page: z82.coerce.number().default(1),
5720
- pageSize: z82.coerce.number().default(10)
5721
- });
5722
- var CustomFieldQuery = z82.object({
5723
- attributeId: z82.string(),
5724
- type: z82.string(),
5725
- value: z82.union([z82.string(), z82.array(z82.string())])
5726
- });
5727
- var GetAllTicketQuerySchema = z82.object({
5728
- page: z82.string().transform((value) => Number(value)),
5729
- pageSize: z82.string().transform((value) => Number(value)),
5730
- selectedDate: z82.string(),
5731
- keyword: z82.string(),
5732
- title: z82.string(),
5733
- description: z82.string(),
5734
- status: z82.array(z82.string()),
5735
- priority: z82.array(z82.string()),
5736
- channel: z82.array(z82.string()),
5737
- type: z82.array(z82.string()),
5738
- ticketType: z82.array(z82.string()),
5739
- contact: z82.array(z82.string()),
5740
- tags: z82.array(z82.string().uuid()),
5741
- categories: z82.array(z82.string().uuid()),
5742
- assignee: z82.array(z82.string().uuid()),
5743
- customFields: z82.array(
5744
- z82.object({
5745
- attributeId: z82.string().uuid(),
5746
- type: z82.string(),
5747
- value: z82.union([z82.string(), z82.array(z82.string())])
5659
+ var TicketAttachmentRecordSchema = z81.object({
5660
+ bucketName: z81.string(),
5661
+ fileKey: z81.string(),
5662
+ fileName: z81.string(),
5663
+ fileSize: z81.coerce.number(),
5664
+ url: z81.string()
5665
+ });
5666
+ var CreateTicketAttachmentRecordsSchema = z81.object({
5667
+ ticketId: z81.string(),
5668
+ attributeId: z81.string(),
5669
+ ticketAttachmentRecords: z81.array(TicketAttachmentRecordSchema)
5670
+ });
5671
+ var TicketParamsSchema = z81.object({
5672
+ page: z81.coerce.number().default(1),
5673
+ pageSize: z81.coerce.number().default(10)
5674
+ });
5675
+ var CustomFieldQuery = z81.object({
5676
+ attributeId: z81.string(),
5677
+ type: z81.string(),
5678
+ value: z81.union([z81.string(), z81.array(z81.string())])
5679
+ });
5680
+ var GetAllTicketQuerySchema = z81.object({
5681
+ page: z81.string().transform((value) => Number(value)),
5682
+ pageSize: z81.string().transform((value) => Number(value)),
5683
+ selectedDate: z81.string(),
5684
+ keyword: z81.string(),
5685
+ title: z81.string(),
5686
+ description: z81.string(),
5687
+ status: z81.array(z81.string()),
5688
+ priority: z81.array(z81.string()),
5689
+ channel: z81.array(z81.string()),
5690
+ type: z81.array(z81.string()),
5691
+ ticketType: z81.array(z81.string()),
5692
+ contact: z81.array(z81.string()),
5693
+ tags: z81.array(z81.string().uuid()),
5694
+ categories: z81.array(z81.string().uuid()),
5695
+ assignee: z81.array(z81.string().uuid()),
5696
+ customFields: z81.array(
5697
+ z81.object({
5698
+ attributeId: z81.string().uuid(),
5699
+ type: z81.string(),
5700
+ value: z81.union([z81.string(), z81.array(z81.string())])
5748
5701
  })
5749
5702
  )
5750
5703
  }).partial();
5751
- var ExportAllTicketQuerySchema = z82.object({
5752
- agent: z82.array(z82.string()),
5753
- selectedDate: z82.string(),
5754
- keyword: z82.string(),
5755
- title: z82.string(),
5756
- description: z82.string(),
5757
- status: z82.array(z82.string()),
5758
- priority: z82.array(z82.string()),
5759
- channel: z82.array(z82.string()),
5760
- type: z82.array(z82.string()),
5761
- ticketType: z82.array(z82.string()),
5762
- contact: z82.array(z82.string()),
5763
- tags: z82.array(z82.string()),
5764
- categories: z82.array(z82.string()),
5765
- customFields: z82.array(
5766
- z82.object({
5767
- attributeId: z82.string().uuid(),
5768
- type: z82.string(),
5769
- value: z82.union([z82.string(), z82.array(z82.string())])
5704
+ var ExportAllTicketQuerySchema = z81.object({
5705
+ agent: z81.array(z81.string()),
5706
+ selectedDate: z81.string(),
5707
+ keyword: z81.string(),
5708
+ title: z81.string(),
5709
+ description: z81.string(),
5710
+ status: z81.array(z81.string()),
5711
+ priority: z81.array(z81.string()),
5712
+ channel: z81.array(z81.string()),
5713
+ type: z81.array(z81.string()),
5714
+ ticketType: z81.array(z81.string()),
5715
+ contact: z81.array(z81.string()),
5716
+ tags: z81.array(z81.string()),
5717
+ categories: z81.array(z81.string()),
5718
+ customFields: z81.array(
5719
+ z81.object({
5720
+ attributeId: z81.string().uuid(),
5721
+ type: z81.string(),
5722
+ value: z81.union([z81.string(), z81.array(z81.string())])
5770
5723
  })
5771
5724
  )
5772
5725
  }).partial();
@@ -5782,14 +5735,14 @@ var ticketContract = initContract30().router(
5782
5735
  201: DefaultSuccessResponseSchema.extend({
5783
5736
  data: TicketSchema
5784
5737
  }),
5785
- 400: z83.object({
5786
- message: z83.string()
5738
+ 400: z82.object({
5739
+ message: z82.string()
5787
5740
  }),
5788
- 409: z83.object({
5789
- message: z83.string()
5741
+ 409: z82.object({
5742
+ message: z82.string()
5790
5743
  }),
5791
- 500: z83.object({
5792
- message: z83.string()
5744
+ 500: z82.object({
5745
+ message: z82.string()
5793
5746
  }),
5794
5747
  401: DefaultUnauthorizedSchema,
5795
5748
  404: DefaultNotFoundSchema,
@@ -5810,8 +5763,8 @@ var ticketContract = initContract30().router(
5810
5763
  TicketSchema
5811
5764
  )
5812
5765
  }),
5813
- 400: z83.object({
5814
- message: z83.string()
5766
+ 400: z82.object({
5767
+ message: z82.string()
5815
5768
  }),
5816
5769
  401: DefaultUnauthorizedSchema,
5817
5770
  500: DefaultErrorResponseSchema
@@ -5821,14 +5774,14 @@ var ticketContract = initContract30().router(
5821
5774
  getTicketById: {
5822
5775
  method: "GET",
5823
5776
  path: "/:id",
5824
- pathParams: z83.object({ id: z83.string() }),
5777
+ pathParams: z82.object({ id: z82.string() }),
5825
5778
  headers: DefaultHeaderSchema,
5826
5779
  responses: {
5827
5780
  200: DefaultSuccessResponseSchema.extend({
5828
5781
  data: TicketSchema
5829
5782
  }),
5830
- 400: z83.object({
5831
- message: z83.string()
5783
+ 400: z82.object({
5784
+ message: z82.string()
5832
5785
  }),
5833
5786
  401: DefaultUnauthorizedSchema,
5834
5787
  500: DefaultErrorResponseSchema
@@ -5838,15 +5791,15 @@ var ticketContract = initContract30().router(
5838
5791
  getTicketByContactId: {
5839
5792
  method: "GET",
5840
5793
  path: "/contact/:id",
5841
- pathParams: z83.object({ id: z83.string() }),
5794
+ pathParams: z82.object({ id: z82.string() }),
5842
5795
  query: TicketParamsSchema,
5843
5796
  headers: DefaultHeaderSchema,
5844
5797
  responses: {
5845
5798
  200: DefaultSuccessResponseSchema.extend({
5846
5799
  data: WithPagination(TicketSchema)
5847
5800
  }),
5848
- 400: z83.object({
5849
- message: z83.string()
5801
+ 400: z82.object({
5802
+ message: z82.string()
5850
5803
  }),
5851
5804
  401: DefaultUnauthorizedSchema,
5852
5805
  500: DefaultErrorResponseSchema
@@ -5856,21 +5809,21 @@ var ticketContract = initContract30().router(
5856
5809
  updateTicket: {
5857
5810
  method: "PATCH",
5858
5811
  path: "/:id",
5859
- pathParams: z83.object({ id: z83.string() }),
5812
+ pathParams: z82.object({ id: z82.string() }),
5860
5813
  body: UpdateTicketValidationSchema,
5861
5814
  headers: DefaultHeaderSchema,
5862
5815
  responses: {
5863
5816
  201: DefaultSuccessResponseSchema.extend({
5864
5817
  data: TicketSchema
5865
5818
  }),
5866
- 400: z83.object({
5867
- message: z83.string()
5819
+ 400: z82.object({
5820
+ message: z82.string()
5868
5821
  }),
5869
- 409: z83.object({
5870
- message: z83.string()
5822
+ 409: z82.object({
5823
+ message: z82.string()
5871
5824
  }),
5872
- 500: z83.object({
5873
- message: z83.string()
5825
+ 500: z82.object({
5826
+ message: z82.string()
5874
5827
  }),
5875
5828
  401: DefaultUnauthorizedSchema,
5876
5829
  404: DefaultNotFoundSchema,
@@ -5881,11 +5834,11 @@ var ticketContract = initContract30().router(
5881
5834
  deleteTicket: {
5882
5835
  method: "DELETE",
5883
5836
  path: "/:id",
5884
- pathParams: z83.object({ id: z83.string() }),
5837
+ pathParams: z82.object({ id: z82.string() }),
5885
5838
  headers: DefaultHeaderSchema,
5886
5839
  body: null,
5887
5840
  responses: {
5888
- 200: DefaultSuccessResponseSchema.extend({ message: z83.string() }),
5841
+ 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
5889
5842
  500: DefaultErrorResponseSchema
5890
5843
  },
5891
5844
  summary: "Delete a extension."
@@ -5893,19 +5846,19 @@ var ticketContract = initContract30().router(
5893
5846
  updateDescription: {
5894
5847
  method: "PATCH",
5895
5848
  path: "/description/update/:id",
5896
- pathParams: z83.object({ id: z83.string() }),
5897
- body: z83.object({ description: z83.string() }),
5849
+ pathParams: z82.object({ id: z82.string() }),
5850
+ body: z82.object({ description: z82.string() }),
5898
5851
  headers: DefaultHeaderSchema,
5899
5852
  responses: {
5900
- 201: DefaultSuccessResponseSchema.extend({ message: z83.string() }),
5901
- 400: z83.object({
5902
- message: z83.string()
5853
+ 201: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
5854
+ 400: z82.object({
5855
+ message: z82.string()
5903
5856
  }),
5904
- 409: z83.object({
5905
- message: z83.string()
5857
+ 409: z82.object({
5858
+ message: z82.string()
5906
5859
  }),
5907
- 500: z83.object({
5908
- message: z83.string()
5860
+ 500: z82.object({
5861
+ message: z82.string()
5909
5862
  }),
5910
5863
  401: DefaultUnauthorizedSchema,
5911
5864
  404: DefaultNotFoundSchema,
@@ -5916,19 +5869,19 @@ var ticketContract = initContract30().router(
5916
5869
  updateTitle: {
5917
5870
  method: "PATCH",
5918
5871
  path: "/title/update/:id",
5919
- pathParams: z83.object({ id: z83.string() }),
5920
- body: z83.object({ title: z83.string() }),
5872
+ pathParams: z82.object({ id: z82.string() }),
5873
+ body: z82.object({ title: z82.string() }),
5921
5874
  headers: DefaultHeaderSchema,
5922
5875
  responses: {
5923
- 200: DefaultSuccessResponseSchema.extend({ message: z83.string() }),
5924
- 400: z83.object({
5925
- message: z83.string()
5876
+ 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
5877
+ 400: z82.object({
5878
+ message: z82.string()
5926
5879
  }),
5927
- 409: z83.object({
5928
- message: z83.string()
5880
+ 409: z82.object({
5881
+ message: z82.string()
5929
5882
  }),
5930
- 500: z83.object({
5931
- message: z83.string()
5883
+ 500: z82.object({
5884
+ message: z82.string()
5932
5885
  }),
5933
5886
  401: DefaultUnauthorizedSchema,
5934
5887
  404: DefaultNotFoundSchema,
@@ -5939,19 +5892,19 @@ var ticketContract = initContract30().router(
5939
5892
  updateType: {
5940
5893
  method: "PATCH",
5941
5894
  path: "/type/update/:id",
5942
- pathParams: z83.object({ id: z83.string() }),
5943
- body: z83.object({ type: z83.string() }),
5895
+ pathParams: z82.object({ id: z82.string() }),
5896
+ body: z82.object({ type: z82.string() }),
5944
5897
  headers: DefaultHeaderSchema,
5945
5898
  responses: {
5946
- 200: DefaultSuccessResponseSchema.extend({ message: z83.string() }),
5947
- 400: z83.object({
5948
- message: z83.string()
5899
+ 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
5900
+ 400: z82.object({
5901
+ message: z82.string()
5949
5902
  }),
5950
- 409: z83.object({
5951
- message: z83.string()
5903
+ 409: z82.object({
5904
+ message: z82.string()
5952
5905
  }),
5953
- 500: z83.object({
5954
- message: z83.string()
5906
+ 500: z82.object({
5907
+ message: z82.string()
5955
5908
  }),
5956
5909
  401: DefaultUnauthorizedSchema,
5957
5910
  404: DefaultNotFoundSchema,
@@ -5962,19 +5915,19 @@ var ticketContract = initContract30().router(
5962
5915
  updateStatus: {
5963
5916
  method: "PATCH",
5964
5917
  path: "/status/update/:id",
5965
- pathParams: z83.object({ id: z83.string() }),
5966
- body: z83.object({ status: z83.string() }),
5918
+ pathParams: z82.object({ id: z82.string() }),
5919
+ body: z82.object({ status: z82.string() }),
5967
5920
  headers: DefaultHeaderSchema,
5968
5921
  responses: {
5969
- 200: DefaultSuccessResponseSchema.extend({ message: z83.string() }),
5970
- 400: z83.object({
5971
- message: z83.string()
5922
+ 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
5923
+ 400: z82.object({
5924
+ message: z82.string()
5972
5925
  }),
5973
- 409: z83.object({
5974
- message: z83.string()
5926
+ 409: z82.object({
5927
+ message: z82.string()
5975
5928
  }),
5976
- 500: z83.object({
5977
- message: z83.string()
5929
+ 500: z82.object({
5930
+ message: z82.string()
5978
5931
  }),
5979
5932
  401: DefaultUnauthorizedSchema,
5980
5933
  404: DefaultNotFoundSchema,
@@ -5985,19 +5938,19 @@ var ticketContract = initContract30().router(
5985
5938
  updatePriority: {
5986
5939
  method: "PATCH",
5987
5940
  path: "/priority/update/:id",
5988
- pathParams: z83.object({ id: z83.string() }),
5989
- body: z83.object({ priority: z83.string() }),
5941
+ pathParams: z82.object({ id: z82.string() }),
5942
+ body: z82.object({ priority: z82.string() }),
5990
5943
  headers: DefaultHeaderSchema,
5991
5944
  responses: {
5992
- 200: DefaultSuccessResponseSchema.extend({ message: z83.string() }),
5993
- 400: z83.object({
5994
- message: z83.string()
5945
+ 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
5946
+ 400: z82.object({
5947
+ message: z82.string()
5995
5948
  }),
5996
- 409: z83.object({
5997
- message: z83.string()
5949
+ 409: z82.object({
5950
+ message: z82.string()
5998
5951
  }),
5999
- 500: z83.object({
6000
- message: z83.string()
5952
+ 500: z82.object({
5953
+ message: z82.string()
6001
5954
  }),
6002
5955
  401: DefaultUnauthorizedSchema,
6003
5956
  404: DefaultNotFoundSchema,
@@ -6008,19 +5961,19 @@ var ticketContract = initContract30().router(
6008
5961
  updateChannel: {
6009
5962
  method: "PATCH",
6010
5963
  path: "/channel/update/:id",
6011
- pathParams: z83.object({ id: z83.string() }),
6012
- body: z83.object({ channel: z83.string() }),
5964
+ pathParams: z82.object({ id: z82.string() }),
5965
+ body: z82.object({ channel: z82.string() }),
6013
5966
  headers: DefaultHeaderSchema,
6014
5967
  responses: {
6015
- 200: DefaultSuccessResponseSchema.extend({ message: z83.string() }),
6016
- 400: z83.object({
6017
- message: z83.string()
5968
+ 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
5969
+ 400: z82.object({
5970
+ message: z82.string()
6018
5971
  }),
6019
- 409: z83.object({
6020
- message: z83.string()
5972
+ 409: z82.object({
5973
+ message: z82.string()
6021
5974
  }),
6022
- 500: z83.object({
6023
- message: z83.string()
5975
+ 500: z82.object({
5976
+ message: z82.string()
6024
5977
  }),
6025
5978
  401: DefaultUnauthorizedSchema,
6026
5979
  404: DefaultNotFoundSchema,
@@ -6031,19 +5984,19 @@ var ticketContract = initContract30().router(
6031
5984
  updateTags: {
6032
5985
  method: "PATCH",
6033
5986
  path: "/tags/update/:id",
6034
- pathParams: z83.object({ id: z83.string() }),
6035
- body: z83.object({ tags: z83.array(z83.string()) }),
5987
+ pathParams: z82.object({ id: z82.string() }),
5988
+ body: z82.object({ tags: z82.array(z82.string()) }),
6036
5989
  headers: DefaultHeaderSchema,
6037
5990
  responses: {
6038
- 200: DefaultSuccessResponseSchema.extend({ message: z83.string() }),
6039
- 400: z83.object({
6040
- message: z83.string()
5991
+ 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
5992
+ 400: z82.object({
5993
+ message: z82.string()
6041
5994
  }),
6042
- 409: z83.object({
6043
- message: z83.string()
5995
+ 409: z82.object({
5996
+ message: z82.string()
6044
5997
  }),
6045
- 500: z83.object({
6046
- message: z83.string()
5998
+ 500: z82.object({
5999
+ message: z82.string()
6047
6000
  }),
6048
6001
  401: DefaultUnauthorizedSchema,
6049
6002
  404: DefaultNotFoundSchema,
@@ -6054,25 +6007,25 @@ var ticketContract = initContract30().router(
6054
6007
  changeAssignee: {
6055
6008
  method: "PATCH",
6056
6009
  path: "/assignee/update/:id",
6057
- pathParams: z83.object({ id: z83.string() }),
6058
- body: z83.object({
6059
- ticketId: z83.string(),
6060
- assigneeId: z83.string(),
6061
- reason: z83.string().optional()
6010
+ pathParams: z82.object({ id: z82.string() }),
6011
+ body: z82.object({
6012
+ ticketId: z82.string(),
6013
+ assigneeId: z82.string(),
6014
+ reason: z82.string().optional()
6062
6015
  }),
6063
6016
  headers: DefaultHeaderSchema,
6064
6017
  responses: {
6065
6018
  200: DefaultSuccessResponseSchema.extend({
6066
6019
  data: TicketSchema
6067
6020
  }),
6068
- 400: z83.object({
6069
- message: z83.string()
6021
+ 400: z82.object({
6022
+ message: z82.string()
6070
6023
  }),
6071
- 409: z83.object({
6072
- message: z83.string()
6024
+ 409: z82.object({
6025
+ message: z82.string()
6073
6026
  }),
6074
- 500: z83.object({
6075
- message: z83.string()
6027
+ 500: z82.object({
6028
+ message: z82.string()
6076
6029
  }),
6077
6030
  401: DefaultUnauthorizedSchema,
6078
6031
  404: DefaultNotFoundSchema,
@@ -6083,14 +6036,14 @@ var ticketContract = initContract30().router(
6083
6036
  getTicketCountByContact: {
6084
6037
  method: "GET",
6085
6038
  path: "/ticket_count/contact/:id",
6086
- pathParams: z83.object({ id: z83.string() }),
6039
+ pathParams: z82.object({ id: z82.string() }),
6087
6040
  headers: DefaultHeaderSchema,
6088
6041
  responses: {
6089
6042
  200: DefaultSuccessResponseSchema.extend({
6090
6043
  data: TicketCountByContactSchema
6091
6044
  }),
6092
- 400: z83.object({
6093
- message: z83.string()
6045
+ 400: z82.object({
6046
+ message: z82.string()
6094
6047
  }),
6095
6048
  401: DefaultUnauthorizedSchema,
6096
6049
  500: DefaultErrorResponseSchema
@@ -6106,14 +6059,14 @@ var ticketContract = initContract30().router(
6106
6059
  201: DefaultSuccessResponseSchema.extend({
6107
6060
  data: TicketCustomFieldSchema
6108
6061
  }),
6109
- 400: z83.object({
6110
- message: z83.string()
6062
+ 400: z82.object({
6063
+ message: z82.string()
6111
6064
  }),
6112
- 409: z83.object({
6113
- message: z83.string()
6065
+ 409: z82.object({
6066
+ message: z82.string()
6114
6067
  }),
6115
- 500: z83.object({
6116
- message: z83.string()
6068
+ 500: z82.object({
6069
+ message: z82.string()
6117
6070
  }),
6118
6071
  401: DefaultUnauthorizedSchema,
6119
6072
  404: DefaultNotFoundSchema,
@@ -6138,24 +6091,24 @@ var ticketContract = initContract30().router(
6138
6091
 
6139
6092
  // src/user/index.ts
6140
6093
  import { initContract as initContract31 } from "@ts-rest/core";
6141
- import z85 from "zod";
6094
+ import z84 from "zod";
6142
6095
 
6143
6096
  // src/user/validation.ts
6144
- import { z as z84 } from "zod";
6145
- var CreateUserSchema = z84.object({
6146
- name: z84.string(),
6147
- email: z84.string().email(),
6148
- address: z84.string().nullable(),
6149
- phone: z84.string().nullable(),
6150
- password: z84.string(),
6151
- notificationCount: z84.number().nullable().optional(),
6152
- roles: z84.array(z84.string())
6097
+ import { z as z83 } from "zod";
6098
+ var CreateUserSchema = z83.object({
6099
+ name: z83.string(),
6100
+ email: z83.string().email(),
6101
+ address: z83.string().nullable(),
6102
+ phone: z83.string().nullable(),
6103
+ password: z83.string(),
6104
+ notificationCount: z83.number().nullable().optional(),
6105
+ roles: z83.array(z83.string())
6153
6106
  });
6154
6107
  var UpdateUserSchema = CreateUserSchema.extend({
6155
- newPassword: z84.string()
6108
+ newPassword: z83.string()
6156
6109
  });
6157
- var UpdateUserProfileSchema = z84.object({
6158
- password: z84.string()
6110
+ var UpdateUserProfileSchema = z83.object({
6111
+ password: z83.string()
6159
6112
  });
6160
6113
 
6161
6114
  // src/user/index.ts
@@ -6170,8 +6123,8 @@ var userContract = initContract31().router(
6170
6123
  201: DefaultSuccessResponseSchema.extend({
6171
6124
  user: UserSchema
6172
6125
  }),
6173
- 400: z85.object({
6174
- message: z85.string()
6126
+ 400: z84.object({
6127
+ message: z84.string()
6175
6128
  }),
6176
6129
  401: DefaultUnauthorizedSchema,
6177
6130
  404: DefaultNotFoundSchema,
@@ -6184,16 +6137,16 @@ var userContract = initContract31().router(
6184
6137
  method: "GET",
6185
6138
  path: "",
6186
6139
  headers: DefaultHeaderSchema,
6187
- query: z85.object({
6188
- page: z85.coerce.number().optional(),
6189
- pageSize: z85.coerce.number().optional(),
6140
+ query: z84.object({
6141
+ page: z84.coerce.number().optional(),
6142
+ pageSize: z84.coerce.number().optional(),
6190
6143
  // Don't add default 10. In some places, we need to fetch all users.
6191
- keyword: z85.string().optional()
6144
+ keyword: z84.string().optional()
6192
6145
  }).optional(),
6193
6146
  responses: {
6194
6147
  200: WithPagination(UserSchema),
6195
- 400: z85.object({
6196
- message: z85.string()
6148
+ 400: z84.object({
6149
+ message: z84.string()
6197
6150
  }),
6198
6151
  401: DefaultUnauthorizedSchema,
6199
6152
  500: DefaultErrorResponseSchema
@@ -6203,12 +6156,12 @@ var userContract = initContract31().router(
6203
6156
  getUserById: {
6204
6157
  method: "GET",
6205
6158
  path: "/:id",
6206
- pathParams: z85.object({ id: z85.string() }),
6159
+ pathParams: z84.object({ id: z84.string() }),
6207
6160
  headers: DefaultHeaderSchema,
6208
6161
  responses: {
6209
6162
  200: UserSchema,
6210
- 400: z85.object({
6211
- message: z85.string()
6163
+ 400: z84.object({
6164
+ message: z84.string()
6212
6165
  }),
6213
6166
  401: DefaultUnauthorizedSchema
6214
6167
  },
@@ -6217,15 +6170,15 @@ var userContract = initContract31().router(
6217
6170
  updateUser: {
6218
6171
  method: "PATCH",
6219
6172
  path: "/:id",
6220
- pathParams: z85.object({ id: z85.string() }),
6173
+ pathParams: z84.object({ id: z84.string() }),
6221
6174
  headers: DefaultHeaderSchema,
6222
6175
  body: UpdateUserSchema,
6223
6176
  responses: {
6224
6177
  201: DefaultSuccessResponseSchema.extend({
6225
6178
  user: UserSchema
6226
6179
  }),
6227
- 400: z85.object({
6228
- message: z85.string()
6180
+ 400: z84.object({
6181
+ message: z84.string()
6229
6182
  }),
6230
6183
  401: DefaultUnauthorizedSchema,
6231
6184
  404: DefaultNotFoundSchema,
@@ -6237,15 +6190,15 @@ var userContract = initContract31().router(
6237
6190
  updateUserProfile: {
6238
6191
  method: "PATCH",
6239
6192
  path: "/profile/:id",
6240
- pathParams: z85.object({ id: z85.string() }),
6193
+ pathParams: z84.object({ id: z84.string() }),
6241
6194
  headers: DefaultHeaderSchema,
6242
6195
  body: UpdateUserProfileSchema,
6243
6196
  responses: {
6244
6197
  201: DefaultSuccessResponseSchema.extend({
6245
6198
  user: UserSchema
6246
6199
  }),
6247
- 400: z85.object({
6248
- message: z85.string()
6200
+ 400: z84.object({
6201
+ message: z84.string()
6249
6202
  }),
6250
6203
  401: DefaultUnauthorizedSchema,
6251
6204
  404: DefaultNotFoundSchema,
@@ -6257,11 +6210,11 @@ var userContract = initContract31().router(
6257
6210
  deleteUser: {
6258
6211
  method: "DELETE",
6259
6212
  path: "/:id",
6260
- pathParams: z85.object({ id: z85.string() }),
6213
+ pathParams: z84.object({ id: z84.string() }),
6261
6214
  headers: DefaultHeaderSchema,
6262
6215
  body: null,
6263
6216
  responses: {
6264
- 200: DefaultSuccessResponseSchema.extend({ message: z85.string() }),
6217
+ 200: DefaultSuccessResponseSchema.extend({ message: z84.string() }),
6265
6218
  404: DefaultNotFoundSchema,
6266
6219
  422: DefaultUnprocessibleSchema,
6267
6220
  500: DefaultErrorResponseSchema
@@ -6274,26 +6227,26 @@ var userContract = initContract31().router(
6274
6227
 
6275
6228
  // src/user-presence-status-log/index.ts
6276
6229
  import { initContract as initContract32 } from "@ts-rest/core";
6277
- import z88 from "zod";
6230
+ import z87 from "zod";
6278
6231
 
6279
6232
  // src/user-presence-status-log/schema.ts
6280
- import z86 from "zod";
6233
+ import z85 from "zod";
6281
6234
  var UserPresenceStatusLogSchema = DefaultEntitySchema.extend({
6282
6235
  user: UserSchema,
6283
6236
  previousPresenceStatus: PresenceStatusSchema,
6284
6237
  newPresenceStatus: PresenceStatusSchema,
6285
- reason: z86.string()
6238
+ reason: z85.string()
6286
6239
  });
6287
6240
 
6288
6241
  // src/user-presence-status-log/validation.ts
6289
- import z87 from "zod";
6290
- var UserPresenceStatusLogParamsSchema = z87.object({
6291
- page: z87.coerce.number().default(1),
6292
- pageSize: z87.coerce.number().default(10),
6293
- selectedDate: z87.string().optional()
6242
+ import z86 from "zod";
6243
+ var UserPresenceStatusLogParamsSchema = z86.object({
6244
+ page: z86.coerce.number().default(1),
6245
+ pageSize: z86.coerce.number().default(10),
6246
+ selectedDate: z86.string().optional()
6294
6247
  }).optional();
6295
- var UserPresenceStatusLogExportParamsSchema = z87.object({
6296
- selectedDate: z87.string().optional()
6248
+ var UserPresenceStatusLogExportParamsSchema = z86.object({
6249
+ selectedDate: z86.string().optional()
6297
6250
  });
6298
6251
 
6299
6252
  // src/user-presence-status-log/index.ts
@@ -6306,8 +6259,8 @@ var userPresenceStatusLogContract = initContract32().router(
6306
6259
  headers: DefaultHeaderSchema,
6307
6260
  responses: {
6308
6261
  200: WithPagination(UserPresenceStatusLogSchema),
6309
- 400: z88.object({
6310
- message: z88.string()
6262
+ 400: z87.object({
6263
+ message: z87.string()
6311
6264
  }),
6312
6265
  401: DefaultUnauthorizedSchema,
6313
6266
  500: DefaultErrorResponseSchema
@@ -6321,8 +6274,8 @@ var userPresenceStatusLogContract = initContract32().router(
6321
6274
  headers: DefaultHeaderSchema,
6322
6275
  responses: {
6323
6276
  200: null,
6324
- 400: z88.object({
6325
- message: z88.string()
6277
+ 400: z87.object({
6278
+ message: z87.string()
6326
6279
  }),
6327
6280
  401: DefaultUnauthorizedSchema,
6328
6281
  500: DefaultErrorResponseSchema
@@ -6334,44 +6287,44 @@ var userPresenceStatusLogContract = initContract32().router(
6334
6287
 
6335
6288
  // src/widget/index.ts
6336
6289
  import { initContract as initContract33 } from "@ts-rest/core";
6337
- import z91 from "zod";
6290
+ import z90 from "zod";
6338
6291
 
6339
6292
  // src/widget/schema.ts
6340
- import z89 from "zod";
6341
- var FieldsSchema = z89.object({ data: z89.array(z89.string()) });
6342
- var WidgetPositionSchema = z89.union([
6343
- z89.literal("menu"),
6344
- z89.literal("ticket_detail"),
6345
- z89.literal("contact_detail")
6293
+ import z88 from "zod";
6294
+ var FieldsSchema = z88.object({ data: z88.array(z88.string()) });
6295
+ var WidgetPositionSchema = z88.union([
6296
+ z88.literal("menu"),
6297
+ z88.literal("ticket_detail"),
6298
+ z88.literal("contact_detail")
6346
6299
  ]);
6347
6300
  var WidgetSchema = DefaultEntitySchema.extend({
6348
- name: z89.string(),
6349
- description: z89.string().nullable(),
6301
+ name: z88.string(),
6302
+ description: z88.string().nullable(),
6350
6303
  position: WidgetPositionSchema.nullable(),
6351
6304
  fields: FieldsSchema,
6352
- url: z89.string()
6305
+ url: z88.string()
6353
6306
  });
6354
6307
 
6355
6308
  // src/widget/validation.ts
6356
- import z90 from "zod";
6357
- var CreateWidgetSchema = z90.object({
6358
- name: z90.string(),
6359
- description: z90.string(),
6360
- url: z90.string(),
6309
+ import z89 from "zod";
6310
+ var CreateWidgetSchema = z89.object({
6311
+ name: z89.string(),
6312
+ description: z89.string(),
6313
+ url: z89.string(),
6361
6314
  position: WidgetPositionSchema,
6362
- fields: z90.object({
6315
+ fields: z89.object({
6363
6316
  data: (
6364
6317
  // Array of attribute system names
6365
- z90.array(z90.string())
6318
+ z89.array(z89.string())
6366
6319
  )
6367
6320
  }).optional()
6368
6321
  });
6369
6322
  var UpdateWidgetSchema = CreateWidgetSchema;
6370
- var GetWidgetUrlPathQuerySchema = z90.object({
6371
- widgetId: z90.string(),
6323
+ var GetWidgetUrlPathQuerySchema = z89.object({
6324
+ widgetId: z89.string(),
6372
6325
  // Position ID is ticket ID, contact ID, etc.
6373
6326
  // TODO: The name "Position ID" is confusing. Think of a better name.
6374
- positionId: z90.string()
6327
+ positionId: z89.string()
6375
6328
  });
6376
6329
 
6377
6330
  // src/widget/index.ts
@@ -6386,8 +6339,8 @@ var widgetContract = initContract33().router(
6386
6339
  201: DefaultSuccessResponseSchema.extend({
6387
6340
  widget: WidgetSchema
6388
6341
  }),
6389
- 400: z91.object({
6390
- message: z91.string()
6342
+ 400: z90.object({
6343
+ message: z90.string()
6391
6344
  }),
6392
6345
  401: DefaultUnauthorizedSchema,
6393
6346
  500: DefaultErrorResponseSchema
@@ -6397,17 +6350,17 @@ var widgetContract = initContract33().router(
6397
6350
  getWidgets: {
6398
6351
  method: "GET",
6399
6352
  path: "",
6400
- query: z91.object({
6401
- page: z91.coerce.number().default(1),
6402
- pageSize: z91.coerce.number().default(10),
6403
- keyword: z91.coerce.string().optional()
6353
+ query: z90.object({
6354
+ page: z90.coerce.number().default(1),
6355
+ pageSize: z90.coerce.number().default(10),
6356
+ keyword: z90.coerce.string().optional()
6404
6357
  }).optional(),
6405
6358
  headers: DefaultHeaderSchema,
6406
6359
  responses: {
6407
6360
  200: WithPagination(WidgetSchema),
6408
6361
  500: DefaultErrorResponseSchema,
6409
- 400: z91.object({
6410
- message: z91.string()
6362
+ 400: z90.object({
6363
+ message: z90.string()
6411
6364
  }),
6412
6365
  401: DefaultUnauthorizedSchema
6413
6366
  },
@@ -6418,9 +6371,9 @@ var widgetContract = initContract33().router(
6418
6371
  path: "/menu",
6419
6372
  headers: DefaultHeaderSchema,
6420
6373
  responses: {
6421
- 200: z91.array(WidgetSchema),
6422
- 400: z91.object({
6423
- message: z91.string()
6374
+ 200: z90.array(WidgetSchema),
6375
+ 400: z90.object({
6376
+ message: z90.string()
6424
6377
  }),
6425
6378
  401: DefaultUnauthorizedSchema,
6426
6379
  500: DefaultErrorResponseSchema
@@ -6432,9 +6385,9 @@ var widgetContract = initContract33().router(
6432
6385
  path: "/ticket_detail",
6433
6386
  headers: DefaultHeaderSchema,
6434
6387
  responses: {
6435
- 200: z91.array(WidgetSchema),
6436
- 400: z91.object({
6437
- message: z91.string()
6388
+ 200: z90.array(WidgetSchema),
6389
+ 400: z90.object({
6390
+ message: z90.string()
6438
6391
  }),
6439
6392
  401: DefaultUnauthorizedSchema,
6440
6393
  500: DefaultErrorResponseSchema
@@ -6446,9 +6399,9 @@ var widgetContract = initContract33().router(
6446
6399
  path: "/contact_detail",
6447
6400
  headers: DefaultHeaderSchema,
6448
6401
  responses: {
6449
- 200: z91.array(WidgetSchema),
6450
- 400: z91.object({
6451
- message: z91.string()
6402
+ 200: z90.array(WidgetSchema),
6403
+ 400: z90.object({
6404
+ message: z90.string()
6452
6405
  }),
6453
6406
  401: DefaultUnauthorizedSchema,
6454
6407
  500: DefaultErrorResponseSchema
@@ -6458,12 +6411,12 @@ var widgetContract = initContract33().router(
6458
6411
  getWidgetById: {
6459
6412
  method: "GET",
6460
6413
  path: "/:id",
6461
- pathParams: z91.object({ id: z91.string() }),
6414
+ pathParams: z90.object({ id: z90.string() }),
6462
6415
  headers: DefaultHeaderSchema,
6463
6416
  responses: {
6464
6417
  200: WidgetSchema,
6465
- 400: z91.object({
6466
- message: z91.string()
6418
+ 400: z90.object({
6419
+ message: z90.string()
6467
6420
  }),
6468
6421
  401: DefaultUnauthorizedSchema,
6469
6422
  500: DefaultErrorResponseSchema
@@ -6477,10 +6430,10 @@ var widgetContract = initContract33().router(
6477
6430
  headers: DefaultHeaderSchema,
6478
6431
  responses: {
6479
6432
  201: DefaultSuccessResponseSchema.extend({
6480
- url: z91.string()
6433
+ url: z90.string()
6481
6434
  }),
6482
- 400: z91.object({
6483
- message: z91.string()
6435
+ 400: z90.object({
6436
+ message: z90.string()
6484
6437
  }),
6485
6438
  401: DefaultUnauthorizedSchema
6486
6439
  },
@@ -6489,14 +6442,14 @@ var widgetContract = initContract33().router(
6489
6442
  updateWidget: {
6490
6443
  method: "PATCH",
6491
6444
  path: "/:id",
6492
- pathParams: z91.object({ id: z91.string() }),
6445
+ pathParams: z90.object({ id: z90.string() }),
6493
6446
  headers: DefaultHeaderSchema,
6494
6447
  responses: {
6495
6448
  201: DefaultSuccessResponseSchema.extend({
6496
6449
  widget: WidgetSchema
6497
6450
  }),
6498
- 400: z91.object({
6499
- message: z91.string()
6451
+ 400: z90.object({
6452
+ message: z90.string()
6500
6453
  }),
6501
6454
  401: DefaultUnauthorizedSchema
6502
6455
  },
@@ -6506,11 +6459,11 @@ var widgetContract = initContract33().router(
6506
6459
  deleteWidget: {
6507
6460
  method: "DELETE",
6508
6461
  path: "/:id",
6509
- pathParams: z91.object({ id: z91.string() }),
6462
+ pathParams: z90.object({ id: z90.string() }),
6510
6463
  headers: DefaultHeaderSchema,
6511
6464
  body: null,
6512
6465
  responses: {
6513
- 200: DefaultSuccessResponseSchema.extend({ message: z91.string() }),
6466
+ 200: DefaultSuccessResponseSchema.extend({ message: z90.string() }),
6514
6467
  500: DefaultErrorResponseSchema
6515
6468
  },
6516
6469
  summary: "Delete a widget."
@@ -6521,29 +6474,69 @@ var widgetContract = initContract33().router(
6521
6474
 
6522
6475
  // src/wrap-up-form/index.ts
6523
6476
  import { initContract as initContract34 } from "@ts-rest/core";
6524
- import z93 from "zod";
6477
+ import z92 from "zod";
6525
6478
 
6526
6479
  // src/wrap-up-form/validation.ts
6527
- import { z as z92 } from "zod";
6528
- var CreateWrapUpFormSchema = z92.object({
6529
- note: z92.string().nullable().optional(),
6530
- disposition: z92.string().nullable().optional(),
6531
- callFrom: z92.string().nullable().optional(),
6532
- callTo: z92.string().nullable().optional()
6480
+ import { z as z91 } from "zod";
6481
+ var CreateWrapUpFormSchema = z91.object({
6482
+ note: z91.string().nullable().optional(),
6483
+ disposition: z91.string().nullable().optional(),
6484
+ callFrom: z91.string().nullable().optional(),
6485
+ callTo: z91.string().nullable().optional()
6533
6486
  });
6534
6487
  var UpdateWrapUpFormSchema = CreateWrapUpFormSchema.extend({
6535
- tags: z92.array(z92.string()).optional()
6488
+ tags: z91.array(z91.string()).optional(),
6489
+ categoryIds: z91.array(z91.string().uuid()).optional(),
6490
+ customFields: z91.array(
6491
+ z91.object({
6492
+ id: z91.string().uuid(),
6493
+ type: z91.string(),
6494
+ value: z91.string()
6495
+ })
6496
+ ).optional(),
6497
+ durationSeconds: z91.number().optional()
6536
6498
  });
6537
- var CreateCXLogWrapUpFormSchema = z92.object({
6538
- cxLogId: z92.string().uuid(),
6539
- disposition: z92.string().optional(),
6540
- tagIds: z92.array(z92.string().uuid()).optional(),
6541
- note: z92.string().optional()
6499
+ var CreateCXLogWrapUpFormSchema = z91.object({
6500
+ cxLogId: z91.string().uuid(),
6501
+ disposition: z91.string().optional(),
6502
+ tagIds: z91.array(z91.string().uuid()).optional(),
6503
+ note: z91.string().optional()
6542
6504
  });
6543
6505
 
6544
6506
  // src/wrap-up-form/index.ts
6545
6507
  var wrapUpFormContract = initContract34().router(
6546
6508
  {
6509
+ getWrapUpFormTimer: {
6510
+ method: "GET",
6511
+ path: "/timer",
6512
+ headers: DefaultHeaderSchema,
6513
+ responses: {
6514
+ 200: DefaultSuccessResponseSchema.extend({
6515
+ wrapUpFormTimer: z92.number()
6516
+ }),
6517
+ 400: z92.object({
6518
+ message: z92.string()
6519
+ }),
6520
+ 401: DefaultUnauthorizedSchema,
6521
+ 500: DefaultErrorResponseSchema
6522
+ }
6523
+ },
6524
+ updateWrapUpFormTimer: {
6525
+ method: "PATCH",
6526
+ path: "/timer",
6527
+ body: z92.object({ newWrapUpFormTimer: z92.number().positive() }),
6528
+ headers: DefaultHeaderSchema,
6529
+ responses: {
6530
+ 200: DefaultSuccessResponseSchema.extend({
6531
+ wrapUpFormTimer: z92.number()
6532
+ }),
6533
+ 400: z92.object({
6534
+ message: z92.string()
6535
+ }),
6536
+ 401: DefaultUnauthorizedSchema,
6537
+ 500: DefaultErrorResponseSchema
6538
+ }
6539
+ },
6547
6540
  createWrapUpForm: {
6548
6541
  method: "POST",
6549
6542
  path: "",
@@ -6553,8 +6546,8 @@ var wrapUpFormContract = initContract34().router(
6553
6546
  201: DefaultSuccessResponseSchema.extend({
6554
6547
  wrapUpForm: WrapUpFormSchema
6555
6548
  }),
6556
- 400: z93.object({
6557
- message: z93.string()
6549
+ 400: z92.object({
6550
+ message: z92.string()
6558
6551
  }),
6559
6552
  401: DefaultUnauthorizedSchema,
6560
6553
  500: DefaultErrorResponseSchema
@@ -6576,33 +6569,47 @@ var wrapUpFormContract = initContract34().router(
6576
6569
  getWrapUpForms: {
6577
6570
  method: "GET",
6578
6571
  path: "",
6579
- query: z93.object({
6580
- page: z93.coerce.number().default(1),
6581
- pageSize: z93.coerce.number().default(10)
6572
+ query: z92.object({
6573
+ page: z92.coerce.number().default(1),
6574
+ pageSize: z92.coerce.number().default(10)
6582
6575
  }).optional(),
6583
6576
  headers: DefaultHeaderSchema,
6584
6577
  responses: {
6585
6578
  200: WithPagination(WrapUpFormSchema),
6586
- 400: z93.object({
6587
- message: z93.string()
6579
+ 400: z92.object({
6580
+ message: z92.string()
6588
6581
  }),
6589
6582
  401: DefaultUnauthorizedSchema,
6590
6583
  500: DefaultErrorResponseSchema
6591
6584
  },
6592
6585
  summary: "Get all wrap up form"
6593
6586
  },
6587
+ getWrapUpForm: {
6588
+ method: "GET",
6589
+ path: "/:id",
6590
+ pathParams: z92.object({ id: z92.string() }),
6591
+ headers: DefaultHeaderSchema,
6592
+ responses: {
6593
+ 200: WrapUpFormSchema,
6594
+ 400: z92.object({
6595
+ message: z92.string()
6596
+ }),
6597
+ 401: DefaultUnauthorizedSchema,
6598
+ 500: DefaultErrorResponseSchema
6599
+ }
6600
+ },
6594
6601
  updateWrapUpForm: {
6595
6602
  method: "PATCH",
6596
6603
  path: "/:id",
6597
- pathParams: z93.object({ id: z93.string() }),
6604
+ pathParams: z92.object({ id: z92.string() }),
6598
6605
  headers: DefaultHeaderSchema,
6599
6606
  body: UpdateWrapUpFormSchema,
6600
6607
  responses: {
6601
6608
  201: DefaultSuccessResponseSchema.extend({
6602
6609
  wrapUpForm: WrapUpFormSchema
6603
6610
  }),
6604
- 400: z93.object({
6605
- message: z93.string()
6611
+ 400: z92.object({
6612
+ message: z92.string()
6606
6613
  }),
6607
6614
  401: DefaultUnauthorizedSchema,
6608
6615
  500: DefaultErrorResponseSchema
@@ -6615,28 +6622,28 @@ var wrapUpFormContract = initContract34().router(
6615
6622
 
6616
6623
  // src/upload/index.ts
6617
6624
  import { initContract as initContract35 } from "@ts-rest/core";
6618
- import z94 from "zod";
6625
+ import z93 from "zod";
6619
6626
  var uploadContract = initContract35().router(
6620
6627
  {
6621
6628
  rename: {
6622
6629
  method: "POST",
6623
6630
  path: "/:id/rename",
6624
- pathParams: z94.object({
6625
- id: z94.string()
6631
+ pathParams: z93.object({
6632
+ id: z93.string()
6626
6633
  }),
6627
6634
  headers: DefaultHeaderSchema,
6628
6635
  responses: {
6629
6636
  201: DefaultSuccessResponseSchema.extend({
6630
- message: z94.string()
6637
+ message: z93.string()
6631
6638
  }),
6632
- 400: z94.object({
6633
- message: z94.string()
6639
+ 400: z93.object({
6640
+ message: z93.string()
6634
6641
  }),
6635
- 409: z94.object({
6636
- message: z94.string()
6642
+ 409: z93.object({
6643
+ message: z93.string()
6637
6644
  }),
6638
- 500: z94.object({
6639
- message: z94.string()
6645
+ 500: z93.object({
6646
+ message: z93.string()
6640
6647
  }),
6641
6648
  401: DefaultUnauthorizedSchema,
6642
6649
  404: DefaultNotFoundSchema,
@@ -6648,23 +6655,23 @@ var uploadContract = initContract35().router(
6648
6655
  delete: {
6649
6656
  method: "DELETE",
6650
6657
  path: "/:id",
6651
- pathParams: z94.object({
6652
- id: z94.string()
6658
+ pathParams: z93.object({
6659
+ id: z93.string()
6653
6660
  }),
6654
6661
  headers: DefaultHeaderSchema,
6655
6662
  body: null,
6656
6663
  responses: {
6657
6664
  201: DefaultSuccessResponseSchema.extend({
6658
- message: z94.string()
6665
+ message: z93.string()
6659
6666
  }),
6660
- 400: z94.object({
6661
- message: z94.string()
6667
+ 400: z93.object({
6668
+ message: z93.string()
6662
6669
  }),
6663
- 409: z94.object({
6664
- message: z94.string()
6670
+ 409: z93.object({
6671
+ message: z93.string()
6665
6672
  }),
6666
- 500: z94.object({
6667
- message: z94.string()
6673
+ 500: z93.object({
6674
+ message: z93.string()
6668
6675
  }),
6669
6676
  401: DefaultUnauthorizedSchema,
6670
6677
  404: DefaultNotFoundSchema,
@@ -6679,19 +6686,19 @@ var uploadContract = initContract35().router(
6679
6686
  );
6680
6687
 
6681
6688
  // src/viber/index.ts
6682
- import z96 from "zod";
6689
+ import z95 from "zod";
6683
6690
 
6684
6691
  // src/viber/validation.ts
6685
- import z95 from "zod";
6686
- var ViberChannelSchema = z95.object({
6687
- name: z95.string(),
6688
- accessToken: z95.string(),
6689
- actor: z95.object({
6690
- id: z95.string().uuid(),
6691
- name: z95.string(),
6692
- email: z95.string().email(),
6693
- address: z95.string().nullable(),
6694
- phone: z95.string().nullable()
6692
+ import z94 from "zod";
6693
+ var ViberChannelSchema = z94.object({
6694
+ name: z94.string(),
6695
+ accessToken: z94.string(),
6696
+ actor: z94.object({
6697
+ id: z94.string().uuid(),
6698
+ name: z94.string(),
6699
+ email: z94.string().email(),
6700
+ address: z94.string().nullable(),
6701
+ phone: z94.string().nullable()
6695
6702
  }).optional()
6696
6703
  });
6697
6704
 
@@ -6720,8 +6727,8 @@ var viberContract = initContract36().router({
6720
6727
  }),
6721
6728
  400: DefaultErrorResponseSchema
6722
6729
  },
6723
- body: z96.object({
6724
- id: z96.string().uuid()
6730
+ body: z95.object({
6731
+ id: z95.string().uuid()
6725
6732
  }),
6726
6733
  summary: "Connect viber channel"
6727
6734
  },
@@ -6737,8 +6744,8 @@ var viberContract = initContract36().router({
6737
6744
  reconnect: {
6738
6745
  method: "POST",
6739
6746
  path: "/reconnect/:channelId",
6740
- pathParams: z96.object({
6741
- channelId: z96.string().uuid()
6747
+ pathParams: z95.object({
6748
+ channelId: z95.string().uuid()
6742
6749
  }),
6743
6750
  responses: {
6744
6751
  200: DefaultSuccessResponseSchema.extend({
@@ -6753,8 +6760,8 @@ var viberContract = initContract36().router({
6753
6760
  delete: {
6754
6761
  method: "DELETE",
6755
6762
  path: "/delete/:channelId",
6756
- pathParams: z96.object({
6757
- channelId: z96.string().uuid()
6763
+ pathParams: z95.object({
6764
+ channelId: z95.string().uuid()
6758
6765
  }),
6759
6766
  body: null,
6760
6767
  responses: {
@@ -6767,58 +6774,58 @@ var viberContract = initContract36().router({
6767
6774
 
6768
6775
  // src/notification/index.ts
6769
6776
  import { initContract as initContract37 } from "@ts-rest/core";
6770
- import z99 from "zod";
6777
+ import z98 from "zod";
6771
6778
 
6772
6779
  // src/notification/validation.ts
6773
- import z98 from "zod";
6780
+ import z97 from "zod";
6774
6781
 
6775
6782
  // src/notification/schema.ts
6776
- import z97 from "zod";
6777
- var NotificationChangeSchema = z97.object({
6778
- id: z97.string().uuid(),
6779
- createdAt: z97.date(),
6780
- updatedAt: z97.date(),
6781
- deletedAt: z97.date().nullable(),
6782
- actorId: z97.string().uuid(),
6783
+ import z96 from "zod";
6784
+ var NotificationChangeSchema = z96.object({
6785
+ id: z96.string().uuid(),
6786
+ createdAt: z96.date(),
6787
+ updatedAt: z96.date(),
6788
+ deletedAt: z96.date().nullable(),
6789
+ actorId: z96.string().uuid(),
6783
6790
  actor: UserSchema,
6784
- notificationObjectId: z97.string().uuid(),
6785
- readAt: z97.date()
6786
- });
6787
- var NotificationObjectSchema = z97.object({
6788
- id: z97.string().uuid(),
6789
- createdAt: z97.date(),
6790
- updatedAt: z97.date(),
6791
- deletedAt: z97.date().nullable(),
6792
- data: z97.string(),
6791
+ notificationObjectId: z96.string().uuid(),
6792
+ readAt: z96.date()
6793
+ });
6794
+ var NotificationObjectSchema = z96.object({
6795
+ id: z96.string().uuid(),
6796
+ createdAt: z96.date(),
6797
+ updatedAt: z96.date(),
6798
+ deletedAt: z96.date().nullable(),
6799
+ data: z96.string(),
6793
6800
  notificationChange: NotificationChangeSchema
6794
6801
  });
6795
- var NotificationSchema = z97.object({
6796
- id: z97.string().uuid(),
6797
- createdAt: z97.date(),
6798
- updatedAt: z97.date(),
6799
- deletedAt: z97.date().nullable(),
6800
- notificationObjectId: z97.string().uuid(),
6801
- notifierId: z97.string().uuid(),
6802
+ var NotificationSchema = z96.object({
6803
+ id: z96.string().uuid(),
6804
+ createdAt: z96.date(),
6805
+ updatedAt: z96.date(),
6806
+ deletedAt: z96.date().nullable(),
6807
+ notificationObjectId: z96.string().uuid(),
6808
+ notifierId: z96.string().uuid(),
6802
6809
  notificationObject: NotificationObjectSchema,
6803
- readAt: z97.date()
6810
+ readAt: z96.date()
6804
6811
  });
6805
6812
 
6806
6813
  // src/notification/validation.ts
6807
- var GetNotificationsRequestSchema = z98.object({
6808
- page: z98.coerce.number().default(1),
6809
- pageSize: z98.coerce.number().default(10)
6814
+ var GetNotificationsRequestSchema = z97.object({
6815
+ page: z97.coerce.number().default(1),
6816
+ pageSize: z97.coerce.number().default(10)
6810
6817
  });
6811
- var GetNotificationsResponseSchema = z98.object({
6812
- notificationCount: z98.number(),
6813
- notifications: z98.array(NotificationSchema),
6814
- total: z98.number(),
6815
- page: z98.number(),
6816
- pageSize: z98.number(),
6817
- lastPage: z98.number(),
6818
- totalUnreadCount: z98.number().optional()
6818
+ var GetNotificationsResponseSchema = z97.object({
6819
+ notificationCount: z97.number(),
6820
+ notifications: z97.array(NotificationSchema),
6821
+ total: z97.number(),
6822
+ page: z97.number(),
6823
+ pageSize: z97.number(),
6824
+ lastPage: z97.number(),
6825
+ totalUnreadCount: z97.number().optional()
6819
6826
  });
6820
- var ResetNotificationRequestSchema = z98.object({
6821
- userId: z98.string()
6827
+ var ResetNotificationRequestSchema = z97.object({
6828
+ userId: z97.string()
6822
6829
  });
6823
6830
 
6824
6831
  // src/notification/index.ts
@@ -6832,14 +6839,14 @@ var userNotificationContract = initContract37().router(
6832
6839
  200: DefaultSuccessResponseSchema.extend({
6833
6840
  data: GetNotificationsResponseSchema
6834
6841
  }),
6835
- 400: z99.object({
6836
- message: z99.string()
6842
+ 400: z98.object({
6843
+ message: z98.string()
6837
6844
  }),
6838
- 409: z99.object({
6839
- message: z99.string()
6845
+ 409: z98.object({
6846
+ message: z98.string()
6840
6847
  }),
6841
- 500: z99.object({
6842
- message: z99.string()
6848
+ 500: z98.object({
6849
+ message: z98.string()
6843
6850
  }),
6844
6851
  401: DefaultUnauthorizedSchema,
6845
6852
  404: DefaultNotFoundSchema,
@@ -6852,16 +6859,16 @@ var userNotificationContract = initContract37().router(
6852
6859
  path: "/new_notifications_count",
6853
6860
  responses: {
6854
6861
  200: DefaultSuccessResponseSchema.extend({
6855
- total: z99.number()
6862
+ total: z98.number()
6856
6863
  }),
6857
- 400: z99.object({
6858
- message: z99.string()
6864
+ 400: z98.object({
6865
+ message: z98.string()
6859
6866
  }),
6860
- 409: z99.object({
6861
- message: z99.string()
6867
+ 409: z98.object({
6868
+ message: z98.string()
6862
6869
  }),
6863
- 500: z99.object({
6864
- message: z99.string()
6870
+ 500: z98.object({
6871
+ message: z98.string()
6865
6872
  }),
6866
6873
  401: DefaultUnauthorizedSchema,
6867
6874
  404: DefaultNotFoundSchema,
@@ -6876,14 +6883,14 @@ var userNotificationContract = initContract37().router(
6876
6883
  201: DefaultSuccessResponseSchema.extend({
6877
6884
  data: UserSchema
6878
6885
  }),
6879
- 400: z99.object({
6880
- message: z99.string()
6886
+ 400: z98.object({
6887
+ message: z98.string()
6881
6888
  }),
6882
- 409: z99.object({
6883
- message: z99.string()
6889
+ 409: z98.object({
6890
+ message: z98.string()
6884
6891
  }),
6885
- 500: z99.object({
6886
- message: z99.string()
6892
+ 500: z98.object({
6893
+ message: z98.string()
6887
6894
  }),
6888
6895
  401: DefaultUnauthorizedSchema,
6889
6896
  404: DefaultNotFoundSchema,
@@ -6895,19 +6902,19 @@ var userNotificationContract = initContract37().router(
6895
6902
  readNotification: {
6896
6903
  method: "POST",
6897
6904
  path: "/read/:id",
6898
- pathParams: z99.object({ id: z99.string() }),
6905
+ pathParams: z98.object({ id: z98.string() }),
6899
6906
  responses: {
6900
6907
  201: DefaultSuccessResponseSchema.extend({
6901
6908
  data: NotificationSchema
6902
6909
  }),
6903
- 400: z99.object({
6904
- message: z99.string()
6910
+ 400: z98.object({
6911
+ message: z98.string()
6905
6912
  }),
6906
- 409: z99.object({
6907
- message: z99.string()
6913
+ 409: z98.object({
6914
+ message: z98.string()
6908
6915
  }),
6909
- 500: z99.object({
6910
- message: z99.string()
6916
+ 500: z98.object({
6917
+ message: z98.string()
6911
6918
  }),
6912
6919
  401: DefaultUnauthorizedSchema,
6913
6920
  404: DefaultNotFoundSchema,
@@ -6926,35 +6933,35 @@ var userNotificationContract = initContract37().router(
6926
6933
  import { initContract as initContract38 } from "@ts-rest/core";
6927
6934
 
6928
6935
  // src/webchat/schema.ts
6929
- import z101 from "zod";
6936
+ import z100 from "zod";
6930
6937
 
6931
6938
  // src/webchat/validation.ts
6932
- import z100 from "zod";
6939
+ import z99 from "zod";
6933
6940
  var ChatwootChannelType2 = /* @__PURE__ */ ((ChatwootChannelType3) => {
6934
6941
  ChatwootChannelType3["WEB_WIDGET"] = "web_widget";
6935
6942
  return ChatwootChannelType3;
6936
6943
  })(ChatwootChannelType2 || {});
6937
- var WebChatChannelSchema = z100.object({
6938
- avatar: z100.string().optional(),
6939
- name: z100.string(),
6940
- type: z100.nativeEnum(ChatwootChannelType2),
6941
- websiteName: z100.string(),
6942
- welcomeTitle: z100.string(),
6943
- websiteUrl: z100.string().url(),
6944
- welcomeTagline: z100.string().optional(),
6945
- agentAwayMessage: z100.string().optional(),
6946
- widgetColor: z100.string().optional()
6944
+ var WebChatChannelSchema = z99.object({
6945
+ avatar: z99.string().optional(),
6946
+ name: z99.string(),
6947
+ type: z99.nativeEnum(ChatwootChannelType2),
6948
+ websiteName: z99.string(),
6949
+ welcomeTitle: z99.string(),
6950
+ websiteUrl: z99.string().url(),
6951
+ welcomeTagline: z99.string().optional(),
6952
+ agentAwayMessage: z99.string().optional(),
6953
+ widgetColor: z99.string().optional()
6947
6954
  });
6948
6955
 
6949
6956
  // src/webchat/schema.ts
6950
- var ConnectWebChatChannelSchema = z101.object({
6951
- name: z101.string(),
6952
- actor: z101.object({
6953
- id: z101.string().uuid(),
6954
- name: z101.string(),
6955
- email: z101.string().email(),
6956
- address: z101.string().nullable(),
6957
- phone: z101.string().nullable()
6957
+ var ConnectWebChatChannelSchema = z100.object({
6958
+ name: z100.string(),
6959
+ actor: z100.object({
6960
+ id: z100.string().uuid(),
6961
+ name: z100.string(),
6962
+ email: z100.string().email(),
6963
+ address: z100.string().nullable(),
6964
+ phone: z100.string().nullable()
6958
6965
  }),
6959
6966
  channel: WebChatChannelSchema
6960
6967
  });
@@ -6988,63 +6995,63 @@ var webchatContract = initContract38().router({
6988
6995
 
6989
6996
  // src/snippet/index.ts
6990
6997
  import { initContract as initContract39 } from "@ts-rest/core";
6991
- import { z as z104 } from "zod";
6998
+ import { z as z103 } from "zod";
6992
6999
 
6993
7000
  // src/snippet/schema.ts
6994
- import z102 from "zod";
7001
+ import z101 from "zod";
6995
7002
  var SnippetGroupSchema = DefaultEntitySchema.extend({
6996
- name: z102.string(),
6997
- platformType: z102.string()
7003
+ name: z101.string(),
7004
+ platformType: z101.string()
6998
7005
  });
6999
7006
  var SnippetContentSchema = DefaultEntitySchema.extend({
7000
- contentType: z102.string(),
7001
- contentValue: z102.string().nullable(),
7002
- contentTemplate: z102.any().nullable(),
7003
- order: z102.number(),
7007
+ contentType: z101.string(),
7008
+ contentValue: z101.string().nullable(),
7009
+ contentTemplate: z101.any().nullable(),
7010
+ order: z101.number(),
7004
7011
  upload: UploadSchema.optional().nullable()
7005
7012
  });
7006
7013
  var SnippetSchema = DefaultEntitySchema.extend({
7007
- name: z102.string(),
7014
+ name: z101.string(),
7008
7015
  snippetGroup: SnippetGroupSchema,
7009
7016
  snippetContent: SnippetContentSchema
7010
7017
  });
7011
- var SnippetGroupListItemSchema = z102.object({
7012
- id: z102.string().uuid(),
7013
- name: z102.string()
7018
+ var SnippetGroupListItemSchema = z101.object({
7019
+ id: z101.string().uuid(),
7020
+ name: z101.string()
7014
7021
  });
7015
- var SnippetListItemSchema = z102.object({
7016
- id: z102.string().uuid(),
7017
- shortCutName: z102.string(),
7018
- contentType: z102.string(),
7019
- contentValue: z102.string().nullable(),
7020
- snippetGroupId: z102.string()
7022
+ var SnippetListItemSchema = z101.object({
7023
+ id: z101.string().uuid(),
7024
+ shortCutName: z101.string(),
7025
+ contentType: z101.string(),
7026
+ contentValue: z101.string().nullable(),
7027
+ snippetGroupId: z101.string()
7021
7028
  });
7022
7029
 
7023
7030
  // src/snippet/validation.ts
7024
- import { z as z103 } from "zod";
7025
- var CreateSnippetGroupSchema = z103.object({
7026
- name: z103.string(),
7027
- platformType: z103.string()
7031
+ import { z as z102 } from "zod";
7032
+ var CreateSnippetGroupSchema = z102.object({
7033
+ name: z102.string(),
7034
+ platformType: z102.string()
7028
7035
  });
7029
- var UpdateSnippetGroupSchema = z103.object({
7030
- name: z103.string().optional(),
7031
- platformType: z103.string().optional()
7036
+ var UpdateSnippetGroupSchema = z102.object({
7037
+ name: z102.string().optional(),
7038
+ platformType: z102.string().optional()
7032
7039
  });
7033
- var DeleteSnippetGroupSchema = z103.object({
7034
- id: z103.string()
7040
+ var DeleteSnippetGroupSchema = z102.object({
7041
+ id: z102.string()
7035
7042
  });
7036
- var CreateSnippetSchema = z103.object({
7037
- shortcutName: z103.string(),
7038
- contentType: z103.string(),
7039
- contentValue: z103.string().optional(),
7040
- snippetGroupId: z103.string(),
7041
- platformType: z103.string()
7043
+ var CreateSnippetSchema = z102.object({
7044
+ shortcutName: z102.string(),
7045
+ contentType: z102.string(),
7046
+ contentValue: z102.string().optional(),
7047
+ snippetGroupId: z102.string(),
7048
+ platformType: z102.string()
7042
7049
  });
7043
7050
  var UpdateSnippetSchema = CreateSnippetSchema.extend({
7044
- snippetContentId: z103.string()
7051
+ snippetContentId: z102.string()
7045
7052
  });
7046
- var DeleteSnippetSchema = z103.object({
7047
- snippetId: z103.string()
7053
+ var DeleteSnippetSchema = z102.object({
7054
+ snippetId: z102.string()
7048
7055
  });
7049
7056
 
7050
7057
  // src/snippet/index.ts
@@ -7067,7 +7074,7 @@ var snippetContract = initContract39().router(
7067
7074
  query: null,
7068
7075
  responses: {
7069
7076
  200: DefaultSuccessResponseSchema.extend({
7070
- snippetgroups: z104.array(SnippetGroupSchema)
7077
+ snippetgroups: z103.array(SnippetGroupSchema)
7071
7078
  }),
7072
7079
  500: DefaultErrorResponseSchema
7073
7080
  }
@@ -7075,7 +7082,7 @@ var snippetContract = initContract39().router(
7075
7082
  updateSnippetGroup: {
7076
7083
  method: "PATCH",
7077
7084
  path: "/groups/:id",
7078
- pathParams: z104.object({ id: z104.string() }),
7085
+ pathParams: z103.object({ id: z103.string() }),
7079
7086
  body: UpdateSnippetGroupSchema,
7080
7087
  responses: {
7081
7088
  200: DefaultSuccessResponseSchema.extend({
@@ -7087,7 +7094,7 @@ var snippetContract = initContract39().router(
7087
7094
  deleteSnippetGroup: {
7088
7095
  method: "DELETE",
7089
7096
  path: "/groups/:id",
7090
- pathParams: z104.object({ id: z104.string() }),
7097
+ pathParams: z103.object({ id: z103.string() }),
7091
7098
  body: null,
7092
7099
  responses: {
7093
7100
  200: DefaultSuccessResponseSchema,
@@ -7099,7 +7106,7 @@ var snippetContract = initContract39().router(
7099
7106
  path: "",
7100
7107
  responses: {
7101
7108
  200: DefaultSuccessResponseSchema.extend({
7102
- snippets: z104.array(SnippetSchema)
7109
+ snippets: z103.array(SnippetSchema)
7103
7110
  }),
7104
7111
  500: DefaultErrorResponseSchema
7105
7112
  }
@@ -7118,7 +7125,7 @@ var snippetContract = initContract39().router(
7118
7125
  updateSnippet: {
7119
7126
  method: "PATCH",
7120
7127
  path: "/:id",
7121
- pathParams: z104.object({ id: z104.string() }),
7128
+ pathParams: z103.object({ id: z103.string() }),
7122
7129
  body: UpdateSnippetSchema,
7123
7130
  responses: {
7124
7131
  200: DefaultSuccessResponseSchema.extend({
@@ -7130,7 +7137,7 @@ var snippetContract = initContract39().router(
7130
7137
  deleteSnippet: {
7131
7138
  method: "DELETE",
7132
7139
  path: "/:id",
7133
- pathParams: z104.object({ id: z104.string() }),
7140
+ pathParams: z103.object({ id: z103.string() }),
7134
7141
  body: null,
7135
7142
  responses: {
7136
7143
  200: DefaultSuccessResponseSchema,
@@ -7147,80 +7154,80 @@ var snippetContract = initContract39().router(
7147
7154
  import { initContract as initContract40 } from "@ts-rest/core";
7148
7155
 
7149
7156
  // src/business-calendar/validation.ts
7150
- import z105 from "zod";
7151
- var TimeSlotDataSchema = z105.any();
7152
- var CreateBusinessHourSchema = z105.object({
7153
- day: z105.string(),
7154
- isEnabled: z105.boolean(),
7157
+ import z104 from "zod";
7158
+ var TimeSlotDataSchema = z104.any();
7159
+ var CreateBusinessHourSchema = z104.object({
7160
+ day: z104.string(),
7161
+ isEnabled: z104.boolean(),
7155
7162
  timeSlots: TimeSlotDataSchema
7156
7163
  }).array();
7157
- var UpdateBusinessHourSchema = z105.object({
7158
- id: z105.string(),
7159
- day: z105.string(),
7160
- isEnabled: z105.boolean(),
7164
+ var UpdateBusinessHourSchema = z104.object({
7165
+ id: z104.string(),
7166
+ day: z104.string(),
7167
+ isEnabled: z104.boolean(),
7161
7168
  timeSlots: TimeSlotDataSchema
7162
7169
  }).array();
7163
- var CreateHolidaySchema = z105.object({
7164
- name: z105.string(),
7165
- date: z105.string(),
7166
- isEnabled: z105.boolean()
7170
+ var CreateHolidaySchema = z104.object({
7171
+ name: z104.string(),
7172
+ date: z104.string(),
7173
+ isEnabled: z104.boolean()
7167
7174
  }).array();
7168
- var UpdateHolidaySchema = z105.object({
7169
- id: z105.string().optional(),
7170
- name: z105.string(),
7171
- date: z105.string(),
7172
- isEnabled: z105.boolean()
7175
+ var UpdateHolidaySchema = z104.object({
7176
+ id: z104.string().optional(),
7177
+ name: z104.string(),
7178
+ date: z104.string(),
7179
+ isEnabled: z104.boolean()
7173
7180
  }).array();
7174
- var CreateBusinessCalendarSchema = z105.object({
7175
- name: z105.string(),
7176
- description: z105.string().optional(),
7177
- timeZone: z105.string(),
7178
- isEnabled: z105.boolean(),
7179
- channelIds: z105.string().array(),
7181
+ var CreateBusinessCalendarSchema = z104.object({
7182
+ name: z104.string(),
7183
+ description: z104.string().optional(),
7184
+ timeZone: z104.string(),
7185
+ isEnabled: z104.boolean(),
7186
+ channelIds: z104.string().array(),
7180
7187
  businessHours: CreateBusinessHourSchema,
7181
7188
  holidays: CreateHolidaySchema
7182
7189
  });
7183
- var UpdateBusinessCalendarSchema = z105.object({
7184
- id: z105.string(),
7185
- name: z105.string(),
7186
- description: z105.string().optional(),
7187
- timeZone: z105.string(),
7188
- isEnabled: z105.boolean(),
7189
- channelIds: z105.string().array(),
7190
+ var UpdateBusinessCalendarSchema = z104.object({
7191
+ id: z104.string(),
7192
+ name: z104.string(),
7193
+ description: z104.string().optional(),
7194
+ timeZone: z104.string(),
7195
+ isEnabled: z104.boolean(),
7196
+ channelIds: z104.string().array(),
7190
7197
  businessHours: UpdateBusinessHourSchema,
7191
7198
  holidays: UpdateHolidaySchema
7192
7199
  });
7193
- var DeleteBusinessCalendarSchema = z105.object({
7194
- id: z105.string()
7200
+ var DeleteBusinessCalendarSchema = z104.object({
7201
+ id: z104.string()
7195
7202
  });
7196
7203
 
7197
7204
  // src/business-calendar/schema.ts
7198
- import z106 from "zod";
7199
- var TimeSlotDataSchema2 = z106.any();
7205
+ import z105 from "zod";
7206
+ var TimeSlotDataSchema2 = z105.any();
7200
7207
  var BusinessHourSchema = DefaultEntitySchema.extend({
7201
- day: z106.string(),
7202
- isEnabled: z106.boolean(),
7208
+ day: z105.string(),
7209
+ isEnabled: z105.boolean(),
7203
7210
  timeSlots: TimeSlotDataSchema2
7204
7211
  });
7205
7212
  var HolidaySchema = DefaultEntitySchema.extend({
7206
- name: z106.string(),
7207
- date: z106.string(),
7208
- isEnabled: z106.boolean(),
7209
- isDefault: z106.boolean()
7213
+ name: z105.string(),
7214
+ date: z105.string(),
7215
+ isEnabled: z105.boolean(),
7216
+ isDefault: z105.boolean()
7210
7217
  });
7211
7218
  var BusinessCalendarSchema = DefaultEntitySchema.extend({
7212
- name: z106.string(),
7213
- description: z106.string().optional(),
7214
- timeZone: z106.string(),
7215
- isEnabled: z106.boolean(),
7216
- isDefault: z106.boolean(),
7217
- channelIds: z106.string().array(),
7219
+ name: z105.string(),
7220
+ description: z105.string().optional(),
7221
+ timeZone: z105.string(),
7222
+ isEnabled: z105.boolean(),
7223
+ isDefault: z105.boolean(),
7224
+ channelIds: z105.string().array(),
7218
7225
  businessHours: BusinessHourSchema.array(),
7219
7226
  holidays: HolidaySchema.array()
7220
7227
  });
7221
7228
 
7222
7229
  // src/business-calendar/index.ts
7223
- import z107 from "zod";
7230
+ import z106 from "zod";
7224
7231
  var businessCalendarContract = initContract40().router({
7225
7232
  createBusinessCalendar: {
7226
7233
  method: "POST",
@@ -7246,7 +7253,7 @@ var businessCalendarContract = initContract40().router({
7246
7253
  updateBusinessCalendar: {
7247
7254
  method: "POST",
7248
7255
  path: "business-calendars/:id",
7249
- pathParams: z107.object({ id: z107.string() }),
7256
+ pathParams: z106.object({ id: z106.string() }),
7250
7257
  body: UpdateBusinessCalendarSchema,
7251
7258
  responses: {
7252
7259
  201: DefaultSuccessResponseSchema.extend({
@@ -7258,7 +7265,7 @@ var businessCalendarContract = initContract40().router({
7258
7265
  deleteBusinessCalendar: {
7259
7266
  method: "DELETE",
7260
7267
  path: "business-calendars/:id",
7261
- pathParams: z107.object({ id: z107.string() }),
7268
+ pathParams: z106.object({ id: z106.string() }),
7262
7269
  body: null,
7263
7270
  responses: {
7264
7271
  200: DefaultSuccessResponseSchema,
@@ -7269,172 +7276,172 @@ var businessCalendarContract = initContract40().router({
7269
7276
 
7270
7277
  // src/public-api/index.ts
7271
7278
  import { initContract as initContract41 } from "@ts-rest/core";
7272
- import z110 from "zod";
7279
+ import z109 from "zod";
7273
7280
 
7274
7281
  // src/public-api/validation.ts
7275
- import z109 from "zod";
7282
+ import z108 from "zod";
7276
7283
 
7277
7284
  // src/public-api/schema.ts
7278
- import z108 from "zod";
7279
- var ContactPhonesSchema2 = z108.object({
7280
- id: z108.string().uuid(),
7281
- createdAt: z108.date(),
7282
- updatedAt: z108.date(),
7283
- deletedAt: z108.date().nullable(),
7284
- phone: z108.string(),
7285
- isPrimary: z108.boolean()
7286
- });
7287
- var ContactEmailsSchema2 = z108.object({
7288
- id: z108.string().uuid(),
7289
- createdAt: z108.date(),
7290
- updatedAt: z108.date(),
7291
- deletedAt: z108.date().nullable(),
7292
- email: z108.string(),
7293
- isPrimary: z108.boolean()
7294
- });
7295
- var ContactCustomFieldSchema2 = z108.object({
7296
- id: z108.string().uuid(),
7297
- createdAt: z108.date(),
7298
- updatedAt: z108.date(),
7299
- deletedAt: z108.date().nullable(),
7300
- textValue: z108.string().nullable(),
7301
- booleanValue: z108.boolean().nullable(),
7302
- numberValue: z108.number().nullable(),
7303
- dateValue: z108.date().nullable(),
7285
+ import z107 from "zod";
7286
+ var ContactPhonesSchema2 = z107.object({
7287
+ id: z107.string().uuid(),
7288
+ createdAt: z107.date(),
7289
+ updatedAt: z107.date(),
7290
+ deletedAt: z107.date().nullable(),
7291
+ phone: z107.string(),
7292
+ isPrimary: z107.boolean()
7293
+ });
7294
+ var ContactEmailsSchema2 = z107.object({
7295
+ id: z107.string().uuid(),
7296
+ createdAt: z107.date(),
7297
+ updatedAt: z107.date(),
7298
+ deletedAt: z107.date().nullable(),
7299
+ email: z107.string(),
7300
+ isPrimary: z107.boolean()
7301
+ });
7302
+ var ContactCustomFieldSchema2 = z107.object({
7303
+ id: z107.string().uuid(),
7304
+ createdAt: z107.date(),
7305
+ updatedAt: z107.date(),
7306
+ deletedAt: z107.date().nullable(),
7307
+ textValue: z107.string().nullable(),
7308
+ booleanValue: z107.boolean().nullable(),
7309
+ numberValue: z107.number().nullable(),
7310
+ dateValue: z107.date().nullable(),
7304
7311
  attribute: AttributeSchema.omit({ options: true, group: true }),
7305
- uploads: z108.array(UploadSchema)
7306
- });
7307
- var ContactEntityTypesSchema2 = z108.object({
7308
- id: z108.string().uuid(),
7309
- createdAt: z108.date(),
7310
- updatedAt: z108.date(),
7311
- deletedAt: z108.date().nullable(),
7312
- entity: z108.string(),
7313
- description: z108.string().nullable()
7314
- });
7315
- var ContactActivitySchema2 = z108.object({
7316
- id: z108.string().uuid(),
7317
- createdAt: z108.date(),
7318
- updatedAt: z108.date(),
7319
- deletedAt: z108.date().nullable(),
7320
- entityId: z108.string(),
7321
- description: z108.string(),
7312
+ uploads: z107.array(UploadSchema)
7313
+ });
7314
+ var ContactEntityTypesSchema2 = z107.object({
7315
+ id: z107.string().uuid(),
7316
+ createdAt: z107.date(),
7317
+ updatedAt: z107.date(),
7318
+ deletedAt: z107.date().nullable(),
7319
+ entity: z107.string(),
7320
+ description: z107.string().nullable()
7321
+ });
7322
+ var ContactActivitySchema2 = z107.object({
7323
+ id: z107.string().uuid(),
7324
+ createdAt: z107.date(),
7325
+ updatedAt: z107.date(),
7326
+ deletedAt: z107.date().nullable(),
7327
+ entityId: z107.string(),
7328
+ description: z107.string(),
7322
7329
  entityType: ContactEntityTypesSchema2
7323
7330
  });
7324
- var ContactSchema2 = z108.object({
7325
- id: z108.string().uuid(),
7326
- createdAt: z108.date(),
7327
- updatedAt: z108.date(),
7328
- deletedAt: z108.date().nullable(),
7329
- name: z108.string(),
7330
- address: z108.string().nullable(),
7331
- channel: z108.string().nullable(),
7332
- notes: z108.string().nullable(),
7333
- contactProfile: z108.string().nullable(),
7334
- socialProfileUrl: z108.string().nullable(),
7335
- tags: z108.array(TagSchema),
7331
+ var ContactSchema3 = z107.object({
7332
+ id: z107.string().uuid(),
7333
+ createdAt: z107.date(),
7334
+ updatedAt: z107.date(),
7335
+ deletedAt: z107.date().nullable(),
7336
+ name: z107.string(),
7337
+ address: z107.string().nullable(),
7338
+ channel: z107.string().nullable(),
7339
+ notes: z107.string().nullable(),
7340
+ contactProfile: z107.string().nullable(),
7341
+ socialProfileUrl: z107.string().nullable(),
7342
+ tags: z107.array(TagSchema),
7336
7343
  company: CompanySchema.omit({ customFields: true }).nullable(),
7337
- customFields: z108.array(ContactCustomFieldSchema2),
7338
- contactEmails: z108.array(ContactEmailsSchema2),
7339
- contactPhones: z108.array(ContactPhonesSchema2),
7340
- activityLogs: z108.array(ContactActivitySchema2).optional()
7344
+ customFields: z107.array(ContactCustomFieldSchema2),
7345
+ contactEmails: z107.array(ContactEmailsSchema2),
7346
+ contactPhones: z107.array(ContactPhonesSchema2),
7347
+ activityLogs: z107.array(ContactActivitySchema2).optional()
7341
7348
  });
7342
7349
 
7343
7350
  // src/public-api/validation.ts
7344
7351
  var ContactContractValidationSchema2 = {
7345
7352
  create: {
7346
- request: z109.object({
7347
- name: z109.string(),
7348
- email: z109.array(
7349
- z109.object({
7350
- email: z109.string().email(),
7351
- isPrimary: z109.boolean()
7353
+ request: z108.object({
7354
+ name: z108.string(),
7355
+ email: z108.array(
7356
+ z108.object({
7357
+ email: z108.string().email(),
7358
+ isPrimary: z108.boolean()
7352
7359
  })
7353
7360
  ).optional(),
7354
- channel: z109.string().optional(),
7355
- address: z109.string().optional(),
7356
- phone: z109.array(
7357
- z109.object({
7358
- phone: z109.string(),
7359
- isPrimary: z109.boolean()
7361
+ channel: z108.string().optional(),
7362
+ address: z108.string().optional(),
7363
+ phone: z108.array(
7364
+ z108.object({
7365
+ phone: z108.string(),
7366
+ isPrimary: z108.boolean()
7360
7367
  })
7361
7368
  ).optional(),
7362
- notes: z109.string().optional(),
7363
- tags: z109.array(z109.string()).optional(),
7364
- company: z109.string().optional(),
7365
- customFields: z109.record(z109.string())
7369
+ notes: z108.string().optional(),
7370
+ tags: z108.array(z108.string()).optional(),
7371
+ company: z108.string().optional(),
7372
+ customFields: z108.record(z108.string())
7366
7373
  // Dynamic keys with string values
7367
7374
  }),
7368
- response: ContactSchema2
7375
+ response: ContactSchema3
7369
7376
  },
7370
7377
  getById: {
7371
- request: z109.object({
7372
- id: z109.string().uuid()
7378
+ request: z108.object({
7379
+ id: z108.string().uuid()
7373
7380
  })
7374
7381
  },
7375
7382
  delete: {
7376
- request: z109.object({
7377
- id: z109.string().uuid()
7383
+ request: z108.object({
7384
+ id: z108.string().uuid()
7378
7385
  })
7379
7386
  },
7380
7387
  getAll: {
7381
- request: z109.object({
7382
- page: z109.coerce.number().default(1),
7383
- pageSize: z109.coerce.number().default(10),
7384
- keyword: z109.string().optional(),
7385
- company: z109.array(z109.string().uuid()),
7386
- name: z109.string(),
7387
- address: z109.string(),
7388
- channel: z109.array(z109.string()),
7389
- selectedDate: z109.string(),
7390
- customFields: z109.array(
7391
- z109.object({
7392
- attributeId: z109.string().uuid(),
7393
- type: z109.string(),
7394
- value: z109.union([z109.string(), z109.array(z109.string())])
7388
+ request: z108.object({
7389
+ page: z108.coerce.number().default(1),
7390
+ pageSize: z108.coerce.number().default(10),
7391
+ keyword: z108.string().optional(),
7392
+ company: z108.array(z108.string().uuid()),
7393
+ name: z108.string(),
7394
+ address: z108.string(),
7395
+ channel: z108.array(z108.string()),
7396
+ selectedDate: z108.string(),
7397
+ customFields: z108.array(
7398
+ z108.object({
7399
+ attributeId: z108.string().uuid(),
7400
+ type: z108.string(),
7401
+ value: z108.union([z108.string(), z108.array(z108.string())])
7395
7402
  })
7396
7403
  ),
7397
- tags: z109.array(z109.string().uuid()),
7398
- phone: z109.string(),
7399
- email: z109.string(),
7400
- notes: z109.string()
7404
+ tags: z108.array(z108.string().uuid()),
7405
+ phone: z108.string(),
7406
+ email: z108.string(),
7407
+ notes: z108.string()
7401
7408
  }).partial(),
7402
7409
  response: {
7403
- page: z109.number(),
7404
- pageSize: z109.number(),
7405
- total: z109.number(),
7406
- lastPage: z109.number(),
7407
- data: z109.array(ContactSchema2)
7410
+ page: z108.number(),
7411
+ pageSize: z108.number(),
7412
+ total: z108.number(),
7413
+ lastPage: z108.number(),
7414
+ data: z108.array(ContactSchema3)
7408
7415
  }
7409
7416
  },
7410
7417
  getContactFields: {
7411
- request: z109.object({
7412
- page: z109.coerce.number().default(1),
7413
- pageSize: z109.coerce.number().default(10)
7418
+ request: z108.object({
7419
+ page: z108.coerce.number().default(1),
7420
+ pageSize: z108.coerce.number().default(10)
7414
7421
  }).partial(),
7415
7422
  response: {
7416
- page: z109.number(),
7417
- pageSize: z109.number(),
7418
- total: z109.number(),
7419
- lastPage: z109.number(),
7420
- data: z109.array(ContactCustomFieldSchema2)
7423
+ page: z108.number(),
7424
+ pageSize: z108.number(),
7425
+ total: z108.number(),
7426
+ lastPage: z108.number(),
7427
+ data: z108.array(ContactCustomFieldSchema2)
7421
7428
  }
7422
7429
  },
7423
7430
  addAttachments: {
7424
- request: z109.object({
7425
- contactId: z109.string(),
7426
- attributeId: z109.string().uuid(),
7427
- contactAttachmentRecords: z109.array(
7428
- z109.object({
7429
- bucketName: z109.string(),
7430
- fileKey: z109.string(),
7431
- fileName: z109.string(),
7432
- fileSize: z109.coerce.number(),
7433
- url: z109.string()
7431
+ request: z108.object({
7432
+ contactId: z108.string(),
7433
+ attributeId: z108.string().uuid(),
7434
+ contactAttachmentRecords: z108.array(
7435
+ z108.object({
7436
+ bucketName: z108.string(),
7437
+ fileKey: z108.string(),
7438
+ fileName: z108.string(),
7439
+ fileSize: z108.coerce.number(),
7440
+ url: z108.string()
7434
7441
  })
7435
7442
  )
7436
7443
  }),
7437
- response: CustomFieldSchema
7444
+ response: CustomFieldSchema2
7438
7445
  }
7439
7446
  };
7440
7447
 
@@ -7447,13 +7454,13 @@ var publicApiContract = initContract41().router(
7447
7454
  body: ContactContractValidationSchema2.create.request,
7448
7455
  responses: {
7449
7456
  201: DefaultSuccessResponseSchema.extend({
7450
- data: ContactSchema2
7457
+ data: ContactSchema3
7451
7458
  }),
7452
- 400: z110.object({
7453
- message: z110.string()
7459
+ 400: z109.object({
7460
+ message: z109.string()
7454
7461
  }),
7455
- 409: z110.object({
7456
- message: z110.string()
7462
+ 409: z109.object({
7463
+ message: z109.string()
7457
7464
  }),
7458
7465
  401: DefaultUnauthorizedSchema,
7459
7466
  404: DefaultNotFoundSchema,
@@ -7468,13 +7475,13 @@ var publicApiContract = initContract41().router(
7468
7475
  query: GetTagsSchema,
7469
7476
  responses: {
7470
7477
  200: DefaultSuccessResponseSchema.extend({
7471
- tags: z110.array(TagSchema)
7478
+ tags: z109.array(TagSchema)
7472
7479
  }),
7473
- 400: z110.object({
7474
- message: z110.string()
7480
+ 400: z109.object({
7481
+ message: z109.string()
7475
7482
  }),
7476
- 409: z110.object({
7477
- message: z110.string()
7483
+ 409: z109.object({
7484
+ message: z109.string()
7478
7485
  }),
7479
7486
  401: DefaultUnauthorizedSchema,
7480
7487
  404: DefaultNotFoundSchema,
@@ -7490,11 +7497,11 @@ var publicApiContract = initContract41().router(
7490
7497
  200: DefaultSuccessResponseSchema.extend(
7491
7498
  ContactContractValidationSchema2.getAll.response
7492
7499
  ),
7493
- 400: z110.object({
7494
- message: z110.string()
7500
+ 400: z109.object({
7501
+ message: z109.string()
7495
7502
  }),
7496
- 409: z110.object({
7497
- message: z110.string()
7503
+ 409: z109.object({
7504
+ message: z109.string()
7498
7505
  }),
7499
7506
  401: DefaultUnauthorizedSchema,
7500
7507
  404: DefaultNotFoundSchema,
@@ -7511,11 +7518,11 @@ var publicApiContract = initContract41().router(
7511
7518
  200: DefaultSuccessResponseSchema.extend(
7512
7519
  ContactContractValidationSchema2.getContactFields.response
7513
7520
  ),
7514
- 400: z110.object({
7515
- message: z110.string()
7521
+ 400: z109.object({
7522
+ message: z109.string()
7516
7523
  }),
7517
- 409: z110.object({
7518
- message: z110.string()
7524
+ 409: z109.object({
7525
+ message: z109.string()
7519
7526
  }),
7520
7527
  401: DefaultUnauthorizedSchema,
7521
7528
  404: DefaultNotFoundSchema,
@@ -7529,17 +7536,17 @@ var publicApiContract = initContract41().router(
7529
7536
  path: "/contacts/:id",
7530
7537
  pathParams: ContactContractValidationSchema2.getById.request,
7531
7538
  responses: {
7532
- 200: z110.object({
7533
- status: z110.string(),
7534
- message: z110.string(),
7535
- data: ContactSchema2,
7536
- requestId: z110.string()
7539
+ 200: z109.object({
7540
+ status: z109.string(),
7541
+ message: z109.string(),
7542
+ data: ContactSchema3,
7543
+ requestId: z109.string()
7537
7544
  }),
7538
- 400: z110.object({
7539
- message: z110.string()
7545
+ 400: z109.object({
7546
+ message: z109.string()
7540
7547
  }),
7541
- 409: z110.object({
7542
- message: z110.string()
7548
+ 409: z109.object({
7549
+ message: z109.string()
7543
7550
  }),
7544
7551
  401: DefaultUnauthorizedSchema,
7545
7552
  404: DefaultNotFoundSchema,
@@ -7557,11 +7564,11 @@ var publicApiContract = initContract41().router(
7557
7564
  201: DefaultSuccessResponseSchema.extend({
7558
7565
  message: ContactCustomFieldSchema2
7559
7566
  }),
7560
- 400: z110.object({
7561
- message: z110.string()
7567
+ 400: z109.object({
7568
+ message: z109.string()
7562
7569
  }),
7563
- 409: z110.object({
7564
- message: z110.string()
7570
+ 409: z109.object({
7571
+ message: z109.string()
7565
7572
  }),
7566
7573
  401: DefaultUnauthorizedSchema,
7567
7574
  404: DefaultNotFoundSchema,
@@ -7575,17 +7582,17 @@ var publicApiContract = initContract41().router(
7575
7582
  path: "/contacts/:id",
7576
7583
  pathParams: ContactContractValidationSchema2.getById.request,
7577
7584
  responses: {
7578
- 200: z110.object({
7579
- status: z110.string(),
7580
- message: z110.string(),
7581
- data: ContactSchema2,
7582
- requestId: z110.string()
7585
+ 200: z109.object({
7586
+ status: z109.string(),
7587
+ message: z109.string(),
7588
+ data: ContactSchema3,
7589
+ requestId: z109.string()
7583
7590
  }),
7584
- 400: z110.object({
7585
- message: z110.string()
7591
+ 400: z109.object({
7592
+ message: z109.string()
7586
7593
  }),
7587
- 409: z110.object({
7588
- message: z110.string()
7594
+ 409: z109.object({
7595
+ message: z109.string()
7589
7596
  }),
7590
7597
  401: DefaultUnauthorizedSchema,
7591
7598
  404: DefaultNotFoundSchema,
@@ -7599,17 +7606,17 @@ var publicApiContract = initContract41().router(
7599
7606
  path: "/contacts/:id",
7600
7607
  pathParams: ContactContractValidationSchema2.delete.request,
7601
7608
  responses: {
7602
- 200: z110.object({
7603
- status: z110.string(),
7604
- message: z110.string(),
7605
- data: ContactSchema2,
7606
- requestId: z110.string()
7609
+ 200: z109.object({
7610
+ status: z109.string(),
7611
+ message: z109.string(),
7612
+ data: ContactSchema3,
7613
+ requestId: z109.string()
7607
7614
  }),
7608
- 400: z110.object({
7609
- message: z110.string()
7615
+ 400: z109.object({
7616
+ message: z109.string()
7610
7617
  }),
7611
- 409: z110.object({
7612
- message: z110.string()
7618
+ 409: z109.object({
7619
+ message: z109.string()
7613
7620
  }),
7614
7621
  401: DefaultUnauthorizedSchema,
7615
7622
  404: DefaultNotFoundSchema,
@@ -7627,16 +7634,16 @@ var publicApiContract = initContract41().router(
7627
7634
 
7628
7635
  // src/workflow-rule/index.ts
7629
7636
  import { initContract as initContract42 } from "@ts-rest/core";
7630
- import z111 from "zod";
7637
+ import z110 from "zod";
7631
7638
  var chatContract = initContract42().router(
7632
7639
  {
7633
7640
  updateAssignee: {
7634
7641
  method: "POST",
7635
7642
  path: "/room/assignee",
7636
- body: z111.object({
7637
- assigneeId: z111.string().uuid(),
7638
- roomId: z111.string().uuid(),
7639
- workflowId: z111.string().uuid()
7643
+ body: z110.object({
7644
+ assigneeId: z110.string().uuid(),
7645
+ roomId: z110.string().uuid(),
7646
+ workflowId: z110.string().uuid()
7640
7647
  }),
7641
7648
  responses: {
7642
7649
  200: DefaultSuccessResponseSchema.extend({
@@ -7650,15 +7657,15 @@ var chatContract = initContract42().router(
7650
7657
  solveRoom: {
7651
7658
  method: "POST",
7652
7659
  path: "/room/solve",
7653
- body: z111.object({
7654
- roomId: z111.string(),
7655
- disposition: z111.string(),
7656
- workflowId: z111.string().uuid()
7660
+ body: z110.object({
7661
+ roomId: z110.string(),
7662
+ disposition: z110.string(),
7663
+ workflowId: z110.string().uuid()
7657
7664
  }),
7658
7665
  responses: {
7659
7666
  200: DefaultSuccessResponseSchema.extend({
7660
7667
  data: RoomSchema.extend({
7661
- solveMessage: z111.string()
7668
+ solveMessage: z110.string()
7662
7669
  })
7663
7670
  }),
7664
7671
  409: DefaultErrorResponseSchema
@@ -7667,9 +7674,9 @@ var chatContract = initContract42().router(
7667
7674
  }
7668
7675
  },
7669
7676
  {
7670
- baseHeaders: z111.object({
7671
- "x-tenant": z111.string({ required_error: "Tenant id is required" }),
7672
- "x-code": z111.string().uuid().optional()
7677
+ baseHeaders: z110.object({
7678
+ "x-tenant": z110.string({ required_error: "Tenant id is required" }),
7679
+ "x-code": z110.string().uuid().optional()
7673
7680
  }),
7674
7681
  pathPrefix: "chat"
7675
7682
  }
@@ -7678,7 +7685,6 @@ var chatContract = initContract42().router(
7678
7685
  // src/contract.ts
7679
7686
  var apiContract = initContract43().router({
7680
7687
  auth: authContract,
7681
- mail: mailContract,
7682
7688
  cxLog: cxLogContract,
7683
7689
  dashboard: dashboardContract,
7684
7690
  permission: permissionContract,
@@ -7735,6 +7741,9 @@ var publicApiContract2 = initContract43().router({
7735
7741
  var businessCalendarContract2 = initContract43().router({
7736
7742
  businessCalendar: businessCalendarContract
7737
7743
  });
7744
+ var mailApiContract = initContract43().router({
7745
+ mail: mailContract
7746
+ });
7738
7747
  var workflowContract = initContract43().router(
7739
7748
  {
7740
7749
  chat: chatContract
@@ -7759,6 +7768,7 @@ export {
7759
7768
  dashboardContract,
7760
7769
  evaluateFormContract,
7761
7770
  extensionContract2 as extensionContract,
7771
+ mailApiContract,
7762
7772
  mailContract,
7763
7773
  mainChatContract,
7764
7774
  notificationContract,