@kl1/contracts 1.3.33 → 1.3.35
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/api-contracts/src/automation-queue/index.d.ts +3 -0
- package/dist/api-contracts/src/automation-queue/index.d.ts.map +1 -1
- package/dist/api-contracts/src/botpress/index.d.ts +5 -5
- package/dist/api-contracts/src/channel/index.d.ts +1573 -31
- package/dist/api-contracts/src/channel/index.d.ts.map +1 -1
- package/dist/api-contracts/src/channel/schema.d.ts +44 -0
- package/dist/api-contracts/src/channel/schema.d.ts.map +1 -1
- package/dist/api-contracts/src/channel/validation.d.ts +65 -0
- package/dist/api-contracts/src/channel/validation.d.ts.map +1 -1
- package/dist/api-contracts/src/chat/index.d.ts +1285 -211
- package/dist/api-contracts/src/chat/index.d.ts.map +1 -1
- package/dist/api-contracts/src/chat/schema.d.ts +312 -63
- package/dist/api-contracts/src/chat/schema.d.ts.map +1 -1
- package/dist/api-contracts/src/chat/validation.d.ts +455 -69
- package/dist/api-contracts/src/chat/validation.d.ts.map +1 -1
- package/dist/api-contracts/src/contract.d.ts +9415 -2931
- package/dist/api-contracts/src/contract.d.ts.map +1 -1
- package/dist/api-contracts/src/cx-log/index.d.ts +62 -1
- package/dist/api-contracts/src/cx-log/index.d.ts.map +1 -1
- package/dist/api-contracts/src/cx-log/schema.d.ts +46 -1
- package/dist/api-contracts/src/cx-log/schema.d.ts.map +1 -1
- package/dist/api-contracts/src/cx-log/validation.d.ts +3 -0
- package/dist/api-contracts/src/cx-log/validation.d.ts.map +1 -1
- package/dist/api-contracts/src/dashboard/index.d.ts +952 -30
- package/dist/api-contracts/src/dashboard/index.d.ts.map +1 -1
- package/dist/api-contracts/src/dashboard/schema.d.ts +164 -9
- package/dist/api-contracts/src/dashboard/schema.d.ts.map +1 -1
- package/dist/api-contracts/src/dashboard/validation.d.ts +30 -1
- package/dist/api-contracts/src/dashboard/validation.d.ts.map +1 -1
- package/dist/api-contracts/src/export/index.d.ts +2 -0
- package/dist/api-contracts/src/export/index.d.ts.map +1 -1
- package/dist/api-contracts/src/export/validation.d.ts +3 -0
- package/dist/api-contracts/src/export/validation.d.ts.map +1 -0
- package/dist/api-contracts/src/facebook-feed/index.d.ts +561 -53
- package/dist/api-contracts/src/facebook-feed/index.d.ts.map +1 -1
- package/dist/api-contracts/src/facebook-feed/schema.d.ts +37 -3
- package/dist/api-contracts/src/facebook-feed/schema.d.ts.map +1 -1
- package/dist/api-contracts/src/facebook-feed/validation.d.ts +26 -0
- package/dist/api-contracts/src/facebook-feed/validation.d.ts.map +1 -1
- package/dist/api-contracts/src/index.d.ts +2 -0
- package/dist/api-contracts/src/index.d.ts.map +1 -1
- package/dist/api-contracts/src/instagram/index.d.ts +439 -41
- package/dist/api-contracts/src/instagram/index.d.ts.map +1 -1
- package/dist/api-contracts/src/line/index.d.ts +402 -48
- package/dist/api-contracts/src/line/index.d.ts.map +1 -1
- package/dist/api-contracts/src/line/validation.d.ts +49 -7
- package/dist/api-contracts/src/line/validation.d.ts.map +1 -1
- package/dist/api-contracts/src/messenger/index.d.ts +439 -41
- package/dist/api-contracts/src/messenger/index.d.ts.map +1 -1
- package/dist/api-contracts/src/messenger/validation.d.ts +26 -0
- package/dist/api-contracts/src/messenger/validation.d.ts.map +1 -1
- package/dist/api-contracts/src/presence-status/index.d.ts +122 -50
- package/dist/api-contracts/src/presence-status/index.d.ts.map +1 -1
- package/dist/api-contracts/src/presence-status/schema.d.ts +16 -10
- package/dist/api-contracts/src/presence-status/schema.d.ts.map +1 -1
- package/dist/api-contracts/src/presence-status/validation.d.ts +30 -12
- package/dist/api-contracts/src/presence-status/validation.d.ts.map +1 -1
- package/dist/api-contracts/src/sms/index.d.ts +185 -7
- package/dist/api-contracts/src/sms/index.d.ts.map +1 -1
- package/dist/api-contracts/src/telegram/index.d.ts +327 -41
- package/dist/api-contracts/src/telegram/index.d.ts.map +1 -1
- package/dist/api-contracts/src/telephony-agent-presence-status/index.d.ts +60 -439
- 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 +25 -13
- 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 +0 -3
- package/dist/api-contracts/src/telephony-agent-presence-status/validation.d.ts.map +1 -1
- package/dist/api-contracts/src/user-presence-status-log/index.d.ts +40 -16
- package/dist/api-contracts/src/user-presence-status-log/index.d.ts.map +1 -1
- package/dist/api-contracts/src/user-presence-status-log/schema.d.ts +50 -20
- package/dist/api-contracts/src/user-presence-status-log/schema.d.ts.map +1 -1
- package/dist/api-contracts/src/viber/index.d.ts +327 -41
- package/dist/api-contracts/src/viber/index.d.ts.map +1 -1
- package/dist/api-contracts/src/webchat/index.d.ts +327 -41
- package/dist/api-contracts/src/webchat/index.d.ts.map +1 -1
- package/dist/api-contracts/src/whatsapp/index.d.ts +379 -41
- package/dist/api-contracts/src/whatsapp/index.d.ts.map +1 -1
- package/dist/api-contracts/src/workflow-rule/index.d.ts +151 -17
- package/dist/api-contracts/src/workflow-rule/index.d.ts.map +1 -1
- package/dist/index.js +668 -315
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +666 -315
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -57,6 +57,7 @@ __export(index_exports, {
|
|
57
57
|
cxLogContract: () => cxLogContract,
|
58
58
|
dashboardContract: () => dashboardContract,
|
59
59
|
evaluateFormContract: () => evaluateFormContract,
|
60
|
+
exportContract: () => exportContract,
|
60
61
|
extensionContract: () => extensionContract2,
|
61
62
|
facebookFeedContract: () => facebookFeedContract2,
|
62
63
|
feedPostContract: () => feedPostContract,
|
@@ -99,6 +100,7 @@ __export(index_exports, {
|
|
99
100
|
userContract: () => userContract,
|
100
101
|
userNotificationContract: () => userNotificationContract,
|
101
102
|
userPresenceStatusLogContract: () => userPresenceStatusLogContract,
|
103
|
+
widgetContract: () => widgetContract,
|
102
104
|
widgetSettingContract: () => widgetSettingContract,
|
103
105
|
workflowContract: () => workflowContract,
|
104
106
|
wrapUpFormContract: () => wrapUpFormContract
|
@@ -300,6 +302,10 @@ var ChannelMetadataSchema = import_zod6.default.object({
|
|
300
302
|
apiKey: import_zod6.default.string(),
|
301
303
|
apiSecret: import_zod6.default.string()
|
302
304
|
}).optional(),
|
305
|
+
line: import_zod6.default.object({
|
306
|
+
channelId: import_zod6.default.string(),
|
307
|
+
channelSecret: import_zod6.default.string()
|
308
|
+
}).optional(),
|
303
309
|
lineRichMenuId: import_zod6.default.string().optional().nullable(),
|
304
310
|
messengerIntegrationType: import_zod6.default.union([import_zod6.default.literal("own"), import_zod6.default.literal("business")]).optional(),
|
305
311
|
facebookFeedIntegrationType: import_zod6.default.union([import_zod6.default.literal("own"), import_zod6.default.literal("business")]).optional(),
|
@@ -716,56 +722,57 @@ var WorkflowRuleSchema = DefaultEntitySchema.extend({
|
|
716
722
|
});
|
717
723
|
|
718
724
|
// src/chat/schema.ts
|
719
|
-
var MessageDirectionTypeSchema = import_zod18.default.
|
720
|
-
"incoming",
|
721
|
-
"outgoing",
|
722
|
-
"system"
|
725
|
+
var MessageDirectionTypeSchema = import_zod18.default.union([
|
726
|
+
import_zod18.default.literal("incoming"),
|
727
|
+
import_zod18.default.literal("outgoing"),
|
728
|
+
import_zod18.default.literal("system")
|
723
729
|
]);
|
724
730
|
var WorkflowAutoReplyMessageTypeSchema = import_zod18.default.enum(["text", "image"]).default("text");
|
725
|
-
var
|
726
|
-
"text",
|
727
|
-
"image",
|
728
|
-
"video",
|
729
|
-
"audio",
|
730
|
-
"file",
|
731
|
-
"imagemap",
|
732
|
-
"group",
|
733
|
-
"fallback",
|
734
|
-
"location",
|
735
|
-
"sticker",
|
731
|
+
var messageTypes = [
|
732
|
+
import_zod18.default.literal("text"),
|
733
|
+
import_zod18.default.literal("image"),
|
734
|
+
import_zod18.default.literal("video"),
|
735
|
+
import_zod18.default.literal("audio"),
|
736
|
+
import_zod18.default.literal("file"),
|
737
|
+
import_zod18.default.literal("imagemap"),
|
738
|
+
import_zod18.default.literal("group"),
|
739
|
+
import_zod18.default.literal("fallback"),
|
740
|
+
import_zod18.default.literal("location"),
|
741
|
+
import_zod18.default.literal("sticker"),
|
736
742
|
// botpress specific
|
737
|
-
"carousel",
|
738
|
-
"card",
|
739
|
-
"choice",
|
740
|
-
"dropdown",
|
741
|
-
"text_with_image",
|
742
|
-
"reaction",
|
743
|
-
"contacts",
|
744
|
-
// botpress specific
|
745
|
-
"carousel",
|
746
|
-
"card",
|
747
|
-
"choice",
|
748
|
-
"dropdown",
|
749
|
-
// messenger referral
|
750
|
-
"referral",
|
743
|
+
import_zod18.default.literal("carousel"),
|
744
|
+
import_zod18.default.literal("card"),
|
745
|
+
import_zod18.default.literal("choice"),
|
746
|
+
import_zod18.default.literal("dropdown"),
|
747
|
+
import_zod18.default.literal("text_with_image"),
|
748
|
+
import_zod18.default.literal("reaction"),
|
749
|
+
import_zod18.default.literal("contacts"),
|
751
750
|
// system
|
752
|
-
"csat",
|
753
|
-
"assign",
|
754
|
-
"solve",
|
755
|
-
"resolved",
|
756
|
-
"reopen",
|
757
|
-
"open",
|
758
|
-
"closed",
|
759
|
-
"handed_over",
|
760
|
-
"updated",
|
761
|
-
"started",
|
762
|
-
"hold",
|
763
|
-
"unhold",
|
764
|
-
"auto_unhold",
|
765
|
-
"edited",
|
766
|
-
"deleted",
|
767
|
-
"unsupported"
|
768
|
-
|
751
|
+
import_zod18.default.literal("csat"),
|
752
|
+
import_zod18.default.literal("assign"),
|
753
|
+
import_zod18.default.literal("solve"),
|
754
|
+
import_zod18.default.literal("resolved"),
|
755
|
+
import_zod18.default.literal("reopen"),
|
756
|
+
import_zod18.default.literal("open"),
|
757
|
+
import_zod18.default.literal("closed"),
|
758
|
+
import_zod18.default.literal("handed_over"),
|
759
|
+
import_zod18.default.literal("updated"),
|
760
|
+
import_zod18.default.literal("started"),
|
761
|
+
import_zod18.default.literal("hold"),
|
762
|
+
import_zod18.default.literal("unhold"),
|
763
|
+
import_zod18.default.literal("auto_unhold"),
|
764
|
+
import_zod18.default.literal("edited"),
|
765
|
+
import_zod18.default.literal("deleted"),
|
766
|
+
import_zod18.default.literal("unsupported"),
|
767
|
+
// lazada specific
|
768
|
+
import_zod18.default.literal("lazada_item"),
|
769
|
+
import_zod18.default.literal("lazada_sys_msg"),
|
770
|
+
import_zod18.default.literal("lazada_order"),
|
771
|
+
import_zod18.default.literal("lazada_order_invite"),
|
772
|
+
import_zod18.default.literal("lazada_shop_invite"),
|
773
|
+
import_zod18.default.literal("lazada_voucher")
|
774
|
+
];
|
775
|
+
var MessageTypeSchema = import_zod18.default.union(messageTypes);
|
769
776
|
var FeedPostTypeSchema = import_zod18.default.enum([
|
770
777
|
"text",
|
771
778
|
"added_photos",
|
@@ -1293,7 +1300,8 @@ var CxLogSchemaWithRelations = DefaultEntitySchema.extend({
|
|
1293
1300
|
summary: import_zod25.default.string(),
|
1294
1301
|
usage: import_zod25.default.number(),
|
1295
1302
|
usageUnit: import_zod25.default.string()
|
1296
|
-
})
|
1303
|
+
}),
|
1304
|
+
uid: import_zod25.default.string()
|
1297
1305
|
});
|
1298
1306
|
|
1299
1307
|
// src/chat/validation.ts
|
@@ -1338,7 +1346,9 @@ var MessageAttachmentSchema = import_zod26.default.object({
|
|
1338
1346
|
fileSize: import_zod26.default.number(),
|
1339
1347
|
url: import_zod26.default.string().nullable(),
|
1340
1348
|
fileType: import_zod26.default.string(),
|
1341
|
-
thumbnailUrl: import_zod26.default.string().optional()
|
1349
|
+
thumbnailUrl: import_zod26.default.string().optional(),
|
1350
|
+
width: import_zod26.default.string().optional(),
|
1351
|
+
height: import_zod26.default.string().optional()
|
1342
1352
|
});
|
1343
1353
|
var StickerSchema = import_zod26.default.object({
|
1344
1354
|
packageId: import_zod26.default.number(),
|
@@ -2274,7 +2284,8 @@ var ConnectWebChatSchema = import_zod37.default.object({
|
|
2274
2284
|
})
|
2275
2285
|
});
|
2276
2286
|
var GetChannelSchema = import_zod37.default.object({
|
2277
|
-
withDeleted: import_zod37.default.coerce.boolean().default(false)
|
2287
|
+
withDeleted: import_zod37.default.coerce.boolean().default(false),
|
2288
|
+
withRelations: import_zod37.default.coerce.boolean().default(true).optional()
|
2278
2289
|
});
|
2279
2290
|
var ConnectBotSchema = import_zod37.default.object({
|
2280
2291
|
botId: import_zod37.default.string().uuid()
|
@@ -2297,6 +2308,10 @@ var ConnectWhatsappSchema = import_zod37.default.object({
|
|
2297
2308
|
metadata: ChannelMetadataSchema,
|
2298
2309
|
platformId: import_zod37.default.string()
|
2299
2310
|
});
|
2311
|
+
var ConnectLazadaSchema = import_zod37.default.object({
|
2312
|
+
name: import_zod37.default.string(),
|
2313
|
+
code: import_zod37.default.string()
|
2314
|
+
});
|
2300
2315
|
|
2301
2316
|
// src/instagram/validation.ts
|
2302
2317
|
var import_zod38 = __toESM(require("zod"));
|
@@ -2616,11 +2631,30 @@ var whatsapp = (0, import_core7.initContract)().router(
|
|
2616
2631
|
pathPrefix: "whatsapp"
|
2617
2632
|
}
|
2618
2633
|
);
|
2634
|
+
var lazada = (0, import_core7.initContract)().router(
|
2635
|
+
{
|
2636
|
+
connect: {
|
2637
|
+
method: "POST",
|
2638
|
+
path: "/connect",
|
2639
|
+
responses: {
|
2640
|
+
200: DefaultSuccessResponseSchema.extend({
|
2641
|
+
channel: ChannelSchema
|
2642
|
+
}),
|
2643
|
+
408: DefaultErrorResponseSchema
|
2644
|
+
},
|
2645
|
+
body: ConnectLazadaSchema,
|
2646
|
+
summary: "Connect message channel"
|
2647
|
+
}
|
2648
|
+
},
|
2649
|
+
{
|
2650
|
+
pathPrefix: "lazada"
|
2651
|
+
}
|
2652
|
+
);
|
2619
2653
|
var channelContract = (0, import_core7.initContract)().router(
|
2620
2654
|
{
|
2621
2655
|
getChannels: {
|
2622
2656
|
method: "GET",
|
2623
|
-
path: "
|
2657
|
+
path: "channel",
|
2624
2658
|
responses: {
|
2625
2659
|
200: DefaultSuccessResponseSchema.extend({
|
2626
2660
|
data: ChannelSchema.array()
|
@@ -2733,7 +2767,7 @@ var channelContract = (0, import_core7.initContract)().router(
|
|
2733
2767
|
},
|
2734
2768
|
updateChannelCsatPreference: {
|
2735
2769
|
method: "POST",
|
2736
|
-
path: "
|
2770
|
+
path: "csat/:channelId",
|
2737
2771
|
pathParams: import_zod41.default.object({
|
2738
2772
|
channelId: import_zod41.default.string().uuid()
|
2739
2773
|
}),
|
@@ -2754,7 +2788,8 @@ var channelContract = (0, import_core7.initContract)().router(
|
|
2754
2788
|
viber,
|
2755
2789
|
telegram,
|
2756
2790
|
webchat,
|
2757
|
-
whatsapp
|
2791
|
+
whatsapp,
|
2792
|
+
lazada
|
2758
2793
|
},
|
2759
2794
|
{
|
2760
2795
|
baseHeaders: DefaultHeaderSchema
|
@@ -2790,28 +2825,33 @@ var channelFacebookFeedContract = (0, import_core7.initContract)().router(
|
|
2790
2825
|
pathPrefix: "ms/facebook-feed"
|
2791
2826
|
}
|
2792
2827
|
);
|
2793
|
-
var channelBotContract = (0, import_core7.initContract)().router(
|
2794
|
-
|
2795
|
-
|
2796
|
-
|
2797
|
-
|
2798
|
-
|
2799
|
-
|
2800
|
-
|
2828
|
+
var channelBotContract = (0, import_core7.initContract)().router(
|
2829
|
+
{
|
2830
|
+
connectBot: {
|
2831
|
+
method: "POST",
|
2832
|
+
path: "/connect-bot/:channelId",
|
2833
|
+
responses: {
|
2834
|
+
200: DefaultSuccessResponseSchema.extend({ channel: ChannelSchema }),
|
2835
|
+
400: DefaultErrorResponseSchema,
|
2836
|
+
500: DefaultErrorResponseSchema
|
2837
|
+
},
|
2838
|
+
body: ConnectBotSchema
|
2801
2839
|
},
|
2802
|
-
|
2840
|
+
disconnectBot: {
|
2841
|
+
method: "POST",
|
2842
|
+
path: "/disconnect-bot/:channelId",
|
2843
|
+
responses: {
|
2844
|
+
200: DefaultSuccessResponseSchema.extend({ channel: ChannelSchema }),
|
2845
|
+
400: DefaultErrorResponseSchema,
|
2846
|
+
500: DefaultErrorResponseSchema
|
2847
|
+
},
|
2848
|
+
body: import_zod41.default.object({})
|
2849
|
+
}
|
2803
2850
|
},
|
2804
|
-
|
2805
|
-
|
2806
|
-
path: "/disconnect-bot/:channelId",
|
2807
|
-
responses: {
|
2808
|
-
200: DefaultSuccessResponseSchema.extend({ channel: ChannelSchema }),
|
2809
|
-
400: DefaultErrorResponseSchema,
|
2810
|
-
500: DefaultErrorResponseSchema
|
2811
|
-
},
|
2812
|
-
body: import_zod41.default.object({})
|
2851
|
+
{
|
2852
|
+
pathPrefix: "ms"
|
2813
2853
|
}
|
2814
|
-
|
2854
|
+
);
|
2815
2855
|
var channelSMSContract = (0, import_core7.initContract)().router(
|
2816
2856
|
{
|
2817
2857
|
connect: {
|
@@ -4181,7 +4221,8 @@ var GetAllCxLogQueryParamsSchema = DefaultQueryParamsSchema.extend({
|
|
4181
4221
|
// Custom fields
|
4182
4222
|
customFields: import_zod51.default.array(CustomFieldQueryParamsSchema),
|
4183
4223
|
// Date filter
|
4184
|
-
selectedDate: import_zod51.default.string()
|
4224
|
+
selectedDate: import_zod51.default.string(),
|
4225
|
+
uid: import_zod51.default.string()
|
4185
4226
|
}).partial().optional();
|
4186
4227
|
|
4187
4228
|
// src/cx-log/index.ts
|
@@ -4255,19 +4296,23 @@ var import_core13 = require("@ts-rest/core");
|
|
4255
4296
|
// src/dashboard/validation.ts
|
4256
4297
|
var import_zod53 = __toESM(require("zod"));
|
4257
4298
|
var GetDashboardQueryParamsSchema = import_zod53.default.object({
|
4258
|
-
channelIds: import_zod53.default.array(import_zod53.default.string()).optional(),
|
4259
|
-
selectedDate: import_zod53.default.string()
|
4299
|
+
channelIds: import_zod53.default.array(import_zod53.default.string().uuid()).optional(),
|
4300
|
+
selectedDate: import_zod53.default.string().min(1)
|
4260
4301
|
});
|
4261
4302
|
var GetMessageChannelQueryParamsSchema = GetDashboardQueryParamsSchema.extend({
|
4262
4303
|
time: import_zod53.default.enum(["byDay", "byMonth", "byHour"]),
|
4263
4304
|
channelIds: import_zod53.default.array(import_zod53.default.string()).optional()
|
4264
4305
|
});
|
4265
|
-
var
|
4266
|
-
import_zod53.default.
|
4267
|
-
|
4268
|
-
|
4269
|
-
|
4270
|
-
|
4306
|
+
var DashboardGlobalFiltersSchema = import_zod53.default.object({
|
4307
|
+
automationQueueId: import_zod53.default.string().uuid().optional(),
|
4308
|
+
selectedDate: import_zod53.default.string().min(1),
|
4309
|
+
channelIds: import_zod53.default.array(import_zod53.default.string().uuid()).optional()
|
4310
|
+
});
|
4311
|
+
var DashboardQueryParamsSchema = GetDashboardQueryParamsSchema.extend({
|
4312
|
+
automationQueueId: import_zod53.default.string().uuid().optional(),
|
4313
|
+
channelIds: import_zod53.default.array(import_zod53.default.string().uuid()).optional(),
|
4314
|
+
agentIds: import_zod53.default.array(import_zod53.default.string().uuid()).optional()
|
4315
|
+
});
|
4271
4316
|
var GetDashboardQueryDetailParamsSchema = GetDashboardQueryParamsSchema.merge(
|
4272
4317
|
import_zod53.default.object({
|
4273
4318
|
agentId: import_zod53.default.string().uuid().optional()
|
@@ -4284,9 +4329,14 @@ var CallCountsQuerySchema = import_zod53.default.object({
|
|
4284
4329
|
types: import_zod53.default.array(import_zod53.default.string()).optional(),
|
4285
4330
|
selectedDate: import_zod53.default.string().optional()
|
4286
4331
|
});
|
4332
|
+
var MessageDashboardDetailsQuerySchema = import_zod53.default.object({
|
4333
|
+
automationQueueId: import_zod53.default.string().uuid().optional(),
|
4334
|
+
selectedDate: import_zod53.default.string().min(1),
|
4335
|
+
channelIds: import_zod53.default.array(import_zod53.default.string().uuid()).optional()
|
4336
|
+
});
|
4287
4337
|
|
4288
4338
|
// src/dashboard/index.ts
|
4289
|
-
var
|
4339
|
+
var import_zod56 = __toESM(require("zod"));
|
4290
4340
|
|
4291
4341
|
// src/dashboard/schema.ts
|
4292
4342
|
var import_zod54 = __toESM(require("zod"));
|
@@ -4441,29 +4491,32 @@ var MessageStatusSchema = import_zod54.default.object({
|
|
4441
4491
|
total: import_zod54.default.number().nullable(),
|
4442
4492
|
closed: import_zod54.default.number().nullable(),
|
4443
4493
|
unassignedOpen: import_zod54.default.number().nullable(),
|
4444
|
-
assignedOpen: import_zod54.default.number().nullable()
|
4494
|
+
assignedOpen: import_zod54.default.number().nullable(),
|
4495
|
+
hold: import_zod54.default.number()
|
4445
4496
|
});
|
4446
4497
|
var MessageAverageSchema = import_zod54.default.object({
|
4447
4498
|
selectedWeekAvgByDay: import_zod54.default.array(
|
4448
4499
|
import_zod54.default.object({
|
4449
4500
|
day: import_zod54.default.string().nullable(),
|
4450
4501
|
avgResolutionTime: import_zod54.default.string().nullable(),
|
4451
|
-
avgResponseTime: import_zod54.default.string().nullable()
|
4502
|
+
avgResponseTime: import_zod54.default.string().nullable(),
|
4503
|
+
resolutionRate: import_zod54.default.string()
|
4452
4504
|
})
|
4453
4505
|
).optional().nullable(),
|
4454
4506
|
previousWeekAvg: import_zod54.default.object({
|
4455
4507
|
avgResolutionTime: import_zod54.default.string().nullable(),
|
4456
|
-
avgResponseTime: import_zod54.default.string().nullable()
|
4508
|
+
avgResponseTime: import_zod54.default.string().nullable(),
|
4509
|
+
resolutionRate: import_zod54.default.string()
|
4457
4510
|
}).nullable().optional(),
|
4458
4511
|
selectedWeekAvg: import_zod54.default.object({
|
4459
4512
|
avgResolutionTime: import_zod54.default.string().nullable(),
|
4460
|
-
avgResponseTime: import_zod54.default.string().nullable()
|
4513
|
+
avgResponseTime: import_zod54.default.string().nullable(),
|
4514
|
+
resolutionRate: import_zod54.default.string()
|
4461
4515
|
}).nullable().optional()
|
4462
4516
|
});
|
4463
4517
|
var ChannelIncomingMessageSchema = import_zod54.default.object({
|
4464
|
-
|
4465
|
-
|
4466
|
-
count: import_zod54.default.string().nullable()
|
4518
|
+
channelType: import_zod54.default.string(),
|
4519
|
+
count: import_zod54.default.number()
|
4467
4520
|
});
|
4468
4521
|
var MessageDispositionSchema = import_zod54.default.object({
|
4469
4522
|
name: import_zod54.default.string().optional().nullable(),
|
@@ -4486,6 +4539,49 @@ var CallCountsSchema = import_zod54.default.object({
|
|
4486
4539
|
failedCallCount: import_zod54.default.number().gte(0),
|
4487
4540
|
totalCallCount: import_zod54.default.number().gte(0)
|
4488
4541
|
});
|
4542
|
+
var MessageQueueDataSchema = import_zod54.default.object({
|
4543
|
+
id: import_zod54.default.string().uuid().nullable(),
|
4544
|
+
name: import_zod54.default.string(),
|
4545
|
+
sla: import_zod54.default.number(),
|
4546
|
+
newContactCount: import_zod54.default.number(),
|
4547
|
+
existingContactCount: import_zod54.default.number(),
|
4548
|
+
totalRoomCount: import_zod54.default.number(),
|
4549
|
+
closedRoomCount: import_zod54.default.number(),
|
4550
|
+
unassignedRoomCount: import_zod54.default.number(),
|
4551
|
+
assignedRoomCount: import_zod54.default.number(),
|
4552
|
+
holdRoomCount: import_zod54.default.number()
|
4553
|
+
});
|
4554
|
+
var AgentMessageStatisticsSchema = import_zod54.default.object({
|
4555
|
+
id: import_zod54.default.string().uuid(),
|
4556
|
+
name: import_zod54.default.string(),
|
4557
|
+
assignedRoomCount: import_zod54.default.number(),
|
4558
|
+
holdRoomCount: import_zod54.default.number(),
|
4559
|
+
closedRoomCount: import_zod54.default.number(),
|
4560
|
+
averageFirstResponseTime: import_zod54.default.string(),
|
4561
|
+
averageResolutionTime: import_zod54.default.string(),
|
4562
|
+
totalHandledTime: import_zod54.default.string()
|
4563
|
+
});
|
4564
|
+
var UserCheckInLogSchema = import_zod54.default.object({
|
4565
|
+
userId: import_zod54.default.string().uuid(),
|
4566
|
+
firstLoginTime: import_zod54.default.string(),
|
4567
|
+
lastLogoutTime: import_zod54.default.string().nullable(),
|
4568
|
+
totalLoginDuration: import_zod54.default.string().nullable(),
|
4569
|
+
averageFirstResponseTime: import_zod54.default.string().nullable(),
|
4570
|
+
averageResolutionTime: import_zod54.default.string().nullable(),
|
4571
|
+
totalHandledTime: import_zod54.default.string().nullable()
|
4572
|
+
});
|
4573
|
+
var UserCheckInLogsWithDaySchema = import_zod54.default.object({
|
4574
|
+
date: import_zod54.default.date(),
|
4575
|
+
formattedDate: import_zod54.default.string(),
|
4576
|
+
userCheckInLogs: import_zod54.default.array(UserCheckInLogSchema)
|
4577
|
+
});
|
4578
|
+
|
4579
|
+
// src/export/validation.ts
|
4580
|
+
var import_zod55 = __toESM(require("zod"));
|
4581
|
+
var ExportFileExtensionSchema = import_zod55.default.union([
|
4582
|
+
import_zod55.default.literal("csv"),
|
4583
|
+
import_zod55.default.literal("xlsx")
|
4584
|
+
]);
|
4489
4585
|
|
4490
4586
|
// src/dashboard/index.ts
|
4491
4587
|
var dashboardContract = (0, import_core13.initContract)().router(
|
@@ -4500,8 +4596,8 @@ var dashboardContract = (0, import_core13.initContract)().router(
|
|
4500
4596
|
200: DefaultSuccessResponseSchema.extend({
|
4501
4597
|
dashboard: DashboardDataSchema
|
4502
4598
|
}),
|
4503
|
-
400:
|
4504
|
-
message:
|
4599
|
+
400: import_zod56.default.object({
|
4600
|
+
message: import_zod56.default.string()
|
4505
4601
|
}),
|
4506
4602
|
401: DefaultUnauthorizedSchema
|
4507
4603
|
}
|
@@ -4516,8 +4612,8 @@ var dashboardContract = (0, import_core13.initContract)().router(
|
|
4516
4612
|
200: DefaultSuccessResponseSchema.extend({
|
4517
4613
|
queuecallDashboard: queueCallDashboardDataSchema
|
4518
4614
|
}),
|
4519
|
-
400:
|
4520
|
-
message:
|
4615
|
+
400: import_zod56.default.object({
|
4616
|
+
message: import_zod56.default.string()
|
4521
4617
|
}),
|
4522
4618
|
401: DefaultUnauthorizedSchema
|
4523
4619
|
}
|
@@ -4607,7 +4703,11 @@ var dashboardContract = (0, import_core13.initContract)().router(
|
|
4607
4703
|
getMessageTagData: {
|
4608
4704
|
method: "GET",
|
4609
4705
|
path: "/message/tag",
|
4610
|
-
query:
|
4706
|
+
query: import_zod56.default.object({
|
4707
|
+
automationQueueId: import_zod56.default.string().uuid().optional(),
|
4708
|
+
selectedDate: import_zod56.default.string().min(1),
|
4709
|
+
channelIds: import_zod56.default.array(import_zod56.default.string().uuid()).optional()
|
4710
|
+
}),
|
4611
4711
|
headers: DefaultHeaderSchema,
|
4612
4712
|
summary: "Get message tag data",
|
4613
4713
|
responses: {
|
@@ -4617,6 +4717,16 @@ var dashboardContract = (0, import_core13.initContract)().router(
|
|
4617
4717
|
401: DefaultUnauthorizedSchema
|
4618
4718
|
}
|
4619
4719
|
},
|
4720
|
+
exportRoomTagCounts: {
|
4721
|
+
method: "GET",
|
4722
|
+
path: "/export-room-tag-counts",
|
4723
|
+
query: DashboardGlobalFiltersSchema.extend({
|
4724
|
+
fileExtension: ExportFileExtensionSchema
|
4725
|
+
}),
|
4726
|
+
responses: {
|
4727
|
+
200: DefaultSuccessResponseSchema
|
4728
|
+
}
|
4729
|
+
},
|
4620
4730
|
getCallTagData: {
|
4621
4731
|
method: "GET",
|
4622
4732
|
path: "/call/tag",
|
@@ -4648,7 +4758,7 @@ var dashboardContract = (0, import_core13.initContract)().router(
|
|
4648
4758
|
path: "/message/conversation-activities",
|
4649
4759
|
// conversation activity
|
4650
4760
|
summary: "Get message contact data",
|
4651
|
-
query:
|
4761
|
+
query: DashboardQueryParamsSchema,
|
4652
4762
|
headers: DefaultHeaderSchema,
|
4653
4763
|
responses: {
|
4654
4764
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -4661,7 +4771,7 @@ var dashboardContract = (0, import_core13.initContract)().router(
|
|
4661
4771
|
method: "GET",
|
4662
4772
|
path: "/message/status",
|
4663
4773
|
summary: "Get room status count by status",
|
4664
|
-
query:
|
4774
|
+
query: DashboardQueryParamsSchema,
|
4665
4775
|
headers: DefaultHeaderSchema,
|
4666
4776
|
responses: {
|
4667
4777
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -4674,7 +4784,7 @@ var dashboardContract = (0, import_core13.initContract)().router(
|
|
4674
4784
|
method: "GET",
|
4675
4785
|
path: "/message/average",
|
4676
4786
|
summary: "Get room status average",
|
4677
|
-
query:
|
4787
|
+
query: DashboardQueryParamsSchema,
|
4678
4788
|
headers: DefaultHeaderSchema,
|
4679
4789
|
responses: {
|
4680
4790
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -4683,37 +4793,74 @@ var dashboardContract = (0, import_core13.initContract)().router(
|
|
4683
4793
|
401: DefaultUnauthorizedSchema
|
4684
4794
|
}
|
4685
4795
|
},
|
4796
|
+
exportMessageAverageData: {
|
4797
|
+
method: "GET",
|
4798
|
+
path: "/export-message-average-data",
|
4799
|
+
query: import_zod56.default.object({
|
4800
|
+
selectedDate: import_zod56.default.string().min(1),
|
4801
|
+
automationQueueId: import_zod56.default.string().uuid().optional(),
|
4802
|
+
channelIds: import_zod56.default.array(import_zod56.default.string().uuid()).optional(),
|
4803
|
+
fileExtension: ExportFileExtensionSchema
|
4804
|
+
}),
|
4805
|
+
responses: {
|
4806
|
+
200: DefaultSuccessResponseSchema
|
4807
|
+
}
|
4808
|
+
},
|
4686
4809
|
getChannelIncomingMessageCounts: {
|
4687
4810
|
method: "GET",
|
4688
4811
|
path: "/message/platform",
|
4689
4812
|
summary: "Get message platform data",
|
4690
|
-
query:
|
4813
|
+
query: DashboardGlobalFiltersSchema,
|
4691
4814
|
headers: DefaultHeaderSchema,
|
4692
4815
|
responses: {
|
4693
4816
|
200: DefaultSuccessResponseSchema.extend({
|
4694
|
-
incomingMessageCounts:
|
4817
|
+
incomingMessageCounts: import_zod56.default.array(ChannelIncomingMessageSchema)
|
4695
4818
|
}),
|
4696
4819
|
401: DefaultUnauthorizedSchema
|
4697
4820
|
}
|
4698
4821
|
},
|
4822
|
+
exportRoomChannelCounts: {
|
4823
|
+
method: "GET",
|
4824
|
+
path: "/export-room-channel-counts",
|
4825
|
+
query: DashboardGlobalFiltersSchema.extend({
|
4826
|
+
fileExtension: ExportFileExtensionSchema
|
4827
|
+
}),
|
4828
|
+
responses: {
|
4829
|
+
200: DefaultSuccessResponseSchema
|
4830
|
+
}
|
4831
|
+
},
|
4699
4832
|
getMessageRoomStatusDispositionData: {
|
4700
4833
|
method: "GET",
|
4701
4834
|
path: "/message/disposition",
|
4702
4835
|
summary: "Get message room status disposition data",
|
4703
|
-
query:
|
4836
|
+
query: import_zod56.default.object({
|
4837
|
+
automationQueueId: import_zod56.default.string().uuid().optional(),
|
4838
|
+
selectedDate: import_zod56.default.string().min(1),
|
4839
|
+
channelIds: import_zod56.default.array(import_zod56.default.string().uuid()).optional()
|
4840
|
+
}),
|
4704
4841
|
headers: DefaultHeaderSchema,
|
4705
4842
|
responses: {
|
4706
4843
|
200: DefaultSuccessResponseSchema.extend({
|
4707
|
-
messageRoomStatusDispositionData:
|
4844
|
+
messageRoomStatusDispositionData: import_zod56.default.array(MessageDispositionSchema).optional()
|
4708
4845
|
}),
|
4709
4846
|
401: DefaultUnauthorizedSchema
|
4710
4847
|
}
|
4711
4848
|
},
|
4849
|
+
exportRoomDispositionCounts: {
|
4850
|
+
method: "GET",
|
4851
|
+
path: "/export-room-disposition-counts",
|
4852
|
+
query: DashboardGlobalFiltersSchema.extend({
|
4853
|
+
fileExtension: ExportFileExtensionSchema
|
4854
|
+
}),
|
4855
|
+
responses: {
|
4856
|
+
200: DefaultSuccessResponseSchema
|
4857
|
+
}
|
4858
|
+
},
|
4712
4859
|
getIncomingMessageByPlatform: {
|
4713
4860
|
method: "GET",
|
4714
4861
|
path: "/message/incoming",
|
4715
4862
|
summary: "Get incoming message by platform",
|
4716
|
-
query:
|
4863
|
+
query: DashboardQueryParamsSchema,
|
4717
4864
|
headers: DefaultHeaderSchema,
|
4718
4865
|
responses: {
|
4719
4866
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -4726,7 +4873,7 @@ var dashboardContract = (0, import_core13.initContract)().router(
|
|
4726
4873
|
method: "GET",
|
4727
4874
|
path: "/message/total-incoming",
|
4728
4875
|
summary: "Get total incoming message data",
|
4729
|
-
query:
|
4876
|
+
query: DashboardGlobalFiltersSchema,
|
4730
4877
|
headers: DefaultHeaderSchema,
|
4731
4878
|
responses: {
|
4732
4879
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -4735,6 +4882,16 @@ var dashboardContract = (0, import_core13.initContract)().router(
|
|
4735
4882
|
401: DefaultUnauthorizedSchema
|
4736
4883
|
}
|
4737
4884
|
},
|
4885
|
+
exportIncomingMessageCounts: {
|
4886
|
+
method: "GET",
|
4887
|
+
path: "/export-incoming-message-counts",
|
4888
|
+
query: DashboardGlobalFiltersSchema.extend({
|
4889
|
+
fileExtension: ExportFileExtensionSchema
|
4890
|
+
}),
|
4891
|
+
responses: {
|
4892
|
+
200: DefaultSuccessResponseSchema
|
4893
|
+
}
|
4894
|
+
},
|
4738
4895
|
getCallCounts: {
|
4739
4896
|
method: "GET",
|
4740
4897
|
path: "/call-counts",
|
@@ -4744,6 +4901,185 @@ var dashboardContract = (0, import_core13.initContract)().router(
|
|
4744
4901
|
callCounts: CallCountsSchema
|
4745
4902
|
})
|
4746
4903
|
}
|
4904
|
+
},
|
4905
|
+
getAllQueueSLA: {
|
4906
|
+
method: "GET",
|
4907
|
+
path: "/all-queue-sla",
|
4908
|
+
query: import_zod56.default.object({ selectedDate: import_zod56.default.string().min(1) }),
|
4909
|
+
responses: {
|
4910
|
+
200: DefaultSuccessResponseSchema.extend({
|
4911
|
+
allQueueSLA: import_zod56.default.number()
|
4912
|
+
})
|
4913
|
+
}
|
4914
|
+
},
|
4915
|
+
getAllMessageQueueData: {
|
4916
|
+
method: "GET",
|
4917
|
+
path: "/all-message-queue-data",
|
4918
|
+
query: import_zod56.default.object({
|
4919
|
+
selectedDate: import_zod56.default.string().min(1),
|
4920
|
+
page: import_zod56.default.coerce.number().positive(),
|
4921
|
+
pageSize: import_zod56.default.coerce.number().positive()
|
4922
|
+
}),
|
4923
|
+
responses: {
|
4924
|
+
200: DefaultSuccessResponseSchema.extend({
|
4925
|
+
allMessageQueueData: import_zod56.default.array(MessageQueueDataSchema),
|
4926
|
+
page: import_zod56.default.coerce.number().positive(),
|
4927
|
+
pageSize: import_zod56.default.coerce.number().positive(),
|
4928
|
+
total: import_zod56.default.coerce.number().positive()
|
4929
|
+
})
|
4930
|
+
}
|
4931
|
+
},
|
4932
|
+
getMessageQueueData: {
|
4933
|
+
method: "GET",
|
4934
|
+
path: "/message-queue-data",
|
4935
|
+
query: MessageDashboardDetailsQuerySchema,
|
4936
|
+
responses: {
|
4937
|
+
200: DefaultSuccessResponseSchema.extend({
|
4938
|
+
messageQueueData: MessageQueueDataSchema
|
4939
|
+
})
|
4940
|
+
}
|
4941
|
+
},
|
4942
|
+
getAgentMessageStatistics: {
|
4943
|
+
method: "GET",
|
4944
|
+
path: "/agent-message-statistics",
|
4945
|
+
query: MessageDashboardDetailsQuerySchema.extend({
|
4946
|
+
page: import_zod56.default.coerce.number().positive(),
|
4947
|
+
pageSize: import_zod56.default.coerce.number().positive()
|
4948
|
+
}),
|
4949
|
+
responses: {
|
4950
|
+
200: DefaultSuccessResponseSchema.extend({
|
4951
|
+
page: import_zod56.default.coerce.number().positive(),
|
4952
|
+
pageSize: import_zod56.default.coerce.number().positive(),
|
4953
|
+
lastPage: import_zod56.default.coerce.number().positive(),
|
4954
|
+
total: import_zod56.default.coerce.number().positive(),
|
4955
|
+
agentMessageStatistics: import_zod56.default.array(AgentMessageStatisticsSchema).nullable()
|
4956
|
+
})
|
4957
|
+
}
|
4958
|
+
},
|
4959
|
+
exportAgentMessageStatistics: {
|
4960
|
+
method: "GET",
|
4961
|
+
path: "/export-agent-message-statistics",
|
4962
|
+
query: MessageDashboardDetailsQuerySchema.extend({
|
4963
|
+
fileExtension: ExportFileExtensionSchema
|
4964
|
+
}),
|
4965
|
+
responses: {
|
4966
|
+
200: DefaultSuccessResponseSchema
|
4967
|
+
}
|
4968
|
+
},
|
4969
|
+
getUserCheckInLogsWithDays: {
|
4970
|
+
method: "GET",
|
4971
|
+
path: "/user-check-in-logs-with-days",
|
4972
|
+
query: import_zod56.default.object({
|
4973
|
+
automationQueueId: import_zod56.default.string().uuid().optional(),
|
4974
|
+
selectedDate: import_zod56.default.string().min(1),
|
4975
|
+
keyword: import_zod56.default.string().optional(),
|
4976
|
+
page: import_zod56.default.coerce.number().positive(),
|
4977
|
+
pageSize: import_zod56.default.coerce.number().positive()
|
4978
|
+
}),
|
4979
|
+
responses: {
|
4980
|
+
200: DefaultSuccessResponseSchema.extend({
|
4981
|
+
page: import_zod56.default.coerce.number().positive(),
|
4982
|
+
pageSize: import_zod56.default.coerce.number().positive(),
|
4983
|
+
total: import_zod56.default.coerce.number().positive(),
|
4984
|
+
userCheckInLogsWithDays: import_zod56.default.array(UserCheckInLogsWithDaySchema)
|
4985
|
+
})
|
4986
|
+
}
|
4987
|
+
},
|
4988
|
+
exportUserCheckInLogs: {
|
4989
|
+
method: "GET",
|
4990
|
+
path: "/export-user-check-in-logs",
|
4991
|
+
query: import_zod56.default.object({
|
4992
|
+
automationQueueId: import_zod56.default.string().uuid().optional(),
|
4993
|
+
selectedDate: import_zod56.default.string().min(1),
|
4994
|
+
keyword: import_zod56.default.string().optional(),
|
4995
|
+
fileExtension: ExportFileExtensionSchema
|
4996
|
+
}),
|
4997
|
+
responses: {
|
4998
|
+
200: DefaultSuccessResponseSchema
|
4999
|
+
}
|
5000
|
+
},
|
5001
|
+
getRoomStatusCountsByUserId: {
|
5002
|
+
method: "GET",
|
5003
|
+
path: "/room-status-counts-by-user-id",
|
5004
|
+
query: import_zod56.default.object({
|
5005
|
+
automationQueueId: import_zod56.default.string().optional(),
|
5006
|
+
userId: import_zod56.default.string().uuid(),
|
5007
|
+
selectedDate: import_zod56.default.string().min(1)
|
5008
|
+
}),
|
5009
|
+
responses: {
|
5010
|
+
200: DefaultSuccessResponseSchema.extend({
|
5011
|
+
assignedRoomCount: import_zod56.default.number(),
|
5012
|
+
holdRoomCount: import_zod56.default.number(),
|
5013
|
+
closedRoomCount: import_zod56.default.number()
|
5014
|
+
})
|
5015
|
+
}
|
5016
|
+
},
|
5017
|
+
getPresenceStatusDurations: {
|
5018
|
+
method: "GET",
|
5019
|
+
path: "/presence-status-durations",
|
5020
|
+
query: import_zod56.default.object({
|
5021
|
+
userId: import_zod56.default.string().uuid(),
|
5022
|
+
selectedDate: import_zod56.default.string().min(1),
|
5023
|
+
page: import_zod56.default.coerce.number().positive(),
|
5024
|
+
pageSize: import_zod56.default.coerce.number().positive()
|
5025
|
+
}),
|
5026
|
+
responses: {
|
5027
|
+
200: DefaultSuccessResponseSchema.extend({
|
5028
|
+
presenceStatusDurations: import_zod56.default.array(
|
5029
|
+
import_zod56.default.object({
|
5030
|
+
formattedDate: import_zod56.default.string(),
|
5031
|
+
date: import_zod56.default.date(),
|
5032
|
+
presenceStatusDurationLogs: import_zod56.default.array(
|
5033
|
+
import_zod56.default.object({
|
5034
|
+
presenceStatusId: import_zod56.default.string().uuid(),
|
5035
|
+
presenceStatusName: import_zod56.default.string(),
|
5036
|
+
durationSeconds: import_zod56.default.number().positive()
|
5037
|
+
})
|
5038
|
+
)
|
5039
|
+
})
|
5040
|
+
),
|
5041
|
+
page: import_zod56.default.coerce.number().positive(),
|
5042
|
+
pageSize: import_zod56.default.coerce.number().positive(),
|
5043
|
+
total: import_zod56.default.coerce.number().positive()
|
5044
|
+
})
|
5045
|
+
}
|
5046
|
+
},
|
5047
|
+
getUserCheckInLogsByUserId: {
|
5048
|
+
method: "GET",
|
5049
|
+
path: "/user-check-in-logs-by-user-id",
|
5050
|
+
query: import_zod56.default.object({
|
5051
|
+
automationQueueId: import_zod56.default.string().uuid().optional(),
|
5052
|
+
userId: import_zod56.default.string().uuid(),
|
5053
|
+
selectedDate: import_zod56.default.string().min(1),
|
5054
|
+
page: import_zod56.default.coerce.number().positive(),
|
5055
|
+
pageSize: import_zod56.default.coerce.number().positive()
|
5056
|
+
}),
|
5057
|
+
responses: {
|
5058
|
+
200: DefaultSuccessResponseSchema.extend({
|
5059
|
+
userCheckInLogs: import_zod56.default.array(
|
5060
|
+
import_zod56.default.object({
|
5061
|
+
formattedDate: import_zod56.default.string(),
|
5062
|
+
day: import_zod56.default.date(),
|
5063
|
+
userCheckInLog: UserCheckInLogSchema
|
5064
|
+
})
|
5065
|
+
),
|
5066
|
+
page: import_zod56.default.coerce.number().positive(),
|
5067
|
+
pageSize: import_zod56.default.coerce.number().positive(),
|
5068
|
+
total: import_zod56.default.coerce.number().positive()
|
5069
|
+
})
|
5070
|
+
}
|
5071
|
+
},
|
5072
|
+
exportUserCheckInLogsByUserId: {
|
5073
|
+
method: "GET",
|
5074
|
+
path: "/export-user-check-in-logs-by-user-id",
|
5075
|
+
query: import_zod56.default.object({
|
5076
|
+
userId: import_zod56.default.string().uuid(),
|
5077
|
+
selectedDate: import_zod56.default.string().min(1),
|
5078
|
+
fileExtension: ExportFileExtensionSchema
|
5079
|
+
}),
|
5080
|
+
responses: {
|
5081
|
+
200: DefaultSuccessResponseSchema
|
5082
|
+
}
|
4747
5083
|
}
|
4748
5084
|
},
|
4749
5085
|
{
|
@@ -4752,14 +5088,14 @@ var dashboardContract = (0, import_core13.initContract)().router(
|
|
4752
5088
|
);
|
4753
5089
|
|
4754
5090
|
// src/evaluate-form/index.ts
|
4755
|
-
var
|
5091
|
+
var import_zod58 = __toESM(require("zod"));
|
4756
5092
|
|
4757
5093
|
// src/evaluate-form/validation.ts
|
4758
|
-
var
|
4759
|
-
var CreateEvaluateFormSchema =
|
4760
|
-
cxLogId:
|
4761
|
-
sentimentScore:
|
4762
|
-
csatScore:
|
5094
|
+
var import_zod57 = __toESM(require("zod"));
|
5095
|
+
var CreateEvaluateFormSchema = import_zod57.default.object({
|
5096
|
+
cxLogId: import_zod57.default.string().uuid(),
|
5097
|
+
sentimentScore: import_zod57.default.string().nullable().optional(),
|
5098
|
+
csatScore: import_zod57.default.string().nullable().optional()
|
4763
5099
|
});
|
4764
5100
|
var UpdateEvaluateFormSchema = CreateEvaluateFormSchema.partial();
|
4765
5101
|
|
@@ -4773,7 +5109,7 @@ var evaluateFormContract = (0, import_core14.initContract)().router(
|
|
4773
5109
|
body: CreateEvaluateFormSchema,
|
4774
5110
|
responses: {
|
4775
5111
|
201: DefaultSuccessResponseSchema.extend({
|
4776
|
-
message:
|
5112
|
+
message: import_zod58.default.string()
|
4777
5113
|
}),
|
4778
5114
|
401: DefaultUnauthorizedSchema
|
4779
5115
|
},
|
@@ -4785,18 +5121,18 @@ var evaluateFormContract = (0, import_core14.initContract)().router(
|
|
4785
5121
|
|
4786
5122
|
// src/extension/index.ts
|
4787
5123
|
var import_core15 = require("@ts-rest/core");
|
4788
|
-
var
|
5124
|
+
var import_zod60 = __toESM(require("zod"));
|
4789
5125
|
|
4790
5126
|
// src/extension/validation.ts
|
4791
|
-
var
|
4792
|
-
var CreateExtensionSchema =
|
4793
|
-
userId:
|
4794
|
-
sipUserName:
|
4795
|
-
sipServerUrl:
|
4796
|
-
webphoneLoginUser:
|
4797
|
-
extensionId:
|
4798
|
-
extensionName:
|
4799
|
-
telephonySignature:
|
5127
|
+
var import_zod59 = require("zod");
|
5128
|
+
var CreateExtensionSchema = import_zod59.z.object({
|
5129
|
+
userId: import_zod59.z.string().nullable(),
|
5130
|
+
sipUserName: import_zod59.z.string(),
|
5131
|
+
sipServerUrl: import_zod59.z.string().optional(),
|
5132
|
+
webphoneLoginUser: import_zod59.z.string(),
|
5133
|
+
extensionId: import_zod59.z.string().nullable(),
|
5134
|
+
extensionName: import_zod59.z.string().nullable(),
|
5135
|
+
telephonySignature: import_zod59.z.string().nullable().optional()
|
4800
5136
|
});
|
4801
5137
|
var UpdateExtensionSchema = CreateExtensionSchema;
|
4802
5138
|
|
@@ -4812,8 +5148,8 @@ var extensionContract = (0, import_core15.initContract)().router(
|
|
4812
5148
|
201: DefaultSuccessResponseSchema.extend({
|
4813
5149
|
extension: ExtensionSchema
|
4814
5150
|
}),
|
4815
|
-
400:
|
4816
|
-
message:
|
5151
|
+
400: import_zod60.default.object({
|
5152
|
+
message: import_zod60.default.string()
|
4817
5153
|
}),
|
4818
5154
|
401: DefaultUnauthorizedSchema,
|
4819
5155
|
404: DefaultNotFoundSchema,
|
@@ -4825,33 +5161,33 @@ var extensionContract = (0, import_core15.initContract)().router(
|
|
4825
5161
|
getExtensions: {
|
4826
5162
|
method: "GET",
|
4827
5163
|
path: "",
|
4828
|
-
query:
|
4829
|
-
page:
|
4830
|
-
pageSize:
|
4831
|
-
keyword:
|
5164
|
+
query: import_zod60.default.object({
|
5165
|
+
page: import_zod60.default.coerce.number().default(1),
|
5166
|
+
pageSize: import_zod60.default.coerce.number().default(10),
|
5167
|
+
keyword: import_zod60.default.string().optional()
|
4832
5168
|
}).optional(),
|
4833
5169
|
headers: DefaultHeaderSchema,
|
4834
5170
|
responses: {
|
4835
5171
|
200: WithPagination(
|
4836
5172
|
// The response data should contain the user relation.
|
4837
5173
|
ExtensionSchema.extend({
|
4838
|
-
user:
|
4839
|
-
id:
|
4840
|
-
createdAt:
|
4841
|
-
updatedAt:
|
4842
|
-
deletedAt:
|
4843
|
-
name:
|
4844
|
-
email:
|
4845
|
-
emailVerifiedAt:
|
4846
|
-
password:
|
4847
|
-
address:
|
4848
|
-
phone:
|
4849
|
-
notificationCount:
|
5174
|
+
user: import_zod60.default.object({
|
5175
|
+
id: import_zod60.default.string().uuid(),
|
5176
|
+
createdAt: import_zod60.default.date(),
|
5177
|
+
updatedAt: import_zod60.default.date(),
|
5178
|
+
deletedAt: import_zod60.default.date().nullable(),
|
5179
|
+
name: import_zod60.default.string(),
|
5180
|
+
email: import_zod60.default.string().email(),
|
5181
|
+
emailVerifiedAt: import_zod60.default.date().nullable(),
|
5182
|
+
password: import_zod60.default.string(),
|
5183
|
+
address: import_zod60.default.string().nullable(),
|
5184
|
+
phone: import_zod60.default.string().nullable(),
|
5185
|
+
notificationCount: import_zod60.default.number().nullable()
|
4850
5186
|
})
|
4851
5187
|
})
|
4852
5188
|
),
|
4853
|
-
400:
|
4854
|
-
message:
|
5189
|
+
400: import_zod60.default.object({
|
5190
|
+
message: import_zod60.default.string()
|
4855
5191
|
}),
|
4856
5192
|
401: DefaultUnauthorizedSchema,
|
4857
5193
|
404: DefaultNotFoundSchema,
|
@@ -4863,12 +5199,12 @@ var extensionContract = (0, import_core15.initContract)().router(
|
|
4863
5199
|
getExtensionByUserId: {
|
4864
5200
|
method: "GET",
|
4865
5201
|
path: "/user/:userId",
|
4866
|
-
pathParams:
|
5202
|
+
pathParams: import_zod60.default.object({ userId: import_zod60.default.string() }),
|
4867
5203
|
headers: DefaultHeaderSchema,
|
4868
5204
|
responses: {
|
4869
5205
|
200: ExtensionSchema,
|
4870
|
-
400:
|
4871
|
-
message:
|
5206
|
+
400: import_zod60.default.object({
|
5207
|
+
message: import_zod60.default.string()
|
4872
5208
|
}),
|
4873
5209
|
401: DefaultUnauthorizedSchema,
|
4874
5210
|
404: DefaultNotFoundSchema,
|
@@ -4880,16 +5216,16 @@ var extensionContract = (0, import_core15.initContract)().router(
|
|
4880
5216
|
getExtensionByDialpad: {
|
4881
5217
|
method: "GET",
|
4882
5218
|
path: "/dialpad",
|
4883
|
-
query:
|
4884
|
-
page:
|
4885
|
-
pageSize:
|
4886
|
-
keyword:
|
5219
|
+
query: import_zod60.default.object({
|
5220
|
+
page: import_zod60.default.coerce.number().default(1),
|
5221
|
+
pageSize: import_zod60.default.coerce.number().default(10),
|
5222
|
+
keyword: import_zod60.default.string().optional()
|
4887
5223
|
}).optional(),
|
4888
5224
|
headers: DefaultHeaderSchema,
|
4889
5225
|
responses: {
|
4890
5226
|
200: WithPagination(ExtensionSchema),
|
4891
|
-
400:
|
4892
|
-
message:
|
5227
|
+
400: import_zod60.default.object({
|
5228
|
+
message: import_zod60.default.string()
|
4893
5229
|
}),
|
4894
5230
|
401: DefaultUnauthorizedSchema,
|
4895
5231
|
404: DefaultNotFoundSchema,
|
@@ -4901,15 +5237,15 @@ var extensionContract = (0, import_core15.initContract)().router(
|
|
4901
5237
|
updateExtension: {
|
4902
5238
|
method: "PATCH",
|
4903
5239
|
path: "/:id",
|
4904
|
-
pathParams:
|
5240
|
+
pathParams: import_zod60.default.object({ id: import_zod60.default.string() }),
|
4905
5241
|
headers: DefaultHeaderSchema,
|
4906
5242
|
body: UpdateExtensionSchema,
|
4907
5243
|
responses: {
|
4908
5244
|
200: DefaultSuccessResponseSchema.extend({
|
4909
5245
|
extension: ExtensionSchema
|
4910
5246
|
}),
|
4911
|
-
400:
|
4912
|
-
message:
|
5247
|
+
400: import_zod60.default.object({
|
5248
|
+
message: import_zod60.default.string()
|
4913
5249
|
}),
|
4914
5250
|
401: DefaultUnauthorizedSchema,
|
4915
5251
|
404: DefaultNotFoundSchema,
|
@@ -4921,13 +5257,13 @@ var extensionContract = (0, import_core15.initContract)().router(
|
|
4921
5257
|
deleteExtension: {
|
4922
5258
|
method: "DELETE",
|
4923
5259
|
path: "/:id",
|
4924
|
-
pathParams:
|
5260
|
+
pathParams: import_zod60.default.object({ id: import_zod60.default.string() }),
|
4925
5261
|
headers: DefaultHeaderSchema,
|
4926
5262
|
body: null,
|
4927
5263
|
responses: {
|
4928
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
4929
|
-
400:
|
4930
|
-
message:
|
5264
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod60.default.string() }),
|
5265
|
+
400: import_zod60.default.object({
|
5266
|
+
message: import_zod60.default.string()
|
4931
5267
|
}),
|
4932
5268
|
401: DefaultUnauthorizedSchema,
|
4933
5269
|
404: DefaultNotFoundSchema,
|
@@ -4943,10 +5279,10 @@ var extensionContract = (0, import_core15.initContract)().router(
|
|
4943
5279
|
body: null,
|
4944
5280
|
responses: {
|
4945
5281
|
200: DefaultSuccessResponseSchema.extend({
|
4946
|
-
message:
|
5282
|
+
message: import_zod60.default.string()
|
4947
5283
|
}),
|
4948
|
-
400:
|
4949
|
-
message:
|
5284
|
+
400: import_zod60.default.object({
|
5285
|
+
message: import_zod60.default.string()
|
4950
5286
|
}),
|
4951
5287
|
401: DefaultUnauthorizedSchema,
|
4952
5288
|
404: DefaultNotFoundSchema,
|
@@ -4961,7 +5297,7 @@ var extensionContract = (0, import_core15.initContract)().router(
|
|
4961
5297
|
|
4962
5298
|
// src/instagram/index.ts
|
4963
5299
|
var import_core16 = require("@ts-rest/core");
|
4964
|
-
var
|
5300
|
+
var import_zod61 = __toESM(require("zod"));
|
4965
5301
|
var instagramContract = (0, import_core16.initContract)().router({
|
4966
5302
|
sendMessage: {
|
4967
5303
|
method: "POST",
|
@@ -4995,8 +5331,8 @@ var instagramContract = (0, import_core16.initContract)().router({
|
|
4995
5331
|
reconnect: {
|
4996
5332
|
method: "POST",
|
4997
5333
|
path: "/reconnect/:channelId",
|
4998
|
-
pathParams:
|
4999
|
-
channelId:
|
5334
|
+
pathParams: import_zod61.default.object({
|
5335
|
+
channelId: import_zod61.default.string().uuid()
|
5000
5336
|
}),
|
5001
5337
|
body: null,
|
5002
5338
|
responses: {
|
@@ -5008,8 +5344,8 @@ var instagramContract = (0, import_core16.initContract)().router({
|
|
5008
5344
|
delete: {
|
5009
5345
|
method: "DELETE",
|
5010
5346
|
path: "/delete/:channelId",
|
5011
|
-
pathParams:
|
5012
|
-
channelId:
|
5347
|
+
pathParams: import_zod61.default.object({
|
5348
|
+
channelId: import_zod61.default.string().uuid()
|
5013
5349
|
}),
|
5014
5350
|
body: null,
|
5015
5351
|
responses: {
|
@@ -5050,84 +5386,84 @@ var instagramContract = (0, import_core16.initContract)().router({
|
|
5050
5386
|
|
5051
5387
|
// src/line/index.ts
|
5052
5388
|
var import_core17 = require("@ts-rest/core");
|
5053
|
-
var
|
5389
|
+
var import_zod64 = __toESM(require("zod"));
|
5054
5390
|
|
5055
5391
|
// src/line/schema.ts
|
5056
|
-
var
|
5392
|
+
var import_zod62 = __toESM(require("zod"));
|
5057
5393
|
var ConnectLineService = ConnectLineChannelSchema.extend({
|
5058
|
-
actor:
|
5059
|
-
id:
|
5060
|
-
name:
|
5061
|
-
email:
|
5062
|
-
address:
|
5063
|
-
phone:
|
5394
|
+
actor: import_zod62.default.object({
|
5395
|
+
id: import_zod62.default.string().uuid(),
|
5396
|
+
name: import_zod62.default.string(),
|
5397
|
+
email: import_zod62.default.string().email(),
|
5398
|
+
address: import_zod62.default.string().nullable(),
|
5399
|
+
phone: import_zod62.default.string().nullable()
|
5064
5400
|
}).optional()
|
5065
5401
|
});
|
5066
5402
|
|
5067
5403
|
// src/line/validation.ts
|
5068
|
-
var
|
5069
|
-
var SendLineStickerSchema =
|
5070
|
-
packageId:
|
5071
|
-
stickerId:
|
5072
|
-
room:
|
5073
|
-
id:
|
5074
|
-
lastMessage:
|
5075
|
-
handleTime:
|
5076
|
-
isLatest:
|
5404
|
+
var import_zod63 = __toESM(require("zod"));
|
5405
|
+
var SendLineStickerSchema = import_zod63.default.object({
|
5406
|
+
packageId: import_zod63.default.number(),
|
5407
|
+
stickerId: import_zod63.default.number(),
|
5408
|
+
room: import_zod63.default.object({
|
5409
|
+
id: import_zod63.default.string().uuid(),
|
5410
|
+
lastMessage: import_zod63.default.string().optional(),
|
5411
|
+
handleTime: import_zod63.default.number().optional(),
|
5412
|
+
isLatest: import_zod63.default.boolean(),
|
5077
5413
|
direction: MessageDirectionTypeSchema,
|
5078
|
-
platformContact:
|
5079
|
-
channelId:
|
5080
|
-
socialPlatformId:
|
5414
|
+
platformContact: import_zod63.default.object({
|
5415
|
+
channelId: import_zod63.default.string().uuid(),
|
5416
|
+
socialPlatformId: import_zod63.default.string().nullable(),
|
5081
5417
|
type: ChannelTypeSchema,
|
5082
5418
|
metadata: PlatformContactMetadataSchema,
|
5083
|
-
contact:
|
5084
|
-
name:
|
5085
|
-
address:
|
5086
|
-
channel:
|
5087
|
-
notes:
|
5088
|
-
contactProfile:
|
5089
|
-
socialProfileUrl:
|
5419
|
+
contact: import_zod63.default.object({
|
5420
|
+
name: import_zod63.default.string(),
|
5421
|
+
address: import_zod63.default.string().nullable(),
|
5422
|
+
channel: import_zod63.default.string().nullable(),
|
5423
|
+
notes: import_zod63.default.string().nullable(),
|
5424
|
+
contactProfile: import_zod63.default.string().nullable(),
|
5425
|
+
socialProfileUrl: import_zod63.default.string().nullable()
|
5090
5426
|
})
|
5091
5427
|
}),
|
5092
|
-
actor:
|
5093
|
-
name:
|
5094
|
-
email:
|
5095
|
-
address:
|
5096
|
-
phone:
|
5428
|
+
actor: import_zod63.default.object({
|
5429
|
+
name: import_zod63.default.string(),
|
5430
|
+
email: import_zod63.default.string().email(),
|
5431
|
+
address: import_zod63.default.string().nullable(),
|
5432
|
+
phone: import_zod63.default.string().nullable()
|
5097
5433
|
}).nullable(),
|
5098
5434
|
channel: ChannelSchema2
|
5099
5435
|
}),
|
5100
|
-
message:
|
5101
|
-
message:
|
5436
|
+
message: import_zod63.default.object({
|
5437
|
+
message: import_zod63.default.string().optional(),
|
5102
5438
|
direction: MessageDirectionTypeSchema,
|
5103
5439
|
type: MessageTypeSchema,
|
5104
|
-
readAt:
|
5105
|
-
metadata:
|
5106
|
-
platformId:
|
5107
|
-
platformMessageId:
|
5108
|
-
replyPlatformMessageId:
|
5109
|
-
template:
|
5440
|
+
readAt: import_zod63.default.date().optional(),
|
5441
|
+
metadata: import_zod63.default.any().optional(),
|
5442
|
+
platformId: import_zod63.default.string().optional(),
|
5443
|
+
platformMessageId: import_zod63.default.string().optional(),
|
5444
|
+
replyPlatformMessageId: import_zod63.default.string().optional(),
|
5445
|
+
template: import_zod63.default.any().optional(),
|
5110
5446
|
locale: MessageLocaleTypeSchema.optional(),
|
5111
|
-
url:
|
5112
|
-
previewUrl:
|
5113
|
-
imageSetId:
|
5114
|
-
upload:
|
5115
|
-
bucketName:
|
5116
|
-
fileName:
|
5117
|
-
fileSize:
|
5118
|
-
fileKey:
|
5447
|
+
url: import_zod63.default.string().optional(),
|
5448
|
+
previewUrl: import_zod63.default.string().optional(),
|
5449
|
+
imageSetId: import_zod63.default.string().optional(),
|
5450
|
+
upload: import_zod63.default.object({
|
5451
|
+
bucketName: import_zod63.default.string(),
|
5452
|
+
fileName: import_zod63.default.string(),
|
5453
|
+
fileSize: import_zod63.default.number(),
|
5454
|
+
fileKey: import_zod63.default.string()
|
5119
5455
|
}).optional(),
|
5120
|
-
sender:
|
5121
|
-
name:
|
5122
|
-
email:
|
5123
|
-
address:
|
5124
|
-
phone:
|
5456
|
+
sender: import_zod63.default.object({
|
5457
|
+
name: import_zod63.default.string(),
|
5458
|
+
email: import_zod63.default.string().email(),
|
5459
|
+
address: import_zod63.default.string().nullable(),
|
5460
|
+
phone: import_zod63.default.string().nullable()
|
5125
5461
|
})
|
5126
5462
|
})
|
5127
5463
|
});
|
5128
|
-
var createUserLevelRichMenuSchema =
|
5129
|
-
linePlatformUserId:
|
5130
|
-
channelId:
|
5464
|
+
var createUserLevelRichMenuSchema = import_zod63.default.object({
|
5465
|
+
linePlatformUserId: import_zod63.default.string(),
|
5466
|
+
channelId: import_zod63.default.string()
|
5131
5467
|
});
|
5132
5468
|
|
5133
5469
|
// src/line/index.ts
|
@@ -5137,7 +5473,7 @@ var lineContract = (0, import_core17.initContract)().router({
|
|
5137
5473
|
path: "sticker",
|
5138
5474
|
responses: {
|
5139
5475
|
200: DefaultSuccessResponseSchema.extend({
|
5140
|
-
data:
|
5476
|
+
data: import_zod64.default.any()
|
5141
5477
|
}),
|
5142
5478
|
500: DefaultErrorResponseSchema
|
5143
5479
|
},
|
@@ -5160,7 +5496,7 @@ var lineContract = (0, import_core17.initContract)().router({
|
|
5160
5496
|
path: "/message",
|
5161
5497
|
body: SendMessageToPlatformSchema,
|
5162
5498
|
responses: {
|
5163
|
-
200:
|
5499
|
+
200: import_zod64.default.union([SendMessageResponseSchema, import_zod64.default.literal("TALK TO AGENT")]),
|
5164
5500
|
500: DefaultErrorResponseSchema
|
5165
5501
|
}
|
5166
5502
|
},
|
@@ -5177,8 +5513,8 @@ var lineContract = (0, import_core17.initContract)().router({
|
|
5177
5513
|
reconnect: {
|
5178
5514
|
method: "POST",
|
5179
5515
|
path: "/reconnect/:channelId",
|
5180
|
-
pathParams:
|
5181
|
-
channelId:
|
5516
|
+
pathParams: import_zod64.default.object({
|
5517
|
+
channelId: import_zod64.default.string().uuid()
|
5182
5518
|
}),
|
5183
5519
|
body: null,
|
5184
5520
|
responses: {
|
@@ -5190,8 +5526,8 @@ var lineContract = (0, import_core17.initContract)().router({
|
|
5190
5526
|
delete: {
|
5191
5527
|
method: "DELETE",
|
5192
5528
|
path: "/delete/:channelId",
|
5193
|
-
pathParams:
|
5194
|
-
channelId:
|
5529
|
+
pathParams: import_zod64.default.object({
|
5530
|
+
channelId: import_zod64.default.string().uuid()
|
5195
5531
|
}),
|
5196
5532
|
body: null,
|
5197
5533
|
responses: {
|
@@ -5213,7 +5549,7 @@ var lineContract = (0, import_core17.initContract)().router({
|
|
5213
5549
|
|
5214
5550
|
// src/mail/email-engine-webhooks-events.contract.ts
|
5215
5551
|
var import_core18 = require("@ts-rest/core");
|
5216
|
-
var
|
5552
|
+
var import_zod65 = __toESM(require("zod"));
|
5217
5553
|
var emailEngineWebhooksEventsContract = (0, import_core18.initContract)().router(
|
5218
5554
|
{
|
5219
5555
|
handleWebhooksEvents: {
|
@@ -5222,7 +5558,7 @@ var emailEngineWebhooksEventsContract = (0, import_core18.initContract)().router
|
|
5222
5558
|
// we don't need to respone anything but added responses just for solving type error
|
5223
5559
|
responses: {
|
5224
5560
|
200: DefaultSuccessResponseSchema.extend({
|
5225
|
-
message:
|
5561
|
+
message: import_zod65.default.string()
|
5226
5562
|
})
|
5227
5563
|
},
|
5228
5564
|
body: null,
|
@@ -5234,7 +5570,7 @@ var emailEngineWebhooksEventsContract = (0, import_core18.initContract)().router
|
|
5234
5570
|
|
5235
5571
|
// src/messenger/index.ts
|
5236
5572
|
var import_core19 = require("@ts-rest/core");
|
5237
|
-
var
|
5573
|
+
var import_zod66 = __toESM(require("zod"));
|
5238
5574
|
var messengerContract = (0, import_core19.initContract)().router({
|
5239
5575
|
sendMessage: {
|
5240
5576
|
method: "POST",
|
@@ -5269,8 +5605,8 @@ var messengerContract = (0, import_core19.initContract)().router({
|
|
5269
5605
|
reconnect: {
|
5270
5606
|
method: "POST",
|
5271
5607
|
path: "/reconnect/:channelId",
|
5272
|
-
pathParams:
|
5273
|
-
channelId:
|
5608
|
+
pathParams: import_zod66.default.object({
|
5609
|
+
channelId: import_zod66.default.string().uuid()
|
5274
5610
|
}),
|
5275
5611
|
body: null,
|
5276
5612
|
responses: {
|
@@ -5282,8 +5618,8 @@ var messengerContract = (0, import_core19.initContract)().router({
|
|
5282
5618
|
delete: {
|
5283
5619
|
method: "DELETE",
|
5284
5620
|
path: "/delete/:channelId",
|
5285
|
-
pathParams:
|
5286
|
-
channelId:
|
5621
|
+
pathParams: import_zod66.default.object({
|
5622
|
+
channelId: import_zod66.default.string().uuid()
|
5287
5623
|
}),
|
5288
5624
|
body: null,
|
5289
5625
|
responses: {
|
@@ -5314,9 +5650,9 @@ var messengerContract = (0, import_core19.initContract)().router({
|
|
5314
5650
|
getFacebookBusinesses: {
|
5315
5651
|
method: "GET",
|
5316
5652
|
path: "/facebook-businesses",
|
5317
|
-
query:
|
5318
|
-
userId:
|
5319
|
-
userAccessToken:
|
5653
|
+
query: import_zod66.default.object({
|
5654
|
+
userId: import_zod66.default.string(),
|
5655
|
+
userAccessToken: import_zod66.default.string()
|
5320
5656
|
}),
|
5321
5657
|
responses: {
|
5322
5658
|
200: DefaultSuccessResponseSchema,
|
@@ -5326,9 +5662,9 @@ var messengerContract = (0, import_core19.initContract)().router({
|
|
5326
5662
|
getFacebookBusinessPages: {
|
5327
5663
|
method: "GET",
|
5328
5664
|
path: "/facebook-business-pages",
|
5329
|
-
query:
|
5330
|
-
businessId:
|
5331
|
-
userAccessToken:
|
5665
|
+
query: import_zod66.default.object({
|
5666
|
+
businessId: import_zod66.default.string(),
|
5667
|
+
userAccessToken: import_zod66.default.string()
|
5332
5668
|
}),
|
5333
5669
|
responses: {
|
5334
5670
|
200: DefaultSuccessResponseSchema,
|
@@ -5348,7 +5684,7 @@ var messengerContract = (0, import_core19.initContract)().router({
|
|
5348
5684
|
|
5349
5685
|
// src/permission/index.ts
|
5350
5686
|
var import_core20 = require("@ts-rest/core");
|
5351
|
-
var
|
5687
|
+
var import_zod67 = __toESM(require("zod"));
|
5352
5688
|
var permissionContract = (0, import_core20.initContract)().router(
|
5353
5689
|
{
|
5354
5690
|
getPermissions: {
|
@@ -5356,9 +5692,9 @@ var permissionContract = (0, import_core20.initContract)().router(
|
|
5356
5692
|
path: "",
|
5357
5693
|
headers: DefaultHeaderSchema,
|
5358
5694
|
responses: {
|
5359
|
-
200:
|
5360
|
-
400:
|
5361
|
-
message:
|
5695
|
+
200: import_zod67.default.object({ permissions: PermissionSchema.array() }),
|
5696
|
+
400: import_zod67.default.object({
|
5697
|
+
message: import_zod67.default.string()
|
5362
5698
|
}),
|
5363
5699
|
401: DefaultUnauthorizedSchema,
|
5364
5700
|
500: DefaultErrorResponseSchema
|
@@ -5371,15 +5707,15 @@ var permissionContract = (0, import_core20.initContract)().router(
|
|
5371
5707
|
|
5372
5708
|
// src/role/index.ts
|
5373
5709
|
var import_core21 = require("@ts-rest/core");
|
5374
|
-
var
|
5710
|
+
var import_zod69 = __toESM(require("zod"));
|
5375
5711
|
|
5376
5712
|
// src/role/validation.ts
|
5377
|
-
var
|
5378
|
-
var CreateRoleSchema =
|
5379
|
-
systemName:
|
5380
|
-
displayName:
|
5381
|
-
description:
|
5382
|
-
permissions:
|
5713
|
+
var import_zod68 = require("zod");
|
5714
|
+
var CreateRoleSchema = import_zod68.z.object({
|
5715
|
+
systemName: import_zod68.z.string(),
|
5716
|
+
displayName: import_zod68.z.string(),
|
5717
|
+
description: import_zod68.z.string().nullable(),
|
5718
|
+
permissions: import_zod68.z.array(import_zod68.z.string())
|
5383
5719
|
});
|
5384
5720
|
var UpdateRoleSchema = CreateRoleSchema;
|
5385
5721
|
|
@@ -5395,8 +5731,8 @@ var roleContract = (0, import_core21.initContract)().router(
|
|
5395
5731
|
201: DefaultSuccessResponseSchema.extend({
|
5396
5732
|
role: RoleSchema
|
5397
5733
|
}),
|
5398
|
-
400:
|
5399
|
-
message:
|
5734
|
+
400: import_zod69.default.object({
|
5735
|
+
message: import_zod69.default.string()
|
5400
5736
|
}),
|
5401
5737
|
401: DefaultUnauthorizedSchema,
|
5402
5738
|
500: DefaultErrorResponseSchema
|
@@ -5406,17 +5742,17 @@ var roleContract = (0, import_core21.initContract)().router(
|
|
5406
5742
|
getRoles: {
|
5407
5743
|
method: "GET",
|
5408
5744
|
path: "",
|
5409
|
-
query:
|
5410
|
-
page:
|
5411
|
-
pageSize:
|
5745
|
+
query: import_zod69.default.object({
|
5746
|
+
page: import_zod69.default.coerce.number().default(1),
|
5747
|
+
pageSize: import_zod69.default.coerce.number().default(10)
|
5412
5748
|
}).optional(),
|
5413
5749
|
headers: DefaultHeaderSchema,
|
5414
5750
|
responses: {
|
5415
5751
|
200: WithPagination(RoleSchema).extend({
|
5416
5752
|
roleUserCount: RoleUserCountSchema
|
5417
5753
|
}),
|
5418
|
-
400:
|
5419
|
-
message:
|
5754
|
+
400: import_zod69.default.object({
|
5755
|
+
message: import_zod69.default.string()
|
5420
5756
|
}),
|
5421
5757
|
401: DefaultUnauthorizedSchema,
|
5422
5758
|
500: DefaultErrorResponseSchema
|
@@ -5426,15 +5762,15 @@ var roleContract = (0, import_core21.initContract)().router(
|
|
5426
5762
|
updateRole: {
|
5427
5763
|
method: "PATCH",
|
5428
5764
|
path: "/:id",
|
5429
|
-
pathParams:
|
5765
|
+
pathParams: import_zod69.default.object({ id: import_zod69.default.string() }),
|
5430
5766
|
headers: DefaultHeaderSchema,
|
5431
5767
|
body: UpdateRoleSchema,
|
5432
5768
|
responses: {
|
5433
5769
|
201: DefaultSuccessResponseSchema.extend({
|
5434
5770
|
role: RoleSchema
|
5435
5771
|
}),
|
5436
|
-
400:
|
5437
|
-
message:
|
5772
|
+
400: import_zod69.default.object({
|
5773
|
+
message: import_zod69.default.string()
|
5438
5774
|
}),
|
5439
5775
|
401: DefaultUnauthorizedSchema,
|
5440
5776
|
500: DefaultErrorResponseSchema
|
@@ -5444,11 +5780,11 @@ var roleContract = (0, import_core21.initContract)().router(
|
|
5444
5780
|
deleteRole: {
|
5445
5781
|
method: "DELETE",
|
5446
5782
|
path: "/:id",
|
5447
|
-
pathParams:
|
5783
|
+
pathParams: import_zod69.default.object({ id: import_zod69.default.string() }),
|
5448
5784
|
headers: DefaultHeaderSchema,
|
5449
5785
|
body: null,
|
5450
5786
|
responses: {
|
5451
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5787
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod69.default.string() }),
|
5452
5788
|
500: DefaultErrorResponseSchema
|
5453
5789
|
},
|
5454
5790
|
summary: "Delete a role."
|
@@ -5456,12 +5792,12 @@ var roleContract = (0, import_core21.initContract)().router(
|
|
5456
5792
|
getRoleById: {
|
5457
5793
|
method: "GET",
|
5458
5794
|
path: "/:id",
|
5459
|
-
pathParams:
|
5795
|
+
pathParams: import_zod69.default.object({ id: import_zod69.default.string() }),
|
5460
5796
|
headers: DefaultHeaderSchema,
|
5461
5797
|
responses: {
|
5462
5798
|
200: RoleSchema,
|
5463
|
-
400:
|
5464
|
-
message:
|
5799
|
+
400: import_zod69.default.object({
|
5800
|
+
message: import_zod69.default.string()
|
5465
5801
|
}),
|
5466
5802
|
401: DefaultUnauthorizedSchema,
|
5467
5803
|
500: DefaultErrorResponseSchema
|
@@ -5474,19 +5810,19 @@ var roleContract = (0, import_core21.initContract)().router(
|
|
5474
5810
|
|
5475
5811
|
// src/tag/index.ts
|
5476
5812
|
var import_core22 = require("@ts-rest/core");
|
5477
|
-
var
|
5813
|
+
var import_zod71 = __toESM(require("zod"));
|
5478
5814
|
|
5479
5815
|
// src/tag/validation.ts
|
5480
|
-
var
|
5481
|
-
var CreateTagSchema =
|
5482
|
-
name:
|
5816
|
+
var import_zod70 = require("zod");
|
5817
|
+
var CreateTagSchema = import_zod70.z.object({
|
5818
|
+
name: import_zod70.z.string(),
|
5483
5819
|
group: TagGroupSchema
|
5484
5820
|
});
|
5485
|
-
var GetTagsSchema =
|
5821
|
+
var GetTagsSchema = import_zod70.z.object({
|
5486
5822
|
group: TagGroupSchema.default("general"),
|
5487
|
-
keyword:
|
5823
|
+
keyword: import_zod70.z.string()
|
5488
5824
|
}).partial().optional();
|
5489
|
-
var UpdateTagSchema =
|
5825
|
+
var UpdateTagSchema = import_zod70.z.object({ name: import_zod70.z.string() });
|
5490
5826
|
|
5491
5827
|
// src/tag/index.ts
|
5492
5828
|
var tagContract = (0, import_core22.initContract)().router(
|
@@ -5509,7 +5845,7 @@ var tagContract = (0, import_core22.initContract)().router(
|
|
5509
5845
|
query: GetTagsSchema,
|
5510
5846
|
responses: {
|
5511
5847
|
200: DefaultSuccessResponseSchema.extend({
|
5512
|
-
tags:
|
5848
|
+
tags: import_zod71.default.array(TagSchema)
|
5513
5849
|
}),
|
5514
5850
|
500: DefaultErrorResponseSchema
|
5515
5851
|
},
|
@@ -5518,7 +5854,7 @@ var tagContract = (0, import_core22.initContract)().router(
|
|
5518
5854
|
updateTag: {
|
5519
5855
|
method: "PATCH",
|
5520
5856
|
path: "/:id",
|
5521
|
-
pathParams:
|
5857
|
+
pathParams: import_zod71.default.object({ id: import_zod71.default.string() }),
|
5522
5858
|
body: UpdateTagSchema,
|
5523
5859
|
responses: {
|
5524
5860
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -5531,11 +5867,11 @@ var tagContract = (0, import_core22.initContract)().router(
|
|
5531
5867
|
deleteTag: {
|
5532
5868
|
method: "DELETE",
|
5533
5869
|
path: "/:id",
|
5534
|
-
pathParams:
|
5535
|
-
body:
|
5870
|
+
pathParams: import_zod71.default.object({ id: import_zod71.default.string() }),
|
5871
|
+
body: import_zod71.default.any().optional(),
|
5536
5872
|
// We don't need the body.
|
5537
5873
|
responses: {
|
5538
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
5874
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod71.default.string() }),
|
5539
5875
|
500: DefaultErrorResponseSchema
|
5540
5876
|
},
|
5541
5877
|
headers: DefaultHeaderSchema
|
@@ -5550,31 +5886,31 @@ var tagContract = (0, import_core22.initContract)().router(
|
|
5550
5886
|
var import_core23 = require("@ts-rest/core");
|
5551
5887
|
var import_zod74 = __toESM(require("zod"));
|
5552
5888
|
|
5553
|
-
// src/telephony-agent-presence-status/schema.ts
|
5554
|
-
var import_zod72 = __toESM(require("zod"));
|
5555
|
-
|
5556
5889
|
// src/presence-status/schema.ts
|
5557
|
-
var
|
5558
|
-
var
|
5559
|
-
|
5560
|
-
|
5561
|
-
|
5890
|
+
var import_zod72 = __toESM(require("zod"));
|
5891
|
+
var TPresenceStatusOption = import_zod72.default.union([
|
5892
|
+
import_zod72.default.literal("receive_call"),
|
5893
|
+
import_zod72.default.literal("do_not_receive_call"),
|
5894
|
+
import_zod72.default.literal("receive_chat_message"),
|
5895
|
+
import_zod72.default.literal("do_not_receive_chat_message")
|
5562
5896
|
]);
|
5563
|
-
var PresenceStatusSchema =
|
5564
|
-
id:
|
5565
|
-
createdAt:
|
5566
|
-
updatedAt:
|
5567
|
-
deletedAt:
|
5568
|
-
|
5569
|
-
|
5570
|
-
|
5897
|
+
var PresenceStatusSchema = import_zod72.default.object({
|
5898
|
+
id: import_zod72.default.string().uuid(),
|
5899
|
+
createdAt: import_zod72.default.date(),
|
5900
|
+
updatedAt: import_zod72.default.date(),
|
5901
|
+
deletedAt: import_zod72.default.date().nullable(),
|
5902
|
+
systemName: import_zod72.default.string(),
|
5903
|
+
displayName: import_zod72.default.string(),
|
5904
|
+
description: import_zod72.default.string().nullable(),
|
5905
|
+
position: import_zod72.default.number(),
|
5906
|
+
emoji: import_zod72.default.string().nullable(),
|
5907
|
+
presenceStatusOption: import_zod72.default.array(TPresenceStatusOption)
|
5571
5908
|
});
|
5572
5909
|
|
5573
5910
|
// src/telephony-agent-presence-status/schema.ts
|
5574
5911
|
var UserPresenceStatusSchema = DefaultEntitySchema.extend({
|
5575
5912
|
user: UserSchema,
|
5576
|
-
presenceStatus: PresenceStatusSchema
|
5577
|
-
customPresenceStatus: import_zod72.default.string().nullable().optional()
|
5913
|
+
presenceStatus: PresenceStatusSchema
|
5578
5914
|
});
|
5579
5915
|
|
5580
5916
|
// src/telephony-agent-presence-status/validation.ts
|
@@ -5582,27 +5918,12 @@ var import_zod73 = require("zod");
|
|
5582
5918
|
var UpdateUserStatusSchema = import_zod73.z.object({
|
5583
5919
|
userId: import_zod73.z.string(),
|
5584
5920
|
presenceStatusId: import_zod73.z.string().nullable().optional(),
|
5585
|
-
customPreseneStatus: import_zod73.z.string().nullable().optional(),
|
5586
5921
|
reason: import_zod73.z.string()
|
5587
5922
|
});
|
5588
5923
|
|
5589
5924
|
// src/telephony-agent-presence-status/index.ts
|
5590
5925
|
var telephonyAgentPresenceStatusContract = (0, import_core23.initContract)().router(
|
5591
5926
|
{
|
5592
|
-
getAllAgentStatus: {
|
5593
|
-
method: "GET",
|
5594
|
-
path: "/agents/presence_status",
|
5595
|
-
headers: DefaultHeaderSchema,
|
5596
|
-
responses: {
|
5597
|
-
200: import_zod74.default.array(UserPresenceStatusSchema),
|
5598
|
-
400: import_zod74.default.object({
|
5599
|
-
message: import_zod74.default.string()
|
5600
|
-
}),
|
5601
|
-
401: DefaultUnauthorizedSchema,
|
5602
|
-
500: DefaultErrorResponseSchema
|
5603
|
-
},
|
5604
|
-
summary: "Get all user presence status list."
|
5605
|
-
},
|
5606
5927
|
getAgentStatus: {
|
5607
5928
|
method: "GET",
|
5608
5929
|
path: "/presence_status/check_update/:userId",
|
@@ -8464,7 +8785,7 @@ var botpressContract = (0, import_core40.initContract)().router(
|
|
8464
8785
|
body: SendBotpressMessageSchema
|
8465
8786
|
}
|
8466
8787
|
},
|
8467
|
-
{ pathPrefix: "
|
8788
|
+
{ pathPrefix: "bots" }
|
8468
8789
|
);
|
8469
8790
|
var botContract = (0, import_core40.initContract)().router(
|
8470
8791
|
{
|
@@ -8493,7 +8814,7 @@ var botContract = (0, import_core40.initContract)().router(
|
|
8493
8814
|
}
|
8494
8815
|
},
|
8495
8816
|
{
|
8496
|
-
pathPrefix: "bots"
|
8817
|
+
pathPrefix: "ms/bots"
|
8497
8818
|
}
|
8498
8819
|
);
|
8499
8820
|
|
@@ -8504,9 +8825,12 @@ var import_zod113 = __toESM(require("zod"));
|
|
8504
8825
|
// src/presence-status/validation.ts
|
8505
8826
|
var import_zod112 = require("zod");
|
8506
8827
|
var CreatePresenceStatusSchema = import_zod112.z.object({
|
8507
|
-
|
8508
|
-
|
8509
|
-
|
8828
|
+
systemName: import_zod112.z.string(),
|
8829
|
+
displayName: import_zod112.z.string(),
|
8830
|
+
description: import_zod112.z.string().optional(),
|
8831
|
+
position: import_zod112.z.number(),
|
8832
|
+
emoji: import_zod112.z.string(),
|
8833
|
+
presenceStatusOption: import_zod112.z.array(TPresenceStatusOption)
|
8510
8834
|
});
|
8511
8835
|
var UpdatePresenceStatusSchema = CreatePresenceStatusSchema;
|
8512
8836
|
|
@@ -9026,7 +9350,8 @@ var automationQueueContract = (0, import_core45.initContract)().router(
|
|
9026
9350
|
method: "GET",
|
9027
9351
|
path: "",
|
9028
9352
|
query: import_zod118.z.object({
|
9029
|
-
userId: import_zod118.z.string().uuid().optional()
|
9353
|
+
userId: import_zod118.z.string().uuid().optional(),
|
9354
|
+
withRelations: import_zod118.z.coerce.boolean().default(true).optional()
|
9030
9355
|
}).optional(),
|
9031
9356
|
responses: {
|
9032
9357
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -10515,6 +10840,32 @@ var settingCxIntelligenceContract = (0, import_core54.initContract)().router(
|
|
10515
10840
|
},
|
10516
10841
|
{ pathPrefix: "settings/cx-intelligence" }
|
10517
10842
|
);
|
10843
|
+
|
10844
|
+
// src/export/index.ts
|
10845
|
+
var import_core55 = require("@ts-rest/core");
|
10846
|
+
var import_zod139 = __toESM(require("zod"));
|
10847
|
+
var exportContract = (0, import_core55.initContract)().router(
|
10848
|
+
{
|
10849
|
+
notifyExport: {
|
10850
|
+
method: "POST",
|
10851
|
+
path: "notify",
|
10852
|
+
body: import_zod139.default.object({
|
10853
|
+
userId: import_zod139.default.string().uuid(),
|
10854
|
+
module: import_zod139.default.string(),
|
10855
|
+
fileUrl: import_zod139.default.string()
|
10856
|
+
}),
|
10857
|
+
responses: {
|
10858
|
+
200: DefaultSuccessResponseSchema.extend({
|
10859
|
+
success: import_zod139.default.boolean()
|
10860
|
+
}),
|
10861
|
+
500: DefaultErrorResponseSchema
|
10862
|
+
}
|
10863
|
+
}
|
10864
|
+
},
|
10865
|
+
{
|
10866
|
+
pathPrefix: "export/"
|
10867
|
+
}
|
10868
|
+
);
|
10518
10869
|
// Annotate the CommonJS export names for ESM import in node:
|
10519
10870
|
0 && (module.exports = {
|
10520
10871
|
activityLogContract,
|
@@ -10544,6 +10895,7 @@ var settingCxIntelligenceContract = (0, import_core54.initContract)().router(
|
|
10544
10895
|
cxLogContract,
|
10545
10896
|
dashboardContract,
|
10546
10897
|
evaluateFormContract,
|
10898
|
+
exportContract,
|
10547
10899
|
extensionContract,
|
10548
10900
|
facebookFeedContract,
|
10549
10901
|
feedPostContract,
|
@@ -10586,6 +10938,7 @@ var settingCxIntelligenceContract = (0, import_core54.initContract)().router(
|
|
10586
10938
|
userContract,
|
10587
10939
|
userNotificationContract,
|
10588
10940
|
userPresenceStatusLogContract,
|
10941
|
+
widgetContract,
|
10589
10942
|
widgetSettingContract,
|
10590
10943
|
workflowContract,
|
10591
10944
|
wrapUpFormContract
|