@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.
- package/dist/api-contracts/src/botpress/index.d.ts +17 -20
- package/dist/api-contracts/src/botpress/index.d.ts.map +1 -1
- package/dist/api-contracts/src/botpress/validation.d.ts +17 -20
- package/dist/api-contracts/src/botpress/validation.d.ts.map +1 -1
- package/dist/api-contracts/src/channel/index.d.ts +4 -913
- package/dist/api-contracts/src/channel/index.d.ts.map +1 -1
- package/dist/api-contracts/src/channel/validation.d.ts +0 -64
- package/dist/api-contracts/src/channel/validation.d.ts.map +1 -1
- package/dist/api-contracts/src/chat/index.d.ts +3 -190
- package/dist/api-contracts/src/chat/index.d.ts.map +1 -1
- package/dist/api-contracts/src/chat/schema.d.ts.map +1 -1
- package/dist/api-contracts/src/chat/validation.d.ts +0 -105
- package/dist/api-contracts/src/chat/validation.d.ts.map +1 -1
- package/dist/api-contracts/src/company/index.d.ts +0 -80
- package/dist/api-contracts/src/company/index.d.ts.map +1 -1
- package/dist/api-contracts/src/company/validation.d.ts +0 -40
- package/dist/api-contracts/src/company/validation.d.ts.map +1 -1
- package/dist/api-contracts/src/contract.d.ts +901 -3756
- package/dist/api-contracts/src/contract.d.ts.map +1 -1
- package/dist/api-contracts/src/facebook-feed/index.d.ts +0 -5
- package/dist/api-contracts/src/facebook-feed/index.d.ts.map +1 -1
- package/dist/api-contracts/src/hold-label/index.d.ts +2 -2
- package/dist/api-contracts/src/hold-label/validation.d.ts +2 -2
- package/dist/api-contracts/src/index.d.ts +0 -1
- package/dist/api-contracts/src/index.d.ts.map +1 -1
- package/dist/api-contracts/src/instagram/index.d.ts +0 -5
- package/dist/api-contracts/src/instagram/index.d.ts.map +1 -1
- package/dist/api-contracts/src/klink-chat/index.d.ts +3 -1282
- package/dist/api-contracts/src/klink-chat/index.d.ts.map +1 -1
- package/dist/api-contracts/src/klink-chat/schema.d.ts +8 -8
- package/dist/api-contracts/src/klink-chat/validation.d.ts +3 -3
- package/dist/api-contracts/src/line/index.d.ts +0 -5
- package/dist/api-contracts/src/line/index.d.ts.map +1 -1
- package/dist/api-contracts/src/messenger/index.d.ts +0 -5
- package/dist/api-contracts/src/messenger/index.d.ts.map +1 -1
- package/dist/api-contracts/src/sms/index.d.ts +0 -5
- package/dist/api-contracts/src/sms/index.d.ts.map +1 -1
- package/dist/api-contracts/src/subscription/index.d.ts +0 -438
- package/dist/api-contracts/src/subscription/index.d.ts.map +1 -1
- package/dist/api-contracts/src/telegram/index.d.ts +0 -5
- package/dist/api-contracts/src/telegram/index.d.ts.map +1 -1
- package/dist/api-contracts/src/telephony-agent-presence-status/index.d.ts +430 -0
- package/dist/api-contracts/src/telephony-agent-presence-status/index.d.ts.map +1 -1
- package/dist/api-contracts/src/telephony-agent-presence-status/schema.d.ts +3 -0
- package/dist/api-contracts/src/telephony-agent-presence-status/schema.d.ts.map +1 -1
- package/dist/api-contracts/src/telephony-agent-presence-status/validation.d.ts +3 -0
- package/dist/api-contracts/src/telephony-agent-presence-status/validation.d.ts.map +1 -1
- package/dist/api-contracts/src/viber/index.d.ts +0 -5
- package/dist/api-contracts/src/viber/index.d.ts.map +1 -1
- package/dist/api-contracts/src/webchat/index.d.ts +0 -5
- package/dist/api-contracts/src/webchat/index.d.ts.map +1 -1
- package/dist/api-contracts/src/whatsapp/index.d.ts +4 -14
- package/dist/api-contracts/src/whatsapp/index.d.ts.map +1 -1
- package/dist/api-contracts/src/whatsapp/validation.d.ts +4 -12
- package/dist/api-contracts/src/whatsapp/validation.d.ts.map +1 -1
- package/dist/api-contracts/src/workflow-rule/index.d.ts +0 -60
- package/dist/api-contracts/src/workflow-rule/index.d.ts.map +1 -1
- package/dist/entities/src/enums/chat.d.ts +0 -2
- package/dist/entities/src/enums/chat.d.ts.map +1 -1
- package/dist/index.js +1063 -1209
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1063 -1208
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -106,7 +106,6 @@ __export(index_exports, {
|
|
106
106
|
userContract: () => userContract,
|
107
107
|
userNotificationContract: () => userNotificationContract,
|
108
108
|
userPresenceStatusLogContract: () => userPresenceStatusLogContract,
|
109
|
-
widgetContract: () => widgetContract,
|
110
109
|
widgetSettingContract: () => widgetSettingContract,
|
111
110
|
workflowContract: () => workflowContract,
|
112
111
|
wrapUpFormContract: () => wrapUpFormContract
|
@@ -211,7 +210,6 @@ var CreateBotSchema = import_zod4.default.object({
|
|
211
210
|
var SendBotpressMessageSchema = import_zod4.default.object({
|
212
211
|
message: import_zod4.default.string().optional(),
|
213
212
|
type: import_zod4.default.string(),
|
214
|
-
roomId: import_zod4.default.string().uuid(),
|
215
213
|
room: import_zod4.default.object({
|
216
214
|
botpressConversationMetadata: import_zod4.default.object({
|
217
215
|
id: import_zod4.default.string()
|
@@ -222,7 +220,7 @@ var SendBotpressMessageSchema = import_zod4.default.object({
|
|
222
220
|
botpressBotId: (0, import_zod4.string)().uuid(),
|
223
221
|
type: import_zod4.default.string(),
|
224
222
|
metadata: import_zod4.default.object({
|
225
|
-
accessToken: import_zod4.default.string()
|
223
|
+
accessToken: import_zod4.default.string()
|
226
224
|
})
|
227
225
|
}),
|
228
226
|
platformContact: import_zod4.default.object({
|
@@ -239,7 +237,7 @@ var SendBotpressMessageSchema = import_zod4.default.object({
|
|
239
237
|
})
|
240
238
|
).nullable().optional()
|
241
239
|
})
|
242
|
-
})
|
240
|
+
})
|
243
241
|
});
|
244
242
|
|
245
243
|
// src/botpress/schema.ts
|
@@ -1355,9 +1353,8 @@ var GetRoomsSchema = import_zod26.default.object({
|
|
1355
1353
|
botpressBotId: import_zod26.default.string().uuid().optional(),
|
1356
1354
|
queueIds: import_zod26.default.string().array().optional(),
|
1357
1355
|
// for room multi select filter with queue
|
1358
|
-
queueFilterIds: import_zod26.default.string().array().optional()
|
1356
|
+
queueFilterIds: import_zod26.default.string().array().optional()
|
1359
1357
|
// for room filter with queue
|
1360
|
-
orderBy: import_zod26.default.union([import_zod26.default.literal("DESC"), import_zod26.default.literal("ASC")]).optional().default("DESC")
|
1361
1358
|
});
|
1362
1359
|
var UpdateRoomTagsAndNotesSchema = import_zod26.default.object({
|
1363
1360
|
note: import_zod26.default.string().optional(),
|
@@ -1399,7 +1396,6 @@ var SendMessageSchema = import_zod26.default.object({
|
|
1399
1396
|
import_zod26.default.literal("account_update"),
|
1400
1397
|
import_zod26.default.literal("confirmed_event_update")
|
1401
1398
|
]).optional(),
|
1402
|
-
whatsappTemplateName: import_zod26.default.string().optional(),
|
1403
1399
|
parentMessageId: import_zod26.default.string().uuid().optional(),
|
1404
1400
|
feedPostId: import_zod26.default.string().uuid().optional(),
|
1405
1401
|
platformId: import_zod26.default.string().optional(),
|
@@ -1408,30 +1404,7 @@ var SendMessageSchema = import_zod26.default.object({
|
|
1408
1404
|
params: import_zod26.default.object({
|
1409
1405
|
actionType: FeedActionTypeSchema.optional(),
|
1410
1406
|
mentions: import_zod26.default.array(import_zod26.default.string().uuid()).optional()
|
1411
|
-
}).optional()
|
1412
|
-
messageOptions: import_zod26.default.array(
|
1413
|
-
import_zod26.default.object({
|
1414
|
-
label: import_zod26.default.string(),
|
1415
|
-
value: import_zod26.default.string(),
|
1416
|
-
button: import_zod26.default.string().optional(),
|
1417
|
-
imageUrl: import_zod26.default.string().optional(),
|
1418
|
-
postback: import_zod26.default.string().optional()
|
1419
|
-
})
|
1420
|
-
).optional(),
|
1421
|
-
messageTemplate: import_zod26.default.array(
|
1422
|
-
import_zod26.default.object({
|
1423
|
-
title: import_zod26.default.string(),
|
1424
|
-
subtitle: import_zod26.default.string(),
|
1425
|
-
imageUrl: import_zod26.default.string(),
|
1426
|
-
actions: import_zod26.default.array(
|
1427
|
-
import_zod26.default.object({
|
1428
|
-
label: import_zod26.default.string(),
|
1429
|
-
value: import_zod26.default.string(),
|
1430
|
-
action: import_zod26.default.string()
|
1431
|
-
})
|
1432
|
-
)
|
1433
|
-
})
|
1434
|
-
).optional()
|
1407
|
+
}).optional()
|
1435
1408
|
});
|
1436
1409
|
var InitiateMessageSchema = import_zod26.default.object({
|
1437
1410
|
platformContactId: import_zod26.default.string().uuid().optional().nullable(),
|
@@ -1575,7 +1548,6 @@ var SendMessageToPlatformSchema = import_zod26.default.object({
|
|
1575
1548
|
import_zod26.default.literal("account_update"),
|
1576
1549
|
import_zod26.default.literal("confirmed_event_update")
|
1577
1550
|
]).optional(),
|
1578
|
-
whatsappTemplateName: import_zod26.default.string().optional(),
|
1579
1551
|
telegramBusinessConnectionId: import_zod26.default.string().nullable().optional(),
|
1580
1552
|
isBotRoom: import_zod26.default.boolean().nullable().default(false)
|
1581
1553
|
}),
|
@@ -2257,7 +2229,7 @@ var categoryContract = (0, import_core6.initContract)().router(
|
|
2257
2229
|
|
2258
2230
|
// src/channel/index.ts
|
2259
2231
|
var import_core7 = require("@ts-rest/core");
|
2260
|
-
var
|
2232
|
+
var import_zod41 = __toESM(require("zod"));
|
2261
2233
|
|
2262
2234
|
// src/messenger/validation.ts
|
2263
2235
|
var import_zod36 = __toESM(require("zod"));
|
@@ -2376,22 +2348,6 @@ var ConnectWhatsappSchema = import_zod37.default.object({
|
|
2376
2348
|
});
|
2377
2349
|
var CsatPreferenceSchema = import_zod37.default.object({
|
2378
2350
|
isCSATEnabled: import_zod37.default.boolean(),
|
2379
|
-
headline: import_zod37.default.string().optional().nullable(),
|
2380
|
-
image: import_zod37.default.object({
|
2381
|
-
bucketName: import_zod37.default.string(),
|
2382
|
-
fileName: import_zod37.default.string(),
|
2383
|
-
fileSize: import_zod37.default.number(),
|
2384
|
-
fileKey: import_zod37.default.string(),
|
2385
|
-
originalUrl: import_zod37.default.string().optional().nullable()
|
2386
|
-
}).optional().nullable(),
|
2387
|
-
scaleOptions: import_zod37.default.array(
|
2388
|
-
import_zod37.default.object({
|
2389
|
-
value: import_zod37.default.string(),
|
2390
|
-
label: import_zod37.default.string(),
|
2391
|
-
color: import_zod37.default.string().optional().nullable(),
|
2392
|
-
style: import_zod37.default.string().optional().nullable()
|
2393
|
-
})
|
2394
|
-
).optional().nullable(),
|
2395
2351
|
dispositions: import_zod37.default.array(import_zod37.default.string()).optional()
|
2396
2352
|
});
|
2397
2353
|
var ConnectLazadaSchema = import_zod37.default.object({
|
@@ -2452,7 +2408,6 @@ var FacebookBusinessSchema = import_zod39.z.object({
|
|
2452
2408
|
// src/whatsapp/validation.ts
|
2453
2409
|
var import_zod40 = __toESM(require("zod"));
|
2454
2410
|
var TemplatesSchema = import_zod40.default.object({
|
2455
|
-
id: import_zod40.default.string(),
|
2456
2411
|
category: import_zod40.default.union([
|
2457
2412
|
import_zod40.default.literal("UTILITY"),
|
2458
2413
|
import_zod40.default.literal("MARKETING"),
|
@@ -2472,7 +2427,7 @@ var WaapiQrSchema = import_zod40.default.object({
|
|
2472
2427
|
qr: import_zod40.default.string()
|
2473
2428
|
});
|
2474
2429
|
var TemplatesResponseSchema = DefaultSuccessResponseSchema.extend({
|
2475
|
-
data:
|
2430
|
+
data: TemplatesSchema
|
2476
2431
|
});
|
2477
2432
|
var GetTemplatesQuerySchema = import_zod40.default.object({
|
2478
2433
|
channelId: import_zod40.default.string()
|
@@ -2491,13 +2446,6 @@ var SendSeenToWaapiSchema = import_zod40.default.object({
|
|
2491
2446
|
platformContactId: import_zod40.default.string()
|
2492
2447
|
});
|
2493
2448
|
|
2494
|
-
// src/klink-chat/validation.ts
|
2495
|
-
var import_zod41 = __toESM(require("zod"));
|
2496
|
-
var KlinkChatChannelSchema = import_zod41.default.object({
|
2497
|
-
name: import_zod41.default.string(),
|
2498
|
-
metadata: import_zod41.default.any().optional()
|
2499
|
-
});
|
2500
|
-
|
2501
2449
|
// src/channel/index.ts
|
2502
2450
|
var messenger = (0, import_core7.initContract)().router(
|
2503
2451
|
{
|
@@ -2515,13 +2463,13 @@ var messenger = (0, import_core7.initContract)().router(
|
|
2515
2463
|
getFacebookBusinesses: {
|
2516
2464
|
method: "GET",
|
2517
2465
|
path: "/facebook-businesses",
|
2518
|
-
query:
|
2519
|
-
userId:
|
2520
|
-
userAccessToken:
|
2466
|
+
query: import_zod41.default.object({
|
2467
|
+
userId: import_zod41.default.string(),
|
2468
|
+
userAccessToken: import_zod41.default.string()
|
2521
2469
|
}),
|
2522
2470
|
responses: {
|
2523
2471
|
200: DefaultSuccessResponseSchema.extend({
|
2524
|
-
data:
|
2472
|
+
data: import_zod41.default.array(FacebookBusinessSchema)
|
2525
2473
|
}),
|
2526
2474
|
500: DefaultErrorResponseSchema
|
2527
2475
|
}
|
@@ -2529,9 +2477,9 @@ var messenger = (0, import_core7.initContract)().router(
|
|
2529
2477
|
getFacebookBusinessPages: {
|
2530
2478
|
method: "GET",
|
2531
2479
|
path: "/facebook-business-pages",
|
2532
|
-
query:
|
2533
|
-
businessId:
|
2534
|
-
userAccessToken:
|
2480
|
+
query: import_zod41.default.object({
|
2481
|
+
businessId: import_zod41.default.string(),
|
2482
|
+
userAccessToken: import_zod41.default.string()
|
2535
2483
|
}),
|
2536
2484
|
responses: {
|
2537
2485
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -2710,10 +2658,10 @@ var whatsapp = (0, import_core7.initContract)().router(
|
|
2710
2658
|
deleteWaapi: {
|
2711
2659
|
method: "DELETE",
|
2712
2660
|
path: "/mobile/:instanceId",
|
2713
|
-
pathParams:
|
2714
|
-
instanceId:
|
2661
|
+
pathParams: import_zod41.default.object({
|
2662
|
+
instanceId: import_zod41.default.string()
|
2715
2663
|
}),
|
2716
|
-
body:
|
2664
|
+
body: import_zod41.default.any().optional(),
|
2717
2665
|
responses: {
|
2718
2666
|
200: DefaultSuccessResponseSchema,
|
2719
2667
|
500: DefaultErrorResponseSchema,
|
@@ -2744,26 +2692,6 @@ var lazada = (0, import_core7.initContract)().router(
|
|
2744
2692
|
pathPrefix: "lazada"
|
2745
2693
|
}
|
2746
2694
|
);
|
2747
|
-
var klinkchat = (0, import_core7.initContract)().router(
|
2748
|
-
{
|
2749
|
-
connect: {
|
2750
|
-
method: "POST",
|
2751
|
-
path: "/connect",
|
2752
|
-
summary: "Connect to klink chat",
|
2753
|
-
body: KlinkChatChannelSchema,
|
2754
|
-
responses: {
|
2755
|
-
200: DefaultSuccessResponseSchema.extend({
|
2756
|
-
channel: ChannelSchema
|
2757
|
-
}),
|
2758
|
-
400: DefaultErrorResponseSchema,
|
2759
|
-
500: DefaultErrorResponseSchema
|
2760
|
-
}
|
2761
|
-
}
|
2762
|
-
},
|
2763
|
-
{
|
2764
|
-
pathPrefix: "klinkchat"
|
2765
|
-
}
|
2766
|
-
);
|
2767
2695
|
var channelContract = (0, import_core7.initContract)().router(
|
2768
2696
|
{
|
2769
2697
|
getChannels: {
|
@@ -2780,8 +2708,8 @@ var channelContract = (0, import_core7.initContract)().router(
|
|
2780
2708
|
disconnect: {
|
2781
2709
|
method: "POST",
|
2782
2710
|
path: "channel/disconnect/:channelId",
|
2783
|
-
pathParams:
|
2784
|
-
channelId:
|
2711
|
+
pathParams: import_zod41.default.object({
|
2712
|
+
channelId: import_zod41.default.string().uuid()
|
2785
2713
|
}),
|
2786
2714
|
responses: {
|
2787
2715
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -2795,8 +2723,8 @@ var channelContract = (0, import_core7.initContract)().router(
|
|
2795
2723
|
delete: {
|
2796
2724
|
method: "DELETE",
|
2797
2725
|
path: "channel/delete/:channelId",
|
2798
|
-
pathParams:
|
2799
|
-
channelId:
|
2726
|
+
pathParams: import_zod41.default.object({
|
2727
|
+
channelId: import_zod41.default.string().uuid()
|
2800
2728
|
}),
|
2801
2729
|
responses: {
|
2802
2730
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -2804,14 +2732,14 @@ var channelContract = (0, import_core7.initContract)().router(
|
|
2804
2732
|
}),
|
2805
2733
|
408: DefaultErrorResponseSchema
|
2806
2734
|
},
|
2807
|
-
body:
|
2735
|
+
body: import_zod41.default.any().optional(),
|
2808
2736
|
summary: "Delete message channel"
|
2809
2737
|
},
|
2810
2738
|
rename: {
|
2811
2739
|
method: "POST",
|
2812
2740
|
path: "channel/rename/:channelId",
|
2813
|
-
pathParams:
|
2814
|
-
channelId:
|
2741
|
+
pathParams: import_zod41.default.object({
|
2742
|
+
channelId: import_zod41.default.string().uuid()
|
2815
2743
|
}),
|
2816
2744
|
responses: {
|
2817
2745
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -2819,16 +2747,16 @@ var channelContract = (0, import_core7.initContract)().router(
|
|
2819
2747
|
}),
|
2820
2748
|
408: DefaultErrorResponseSchema
|
2821
2749
|
},
|
2822
|
-
body:
|
2823
|
-
brandName:
|
2750
|
+
body: import_zod41.default.object({
|
2751
|
+
brandName: import_zod41.default.string()
|
2824
2752
|
}),
|
2825
2753
|
summary: "Rename message channel"
|
2826
2754
|
},
|
2827
2755
|
reconnect: {
|
2828
2756
|
method: "POST",
|
2829
2757
|
path: "channel/reconnect/:channelId",
|
2830
|
-
pathParams:
|
2831
|
-
channelId:
|
2758
|
+
pathParams: import_zod41.default.object({
|
2759
|
+
channelId: import_zod41.default.string().uuid()
|
2832
2760
|
}),
|
2833
2761
|
responses: {
|
2834
2762
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -2836,8 +2764,8 @@ var channelContract = (0, import_core7.initContract)().router(
|
|
2836
2764
|
}),
|
2837
2765
|
408: DefaultErrorResponseSchema
|
2838
2766
|
},
|
2839
|
-
body:
|
2840
|
-
instanceId:
|
2767
|
+
body: import_zod41.default.object({
|
2768
|
+
instanceId: import_zod41.default.string().nullable().optional()
|
2841
2769
|
}),
|
2842
2770
|
summary: "Reconnect message channel"
|
2843
2771
|
},
|
@@ -2869,21 +2797,21 @@ var channelContract = (0, import_core7.initContract)().router(
|
|
2869
2797
|
path: "channel/update-new-tenant",
|
2870
2798
|
responses: {
|
2871
2799
|
200: DefaultSuccessResponseSchema.extend({
|
2872
|
-
message:
|
2800
|
+
message: import_zod41.default.string()
|
2873
2801
|
}),
|
2874
2802
|
408: DefaultErrorResponseSchema
|
2875
2803
|
},
|
2876
|
-
body:
|
2877
|
-
id:
|
2878
|
-
time:
|
2804
|
+
body: import_zod41.default.object({
|
2805
|
+
id: import_zod41.default.string(),
|
2806
|
+
time: import_zod41.default.string()
|
2879
2807
|
}),
|
2880
2808
|
summary: "Update new tenant"
|
2881
2809
|
},
|
2882
2810
|
updateChannelCsatPreference: {
|
2883
2811
|
method: "POST",
|
2884
2812
|
path: "csat/:channelId",
|
2885
|
-
pathParams:
|
2886
|
-
channelId:
|
2813
|
+
pathParams: import_zod41.default.object({
|
2814
|
+
channelId: import_zod41.default.string().uuid()
|
2887
2815
|
}),
|
2888
2816
|
responses: {
|
2889
2817
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -2901,8 +2829,7 @@ var channelContract = (0, import_core7.initContract)().router(
|
|
2901
2829
|
telegram,
|
2902
2830
|
webchat,
|
2903
2831
|
whatsapp,
|
2904
|
-
lazada
|
2905
|
-
klinkchat
|
2832
|
+
lazada
|
2906
2833
|
},
|
2907
2834
|
{
|
2908
2835
|
baseHeaders: DefaultHeaderSchema
|
@@ -2958,7 +2885,7 @@ var channelBotContract = (0, import_core7.initContract)().router(
|
|
2958
2885
|
400: DefaultErrorResponseSchema,
|
2959
2886
|
500: DefaultErrorResponseSchema
|
2960
2887
|
},
|
2961
|
-
body:
|
2888
|
+
body: import_zod41.default.object({})
|
2962
2889
|
}
|
2963
2890
|
},
|
2964
2891
|
{
|
@@ -2987,12 +2914,12 @@ var channelSMSContract = (0, import_core7.initContract)().router(
|
|
2987
2914
|
|
2988
2915
|
// src/chat/index.ts
|
2989
2916
|
var import_core8 = require("@ts-rest/core");
|
2990
|
-
var
|
2917
|
+
var import_zod42 = __toESM(require("zod"));
|
2991
2918
|
var receiveMessageContract = (0, import_core8.initContract)().router(
|
2992
2919
|
{
|
2993
2920
|
receiveMessage: {
|
2994
2921
|
method: "POST",
|
2995
|
-
path: "/receive",
|
2922
|
+
path: "ms/message/receive",
|
2996
2923
|
body: ReceiveMessageSchema,
|
2997
2924
|
responses: {
|
2998
2925
|
200: null,
|
@@ -3002,11 +2929,10 @@ var receiveMessageContract = (0, import_core8.initContract)().router(
|
|
3002
2929
|
}
|
3003
2930
|
},
|
3004
2931
|
{
|
3005
|
-
baseHeaders:
|
3006
|
-
"x-code":
|
3007
|
-
"x-tenant":
|
3008
|
-
})
|
3009
|
-
pathPrefix: "ms/message"
|
2932
|
+
baseHeaders: import_zod42.default.object({
|
2933
|
+
"x-code": import_zod42.default.string().uuid(),
|
2934
|
+
"x-tenant": import_zod42.default.string().uuid()
|
2935
|
+
})
|
3010
2936
|
}
|
3011
2937
|
);
|
3012
2938
|
var mainFeedContract = (0, import_core8.initContract)().router(
|
@@ -3014,8 +2940,8 @@ var mainFeedContract = (0, import_core8.initContract)().router(
|
|
3014
2940
|
getFeedPostById: {
|
3015
2941
|
method: "GET",
|
3016
2942
|
path: "chs/api/v1/chat/feed-post/:id",
|
3017
|
-
pathParams:
|
3018
|
-
id:
|
2943
|
+
pathParams: import_zod42.default.object({
|
2944
|
+
id: import_zod42.default.string().uuid()
|
3019
2945
|
}),
|
3020
2946
|
responses: {
|
3021
2947
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -3027,14 +2953,14 @@ var mainFeedContract = (0, import_core8.initContract)().router(
|
|
3027
2953
|
getMessagesByParent: {
|
3028
2954
|
method: "GET",
|
3029
2955
|
path: "chs/api/v1/chat/message/:parentId/relevance",
|
3030
|
-
pathParams:
|
3031
|
-
parentId:
|
2956
|
+
pathParams: import_zod42.default.object({
|
2957
|
+
parentId: import_zod42.default.string().uuid()
|
3032
2958
|
}),
|
3033
2959
|
responses: {
|
3034
2960
|
200: DefaultSuccessResponseSchema.extend({
|
3035
|
-
total:
|
3036
|
-
page:
|
3037
|
-
pageSize:
|
2961
|
+
total: import_zod42.default.number(),
|
2962
|
+
page: import_zod42.default.number(),
|
2963
|
+
pageSize: import_zod42.default.number(),
|
3038
2964
|
data: MessageRelevanceSchema
|
3039
2965
|
})
|
3040
2966
|
},
|
@@ -3053,12 +2979,12 @@ var mainChatRoomContract = (0, import_core8.initContract)().router(
|
|
3053
2979
|
path: "chs/api/v1/chat/rooms",
|
3054
2980
|
responses: {
|
3055
2981
|
200: DefaultSuccessResponseSchema.extend({
|
3056
|
-
total:
|
3057
|
-
page:
|
3058
|
-
pageSize:
|
3059
|
-
data:
|
3060
|
-
showResumeLabel:
|
3061
|
-
unreadCountsByAssignee:
|
2982
|
+
total: import_zod42.default.number(),
|
2983
|
+
page: import_zod42.default.number(),
|
2984
|
+
pageSize: import_zod42.default.number(),
|
2985
|
+
data: import_zod42.default.array(RoomSchema),
|
2986
|
+
showResumeLabel: import_zod42.default.boolean(),
|
2987
|
+
unreadCountsByAssignee: import_zod42.default.array(UnreadCountsByAssigneeSchema)
|
3062
2988
|
}),
|
3063
2989
|
401: DefaultUnauthorizedSchema
|
3064
2990
|
},
|
@@ -3068,43 +2994,43 @@ var mainChatRoomContract = (0, import_core8.initContract)().router(
|
|
3068
2994
|
getRoom: {
|
3069
2995
|
method: "GET",
|
3070
2996
|
path: "chs/api/v1/chat/rooms/:roomId",
|
3071
|
-
pathParams:
|
3072
|
-
roomId:
|
2997
|
+
pathParams: import_zod42.default.object({
|
2998
|
+
roomId: import_zod42.default.string().uuid()
|
3073
2999
|
}),
|
3074
3000
|
responses: {
|
3075
3001
|
200: DefaultSuccessResponseSchema.extend({
|
3076
|
-
data:
|
3002
|
+
data: import_zod42.default.object({
|
3077
3003
|
room: RoomSchema,
|
3078
|
-
showResumeLabel:
|
3079
|
-
latestIncomingMessage:
|
3080
|
-
message:
|
3004
|
+
showResumeLabel: import_zod42.default.boolean(),
|
3005
|
+
latestIncomingMessage: import_zod42.default.object({
|
3006
|
+
message: import_zod42.default.string(),
|
3081
3007
|
direction: MessageDirectionTypeSchema,
|
3082
3008
|
type: MessageTypeSchema,
|
3083
|
-
readAt:
|
3084
|
-
metadata:
|
3085
|
-
platformId:
|
3086
|
-
platformMessageId:
|
3087
|
-
replyPlatformMessageId:
|
3088
|
-
template:
|
3009
|
+
readAt: import_zod42.default.date(),
|
3010
|
+
metadata: import_zod42.default.any(),
|
3011
|
+
platformId: import_zod42.default.string(),
|
3012
|
+
platformMessageId: import_zod42.default.string(),
|
3013
|
+
replyPlatformMessageId: import_zod42.default.string(),
|
3014
|
+
template: import_zod42.default.any(),
|
3089
3015
|
locale: MessageLocaleTypeSchema,
|
3090
|
-
url:
|
3091
|
-
previewUrl:
|
3092
|
-
imageSetId:
|
3016
|
+
url: import_zod42.default.string(),
|
3017
|
+
previewUrl: import_zod42.default.string(),
|
3018
|
+
imageSetId: import_zod42.default.string()
|
3093
3019
|
}),
|
3094
|
-
latestMessage:
|
3095
|
-
message:
|
3020
|
+
latestMessage: import_zod42.default.object({
|
3021
|
+
message: import_zod42.default.string(),
|
3096
3022
|
direction: MessageDirectionTypeSchema,
|
3097
3023
|
type: MessageTypeSchema,
|
3098
|
-
readAt:
|
3099
|
-
metadata:
|
3100
|
-
platformId:
|
3101
|
-
platformMessageId:
|
3102
|
-
replyPlatformMessageId:
|
3103
|
-
template:
|
3024
|
+
readAt: import_zod42.default.date(),
|
3025
|
+
metadata: import_zod42.default.any(),
|
3026
|
+
platformId: import_zod42.default.string(),
|
3027
|
+
platformMessageId: import_zod42.default.string(),
|
3028
|
+
replyPlatformMessageId: import_zod42.default.string(),
|
3029
|
+
template: import_zod42.default.any(),
|
3104
3030
|
locale: MessageLocaleTypeSchema,
|
3105
|
-
url:
|
3106
|
-
previewUrl:
|
3107
|
-
imageSetId:
|
3031
|
+
url: import_zod42.default.string(),
|
3032
|
+
previewUrl: import_zod42.default.string(),
|
3033
|
+
imageSetId: import_zod42.default.string()
|
3108
3034
|
})
|
3109
3035
|
})
|
3110
3036
|
}),
|
@@ -3119,7 +3045,7 @@ var mainChatRoomContract = (0, import_core8.initContract)().router(
|
|
3119
3045
|
responses: {
|
3120
3046
|
200: DefaultSuccessResponseSchema.extend({
|
3121
3047
|
data: RoomSchema.extend({
|
3122
|
-
solveMessage:
|
3048
|
+
solveMessage: import_zod42.default.string()
|
3123
3049
|
})
|
3124
3050
|
}),
|
3125
3051
|
409: DefaultErrorResponseSchema
|
@@ -3129,14 +3055,14 @@ var mainChatRoomContract = (0, import_core8.initContract)().router(
|
|
3129
3055
|
createRoom: {
|
3130
3056
|
method: "POST",
|
3131
3057
|
path: "ms/chat/room/create/:platformContactId",
|
3132
|
-
pathParams:
|
3133
|
-
platformContactId:
|
3058
|
+
pathParams: import_zod42.default.object({
|
3059
|
+
platformContactId: import_zod42.default.string().uuid()
|
3134
3060
|
}),
|
3135
3061
|
responses: {
|
3136
3062
|
200: DefaultSuccessResponseSchema.extend({
|
3137
3063
|
data: RoomSchema.extend({
|
3138
3064
|
contact: ContactSchema,
|
3139
|
-
openMessage:
|
3065
|
+
openMessage: import_zod42.default.string()
|
3140
3066
|
})
|
3141
3067
|
})
|
3142
3068
|
},
|
@@ -3146,13 +3072,13 @@ var mainChatRoomContract = (0, import_core8.initContract)().router(
|
|
3146
3072
|
readRoom: {
|
3147
3073
|
method: "POST",
|
3148
3074
|
path: "ms/chat/room/read/:roomId",
|
3149
|
-
pathParams:
|
3150
|
-
roomId:
|
3075
|
+
pathParams: import_zod42.default.object({
|
3076
|
+
roomId: import_zod42.default.string().uuid()
|
3151
3077
|
}),
|
3152
3078
|
responses: {
|
3153
3079
|
200: DefaultSuccessResponseSchema.extend({
|
3154
3080
|
data: RoomSchema.extend({
|
3155
|
-
description:
|
3081
|
+
description: import_zod42.default.string().nullable()
|
3156
3082
|
})
|
3157
3083
|
})
|
3158
3084
|
},
|
@@ -3164,12 +3090,12 @@ var mainChatRoomContract = (0, import_core8.initContract)().router(
|
|
3164
3090
|
path: "ms/chat/search",
|
3165
3091
|
responses: {
|
3166
3092
|
200: DefaultSuccessResponseSchema.extend({
|
3167
|
-
total:
|
3168
|
-
page:
|
3169
|
-
pageSize:
|
3170
|
-
data:
|
3093
|
+
total: import_zod42.default.number(),
|
3094
|
+
page: import_zod42.default.number(),
|
3095
|
+
pageSize: import_zod42.default.number(),
|
3096
|
+
data: import_zod42.default.array(
|
3171
3097
|
RoomSchema.extend({
|
3172
|
-
automationQueueId:
|
3098
|
+
automationQueueId: import_zod42.default.string().uuid().optional().nullable()
|
3173
3099
|
})
|
3174
3100
|
)
|
3175
3101
|
})
|
@@ -3179,7 +3105,7 @@ var mainChatRoomContract = (0, import_core8.initContract)().router(
|
|
3179
3105
|
},
|
3180
3106
|
getAllRoomCount: {
|
3181
3107
|
method: "GET",
|
3182
|
-
path: "chs/api/v1/chat/opened-and-closed-room-counts",
|
3108
|
+
path: "/chs/api/v1/chat/opened-and-closed-room-counts",
|
3183
3109
|
responses: {
|
3184
3110
|
200: DefaultSuccessResponseSchema.extend({
|
3185
3111
|
data: AllOpenCloseRoomCountSchema
|
@@ -3189,7 +3115,7 @@ var mainChatRoomContract = (0, import_core8.initContract)().router(
|
|
3189
3115
|
},
|
3190
3116
|
getAllQueueAndHoldCount: {
|
3191
3117
|
method: "GET",
|
3192
|
-
path: "chs/api/v1/chat/queue-and-hold-room-counts",
|
3118
|
+
path: "/chs/api/v1/chat/queue-and-hold-room-counts",
|
3193
3119
|
responses: {
|
3194
3120
|
200: DefaultSuccessResponseSchema.extend({
|
3195
3121
|
data: AllHoldAndQueueRoomCountSchema
|
@@ -3199,7 +3125,7 @@ var mainChatRoomContract = (0, import_core8.initContract)().router(
|
|
3199
3125
|
},
|
3200
3126
|
getAllBotRoomCount: {
|
3201
3127
|
method: "GET",
|
3202
|
-
path: "chs/api/v1/chat/bot-room-count",
|
3128
|
+
path: "/chs/api/v1/chat/bot-room-count",
|
3203
3129
|
responses: {
|
3204
3130
|
200: DefaultSuccessResponseSchema.extend({
|
3205
3131
|
data: AllOpenCloseBotRoomCountSchema
|
@@ -3210,17 +3136,17 @@ var mainChatRoomContract = (0, import_core8.initContract)().router(
|
|
3210
3136
|
botRoomTakeOver: {
|
3211
3137
|
method: "POST",
|
3212
3138
|
path: "ms/chat/bot-room/take-over/:roomId",
|
3213
|
-
pathParams:
|
3214
|
-
roomId:
|
3139
|
+
pathParams: import_zod42.default.object({
|
3140
|
+
roomId: import_zod42.default.string().uuid()
|
3215
3141
|
}),
|
3216
|
-
body:
|
3217
|
-
assigneeId:
|
3142
|
+
body: import_zod42.default.object({
|
3143
|
+
assigneeId: import_zod42.default.string().uuid().optional()
|
3218
3144
|
}),
|
3219
3145
|
responses: {
|
3220
3146
|
200: DefaultSuccessResponseSchema.extend({
|
3221
3147
|
data: RoomSchema.extend({
|
3222
3148
|
contact: ContactSchema,
|
3223
|
-
openMessage:
|
3149
|
+
openMessage: import_zod42.default.string()
|
3224
3150
|
})
|
3225
3151
|
})
|
3226
3152
|
},
|
@@ -3245,56 +3171,44 @@ var mainChatContract = (0, import_core8.initContract)().router(
|
|
3245
3171
|
},
|
3246
3172
|
summary: "Send message to room"
|
3247
3173
|
},
|
3248
|
-
// sendMessageAi: {
|
3249
|
-
// method: 'POST',
|
3250
|
-
// path: '/message/ai',
|
3251
|
-
// body: SendMessageSchema,
|
3252
|
-
// responses: {
|
3253
|
-
// 200: SendMessageResponseSchema,
|
3254
|
-
// 400: DefaultErrorResponseSchema,
|
3255
|
-
// 422: DefaultErrorResponseSchema,
|
3256
|
-
// 500: DefaultErrorResponseSchema,
|
3257
|
-
// },
|
3258
|
-
// summary: 'Send message to room',
|
3259
|
-
// },
|
3260
3174
|
getUnreadCounts: {
|
3261
3175
|
method: "GET",
|
3262
3176
|
path: "ms/chat/rooms/unread-count",
|
3263
3177
|
responses: {
|
3264
3178
|
200: DefaultSuccessResponseSchema.extend({
|
3265
|
-
unreadCountsByAssignee:
|
3179
|
+
unreadCountsByAssignee: import_zod42.default.array(UnreadCountsByAssigneeSchema)
|
3266
3180
|
})
|
3267
3181
|
}
|
3268
3182
|
},
|
3269
3183
|
getRoomsByPlatformContactId: {
|
3270
3184
|
method: "GET",
|
3271
3185
|
path: "ms/chat/rooms/:platformContactId",
|
3272
|
-
pathParams:
|
3273
|
-
platformContactId:
|
3186
|
+
pathParams: import_zod42.default.object({
|
3187
|
+
platformContactId: import_zod42.default.string()
|
3274
3188
|
}),
|
3275
3189
|
responses: {
|
3276
3190
|
200: DefaultSuccessResponseSchema.extend({
|
3277
|
-
data:
|
3278
|
-
|
3279
|
-
id:
|
3191
|
+
data: import_zod42.default.array(
|
3192
|
+
import_zod42.default.object({
|
3193
|
+
id: import_zod42.default.string().uuid()
|
3280
3194
|
})
|
3281
3195
|
),
|
3282
|
-
total:
|
3196
|
+
total: import_zod42.default.number()
|
3283
3197
|
})
|
3284
3198
|
}
|
3285
3199
|
},
|
3286
3200
|
getMessages: {
|
3287
3201
|
method: "GET",
|
3288
3202
|
path: "chs/api/v1/chat/message/:roomId",
|
3289
|
-
pathParams:
|
3290
|
-
roomId:
|
3203
|
+
pathParams: import_zod42.default.object({
|
3204
|
+
roomId: import_zod42.default.string().uuid()
|
3291
3205
|
}),
|
3292
3206
|
responses: {
|
3293
3207
|
200: DefaultSuccessResponseSchema.extend({
|
3294
|
-
total:
|
3295
|
-
page:
|
3296
|
-
pageSize:
|
3297
|
-
data:
|
3208
|
+
total: import_zod42.default.number(),
|
3209
|
+
page: import_zod42.default.number(),
|
3210
|
+
pageSize: import_zod42.default.number(),
|
3211
|
+
data: import_zod42.default.array(MessageWithFeedPostSchema)
|
3298
3212
|
})
|
3299
3213
|
},
|
3300
3214
|
query: OrderQueryParamSchema,
|
@@ -3306,7 +3220,7 @@ var mainChatContract = (0, import_core8.initContract)().router(
|
|
3306
3220
|
body: UpdateUnAssignRoomsSchema,
|
3307
3221
|
responses: {
|
3308
3222
|
200: DefaultSuccessResponseSchema.extend({
|
3309
|
-
data:
|
3223
|
+
data: import_zod42.default.array(RoomSchema)
|
3310
3224
|
}),
|
3311
3225
|
409: DefaultErrorResponseSchema
|
3312
3226
|
},
|
@@ -3327,8 +3241,8 @@ var mainChatContract = (0, import_core8.initContract)().router(
|
|
3327
3241
|
getRoomContact: {
|
3328
3242
|
method: "GET",
|
3329
3243
|
path: "ms/chat/contact/:contactId",
|
3330
|
-
pathParams:
|
3331
|
-
contactId:
|
3244
|
+
pathParams: import_zod42.default.object({
|
3245
|
+
contactId: import_zod42.default.string().uuid()
|
3332
3246
|
}),
|
3333
3247
|
responses: {
|
3334
3248
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -3357,7 +3271,7 @@ var initiateMessageContract = (0, import_core8.initContract)().router(
|
|
3357
3271
|
{
|
3358
3272
|
initiateMessage: {
|
3359
3273
|
method: "POST",
|
3360
|
-
path: "/initiate-message",
|
3274
|
+
path: "ms/chat/initiate-message",
|
3361
3275
|
body: InitiateMessageSchema,
|
3362
3276
|
responses: {
|
3363
3277
|
200: DefaultSuccessResponseSchema.extend({ data: MessageSchema }),
|
@@ -3367,15 +3281,14 @@ var initiateMessageContract = (0, import_core8.initContract)().router(
|
|
3367
3281
|
}
|
3368
3282
|
},
|
3369
3283
|
{
|
3370
|
-
baseHeaders: DefaultHeaderSchema
|
3371
|
-
pathPrefix: "ms/chat"
|
3284
|
+
baseHeaders: DefaultHeaderSchema
|
3372
3285
|
}
|
3373
3286
|
);
|
3374
3287
|
var mainChatMessageContract = (0, import_core8.initContract)().router(
|
3375
3288
|
{
|
3376
3289
|
sendMessage: {
|
3377
3290
|
method: "POST",
|
3378
|
-
path: "/message",
|
3291
|
+
path: "ms/chat/message",
|
3379
3292
|
body: SendMessageSchema,
|
3380
3293
|
responses: {
|
3381
3294
|
200: SendMessageResponseSchema,
|
@@ -3387,7 +3300,7 @@ var mainChatMessageContract = (0, import_core8.initContract)().router(
|
|
3387
3300
|
},
|
3388
3301
|
deleteMessage: {
|
3389
3302
|
method: "DELETE",
|
3390
|
-
path: "/message",
|
3303
|
+
path: "ms/chat/message",
|
3391
3304
|
body: ActionMessageSchema,
|
3392
3305
|
responses: {
|
3393
3306
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -3399,114 +3312,113 @@ var mainChatMessageContract = (0, import_core8.initContract)().router(
|
|
3399
3312
|
},
|
3400
3313
|
getEditedMessages: {
|
3401
3314
|
method: "GET",
|
3402
|
-
path: "/edited-messages/:messageId",
|
3403
|
-
pathParams:
|
3404
|
-
messageId:
|
3315
|
+
path: "ms/chat/edited-messages/:messageId",
|
3316
|
+
pathParams: import_zod42.default.object({
|
3317
|
+
messageId: import_zod42.default.string().uuid()
|
3405
3318
|
}),
|
3406
3319
|
responses: {
|
3407
3320
|
200: DefaultSuccessResponseSchema.extend({
|
3408
|
-
data:
|
3321
|
+
data: import_zod42.default.array(MessageSchema)
|
3409
3322
|
})
|
3410
3323
|
}
|
3411
3324
|
}
|
3412
3325
|
},
|
3413
3326
|
{
|
3414
|
-
baseHeaders: DefaultHeaderSchema
|
3415
|
-
pathPrefix: "ms/chat"
|
3327
|
+
baseHeaders: DefaultHeaderSchema
|
3416
3328
|
}
|
3417
3329
|
);
|
3418
3330
|
|
3419
3331
|
// src/comment/index.ts
|
3420
3332
|
var import_core9 = require("@ts-rest/core");
|
3421
|
-
var
|
3333
|
+
var import_zod46 = __toESM(require("zod"));
|
3422
3334
|
|
3423
3335
|
// src/comment/validation.ts
|
3424
|
-
var
|
3425
|
-
var CreateCommentSchema =
|
3426
|
-
ticketId:
|
3427
|
-
comment:
|
3428
|
-
mentions:
|
3429
|
-
});
|
3430
|
-
var UpdateCommentSchema =
|
3431
|
-
comment:
|
3432
|
-
mentions:
|
3433
|
-
});
|
3434
|
-
var GetCommentQuerySchema =
|
3435
|
-
ticketId:
|
3436
|
-
withDeleted:
|
3336
|
+
var import_zod43 = require("zod");
|
3337
|
+
var CreateCommentSchema = import_zod43.z.object({
|
3338
|
+
ticketId: import_zod43.z.string(),
|
3339
|
+
comment: import_zod43.z.string(),
|
3340
|
+
mentions: import_zod43.z.array(import_zod43.z.string()).optional()
|
3341
|
+
});
|
3342
|
+
var UpdateCommentSchema = import_zod43.z.object({
|
3343
|
+
comment: import_zod43.z.string(),
|
3344
|
+
mentions: import_zod43.z.array(import_zod43.z.string()).optional()
|
3345
|
+
});
|
3346
|
+
var GetCommentQuerySchema = import_zod43.z.object({
|
3347
|
+
ticketId: import_zod43.z.string().optional(),
|
3348
|
+
withDeleted: import_zod43.z.enum(["true", "false"])
|
3437
3349
|
}).optional();
|
3438
3350
|
|
3439
3351
|
// src/comment/schema.ts
|
3440
|
-
var
|
3352
|
+
var import_zod45 = __toESM(require("zod"));
|
3441
3353
|
|
3442
3354
|
// src/ticket/schema.ts
|
3443
|
-
var
|
3355
|
+
var import_zod44 = __toESM(require("zod"));
|
3444
3356
|
var TicketCustomFieldSchema = DefaultEntitySchema.extend({
|
3445
|
-
textValue:
|
3446
|
-
booleanValue:
|
3447
|
-
numberValue:
|
3448
|
-
dateValue:
|
3357
|
+
textValue: import_zod44.default.string().nullable(),
|
3358
|
+
booleanValue: import_zod44.default.boolean().nullable(),
|
3359
|
+
numberValue: import_zod44.default.coerce.number().nullable(),
|
3360
|
+
dateValue: import_zod44.default.date().nullable(),
|
3449
3361
|
attribute: AttributeSchema.omit({ options: true, group: true }),
|
3450
|
-
uploads:
|
3451
|
-
});
|
3452
|
-
var TicketEntityTypesSchema =
|
3453
|
-
id:
|
3454
|
-
createdAt:
|
3455
|
-
updatedAt:
|
3456
|
-
deletedAt:
|
3457
|
-
entity:
|
3458
|
-
description:
|
3459
|
-
});
|
3460
|
-
var TicketActivitySchema =
|
3461
|
-
id:
|
3462
|
-
createdAt:
|
3463
|
-
updatedAt:
|
3464
|
-
deletedAt:
|
3465
|
-
entityId:
|
3466
|
-
description:
|
3362
|
+
uploads: import_zod44.default.array(UploadSchema)
|
3363
|
+
});
|
3364
|
+
var TicketEntityTypesSchema = import_zod44.default.object({
|
3365
|
+
id: import_zod44.default.string().uuid(),
|
3366
|
+
createdAt: import_zod44.default.date(),
|
3367
|
+
updatedAt: import_zod44.default.date(),
|
3368
|
+
deletedAt: import_zod44.default.date().nullable(),
|
3369
|
+
entity: import_zod44.default.string(),
|
3370
|
+
description: import_zod44.default.string().nullable()
|
3371
|
+
});
|
3372
|
+
var TicketActivitySchema = import_zod44.default.object({
|
3373
|
+
id: import_zod44.default.string().uuid(),
|
3374
|
+
createdAt: import_zod44.default.date(),
|
3375
|
+
updatedAt: import_zod44.default.date(),
|
3376
|
+
deletedAt: import_zod44.default.date().nullable(),
|
3377
|
+
entityId: import_zod44.default.string(),
|
3378
|
+
description: import_zod44.default.string(),
|
3467
3379
|
entityType: TicketEntityTypesSchema
|
3468
3380
|
});
|
3469
3381
|
var TicketSchema = DefaultEntitySchema.extend({
|
3470
|
-
title:
|
3471
|
-
description:
|
3472
|
-
type:
|
3473
|
-
channel:
|
3474
|
-
priority:
|
3475
|
-
status:
|
3476
|
-
contactId:
|
3477
|
-
creatorId:
|
3382
|
+
title: import_zod44.default.string(),
|
3383
|
+
description: import_zod44.default.string().nullable(),
|
3384
|
+
type: import_zod44.default.string(),
|
3385
|
+
channel: import_zod44.default.string(),
|
3386
|
+
priority: import_zod44.default.string(),
|
3387
|
+
status: import_zod44.default.string(),
|
3388
|
+
contactId: import_zod44.default.string().uuid(),
|
3389
|
+
creatorId: import_zod44.default.string().uuid(),
|
3478
3390
|
creator: UserSchema.optional().nullable(),
|
3479
|
-
assigneeId:
|
3391
|
+
assigneeId: import_zod44.default.string().uuid(),
|
3480
3392
|
assignee: UserSchema.optional().nullable(),
|
3481
3393
|
//note: all user info is actually not included, check with reponse data
|
3482
|
-
reasonToAssign:
|
3483
|
-
ticketNumber:
|
3484
|
-
customFields:
|
3485
|
-
tags:
|
3486
|
-
categories:
|
3394
|
+
reasonToAssign: import_zod44.default.string().nullable(),
|
3395
|
+
ticketNumber: import_zod44.default.coerce.number().optional(),
|
3396
|
+
customFields: import_zod44.default.array(TicketCustomFieldSchema),
|
3397
|
+
tags: import_zod44.default.array(TagSchema),
|
3398
|
+
categories: import_zod44.default.array(CategorySchema),
|
3487
3399
|
contact: ContactSchema,
|
3488
|
-
activityLogs:
|
3400
|
+
activityLogs: import_zod44.default.array(ActivityLogSchema)
|
3489
3401
|
});
|
3490
|
-
var TicketCountByContactSchema =
|
3491
|
-
total:
|
3492
|
-
open:
|
3493
|
-
pending:
|
3494
|
-
closed:
|
3495
|
-
solved:
|
3402
|
+
var TicketCountByContactSchema = import_zod44.default.object({
|
3403
|
+
total: import_zod44.default.coerce.number(),
|
3404
|
+
open: import_zod44.default.coerce.number(),
|
3405
|
+
pending: import_zod44.default.coerce.number(),
|
3406
|
+
closed: import_zod44.default.coerce.number(),
|
3407
|
+
solved: import_zod44.default.coerce.number()
|
3496
3408
|
});
|
3497
|
-
var TicketReasonRequiredSchema =
|
3498
|
-
ticketReasonRequired:
|
3409
|
+
var TicketReasonRequiredSchema = import_zod44.default.object({
|
3410
|
+
ticketReasonRequired: import_zod44.default.string()
|
3499
3411
|
});
|
3500
3412
|
|
3501
3413
|
// src/comment/schema.ts
|
3502
|
-
var CommentSchema =
|
3503
|
-
id:
|
3504
|
-
createdAt:
|
3505
|
-
updatedAt:
|
3506
|
-
deletedAt:
|
3507
|
-
activityLogs:
|
3508
|
-
comment:
|
3509
|
-
mentions:
|
3414
|
+
var CommentSchema = import_zod45.default.object({
|
3415
|
+
id: import_zod45.default.string().uuid(),
|
3416
|
+
createdAt: import_zod45.default.date(),
|
3417
|
+
updatedAt: import_zod45.default.date(),
|
3418
|
+
deletedAt: import_zod45.default.date().nullable(),
|
3419
|
+
activityLogs: import_zod45.default.array(ActivityLogSchema),
|
3420
|
+
comment: import_zod45.default.string(),
|
3421
|
+
mentions: import_zod45.default.array(import_zod45.default.string()),
|
3510
3422
|
ticket: TicketSchema,
|
3511
3423
|
agent: UserSchema
|
3512
3424
|
});
|
@@ -3523,8 +3435,8 @@ var commentContract = (0, import_core9.initContract)().router(
|
|
3523
3435
|
201: DefaultSuccessResponseSchema.extend({
|
3524
3436
|
comment: CommentSchema
|
3525
3437
|
}),
|
3526
|
-
400:
|
3527
|
-
message:
|
3438
|
+
400: import_zod46.default.object({
|
3439
|
+
message: import_zod46.default.string()
|
3528
3440
|
}),
|
3529
3441
|
401: DefaultUnauthorizedSchema,
|
3530
3442
|
500: DefaultErrorResponseSchema
|
@@ -3537,9 +3449,9 @@ var commentContract = (0, import_core9.initContract)().router(
|
|
3537
3449
|
headers: DefaultHeaderSchema,
|
3538
3450
|
query: GetCommentQuerySchema,
|
3539
3451
|
responses: {
|
3540
|
-
200:
|
3541
|
-
400:
|
3542
|
-
message:
|
3452
|
+
200: import_zod46.default.array(CommentSchema),
|
3453
|
+
400: import_zod46.default.object({
|
3454
|
+
message: import_zod46.default.string()
|
3543
3455
|
}),
|
3544
3456
|
401: DefaultUnauthorizedSchema,
|
3545
3457
|
500: DefaultErrorResponseSchema
|
@@ -3549,7 +3461,7 @@ var commentContract = (0, import_core9.initContract)().router(
|
|
3549
3461
|
updateComment: {
|
3550
3462
|
method: "PATCH",
|
3551
3463
|
path: "/:id",
|
3552
|
-
pathParams:
|
3464
|
+
pathParams: import_zod46.default.object({ id: import_zod46.default.string() }),
|
3553
3465
|
headers: DefaultHeaderSchema,
|
3554
3466
|
body: UpdateCommentSchema,
|
3555
3467
|
responses: {
|
@@ -3563,11 +3475,11 @@ var commentContract = (0, import_core9.initContract)().router(
|
|
3563
3475
|
deleteComment: {
|
3564
3476
|
method: "DELETE",
|
3565
3477
|
path: "/:id",
|
3566
|
-
pathParams:
|
3478
|
+
pathParams: import_zod46.default.object({ id: import_zod46.default.string() }),
|
3567
3479
|
headers: DefaultHeaderSchema,
|
3568
3480
|
body: null,
|
3569
3481
|
responses: {
|
3570
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
3482
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod46.default.string() }),
|
3571
3483
|
500: DefaultErrorResponseSchema
|
3572
3484
|
},
|
3573
3485
|
summary: "Delete a comment."
|
@@ -3578,77 +3490,61 @@ var commentContract = (0, import_core9.initContract)().router(
|
|
3578
3490
|
|
3579
3491
|
// src/company/index.ts
|
3580
3492
|
var import_core10 = require("@ts-rest/core");
|
3581
|
-
var
|
3493
|
+
var import_zod48 = __toESM(require("zod"));
|
3582
3494
|
|
3583
3495
|
// src/company/validation.ts
|
3584
|
-
var
|
3585
|
-
var BaseSchema =
|
3586
|
-
isRequired:
|
3587
|
-
attributeId:
|
3496
|
+
var import_zod47 = __toESM(require("zod"));
|
3497
|
+
var BaseSchema = import_zod47.default.object({
|
3498
|
+
isRequired: import_zod47.default.boolean(),
|
3499
|
+
attributeId: import_zod47.default.string().uuid()
|
3588
3500
|
});
|
3589
3501
|
var CompanyContractsValidationSchema = {
|
3590
3502
|
create: {
|
3591
|
-
request:
|
3592
|
-
name:
|
3593
|
-
|
3594
|
-
|
3595
|
-
|
3596
|
-
|
3597
|
-
phone: import_zod48.default.object({
|
3598
|
-
value: import_zod48.default.string(),
|
3599
|
-
isRequired: import_zod48.default.boolean(),
|
3600
|
-
attributeId: import_zod48.default.string()
|
3601
|
-
}),
|
3602
|
-
address: import_zod48.default.object({
|
3603
|
-
value: import_zod48.default.string(),
|
3604
|
-
isRequired: import_zod48.default.boolean(),
|
3605
|
-
attributeId: import_zod48.default.string()
|
3606
|
-
}),
|
3607
|
-
industry: import_zod48.default.object({
|
3608
|
-
value: import_zod48.default.string(),
|
3609
|
-
isRequired: import_zod48.default.boolean(),
|
3610
|
-
attributeId: import_zod48.default.string()
|
3611
|
-
}),
|
3612
|
-
customFields: import_zod48.default.array(
|
3503
|
+
request: import_zod47.default.object({
|
3504
|
+
name: import_zod47.default.object({ value: import_zod47.default.string() }),
|
3505
|
+
phone: import_zod47.default.object({ value: import_zod47.default.string() }),
|
3506
|
+
address: import_zod47.default.object({ value: import_zod47.default.string() }),
|
3507
|
+
industry: import_zod47.default.object({ value: import_zod47.default.string() }),
|
3508
|
+
customFields: import_zod47.default.array(
|
3613
3509
|
BaseSchema.extend({
|
3614
|
-
value:
|
3615
|
-
type:
|
3616
|
-
isDefaultAttribute:
|
3510
|
+
value: import_zod47.default.union([import_zod47.default.string(), import_zod47.default.array(import_zod47.default.string())]),
|
3511
|
+
type: import_zod47.default.string(),
|
3512
|
+
isDefaultAttribute: import_zod47.default.boolean()
|
3617
3513
|
})
|
3618
3514
|
)
|
3619
3515
|
}),
|
3620
3516
|
response: CompanySchema
|
3621
3517
|
},
|
3622
3518
|
getById: {
|
3623
|
-
request:
|
3624
|
-
id:
|
3519
|
+
request: import_zod47.default.object({
|
3520
|
+
id: import_zod47.default.string().uuid()
|
3625
3521
|
}),
|
3626
3522
|
response: CompanySchema
|
3627
3523
|
},
|
3628
3524
|
getAll: {
|
3629
|
-
request:
|
3630
|
-
page:
|
3631
|
-
pageSize:
|
3632
|
-
keyword:
|
3633
|
-
industry:
|
3634
|
-
name:
|
3635
|
-
address:
|
3636
|
-
phone:
|
3637
|
-
selectedDate:
|
3638
|
-
customFields:
|
3639
|
-
|
3640
|
-
attributeId:
|
3641
|
-
type:
|
3642
|
-
value:
|
3525
|
+
request: import_zod47.default.object({
|
3526
|
+
page: import_zod47.default.coerce.number().default(1),
|
3527
|
+
pageSize: import_zod47.default.coerce.number().default(10),
|
3528
|
+
keyword: import_zod47.default.string().optional(),
|
3529
|
+
industry: import_zod47.default.array(import_zod47.default.string()),
|
3530
|
+
name: import_zod47.default.string(),
|
3531
|
+
address: import_zod47.default.string(),
|
3532
|
+
phone: import_zod47.default.string(),
|
3533
|
+
selectedDate: import_zod47.default.string(),
|
3534
|
+
customFields: import_zod47.default.array(
|
3535
|
+
import_zod47.default.object({
|
3536
|
+
attributeId: import_zod47.default.string().uuid(),
|
3537
|
+
type: import_zod47.default.string(),
|
3538
|
+
value: import_zod47.default.union([import_zod47.default.string(), import_zod47.default.array(import_zod47.default.string())])
|
3643
3539
|
})
|
3644
3540
|
)
|
3645
3541
|
}).partial(),
|
3646
3542
|
response: {
|
3647
|
-
page:
|
3648
|
-
pageSize:
|
3649
|
-
total:
|
3650
|
-
lastPage:
|
3651
|
-
data:
|
3543
|
+
page: import_zod47.default.number(),
|
3544
|
+
pageSize: import_zod47.default.number(),
|
3545
|
+
total: import_zod47.default.number(),
|
3546
|
+
lastPage: import_zod47.default.number(),
|
3547
|
+
data: import_zod47.default.array(CompanySchema)
|
3652
3548
|
}
|
3653
3549
|
}
|
3654
3550
|
};
|
@@ -3662,14 +3558,14 @@ var companyContract = (0, import_core10.initContract)().router({
|
|
3662
3558
|
201: DefaultSuccessResponseSchema.extend({
|
3663
3559
|
data: CompanyContractsValidationSchema.create.response
|
3664
3560
|
}),
|
3665
|
-
400:
|
3666
|
-
message:
|
3561
|
+
400: import_zod48.default.object({
|
3562
|
+
message: import_zod48.default.string()
|
3667
3563
|
}),
|
3668
|
-
409:
|
3669
|
-
message:
|
3564
|
+
409: import_zod48.default.object({
|
3565
|
+
message: import_zod48.default.string()
|
3670
3566
|
}),
|
3671
|
-
500:
|
3672
|
-
message:
|
3567
|
+
500: import_zod48.default.object({
|
3568
|
+
message: import_zod48.default.string()
|
3673
3569
|
}),
|
3674
3570
|
401: DefaultUnauthorizedSchema,
|
3675
3571
|
404: DefaultNotFoundSchema,
|
@@ -3681,21 +3577,21 @@ var companyContract = (0, import_core10.initContract)().router({
|
|
3681
3577
|
update: {
|
3682
3578
|
method: "PATCH",
|
3683
3579
|
path: "ccs/api/v1/company/:id",
|
3684
|
-
pathParams:
|
3685
|
-
id:
|
3580
|
+
pathParams: import_zod48.default.object({
|
3581
|
+
id: import_zod48.default.string().uuid()
|
3686
3582
|
}),
|
3687
3583
|
responses: {
|
3688
3584
|
201: DefaultSuccessResponseSchema.extend({
|
3689
3585
|
data: CompanyContractsValidationSchema.create.response
|
3690
3586
|
}),
|
3691
|
-
400:
|
3692
|
-
message:
|
3587
|
+
400: import_zod48.default.object({
|
3588
|
+
message: import_zod48.default.string()
|
3693
3589
|
}),
|
3694
|
-
409:
|
3695
|
-
message:
|
3590
|
+
409: import_zod48.default.object({
|
3591
|
+
message: import_zod48.default.string()
|
3696
3592
|
}),
|
3697
|
-
500:
|
3698
|
-
message:
|
3593
|
+
500: import_zod48.default.object({
|
3594
|
+
message: import_zod48.default.string()
|
3699
3595
|
}),
|
3700
3596
|
401: DefaultUnauthorizedSchema,
|
3701
3597
|
404: DefaultNotFoundSchema,
|
@@ -3707,21 +3603,21 @@ var companyContract = (0, import_core10.initContract)().router({
|
|
3707
3603
|
delete: {
|
3708
3604
|
method: "DELETE",
|
3709
3605
|
path: "ccs/api/v1/company/:id",
|
3710
|
-
pathParams:
|
3711
|
-
id:
|
3606
|
+
pathParams: import_zod48.default.object({
|
3607
|
+
id: import_zod48.default.string().uuid()
|
3712
3608
|
}),
|
3713
3609
|
responses: {
|
3714
3610
|
201: DefaultSuccessResponseSchema.extend({
|
3715
|
-
message:
|
3611
|
+
message: import_zod48.default.string()
|
3716
3612
|
}),
|
3717
|
-
400:
|
3718
|
-
message:
|
3613
|
+
400: import_zod48.default.object({
|
3614
|
+
message: import_zod48.default.string()
|
3719
3615
|
}),
|
3720
|
-
409:
|
3721
|
-
message:
|
3616
|
+
409: import_zod48.default.object({
|
3617
|
+
message: import_zod48.default.string()
|
3722
3618
|
}),
|
3723
|
-
500:
|
3724
|
-
message:
|
3619
|
+
500: import_zod48.default.object({
|
3620
|
+
message: import_zod48.default.string()
|
3725
3621
|
}),
|
3726
3622
|
401: DefaultUnauthorizedSchema,
|
3727
3623
|
404: DefaultNotFoundSchema,
|
@@ -3738,14 +3634,14 @@ var companyContract = (0, import_core10.initContract)().router({
|
|
3738
3634
|
200: DefaultSuccessResponseSchema.extend({
|
3739
3635
|
data: CompanyContractsValidationSchema.create.response
|
3740
3636
|
}),
|
3741
|
-
400:
|
3742
|
-
message:
|
3637
|
+
400: import_zod48.default.object({
|
3638
|
+
message: import_zod48.default.string()
|
3743
3639
|
}),
|
3744
|
-
409:
|
3745
|
-
message:
|
3640
|
+
409: import_zod48.default.object({
|
3641
|
+
message: import_zod48.default.string()
|
3746
3642
|
}),
|
3747
|
-
500:
|
3748
|
-
message:
|
3643
|
+
500: import_zod48.default.object({
|
3644
|
+
message: import_zod48.default.string()
|
3749
3645
|
}),
|
3750
3646
|
401: DefaultUnauthorizedSchema,
|
3751
3647
|
404: DefaultNotFoundSchema,
|
@@ -3761,14 +3657,14 @@ var companyContract = (0, import_core10.initContract)().router({
|
|
3761
3657
|
200: DefaultSuccessResponseSchema.extend({
|
3762
3658
|
...CompanyContractsValidationSchema.getAll.response
|
3763
3659
|
}),
|
3764
|
-
400:
|
3765
|
-
message:
|
3660
|
+
400: import_zod48.default.object({
|
3661
|
+
message: import_zod48.default.string()
|
3766
3662
|
}),
|
3767
|
-
409:
|
3768
|
-
message:
|
3663
|
+
409: import_zod48.default.object({
|
3664
|
+
message: import_zod48.default.string()
|
3769
3665
|
}),
|
3770
|
-
500:
|
3771
|
-
message:
|
3666
|
+
500: import_zod48.default.object({
|
3667
|
+
message: import_zod48.default.string()
|
3772
3668
|
}),
|
3773
3669
|
401: DefaultUnauthorizedSchema,
|
3774
3670
|
404: DefaultNotFoundSchema,
|
@@ -3780,10 +3676,10 @@ var companyContract = (0, import_core10.initContract)().router({
|
|
3780
3676
|
|
3781
3677
|
// src/contact/index.ts
|
3782
3678
|
var import_core11 = require("@ts-rest/core");
|
3783
|
-
var
|
3679
|
+
var import_zod51 = __toESM(require("zod"));
|
3784
3680
|
|
3785
3681
|
// src/contact/validation.ts
|
3786
|
-
var
|
3682
|
+
var import_zod49 = __toESM(require("zod"));
|
3787
3683
|
var addErrorMessage = (field) => {
|
3788
3684
|
return field.refine(
|
3789
3685
|
({ isRequired, value }) => {
|
@@ -3801,25 +3697,25 @@ var addErrorMessage = (field) => {
|
|
3801
3697
|
}
|
3802
3698
|
);
|
3803
3699
|
};
|
3804
|
-
var BaseSchema2 =
|
3805
|
-
isRequired:
|
3806
|
-
attributeId:
|
3700
|
+
var BaseSchema2 = import_zod49.default.object({
|
3701
|
+
isRequired: import_zod49.default.boolean(),
|
3702
|
+
attributeId: import_zod49.default.string()
|
3807
3703
|
});
|
3808
3704
|
var SingleValue = addErrorMessage(
|
3809
3705
|
BaseSchema2.extend({
|
3810
|
-
value:
|
3706
|
+
value: import_zod49.default.string()
|
3811
3707
|
})
|
3812
3708
|
);
|
3813
3709
|
var ContactContractValidationSchema = {
|
3814
3710
|
create: {
|
3815
|
-
request:
|
3711
|
+
request: import_zod49.default.object({
|
3816
3712
|
name: SingleValue,
|
3817
3713
|
email: addErrorMessage(
|
3818
3714
|
BaseSchema2.extend({
|
3819
|
-
value:
|
3820
|
-
|
3821
|
-
email:
|
3822
|
-
isPrimary:
|
3715
|
+
value: import_zod49.default.array(
|
3716
|
+
import_zod49.default.object({
|
3717
|
+
email: import_zod49.default.string().email(),
|
3718
|
+
isPrimary: import_zod49.default.boolean()
|
3823
3719
|
})
|
3824
3720
|
)
|
3825
3721
|
})
|
@@ -3828,10 +3724,10 @@ var ContactContractValidationSchema = {
|
|
3828
3724
|
address: SingleValue,
|
3829
3725
|
phone: addErrorMessage(
|
3830
3726
|
BaseSchema2.extend({
|
3831
|
-
value:
|
3832
|
-
|
3833
|
-
phone:
|
3834
|
-
isPrimary:
|
3727
|
+
value: import_zod49.default.array(
|
3728
|
+
import_zod49.default.object({
|
3729
|
+
phone: import_zod49.default.string(),
|
3730
|
+
isPrimary: import_zod49.default.boolean()
|
3835
3731
|
})
|
3836
3732
|
)
|
3837
3733
|
})
|
@@ -3839,69 +3735,69 @@ var ContactContractValidationSchema = {
|
|
3839
3735
|
notes: SingleValue,
|
3840
3736
|
tags: addErrorMessage(
|
3841
3737
|
BaseSchema2.extend({
|
3842
|
-
value:
|
3738
|
+
value: import_zod49.default.array(import_zod49.default.string())
|
3843
3739
|
})
|
3844
3740
|
),
|
3845
3741
|
company: SingleValue,
|
3846
|
-
customFields:
|
3742
|
+
customFields: import_zod49.default.array(
|
3847
3743
|
addErrorMessage(
|
3848
3744
|
BaseSchema2.extend({
|
3849
|
-
value:
|
3850
|
-
type:
|
3851
|
-
isDefaultAttribute:
|
3745
|
+
value: import_zod49.default.union([import_zod49.default.string(), import_zod49.default.array(import_zod49.default.string())]).nullable(),
|
3746
|
+
type: import_zod49.default.string(),
|
3747
|
+
isDefaultAttribute: import_zod49.default.boolean()
|
3852
3748
|
})
|
3853
3749
|
)
|
3854
3750
|
),
|
3855
|
-
mailRoomId:
|
3856
|
-
isTheMailRoomOwner:
|
3751
|
+
mailRoomId: import_zod49.default.string().optional(),
|
3752
|
+
isTheMailRoomOwner: import_zod49.default.coerce.boolean().optional()
|
3857
3753
|
}),
|
3858
|
-
response:
|
3754
|
+
response: import_zod49.default.string()
|
3859
3755
|
},
|
3860
3756
|
getById: {
|
3861
|
-
request:
|
3862
|
-
id:
|
3757
|
+
request: import_zod49.default.object({
|
3758
|
+
id: import_zod49.default.string().uuid()
|
3863
3759
|
}),
|
3864
3760
|
response: ContactSchema
|
3865
3761
|
},
|
3866
3762
|
delete: {
|
3867
|
-
request:
|
3868
|
-
id:
|
3763
|
+
request: import_zod49.default.object({
|
3764
|
+
id: import_zod49.default.string().uuid()
|
3869
3765
|
}),
|
3870
|
-
response:
|
3766
|
+
response: import_zod49.default.string()
|
3871
3767
|
},
|
3872
3768
|
getAll: {
|
3873
|
-
request:
|
3874
|
-
page:
|
3875
|
-
pageSize:
|
3876
|
-
keyword:
|
3877
|
-
company:
|
3878
|
-
name:
|
3879
|
-
address:
|
3880
|
-
channel:
|
3881
|
-
selectedDate:
|
3882
|
-
customFields:
|
3883
|
-
|
3884
|
-
attributeId:
|
3885
|
-
type:
|
3886
|
-
value:
|
3769
|
+
request: import_zod49.default.object({
|
3770
|
+
page: import_zod49.default.coerce.number().default(1),
|
3771
|
+
pageSize: import_zod49.default.coerce.number().default(10),
|
3772
|
+
keyword: import_zod49.default.string().optional(),
|
3773
|
+
company: import_zod49.default.array(import_zod49.default.string().uuid()),
|
3774
|
+
name: import_zod49.default.string(),
|
3775
|
+
address: import_zod49.default.string(),
|
3776
|
+
channel: import_zod49.default.array(import_zod49.default.string()),
|
3777
|
+
selectedDate: import_zod49.default.string(),
|
3778
|
+
customFields: import_zod49.default.array(
|
3779
|
+
import_zod49.default.object({
|
3780
|
+
attributeId: import_zod49.default.string().uuid(),
|
3781
|
+
type: import_zod49.default.string(),
|
3782
|
+
value: import_zod49.default.union([import_zod49.default.string(), import_zod49.default.array(import_zod49.default.string())])
|
3887
3783
|
})
|
3888
3784
|
),
|
3889
|
-
tags:
|
3890
|
-
phone:
|
3891
|
-
email:
|
3892
|
-
notes:
|
3785
|
+
tags: import_zod49.default.array(import_zod49.default.string().uuid()),
|
3786
|
+
phone: import_zod49.default.string(),
|
3787
|
+
email: import_zod49.default.string(),
|
3788
|
+
notes: import_zod49.default.string()
|
3893
3789
|
}).partial(),
|
3894
3790
|
response: {
|
3895
|
-
page:
|
3896
|
-
pageSize:
|
3897
|
-
total:
|
3898
|
-
lastPage:
|
3899
|
-
data:
|
3791
|
+
page: import_zod49.default.number(),
|
3792
|
+
pageSize: import_zod49.default.number(),
|
3793
|
+
total: import_zod49.default.number(),
|
3794
|
+
lastPage: import_zod49.default.number(),
|
3795
|
+
data: import_zod49.default.array(ContactSchema)
|
3900
3796
|
}
|
3901
3797
|
},
|
3902
3798
|
createContactByPhone: {
|
3903
|
-
request:
|
3904
|
-
phoneNumber:
|
3799
|
+
request: import_zod49.default.object({
|
3800
|
+
phoneNumber: import_zod49.default.string().refine(
|
3905
3801
|
(value) => {
|
3906
3802
|
const numericValue = value.replace(/\s/g, "");
|
3907
3803
|
return /^\d+$/.test(numericValue);
|
@@ -3914,8 +3810,8 @@ var ContactContractValidationSchema = {
|
|
3914
3810
|
response: ContactSchema
|
3915
3811
|
},
|
3916
3812
|
createContactPlatform: {
|
3917
|
-
request:
|
3918
|
-
phoneNumber:
|
3813
|
+
request: import_zod49.default.object({
|
3814
|
+
phoneNumber: import_zod49.default.string().refine(
|
3919
3815
|
(value) => {
|
3920
3816
|
const numericValue = value.replace(/\s/g, "");
|
3921
3817
|
return /^\d+$/.test(numericValue);
|
@@ -3924,15 +3820,15 @@ var ContactContractValidationSchema = {
|
|
3924
3820
|
message: "Phone number must contain only numeric characters"
|
3925
3821
|
}
|
3926
3822
|
),
|
3927
|
-
name:
|
3928
|
-
channelType:
|
3929
|
-
channelId:
|
3823
|
+
name: import_zod49.default.string(),
|
3824
|
+
channelType: import_zod49.default.string(),
|
3825
|
+
channelId: import_zod49.default.string()
|
3930
3826
|
}),
|
3931
3827
|
response: ContactSchema
|
3932
3828
|
},
|
3933
3829
|
updateContactByPhone: {
|
3934
|
-
request:
|
3935
|
-
phoneNumber:
|
3830
|
+
request: import_zod49.default.object({
|
3831
|
+
phoneNumber: import_zod49.default.string().refine(
|
3936
3832
|
(value) => {
|
3937
3833
|
const numericValue = value.replace(/\s/g, "");
|
3938
3834
|
return /^\d+$/.test(numericValue);
|
@@ -3945,83 +3841,83 @@ var ContactContractValidationSchema = {
|
|
3945
3841
|
response: ContactSchema
|
3946
3842
|
},
|
3947
3843
|
updateFromOngoingCall: {
|
3948
|
-
request:
|
3949
|
-
name:
|
3950
|
-
companyId:
|
3844
|
+
request: import_zod49.default.object({
|
3845
|
+
name: import_zod49.default.string(),
|
3846
|
+
companyId: import_zod49.default.string().uuid()
|
3951
3847
|
}).partial(),
|
3952
3848
|
response: ContactSchema
|
3953
3849
|
},
|
3954
3850
|
merge: {
|
3955
|
-
request:
|
3956
|
-
primaryContact:
|
3957
|
-
id:
|
3958
|
-
emails:
|
3959
|
-
|
3960
|
-
email:
|
3961
|
-
isPrimary:
|
3851
|
+
request: import_zod49.default.object({
|
3852
|
+
primaryContact: import_zod49.default.object({
|
3853
|
+
id: import_zod49.default.string().uuid(),
|
3854
|
+
emails: import_zod49.default.array(
|
3855
|
+
import_zod49.default.object({
|
3856
|
+
email: import_zod49.default.string().email(),
|
3857
|
+
isPrimary: import_zod49.default.boolean()
|
3962
3858
|
})
|
3963
3859
|
),
|
3964
|
-
phones:
|
3965
|
-
|
3966
|
-
phone:
|
3967
|
-
isPrimary:
|
3860
|
+
phones: import_zod49.default.array(
|
3861
|
+
import_zod49.default.object({
|
3862
|
+
phone: import_zod49.default.string(),
|
3863
|
+
isPrimary: import_zod49.default.boolean()
|
3968
3864
|
})
|
3969
3865
|
)
|
3970
3866
|
}),
|
3971
|
-
secondaryContacts:
|
3867
|
+
secondaryContacts: import_zod49.default.array(import_zod49.default.string().uuid())
|
3972
3868
|
}),
|
3973
3869
|
response: ContactSchema
|
3974
3870
|
},
|
3975
3871
|
checkContactPhone: {
|
3976
|
-
request:
|
3977
|
-
contactId:
|
3978
|
-
phoneNumber:
|
3872
|
+
request: import_zod49.default.object({
|
3873
|
+
contactId: import_zod49.default.string().uuid().optional(),
|
3874
|
+
phoneNumber: import_zod49.default.string()
|
3979
3875
|
}),
|
3980
|
-
response:
|
3876
|
+
response: import_zod49.default.boolean()
|
3981
3877
|
},
|
3982
3878
|
checkContactEmail: {
|
3983
|
-
request:
|
3984
|
-
contactId:
|
3985
|
-
email:
|
3879
|
+
request: import_zod49.default.object({
|
3880
|
+
contactId: import_zod49.default.string().uuid().optional(),
|
3881
|
+
email: import_zod49.default.string()
|
3986
3882
|
}),
|
3987
|
-
response:
|
3883
|
+
response: import_zod49.default.boolean()
|
3988
3884
|
},
|
3989
3885
|
filterContacts: {
|
3990
|
-
request:
|
3991
|
-
page:
|
3992
|
-
pageSize:
|
3993
|
-
keyword:
|
3994
|
-
channelType:
|
3995
|
-
channelIds:
|
3996
|
-
withEmail:
|
3997
|
-
relations:
|
3998
|
-
|
3999
|
-
|
4000
|
-
|
4001
|
-
|
4002
|
-
|
3886
|
+
request: import_zod49.default.object({
|
3887
|
+
page: import_zod49.default.coerce.number().default(1),
|
3888
|
+
pageSize: import_zod49.default.coerce.number().default(10),
|
3889
|
+
keyword: import_zod49.default.string(),
|
3890
|
+
channelType: import_zod49.default.string(),
|
3891
|
+
channelIds: import_zod49.default.array(import_zod49.default.string()),
|
3892
|
+
withEmail: import_zod49.default.coerce.boolean().default(false),
|
3893
|
+
relations: import_zod49.default.array(
|
3894
|
+
import_zod49.default.union([
|
3895
|
+
import_zod49.default.literal("company"),
|
3896
|
+
import_zod49.default.literal("contactEmails"),
|
3897
|
+
import_zod49.default.literal("contactPhones"),
|
3898
|
+
import_zod49.default.literal("platformContacts")
|
4003
3899
|
])
|
4004
3900
|
).optional()
|
4005
3901
|
}).partial(),
|
4006
3902
|
response: {
|
4007
|
-
page:
|
4008
|
-
pageSize:
|
4009
|
-
total:
|
4010
|
-
lastPage:
|
4011
|
-
data:
|
3903
|
+
page: import_zod49.default.number(),
|
3904
|
+
pageSize: import_zod49.default.number(),
|
3905
|
+
total: import_zod49.default.number(),
|
3906
|
+
lastPage: import_zod49.default.number(),
|
3907
|
+
data: import_zod49.default.array(ContactSchema)
|
4012
3908
|
}
|
4013
3909
|
},
|
4014
3910
|
addAttachments: {
|
4015
|
-
request:
|
4016
|
-
contactId:
|
4017
|
-
attributeId:
|
4018
|
-
contactAttachmentRecords:
|
4019
|
-
|
4020
|
-
bucketName:
|
4021
|
-
fileKey:
|
4022
|
-
fileName:
|
4023
|
-
fileSize:
|
4024
|
-
url:
|
3911
|
+
request: import_zod49.default.object({
|
3912
|
+
contactId: import_zod49.default.string(),
|
3913
|
+
attributeId: import_zod49.default.string().uuid(),
|
3914
|
+
contactAttachmentRecords: import_zod49.default.array(
|
3915
|
+
import_zod49.default.object({
|
3916
|
+
bucketName: import_zod49.default.string(),
|
3917
|
+
fileKey: import_zod49.default.string(),
|
3918
|
+
fileName: import_zod49.default.string(),
|
3919
|
+
fileSize: import_zod49.default.coerce.number(),
|
3920
|
+
url: import_zod49.default.string()
|
4025
3921
|
})
|
4026
3922
|
)
|
4027
3923
|
}),
|
@@ -4030,8 +3926,8 @@ var ContactContractValidationSchema = {
|
|
4030
3926
|
};
|
4031
3927
|
|
4032
3928
|
// src/export/validation.ts
|
4033
|
-
var
|
4034
|
-
var ExportFileExtensionSchema =
|
3929
|
+
var import_zod50 = __toESM(require("zod"));
|
3930
|
+
var ExportFileExtensionSchema = import_zod50.default.union([import_zod50.default.literal("csv"), import_zod50.default.literal("xlsx")]).default("csv").optional();
|
4035
3931
|
|
4036
3932
|
// src/contact/index.ts
|
4037
3933
|
var contactContract = (0, import_core11.initContract)().router(
|
@@ -4044,14 +3940,14 @@ var contactContract = (0, import_core11.initContract)().router(
|
|
4044
3940
|
201: DefaultSuccessResponseSchema.extend({
|
4045
3941
|
data: ContactSchema
|
4046
3942
|
}),
|
4047
|
-
400:
|
4048
|
-
message:
|
3943
|
+
400: import_zod51.default.object({
|
3944
|
+
message: import_zod51.default.string()
|
4049
3945
|
}),
|
4050
|
-
409:
|
4051
|
-
message:
|
3946
|
+
409: import_zod51.default.object({
|
3947
|
+
message: import_zod51.default.string()
|
4052
3948
|
}),
|
4053
|
-
500:
|
4054
|
-
message:
|
3949
|
+
500: import_zod51.default.object({
|
3950
|
+
message: import_zod51.default.string()
|
4055
3951
|
}),
|
4056
3952
|
401: DefaultUnauthorizedSchema,
|
4057
3953
|
404: DefaultNotFoundSchema,
|
@@ -4067,14 +3963,14 @@ var contactContract = (0, import_core11.initContract)().router(
|
|
4067
3963
|
200: DefaultSuccessResponseSchema.extend(
|
4068
3964
|
ContactContractValidationSchema.getAll.response
|
4069
3965
|
),
|
4070
|
-
400:
|
4071
|
-
message:
|
3966
|
+
400: import_zod51.default.object({
|
3967
|
+
message: import_zod51.default.string()
|
4072
3968
|
}),
|
4073
|
-
409:
|
4074
|
-
message:
|
3969
|
+
409: import_zod51.default.object({
|
3970
|
+
message: import_zod51.default.string()
|
4075
3971
|
}),
|
4076
|
-
500:
|
4077
|
-
message:
|
3972
|
+
500: import_zod51.default.object({
|
3973
|
+
message: import_zod51.default.string()
|
4078
3974
|
}),
|
4079
3975
|
401: DefaultUnauthorizedSchema,
|
4080
3976
|
404: DefaultNotFoundSchema,
|
@@ -4090,14 +3986,14 @@ var contactContract = (0, import_core11.initContract)().router(
|
|
4090
3986
|
200: DefaultSuccessResponseSchema.extend(
|
4091
3987
|
ContactContractValidationSchema.filterContacts.response
|
4092
3988
|
),
|
4093
|
-
400:
|
4094
|
-
message:
|
3989
|
+
400: import_zod51.default.object({
|
3990
|
+
message: import_zod51.default.string()
|
4095
3991
|
}),
|
4096
|
-
409:
|
4097
|
-
message:
|
3992
|
+
409: import_zod51.default.object({
|
3993
|
+
message: import_zod51.default.string()
|
4098
3994
|
}),
|
4099
|
-
500:
|
4100
|
-
message:
|
3995
|
+
500: import_zod51.default.object({
|
3996
|
+
message: import_zod51.default.string()
|
4101
3997
|
}),
|
4102
3998
|
401: DefaultUnauthorizedSchema,
|
4103
3999
|
404: DefaultNotFoundSchema,
|
@@ -4113,14 +4009,14 @@ var contactContract = (0, import_core11.initContract)().router(
|
|
4113
4009
|
200: DefaultSuccessResponseSchema.extend({
|
4114
4010
|
data: ContactContractValidationSchema.getById.response
|
4115
4011
|
}),
|
4116
|
-
400:
|
4117
|
-
message:
|
4012
|
+
400: import_zod51.default.object({
|
4013
|
+
message: import_zod51.default.string()
|
4118
4014
|
}),
|
4119
|
-
409:
|
4120
|
-
message:
|
4015
|
+
409: import_zod51.default.object({
|
4016
|
+
message: import_zod51.default.string()
|
4121
4017
|
}),
|
4122
|
-
500:
|
4123
|
-
message:
|
4018
|
+
500: import_zod51.default.object({
|
4019
|
+
message: import_zod51.default.string()
|
4124
4020
|
}),
|
4125
4021
|
401: DefaultUnauthorizedSchema,
|
4126
4022
|
404: DefaultNotFoundSchema,
|
@@ -4137,14 +4033,14 @@ var contactContract = (0, import_core11.initContract)().router(
|
|
4137
4033
|
200: DefaultSuccessResponseSchema.extend({
|
4138
4034
|
message: ContactContractValidationSchema.delete.response
|
4139
4035
|
}),
|
4140
|
-
400:
|
4141
|
-
message:
|
4036
|
+
400: import_zod51.default.object({
|
4037
|
+
message: import_zod51.default.string()
|
4142
4038
|
}),
|
4143
|
-
409:
|
4144
|
-
message:
|
4039
|
+
409: import_zod51.default.object({
|
4040
|
+
message: import_zod51.default.string()
|
4145
4041
|
}),
|
4146
|
-
500:
|
4147
|
-
message:
|
4042
|
+
500: import_zod51.default.object({
|
4043
|
+
message: import_zod51.default.string()
|
4148
4044
|
}),
|
4149
4045
|
401: DefaultUnauthorizedSchema,
|
4150
4046
|
404: DefaultNotFoundSchema,
|
@@ -4160,14 +4056,14 @@ var contactContract = (0, import_core11.initContract)().router(
|
|
4160
4056
|
201: DefaultSuccessResponseSchema.extend({
|
4161
4057
|
data: ContactContractValidationSchema.createContactByPhone.response
|
4162
4058
|
}),
|
4163
|
-
400:
|
4164
|
-
message:
|
4059
|
+
400: import_zod51.default.object({
|
4060
|
+
message: import_zod51.default.string()
|
4165
4061
|
}),
|
4166
|
-
409:
|
4167
|
-
message:
|
4062
|
+
409: import_zod51.default.object({
|
4063
|
+
message: import_zod51.default.string()
|
4168
4064
|
}),
|
4169
|
-
500:
|
4170
|
-
message:
|
4065
|
+
500: import_zod51.default.object({
|
4066
|
+
message: import_zod51.default.string()
|
4171
4067
|
}),
|
4172
4068
|
401: DefaultUnauthorizedSchema,
|
4173
4069
|
404: DefaultNotFoundSchema,
|
@@ -4186,14 +4082,14 @@ var contactContract = (0, import_core11.initContract)().router(
|
|
4186
4082
|
201: DefaultSuccessResponseSchema.extend({
|
4187
4083
|
data: ContactContractValidationSchema.createContactPlatform.response
|
4188
4084
|
}),
|
4189
|
-
400:
|
4190
|
-
message:
|
4085
|
+
400: import_zod51.default.object({
|
4086
|
+
message: import_zod51.default.string()
|
4191
4087
|
}),
|
4192
|
-
409:
|
4193
|
-
message:
|
4088
|
+
409: import_zod51.default.object({
|
4089
|
+
message: import_zod51.default.string()
|
4194
4090
|
}),
|
4195
|
-
500:
|
4196
|
-
message:
|
4091
|
+
500: import_zod51.default.object({
|
4092
|
+
message: import_zod51.default.string()
|
4197
4093
|
}),
|
4198
4094
|
401: DefaultUnauthorizedSchema,
|
4199
4095
|
404: DefaultNotFoundSchema,
|
@@ -4209,14 +4105,14 @@ var contactContract = (0, import_core11.initContract)().router(
|
|
4209
4105
|
201: DefaultSuccessResponseSchema.extend({
|
4210
4106
|
data: ContactContractValidationSchema.updateFromOngoingCall.response
|
4211
4107
|
}),
|
4212
|
-
400:
|
4213
|
-
message:
|
4108
|
+
400: import_zod51.default.object({
|
4109
|
+
message: import_zod51.default.string()
|
4214
4110
|
}),
|
4215
|
-
409:
|
4216
|
-
message:
|
4111
|
+
409: import_zod51.default.object({
|
4112
|
+
message: import_zod51.default.string()
|
4217
4113
|
}),
|
4218
|
-
500:
|
4219
|
-
message:
|
4114
|
+
500: import_zod51.default.object({
|
4115
|
+
message: import_zod51.default.string()
|
4220
4116
|
}),
|
4221
4117
|
401: DefaultUnauthorizedSchema,
|
4222
4118
|
404: DefaultNotFoundSchema,
|
@@ -4232,14 +4128,14 @@ var contactContract = (0, import_core11.initContract)().router(
|
|
4232
4128
|
200: DefaultSuccessResponseSchema.extend({
|
4233
4129
|
data: ContactContractValidationSchema.merge.response
|
4234
4130
|
}),
|
4235
|
-
400:
|
4236
|
-
message:
|
4131
|
+
400: import_zod51.default.object({
|
4132
|
+
message: import_zod51.default.string()
|
4237
4133
|
}),
|
4238
|
-
409:
|
4239
|
-
message:
|
4134
|
+
409: import_zod51.default.object({
|
4135
|
+
message: import_zod51.default.string()
|
4240
4136
|
}),
|
4241
|
-
500:
|
4242
|
-
message:
|
4137
|
+
500: import_zod51.default.object({
|
4138
|
+
message: import_zod51.default.string()
|
4243
4139
|
}),
|
4244
4140
|
401: DefaultUnauthorizedSchema,
|
4245
4141
|
404: DefaultNotFoundSchema,
|
@@ -4255,14 +4151,14 @@ var contactContract = (0, import_core11.initContract)().router(
|
|
4255
4151
|
200: DefaultSuccessResponseSchema.extend({
|
4256
4152
|
existed: ContactContractValidationSchema.checkContactPhone.response
|
4257
4153
|
}),
|
4258
|
-
400:
|
4259
|
-
message:
|
4154
|
+
400: import_zod51.default.object({
|
4155
|
+
message: import_zod51.default.string()
|
4260
4156
|
}),
|
4261
|
-
409:
|
4262
|
-
message:
|
4157
|
+
409: import_zod51.default.object({
|
4158
|
+
message: import_zod51.default.string()
|
4263
4159
|
}),
|
4264
|
-
500:
|
4265
|
-
message:
|
4160
|
+
500: import_zod51.default.object({
|
4161
|
+
message: import_zod51.default.string()
|
4266
4162
|
}),
|
4267
4163
|
401: DefaultUnauthorizedSchema,
|
4268
4164
|
404: DefaultNotFoundSchema,
|
@@ -4278,14 +4174,14 @@ var contactContract = (0, import_core11.initContract)().router(
|
|
4278
4174
|
200: DefaultSuccessResponseSchema.extend({
|
4279
4175
|
existed: ContactContractValidationSchema.checkContactEmail.response
|
4280
4176
|
}),
|
4281
|
-
400:
|
4282
|
-
message:
|
4177
|
+
400: import_zod51.default.object({
|
4178
|
+
message: import_zod51.default.string()
|
4283
4179
|
}),
|
4284
|
-
409:
|
4285
|
-
message:
|
4180
|
+
409: import_zod51.default.object({
|
4181
|
+
message: import_zod51.default.string()
|
4286
4182
|
}),
|
4287
|
-
500:
|
4288
|
-
message:
|
4183
|
+
500: import_zod51.default.object({
|
4184
|
+
message: import_zod51.default.string()
|
4289
4185
|
}),
|
4290
4186
|
401: DefaultUnauthorizedSchema,
|
4291
4187
|
404: DefaultNotFoundSchema,
|
@@ -4302,14 +4198,14 @@ var contactContract = (0, import_core11.initContract)().router(
|
|
4302
4198
|
201: DefaultSuccessResponseSchema.extend({
|
4303
4199
|
message: ContactCustomFieldSchema
|
4304
4200
|
}),
|
4305
|
-
400:
|
4306
|
-
message:
|
4201
|
+
400: import_zod51.default.object({
|
4202
|
+
message: import_zod51.default.string()
|
4307
4203
|
}),
|
4308
|
-
409:
|
4309
|
-
message:
|
4204
|
+
409: import_zod51.default.object({
|
4205
|
+
message: import_zod51.default.string()
|
4310
4206
|
}),
|
4311
|
-
500:
|
4312
|
-
message:
|
4207
|
+
500: import_zod51.default.object({
|
4208
|
+
message: import_zod51.default.string()
|
4313
4209
|
}),
|
4314
4210
|
401: DefaultUnauthorizedSchema,
|
4315
4211
|
404: DefaultNotFoundSchema,
|
@@ -4325,14 +4221,14 @@ var contactContract = (0, import_core11.initContract)().router(
|
|
4325
4221
|
200: DefaultSuccessResponseSchema.extend({
|
4326
4222
|
data: ContactContractValidationSchema.getById.response
|
4327
4223
|
}),
|
4328
|
-
400:
|
4329
|
-
message:
|
4224
|
+
400: import_zod51.default.object({
|
4225
|
+
message: import_zod51.default.string()
|
4330
4226
|
}),
|
4331
|
-
409:
|
4332
|
-
message:
|
4227
|
+
409: import_zod51.default.object({
|
4228
|
+
message: import_zod51.default.string()
|
4333
4229
|
}),
|
4334
|
-
500:
|
4335
|
-
message:
|
4230
|
+
500: import_zod51.default.object({
|
4231
|
+
message: import_zod51.default.string()
|
4336
4232
|
}),
|
4337
4233
|
401: DefaultUnauthorizedSchema,
|
4338
4234
|
404: DefaultNotFoundSchema,
|
@@ -4348,8 +4244,8 @@ var contactContract = (0, import_core11.initContract)().router(
|
|
4348
4244
|
}),
|
4349
4245
|
responses: {
|
4350
4246
|
200: null,
|
4351
|
-
400:
|
4352
|
-
message:
|
4247
|
+
400: import_zod51.default.object({
|
4248
|
+
message: import_zod51.default.string()
|
4353
4249
|
}),
|
4354
4250
|
401: DefaultUnauthorizedSchema,
|
4355
4251
|
404: DefaultNotFoundSchema
|
@@ -4364,30 +4260,30 @@ var contactContract = (0, import_core11.initContract)().router(
|
|
4364
4260
|
|
4365
4261
|
// src/cx-log/index.ts
|
4366
4262
|
var import_core12 = require("@ts-rest/core");
|
4367
|
-
var
|
4263
|
+
var import_zod53 = __toESM(require("zod"));
|
4368
4264
|
|
4369
4265
|
// src/cx-log/validation.ts
|
4370
|
-
var
|
4371
|
-
var sentimentScoreSchema =
|
4372
|
-
|
4373
|
-
|
4374
|
-
|
4266
|
+
var import_zod52 = __toESM(require("zod"));
|
4267
|
+
var sentimentScoreSchema = import_zod52.default.union([
|
4268
|
+
import_zod52.default.literal("positive"),
|
4269
|
+
import_zod52.default.literal("neutral"),
|
4270
|
+
import_zod52.default.literal("negative")
|
4375
4271
|
]);
|
4376
|
-
var CustomFieldQueryParamsSchema =
|
4377
|
-
attributeId:
|
4378
|
-
value:
|
4379
|
-
type:
|
4272
|
+
var CustomFieldQueryParamsSchema = import_zod52.default.object({
|
4273
|
+
attributeId: import_zod52.default.string(),
|
4274
|
+
value: import_zod52.default.union([import_zod52.default.string(), import_zod52.default.array(import_zod52.default.string())]),
|
4275
|
+
type: import_zod52.default.string().optional()
|
4380
4276
|
});
|
4381
4277
|
var GetAllCxLogQueryParamsSchema = DefaultQueryParamsSchema.extend({
|
4382
|
-
contactId:
|
4383
|
-
caseId:
|
4384
|
-
channelIds:
|
4385
|
-
trunks:
|
4386
|
-
queueId:
|
4387
|
-
agentIds:
|
4388
|
-
|
4278
|
+
contactId: import_zod52.default.string().uuid(),
|
4279
|
+
caseId: import_zod52.default.string(),
|
4280
|
+
channelIds: import_zod52.default.array(import_zod52.default.string().uuid()),
|
4281
|
+
trunks: import_zod52.default.array(import_zod52.default.string()),
|
4282
|
+
queueId: import_zod52.default.array(import_zod52.default.string()),
|
4283
|
+
agentIds: import_zod52.default.union([
|
4284
|
+
import_zod52.default.array(import_zod52.default.string()),
|
4389
4285
|
// If it's an array
|
4390
|
-
|
4286
|
+
import_zod52.default.record(import_zod52.default.string())
|
4391
4287
|
// If it's an object
|
4392
4288
|
]).transform((val) => {
|
4393
4289
|
if (Array.isArray(val)) {
|
@@ -4395,28 +4291,28 @@ var GetAllCxLogQueryParamsSchema = DefaultQueryParamsSchema.extend({
|
|
4395
4291
|
}
|
4396
4292
|
return Object.values(val);
|
4397
4293
|
}),
|
4398
|
-
direction:
|
4399
|
-
disposition:
|
4400
|
-
sentimentScore:
|
4401
|
-
csatScore:
|
4402
|
-
sla:
|
4403
|
-
tags:
|
4294
|
+
direction: import_zod52.default.array(import_zod52.default.union([import_zod52.default.literal("inbound"), import_zod52.default.literal("outbound")])),
|
4295
|
+
disposition: import_zod52.default.array(import_zod52.default.string()),
|
4296
|
+
sentimentScore: import_zod52.default.array(sentimentScoreSchema),
|
4297
|
+
csatScore: import_zod52.default.array(import_zod52.default.string()),
|
4298
|
+
sla: import_zod52.default.union([import_zod52.default.literal("meet"), import_zod52.default.literal("unmeet")]),
|
4299
|
+
tags: import_zod52.default.array(import_zod52.default.string()),
|
4404
4300
|
// General tags
|
4405
4301
|
// Default contact attributes
|
4406
|
-
name:
|
4407
|
-
contactLabels:
|
4408
|
-
email:
|
4409
|
-
channel:
|
4410
|
-
phone:
|
4411
|
-
notes:
|
4412
|
-
address:
|
4413
|
-
company:
|
4302
|
+
name: import_zod52.default.string(),
|
4303
|
+
contactLabels: import_zod52.default.array(import_zod52.default.string()),
|
4304
|
+
email: import_zod52.default.string(),
|
4305
|
+
channel: import_zod52.default.array(import_zod52.default.string()),
|
4306
|
+
phone: import_zod52.default.string(),
|
4307
|
+
notes: import_zod52.default.string(),
|
4308
|
+
address: import_zod52.default.string(),
|
4309
|
+
company: import_zod52.default.array(import_zod52.default.string()),
|
4414
4310
|
// Custom fields
|
4415
|
-
contactCustomFields:
|
4416
|
-
wrapUpFormCustomFields:
|
4311
|
+
contactCustomFields: import_zod52.default.array(CustomFieldQueryParamsSchema),
|
4312
|
+
wrapUpFormCustomFields: import_zod52.default.array(CustomFieldQueryParamsSchema),
|
4417
4313
|
// Date filter
|
4418
|
-
selectedDate:
|
4419
|
-
uid:
|
4314
|
+
selectedDate: import_zod52.default.string(),
|
4315
|
+
uid: import_zod52.default.string()
|
4420
4316
|
}).partial();
|
4421
4317
|
|
4422
4318
|
// src/cx-log/index.ts
|
@@ -4427,10 +4323,10 @@ var cxLogContract = (0, import_core12.initContract)().router({
|
|
4427
4323
|
headers: DefaultHeaderSchema,
|
4428
4324
|
responses: {
|
4429
4325
|
200: DefaultSuccessResponseSchema.extend({
|
4430
|
-
total:
|
4431
|
-
page:
|
4432
|
-
pageSize:
|
4433
|
-
cxLogs:
|
4326
|
+
total: import_zod53.default.number(),
|
4327
|
+
page: import_zod53.default.number(),
|
4328
|
+
pageSize: import_zod53.default.number(),
|
4329
|
+
cxLogs: import_zod53.default.array(CxLogSchemaWithRelations)
|
4434
4330
|
}),
|
4435
4331
|
401: DefaultUnauthorizedSchema
|
4436
4332
|
},
|
@@ -4446,7 +4342,7 @@ var cxLogContract = (0, import_core12.initContract)().router({
|
|
4446
4342
|
401: DefaultUnauthorizedSchema
|
4447
4343
|
},
|
4448
4344
|
// IMPORTANT: THIS SHOULD BE Z.ANY(). DO NOT CHANGE!
|
4449
|
-
query:
|
4345
|
+
query: import_zod53.default.any(),
|
4450
4346
|
summary: "Export cx-logs"
|
4451
4347
|
},
|
4452
4348
|
syncSla: {
|
@@ -4464,10 +4360,10 @@ var cxLogContract = (0, import_core12.initContract)().router({
|
|
4464
4360
|
updateSla: {
|
4465
4361
|
method: "POST",
|
4466
4362
|
path: "/ms/cx-logs",
|
4467
|
-
headers:
|
4363
|
+
headers: import_zod53.default.object({
|
4468
4364
|
// biome-ignore lint/style/useNamingConvention: <explanation>
|
4469
|
-
"x-tenant":
|
4470
|
-
"x-code":
|
4365
|
+
"x-tenant": import_zod53.default.string({ required_error: "Tenant id is required" }),
|
4366
|
+
"x-code": import_zod53.default.string().uuid().optional()
|
4471
4367
|
}),
|
4472
4368
|
responses: {
|
4473
4369
|
200: null,
|
@@ -4475,9 +4371,9 @@ var cxLogContract = (0, import_core12.initContract)().router({
|
|
4475
4371
|
404: DefaultNotFoundSchema,
|
4476
4372
|
500: DefaultErrorResponseSchema
|
4477
4373
|
},
|
4478
|
-
body:
|
4479
|
-
roomId:
|
4480
|
-
slaStatus:
|
4374
|
+
body: import_zod53.default.object({
|
4375
|
+
roomId: import_zod53.default.string().uuid(),
|
4376
|
+
slaStatus: import_zod53.default.enum(["meet", "unmeet", "-"])
|
4481
4377
|
})
|
4482
4378
|
}
|
4483
4379
|
});
|
@@ -4486,289 +4382,289 @@ var cxLogContract = (0, import_core12.initContract)().router({
|
|
4486
4382
|
var import_core13 = require("@ts-rest/core");
|
4487
4383
|
|
4488
4384
|
// src/dashboard/validation.ts
|
4489
|
-
var
|
4490
|
-
var GetDashboardQueryParamsSchema =
|
4491
|
-
channelIds:
|
4492
|
-
selectedDate:
|
4385
|
+
var import_zod54 = __toESM(require("zod"));
|
4386
|
+
var GetDashboardQueryParamsSchema = import_zod54.default.object({
|
4387
|
+
channelIds: import_zod54.default.array(import_zod54.default.string().uuid()).optional(),
|
4388
|
+
selectedDate: import_zod54.default.string().min(1)
|
4493
4389
|
});
|
4494
4390
|
var GetMessageChannelQueryParamsSchema = GetDashboardQueryParamsSchema.extend({
|
4495
|
-
time:
|
4496
|
-
channelIds:
|
4391
|
+
time: import_zod54.default.enum(["byDay", "byMonth", "byHour"]),
|
4392
|
+
channelIds: import_zod54.default.array(import_zod54.default.string()).optional()
|
4497
4393
|
});
|
4498
|
-
var DashboardGlobalFiltersSchema =
|
4499
|
-
automationQueueId:
|
4500
|
-
selectedDate:
|
4501
|
-
channelIds:
|
4394
|
+
var DashboardGlobalFiltersSchema = import_zod54.default.object({
|
4395
|
+
automationQueueId: import_zod54.default.string().uuid().optional(),
|
4396
|
+
selectedDate: import_zod54.default.string().min(1),
|
4397
|
+
channelIds: import_zod54.default.array(import_zod54.default.string().uuid()).optional()
|
4502
4398
|
});
|
4503
4399
|
var DashboardQueryParamsSchema = GetDashboardQueryParamsSchema.extend({
|
4504
|
-
automationQueueId:
|
4505
|
-
channelIds:
|
4506
|
-
agentIds:
|
4400
|
+
automationQueueId: import_zod54.default.string().uuid().optional(),
|
4401
|
+
channelIds: import_zod54.default.array(import_zod54.default.string().uuid()).optional(),
|
4402
|
+
agentIds: import_zod54.default.array(import_zod54.default.string().uuid()).optional()
|
4507
4403
|
});
|
4508
4404
|
var GetDashboardQueryDetailParamsSchema = GetDashboardQueryParamsSchema.merge(
|
4509
|
-
|
4510
|
-
agentId:
|
4405
|
+
import_zod54.default.object({
|
4406
|
+
agentId: import_zod54.default.string().uuid().optional()
|
4511
4407
|
})
|
4512
4408
|
).optional();
|
4513
4409
|
var GetDashboardInOutQueryParamsSchema = GetDashboardQueryParamsSchema.merge(
|
4514
|
-
|
4515
|
-
direction:
|
4410
|
+
import_zod54.default.object({
|
4411
|
+
direction: import_zod54.default.string().optional()
|
4516
4412
|
})
|
4517
4413
|
);
|
4518
|
-
var CallCountsQuerySchema =
|
4519
|
-
agentIds:
|
4520
|
-
userId:
|
4521
|
-
types:
|
4522
|
-
selectedDate:
|
4414
|
+
var CallCountsQuerySchema = import_zod54.default.object({
|
4415
|
+
agentIds: import_zod54.default.array(import_zod54.default.string().uuid()).optional(),
|
4416
|
+
userId: import_zod54.default.string().uuid().optional(),
|
4417
|
+
types: import_zod54.default.array(import_zod54.default.string()).optional(),
|
4418
|
+
selectedDate: import_zod54.default.string().optional()
|
4523
4419
|
});
|
4524
|
-
var MessageDashboardDetailsQuerySchema =
|
4525
|
-
automationQueueId:
|
4526
|
-
selectedDate:
|
4527
|
-
channelIds:
|
4420
|
+
var MessageDashboardDetailsQuerySchema = import_zod54.default.object({
|
4421
|
+
automationQueueId: import_zod54.default.string().uuid().optional(),
|
4422
|
+
selectedDate: import_zod54.default.string().min(1),
|
4423
|
+
channelIds: import_zod54.default.array(import_zod54.default.string().uuid()).optional()
|
4528
4424
|
});
|
4529
|
-
var ChannelCountsFilterSchema =
|
4425
|
+
var ChannelCountsFilterSchema = import_zod54.default.union([import_zod54.default.literal("channelName"), import_zod54.default.literal("channelType")]).default("channelName").optional();
|
4530
4426
|
|
4531
4427
|
// src/dashboard/index.ts
|
4532
|
-
var
|
4428
|
+
var import_zod56 = __toESM(require("zod"));
|
4533
4429
|
|
4534
4430
|
// src/dashboard/schema.ts
|
4535
|
-
var
|
4536
|
-
var InboundCountSchema =
|
4537
|
-
totalCallCount:
|
4538
|
-
answeredCallCount:
|
4539
|
-
missedCallCount:
|
4540
|
-
});
|
4541
|
-
var OutboundCountSchema =
|
4542
|
-
totalCallCount:
|
4543
|
-
answeredCallCount:
|
4544
|
-
noAnsweredCallCount:
|
4545
|
-
});
|
4546
|
-
var TwoAxiosCountSchema =
|
4547
|
-
x:
|
4548
|
-
y:
|
4549
|
-
});
|
4550
|
-
var ReceivedTicketCountDataSchema =
|
4551
|
-
name:
|
4552
|
-
data:
|
4553
|
-
});
|
4554
|
-
var ResolvedTicketCountDataSchema =
|
4555
|
-
name:
|
4556
|
-
data:
|
4557
|
-
});
|
4558
|
-
var TotalCallLogCountDataSchema =
|
4559
|
-
name:
|
4560
|
-
data:
|
4561
|
-
});
|
4562
|
-
var AnsweredCallLogCountDataSchema =
|
4563
|
-
name:
|
4564
|
-
data:
|
4565
|
-
});
|
4566
|
-
var CallLogCountByResultDaumSchema =
|
4567
|
-
result:
|
4568
|
-
count:
|
4569
|
-
});
|
4570
|
-
var DashboardDataSchema =
|
4571
|
-
receivedTicketCount:
|
4572
|
-
pendingTicketCount:
|
4573
|
-
openTicketCount:
|
4574
|
-
resolvedTicketCount:
|
4575
|
-
unResolvedTicketCount:
|
4576
|
-
closedTicketCount:
|
4577
|
-
unAssignedTicketCount:
|
4431
|
+
var import_zod55 = __toESM(require("zod"));
|
4432
|
+
var InboundCountSchema = import_zod55.default.object({
|
4433
|
+
totalCallCount: import_zod55.default.number(),
|
4434
|
+
answeredCallCount: import_zod55.default.number(),
|
4435
|
+
missedCallCount: import_zod55.default.number()
|
4436
|
+
});
|
4437
|
+
var OutboundCountSchema = import_zod55.default.object({
|
4438
|
+
totalCallCount: import_zod55.default.number(),
|
4439
|
+
answeredCallCount: import_zod55.default.number(),
|
4440
|
+
noAnsweredCallCount: import_zod55.default.number()
|
4441
|
+
});
|
4442
|
+
var TwoAxiosCountSchema = import_zod55.default.object({
|
4443
|
+
x: import_zod55.default.string(),
|
4444
|
+
y: import_zod55.default.string()
|
4445
|
+
});
|
4446
|
+
var ReceivedTicketCountDataSchema = import_zod55.default.object({
|
4447
|
+
name: import_zod55.default.string(),
|
4448
|
+
data: import_zod55.default.array(TwoAxiosCountSchema)
|
4449
|
+
});
|
4450
|
+
var ResolvedTicketCountDataSchema = import_zod55.default.object({
|
4451
|
+
name: import_zod55.default.string(),
|
4452
|
+
data: import_zod55.default.array(TwoAxiosCountSchema)
|
4453
|
+
});
|
4454
|
+
var TotalCallLogCountDataSchema = import_zod55.default.object({
|
4455
|
+
name: import_zod55.default.string(),
|
4456
|
+
data: import_zod55.default.array(TwoAxiosCountSchema)
|
4457
|
+
});
|
4458
|
+
var AnsweredCallLogCountDataSchema = import_zod55.default.object({
|
4459
|
+
name: import_zod55.default.string(),
|
4460
|
+
data: import_zod55.default.array(TwoAxiosCountSchema)
|
4461
|
+
});
|
4462
|
+
var CallLogCountByResultDaumSchema = import_zod55.default.object({
|
4463
|
+
result: import_zod55.default.string(),
|
4464
|
+
count: import_zod55.default.string()
|
4465
|
+
});
|
4466
|
+
var DashboardDataSchema = import_zod55.default.object({
|
4467
|
+
receivedTicketCount: import_zod55.default.number(),
|
4468
|
+
pendingTicketCount: import_zod55.default.number(),
|
4469
|
+
openTicketCount: import_zod55.default.number(),
|
4470
|
+
resolvedTicketCount: import_zod55.default.number(),
|
4471
|
+
unResolvedTicketCount: import_zod55.default.number(),
|
4472
|
+
closedTicketCount: import_zod55.default.number(),
|
4473
|
+
unAssignedTicketCount: import_zod55.default.number(),
|
4578
4474
|
receivedTicketCountData: ReceivedTicketCountDataSchema,
|
4579
4475
|
resolvedTicketCountData: ResolvedTicketCountDataSchema
|
4580
4476
|
});
|
4581
4477
|
var DashboardDataWithCallSchema = DashboardDataSchema.extend({
|
4582
|
-
missedCallCount:
|
4583
|
-
answeredCallCount:
|
4584
|
-
noAnsweredCallCount:
|
4585
|
-
totalCallCount:
|
4478
|
+
missedCallCount: import_zod55.default.number(),
|
4479
|
+
answeredCallCount: import_zod55.default.number(),
|
4480
|
+
noAnsweredCallCount: import_zod55.default.number(),
|
4481
|
+
totalCallCount: import_zod55.default.number(),
|
4586
4482
|
inbound: InboundCountSchema,
|
4587
4483
|
outbound: OutboundCountSchema,
|
4588
4484
|
totalCallLogCountData: TotalCallLogCountDataSchema,
|
4589
4485
|
answeredCallLogCountData: AnsweredCallLogCountDataSchema,
|
4590
|
-
callLogCountByResultData:
|
4591
|
-
});
|
4592
|
-
var TotalTelephonyQueueCallCountListSchema =
|
4593
|
-
totalQueueCall:
|
4594
|
-
totalMissedQueueCall:
|
4595
|
-
totalAnsweredQueueCall:
|
4596
|
-
totalAbandonedQueueCall:
|
4597
|
-
totalAverageRingDuration:
|
4598
|
-
totalAverageTalkDuration:
|
4599
|
-
totalAverageCallDuration:
|
4600
|
-
totalSla:
|
4601
|
-
totalMissedCallPercent:
|
4602
|
-
totalMaximumRingDuration:
|
4603
|
-
});
|
4604
|
-
var TelephonyQueueCallCountListSchema =
|
4605
|
-
totalQueueCall:
|
4606
|
-
totalMissedQueueCall:
|
4607
|
-
totalAnsweredQueueCall:
|
4608
|
-
totalAbandonedQueueCall:
|
4609
|
-
totalAverageTalkDuration:
|
4610
|
-
totalAverageCallDuration:
|
4611
|
-
totalAverageRingDuration:
|
4612
|
-
totalSla:
|
4613
|
-
totalMissedCallPercent:
|
4614
|
-
totalMaximumRingDuration:
|
4615
|
-
});
|
4616
|
-
var TelephonyQueueCallCountListByQueueNumberSchema =
|
4617
|
-
queueNumber:
|
4618
|
-
queueName:
|
4486
|
+
callLogCountByResultData: import_zod55.default.array(CallLogCountByResultDaumSchema).optional()
|
4487
|
+
});
|
4488
|
+
var TotalTelephonyQueueCallCountListSchema = import_zod55.default.object({
|
4489
|
+
totalQueueCall: import_zod55.default.number(),
|
4490
|
+
totalMissedQueueCall: import_zod55.default.number(),
|
4491
|
+
totalAnsweredQueueCall: import_zod55.default.number(),
|
4492
|
+
totalAbandonedQueueCall: import_zod55.default.number(),
|
4493
|
+
totalAverageRingDuration: import_zod55.default.number(),
|
4494
|
+
totalAverageTalkDuration: import_zod55.default.number(),
|
4495
|
+
totalAverageCallDuration: import_zod55.default.number(),
|
4496
|
+
totalSla: import_zod55.default.number(),
|
4497
|
+
totalMissedCallPercent: import_zod55.default.string(),
|
4498
|
+
totalMaximumRingDuration: import_zod55.default.number()
|
4499
|
+
});
|
4500
|
+
var TelephonyQueueCallCountListSchema = import_zod55.default.object({
|
4501
|
+
totalQueueCall: import_zod55.default.number(),
|
4502
|
+
totalMissedQueueCall: import_zod55.default.number(),
|
4503
|
+
totalAnsweredQueueCall: import_zod55.default.number(),
|
4504
|
+
totalAbandonedQueueCall: import_zod55.default.number(),
|
4505
|
+
totalAverageTalkDuration: import_zod55.default.number(),
|
4506
|
+
totalAverageCallDuration: import_zod55.default.number(),
|
4507
|
+
totalAverageRingDuration: import_zod55.default.number(),
|
4508
|
+
totalSla: import_zod55.default.number(),
|
4509
|
+
totalMissedCallPercent: import_zod55.default.string(),
|
4510
|
+
totalMaximumRingDuration: import_zod55.default.number()
|
4511
|
+
});
|
4512
|
+
var TelephonyQueueCallCountListByQueueNumberSchema = import_zod55.default.object({
|
4513
|
+
queueNumber: import_zod55.default.string(),
|
4514
|
+
queueName: import_zod55.default.string(),
|
4619
4515
|
yeastarQueueCallCountList: TelephonyQueueCallCountListSchema
|
4620
4516
|
});
|
4621
|
-
var queueCallDashboardDataSchema =
|
4517
|
+
var queueCallDashboardDataSchema = import_zod55.default.object({
|
4622
4518
|
totalTelephonyQueueCallCountList: TotalTelephonyQueueCallCountListSchema,
|
4623
|
-
telephonyQueueCallCountListByQueueNumber:
|
4519
|
+
telephonyQueueCallCountListByQueueNumber: import_zod55.default.array(
|
4624
4520
|
TelephonyQueueCallCountListByQueueNumberSchema
|
4625
4521
|
)
|
4626
4522
|
});
|
4627
|
-
var TotalQueueLiveCallStatusSchema =
|
4628
|
-
activeCallCount:
|
4629
|
-
waitingCallCount:
|
4523
|
+
var TotalQueueLiveCallStatusSchema = import_zod55.default.object({
|
4524
|
+
activeCallCount: import_zod55.default.number(),
|
4525
|
+
waitingCallCount: import_zod55.default.number()
|
4630
4526
|
});
|
4631
|
-
var QueueLiveCallListByQueueSchema =
|
4632
|
-
queueNumber:
|
4633
|
-
activeCallCount:
|
4634
|
-
waitingCallCount:
|
4527
|
+
var QueueLiveCallListByQueueSchema = import_zod55.default.object({
|
4528
|
+
queueNumber: import_zod55.default.string(),
|
4529
|
+
activeCallCount: import_zod55.default.number(),
|
4530
|
+
waitingCallCount: import_zod55.default.number()
|
4635
4531
|
});
|
4636
|
-
var queueLiveCallCountListSchema =
|
4532
|
+
var queueLiveCallCountListSchema = import_zod55.default.object({
|
4637
4533
|
totalQueueLiveCallStatus: TotalQueueLiveCallStatusSchema,
|
4638
|
-
queueLiveCallListByQueue:
|
4639
|
-
});
|
4640
|
-
var TicketCountByStatusSchema =
|
4641
|
-
total:
|
4642
|
-
open:
|
4643
|
-
pending:
|
4644
|
-
duration:
|
4645
|
-
day:
|
4646
|
-
hour:
|
4534
|
+
queueLiveCallListByQueue: import_zod55.default.array(QueueLiveCallListByQueueSchema)
|
4535
|
+
});
|
4536
|
+
var TicketCountByStatusSchema = import_zod55.default.object({
|
4537
|
+
total: import_zod55.default.number(),
|
4538
|
+
open: import_zod55.default.number(),
|
4539
|
+
pending: import_zod55.default.number(),
|
4540
|
+
duration: import_zod55.default.object({
|
4541
|
+
day: import_zod55.default.string().nullable(),
|
4542
|
+
hour: import_zod55.default.string().nullable()
|
4647
4543
|
}),
|
4648
|
-
solved:
|
4649
|
-
others:
|
4650
|
-
closed:
|
4651
|
-
unassigneed:
|
4652
|
-
});
|
4653
|
-
var ExpiredTicketSchema =
|
4654
|
-
|
4655
|
-
id:
|
4656
|
-
ticketNumber:
|
4657
|
-
title:
|
4658
|
-
priority:
|
4659
|
-
expiredDays:
|
4544
|
+
solved: import_zod55.default.number(),
|
4545
|
+
others: import_zod55.default.number(),
|
4546
|
+
closed: import_zod55.default.number(),
|
4547
|
+
unassigneed: import_zod55.default.number()
|
4548
|
+
});
|
4549
|
+
var ExpiredTicketSchema = import_zod55.default.array(
|
4550
|
+
import_zod55.default.object({
|
4551
|
+
id: import_zod55.default.string(),
|
4552
|
+
ticketNumber: import_zod55.default.number(),
|
4553
|
+
title: import_zod55.default.string(),
|
4554
|
+
priority: import_zod55.default.string(),
|
4555
|
+
expiredDays: import_zod55.default.number()
|
4660
4556
|
})
|
4661
4557
|
);
|
4662
|
-
var TagCountSchema =
|
4663
|
-
id:
|
4664
|
-
name:
|
4665
|
-
count:
|
4666
|
-
});
|
4667
|
-
var TagCountObjSchema =
|
4668
|
-
var MessageCountsByChannelObjSchema =
|
4669
|
-
|
4670
|
-
|
4671
|
-
platform:
|
4672
|
-
messageCount:
|
4558
|
+
var TagCountSchema = import_zod55.default.object({
|
4559
|
+
id: import_zod55.default.string(),
|
4560
|
+
name: import_zod55.default.string(),
|
4561
|
+
count: import_zod55.default.number()
|
4562
|
+
});
|
4563
|
+
var TagCountObjSchema = import_zod55.default.array(TagCountSchema);
|
4564
|
+
var MessageCountsByChannelObjSchema = import_zod55.default.record(
|
4565
|
+
import_zod55.default.array(
|
4566
|
+
import_zod55.default.object({
|
4567
|
+
platform: import_zod55.default.string(),
|
4568
|
+
messageCount: import_zod55.default.number()
|
4673
4569
|
})
|
4674
4570
|
)
|
4675
4571
|
);
|
4676
|
-
var CallEndResultSchema =
|
4677
|
-
|
4572
|
+
var CallEndResultSchema = import_zod55.default.array(
|
4573
|
+
import_zod55.default.object({ result: import_zod55.default.string().nullable(), count: import_zod55.default.string().nullable() }).optional()
|
4678
4574
|
).optional();
|
4679
|
-
var ConversationCountStatusSchema =
|
4680
|
-
newContactCount:
|
4681
|
-
oldContactCount:
|
4682
|
-
});
|
4683
|
-
var MessageStatusSchema =
|
4684
|
-
total:
|
4685
|
-
closed:
|
4686
|
-
unassignedOpen:
|
4687
|
-
assignedOpen:
|
4688
|
-
botRoom:
|
4689
|
-
hold:
|
4690
|
-
});
|
4691
|
-
var MessageAverageSchema =
|
4692
|
-
selectedWeekAvgByDay:
|
4693
|
-
|
4694
|
-
day:
|
4695
|
-
avgResolutionTime:
|
4696
|
-
avgResponseTime:
|
4697
|
-
resolutionRate:
|
4575
|
+
var ConversationCountStatusSchema = import_zod55.default.object({
|
4576
|
+
newContactCount: import_zod55.default.number().nullable(),
|
4577
|
+
oldContactCount: import_zod55.default.number().nullable()
|
4578
|
+
});
|
4579
|
+
var MessageStatusSchema = import_zod55.default.object({
|
4580
|
+
total: import_zod55.default.number().nullable(),
|
4581
|
+
closed: import_zod55.default.number().nullable(),
|
4582
|
+
unassignedOpen: import_zod55.default.number().nullable(),
|
4583
|
+
assignedOpen: import_zod55.default.number().nullable(),
|
4584
|
+
botRoom: import_zod55.default.number().nullable(),
|
4585
|
+
hold: import_zod55.default.number()
|
4586
|
+
});
|
4587
|
+
var MessageAverageSchema = import_zod55.default.object({
|
4588
|
+
selectedWeekAvgByDay: import_zod55.default.array(
|
4589
|
+
import_zod55.default.object({
|
4590
|
+
day: import_zod55.default.string().nullable(),
|
4591
|
+
avgResolutionTime: import_zod55.default.string().nullable(),
|
4592
|
+
avgResponseTime: import_zod55.default.string().nullable(),
|
4593
|
+
resolutionRate: import_zod55.default.string()
|
4698
4594
|
})
|
4699
4595
|
).optional().nullable(),
|
4700
|
-
previousWeekAvg:
|
4701
|
-
avgResolutionTime:
|
4702
|
-
avgResponseTime:
|
4703
|
-
resolutionRate:
|
4596
|
+
previousWeekAvg: import_zod55.default.object({
|
4597
|
+
avgResolutionTime: import_zod55.default.string().nullable(),
|
4598
|
+
avgResponseTime: import_zod55.default.string().nullable(),
|
4599
|
+
resolutionRate: import_zod55.default.string()
|
4704
4600
|
}).nullable().optional(),
|
4705
|
-
selectedWeekAvg:
|
4706
|
-
avgResolutionTime:
|
4707
|
-
avgResponseTime:
|
4708
|
-
resolutionRate:
|
4601
|
+
selectedWeekAvg: import_zod55.default.object({
|
4602
|
+
avgResolutionTime: import_zod55.default.string().nullable(),
|
4603
|
+
avgResponseTime: import_zod55.default.string().nullable(),
|
4604
|
+
resolutionRate: import_zod55.default.string()
|
4709
4605
|
}).nullable().optional()
|
4710
4606
|
});
|
4711
|
-
var ChannelIncomingMessageSchema =
|
4712
|
-
channelName:
|
4713
|
-
channelType:
|
4714
|
-
count:
|
4607
|
+
var ChannelIncomingMessageSchema = import_zod55.default.object({
|
4608
|
+
channelName: import_zod55.default.string().optional(),
|
4609
|
+
channelType: import_zod55.default.string(),
|
4610
|
+
count: import_zod55.default.number()
|
4715
4611
|
});
|
4716
|
-
var MessageDispositionSchema =
|
4717
|
-
name:
|
4718
|
-
count:
|
4612
|
+
var MessageDispositionSchema = import_zod55.default.object({
|
4613
|
+
name: import_zod55.default.string().optional().nullable(),
|
4614
|
+
count: import_zod55.default.number().optional().nullable()
|
4719
4615
|
});
|
4720
|
-
var MessageIncomingDataSchema =
|
4721
|
-
|
4722
|
-
platform:
|
4723
|
-
hour:
|
4724
|
-
messageCount:
|
4616
|
+
var MessageIncomingDataSchema = import_zod55.default.array(
|
4617
|
+
import_zod55.default.object({
|
4618
|
+
platform: import_zod55.default.string().nullable(),
|
4619
|
+
hour: import_zod55.default.string().nullable(),
|
4620
|
+
messageCount: import_zod55.default.string().nullable()
|
4725
4621
|
})
|
4726
4622
|
);
|
4727
|
-
var MessageTotalIncomingDataSchema =
|
4728
|
-
|
4623
|
+
var MessageTotalIncomingDataSchema = import_zod55.default.array(
|
4624
|
+
import_zod55.default.object({ name: import_zod55.default.string(), data: import_zod55.default.array(import_zod55.default.number()) }).nullable()
|
4729
4625
|
);
|
4730
|
-
var CallCountsSchema =
|
4731
|
-
answeredCallCount:
|
4732
|
-
noAnswerCallCount:
|
4733
|
-
busyCallCount:
|
4734
|
-
failedCallCount:
|
4735
|
-
totalCallCount:
|
4736
|
-
});
|
4737
|
-
var MessageQueueDataSchema =
|
4738
|
-
id:
|
4739
|
-
name:
|
4740
|
-
sla:
|
4741
|
-
newContactCount:
|
4742
|
-
existingContactCount:
|
4743
|
-
totalRoomCount:
|
4744
|
-
closedRoomCount:
|
4745
|
-
unassignedRoomCount:
|
4746
|
-
assignedRoomCount:
|
4747
|
-
holdRoomCount:
|
4748
|
-
});
|
4749
|
-
var AgentMessageStatisticsSchema =
|
4750
|
-
id:
|
4751
|
-
name:
|
4752
|
-
assignedRoomCount:
|
4753
|
-
holdRoomCount:
|
4754
|
-
closedRoomCount:
|
4755
|
-
averageFirstResponseTime:
|
4756
|
-
averageResolutionTime:
|
4757
|
-
totalHandledTime:
|
4758
|
-
});
|
4759
|
-
var UserCheckInLogSchema =
|
4760
|
-
userId:
|
4761
|
-
firstLoginTime:
|
4762
|
-
lastLogoutTime:
|
4763
|
-
totalLoginDuration:
|
4764
|
-
averageFirstResponseTime:
|
4765
|
-
averageResolutionTime:
|
4766
|
-
totalHandledTime:
|
4767
|
-
});
|
4768
|
-
var UserCheckInLogsWithDaySchema =
|
4769
|
-
date:
|
4770
|
-
formattedDate:
|
4771
|
-
userCheckInLogs:
|
4626
|
+
var CallCountsSchema = import_zod55.default.object({
|
4627
|
+
answeredCallCount: import_zod55.default.number().gte(0),
|
4628
|
+
noAnswerCallCount: import_zod55.default.number().gte(0),
|
4629
|
+
busyCallCount: import_zod55.default.number().gte(0),
|
4630
|
+
failedCallCount: import_zod55.default.number().gte(0),
|
4631
|
+
totalCallCount: import_zod55.default.number().gte(0)
|
4632
|
+
});
|
4633
|
+
var MessageQueueDataSchema = import_zod55.default.object({
|
4634
|
+
id: import_zod55.default.string().uuid().nullable(),
|
4635
|
+
name: import_zod55.default.string(),
|
4636
|
+
sla: import_zod55.default.number(),
|
4637
|
+
newContactCount: import_zod55.default.number(),
|
4638
|
+
existingContactCount: import_zod55.default.number(),
|
4639
|
+
totalRoomCount: import_zod55.default.number(),
|
4640
|
+
closedRoomCount: import_zod55.default.number(),
|
4641
|
+
unassignedRoomCount: import_zod55.default.number(),
|
4642
|
+
assignedRoomCount: import_zod55.default.number(),
|
4643
|
+
holdRoomCount: import_zod55.default.number()
|
4644
|
+
});
|
4645
|
+
var AgentMessageStatisticsSchema = import_zod55.default.object({
|
4646
|
+
id: import_zod55.default.string().uuid(),
|
4647
|
+
name: import_zod55.default.string(),
|
4648
|
+
assignedRoomCount: import_zod55.default.number(),
|
4649
|
+
holdRoomCount: import_zod55.default.number(),
|
4650
|
+
closedRoomCount: import_zod55.default.number(),
|
4651
|
+
averageFirstResponseTime: import_zod55.default.string(),
|
4652
|
+
averageResolutionTime: import_zod55.default.string(),
|
4653
|
+
totalHandledTime: import_zod55.default.string()
|
4654
|
+
});
|
4655
|
+
var UserCheckInLogSchema = import_zod55.default.object({
|
4656
|
+
userId: import_zod55.default.string().uuid(),
|
4657
|
+
firstLoginTime: import_zod55.default.string(),
|
4658
|
+
lastLogoutTime: import_zod55.default.string().nullable(),
|
4659
|
+
totalLoginDuration: import_zod55.default.string().nullable(),
|
4660
|
+
averageFirstResponseTime: import_zod55.default.string().nullable(),
|
4661
|
+
averageResolutionTime: import_zod55.default.string().nullable(),
|
4662
|
+
totalHandledTime: import_zod55.default.string().nullable()
|
4663
|
+
});
|
4664
|
+
var UserCheckInLogsWithDaySchema = import_zod55.default.object({
|
4665
|
+
date: import_zod55.default.date(),
|
4666
|
+
formattedDate: import_zod55.default.string(),
|
4667
|
+
userCheckInLogs: import_zod55.default.array(UserCheckInLogSchema)
|
4772
4668
|
});
|
4773
4669
|
|
4774
4670
|
// src/dashboard/index.ts
|
@@ -4784,8 +4680,8 @@ var dashboardContract = (0, import_core13.initContract)().router(
|
|
4784
4680
|
200: DefaultSuccessResponseSchema.extend({
|
4785
4681
|
dashboard: DashboardDataSchema
|
4786
4682
|
}),
|
4787
|
-
400:
|
4788
|
-
message:
|
4683
|
+
400: import_zod56.default.object({
|
4684
|
+
message: import_zod56.default.string()
|
4789
4685
|
}),
|
4790
4686
|
401: DefaultUnauthorizedSchema
|
4791
4687
|
}
|
@@ -4800,8 +4696,8 @@ var dashboardContract = (0, import_core13.initContract)().router(
|
|
4800
4696
|
200: DefaultSuccessResponseSchema.extend({
|
4801
4697
|
queuecallDashboard: queueCallDashboardDataSchema
|
4802
4698
|
}),
|
4803
|
-
400:
|
4804
|
-
message:
|
4699
|
+
400: import_zod56.default.object({
|
4700
|
+
message: import_zod56.default.string()
|
4805
4701
|
}),
|
4806
4702
|
401: DefaultUnauthorizedSchema
|
4807
4703
|
}
|
@@ -4891,10 +4787,10 @@ var dashboardContract = (0, import_core13.initContract)().router(
|
|
4891
4787
|
getMessageTagData: {
|
4892
4788
|
method: "GET",
|
4893
4789
|
path: "/message/tag",
|
4894
|
-
query:
|
4895
|
-
automationQueueId:
|
4896
|
-
selectedDate:
|
4897
|
-
channelIds:
|
4790
|
+
query: import_zod56.default.object({
|
4791
|
+
automationQueueId: import_zod56.default.string().uuid().optional(),
|
4792
|
+
selectedDate: import_zod56.default.string().min(1),
|
4793
|
+
channelIds: import_zod56.default.array(import_zod56.default.string().uuid()).optional()
|
4898
4794
|
}),
|
4899
4795
|
headers: DefaultHeaderSchema,
|
4900
4796
|
summary: "Get message tag data",
|
@@ -4984,10 +4880,10 @@ var dashboardContract = (0, import_core13.initContract)().router(
|
|
4984
4880
|
exportMessageAverageData: {
|
4985
4881
|
method: "GET",
|
4986
4882
|
path: "/export-message-average-data",
|
4987
|
-
query:
|
4988
|
-
selectedDate:
|
4989
|
-
automationQueueId:
|
4990
|
-
channelIds:
|
4883
|
+
query: import_zod56.default.object({
|
4884
|
+
selectedDate: import_zod56.default.string().min(1),
|
4885
|
+
automationQueueId: import_zod56.default.string().uuid().optional(),
|
4886
|
+
channelIds: import_zod56.default.array(import_zod56.default.string().uuid()).optional(),
|
4991
4887
|
fileExtension: ExportFileExtensionSchema
|
4992
4888
|
}),
|
4993
4889
|
responses: {
|
@@ -5004,7 +4900,7 @@ var dashboardContract = (0, import_core13.initContract)().router(
|
|
5004
4900
|
headers: DefaultHeaderSchema,
|
5005
4901
|
responses: {
|
5006
4902
|
200: DefaultSuccessResponseSchema.extend({
|
5007
|
-
incomingMessageCounts:
|
4903
|
+
incomingMessageCounts: import_zod56.default.array(ChannelIncomingMessageSchema)
|
5008
4904
|
}),
|
5009
4905
|
401: DefaultUnauthorizedSchema
|
5010
4906
|
}
|
@@ -5024,15 +4920,15 @@ var dashboardContract = (0, import_core13.initContract)().router(
|
|
5024
4920
|
method: "GET",
|
5025
4921
|
path: "/message/disposition",
|
5026
4922
|
summary: "Get message room status disposition data",
|
5027
|
-
query:
|
5028
|
-
automationQueueId:
|
5029
|
-
selectedDate:
|
5030
|
-
channelIds:
|
4923
|
+
query: import_zod56.default.object({
|
4924
|
+
automationQueueId: import_zod56.default.string().uuid().optional(),
|
4925
|
+
selectedDate: import_zod56.default.string().min(1),
|
4926
|
+
channelIds: import_zod56.default.array(import_zod56.default.string().uuid()).optional()
|
5031
4927
|
}),
|
5032
4928
|
headers: DefaultHeaderSchema,
|
5033
4929
|
responses: {
|
5034
4930
|
200: DefaultSuccessResponseSchema.extend({
|
5035
|
-
messageRoomStatusDispositionData:
|
4931
|
+
messageRoomStatusDispositionData: import_zod56.default.array(MessageDispositionSchema).optional()
|
5036
4932
|
}),
|
5037
4933
|
401: DefaultUnauthorizedSchema
|
5038
4934
|
}
|
@@ -5096,27 +4992,27 @@ var dashboardContract = (0, import_core13.initContract)().router(
|
|
5096
4992
|
getAllQueueSLA: {
|
5097
4993
|
method: "GET",
|
5098
4994
|
path: "/all-queue-sla",
|
5099
|
-
query:
|
4995
|
+
query: import_zod56.default.object({ selectedDate: import_zod56.default.string().min(1) }),
|
5100
4996
|
responses: {
|
5101
4997
|
200: DefaultSuccessResponseSchema.extend({
|
5102
|
-
allQueueSLA:
|
4998
|
+
allQueueSLA: import_zod56.default.number()
|
5103
4999
|
})
|
5104
5000
|
}
|
5105
5001
|
},
|
5106
5002
|
getAllMessageQueueData: {
|
5107
5003
|
method: "GET",
|
5108
5004
|
path: "/all-message-queue-data",
|
5109
|
-
query:
|
5110
|
-
selectedDate:
|
5111
|
-
page:
|
5112
|
-
pageSize:
|
5005
|
+
query: import_zod56.default.object({
|
5006
|
+
selectedDate: import_zod56.default.string().min(1),
|
5007
|
+
page: import_zod56.default.coerce.number().positive(),
|
5008
|
+
pageSize: import_zod56.default.coerce.number().positive()
|
5113
5009
|
}),
|
5114
5010
|
responses: {
|
5115
5011
|
200: DefaultSuccessResponseSchema.extend({
|
5116
|
-
allMessageQueueData:
|
5117
|
-
page:
|
5118
|
-
pageSize:
|
5119
|
-
total:
|
5012
|
+
allMessageQueueData: import_zod56.default.array(MessageQueueDataSchema),
|
5013
|
+
page: import_zod56.default.coerce.number().positive(),
|
5014
|
+
pageSize: import_zod56.default.coerce.number().positive(),
|
5015
|
+
total: import_zod56.default.coerce.number().positive()
|
5120
5016
|
})
|
5121
5017
|
}
|
5122
5018
|
},
|
@@ -5134,16 +5030,16 @@ var dashboardContract = (0, import_core13.initContract)().router(
|
|
5134
5030
|
method: "GET",
|
5135
5031
|
path: "/agent-message-statistics",
|
5136
5032
|
query: MessageDashboardDetailsQuerySchema.extend({
|
5137
|
-
page:
|
5138
|
-
pageSize:
|
5033
|
+
page: import_zod56.default.coerce.number().positive(),
|
5034
|
+
pageSize: import_zod56.default.coerce.number().positive()
|
5139
5035
|
}),
|
5140
5036
|
responses: {
|
5141
5037
|
200: DefaultSuccessResponseSchema.extend({
|
5142
|
-
page:
|
5143
|
-
pageSize:
|
5144
|
-
lastPage:
|
5145
|
-
total:
|
5146
|
-
agentMessageStatistics:
|
5038
|
+
page: import_zod56.default.coerce.number().positive(),
|
5039
|
+
pageSize: import_zod56.default.coerce.number().positive(),
|
5040
|
+
lastPage: import_zod56.default.coerce.number().positive(),
|
5041
|
+
total: import_zod56.default.coerce.number().positive(),
|
5042
|
+
agentMessageStatistics: import_zod56.default.array(AgentMessageStatisticsSchema).nullable()
|
5147
5043
|
})
|
5148
5044
|
}
|
5149
5045
|
},
|
@@ -5160,29 +5056,29 @@ var dashboardContract = (0, import_core13.initContract)().router(
|
|
5160
5056
|
getUserCheckInLogsWithDays: {
|
5161
5057
|
method: "GET",
|
5162
5058
|
path: "/user-check-in-logs-with-days",
|
5163
|
-
query:
|
5164
|
-
automationQueueId:
|
5165
|
-
selectedDate:
|
5166
|
-
keyword:
|
5167
|
-
page:
|
5168
|
-
pageSize:
|
5059
|
+
query: import_zod56.default.object({
|
5060
|
+
automationQueueId: import_zod56.default.string().uuid().optional(),
|
5061
|
+
selectedDate: import_zod56.default.string().min(1),
|
5062
|
+
keyword: import_zod56.default.string().optional(),
|
5063
|
+
page: import_zod56.default.coerce.number().positive(),
|
5064
|
+
pageSize: import_zod56.default.coerce.number().positive()
|
5169
5065
|
}),
|
5170
5066
|
responses: {
|
5171
5067
|
200: DefaultSuccessResponseSchema.extend({
|
5172
|
-
page:
|
5173
|
-
pageSize:
|
5174
|
-
total:
|
5175
|
-
userCheckInLogsWithDays:
|
5068
|
+
page: import_zod56.default.coerce.number().positive(),
|
5069
|
+
pageSize: import_zod56.default.coerce.number().positive(),
|
5070
|
+
total: import_zod56.default.coerce.number().positive(),
|
5071
|
+
userCheckInLogsWithDays: import_zod56.default.array(UserCheckInLogsWithDaySchema)
|
5176
5072
|
})
|
5177
5073
|
}
|
5178
5074
|
},
|
5179
5075
|
exportUserCheckInLogs: {
|
5180
5076
|
method: "GET",
|
5181
5077
|
path: "/export-user-check-in-logs",
|
5182
|
-
query:
|
5183
|
-
automationQueueId:
|
5184
|
-
selectedDate:
|
5185
|
-
keyword:
|
5078
|
+
query: import_zod56.default.object({
|
5079
|
+
automationQueueId: import_zod56.default.string().uuid().optional(),
|
5080
|
+
selectedDate: import_zod56.default.string().min(1),
|
5081
|
+
keyword: import_zod56.default.string().optional(),
|
5186
5082
|
fileExtension: ExportFileExtensionSchema
|
5187
5083
|
}),
|
5188
5084
|
responses: {
|
@@ -5192,80 +5088,80 @@ var dashboardContract = (0, import_core13.initContract)().router(
|
|
5192
5088
|
getRoomStatusCountsByUserId: {
|
5193
5089
|
method: "GET",
|
5194
5090
|
path: "/room-status-counts-by-user-id",
|
5195
|
-
query:
|
5196
|
-
automationQueueId:
|
5197
|
-
userId:
|
5198
|
-
selectedDate:
|
5091
|
+
query: import_zod56.default.object({
|
5092
|
+
automationQueueId: import_zod56.default.string().optional(),
|
5093
|
+
userId: import_zod56.default.string().uuid(),
|
5094
|
+
selectedDate: import_zod56.default.string().min(1)
|
5199
5095
|
}),
|
5200
5096
|
responses: {
|
5201
5097
|
200: DefaultSuccessResponseSchema.extend({
|
5202
|
-
assignedRoomCount:
|
5203
|
-
holdRoomCount:
|
5204
|
-
closedRoomCount:
|
5098
|
+
assignedRoomCount: import_zod56.default.number(),
|
5099
|
+
holdRoomCount: import_zod56.default.number(),
|
5100
|
+
closedRoomCount: import_zod56.default.number()
|
5205
5101
|
})
|
5206
5102
|
}
|
5207
5103
|
},
|
5208
5104
|
getPresenceStatusDurations: {
|
5209
5105
|
method: "GET",
|
5210
5106
|
path: "/presence-status-durations",
|
5211
|
-
query:
|
5212
|
-
userId:
|
5213
|
-
selectedDate:
|
5214
|
-
page:
|
5215
|
-
pageSize:
|
5107
|
+
query: import_zod56.default.object({
|
5108
|
+
userId: import_zod56.default.string().uuid(),
|
5109
|
+
selectedDate: import_zod56.default.string().min(1),
|
5110
|
+
page: import_zod56.default.coerce.number().positive(),
|
5111
|
+
pageSize: import_zod56.default.coerce.number().positive()
|
5216
5112
|
}),
|
5217
5113
|
responses: {
|
5218
5114
|
200: DefaultSuccessResponseSchema.extend({
|
5219
|
-
presenceStatusDurations:
|
5220
|
-
|
5221
|
-
formattedDate:
|
5222
|
-
date:
|
5223
|
-
presenceStatusDurationLogs:
|
5224
|
-
|
5225
|
-
presenceStatusId:
|
5226
|
-
presenceStatusName:
|
5227
|
-
durationSeconds:
|
5115
|
+
presenceStatusDurations: import_zod56.default.array(
|
5116
|
+
import_zod56.default.object({
|
5117
|
+
formattedDate: import_zod56.default.string(),
|
5118
|
+
date: import_zod56.default.date(),
|
5119
|
+
presenceStatusDurationLogs: import_zod56.default.array(
|
5120
|
+
import_zod56.default.object({
|
5121
|
+
presenceStatusId: import_zod56.default.string().uuid(),
|
5122
|
+
presenceStatusName: import_zod56.default.string(),
|
5123
|
+
durationSeconds: import_zod56.default.number().positive()
|
5228
5124
|
})
|
5229
5125
|
)
|
5230
5126
|
})
|
5231
5127
|
),
|
5232
|
-
page:
|
5233
|
-
pageSize:
|
5234
|
-
total:
|
5128
|
+
page: import_zod56.default.coerce.number().positive(),
|
5129
|
+
pageSize: import_zod56.default.coerce.number().positive(),
|
5130
|
+
total: import_zod56.default.coerce.number().positive()
|
5235
5131
|
})
|
5236
5132
|
}
|
5237
5133
|
},
|
5238
5134
|
getUserCheckInLogsByUserId: {
|
5239
5135
|
method: "GET",
|
5240
5136
|
path: "/user-check-in-logs-by-user-id",
|
5241
|
-
query:
|
5242
|
-
automationQueueId:
|
5243
|
-
userId:
|
5244
|
-
selectedDate:
|
5245
|
-
page:
|
5246
|
-
pageSize:
|
5137
|
+
query: import_zod56.default.object({
|
5138
|
+
automationQueueId: import_zod56.default.string().uuid().optional(),
|
5139
|
+
userId: import_zod56.default.string().uuid(),
|
5140
|
+
selectedDate: import_zod56.default.string().min(1),
|
5141
|
+
page: import_zod56.default.coerce.number().positive(),
|
5142
|
+
pageSize: import_zod56.default.coerce.number().positive()
|
5247
5143
|
}),
|
5248
5144
|
responses: {
|
5249
5145
|
200: DefaultSuccessResponseSchema.extend({
|
5250
|
-
userCheckInLogs:
|
5251
|
-
|
5252
|
-
formattedDate:
|
5253
|
-
day:
|
5146
|
+
userCheckInLogs: import_zod56.default.array(
|
5147
|
+
import_zod56.default.object({
|
5148
|
+
formattedDate: import_zod56.default.string(),
|
5149
|
+
day: import_zod56.default.date(),
|
5254
5150
|
userCheckInLog: UserCheckInLogSchema
|
5255
5151
|
})
|
5256
5152
|
),
|
5257
|
-
page:
|
5258
|
-
pageSize:
|
5259
|
-
total:
|
5153
|
+
page: import_zod56.default.coerce.number().positive(),
|
5154
|
+
pageSize: import_zod56.default.coerce.number().positive(),
|
5155
|
+
total: import_zod56.default.coerce.number().positive()
|
5260
5156
|
})
|
5261
5157
|
}
|
5262
5158
|
},
|
5263
5159
|
exportUserCheckInLogsByUserId: {
|
5264
5160
|
method: "GET",
|
5265
5161
|
path: "/export-user-check-in-logs-by-user-id",
|
5266
|
-
query:
|
5267
|
-
userId:
|
5268
|
-
selectedDate:
|
5162
|
+
query: import_zod56.default.object({
|
5163
|
+
userId: import_zod56.default.string().uuid(),
|
5164
|
+
selectedDate: import_zod56.default.string().min(1),
|
5269
5165
|
fileExtension: ExportFileExtensionSchema
|
5270
5166
|
}),
|
5271
5167
|
responses: {
|
@@ -5279,14 +5175,14 @@ var dashboardContract = (0, import_core13.initContract)().router(
|
|
5279
5175
|
);
|
5280
5176
|
|
5281
5177
|
// src/evaluate-form/index.ts
|
5282
|
-
var
|
5178
|
+
var import_zod58 = __toESM(require("zod"));
|
5283
5179
|
|
5284
5180
|
// src/evaluate-form/validation.ts
|
5285
|
-
var
|
5286
|
-
var CreateEvaluateFormSchema =
|
5287
|
-
cxLogId:
|
5288
|
-
sentimentScore:
|
5289
|
-
csatScore:
|
5181
|
+
var import_zod57 = __toESM(require("zod"));
|
5182
|
+
var CreateEvaluateFormSchema = import_zod57.default.object({
|
5183
|
+
cxLogId: import_zod57.default.string().uuid(),
|
5184
|
+
sentimentScore: import_zod57.default.string().nullable().optional(),
|
5185
|
+
csatScore: import_zod57.default.string().nullable().optional()
|
5290
5186
|
});
|
5291
5187
|
var UpdateEvaluateFormSchema = CreateEvaluateFormSchema.partial();
|
5292
5188
|
|
@@ -5300,7 +5196,7 @@ var evaluateFormContract = (0, import_core14.initContract)().router(
|
|
5300
5196
|
body: CreateEvaluateFormSchema,
|
5301
5197
|
responses: {
|
5302
5198
|
201: DefaultSuccessResponseSchema.extend({
|
5303
|
-
message:
|
5199
|
+
message: import_zod58.default.string()
|
5304
5200
|
}),
|
5305
5201
|
401: DefaultUnauthorizedSchema
|
5306
5202
|
},
|
@@ -5312,18 +5208,18 @@ var evaluateFormContract = (0, import_core14.initContract)().router(
|
|
5312
5208
|
|
5313
5209
|
// src/extension/index.ts
|
5314
5210
|
var import_core15 = require("@ts-rest/core");
|
5315
|
-
var
|
5211
|
+
var import_zod60 = __toESM(require("zod"));
|
5316
5212
|
|
5317
5213
|
// src/extension/validation.ts
|
5318
|
-
var
|
5319
|
-
var CreateExtensionSchema =
|
5320
|
-
userId:
|
5321
|
-
sipUserName:
|
5322
|
-
sipServerUrl:
|
5323
|
-
webphoneLoginUser:
|
5324
|
-
extensionId:
|
5325
|
-
extensionName:
|
5326
|
-
telephonySignature:
|
5214
|
+
var import_zod59 = require("zod");
|
5215
|
+
var CreateExtensionSchema = import_zod59.z.object({
|
5216
|
+
userId: import_zod59.z.string().nullable(),
|
5217
|
+
sipUserName: import_zod59.z.string(),
|
5218
|
+
sipServerUrl: import_zod59.z.string().optional(),
|
5219
|
+
webphoneLoginUser: import_zod59.z.string(),
|
5220
|
+
extensionId: import_zod59.z.string().nullable(),
|
5221
|
+
extensionName: import_zod59.z.string().nullable(),
|
5222
|
+
telephonySignature: import_zod59.z.string().nullable().optional()
|
5327
5223
|
});
|
5328
5224
|
var UpdateExtensionSchema = CreateExtensionSchema;
|
5329
5225
|
|
@@ -5339,8 +5235,8 @@ var extensionContract = (0, import_core15.initContract)().router(
|
|
5339
5235
|
201: DefaultSuccessResponseSchema.extend({
|
5340
5236
|
extension: ExtensionSchema
|
5341
5237
|
}),
|
5342
|
-
400:
|
5343
|
-
message:
|
5238
|
+
400: import_zod60.default.object({
|
5239
|
+
message: import_zod60.default.string()
|
5344
5240
|
}),
|
5345
5241
|
401: DefaultUnauthorizedSchema,
|
5346
5242
|
404: DefaultNotFoundSchema,
|
@@ -5352,33 +5248,33 @@ var extensionContract = (0, import_core15.initContract)().router(
|
|
5352
5248
|
getExtensions: {
|
5353
5249
|
method: "GET",
|
5354
5250
|
path: "",
|
5355
|
-
query:
|
5356
|
-
page:
|
5357
|
-
pageSize:
|
5358
|
-
keyword:
|
5251
|
+
query: import_zod60.default.object({
|
5252
|
+
page: import_zod60.default.coerce.number().default(1),
|
5253
|
+
pageSize: import_zod60.default.coerce.number().default(10),
|
5254
|
+
keyword: import_zod60.default.string().optional()
|
5359
5255
|
}).optional(),
|
5360
5256
|
headers: DefaultHeaderSchema,
|
5361
5257
|
responses: {
|
5362
5258
|
200: WithPagination(
|
5363
5259
|
// The response data should contain the user relation.
|
5364
5260
|
ExtensionSchema.extend({
|
5365
|
-
user:
|
5366
|
-
id:
|
5367
|
-
createdAt:
|
5368
|
-
updatedAt:
|
5369
|
-
deletedAt:
|
5370
|
-
name:
|
5371
|
-
email:
|
5372
|
-
emailVerifiedAt:
|
5373
|
-
password:
|
5374
|
-
address:
|
5375
|
-
phone:
|
5376
|
-
notificationCount:
|
5261
|
+
user: import_zod60.default.object({
|
5262
|
+
id: import_zod60.default.string().uuid(),
|
5263
|
+
createdAt: import_zod60.default.date(),
|
5264
|
+
updatedAt: import_zod60.default.date(),
|
5265
|
+
deletedAt: import_zod60.default.date().nullable(),
|
5266
|
+
name: import_zod60.default.string(),
|
5267
|
+
email: import_zod60.default.string().email(),
|
5268
|
+
emailVerifiedAt: import_zod60.default.date().nullable(),
|
5269
|
+
password: import_zod60.default.string(),
|
5270
|
+
address: import_zod60.default.string().nullable(),
|
5271
|
+
phone: import_zod60.default.string().nullable(),
|
5272
|
+
notificationCount: import_zod60.default.number().nullable()
|
5377
5273
|
})
|
5378
5274
|
})
|
5379
5275
|
),
|
5380
|
-
400:
|
5381
|
-
message:
|
5276
|
+
400: import_zod60.default.object({
|
5277
|
+
message: import_zod60.default.string()
|
5382
5278
|
}),
|
5383
5279
|
401: DefaultUnauthorizedSchema,
|
5384
5280
|
404: DefaultNotFoundSchema,
|
@@ -5390,12 +5286,12 @@ var extensionContract = (0, import_core15.initContract)().router(
|
|
5390
5286
|
getExtensionByUserId: {
|
5391
5287
|
method: "GET",
|
5392
5288
|
path: "/user/:userId",
|
5393
|
-
pathParams:
|
5289
|
+
pathParams: import_zod60.default.object({ userId: import_zod60.default.string() }),
|
5394
5290
|
headers: DefaultHeaderSchema,
|
5395
5291
|
responses: {
|
5396
5292
|
200: ExtensionSchema,
|
5397
|
-
400:
|
5398
|
-
message:
|
5293
|
+
400: import_zod60.default.object({
|
5294
|
+
message: import_zod60.default.string()
|
5399
5295
|
}),
|
5400
5296
|
401: DefaultUnauthorizedSchema,
|
5401
5297
|
404: DefaultNotFoundSchema,
|
@@ -5407,16 +5303,16 @@ var extensionContract = (0, import_core15.initContract)().router(
|
|
5407
5303
|
getExtensionByDialpad: {
|
5408
5304
|
method: "GET",
|
5409
5305
|
path: "/dialpad",
|
5410
|
-
query:
|
5411
|
-
page:
|
5412
|
-
pageSize:
|
5413
|
-
keyword:
|
5306
|
+
query: import_zod60.default.object({
|
5307
|
+
page: import_zod60.default.coerce.number().default(1),
|
5308
|
+
pageSize: import_zod60.default.coerce.number().default(10),
|
5309
|
+
keyword: import_zod60.default.string().optional()
|
5414
5310
|
}).optional(),
|
5415
5311
|
headers: DefaultHeaderSchema,
|
5416
5312
|
responses: {
|
5417
5313
|
200: WithPagination(ExtensionSchema),
|
5418
|
-
400:
|
5419
|
-
message:
|
5314
|
+
400: import_zod60.default.object({
|
5315
|
+
message: import_zod60.default.string()
|
5420
5316
|
}),
|
5421
5317
|
401: DefaultUnauthorizedSchema,
|
5422
5318
|
404: DefaultNotFoundSchema,
|
@@ -5428,15 +5324,15 @@ var extensionContract = (0, import_core15.initContract)().router(
|
|
5428
5324
|
updateExtension: {
|
5429
5325
|
method: "PATCH",
|
5430
5326
|
path: "/:id",
|
5431
|
-
pathParams:
|
5327
|
+
pathParams: import_zod60.default.object({ id: import_zod60.default.string() }),
|
5432
5328
|
headers: DefaultHeaderSchema,
|
5433
5329
|
body: UpdateExtensionSchema,
|
5434
5330
|
responses: {
|
5435
5331
|
200: DefaultSuccessResponseSchema.extend({
|
5436
5332
|
extension: ExtensionSchema
|
5437
5333
|
}),
|
5438
|
-
400:
|
5439
|
-
message:
|
5334
|
+
400: import_zod60.default.object({
|
5335
|
+
message: import_zod60.default.string()
|
5440
5336
|
}),
|
5441
5337
|
401: DefaultUnauthorizedSchema,
|
5442
5338
|
404: DefaultNotFoundSchema,
|
@@ -5448,13 +5344,13 @@ var extensionContract = (0, import_core15.initContract)().router(
|
|
5448
5344
|
deleteExtension: {
|
5449
5345
|
method: "DELETE",
|
5450
5346
|
path: "/:id",
|
5451
|
-
pathParams:
|
5347
|
+
pathParams: import_zod60.default.object({ id: import_zod60.default.string() }),
|
5452
5348
|
headers: DefaultHeaderSchema,
|
5453
5349
|
body: null,
|
5454
5350
|
responses: {
|
5455
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5456
|
-
400:
|
5457
|
-
message:
|
5351
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod60.default.string() }),
|
5352
|
+
400: import_zod60.default.object({
|
5353
|
+
message: import_zod60.default.string()
|
5458
5354
|
}),
|
5459
5355
|
401: DefaultUnauthorizedSchema,
|
5460
5356
|
404: DefaultNotFoundSchema,
|
@@ -5470,10 +5366,10 @@ var extensionContract = (0, import_core15.initContract)().router(
|
|
5470
5366
|
body: null,
|
5471
5367
|
responses: {
|
5472
5368
|
200: DefaultSuccessResponseSchema.extend({
|
5473
|
-
message:
|
5369
|
+
message: import_zod60.default.string()
|
5474
5370
|
}),
|
5475
|
-
400:
|
5476
|
-
message:
|
5371
|
+
400: import_zod60.default.object({
|
5372
|
+
message: import_zod60.default.string()
|
5477
5373
|
}),
|
5478
5374
|
401: DefaultUnauthorizedSchema,
|
5479
5375
|
404: DefaultNotFoundSchema,
|
@@ -5488,7 +5384,7 @@ var extensionContract = (0, import_core15.initContract)().router(
|
|
5488
5384
|
|
5489
5385
|
// src/instagram/index.ts
|
5490
5386
|
var import_core16 = require("@ts-rest/core");
|
5491
|
-
var
|
5387
|
+
var import_zod61 = __toESM(require("zod"));
|
5492
5388
|
var instagramContract = (0, import_core16.initContract)().router({
|
5493
5389
|
sendMessage: {
|
5494
5390
|
method: "POST",
|
@@ -5522,8 +5418,8 @@ var instagramContract = (0, import_core16.initContract)().router({
|
|
5522
5418
|
reconnect: {
|
5523
5419
|
method: "POST",
|
5524
5420
|
path: "/reconnect/:channelId",
|
5525
|
-
pathParams:
|
5526
|
-
channelId:
|
5421
|
+
pathParams: import_zod61.default.object({
|
5422
|
+
channelId: import_zod61.default.string().uuid()
|
5527
5423
|
}),
|
5528
5424
|
body: null,
|
5529
5425
|
responses: {
|
@@ -5535,8 +5431,8 @@ var instagramContract = (0, import_core16.initContract)().router({
|
|
5535
5431
|
delete: {
|
5536
5432
|
method: "DELETE",
|
5537
5433
|
path: "/delete/:channelId",
|
5538
|
-
pathParams:
|
5539
|
-
channelId:
|
5434
|
+
pathParams: import_zod61.default.object({
|
5435
|
+
channelId: import_zod61.default.string().uuid()
|
5540
5436
|
}),
|
5541
5437
|
body: null,
|
5542
5438
|
responses: {
|
@@ -5577,84 +5473,84 @@ var instagramContract = (0, import_core16.initContract)().router({
|
|
5577
5473
|
|
5578
5474
|
// src/line/index.ts
|
5579
5475
|
var import_core17 = require("@ts-rest/core");
|
5580
|
-
var
|
5476
|
+
var import_zod64 = __toESM(require("zod"));
|
5581
5477
|
|
5582
5478
|
// src/line/schema.ts
|
5583
|
-
var
|
5479
|
+
var import_zod62 = __toESM(require("zod"));
|
5584
5480
|
var ConnectLineService = ConnectLineChannelSchema.extend({
|
5585
|
-
actor:
|
5586
|
-
id:
|
5587
|
-
name:
|
5588
|
-
email:
|
5589
|
-
address:
|
5590
|
-
phone:
|
5481
|
+
actor: import_zod62.default.object({
|
5482
|
+
id: import_zod62.default.string().uuid(),
|
5483
|
+
name: import_zod62.default.string(),
|
5484
|
+
email: import_zod62.default.string().email(),
|
5485
|
+
address: import_zod62.default.string().nullable(),
|
5486
|
+
phone: import_zod62.default.string().nullable()
|
5591
5487
|
}).optional()
|
5592
5488
|
});
|
5593
5489
|
|
5594
5490
|
// src/line/validation.ts
|
5595
|
-
var
|
5596
|
-
var SendLineStickerSchema =
|
5597
|
-
packageId:
|
5598
|
-
stickerId:
|
5599
|
-
room:
|
5600
|
-
id:
|
5601
|
-
lastMessage:
|
5602
|
-
handleTime:
|
5603
|
-
isLatest:
|
5491
|
+
var import_zod63 = __toESM(require("zod"));
|
5492
|
+
var SendLineStickerSchema = import_zod63.default.object({
|
5493
|
+
packageId: import_zod63.default.number(),
|
5494
|
+
stickerId: import_zod63.default.number(),
|
5495
|
+
room: import_zod63.default.object({
|
5496
|
+
id: import_zod63.default.string().uuid(),
|
5497
|
+
lastMessage: import_zod63.default.string().optional(),
|
5498
|
+
handleTime: import_zod63.default.number().optional(),
|
5499
|
+
isLatest: import_zod63.default.boolean(),
|
5604
5500
|
direction: MessageDirectionTypeSchema,
|
5605
|
-
platformContact:
|
5606
|
-
channelId:
|
5607
|
-
socialPlatformId:
|
5501
|
+
platformContact: import_zod63.default.object({
|
5502
|
+
channelId: import_zod63.default.string().uuid(),
|
5503
|
+
socialPlatformId: import_zod63.default.string().nullable(),
|
5608
5504
|
type: ChannelTypeSchema,
|
5609
5505
|
metadata: PlatformContactMetadataSchema,
|
5610
|
-
contact:
|
5611
|
-
name:
|
5612
|
-
address:
|
5613
|
-
channel:
|
5614
|
-
notes:
|
5615
|
-
contactProfile:
|
5616
|
-
socialProfileUrl:
|
5506
|
+
contact: import_zod63.default.object({
|
5507
|
+
name: import_zod63.default.string(),
|
5508
|
+
address: import_zod63.default.string().nullable(),
|
5509
|
+
channel: import_zod63.default.string().nullable(),
|
5510
|
+
notes: import_zod63.default.string().nullable(),
|
5511
|
+
contactProfile: import_zod63.default.string().nullable(),
|
5512
|
+
socialProfileUrl: import_zod63.default.string().nullable()
|
5617
5513
|
})
|
5618
5514
|
}),
|
5619
|
-
actor:
|
5620
|
-
name:
|
5621
|
-
email:
|
5622
|
-
address:
|
5623
|
-
phone:
|
5515
|
+
actor: import_zod63.default.object({
|
5516
|
+
name: import_zod63.default.string(),
|
5517
|
+
email: import_zod63.default.string().email(),
|
5518
|
+
address: import_zod63.default.string().nullable(),
|
5519
|
+
phone: import_zod63.default.string().nullable()
|
5624
5520
|
}).nullable(),
|
5625
5521
|
channel: ChannelSchema2
|
5626
5522
|
}),
|
5627
|
-
message:
|
5628
|
-
message:
|
5523
|
+
message: import_zod63.default.object({
|
5524
|
+
message: import_zod63.default.string().optional(),
|
5629
5525
|
direction: MessageDirectionTypeSchema,
|
5630
5526
|
type: MessageTypeSchema,
|
5631
|
-
readAt:
|
5632
|
-
metadata:
|
5633
|
-
platformId:
|
5634
|
-
platformMessageId:
|
5635
|
-
replyPlatformMessageId:
|
5636
|
-
template:
|
5527
|
+
readAt: import_zod63.default.date().optional(),
|
5528
|
+
metadata: import_zod63.default.any().optional(),
|
5529
|
+
platformId: import_zod63.default.string().optional(),
|
5530
|
+
platformMessageId: import_zod63.default.string().optional(),
|
5531
|
+
replyPlatformMessageId: import_zod63.default.string().optional(),
|
5532
|
+
template: import_zod63.default.any().optional(),
|
5637
5533
|
locale: MessageLocaleTypeSchema.optional(),
|
5638
|
-
url:
|
5639
|
-
previewUrl:
|
5640
|
-
imageSetId:
|
5641
|
-
upload:
|
5642
|
-
bucketName:
|
5643
|
-
fileName:
|
5644
|
-
fileSize:
|
5645
|
-
fileKey:
|
5534
|
+
url: import_zod63.default.string().optional(),
|
5535
|
+
previewUrl: import_zod63.default.string().optional(),
|
5536
|
+
imageSetId: import_zod63.default.string().optional(),
|
5537
|
+
upload: import_zod63.default.object({
|
5538
|
+
bucketName: import_zod63.default.string(),
|
5539
|
+
fileName: import_zod63.default.string(),
|
5540
|
+
fileSize: import_zod63.default.number(),
|
5541
|
+
fileKey: import_zod63.default.string()
|
5646
5542
|
}).optional(),
|
5647
|
-
sender:
|
5648
|
-
name:
|
5649
|
-
email:
|
5650
|
-
address:
|
5651
|
-
phone:
|
5543
|
+
sender: import_zod63.default.object({
|
5544
|
+
name: import_zod63.default.string(),
|
5545
|
+
email: import_zod63.default.string().email(),
|
5546
|
+
address: import_zod63.default.string().nullable(),
|
5547
|
+
phone: import_zod63.default.string().nullable()
|
5652
5548
|
})
|
5653
5549
|
})
|
5654
5550
|
});
|
5655
|
-
var createUserLevelRichMenuSchema =
|
5656
|
-
linePlatformUserId:
|
5657
|
-
channelId:
|
5551
|
+
var createUserLevelRichMenuSchema = import_zod63.default.object({
|
5552
|
+
linePlatformUserId: import_zod63.default.string(),
|
5553
|
+
channelId: import_zod63.default.string()
|
5658
5554
|
});
|
5659
5555
|
|
5660
5556
|
// src/line/index.ts
|
@@ -5664,7 +5560,7 @@ var lineContract = (0, import_core17.initContract)().router({
|
|
5664
5560
|
path: "sticker",
|
5665
5561
|
responses: {
|
5666
5562
|
200: DefaultSuccessResponseSchema.extend({
|
5667
|
-
data:
|
5563
|
+
data: import_zod64.default.any()
|
5668
5564
|
}),
|
5669
5565
|
500: DefaultErrorResponseSchema
|
5670
5566
|
},
|
@@ -5687,7 +5583,7 @@ var lineContract = (0, import_core17.initContract)().router({
|
|
5687
5583
|
path: "/message",
|
5688
5584
|
body: SendMessageToPlatformSchema,
|
5689
5585
|
responses: {
|
5690
|
-
200:
|
5586
|
+
200: import_zod64.default.union([SendMessageResponseSchema, import_zod64.default.literal("TALK TO AGENT")]),
|
5691
5587
|
500: DefaultErrorResponseSchema
|
5692
5588
|
}
|
5693
5589
|
},
|
@@ -5704,8 +5600,8 @@ var lineContract = (0, import_core17.initContract)().router({
|
|
5704
5600
|
reconnect: {
|
5705
5601
|
method: "POST",
|
5706
5602
|
path: "/reconnect/:channelId",
|
5707
|
-
pathParams:
|
5708
|
-
channelId:
|
5603
|
+
pathParams: import_zod64.default.object({
|
5604
|
+
channelId: import_zod64.default.string().uuid()
|
5709
5605
|
}),
|
5710
5606
|
body: null,
|
5711
5607
|
responses: {
|
@@ -5717,8 +5613,8 @@ var lineContract = (0, import_core17.initContract)().router({
|
|
5717
5613
|
delete: {
|
5718
5614
|
method: "DELETE",
|
5719
5615
|
path: "/delete/:channelId",
|
5720
|
-
pathParams:
|
5721
|
-
channelId:
|
5616
|
+
pathParams: import_zod64.default.object({
|
5617
|
+
channelId: import_zod64.default.string().uuid()
|
5722
5618
|
}),
|
5723
5619
|
body: null,
|
5724
5620
|
responses: {
|
@@ -5740,7 +5636,7 @@ var lineContract = (0, import_core17.initContract)().router({
|
|
5740
5636
|
|
5741
5637
|
// src/mail/email-engine-webhooks-events.contract.ts
|
5742
5638
|
var import_core18 = require("@ts-rest/core");
|
5743
|
-
var
|
5639
|
+
var import_zod65 = __toESM(require("zod"));
|
5744
5640
|
var emailEngineWebhooksEventsContract = (0, import_core18.initContract)().router(
|
5745
5641
|
{
|
5746
5642
|
handleWebhooksEvents: {
|
@@ -5749,7 +5645,7 @@ var emailEngineWebhooksEventsContract = (0, import_core18.initContract)().router
|
|
5749
5645
|
// we don't need to respone anything but added responses just for solving type error
|
5750
5646
|
responses: {
|
5751
5647
|
200: DefaultSuccessResponseSchema.extend({
|
5752
|
-
message:
|
5648
|
+
message: import_zod65.default.string()
|
5753
5649
|
})
|
5754
5650
|
},
|
5755
5651
|
body: null,
|
@@ -5761,7 +5657,7 @@ var emailEngineWebhooksEventsContract = (0, import_core18.initContract)().router
|
|
5761
5657
|
|
5762
5658
|
// src/messenger/index.ts
|
5763
5659
|
var import_core19 = require("@ts-rest/core");
|
5764
|
-
var
|
5660
|
+
var import_zod66 = __toESM(require("zod"));
|
5765
5661
|
var messengerContract = (0, import_core19.initContract)().router({
|
5766
5662
|
sendMessage: {
|
5767
5663
|
method: "POST",
|
@@ -5796,8 +5692,8 @@ var messengerContract = (0, import_core19.initContract)().router({
|
|
5796
5692
|
reconnect: {
|
5797
5693
|
method: "POST",
|
5798
5694
|
path: "/reconnect/:channelId",
|
5799
|
-
pathParams:
|
5800
|
-
channelId:
|
5695
|
+
pathParams: import_zod66.default.object({
|
5696
|
+
channelId: import_zod66.default.string().uuid()
|
5801
5697
|
}),
|
5802
5698
|
body: null,
|
5803
5699
|
responses: {
|
@@ -5809,8 +5705,8 @@ var messengerContract = (0, import_core19.initContract)().router({
|
|
5809
5705
|
delete: {
|
5810
5706
|
method: "DELETE",
|
5811
5707
|
path: "/delete/:channelId",
|
5812
|
-
pathParams:
|
5813
|
-
channelId:
|
5708
|
+
pathParams: import_zod66.default.object({
|
5709
|
+
channelId: import_zod66.default.string().uuid()
|
5814
5710
|
}),
|
5815
5711
|
body: null,
|
5816
5712
|
responses: {
|
@@ -5841,9 +5737,9 @@ var messengerContract = (0, import_core19.initContract)().router({
|
|
5841
5737
|
getFacebookBusinesses: {
|
5842
5738
|
method: "GET",
|
5843
5739
|
path: "/facebook-businesses",
|
5844
|
-
query:
|
5845
|
-
userId:
|
5846
|
-
userAccessToken:
|
5740
|
+
query: import_zod66.default.object({
|
5741
|
+
userId: import_zod66.default.string(),
|
5742
|
+
userAccessToken: import_zod66.default.string()
|
5847
5743
|
}),
|
5848
5744
|
responses: {
|
5849
5745
|
200: DefaultSuccessResponseSchema,
|
@@ -5853,9 +5749,9 @@ var messengerContract = (0, import_core19.initContract)().router({
|
|
5853
5749
|
getFacebookBusinessPages: {
|
5854
5750
|
method: "GET",
|
5855
5751
|
path: "/facebook-business-pages",
|
5856
|
-
query:
|
5857
|
-
businessId:
|
5858
|
-
userAccessToken:
|
5752
|
+
query: import_zod66.default.object({
|
5753
|
+
businessId: import_zod66.default.string(),
|
5754
|
+
userAccessToken: import_zod66.default.string()
|
5859
5755
|
}),
|
5860
5756
|
responses: {
|
5861
5757
|
200: DefaultSuccessResponseSchema,
|
@@ -5875,7 +5771,7 @@ var messengerContract = (0, import_core19.initContract)().router({
|
|
5875
5771
|
|
5876
5772
|
// src/permission/index.ts
|
5877
5773
|
var import_core20 = require("@ts-rest/core");
|
5878
|
-
var
|
5774
|
+
var import_zod67 = __toESM(require("zod"));
|
5879
5775
|
var permissionContract = (0, import_core20.initContract)().router(
|
5880
5776
|
{
|
5881
5777
|
getPermissions: {
|
@@ -5883,9 +5779,9 @@ var permissionContract = (0, import_core20.initContract)().router(
|
|
5883
5779
|
path: "",
|
5884
5780
|
headers: DefaultHeaderSchema,
|
5885
5781
|
responses: {
|
5886
|
-
200:
|
5887
|
-
400:
|
5888
|
-
message:
|
5782
|
+
200: import_zod67.default.object({ permissions: PermissionSchema.array() }),
|
5783
|
+
400: import_zod67.default.object({
|
5784
|
+
message: import_zod67.default.string()
|
5889
5785
|
}),
|
5890
5786
|
401: DefaultUnauthorizedSchema,
|
5891
5787
|
500: DefaultErrorResponseSchema
|
@@ -5898,15 +5794,15 @@ var permissionContract = (0, import_core20.initContract)().router(
|
|
5898
5794
|
|
5899
5795
|
// src/role/index.ts
|
5900
5796
|
var import_core21 = require("@ts-rest/core");
|
5901
|
-
var
|
5797
|
+
var import_zod69 = __toESM(require("zod"));
|
5902
5798
|
|
5903
5799
|
// src/role/validation.ts
|
5904
|
-
var
|
5905
|
-
var CreateRoleSchema =
|
5906
|
-
systemName:
|
5907
|
-
displayName:
|
5908
|
-
description:
|
5909
|
-
permissions:
|
5800
|
+
var import_zod68 = require("zod");
|
5801
|
+
var CreateRoleSchema = import_zod68.z.object({
|
5802
|
+
systemName: import_zod68.z.string(),
|
5803
|
+
displayName: import_zod68.z.string(),
|
5804
|
+
description: import_zod68.z.string().nullable(),
|
5805
|
+
permissions: import_zod68.z.array(import_zod68.z.string())
|
5910
5806
|
});
|
5911
5807
|
var UpdateRoleSchema = CreateRoleSchema;
|
5912
5808
|
|
@@ -5922,8 +5818,8 @@ var roleContract = (0, import_core21.initContract)().router(
|
|
5922
5818
|
201: DefaultSuccessResponseSchema.extend({
|
5923
5819
|
role: RoleSchema
|
5924
5820
|
}),
|
5925
|
-
400:
|
5926
|
-
message:
|
5821
|
+
400: import_zod69.default.object({
|
5822
|
+
message: import_zod69.default.string()
|
5927
5823
|
}),
|
5928
5824
|
401: DefaultUnauthorizedSchema,
|
5929
5825
|
500: DefaultErrorResponseSchema
|
@@ -5933,17 +5829,17 @@ var roleContract = (0, import_core21.initContract)().router(
|
|
5933
5829
|
getRoles: {
|
5934
5830
|
method: "GET",
|
5935
5831
|
path: "",
|
5936
|
-
query:
|
5937
|
-
page:
|
5938
|
-
pageSize:
|
5832
|
+
query: import_zod69.default.object({
|
5833
|
+
page: import_zod69.default.coerce.number().default(1),
|
5834
|
+
pageSize: import_zod69.default.coerce.number().default(10)
|
5939
5835
|
}).optional(),
|
5940
5836
|
headers: DefaultHeaderSchema,
|
5941
5837
|
responses: {
|
5942
5838
|
200: WithPagination(RoleSchema).extend({
|
5943
5839
|
roleUserCount: RoleUserCountSchema
|
5944
5840
|
}),
|
5945
|
-
400:
|
5946
|
-
message:
|
5841
|
+
400: import_zod69.default.object({
|
5842
|
+
message: import_zod69.default.string()
|
5947
5843
|
}),
|
5948
5844
|
401: DefaultUnauthorizedSchema,
|
5949
5845
|
500: DefaultErrorResponseSchema
|
@@ -5953,15 +5849,15 @@ var roleContract = (0, import_core21.initContract)().router(
|
|
5953
5849
|
updateRole: {
|
5954
5850
|
method: "PATCH",
|
5955
5851
|
path: "/:id",
|
5956
|
-
pathParams:
|
5852
|
+
pathParams: import_zod69.default.object({ id: import_zod69.default.string() }),
|
5957
5853
|
headers: DefaultHeaderSchema,
|
5958
5854
|
body: UpdateRoleSchema,
|
5959
5855
|
responses: {
|
5960
5856
|
201: DefaultSuccessResponseSchema.extend({
|
5961
5857
|
role: RoleSchema
|
5962
5858
|
}),
|
5963
|
-
400:
|
5964
|
-
message:
|
5859
|
+
400: import_zod69.default.object({
|
5860
|
+
message: import_zod69.default.string()
|
5965
5861
|
}),
|
5966
5862
|
401: DefaultUnauthorizedSchema,
|
5967
5863
|
500: DefaultErrorResponseSchema
|
@@ -5971,11 +5867,11 @@ var roleContract = (0, import_core21.initContract)().router(
|
|
5971
5867
|
deleteRole: {
|
5972
5868
|
method: "DELETE",
|
5973
5869
|
path: "/:id",
|
5974
|
-
pathParams:
|
5870
|
+
pathParams: import_zod69.default.object({ id: import_zod69.default.string() }),
|
5975
5871
|
headers: DefaultHeaderSchema,
|
5976
5872
|
body: null,
|
5977
5873
|
responses: {
|
5978
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5874
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod69.default.string() }),
|
5979
5875
|
500: DefaultErrorResponseSchema
|
5980
5876
|
},
|
5981
5877
|
summary: "Delete a role."
|
@@ -5983,12 +5879,12 @@ var roleContract = (0, import_core21.initContract)().router(
|
|
5983
5879
|
getRoleById: {
|
5984
5880
|
method: "GET",
|
5985
5881
|
path: "/:id",
|
5986
|
-
pathParams:
|
5882
|
+
pathParams: import_zod69.default.object({ id: import_zod69.default.string() }),
|
5987
5883
|
headers: DefaultHeaderSchema,
|
5988
5884
|
responses: {
|
5989
5885
|
200: RoleSchema,
|
5990
|
-
400:
|
5991
|
-
message:
|
5886
|
+
400: import_zod69.default.object({
|
5887
|
+
message: import_zod69.default.string()
|
5992
5888
|
}),
|
5993
5889
|
401: DefaultUnauthorizedSchema,
|
5994
5890
|
500: DefaultErrorResponseSchema
|
@@ -6001,19 +5897,19 @@ var roleContract = (0, import_core21.initContract)().router(
|
|
6001
5897
|
|
6002
5898
|
// src/tag/index.ts
|
6003
5899
|
var import_core22 = require("@ts-rest/core");
|
6004
|
-
var
|
5900
|
+
var import_zod71 = __toESM(require("zod"));
|
6005
5901
|
|
6006
5902
|
// src/tag/validation.ts
|
6007
|
-
var
|
6008
|
-
var CreateTagSchema =
|
6009
|
-
name:
|
5903
|
+
var import_zod70 = require("zod");
|
5904
|
+
var CreateTagSchema = import_zod70.z.object({
|
5905
|
+
name: import_zod70.z.string(),
|
6010
5906
|
group: TagGroupSchema
|
6011
5907
|
});
|
6012
|
-
var GetTagsSchema =
|
5908
|
+
var GetTagsSchema = import_zod70.z.object({
|
6013
5909
|
group: TagGroupSchema.optional().default("general"),
|
6014
|
-
keyword:
|
5910
|
+
keyword: import_zod70.z.string().nullable().optional()
|
6015
5911
|
}).partial().optional();
|
6016
|
-
var UpdateTagSchema =
|
5912
|
+
var UpdateTagSchema = import_zod70.z.object({ name: import_zod70.z.string() });
|
6017
5913
|
|
6018
5914
|
// src/tag/index.ts
|
6019
5915
|
var tagContract = (0, import_core22.initContract)().router(
|
@@ -6036,7 +5932,7 @@ var tagContract = (0, import_core22.initContract)().router(
|
|
6036
5932
|
query: GetTagsSchema,
|
6037
5933
|
responses: {
|
6038
5934
|
200: DefaultSuccessResponseSchema.extend({
|
6039
|
-
tags:
|
5935
|
+
tags: import_zod71.default.array(TagSchema)
|
6040
5936
|
}),
|
6041
5937
|
500: DefaultErrorResponseSchema
|
6042
5938
|
},
|
@@ -6045,7 +5941,7 @@ var tagContract = (0, import_core22.initContract)().router(
|
|
6045
5941
|
updateTag: {
|
6046
5942
|
method: "PATCH",
|
6047
5943
|
path: "/:id",
|
6048
|
-
pathParams:
|
5944
|
+
pathParams: import_zod71.default.object({ id: import_zod71.default.string() }),
|
6049
5945
|
body: UpdateTagSchema,
|
6050
5946
|
responses: {
|
6051
5947
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -6058,11 +5954,11 @@ var tagContract = (0, import_core22.initContract)().router(
|
|
6058
5954
|
deleteTag: {
|
6059
5955
|
method: "DELETE",
|
6060
5956
|
path: "/:id",
|
6061
|
-
pathParams:
|
6062
|
-
body:
|
5957
|
+
pathParams: import_zod71.default.object({ id: import_zod71.default.string() }),
|
5958
|
+
body: import_zod71.default.any().optional(),
|
6063
5959
|
// We don't need the body.
|
6064
5960
|
responses: {
|
6065
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5961
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod71.default.string() }),
|
6066
5962
|
500: DefaultErrorResponseSchema
|
6067
5963
|
},
|
6068
5964
|
headers: DefaultHeaderSchema
|
@@ -6077,32 +5973,35 @@ var tagContract = (0, import_core22.initContract)().router(
|
|
6077
5973
|
var import_core23 = require("@ts-rest/core");
|
6078
5974
|
var import_zod75 = __toESM(require("zod"));
|
6079
5975
|
|
6080
|
-
// src/presence-status/schema.ts
|
5976
|
+
// src/telephony-agent-presence-status/schema.ts
|
6081
5977
|
var import_zod73 = __toESM(require("zod"));
|
6082
|
-
|
6083
|
-
|
6084
|
-
|
6085
|
-
|
6086
|
-
|
5978
|
+
|
5979
|
+
// src/presence-status/schema.ts
|
5980
|
+
var import_zod72 = __toESM(require("zod"));
|
5981
|
+
var TPresenceStatusOption = import_zod72.default.union([
|
5982
|
+
import_zod72.default.literal("receive_call"),
|
5983
|
+
import_zod72.default.literal("do_not_receive_call"),
|
5984
|
+
import_zod72.default.literal("receive_chat_message"),
|
5985
|
+
import_zod72.default.literal("do_not_receive_chat_message")
|
6087
5986
|
]);
|
6088
|
-
var PresenceStatusSchema =
|
6089
|
-
id:
|
6090
|
-
createdAt:
|
6091
|
-
updatedAt:
|
6092
|
-
deletedAt:
|
6093
|
-
systemName:
|
6094
|
-
displayName:
|
6095
|
-
description:
|
6096
|
-
position:
|
6097
|
-
emoji:
|
6098
|
-
presenceStatusOption:
|
6099
|
-
});
|
6100
|
-
var UserPresenceStatusSchema =
|
6101
|
-
id:
|
6102
|
-
createdAt:
|
6103
|
-
updatedAt:
|
6104
|
-
deletedAt:
|
6105
|
-
userId:
|
5987
|
+
var PresenceStatusSchema = import_zod72.default.object({
|
5988
|
+
id: import_zod72.default.string().uuid(),
|
5989
|
+
createdAt: import_zod72.default.date(),
|
5990
|
+
updatedAt: import_zod72.default.date(),
|
5991
|
+
deletedAt: import_zod72.default.date().nullable(),
|
5992
|
+
systemName: import_zod72.default.string(),
|
5993
|
+
displayName: import_zod72.default.string(),
|
5994
|
+
description: import_zod72.default.string().nullable(),
|
5995
|
+
position: import_zod72.default.number(),
|
5996
|
+
emoji: import_zod72.default.string().nullable(),
|
5997
|
+
presenceStatusOption: import_zod72.default.array(TPresenceStatusOption)
|
5998
|
+
});
|
5999
|
+
var UserPresenceStatusSchema = import_zod72.default.object({
|
6000
|
+
id: import_zod72.default.string().uuid(),
|
6001
|
+
createdAt: import_zod72.default.date(),
|
6002
|
+
updatedAt: import_zod72.default.date(),
|
6003
|
+
deletedAt: import_zod72.default.date().nullable(),
|
6004
|
+
userId: import_zod72.default.string(),
|
6106
6005
|
user: UserSchema,
|
6107
6006
|
presenceStatus: PresenceStatusSchema
|
6108
6007
|
});
|
@@ -6110,7 +6009,8 @@ var UserPresenceStatusSchema = import_zod73.default.object({
|
|
6110
6009
|
// src/telephony-agent-presence-status/schema.ts
|
6111
6010
|
var UserPresenceStatusSchema2 = DefaultEntitySchema.extend({
|
6112
6011
|
user: UserSchema,
|
6113
|
-
presenceStatus: PresenceStatusSchema
|
6012
|
+
presenceStatus: PresenceStatusSchema,
|
6013
|
+
customPresenceStatus: import_zod73.default.string().nullable().optional()
|
6114
6014
|
});
|
6115
6015
|
|
6116
6016
|
// src/telephony-agent-presence-status/validation.ts
|
@@ -6118,12 +6018,27 @@ var import_zod74 = require("zod");
|
|
6118
6018
|
var UpdateUserStatusSchema = import_zod74.z.object({
|
6119
6019
|
userId: import_zod74.z.string(),
|
6120
6020
|
presenceStatusId: import_zod74.z.string().nullable().optional(),
|
6021
|
+
customPreseneStatus: import_zod74.z.string().nullable().optional(),
|
6121
6022
|
reason: import_zod74.z.string()
|
6122
6023
|
});
|
6123
6024
|
|
6124
6025
|
// src/telephony-agent-presence-status/index.ts
|
6125
6026
|
var telephonyAgentPresenceStatusContract = (0, import_core23.initContract)().router(
|
6126
6027
|
{
|
6028
|
+
getAllAgentStatus: {
|
6029
|
+
method: "GET",
|
6030
|
+
path: "/agents/presence_status",
|
6031
|
+
headers: DefaultHeaderSchema,
|
6032
|
+
responses: {
|
6033
|
+
200: import_zod75.default.array(UserPresenceStatusSchema2),
|
6034
|
+
400: import_zod75.default.object({
|
6035
|
+
message: import_zod75.default.string()
|
6036
|
+
}),
|
6037
|
+
401: DefaultUnauthorizedSchema,
|
6038
|
+
500: DefaultErrorResponseSchema
|
6039
|
+
},
|
6040
|
+
summary: "Get all user presence status list."
|
6041
|
+
},
|
6127
6042
|
getAgentStatus: {
|
6128
6043
|
method: "GET",
|
6129
6044
|
path: "/presence_status/check_update/:userId",
|
@@ -6985,10 +6900,10 @@ var ticketContract = (0, import_core26.initContract)().router(
|
|
6985
6900
|
addTicketAttachments: {
|
6986
6901
|
method: "PUT",
|
6987
6902
|
path: "tcs/api/v1/ticket/:id/attachment",
|
6988
|
-
headers: DefaultHeaderSchema,
|
6989
6903
|
pathParams: import_zod81.default.object({
|
6990
6904
|
id: import_zod81.default.string()
|
6991
6905
|
}),
|
6906
|
+
headers: DefaultHeaderSchema,
|
6992
6907
|
body: CreateTicketAttachmentRecordsSchema,
|
6993
6908
|
responses: {
|
6994
6909
|
201: DefaultSuccessResponseSchema.extend({
|
@@ -7054,7 +6969,7 @@ var ticketContract = (0, import_core26.initContract)().router(
|
|
7054
6969
|
}
|
7055
6970
|
}
|
7056
6971
|
}
|
7057
|
-
// { pathPrefix: '
|
6972
|
+
// { pathPrefix: 'ts/ticket' },
|
7058
6973
|
);
|
7059
6974
|
|
7060
6975
|
// src/user/index.ts
|
@@ -9080,22 +8995,6 @@ var chatContract = (0, import_core39.initContract)().router(
|
|
9080
8995
|
404: DefaultErrorResponseSchema
|
9081
8996
|
},
|
9082
8997
|
summary: "Get message by ID"
|
9083
|
-
},
|
9084
|
-
tagContact: {
|
9085
|
-
method: "POST",
|
9086
|
-
path: "/contact/tag",
|
9087
|
-
body: import_zod111.default.object({
|
9088
|
-
workflowId: import_zod111.default.string().uuid(),
|
9089
|
-
roomId: import_zod111.default.string().uuid(),
|
9090
|
-
contactId: import_zod111.default.string().uuid(),
|
9091
|
-
tagId: import_zod111.default.string().uuid()
|
9092
|
-
}),
|
9093
|
-
responses: {
|
9094
|
-
200: DefaultSuccessResponseSchema,
|
9095
|
-
403: DefaultErrorResponseSchema,
|
9096
|
-
404: DefaultErrorResponseSchema
|
9097
|
-
},
|
9098
|
-
summary: "Attach Tag to Contact"
|
9099
8998
|
}
|
9100
8999
|
},
|
9101
9000
|
{
|
@@ -9460,7 +9359,15 @@ var invoiceContract = (0, import_core43.initContract)().router(
|
|
9460
9359
|
|
9461
9360
|
// src/klink-chat/index.ts
|
9462
9361
|
var import_core44 = require("@ts-rest/core");
|
9362
|
+
|
9363
|
+
// src/klink-chat/validation.ts
|
9463
9364
|
var import_zod118 = __toESM(require("zod"));
|
9365
|
+
var KlinkChatChannelSchema = import_zod118.default.object({
|
9366
|
+
name: import_zod118.default.string(),
|
9367
|
+
widgetColor: import_zod118.default.string().optional()
|
9368
|
+
});
|
9369
|
+
|
9370
|
+
// src/klink-chat/index.ts
|
9464
9371
|
var KlinkChatContract = (0, import_core44.initContract)().router({
|
9465
9372
|
connect: {
|
9466
9373
|
method: "POST",
|
@@ -9483,47 +9390,6 @@ var KlinkChatContract = (0, import_core44.initContract)().router({
|
|
9483
9390
|
200: SendMessageResponseSchema,
|
9484
9391
|
500: DefaultErrorResponseSchema
|
9485
9392
|
}
|
9486
|
-
},
|
9487
|
-
disconnect: {
|
9488
|
-
method: "POST",
|
9489
|
-
path: "/disconnect",
|
9490
|
-
responses: {
|
9491
|
-
200: ChannelServiceResponseSchema,
|
9492
|
-
500: DefaultErrorResponseSchema,
|
9493
|
-
400: DefaultErrorResponseSchema
|
9494
|
-
},
|
9495
|
-
body: import_zod118.default.object({
|
9496
|
-
id: import_zod118.default.string().uuid()
|
9497
|
-
}),
|
9498
|
-
summary: "Disconnect klink chat channel"
|
9499
|
-
},
|
9500
|
-
reconnect: {
|
9501
|
-
method: "POST",
|
9502
|
-
path: "/reconnect/:channelId",
|
9503
|
-
pathParams: import_zod118.default.object({
|
9504
|
-
channelId: import_zod118.default.string().uuid()
|
9505
|
-
}),
|
9506
|
-
body: null,
|
9507
|
-
responses: {
|
9508
|
-
200: ChannelServiceResponseSchema,
|
9509
|
-
500: DefaultErrorResponseSchema,
|
9510
|
-
400: DefaultErrorResponseSchema
|
9511
|
-
},
|
9512
|
-
summary: "Reconnect klink chat channel"
|
9513
|
-
},
|
9514
|
-
delete: {
|
9515
|
-
method: "DELETE",
|
9516
|
-
path: "/delete/:channelId",
|
9517
|
-
pathParams: import_zod118.default.object({
|
9518
|
-
channelId: import_zod118.default.string().uuid()
|
9519
|
-
}),
|
9520
|
-
body: null,
|
9521
|
-
responses: {
|
9522
|
-
200: ChannelServiceResponseSchema,
|
9523
|
-
500: DefaultErrorResponseSchema,
|
9524
|
-
400: DefaultErrorResponseSchema
|
9525
|
-
},
|
9526
|
-
summary: "Delete klink chat channel"
|
9527
9393
|
}
|
9528
9394
|
});
|
9529
9395
|
|
@@ -9727,7 +9593,7 @@ var laravelServiceTelephonyCdrContract = (0, import_core45.initContract)().route
|
|
9727
9593
|
laravelServiceTelephonyCdr
|
9728
9594
|
});
|
9729
9595
|
var platformKlinkChatContract = (0, import_core45.initContract)().router({
|
9730
|
-
|
9596
|
+
klinkChat: KlinkChatContract
|
9731
9597
|
});
|
9732
9598
|
|
9733
9599
|
// src/general-setting/index.ts
|
@@ -10146,7 +10012,7 @@ var RoomContractsValidationSchema = {
|
|
10146
10012
|
category: import_zod126.default.union([import_zod126.default.literal("contact"), import_zod126.default.literal("message")])
|
10147
10013
|
}).optional(),
|
10148
10014
|
contactLabels: import_zod126.default.array(import_zod126.default.string()).optional(),
|
10149
|
-
channels: import_zod126.default.array(import_zod126.default.string()).optional(),
|
10015
|
+
channels: import_zod126.default.array(import_zod126.default.string().email()).optional(),
|
10150
10016
|
date: import_zod126.default.string().optional(),
|
10151
10017
|
contacts: import_zod126.default.array(import_zod126.default.string()).optional(),
|
10152
10018
|
assignees: import_zod126.default.array(import_zod126.default.string()).optional(),
|
@@ -11313,17 +11179,6 @@ var subscriptionContract = (0, import_core55.initContract)().router(
|
|
11313
11179
|
500: DefaultErrorResponseSchema
|
11314
11180
|
}
|
11315
11181
|
},
|
11316
|
-
getAvailableAddOns: {
|
11317
|
-
method: "GET",
|
11318
|
-
path: "/available-add-ons",
|
11319
|
-
query: GetAvailablePlanSchema,
|
11320
|
-
responses: {
|
11321
|
-
200: DefaultSuccessResponseSchema.extend({
|
11322
|
-
data: import_zod141.z.array(ProductSchema)
|
11323
|
-
}),
|
11324
|
-
500: DefaultErrorResponseSchema
|
11325
|
-
}
|
11326
|
-
},
|
11327
11182
|
checkPlan: {
|
11328
11183
|
method: "POST",
|
11329
11184
|
path: "/check-plan",
|
@@ -11511,7 +11366,6 @@ var exportContract = (0, import_core57.initContract)().router(
|
|
11511
11366
|
userContract,
|
11512
11367
|
userNotificationContract,
|
11513
11368
|
userPresenceStatusLogContract,
|
11514
|
-
widgetContract,
|
11515
11369
|
widgetSettingContract,
|
11516
11370
|
workflowContract,
|
11517
11371
|
wrapUpFormContract
|