@kl1/contracts 1.4.60 → 1.4.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist/api-contracts/src/botpress/index.d.ts +17 -20
  2. package/dist/api-contracts/src/botpress/index.d.ts.map +1 -1
  3. package/dist/api-contracts/src/botpress/validation.d.ts +17 -20
  4. package/dist/api-contracts/src/botpress/validation.d.ts.map +1 -1
  5. package/dist/api-contracts/src/channel/index.d.ts +4 -913
  6. package/dist/api-contracts/src/channel/index.d.ts.map +1 -1
  7. package/dist/api-contracts/src/channel/validation.d.ts +0 -64
  8. package/dist/api-contracts/src/channel/validation.d.ts.map +1 -1
  9. package/dist/api-contracts/src/chat/index.d.ts +3 -190
  10. package/dist/api-contracts/src/chat/index.d.ts.map +1 -1
  11. package/dist/api-contracts/src/chat/schema.d.ts.map +1 -1
  12. package/dist/api-contracts/src/chat/validation.d.ts +0 -105
  13. package/dist/api-contracts/src/chat/validation.d.ts.map +1 -1
  14. package/dist/api-contracts/src/company/index.d.ts +0 -80
  15. package/dist/api-contracts/src/company/index.d.ts.map +1 -1
  16. package/dist/api-contracts/src/company/validation.d.ts +0 -40
  17. package/dist/api-contracts/src/company/validation.d.ts.map +1 -1
  18. package/dist/api-contracts/src/contract.d.ts +901 -3756
  19. package/dist/api-contracts/src/contract.d.ts.map +1 -1
  20. package/dist/api-contracts/src/facebook-feed/index.d.ts +0 -5
  21. package/dist/api-contracts/src/facebook-feed/index.d.ts.map +1 -1
  22. package/dist/api-contracts/src/hold-label/index.d.ts +2 -2
  23. package/dist/api-contracts/src/hold-label/validation.d.ts +2 -2
  24. package/dist/api-contracts/src/index.d.ts +0 -1
  25. package/dist/api-contracts/src/index.d.ts.map +1 -1
  26. package/dist/api-contracts/src/instagram/index.d.ts +0 -5
  27. package/dist/api-contracts/src/instagram/index.d.ts.map +1 -1
  28. package/dist/api-contracts/src/klink-chat/index.d.ts +3 -1282
  29. package/dist/api-contracts/src/klink-chat/index.d.ts.map +1 -1
  30. package/dist/api-contracts/src/klink-chat/schema.d.ts +8 -8
  31. package/dist/api-contracts/src/klink-chat/validation.d.ts +3 -3
  32. package/dist/api-contracts/src/line/index.d.ts +0 -5
  33. package/dist/api-contracts/src/line/index.d.ts.map +1 -1
  34. package/dist/api-contracts/src/messenger/index.d.ts +0 -5
  35. package/dist/api-contracts/src/messenger/index.d.ts.map +1 -1
  36. package/dist/api-contracts/src/sms/index.d.ts +0 -5
  37. package/dist/api-contracts/src/sms/index.d.ts.map +1 -1
  38. package/dist/api-contracts/src/subscription/index.d.ts +0 -438
  39. package/dist/api-contracts/src/subscription/index.d.ts.map +1 -1
  40. package/dist/api-contracts/src/telegram/index.d.ts +0 -5
  41. package/dist/api-contracts/src/telegram/index.d.ts.map +1 -1
  42. package/dist/api-contracts/src/telephony-agent-presence-status/index.d.ts +430 -0
  43. package/dist/api-contracts/src/telephony-agent-presence-status/index.d.ts.map +1 -1
  44. package/dist/api-contracts/src/telephony-agent-presence-status/schema.d.ts +3 -0
  45. package/dist/api-contracts/src/telephony-agent-presence-status/schema.d.ts.map +1 -1
  46. package/dist/api-contracts/src/telephony-agent-presence-status/validation.d.ts +3 -0
  47. package/dist/api-contracts/src/telephony-agent-presence-status/validation.d.ts.map +1 -1
  48. package/dist/api-contracts/src/viber/index.d.ts +0 -5
  49. package/dist/api-contracts/src/viber/index.d.ts.map +1 -1
  50. package/dist/api-contracts/src/webchat/index.d.ts +0 -5
  51. package/dist/api-contracts/src/webchat/index.d.ts.map +1 -1
  52. package/dist/api-contracts/src/whatsapp/index.d.ts +4 -14
  53. package/dist/api-contracts/src/whatsapp/index.d.ts.map +1 -1
  54. package/dist/api-contracts/src/whatsapp/validation.d.ts +4 -12
  55. package/dist/api-contracts/src/whatsapp/validation.d.ts.map +1 -1
  56. package/dist/api-contracts/src/workflow-rule/index.d.ts +0 -60
  57. package/dist/api-contracts/src/workflow-rule/index.d.ts.map +1 -1
  58. package/dist/entities/src/enums/chat.d.ts +0 -2
  59. package/dist/entities/src/enums/chat.d.ts.map +1 -1
  60. package/dist/index.js +1063 -1209
  61. package/dist/index.js.map +1 -1
  62. package/dist/index.mjs +1063 -1208
  63. package/dist/index.mjs.map +1 -1
  64. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -96,7 +96,6 @@ var CreateBotSchema = z4.object({
96
96
  var SendBotpressMessageSchema = z4.object({
97
97
  message: z4.string().optional(),
98
98
  type: z4.string(),
99
- roomId: z4.string().uuid(),
100
99
  room: z4.object({
101
100
  botpressConversationMetadata: z4.object({
102
101
  id: z4.string()
@@ -107,7 +106,7 @@ var SendBotpressMessageSchema = z4.object({
107
106
  botpressBotId: string().uuid(),
108
107
  type: z4.string(),
109
108
  metadata: z4.object({
110
- accessToken: z4.string().optional().nullable()
109
+ accessToken: z4.string()
111
110
  })
112
111
  }),
113
112
  platformContact: z4.object({
@@ -124,7 +123,7 @@ var SendBotpressMessageSchema = z4.object({
124
123
  })
125
124
  ).nullable().optional()
126
125
  })
127
- }).optional()
126
+ })
128
127
  });
129
128
 
130
129
  // src/botpress/schema.ts
@@ -1240,9 +1239,8 @@ var GetRoomsSchema = z26.object({
1240
1239
  botpressBotId: z26.string().uuid().optional(),
1241
1240
  queueIds: z26.string().array().optional(),
1242
1241
  // for room multi select filter with queue
1243
- queueFilterIds: z26.string().array().optional(),
1242
+ queueFilterIds: z26.string().array().optional()
1244
1243
  // for room filter with queue
1245
- orderBy: z26.union([z26.literal("DESC"), z26.literal("ASC")]).optional().default("DESC")
1246
1244
  });
1247
1245
  var UpdateRoomTagsAndNotesSchema = z26.object({
1248
1246
  note: z26.string().optional(),
@@ -1284,7 +1282,6 @@ var SendMessageSchema = z26.object({
1284
1282
  z26.literal("account_update"),
1285
1283
  z26.literal("confirmed_event_update")
1286
1284
  ]).optional(),
1287
- whatsappTemplateName: z26.string().optional(),
1288
1285
  parentMessageId: z26.string().uuid().optional(),
1289
1286
  feedPostId: z26.string().uuid().optional(),
1290
1287
  platformId: z26.string().optional(),
@@ -1293,30 +1290,7 @@ var SendMessageSchema = z26.object({
1293
1290
  params: z26.object({
1294
1291
  actionType: FeedActionTypeSchema.optional(),
1295
1292
  mentions: z26.array(z26.string().uuid()).optional()
1296
- }).optional(),
1297
- messageOptions: z26.array(
1298
- z26.object({
1299
- label: z26.string(),
1300
- value: z26.string(),
1301
- button: z26.string().optional(),
1302
- imageUrl: z26.string().optional(),
1303
- postback: z26.string().optional()
1304
- })
1305
- ).optional(),
1306
- messageTemplate: z26.array(
1307
- z26.object({
1308
- title: z26.string(),
1309
- subtitle: z26.string(),
1310
- imageUrl: z26.string(),
1311
- actions: z26.array(
1312
- z26.object({
1313
- label: z26.string(),
1314
- value: z26.string(),
1315
- action: z26.string()
1316
- })
1317
- )
1318
- })
1319
- ).optional()
1293
+ }).optional()
1320
1294
  });
1321
1295
  var InitiateMessageSchema = z26.object({
1322
1296
  platformContactId: z26.string().uuid().optional().nullable(),
@@ -1460,7 +1434,6 @@ var SendMessageToPlatformSchema = z26.object({
1460
1434
  z26.literal("account_update"),
1461
1435
  z26.literal("confirmed_event_update")
1462
1436
  ]).optional(),
1463
- whatsappTemplateName: z26.string().optional(),
1464
1437
  telegramBusinessConnectionId: z26.string().nullable().optional(),
1465
1438
  isBotRoom: z26.boolean().nullable().default(false)
1466
1439
  }),
@@ -2142,7 +2115,7 @@ var categoryContract = initContract6().router(
2142
2115
 
2143
2116
  // src/channel/index.ts
2144
2117
  import { initContract as initContract7 } from "@ts-rest/core";
2145
- import z42 from "zod";
2118
+ import z41 from "zod";
2146
2119
 
2147
2120
  // src/messenger/validation.ts
2148
2121
  import z36 from "zod";
@@ -2261,22 +2234,6 @@ var ConnectWhatsappSchema = z37.object({
2261
2234
  });
2262
2235
  var CsatPreferenceSchema = z37.object({
2263
2236
  isCSATEnabled: z37.boolean(),
2264
- headline: z37.string().optional().nullable(),
2265
- image: z37.object({
2266
- bucketName: z37.string(),
2267
- fileName: z37.string(),
2268
- fileSize: z37.number(),
2269
- fileKey: z37.string(),
2270
- originalUrl: z37.string().optional().nullable()
2271
- }).optional().nullable(),
2272
- scaleOptions: z37.array(
2273
- z37.object({
2274
- value: z37.string(),
2275
- label: z37.string(),
2276
- color: z37.string().optional().nullable(),
2277
- style: z37.string().optional().nullable()
2278
- })
2279
- ).optional().nullable(),
2280
2237
  dispositions: z37.array(z37.string()).optional()
2281
2238
  });
2282
2239
  var ConnectLazadaSchema = z37.object({
@@ -2337,7 +2294,6 @@ var FacebookBusinessSchema = z39.object({
2337
2294
  // src/whatsapp/validation.ts
2338
2295
  import z40 from "zod";
2339
2296
  var TemplatesSchema = z40.object({
2340
- id: z40.string(),
2341
2297
  category: z40.union([
2342
2298
  z40.literal("UTILITY"),
2343
2299
  z40.literal("MARKETING"),
@@ -2357,7 +2313,7 @@ var WaapiQrSchema = z40.object({
2357
2313
  qr: z40.string()
2358
2314
  });
2359
2315
  var TemplatesResponseSchema = DefaultSuccessResponseSchema.extend({
2360
- data: z40.array(TemplatesSchema)
2316
+ data: TemplatesSchema
2361
2317
  });
2362
2318
  var GetTemplatesQuerySchema = z40.object({
2363
2319
  channelId: z40.string()
@@ -2376,13 +2332,6 @@ var SendSeenToWaapiSchema = z40.object({
2376
2332
  platformContactId: z40.string()
2377
2333
  });
2378
2334
 
2379
- // src/klink-chat/validation.ts
2380
- import z41 from "zod";
2381
- var KlinkChatChannelSchema = z41.object({
2382
- name: z41.string(),
2383
- metadata: z41.any().optional()
2384
- });
2385
-
2386
2335
  // src/channel/index.ts
2387
2336
  var messenger = initContract7().router(
2388
2337
  {
@@ -2400,13 +2349,13 @@ var messenger = initContract7().router(
2400
2349
  getFacebookBusinesses: {
2401
2350
  method: "GET",
2402
2351
  path: "/facebook-businesses",
2403
- query: z42.object({
2404
- userId: z42.string(),
2405
- userAccessToken: z42.string()
2352
+ query: z41.object({
2353
+ userId: z41.string(),
2354
+ userAccessToken: z41.string()
2406
2355
  }),
2407
2356
  responses: {
2408
2357
  200: DefaultSuccessResponseSchema.extend({
2409
- data: z42.array(FacebookBusinessSchema)
2358
+ data: z41.array(FacebookBusinessSchema)
2410
2359
  }),
2411
2360
  500: DefaultErrorResponseSchema
2412
2361
  }
@@ -2414,9 +2363,9 @@ var messenger = initContract7().router(
2414
2363
  getFacebookBusinessPages: {
2415
2364
  method: "GET",
2416
2365
  path: "/facebook-business-pages",
2417
- query: z42.object({
2418
- businessId: z42.string(),
2419
- userAccessToken: z42.string()
2366
+ query: z41.object({
2367
+ businessId: z41.string(),
2368
+ userAccessToken: z41.string()
2420
2369
  }),
2421
2370
  responses: {
2422
2371
  200: DefaultSuccessResponseSchema.extend({
@@ -2595,10 +2544,10 @@ var whatsapp = initContract7().router(
2595
2544
  deleteWaapi: {
2596
2545
  method: "DELETE",
2597
2546
  path: "/mobile/:instanceId",
2598
- pathParams: z42.object({
2599
- instanceId: z42.string()
2547
+ pathParams: z41.object({
2548
+ instanceId: z41.string()
2600
2549
  }),
2601
- body: z42.any().optional(),
2550
+ body: z41.any().optional(),
2602
2551
  responses: {
2603
2552
  200: DefaultSuccessResponseSchema,
2604
2553
  500: DefaultErrorResponseSchema,
@@ -2629,26 +2578,6 @@ var lazada = initContract7().router(
2629
2578
  pathPrefix: "lazada"
2630
2579
  }
2631
2580
  );
2632
- var klinkchat = initContract7().router(
2633
- {
2634
- connect: {
2635
- method: "POST",
2636
- path: "/connect",
2637
- summary: "Connect to klink chat",
2638
- body: KlinkChatChannelSchema,
2639
- responses: {
2640
- 200: DefaultSuccessResponseSchema.extend({
2641
- channel: ChannelSchema
2642
- }),
2643
- 400: DefaultErrorResponseSchema,
2644
- 500: DefaultErrorResponseSchema
2645
- }
2646
- }
2647
- },
2648
- {
2649
- pathPrefix: "klinkchat"
2650
- }
2651
- );
2652
2581
  var channelContract = initContract7().router(
2653
2582
  {
2654
2583
  getChannels: {
@@ -2665,8 +2594,8 @@ var channelContract = initContract7().router(
2665
2594
  disconnect: {
2666
2595
  method: "POST",
2667
2596
  path: "channel/disconnect/:channelId",
2668
- pathParams: z42.object({
2669
- channelId: z42.string().uuid()
2597
+ pathParams: z41.object({
2598
+ channelId: z41.string().uuid()
2670
2599
  }),
2671
2600
  responses: {
2672
2601
  200: DefaultSuccessResponseSchema.extend({
@@ -2680,8 +2609,8 @@ var channelContract = initContract7().router(
2680
2609
  delete: {
2681
2610
  method: "DELETE",
2682
2611
  path: "channel/delete/:channelId",
2683
- pathParams: z42.object({
2684
- channelId: z42.string().uuid()
2612
+ pathParams: z41.object({
2613
+ channelId: z41.string().uuid()
2685
2614
  }),
2686
2615
  responses: {
2687
2616
  200: DefaultSuccessResponseSchema.extend({
@@ -2689,14 +2618,14 @@ var channelContract = initContract7().router(
2689
2618
  }),
2690
2619
  408: DefaultErrorResponseSchema
2691
2620
  },
2692
- body: z42.any().optional(),
2621
+ body: z41.any().optional(),
2693
2622
  summary: "Delete message channel"
2694
2623
  },
2695
2624
  rename: {
2696
2625
  method: "POST",
2697
2626
  path: "channel/rename/:channelId",
2698
- pathParams: z42.object({
2699
- channelId: z42.string().uuid()
2627
+ pathParams: z41.object({
2628
+ channelId: z41.string().uuid()
2700
2629
  }),
2701
2630
  responses: {
2702
2631
  200: DefaultSuccessResponseSchema.extend({
@@ -2704,16 +2633,16 @@ var channelContract = initContract7().router(
2704
2633
  }),
2705
2634
  408: DefaultErrorResponseSchema
2706
2635
  },
2707
- body: z42.object({
2708
- brandName: z42.string()
2636
+ body: z41.object({
2637
+ brandName: z41.string()
2709
2638
  }),
2710
2639
  summary: "Rename message channel"
2711
2640
  },
2712
2641
  reconnect: {
2713
2642
  method: "POST",
2714
2643
  path: "channel/reconnect/:channelId",
2715
- pathParams: z42.object({
2716
- channelId: z42.string().uuid()
2644
+ pathParams: z41.object({
2645
+ channelId: z41.string().uuid()
2717
2646
  }),
2718
2647
  responses: {
2719
2648
  200: DefaultSuccessResponseSchema.extend({
@@ -2721,8 +2650,8 @@ var channelContract = initContract7().router(
2721
2650
  }),
2722
2651
  408: DefaultErrorResponseSchema
2723
2652
  },
2724
- body: z42.object({
2725
- instanceId: z42.string().nullable().optional()
2653
+ body: z41.object({
2654
+ instanceId: z41.string().nullable().optional()
2726
2655
  }),
2727
2656
  summary: "Reconnect message channel"
2728
2657
  },
@@ -2754,21 +2683,21 @@ var channelContract = initContract7().router(
2754
2683
  path: "channel/update-new-tenant",
2755
2684
  responses: {
2756
2685
  200: DefaultSuccessResponseSchema.extend({
2757
- message: z42.string()
2686
+ message: z41.string()
2758
2687
  }),
2759
2688
  408: DefaultErrorResponseSchema
2760
2689
  },
2761
- body: z42.object({
2762
- id: z42.string(),
2763
- time: z42.string()
2690
+ body: z41.object({
2691
+ id: z41.string(),
2692
+ time: z41.string()
2764
2693
  }),
2765
2694
  summary: "Update new tenant"
2766
2695
  },
2767
2696
  updateChannelCsatPreference: {
2768
2697
  method: "POST",
2769
2698
  path: "csat/:channelId",
2770
- pathParams: z42.object({
2771
- channelId: z42.string().uuid()
2699
+ pathParams: z41.object({
2700
+ channelId: z41.string().uuid()
2772
2701
  }),
2773
2702
  responses: {
2774
2703
  200: DefaultSuccessResponseSchema.extend({
@@ -2786,8 +2715,7 @@ var channelContract = initContract7().router(
2786
2715
  telegram,
2787
2716
  webchat,
2788
2717
  whatsapp,
2789
- lazada,
2790
- klinkchat
2718
+ lazada
2791
2719
  },
2792
2720
  {
2793
2721
  baseHeaders: DefaultHeaderSchema
@@ -2843,7 +2771,7 @@ var channelBotContract = initContract7().router(
2843
2771
  400: DefaultErrorResponseSchema,
2844
2772
  500: DefaultErrorResponseSchema
2845
2773
  },
2846
- body: z42.object({})
2774
+ body: z41.object({})
2847
2775
  }
2848
2776
  },
2849
2777
  {
@@ -2872,12 +2800,12 @@ var channelSMSContract = initContract7().router(
2872
2800
 
2873
2801
  // src/chat/index.ts
2874
2802
  import { initContract as initContract8 } from "@ts-rest/core";
2875
- import z43 from "zod";
2803
+ import z42 from "zod";
2876
2804
  var receiveMessageContract = initContract8().router(
2877
2805
  {
2878
2806
  receiveMessage: {
2879
2807
  method: "POST",
2880
- path: "/receive",
2808
+ path: "ms/message/receive",
2881
2809
  body: ReceiveMessageSchema,
2882
2810
  responses: {
2883
2811
  200: null,
@@ -2887,11 +2815,10 @@ var receiveMessageContract = initContract8().router(
2887
2815
  }
2888
2816
  },
2889
2817
  {
2890
- baseHeaders: z43.object({
2891
- "x-code": z43.string().uuid(),
2892
- "x-tenant": z43.string().uuid()
2893
- }),
2894
- pathPrefix: "ms/message"
2818
+ baseHeaders: z42.object({
2819
+ "x-code": z42.string().uuid(),
2820
+ "x-tenant": z42.string().uuid()
2821
+ })
2895
2822
  }
2896
2823
  );
2897
2824
  var mainFeedContract = initContract8().router(
@@ -2899,8 +2826,8 @@ var mainFeedContract = initContract8().router(
2899
2826
  getFeedPostById: {
2900
2827
  method: "GET",
2901
2828
  path: "chs/api/v1/chat/feed-post/:id",
2902
- pathParams: z43.object({
2903
- id: z43.string().uuid()
2829
+ pathParams: z42.object({
2830
+ id: z42.string().uuid()
2904
2831
  }),
2905
2832
  responses: {
2906
2833
  200: DefaultSuccessResponseSchema.extend({
@@ -2912,14 +2839,14 @@ var mainFeedContract = initContract8().router(
2912
2839
  getMessagesByParent: {
2913
2840
  method: "GET",
2914
2841
  path: "chs/api/v1/chat/message/:parentId/relevance",
2915
- pathParams: z43.object({
2916
- parentId: z43.string().uuid()
2842
+ pathParams: z42.object({
2843
+ parentId: z42.string().uuid()
2917
2844
  }),
2918
2845
  responses: {
2919
2846
  200: DefaultSuccessResponseSchema.extend({
2920
- total: z43.number(),
2921
- page: z43.number(),
2922
- pageSize: z43.number(),
2847
+ total: z42.number(),
2848
+ page: z42.number(),
2849
+ pageSize: z42.number(),
2923
2850
  data: MessageRelevanceSchema
2924
2851
  })
2925
2852
  },
@@ -2938,12 +2865,12 @@ var mainChatRoomContract = initContract8().router(
2938
2865
  path: "chs/api/v1/chat/rooms",
2939
2866
  responses: {
2940
2867
  200: DefaultSuccessResponseSchema.extend({
2941
- total: z43.number(),
2942
- page: z43.number(),
2943
- pageSize: z43.number(),
2944
- data: z43.array(RoomSchema),
2945
- showResumeLabel: z43.boolean(),
2946
- unreadCountsByAssignee: z43.array(UnreadCountsByAssigneeSchema)
2868
+ total: z42.number(),
2869
+ page: z42.number(),
2870
+ pageSize: z42.number(),
2871
+ data: z42.array(RoomSchema),
2872
+ showResumeLabel: z42.boolean(),
2873
+ unreadCountsByAssignee: z42.array(UnreadCountsByAssigneeSchema)
2947
2874
  }),
2948
2875
  401: DefaultUnauthorizedSchema
2949
2876
  },
@@ -2953,43 +2880,43 @@ var mainChatRoomContract = initContract8().router(
2953
2880
  getRoom: {
2954
2881
  method: "GET",
2955
2882
  path: "chs/api/v1/chat/rooms/:roomId",
2956
- pathParams: z43.object({
2957
- roomId: z43.string().uuid()
2883
+ pathParams: z42.object({
2884
+ roomId: z42.string().uuid()
2958
2885
  }),
2959
2886
  responses: {
2960
2887
  200: DefaultSuccessResponseSchema.extend({
2961
- data: z43.object({
2888
+ data: z42.object({
2962
2889
  room: RoomSchema,
2963
- showResumeLabel: z43.boolean(),
2964
- latestIncomingMessage: z43.object({
2965
- message: z43.string(),
2890
+ showResumeLabel: z42.boolean(),
2891
+ latestIncomingMessage: z42.object({
2892
+ message: z42.string(),
2966
2893
  direction: MessageDirectionTypeSchema,
2967
2894
  type: MessageTypeSchema,
2968
- readAt: z43.date(),
2969
- metadata: z43.any(),
2970
- platformId: z43.string(),
2971
- platformMessageId: z43.string(),
2972
- replyPlatformMessageId: z43.string(),
2973
- template: z43.any(),
2895
+ readAt: z42.date(),
2896
+ metadata: z42.any(),
2897
+ platformId: z42.string(),
2898
+ platformMessageId: z42.string(),
2899
+ replyPlatformMessageId: z42.string(),
2900
+ template: z42.any(),
2974
2901
  locale: MessageLocaleTypeSchema,
2975
- url: z43.string(),
2976
- previewUrl: z43.string(),
2977
- imageSetId: z43.string()
2902
+ url: z42.string(),
2903
+ previewUrl: z42.string(),
2904
+ imageSetId: z42.string()
2978
2905
  }),
2979
- latestMessage: z43.object({
2980
- message: z43.string(),
2906
+ latestMessage: z42.object({
2907
+ message: z42.string(),
2981
2908
  direction: MessageDirectionTypeSchema,
2982
2909
  type: MessageTypeSchema,
2983
- readAt: z43.date(),
2984
- metadata: z43.any(),
2985
- platformId: z43.string(),
2986
- platformMessageId: z43.string(),
2987
- replyPlatformMessageId: z43.string(),
2988
- template: z43.any(),
2910
+ readAt: z42.date(),
2911
+ metadata: z42.any(),
2912
+ platformId: z42.string(),
2913
+ platformMessageId: z42.string(),
2914
+ replyPlatformMessageId: z42.string(),
2915
+ template: z42.any(),
2989
2916
  locale: MessageLocaleTypeSchema,
2990
- url: z43.string(),
2991
- previewUrl: z43.string(),
2992
- imageSetId: z43.string()
2917
+ url: z42.string(),
2918
+ previewUrl: z42.string(),
2919
+ imageSetId: z42.string()
2993
2920
  })
2994
2921
  })
2995
2922
  }),
@@ -3004,7 +2931,7 @@ var mainChatRoomContract = initContract8().router(
3004
2931
  responses: {
3005
2932
  200: DefaultSuccessResponseSchema.extend({
3006
2933
  data: RoomSchema.extend({
3007
- solveMessage: z43.string()
2934
+ solveMessage: z42.string()
3008
2935
  })
3009
2936
  }),
3010
2937
  409: DefaultErrorResponseSchema
@@ -3014,14 +2941,14 @@ var mainChatRoomContract = initContract8().router(
3014
2941
  createRoom: {
3015
2942
  method: "POST",
3016
2943
  path: "ms/chat/room/create/:platformContactId",
3017
- pathParams: z43.object({
3018
- platformContactId: z43.string().uuid()
2944
+ pathParams: z42.object({
2945
+ platformContactId: z42.string().uuid()
3019
2946
  }),
3020
2947
  responses: {
3021
2948
  200: DefaultSuccessResponseSchema.extend({
3022
2949
  data: RoomSchema.extend({
3023
2950
  contact: ContactSchema,
3024
- openMessage: z43.string()
2951
+ openMessage: z42.string()
3025
2952
  })
3026
2953
  })
3027
2954
  },
@@ -3031,13 +2958,13 @@ var mainChatRoomContract = initContract8().router(
3031
2958
  readRoom: {
3032
2959
  method: "POST",
3033
2960
  path: "ms/chat/room/read/:roomId",
3034
- pathParams: z43.object({
3035
- roomId: z43.string().uuid()
2961
+ pathParams: z42.object({
2962
+ roomId: z42.string().uuid()
3036
2963
  }),
3037
2964
  responses: {
3038
2965
  200: DefaultSuccessResponseSchema.extend({
3039
2966
  data: RoomSchema.extend({
3040
- description: z43.string().nullable()
2967
+ description: z42.string().nullable()
3041
2968
  })
3042
2969
  })
3043
2970
  },
@@ -3049,12 +2976,12 @@ var mainChatRoomContract = initContract8().router(
3049
2976
  path: "ms/chat/search",
3050
2977
  responses: {
3051
2978
  200: DefaultSuccessResponseSchema.extend({
3052
- total: z43.number(),
3053
- page: z43.number(),
3054
- pageSize: z43.number(),
3055
- data: z43.array(
2979
+ total: z42.number(),
2980
+ page: z42.number(),
2981
+ pageSize: z42.number(),
2982
+ data: z42.array(
3056
2983
  RoomSchema.extend({
3057
- automationQueueId: z43.string().uuid().optional().nullable()
2984
+ automationQueueId: z42.string().uuid().optional().nullable()
3058
2985
  })
3059
2986
  )
3060
2987
  })
@@ -3064,7 +2991,7 @@ var mainChatRoomContract = initContract8().router(
3064
2991
  },
3065
2992
  getAllRoomCount: {
3066
2993
  method: "GET",
3067
- path: "chs/api/v1/chat/opened-and-closed-room-counts",
2994
+ path: "/chs/api/v1/chat/opened-and-closed-room-counts",
3068
2995
  responses: {
3069
2996
  200: DefaultSuccessResponseSchema.extend({
3070
2997
  data: AllOpenCloseRoomCountSchema
@@ -3074,7 +3001,7 @@ var mainChatRoomContract = initContract8().router(
3074
3001
  },
3075
3002
  getAllQueueAndHoldCount: {
3076
3003
  method: "GET",
3077
- path: "chs/api/v1/chat/queue-and-hold-room-counts",
3004
+ path: "/chs/api/v1/chat/queue-and-hold-room-counts",
3078
3005
  responses: {
3079
3006
  200: DefaultSuccessResponseSchema.extend({
3080
3007
  data: AllHoldAndQueueRoomCountSchema
@@ -3084,7 +3011,7 @@ var mainChatRoomContract = initContract8().router(
3084
3011
  },
3085
3012
  getAllBotRoomCount: {
3086
3013
  method: "GET",
3087
- path: "chs/api/v1/chat/bot-room-count",
3014
+ path: "/chs/api/v1/chat/bot-room-count",
3088
3015
  responses: {
3089
3016
  200: DefaultSuccessResponseSchema.extend({
3090
3017
  data: AllOpenCloseBotRoomCountSchema
@@ -3095,17 +3022,17 @@ var mainChatRoomContract = initContract8().router(
3095
3022
  botRoomTakeOver: {
3096
3023
  method: "POST",
3097
3024
  path: "ms/chat/bot-room/take-over/:roomId",
3098
- pathParams: z43.object({
3099
- roomId: z43.string().uuid()
3025
+ pathParams: z42.object({
3026
+ roomId: z42.string().uuid()
3100
3027
  }),
3101
- body: z43.object({
3102
- assigneeId: z43.string().uuid().optional()
3028
+ body: z42.object({
3029
+ assigneeId: z42.string().uuid().optional()
3103
3030
  }),
3104
3031
  responses: {
3105
3032
  200: DefaultSuccessResponseSchema.extend({
3106
3033
  data: RoomSchema.extend({
3107
3034
  contact: ContactSchema,
3108
- openMessage: z43.string()
3035
+ openMessage: z42.string()
3109
3036
  })
3110
3037
  })
3111
3038
  },
@@ -3130,56 +3057,44 @@ var mainChatContract = initContract8().router(
3130
3057
  },
3131
3058
  summary: "Send message to room"
3132
3059
  },
3133
- // sendMessageAi: {
3134
- // method: 'POST',
3135
- // path: '/message/ai',
3136
- // body: SendMessageSchema,
3137
- // responses: {
3138
- // 200: SendMessageResponseSchema,
3139
- // 400: DefaultErrorResponseSchema,
3140
- // 422: DefaultErrorResponseSchema,
3141
- // 500: DefaultErrorResponseSchema,
3142
- // },
3143
- // summary: 'Send message to room',
3144
- // },
3145
3060
  getUnreadCounts: {
3146
3061
  method: "GET",
3147
3062
  path: "ms/chat/rooms/unread-count",
3148
3063
  responses: {
3149
3064
  200: DefaultSuccessResponseSchema.extend({
3150
- unreadCountsByAssignee: z43.array(UnreadCountsByAssigneeSchema)
3065
+ unreadCountsByAssignee: z42.array(UnreadCountsByAssigneeSchema)
3151
3066
  })
3152
3067
  }
3153
3068
  },
3154
3069
  getRoomsByPlatformContactId: {
3155
3070
  method: "GET",
3156
3071
  path: "ms/chat/rooms/:platformContactId",
3157
- pathParams: z43.object({
3158
- platformContactId: z43.string()
3072
+ pathParams: z42.object({
3073
+ platformContactId: z42.string()
3159
3074
  }),
3160
3075
  responses: {
3161
3076
  200: DefaultSuccessResponseSchema.extend({
3162
- data: z43.array(
3163
- z43.object({
3164
- id: z43.string().uuid()
3077
+ data: z42.array(
3078
+ z42.object({
3079
+ id: z42.string().uuid()
3165
3080
  })
3166
3081
  ),
3167
- total: z43.number()
3082
+ total: z42.number()
3168
3083
  })
3169
3084
  }
3170
3085
  },
3171
3086
  getMessages: {
3172
3087
  method: "GET",
3173
3088
  path: "chs/api/v1/chat/message/:roomId",
3174
- pathParams: z43.object({
3175
- roomId: z43.string().uuid()
3089
+ pathParams: z42.object({
3090
+ roomId: z42.string().uuid()
3176
3091
  }),
3177
3092
  responses: {
3178
3093
  200: DefaultSuccessResponseSchema.extend({
3179
- total: z43.number(),
3180
- page: z43.number(),
3181
- pageSize: z43.number(),
3182
- data: z43.array(MessageWithFeedPostSchema)
3094
+ total: z42.number(),
3095
+ page: z42.number(),
3096
+ pageSize: z42.number(),
3097
+ data: z42.array(MessageWithFeedPostSchema)
3183
3098
  })
3184
3099
  },
3185
3100
  query: OrderQueryParamSchema,
@@ -3191,7 +3106,7 @@ var mainChatContract = initContract8().router(
3191
3106
  body: UpdateUnAssignRoomsSchema,
3192
3107
  responses: {
3193
3108
  200: DefaultSuccessResponseSchema.extend({
3194
- data: z43.array(RoomSchema)
3109
+ data: z42.array(RoomSchema)
3195
3110
  }),
3196
3111
  409: DefaultErrorResponseSchema
3197
3112
  },
@@ -3212,8 +3127,8 @@ var mainChatContract = initContract8().router(
3212
3127
  getRoomContact: {
3213
3128
  method: "GET",
3214
3129
  path: "ms/chat/contact/:contactId",
3215
- pathParams: z43.object({
3216
- contactId: z43.string().uuid()
3130
+ pathParams: z42.object({
3131
+ contactId: z42.string().uuid()
3217
3132
  }),
3218
3133
  responses: {
3219
3134
  200: DefaultSuccessResponseSchema.extend({
@@ -3242,7 +3157,7 @@ var initiateMessageContract = initContract8().router(
3242
3157
  {
3243
3158
  initiateMessage: {
3244
3159
  method: "POST",
3245
- path: "/initiate-message",
3160
+ path: "ms/chat/initiate-message",
3246
3161
  body: InitiateMessageSchema,
3247
3162
  responses: {
3248
3163
  200: DefaultSuccessResponseSchema.extend({ data: MessageSchema }),
@@ -3252,15 +3167,14 @@ var initiateMessageContract = initContract8().router(
3252
3167
  }
3253
3168
  },
3254
3169
  {
3255
- baseHeaders: DefaultHeaderSchema,
3256
- pathPrefix: "ms/chat"
3170
+ baseHeaders: DefaultHeaderSchema
3257
3171
  }
3258
3172
  );
3259
3173
  var mainChatMessageContract = initContract8().router(
3260
3174
  {
3261
3175
  sendMessage: {
3262
3176
  method: "POST",
3263
- path: "/message",
3177
+ path: "ms/chat/message",
3264
3178
  body: SendMessageSchema,
3265
3179
  responses: {
3266
3180
  200: SendMessageResponseSchema,
@@ -3272,7 +3186,7 @@ var mainChatMessageContract = initContract8().router(
3272
3186
  },
3273
3187
  deleteMessage: {
3274
3188
  method: "DELETE",
3275
- path: "/message",
3189
+ path: "ms/chat/message",
3276
3190
  body: ActionMessageSchema,
3277
3191
  responses: {
3278
3192
  200: DefaultSuccessResponseSchema.extend({
@@ -3284,114 +3198,113 @@ var mainChatMessageContract = initContract8().router(
3284
3198
  },
3285
3199
  getEditedMessages: {
3286
3200
  method: "GET",
3287
- path: "/edited-messages/:messageId",
3288
- pathParams: z43.object({
3289
- messageId: z43.string().uuid()
3201
+ path: "ms/chat/edited-messages/:messageId",
3202
+ pathParams: z42.object({
3203
+ messageId: z42.string().uuid()
3290
3204
  }),
3291
3205
  responses: {
3292
3206
  200: DefaultSuccessResponseSchema.extend({
3293
- data: z43.array(MessageSchema)
3207
+ data: z42.array(MessageSchema)
3294
3208
  })
3295
3209
  }
3296
3210
  }
3297
3211
  },
3298
3212
  {
3299
- baseHeaders: DefaultHeaderSchema,
3300
- pathPrefix: "ms/chat"
3213
+ baseHeaders: DefaultHeaderSchema
3301
3214
  }
3302
3215
  );
3303
3216
 
3304
3217
  // src/comment/index.ts
3305
3218
  import { initContract as initContract9 } from "@ts-rest/core";
3306
- import z47 from "zod";
3219
+ import z46 from "zod";
3307
3220
 
3308
3221
  // src/comment/validation.ts
3309
- import { z as z44 } from "zod";
3310
- var CreateCommentSchema = z44.object({
3311
- ticketId: z44.string(),
3312
- comment: z44.string(),
3313
- mentions: z44.array(z44.string()).optional()
3314
- });
3315
- var UpdateCommentSchema = z44.object({
3316
- comment: z44.string(),
3317
- mentions: z44.array(z44.string()).optional()
3318
- });
3319
- var GetCommentQuerySchema = z44.object({
3320
- ticketId: z44.string().optional(),
3321
- withDeleted: z44.enum(["true", "false"])
3222
+ import { z as z43 } from "zod";
3223
+ var CreateCommentSchema = z43.object({
3224
+ ticketId: z43.string(),
3225
+ comment: z43.string(),
3226
+ mentions: z43.array(z43.string()).optional()
3227
+ });
3228
+ var UpdateCommentSchema = z43.object({
3229
+ comment: z43.string(),
3230
+ mentions: z43.array(z43.string()).optional()
3231
+ });
3232
+ var GetCommentQuerySchema = z43.object({
3233
+ ticketId: z43.string().optional(),
3234
+ withDeleted: z43.enum(["true", "false"])
3322
3235
  }).optional();
3323
3236
 
3324
3237
  // src/comment/schema.ts
3325
- import z46 from "zod";
3238
+ import z45 from "zod";
3326
3239
 
3327
3240
  // src/ticket/schema.ts
3328
- import z45 from "zod";
3241
+ import z44 from "zod";
3329
3242
  var TicketCustomFieldSchema = DefaultEntitySchema.extend({
3330
- textValue: z45.string().nullable(),
3331
- booleanValue: z45.boolean().nullable(),
3332
- numberValue: z45.coerce.number().nullable(),
3333
- dateValue: z45.date().nullable(),
3243
+ textValue: z44.string().nullable(),
3244
+ booleanValue: z44.boolean().nullable(),
3245
+ numberValue: z44.coerce.number().nullable(),
3246
+ dateValue: z44.date().nullable(),
3334
3247
  attribute: AttributeSchema.omit({ options: true, group: true }),
3335
- uploads: z45.array(UploadSchema)
3336
- });
3337
- var TicketEntityTypesSchema = z45.object({
3338
- id: z45.string().uuid(),
3339
- createdAt: z45.date(),
3340
- updatedAt: z45.date(),
3341
- deletedAt: z45.date().nullable(),
3342
- entity: z45.string(),
3343
- description: z45.string().nullable()
3344
- });
3345
- var TicketActivitySchema = z45.object({
3346
- id: z45.string().uuid(),
3347
- createdAt: z45.date(),
3348
- updatedAt: z45.date(),
3349
- deletedAt: z45.date().nullable(),
3350
- entityId: z45.string(),
3351
- description: z45.string(),
3248
+ uploads: z44.array(UploadSchema)
3249
+ });
3250
+ var TicketEntityTypesSchema = z44.object({
3251
+ id: z44.string().uuid(),
3252
+ createdAt: z44.date(),
3253
+ updatedAt: z44.date(),
3254
+ deletedAt: z44.date().nullable(),
3255
+ entity: z44.string(),
3256
+ description: z44.string().nullable()
3257
+ });
3258
+ var TicketActivitySchema = z44.object({
3259
+ id: z44.string().uuid(),
3260
+ createdAt: z44.date(),
3261
+ updatedAt: z44.date(),
3262
+ deletedAt: z44.date().nullable(),
3263
+ entityId: z44.string(),
3264
+ description: z44.string(),
3352
3265
  entityType: TicketEntityTypesSchema
3353
3266
  });
3354
3267
  var TicketSchema = DefaultEntitySchema.extend({
3355
- title: z45.string(),
3356
- description: z45.string().nullable(),
3357
- type: z45.string(),
3358
- channel: z45.string(),
3359
- priority: z45.string(),
3360
- status: z45.string(),
3361
- contactId: z45.string().uuid(),
3362
- creatorId: z45.string().uuid(),
3268
+ title: z44.string(),
3269
+ description: z44.string().nullable(),
3270
+ type: z44.string(),
3271
+ channel: z44.string(),
3272
+ priority: z44.string(),
3273
+ status: z44.string(),
3274
+ contactId: z44.string().uuid(),
3275
+ creatorId: z44.string().uuid(),
3363
3276
  creator: UserSchema.optional().nullable(),
3364
- assigneeId: z45.string().uuid(),
3277
+ assigneeId: z44.string().uuid(),
3365
3278
  assignee: UserSchema.optional().nullable(),
3366
3279
  //note: all user info is actually not included, check with reponse data
3367
- reasonToAssign: z45.string().nullable(),
3368
- ticketNumber: z45.coerce.number().optional(),
3369
- customFields: z45.array(TicketCustomFieldSchema),
3370
- tags: z45.array(TagSchema),
3371
- categories: z45.array(CategorySchema),
3280
+ reasonToAssign: z44.string().nullable(),
3281
+ ticketNumber: z44.coerce.number().optional(),
3282
+ customFields: z44.array(TicketCustomFieldSchema),
3283
+ tags: z44.array(TagSchema),
3284
+ categories: z44.array(CategorySchema),
3372
3285
  contact: ContactSchema,
3373
- activityLogs: z45.array(ActivityLogSchema)
3286
+ activityLogs: z44.array(ActivityLogSchema)
3374
3287
  });
3375
- var TicketCountByContactSchema = z45.object({
3376
- total: z45.coerce.number(),
3377
- open: z45.coerce.number(),
3378
- pending: z45.coerce.number(),
3379
- closed: z45.coerce.number(),
3380
- solved: z45.coerce.number()
3288
+ var TicketCountByContactSchema = z44.object({
3289
+ total: z44.coerce.number(),
3290
+ open: z44.coerce.number(),
3291
+ pending: z44.coerce.number(),
3292
+ closed: z44.coerce.number(),
3293
+ solved: z44.coerce.number()
3381
3294
  });
3382
- var TicketReasonRequiredSchema = z45.object({
3383
- ticketReasonRequired: z45.string()
3295
+ var TicketReasonRequiredSchema = z44.object({
3296
+ ticketReasonRequired: z44.string()
3384
3297
  });
3385
3298
 
3386
3299
  // src/comment/schema.ts
3387
- var CommentSchema = z46.object({
3388
- id: z46.string().uuid(),
3389
- createdAt: z46.date(),
3390
- updatedAt: z46.date(),
3391
- deletedAt: z46.date().nullable(),
3392
- activityLogs: z46.array(ActivityLogSchema),
3393
- comment: z46.string(),
3394
- mentions: z46.array(z46.string()),
3300
+ var CommentSchema = z45.object({
3301
+ id: z45.string().uuid(),
3302
+ createdAt: z45.date(),
3303
+ updatedAt: z45.date(),
3304
+ deletedAt: z45.date().nullable(),
3305
+ activityLogs: z45.array(ActivityLogSchema),
3306
+ comment: z45.string(),
3307
+ mentions: z45.array(z45.string()),
3395
3308
  ticket: TicketSchema,
3396
3309
  agent: UserSchema
3397
3310
  });
@@ -3408,8 +3321,8 @@ var commentContract = initContract9().router(
3408
3321
  201: DefaultSuccessResponseSchema.extend({
3409
3322
  comment: CommentSchema
3410
3323
  }),
3411
- 400: z47.object({
3412
- message: z47.string()
3324
+ 400: z46.object({
3325
+ message: z46.string()
3413
3326
  }),
3414
3327
  401: DefaultUnauthorizedSchema,
3415
3328
  500: DefaultErrorResponseSchema
@@ -3422,9 +3335,9 @@ var commentContract = initContract9().router(
3422
3335
  headers: DefaultHeaderSchema,
3423
3336
  query: GetCommentQuerySchema,
3424
3337
  responses: {
3425
- 200: z47.array(CommentSchema),
3426
- 400: z47.object({
3427
- message: z47.string()
3338
+ 200: z46.array(CommentSchema),
3339
+ 400: z46.object({
3340
+ message: z46.string()
3428
3341
  }),
3429
3342
  401: DefaultUnauthorizedSchema,
3430
3343
  500: DefaultErrorResponseSchema
@@ -3434,7 +3347,7 @@ var commentContract = initContract9().router(
3434
3347
  updateComment: {
3435
3348
  method: "PATCH",
3436
3349
  path: "/:id",
3437
- pathParams: z47.object({ id: z47.string() }),
3350
+ pathParams: z46.object({ id: z46.string() }),
3438
3351
  headers: DefaultHeaderSchema,
3439
3352
  body: UpdateCommentSchema,
3440
3353
  responses: {
@@ -3448,11 +3361,11 @@ var commentContract = initContract9().router(
3448
3361
  deleteComment: {
3449
3362
  method: "DELETE",
3450
3363
  path: "/:id",
3451
- pathParams: z47.object({ id: z47.string() }),
3364
+ pathParams: z46.object({ id: z46.string() }),
3452
3365
  headers: DefaultHeaderSchema,
3453
3366
  body: null,
3454
3367
  responses: {
3455
- 200: DefaultSuccessResponseSchema.extend({ message: z47.string() }),
3368
+ 200: DefaultSuccessResponseSchema.extend({ message: z46.string() }),
3456
3369
  500: DefaultErrorResponseSchema
3457
3370
  },
3458
3371
  summary: "Delete a comment."
@@ -3463,77 +3376,61 @@ var commentContract = initContract9().router(
3463
3376
 
3464
3377
  // src/company/index.ts
3465
3378
  import { initContract as initContract10 } from "@ts-rest/core";
3466
- import z49 from "zod";
3379
+ import z48 from "zod";
3467
3380
 
3468
3381
  // src/company/validation.ts
3469
- import z48 from "zod";
3470
- var BaseSchema = z48.object({
3471
- isRequired: z48.boolean(),
3472
- attributeId: z48.string().uuid()
3382
+ import z47 from "zod";
3383
+ var BaseSchema = z47.object({
3384
+ isRequired: z47.boolean(),
3385
+ attributeId: z47.string().uuid()
3473
3386
  });
3474
3387
  var CompanyContractsValidationSchema = {
3475
3388
  create: {
3476
- request: z48.object({
3477
- name: z48.object({
3478
- value: z48.string(),
3479
- isRequired: z48.boolean(),
3480
- attributeId: z48.string()
3481
- }),
3482
- phone: z48.object({
3483
- value: z48.string(),
3484
- isRequired: z48.boolean(),
3485
- attributeId: z48.string()
3486
- }),
3487
- address: z48.object({
3488
- value: z48.string(),
3489
- isRequired: z48.boolean(),
3490
- attributeId: z48.string()
3491
- }),
3492
- industry: z48.object({
3493
- value: z48.string(),
3494
- isRequired: z48.boolean(),
3495
- attributeId: z48.string()
3496
- }),
3497
- customFields: z48.array(
3389
+ request: z47.object({
3390
+ name: z47.object({ value: z47.string() }),
3391
+ phone: z47.object({ value: z47.string() }),
3392
+ address: z47.object({ value: z47.string() }),
3393
+ industry: z47.object({ value: z47.string() }),
3394
+ customFields: z47.array(
3498
3395
  BaseSchema.extend({
3499
- value: z48.union([z48.string(), z48.array(z48.string())]),
3500
- type: z48.string(),
3501
- isDefaultAttribute: z48.boolean()
3396
+ value: z47.union([z47.string(), z47.array(z47.string())]),
3397
+ type: z47.string(),
3398
+ isDefaultAttribute: z47.boolean()
3502
3399
  })
3503
3400
  )
3504
3401
  }),
3505
3402
  response: CompanySchema
3506
3403
  },
3507
3404
  getById: {
3508
- request: z48.object({
3509
- id: z48.string().uuid()
3405
+ request: z47.object({
3406
+ id: z47.string().uuid()
3510
3407
  }),
3511
3408
  response: CompanySchema
3512
3409
  },
3513
3410
  getAll: {
3514
- request: z48.object({
3515
- page: z48.coerce.number().default(1),
3516
- pageSize: z48.coerce.number().default(10),
3517
- keyword: z48.string().optional(),
3518
- industry: z48.array(z48.string()),
3519
- name: z48.string(),
3520
- address: z48.string(),
3521
- phone: z48.string(),
3522
- selectedDate: z48.string(),
3523
- customFields: z48.array(
3524
- z48.object({
3525
- attributeId: z48.string().uuid(),
3526
- type: z48.string(),
3527
- value: z48.union([z48.string(), z48.array(z48.string())])
3411
+ request: z47.object({
3412
+ page: z47.coerce.number().default(1),
3413
+ pageSize: z47.coerce.number().default(10),
3414
+ keyword: z47.string().optional(),
3415
+ industry: z47.array(z47.string()),
3416
+ name: z47.string(),
3417
+ address: z47.string(),
3418
+ phone: z47.string(),
3419
+ selectedDate: z47.string(),
3420
+ customFields: z47.array(
3421
+ z47.object({
3422
+ attributeId: z47.string().uuid(),
3423
+ type: z47.string(),
3424
+ value: z47.union([z47.string(), z47.array(z47.string())])
3528
3425
  })
3529
3426
  )
3530
3427
  }).partial(),
3531
3428
  response: {
3532
- page: z48.number(),
3533
- pageSize: z48.number(),
3534
- total: z48.number(),
3535
- lastPage: z48.number(),
3536
- data: z48.array(CompanySchema)
3429
+ page: z47.number(),
3430
+ pageSize: z47.number(),
3431
+ total: z47.number(),
3432
+ lastPage: z47.number(),
3433
+ data: z47.array(CompanySchema)
3537
3434
  }
3538
3435
  }
3539
3436
  };
@@ -3547,14 +3444,14 @@ var companyContract = initContract10().router({
3547
3444
  201: DefaultSuccessResponseSchema.extend({
3548
3445
  data: CompanyContractsValidationSchema.create.response
3549
3446
  }),
3550
- 400: z49.object({
3551
- message: z49.string()
3447
+ 400: z48.object({
3448
+ message: z48.string()
3552
3449
  }),
3553
- 409: z49.object({
3554
- message: z49.string()
3450
+ 409: z48.object({
3451
+ message: z48.string()
3555
3452
  }),
3556
- 500: z49.object({
3557
- message: z49.string()
3453
+ 500: z48.object({
3454
+ message: z48.string()
3558
3455
  }),
3559
3456
  401: DefaultUnauthorizedSchema,
3560
3457
  404: DefaultNotFoundSchema,
@@ -3566,21 +3463,21 @@ var companyContract = initContract10().router({
3566
3463
  update: {
3567
3464
  method: "PATCH",
3568
3465
  path: "ccs/api/v1/company/:id",
3569
- pathParams: z49.object({
3570
- id: z49.string().uuid()
3466
+ pathParams: z48.object({
3467
+ id: z48.string().uuid()
3571
3468
  }),
3572
3469
  responses: {
3573
3470
  201: DefaultSuccessResponseSchema.extend({
3574
3471
  data: CompanyContractsValidationSchema.create.response
3575
3472
  }),
3576
- 400: z49.object({
3577
- message: z49.string()
3473
+ 400: z48.object({
3474
+ message: z48.string()
3578
3475
  }),
3579
- 409: z49.object({
3580
- message: z49.string()
3476
+ 409: z48.object({
3477
+ message: z48.string()
3581
3478
  }),
3582
- 500: z49.object({
3583
- message: z49.string()
3479
+ 500: z48.object({
3480
+ message: z48.string()
3584
3481
  }),
3585
3482
  401: DefaultUnauthorizedSchema,
3586
3483
  404: DefaultNotFoundSchema,
@@ -3592,21 +3489,21 @@ var companyContract = initContract10().router({
3592
3489
  delete: {
3593
3490
  method: "DELETE",
3594
3491
  path: "ccs/api/v1/company/:id",
3595
- pathParams: z49.object({
3596
- id: z49.string().uuid()
3492
+ pathParams: z48.object({
3493
+ id: z48.string().uuid()
3597
3494
  }),
3598
3495
  responses: {
3599
3496
  201: DefaultSuccessResponseSchema.extend({
3600
- message: z49.string()
3497
+ message: z48.string()
3601
3498
  }),
3602
- 400: z49.object({
3603
- message: z49.string()
3499
+ 400: z48.object({
3500
+ message: z48.string()
3604
3501
  }),
3605
- 409: z49.object({
3606
- message: z49.string()
3502
+ 409: z48.object({
3503
+ message: z48.string()
3607
3504
  }),
3608
- 500: z49.object({
3609
- message: z49.string()
3505
+ 500: z48.object({
3506
+ message: z48.string()
3610
3507
  }),
3611
3508
  401: DefaultUnauthorizedSchema,
3612
3509
  404: DefaultNotFoundSchema,
@@ -3623,14 +3520,14 @@ var companyContract = initContract10().router({
3623
3520
  200: DefaultSuccessResponseSchema.extend({
3624
3521
  data: CompanyContractsValidationSchema.create.response
3625
3522
  }),
3626
- 400: z49.object({
3627
- message: z49.string()
3523
+ 400: z48.object({
3524
+ message: z48.string()
3628
3525
  }),
3629
- 409: z49.object({
3630
- message: z49.string()
3526
+ 409: z48.object({
3527
+ message: z48.string()
3631
3528
  }),
3632
- 500: z49.object({
3633
- message: z49.string()
3529
+ 500: z48.object({
3530
+ message: z48.string()
3634
3531
  }),
3635
3532
  401: DefaultUnauthorizedSchema,
3636
3533
  404: DefaultNotFoundSchema,
@@ -3646,14 +3543,14 @@ var companyContract = initContract10().router({
3646
3543
  200: DefaultSuccessResponseSchema.extend({
3647
3544
  ...CompanyContractsValidationSchema.getAll.response
3648
3545
  }),
3649
- 400: z49.object({
3650
- message: z49.string()
3546
+ 400: z48.object({
3547
+ message: z48.string()
3651
3548
  }),
3652
- 409: z49.object({
3653
- message: z49.string()
3549
+ 409: z48.object({
3550
+ message: z48.string()
3654
3551
  }),
3655
- 500: z49.object({
3656
- message: z49.string()
3552
+ 500: z48.object({
3553
+ message: z48.string()
3657
3554
  }),
3658
3555
  401: DefaultUnauthorizedSchema,
3659
3556
  404: DefaultNotFoundSchema,
@@ -3665,10 +3562,10 @@ var companyContract = initContract10().router({
3665
3562
 
3666
3563
  // src/contact/index.ts
3667
3564
  import { initContract as initContract11 } from "@ts-rest/core";
3668
- import z52 from "zod";
3565
+ import z51 from "zod";
3669
3566
 
3670
3567
  // src/contact/validation.ts
3671
- import z50 from "zod";
3568
+ import z49 from "zod";
3672
3569
  var addErrorMessage = (field) => {
3673
3570
  return field.refine(
3674
3571
  ({ isRequired, value }) => {
@@ -3686,25 +3583,25 @@ var addErrorMessage = (field) => {
3686
3583
  }
3687
3584
  );
3688
3585
  };
3689
- var BaseSchema2 = z50.object({
3690
- isRequired: z50.boolean(),
3691
- attributeId: z50.string()
3586
+ var BaseSchema2 = z49.object({
3587
+ isRequired: z49.boolean(),
3588
+ attributeId: z49.string()
3692
3589
  });
3693
3590
  var SingleValue = addErrorMessage(
3694
3591
  BaseSchema2.extend({
3695
- value: z50.string()
3592
+ value: z49.string()
3696
3593
  })
3697
3594
  );
3698
3595
  var ContactContractValidationSchema = {
3699
3596
  create: {
3700
- request: z50.object({
3597
+ request: z49.object({
3701
3598
  name: SingleValue,
3702
3599
  email: addErrorMessage(
3703
3600
  BaseSchema2.extend({
3704
- value: z50.array(
3705
- z50.object({
3706
- email: z50.string().email(),
3707
- isPrimary: z50.boolean()
3601
+ value: z49.array(
3602
+ z49.object({
3603
+ email: z49.string().email(),
3604
+ isPrimary: z49.boolean()
3708
3605
  })
3709
3606
  )
3710
3607
  })
@@ -3713,10 +3610,10 @@ var ContactContractValidationSchema = {
3713
3610
  address: SingleValue,
3714
3611
  phone: addErrorMessage(
3715
3612
  BaseSchema2.extend({
3716
- value: z50.array(
3717
- z50.object({
3718
- phone: z50.string(),
3719
- isPrimary: z50.boolean()
3613
+ value: z49.array(
3614
+ z49.object({
3615
+ phone: z49.string(),
3616
+ isPrimary: z49.boolean()
3720
3617
  })
3721
3618
  )
3722
3619
  })
@@ -3724,69 +3621,69 @@ var ContactContractValidationSchema = {
3724
3621
  notes: SingleValue,
3725
3622
  tags: addErrorMessage(
3726
3623
  BaseSchema2.extend({
3727
- value: z50.array(z50.string())
3624
+ value: z49.array(z49.string())
3728
3625
  })
3729
3626
  ),
3730
3627
  company: SingleValue,
3731
- customFields: z50.array(
3628
+ customFields: z49.array(
3732
3629
  addErrorMessage(
3733
3630
  BaseSchema2.extend({
3734
- value: z50.union([z50.string(), z50.array(z50.string())]).nullable(),
3735
- type: z50.string(),
3736
- isDefaultAttribute: z50.boolean()
3631
+ value: z49.union([z49.string(), z49.array(z49.string())]).nullable(),
3632
+ type: z49.string(),
3633
+ isDefaultAttribute: z49.boolean()
3737
3634
  })
3738
3635
  )
3739
3636
  ),
3740
- mailRoomId: z50.string().optional(),
3741
- isTheMailRoomOwner: z50.coerce.boolean().optional()
3637
+ mailRoomId: z49.string().optional(),
3638
+ isTheMailRoomOwner: z49.coerce.boolean().optional()
3742
3639
  }),
3743
- response: z50.string()
3640
+ response: z49.string()
3744
3641
  },
3745
3642
  getById: {
3746
- request: z50.object({
3747
- id: z50.string().uuid()
3643
+ request: z49.object({
3644
+ id: z49.string().uuid()
3748
3645
  }),
3749
3646
  response: ContactSchema
3750
3647
  },
3751
3648
  delete: {
3752
- request: z50.object({
3753
- id: z50.string().uuid()
3649
+ request: z49.object({
3650
+ id: z49.string().uuid()
3754
3651
  }),
3755
- response: z50.string()
3652
+ response: z49.string()
3756
3653
  },
3757
3654
  getAll: {
3758
- request: z50.object({
3759
- page: z50.coerce.number().default(1),
3760
- pageSize: z50.coerce.number().default(10),
3761
- keyword: z50.string().optional(),
3762
- company: z50.array(z50.string().uuid()),
3763
- name: z50.string(),
3764
- address: z50.string(),
3765
- channel: z50.array(z50.string()),
3766
- selectedDate: z50.string(),
3767
- customFields: z50.array(
3768
- z50.object({
3769
- attributeId: z50.string().uuid(),
3770
- type: z50.string(),
3771
- value: z50.union([z50.string(), z50.array(z50.string())])
3655
+ request: z49.object({
3656
+ page: z49.coerce.number().default(1),
3657
+ pageSize: z49.coerce.number().default(10),
3658
+ keyword: z49.string().optional(),
3659
+ company: z49.array(z49.string().uuid()),
3660
+ name: z49.string(),
3661
+ address: z49.string(),
3662
+ channel: z49.array(z49.string()),
3663
+ selectedDate: z49.string(),
3664
+ customFields: z49.array(
3665
+ z49.object({
3666
+ attributeId: z49.string().uuid(),
3667
+ type: z49.string(),
3668
+ value: z49.union([z49.string(), z49.array(z49.string())])
3772
3669
  })
3773
3670
  ),
3774
- tags: z50.array(z50.string().uuid()),
3775
- phone: z50.string(),
3776
- email: z50.string(),
3777
- notes: z50.string()
3671
+ tags: z49.array(z49.string().uuid()),
3672
+ phone: z49.string(),
3673
+ email: z49.string(),
3674
+ notes: z49.string()
3778
3675
  }).partial(),
3779
3676
  response: {
3780
- page: z50.number(),
3781
- pageSize: z50.number(),
3782
- total: z50.number(),
3783
- lastPage: z50.number(),
3784
- data: z50.array(ContactSchema)
3677
+ page: z49.number(),
3678
+ pageSize: z49.number(),
3679
+ total: z49.number(),
3680
+ lastPage: z49.number(),
3681
+ data: z49.array(ContactSchema)
3785
3682
  }
3786
3683
  },
3787
3684
  createContactByPhone: {
3788
- request: z50.object({
3789
- phoneNumber: z50.string().refine(
3685
+ request: z49.object({
3686
+ phoneNumber: z49.string().refine(
3790
3687
  (value) => {
3791
3688
  const numericValue = value.replace(/\s/g, "");
3792
3689
  return /^\d+$/.test(numericValue);
@@ -3799,8 +3696,8 @@ var ContactContractValidationSchema = {
3799
3696
  response: ContactSchema
3800
3697
  },
3801
3698
  createContactPlatform: {
3802
- request: z50.object({
3803
- phoneNumber: z50.string().refine(
3699
+ request: z49.object({
3700
+ phoneNumber: z49.string().refine(
3804
3701
  (value) => {
3805
3702
  const numericValue = value.replace(/\s/g, "");
3806
3703
  return /^\d+$/.test(numericValue);
@@ -3809,15 +3706,15 @@ var ContactContractValidationSchema = {
3809
3706
  message: "Phone number must contain only numeric characters"
3810
3707
  }
3811
3708
  ),
3812
- name: z50.string(),
3813
- channelType: z50.string(),
3814
- channelId: z50.string()
3709
+ name: z49.string(),
3710
+ channelType: z49.string(),
3711
+ channelId: z49.string()
3815
3712
  }),
3816
3713
  response: ContactSchema
3817
3714
  },
3818
3715
  updateContactByPhone: {
3819
- request: z50.object({
3820
- phoneNumber: z50.string().refine(
3716
+ request: z49.object({
3717
+ phoneNumber: z49.string().refine(
3821
3718
  (value) => {
3822
3719
  const numericValue = value.replace(/\s/g, "");
3823
3720
  return /^\d+$/.test(numericValue);
@@ -3830,83 +3727,83 @@ var ContactContractValidationSchema = {
3830
3727
  response: ContactSchema
3831
3728
  },
3832
3729
  updateFromOngoingCall: {
3833
- request: z50.object({
3834
- name: z50.string(),
3835
- companyId: z50.string().uuid()
3730
+ request: z49.object({
3731
+ name: z49.string(),
3732
+ companyId: z49.string().uuid()
3836
3733
  }).partial(),
3837
3734
  response: ContactSchema
3838
3735
  },
3839
3736
  merge: {
3840
- request: z50.object({
3841
- primaryContact: z50.object({
3842
- id: z50.string().uuid(),
3843
- emails: z50.array(
3844
- z50.object({
3845
- email: z50.string().email(),
3846
- isPrimary: z50.boolean()
3737
+ request: z49.object({
3738
+ primaryContact: z49.object({
3739
+ id: z49.string().uuid(),
3740
+ emails: z49.array(
3741
+ z49.object({
3742
+ email: z49.string().email(),
3743
+ isPrimary: z49.boolean()
3847
3744
  })
3848
3745
  ),
3849
- phones: z50.array(
3850
- z50.object({
3851
- phone: z50.string(),
3852
- isPrimary: z50.boolean()
3746
+ phones: z49.array(
3747
+ z49.object({
3748
+ phone: z49.string(),
3749
+ isPrimary: z49.boolean()
3853
3750
  })
3854
3751
  )
3855
3752
  }),
3856
- secondaryContacts: z50.array(z50.string().uuid())
3753
+ secondaryContacts: z49.array(z49.string().uuid())
3857
3754
  }),
3858
3755
  response: ContactSchema
3859
3756
  },
3860
3757
  checkContactPhone: {
3861
- request: z50.object({
3862
- contactId: z50.string().uuid().optional(),
3863
- phoneNumber: z50.string()
3758
+ request: z49.object({
3759
+ contactId: z49.string().uuid().optional(),
3760
+ phoneNumber: z49.string()
3864
3761
  }),
3865
- response: z50.boolean()
3762
+ response: z49.boolean()
3866
3763
  },
3867
3764
  checkContactEmail: {
3868
- request: z50.object({
3869
- contactId: z50.string().uuid().optional(),
3870
- email: z50.string()
3765
+ request: z49.object({
3766
+ contactId: z49.string().uuid().optional(),
3767
+ email: z49.string()
3871
3768
  }),
3872
- response: z50.boolean()
3769
+ response: z49.boolean()
3873
3770
  },
3874
3771
  filterContacts: {
3875
- request: z50.object({
3876
- page: z50.coerce.number().default(1),
3877
- pageSize: z50.coerce.number().default(10),
3878
- keyword: z50.string(),
3879
- channelType: z50.string(),
3880
- channelIds: z50.array(z50.string()),
3881
- withEmail: z50.coerce.boolean().default(false),
3882
- relations: z50.array(
3883
- z50.union([
3884
- z50.literal("company"),
3885
- z50.literal("contactEmails"),
3886
- z50.literal("contactPhones"),
3887
- z50.literal("platformContacts")
3772
+ request: z49.object({
3773
+ page: z49.coerce.number().default(1),
3774
+ pageSize: z49.coerce.number().default(10),
3775
+ keyword: z49.string(),
3776
+ channelType: z49.string(),
3777
+ channelIds: z49.array(z49.string()),
3778
+ withEmail: z49.coerce.boolean().default(false),
3779
+ relations: z49.array(
3780
+ z49.union([
3781
+ z49.literal("company"),
3782
+ z49.literal("contactEmails"),
3783
+ z49.literal("contactPhones"),
3784
+ z49.literal("platformContacts")
3888
3785
  ])
3889
3786
  ).optional()
3890
3787
  }).partial(),
3891
3788
  response: {
3892
- page: z50.number(),
3893
- pageSize: z50.number(),
3894
- total: z50.number(),
3895
- lastPage: z50.number(),
3896
- data: z50.array(ContactSchema)
3789
+ page: z49.number(),
3790
+ pageSize: z49.number(),
3791
+ total: z49.number(),
3792
+ lastPage: z49.number(),
3793
+ data: z49.array(ContactSchema)
3897
3794
  }
3898
3795
  },
3899
3796
  addAttachments: {
3900
- request: z50.object({
3901
- contactId: z50.string(),
3902
- attributeId: z50.string().uuid(),
3903
- contactAttachmentRecords: z50.array(
3904
- z50.object({
3905
- bucketName: z50.string(),
3906
- fileKey: z50.string(),
3907
- fileName: z50.string(),
3908
- fileSize: z50.coerce.number(),
3909
- url: z50.string()
3797
+ request: z49.object({
3798
+ contactId: z49.string(),
3799
+ attributeId: z49.string().uuid(),
3800
+ contactAttachmentRecords: z49.array(
3801
+ z49.object({
3802
+ bucketName: z49.string(),
3803
+ fileKey: z49.string(),
3804
+ fileName: z49.string(),
3805
+ fileSize: z49.coerce.number(),
3806
+ url: z49.string()
3910
3807
  })
3911
3808
  )
3912
3809
  }),
@@ -3915,8 +3812,8 @@ var ContactContractValidationSchema = {
3915
3812
  };
3916
3813
 
3917
3814
  // src/export/validation.ts
3918
- import z51 from "zod";
3919
- var ExportFileExtensionSchema = z51.union([z51.literal("csv"), z51.literal("xlsx")]).default("csv").optional();
3815
+ import z50 from "zod";
3816
+ var ExportFileExtensionSchema = z50.union([z50.literal("csv"), z50.literal("xlsx")]).default("csv").optional();
3920
3817
 
3921
3818
  // src/contact/index.ts
3922
3819
  var contactContract = initContract11().router(
@@ -3929,14 +3826,14 @@ var contactContract = initContract11().router(
3929
3826
  201: DefaultSuccessResponseSchema.extend({
3930
3827
  data: ContactSchema
3931
3828
  }),
3932
- 400: z52.object({
3933
- message: z52.string()
3829
+ 400: z51.object({
3830
+ message: z51.string()
3934
3831
  }),
3935
- 409: z52.object({
3936
- message: z52.string()
3832
+ 409: z51.object({
3833
+ message: z51.string()
3937
3834
  }),
3938
- 500: z52.object({
3939
- message: z52.string()
3835
+ 500: z51.object({
3836
+ message: z51.string()
3940
3837
  }),
3941
3838
  401: DefaultUnauthorizedSchema,
3942
3839
  404: DefaultNotFoundSchema,
@@ -3952,14 +3849,14 @@ var contactContract = initContract11().router(
3952
3849
  200: DefaultSuccessResponseSchema.extend(
3953
3850
  ContactContractValidationSchema.getAll.response
3954
3851
  ),
3955
- 400: z52.object({
3956
- message: z52.string()
3852
+ 400: z51.object({
3853
+ message: z51.string()
3957
3854
  }),
3958
- 409: z52.object({
3959
- message: z52.string()
3855
+ 409: z51.object({
3856
+ message: z51.string()
3960
3857
  }),
3961
- 500: z52.object({
3962
- message: z52.string()
3858
+ 500: z51.object({
3859
+ message: z51.string()
3963
3860
  }),
3964
3861
  401: DefaultUnauthorizedSchema,
3965
3862
  404: DefaultNotFoundSchema,
@@ -3975,14 +3872,14 @@ var contactContract = initContract11().router(
3975
3872
  200: DefaultSuccessResponseSchema.extend(
3976
3873
  ContactContractValidationSchema.filterContacts.response
3977
3874
  ),
3978
- 400: z52.object({
3979
- message: z52.string()
3875
+ 400: z51.object({
3876
+ message: z51.string()
3980
3877
  }),
3981
- 409: z52.object({
3982
- message: z52.string()
3878
+ 409: z51.object({
3879
+ message: z51.string()
3983
3880
  }),
3984
- 500: z52.object({
3985
- message: z52.string()
3881
+ 500: z51.object({
3882
+ message: z51.string()
3986
3883
  }),
3987
3884
  401: DefaultUnauthorizedSchema,
3988
3885
  404: DefaultNotFoundSchema,
@@ -3998,14 +3895,14 @@ var contactContract = initContract11().router(
3998
3895
  200: DefaultSuccessResponseSchema.extend({
3999
3896
  data: ContactContractValidationSchema.getById.response
4000
3897
  }),
4001
- 400: z52.object({
4002
- message: z52.string()
3898
+ 400: z51.object({
3899
+ message: z51.string()
4003
3900
  }),
4004
- 409: z52.object({
4005
- message: z52.string()
3901
+ 409: z51.object({
3902
+ message: z51.string()
4006
3903
  }),
4007
- 500: z52.object({
4008
- message: z52.string()
3904
+ 500: z51.object({
3905
+ message: z51.string()
4009
3906
  }),
4010
3907
  401: DefaultUnauthorizedSchema,
4011
3908
  404: DefaultNotFoundSchema,
@@ -4022,14 +3919,14 @@ var contactContract = initContract11().router(
4022
3919
  200: DefaultSuccessResponseSchema.extend({
4023
3920
  message: ContactContractValidationSchema.delete.response
4024
3921
  }),
4025
- 400: z52.object({
4026
- message: z52.string()
3922
+ 400: z51.object({
3923
+ message: z51.string()
4027
3924
  }),
4028
- 409: z52.object({
4029
- message: z52.string()
3925
+ 409: z51.object({
3926
+ message: z51.string()
4030
3927
  }),
4031
- 500: z52.object({
4032
- message: z52.string()
3928
+ 500: z51.object({
3929
+ message: z51.string()
4033
3930
  }),
4034
3931
  401: DefaultUnauthorizedSchema,
4035
3932
  404: DefaultNotFoundSchema,
@@ -4045,14 +3942,14 @@ var contactContract = initContract11().router(
4045
3942
  201: DefaultSuccessResponseSchema.extend({
4046
3943
  data: ContactContractValidationSchema.createContactByPhone.response
4047
3944
  }),
4048
- 400: z52.object({
4049
- message: z52.string()
3945
+ 400: z51.object({
3946
+ message: z51.string()
4050
3947
  }),
4051
- 409: z52.object({
4052
- message: z52.string()
3948
+ 409: z51.object({
3949
+ message: z51.string()
4053
3950
  }),
4054
- 500: z52.object({
4055
- message: z52.string()
3951
+ 500: z51.object({
3952
+ message: z51.string()
4056
3953
  }),
4057
3954
  401: DefaultUnauthorizedSchema,
4058
3955
  404: DefaultNotFoundSchema,
@@ -4071,14 +3968,14 @@ var contactContract = initContract11().router(
4071
3968
  201: DefaultSuccessResponseSchema.extend({
4072
3969
  data: ContactContractValidationSchema.createContactPlatform.response
4073
3970
  }),
4074
- 400: z52.object({
4075
- message: z52.string()
3971
+ 400: z51.object({
3972
+ message: z51.string()
4076
3973
  }),
4077
- 409: z52.object({
4078
- message: z52.string()
3974
+ 409: z51.object({
3975
+ message: z51.string()
4079
3976
  }),
4080
- 500: z52.object({
4081
- message: z52.string()
3977
+ 500: z51.object({
3978
+ message: z51.string()
4082
3979
  }),
4083
3980
  401: DefaultUnauthorizedSchema,
4084
3981
  404: DefaultNotFoundSchema,
@@ -4094,14 +3991,14 @@ var contactContract = initContract11().router(
4094
3991
  201: DefaultSuccessResponseSchema.extend({
4095
3992
  data: ContactContractValidationSchema.updateFromOngoingCall.response
4096
3993
  }),
4097
- 400: z52.object({
4098
- message: z52.string()
3994
+ 400: z51.object({
3995
+ message: z51.string()
4099
3996
  }),
4100
- 409: z52.object({
4101
- message: z52.string()
3997
+ 409: z51.object({
3998
+ message: z51.string()
4102
3999
  }),
4103
- 500: z52.object({
4104
- message: z52.string()
4000
+ 500: z51.object({
4001
+ message: z51.string()
4105
4002
  }),
4106
4003
  401: DefaultUnauthorizedSchema,
4107
4004
  404: DefaultNotFoundSchema,
@@ -4117,14 +4014,14 @@ var contactContract = initContract11().router(
4117
4014
  200: DefaultSuccessResponseSchema.extend({
4118
4015
  data: ContactContractValidationSchema.merge.response
4119
4016
  }),
4120
- 400: z52.object({
4121
- message: z52.string()
4017
+ 400: z51.object({
4018
+ message: z51.string()
4122
4019
  }),
4123
- 409: z52.object({
4124
- message: z52.string()
4020
+ 409: z51.object({
4021
+ message: z51.string()
4125
4022
  }),
4126
- 500: z52.object({
4127
- message: z52.string()
4023
+ 500: z51.object({
4024
+ message: z51.string()
4128
4025
  }),
4129
4026
  401: DefaultUnauthorizedSchema,
4130
4027
  404: DefaultNotFoundSchema,
@@ -4140,14 +4037,14 @@ var contactContract = initContract11().router(
4140
4037
  200: DefaultSuccessResponseSchema.extend({
4141
4038
  existed: ContactContractValidationSchema.checkContactPhone.response
4142
4039
  }),
4143
- 400: z52.object({
4144
- message: z52.string()
4040
+ 400: z51.object({
4041
+ message: z51.string()
4145
4042
  }),
4146
- 409: z52.object({
4147
- message: z52.string()
4043
+ 409: z51.object({
4044
+ message: z51.string()
4148
4045
  }),
4149
- 500: z52.object({
4150
- message: z52.string()
4046
+ 500: z51.object({
4047
+ message: z51.string()
4151
4048
  }),
4152
4049
  401: DefaultUnauthorizedSchema,
4153
4050
  404: DefaultNotFoundSchema,
@@ -4163,14 +4060,14 @@ var contactContract = initContract11().router(
4163
4060
  200: DefaultSuccessResponseSchema.extend({
4164
4061
  existed: ContactContractValidationSchema.checkContactEmail.response
4165
4062
  }),
4166
- 400: z52.object({
4167
- message: z52.string()
4063
+ 400: z51.object({
4064
+ message: z51.string()
4168
4065
  }),
4169
- 409: z52.object({
4170
- message: z52.string()
4066
+ 409: z51.object({
4067
+ message: z51.string()
4171
4068
  }),
4172
- 500: z52.object({
4173
- message: z52.string()
4069
+ 500: z51.object({
4070
+ message: z51.string()
4174
4071
  }),
4175
4072
  401: DefaultUnauthorizedSchema,
4176
4073
  404: DefaultNotFoundSchema,
@@ -4187,14 +4084,14 @@ var contactContract = initContract11().router(
4187
4084
  201: DefaultSuccessResponseSchema.extend({
4188
4085
  message: ContactCustomFieldSchema
4189
4086
  }),
4190
- 400: z52.object({
4191
- message: z52.string()
4087
+ 400: z51.object({
4088
+ message: z51.string()
4192
4089
  }),
4193
- 409: z52.object({
4194
- message: z52.string()
4090
+ 409: z51.object({
4091
+ message: z51.string()
4195
4092
  }),
4196
- 500: z52.object({
4197
- message: z52.string()
4093
+ 500: z51.object({
4094
+ message: z51.string()
4198
4095
  }),
4199
4096
  401: DefaultUnauthorizedSchema,
4200
4097
  404: DefaultNotFoundSchema,
@@ -4210,14 +4107,14 @@ var contactContract = initContract11().router(
4210
4107
  200: DefaultSuccessResponseSchema.extend({
4211
4108
  data: ContactContractValidationSchema.getById.response
4212
4109
  }),
4213
- 400: z52.object({
4214
- message: z52.string()
4110
+ 400: z51.object({
4111
+ message: z51.string()
4215
4112
  }),
4216
- 409: z52.object({
4217
- message: z52.string()
4113
+ 409: z51.object({
4114
+ message: z51.string()
4218
4115
  }),
4219
- 500: z52.object({
4220
- message: z52.string()
4116
+ 500: z51.object({
4117
+ message: z51.string()
4221
4118
  }),
4222
4119
  401: DefaultUnauthorizedSchema,
4223
4120
  404: DefaultNotFoundSchema,
@@ -4233,8 +4130,8 @@ var contactContract = initContract11().router(
4233
4130
  }),
4234
4131
  responses: {
4235
4132
  200: null,
4236
- 400: z52.object({
4237
- message: z52.string()
4133
+ 400: z51.object({
4134
+ message: z51.string()
4238
4135
  }),
4239
4136
  401: DefaultUnauthorizedSchema,
4240
4137
  404: DefaultNotFoundSchema
@@ -4249,30 +4146,30 @@ var contactContract = initContract11().router(
4249
4146
 
4250
4147
  // src/cx-log/index.ts
4251
4148
  import { initContract as initContract12 } from "@ts-rest/core";
4252
- import z54 from "zod";
4149
+ import z53 from "zod";
4253
4150
 
4254
4151
  // src/cx-log/validation.ts
4255
- import z53 from "zod";
4256
- var sentimentScoreSchema = z53.union([
4257
- z53.literal("positive"),
4258
- z53.literal("neutral"),
4259
- z53.literal("negative")
4152
+ import z52 from "zod";
4153
+ var sentimentScoreSchema = z52.union([
4154
+ z52.literal("positive"),
4155
+ z52.literal("neutral"),
4156
+ z52.literal("negative")
4260
4157
  ]);
4261
- var CustomFieldQueryParamsSchema = z53.object({
4262
- attributeId: z53.string(),
4263
- value: z53.union([z53.string(), z53.array(z53.string())]),
4264
- type: z53.string().optional()
4158
+ var CustomFieldQueryParamsSchema = z52.object({
4159
+ attributeId: z52.string(),
4160
+ value: z52.union([z52.string(), z52.array(z52.string())]),
4161
+ type: z52.string().optional()
4265
4162
  });
4266
4163
  var GetAllCxLogQueryParamsSchema = DefaultQueryParamsSchema.extend({
4267
- contactId: z53.string().uuid(),
4268
- caseId: z53.string(),
4269
- channelIds: z53.array(z53.string().uuid()),
4270
- trunks: z53.array(z53.string()),
4271
- queueId: z53.array(z53.string()),
4272
- agentIds: z53.union([
4273
- z53.array(z53.string()),
4164
+ contactId: z52.string().uuid(),
4165
+ caseId: z52.string(),
4166
+ channelIds: z52.array(z52.string().uuid()),
4167
+ trunks: z52.array(z52.string()),
4168
+ queueId: z52.array(z52.string()),
4169
+ agentIds: z52.union([
4170
+ z52.array(z52.string()),
4274
4171
  // If it's an array
4275
- z53.record(z53.string())
4172
+ z52.record(z52.string())
4276
4173
  // If it's an object
4277
4174
  ]).transform((val) => {
4278
4175
  if (Array.isArray(val)) {
@@ -4280,28 +4177,28 @@ var GetAllCxLogQueryParamsSchema = DefaultQueryParamsSchema.extend({
4280
4177
  }
4281
4178
  return Object.values(val);
4282
4179
  }),
4283
- direction: z53.array(z53.union([z53.literal("inbound"), z53.literal("outbound")])),
4284
- disposition: z53.array(z53.string()),
4285
- sentimentScore: z53.array(sentimentScoreSchema),
4286
- csatScore: z53.array(z53.string()),
4287
- sla: z53.union([z53.literal("meet"), z53.literal("unmeet")]),
4288
- tags: z53.array(z53.string()),
4180
+ direction: z52.array(z52.union([z52.literal("inbound"), z52.literal("outbound")])),
4181
+ disposition: z52.array(z52.string()),
4182
+ sentimentScore: z52.array(sentimentScoreSchema),
4183
+ csatScore: z52.array(z52.string()),
4184
+ sla: z52.union([z52.literal("meet"), z52.literal("unmeet")]),
4185
+ tags: z52.array(z52.string()),
4289
4186
  // General tags
4290
4187
  // Default contact attributes
4291
- name: z53.string(),
4292
- contactLabels: z53.array(z53.string()),
4293
- email: z53.string(),
4294
- channel: z53.array(z53.string()),
4295
- phone: z53.string(),
4296
- notes: z53.string(),
4297
- address: z53.string(),
4298
- company: z53.array(z53.string()),
4188
+ name: z52.string(),
4189
+ contactLabels: z52.array(z52.string()),
4190
+ email: z52.string(),
4191
+ channel: z52.array(z52.string()),
4192
+ phone: z52.string(),
4193
+ notes: z52.string(),
4194
+ address: z52.string(),
4195
+ company: z52.array(z52.string()),
4299
4196
  // Custom fields
4300
- contactCustomFields: z53.array(CustomFieldQueryParamsSchema),
4301
- wrapUpFormCustomFields: z53.array(CustomFieldQueryParamsSchema),
4197
+ contactCustomFields: z52.array(CustomFieldQueryParamsSchema),
4198
+ wrapUpFormCustomFields: z52.array(CustomFieldQueryParamsSchema),
4302
4199
  // Date filter
4303
- selectedDate: z53.string(),
4304
- uid: z53.string()
4200
+ selectedDate: z52.string(),
4201
+ uid: z52.string()
4305
4202
  }).partial();
4306
4203
 
4307
4204
  // src/cx-log/index.ts
@@ -4312,10 +4209,10 @@ var cxLogContract = initContract12().router({
4312
4209
  headers: DefaultHeaderSchema,
4313
4210
  responses: {
4314
4211
  200: DefaultSuccessResponseSchema.extend({
4315
- total: z54.number(),
4316
- page: z54.number(),
4317
- pageSize: z54.number(),
4318
- cxLogs: z54.array(CxLogSchemaWithRelations)
4212
+ total: z53.number(),
4213
+ page: z53.number(),
4214
+ pageSize: z53.number(),
4215
+ cxLogs: z53.array(CxLogSchemaWithRelations)
4319
4216
  }),
4320
4217
  401: DefaultUnauthorizedSchema
4321
4218
  },
@@ -4331,7 +4228,7 @@ var cxLogContract = initContract12().router({
4331
4228
  401: DefaultUnauthorizedSchema
4332
4229
  },
4333
4230
  // IMPORTANT: THIS SHOULD BE Z.ANY(). DO NOT CHANGE!
4334
- query: z54.any(),
4231
+ query: z53.any(),
4335
4232
  summary: "Export cx-logs"
4336
4233
  },
4337
4234
  syncSla: {
@@ -4349,10 +4246,10 @@ var cxLogContract = initContract12().router({
4349
4246
  updateSla: {
4350
4247
  method: "POST",
4351
4248
  path: "/ms/cx-logs",
4352
- headers: z54.object({
4249
+ headers: z53.object({
4353
4250
  // biome-ignore lint/style/useNamingConvention: <explanation>
4354
- "x-tenant": z54.string({ required_error: "Tenant id is required" }),
4355
- "x-code": z54.string().uuid().optional()
4251
+ "x-tenant": z53.string({ required_error: "Tenant id is required" }),
4252
+ "x-code": z53.string().uuid().optional()
4356
4253
  }),
4357
4254
  responses: {
4358
4255
  200: null,
@@ -4360,9 +4257,9 @@ var cxLogContract = initContract12().router({
4360
4257
  404: DefaultNotFoundSchema,
4361
4258
  500: DefaultErrorResponseSchema
4362
4259
  },
4363
- body: z54.object({
4364
- roomId: z54.string().uuid(),
4365
- slaStatus: z54.enum(["meet", "unmeet", "-"])
4260
+ body: z53.object({
4261
+ roomId: z53.string().uuid(),
4262
+ slaStatus: z53.enum(["meet", "unmeet", "-"])
4366
4263
  })
4367
4264
  }
4368
4265
  });
@@ -4371,289 +4268,289 @@ var cxLogContract = initContract12().router({
4371
4268
  import { initContract as initContract13 } from "@ts-rest/core";
4372
4269
 
4373
4270
  // src/dashboard/validation.ts
4374
- import z55 from "zod";
4375
- var GetDashboardQueryParamsSchema = z55.object({
4376
- channelIds: z55.array(z55.string().uuid()).optional(),
4377
- selectedDate: z55.string().min(1)
4271
+ import z54 from "zod";
4272
+ var GetDashboardQueryParamsSchema = z54.object({
4273
+ channelIds: z54.array(z54.string().uuid()).optional(),
4274
+ selectedDate: z54.string().min(1)
4378
4275
  });
4379
4276
  var GetMessageChannelQueryParamsSchema = GetDashboardQueryParamsSchema.extend({
4380
- time: z55.enum(["byDay", "byMonth", "byHour"]),
4381
- channelIds: z55.array(z55.string()).optional()
4277
+ time: z54.enum(["byDay", "byMonth", "byHour"]),
4278
+ channelIds: z54.array(z54.string()).optional()
4382
4279
  });
4383
- var DashboardGlobalFiltersSchema = z55.object({
4384
- automationQueueId: z55.string().uuid().optional(),
4385
- selectedDate: z55.string().min(1),
4386
- channelIds: z55.array(z55.string().uuid()).optional()
4280
+ var DashboardGlobalFiltersSchema = z54.object({
4281
+ automationQueueId: z54.string().uuid().optional(),
4282
+ selectedDate: z54.string().min(1),
4283
+ channelIds: z54.array(z54.string().uuid()).optional()
4387
4284
  });
4388
4285
  var DashboardQueryParamsSchema = GetDashboardQueryParamsSchema.extend({
4389
- automationQueueId: z55.string().uuid().optional(),
4390
- channelIds: z55.array(z55.string().uuid()).optional(),
4391
- agentIds: z55.array(z55.string().uuid()).optional()
4286
+ automationQueueId: z54.string().uuid().optional(),
4287
+ channelIds: z54.array(z54.string().uuid()).optional(),
4288
+ agentIds: z54.array(z54.string().uuid()).optional()
4392
4289
  });
4393
4290
  var GetDashboardQueryDetailParamsSchema = GetDashboardQueryParamsSchema.merge(
4394
- z55.object({
4395
- agentId: z55.string().uuid().optional()
4291
+ z54.object({
4292
+ agentId: z54.string().uuid().optional()
4396
4293
  })
4397
4294
  ).optional();
4398
4295
  var GetDashboardInOutQueryParamsSchema = GetDashboardQueryParamsSchema.merge(
4399
- z55.object({
4400
- direction: z55.string().optional()
4296
+ z54.object({
4297
+ direction: z54.string().optional()
4401
4298
  })
4402
4299
  );
4403
- var CallCountsQuerySchema = z55.object({
4404
- agentIds: z55.array(z55.string().uuid()).optional(),
4405
- userId: z55.string().uuid().optional(),
4406
- types: z55.array(z55.string()).optional(),
4407
- selectedDate: z55.string().optional()
4300
+ var CallCountsQuerySchema = z54.object({
4301
+ agentIds: z54.array(z54.string().uuid()).optional(),
4302
+ userId: z54.string().uuid().optional(),
4303
+ types: z54.array(z54.string()).optional(),
4304
+ selectedDate: z54.string().optional()
4408
4305
  });
4409
- var MessageDashboardDetailsQuerySchema = z55.object({
4410
- automationQueueId: z55.string().uuid().optional(),
4411
- selectedDate: z55.string().min(1),
4412
- channelIds: z55.array(z55.string().uuid()).optional()
4306
+ var MessageDashboardDetailsQuerySchema = z54.object({
4307
+ automationQueueId: z54.string().uuid().optional(),
4308
+ selectedDate: z54.string().min(1),
4309
+ channelIds: z54.array(z54.string().uuid()).optional()
4413
4310
  });
4414
- var ChannelCountsFilterSchema = z55.union([z55.literal("channelName"), z55.literal("channelType")]).default("channelName").optional();
4311
+ var ChannelCountsFilterSchema = z54.union([z54.literal("channelName"), z54.literal("channelType")]).default("channelName").optional();
4415
4312
 
4416
4313
  // src/dashboard/index.ts
4417
- import z57 from "zod";
4314
+ import z56 from "zod";
4418
4315
 
4419
4316
  // src/dashboard/schema.ts
4420
- import z56 from "zod";
4421
- var InboundCountSchema = z56.object({
4422
- totalCallCount: z56.number(),
4423
- answeredCallCount: z56.number(),
4424
- missedCallCount: z56.number()
4425
- });
4426
- var OutboundCountSchema = z56.object({
4427
- totalCallCount: z56.number(),
4428
- answeredCallCount: z56.number(),
4429
- noAnsweredCallCount: z56.number()
4430
- });
4431
- var TwoAxiosCountSchema = z56.object({
4432
- x: z56.string(),
4433
- y: z56.string()
4434
- });
4435
- var ReceivedTicketCountDataSchema = z56.object({
4436
- name: z56.string(),
4437
- data: z56.array(TwoAxiosCountSchema)
4438
- });
4439
- var ResolvedTicketCountDataSchema = z56.object({
4440
- name: z56.string(),
4441
- data: z56.array(TwoAxiosCountSchema)
4442
- });
4443
- var TotalCallLogCountDataSchema = z56.object({
4444
- name: z56.string(),
4445
- data: z56.array(TwoAxiosCountSchema)
4446
- });
4447
- var AnsweredCallLogCountDataSchema = z56.object({
4448
- name: z56.string(),
4449
- data: z56.array(TwoAxiosCountSchema)
4450
- });
4451
- var CallLogCountByResultDaumSchema = z56.object({
4452
- result: z56.string(),
4453
- count: z56.string()
4454
- });
4455
- var DashboardDataSchema = z56.object({
4456
- receivedTicketCount: z56.number(),
4457
- pendingTicketCount: z56.number(),
4458
- openTicketCount: z56.number(),
4459
- resolvedTicketCount: z56.number(),
4460
- unResolvedTicketCount: z56.number(),
4461
- closedTicketCount: z56.number(),
4462
- unAssignedTicketCount: z56.number(),
4317
+ import z55 from "zod";
4318
+ var InboundCountSchema = z55.object({
4319
+ totalCallCount: z55.number(),
4320
+ answeredCallCount: z55.number(),
4321
+ missedCallCount: z55.number()
4322
+ });
4323
+ var OutboundCountSchema = z55.object({
4324
+ totalCallCount: z55.number(),
4325
+ answeredCallCount: z55.number(),
4326
+ noAnsweredCallCount: z55.number()
4327
+ });
4328
+ var TwoAxiosCountSchema = z55.object({
4329
+ x: z55.string(),
4330
+ y: z55.string()
4331
+ });
4332
+ var ReceivedTicketCountDataSchema = z55.object({
4333
+ name: z55.string(),
4334
+ data: z55.array(TwoAxiosCountSchema)
4335
+ });
4336
+ var ResolvedTicketCountDataSchema = z55.object({
4337
+ name: z55.string(),
4338
+ data: z55.array(TwoAxiosCountSchema)
4339
+ });
4340
+ var TotalCallLogCountDataSchema = z55.object({
4341
+ name: z55.string(),
4342
+ data: z55.array(TwoAxiosCountSchema)
4343
+ });
4344
+ var AnsweredCallLogCountDataSchema = z55.object({
4345
+ name: z55.string(),
4346
+ data: z55.array(TwoAxiosCountSchema)
4347
+ });
4348
+ var CallLogCountByResultDaumSchema = z55.object({
4349
+ result: z55.string(),
4350
+ count: z55.string()
4351
+ });
4352
+ var DashboardDataSchema = z55.object({
4353
+ receivedTicketCount: z55.number(),
4354
+ pendingTicketCount: z55.number(),
4355
+ openTicketCount: z55.number(),
4356
+ resolvedTicketCount: z55.number(),
4357
+ unResolvedTicketCount: z55.number(),
4358
+ closedTicketCount: z55.number(),
4359
+ unAssignedTicketCount: z55.number(),
4463
4360
  receivedTicketCountData: ReceivedTicketCountDataSchema,
4464
4361
  resolvedTicketCountData: ResolvedTicketCountDataSchema
4465
4362
  });
4466
4363
  var DashboardDataWithCallSchema = DashboardDataSchema.extend({
4467
- missedCallCount: z56.number(),
4468
- answeredCallCount: z56.number(),
4469
- noAnsweredCallCount: z56.number(),
4470
- totalCallCount: z56.number(),
4364
+ missedCallCount: z55.number(),
4365
+ answeredCallCount: z55.number(),
4366
+ noAnsweredCallCount: z55.number(),
4367
+ totalCallCount: z55.number(),
4471
4368
  inbound: InboundCountSchema,
4472
4369
  outbound: OutboundCountSchema,
4473
4370
  totalCallLogCountData: TotalCallLogCountDataSchema,
4474
4371
  answeredCallLogCountData: AnsweredCallLogCountDataSchema,
4475
- callLogCountByResultData: z56.array(CallLogCountByResultDaumSchema).optional()
4476
- });
4477
- var TotalTelephonyQueueCallCountListSchema = z56.object({
4478
- totalQueueCall: z56.number(),
4479
- totalMissedQueueCall: z56.number(),
4480
- totalAnsweredQueueCall: z56.number(),
4481
- totalAbandonedQueueCall: z56.number(),
4482
- totalAverageRingDuration: z56.number(),
4483
- totalAverageTalkDuration: z56.number(),
4484
- totalAverageCallDuration: z56.number(),
4485
- totalSla: z56.number(),
4486
- totalMissedCallPercent: z56.string(),
4487
- totalMaximumRingDuration: z56.number()
4488
- });
4489
- var TelephonyQueueCallCountListSchema = z56.object({
4490
- totalQueueCall: z56.number(),
4491
- totalMissedQueueCall: z56.number(),
4492
- totalAnsweredQueueCall: z56.number(),
4493
- totalAbandonedQueueCall: z56.number(),
4494
- totalAverageTalkDuration: z56.number(),
4495
- totalAverageCallDuration: z56.number(),
4496
- totalAverageRingDuration: z56.number(),
4497
- totalSla: z56.number(),
4498
- totalMissedCallPercent: z56.string(),
4499
- totalMaximumRingDuration: z56.number()
4500
- });
4501
- var TelephonyQueueCallCountListByQueueNumberSchema = z56.object({
4502
- queueNumber: z56.string(),
4503
- queueName: z56.string(),
4372
+ callLogCountByResultData: z55.array(CallLogCountByResultDaumSchema).optional()
4373
+ });
4374
+ var TotalTelephonyQueueCallCountListSchema = z55.object({
4375
+ totalQueueCall: z55.number(),
4376
+ totalMissedQueueCall: z55.number(),
4377
+ totalAnsweredQueueCall: z55.number(),
4378
+ totalAbandonedQueueCall: z55.number(),
4379
+ totalAverageRingDuration: z55.number(),
4380
+ totalAverageTalkDuration: z55.number(),
4381
+ totalAverageCallDuration: z55.number(),
4382
+ totalSla: z55.number(),
4383
+ totalMissedCallPercent: z55.string(),
4384
+ totalMaximumRingDuration: z55.number()
4385
+ });
4386
+ var TelephonyQueueCallCountListSchema = z55.object({
4387
+ totalQueueCall: z55.number(),
4388
+ totalMissedQueueCall: z55.number(),
4389
+ totalAnsweredQueueCall: z55.number(),
4390
+ totalAbandonedQueueCall: z55.number(),
4391
+ totalAverageTalkDuration: z55.number(),
4392
+ totalAverageCallDuration: z55.number(),
4393
+ totalAverageRingDuration: z55.number(),
4394
+ totalSla: z55.number(),
4395
+ totalMissedCallPercent: z55.string(),
4396
+ totalMaximumRingDuration: z55.number()
4397
+ });
4398
+ var TelephonyQueueCallCountListByQueueNumberSchema = z55.object({
4399
+ queueNumber: z55.string(),
4400
+ queueName: z55.string(),
4504
4401
  yeastarQueueCallCountList: TelephonyQueueCallCountListSchema
4505
4402
  });
4506
- var queueCallDashboardDataSchema = z56.object({
4403
+ var queueCallDashboardDataSchema = z55.object({
4507
4404
  totalTelephonyQueueCallCountList: TotalTelephonyQueueCallCountListSchema,
4508
- telephonyQueueCallCountListByQueueNumber: z56.array(
4405
+ telephonyQueueCallCountListByQueueNumber: z55.array(
4509
4406
  TelephonyQueueCallCountListByQueueNumberSchema
4510
4407
  )
4511
4408
  });
4512
- var TotalQueueLiveCallStatusSchema = z56.object({
4513
- activeCallCount: z56.number(),
4514
- waitingCallCount: z56.number()
4409
+ var TotalQueueLiveCallStatusSchema = z55.object({
4410
+ activeCallCount: z55.number(),
4411
+ waitingCallCount: z55.number()
4515
4412
  });
4516
- var QueueLiveCallListByQueueSchema = z56.object({
4517
- queueNumber: z56.string(),
4518
- activeCallCount: z56.number(),
4519
- waitingCallCount: z56.number()
4413
+ var QueueLiveCallListByQueueSchema = z55.object({
4414
+ queueNumber: z55.string(),
4415
+ activeCallCount: z55.number(),
4416
+ waitingCallCount: z55.number()
4520
4417
  });
4521
- var queueLiveCallCountListSchema = z56.object({
4418
+ var queueLiveCallCountListSchema = z55.object({
4522
4419
  totalQueueLiveCallStatus: TotalQueueLiveCallStatusSchema,
4523
- queueLiveCallListByQueue: z56.array(QueueLiveCallListByQueueSchema)
4524
- });
4525
- var TicketCountByStatusSchema = z56.object({
4526
- total: z56.number(),
4527
- open: z56.number(),
4528
- pending: z56.number(),
4529
- duration: z56.object({
4530
- day: z56.string().nullable(),
4531
- hour: z56.string().nullable()
4420
+ queueLiveCallListByQueue: z55.array(QueueLiveCallListByQueueSchema)
4421
+ });
4422
+ var TicketCountByStatusSchema = z55.object({
4423
+ total: z55.number(),
4424
+ open: z55.number(),
4425
+ pending: z55.number(),
4426
+ duration: z55.object({
4427
+ day: z55.string().nullable(),
4428
+ hour: z55.string().nullable()
4532
4429
  }),
4533
- solved: z56.number(),
4534
- others: z56.number(),
4535
- closed: z56.number(),
4536
- unassigneed: z56.number()
4537
- });
4538
- var ExpiredTicketSchema = z56.array(
4539
- z56.object({
4540
- id: z56.string(),
4541
- ticketNumber: z56.number(),
4542
- title: z56.string(),
4543
- priority: z56.string(),
4544
- expiredDays: z56.number()
4430
+ solved: z55.number(),
4431
+ others: z55.number(),
4432
+ closed: z55.number(),
4433
+ unassigneed: z55.number()
4434
+ });
4435
+ var ExpiredTicketSchema = z55.array(
4436
+ z55.object({
4437
+ id: z55.string(),
4438
+ ticketNumber: z55.number(),
4439
+ title: z55.string(),
4440
+ priority: z55.string(),
4441
+ expiredDays: z55.number()
4545
4442
  })
4546
4443
  );
4547
- var TagCountSchema = z56.object({
4548
- id: z56.string(),
4549
- name: z56.string(),
4550
- count: z56.number()
4551
- });
4552
- var TagCountObjSchema = z56.array(TagCountSchema);
4553
- var MessageCountsByChannelObjSchema = z56.record(
4554
- z56.array(
4555
- z56.object({
4556
- platform: z56.string(),
4557
- messageCount: z56.number()
4444
+ var TagCountSchema = z55.object({
4445
+ id: z55.string(),
4446
+ name: z55.string(),
4447
+ count: z55.number()
4448
+ });
4449
+ var TagCountObjSchema = z55.array(TagCountSchema);
4450
+ var MessageCountsByChannelObjSchema = z55.record(
4451
+ z55.array(
4452
+ z55.object({
4453
+ platform: z55.string(),
4454
+ messageCount: z55.number()
4558
4455
  })
4559
4456
  )
4560
4457
  );
4561
- var CallEndResultSchema = z56.array(
4562
- z56.object({ result: z56.string().nullable(), count: z56.string().nullable() }).optional()
4458
+ var CallEndResultSchema = z55.array(
4459
+ z55.object({ result: z55.string().nullable(), count: z55.string().nullable() }).optional()
4563
4460
  ).optional();
4564
- var ConversationCountStatusSchema = z56.object({
4565
- newContactCount: z56.number().nullable(),
4566
- oldContactCount: z56.number().nullable()
4567
- });
4568
- var MessageStatusSchema = z56.object({
4569
- total: z56.number().nullable(),
4570
- closed: z56.number().nullable(),
4571
- unassignedOpen: z56.number().nullable(),
4572
- assignedOpen: z56.number().nullable(),
4573
- botRoom: z56.number().nullable(),
4574
- hold: z56.number()
4575
- });
4576
- var MessageAverageSchema = z56.object({
4577
- selectedWeekAvgByDay: z56.array(
4578
- z56.object({
4579
- day: z56.string().nullable(),
4580
- avgResolutionTime: z56.string().nullable(),
4581
- avgResponseTime: z56.string().nullable(),
4582
- resolutionRate: z56.string()
4461
+ var ConversationCountStatusSchema = z55.object({
4462
+ newContactCount: z55.number().nullable(),
4463
+ oldContactCount: z55.number().nullable()
4464
+ });
4465
+ var MessageStatusSchema = z55.object({
4466
+ total: z55.number().nullable(),
4467
+ closed: z55.number().nullable(),
4468
+ unassignedOpen: z55.number().nullable(),
4469
+ assignedOpen: z55.number().nullable(),
4470
+ botRoom: z55.number().nullable(),
4471
+ hold: z55.number()
4472
+ });
4473
+ var MessageAverageSchema = z55.object({
4474
+ selectedWeekAvgByDay: z55.array(
4475
+ z55.object({
4476
+ day: z55.string().nullable(),
4477
+ avgResolutionTime: z55.string().nullable(),
4478
+ avgResponseTime: z55.string().nullable(),
4479
+ resolutionRate: z55.string()
4583
4480
  })
4584
4481
  ).optional().nullable(),
4585
- previousWeekAvg: z56.object({
4586
- avgResolutionTime: z56.string().nullable(),
4587
- avgResponseTime: z56.string().nullable(),
4588
- resolutionRate: z56.string()
4482
+ previousWeekAvg: z55.object({
4483
+ avgResolutionTime: z55.string().nullable(),
4484
+ avgResponseTime: z55.string().nullable(),
4485
+ resolutionRate: z55.string()
4589
4486
  }).nullable().optional(),
4590
- selectedWeekAvg: z56.object({
4591
- avgResolutionTime: z56.string().nullable(),
4592
- avgResponseTime: z56.string().nullable(),
4593
- resolutionRate: z56.string()
4487
+ selectedWeekAvg: z55.object({
4488
+ avgResolutionTime: z55.string().nullable(),
4489
+ avgResponseTime: z55.string().nullable(),
4490
+ resolutionRate: z55.string()
4594
4491
  }).nullable().optional()
4595
4492
  });
4596
- var ChannelIncomingMessageSchema = z56.object({
4597
- channelName: z56.string().optional(),
4598
- channelType: z56.string(),
4599
- count: z56.number()
4493
+ var ChannelIncomingMessageSchema = z55.object({
4494
+ channelName: z55.string().optional(),
4495
+ channelType: z55.string(),
4496
+ count: z55.number()
4600
4497
  });
4601
- var MessageDispositionSchema = z56.object({
4602
- name: z56.string().optional().nullable(),
4603
- count: z56.number().optional().nullable()
4498
+ var MessageDispositionSchema = z55.object({
4499
+ name: z55.string().optional().nullable(),
4500
+ count: z55.number().optional().nullable()
4604
4501
  });
4605
- var MessageIncomingDataSchema = z56.array(
4606
- z56.object({
4607
- platform: z56.string().nullable(),
4608
- hour: z56.string().nullable(),
4609
- messageCount: z56.string().nullable()
4502
+ var MessageIncomingDataSchema = z55.array(
4503
+ z55.object({
4504
+ platform: z55.string().nullable(),
4505
+ hour: z55.string().nullable(),
4506
+ messageCount: z55.string().nullable()
4610
4507
  })
4611
4508
  );
4612
- var MessageTotalIncomingDataSchema = z56.array(
4613
- z56.object({ name: z56.string(), data: z56.array(z56.number()) }).nullable()
4509
+ var MessageTotalIncomingDataSchema = z55.array(
4510
+ z55.object({ name: z55.string(), data: z55.array(z55.number()) }).nullable()
4614
4511
  );
4615
- var CallCountsSchema = z56.object({
4616
- answeredCallCount: z56.number().gte(0),
4617
- noAnswerCallCount: z56.number().gte(0),
4618
- busyCallCount: z56.number().gte(0),
4619
- failedCallCount: z56.number().gte(0),
4620
- totalCallCount: z56.number().gte(0)
4621
- });
4622
- var MessageQueueDataSchema = z56.object({
4623
- id: z56.string().uuid().nullable(),
4624
- name: z56.string(),
4625
- sla: z56.number(),
4626
- newContactCount: z56.number(),
4627
- existingContactCount: z56.number(),
4628
- totalRoomCount: z56.number(),
4629
- closedRoomCount: z56.number(),
4630
- unassignedRoomCount: z56.number(),
4631
- assignedRoomCount: z56.number(),
4632
- holdRoomCount: z56.number()
4633
- });
4634
- var AgentMessageStatisticsSchema = z56.object({
4635
- id: z56.string().uuid(),
4636
- name: z56.string(),
4637
- assignedRoomCount: z56.number(),
4638
- holdRoomCount: z56.number(),
4639
- closedRoomCount: z56.number(),
4640
- averageFirstResponseTime: z56.string(),
4641
- averageResolutionTime: z56.string(),
4642
- totalHandledTime: z56.string()
4643
- });
4644
- var UserCheckInLogSchema = z56.object({
4645
- userId: z56.string().uuid(),
4646
- firstLoginTime: z56.string(),
4647
- lastLogoutTime: z56.string().nullable(),
4648
- totalLoginDuration: z56.string().nullable(),
4649
- averageFirstResponseTime: z56.string().nullable(),
4650
- averageResolutionTime: z56.string().nullable(),
4651
- totalHandledTime: z56.string().nullable()
4652
- });
4653
- var UserCheckInLogsWithDaySchema = z56.object({
4654
- date: z56.date(),
4655
- formattedDate: z56.string(),
4656
- userCheckInLogs: z56.array(UserCheckInLogSchema)
4512
+ var CallCountsSchema = z55.object({
4513
+ answeredCallCount: z55.number().gte(0),
4514
+ noAnswerCallCount: z55.number().gte(0),
4515
+ busyCallCount: z55.number().gte(0),
4516
+ failedCallCount: z55.number().gte(0),
4517
+ totalCallCount: z55.number().gte(0)
4518
+ });
4519
+ var MessageQueueDataSchema = z55.object({
4520
+ id: z55.string().uuid().nullable(),
4521
+ name: z55.string(),
4522
+ sla: z55.number(),
4523
+ newContactCount: z55.number(),
4524
+ existingContactCount: z55.number(),
4525
+ totalRoomCount: z55.number(),
4526
+ closedRoomCount: z55.number(),
4527
+ unassignedRoomCount: z55.number(),
4528
+ assignedRoomCount: z55.number(),
4529
+ holdRoomCount: z55.number()
4530
+ });
4531
+ var AgentMessageStatisticsSchema = z55.object({
4532
+ id: z55.string().uuid(),
4533
+ name: z55.string(),
4534
+ assignedRoomCount: z55.number(),
4535
+ holdRoomCount: z55.number(),
4536
+ closedRoomCount: z55.number(),
4537
+ averageFirstResponseTime: z55.string(),
4538
+ averageResolutionTime: z55.string(),
4539
+ totalHandledTime: z55.string()
4540
+ });
4541
+ var UserCheckInLogSchema = z55.object({
4542
+ userId: z55.string().uuid(),
4543
+ firstLoginTime: z55.string(),
4544
+ lastLogoutTime: z55.string().nullable(),
4545
+ totalLoginDuration: z55.string().nullable(),
4546
+ averageFirstResponseTime: z55.string().nullable(),
4547
+ averageResolutionTime: z55.string().nullable(),
4548
+ totalHandledTime: z55.string().nullable()
4549
+ });
4550
+ var UserCheckInLogsWithDaySchema = z55.object({
4551
+ date: z55.date(),
4552
+ formattedDate: z55.string(),
4553
+ userCheckInLogs: z55.array(UserCheckInLogSchema)
4657
4554
  });
4658
4555
 
4659
4556
  // src/dashboard/index.ts
@@ -4669,8 +4566,8 @@ var dashboardContract = initContract13().router(
4669
4566
  200: DefaultSuccessResponseSchema.extend({
4670
4567
  dashboard: DashboardDataSchema
4671
4568
  }),
4672
- 400: z57.object({
4673
- message: z57.string()
4569
+ 400: z56.object({
4570
+ message: z56.string()
4674
4571
  }),
4675
4572
  401: DefaultUnauthorizedSchema
4676
4573
  }
@@ -4685,8 +4582,8 @@ var dashboardContract = initContract13().router(
4685
4582
  200: DefaultSuccessResponseSchema.extend({
4686
4583
  queuecallDashboard: queueCallDashboardDataSchema
4687
4584
  }),
4688
- 400: z57.object({
4689
- message: z57.string()
4585
+ 400: z56.object({
4586
+ message: z56.string()
4690
4587
  }),
4691
4588
  401: DefaultUnauthorizedSchema
4692
4589
  }
@@ -4776,10 +4673,10 @@ var dashboardContract = initContract13().router(
4776
4673
  getMessageTagData: {
4777
4674
  method: "GET",
4778
4675
  path: "/message/tag",
4779
- query: z57.object({
4780
- automationQueueId: z57.string().uuid().optional(),
4781
- selectedDate: z57.string().min(1),
4782
- channelIds: z57.array(z57.string().uuid()).optional()
4676
+ query: z56.object({
4677
+ automationQueueId: z56.string().uuid().optional(),
4678
+ selectedDate: z56.string().min(1),
4679
+ channelIds: z56.array(z56.string().uuid()).optional()
4783
4680
  }),
4784
4681
  headers: DefaultHeaderSchema,
4785
4682
  summary: "Get message tag data",
@@ -4869,10 +4766,10 @@ var dashboardContract = initContract13().router(
4869
4766
  exportMessageAverageData: {
4870
4767
  method: "GET",
4871
4768
  path: "/export-message-average-data",
4872
- query: z57.object({
4873
- selectedDate: z57.string().min(1),
4874
- automationQueueId: z57.string().uuid().optional(),
4875
- channelIds: z57.array(z57.string().uuid()).optional(),
4769
+ query: z56.object({
4770
+ selectedDate: z56.string().min(1),
4771
+ automationQueueId: z56.string().uuid().optional(),
4772
+ channelIds: z56.array(z56.string().uuid()).optional(),
4876
4773
  fileExtension: ExportFileExtensionSchema
4877
4774
  }),
4878
4775
  responses: {
@@ -4889,7 +4786,7 @@ var dashboardContract = initContract13().router(
4889
4786
  headers: DefaultHeaderSchema,
4890
4787
  responses: {
4891
4788
  200: DefaultSuccessResponseSchema.extend({
4892
- incomingMessageCounts: z57.array(ChannelIncomingMessageSchema)
4789
+ incomingMessageCounts: z56.array(ChannelIncomingMessageSchema)
4893
4790
  }),
4894
4791
  401: DefaultUnauthorizedSchema
4895
4792
  }
@@ -4909,15 +4806,15 @@ var dashboardContract = initContract13().router(
4909
4806
  method: "GET",
4910
4807
  path: "/message/disposition",
4911
4808
  summary: "Get message room status disposition data",
4912
- query: z57.object({
4913
- automationQueueId: z57.string().uuid().optional(),
4914
- selectedDate: z57.string().min(1),
4915
- channelIds: z57.array(z57.string().uuid()).optional()
4809
+ query: z56.object({
4810
+ automationQueueId: z56.string().uuid().optional(),
4811
+ selectedDate: z56.string().min(1),
4812
+ channelIds: z56.array(z56.string().uuid()).optional()
4916
4813
  }),
4917
4814
  headers: DefaultHeaderSchema,
4918
4815
  responses: {
4919
4816
  200: DefaultSuccessResponseSchema.extend({
4920
- messageRoomStatusDispositionData: z57.array(MessageDispositionSchema).optional()
4817
+ messageRoomStatusDispositionData: z56.array(MessageDispositionSchema).optional()
4921
4818
  }),
4922
4819
  401: DefaultUnauthorizedSchema
4923
4820
  }
@@ -4981,27 +4878,27 @@ var dashboardContract = initContract13().router(
4981
4878
  getAllQueueSLA: {
4982
4879
  method: "GET",
4983
4880
  path: "/all-queue-sla",
4984
- query: z57.object({ selectedDate: z57.string().min(1) }),
4881
+ query: z56.object({ selectedDate: z56.string().min(1) }),
4985
4882
  responses: {
4986
4883
  200: DefaultSuccessResponseSchema.extend({
4987
- allQueueSLA: z57.number()
4884
+ allQueueSLA: z56.number()
4988
4885
  })
4989
4886
  }
4990
4887
  },
4991
4888
  getAllMessageQueueData: {
4992
4889
  method: "GET",
4993
4890
  path: "/all-message-queue-data",
4994
- query: z57.object({
4995
- selectedDate: z57.string().min(1),
4996
- page: z57.coerce.number().positive(),
4997
- pageSize: z57.coerce.number().positive()
4891
+ query: z56.object({
4892
+ selectedDate: z56.string().min(1),
4893
+ page: z56.coerce.number().positive(),
4894
+ pageSize: z56.coerce.number().positive()
4998
4895
  }),
4999
4896
  responses: {
5000
4897
  200: DefaultSuccessResponseSchema.extend({
5001
- allMessageQueueData: z57.array(MessageQueueDataSchema),
5002
- page: z57.coerce.number().positive(),
5003
- pageSize: z57.coerce.number().positive(),
5004
- total: z57.coerce.number().positive()
4898
+ allMessageQueueData: z56.array(MessageQueueDataSchema),
4899
+ page: z56.coerce.number().positive(),
4900
+ pageSize: z56.coerce.number().positive(),
4901
+ total: z56.coerce.number().positive()
5005
4902
  })
5006
4903
  }
5007
4904
  },
@@ -5019,16 +4916,16 @@ var dashboardContract = initContract13().router(
5019
4916
  method: "GET",
5020
4917
  path: "/agent-message-statistics",
5021
4918
  query: MessageDashboardDetailsQuerySchema.extend({
5022
- page: z57.coerce.number().positive(),
5023
- pageSize: z57.coerce.number().positive()
4919
+ page: z56.coerce.number().positive(),
4920
+ pageSize: z56.coerce.number().positive()
5024
4921
  }),
5025
4922
  responses: {
5026
4923
  200: DefaultSuccessResponseSchema.extend({
5027
- page: z57.coerce.number().positive(),
5028
- pageSize: z57.coerce.number().positive(),
5029
- lastPage: z57.coerce.number().positive(),
5030
- total: z57.coerce.number().positive(),
5031
- agentMessageStatistics: z57.array(AgentMessageStatisticsSchema).nullable()
4924
+ page: z56.coerce.number().positive(),
4925
+ pageSize: z56.coerce.number().positive(),
4926
+ lastPage: z56.coerce.number().positive(),
4927
+ total: z56.coerce.number().positive(),
4928
+ agentMessageStatistics: z56.array(AgentMessageStatisticsSchema).nullable()
5032
4929
  })
5033
4930
  }
5034
4931
  },
@@ -5045,29 +4942,29 @@ var dashboardContract = initContract13().router(
5045
4942
  getUserCheckInLogsWithDays: {
5046
4943
  method: "GET",
5047
4944
  path: "/user-check-in-logs-with-days",
5048
- query: z57.object({
5049
- automationQueueId: z57.string().uuid().optional(),
5050
- selectedDate: z57.string().min(1),
5051
- keyword: z57.string().optional(),
5052
- page: z57.coerce.number().positive(),
5053
- pageSize: z57.coerce.number().positive()
4945
+ query: z56.object({
4946
+ automationQueueId: z56.string().uuid().optional(),
4947
+ selectedDate: z56.string().min(1),
4948
+ keyword: z56.string().optional(),
4949
+ page: z56.coerce.number().positive(),
4950
+ pageSize: z56.coerce.number().positive()
5054
4951
  }),
5055
4952
  responses: {
5056
4953
  200: DefaultSuccessResponseSchema.extend({
5057
- page: z57.coerce.number().positive(),
5058
- pageSize: z57.coerce.number().positive(),
5059
- total: z57.coerce.number().positive(),
5060
- userCheckInLogsWithDays: z57.array(UserCheckInLogsWithDaySchema)
4954
+ page: z56.coerce.number().positive(),
4955
+ pageSize: z56.coerce.number().positive(),
4956
+ total: z56.coerce.number().positive(),
4957
+ userCheckInLogsWithDays: z56.array(UserCheckInLogsWithDaySchema)
5061
4958
  })
5062
4959
  }
5063
4960
  },
5064
4961
  exportUserCheckInLogs: {
5065
4962
  method: "GET",
5066
4963
  path: "/export-user-check-in-logs",
5067
- query: z57.object({
5068
- automationQueueId: z57.string().uuid().optional(),
5069
- selectedDate: z57.string().min(1),
5070
- keyword: z57.string().optional(),
4964
+ query: z56.object({
4965
+ automationQueueId: z56.string().uuid().optional(),
4966
+ selectedDate: z56.string().min(1),
4967
+ keyword: z56.string().optional(),
5071
4968
  fileExtension: ExportFileExtensionSchema
5072
4969
  }),
5073
4970
  responses: {
@@ -5077,80 +4974,80 @@ var dashboardContract = initContract13().router(
5077
4974
  getRoomStatusCountsByUserId: {
5078
4975
  method: "GET",
5079
4976
  path: "/room-status-counts-by-user-id",
5080
- query: z57.object({
5081
- automationQueueId: z57.string().optional(),
5082
- userId: z57.string().uuid(),
5083
- selectedDate: z57.string().min(1)
4977
+ query: z56.object({
4978
+ automationQueueId: z56.string().optional(),
4979
+ userId: z56.string().uuid(),
4980
+ selectedDate: z56.string().min(1)
5084
4981
  }),
5085
4982
  responses: {
5086
4983
  200: DefaultSuccessResponseSchema.extend({
5087
- assignedRoomCount: z57.number(),
5088
- holdRoomCount: z57.number(),
5089
- closedRoomCount: z57.number()
4984
+ assignedRoomCount: z56.number(),
4985
+ holdRoomCount: z56.number(),
4986
+ closedRoomCount: z56.number()
5090
4987
  })
5091
4988
  }
5092
4989
  },
5093
4990
  getPresenceStatusDurations: {
5094
4991
  method: "GET",
5095
4992
  path: "/presence-status-durations",
5096
- query: z57.object({
5097
- userId: z57.string().uuid(),
5098
- selectedDate: z57.string().min(1),
5099
- page: z57.coerce.number().positive(),
5100
- pageSize: z57.coerce.number().positive()
4993
+ query: z56.object({
4994
+ userId: z56.string().uuid(),
4995
+ selectedDate: z56.string().min(1),
4996
+ page: z56.coerce.number().positive(),
4997
+ pageSize: z56.coerce.number().positive()
5101
4998
  }),
5102
4999
  responses: {
5103
5000
  200: DefaultSuccessResponseSchema.extend({
5104
- presenceStatusDurations: z57.array(
5105
- z57.object({
5106
- formattedDate: z57.string(),
5107
- date: z57.date(),
5108
- presenceStatusDurationLogs: z57.array(
5109
- z57.object({
5110
- presenceStatusId: z57.string().uuid(),
5111
- presenceStatusName: z57.string(),
5112
- durationSeconds: z57.number().positive()
5001
+ presenceStatusDurations: z56.array(
5002
+ z56.object({
5003
+ formattedDate: z56.string(),
5004
+ date: z56.date(),
5005
+ presenceStatusDurationLogs: z56.array(
5006
+ z56.object({
5007
+ presenceStatusId: z56.string().uuid(),
5008
+ presenceStatusName: z56.string(),
5009
+ durationSeconds: z56.number().positive()
5113
5010
  })
5114
5011
  )
5115
5012
  })
5116
5013
  ),
5117
- page: z57.coerce.number().positive(),
5118
- pageSize: z57.coerce.number().positive(),
5119
- total: z57.coerce.number().positive()
5014
+ page: z56.coerce.number().positive(),
5015
+ pageSize: z56.coerce.number().positive(),
5016
+ total: z56.coerce.number().positive()
5120
5017
  })
5121
5018
  }
5122
5019
  },
5123
5020
  getUserCheckInLogsByUserId: {
5124
5021
  method: "GET",
5125
5022
  path: "/user-check-in-logs-by-user-id",
5126
- query: z57.object({
5127
- automationQueueId: z57.string().uuid().optional(),
5128
- userId: z57.string().uuid(),
5129
- selectedDate: z57.string().min(1),
5130
- page: z57.coerce.number().positive(),
5131
- pageSize: z57.coerce.number().positive()
5023
+ query: z56.object({
5024
+ automationQueueId: z56.string().uuid().optional(),
5025
+ userId: z56.string().uuid(),
5026
+ selectedDate: z56.string().min(1),
5027
+ page: z56.coerce.number().positive(),
5028
+ pageSize: z56.coerce.number().positive()
5132
5029
  }),
5133
5030
  responses: {
5134
5031
  200: DefaultSuccessResponseSchema.extend({
5135
- userCheckInLogs: z57.array(
5136
- z57.object({
5137
- formattedDate: z57.string(),
5138
- day: z57.date(),
5032
+ userCheckInLogs: z56.array(
5033
+ z56.object({
5034
+ formattedDate: z56.string(),
5035
+ day: z56.date(),
5139
5036
  userCheckInLog: UserCheckInLogSchema
5140
5037
  })
5141
5038
  ),
5142
- page: z57.coerce.number().positive(),
5143
- pageSize: z57.coerce.number().positive(),
5144
- total: z57.coerce.number().positive()
5039
+ page: z56.coerce.number().positive(),
5040
+ pageSize: z56.coerce.number().positive(),
5041
+ total: z56.coerce.number().positive()
5145
5042
  })
5146
5043
  }
5147
5044
  },
5148
5045
  exportUserCheckInLogsByUserId: {
5149
5046
  method: "GET",
5150
5047
  path: "/export-user-check-in-logs-by-user-id",
5151
- query: z57.object({
5152
- userId: z57.string().uuid(),
5153
- selectedDate: z57.string().min(1),
5048
+ query: z56.object({
5049
+ userId: z56.string().uuid(),
5050
+ selectedDate: z56.string().min(1),
5154
5051
  fileExtension: ExportFileExtensionSchema
5155
5052
  }),
5156
5053
  responses: {
@@ -5164,14 +5061,14 @@ var dashboardContract = initContract13().router(
5164
5061
  );
5165
5062
 
5166
5063
  // src/evaluate-form/index.ts
5167
- import z59 from "zod";
5064
+ import z58 from "zod";
5168
5065
 
5169
5066
  // src/evaluate-form/validation.ts
5170
- import z58 from "zod";
5171
- var CreateEvaluateFormSchema = z58.object({
5172
- cxLogId: z58.string().uuid(),
5173
- sentimentScore: z58.string().nullable().optional(),
5174
- csatScore: z58.string().nullable().optional()
5067
+ import z57 from "zod";
5068
+ var CreateEvaluateFormSchema = z57.object({
5069
+ cxLogId: z57.string().uuid(),
5070
+ sentimentScore: z57.string().nullable().optional(),
5071
+ csatScore: z57.string().nullable().optional()
5175
5072
  });
5176
5073
  var UpdateEvaluateFormSchema = CreateEvaluateFormSchema.partial();
5177
5074
 
@@ -5185,7 +5082,7 @@ var evaluateFormContract = initContract14().router(
5185
5082
  body: CreateEvaluateFormSchema,
5186
5083
  responses: {
5187
5084
  201: DefaultSuccessResponseSchema.extend({
5188
- message: z59.string()
5085
+ message: z58.string()
5189
5086
  }),
5190
5087
  401: DefaultUnauthorizedSchema
5191
5088
  },
@@ -5197,18 +5094,18 @@ var evaluateFormContract = initContract14().router(
5197
5094
 
5198
5095
  // src/extension/index.ts
5199
5096
  import { initContract as initContract15 } from "@ts-rest/core";
5200
- import z61 from "zod";
5097
+ import z60 from "zod";
5201
5098
 
5202
5099
  // src/extension/validation.ts
5203
- import { z as z60 } from "zod";
5204
- var CreateExtensionSchema = z60.object({
5205
- userId: z60.string().nullable(),
5206
- sipUserName: z60.string(),
5207
- sipServerUrl: z60.string().optional(),
5208
- webphoneLoginUser: z60.string(),
5209
- extensionId: z60.string().nullable(),
5210
- extensionName: z60.string().nullable(),
5211
- telephonySignature: z60.string().nullable().optional()
5100
+ import { z as z59 } from "zod";
5101
+ var CreateExtensionSchema = z59.object({
5102
+ userId: z59.string().nullable(),
5103
+ sipUserName: z59.string(),
5104
+ sipServerUrl: z59.string().optional(),
5105
+ webphoneLoginUser: z59.string(),
5106
+ extensionId: z59.string().nullable(),
5107
+ extensionName: z59.string().nullable(),
5108
+ telephonySignature: z59.string().nullable().optional()
5212
5109
  });
5213
5110
  var UpdateExtensionSchema = CreateExtensionSchema;
5214
5111
 
@@ -5224,8 +5121,8 @@ var extensionContract = initContract15().router(
5224
5121
  201: DefaultSuccessResponseSchema.extend({
5225
5122
  extension: ExtensionSchema
5226
5123
  }),
5227
- 400: z61.object({
5228
- message: z61.string()
5124
+ 400: z60.object({
5125
+ message: z60.string()
5229
5126
  }),
5230
5127
  401: DefaultUnauthorizedSchema,
5231
5128
  404: DefaultNotFoundSchema,
@@ -5237,33 +5134,33 @@ var extensionContract = initContract15().router(
5237
5134
  getExtensions: {
5238
5135
  method: "GET",
5239
5136
  path: "",
5240
- query: z61.object({
5241
- page: z61.coerce.number().default(1),
5242
- pageSize: z61.coerce.number().default(10),
5243
- keyword: z61.string().optional()
5137
+ query: z60.object({
5138
+ page: z60.coerce.number().default(1),
5139
+ pageSize: z60.coerce.number().default(10),
5140
+ keyword: z60.string().optional()
5244
5141
  }).optional(),
5245
5142
  headers: DefaultHeaderSchema,
5246
5143
  responses: {
5247
5144
  200: WithPagination(
5248
5145
  // The response data should contain the user relation.
5249
5146
  ExtensionSchema.extend({
5250
- user: z61.object({
5251
- id: z61.string().uuid(),
5252
- createdAt: z61.date(),
5253
- updatedAt: z61.date(),
5254
- deletedAt: z61.date().nullable(),
5255
- name: z61.string(),
5256
- email: z61.string().email(),
5257
- emailVerifiedAt: z61.date().nullable(),
5258
- password: z61.string(),
5259
- address: z61.string().nullable(),
5260
- phone: z61.string().nullable(),
5261
- notificationCount: z61.number().nullable()
5147
+ user: z60.object({
5148
+ id: z60.string().uuid(),
5149
+ createdAt: z60.date(),
5150
+ updatedAt: z60.date(),
5151
+ deletedAt: z60.date().nullable(),
5152
+ name: z60.string(),
5153
+ email: z60.string().email(),
5154
+ emailVerifiedAt: z60.date().nullable(),
5155
+ password: z60.string(),
5156
+ address: z60.string().nullable(),
5157
+ phone: z60.string().nullable(),
5158
+ notificationCount: z60.number().nullable()
5262
5159
  })
5263
5160
  })
5264
5161
  ),
5265
- 400: z61.object({
5266
- message: z61.string()
5162
+ 400: z60.object({
5163
+ message: z60.string()
5267
5164
  }),
5268
5165
  401: DefaultUnauthorizedSchema,
5269
5166
  404: DefaultNotFoundSchema,
@@ -5275,12 +5172,12 @@ var extensionContract = initContract15().router(
5275
5172
  getExtensionByUserId: {
5276
5173
  method: "GET",
5277
5174
  path: "/user/:userId",
5278
- pathParams: z61.object({ userId: z61.string() }),
5175
+ pathParams: z60.object({ userId: z60.string() }),
5279
5176
  headers: DefaultHeaderSchema,
5280
5177
  responses: {
5281
5178
  200: ExtensionSchema,
5282
- 400: z61.object({
5283
- message: z61.string()
5179
+ 400: z60.object({
5180
+ message: z60.string()
5284
5181
  }),
5285
5182
  401: DefaultUnauthorizedSchema,
5286
5183
  404: DefaultNotFoundSchema,
@@ -5292,16 +5189,16 @@ var extensionContract = initContract15().router(
5292
5189
  getExtensionByDialpad: {
5293
5190
  method: "GET",
5294
5191
  path: "/dialpad",
5295
- query: z61.object({
5296
- page: z61.coerce.number().default(1),
5297
- pageSize: z61.coerce.number().default(10),
5298
- keyword: z61.string().optional()
5192
+ query: z60.object({
5193
+ page: z60.coerce.number().default(1),
5194
+ pageSize: z60.coerce.number().default(10),
5195
+ keyword: z60.string().optional()
5299
5196
  }).optional(),
5300
5197
  headers: DefaultHeaderSchema,
5301
5198
  responses: {
5302
5199
  200: WithPagination(ExtensionSchema),
5303
- 400: z61.object({
5304
- message: z61.string()
5200
+ 400: z60.object({
5201
+ message: z60.string()
5305
5202
  }),
5306
5203
  401: DefaultUnauthorizedSchema,
5307
5204
  404: DefaultNotFoundSchema,
@@ -5313,15 +5210,15 @@ var extensionContract = initContract15().router(
5313
5210
  updateExtension: {
5314
5211
  method: "PATCH",
5315
5212
  path: "/:id",
5316
- pathParams: z61.object({ id: z61.string() }),
5213
+ pathParams: z60.object({ id: z60.string() }),
5317
5214
  headers: DefaultHeaderSchema,
5318
5215
  body: UpdateExtensionSchema,
5319
5216
  responses: {
5320
5217
  200: DefaultSuccessResponseSchema.extend({
5321
5218
  extension: ExtensionSchema
5322
5219
  }),
5323
- 400: z61.object({
5324
- message: z61.string()
5220
+ 400: z60.object({
5221
+ message: z60.string()
5325
5222
  }),
5326
5223
  401: DefaultUnauthorizedSchema,
5327
5224
  404: DefaultNotFoundSchema,
@@ -5333,13 +5230,13 @@ var extensionContract = initContract15().router(
5333
5230
  deleteExtension: {
5334
5231
  method: "DELETE",
5335
5232
  path: "/:id",
5336
- pathParams: z61.object({ id: z61.string() }),
5233
+ pathParams: z60.object({ id: z60.string() }),
5337
5234
  headers: DefaultHeaderSchema,
5338
5235
  body: null,
5339
5236
  responses: {
5340
- 200: DefaultSuccessResponseSchema.extend({ message: z61.string() }),
5341
- 400: z61.object({
5342
- message: z61.string()
5237
+ 200: DefaultSuccessResponseSchema.extend({ message: z60.string() }),
5238
+ 400: z60.object({
5239
+ message: z60.string()
5343
5240
  }),
5344
5241
  401: DefaultUnauthorizedSchema,
5345
5242
  404: DefaultNotFoundSchema,
@@ -5355,10 +5252,10 @@ var extensionContract = initContract15().router(
5355
5252
  body: null,
5356
5253
  responses: {
5357
5254
  200: DefaultSuccessResponseSchema.extend({
5358
- message: z61.string()
5255
+ message: z60.string()
5359
5256
  }),
5360
- 400: z61.object({
5361
- message: z61.string()
5257
+ 400: z60.object({
5258
+ message: z60.string()
5362
5259
  }),
5363
5260
  401: DefaultUnauthorizedSchema,
5364
5261
  404: DefaultNotFoundSchema,
@@ -5373,7 +5270,7 @@ var extensionContract = initContract15().router(
5373
5270
 
5374
5271
  // src/instagram/index.ts
5375
5272
  import { initContract as initContract16 } from "@ts-rest/core";
5376
- import z62 from "zod";
5273
+ import z61 from "zod";
5377
5274
  var instagramContract = initContract16().router({
5378
5275
  sendMessage: {
5379
5276
  method: "POST",
@@ -5407,8 +5304,8 @@ var instagramContract = initContract16().router({
5407
5304
  reconnect: {
5408
5305
  method: "POST",
5409
5306
  path: "/reconnect/:channelId",
5410
- pathParams: z62.object({
5411
- channelId: z62.string().uuid()
5307
+ pathParams: z61.object({
5308
+ channelId: z61.string().uuid()
5412
5309
  }),
5413
5310
  body: null,
5414
5311
  responses: {
@@ -5420,8 +5317,8 @@ var instagramContract = initContract16().router({
5420
5317
  delete: {
5421
5318
  method: "DELETE",
5422
5319
  path: "/delete/:channelId",
5423
- pathParams: z62.object({
5424
- channelId: z62.string().uuid()
5320
+ pathParams: z61.object({
5321
+ channelId: z61.string().uuid()
5425
5322
  }),
5426
5323
  body: null,
5427
5324
  responses: {
@@ -5462,84 +5359,84 @@ var instagramContract = initContract16().router({
5462
5359
 
5463
5360
  // src/line/index.ts
5464
5361
  import { initContract as initContract17 } from "@ts-rest/core";
5465
- import z65 from "zod";
5362
+ import z64 from "zod";
5466
5363
 
5467
5364
  // src/line/schema.ts
5468
- import z63 from "zod";
5365
+ import z62 from "zod";
5469
5366
  var ConnectLineService = ConnectLineChannelSchema.extend({
5470
- actor: z63.object({
5471
- id: z63.string().uuid(),
5472
- name: z63.string(),
5473
- email: z63.string().email(),
5474
- address: z63.string().nullable(),
5475
- phone: z63.string().nullable()
5367
+ actor: z62.object({
5368
+ id: z62.string().uuid(),
5369
+ name: z62.string(),
5370
+ email: z62.string().email(),
5371
+ address: z62.string().nullable(),
5372
+ phone: z62.string().nullable()
5476
5373
  }).optional()
5477
5374
  });
5478
5375
 
5479
5376
  // src/line/validation.ts
5480
- import z64 from "zod";
5481
- var SendLineStickerSchema = z64.object({
5482
- packageId: z64.number(),
5483
- stickerId: z64.number(),
5484
- room: z64.object({
5485
- id: z64.string().uuid(),
5486
- lastMessage: z64.string().optional(),
5487
- handleTime: z64.number().optional(),
5488
- isLatest: z64.boolean(),
5377
+ import z63 from "zod";
5378
+ var SendLineStickerSchema = z63.object({
5379
+ packageId: z63.number(),
5380
+ stickerId: z63.number(),
5381
+ room: z63.object({
5382
+ id: z63.string().uuid(),
5383
+ lastMessage: z63.string().optional(),
5384
+ handleTime: z63.number().optional(),
5385
+ isLatest: z63.boolean(),
5489
5386
  direction: MessageDirectionTypeSchema,
5490
- platformContact: z64.object({
5491
- channelId: z64.string().uuid(),
5492
- socialPlatformId: z64.string().nullable(),
5387
+ platformContact: z63.object({
5388
+ channelId: z63.string().uuid(),
5389
+ socialPlatformId: z63.string().nullable(),
5493
5390
  type: ChannelTypeSchema,
5494
5391
  metadata: PlatformContactMetadataSchema,
5495
- contact: z64.object({
5496
- name: z64.string(),
5497
- address: z64.string().nullable(),
5498
- channel: z64.string().nullable(),
5499
- notes: z64.string().nullable(),
5500
- contactProfile: z64.string().nullable(),
5501
- socialProfileUrl: z64.string().nullable()
5392
+ contact: z63.object({
5393
+ name: z63.string(),
5394
+ address: z63.string().nullable(),
5395
+ channel: z63.string().nullable(),
5396
+ notes: z63.string().nullable(),
5397
+ contactProfile: z63.string().nullable(),
5398
+ socialProfileUrl: z63.string().nullable()
5502
5399
  })
5503
5400
  }),
5504
- actor: z64.object({
5505
- name: z64.string(),
5506
- email: z64.string().email(),
5507
- address: z64.string().nullable(),
5508
- phone: z64.string().nullable()
5401
+ actor: z63.object({
5402
+ name: z63.string(),
5403
+ email: z63.string().email(),
5404
+ address: z63.string().nullable(),
5405
+ phone: z63.string().nullable()
5509
5406
  }).nullable(),
5510
5407
  channel: ChannelSchema2
5511
5408
  }),
5512
- message: z64.object({
5513
- message: z64.string().optional(),
5409
+ message: z63.object({
5410
+ message: z63.string().optional(),
5514
5411
  direction: MessageDirectionTypeSchema,
5515
5412
  type: MessageTypeSchema,
5516
- readAt: z64.date().optional(),
5517
- metadata: z64.any().optional(),
5518
- platformId: z64.string().optional(),
5519
- platformMessageId: z64.string().optional(),
5520
- replyPlatformMessageId: z64.string().optional(),
5521
- template: z64.any().optional(),
5413
+ readAt: z63.date().optional(),
5414
+ metadata: z63.any().optional(),
5415
+ platformId: z63.string().optional(),
5416
+ platformMessageId: z63.string().optional(),
5417
+ replyPlatformMessageId: z63.string().optional(),
5418
+ template: z63.any().optional(),
5522
5419
  locale: MessageLocaleTypeSchema.optional(),
5523
- url: z64.string().optional(),
5524
- previewUrl: z64.string().optional(),
5525
- imageSetId: z64.string().optional(),
5526
- upload: z64.object({
5527
- bucketName: z64.string(),
5528
- fileName: z64.string(),
5529
- fileSize: z64.number(),
5530
- fileKey: z64.string()
5420
+ url: z63.string().optional(),
5421
+ previewUrl: z63.string().optional(),
5422
+ imageSetId: z63.string().optional(),
5423
+ upload: z63.object({
5424
+ bucketName: z63.string(),
5425
+ fileName: z63.string(),
5426
+ fileSize: z63.number(),
5427
+ fileKey: z63.string()
5531
5428
  }).optional(),
5532
- sender: z64.object({
5533
- name: z64.string(),
5534
- email: z64.string().email(),
5535
- address: z64.string().nullable(),
5536
- phone: z64.string().nullable()
5429
+ sender: z63.object({
5430
+ name: z63.string(),
5431
+ email: z63.string().email(),
5432
+ address: z63.string().nullable(),
5433
+ phone: z63.string().nullable()
5537
5434
  })
5538
5435
  })
5539
5436
  });
5540
- var createUserLevelRichMenuSchema = z64.object({
5541
- linePlatformUserId: z64.string(),
5542
- channelId: z64.string()
5437
+ var createUserLevelRichMenuSchema = z63.object({
5438
+ linePlatformUserId: z63.string(),
5439
+ channelId: z63.string()
5543
5440
  });
5544
5441
 
5545
5442
  // src/line/index.ts
@@ -5549,7 +5446,7 @@ var lineContract = initContract17().router({
5549
5446
  path: "sticker",
5550
5447
  responses: {
5551
5448
  200: DefaultSuccessResponseSchema.extend({
5552
- data: z65.any()
5449
+ data: z64.any()
5553
5450
  }),
5554
5451
  500: DefaultErrorResponseSchema
5555
5452
  },
@@ -5572,7 +5469,7 @@ var lineContract = initContract17().router({
5572
5469
  path: "/message",
5573
5470
  body: SendMessageToPlatformSchema,
5574
5471
  responses: {
5575
- 200: z65.union([SendMessageResponseSchema, z65.literal("TALK TO AGENT")]),
5472
+ 200: z64.union([SendMessageResponseSchema, z64.literal("TALK TO AGENT")]),
5576
5473
  500: DefaultErrorResponseSchema
5577
5474
  }
5578
5475
  },
@@ -5589,8 +5486,8 @@ var lineContract = initContract17().router({
5589
5486
  reconnect: {
5590
5487
  method: "POST",
5591
5488
  path: "/reconnect/:channelId",
5592
- pathParams: z65.object({
5593
- channelId: z65.string().uuid()
5489
+ pathParams: z64.object({
5490
+ channelId: z64.string().uuid()
5594
5491
  }),
5595
5492
  body: null,
5596
5493
  responses: {
@@ -5602,8 +5499,8 @@ var lineContract = initContract17().router({
5602
5499
  delete: {
5603
5500
  method: "DELETE",
5604
5501
  path: "/delete/:channelId",
5605
- pathParams: z65.object({
5606
- channelId: z65.string().uuid()
5502
+ pathParams: z64.object({
5503
+ channelId: z64.string().uuid()
5607
5504
  }),
5608
5505
  body: null,
5609
5506
  responses: {
@@ -5625,7 +5522,7 @@ var lineContract = initContract17().router({
5625
5522
 
5626
5523
  // src/mail/email-engine-webhooks-events.contract.ts
5627
5524
  import { initContract as initContract18 } from "@ts-rest/core";
5628
- import z66 from "zod";
5525
+ import z65 from "zod";
5629
5526
  var emailEngineWebhooksEventsContract = initContract18().router(
5630
5527
  {
5631
5528
  handleWebhooksEvents: {
@@ -5634,7 +5531,7 @@ var emailEngineWebhooksEventsContract = initContract18().router(
5634
5531
  // we don't need to respone anything but added responses just for solving type error
5635
5532
  responses: {
5636
5533
  200: DefaultSuccessResponseSchema.extend({
5637
- message: z66.string()
5534
+ message: z65.string()
5638
5535
  })
5639
5536
  },
5640
5537
  body: null,
@@ -5646,7 +5543,7 @@ var emailEngineWebhooksEventsContract = initContract18().router(
5646
5543
 
5647
5544
  // src/messenger/index.ts
5648
5545
  import { initContract as initContract19 } from "@ts-rest/core";
5649
- import z67 from "zod";
5546
+ import z66 from "zod";
5650
5547
  var messengerContract = initContract19().router({
5651
5548
  sendMessage: {
5652
5549
  method: "POST",
@@ -5681,8 +5578,8 @@ var messengerContract = initContract19().router({
5681
5578
  reconnect: {
5682
5579
  method: "POST",
5683
5580
  path: "/reconnect/:channelId",
5684
- pathParams: z67.object({
5685
- channelId: z67.string().uuid()
5581
+ pathParams: z66.object({
5582
+ channelId: z66.string().uuid()
5686
5583
  }),
5687
5584
  body: null,
5688
5585
  responses: {
@@ -5694,8 +5591,8 @@ var messengerContract = initContract19().router({
5694
5591
  delete: {
5695
5592
  method: "DELETE",
5696
5593
  path: "/delete/:channelId",
5697
- pathParams: z67.object({
5698
- channelId: z67.string().uuid()
5594
+ pathParams: z66.object({
5595
+ channelId: z66.string().uuid()
5699
5596
  }),
5700
5597
  body: null,
5701
5598
  responses: {
@@ -5726,9 +5623,9 @@ var messengerContract = initContract19().router({
5726
5623
  getFacebookBusinesses: {
5727
5624
  method: "GET",
5728
5625
  path: "/facebook-businesses",
5729
- query: z67.object({
5730
- userId: z67.string(),
5731
- userAccessToken: z67.string()
5626
+ query: z66.object({
5627
+ userId: z66.string(),
5628
+ userAccessToken: z66.string()
5732
5629
  }),
5733
5630
  responses: {
5734
5631
  200: DefaultSuccessResponseSchema,
@@ -5738,9 +5635,9 @@ var messengerContract = initContract19().router({
5738
5635
  getFacebookBusinessPages: {
5739
5636
  method: "GET",
5740
5637
  path: "/facebook-business-pages",
5741
- query: z67.object({
5742
- businessId: z67.string(),
5743
- userAccessToken: z67.string()
5638
+ query: z66.object({
5639
+ businessId: z66.string(),
5640
+ userAccessToken: z66.string()
5744
5641
  }),
5745
5642
  responses: {
5746
5643
  200: DefaultSuccessResponseSchema,
@@ -5760,7 +5657,7 @@ var messengerContract = initContract19().router({
5760
5657
 
5761
5658
  // src/permission/index.ts
5762
5659
  import { initContract as initContract20 } from "@ts-rest/core";
5763
- import z68 from "zod";
5660
+ import z67 from "zod";
5764
5661
  var permissionContract = initContract20().router(
5765
5662
  {
5766
5663
  getPermissions: {
@@ -5768,9 +5665,9 @@ var permissionContract = initContract20().router(
5768
5665
  path: "",
5769
5666
  headers: DefaultHeaderSchema,
5770
5667
  responses: {
5771
- 200: z68.object({ permissions: PermissionSchema.array() }),
5772
- 400: z68.object({
5773
- message: z68.string()
5668
+ 200: z67.object({ permissions: PermissionSchema.array() }),
5669
+ 400: z67.object({
5670
+ message: z67.string()
5774
5671
  }),
5775
5672
  401: DefaultUnauthorizedSchema,
5776
5673
  500: DefaultErrorResponseSchema
@@ -5783,15 +5680,15 @@ var permissionContract = initContract20().router(
5783
5680
 
5784
5681
  // src/role/index.ts
5785
5682
  import { initContract as initContract21 } from "@ts-rest/core";
5786
- import z70 from "zod";
5683
+ import z69 from "zod";
5787
5684
 
5788
5685
  // src/role/validation.ts
5789
- import { z as z69 } from "zod";
5790
- var CreateRoleSchema = z69.object({
5791
- systemName: z69.string(),
5792
- displayName: z69.string(),
5793
- description: z69.string().nullable(),
5794
- permissions: z69.array(z69.string())
5686
+ import { z as z68 } from "zod";
5687
+ var CreateRoleSchema = z68.object({
5688
+ systemName: z68.string(),
5689
+ displayName: z68.string(),
5690
+ description: z68.string().nullable(),
5691
+ permissions: z68.array(z68.string())
5795
5692
  });
5796
5693
  var UpdateRoleSchema = CreateRoleSchema;
5797
5694
 
@@ -5807,8 +5704,8 @@ var roleContract = initContract21().router(
5807
5704
  201: DefaultSuccessResponseSchema.extend({
5808
5705
  role: RoleSchema
5809
5706
  }),
5810
- 400: z70.object({
5811
- message: z70.string()
5707
+ 400: z69.object({
5708
+ message: z69.string()
5812
5709
  }),
5813
5710
  401: DefaultUnauthorizedSchema,
5814
5711
  500: DefaultErrorResponseSchema
@@ -5818,17 +5715,17 @@ var roleContract = initContract21().router(
5818
5715
  getRoles: {
5819
5716
  method: "GET",
5820
5717
  path: "",
5821
- query: z70.object({
5822
- page: z70.coerce.number().default(1),
5823
- pageSize: z70.coerce.number().default(10)
5718
+ query: z69.object({
5719
+ page: z69.coerce.number().default(1),
5720
+ pageSize: z69.coerce.number().default(10)
5824
5721
  }).optional(),
5825
5722
  headers: DefaultHeaderSchema,
5826
5723
  responses: {
5827
5724
  200: WithPagination(RoleSchema).extend({
5828
5725
  roleUserCount: RoleUserCountSchema
5829
5726
  }),
5830
- 400: z70.object({
5831
- message: z70.string()
5727
+ 400: z69.object({
5728
+ message: z69.string()
5832
5729
  }),
5833
5730
  401: DefaultUnauthorizedSchema,
5834
5731
  500: DefaultErrorResponseSchema
@@ -5838,15 +5735,15 @@ var roleContract = initContract21().router(
5838
5735
  updateRole: {
5839
5736
  method: "PATCH",
5840
5737
  path: "/:id",
5841
- pathParams: z70.object({ id: z70.string() }),
5738
+ pathParams: z69.object({ id: z69.string() }),
5842
5739
  headers: DefaultHeaderSchema,
5843
5740
  body: UpdateRoleSchema,
5844
5741
  responses: {
5845
5742
  201: DefaultSuccessResponseSchema.extend({
5846
5743
  role: RoleSchema
5847
5744
  }),
5848
- 400: z70.object({
5849
- message: z70.string()
5745
+ 400: z69.object({
5746
+ message: z69.string()
5850
5747
  }),
5851
5748
  401: DefaultUnauthorizedSchema,
5852
5749
  500: DefaultErrorResponseSchema
@@ -5856,11 +5753,11 @@ var roleContract = initContract21().router(
5856
5753
  deleteRole: {
5857
5754
  method: "DELETE",
5858
5755
  path: "/:id",
5859
- pathParams: z70.object({ id: z70.string() }),
5756
+ pathParams: z69.object({ id: z69.string() }),
5860
5757
  headers: DefaultHeaderSchema,
5861
5758
  body: null,
5862
5759
  responses: {
5863
- 200: DefaultSuccessResponseSchema.extend({ message: z70.string() }),
5760
+ 200: DefaultSuccessResponseSchema.extend({ message: z69.string() }),
5864
5761
  500: DefaultErrorResponseSchema
5865
5762
  },
5866
5763
  summary: "Delete a role."
@@ -5868,12 +5765,12 @@ var roleContract = initContract21().router(
5868
5765
  getRoleById: {
5869
5766
  method: "GET",
5870
5767
  path: "/:id",
5871
- pathParams: z70.object({ id: z70.string() }),
5768
+ pathParams: z69.object({ id: z69.string() }),
5872
5769
  headers: DefaultHeaderSchema,
5873
5770
  responses: {
5874
5771
  200: RoleSchema,
5875
- 400: z70.object({
5876
- message: z70.string()
5772
+ 400: z69.object({
5773
+ message: z69.string()
5877
5774
  }),
5878
5775
  401: DefaultUnauthorizedSchema,
5879
5776
  500: DefaultErrorResponseSchema
@@ -5886,19 +5783,19 @@ var roleContract = initContract21().router(
5886
5783
 
5887
5784
  // src/tag/index.ts
5888
5785
  import { initContract as initContract22 } from "@ts-rest/core";
5889
- import z72 from "zod";
5786
+ import z71 from "zod";
5890
5787
 
5891
5788
  // src/tag/validation.ts
5892
- import { z as z71 } from "zod";
5893
- var CreateTagSchema = z71.object({
5894
- name: z71.string(),
5789
+ import { z as z70 } from "zod";
5790
+ var CreateTagSchema = z70.object({
5791
+ name: z70.string(),
5895
5792
  group: TagGroupSchema
5896
5793
  });
5897
- var GetTagsSchema = z71.object({
5794
+ var GetTagsSchema = z70.object({
5898
5795
  group: TagGroupSchema.optional().default("general"),
5899
- keyword: z71.string().nullable().optional()
5796
+ keyword: z70.string().nullable().optional()
5900
5797
  }).partial().optional();
5901
- var UpdateTagSchema = z71.object({ name: z71.string() });
5798
+ var UpdateTagSchema = z70.object({ name: z70.string() });
5902
5799
 
5903
5800
  // src/tag/index.ts
5904
5801
  var tagContract = initContract22().router(
@@ -5921,7 +5818,7 @@ var tagContract = initContract22().router(
5921
5818
  query: GetTagsSchema,
5922
5819
  responses: {
5923
5820
  200: DefaultSuccessResponseSchema.extend({
5924
- tags: z72.array(TagSchema)
5821
+ tags: z71.array(TagSchema)
5925
5822
  }),
5926
5823
  500: DefaultErrorResponseSchema
5927
5824
  },
@@ -5930,7 +5827,7 @@ var tagContract = initContract22().router(
5930
5827
  updateTag: {
5931
5828
  method: "PATCH",
5932
5829
  path: "/:id",
5933
- pathParams: z72.object({ id: z72.string() }),
5830
+ pathParams: z71.object({ id: z71.string() }),
5934
5831
  body: UpdateTagSchema,
5935
5832
  responses: {
5936
5833
  200: DefaultSuccessResponseSchema.extend({
@@ -5943,11 +5840,11 @@ var tagContract = initContract22().router(
5943
5840
  deleteTag: {
5944
5841
  method: "DELETE",
5945
5842
  path: "/:id",
5946
- pathParams: z72.object({ id: z72.string() }),
5947
- body: z72.any().optional(),
5843
+ pathParams: z71.object({ id: z71.string() }),
5844
+ body: z71.any().optional(),
5948
5845
  // We don't need the body.
5949
5846
  responses: {
5950
- 200: DefaultSuccessResponseSchema.extend({ message: z72.string() }),
5847
+ 200: DefaultSuccessResponseSchema.extend({ message: z71.string() }),
5951
5848
  500: DefaultErrorResponseSchema
5952
5849
  },
5953
5850
  headers: DefaultHeaderSchema
@@ -5962,32 +5859,35 @@ var tagContract = initContract22().router(
5962
5859
  import { initContract as initContract23 } from "@ts-rest/core";
5963
5860
  import z75 from "zod";
5964
5861
 
5965
- // src/presence-status/schema.ts
5862
+ // src/telephony-agent-presence-status/schema.ts
5966
5863
  import z73 from "zod";
5967
- var TPresenceStatusOption = z73.union([
5968
- z73.literal("receive_call"),
5969
- z73.literal("do_not_receive_call"),
5970
- z73.literal("receive_chat_message"),
5971
- z73.literal("do_not_receive_chat_message")
5864
+
5865
+ // src/presence-status/schema.ts
5866
+ import z72 from "zod";
5867
+ var TPresenceStatusOption = z72.union([
5868
+ z72.literal("receive_call"),
5869
+ z72.literal("do_not_receive_call"),
5870
+ z72.literal("receive_chat_message"),
5871
+ z72.literal("do_not_receive_chat_message")
5972
5872
  ]);
5973
- var PresenceStatusSchema = z73.object({
5974
- id: z73.string().uuid(),
5975
- createdAt: z73.date(),
5976
- updatedAt: z73.date(),
5977
- deletedAt: z73.date().nullable(),
5978
- systemName: z73.string(),
5979
- displayName: z73.string(),
5980
- description: z73.string().nullable(),
5981
- position: z73.number(),
5982
- emoji: z73.string().nullable(),
5983
- presenceStatusOption: z73.array(TPresenceStatusOption)
5984
- });
5985
- var UserPresenceStatusSchema = z73.object({
5986
- id: z73.string().uuid(),
5987
- createdAt: z73.date(),
5988
- updatedAt: z73.date(),
5989
- deletedAt: z73.date().nullable(),
5990
- userId: z73.string(),
5873
+ var PresenceStatusSchema = z72.object({
5874
+ id: z72.string().uuid(),
5875
+ createdAt: z72.date(),
5876
+ updatedAt: z72.date(),
5877
+ deletedAt: z72.date().nullable(),
5878
+ systemName: z72.string(),
5879
+ displayName: z72.string(),
5880
+ description: z72.string().nullable(),
5881
+ position: z72.number(),
5882
+ emoji: z72.string().nullable(),
5883
+ presenceStatusOption: z72.array(TPresenceStatusOption)
5884
+ });
5885
+ var UserPresenceStatusSchema = z72.object({
5886
+ id: z72.string().uuid(),
5887
+ createdAt: z72.date(),
5888
+ updatedAt: z72.date(),
5889
+ deletedAt: z72.date().nullable(),
5890
+ userId: z72.string(),
5991
5891
  user: UserSchema,
5992
5892
  presenceStatus: PresenceStatusSchema
5993
5893
  });
@@ -5995,7 +5895,8 @@ var UserPresenceStatusSchema = z73.object({
5995
5895
  // src/telephony-agent-presence-status/schema.ts
5996
5896
  var UserPresenceStatusSchema2 = DefaultEntitySchema.extend({
5997
5897
  user: UserSchema,
5998
- presenceStatus: PresenceStatusSchema
5898
+ presenceStatus: PresenceStatusSchema,
5899
+ customPresenceStatus: z73.string().nullable().optional()
5999
5900
  });
6000
5901
 
6001
5902
  // src/telephony-agent-presence-status/validation.ts
@@ -6003,12 +5904,27 @@ import { z as z74 } from "zod";
6003
5904
  var UpdateUserStatusSchema = z74.object({
6004
5905
  userId: z74.string(),
6005
5906
  presenceStatusId: z74.string().nullable().optional(),
5907
+ customPreseneStatus: z74.string().nullable().optional(),
6006
5908
  reason: z74.string()
6007
5909
  });
6008
5910
 
6009
5911
  // src/telephony-agent-presence-status/index.ts
6010
5912
  var telephonyAgentPresenceStatusContract = initContract23().router(
6011
5913
  {
5914
+ getAllAgentStatus: {
5915
+ method: "GET",
5916
+ path: "/agents/presence_status",
5917
+ headers: DefaultHeaderSchema,
5918
+ responses: {
5919
+ 200: z75.array(UserPresenceStatusSchema2),
5920
+ 400: z75.object({
5921
+ message: z75.string()
5922
+ }),
5923
+ 401: DefaultUnauthorizedSchema,
5924
+ 500: DefaultErrorResponseSchema
5925
+ },
5926
+ summary: "Get all user presence status list."
5927
+ },
6012
5928
  getAgentStatus: {
6013
5929
  method: "GET",
6014
5930
  path: "/presence_status/check_update/:userId",
@@ -6870,10 +6786,10 @@ var ticketContract = initContract26().router(
6870
6786
  addTicketAttachments: {
6871
6787
  method: "PUT",
6872
6788
  path: "tcs/api/v1/ticket/:id/attachment",
6873
- headers: DefaultHeaderSchema,
6874
6789
  pathParams: z81.object({
6875
6790
  id: z81.string()
6876
6791
  }),
6792
+ headers: DefaultHeaderSchema,
6877
6793
  body: CreateTicketAttachmentRecordsSchema,
6878
6794
  responses: {
6879
6795
  201: DefaultSuccessResponseSchema.extend({
@@ -6939,7 +6855,7 @@ var ticketContract = initContract26().router(
6939
6855
  }
6940
6856
  }
6941
6857
  }
6942
- // { pathPrefix: 'tcs/api/v1/ticket' },
6858
+ // { pathPrefix: 'ts/ticket' },
6943
6859
  );
6944
6860
 
6945
6861
  // src/user/index.ts
@@ -8965,22 +8881,6 @@ var chatContract = initContract39().router(
8965
8881
  404: DefaultErrorResponseSchema
8966
8882
  },
8967
8883
  summary: "Get message by ID"
8968
- },
8969
- tagContact: {
8970
- method: "POST",
8971
- path: "/contact/tag",
8972
- body: z111.object({
8973
- workflowId: z111.string().uuid(),
8974
- roomId: z111.string().uuid(),
8975
- contactId: z111.string().uuid(),
8976
- tagId: z111.string().uuid()
8977
- }),
8978
- responses: {
8979
- 200: DefaultSuccessResponseSchema,
8980
- 403: DefaultErrorResponseSchema,
8981
- 404: DefaultErrorResponseSchema
8982
- },
8983
- summary: "Attach Tag to Contact"
8984
8884
  }
8985
8885
  },
8986
8886
  {
@@ -9345,7 +9245,15 @@ var invoiceContract = initContract43().router(
9345
9245
 
9346
9246
  // src/klink-chat/index.ts
9347
9247
  import { initContract as initContract44 } from "@ts-rest/core";
9248
+
9249
+ // src/klink-chat/validation.ts
9348
9250
  import z118 from "zod";
9251
+ var KlinkChatChannelSchema = z118.object({
9252
+ name: z118.string(),
9253
+ widgetColor: z118.string().optional()
9254
+ });
9255
+
9256
+ // src/klink-chat/index.ts
9349
9257
  var KlinkChatContract = initContract44().router({
9350
9258
  connect: {
9351
9259
  method: "POST",
@@ -9368,47 +9276,6 @@ var KlinkChatContract = initContract44().router({
9368
9276
  200: SendMessageResponseSchema,
9369
9277
  500: DefaultErrorResponseSchema
9370
9278
  }
9371
- },
9372
- disconnect: {
9373
- method: "POST",
9374
- path: "/disconnect",
9375
- responses: {
9376
- 200: ChannelServiceResponseSchema,
9377
- 500: DefaultErrorResponseSchema,
9378
- 400: DefaultErrorResponseSchema
9379
- },
9380
- body: z118.object({
9381
- id: z118.string().uuid()
9382
- }),
9383
- summary: "Disconnect klink chat channel"
9384
- },
9385
- reconnect: {
9386
- method: "POST",
9387
- path: "/reconnect/:channelId",
9388
- pathParams: z118.object({
9389
- channelId: z118.string().uuid()
9390
- }),
9391
- body: null,
9392
- responses: {
9393
- 200: ChannelServiceResponseSchema,
9394
- 500: DefaultErrorResponseSchema,
9395
- 400: DefaultErrorResponseSchema
9396
- },
9397
- summary: "Reconnect klink chat channel"
9398
- },
9399
- delete: {
9400
- method: "DELETE",
9401
- path: "/delete/:channelId",
9402
- pathParams: z118.object({
9403
- channelId: z118.string().uuid()
9404
- }),
9405
- body: null,
9406
- responses: {
9407
- 200: ChannelServiceResponseSchema,
9408
- 500: DefaultErrorResponseSchema,
9409
- 400: DefaultErrorResponseSchema
9410
- },
9411
- summary: "Delete klink chat channel"
9412
9279
  }
9413
9280
  });
9414
9281
 
@@ -9612,7 +9479,7 @@ var laravelServiceTelephonyCdrContract = initContract45().router({
9612
9479
  laravelServiceTelephonyCdr
9613
9480
  });
9614
9481
  var platformKlinkChatContract = initContract45().router({
9615
- klinkchat: KlinkChatContract
9482
+ klinkChat: KlinkChatContract
9616
9483
  });
9617
9484
 
9618
9485
  // src/general-setting/index.ts
@@ -10031,7 +9898,7 @@ var RoomContractsValidationSchema = {
10031
9898
  category: z126.union([z126.literal("contact"), z126.literal("message")])
10032
9899
  }).optional(),
10033
9900
  contactLabels: z126.array(z126.string()).optional(),
10034
- channels: z126.array(z126.string()).optional(),
9901
+ channels: z126.array(z126.string().email()).optional(),
10035
9902
  date: z126.string().optional(),
10036
9903
  contacts: z126.array(z126.string()).optional(),
10037
9904
  assignees: z126.array(z126.string()).optional(),
@@ -11198,17 +11065,6 @@ var subscriptionContract = initContract55().router(
11198
11065
  500: DefaultErrorResponseSchema
11199
11066
  }
11200
11067
  },
11201
- getAvailableAddOns: {
11202
- method: "GET",
11203
- path: "/available-add-ons",
11204
- query: GetAvailablePlanSchema,
11205
- responses: {
11206
- 200: DefaultSuccessResponseSchema.extend({
11207
- data: z141.array(ProductSchema)
11208
- }),
11209
- 500: DefaultErrorResponseSchema
11210
- }
11211
- },
11212
11068
  checkPlan: {
11213
11069
  method: "POST",
11214
11070
  path: "/check-plan",
@@ -11395,7 +11251,6 @@ export {
11395
11251
  userContract,
11396
11252
  userNotificationContract,
11397
11253
  userPresenceStatusLogContract,
11398
- widgetContract,
11399
11254
  widgetSettingContract,
11400
11255
  workflowContract,
11401
11256
  wrapUpFormContract