@kl1/contracts 1.1.30-uat → 1.1.31-uat

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -4149,7 +4149,7 @@ var MessageSchema2 = z57.object({
4149
4149
  sendAt: z57.date(),
4150
4150
  starred: z57.boolean(),
4151
4151
  seemsLikeNew: z57.boolean(),
4152
- from: z57.array(MailParticipant),
4152
+ from: MailParticipant,
4153
4153
  to: z57.array(MailParticipant),
4154
4154
  cc: z57.array(MailParticipant),
4155
4155
  bcc: z57.array(MailParticipant),
@@ -4410,6 +4410,22 @@ var roomContract = initContract18().router(
4410
4410
  },
4411
4411
  summary: "Get all the attachments of a room"
4412
4412
  },
4413
+ addNewEmailToContact: {
4414
+ method: "POST",
4415
+ path: "/add_email_to_contact",
4416
+ responses: {
4417
+ 200: DefaultSuccessResponseSchema.extend({
4418
+ data: z60.string()
4419
+ }),
4420
+ ...DefaultResponses
4421
+ },
4422
+ body: z60.object({
4423
+ email: z60.string(),
4424
+ contactId: z60.string(),
4425
+ mailUserId: z60.string()
4426
+ }),
4427
+ summary: "Add a new email of a mail room participant to an existing contact"
4428
+ },
4413
4429
  update: {
4414
4430
  method: "PATCH",
4415
4431
  path: "/:id",
@@ -5257,7 +5273,7 @@ var telephonyAgentPresenceStatusContract = initContract27().router(
5257
5273
  );
5258
5274
 
5259
5275
  // src/telephony-cdr/index.ts
5260
- import z78 from "zod";
5276
+ import z77 from "zod";
5261
5277
 
5262
5278
  // src/telephony-cdr/validation.ts
5263
5279
  import z76 from "zod";
@@ -5377,166 +5393,6 @@ var GetYeastarCallReportSchema = DefaultQueryParamsSchema.extend({
5377
5393
 
5378
5394
  // src/telephony-cdr/index.ts
5379
5395
  import { initContract as initContract28 } from "@ts-rest/core";
5380
-
5381
- // src/telephony-cdr/call-report.schema.ts
5382
- import z77 from "zod";
5383
- var ExtCallStatisticsListSchema = z77.object({
5384
- /** @example "ext_num" */
5385
- ext_num: z77.string(),
5386
- /** @example "ext_name" */
5387
- ext_name: z77.string(),
5388
- /** @example 0 */
5389
- answered_calls: z77.number(),
5390
- /** @example 0 */
5391
- no_answer_calls: z77.number(),
5392
- /** @example 0 */
5393
- busy_calls: z77.number(),
5394
- /** @example 0 */
5395
- failed_calls: z77.number(),
5396
- /** @example 0 */
5397
- voicemail_calls: z77.number(),
5398
- /** @example 0 */
5399
- total_holding_time: z77.number(),
5400
- /** @example 0 */
5401
- total_talking_time: z77.number(),
5402
- /** @example "src_name" */
5403
- src_name: z77.string(),
5404
- /** @example 0 */
5405
- total_call_count: z77.number(),
5406
- /** @example "mobile" */
5407
- mobile: z77.string()
5408
- });
5409
- var ExtStatisticSchema = z77.object({
5410
- ext_num: z77.string(),
5411
- ext_name: z77.string(),
5412
- answered_calls: z77.number(),
5413
- no_answer_calls: z77.number(),
5414
- busy_calls: z77.number(),
5415
- failed_calls: z77.number(),
5416
- voicemail_calls: z77.number(),
5417
- total_holding_time: z77.number(),
5418
- total_talking_time: z77.number(),
5419
- time: z77.number(),
5420
- mobile: z77.string()
5421
- });
5422
- var ExtCallActivityListSchema = z77.object({
5423
- time: z77.number(),
5424
- answered_calls: z77.number(),
5425
- no_answer_calls: z77.number(),
5426
- busy_calls: z77.number(),
5427
- failed_calls: z77.number(),
5428
- voicemail_calls: z77.number(),
5429
- total_holding_time: z77.number(),
5430
- total_talking_time: z77.number(),
5431
- ext_statistics: z77.array(ExtStatisticSchema)
5432
- });
5433
- var TrunkList = z77.object({
5434
- trunk_name: z77.string(),
5435
- total_calls: z77.number()
5436
- });
5437
- var TrunkActivityListSchema = z77.object({
5438
- time: z77.number(),
5439
- trunk_list: z77.array(TrunkList)
5440
- });
5441
- var QueueAvgWaitTalkTimeListSchema = z77.object({
5442
- time: z77.number(),
5443
- avg_wait_time: z77.number(),
5444
- avg_talk_time: z77.number()
5445
- });
5446
- var SatisfactionListSchema = z77.object({
5447
- press_key: z77.string(),
5448
- total: z77.number(),
5449
- key_point: z77.number().optional()
5450
- });
5451
- var agentListSchema = z77.object({
5452
- agent_name: z77.string(),
5453
- agent_num: z77.string(),
5454
- satisfaction_list: z77.array(SatisfactionListSchema).optional(),
5455
- total_key: z77.number().optional(),
5456
- total_point: z77.number().optional(),
5457
- average_point: z77.number().optional()
5458
- });
5459
- var QueueSatisfactionSchema = z77.object({
5460
- queue_name: z77.string(),
5461
- queue_num: z77.string(),
5462
- satisfaction_list: z77.array(SatisfactionListSchema).optional(),
5463
- agent_list: z77.array(agentListSchema).optional(),
5464
- total_key: z77.number().optional(),
5465
- total_point: z77.number().optional(),
5466
- average_point: z77.number().optional()
5467
- });
5468
- var QueuePerformanceListSchema = z77.object({
5469
- queue: z77.string(),
5470
- total_calls: z77.number(),
5471
- answered_calls: z77.number(),
5472
- missed_calls: z77.number(),
5473
- abandoned_calls: z77.number(),
5474
- average_waiting_time: z77.number(),
5475
- average_talking_time: z77.number(),
5476
- max_waiting_time: z77.number(),
5477
- answered_rate: z77.number(),
5478
- missed_rate: z77.number(),
5479
- abandoned_rate: z77.number(),
5480
- sla: z77.number()
5481
- });
5482
- var QueueAgentMissCallsListSchema = z77.object({
5483
- agent_name: z77.string(),
5484
- agent_num: z77.string(),
5485
- time: z77.string(),
5486
- total_wait_time: z77.number(),
5487
- src_name: z77.string(),
5488
- src_num: z77.string(),
5489
- queue_status: z77.string(),
5490
- polling_attempts: z77.number(),
5491
- missed_reason: z77.string()
5492
- });
5493
- var QueueAgentInOutCallsListSchema = z77.object({
5494
- agent_name: z77.string(),
5495
- agent_num: z77.string(),
5496
- inbound_calls: z77.number(),
5497
- inbound_duration: z77.number(),
5498
- outbound_calls: z77.number(),
5499
- outbound_duration: z77.number(),
5500
- total_calls: z77.number(),
5501
- total_duration: z77.number(),
5502
- average_talk_duration: z77.number()
5503
- });
5504
- var CallReportModel = z77.object({
5505
- errcode: z77.number(),
5506
- errmsg: z77.string(),
5507
- total_number: z77.number(),
5508
- is_12hour: z77.number().optional(),
5509
- ext_call_statistics_list: z77.array(ExtCallStatisticsListSchema).optional(),
5510
- ext_call_activity_list: z77.array(ExtCallActivityListSchema).optional(),
5511
- trunk_activity_list: z77.array(TrunkActivityListSchema).optional(),
5512
- queue_avg_wait_talk_time_list: z77.array(QueueAvgWaitTalkTimeListSchema).optional(),
5513
- queue_satisfaction: QueueSatisfactionSchema.optional(),
5514
- queue_performance_list: z77.array(QueuePerformanceListSchema).optional(),
5515
- queue_agent_miss_calls_list: z77.array(QueueAgentMissCallsListSchema).optional(),
5516
- queue_agent_in_out_calls_list: z77.array(QueueAgentInOutCallsListSchema).optional(),
5517
- callback_result: z77.string(),
5518
- page: z77.number().optional(),
5519
- pageSize: z77.number().optional()
5520
- });
5521
- var CallReportSchema = z77.object({
5522
- errcode: z77.number(),
5523
- errmsg: z77.string(),
5524
- total_number: z77.number(),
5525
- is_12hour: z77.number().optional(),
5526
- ext_call_statistics_list: z77.array(ExtCallStatisticsListSchema).optional(),
5527
- ext_call_activity_list: z77.array(ExtCallActivityListSchema).optional(),
5528
- trunk_activity_list: z77.array(TrunkActivityListSchema).optional(),
5529
- queue_avg_wait_talk_time_list: z77.array(QueueAvgWaitTalkTimeListSchema).optional(),
5530
- queue_satisfaction: QueueSatisfactionSchema.optional(),
5531
- queue_performance_list: z77.array(QueuePerformanceListSchema).optional(),
5532
- queue_agent_miss_calls_list: z77.array(QueueAgentMissCallsListSchema).optional(),
5533
- queue_agent_in_out_calls_list: z77.array(QueueAgentInOutCallsListSchema).optional(),
5534
- callback_result: z77.string(),
5535
- page: z77.number().optional(),
5536
- pageSize: z77.number().optional()
5537
- });
5538
-
5539
- // src/telephony-cdr/index.ts
5540
5396
  var telephonyCdrContract = initContract28().router(
5541
5397
  {
5542
5398
  findAll: {
@@ -5546,10 +5402,10 @@ var telephonyCdrContract = initContract28().router(
5546
5402
  query: GetAllTelephonyCdrSchema,
5547
5403
  responses: {
5548
5404
  200: DefaultSuccessResponseSchema.extend({
5549
- total: z78.number(),
5550
- page: z78.number(),
5551
- pageSize: z78.number(),
5552
- telephonyCdrs: z78.array(TelephonyCdrSchema)
5405
+ total: z77.number(),
5406
+ page: z77.number(),
5407
+ pageSize: z77.number(),
5408
+ telephonyCdrs: z77.array(TelephonyCdrSchema)
5553
5409
  }),
5554
5410
  401: DefaultUnauthorizedSchema
5555
5411
  },
@@ -5562,10 +5418,10 @@ var telephonyCdrContract = initContract28().router(
5562
5418
  query: GetAllTelephonyCdrSchema,
5563
5419
  responses: {
5564
5420
  200: DefaultSuccessResponseSchema.extend({
5565
- total: z78.number(),
5566
- page: z78.number(),
5567
- pageSize: z78.number(),
5568
- telephonyCdrs: z78.array(TelephonyCdrSchema)
5421
+ total: z77.number(),
5422
+ page: z77.number(),
5423
+ pageSize: z77.number(),
5424
+ telephonyCdrs: z77.array(TelephonyCdrSchema)
5569
5425
  }),
5570
5426
  401: DefaultUnauthorizedSchema
5571
5427
  },
@@ -5578,10 +5434,10 @@ var telephonyCdrContract = initContract28().router(
5578
5434
  query: GetRecentTelephonyCdrSchema,
5579
5435
  responses: {
5580
5436
  200: DefaultSuccessResponseSchema.extend({
5581
- total: z78.number(),
5582
- page: z78.number(),
5583
- pageSize: z78.number(),
5584
- telephonyCdrs: z78.array(TelephonyCdrSchema)
5437
+ total: z77.number(),
5438
+ page: z77.number(),
5439
+ pageSize: z77.number(),
5440
+ telephonyCdrs: z77.array(TelephonyCdrSchema)
5585
5441
  }),
5586
5442
  401: DefaultUnauthorizedSchema
5587
5443
  },
@@ -5605,7 +5461,8 @@ var telephonyCdrContract = initContract28().router(
5605
5461
  headers: DefaultHeaderSchema,
5606
5462
  body: GetYeastarCallReportSchema,
5607
5463
  responses: {
5608
- 200: CallReportSchema,
5464
+ // 200: CallReportSchema,
5465
+ 200: z77.object({}),
5609
5466
  401: DefaultUnauthorizedSchema
5610
5467
  },
5611
5468
  summary: "Get yeastar call report."
@@ -5673,35 +5530,35 @@ var telephonyCdrContract = initContract28().router(
5673
5530
 
5674
5531
  // src/telephony-extension/index.ts
5675
5532
  import { initContract as initContract29 } from "@ts-rest/core";
5676
- import z80 from "zod";
5533
+ import z79 from "zod";
5677
5534
 
5678
5535
  // src/telephony-extension/schema.ts
5679
- import z79 from "zod";
5680
- var TelephonyExtensionSchema3 = z79.object({
5681
- errcode: z79.coerce.number(),
5682
- errmsg: z79.string(),
5683
- total_number: z79.coerce.number(),
5684
- data: z79.array(
5685
- z79.object({
5686
- id: z79.coerce.number(),
5687
- online_status: z79.object({
5688
- fx_phone: z79.object({ status: z79.coerce.number() }),
5689
- sip_phone: z79.object({
5690
- status: z79.coerce.number(),
5691
- ext_dev_type: z79.string().optional()
5692
- }),
5693
- linkus_desktop: z79.object({ status: z79.coerce.number() }),
5694
- linkus_mobile: z79.object({ status: z79.coerce.number() }),
5695
- linkus_web: z79.object({
5696
- status: z79.coerce.number(),
5697
- ext_dev_type: z79.string().optional()
5536
+ import z78 from "zod";
5537
+ var TelephonyExtensionSchema3 = z78.object({
5538
+ errcode: z78.coerce.number(),
5539
+ errmsg: z78.string(),
5540
+ total_number: z78.coerce.number(),
5541
+ data: z78.array(
5542
+ z78.object({
5543
+ id: z78.coerce.number(),
5544
+ online_status: z78.object({
5545
+ fx_phone: z78.object({ status: z78.coerce.number() }),
5546
+ sip_phone: z78.object({
5547
+ status: z78.coerce.number(),
5548
+ ext_dev_type: z78.string().optional()
5549
+ }),
5550
+ linkus_desktop: z78.object({ status: z78.coerce.number() }),
5551
+ linkus_mobile: z78.object({ status: z78.coerce.number() }),
5552
+ linkus_web: z78.object({
5553
+ status: z78.coerce.number(),
5554
+ ext_dev_type: z78.string().optional()
5698
5555
  })
5699
5556
  }).optional(),
5700
- presence_status: z79.string().optional(),
5701
- number: z79.string().optional(),
5702
- caller_id_name: z79.string().optional(),
5703
- role_name: z79.string().optional(),
5704
- email_addr: z79.string().optional()
5557
+ presence_status: z78.string().optional(),
5558
+ number: z78.string().optional(),
5559
+ caller_id_name: z78.string().optional(),
5560
+ role_name: z78.string().optional(),
5561
+ email_addr: z78.string().optional()
5705
5562
  })
5706
5563
  )
5707
5564
  });
@@ -5716,8 +5573,8 @@ var telephonyExtensionContract = initContract29().router(
5716
5573
  query: null,
5717
5574
  responses: {
5718
5575
  200: TelephonyExtensionSchema3,
5719
- 400: z80.object({
5720
- message: z80.string()
5576
+ 400: z79.object({
5577
+ message: z79.string()
5721
5578
  }),
5722
5579
  401: DefaultUnauthorizedSchema,
5723
5580
  500: DefaultErrorResponseSchema
@@ -5730,10 +5587,10 @@ var telephonyExtensionContract = initContract29().router(
5730
5587
 
5731
5588
  // src/ticket/index.ts
5732
5589
  import { initContract as initContract30 } from "@ts-rest/core";
5733
- import z82 from "zod";
5590
+ import z81 from "zod";
5734
5591
 
5735
5592
  // src/ticket/validation.ts
5736
- import z81 from "zod";
5593
+ import z80 from "zod";
5737
5594
  var addErrorMessage2 = (field) => {
5738
5595
  return field.refine(
5739
5596
  ({ isRequired, value }) => {
@@ -5751,106 +5608,106 @@ var addErrorMessage2 = (field) => {
5751
5608
  }
5752
5609
  );
5753
5610
  };
5754
- var BaseSchema3 = z81.object({
5755
- isRequired: z81.boolean(),
5756
- attributeId: z81.string()
5611
+ var BaseSchema3 = z80.object({
5612
+ isRequired: z80.boolean(),
5613
+ attributeId: z80.string()
5757
5614
  });
5758
5615
  var SingleValue2 = addErrorMessage2(
5759
5616
  BaseSchema3.extend({
5760
- value: z81.string()
5617
+ value: z80.string()
5761
5618
  })
5762
5619
  );
5763
- var CreateTicketValidationSchema = z81.object({
5620
+ var CreateTicketValidationSchema = z80.object({
5764
5621
  title: SingleValue2,
5765
5622
  description: SingleValue2,
5766
5623
  status: SingleValue2,
5767
5624
  type: SingleValue2,
5768
5625
  priority: SingleValue2,
5769
5626
  contact: SingleValue2,
5770
- assignee: z81.object({
5771
- isRequired: z81.boolean(),
5772
- attributeId: z81.string(),
5773
- value: z81.string()
5627
+ assignee: z80.object({
5628
+ isRequired: z80.boolean(),
5629
+ attributeId: z80.string(),
5630
+ value: z80.string()
5774
5631
  }),
5775
5632
  channel: SingleValue2,
5776
- tags: addErrorMessage2(BaseSchema3.extend({ value: z81.array(z81.string()) })),
5777
- categories: BaseSchema3.extend({ value: z81.array(z81.string()) }),
5778
- customFields: z81.array(
5633
+ tags: addErrorMessage2(BaseSchema3.extend({ value: z80.array(z80.string()) })),
5634
+ categories: BaseSchema3.extend({ value: z80.array(z80.string()) }),
5635
+ customFields: z80.array(
5779
5636
  addErrorMessage2(
5780
5637
  BaseSchema3.extend({
5781
- value: z81.union([z81.string(), z81.array(z81.string())]),
5782
- type: z81.string(),
5783
- isDefaultAttribute: z81.boolean()
5638
+ value: z80.union([z80.string(), z80.array(z80.string())]),
5639
+ type: z80.string(),
5640
+ isDefaultAttribute: z80.boolean()
5784
5641
  })
5785
5642
  )
5786
5643
  ),
5787
- reasonToAssign: z81.object({ value: z81.string() }).optional()
5644
+ reasonToAssign: z80.object({ value: z80.string() }).optional()
5788
5645
  });
5789
5646
  var UpdateTicketValidationSchema = CreateTicketValidationSchema;
5790
- var TicketAttachmentRecordSchema = z81.object({
5791
- bucketName: z81.string(),
5792
- fileKey: z81.string(),
5793
- fileName: z81.string(),
5794
- fileSize: z81.coerce.number(),
5795
- url: z81.string()
5796
- });
5797
- var CreateTicketAttachmentRecordsSchema = z81.object({
5798
- ticketId: z81.string(),
5799
- attributeId: z81.string(),
5800
- ticketAttachmentRecords: z81.array(TicketAttachmentRecordSchema)
5801
- });
5802
- var TicketParamsSchema = z81.object({
5803
- page: z81.coerce.number().default(1),
5804
- pageSize: z81.coerce.number().default(10)
5805
- });
5806
- var CustomFieldQuery = z81.object({
5807
- attributeId: z81.string(),
5808
- type: z81.string(),
5809
- value: z81.union([z81.string(), z81.array(z81.string())])
5810
- });
5811
- var GetAllTicketQuerySchema = z81.object({
5812
- page: z81.string().transform((value) => Number(value)),
5813
- pageSize: z81.string().transform((value) => Number(value)),
5814
- selectedDate: z81.string(),
5815
- keyword: z81.string(),
5816
- title: z81.string(),
5817
- description: z81.string(),
5818
- status: z81.array(z81.string()),
5819
- priority: z81.array(z81.string()),
5820
- channel: z81.array(z81.string()),
5821
- type: z81.array(z81.string()),
5822
- ticketType: z81.array(z81.string()),
5823
- contact: z81.array(z81.string()),
5824
- tags: z81.array(z81.string().uuid()),
5825
- categories: z81.array(z81.string().uuid()),
5826
- assignee: z81.array(z81.string().uuid()),
5827
- customFields: z81.array(
5828
- z81.object({
5829
- attributeId: z81.string().uuid(),
5830
- type: z81.string(),
5831
- value: z81.union([z81.string(), z81.array(z81.string())])
5647
+ var TicketAttachmentRecordSchema = z80.object({
5648
+ bucketName: z80.string(),
5649
+ fileKey: z80.string(),
5650
+ fileName: z80.string(),
5651
+ fileSize: z80.coerce.number(),
5652
+ url: z80.string()
5653
+ });
5654
+ var CreateTicketAttachmentRecordsSchema = z80.object({
5655
+ ticketId: z80.string(),
5656
+ attributeId: z80.string(),
5657
+ ticketAttachmentRecords: z80.array(TicketAttachmentRecordSchema)
5658
+ });
5659
+ var TicketParamsSchema = z80.object({
5660
+ page: z80.coerce.number().default(1),
5661
+ pageSize: z80.coerce.number().default(10)
5662
+ });
5663
+ var CustomFieldQuery = z80.object({
5664
+ attributeId: z80.string(),
5665
+ type: z80.string(),
5666
+ value: z80.union([z80.string(), z80.array(z80.string())])
5667
+ });
5668
+ var GetAllTicketQuerySchema = z80.object({
5669
+ page: z80.string().transform((value) => Number(value)),
5670
+ pageSize: z80.string().transform((value) => Number(value)),
5671
+ selectedDate: z80.string(),
5672
+ keyword: z80.string(),
5673
+ title: z80.string(),
5674
+ description: z80.string(),
5675
+ status: z80.array(z80.string()),
5676
+ priority: z80.array(z80.string()),
5677
+ channel: z80.array(z80.string()),
5678
+ type: z80.array(z80.string()),
5679
+ ticketType: z80.array(z80.string()),
5680
+ contact: z80.array(z80.string()),
5681
+ tags: z80.array(z80.string().uuid()),
5682
+ categories: z80.array(z80.string().uuid()),
5683
+ assignee: z80.array(z80.string().uuid()),
5684
+ customFields: z80.array(
5685
+ z80.object({
5686
+ attributeId: z80.string().uuid(),
5687
+ type: z80.string(),
5688
+ value: z80.union([z80.string(), z80.array(z80.string())])
5832
5689
  })
5833
5690
  )
5834
5691
  }).partial();
5835
- var ExportAllTicketQuerySchema = z81.object({
5836
- agent: z81.array(z81.string()),
5837
- selectedDate: z81.string(),
5838
- keyword: z81.string(),
5839
- title: z81.string(),
5840
- description: z81.string(),
5841
- status: z81.array(z81.string()),
5842
- priority: z81.array(z81.string()),
5843
- channel: z81.array(z81.string()),
5844
- type: z81.array(z81.string()),
5845
- ticketType: z81.array(z81.string()),
5846
- contact: z81.array(z81.string()),
5847
- tags: z81.array(z81.string()),
5848
- categories: z81.array(z81.string()),
5849
- customFields: z81.array(
5850
- z81.object({
5851
- attributeId: z81.string().uuid(),
5852
- type: z81.string(),
5853
- value: z81.union([z81.string(), z81.array(z81.string())])
5692
+ var ExportAllTicketQuerySchema = z80.object({
5693
+ agent: z80.array(z80.string()),
5694
+ selectedDate: z80.string(),
5695
+ keyword: z80.string(),
5696
+ title: z80.string(),
5697
+ description: z80.string(),
5698
+ status: z80.array(z80.string()),
5699
+ priority: z80.array(z80.string()),
5700
+ channel: z80.array(z80.string()),
5701
+ type: z80.array(z80.string()),
5702
+ ticketType: z80.array(z80.string()),
5703
+ contact: z80.array(z80.string()),
5704
+ tags: z80.array(z80.string()),
5705
+ categories: z80.array(z80.string()),
5706
+ customFields: z80.array(
5707
+ z80.object({
5708
+ attributeId: z80.string().uuid(),
5709
+ type: z80.string(),
5710
+ value: z80.union([z80.string(), z80.array(z80.string())])
5854
5711
  })
5855
5712
  )
5856
5713
  }).partial();
@@ -5866,14 +5723,14 @@ var ticketContract = initContract30().router(
5866
5723
  201: DefaultSuccessResponseSchema.extend({
5867
5724
  data: TicketSchema
5868
5725
  }),
5869
- 400: z82.object({
5870
- message: z82.string()
5726
+ 400: z81.object({
5727
+ message: z81.string()
5871
5728
  }),
5872
- 409: z82.object({
5873
- message: z82.string()
5729
+ 409: z81.object({
5730
+ message: z81.string()
5874
5731
  }),
5875
- 500: z82.object({
5876
- message: z82.string()
5732
+ 500: z81.object({
5733
+ message: z81.string()
5877
5734
  }),
5878
5735
  401: DefaultUnauthorizedSchema,
5879
5736
  404: DefaultNotFoundSchema,
@@ -5894,8 +5751,8 @@ var ticketContract = initContract30().router(
5894
5751
  TicketSchema
5895
5752
  )
5896
5753
  }),
5897
- 400: z82.object({
5898
- message: z82.string()
5754
+ 400: z81.object({
5755
+ message: z81.string()
5899
5756
  }),
5900
5757
  401: DefaultUnauthorizedSchema,
5901
5758
  500: DefaultErrorResponseSchema
@@ -5905,14 +5762,14 @@ var ticketContract = initContract30().router(
5905
5762
  getTicketById: {
5906
5763
  method: "GET",
5907
5764
  path: "/:id",
5908
- pathParams: z82.object({ id: z82.string() }),
5765
+ pathParams: z81.object({ id: z81.string() }),
5909
5766
  headers: DefaultHeaderSchema,
5910
5767
  responses: {
5911
5768
  200: DefaultSuccessResponseSchema.extend({
5912
5769
  data: TicketSchema
5913
5770
  }),
5914
- 400: z82.object({
5915
- message: z82.string()
5771
+ 400: z81.object({
5772
+ message: z81.string()
5916
5773
  }),
5917
5774
  401: DefaultUnauthorizedSchema,
5918
5775
  500: DefaultErrorResponseSchema
@@ -5922,15 +5779,15 @@ var ticketContract = initContract30().router(
5922
5779
  getTicketByContactId: {
5923
5780
  method: "GET",
5924
5781
  path: "/contact/:id",
5925
- pathParams: z82.object({ id: z82.string() }),
5782
+ pathParams: z81.object({ id: z81.string() }),
5926
5783
  query: TicketParamsSchema,
5927
5784
  headers: DefaultHeaderSchema,
5928
5785
  responses: {
5929
5786
  200: DefaultSuccessResponseSchema.extend({
5930
5787
  data: WithPagination(TicketSchema)
5931
5788
  }),
5932
- 400: z82.object({
5933
- message: z82.string()
5789
+ 400: z81.object({
5790
+ message: z81.string()
5934
5791
  }),
5935
5792
  401: DefaultUnauthorizedSchema,
5936
5793
  500: DefaultErrorResponseSchema
@@ -5940,21 +5797,21 @@ var ticketContract = initContract30().router(
5940
5797
  updateTicket: {
5941
5798
  method: "PATCH",
5942
5799
  path: "/:id",
5943
- pathParams: z82.object({ id: z82.string() }),
5800
+ pathParams: z81.object({ id: z81.string() }),
5944
5801
  body: UpdateTicketValidationSchema,
5945
5802
  headers: DefaultHeaderSchema,
5946
5803
  responses: {
5947
5804
  201: DefaultSuccessResponseSchema.extend({
5948
5805
  data: TicketSchema
5949
5806
  }),
5950
- 400: z82.object({
5951
- message: z82.string()
5807
+ 400: z81.object({
5808
+ message: z81.string()
5952
5809
  }),
5953
- 409: z82.object({
5954
- message: z82.string()
5810
+ 409: z81.object({
5811
+ message: z81.string()
5955
5812
  }),
5956
- 500: z82.object({
5957
- message: z82.string()
5813
+ 500: z81.object({
5814
+ message: z81.string()
5958
5815
  }),
5959
5816
  401: DefaultUnauthorizedSchema,
5960
5817
  404: DefaultNotFoundSchema,
@@ -5965,11 +5822,11 @@ var ticketContract = initContract30().router(
5965
5822
  deleteTicket: {
5966
5823
  method: "DELETE",
5967
5824
  path: "/:id",
5968
- pathParams: z82.object({ id: z82.string() }),
5825
+ pathParams: z81.object({ id: z81.string() }),
5969
5826
  headers: DefaultHeaderSchema,
5970
5827
  body: null,
5971
5828
  responses: {
5972
- 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
5829
+ 200: DefaultSuccessResponseSchema.extend({ message: z81.string() }),
5973
5830
  500: DefaultErrorResponseSchema
5974
5831
  },
5975
5832
  summary: "Delete a extension."
@@ -5977,19 +5834,19 @@ var ticketContract = initContract30().router(
5977
5834
  updateDescription: {
5978
5835
  method: "PATCH",
5979
5836
  path: "/description/update/:id",
5980
- pathParams: z82.object({ id: z82.string() }),
5981
- body: z82.object({ description: z82.string() }),
5837
+ pathParams: z81.object({ id: z81.string() }),
5838
+ body: z81.object({ description: z81.string() }),
5982
5839
  headers: DefaultHeaderSchema,
5983
5840
  responses: {
5984
- 201: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
5985
- 400: z82.object({
5986
- message: z82.string()
5841
+ 201: DefaultSuccessResponseSchema.extend({ message: z81.string() }),
5842
+ 400: z81.object({
5843
+ message: z81.string()
5987
5844
  }),
5988
- 409: z82.object({
5989
- message: z82.string()
5845
+ 409: z81.object({
5846
+ message: z81.string()
5990
5847
  }),
5991
- 500: z82.object({
5992
- message: z82.string()
5848
+ 500: z81.object({
5849
+ message: z81.string()
5993
5850
  }),
5994
5851
  401: DefaultUnauthorizedSchema,
5995
5852
  404: DefaultNotFoundSchema,
@@ -6000,19 +5857,19 @@ var ticketContract = initContract30().router(
6000
5857
  updateTitle: {
6001
5858
  method: "PATCH",
6002
5859
  path: "/title/update/:id",
6003
- pathParams: z82.object({ id: z82.string() }),
6004
- body: z82.object({ title: z82.string() }),
5860
+ pathParams: z81.object({ id: z81.string() }),
5861
+ body: z81.object({ title: z81.string() }),
6005
5862
  headers: DefaultHeaderSchema,
6006
5863
  responses: {
6007
- 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
6008
- 400: z82.object({
6009
- message: z82.string()
5864
+ 200: DefaultSuccessResponseSchema.extend({ message: z81.string() }),
5865
+ 400: z81.object({
5866
+ message: z81.string()
6010
5867
  }),
6011
- 409: z82.object({
6012
- message: z82.string()
5868
+ 409: z81.object({
5869
+ message: z81.string()
6013
5870
  }),
6014
- 500: z82.object({
6015
- message: z82.string()
5871
+ 500: z81.object({
5872
+ message: z81.string()
6016
5873
  }),
6017
5874
  401: DefaultUnauthorizedSchema,
6018
5875
  404: DefaultNotFoundSchema,
@@ -6023,19 +5880,19 @@ var ticketContract = initContract30().router(
6023
5880
  updateType: {
6024
5881
  method: "PATCH",
6025
5882
  path: "/type/update/:id",
6026
- pathParams: z82.object({ id: z82.string() }),
6027
- body: z82.object({ type: z82.string() }),
5883
+ pathParams: z81.object({ id: z81.string() }),
5884
+ body: z81.object({ type: z81.string() }),
6028
5885
  headers: DefaultHeaderSchema,
6029
5886
  responses: {
6030
- 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
6031
- 400: z82.object({
6032
- message: z82.string()
5887
+ 200: DefaultSuccessResponseSchema.extend({ message: z81.string() }),
5888
+ 400: z81.object({
5889
+ message: z81.string()
6033
5890
  }),
6034
- 409: z82.object({
6035
- message: z82.string()
5891
+ 409: z81.object({
5892
+ message: z81.string()
6036
5893
  }),
6037
- 500: z82.object({
6038
- message: z82.string()
5894
+ 500: z81.object({
5895
+ message: z81.string()
6039
5896
  }),
6040
5897
  401: DefaultUnauthorizedSchema,
6041
5898
  404: DefaultNotFoundSchema,
@@ -6046,19 +5903,19 @@ var ticketContract = initContract30().router(
6046
5903
  updateStatus: {
6047
5904
  method: "PATCH",
6048
5905
  path: "/status/update/:id",
6049
- pathParams: z82.object({ id: z82.string() }),
6050
- body: z82.object({ status: z82.string() }),
5906
+ pathParams: z81.object({ id: z81.string() }),
5907
+ body: z81.object({ status: z81.string() }),
6051
5908
  headers: DefaultHeaderSchema,
6052
5909
  responses: {
6053
- 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
6054
- 400: z82.object({
6055
- message: z82.string()
5910
+ 200: DefaultSuccessResponseSchema.extend({ message: z81.string() }),
5911
+ 400: z81.object({
5912
+ message: z81.string()
6056
5913
  }),
6057
- 409: z82.object({
6058
- message: z82.string()
5914
+ 409: z81.object({
5915
+ message: z81.string()
6059
5916
  }),
6060
- 500: z82.object({
6061
- message: z82.string()
5917
+ 500: z81.object({
5918
+ message: z81.string()
6062
5919
  }),
6063
5920
  401: DefaultUnauthorizedSchema,
6064
5921
  404: DefaultNotFoundSchema,
@@ -6069,19 +5926,19 @@ var ticketContract = initContract30().router(
6069
5926
  updatePriority: {
6070
5927
  method: "PATCH",
6071
5928
  path: "/priority/update/:id",
6072
- pathParams: z82.object({ id: z82.string() }),
6073
- body: z82.object({ priority: z82.string() }),
5929
+ pathParams: z81.object({ id: z81.string() }),
5930
+ body: z81.object({ priority: z81.string() }),
6074
5931
  headers: DefaultHeaderSchema,
6075
5932
  responses: {
6076
- 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
6077
- 400: z82.object({
6078
- message: z82.string()
5933
+ 200: DefaultSuccessResponseSchema.extend({ message: z81.string() }),
5934
+ 400: z81.object({
5935
+ message: z81.string()
6079
5936
  }),
6080
- 409: z82.object({
6081
- message: z82.string()
5937
+ 409: z81.object({
5938
+ message: z81.string()
6082
5939
  }),
6083
- 500: z82.object({
6084
- message: z82.string()
5940
+ 500: z81.object({
5941
+ message: z81.string()
6085
5942
  }),
6086
5943
  401: DefaultUnauthorizedSchema,
6087
5944
  404: DefaultNotFoundSchema,
@@ -6092,19 +5949,19 @@ var ticketContract = initContract30().router(
6092
5949
  updateChannel: {
6093
5950
  method: "PATCH",
6094
5951
  path: "/channel/update/:id",
6095
- pathParams: z82.object({ id: z82.string() }),
6096
- body: z82.object({ channel: z82.string() }),
5952
+ pathParams: z81.object({ id: z81.string() }),
5953
+ body: z81.object({ channel: z81.string() }),
6097
5954
  headers: DefaultHeaderSchema,
6098
5955
  responses: {
6099
- 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
6100
- 400: z82.object({
6101
- message: z82.string()
5956
+ 200: DefaultSuccessResponseSchema.extend({ message: z81.string() }),
5957
+ 400: z81.object({
5958
+ message: z81.string()
6102
5959
  }),
6103
- 409: z82.object({
6104
- message: z82.string()
5960
+ 409: z81.object({
5961
+ message: z81.string()
6105
5962
  }),
6106
- 500: z82.object({
6107
- message: z82.string()
5963
+ 500: z81.object({
5964
+ message: z81.string()
6108
5965
  }),
6109
5966
  401: DefaultUnauthorizedSchema,
6110
5967
  404: DefaultNotFoundSchema,
@@ -6115,19 +5972,19 @@ var ticketContract = initContract30().router(
6115
5972
  updateTags: {
6116
5973
  method: "PATCH",
6117
5974
  path: "/tags/update/:id",
6118
- pathParams: z82.object({ id: z82.string() }),
6119
- body: z82.object({ tags: z82.array(z82.string()) }),
5975
+ pathParams: z81.object({ id: z81.string() }),
5976
+ body: z81.object({ tags: z81.array(z81.string()) }),
6120
5977
  headers: DefaultHeaderSchema,
6121
5978
  responses: {
6122
- 200: DefaultSuccessResponseSchema.extend({ message: z82.string() }),
6123
- 400: z82.object({
6124
- message: z82.string()
5979
+ 200: DefaultSuccessResponseSchema.extend({ message: z81.string() }),
5980
+ 400: z81.object({
5981
+ message: z81.string()
6125
5982
  }),
6126
- 409: z82.object({
6127
- message: z82.string()
5983
+ 409: z81.object({
5984
+ message: z81.string()
6128
5985
  }),
6129
- 500: z82.object({
6130
- message: z82.string()
5986
+ 500: z81.object({
5987
+ message: z81.string()
6131
5988
  }),
6132
5989
  401: DefaultUnauthorizedSchema,
6133
5990
  404: DefaultNotFoundSchema,
@@ -6138,25 +5995,25 @@ var ticketContract = initContract30().router(
6138
5995
  changeAssignee: {
6139
5996
  method: "PATCH",
6140
5997
  path: "/assignee/update/:id",
6141
- pathParams: z82.object({ id: z82.string() }),
6142
- body: z82.object({
6143
- ticketId: z82.string(),
6144
- assigneeId: z82.string(),
6145
- reason: z82.string().optional()
5998
+ pathParams: z81.object({ id: z81.string() }),
5999
+ body: z81.object({
6000
+ ticketId: z81.string(),
6001
+ assigneeId: z81.string(),
6002
+ reason: z81.string().optional()
6146
6003
  }),
6147
6004
  headers: DefaultHeaderSchema,
6148
6005
  responses: {
6149
6006
  200: DefaultSuccessResponseSchema.extend({
6150
6007
  data: TicketSchema
6151
6008
  }),
6152
- 400: z82.object({
6153
- message: z82.string()
6009
+ 400: z81.object({
6010
+ message: z81.string()
6154
6011
  }),
6155
- 409: z82.object({
6156
- message: z82.string()
6012
+ 409: z81.object({
6013
+ message: z81.string()
6157
6014
  }),
6158
- 500: z82.object({
6159
- message: z82.string()
6015
+ 500: z81.object({
6016
+ message: z81.string()
6160
6017
  }),
6161
6018
  401: DefaultUnauthorizedSchema,
6162
6019
  404: DefaultNotFoundSchema,
@@ -6167,14 +6024,14 @@ var ticketContract = initContract30().router(
6167
6024
  getTicketCountByContact: {
6168
6025
  method: "GET",
6169
6026
  path: "/ticket_count/contact/:id",
6170
- pathParams: z82.object({ id: z82.string() }),
6027
+ pathParams: z81.object({ id: z81.string() }),
6171
6028
  headers: DefaultHeaderSchema,
6172
6029
  responses: {
6173
6030
  200: DefaultSuccessResponseSchema.extend({
6174
6031
  data: TicketCountByContactSchema
6175
6032
  }),
6176
- 400: z82.object({
6177
- message: z82.string()
6033
+ 400: z81.object({
6034
+ message: z81.string()
6178
6035
  }),
6179
6036
  401: DefaultUnauthorizedSchema,
6180
6037
  500: DefaultErrorResponseSchema
@@ -6190,14 +6047,14 @@ var ticketContract = initContract30().router(
6190
6047
  201: DefaultSuccessResponseSchema.extend({
6191
6048
  data: TicketCustomFieldSchema
6192
6049
  }),
6193
- 400: z82.object({
6194
- message: z82.string()
6050
+ 400: z81.object({
6051
+ message: z81.string()
6195
6052
  }),
6196
- 409: z82.object({
6197
- message: z82.string()
6053
+ 409: z81.object({
6054
+ message: z81.string()
6198
6055
  }),
6199
- 500: z82.object({
6200
- message: z82.string()
6056
+ 500: z81.object({
6057
+ message: z81.string()
6201
6058
  }),
6202
6059
  401: DefaultUnauthorizedSchema,
6203
6060
  404: DefaultNotFoundSchema,
@@ -6222,24 +6079,24 @@ var ticketContract = initContract30().router(
6222
6079
 
6223
6080
  // src/user/index.ts
6224
6081
  import { initContract as initContract31 } from "@ts-rest/core";
6225
- import z84 from "zod";
6082
+ import z83 from "zod";
6226
6083
 
6227
6084
  // src/user/validation.ts
6228
- import { z as z83 } from "zod";
6229
- var CreateUserSchema = z83.object({
6230
- name: z83.string(),
6231
- email: z83.string().email(),
6232
- address: z83.string().nullable(),
6233
- phone: z83.string().nullable(),
6234
- password: z83.string(),
6235
- notificationCount: z83.number().nullable().optional(),
6236
- roles: z83.array(z83.string())
6085
+ import { z as z82 } from "zod";
6086
+ var CreateUserSchema = z82.object({
6087
+ name: z82.string(),
6088
+ email: z82.string().email(),
6089
+ address: z82.string().nullable(),
6090
+ phone: z82.string().nullable(),
6091
+ password: z82.string(),
6092
+ notificationCount: z82.number().nullable().optional(),
6093
+ roles: z82.array(z82.string())
6237
6094
  });
6238
6095
  var UpdateUserSchema = CreateUserSchema.extend({
6239
- newPassword: z83.string()
6096
+ newPassword: z82.string()
6240
6097
  });
6241
- var UpdateUserProfileSchema = z83.object({
6242
- password: z83.string()
6098
+ var UpdateUserProfileSchema = z82.object({
6099
+ password: z82.string()
6243
6100
  });
6244
6101
 
6245
6102
  // src/user/index.ts
@@ -6254,8 +6111,8 @@ var userContract = initContract31().router(
6254
6111
  201: DefaultSuccessResponseSchema.extend({
6255
6112
  user: UserSchema
6256
6113
  }),
6257
- 400: z84.object({
6258
- message: z84.string()
6114
+ 400: z83.object({
6115
+ message: z83.string()
6259
6116
  }),
6260
6117
  401: DefaultUnauthorizedSchema,
6261
6118
  404: DefaultNotFoundSchema,
@@ -6268,16 +6125,16 @@ var userContract = initContract31().router(
6268
6125
  method: "GET",
6269
6126
  path: "",
6270
6127
  headers: DefaultHeaderSchema,
6271
- query: z84.object({
6272
- page: z84.coerce.number().optional(),
6273
- pageSize: z84.coerce.number().optional(),
6128
+ query: z83.object({
6129
+ page: z83.coerce.number().optional(),
6130
+ pageSize: z83.coerce.number().optional(),
6274
6131
  // Don't add default 10. In some places, we need to fetch all users.
6275
- keyword: z84.string().optional()
6132
+ keyword: z83.string().optional()
6276
6133
  }).optional(),
6277
6134
  responses: {
6278
6135
  200: WithPagination(UserSchema),
6279
- 400: z84.object({
6280
- message: z84.string()
6136
+ 400: z83.object({
6137
+ message: z83.string()
6281
6138
  }),
6282
6139
  401: DefaultUnauthorizedSchema,
6283
6140
  500: DefaultErrorResponseSchema
@@ -6287,12 +6144,12 @@ var userContract = initContract31().router(
6287
6144
  getUserById: {
6288
6145
  method: "GET",
6289
6146
  path: "/:id",
6290
- pathParams: z84.object({ id: z84.string() }),
6147
+ pathParams: z83.object({ id: z83.string() }),
6291
6148
  headers: DefaultHeaderSchema,
6292
6149
  responses: {
6293
6150
  200: UserSchema,
6294
- 400: z84.object({
6295
- message: z84.string()
6151
+ 400: z83.object({
6152
+ message: z83.string()
6296
6153
  }),
6297
6154
  401: DefaultUnauthorizedSchema
6298
6155
  },
@@ -6301,15 +6158,15 @@ var userContract = initContract31().router(
6301
6158
  updateUser: {
6302
6159
  method: "PATCH",
6303
6160
  path: "/:id",
6304
- pathParams: z84.object({ id: z84.string() }),
6161
+ pathParams: z83.object({ id: z83.string() }),
6305
6162
  headers: DefaultHeaderSchema,
6306
6163
  body: UpdateUserSchema,
6307
6164
  responses: {
6308
6165
  201: DefaultSuccessResponseSchema.extend({
6309
6166
  user: UserSchema
6310
6167
  }),
6311
- 400: z84.object({
6312
- message: z84.string()
6168
+ 400: z83.object({
6169
+ message: z83.string()
6313
6170
  }),
6314
6171
  401: DefaultUnauthorizedSchema,
6315
6172
  404: DefaultNotFoundSchema,
@@ -6321,15 +6178,15 @@ var userContract = initContract31().router(
6321
6178
  updateUserProfile: {
6322
6179
  method: "PATCH",
6323
6180
  path: "/profile/:id",
6324
- pathParams: z84.object({ id: z84.string() }),
6181
+ pathParams: z83.object({ id: z83.string() }),
6325
6182
  headers: DefaultHeaderSchema,
6326
6183
  body: UpdateUserProfileSchema,
6327
6184
  responses: {
6328
6185
  201: DefaultSuccessResponseSchema.extend({
6329
6186
  user: UserSchema
6330
6187
  }),
6331
- 400: z84.object({
6332
- message: z84.string()
6188
+ 400: z83.object({
6189
+ message: z83.string()
6333
6190
  }),
6334
6191
  401: DefaultUnauthorizedSchema,
6335
6192
  404: DefaultNotFoundSchema,
@@ -6341,11 +6198,11 @@ var userContract = initContract31().router(
6341
6198
  deleteUser: {
6342
6199
  method: "DELETE",
6343
6200
  path: "/:id",
6344
- pathParams: z84.object({ id: z84.string() }),
6201
+ pathParams: z83.object({ id: z83.string() }),
6345
6202
  headers: DefaultHeaderSchema,
6346
6203
  body: null,
6347
6204
  responses: {
6348
- 200: DefaultSuccessResponseSchema.extend({ message: z84.string() }),
6205
+ 200: DefaultSuccessResponseSchema.extend({ message: z83.string() }),
6349
6206
  404: DefaultNotFoundSchema,
6350
6207
  422: DefaultUnprocessibleSchema,
6351
6208
  500: DefaultErrorResponseSchema
@@ -6358,26 +6215,26 @@ var userContract = initContract31().router(
6358
6215
 
6359
6216
  // src/user-presence-status-log/index.ts
6360
6217
  import { initContract as initContract32 } from "@ts-rest/core";
6361
- import z87 from "zod";
6218
+ import z86 from "zod";
6362
6219
 
6363
6220
  // src/user-presence-status-log/schema.ts
6364
- import z85 from "zod";
6221
+ import z84 from "zod";
6365
6222
  var UserPresenceStatusLogSchema = DefaultEntitySchema.extend({
6366
6223
  user: UserSchema,
6367
6224
  previousPresenceStatus: PresenceStatusSchema,
6368
6225
  newPresenceStatus: PresenceStatusSchema,
6369
- reason: z85.string()
6226
+ reason: z84.string()
6370
6227
  });
6371
6228
 
6372
6229
  // src/user-presence-status-log/validation.ts
6373
- import z86 from "zod";
6374
- var UserPresenceStatusLogParamsSchema = z86.object({
6375
- page: z86.coerce.number().default(1),
6376
- pageSize: z86.coerce.number().default(10),
6377
- selectedDate: z86.string().optional()
6230
+ import z85 from "zod";
6231
+ var UserPresenceStatusLogParamsSchema = z85.object({
6232
+ page: z85.coerce.number().default(1),
6233
+ pageSize: z85.coerce.number().default(10),
6234
+ selectedDate: z85.string().optional()
6378
6235
  }).optional();
6379
- var UserPresenceStatusLogExportParamsSchema = z86.object({
6380
- selectedDate: z86.string().optional()
6236
+ var UserPresenceStatusLogExportParamsSchema = z85.object({
6237
+ selectedDate: z85.string().optional()
6381
6238
  });
6382
6239
 
6383
6240
  // src/user-presence-status-log/index.ts
@@ -6390,8 +6247,8 @@ var userPresenceStatusLogContract = initContract32().router(
6390
6247
  headers: DefaultHeaderSchema,
6391
6248
  responses: {
6392
6249
  200: WithPagination(UserPresenceStatusLogSchema),
6393
- 400: z87.object({
6394
- message: z87.string()
6250
+ 400: z86.object({
6251
+ message: z86.string()
6395
6252
  }),
6396
6253
  401: DefaultUnauthorizedSchema,
6397
6254
  500: DefaultErrorResponseSchema
@@ -6405,8 +6262,8 @@ var userPresenceStatusLogContract = initContract32().router(
6405
6262
  headers: DefaultHeaderSchema,
6406
6263
  responses: {
6407
6264
  200: null,
6408
- 400: z87.object({
6409
- message: z87.string()
6265
+ 400: z86.object({
6266
+ message: z86.string()
6410
6267
  }),
6411
6268
  401: DefaultUnauthorizedSchema,
6412
6269
  500: DefaultErrorResponseSchema
@@ -6418,44 +6275,44 @@ var userPresenceStatusLogContract = initContract32().router(
6418
6275
 
6419
6276
  // src/widget/index.ts
6420
6277
  import { initContract as initContract33 } from "@ts-rest/core";
6421
- import z90 from "zod";
6278
+ import z89 from "zod";
6422
6279
 
6423
6280
  // src/widget/schema.ts
6424
- import z88 from "zod";
6425
- var FieldsSchema = z88.object({ data: z88.array(z88.string()) });
6426
- var WidgetPositionSchema = z88.union([
6427
- z88.literal("menu"),
6428
- z88.literal("ticket_detail"),
6429
- z88.literal("contact_detail")
6281
+ import z87 from "zod";
6282
+ var FieldsSchema = z87.object({ data: z87.array(z87.string()) });
6283
+ var WidgetPositionSchema = z87.union([
6284
+ z87.literal("menu"),
6285
+ z87.literal("ticket_detail"),
6286
+ z87.literal("contact_detail")
6430
6287
  ]);
6431
6288
  var WidgetSchema = DefaultEntitySchema.extend({
6432
- name: z88.string(),
6433
- description: z88.string().nullable(),
6289
+ name: z87.string(),
6290
+ description: z87.string().nullable(),
6434
6291
  position: WidgetPositionSchema.nullable(),
6435
6292
  fields: FieldsSchema,
6436
- url: z88.string()
6293
+ url: z87.string()
6437
6294
  });
6438
6295
 
6439
6296
  // src/widget/validation.ts
6440
- import z89 from "zod";
6441
- var CreateWidgetSchema = z89.object({
6442
- name: z89.string(),
6443
- description: z89.string(),
6444
- url: z89.string(),
6297
+ import z88 from "zod";
6298
+ var CreateWidgetSchema = z88.object({
6299
+ name: z88.string(),
6300
+ description: z88.string(),
6301
+ url: z88.string(),
6445
6302
  position: WidgetPositionSchema,
6446
- fields: z89.object({
6303
+ fields: z88.object({
6447
6304
  data: (
6448
6305
  // Array of attribute system names
6449
- z89.array(z89.string())
6306
+ z88.array(z88.string())
6450
6307
  )
6451
6308
  }).optional()
6452
6309
  });
6453
6310
  var UpdateWidgetSchema = CreateWidgetSchema;
6454
- var GetWidgetUrlPathQuerySchema = z89.object({
6455
- widgetId: z89.string(),
6311
+ var GetWidgetUrlPathQuerySchema = z88.object({
6312
+ widgetId: z88.string(),
6456
6313
  // Position ID is ticket ID, contact ID, etc.
6457
6314
  // TODO: The name "Position ID" is confusing. Think of a better name.
6458
- positionId: z89.string()
6315
+ positionId: z88.string()
6459
6316
  });
6460
6317
 
6461
6318
  // src/widget/index.ts
@@ -6470,8 +6327,8 @@ var widgetContract = initContract33().router(
6470
6327
  201: DefaultSuccessResponseSchema.extend({
6471
6328
  widget: WidgetSchema
6472
6329
  }),
6473
- 400: z90.object({
6474
- message: z90.string()
6330
+ 400: z89.object({
6331
+ message: z89.string()
6475
6332
  }),
6476
6333
  401: DefaultUnauthorizedSchema,
6477
6334
  500: DefaultErrorResponseSchema
@@ -6481,17 +6338,17 @@ var widgetContract = initContract33().router(
6481
6338
  getWidgets: {
6482
6339
  method: "GET",
6483
6340
  path: "",
6484
- query: z90.object({
6485
- page: z90.coerce.number().default(1),
6486
- pageSize: z90.coerce.number().default(10),
6487
- keyword: z90.coerce.string().optional()
6341
+ query: z89.object({
6342
+ page: z89.coerce.number().default(1),
6343
+ pageSize: z89.coerce.number().default(10),
6344
+ keyword: z89.coerce.string().optional()
6488
6345
  }).optional(),
6489
6346
  headers: DefaultHeaderSchema,
6490
6347
  responses: {
6491
6348
  200: WithPagination(WidgetSchema),
6492
6349
  500: DefaultErrorResponseSchema,
6493
- 400: z90.object({
6494
- message: z90.string()
6350
+ 400: z89.object({
6351
+ message: z89.string()
6495
6352
  }),
6496
6353
  401: DefaultUnauthorizedSchema
6497
6354
  },
@@ -6502,9 +6359,9 @@ var widgetContract = initContract33().router(
6502
6359
  path: "/menu",
6503
6360
  headers: DefaultHeaderSchema,
6504
6361
  responses: {
6505
- 200: z90.array(WidgetSchema),
6506
- 400: z90.object({
6507
- message: z90.string()
6362
+ 200: z89.array(WidgetSchema),
6363
+ 400: z89.object({
6364
+ message: z89.string()
6508
6365
  }),
6509
6366
  401: DefaultUnauthorizedSchema,
6510
6367
  500: DefaultErrorResponseSchema
@@ -6516,9 +6373,9 @@ var widgetContract = initContract33().router(
6516
6373
  path: "/ticket_detail",
6517
6374
  headers: DefaultHeaderSchema,
6518
6375
  responses: {
6519
- 200: z90.array(WidgetSchema),
6520
- 400: z90.object({
6521
- message: z90.string()
6376
+ 200: z89.array(WidgetSchema),
6377
+ 400: z89.object({
6378
+ message: z89.string()
6522
6379
  }),
6523
6380
  401: DefaultUnauthorizedSchema,
6524
6381
  500: DefaultErrorResponseSchema
@@ -6530,9 +6387,9 @@ var widgetContract = initContract33().router(
6530
6387
  path: "/contact_detail",
6531
6388
  headers: DefaultHeaderSchema,
6532
6389
  responses: {
6533
- 200: z90.array(WidgetSchema),
6534
- 400: z90.object({
6535
- message: z90.string()
6390
+ 200: z89.array(WidgetSchema),
6391
+ 400: z89.object({
6392
+ message: z89.string()
6536
6393
  }),
6537
6394
  401: DefaultUnauthorizedSchema,
6538
6395
  500: DefaultErrorResponseSchema
@@ -6542,12 +6399,12 @@ var widgetContract = initContract33().router(
6542
6399
  getWidgetById: {
6543
6400
  method: "GET",
6544
6401
  path: "/:id",
6545
- pathParams: z90.object({ id: z90.string() }),
6402
+ pathParams: z89.object({ id: z89.string() }),
6546
6403
  headers: DefaultHeaderSchema,
6547
6404
  responses: {
6548
6405
  200: WidgetSchema,
6549
- 400: z90.object({
6550
- message: z90.string()
6406
+ 400: z89.object({
6407
+ message: z89.string()
6551
6408
  }),
6552
6409
  401: DefaultUnauthorizedSchema,
6553
6410
  500: DefaultErrorResponseSchema
@@ -6561,10 +6418,10 @@ var widgetContract = initContract33().router(
6561
6418
  headers: DefaultHeaderSchema,
6562
6419
  responses: {
6563
6420
  201: DefaultSuccessResponseSchema.extend({
6564
- url: z90.string()
6421
+ url: z89.string()
6565
6422
  }),
6566
- 400: z90.object({
6567
- message: z90.string()
6423
+ 400: z89.object({
6424
+ message: z89.string()
6568
6425
  }),
6569
6426
  401: DefaultUnauthorizedSchema
6570
6427
  },
@@ -6573,14 +6430,14 @@ var widgetContract = initContract33().router(
6573
6430
  updateWidget: {
6574
6431
  method: "PATCH",
6575
6432
  path: "/:id",
6576
- pathParams: z90.object({ id: z90.string() }),
6433
+ pathParams: z89.object({ id: z89.string() }),
6577
6434
  headers: DefaultHeaderSchema,
6578
6435
  responses: {
6579
6436
  201: DefaultSuccessResponseSchema.extend({
6580
6437
  widget: WidgetSchema
6581
6438
  }),
6582
- 400: z90.object({
6583
- message: z90.string()
6439
+ 400: z89.object({
6440
+ message: z89.string()
6584
6441
  }),
6585
6442
  401: DefaultUnauthorizedSchema
6586
6443
  },
@@ -6590,11 +6447,11 @@ var widgetContract = initContract33().router(
6590
6447
  deleteWidget: {
6591
6448
  method: "DELETE",
6592
6449
  path: "/:id",
6593
- pathParams: z90.object({ id: z90.string() }),
6450
+ pathParams: z89.object({ id: z89.string() }),
6594
6451
  headers: DefaultHeaderSchema,
6595
6452
  body: null,
6596
6453
  responses: {
6597
- 200: DefaultSuccessResponseSchema.extend({ message: z90.string() }),
6454
+ 200: DefaultSuccessResponseSchema.extend({ message: z89.string() }),
6598
6455
  500: DefaultErrorResponseSchema
6599
6456
  },
6600
6457
  summary: "Delete a widget."
@@ -6605,33 +6462,33 @@ var widgetContract = initContract33().router(
6605
6462
 
6606
6463
  // src/wrap-up-form/index.ts
6607
6464
  import { initContract as initContract34 } from "@ts-rest/core";
6608
- import z92 from "zod";
6465
+ import z91 from "zod";
6609
6466
 
6610
6467
  // src/wrap-up-form/validation.ts
6611
- import { z as z91 } from "zod";
6612
- var CreateWrapUpFormSchema = z91.object({
6613
- note: z91.string().nullable().optional(),
6614
- disposition: z91.string().nullable().optional(),
6615
- callFrom: z91.string().nullable().optional(),
6616
- callTo: z91.string().nullable().optional()
6468
+ import { z as z90 } from "zod";
6469
+ var CreateWrapUpFormSchema = z90.object({
6470
+ note: z90.string().nullable().optional(),
6471
+ disposition: z90.string().nullable().optional(),
6472
+ callFrom: z90.string().nullable().optional(),
6473
+ callTo: z90.string().nullable().optional()
6617
6474
  });
6618
6475
  var UpdateWrapUpFormSchema = CreateWrapUpFormSchema.extend({
6619
- type: z91.string().optional(),
6620
- tags: z91.array(z91.string()).optional(),
6621
- categoryIds: z91.array(z91.string().uuid()).optional(),
6622
- customFields: z91.array(
6623
- z91.object({
6624
- id: z91.string().uuid(),
6625
- type: z91.string(),
6626
- value: z91.string()
6476
+ type: z90.string().optional(),
6477
+ tags: z90.array(z90.string()).optional(),
6478
+ categoryIds: z90.array(z90.string().uuid()).optional(),
6479
+ customFields: z90.array(
6480
+ z90.object({
6481
+ id: z90.string().uuid(),
6482
+ type: z90.string(),
6483
+ value: z90.string()
6627
6484
  })
6628
6485
  ).optional()
6629
6486
  });
6630
- var CreateCXLogWrapUpFormSchema = z91.object({
6631
- cxLogId: z91.string().uuid(),
6632
- disposition: z91.string().optional(),
6633
- tagIds: z91.array(z91.string().uuid()).optional(),
6634
- note: z91.string().optional()
6487
+ var CreateCXLogWrapUpFormSchema = z90.object({
6488
+ cxLogId: z90.string().uuid(),
6489
+ disposition: z90.string().optional(),
6490
+ tagIds: z90.array(z90.string().uuid()).optional(),
6491
+ note: z90.string().optional()
6635
6492
  });
6636
6493
 
6637
6494
  // src/wrap-up-form/index.ts
@@ -6646,8 +6503,8 @@ var wrapUpFormContract = initContract34().router(
6646
6503
  201: DefaultSuccessResponseSchema.extend({
6647
6504
  wrapUpForm: WrapUpFormSchema
6648
6505
  }),
6649
- 400: z92.object({
6650
- message: z92.string()
6506
+ 400: z91.object({
6507
+ message: z91.string()
6651
6508
  }),
6652
6509
  401: DefaultUnauthorizedSchema,
6653
6510
  500: DefaultErrorResponseSchema
@@ -6669,15 +6526,15 @@ var wrapUpFormContract = initContract34().router(
6669
6526
  getWrapUpForms: {
6670
6527
  method: "GET",
6671
6528
  path: "",
6672
- query: z92.object({
6673
- page: z92.coerce.number().default(1),
6674
- pageSize: z92.coerce.number().default(10)
6529
+ query: z91.object({
6530
+ page: z91.coerce.number().default(1),
6531
+ pageSize: z91.coerce.number().default(10)
6675
6532
  }).optional(),
6676
6533
  headers: DefaultHeaderSchema,
6677
6534
  responses: {
6678
6535
  200: WithPagination(WrapUpFormSchema),
6679
- 400: z92.object({
6680
- message: z92.string()
6536
+ 400: z91.object({
6537
+ message: z91.string()
6681
6538
  }),
6682
6539
  401: DefaultUnauthorizedSchema,
6683
6540
  500: DefaultErrorResponseSchema
@@ -6687,15 +6544,15 @@ var wrapUpFormContract = initContract34().router(
6687
6544
  updateWrapUpForm: {
6688
6545
  method: "PATCH",
6689
6546
  path: "/:id",
6690
- pathParams: z92.object({ id: z92.string() }),
6547
+ pathParams: z91.object({ id: z91.string() }),
6691
6548
  headers: DefaultHeaderSchema,
6692
6549
  body: UpdateWrapUpFormSchema,
6693
6550
  responses: {
6694
6551
  201: DefaultSuccessResponseSchema.extend({
6695
6552
  wrapUpForm: WrapUpFormSchema
6696
6553
  }),
6697
- 400: z92.object({
6698
- message: z92.string()
6554
+ 400: z91.object({
6555
+ message: z91.string()
6699
6556
  }),
6700
6557
  401: DefaultUnauthorizedSchema,
6701
6558
  500: DefaultErrorResponseSchema
@@ -6708,28 +6565,28 @@ var wrapUpFormContract = initContract34().router(
6708
6565
 
6709
6566
  // src/upload/index.ts
6710
6567
  import { initContract as initContract35 } from "@ts-rest/core";
6711
- import z93 from "zod";
6568
+ import z92 from "zod";
6712
6569
  var uploadContract = initContract35().router(
6713
6570
  {
6714
6571
  rename: {
6715
6572
  method: "POST",
6716
6573
  path: "/:id/rename",
6717
- pathParams: z93.object({
6718
- id: z93.string()
6574
+ pathParams: z92.object({
6575
+ id: z92.string()
6719
6576
  }),
6720
6577
  headers: DefaultHeaderSchema,
6721
6578
  responses: {
6722
6579
  201: DefaultSuccessResponseSchema.extend({
6723
- message: z93.string()
6580
+ message: z92.string()
6724
6581
  }),
6725
- 400: z93.object({
6726
- message: z93.string()
6582
+ 400: z92.object({
6583
+ message: z92.string()
6727
6584
  }),
6728
- 409: z93.object({
6729
- message: z93.string()
6585
+ 409: z92.object({
6586
+ message: z92.string()
6730
6587
  }),
6731
- 500: z93.object({
6732
- message: z93.string()
6588
+ 500: z92.object({
6589
+ message: z92.string()
6733
6590
  }),
6734
6591
  401: DefaultUnauthorizedSchema,
6735
6592
  404: DefaultNotFoundSchema,
@@ -6741,23 +6598,23 @@ var uploadContract = initContract35().router(
6741
6598
  delete: {
6742
6599
  method: "DELETE",
6743
6600
  path: "/:id",
6744
- pathParams: z93.object({
6745
- id: z93.string()
6601
+ pathParams: z92.object({
6602
+ id: z92.string()
6746
6603
  }),
6747
6604
  headers: DefaultHeaderSchema,
6748
6605
  body: null,
6749
6606
  responses: {
6750
6607
  201: DefaultSuccessResponseSchema.extend({
6751
- message: z93.string()
6608
+ message: z92.string()
6752
6609
  }),
6753
- 400: z93.object({
6754
- message: z93.string()
6610
+ 400: z92.object({
6611
+ message: z92.string()
6755
6612
  }),
6756
- 409: z93.object({
6757
- message: z93.string()
6613
+ 409: z92.object({
6614
+ message: z92.string()
6758
6615
  }),
6759
- 500: z93.object({
6760
- message: z93.string()
6616
+ 500: z92.object({
6617
+ message: z92.string()
6761
6618
  }),
6762
6619
  401: DefaultUnauthorizedSchema,
6763
6620
  404: DefaultNotFoundSchema,
@@ -6772,19 +6629,19 @@ var uploadContract = initContract35().router(
6772
6629
  );
6773
6630
 
6774
6631
  // src/viber/index.ts
6775
- import z95 from "zod";
6632
+ import z94 from "zod";
6776
6633
 
6777
6634
  // src/viber/validation.ts
6778
- import z94 from "zod";
6779
- var ViberChannelSchema = z94.object({
6780
- name: z94.string(),
6781
- accessToken: z94.string(),
6782
- actor: z94.object({
6783
- id: z94.string().uuid(),
6784
- name: z94.string(),
6785
- email: z94.string().email(),
6786
- address: z94.string().nullable(),
6787
- phone: z94.string().nullable()
6635
+ import z93 from "zod";
6636
+ var ViberChannelSchema = z93.object({
6637
+ name: z93.string(),
6638
+ accessToken: z93.string(),
6639
+ actor: z93.object({
6640
+ id: z93.string().uuid(),
6641
+ name: z93.string(),
6642
+ email: z93.string().email(),
6643
+ address: z93.string().nullable(),
6644
+ phone: z93.string().nullable()
6788
6645
  }).optional()
6789
6646
  });
6790
6647
 
@@ -6813,8 +6670,8 @@ var viberContract = initContract36().router({
6813
6670
  }),
6814
6671
  400: DefaultErrorResponseSchema
6815
6672
  },
6816
- body: z95.object({
6817
- id: z95.string().uuid()
6673
+ body: z94.object({
6674
+ id: z94.string().uuid()
6818
6675
  }),
6819
6676
  summary: "Connect viber channel"
6820
6677
  },
@@ -6830,8 +6687,8 @@ var viberContract = initContract36().router({
6830
6687
  reconnect: {
6831
6688
  method: "POST",
6832
6689
  path: "/reconnect/:channelId",
6833
- pathParams: z95.object({
6834
- channelId: z95.string().uuid()
6690
+ pathParams: z94.object({
6691
+ channelId: z94.string().uuid()
6835
6692
  }),
6836
6693
  responses: {
6837
6694
  200: DefaultSuccessResponseSchema.extend({
@@ -6846,8 +6703,8 @@ var viberContract = initContract36().router({
6846
6703
  delete: {
6847
6704
  method: "DELETE",
6848
6705
  path: "/delete/:channelId",
6849
- pathParams: z95.object({
6850
- channelId: z95.string().uuid()
6706
+ pathParams: z94.object({
6707
+ channelId: z94.string().uuid()
6851
6708
  }),
6852
6709
  body: null,
6853
6710
  responses: {
@@ -6860,58 +6717,58 @@ var viberContract = initContract36().router({
6860
6717
 
6861
6718
  // src/notification/index.ts
6862
6719
  import { initContract as initContract37 } from "@ts-rest/core";
6863
- import z98 from "zod";
6720
+ import z97 from "zod";
6864
6721
 
6865
6722
  // src/notification/validation.ts
6866
- import z97 from "zod";
6723
+ import z96 from "zod";
6867
6724
 
6868
6725
  // src/notification/schema.ts
6869
- import z96 from "zod";
6870
- var NotificationChangeSchema = z96.object({
6871
- id: z96.string().uuid(),
6872
- createdAt: z96.date(),
6873
- updatedAt: z96.date(),
6874
- deletedAt: z96.date().nullable(),
6875
- actorId: z96.string().uuid(),
6726
+ import z95 from "zod";
6727
+ var NotificationChangeSchema = z95.object({
6728
+ id: z95.string().uuid(),
6729
+ createdAt: z95.date(),
6730
+ updatedAt: z95.date(),
6731
+ deletedAt: z95.date().nullable(),
6732
+ actorId: z95.string().uuid(),
6876
6733
  actor: UserSchema,
6877
- notificationObjectId: z96.string().uuid(),
6878
- readAt: z96.date()
6879
- });
6880
- var NotificationObjectSchema = z96.object({
6881
- id: z96.string().uuid(),
6882
- createdAt: z96.date(),
6883
- updatedAt: z96.date(),
6884
- deletedAt: z96.date().nullable(),
6885
- data: z96.string(),
6734
+ notificationObjectId: z95.string().uuid(),
6735
+ readAt: z95.date()
6736
+ });
6737
+ var NotificationObjectSchema = z95.object({
6738
+ id: z95.string().uuid(),
6739
+ createdAt: z95.date(),
6740
+ updatedAt: z95.date(),
6741
+ deletedAt: z95.date().nullable(),
6742
+ data: z95.string(),
6886
6743
  notificationChange: NotificationChangeSchema
6887
6744
  });
6888
- var NotificationSchema = z96.object({
6889
- id: z96.string().uuid(),
6890
- createdAt: z96.date(),
6891
- updatedAt: z96.date(),
6892
- deletedAt: z96.date().nullable(),
6893
- notificationObjectId: z96.string().uuid(),
6894
- notifierId: z96.string().uuid(),
6745
+ var NotificationSchema = z95.object({
6746
+ id: z95.string().uuid(),
6747
+ createdAt: z95.date(),
6748
+ updatedAt: z95.date(),
6749
+ deletedAt: z95.date().nullable(),
6750
+ notificationObjectId: z95.string().uuid(),
6751
+ notifierId: z95.string().uuid(),
6895
6752
  notificationObject: NotificationObjectSchema,
6896
- readAt: z96.date()
6753
+ readAt: z95.date()
6897
6754
  });
6898
6755
 
6899
6756
  // src/notification/validation.ts
6900
- var GetNotificationsRequestSchema = z97.object({
6901
- page: z97.coerce.number().default(1),
6902
- pageSize: z97.coerce.number().default(10)
6757
+ var GetNotificationsRequestSchema = z96.object({
6758
+ page: z96.coerce.number().default(1),
6759
+ pageSize: z96.coerce.number().default(10)
6903
6760
  });
6904
- var GetNotificationsResponseSchema = z97.object({
6905
- notificationCount: z97.number(),
6906
- notifications: z97.array(NotificationSchema),
6907
- total: z97.number(),
6908
- page: z97.number(),
6909
- pageSize: z97.number(),
6910
- lastPage: z97.number(),
6911
- totalUnreadCount: z97.number().optional()
6761
+ var GetNotificationsResponseSchema = z96.object({
6762
+ notificationCount: z96.number(),
6763
+ notifications: z96.array(NotificationSchema),
6764
+ total: z96.number(),
6765
+ page: z96.number(),
6766
+ pageSize: z96.number(),
6767
+ lastPage: z96.number(),
6768
+ totalUnreadCount: z96.number().optional()
6912
6769
  });
6913
- var ResetNotificationRequestSchema = z97.object({
6914
- userId: z97.string()
6770
+ var ResetNotificationRequestSchema = z96.object({
6771
+ userId: z96.string()
6915
6772
  });
6916
6773
 
6917
6774
  // src/notification/index.ts
@@ -6925,14 +6782,14 @@ var userNotificationContract = initContract37().router(
6925
6782
  200: DefaultSuccessResponseSchema.extend({
6926
6783
  data: GetNotificationsResponseSchema
6927
6784
  }),
6928
- 400: z98.object({
6929
- message: z98.string()
6785
+ 400: z97.object({
6786
+ message: z97.string()
6930
6787
  }),
6931
- 409: z98.object({
6932
- message: z98.string()
6788
+ 409: z97.object({
6789
+ message: z97.string()
6933
6790
  }),
6934
- 500: z98.object({
6935
- message: z98.string()
6791
+ 500: z97.object({
6792
+ message: z97.string()
6936
6793
  }),
6937
6794
  401: DefaultUnauthorizedSchema,
6938
6795
  404: DefaultNotFoundSchema,
@@ -6945,16 +6802,16 @@ var userNotificationContract = initContract37().router(
6945
6802
  path: "/new_notifications_count",
6946
6803
  responses: {
6947
6804
  200: DefaultSuccessResponseSchema.extend({
6948
- total: z98.number()
6805
+ total: z97.number()
6949
6806
  }),
6950
- 400: z98.object({
6951
- message: z98.string()
6807
+ 400: z97.object({
6808
+ message: z97.string()
6952
6809
  }),
6953
- 409: z98.object({
6954
- message: z98.string()
6810
+ 409: z97.object({
6811
+ message: z97.string()
6955
6812
  }),
6956
- 500: z98.object({
6957
- message: z98.string()
6813
+ 500: z97.object({
6814
+ message: z97.string()
6958
6815
  }),
6959
6816
  401: DefaultUnauthorizedSchema,
6960
6817
  404: DefaultNotFoundSchema,
@@ -6969,14 +6826,14 @@ var userNotificationContract = initContract37().router(
6969
6826
  201: DefaultSuccessResponseSchema.extend({
6970
6827
  data: UserSchema
6971
6828
  }),
6972
- 400: z98.object({
6973
- message: z98.string()
6829
+ 400: z97.object({
6830
+ message: z97.string()
6974
6831
  }),
6975
- 409: z98.object({
6976
- message: z98.string()
6832
+ 409: z97.object({
6833
+ message: z97.string()
6977
6834
  }),
6978
- 500: z98.object({
6979
- message: z98.string()
6835
+ 500: z97.object({
6836
+ message: z97.string()
6980
6837
  }),
6981
6838
  401: DefaultUnauthorizedSchema,
6982
6839
  404: DefaultNotFoundSchema,
@@ -6988,19 +6845,19 @@ var userNotificationContract = initContract37().router(
6988
6845
  readNotification: {
6989
6846
  method: "POST",
6990
6847
  path: "/read/:id",
6991
- pathParams: z98.object({ id: z98.string() }),
6848
+ pathParams: z97.object({ id: z97.string() }),
6992
6849
  responses: {
6993
6850
  201: DefaultSuccessResponseSchema.extend({
6994
6851
  data: NotificationSchema
6995
6852
  }),
6996
- 400: z98.object({
6997
- message: z98.string()
6853
+ 400: z97.object({
6854
+ message: z97.string()
6998
6855
  }),
6999
- 409: z98.object({
7000
- message: z98.string()
6856
+ 409: z97.object({
6857
+ message: z97.string()
7001
6858
  }),
7002
- 500: z98.object({
7003
- message: z98.string()
6859
+ 500: z97.object({
6860
+ message: z97.string()
7004
6861
  }),
7005
6862
  401: DefaultUnauthorizedSchema,
7006
6863
  404: DefaultNotFoundSchema,
@@ -7019,35 +6876,35 @@ var userNotificationContract = initContract37().router(
7019
6876
  import { initContract as initContract38 } from "@ts-rest/core";
7020
6877
 
7021
6878
  // src/webchat/schema.ts
7022
- import z100 from "zod";
6879
+ import z99 from "zod";
7023
6880
 
7024
6881
  // src/webchat/validation.ts
7025
- import z99 from "zod";
6882
+ import z98 from "zod";
7026
6883
  var ChatwootChannelType2 = /* @__PURE__ */ ((ChatwootChannelType3) => {
7027
6884
  ChatwootChannelType3["WEB_WIDGET"] = "web_widget";
7028
6885
  return ChatwootChannelType3;
7029
6886
  })(ChatwootChannelType2 || {});
7030
- var WebChatChannelSchema = z99.object({
7031
- avatar: z99.string().optional(),
7032
- name: z99.string(),
7033
- type: z99.nativeEnum(ChatwootChannelType2),
7034
- websiteName: z99.string(),
7035
- welcomeTitle: z99.string(),
7036
- websiteUrl: z99.string().url(),
7037
- welcomeTagline: z99.string().optional(),
7038
- agentAwayMessage: z99.string().optional(),
7039
- widgetColor: z99.string().optional()
6887
+ var WebChatChannelSchema = z98.object({
6888
+ avatar: z98.string().optional(),
6889
+ name: z98.string(),
6890
+ type: z98.nativeEnum(ChatwootChannelType2),
6891
+ websiteName: z98.string(),
6892
+ welcomeTitle: z98.string(),
6893
+ websiteUrl: z98.string().url(),
6894
+ welcomeTagline: z98.string().optional(),
6895
+ agentAwayMessage: z98.string().optional(),
6896
+ widgetColor: z98.string().optional()
7040
6897
  });
7041
6898
 
7042
6899
  // src/webchat/schema.ts
7043
- var ConnectWebChatChannelSchema = z100.object({
7044
- name: z100.string(),
7045
- actor: z100.object({
7046
- id: z100.string().uuid(),
7047
- name: z100.string(),
7048
- email: z100.string().email(),
7049
- address: z100.string().nullable(),
7050
- phone: z100.string().nullable()
6900
+ var ConnectWebChatChannelSchema = z99.object({
6901
+ name: z99.string(),
6902
+ actor: z99.object({
6903
+ id: z99.string().uuid(),
6904
+ name: z99.string(),
6905
+ email: z99.string().email(),
6906
+ address: z99.string().nullable(),
6907
+ phone: z99.string().nullable()
7051
6908
  }),
7052
6909
  channel: WebChatChannelSchema
7053
6910
  });
@@ -7081,63 +6938,63 @@ var webchatContract = initContract38().router({
7081
6938
 
7082
6939
  // src/snippet/index.ts
7083
6940
  import { initContract as initContract39 } from "@ts-rest/core";
7084
- import { z as z103 } from "zod";
6941
+ import { z as z102 } from "zod";
7085
6942
 
7086
6943
  // src/snippet/schema.ts
7087
- import z101 from "zod";
6944
+ import z100 from "zod";
7088
6945
  var SnippetGroupSchema = DefaultEntitySchema.extend({
7089
- name: z101.string(),
7090
- platformType: z101.string()
6946
+ name: z100.string(),
6947
+ platformType: z100.string()
7091
6948
  });
7092
6949
  var SnippetContentSchema = DefaultEntitySchema.extend({
7093
- contentType: z101.string(),
7094
- contentValue: z101.string().nullable(),
7095
- contentTemplate: z101.any().nullable(),
7096
- order: z101.number(),
6950
+ contentType: z100.string(),
6951
+ contentValue: z100.string().nullable(),
6952
+ contentTemplate: z100.any().nullable(),
6953
+ order: z100.number(),
7097
6954
  upload: UploadSchema.optional().nullable()
7098
6955
  });
7099
6956
  var SnippetSchema = DefaultEntitySchema.extend({
7100
- name: z101.string(),
6957
+ name: z100.string(),
7101
6958
  snippetGroup: SnippetGroupSchema,
7102
6959
  snippetContent: SnippetContentSchema
7103
6960
  });
7104
- var SnippetGroupListItemSchema = z101.object({
7105
- id: z101.string().uuid(),
7106
- name: z101.string()
6961
+ var SnippetGroupListItemSchema = z100.object({
6962
+ id: z100.string().uuid(),
6963
+ name: z100.string()
7107
6964
  });
7108
- var SnippetListItemSchema = z101.object({
7109
- id: z101.string().uuid(),
7110
- shortCutName: z101.string(),
7111
- contentType: z101.string(),
7112
- contentValue: z101.string().nullable(),
7113
- snippetGroupId: z101.string()
6965
+ var SnippetListItemSchema = z100.object({
6966
+ id: z100.string().uuid(),
6967
+ shortCutName: z100.string(),
6968
+ contentType: z100.string(),
6969
+ contentValue: z100.string().nullable(),
6970
+ snippetGroupId: z100.string()
7114
6971
  });
7115
6972
 
7116
6973
  // src/snippet/validation.ts
7117
- import { z as z102 } from "zod";
7118
- var CreateSnippetGroupSchema = z102.object({
7119
- name: z102.string(),
7120
- platformType: z102.string()
6974
+ import { z as z101 } from "zod";
6975
+ var CreateSnippetGroupSchema = z101.object({
6976
+ name: z101.string(),
6977
+ platformType: z101.string()
7121
6978
  });
7122
- var UpdateSnippetGroupSchema = z102.object({
7123
- name: z102.string().optional(),
7124
- platformType: z102.string().optional()
6979
+ var UpdateSnippetGroupSchema = z101.object({
6980
+ name: z101.string().optional(),
6981
+ platformType: z101.string().optional()
7125
6982
  });
7126
- var DeleteSnippetGroupSchema = z102.object({
7127
- id: z102.string()
6983
+ var DeleteSnippetGroupSchema = z101.object({
6984
+ id: z101.string()
7128
6985
  });
7129
- var CreateSnippetSchema = z102.object({
7130
- shortcutName: z102.string(),
7131
- contentType: z102.string(),
7132
- contentValue: z102.string().optional(),
7133
- snippetGroupId: z102.string(),
7134
- platformType: z102.string()
6986
+ var CreateSnippetSchema = z101.object({
6987
+ shortcutName: z101.string(),
6988
+ contentType: z101.string(),
6989
+ contentValue: z101.string().optional(),
6990
+ snippetGroupId: z101.string(),
6991
+ platformType: z101.string()
7135
6992
  });
7136
6993
  var UpdateSnippetSchema = CreateSnippetSchema.extend({
7137
- snippetContentId: z102.string()
6994
+ snippetContentId: z101.string()
7138
6995
  });
7139
- var DeleteSnippetSchema = z102.object({
7140
- snippetId: z102.string()
6996
+ var DeleteSnippetSchema = z101.object({
6997
+ snippetId: z101.string()
7141
6998
  });
7142
6999
 
7143
7000
  // src/snippet/index.ts
@@ -7160,7 +7017,7 @@ var snippetContract = initContract39().router(
7160
7017
  query: null,
7161
7018
  responses: {
7162
7019
  200: DefaultSuccessResponseSchema.extend({
7163
- snippetgroups: z103.array(SnippetGroupSchema)
7020
+ snippetgroups: z102.array(SnippetGroupSchema)
7164
7021
  }),
7165
7022
  500: DefaultErrorResponseSchema
7166
7023
  }
@@ -7168,7 +7025,7 @@ var snippetContract = initContract39().router(
7168
7025
  updateSnippetGroup: {
7169
7026
  method: "PATCH",
7170
7027
  path: "/groups/:id",
7171
- pathParams: z103.object({ id: z103.string() }),
7028
+ pathParams: z102.object({ id: z102.string() }),
7172
7029
  body: UpdateSnippetGroupSchema,
7173
7030
  responses: {
7174
7031
  200: DefaultSuccessResponseSchema.extend({
@@ -7180,7 +7037,7 @@ var snippetContract = initContract39().router(
7180
7037
  deleteSnippetGroup: {
7181
7038
  method: "DELETE",
7182
7039
  path: "/groups/:id",
7183
- pathParams: z103.object({ id: z103.string() }),
7040
+ pathParams: z102.object({ id: z102.string() }),
7184
7041
  body: null,
7185
7042
  responses: {
7186
7043
  200: DefaultSuccessResponseSchema,
@@ -7192,7 +7049,7 @@ var snippetContract = initContract39().router(
7192
7049
  path: "",
7193
7050
  responses: {
7194
7051
  200: DefaultSuccessResponseSchema.extend({
7195
- snippets: z103.array(SnippetSchema)
7052
+ snippets: z102.array(SnippetSchema)
7196
7053
  }),
7197
7054
  500: DefaultErrorResponseSchema
7198
7055
  }
@@ -7211,7 +7068,7 @@ var snippetContract = initContract39().router(
7211
7068
  updateSnippet: {
7212
7069
  method: "PATCH",
7213
7070
  path: "/:id",
7214
- pathParams: z103.object({ id: z103.string() }),
7071
+ pathParams: z102.object({ id: z102.string() }),
7215
7072
  body: UpdateSnippetSchema,
7216
7073
  responses: {
7217
7074
  200: DefaultSuccessResponseSchema.extend({
@@ -7223,7 +7080,7 @@ var snippetContract = initContract39().router(
7223
7080
  deleteSnippet: {
7224
7081
  method: "DELETE",
7225
7082
  path: "/:id",
7226
- pathParams: z103.object({ id: z103.string() }),
7083
+ pathParams: z102.object({ id: z102.string() }),
7227
7084
  body: null,
7228
7085
  responses: {
7229
7086
  200: DefaultSuccessResponseSchema,
@@ -7240,78 +7097,78 @@ var snippetContract = initContract39().router(
7240
7097
  import { initContract as initContract40 } from "@ts-rest/core";
7241
7098
 
7242
7099
  // src/business-calendar/validation.ts
7243
- import z104 from "zod";
7244
- var TimeSlotDataSchema = z104.any();
7245
- var CreateBusinessHourSchema = z104.object({
7246
- day: z104.string(),
7247
- isEnabled: z104.boolean(),
7100
+ import z103 from "zod";
7101
+ var TimeSlotDataSchema = z103.any();
7102
+ var CreateBusinessHourSchema = z103.object({
7103
+ day: z103.string(),
7104
+ isEnabled: z103.boolean(),
7248
7105
  timeSlots: TimeSlotDataSchema
7249
7106
  }).array();
7250
- var UpdateBusinessHourSchema = z104.object({
7251
- id: z104.string(),
7252
- day: z104.string(),
7253
- isEnabled: z104.boolean(),
7107
+ var UpdateBusinessHourSchema = z103.object({
7108
+ id: z103.string(),
7109
+ day: z103.string(),
7110
+ isEnabled: z103.boolean(),
7254
7111
  timeSlots: TimeSlotDataSchema
7255
7112
  }).array();
7256
- var CreateHolidaySchema = z104.object({
7257
- name: z104.string(),
7258
- date: z104.string(),
7259
- isEnabled: z104.boolean()
7113
+ var CreateHolidaySchema = z103.object({
7114
+ name: z103.string(),
7115
+ date: z103.string(),
7116
+ isEnabled: z103.boolean()
7260
7117
  }).array();
7261
- var UpdateHolidaySchema = z104.object({
7262
- id: z104.string().optional(),
7263
- name: z104.string(),
7264
- date: z104.string(),
7265
- isEnabled: z104.boolean()
7118
+ var UpdateHolidaySchema = z103.object({
7119
+ id: z103.string().optional(),
7120
+ name: z103.string(),
7121
+ date: z103.string(),
7122
+ isEnabled: z103.boolean()
7266
7123
  }).array();
7267
- var CreateBusinessCalendarSchema = z104.object({
7268
- name: z104.string(),
7269
- description: z104.string().optional(),
7270
- timeZone: z104.string(),
7271
- isEnabled: z104.boolean(),
7272
- channelIds: z104.string().array(),
7124
+ var CreateBusinessCalendarSchema = z103.object({
7125
+ name: z103.string(),
7126
+ description: z103.string().optional(),
7127
+ timeZone: z103.string(),
7128
+ isEnabled: z103.boolean(),
7129
+ channelIds: z103.string().array(),
7273
7130
  businessHours: CreateBusinessHourSchema,
7274
7131
  holidays: CreateHolidaySchema
7275
7132
  });
7276
- var UpdateBusinessCalendarSchema = z104.object({
7277
- id: z104.string(),
7278
- name: z104.string(),
7279
- description: z104.string().optional(),
7280
- timeZone: z104.string(),
7281
- isEnabled: z104.boolean(),
7282
- channelIds: z104.string().array(),
7133
+ var UpdateBusinessCalendarSchema = z103.object({
7134
+ id: z103.string(),
7135
+ name: z103.string(),
7136
+ description: z103.string().optional(),
7137
+ timeZone: z103.string(),
7138
+ isEnabled: z103.boolean(),
7139
+ channelIds: z103.string().array(),
7283
7140
  businessHours: UpdateBusinessHourSchema,
7284
7141
  holidays: UpdateHolidaySchema
7285
7142
  });
7286
- var DeleteBusinessCalendarSchema = z104.object({
7287
- id: z104.string()
7143
+ var DeleteBusinessCalendarSchema = z103.object({
7144
+ id: z103.string()
7288
7145
  });
7289
7146
 
7290
7147
  // src/business-calendar/schema.ts
7291
- import z105 from "zod";
7292
- var TimeSlotDataSchema2 = z105.any();
7148
+ import z104 from "zod";
7149
+ var TimeSlotDataSchema2 = z104.any();
7293
7150
  var BusinessHourSchema = DefaultEntitySchema.extend({
7294
- day: z105.string(),
7295
- isEnabled: z105.boolean(),
7151
+ day: z104.string(),
7152
+ isEnabled: z104.boolean(),
7296
7153
  timeSlots: TimeSlotDataSchema2
7297
7154
  });
7298
7155
  var HolidaySchema = DefaultEntitySchema.extend({
7299
- name: z105.string(),
7300
- date: z105.string(),
7301
- isEnabled: z105.boolean()
7156
+ name: z104.string(),
7157
+ date: z104.string(),
7158
+ isEnabled: z104.boolean()
7302
7159
  });
7303
7160
  var BusinessCalendarSchema = DefaultEntitySchema.extend({
7304
- name: z105.string(),
7305
- description: z105.string().optional(),
7306
- timeZone: z105.string(),
7307
- isEnabled: z105.boolean(),
7308
- channelIds: z105.string().array(),
7161
+ name: z104.string(),
7162
+ description: z104.string().optional(),
7163
+ timeZone: z104.string(),
7164
+ isEnabled: z104.boolean(),
7165
+ channelIds: z104.string().array(),
7309
7166
  businessHours: BusinessHourSchema.array(),
7310
7167
  holidays: HolidaySchema.array()
7311
7168
  });
7312
7169
 
7313
7170
  // src/business-calendar/index.ts
7314
- import z106 from "zod";
7171
+ import z105 from "zod";
7315
7172
  var businessCalendarContract = initContract40().router({
7316
7173
  createBusinessCalendar: {
7317
7174
  method: "POST",
@@ -7337,7 +7194,7 @@ var businessCalendarContract = initContract40().router({
7337
7194
  updateBusinessCalendar: {
7338
7195
  method: "POST",
7339
7196
  path: "business-calendars/:id",
7340
- pathParams: z106.object({ id: z106.string() }),
7197
+ pathParams: z105.object({ id: z105.string() }),
7341
7198
  body: UpdateBusinessCalendarSchema,
7342
7199
  responses: {
7343
7200
  201: DefaultSuccessResponseSchema.extend({
@@ -7349,7 +7206,7 @@ var businessCalendarContract = initContract40().router({
7349
7206
  deleteBusinessCalendar: {
7350
7207
  method: "DELETE",
7351
7208
  path: "business-calendars/:id",
7352
- pathParams: z106.object({ id: z106.string() }),
7209
+ pathParams: z105.object({ id: z105.string() }),
7353
7210
  body: null,
7354
7211
  responses: {
7355
7212
  200: DefaultSuccessResponseSchema,
@@ -7360,168 +7217,168 @@ var businessCalendarContract = initContract40().router({
7360
7217
 
7361
7218
  // src/public-api/index.ts
7362
7219
  import { initContract as initContract41 } from "@ts-rest/core";
7363
- import z109 from "zod";
7220
+ import z108 from "zod";
7364
7221
 
7365
7222
  // src/public-api/validation.ts
7366
- import z108 from "zod";
7223
+ import z107 from "zod";
7367
7224
 
7368
7225
  // src/public-api/schema.ts
7369
- import z107 from "zod";
7370
- var ContactPhonesSchema2 = z107.object({
7371
- id: z107.string().uuid(),
7372
- createdAt: z107.date(),
7373
- updatedAt: z107.date(),
7374
- deletedAt: z107.date().nullable(),
7375
- phone: z107.string(),
7376
- isPrimary: z107.boolean()
7377
- });
7378
- var ContactEmailsSchema2 = z107.object({
7379
- id: z107.string().uuid(),
7380
- createdAt: z107.date(),
7381
- updatedAt: z107.date(),
7382
- deletedAt: z107.date().nullable(),
7383
- email: z107.string(),
7384
- isPrimary: z107.boolean()
7385
- });
7386
- var ContactCustomFieldSchema2 = z107.object({
7387
- id: z107.string().uuid(),
7388
- createdAt: z107.date(),
7389
- updatedAt: z107.date(),
7390
- deletedAt: z107.date().nullable(),
7391
- textValue: z107.string().nullable(),
7392
- booleanValue: z107.boolean().nullable(),
7393
- numberValue: z107.number().nullable(),
7394
- dateValue: z107.date().nullable(),
7226
+ import z106 from "zod";
7227
+ var ContactPhonesSchema2 = z106.object({
7228
+ id: z106.string().uuid(),
7229
+ createdAt: z106.date(),
7230
+ updatedAt: z106.date(),
7231
+ deletedAt: z106.date().nullable(),
7232
+ phone: z106.string(),
7233
+ isPrimary: z106.boolean()
7234
+ });
7235
+ var ContactEmailsSchema2 = z106.object({
7236
+ id: z106.string().uuid(),
7237
+ createdAt: z106.date(),
7238
+ updatedAt: z106.date(),
7239
+ deletedAt: z106.date().nullable(),
7240
+ email: z106.string(),
7241
+ isPrimary: z106.boolean()
7242
+ });
7243
+ var ContactCustomFieldSchema2 = z106.object({
7244
+ id: z106.string().uuid(),
7245
+ createdAt: z106.date(),
7246
+ updatedAt: z106.date(),
7247
+ deletedAt: z106.date().nullable(),
7248
+ textValue: z106.string().nullable(),
7249
+ booleanValue: z106.boolean().nullable(),
7250
+ numberValue: z106.number().nullable(),
7251
+ dateValue: z106.date().nullable(),
7395
7252
  attribute: AttributeSchema.omit({ options: true, group: true }),
7396
- uploads: z107.array(UploadSchema)
7397
- });
7398
- var ContactEntityTypesSchema2 = z107.object({
7399
- id: z107.string().uuid(),
7400
- createdAt: z107.date(),
7401
- updatedAt: z107.date(),
7402
- deletedAt: z107.date().nullable(),
7403
- entity: z107.string(),
7404
- description: z107.string().nullable()
7405
- });
7406
- var ContactActivitySchema2 = z107.object({
7407
- id: z107.string().uuid(),
7408
- createdAt: z107.date(),
7409
- updatedAt: z107.date(),
7410
- deletedAt: z107.date().nullable(),
7411
- entityId: z107.string(),
7412
- description: z107.string(),
7253
+ uploads: z106.array(UploadSchema)
7254
+ });
7255
+ var ContactEntityTypesSchema2 = z106.object({
7256
+ id: z106.string().uuid(),
7257
+ createdAt: z106.date(),
7258
+ updatedAt: z106.date(),
7259
+ deletedAt: z106.date().nullable(),
7260
+ entity: z106.string(),
7261
+ description: z106.string().nullable()
7262
+ });
7263
+ var ContactActivitySchema2 = z106.object({
7264
+ id: z106.string().uuid(),
7265
+ createdAt: z106.date(),
7266
+ updatedAt: z106.date(),
7267
+ deletedAt: z106.date().nullable(),
7268
+ entityId: z106.string(),
7269
+ description: z106.string(),
7413
7270
  entityType: ContactEntityTypesSchema2
7414
7271
  });
7415
- var ContactSchema3 = z107.object({
7416
- id: z107.string().uuid(),
7417
- createdAt: z107.date(),
7418
- updatedAt: z107.date(),
7419
- deletedAt: z107.date().nullable(),
7420
- name: z107.string(),
7421
- address: z107.string().nullable(),
7422
- channel: z107.string().nullable(),
7423
- notes: z107.string().nullable(),
7424
- contactProfile: z107.string().nullable(),
7425
- socialProfileUrl: z107.string().nullable(),
7426
- tags: z107.array(TagSchema),
7272
+ var ContactSchema3 = z106.object({
7273
+ id: z106.string().uuid(),
7274
+ createdAt: z106.date(),
7275
+ updatedAt: z106.date(),
7276
+ deletedAt: z106.date().nullable(),
7277
+ name: z106.string(),
7278
+ address: z106.string().nullable(),
7279
+ channel: z106.string().nullable(),
7280
+ notes: z106.string().nullable(),
7281
+ contactProfile: z106.string().nullable(),
7282
+ socialProfileUrl: z106.string().nullable(),
7283
+ tags: z106.array(TagSchema),
7427
7284
  company: CompanySchema.omit({ customFields: true }).nullable(),
7428
- customFields: z107.array(ContactCustomFieldSchema2),
7429
- contactEmails: z107.array(ContactEmailsSchema2),
7430
- contactPhones: z107.array(ContactPhonesSchema2),
7431
- activityLogs: z107.array(ContactActivitySchema2).optional()
7285
+ customFields: z106.array(ContactCustomFieldSchema2),
7286
+ contactEmails: z106.array(ContactEmailsSchema2),
7287
+ contactPhones: z106.array(ContactPhonesSchema2),
7288
+ activityLogs: z106.array(ContactActivitySchema2).optional()
7432
7289
  });
7433
7290
 
7434
7291
  // src/public-api/validation.ts
7435
7292
  var ContactContractValidationSchema2 = {
7436
7293
  create: {
7437
- request: z108.object({
7438
- name: z108.string(),
7439
- email: z108.array(
7440
- z108.object({
7441
- email: z108.string().email(),
7442
- isPrimary: z108.boolean()
7294
+ request: z107.object({
7295
+ name: z107.string(),
7296
+ email: z107.array(
7297
+ z107.object({
7298
+ email: z107.string().email(),
7299
+ isPrimary: z107.boolean()
7443
7300
  })
7444
7301
  ).optional(),
7445
- channel: z108.string().optional(),
7446
- address: z108.string().optional(),
7447
- phone: z108.array(
7448
- z108.object({
7449
- phone: z108.string(),
7450
- isPrimary: z108.boolean()
7302
+ channel: z107.string().optional(),
7303
+ address: z107.string().optional(),
7304
+ phone: z107.array(
7305
+ z107.object({
7306
+ phone: z107.string(),
7307
+ isPrimary: z107.boolean()
7451
7308
  })
7452
7309
  ).optional(),
7453
- notes: z108.string().optional(),
7454
- tags: z108.array(z108.string()).optional(),
7455
- company: z108.string().optional(),
7456
- customFields: z108.record(z108.string())
7310
+ notes: z107.string().optional(),
7311
+ tags: z107.array(z107.string()).optional(),
7312
+ company: z107.string().optional(),
7313
+ customFields: z107.record(z107.string())
7457
7314
  // Dynamic keys with string values
7458
7315
  }),
7459
7316
  response: ContactSchema3
7460
7317
  },
7461
7318
  getById: {
7462
- request: z108.object({
7463
- id: z108.string().uuid()
7319
+ request: z107.object({
7320
+ id: z107.string().uuid()
7464
7321
  })
7465
7322
  },
7466
7323
  delete: {
7467
- request: z108.object({
7468
- id: z108.string().uuid()
7324
+ request: z107.object({
7325
+ id: z107.string().uuid()
7469
7326
  })
7470
7327
  },
7471
7328
  getAll: {
7472
- request: z108.object({
7473
- page: z108.coerce.number().default(1),
7474
- pageSize: z108.coerce.number().default(10),
7475
- keyword: z108.string().optional(),
7476
- company: z108.array(z108.string().uuid()),
7477
- name: z108.string(),
7478
- address: z108.string(),
7479
- channel: z108.array(z108.string()),
7480
- selectedDate: z108.string(),
7481
- customFields: z108.array(
7482
- z108.object({
7483
- attributeId: z108.string().uuid(),
7484
- type: z108.string(),
7485
- value: z108.union([z108.string(), z108.array(z108.string())])
7329
+ request: z107.object({
7330
+ page: z107.coerce.number().default(1),
7331
+ pageSize: z107.coerce.number().default(10),
7332
+ keyword: z107.string().optional(),
7333
+ company: z107.array(z107.string().uuid()),
7334
+ name: z107.string(),
7335
+ address: z107.string(),
7336
+ channel: z107.array(z107.string()),
7337
+ selectedDate: z107.string(),
7338
+ customFields: z107.array(
7339
+ z107.object({
7340
+ attributeId: z107.string().uuid(),
7341
+ type: z107.string(),
7342
+ value: z107.union([z107.string(), z107.array(z107.string())])
7486
7343
  })
7487
7344
  ),
7488
- tags: z108.array(z108.string().uuid()),
7489
- phone: z108.string(),
7490
- email: z108.string(),
7491
- notes: z108.string()
7345
+ tags: z107.array(z107.string().uuid()),
7346
+ phone: z107.string(),
7347
+ email: z107.string(),
7348
+ notes: z107.string()
7492
7349
  }).partial(),
7493
7350
  response: {
7494
- page: z108.number(),
7495
- pageSize: z108.number(),
7496
- total: z108.number(),
7497
- lastPage: z108.number(),
7498
- data: z108.array(ContactSchema3)
7351
+ page: z107.number(),
7352
+ pageSize: z107.number(),
7353
+ total: z107.number(),
7354
+ lastPage: z107.number(),
7355
+ data: z107.array(ContactSchema3)
7499
7356
  }
7500
7357
  },
7501
7358
  getContactFields: {
7502
- request: z108.object({
7503
- page: z108.coerce.number().default(1),
7504
- pageSize: z108.coerce.number().default(10)
7359
+ request: z107.object({
7360
+ page: z107.coerce.number().default(1),
7361
+ pageSize: z107.coerce.number().default(10)
7505
7362
  }).partial(),
7506
7363
  response: {
7507
- page: z108.number(),
7508
- pageSize: z108.number(),
7509
- total: z108.number(),
7510
- lastPage: z108.number(),
7511
- data: z108.array(ContactCustomFieldSchema2)
7364
+ page: z107.number(),
7365
+ pageSize: z107.number(),
7366
+ total: z107.number(),
7367
+ lastPage: z107.number(),
7368
+ data: z107.array(ContactCustomFieldSchema2)
7512
7369
  }
7513
7370
  },
7514
7371
  addAttachments: {
7515
- request: z108.object({
7516
- contactId: z108.string(),
7517
- attributeId: z108.string().uuid(),
7518
- contactAttachmentRecords: z108.array(
7519
- z108.object({
7520
- bucketName: z108.string(),
7521
- fileKey: z108.string(),
7522
- fileName: z108.string(),
7523
- fileSize: z108.coerce.number(),
7524
- url: z108.string()
7372
+ request: z107.object({
7373
+ contactId: z107.string(),
7374
+ attributeId: z107.string().uuid(),
7375
+ contactAttachmentRecords: z107.array(
7376
+ z107.object({
7377
+ bucketName: z107.string(),
7378
+ fileKey: z107.string(),
7379
+ fileName: z107.string(),
7380
+ fileSize: z107.coerce.number(),
7381
+ url: z107.string()
7525
7382
  })
7526
7383
  )
7527
7384
  }),
@@ -7540,11 +7397,11 @@ var publicApiContract = initContract41().router(
7540
7397
  201: DefaultSuccessResponseSchema.extend({
7541
7398
  data: ContactSchema3
7542
7399
  }),
7543
- 400: z109.object({
7544
- message: z109.string()
7400
+ 400: z108.object({
7401
+ message: z108.string()
7545
7402
  }),
7546
- 409: z109.object({
7547
- message: z109.string()
7403
+ 409: z108.object({
7404
+ message: z108.string()
7548
7405
  }),
7549
7406
  401: DefaultUnauthorizedSchema,
7550
7407
  404: DefaultNotFoundSchema,
@@ -7559,13 +7416,13 @@ var publicApiContract = initContract41().router(
7559
7416
  query: GetTagsSchema,
7560
7417
  responses: {
7561
7418
  200: DefaultSuccessResponseSchema.extend({
7562
- tags: z109.array(TagSchema)
7419
+ tags: z108.array(TagSchema)
7563
7420
  }),
7564
- 400: z109.object({
7565
- message: z109.string()
7421
+ 400: z108.object({
7422
+ message: z108.string()
7566
7423
  }),
7567
- 409: z109.object({
7568
- message: z109.string()
7424
+ 409: z108.object({
7425
+ message: z108.string()
7569
7426
  }),
7570
7427
  401: DefaultUnauthorizedSchema,
7571
7428
  404: DefaultNotFoundSchema,
@@ -7581,11 +7438,11 @@ var publicApiContract = initContract41().router(
7581
7438
  200: DefaultSuccessResponseSchema.extend(
7582
7439
  ContactContractValidationSchema2.getAll.response
7583
7440
  ),
7584
- 400: z109.object({
7585
- message: z109.string()
7441
+ 400: z108.object({
7442
+ message: z108.string()
7586
7443
  }),
7587
- 409: z109.object({
7588
- message: z109.string()
7444
+ 409: z108.object({
7445
+ message: z108.string()
7589
7446
  }),
7590
7447
  401: DefaultUnauthorizedSchema,
7591
7448
  404: DefaultNotFoundSchema,
@@ -7602,11 +7459,11 @@ var publicApiContract = initContract41().router(
7602
7459
  200: DefaultSuccessResponseSchema.extend(
7603
7460
  ContactContractValidationSchema2.getContactFields.response
7604
7461
  ),
7605
- 400: z109.object({
7606
- message: z109.string()
7462
+ 400: z108.object({
7463
+ message: z108.string()
7607
7464
  }),
7608
- 409: z109.object({
7609
- message: z109.string()
7465
+ 409: z108.object({
7466
+ message: z108.string()
7610
7467
  }),
7611
7468
  401: DefaultUnauthorizedSchema,
7612
7469
  404: DefaultNotFoundSchema,
@@ -7620,17 +7477,17 @@ var publicApiContract = initContract41().router(
7620
7477
  path: "/contacts/:id",
7621
7478
  pathParams: ContactContractValidationSchema2.getById.request,
7622
7479
  responses: {
7623
- 200: z109.object({
7624
- status: z109.string(),
7625
- message: z109.string(),
7480
+ 200: z108.object({
7481
+ status: z108.string(),
7482
+ message: z108.string(),
7626
7483
  data: ContactSchema3,
7627
- requestId: z109.string()
7484
+ requestId: z108.string()
7628
7485
  }),
7629
- 400: z109.object({
7630
- message: z109.string()
7486
+ 400: z108.object({
7487
+ message: z108.string()
7631
7488
  }),
7632
- 409: z109.object({
7633
- message: z109.string()
7489
+ 409: z108.object({
7490
+ message: z108.string()
7634
7491
  }),
7635
7492
  401: DefaultUnauthorizedSchema,
7636
7493
  404: DefaultNotFoundSchema,
@@ -7648,11 +7505,11 @@ var publicApiContract = initContract41().router(
7648
7505
  201: DefaultSuccessResponseSchema.extend({
7649
7506
  message: ContactCustomFieldSchema2
7650
7507
  }),
7651
- 400: z109.object({
7652
- message: z109.string()
7508
+ 400: z108.object({
7509
+ message: z108.string()
7653
7510
  }),
7654
- 409: z109.object({
7655
- message: z109.string()
7511
+ 409: z108.object({
7512
+ message: z108.string()
7656
7513
  }),
7657
7514
  401: DefaultUnauthorizedSchema,
7658
7515
  404: DefaultNotFoundSchema,
@@ -7666,17 +7523,17 @@ var publicApiContract = initContract41().router(
7666
7523
  path: "/contacts/:id",
7667
7524
  pathParams: ContactContractValidationSchema2.getById.request,
7668
7525
  responses: {
7669
- 200: z109.object({
7670
- status: z109.string(),
7671
- message: z109.string(),
7526
+ 200: z108.object({
7527
+ status: z108.string(),
7528
+ message: z108.string(),
7672
7529
  data: ContactSchema3,
7673
- requestId: z109.string()
7530
+ requestId: z108.string()
7674
7531
  }),
7675
- 400: z109.object({
7676
- message: z109.string()
7532
+ 400: z108.object({
7533
+ message: z108.string()
7677
7534
  }),
7678
- 409: z109.object({
7679
- message: z109.string()
7535
+ 409: z108.object({
7536
+ message: z108.string()
7680
7537
  }),
7681
7538
  401: DefaultUnauthorizedSchema,
7682
7539
  404: DefaultNotFoundSchema,
@@ -7690,17 +7547,17 @@ var publicApiContract = initContract41().router(
7690
7547
  path: "/contacts/:id",
7691
7548
  pathParams: ContactContractValidationSchema2.delete.request,
7692
7549
  responses: {
7693
- 200: z109.object({
7694
- status: z109.string(),
7695
- message: z109.string(),
7550
+ 200: z108.object({
7551
+ status: z108.string(),
7552
+ message: z108.string(),
7696
7553
  data: ContactSchema3,
7697
- requestId: z109.string()
7554
+ requestId: z108.string()
7698
7555
  }),
7699
- 400: z109.object({
7700
- message: z109.string()
7556
+ 400: z108.object({
7557
+ message: z108.string()
7701
7558
  }),
7702
- 409: z109.object({
7703
- message: z109.string()
7559
+ 409: z108.object({
7560
+ message: z108.string()
7704
7561
  }),
7705
7562
  401: DefaultUnauthorizedSchema,
7706
7563
  404: DefaultNotFoundSchema,