@kl1/contracts 1.3.28 → 1.3.30
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/activity-log/index.d.ts +1 -1
- package/dist/api-contracts/src/attribute/index.d.ts +7 -7
- package/dist/api-contracts/src/auth/index.d.ts +1 -1
- package/dist/api-contracts/src/automation-queue/index.d.ts +7 -10
- package/dist/api-contracts/src/automation-queue/index.d.ts.map +1 -1
- package/dist/api-contracts/src/aws/index.d.ts +2 -2
- package/dist/api-contracts/src/botpress/index.d.ts +2 -2
- package/dist/api-contracts/src/business-calendar/index.d.ts +4 -4
- package/dist/api-contracts/src/business-calendar/index.d.ts.map +1 -1
- package/dist/api-contracts/src/category/index.d.ts +7 -7
- package/dist/api-contracts/src/channel/index.d.ts +43 -1585
- package/dist/api-contracts/src/channel/index.d.ts.map +1 -1
- package/dist/api-contracts/src/channel/schema.d.ts +0 -44
- package/dist/api-contracts/src/channel/schema.d.ts.map +1 -1
- package/dist/api-contracts/src/channel/validation.d.ts +0 -65
- package/dist/api-contracts/src/channel/validation.d.ts.map +1 -1
- package/dist/api-contracts/src/chat/index.d.ts +2172 -3246
- package/dist/api-contracts/src/chat/index.d.ts.map +1 -1
- package/dist/api-contracts/src/chat/schema.d.ts +463 -712
- package/dist/api-contracts/src/chat/schema.d.ts.map +1 -1
- package/dist/api-contracts/src/chat/validation.d.ts +392 -778
- package/dist/api-contracts/src/chat/validation.d.ts.map +1 -1
- package/dist/api-contracts/src/comment/index.d.ts +359 -359
- package/dist/api-contracts/src/comment/schema.d.ts +88 -88
- package/dist/api-contracts/src/contract.d.ts +39032 -45496
- package/dist/api-contracts/src/contract.d.ts.map +1 -1
- package/dist/api-contracts/src/cx-log/index.d.ts +65 -115
- package/dist/api-contracts/src/cx-log/index.d.ts.map +1 -1
- package/dist/api-contracts/src/cx-log/schema.d.ts +81 -123
- package/dist/api-contracts/src/cx-log/schema.d.ts.map +1 -1
- package/dist/api-contracts/src/dashboard/index.d.ts +49 -962
- package/dist/api-contracts/src/dashboard/index.d.ts.map +1 -1
- package/dist/api-contracts/src/dashboard/schema.d.ts +9 -164
- package/dist/api-contracts/src/dashboard/schema.d.ts.map +1 -1
- package/dist/api-contracts/src/dashboard/validation.d.ts +1 -30
- package/dist/api-contracts/src/dashboard/validation.d.ts.map +1 -1
- package/dist/api-contracts/src/evaluate-form/index.d.ts +1 -1
- package/dist/api-contracts/src/export/index.d.ts +0 -2
- package/dist/api-contracts/src/export/index.d.ts.map +1 -1
- package/dist/api-contracts/src/extension/index.d.ts +7 -7
- package/dist/api-contracts/src/facebook-feed/index.d.ts +273 -781
- package/dist/api-contracts/src/facebook-feed/index.d.ts.map +1 -1
- package/dist/api-contracts/src/facebook-feed/schema.d.ts +3 -37
- package/dist/api-contracts/src/facebook-feed/schema.d.ts.map +1 -1
- package/dist/api-contracts/src/facebook-feed/validation.d.ts +0 -26
- package/dist/api-contracts/src/facebook-feed/validation.d.ts.map +1 -1
- package/dist/api-contracts/src/general-setting/index.d.ts +2 -2
- package/dist/api-contracts/src/hold-label/index.d.ts +10 -10
- package/dist/api-contracts/src/index.d.ts +0 -2
- package/dist/api-contracts/src/index.d.ts.map +1 -1
- package/dist/api-contracts/src/instagram/index.d.ts +261 -659
- package/dist/api-contracts/src/instagram/index.d.ts.map +1 -1
- package/dist/api-contracts/src/line/index.d.ts +268 -622
- package/dist/api-contracts/src/line/index.d.ts.map +1 -1
- package/dist/api-contracts/src/line/validation.d.ts +7 -49
- package/dist/api-contracts/src/line/validation.d.ts.map +1 -1
- package/dist/api-contracts/src/mail/email-engine-webhooks-events.contract.d.ts +1 -1
- package/dist/api-contracts/src/mail/email-engine-webhooks-events.contract.d.ts.map +1 -1
- package/dist/api-contracts/src/mail/mail-contract.d.ts +240 -240
- package/dist/api-contracts/src/mail/room-contract.d.ts +240 -240
- package/dist/api-contracts/src/mail/schemas/room-validation.schema.d.ts +80 -80
- package/dist/api-contracts/src/mail/schemas/room.schema.d.ts +60 -60
- package/dist/api-contracts/src/messenger/index.d.ts +261 -659
- package/dist/api-contracts/src/messenger/index.d.ts.map +1 -1
- package/dist/api-contracts/src/messenger/validation.d.ts +0 -26
- package/dist/api-contracts/src/messenger/validation.d.ts.map +1 -1
- package/dist/api-contracts/src/notification/index.d.ts +4 -4
- package/dist/api-contracts/src/permission/index.d.ts +1 -1
- package/dist/api-contracts/src/presence-status/index.d.ts +55 -127
- package/dist/api-contracts/src/presence-status/index.d.ts.map +1 -1
- package/dist/api-contracts/src/presence-status/schema.d.ts +10 -16
- package/dist/api-contracts/src/presence-status/schema.d.ts.map +1 -1
- package/dist/api-contracts/src/presence-status/validation.d.ts +12 -30
- package/dist/api-contracts/src/presence-status/validation.d.ts.map +1 -1
- package/dist/api-contracts/src/role/index.d.ts +5 -5
- package/dist/api-contracts/src/sms/index.d.ts +7 -185
- package/dist/api-contracts/src/sms/index.d.ts.map +1 -1
- package/dist/api-contracts/src/snippet/index.d.ts +8 -8
- package/dist/api-contracts/src/subscription/index.d.ts +5 -5
- package/dist/api-contracts/src/tag/index.d.ts +4 -4
- package/dist/api-contracts/src/telegram/index.d.ts +263 -549
- package/dist/api-contracts/src/telegram/index.d.ts.map +1 -1
- package/dist/api-contracts/src/telephony-agent-presence-status/index.d.ts +441 -62
- 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 +13 -25
- 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/telephony-cdr/index.d.ts +14 -14
- package/dist/api-contracts/src/telephony-extension/index.d.ts +1 -1
- package/dist/api-contracts/src/ticket/index.d.ts +660 -660
- package/dist/api-contracts/src/ticket/schema.d.ts +44 -44
- package/dist/api-contracts/src/ticket/validation.d.ts +20 -20
- package/dist/api-contracts/src/upload/index.d.ts +2 -2
- package/dist/api-contracts/src/user/index.d.ts +7 -7
- package/dist/api-contracts/src/user-presence-status-log/index.d.ts +18 -42
- 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 +20 -50
- package/dist/api-contracts/src/user-presence-status-log/schema.d.ts.map +1 -1
- package/dist/api-contracts/src/viber/index.d.ts +263 -549
- package/dist/api-contracts/src/viber/index.d.ts.map +1 -1
- package/dist/api-contracts/src/webchat/index.d.ts +261 -547
- package/dist/api-contracts/src/webchat/index.d.ts.map +1 -1
- package/dist/api-contracts/src/whatsapp/index.d.ts +261 -599
- package/dist/api-contracts/src/whatsapp/index.d.ts.map +1 -1
- package/dist/api-contracts/src/workflow-rule/index.d.ts +277 -411
- package/dist/api-contracts/src/workflow-rule/index.d.ts.map +1 -1
- package/dist/api-contracts/src/wrap-up-form/index.d.ts +187 -187
- package/dist/api-contracts/src/wrap-up-form/schema.d.ts +20 -20
- package/dist/index.js +459 -820
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +459 -818
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/api-contracts/src/export/validation.d.ts +0 -3
- package/dist/api-contracts/src/export/validation.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -57,7 +57,6 @@ __export(index_exports, {
|
|
|
57
57
|
cxLogContract: () => cxLogContract,
|
|
58
58
|
dashboardContract: () => dashboardContract,
|
|
59
59
|
evaluateFormContract: () => evaluateFormContract,
|
|
60
|
-
exportContract: () => exportContract,
|
|
61
60
|
extensionContract: () => extensionContract2,
|
|
62
61
|
facebookFeedContract: () => facebookFeedContract2,
|
|
63
62
|
feedPostContract: () => feedPostContract,
|
|
@@ -100,7 +99,6 @@ __export(index_exports, {
|
|
|
100
99
|
userContract: () => userContract,
|
|
101
100
|
userNotificationContract: () => userNotificationContract,
|
|
102
101
|
userPresenceStatusLogContract: () => userPresenceStatusLogContract,
|
|
103
|
-
widgetContract: () => widgetContract,
|
|
104
102
|
widgetSettingContract: () => widgetSettingContract,
|
|
105
103
|
workflowContract: () => workflowContract,
|
|
106
104
|
wrapUpFormContract: () => wrapUpFormContract
|
|
@@ -302,10 +300,6 @@ var ChannelMetadataSchema = import_zod6.default.object({
|
|
|
302
300
|
apiKey: import_zod6.default.string(),
|
|
303
301
|
apiSecret: import_zod6.default.string()
|
|
304
302
|
}).optional(),
|
|
305
|
-
line: import_zod6.default.object({
|
|
306
|
-
channelId: import_zod6.default.string(),
|
|
307
|
-
channelSecret: import_zod6.default.string()
|
|
308
|
-
}).optional(),
|
|
309
303
|
lineRichMenuId: import_zod6.default.string().optional().nullable(),
|
|
310
304
|
messengerIntegrationType: import_zod6.default.union([import_zod6.default.literal("own"), import_zod6.default.literal("business")]).optional(),
|
|
311
305
|
facebookFeedIntegrationType: import_zod6.default.union([import_zod6.default.literal("own"), import_zod6.default.literal("business")]).optional(),
|
|
@@ -722,57 +716,56 @@ var WorkflowRuleSchema = DefaultEntitySchema.extend({
|
|
|
722
716
|
});
|
|
723
717
|
|
|
724
718
|
// src/chat/schema.ts
|
|
725
|
-
var MessageDirectionTypeSchema = import_zod18.default.
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
719
|
+
var MessageDirectionTypeSchema = import_zod18.default.enum([
|
|
720
|
+
"incoming",
|
|
721
|
+
"outgoing",
|
|
722
|
+
"system"
|
|
729
723
|
]);
|
|
730
724
|
var WorkflowAutoReplyMessageTypeSchema = import_zod18.default.enum(["text", "image"]).default("text");
|
|
731
|
-
var
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
725
|
+
var MessageTypeSchema = import_zod18.default.enum([
|
|
726
|
+
"text",
|
|
727
|
+
"image",
|
|
728
|
+
"video",
|
|
729
|
+
"audio",
|
|
730
|
+
"file",
|
|
731
|
+
"imagemap",
|
|
732
|
+
"group",
|
|
733
|
+
"fallback",
|
|
734
|
+
"location",
|
|
735
|
+
"sticker",
|
|
736
|
+
// botpress specific
|
|
737
|
+
"carousel",
|
|
738
|
+
"card",
|
|
739
|
+
"choice",
|
|
740
|
+
"dropdown",
|
|
741
|
+
"text_with_image",
|
|
742
|
+
"reaction",
|
|
743
|
+
"contacts",
|
|
742
744
|
// botpress specific
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
import_zod18.default.literal("contacts"),
|
|
745
|
+
"carousel",
|
|
746
|
+
"card",
|
|
747
|
+
"choice",
|
|
748
|
+
"dropdown",
|
|
749
|
+
// messenger referral
|
|
750
|
+
"referral",
|
|
750
751
|
// system
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
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);
|
|
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
|
+
]);
|
|
776
769
|
var FeedPostTypeSchema = import_zod18.default.enum([
|
|
777
770
|
"text",
|
|
778
771
|
"added_photos",
|
|
@@ -1345,9 +1338,7 @@ var MessageAttachmentSchema = import_zod26.default.object({
|
|
|
1345
1338
|
fileSize: import_zod26.default.number(),
|
|
1346
1339
|
url: import_zod26.default.string().nullable(),
|
|
1347
1340
|
fileType: import_zod26.default.string(),
|
|
1348
|
-
thumbnailUrl: import_zod26.default.string().optional()
|
|
1349
|
-
width: import_zod26.default.string().optional(),
|
|
1350
|
-
height: import_zod26.default.string().optional()
|
|
1341
|
+
thumbnailUrl: import_zod26.default.string().optional()
|
|
1351
1342
|
});
|
|
1352
1343
|
var StickerSchema = import_zod26.default.object({
|
|
1353
1344
|
packageId: import_zod26.default.number(),
|
|
@@ -1844,7 +1835,7 @@ var activityLogContract = (0, import_core2.initContract)().router(
|
|
|
1844
1835
|
summary: "Get all activity logs"
|
|
1845
1836
|
}
|
|
1846
1837
|
},
|
|
1847
|
-
{ pathPrefix: "
|
|
1838
|
+
{ pathPrefix: "activity-log" }
|
|
1848
1839
|
);
|
|
1849
1840
|
|
|
1850
1841
|
// src/attribute/index.ts
|
|
@@ -1969,7 +1960,7 @@ var attributeContract = (0, import_core3.initContract)().router(
|
|
|
1969
1960
|
}
|
|
1970
1961
|
},
|
|
1971
1962
|
{
|
|
1972
|
-
pathPrefix: "
|
|
1963
|
+
pathPrefix: "attributes"
|
|
1973
1964
|
}
|
|
1974
1965
|
);
|
|
1975
1966
|
|
|
@@ -1992,7 +1983,7 @@ var authContract = (0, import_core4.initContract)().router(
|
|
|
1992
1983
|
summary: "Get current user"
|
|
1993
1984
|
}
|
|
1994
1985
|
},
|
|
1995
|
-
{ pathPrefix: "
|
|
1986
|
+
{ pathPrefix: "auth" }
|
|
1996
1987
|
);
|
|
1997
1988
|
|
|
1998
1989
|
// src/aws/index.ts
|
|
@@ -2056,7 +2047,7 @@ var awsContract = (0, import_core5.initContract)().router(
|
|
|
2056
2047
|
}
|
|
2057
2048
|
},
|
|
2058
2049
|
{
|
|
2059
|
-
pathPrefix: "
|
|
2050
|
+
pathPrefix: "aws/s3"
|
|
2060
2051
|
}
|
|
2061
2052
|
);
|
|
2062
2053
|
|
|
@@ -2184,7 +2175,7 @@ var categoryContract = (0, import_core6.initContract)().router(
|
|
|
2184
2175
|
}
|
|
2185
2176
|
},
|
|
2186
2177
|
{
|
|
2187
|
-
pathPrefix: "
|
|
2178
|
+
pathPrefix: "categories"
|
|
2188
2179
|
}
|
|
2189
2180
|
);
|
|
2190
2181
|
|
|
@@ -2283,8 +2274,7 @@ var ConnectWebChatSchema = import_zod37.default.object({
|
|
|
2283
2274
|
})
|
|
2284
2275
|
});
|
|
2285
2276
|
var GetChannelSchema = import_zod37.default.object({
|
|
2286
|
-
withDeleted: import_zod37.default.coerce.boolean().default(false)
|
|
2287
|
-
withRelations: import_zod37.default.coerce.boolean().default(true).optional()
|
|
2277
|
+
withDeleted: import_zod37.default.coerce.boolean().default(false)
|
|
2288
2278
|
});
|
|
2289
2279
|
var ConnectBotSchema = import_zod37.default.object({
|
|
2290
2280
|
botId: import_zod37.default.string().uuid()
|
|
@@ -2307,10 +2297,6 @@ var ConnectWhatsappSchema = import_zod37.default.object({
|
|
|
2307
2297
|
metadata: ChannelMetadataSchema,
|
|
2308
2298
|
platformId: import_zod37.default.string()
|
|
2309
2299
|
});
|
|
2310
|
-
var ConnectLazadaSchema = import_zod37.default.object({
|
|
2311
|
-
name: import_zod37.default.string(),
|
|
2312
|
-
code: import_zod37.default.string()
|
|
2313
|
-
});
|
|
2314
2300
|
|
|
2315
2301
|
// src/instagram/validation.ts
|
|
2316
2302
|
var import_zod38 = __toESM(require("zod"));
|
|
@@ -2459,7 +2445,7 @@ var messenger = (0, import_core7.initContract)().router(
|
|
|
2459
2445
|
}
|
|
2460
2446
|
},
|
|
2461
2447
|
{
|
|
2462
|
-
pathPrefix: "messenger"
|
|
2448
|
+
pathPrefix: "/messenger"
|
|
2463
2449
|
}
|
|
2464
2450
|
);
|
|
2465
2451
|
var instagram = (0, import_core7.initContract)().router(
|
|
@@ -2489,7 +2475,7 @@ var instagram = (0, import_core7.initContract)().router(
|
|
|
2489
2475
|
}
|
|
2490
2476
|
},
|
|
2491
2477
|
{
|
|
2492
|
-
pathPrefix: "instagram"
|
|
2478
|
+
pathPrefix: "/instagram"
|
|
2493
2479
|
}
|
|
2494
2480
|
);
|
|
2495
2481
|
var line = (0, import_core7.initContract)().router(
|
|
@@ -2506,7 +2492,7 @@ var line = (0, import_core7.initContract)().router(
|
|
|
2506
2492
|
}
|
|
2507
2493
|
},
|
|
2508
2494
|
{
|
|
2509
|
-
pathPrefix: "line"
|
|
2495
|
+
pathPrefix: "/line"
|
|
2510
2496
|
}
|
|
2511
2497
|
);
|
|
2512
2498
|
var webchat = (0, import_core7.initContract)().router(
|
|
@@ -2526,7 +2512,7 @@ var webchat = (0, import_core7.initContract)().router(
|
|
|
2526
2512
|
}
|
|
2527
2513
|
},
|
|
2528
2514
|
{
|
|
2529
|
-
pathPrefix: "webchat"
|
|
2515
|
+
pathPrefix: "/webchat"
|
|
2530
2516
|
}
|
|
2531
2517
|
);
|
|
2532
2518
|
var viber = (0, import_core7.initContract)().router(
|
|
@@ -2546,7 +2532,7 @@ var viber = (0, import_core7.initContract)().router(
|
|
|
2546
2532
|
}
|
|
2547
2533
|
},
|
|
2548
2534
|
{
|
|
2549
|
-
pathPrefix: "viber"
|
|
2535
|
+
pathPrefix: "/viber"
|
|
2550
2536
|
}
|
|
2551
2537
|
);
|
|
2552
2538
|
var telegram = (0, import_core7.initContract)().router(
|
|
@@ -2566,7 +2552,7 @@ var telegram = (0, import_core7.initContract)().router(
|
|
|
2566
2552
|
}
|
|
2567
2553
|
},
|
|
2568
2554
|
{
|
|
2569
|
-
pathPrefix: "telegram"
|
|
2555
|
+
pathPrefix: "/telegram"
|
|
2570
2556
|
}
|
|
2571
2557
|
);
|
|
2572
2558
|
var whatsapp = (0, import_core7.initContract)().router(
|
|
@@ -2627,33 +2613,14 @@ var whatsapp = (0, import_core7.initContract)().router(
|
|
|
2627
2613
|
}
|
|
2628
2614
|
},
|
|
2629
2615
|
{
|
|
2630
|
-
pathPrefix: "whatsapp"
|
|
2631
|
-
}
|
|
2632
|
-
);
|
|
2633
|
-
var lazada = (0, import_core7.initContract)().router(
|
|
2634
|
-
{
|
|
2635
|
-
connect: {
|
|
2636
|
-
method: "POST",
|
|
2637
|
-
path: "/connect",
|
|
2638
|
-
responses: {
|
|
2639
|
-
200: DefaultSuccessResponseSchema.extend({
|
|
2640
|
-
channel: ChannelSchema
|
|
2641
|
-
}),
|
|
2642
|
-
408: DefaultErrorResponseSchema
|
|
2643
|
-
},
|
|
2644
|
-
body: ConnectLazadaSchema,
|
|
2645
|
-
summary: "Connect message channel"
|
|
2646
|
-
}
|
|
2647
|
-
},
|
|
2648
|
-
{
|
|
2649
|
-
pathPrefix: "lazada"
|
|
2616
|
+
pathPrefix: "/whatsapp"
|
|
2650
2617
|
}
|
|
2651
2618
|
);
|
|
2652
2619
|
var channelContract = (0, import_core7.initContract)().router(
|
|
2653
2620
|
{
|
|
2654
2621
|
getChannels: {
|
|
2655
2622
|
method: "GET",
|
|
2656
|
-
path: "
|
|
2623
|
+
path: "/",
|
|
2657
2624
|
responses: {
|
|
2658
2625
|
200: DefaultSuccessResponseSchema.extend({
|
|
2659
2626
|
data: ChannelSchema.array()
|
|
@@ -2664,7 +2631,7 @@ var channelContract = (0, import_core7.initContract)().router(
|
|
|
2664
2631
|
},
|
|
2665
2632
|
disconnect: {
|
|
2666
2633
|
method: "POST",
|
|
2667
|
-
path: "
|
|
2634
|
+
path: "/disconnect/:channelId",
|
|
2668
2635
|
pathParams: import_zod41.default.object({
|
|
2669
2636
|
channelId: import_zod41.default.string().uuid()
|
|
2670
2637
|
}),
|
|
@@ -2679,7 +2646,7 @@ var channelContract = (0, import_core7.initContract)().router(
|
|
|
2679
2646
|
},
|
|
2680
2647
|
delete: {
|
|
2681
2648
|
method: "DELETE",
|
|
2682
|
-
path: "
|
|
2649
|
+
path: "/delete/:channelId",
|
|
2683
2650
|
pathParams: import_zod41.default.object({
|
|
2684
2651
|
channelId: import_zod41.default.string().uuid()
|
|
2685
2652
|
}),
|
|
@@ -2694,7 +2661,7 @@ var channelContract = (0, import_core7.initContract)().router(
|
|
|
2694
2661
|
},
|
|
2695
2662
|
rename: {
|
|
2696
2663
|
method: "POST",
|
|
2697
|
-
path: "
|
|
2664
|
+
path: "/rename/:channelId",
|
|
2698
2665
|
pathParams: import_zod41.default.object({
|
|
2699
2666
|
channelId: import_zod41.default.string().uuid()
|
|
2700
2667
|
}),
|
|
@@ -2711,7 +2678,7 @@ var channelContract = (0, import_core7.initContract)().router(
|
|
|
2711
2678
|
},
|
|
2712
2679
|
reconnect: {
|
|
2713
2680
|
method: "POST",
|
|
2714
|
-
path: "
|
|
2681
|
+
path: "/reconnect/:channelId",
|
|
2715
2682
|
pathParams: import_zod41.default.object({
|
|
2716
2683
|
channelId: import_zod41.default.string().uuid()
|
|
2717
2684
|
}),
|
|
@@ -2728,7 +2695,7 @@ var channelContract = (0, import_core7.initContract)().router(
|
|
|
2728
2695
|
},
|
|
2729
2696
|
relogin: {
|
|
2730
2697
|
method: "POST",
|
|
2731
|
-
path: "
|
|
2698
|
+
path: "/relogin",
|
|
2732
2699
|
responses: {
|
|
2733
2700
|
200: DefaultSuccessResponseSchema.extend({
|
|
2734
2701
|
channel: ChannelSchema
|
|
@@ -2740,7 +2707,7 @@ var channelContract = (0, import_core7.initContract)().router(
|
|
|
2740
2707
|
},
|
|
2741
2708
|
checknewTenant: {
|
|
2742
2709
|
method: "GET",
|
|
2743
|
-
path: "
|
|
2710
|
+
path: "/check-new-tenant",
|
|
2744
2711
|
responses: {
|
|
2745
2712
|
200: DefaultSuccessResponseSchema.extend({
|
|
2746
2713
|
data: tenantCheckedSchema
|
|
@@ -2751,7 +2718,7 @@ var channelContract = (0, import_core7.initContract)().router(
|
|
|
2751
2718
|
},
|
|
2752
2719
|
updateNewTenant: {
|
|
2753
2720
|
method: "PATCH",
|
|
2754
|
-
path: "
|
|
2721
|
+
path: "/update-new-tenant",
|
|
2755
2722
|
responses: {
|
|
2756
2723
|
200: DefaultSuccessResponseSchema.extend({
|
|
2757
2724
|
message: import_zod41.default.string()
|
|
@@ -2766,7 +2733,7 @@ var channelContract = (0, import_core7.initContract)().router(
|
|
|
2766
2733
|
},
|
|
2767
2734
|
updateChannelCsatPreference: {
|
|
2768
2735
|
method: "POST",
|
|
2769
|
-
path: "csat/:channelId",
|
|
2736
|
+
path: "/csat/:channelId",
|
|
2770
2737
|
pathParams: import_zod41.default.object({
|
|
2771
2738
|
channelId: import_zod41.default.string().uuid()
|
|
2772
2739
|
}),
|
|
@@ -2787,11 +2754,11 @@ var channelContract = (0, import_core7.initContract)().router(
|
|
|
2787
2754
|
viber,
|
|
2788
2755
|
telegram,
|
|
2789
2756
|
webchat,
|
|
2790
|
-
whatsapp
|
|
2791
|
-
lazada
|
|
2757
|
+
whatsapp
|
|
2792
2758
|
},
|
|
2793
2759
|
{
|
|
2794
|
-
baseHeaders: DefaultHeaderSchema
|
|
2760
|
+
baseHeaders: DefaultHeaderSchema,
|
|
2761
|
+
pathPrefix: "channel"
|
|
2795
2762
|
}
|
|
2796
2763
|
);
|
|
2797
2764
|
var channelFacebookFeedContract = (0, import_core7.initContract)().router(
|
|
@@ -2821,7 +2788,7 @@ var channelFacebookFeedContract = (0, import_core7.initContract)().router(
|
|
|
2821
2788
|
}
|
|
2822
2789
|
},
|
|
2823
2790
|
{
|
|
2824
|
-
pathPrefix: "
|
|
2791
|
+
pathPrefix: "/facebook-feed"
|
|
2825
2792
|
}
|
|
2826
2793
|
);
|
|
2827
2794
|
var channelBotContract = (0, import_core7.initContract)().router({
|
|
@@ -2862,7 +2829,7 @@ var channelSMSContract = (0, import_core7.initContract)().router(
|
|
|
2862
2829
|
}
|
|
2863
2830
|
},
|
|
2864
2831
|
{
|
|
2865
|
-
pathPrefix: "channel/sms"
|
|
2832
|
+
pathPrefix: "/channel/sms"
|
|
2866
2833
|
}
|
|
2867
2834
|
);
|
|
2868
2835
|
|
|
@@ -2887,14 +2854,14 @@ var receiveMessageContract = (0, import_core8.initContract)().router(
|
|
|
2887
2854
|
"x-code": import_zod42.default.string().uuid(),
|
|
2888
2855
|
"x-tenant": import_zod42.default.string().uuid()
|
|
2889
2856
|
}),
|
|
2890
|
-
pathPrefix: "
|
|
2857
|
+
pathPrefix: "message"
|
|
2891
2858
|
}
|
|
2892
2859
|
);
|
|
2893
2860
|
var mainFeedContract = (0, import_core8.initContract)().router(
|
|
2894
2861
|
{
|
|
2895
2862
|
getFeedPostById: {
|
|
2896
2863
|
method: "GET",
|
|
2897
|
-
path: "/:id",
|
|
2864
|
+
path: "/feed-post/:id",
|
|
2898
2865
|
pathParams: import_zod42.default.object({
|
|
2899
2866
|
id: import_zod42.default.string().uuid()
|
|
2900
2867
|
}),
|
|
@@ -2907,7 +2874,7 @@ var mainFeedContract = (0, import_core8.initContract)().router(
|
|
|
2907
2874
|
},
|
|
2908
2875
|
getMessagesByParent: {
|
|
2909
2876
|
method: "GET",
|
|
2910
|
-
path: "/message/:parentId/relevance",
|
|
2877
|
+
path: "/feed-post/message/:parentId/relevance",
|
|
2911
2878
|
pathParams: import_zod42.default.object({
|
|
2912
2879
|
parentId: import_zod42.default.string().uuid()
|
|
2913
2880
|
}),
|
|
@@ -2924,8 +2891,7 @@ var mainFeedContract = (0, import_core8.initContract)().router(
|
|
|
2924
2891
|
}
|
|
2925
2892
|
},
|
|
2926
2893
|
{
|
|
2927
|
-
baseHeaders: DefaultHeaderSchema
|
|
2928
|
-
pathPrefix: "ms/feed-post"
|
|
2894
|
+
baseHeaders: DefaultHeaderSchema
|
|
2929
2895
|
}
|
|
2930
2896
|
);
|
|
2931
2897
|
var mainChatRoomContract = (0, import_core8.initContract)().router(
|
|
@@ -3060,7 +3026,7 @@ var mainChatRoomContract = (0, import_core8.initContract)().router(
|
|
|
3060
3026
|
},
|
|
3061
3027
|
{
|
|
3062
3028
|
baseHeaders: DefaultHeaderSchema,
|
|
3063
|
-
pathPrefix: "
|
|
3029
|
+
pathPrefix: "chat"
|
|
3064
3030
|
}
|
|
3065
3031
|
);
|
|
3066
3032
|
var mainChatContract = (0, import_core8.initContract)().router(
|
|
@@ -3171,7 +3137,7 @@ var mainChatContract = (0, import_core8.initContract)().router(
|
|
|
3171
3137
|
},
|
|
3172
3138
|
{
|
|
3173
3139
|
baseHeaders: DefaultHeaderSchema,
|
|
3174
|
-
pathPrefix: "
|
|
3140
|
+
pathPrefix: "chat"
|
|
3175
3141
|
}
|
|
3176
3142
|
);
|
|
3177
3143
|
var initiateMessageContract = (0, import_core8.initContract)().router(
|
|
@@ -3189,7 +3155,7 @@ var initiateMessageContract = (0, import_core8.initContract)().router(
|
|
|
3189
3155
|
},
|
|
3190
3156
|
{
|
|
3191
3157
|
baseHeaders: DefaultHeaderSchema,
|
|
3192
|
-
pathPrefix: "
|
|
3158
|
+
pathPrefix: "chat"
|
|
3193
3159
|
}
|
|
3194
3160
|
);
|
|
3195
3161
|
var mainChatMessageContract = (0, import_core8.initContract)().router(
|
|
@@ -3233,7 +3199,7 @@ var mainChatMessageContract = (0, import_core8.initContract)().router(
|
|
|
3233
3199
|
},
|
|
3234
3200
|
{
|
|
3235
3201
|
baseHeaders: DefaultHeaderSchema,
|
|
3236
|
-
pathPrefix: "
|
|
3202
|
+
pathPrefix: "chat"
|
|
3237
3203
|
}
|
|
3238
3204
|
);
|
|
3239
3205
|
|
|
@@ -4219,69 +4185,66 @@ var GetAllCxLogQueryParamsSchema = DefaultQueryParamsSchema.extend({
|
|
|
4219
4185
|
}).partial().optional();
|
|
4220
4186
|
|
|
4221
4187
|
// src/cx-log/index.ts
|
|
4222
|
-
var cxLogContract = (0, import_core12.initContract)().router(
|
|
4223
|
-
{
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
401: DefaultUnauthorizedSchema
|
|
4236
|
-
},
|
|
4237
|
-
query: GetAllCxLogQueryParamsSchema,
|
|
4238
|
-
summary: "Get all cx-logs"
|
|
4188
|
+
var cxLogContract = (0, import_core12.initContract)().router({
|
|
4189
|
+
findAll: {
|
|
4190
|
+
method: "GET",
|
|
4191
|
+
path: "/cx-logs",
|
|
4192
|
+
headers: DefaultHeaderSchema,
|
|
4193
|
+
responses: {
|
|
4194
|
+
200: DefaultSuccessResponseSchema.extend({
|
|
4195
|
+
total: import_zod52.default.number(),
|
|
4196
|
+
page: import_zod52.default.number(),
|
|
4197
|
+
pageSize: import_zod52.default.number(),
|
|
4198
|
+
cxLogs: import_zod52.default.array(CxLogSchemaWithRelations)
|
|
4199
|
+
}),
|
|
4200
|
+
401: DefaultUnauthorizedSchema
|
|
4239
4201
|
},
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
|
|
4202
|
+
query: GetAllCxLogQueryParamsSchema,
|
|
4203
|
+
summary: "Get all cx-logs"
|
|
4204
|
+
},
|
|
4205
|
+
export: {
|
|
4206
|
+
method: "GET",
|
|
4207
|
+
path: "/cx-logs/export",
|
|
4208
|
+
headers: DefaultHeaderSchema,
|
|
4209
|
+
responses: {
|
|
4210
|
+
200: null,
|
|
4211
|
+
401: DefaultUnauthorizedSchema
|
|
4250
4212
|
},
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
|
|
4261
|
-
|
|
4213
|
+
query: GetAllCxLogQueryParamsSchema,
|
|
4214
|
+
summary: "Export cx-logs"
|
|
4215
|
+
},
|
|
4216
|
+
syncSla: {
|
|
4217
|
+
method: "POST",
|
|
4218
|
+
path: "/cx-logs/sync-sla",
|
|
4219
|
+
headers: DefaultHeaderSchema,
|
|
4220
|
+
responses: {
|
|
4221
|
+
200: null,
|
|
4222
|
+
401: DefaultUnauthorizedSchema,
|
|
4223
|
+
500: DefaultErrorResponseSchema
|
|
4262
4224
|
},
|
|
4263
|
-
|
|
4264
|
-
|
|
4265
|
-
path: "/cx-logs",
|
|
4266
|
-
headers: import_zod52.default.object({
|
|
4267
|
-
// biome-ignore lint/style/useNamingConvention: <explanation>
|
|
4268
|
-
"x-tenant": import_zod52.default.string({ required_error: "Tenant id is required" }),
|
|
4269
|
-
"x-code": import_zod52.default.string().uuid().optional()
|
|
4270
|
-
}),
|
|
4271
|
-
responses: {
|
|
4272
|
-
200: null,
|
|
4273
|
-
403: DefaultUnauthorizedSchema,
|
|
4274
|
-
404: DefaultNotFoundSchema,
|
|
4275
|
-
500: DefaultErrorResponseSchema
|
|
4276
|
-
},
|
|
4277
|
-
body: import_zod52.default.object({
|
|
4278
|
-
roomId: import_zod52.default.string().uuid(),
|
|
4279
|
-
slaStatus: import_zod52.default.enum(["meet", "unmeet", "-"])
|
|
4280
|
-
})
|
|
4281
|
-
}
|
|
4225
|
+
body: null,
|
|
4226
|
+
summary: "Export cx-logs"
|
|
4282
4227
|
},
|
|
4283
|
-
|
|
4284
|
-
|
|
4228
|
+
updateSla: {
|
|
4229
|
+
method: "POST",
|
|
4230
|
+
path: "/cx-logs",
|
|
4231
|
+
headers: import_zod52.default.object({
|
|
4232
|
+
// biome-ignore lint/style/useNamingConvention: <explanation>
|
|
4233
|
+
"x-tenant": import_zod52.default.string({ required_error: "Tenant id is required" }),
|
|
4234
|
+
"x-code": import_zod52.default.string().uuid().optional()
|
|
4235
|
+
}),
|
|
4236
|
+
responses: {
|
|
4237
|
+
200: null,
|
|
4238
|
+
403: DefaultUnauthorizedSchema,
|
|
4239
|
+
404: DefaultNotFoundSchema,
|
|
4240
|
+
500: DefaultErrorResponseSchema
|
|
4241
|
+
},
|
|
4242
|
+
body: import_zod52.default.object({
|
|
4243
|
+
roomId: import_zod52.default.string().uuid(),
|
|
4244
|
+
slaStatus: import_zod52.default.enum(["meet", "unmeet", "-"])
|
|
4245
|
+
})
|
|
4246
|
+
}
|
|
4247
|
+
});
|
|
4285
4248
|
|
|
4286
4249
|
// src/dashboard/index.ts
|
|
4287
4250
|
var import_core13 = require("@ts-rest/core");
|
|
@@ -4289,23 +4252,19 @@ var import_core13 = require("@ts-rest/core");
|
|
|
4289
4252
|
// src/dashboard/validation.ts
|
|
4290
4253
|
var import_zod53 = __toESM(require("zod"));
|
|
4291
4254
|
var GetDashboardQueryParamsSchema = import_zod53.default.object({
|
|
4292
|
-
channelIds: import_zod53.default.array(import_zod53.default.string()
|
|
4293
|
-
selectedDate: import_zod53.default.string()
|
|
4255
|
+
channelIds: import_zod53.default.array(import_zod53.default.string()).optional(),
|
|
4256
|
+
selectedDate: import_zod53.default.string()
|
|
4294
4257
|
});
|
|
4295
4258
|
var GetMessageChannelQueryParamsSchema = GetDashboardQueryParamsSchema.extend({
|
|
4296
4259
|
time: import_zod53.default.enum(["byDay", "byMonth", "byHour"]),
|
|
4297
4260
|
channelIds: import_zod53.default.array(import_zod53.default.string()).optional()
|
|
4298
4261
|
});
|
|
4299
|
-
var
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4303
|
-
})
|
|
4304
|
-
|
|
4305
|
-
automationQueueId: import_zod53.default.string().uuid().optional(),
|
|
4306
|
-
channelIds: import_zod53.default.array(import_zod53.default.string().uuid()).optional(),
|
|
4307
|
-
agentIds: import_zod53.default.array(import_zod53.default.string().uuid()).optional()
|
|
4308
|
-
});
|
|
4262
|
+
var DashboardQueryparamsSchema = GetDashboardQueryParamsSchema.merge(
|
|
4263
|
+
import_zod53.default.object({
|
|
4264
|
+
channelIds: import_zod53.default.array(import_zod53.default.string()).optional(),
|
|
4265
|
+
agentIds: import_zod53.default.array(import_zod53.default.string()).optional()
|
|
4266
|
+
})
|
|
4267
|
+
);
|
|
4309
4268
|
var GetDashboardQueryDetailParamsSchema = GetDashboardQueryParamsSchema.merge(
|
|
4310
4269
|
import_zod53.default.object({
|
|
4311
4270
|
agentId: import_zod53.default.string().uuid().optional()
|
|
@@ -4322,14 +4281,9 @@ var CallCountsQuerySchema = import_zod53.default.object({
|
|
|
4322
4281
|
types: import_zod53.default.array(import_zod53.default.string()).optional(),
|
|
4323
4282
|
selectedDate: import_zod53.default.string().optional()
|
|
4324
4283
|
});
|
|
4325
|
-
var MessageDashboardDetailsQuerySchema = import_zod53.default.object({
|
|
4326
|
-
automationQueueId: import_zod53.default.string().uuid().optional(),
|
|
4327
|
-
selectedDate: import_zod53.default.string().min(1),
|
|
4328
|
-
channelIds: import_zod53.default.array(import_zod53.default.string().uuid()).optional()
|
|
4329
|
-
});
|
|
4330
4284
|
|
|
4331
4285
|
// src/dashboard/index.ts
|
|
4332
|
-
var
|
|
4286
|
+
var import_zod55 = __toESM(require("zod"));
|
|
4333
4287
|
|
|
4334
4288
|
// src/dashboard/schema.ts
|
|
4335
4289
|
var import_zod54 = __toESM(require("zod"));
|
|
@@ -4484,32 +4438,29 @@ var MessageStatusSchema = import_zod54.default.object({
|
|
|
4484
4438
|
total: import_zod54.default.number().nullable(),
|
|
4485
4439
|
closed: import_zod54.default.number().nullable(),
|
|
4486
4440
|
unassignedOpen: import_zod54.default.number().nullable(),
|
|
4487
|
-
assignedOpen: import_zod54.default.number().nullable()
|
|
4488
|
-
hold: import_zod54.default.number()
|
|
4441
|
+
assignedOpen: import_zod54.default.number().nullable()
|
|
4489
4442
|
});
|
|
4490
4443
|
var MessageAverageSchema = import_zod54.default.object({
|
|
4491
4444
|
selectedWeekAvgByDay: import_zod54.default.array(
|
|
4492
4445
|
import_zod54.default.object({
|
|
4493
4446
|
day: import_zod54.default.string().nullable(),
|
|
4494
4447
|
avgResolutionTime: import_zod54.default.string().nullable(),
|
|
4495
|
-
avgResponseTime: import_zod54.default.string().nullable()
|
|
4496
|
-
resolutionRate: import_zod54.default.string()
|
|
4448
|
+
avgResponseTime: import_zod54.default.string().nullable()
|
|
4497
4449
|
})
|
|
4498
4450
|
).optional().nullable(),
|
|
4499
4451
|
previousWeekAvg: import_zod54.default.object({
|
|
4500
4452
|
avgResolutionTime: import_zod54.default.string().nullable(),
|
|
4501
|
-
avgResponseTime: import_zod54.default.string().nullable()
|
|
4502
|
-
resolutionRate: import_zod54.default.string()
|
|
4453
|
+
avgResponseTime: import_zod54.default.string().nullable()
|
|
4503
4454
|
}).nullable().optional(),
|
|
4504
4455
|
selectedWeekAvg: import_zod54.default.object({
|
|
4505
4456
|
avgResolutionTime: import_zod54.default.string().nullable(),
|
|
4506
|
-
avgResponseTime: import_zod54.default.string().nullable()
|
|
4507
|
-
resolutionRate: import_zod54.default.string()
|
|
4457
|
+
avgResponseTime: import_zod54.default.string().nullable()
|
|
4508
4458
|
}).nullable().optional()
|
|
4509
4459
|
});
|
|
4510
4460
|
var ChannelIncomingMessageSchema = import_zod54.default.object({
|
|
4511
|
-
|
|
4512
|
-
|
|
4461
|
+
channelName: import_zod54.default.string().nullable(),
|
|
4462
|
+
channelType: import_zod54.default.string().nullable(),
|
|
4463
|
+
count: import_zod54.default.string().nullable()
|
|
4513
4464
|
});
|
|
4514
4465
|
var MessageDispositionSchema = import_zod54.default.object({
|
|
4515
4466
|
name: import_zod54.default.string().optional().nullable(),
|
|
@@ -4532,49 +4483,6 @@ var CallCountsSchema = import_zod54.default.object({
|
|
|
4532
4483
|
failedCallCount: import_zod54.default.number().gte(0),
|
|
4533
4484
|
totalCallCount: import_zod54.default.number().gte(0)
|
|
4534
4485
|
});
|
|
4535
|
-
var MessageQueueDataSchema = import_zod54.default.object({
|
|
4536
|
-
id: import_zod54.default.string().uuid().nullable(),
|
|
4537
|
-
name: import_zod54.default.string(),
|
|
4538
|
-
sla: import_zod54.default.number(),
|
|
4539
|
-
newContactCount: import_zod54.default.number(),
|
|
4540
|
-
existingContactCount: import_zod54.default.number(),
|
|
4541
|
-
totalRoomCount: import_zod54.default.number(),
|
|
4542
|
-
closedRoomCount: import_zod54.default.number(),
|
|
4543
|
-
unassignedRoomCount: import_zod54.default.number(),
|
|
4544
|
-
assignedRoomCount: import_zod54.default.number(),
|
|
4545
|
-
holdRoomCount: import_zod54.default.number()
|
|
4546
|
-
});
|
|
4547
|
-
var AgentMessageStatisticsSchema = import_zod54.default.object({
|
|
4548
|
-
id: import_zod54.default.string().uuid(),
|
|
4549
|
-
name: import_zod54.default.string(),
|
|
4550
|
-
assignedRoomCount: import_zod54.default.number(),
|
|
4551
|
-
holdRoomCount: import_zod54.default.number(),
|
|
4552
|
-
closedRoomCount: import_zod54.default.number(),
|
|
4553
|
-
averageFirstResponseTime: import_zod54.default.string(),
|
|
4554
|
-
averageResolutionTime: import_zod54.default.string(),
|
|
4555
|
-
totalHandledTime: import_zod54.default.string()
|
|
4556
|
-
});
|
|
4557
|
-
var UserCheckInLogSchema = import_zod54.default.object({
|
|
4558
|
-
userId: import_zod54.default.string().uuid(),
|
|
4559
|
-
firstLoginTime: import_zod54.default.string(),
|
|
4560
|
-
lastLogoutTime: import_zod54.default.string().nullable(),
|
|
4561
|
-
totalLoginDuration: import_zod54.default.string().nullable(),
|
|
4562
|
-
averageFirstResponseTime: import_zod54.default.string().nullable(),
|
|
4563
|
-
averageResolutionTime: import_zod54.default.string().nullable(),
|
|
4564
|
-
totalHandledTime: import_zod54.default.string().nullable()
|
|
4565
|
-
});
|
|
4566
|
-
var UserCheckInLogsWithDaySchema = import_zod54.default.object({
|
|
4567
|
-
date: import_zod54.default.date(),
|
|
4568
|
-
formattedDate: import_zod54.default.string(),
|
|
4569
|
-
userCheckInLogs: import_zod54.default.array(UserCheckInLogSchema)
|
|
4570
|
-
});
|
|
4571
|
-
|
|
4572
|
-
// src/export/validation.ts
|
|
4573
|
-
var import_zod55 = __toESM(require("zod"));
|
|
4574
|
-
var ExportFileExtensionSchema = import_zod55.default.union([
|
|
4575
|
-
import_zod55.default.literal("csv"),
|
|
4576
|
-
import_zod55.default.literal("xlsx")
|
|
4577
|
-
]);
|
|
4578
4486
|
|
|
4579
4487
|
// src/dashboard/index.ts
|
|
4580
4488
|
var dashboardContract = (0, import_core13.initContract)().router(
|
|
@@ -4589,8 +4497,8 @@ var dashboardContract = (0, import_core13.initContract)().router(
|
|
|
4589
4497
|
200: DefaultSuccessResponseSchema.extend({
|
|
4590
4498
|
dashboard: DashboardDataSchema
|
|
4591
4499
|
}),
|
|
4592
|
-
400:
|
|
4593
|
-
message:
|
|
4500
|
+
400: import_zod55.default.object({
|
|
4501
|
+
message: import_zod55.default.string()
|
|
4594
4502
|
}),
|
|
4595
4503
|
401: DefaultUnauthorizedSchema
|
|
4596
4504
|
}
|
|
@@ -4605,8 +4513,8 @@ var dashboardContract = (0, import_core13.initContract)().router(
|
|
|
4605
4513
|
200: DefaultSuccessResponseSchema.extend({
|
|
4606
4514
|
queuecallDashboard: queueCallDashboardDataSchema
|
|
4607
4515
|
}),
|
|
4608
|
-
400:
|
|
4609
|
-
message:
|
|
4516
|
+
400: import_zod55.default.object({
|
|
4517
|
+
message: import_zod55.default.string()
|
|
4610
4518
|
}),
|
|
4611
4519
|
401: DefaultUnauthorizedSchema
|
|
4612
4520
|
}
|
|
@@ -4696,11 +4604,7 @@ var dashboardContract = (0, import_core13.initContract)().router(
|
|
|
4696
4604
|
getMessageTagData: {
|
|
4697
4605
|
method: "GET",
|
|
4698
4606
|
path: "/message/tag",
|
|
4699
|
-
query:
|
|
4700
|
-
automationQueueId: import_zod56.default.string().uuid().optional(),
|
|
4701
|
-
selectedDate: import_zod56.default.string().min(1),
|
|
4702
|
-
channelIds: import_zod56.default.array(import_zod56.default.string().uuid()).optional()
|
|
4703
|
-
}),
|
|
4607
|
+
query: DashboardQueryparamsSchema,
|
|
4704
4608
|
headers: DefaultHeaderSchema,
|
|
4705
4609
|
summary: "Get message tag data",
|
|
4706
4610
|
responses: {
|
|
@@ -4710,16 +4614,6 @@ var dashboardContract = (0, import_core13.initContract)().router(
|
|
|
4710
4614
|
401: DefaultUnauthorizedSchema
|
|
4711
4615
|
}
|
|
4712
4616
|
},
|
|
4713
|
-
exportRoomTagCounts: {
|
|
4714
|
-
method: "GET",
|
|
4715
|
-
path: "/export-room-tag-counts",
|
|
4716
|
-
query: DashboardGlobalFiltersSchema.extend({
|
|
4717
|
-
fileExtension: ExportFileExtensionSchema
|
|
4718
|
-
}),
|
|
4719
|
-
responses: {
|
|
4720
|
-
200: DefaultSuccessResponseSchema
|
|
4721
|
-
}
|
|
4722
|
-
},
|
|
4723
4617
|
getCallTagData: {
|
|
4724
4618
|
method: "GET",
|
|
4725
4619
|
path: "/call/tag",
|
|
@@ -4751,7 +4645,7 @@ var dashboardContract = (0, import_core13.initContract)().router(
|
|
|
4751
4645
|
path: "/message/conversation-activities",
|
|
4752
4646
|
// conversation activity
|
|
4753
4647
|
summary: "Get message contact data",
|
|
4754
|
-
query:
|
|
4648
|
+
query: DashboardQueryparamsSchema,
|
|
4755
4649
|
headers: DefaultHeaderSchema,
|
|
4756
4650
|
responses: {
|
|
4757
4651
|
200: DefaultSuccessResponseSchema.extend({
|
|
@@ -4764,7 +4658,7 @@ var dashboardContract = (0, import_core13.initContract)().router(
|
|
|
4764
4658
|
method: "GET",
|
|
4765
4659
|
path: "/message/status",
|
|
4766
4660
|
summary: "Get room status count by status",
|
|
4767
|
-
query:
|
|
4661
|
+
query: DashboardQueryparamsSchema,
|
|
4768
4662
|
headers: DefaultHeaderSchema,
|
|
4769
4663
|
responses: {
|
|
4770
4664
|
200: DefaultSuccessResponseSchema.extend({
|
|
@@ -4777,7 +4671,7 @@ var dashboardContract = (0, import_core13.initContract)().router(
|
|
|
4777
4671
|
method: "GET",
|
|
4778
4672
|
path: "/message/average",
|
|
4779
4673
|
summary: "Get room status average",
|
|
4780
|
-
query:
|
|
4674
|
+
query: DashboardQueryparamsSchema,
|
|
4781
4675
|
headers: DefaultHeaderSchema,
|
|
4782
4676
|
responses: {
|
|
4783
4677
|
200: DefaultSuccessResponseSchema.extend({
|
|
@@ -4786,74 +4680,37 @@ var dashboardContract = (0, import_core13.initContract)().router(
|
|
|
4786
4680
|
401: DefaultUnauthorizedSchema
|
|
4787
4681
|
}
|
|
4788
4682
|
},
|
|
4789
|
-
exportMessageAverageData: {
|
|
4790
|
-
method: "GET",
|
|
4791
|
-
path: "/export-message-average-data",
|
|
4792
|
-
query: import_zod56.default.object({
|
|
4793
|
-
selectedDate: import_zod56.default.string().min(1),
|
|
4794
|
-
automationQueueId: import_zod56.default.string().uuid().optional(),
|
|
4795
|
-
channelIds: import_zod56.default.array(import_zod56.default.string().uuid()).optional(),
|
|
4796
|
-
fileExtension: ExportFileExtensionSchema
|
|
4797
|
-
}),
|
|
4798
|
-
responses: {
|
|
4799
|
-
200: DefaultSuccessResponseSchema
|
|
4800
|
-
}
|
|
4801
|
-
},
|
|
4802
4683
|
getChannelIncomingMessageCounts: {
|
|
4803
4684
|
method: "GET",
|
|
4804
4685
|
path: "/message/platform",
|
|
4805
4686
|
summary: "Get message platform data",
|
|
4806
|
-
query:
|
|
4687
|
+
query: DashboardQueryparamsSchema,
|
|
4807
4688
|
headers: DefaultHeaderSchema,
|
|
4808
4689
|
responses: {
|
|
4809
4690
|
200: DefaultSuccessResponseSchema.extend({
|
|
4810
|
-
incomingMessageCounts:
|
|
4691
|
+
incomingMessageCounts: import_zod55.default.array(ChannelIncomingMessageSchema)
|
|
4811
4692
|
}),
|
|
4812
4693
|
401: DefaultUnauthorizedSchema
|
|
4813
4694
|
}
|
|
4814
4695
|
},
|
|
4815
|
-
exportRoomChannelCounts: {
|
|
4816
|
-
method: "GET",
|
|
4817
|
-
path: "/export-room-channel-counts",
|
|
4818
|
-
query: DashboardGlobalFiltersSchema.extend({
|
|
4819
|
-
fileExtension: ExportFileExtensionSchema
|
|
4820
|
-
}),
|
|
4821
|
-
responses: {
|
|
4822
|
-
200: DefaultSuccessResponseSchema
|
|
4823
|
-
}
|
|
4824
|
-
},
|
|
4825
4696
|
getMessageRoomStatusDispositionData: {
|
|
4826
4697
|
method: "GET",
|
|
4827
4698
|
path: "/message/disposition",
|
|
4828
4699
|
summary: "Get message room status disposition data",
|
|
4829
|
-
query:
|
|
4830
|
-
automationQueueId: import_zod56.default.string().uuid().optional(),
|
|
4831
|
-
selectedDate: import_zod56.default.string().min(1),
|
|
4832
|
-
channelIds: import_zod56.default.array(import_zod56.default.string().uuid()).optional()
|
|
4833
|
-
}),
|
|
4700
|
+
query: DashboardQueryparamsSchema,
|
|
4834
4701
|
headers: DefaultHeaderSchema,
|
|
4835
4702
|
responses: {
|
|
4836
4703
|
200: DefaultSuccessResponseSchema.extend({
|
|
4837
|
-
messageRoomStatusDispositionData:
|
|
4704
|
+
messageRoomStatusDispositionData: import_zod55.default.array(MessageDispositionSchema).optional()
|
|
4838
4705
|
}),
|
|
4839
4706
|
401: DefaultUnauthorizedSchema
|
|
4840
4707
|
}
|
|
4841
4708
|
},
|
|
4842
|
-
exportRoomDispositionCounts: {
|
|
4843
|
-
method: "GET",
|
|
4844
|
-
path: "/export-room-disposition-counts",
|
|
4845
|
-
query: DashboardGlobalFiltersSchema.extend({
|
|
4846
|
-
fileExtension: ExportFileExtensionSchema
|
|
4847
|
-
}),
|
|
4848
|
-
responses: {
|
|
4849
|
-
200: DefaultSuccessResponseSchema
|
|
4850
|
-
}
|
|
4851
|
-
},
|
|
4852
4709
|
getIncomingMessageByPlatform: {
|
|
4853
4710
|
method: "GET",
|
|
4854
4711
|
path: "/message/incoming",
|
|
4855
4712
|
summary: "Get incoming message by platform",
|
|
4856
|
-
query:
|
|
4713
|
+
query: DashboardQueryparamsSchema,
|
|
4857
4714
|
headers: DefaultHeaderSchema,
|
|
4858
4715
|
responses: {
|
|
4859
4716
|
200: DefaultSuccessResponseSchema.extend({
|
|
@@ -4866,7 +4723,7 @@ var dashboardContract = (0, import_core13.initContract)().router(
|
|
|
4866
4723
|
method: "GET",
|
|
4867
4724
|
path: "/message/total-incoming",
|
|
4868
4725
|
summary: "Get total incoming message data",
|
|
4869
|
-
query:
|
|
4726
|
+
query: DashboardQueryparamsSchema,
|
|
4870
4727
|
headers: DefaultHeaderSchema,
|
|
4871
4728
|
responses: {
|
|
4872
4729
|
200: DefaultSuccessResponseSchema.extend({
|
|
@@ -4875,16 +4732,6 @@ var dashboardContract = (0, import_core13.initContract)().router(
|
|
|
4875
4732
|
401: DefaultUnauthorizedSchema
|
|
4876
4733
|
}
|
|
4877
4734
|
},
|
|
4878
|
-
exportIncomingMessageCounts: {
|
|
4879
|
-
method: "GET",
|
|
4880
|
-
path: "/export-incoming-message-counts",
|
|
4881
|
-
query: DashboardGlobalFiltersSchema.extend({
|
|
4882
|
-
fileExtension: ExportFileExtensionSchema
|
|
4883
|
-
}),
|
|
4884
|
-
responses: {
|
|
4885
|
-
200: DefaultSuccessResponseSchema
|
|
4886
|
-
}
|
|
4887
|
-
},
|
|
4888
4735
|
getCallCounts: {
|
|
4889
4736
|
method: "GET",
|
|
4890
4737
|
path: "/call-counts",
|
|
@@ -4894,198 +4741,22 @@ var dashboardContract = (0, import_core13.initContract)().router(
|
|
|
4894
4741
|
callCounts: CallCountsSchema
|
|
4895
4742
|
})
|
|
4896
4743
|
}
|
|
4897
|
-
},
|
|
4898
|
-
getAllQueueSLA: {
|
|
4899
|
-
method: "GET",
|
|
4900
|
-
path: "/all-queue-sla",
|
|
4901
|
-
query: import_zod56.default.object({ selectedDate: import_zod56.default.string().min(1) }),
|
|
4902
|
-
responses: {
|
|
4903
|
-
200: DefaultSuccessResponseSchema.extend({
|
|
4904
|
-
allQueueSLA: import_zod56.default.number()
|
|
4905
|
-
})
|
|
4906
|
-
}
|
|
4907
|
-
},
|
|
4908
|
-
getAllMessageQueueData: {
|
|
4909
|
-
method: "GET",
|
|
4910
|
-
path: "/all-message-queue-data",
|
|
4911
|
-
query: import_zod56.default.object({
|
|
4912
|
-
selectedDate: import_zod56.default.string().min(1),
|
|
4913
|
-
page: import_zod56.default.coerce.number().positive(),
|
|
4914
|
-
pageSize: import_zod56.default.coerce.number().positive()
|
|
4915
|
-
}),
|
|
4916
|
-
responses: {
|
|
4917
|
-
200: DefaultSuccessResponseSchema.extend({
|
|
4918
|
-
allMessageQueueData: import_zod56.default.array(MessageQueueDataSchema)
|
|
4919
|
-
})
|
|
4920
|
-
}
|
|
4921
|
-
},
|
|
4922
|
-
getMessageQueueData: {
|
|
4923
|
-
method: "GET",
|
|
4924
|
-
path: "/message-queue-data",
|
|
4925
|
-
query: MessageDashboardDetailsQuerySchema,
|
|
4926
|
-
responses: {
|
|
4927
|
-
200: DefaultSuccessResponseSchema.extend({
|
|
4928
|
-
messageQueueData: MessageQueueDataSchema
|
|
4929
|
-
})
|
|
4930
|
-
}
|
|
4931
|
-
},
|
|
4932
|
-
getAgentMessageStatistics: {
|
|
4933
|
-
method: "GET",
|
|
4934
|
-
path: "/agent-message-statistics",
|
|
4935
|
-
query: MessageDashboardDetailsQuerySchema.extend({
|
|
4936
|
-
page: import_zod56.default.coerce.number().positive(),
|
|
4937
|
-
pageSize: import_zod56.default.coerce.number().positive()
|
|
4938
|
-
}),
|
|
4939
|
-
responses: {
|
|
4940
|
-
200: DefaultSuccessResponseSchema.extend({
|
|
4941
|
-
page: import_zod56.default.coerce.number().positive(),
|
|
4942
|
-
pageSize: import_zod56.default.coerce.number().positive(),
|
|
4943
|
-
lastPage: import_zod56.default.coerce.number().positive(),
|
|
4944
|
-
total: import_zod56.default.coerce.number().positive(),
|
|
4945
|
-
agentMessageStatistics: import_zod56.default.array(AgentMessageStatisticsSchema).nullable()
|
|
4946
|
-
})
|
|
4947
|
-
}
|
|
4948
|
-
},
|
|
4949
|
-
exportAgentMessageStatistics: {
|
|
4950
|
-
method: "GET",
|
|
4951
|
-
path: "/export-agent-message-statistics",
|
|
4952
|
-
query: MessageDashboardDetailsQuerySchema.extend({
|
|
4953
|
-
fileExtension: ExportFileExtensionSchema
|
|
4954
|
-
}),
|
|
4955
|
-
responses: {
|
|
4956
|
-
200: DefaultSuccessResponseSchema
|
|
4957
|
-
}
|
|
4958
|
-
},
|
|
4959
|
-
getUserCheckInLogsWithDays: {
|
|
4960
|
-
method: "GET",
|
|
4961
|
-
path: "/user-check-in-logs-with-days",
|
|
4962
|
-
query: import_zod56.default.object({
|
|
4963
|
-
automationQueueId: import_zod56.default.string().uuid().optional(),
|
|
4964
|
-
selectedDate: import_zod56.default.string().min(1),
|
|
4965
|
-
keyword: import_zod56.default.string().optional(),
|
|
4966
|
-
page: import_zod56.default.coerce.number().positive(),
|
|
4967
|
-
pageSize: import_zod56.default.coerce.number().positive()
|
|
4968
|
-
}),
|
|
4969
|
-
responses: {
|
|
4970
|
-
200: DefaultSuccessResponseSchema.extend({
|
|
4971
|
-
page: import_zod56.default.coerce.number().positive(),
|
|
4972
|
-
pageSize: import_zod56.default.coerce.number().positive(),
|
|
4973
|
-
total: import_zod56.default.coerce.number().positive(),
|
|
4974
|
-
userCheckInLogsWithDays: import_zod56.default.array(UserCheckInLogsWithDaySchema)
|
|
4975
|
-
})
|
|
4976
|
-
}
|
|
4977
|
-
},
|
|
4978
|
-
exportUserCheckInLogs: {
|
|
4979
|
-
method: "GET",
|
|
4980
|
-
path: "/export-user-check-in-logs",
|
|
4981
|
-
query: import_zod56.default.object({
|
|
4982
|
-
automationQueueId: import_zod56.default.string().uuid().optional(),
|
|
4983
|
-
selectedDate: import_zod56.default.string().min(1),
|
|
4984
|
-
keyword: import_zod56.default.string().optional(),
|
|
4985
|
-
fileExtension: ExportFileExtensionSchema
|
|
4986
|
-
}),
|
|
4987
|
-
responses: {
|
|
4988
|
-
200: DefaultSuccessResponseSchema
|
|
4989
|
-
}
|
|
4990
|
-
},
|
|
4991
|
-
getRoomStatusCountsByUserId: {
|
|
4992
|
-
method: "GET",
|
|
4993
|
-
path: "/room-status-counts-by-user-id",
|
|
4994
|
-
query: import_zod56.default.object({
|
|
4995
|
-
automationQueueId: import_zod56.default.string().optional(),
|
|
4996
|
-
userId: import_zod56.default.string().uuid(),
|
|
4997
|
-
selectedDate: import_zod56.default.string().min(1)
|
|
4998
|
-
}),
|
|
4999
|
-
responses: {
|
|
5000
|
-
200: DefaultSuccessResponseSchema.extend({
|
|
5001
|
-
assignedRoomCount: import_zod56.default.number(),
|
|
5002
|
-
holdRoomCount: import_zod56.default.number(),
|
|
5003
|
-
closedRoomCount: import_zod56.default.number()
|
|
5004
|
-
})
|
|
5005
|
-
}
|
|
5006
|
-
},
|
|
5007
|
-
getPresenceStatusDurations: {
|
|
5008
|
-
method: "GET",
|
|
5009
|
-
path: "/presence-status-durations",
|
|
5010
|
-
query: import_zod56.default.object({
|
|
5011
|
-
userId: import_zod56.default.string().uuid(),
|
|
5012
|
-
selectedDate: import_zod56.default.string().min(1),
|
|
5013
|
-
page: import_zod56.default.coerce.number().positive(),
|
|
5014
|
-
pageSize: import_zod56.default.coerce.number().positive()
|
|
5015
|
-
}),
|
|
5016
|
-
responses: {
|
|
5017
|
-
200: DefaultSuccessResponseSchema.extend({
|
|
5018
|
-
presenceStatusDurations: import_zod56.default.array(
|
|
5019
|
-
import_zod56.default.object({
|
|
5020
|
-
formattedDate: import_zod56.default.string(),
|
|
5021
|
-
date: import_zod56.default.date(),
|
|
5022
|
-
presenceStatusDurationLogs: import_zod56.default.array(
|
|
5023
|
-
import_zod56.default.object({
|
|
5024
|
-
presenceStatusId: import_zod56.default.string().uuid(),
|
|
5025
|
-
presenceStatusName: import_zod56.default.string(),
|
|
5026
|
-
durationSeconds: import_zod56.default.number().positive()
|
|
5027
|
-
})
|
|
5028
|
-
)
|
|
5029
|
-
})
|
|
5030
|
-
),
|
|
5031
|
-
page: import_zod56.default.coerce.number().positive(),
|
|
5032
|
-
pageSize: import_zod56.default.coerce.number().positive(),
|
|
5033
|
-
total: import_zod56.default.coerce.number().positive()
|
|
5034
|
-
})
|
|
5035
|
-
}
|
|
5036
|
-
},
|
|
5037
|
-
getUserCheckInLogsByUserId: {
|
|
5038
|
-
method: "GET",
|
|
5039
|
-
path: "/user-check-in-logs-by-user-id",
|
|
5040
|
-
query: import_zod56.default.object({
|
|
5041
|
-
automationQueueId: import_zod56.default.string().uuid().optional(),
|
|
5042
|
-
userId: import_zod56.default.string().uuid(),
|
|
5043
|
-
selectedDate: import_zod56.default.string().min(1),
|
|
5044
|
-
page: import_zod56.default.coerce.number().positive(),
|
|
5045
|
-
pageSize: import_zod56.default.coerce.number().positive()
|
|
5046
|
-
}),
|
|
5047
|
-
responses: {
|
|
5048
|
-
200: DefaultSuccessResponseSchema.extend({
|
|
5049
|
-
userCheckInLogs: import_zod56.default.array(
|
|
5050
|
-
import_zod56.default.object({
|
|
5051
|
-
formattedDate: import_zod56.default.string(),
|
|
5052
|
-
day: import_zod56.default.date(),
|
|
5053
|
-
userCheckInLog: UserCheckInLogSchema
|
|
5054
|
-
})
|
|
5055
|
-
),
|
|
5056
|
-
page: import_zod56.default.coerce.number().positive(),
|
|
5057
|
-
pageSize: import_zod56.default.coerce.number().positive(),
|
|
5058
|
-
total: import_zod56.default.coerce.number().positive()
|
|
5059
|
-
})
|
|
5060
|
-
}
|
|
5061
|
-
},
|
|
5062
|
-
exportUserCheckInLogsByUserId: {
|
|
5063
|
-
method: "GET",
|
|
5064
|
-
path: "/export-user-check-in-logs-by-user-id",
|
|
5065
|
-
query: import_zod56.default.object({
|
|
5066
|
-
userId: import_zod56.default.string().uuid(),
|
|
5067
|
-
selectedDate: import_zod56.default.string().min(1),
|
|
5068
|
-
fileExtension: ExportFileExtensionSchema
|
|
5069
|
-
}),
|
|
5070
|
-
responses: {
|
|
5071
|
-
200: DefaultSuccessResponseSchema
|
|
5072
|
-
}
|
|
5073
4744
|
}
|
|
5074
4745
|
},
|
|
5075
4746
|
{
|
|
5076
|
-
pathPrefix: "
|
|
4747
|
+
pathPrefix: "dashboard"
|
|
5077
4748
|
}
|
|
5078
4749
|
);
|
|
5079
4750
|
|
|
5080
4751
|
// src/evaluate-form/index.ts
|
|
5081
|
-
var
|
|
4752
|
+
var import_zod57 = __toESM(require("zod"));
|
|
5082
4753
|
|
|
5083
4754
|
// src/evaluate-form/validation.ts
|
|
5084
|
-
var
|
|
5085
|
-
var CreateEvaluateFormSchema =
|
|
5086
|
-
cxLogId:
|
|
5087
|
-
sentimentScore:
|
|
5088
|
-
csatScore:
|
|
4755
|
+
var import_zod56 = __toESM(require("zod"));
|
|
4756
|
+
var CreateEvaluateFormSchema = import_zod56.default.object({
|
|
4757
|
+
cxLogId: import_zod56.default.string().uuid(),
|
|
4758
|
+
sentimentScore: import_zod56.default.string().nullable().optional(),
|
|
4759
|
+
csatScore: import_zod56.default.string().nullable().optional()
|
|
5089
4760
|
});
|
|
5090
4761
|
var UpdateEvaluateFormSchema = CreateEvaluateFormSchema.partial();
|
|
5091
4762
|
|
|
@@ -5099,30 +4770,30 @@ var evaluateFormContract = (0, import_core14.initContract)().router(
|
|
|
5099
4770
|
body: CreateEvaluateFormSchema,
|
|
5100
4771
|
responses: {
|
|
5101
4772
|
201: DefaultSuccessResponseSchema.extend({
|
|
5102
|
-
message:
|
|
4773
|
+
message: import_zod57.default.string()
|
|
5103
4774
|
}),
|
|
5104
4775
|
401: DefaultUnauthorizedSchema
|
|
5105
4776
|
},
|
|
5106
4777
|
summary: "Create evaluate form"
|
|
5107
4778
|
}
|
|
5108
4779
|
},
|
|
5109
|
-
{ pathPrefix: "
|
|
4780
|
+
{ pathPrefix: "evaluate-forms" }
|
|
5110
4781
|
);
|
|
5111
4782
|
|
|
5112
4783
|
// src/extension/index.ts
|
|
5113
4784
|
var import_core15 = require("@ts-rest/core");
|
|
5114
|
-
var
|
|
4785
|
+
var import_zod59 = __toESM(require("zod"));
|
|
5115
4786
|
|
|
5116
4787
|
// src/extension/validation.ts
|
|
5117
|
-
var
|
|
5118
|
-
var CreateExtensionSchema =
|
|
5119
|
-
userId:
|
|
5120
|
-
sipUserName:
|
|
5121
|
-
sipServerUrl:
|
|
5122
|
-
webphoneLoginUser:
|
|
5123
|
-
extensionId:
|
|
5124
|
-
extensionName:
|
|
5125
|
-
telephonySignature:
|
|
4788
|
+
var import_zod58 = require("zod");
|
|
4789
|
+
var CreateExtensionSchema = import_zod58.z.object({
|
|
4790
|
+
userId: import_zod58.z.string().nullable(),
|
|
4791
|
+
sipUserName: import_zod58.z.string(),
|
|
4792
|
+
sipServerUrl: import_zod58.z.string().optional(),
|
|
4793
|
+
webphoneLoginUser: import_zod58.z.string(),
|
|
4794
|
+
extensionId: import_zod58.z.string().nullable(),
|
|
4795
|
+
extensionName: import_zod58.z.string().nullable(),
|
|
4796
|
+
telephonySignature: import_zod58.z.string().nullable().optional()
|
|
5126
4797
|
});
|
|
5127
4798
|
var UpdateExtensionSchema = CreateExtensionSchema;
|
|
5128
4799
|
|
|
@@ -5138,8 +4809,8 @@ var extensionContract = (0, import_core15.initContract)().router(
|
|
|
5138
4809
|
201: DefaultSuccessResponseSchema.extend({
|
|
5139
4810
|
extension: ExtensionSchema
|
|
5140
4811
|
}),
|
|
5141
|
-
400:
|
|
5142
|
-
message:
|
|
4812
|
+
400: import_zod59.default.object({
|
|
4813
|
+
message: import_zod59.default.string()
|
|
5143
4814
|
}),
|
|
5144
4815
|
401: DefaultUnauthorizedSchema,
|
|
5145
4816
|
404: DefaultNotFoundSchema,
|
|
@@ -5151,33 +4822,33 @@ var extensionContract = (0, import_core15.initContract)().router(
|
|
|
5151
4822
|
getExtensions: {
|
|
5152
4823
|
method: "GET",
|
|
5153
4824
|
path: "",
|
|
5154
|
-
query:
|
|
5155
|
-
page:
|
|
5156
|
-
pageSize:
|
|
5157
|
-
keyword:
|
|
4825
|
+
query: import_zod59.default.object({
|
|
4826
|
+
page: import_zod59.default.coerce.number().default(1),
|
|
4827
|
+
pageSize: import_zod59.default.coerce.number().default(10),
|
|
4828
|
+
keyword: import_zod59.default.string().optional()
|
|
5158
4829
|
}).optional(),
|
|
5159
4830
|
headers: DefaultHeaderSchema,
|
|
5160
4831
|
responses: {
|
|
5161
4832
|
200: WithPagination(
|
|
5162
4833
|
// The response data should contain the user relation.
|
|
5163
4834
|
ExtensionSchema.extend({
|
|
5164
|
-
user:
|
|
5165
|
-
id:
|
|
5166
|
-
createdAt:
|
|
5167
|
-
updatedAt:
|
|
5168
|
-
deletedAt:
|
|
5169
|
-
name:
|
|
5170
|
-
email:
|
|
5171
|
-
emailVerifiedAt:
|
|
5172
|
-
password:
|
|
5173
|
-
address:
|
|
5174
|
-
phone:
|
|
5175
|
-
notificationCount:
|
|
4835
|
+
user: import_zod59.default.object({
|
|
4836
|
+
id: import_zod59.default.string().uuid(),
|
|
4837
|
+
createdAt: import_zod59.default.date(),
|
|
4838
|
+
updatedAt: import_zod59.default.date(),
|
|
4839
|
+
deletedAt: import_zod59.default.date().nullable(),
|
|
4840
|
+
name: import_zod59.default.string(),
|
|
4841
|
+
email: import_zod59.default.string().email(),
|
|
4842
|
+
emailVerifiedAt: import_zod59.default.date().nullable(),
|
|
4843
|
+
password: import_zod59.default.string(),
|
|
4844
|
+
address: import_zod59.default.string().nullable(),
|
|
4845
|
+
phone: import_zod59.default.string().nullable(),
|
|
4846
|
+
notificationCount: import_zod59.default.number().nullable()
|
|
5176
4847
|
})
|
|
5177
4848
|
})
|
|
5178
4849
|
),
|
|
5179
|
-
400:
|
|
5180
|
-
message:
|
|
4850
|
+
400: import_zod59.default.object({
|
|
4851
|
+
message: import_zod59.default.string()
|
|
5181
4852
|
}),
|
|
5182
4853
|
401: DefaultUnauthorizedSchema,
|
|
5183
4854
|
404: DefaultNotFoundSchema,
|
|
@@ -5189,12 +4860,12 @@ var extensionContract = (0, import_core15.initContract)().router(
|
|
|
5189
4860
|
getExtensionByUserId: {
|
|
5190
4861
|
method: "GET",
|
|
5191
4862
|
path: "/user/:userId",
|
|
5192
|
-
pathParams:
|
|
4863
|
+
pathParams: import_zod59.default.object({ userId: import_zod59.default.string() }),
|
|
5193
4864
|
headers: DefaultHeaderSchema,
|
|
5194
4865
|
responses: {
|
|
5195
4866
|
200: ExtensionSchema,
|
|
5196
|
-
400:
|
|
5197
|
-
message:
|
|
4867
|
+
400: import_zod59.default.object({
|
|
4868
|
+
message: import_zod59.default.string()
|
|
5198
4869
|
}),
|
|
5199
4870
|
401: DefaultUnauthorizedSchema,
|
|
5200
4871
|
404: DefaultNotFoundSchema,
|
|
@@ -5206,16 +4877,16 @@ var extensionContract = (0, import_core15.initContract)().router(
|
|
|
5206
4877
|
getExtensionByDialpad: {
|
|
5207
4878
|
method: "GET",
|
|
5208
4879
|
path: "/dialpad",
|
|
5209
|
-
query:
|
|
5210
|
-
page:
|
|
5211
|
-
pageSize:
|
|
5212
|
-
keyword:
|
|
4880
|
+
query: import_zod59.default.object({
|
|
4881
|
+
page: import_zod59.default.coerce.number().default(1),
|
|
4882
|
+
pageSize: import_zod59.default.coerce.number().default(10),
|
|
4883
|
+
keyword: import_zod59.default.string().optional()
|
|
5213
4884
|
}).optional(),
|
|
5214
4885
|
headers: DefaultHeaderSchema,
|
|
5215
4886
|
responses: {
|
|
5216
4887
|
200: WithPagination(ExtensionSchema),
|
|
5217
|
-
400:
|
|
5218
|
-
message:
|
|
4888
|
+
400: import_zod59.default.object({
|
|
4889
|
+
message: import_zod59.default.string()
|
|
5219
4890
|
}),
|
|
5220
4891
|
401: DefaultUnauthorizedSchema,
|
|
5221
4892
|
404: DefaultNotFoundSchema,
|
|
@@ -5227,15 +4898,15 @@ var extensionContract = (0, import_core15.initContract)().router(
|
|
|
5227
4898
|
updateExtension: {
|
|
5228
4899
|
method: "PATCH",
|
|
5229
4900
|
path: "/:id",
|
|
5230
|
-
pathParams:
|
|
4901
|
+
pathParams: import_zod59.default.object({ id: import_zod59.default.string() }),
|
|
5231
4902
|
headers: DefaultHeaderSchema,
|
|
5232
4903
|
body: UpdateExtensionSchema,
|
|
5233
4904
|
responses: {
|
|
5234
4905
|
200: DefaultSuccessResponseSchema.extend({
|
|
5235
4906
|
extension: ExtensionSchema
|
|
5236
4907
|
}),
|
|
5237
|
-
400:
|
|
5238
|
-
message:
|
|
4908
|
+
400: import_zod59.default.object({
|
|
4909
|
+
message: import_zod59.default.string()
|
|
5239
4910
|
}),
|
|
5240
4911
|
401: DefaultUnauthorizedSchema,
|
|
5241
4912
|
404: DefaultNotFoundSchema,
|
|
@@ -5247,13 +4918,13 @@ var extensionContract = (0, import_core15.initContract)().router(
|
|
|
5247
4918
|
deleteExtension: {
|
|
5248
4919
|
method: "DELETE",
|
|
5249
4920
|
path: "/:id",
|
|
5250
|
-
pathParams:
|
|
4921
|
+
pathParams: import_zod59.default.object({ id: import_zod59.default.string() }),
|
|
5251
4922
|
headers: DefaultHeaderSchema,
|
|
5252
4923
|
body: null,
|
|
5253
4924
|
responses: {
|
|
5254
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
|
5255
|
-
400:
|
|
5256
|
-
message:
|
|
4925
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod59.default.string() }),
|
|
4926
|
+
400: import_zod59.default.object({
|
|
4927
|
+
message: import_zod59.default.string()
|
|
5257
4928
|
}),
|
|
5258
4929
|
401: DefaultUnauthorizedSchema,
|
|
5259
4930
|
404: DefaultNotFoundSchema,
|
|
@@ -5269,10 +4940,10 @@ var extensionContract = (0, import_core15.initContract)().router(
|
|
|
5269
4940
|
body: null,
|
|
5270
4941
|
responses: {
|
|
5271
4942
|
200: DefaultSuccessResponseSchema.extend({
|
|
5272
|
-
message:
|
|
4943
|
+
message: import_zod59.default.string()
|
|
5273
4944
|
}),
|
|
5274
|
-
400:
|
|
5275
|
-
message:
|
|
4945
|
+
400: import_zod59.default.object({
|
|
4946
|
+
message: import_zod59.default.string()
|
|
5276
4947
|
}),
|
|
5277
4948
|
401: DefaultUnauthorizedSchema,
|
|
5278
4949
|
404: DefaultNotFoundSchema,
|
|
@@ -5282,12 +4953,12 @@ var extensionContract = (0, import_core15.initContract)().router(
|
|
|
5282
4953
|
summary: "Request new extension."
|
|
5283
4954
|
}
|
|
5284
4955
|
},
|
|
5285
|
-
{ pathPrefix: "
|
|
4956
|
+
{ pathPrefix: "extension" }
|
|
5286
4957
|
);
|
|
5287
4958
|
|
|
5288
4959
|
// src/instagram/index.ts
|
|
5289
4960
|
var import_core16 = require("@ts-rest/core");
|
|
5290
|
-
var
|
|
4961
|
+
var import_zod60 = __toESM(require("zod"));
|
|
5291
4962
|
var instagramContract = (0, import_core16.initContract)().router({
|
|
5292
4963
|
sendMessage: {
|
|
5293
4964
|
method: "POST",
|
|
@@ -5321,8 +4992,8 @@ var instagramContract = (0, import_core16.initContract)().router({
|
|
|
5321
4992
|
reconnect: {
|
|
5322
4993
|
method: "POST",
|
|
5323
4994
|
path: "/reconnect/:channelId",
|
|
5324
|
-
pathParams:
|
|
5325
|
-
channelId:
|
|
4995
|
+
pathParams: import_zod60.default.object({
|
|
4996
|
+
channelId: import_zod60.default.string().uuid()
|
|
5326
4997
|
}),
|
|
5327
4998
|
body: null,
|
|
5328
4999
|
responses: {
|
|
@@ -5334,8 +5005,8 @@ var instagramContract = (0, import_core16.initContract)().router({
|
|
|
5334
5005
|
delete: {
|
|
5335
5006
|
method: "DELETE",
|
|
5336
5007
|
path: "/delete/:channelId",
|
|
5337
|
-
pathParams:
|
|
5338
|
-
channelId:
|
|
5008
|
+
pathParams: import_zod60.default.object({
|
|
5009
|
+
channelId: import_zod60.default.string().uuid()
|
|
5339
5010
|
}),
|
|
5340
5011
|
body: null,
|
|
5341
5012
|
responses: {
|
|
@@ -5376,84 +5047,84 @@ var instagramContract = (0, import_core16.initContract)().router({
|
|
|
5376
5047
|
|
|
5377
5048
|
// src/line/index.ts
|
|
5378
5049
|
var import_core17 = require("@ts-rest/core");
|
|
5379
|
-
var
|
|
5050
|
+
var import_zod63 = __toESM(require("zod"));
|
|
5380
5051
|
|
|
5381
5052
|
// src/line/schema.ts
|
|
5382
|
-
var
|
|
5053
|
+
var import_zod61 = __toESM(require("zod"));
|
|
5383
5054
|
var ConnectLineService = ConnectLineChannelSchema.extend({
|
|
5384
|
-
actor:
|
|
5385
|
-
id:
|
|
5386
|
-
name:
|
|
5387
|
-
email:
|
|
5388
|
-
address:
|
|
5389
|
-
phone:
|
|
5055
|
+
actor: import_zod61.default.object({
|
|
5056
|
+
id: import_zod61.default.string().uuid(),
|
|
5057
|
+
name: import_zod61.default.string(),
|
|
5058
|
+
email: import_zod61.default.string().email(),
|
|
5059
|
+
address: import_zod61.default.string().nullable(),
|
|
5060
|
+
phone: import_zod61.default.string().nullable()
|
|
5390
5061
|
}).optional()
|
|
5391
5062
|
});
|
|
5392
5063
|
|
|
5393
5064
|
// src/line/validation.ts
|
|
5394
|
-
var
|
|
5395
|
-
var SendLineStickerSchema =
|
|
5396
|
-
packageId:
|
|
5397
|
-
stickerId:
|
|
5398
|
-
room:
|
|
5399
|
-
id:
|
|
5400
|
-
lastMessage:
|
|
5401
|
-
handleTime:
|
|
5402
|
-
isLatest:
|
|
5065
|
+
var import_zod62 = __toESM(require("zod"));
|
|
5066
|
+
var SendLineStickerSchema = import_zod62.default.object({
|
|
5067
|
+
packageId: import_zod62.default.number(),
|
|
5068
|
+
stickerId: import_zod62.default.number(),
|
|
5069
|
+
room: import_zod62.default.object({
|
|
5070
|
+
id: import_zod62.default.string().uuid(),
|
|
5071
|
+
lastMessage: import_zod62.default.string().optional(),
|
|
5072
|
+
handleTime: import_zod62.default.number().optional(),
|
|
5073
|
+
isLatest: import_zod62.default.boolean(),
|
|
5403
5074
|
direction: MessageDirectionTypeSchema,
|
|
5404
|
-
platformContact:
|
|
5405
|
-
channelId:
|
|
5406
|
-
socialPlatformId:
|
|
5075
|
+
platformContact: import_zod62.default.object({
|
|
5076
|
+
channelId: import_zod62.default.string().uuid(),
|
|
5077
|
+
socialPlatformId: import_zod62.default.string().nullable(),
|
|
5407
5078
|
type: ChannelTypeSchema,
|
|
5408
5079
|
metadata: PlatformContactMetadataSchema,
|
|
5409
|
-
contact:
|
|
5410
|
-
name:
|
|
5411
|
-
address:
|
|
5412
|
-
channel:
|
|
5413
|
-
notes:
|
|
5414
|
-
contactProfile:
|
|
5415
|
-
socialProfileUrl:
|
|
5080
|
+
contact: import_zod62.default.object({
|
|
5081
|
+
name: import_zod62.default.string(),
|
|
5082
|
+
address: import_zod62.default.string().nullable(),
|
|
5083
|
+
channel: import_zod62.default.string().nullable(),
|
|
5084
|
+
notes: import_zod62.default.string().nullable(),
|
|
5085
|
+
contactProfile: import_zod62.default.string().nullable(),
|
|
5086
|
+
socialProfileUrl: import_zod62.default.string().nullable()
|
|
5416
5087
|
})
|
|
5417
5088
|
}),
|
|
5418
|
-
actor:
|
|
5419
|
-
name:
|
|
5420
|
-
email:
|
|
5421
|
-
address:
|
|
5422
|
-
phone:
|
|
5089
|
+
actor: import_zod62.default.object({
|
|
5090
|
+
name: import_zod62.default.string(),
|
|
5091
|
+
email: import_zod62.default.string().email(),
|
|
5092
|
+
address: import_zod62.default.string().nullable(),
|
|
5093
|
+
phone: import_zod62.default.string().nullable()
|
|
5423
5094
|
}).nullable(),
|
|
5424
5095
|
channel: ChannelSchema2
|
|
5425
5096
|
}),
|
|
5426
|
-
message:
|
|
5427
|
-
message:
|
|
5097
|
+
message: import_zod62.default.object({
|
|
5098
|
+
message: import_zod62.default.string().optional(),
|
|
5428
5099
|
direction: MessageDirectionTypeSchema,
|
|
5429
5100
|
type: MessageTypeSchema,
|
|
5430
|
-
readAt:
|
|
5431
|
-
metadata:
|
|
5432
|
-
platformId:
|
|
5433
|
-
platformMessageId:
|
|
5434
|
-
replyPlatformMessageId:
|
|
5435
|
-
template:
|
|
5101
|
+
readAt: import_zod62.default.date().optional(),
|
|
5102
|
+
metadata: import_zod62.default.any().optional(),
|
|
5103
|
+
platformId: import_zod62.default.string().optional(),
|
|
5104
|
+
platformMessageId: import_zod62.default.string().optional(),
|
|
5105
|
+
replyPlatformMessageId: import_zod62.default.string().optional(),
|
|
5106
|
+
template: import_zod62.default.any().optional(),
|
|
5436
5107
|
locale: MessageLocaleTypeSchema.optional(),
|
|
5437
|
-
url:
|
|
5438
|
-
previewUrl:
|
|
5439
|
-
imageSetId:
|
|
5440
|
-
upload:
|
|
5441
|
-
bucketName:
|
|
5442
|
-
fileName:
|
|
5443
|
-
fileSize:
|
|
5444
|
-
fileKey:
|
|
5108
|
+
url: import_zod62.default.string().optional(),
|
|
5109
|
+
previewUrl: import_zod62.default.string().optional(),
|
|
5110
|
+
imageSetId: import_zod62.default.string().optional(),
|
|
5111
|
+
upload: import_zod62.default.object({
|
|
5112
|
+
bucketName: import_zod62.default.string(),
|
|
5113
|
+
fileName: import_zod62.default.string(),
|
|
5114
|
+
fileSize: import_zod62.default.number(),
|
|
5115
|
+
fileKey: import_zod62.default.string()
|
|
5445
5116
|
}).optional(),
|
|
5446
|
-
sender:
|
|
5447
|
-
name:
|
|
5448
|
-
email:
|
|
5449
|
-
address:
|
|
5450
|
-
phone:
|
|
5117
|
+
sender: import_zod62.default.object({
|
|
5118
|
+
name: import_zod62.default.string(),
|
|
5119
|
+
email: import_zod62.default.string().email(),
|
|
5120
|
+
address: import_zod62.default.string().nullable(),
|
|
5121
|
+
phone: import_zod62.default.string().nullable()
|
|
5451
5122
|
})
|
|
5452
5123
|
})
|
|
5453
5124
|
});
|
|
5454
|
-
var createUserLevelRichMenuSchema =
|
|
5455
|
-
linePlatformUserId:
|
|
5456
|
-
channelId:
|
|
5125
|
+
var createUserLevelRichMenuSchema = import_zod62.default.object({
|
|
5126
|
+
linePlatformUserId: import_zod62.default.string(),
|
|
5127
|
+
channelId: import_zod62.default.string()
|
|
5457
5128
|
});
|
|
5458
5129
|
|
|
5459
5130
|
// src/line/index.ts
|
|
@@ -5463,7 +5134,7 @@ var lineContract = (0, import_core17.initContract)().router({
|
|
|
5463
5134
|
path: "sticker",
|
|
5464
5135
|
responses: {
|
|
5465
5136
|
200: DefaultSuccessResponseSchema.extend({
|
|
5466
|
-
data:
|
|
5137
|
+
data: import_zod63.default.any()
|
|
5467
5138
|
}),
|
|
5468
5139
|
500: DefaultErrorResponseSchema
|
|
5469
5140
|
},
|
|
@@ -5486,7 +5157,7 @@ var lineContract = (0, import_core17.initContract)().router({
|
|
|
5486
5157
|
path: "/message",
|
|
5487
5158
|
body: SendMessageToPlatformSchema,
|
|
5488
5159
|
responses: {
|
|
5489
|
-
200:
|
|
5160
|
+
200: import_zod63.default.union([SendMessageResponseSchema, import_zod63.default.literal("TALK TO AGENT")]),
|
|
5490
5161
|
500: DefaultErrorResponseSchema
|
|
5491
5162
|
}
|
|
5492
5163
|
},
|
|
@@ -5503,8 +5174,8 @@ var lineContract = (0, import_core17.initContract)().router({
|
|
|
5503
5174
|
reconnect: {
|
|
5504
5175
|
method: "POST",
|
|
5505
5176
|
path: "/reconnect/:channelId",
|
|
5506
|
-
pathParams:
|
|
5507
|
-
channelId:
|
|
5177
|
+
pathParams: import_zod63.default.object({
|
|
5178
|
+
channelId: import_zod63.default.string().uuid()
|
|
5508
5179
|
}),
|
|
5509
5180
|
body: null,
|
|
5510
5181
|
responses: {
|
|
@@ -5516,8 +5187,8 @@ var lineContract = (0, import_core17.initContract)().router({
|
|
|
5516
5187
|
delete: {
|
|
5517
5188
|
method: "DELETE",
|
|
5518
5189
|
path: "/delete/:channelId",
|
|
5519
|
-
pathParams:
|
|
5520
|
-
channelId:
|
|
5190
|
+
pathParams: import_zod63.default.object({
|
|
5191
|
+
channelId: import_zod63.default.string().uuid()
|
|
5521
5192
|
}),
|
|
5522
5193
|
body: null,
|
|
5523
5194
|
responses: {
|
|
@@ -5539,28 +5210,25 @@ var lineContract = (0, import_core17.initContract)().router({
|
|
|
5539
5210
|
|
|
5540
5211
|
// src/mail/email-engine-webhooks-events.contract.ts
|
|
5541
5212
|
var import_core18 = require("@ts-rest/core");
|
|
5542
|
-
var
|
|
5543
|
-
var emailEngineWebhooksEventsContract = (0, import_core18.initContract)().router(
|
|
5544
|
-
{
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
|
|
5548
|
-
|
|
5549
|
-
|
|
5550
|
-
|
|
5551
|
-
|
|
5552
|
-
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
|
|
5556
|
-
|
|
5557
|
-
},
|
|
5558
|
-
{ pathPrefix: "ms" }
|
|
5559
|
-
);
|
|
5213
|
+
var import_zod64 = __toESM(require("zod"));
|
|
5214
|
+
var emailEngineWebhooksEventsContract = (0, import_core18.initContract)().router({
|
|
5215
|
+
handleWebhooksEvents: {
|
|
5216
|
+
method: "POST",
|
|
5217
|
+
path: "/email_engine/webhooks",
|
|
5218
|
+
// we don't need to respone anything but added responses just for solving type error
|
|
5219
|
+
responses: {
|
|
5220
|
+
200: DefaultSuccessResponseSchema.extend({
|
|
5221
|
+
message: import_zod64.default.string()
|
|
5222
|
+
})
|
|
5223
|
+
},
|
|
5224
|
+
body: null,
|
|
5225
|
+
summary: "Handle email engine webhooks events such as authenticationSuccess, messageNew"
|
|
5226
|
+
}
|
|
5227
|
+
});
|
|
5560
5228
|
|
|
5561
5229
|
// src/messenger/index.ts
|
|
5562
5230
|
var import_core19 = require("@ts-rest/core");
|
|
5563
|
-
var
|
|
5231
|
+
var import_zod65 = __toESM(require("zod"));
|
|
5564
5232
|
var messengerContract = (0, import_core19.initContract)().router({
|
|
5565
5233
|
sendMessage: {
|
|
5566
5234
|
method: "POST",
|
|
@@ -5595,8 +5263,8 @@ var messengerContract = (0, import_core19.initContract)().router({
|
|
|
5595
5263
|
reconnect: {
|
|
5596
5264
|
method: "POST",
|
|
5597
5265
|
path: "/reconnect/:channelId",
|
|
5598
|
-
pathParams:
|
|
5599
|
-
channelId:
|
|
5266
|
+
pathParams: import_zod65.default.object({
|
|
5267
|
+
channelId: import_zod65.default.string().uuid()
|
|
5600
5268
|
}),
|
|
5601
5269
|
body: null,
|
|
5602
5270
|
responses: {
|
|
@@ -5608,8 +5276,8 @@ var messengerContract = (0, import_core19.initContract)().router({
|
|
|
5608
5276
|
delete: {
|
|
5609
5277
|
method: "DELETE",
|
|
5610
5278
|
path: "/delete/:channelId",
|
|
5611
|
-
pathParams:
|
|
5612
|
-
channelId:
|
|
5279
|
+
pathParams: import_zod65.default.object({
|
|
5280
|
+
channelId: import_zod65.default.string().uuid()
|
|
5613
5281
|
}),
|
|
5614
5282
|
body: null,
|
|
5615
5283
|
responses: {
|
|
@@ -5640,9 +5308,9 @@ var messengerContract = (0, import_core19.initContract)().router({
|
|
|
5640
5308
|
getFacebookBusinesses: {
|
|
5641
5309
|
method: "GET",
|
|
5642
5310
|
path: "/facebook-businesses",
|
|
5643
|
-
query:
|
|
5644
|
-
userId:
|
|
5645
|
-
userAccessToken:
|
|
5311
|
+
query: import_zod65.default.object({
|
|
5312
|
+
userId: import_zod65.default.string(),
|
|
5313
|
+
userAccessToken: import_zod65.default.string()
|
|
5646
5314
|
}),
|
|
5647
5315
|
responses: {
|
|
5648
5316
|
200: DefaultSuccessResponseSchema,
|
|
@@ -5652,9 +5320,9 @@ var messengerContract = (0, import_core19.initContract)().router({
|
|
|
5652
5320
|
getFacebookBusinessPages: {
|
|
5653
5321
|
method: "GET",
|
|
5654
5322
|
path: "/facebook-business-pages",
|
|
5655
|
-
query:
|
|
5656
|
-
businessId:
|
|
5657
|
-
userAccessToken:
|
|
5323
|
+
query: import_zod65.default.object({
|
|
5324
|
+
businessId: import_zod65.default.string(),
|
|
5325
|
+
userAccessToken: import_zod65.default.string()
|
|
5658
5326
|
}),
|
|
5659
5327
|
responses: {
|
|
5660
5328
|
200: DefaultSuccessResponseSchema,
|
|
@@ -5674,7 +5342,7 @@ var messengerContract = (0, import_core19.initContract)().router({
|
|
|
5674
5342
|
|
|
5675
5343
|
// src/permission/index.ts
|
|
5676
5344
|
var import_core20 = require("@ts-rest/core");
|
|
5677
|
-
var
|
|
5345
|
+
var import_zod66 = __toESM(require("zod"));
|
|
5678
5346
|
var permissionContract = (0, import_core20.initContract)().router(
|
|
5679
5347
|
{
|
|
5680
5348
|
getPermissions: {
|
|
@@ -5682,9 +5350,9 @@ var permissionContract = (0, import_core20.initContract)().router(
|
|
|
5682
5350
|
path: "",
|
|
5683
5351
|
headers: DefaultHeaderSchema,
|
|
5684
5352
|
responses: {
|
|
5685
|
-
200:
|
|
5686
|
-
400:
|
|
5687
|
-
message:
|
|
5353
|
+
200: import_zod66.default.object({ permissions: PermissionSchema.array() }),
|
|
5354
|
+
400: import_zod66.default.object({
|
|
5355
|
+
message: import_zod66.default.string()
|
|
5688
5356
|
}),
|
|
5689
5357
|
401: DefaultUnauthorizedSchema,
|
|
5690
5358
|
500: DefaultErrorResponseSchema
|
|
@@ -5692,20 +5360,20 @@ var permissionContract = (0, import_core20.initContract)().router(
|
|
|
5692
5360
|
summary: "Get all permissions"
|
|
5693
5361
|
}
|
|
5694
5362
|
},
|
|
5695
|
-
{ pathPrefix: "
|
|
5363
|
+
{ pathPrefix: "permission" }
|
|
5696
5364
|
);
|
|
5697
5365
|
|
|
5698
5366
|
// src/role/index.ts
|
|
5699
5367
|
var import_core21 = require("@ts-rest/core");
|
|
5700
|
-
var
|
|
5368
|
+
var import_zod68 = __toESM(require("zod"));
|
|
5701
5369
|
|
|
5702
5370
|
// src/role/validation.ts
|
|
5703
|
-
var
|
|
5704
|
-
var CreateRoleSchema =
|
|
5705
|
-
systemName:
|
|
5706
|
-
displayName:
|
|
5707
|
-
description:
|
|
5708
|
-
permissions:
|
|
5371
|
+
var import_zod67 = require("zod");
|
|
5372
|
+
var CreateRoleSchema = import_zod67.z.object({
|
|
5373
|
+
systemName: import_zod67.z.string(),
|
|
5374
|
+
displayName: import_zod67.z.string(),
|
|
5375
|
+
description: import_zod67.z.string().nullable(),
|
|
5376
|
+
permissions: import_zod67.z.array(import_zod67.z.string())
|
|
5709
5377
|
});
|
|
5710
5378
|
var UpdateRoleSchema = CreateRoleSchema;
|
|
5711
5379
|
|
|
@@ -5721,8 +5389,8 @@ var roleContract = (0, import_core21.initContract)().router(
|
|
|
5721
5389
|
201: DefaultSuccessResponseSchema.extend({
|
|
5722
5390
|
role: RoleSchema
|
|
5723
5391
|
}),
|
|
5724
|
-
400:
|
|
5725
|
-
message:
|
|
5392
|
+
400: import_zod68.default.object({
|
|
5393
|
+
message: import_zod68.default.string()
|
|
5726
5394
|
}),
|
|
5727
5395
|
401: DefaultUnauthorizedSchema,
|
|
5728
5396
|
500: DefaultErrorResponseSchema
|
|
@@ -5732,17 +5400,17 @@ var roleContract = (0, import_core21.initContract)().router(
|
|
|
5732
5400
|
getRoles: {
|
|
5733
5401
|
method: "GET",
|
|
5734
5402
|
path: "",
|
|
5735
|
-
query:
|
|
5736
|
-
page:
|
|
5737
|
-
pageSize:
|
|
5403
|
+
query: import_zod68.default.object({
|
|
5404
|
+
page: import_zod68.default.coerce.number().default(1),
|
|
5405
|
+
pageSize: import_zod68.default.coerce.number().default(10)
|
|
5738
5406
|
}).optional(),
|
|
5739
5407
|
headers: DefaultHeaderSchema,
|
|
5740
5408
|
responses: {
|
|
5741
5409
|
200: WithPagination(RoleSchema).extend({
|
|
5742
5410
|
roleUserCount: RoleUserCountSchema
|
|
5743
5411
|
}),
|
|
5744
|
-
400:
|
|
5745
|
-
message:
|
|
5412
|
+
400: import_zod68.default.object({
|
|
5413
|
+
message: import_zod68.default.string()
|
|
5746
5414
|
}),
|
|
5747
5415
|
401: DefaultUnauthorizedSchema,
|
|
5748
5416
|
500: DefaultErrorResponseSchema
|
|
@@ -5752,15 +5420,15 @@ var roleContract = (0, import_core21.initContract)().router(
|
|
|
5752
5420
|
updateRole: {
|
|
5753
5421
|
method: "PATCH",
|
|
5754
5422
|
path: "/:id",
|
|
5755
|
-
pathParams:
|
|
5423
|
+
pathParams: import_zod68.default.object({ id: import_zod68.default.string() }),
|
|
5756
5424
|
headers: DefaultHeaderSchema,
|
|
5757
5425
|
body: UpdateRoleSchema,
|
|
5758
5426
|
responses: {
|
|
5759
5427
|
201: DefaultSuccessResponseSchema.extend({
|
|
5760
5428
|
role: RoleSchema
|
|
5761
5429
|
}),
|
|
5762
|
-
400:
|
|
5763
|
-
message:
|
|
5430
|
+
400: import_zod68.default.object({
|
|
5431
|
+
message: import_zod68.default.string()
|
|
5764
5432
|
}),
|
|
5765
5433
|
401: DefaultUnauthorizedSchema,
|
|
5766
5434
|
500: DefaultErrorResponseSchema
|
|
@@ -5770,11 +5438,11 @@ var roleContract = (0, import_core21.initContract)().router(
|
|
|
5770
5438
|
deleteRole: {
|
|
5771
5439
|
method: "DELETE",
|
|
5772
5440
|
path: "/:id",
|
|
5773
|
-
pathParams:
|
|
5441
|
+
pathParams: import_zod68.default.object({ id: import_zod68.default.string() }),
|
|
5774
5442
|
headers: DefaultHeaderSchema,
|
|
5775
5443
|
body: null,
|
|
5776
5444
|
responses: {
|
|
5777
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
|
5445
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod68.default.string() }),
|
|
5778
5446
|
500: DefaultErrorResponseSchema
|
|
5779
5447
|
},
|
|
5780
5448
|
summary: "Delete a role."
|
|
@@ -5782,12 +5450,12 @@ var roleContract = (0, import_core21.initContract)().router(
|
|
|
5782
5450
|
getRoleById: {
|
|
5783
5451
|
method: "GET",
|
|
5784
5452
|
path: "/:id",
|
|
5785
|
-
pathParams:
|
|
5453
|
+
pathParams: import_zod68.default.object({ id: import_zod68.default.string() }),
|
|
5786
5454
|
headers: DefaultHeaderSchema,
|
|
5787
5455
|
responses: {
|
|
5788
5456
|
200: RoleSchema,
|
|
5789
|
-
400:
|
|
5790
|
-
message:
|
|
5457
|
+
400: import_zod68.default.object({
|
|
5458
|
+
message: import_zod68.default.string()
|
|
5791
5459
|
}),
|
|
5792
5460
|
401: DefaultUnauthorizedSchema,
|
|
5793
5461
|
500: DefaultErrorResponseSchema
|
|
@@ -5795,24 +5463,24 @@ var roleContract = (0, import_core21.initContract)().router(
|
|
|
5795
5463
|
summary: "Get role by Id"
|
|
5796
5464
|
}
|
|
5797
5465
|
},
|
|
5798
|
-
{ pathPrefix: "
|
|
5466
|
+
{ pathPrefix: "role" }
|
|
5799
5467
|
);
|
|
5800
5468
|
|
|
5801
5469
|
// src/tag/index.ts
|
|
5802
5470
|
var import_core22 = require("@ts-rest/core");
|
|
5803
|
-
var
|
|
5471
|
+
var import_zod70 = __toESM(require("zod"));
|
|
5804
5472
|
|
|
5805
5473
|
// src/tag/validation.ts
|
|
5806
|
-
var
|
|
5807
|
-
var CreateTagSchema =
|
|
5808
|
-
name:
|
|
5474
|
+
var import_zod69 = require("zod");
|
|
5475
|
+
var CreateTagSchema = import_zod69.z.object({
|
|
5476
|
+
name: import_zod69.z.string(),
|
|
5809
5477
|
group: TagGroupSchema
|
|
5810
5478
|
});
|
|
5811
|
-
var GetTagsSchema =
|
|
5479
|
+
var GetTagsSchema = import_zod69.z.object({
|
|
5812
5480
|
group: TagGroupSchema.default("general"),
|
|
5813
|
-
keyword:
|
|
5481
|
+
keyword: import_zod69.z.string()
|
|
5814
5482
|
}).partial().optional();
|
|
5815
|
-
var UpdateTagSchema =
|
|
5483
|
+
var UpdateTagSchema = import_zod69.z.object({ name: import_zod69.z.string() });
|
|
5816
5484
|
|
|
5817
5485
|
// src/tag/index.ts
|
|
5818
5486
|
var tagContract = (0, import_core22.initContract)().router(
|
|
@@ -5835,7 +5503,7 @@ var tagContract = (0, import_core22.initContract)().router(
|
|
|
5835
5503
|
query: GetTagsSchema,
|
|
5836
5504
|
responses: {
|
|
5837
5505
|
200: DefaultSuccessResponseSchema.extend({
|
|
5838
|
-
tags:
|
|
5506
|
+
tags: import_zod70.default.array(TagSchema)
|
|
5839
5507
|
}),
|
|
5840
5508
|
500: DefaultErrorResponseSchema
|
|
5841
5509
|
},
|
|
@@ -5844,7 +5512,7 @@ var tagContract = (0, import_core22.initContract)().router(
|
|
|
5844
5512
|
updateTag: {
|
|
5845
5513
|
method: "PATCH",
|
|
5846
5514
|
path: "/:id",
|
|
5847
|
-
pathParams:
|
|
5515
|
+
pathParams: import_zod70.default.object({ id: import_zod70.default.string() }),
|
|
5848
5516
|
body: UpdateTagSchema,
|
|
5849
5517
|
responses: {
|
|
5850
5518
|
200: DefaultSuccessResponseSchema.extend({
|
|
@@ -5857,18 +5525,18 @@ var tagContract = (0, import_core22.initContract)().router(
|
|
|
5857
5525
|
deleteTag: {
|
|
5858
5526
|
method: "DELETE",
|
|
5859
5527
|
path: "/:id",
|
|
5860
|
-
pathParams:
|
|
5861
|
-
body:
|
|
5528
|
+
pathParams: import_zod70.default.object({ id: import_zod70.default.string() }),
|
|
5529
|
+
body: import_zod70.default.any().optional(),
|
|
5862
5530
|
// We don't need the body.
|
|
5863
5531
|
responses: {
|
|
5864
|
-
200: DefaultSuccessResponseSchema.extend({ message:
|
|
5532
|
+
200: DefaultSuccessResponseSchema.extend({ message: import_zod70.default.string() }),
|
|
5865
5533
|
500: DefaultErrorResponseSchema
|
|
5866
5534
|
},
|
|
5867
5535
|
headers: DefaultHeaderSchema
|
|
5868
5536
|
}
|
|
5869
5537
|
},
|
|
5870
5538
|
{
|
|
5871
|
-
pathPrefix: "
|
|
5539
|
+
pathPrefix: "tags"
|
|
5872
5540
|
}
|
|
5873
5541
|
);
|
|
5874
5542
|
|
|
@@ -5876,31 +5544,31 @@ var tagContract = (0, import_core22.initContract)().router(
|
|
|
5876
5544
|
var import_core23 = require("@ts-rest/core");
|
|
5877
5545
|
var import_zod74 = __toESM(require("zod"));
|
|
5878
5546
|
|
|
5879
|
-
// src/presence-status/schema.ts
|
|
5547
|
+
// src/telephony-agent-presence-status/schema.ts
|
|
5880
5548
|
var import_zod72 = __toESM(require("zod"));
|
|
5881
|
-
|
|
5882
|
-
|
|
5883
|
-
|
|
5884
|
-
|
|
5885
|
-
|
|
5549
|
+
|
|
5550
|
+
// src/presence-status/schema.ts
|
|
5551
|
+
var import_zod71 = __toESM(require("zod"));
|
|
5552
|
+
var PresenceStatusDesEnum = import_zod71.default.enum([
|
|
5553
|
+
"Can do everything.",
|
|
5554
|
+
"Mute all notifications.",
|
|
5555
|
+
`You won't receive call, but can still do other.`
|
|
5886
5556
|
]);
|
|
5887
|
-
var PresenceStatusSchema =
|
|
5888
|
-
id:
|
|
5889
|
-
createdAt:
|
|
5890
|
-
updatedAt:
|
|
5891
|
-
deletedAt:
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
|
|
5895
|
-
position: import_zod72.default.number(),
|
|
5896
|
-
emoji: import_zod72.default.string().nullable(),
|
|
5897
|
-
presenceStatusOption: import_zod72.default.array(TPresenceStatusOption)
|
|
5557
|
+
var PresenceStatusSchema = import_zod71.default.object({
|
|
5558
|
+
id: import_zod71.default.string().uuid(),
|
|
5559
|
+
createdAt: import_zod71.default.date(),
|
|
5560
|
+
updatedAt: import_zod71.default.date(),
|
|
5561
|
+
deletedAt: import_zod71.default.date().nullable(),
|
|
5562
|
+
status: import_zod71.default.string(),
|
|
5563
|
+
description: PresenceStatusDesEnum,
|
|
5564
|
+
position: import_zod71.default.number()
|
|
5898
5565
|
});
|
|
5899
5566
|
|
|
5900
5567
|
// src/telephony-agent-presence-status/schema.ts
|
|
5901
5568
|
var UserPresenceStatusSchema = DefaultEntitySchema.extend({
|
|
5902
5569
|
user: UserSchema,
|
|
5903
|
-
presenceStatus: PresenceStatusSchema
|
|
5570
|
+
presenceStatus: PresenceStatusSchema,
|
|
5571
|
+
customPresenceStatus: import_zod72.default.string().nullable().optional()
|
|
5904
5572
|
});
|
|
5905
5573
|
|
|
5906
5574
|
// src/telephony-agent-presence-status/validation.ts
|
|
@@ -5908,12 +5576,27 @@ var import_zod73 = require("zod");
|
|
|
5908
5576
|
var UpdateUserStatusSchema = import_zod73.z.object({
|
|
5909
5577
|
userId: import_zod73.z.string(),
|
|
5910
5578
|
presenceStatusId: import_zod73.z.string().nullable().optional(),
|
|
5579
|
+
customPreseneStatus: import_zod73.z.string().nullable().optional(),
|
|
5911
5580
|
reason: import_zod73.z.string()
|
|
5912
5581
|
});
|
|
5913
5582
|
|
|
5914
5583
|
// src/telephony-agent-presence-status/index.ts
|
|
5915
5584
|
var telephonyAgentPresenceStatusContract = (0, import_core23.initContract)().router(
|
|
5916
5585
|
{
|
|
5586
|
+
getAllAgentStatus: {
|
|
5587
|
+
method: "GET",
|
|
5588
|
+
path: "/agents/presence_status",
|
|
5589
|
+
headers: DefaultHeaderSchema,
|
|
5590
|
+
responses: {
|
|
5591
|
+
200: import_zod74.default.array(UserPresenceStatusSchema),
|
|
5592
|
+
400: import_zod74.default.object({
|
|
5593
|
+
message: import_zod74.default.string()
|
|
5594
|
+
}),
|
|
5595
|
+
401: DefaultUnauthorizedSchema,
|
|
5596
|
+
500: DefaultErrorResponseSchema
|
|
5597
|
+
},
|
|
5598
|
+
summary: "Get all user presence status list."
|
|
5599
|
+
},
|
|
5917
5600
|
getAgentStatus: {
|
|
5918
5601
|
method: "GET",
|
|
5919
5602
|
path: "/presence_status/check_update/:userId",
|
|
@@ -5947,7 +5630,7 @@ var telephonyAgentPresenceStatusContract = (0, import_core23.initContract)().rou
|
|
|
5947
5630
|
summary: "Update presence status"
|
|
5948
5631
|
}
|
|
5949
5632
|
},
|
|
5950
|
-
{ pathPrefix: "
|
|
5633
|
+
{ pathPrefix: "telephony" }
|
|
5951
5634
|
);
|
|
5952
5635
|
|
|
5953
5636
|
// src/telephony-cdr/index.ts
|
|
@@ -6269,7 +5952,7 @@ var telephonyCdrContract = (0, import_core24.initContract)().router(
|
|
|
6269
5952
|
}
|
|
6270
5953
|
}
|
|
6271
5954
|
},
|
|
6272
|
-
{ pathPrefix: "
|
|
5955
|
+
{ pathPrefix: "telephony-cdr" }
|
|
6273
5956
|
);
|
|
6274
5957
|
|
|
6275
5958
|
// src/telephony-extension/index.ts
|
|
@@ -6326,7 +6009,7 @@ var telephonyExtensionContract = (0, import_core25.initContract)().router(
|
|
|
6326
6009
|
summary: "Get all extension list by yeastar"
|
|
6327
6010
|
}
|
|
6328
6011
|
},
|
|
6329
|
-
{ pathPrefix: "
|
|
6012
|
+
{ pathPrefix: "telephony" }
|
|
6330
6013
|
);
|
|
6331
6014
|
|
|
6332
6015
|
// src/ticket/index.ts
|
|
@@ -7007,7 +6690,7 @@ var userContract = (0, import_core27.initContract)().router(
|
|
|
7007
6690
|
summary: "Delete a user."
|
|
7008
6691
|
}
|
|
7009
6692
|
},
|
|
7010
|
-
{ pathPrefix: "
|
|
6693
|
+
{ pathPrefix: "user" }
|
|
7011
6694
|
);
|
|
7012
6695
|
|
|
7013
6696
|
// src/user-presence-status-log/index.ts
|
|
@@ -7067,7 +6750,7 @@ var userPresenceStatusLogContract = (0, import_core28.initContract)().router(
|
|
|
7067
6750
|
}
|
|
7068
6751
|
}
|
|
7069
6752
|
},
|
|
7070
|
-
{ pathPrefix: "
|
|
6753
|
+
{ pathPrefix: "user-presence-status-log" }
|
|
7071
6754
|
);
|
|
7072
6755
|
|
|
7073
6756
|
// src/widget/index.ts
|
|
@@ -7459,7 +7142,7 @@ var wrapUpFormContract = (0, import_core30.initContract)().router(
|
|
|
7459
7142
|
summary: "Update a wrap up form."
|
|
7460
7143
|
}
|
|
7461
7144
|
},
|
|
7462
|
-
{ pathPrefix: "
|
|
7145
|
+
{ pathPrefix: "wrap-up-form" }
|
|
7463
7146
|
);
|
|
7464
7147
|
|
|
7465
7148
|
// src/upload/index.ts
|
|
@@ -7523,7 +7206,7 @@ var uploadContract = (0, import_core31.initContract)().router(
|
|
|
7523
7206
|
}
|
|
7524
7207
|
},
|
|
7525
7208
|
{
|
|
7526
|
-
pathPrefix: "
|
|
7209
|
+
pathPrefix: "/upload"
|
|
7527
7210
|
}
|
|
7528
7211
|
);
|
|
7529
7212
|
|
|
@@ -7853,7 +7536,7 @@ var userNotificationContract = (0, import_core34.initContract)().router(
|
|
|
7853
7536
|
}
|
|
7854
7537
|
},
|
|
7855
7538
|
{
|
|
7856
|
-
pathPrefix: "
|
|
7539
|
+
pathPrefix: "notification"
|
|
7857
7540
|
}
|
|
7858
7541
|
);
|
|
7859
7542
|
|
|
@@ -8010,7 +7693,7 @@ var snippetContract = (0, import_core35.initContract)().router(
|
|
|
8010
7693
|
}
|
|
8011
7694
|
},
|
|
8012
7695
|
{
|
|
8013
|
-
pathPrefix: "
|
|
7696
|
+
pathPrefix: "snippets"
|
|
8014
7697
|
}
|
|
8015
7698
|
);
|
|
8016
7699
|
|
|
@@ -8089,56 +7772,51 @@ var BusinessCalendarSchema = DefaultEntitySchema.extend({
|
|
|
8089
7772
|
|
|
8090
7773
|
// src/business-calendar/index.ts
|
|
8091
7774
|
var import_zod104 = __toESM(require("zod"));
|
|
8092
|
-
var businessCalendarContract = (0, import_core36.initContract)().router(
|
|
8093
|
-
{
|
|
8094
|
-
|
|
8095
|
-
|
|
8096
|
-
|
|
8097
|
-
|
|
8098
|
-
|
|
8099
|
-
|
|
8100
|
-
|
|
8101
|
-
|
|
8102
|
-
500: DefaultErrorResponseSchema
|
|
8103
|
-
}
|
|
8104
|
-
},
|
|
8105
|
-
getAllBusinessCalendar: {
|
|
8106
|
-
method: "GET",
|
|
8107
|
-
path: "",
|
|
8108
|
-
responses: {
|
|
8109
|
-
200: DefaultSuccessResponseSchema.extend({
|
|
8110
|
-
businessCalendars: BusinessCalendarSchema.array()
|
|
8111
|
-
}),
|
|
8112
|
-
500: DefaultErrorResponseSchema
|
|
8113
|
-
}
|
|
8114
|
-
},
|
|
8115
|
-
updateBusinessCalendar: {
|
|
8116
|
-
method: "POST",
|
|
8117
|
-
path: "/:id",
|
|
8118
|
-
pathParams: import_zod104.default.object({ id: import_zod104.default.string() }),
|
|
8119
|
-
body: UpdateBusinessCalendarSchema,
|
|
8120
|
-
responses: {
|
|
8121
|
-
201: DefaultSuccessResponseSchema.extend({
|
|
8122
|
-
businessCalendar: BusinessCalendarSchema
|
|
8123
|
-
}),
|
|
8124
|
-
500: DefaultErrorResponseSchema
|
|
8125
|
-
}
|
|
8126
|
-
},
|
|
8127
|
-
deleteBusinessCalendar: {
|
|
8128
|
-
method: "DELETE",
|
|
8129
|
-
path: "/:id",
|
|
8130
|
-
pathParams: import_zod104.default.object({ id: import_zod104.default.string() }),
|
|
8131
|
-
body: null,
|
|
8132
|
-
responses: {
|
|
8133
|
-
200: DefaultSuccessResponseSchema,
|
|
8134
|
-
500: DefaultErrorResponseSchema
|
|
8135
|
-
}
|
|
7775
|
+
var businessCalendarContract = (0, import_core36.initContract)().router({
|
|
7776
|
+
createBusinessCalendar: {
|
|
7777
|
+
method: "POST",
|
|
7778
|
+
path: "business-calendar",
|
|
7779
|
+
body: CreateBusinessCalendarSchema,
|
|
7780
|
+
responses: {
|
|
7781
|
+
201: DefaultSuccessResponseSchema.extend({
|
|
7782
|
+
businessCalendar: BusinessCalendarSchema
|
|
7783
|
+
}),
|
|
7784
|
+
500: DefaultErrorResponseSchema
|
|
8136
7785
|
}
|
|
8137
7786
|
},
|
|
8138
|
-
{
|
|
8139
|
-
|
|
7787
|
+
getAllBusinessCalendar: {
|
|
7788
|
+
method: "GET",
|
|
7789
|
+
path: "business-calendars",
|
|
7790
|
+
responses: {
|
|
7791
|
+
200: DefaultSuccessResponseSchema.extend({
|
|
7792
|
+
businessCalendars: BusinessCalendarSchema.array()
|
|
7793
|
+
}),
|
|
7794
|
+
500: DefaultErrorResponseSchema
|
|
7795
|
+
}
|
|
7796
|
+
},
|
|
7797
|
+
updateBusinessCalendar: {
|
|
7798
|
+
method: "POST",
|
|
7799
|
+
path: "business-calendars/:id",
|
|
7800
|
+
pathParams: import_zod104.default.object({ id: import_zod104.default.string() }),
|
|
7801
|
+
body: UpdateBusinessCalendarSchema,
|
|
7802
|
+
responses: {
|
|
7803
|
+
201: DefaultSuccessResponseSchema.extend({
|
|
7804
|
+
businessCalendar: BusinessCalendarSchema
|
|
7805
|
+
}),
|
|
7806
|
+
500: DefaultErrorResponseSchema
|
|
7807
|
+
}
|
|
7808
|
+
},
|
|
7809
|
+
deleteBusinessCalendar: {
|
|
7810
|
+
method: "DELETE",
|
|
7811
|
+
path: "business-calendars/:id",
|
|
7812
|
+
pathParams: import_zod104.default.object({ id: import_zod104.default.string() }),
|
|
7813
|
+
body: null,
|
|
7814
|
+
responses: {
|
|
7815
|
+
200: DefaultSuccessResponseSchema,
|
|
7816
|
+
500: DefaultErrorResponseSchema
|
|
7817
|
+
}
|
|
8140
7818
|
}
|
|
8141
|
-
);
|
|
7819
|
+
});
|
|
8142
7820
|
|
|
8143
7821
|
// src/facebook-feed/index.ts
|
|
8144
7822
|
var import_core37 = require("@ts-rest/core");
|
|
@@ -8804,7 +8482,7 @@ var botContract = (0, import_core40.initContract)().router(
|
|
|
8804
8482
|
}
|
|
8805
8483
|
},
|
|
8806
8484
|
{
|
|
8807
|
-
pathPrefix: "
|
|
8485
|
+
pathPrefix: "/bots"
|
|
8808
8486
|
}
|
|
8809
8487
|
);
|
|
8810
8488
|
|
|
@@ -8815,12 +8493,9 @@ var import_zod113 = __toESM(require("zod"));
|
|
|
8815
8493
|
// src/presence-status/validation.ts
|
|
8816
8494
|
var import_zod112 = require("zod");
|
|
8817
8495
|
var CreatePresenceStatusSchema = import_zod112.z.object({
|
|
8818
|
-
|
|
8819
|
-
|
|
8820
|
-
|
|
8821
|
-
position: import_zod112.z.number(),
|
|
8822
|
-
emoji: import_zod112.z.string(),
|
|
8823
|
-
presenceStatusOption: import_zod112.z.array(TPresenceStatusOption)
|
|
8496
|
+
status: import_zod112.z.string(),
|
|
8497
|
+
description: PresenceStatusDesEnum,
|
|
8498
|
+
position: import_zod112.z.number()
|
|
8824
8499
|
});
|
|
8825
8500
|
var UpdatePresenceStatusSchema = CreatePresenceStatusSchema;
|
|
8826
8501
|
|
|
@@ -8915,7 +8590,7 @@ var presenceStatusContract = (0, import_core41.initContract)().router(
|
|
|
8915
8590
|
summary: "Delete a presence status."
|
|
8916
8591
|
}
|
|
8917
8592
|
},
|
|
8918
|
-
{ pathPrefix: "
|
|
8593
|
+
{ pathPrefix: "presence_status" }
|
|
8919
8594
|
);
|
|
8920
8595
|
|
|
8921
8596
|
// src/whatsapp/index.ts
|
|
@@ -9050,6 +8725,7 @@ var apiContract = (0, import_core43.initContract)().router({
|
|
|
9050
8725
|
telephonyExtensionContract,
|
|
9051
8726
|
attribute: attributeContract,
|
|
9052
8727
|
tag: tagContract,
|
|
8728
|
+
channel: channelContract,
|
|
9053
8729
|
aws: awsContract,
|
|
9054
8730
|
agentPresenceStatus: telephonyAgentPresenceStatusContract,
|
|
9055
8731
|
userPresenceStatusLog: userPresenceStatusLogContract,
|
|
@@ -9057,15 +8733,7 @@ var apiContract = (0, import_core43.initContract)().router({
|
|
|
9057
8733
|
evaluateForm: evaluateFormContract,
|
|
9058
8734
|
upload: uploadContract,
|
|
9059
8735
|
snippet: snippetContract,
|
|
9060
|
-
bot: botContract
|
|
9061
|
-
...(0, import_core43.initContract)().router(
|
|
9062
|
-
{
|
|
9063
|
-
channel: channelContract
|
|
9064
|
-
},
|
|
9065
|
-
{
|
|
9066
|
-
pathPrefix: "ms/"
|
|
9067
|
-
}
|
|
9068
|
-
)
|
|
8736
|
+
bot: botContract
|
|
9069
8737
|
});
|
|
9070
8738
|
var contactContract2 = (0, import_core43.initContract)().router({
|
|
9071
8739
|
contact: contactContract
|
|
@@ -9125,10 +8793,10 @@ var workflowContract = (0, import_core43.initContract)().router(
|
|
|
9125
8793
|
chat: chatContract
|
|
9126
8794
|
},
|
|
9127
8795
|
{
|
|
9128
|
-
pathPrefix: "
|
|
8796
|
+
pathPrefix: "workflow/"
|
|
9129
8797
|
}
|
|
9130
8798
|
);
|
|
9131
|
-
var settingsPathPrefix = "
|
|
8799
|
+
var settingsPathPrefix = "settings/";
|
|
9132
8800
|
var ticketSettingContract = (0, import_core43.initContract)().router(
|
|
9133
8801
|
{
|
|
9134
8802
|
ticketSetting: attributeContract
|
|
@@ -9259,7 +8927,7 @@ var generalSettingContract = (0, import_core44.initContract)().router(
|
|
|
9259
8927
|
}
|
|
9260
8928
|
},
|
|
9261
8929
|
{
|
|
9262
|
-
pathPrefix: "
|
|
8930
|
+
pathPrefix: "general-setting"
|
|
9263
8931
|
}
|
|
9264
8932
|
);
|
|
9265
8933
|
|
|
@@ -9340,8 +9008,7 @@ var automationQueueContract = (0, import_core45.initContract)().router(
|
|
|
9340
9008
|
method: "GET",
|
|
9341
9009
|
path: "",
|
|
9342
9010
|
query: import_zod118.z.object({
|
|
9343
|
-
userId: import_zod118.z.string().uuid().optional()
|
|
9344
|
-
withRelations: import_zod118.z.coerce.boolean().default(true).optional()
|
|
9011
|
+
userId: import_zod118.z.string().uuid().optional()
|
|
9345
9012
|
}).optional(),
|
|
9346
9013
|
responses: {
|
|
9347
9014
|
200: DefaultSuccessResponseSchema.extend({
|
|
@@ -9402,7 +9069,7 @@ var automationQueueContract = (0, import_core45.initContract)().router(
|
|
|
9402
9069
|
},
|
|
9403
9070
|
{
|
|
9404
9071
|
baseHeaders: DefaultHeaderSchema,
|
|
9405
|
-
pathPrefix: "
|
|
9072
|
+
pathPrefix: "/automation-queue"
|
|
9406
9073
|
}
|
|
9407
9074
|
);
|
|
9408
9075
|
|
|
@@ -10606,7 +10273,7 @@ var holdLabelContract = (0, import_core52.initContract)().router(
|
|
|
10606
10273
|
}
|
|
10607
10274
|
}
|
|
10608
10275
|
},
|
|
10609
|
-
{ pathPrefix: "
|
|
10276
|
+
{ pathPrefix: "hold-label" }
|
|
10610
10277
|
);
|
|
10611
10278
|
|
|
10612
10279
|
// src/subscription/index.ts
|
|
@@ -10759,7 +10426,7 @@ var subscriptionContract = (0, import_core53.initContract)().router(
|
|
|
10759
10426
|
}
|
|
10760
10427
|
},
|
|
10761
10428
|
{
|
|
10762
|
-
pathPrefix: "
|
|
10429
|
+
pathPrefix: "subscriptions"
|
|
10763
10430
|
}
|
|
10764
10431
|
);
|
|
10765
10432
|
|
|
@@ -10830,32 +10497,6 @@ var settingCxIntelligenceContract = (0, import_core54.initContract)().router(
|
|
|
10830
10497
|
},
|
|
10831
10498
|
{ pathPrefix: "settings/cx-intelligence" }
|
|
10832
10499
|
);
|
|
10833
|
-
|
|
10834
|
-
// src/export/index.ts
|
|
10835
|
-
var import_core55 = require("@ts-rest/core");
|
|
10836
|
-
var import_zod139 = __toESM(require("zod"));
|
|
10837
|
-
var exportContract = (0, import_core55.initContract)().router(
|
|
10838
|
-
{
|
|
10839
|
-
notifyExport: {
|
|
10840
|
-
method: "POST",
|
|
10841
|
-
path: "notify",
|
|
10842
|
-
body: import_zod139.default.object({
|
|
10843
|
-
userId: import_zod139.default.string().uuid(),
|
|
10844
|
-
module: import_zod139.default.string(),
|
|
10845
|
-
fileUrl: import_zod139.default.string()
|
|
10846
|
-
}),
|
|
10847
|
-
responses: {
|
|
10848
|
-
200: DefaultSuccessResponseSchema.extend({
|
|
10849
|
-
success: import_zod139.default.boolean()
|
|
10850
|
-
}),
|
|
10851
|
-
500: DefaultErrorResponseSchema
|
|
10852
|
-
}
|
|
10853
|
-
}
|
|
10854
|
-
},
|
|
10855
|
-
{
|
|
10856
|
-
pathPrefix: "export/"
|
|
10857
|
-
}
|
|
10858
|
-
);
|
|
10859
10500
|
// Annotate the CommonJS export names for ESM import in node:
|
|
10860
10501
|
0 && (module.exports = {
|
|
10861
10502
|
activityLogContract,
|
|
@@ -10885,7 +10526,6 @@ var exportContract = (0, import_core55.initContract)().router(
|
|
|
10885
10526
|
cxLogContract,
|
|
10886
10527
|
dashboardContract,
|
|
10887
10528
|
evaluateFormContract,
|
|
10888
|
-
exportContract,
|
|
10889
10529
|
extensionContract,
|
|
10890
10530
|
facebookFeedContract,
|
|
10891
10531
|
feedPostContract,
|
|
@@ -10928,7 +10568,6 @@ var exportContract = (0, import_core55.initContract)().router(
|
|
|
10928
10568
|
userContract,
|
|
10929
10569
|
userNotificationContract,
|
|
10930
10570
|
userPresenceStatusLogContract,
|
|
10931
|
-
widgetContract,
|
|
10932
10571
|
widgetSettingContract,
|
|
10933
10572
|
workflowContract,
|
|
10934
10573
|
wrapUpFormContract
|