@kl1/contracts 1.4.71 → 1.4.74
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/channel/index.d.ts +9 -4
- package/dist/api-contracts/src/channel/index.d.ts.map +1 -1
- package/dist/api-contracts/src/chat/index.d.ts +19 -13
- package/dist/api-contracts/src/chat/index.d.ts.map +1 -1
- package/dist/api-contracts/src/chat/validation.d.ts +13 -0
- package/dist/api-contracts/src/chat/validation.d.ts.map +1 -1
- package/dist/api-contracts/src/company/index.d.ts +80 -0
- package/dist/api-contracts/src/company/index.d.ts.map +1 -1
- package/dist/api-contracts/src/company/validation.d.ts +40 -0
- package/dist/api-contracts/src/company/validation.d.ts.map +1 -1
- package/dist/api-contracts/src/contract.d.ts +65 -10
- package/dist/api-contracts/src/contract.d.ts.map +1 -1
- package/dist/api-contracts/src/facebook-feed/index.d.ts +5 -0
- package/dist/api-contracts/src/facebook-feed/index.d.ts.map +1 -1
- package/dist/api-contracts/src/general-setting/index.d.ts +244 -0
- package/dist/api-contracts/src/general-setting/index.d.ts.map +1 -1
- package/dist/api-contracts/src/general-setting/schema.d.ts +30 -0
- package/dist/api-contracts/src/general-setting/schema.d.ts.map +1 -0
- package/dist/api-contracts/src/general-setting/validation.d.ts +30 -0
- package/dist/api-contracts/src/general-setting/validation.d.ts.map +1 -0
- package/dist/api-contracts/src/instagram/index.d.ts +5 -0
- package/dist/api-contracts/src/instagram/index.d.ts.map +1 -1
- package/dist/api-contracts/src/klink-chat/index.d.ts +5 -0
- package/dist/api-contracts/src/klink-chat/index.d.ts.map +1 -1
- package/dist/api-contracts/src/line/index.d.ts +5 -0
- package/dist/api-contracts/src/line/index.d.ts.map +1 -1
- package/dist/api-contracts/src/messenger/index.d.ts +5 -0
- package/dist/api-contracts/src/messenger/index.d.ts.map +1 -1
- package/dist/api-contracts/src/sms/index.d.ts +5 -0
- package/dist/api-contracts/src/sms/index.d.ts.map +1 -1
- package/dist/api-contracts/src/telegram/index.d.ts +5 -0
- package/dist/api-contracts/src/telegram/index.d.ts.map +1 -1
- package/dist/api-contracts/src/viber/index.d.ts +5 -0
- package/dist/api-contracts/src/viber/index.d.ts.map +1 -1
- package/dist/api-contracts/src/webchat/index.d.ts +5 -0
- package/dist/api-contracts/src/webchat/index.d.ts.map +1 -1
- package/dist/api-contracts/src/whatsapp/index.d.ts +14 -4
- package/dist/api-contracts/src/whatsapp/index.d.ts.map +1 -1
- package/dist/api-contracts/src/whatsapp/validation.d.ts +12 -4
- package/dist/api-contracts/src/whatsapp/validation.d.ts.map +1 -1
- package/dist/entities/src/enums/chat.d.ts +1 -0
- package/dist/entities/src/enums/chat.d.ts.map +1 -1
- package/dist/index.js +689 -604
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +688 -603
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
@@ -1287,6 +1287,7 @@ var SendMessageSchema = z26.object({
|
|
1287
1287
|
z26.literal("account_update"),
|
1288
1288
|
z26.literal("confirmed_event_update")
|
1289
1289
|
]).optional(),
|
1290
|
+
whatsappTemplateName: z26.string().optional(),
|
1290
1291
|
parentMessageId: z26.string().uuid().optional(),
|
1291
1292
|
feedPostId: z26.string().uuid().optional(),
|
1292
1293
|
platformId: z26.string().optional(),
|
@@ -1462,6 +1463,7 @@ var SendMessageToPlatformSchema = z26.object({
|
|
1462
1463
|
z26.literal("account_update"),
|
1463
1464
|
z26.literal("confirmed_event_update")
|
1464
1465
|
]).optional(),
|
1466
|
+
whatsappTemplateName: z26.string().optional(),
|
1465
1467
|
telegramBusinessConnectionId: z26.string().nullable().optional(),
|
1466
1468
|
isBotRoom: z26.boolean().nullable().default(false)
|
1467
1469
|
}),
|
@@ -2338,6 +2340,7 @@ var FacebookBusinessSchema = z39.object({
|
|
2338
2340
|
// src/whatsapp/validation.ts
|
2339
2341
|
import z40 from "zod";
|
2340
2342
|
var TemplatesSchema = z40.object({
|
2343
|
+
id: z40.string(),
|
2341
2344
|
category: z40.union([
|
2342
2345
|
z40.literal("UTILITY"),
|
2343
2346
|
z40.literal("MARKETING"),
|
@@ -2357,7 +2360,7 @@ var WaapiQrSchema = z40.object({
|
|
2357
2360
|
qr: z40.string()
|
2358
2361
|
});
|
2359
2362
|
var TemplatesResponseSchema = DefaultSuccessResponseSchema.extend({
|
2360
|
-
data: TemplatesSchema
|
2363
|
+
data: z40.array(TemplatesSchema)
|
2361
2364
|
});
|
2362
2365
|
var GetTemplatesQuerySchema = z40.object({
|
2363
2366
|
channelId: z40.string()
|
@@ -2914,7 +2917,7 @@ var mainFeedContract = initContract8().router(
|
|
2914
2917
|
{
|
2915
2918
|
getFeedPostById: {
|
2916
2919
|
method: "GET",
|
2917
|
-
path: "/:id",
|
2920
|
+
path: "chs/api/v1/chat/feed-post/:id",
|
2918
2921
|
pathParams: z43.object({
|
2919
2922
|
id: z43.string().uuid()
|
2920
2923
|
}),
|
@@ -2944,8 +2947,7 @@ var mainFeedContract = initContract8().router(
|
|
2944
2947
|
}
|
2945
2948
|
},
|
2946
2949
|
{
|
2947
|
-
baseHeaders: DefaultHeaderSchema
|
2948
|
-
pathPrefix: "ms/feed-post"
|
2950
|
+
baseHeaders: DefaultHeaderSchema
|
2949
2951
|
}
|
2950
2952
|
);
|
2951
2953
|
var mainChatRoomContract = initContract8().router(
|
@@ -2969,7 +2971,7 @@ var mainChatRoomContract = initContract8().router(
|
|
2969
2971
|
},
|
2970
2972
|
getRoom: {
|
2971
2973
|
method: "GET",
|
2972
|
-
path: "
|
2974
|
+
path: "chs/api/v1/chat/rooms/:roomId",
|
2973
2975
|
pathParams: z43.object({
|
2974
2976
|
roomId: z43.string().uuid()
|
2975
2977
|
}),
|
@@ -3081,7 +3083,7 @@ var mainChatRoomContract = initContract8().router(
|
|
3081
3083
|
},
|
3082
3084
|
getAllRoomCount: {
|
3083
3085
|
method: "GET",
|
3084
|
-
path: "
|
3086
|
+
path: "chs/api/v1/chat/opened-and-closed-room-counts",
|
3085
3087
|
responses: {
|
3086
3088
|
200: DefaultSuccessResponseSchema.extend({
|
3087
3089
|
data: AllOpenCloseRoomCountSchema
|
@@ -3091,7 +3093,7 @@ var mainChatRoomContract = initContract8().router(
|
|
3091
3093
|
},
|
3092
3094
|
getAllQueueAndHoldCount: {
|
3093
3095
|
method: "GET",
|
3094
|
-
path: "
|
3096
|
+
path: "chs/api/v1/chat/queue-and-hold-room-counts",
|
3095
3097
|
responses: {
|
3096
3098
|
200: DefaultSuccessResponseSchema.extend({
|
3097
3099
|
data: AllHoldAndQueueRoomCountSchema
|
@@ -3101,7 +3103,7 @@ var mainChatRoomContract = initContract8().router(
|
|
3101
3103
|
},
|
3102
3104
|
getAllBotRoomCount: {
|
3103
3105
|
method: "GET",
|
3104
|
-
path: "
|
3106
|
+
path: "chs/api/v1/chat/bot-room-count",
|
3105
3107
|
responses: {
|
3106
3108
|
200: DefaultSuccessResponseSchema.extend({
|
3107
3109
|
data: AllOpenCloseBotRoomCountSchema
|
@@ -3137,7 +3139,7 @@ var mainChatContract = initContract8().router(
|
|
3137
3139
|
{
|
3138
3140
|
sendMessage: {
|
3139
3141
|
method: "POST",
|
3140
|
-
path: "/message",
|
3142
|
+
path: "ms/chat/message",
|
3141
3143
|
body: SendMessageSchema,
|
3142
3144
|
responses: {
|
3143
3145
|
200: SendMessageResponseSchema,
|
@@ -3161,7 +3163,7 @@ var mainChatContract = initContract8().router(
|
|
3161
3163
|
// },
|
3162
3164
|
getUnreadCounts: {
|
3163
3165
|
method: "GET",
|
3164
|
-
path: "/rooms/unread-count",
|
3166
|
+
path: "ms/chat/rooms/unread-count",
|
3165
3167
|
responses: {
|
3166
3168
|
200: DefaultSuccessResponseSchema.extend({
|
3167
3169
|
unreadCountsByAssignee: z43.array(UnreadCountsByAssigneeSchema)
|
@@ -3170,7 +3172,7 @@ var mainChatContract = initContract8().router(
|
|
3170
3172
|
},
|
3171
3173
|
getRoomsByPlatformContactId: {
|
3172
3174
|
method: "GET",
|
3173
|
-
path: "/rooms/:platformContactId",
|
3175
|
+
path: "ms/chat/rooms/:platformContactId",
|
3174
3176
|
pathParams: z43.object({
|
3175
3177
|
platformContactId: z43.string()
|
3176
3178
|
}),
|
@@ -3204,7 +3206,7 @@ var mainChatContract = initContract8().router(
|
|
3204
3206
|
},
|
3205
3207
|
updateUnassignRoomsToAssignee: {
|
3206
3208
|
method: "POST",
|
3207
|
-
path: "/rooms/assignee/update_rooms",
|
3209
|
+
path: "ms/chat/rooms/assignee/update_rooms",
|
3208
3210
|
body: UpdateUnAssignRoomsSchema,
|
3209
3211
|
responses: {
|
3210
3212
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -3216,7 +3218,7 @@ var mainChatContract = initContract8().router(
|
|
3216
3218
|
},
|
3217
3219
|
updateAssignee: {
|
3218
3220
|
method: "POST",
|
3219
|
-
path: "/room/assignee/update",
|
3221
|
+
path: "ms/chat/room/assignee/update",
|
3220
3222
|
body: UpdateAssigneeSchema,
|
3221
3223
|
responses: {
|
3222
3224
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -3228,7 +3230,7 @@ var mainChatContract = initContract8().router(
|
|
3228
3230
|
},
|
3229
3231
|
getRoomContact: {
|
3230
3232
|
method: "GET",
|
3231
|
-
path: "/contact/:contactId",
|
3233
|
+
path: "ms/chat/contact/:contactId",
|
3232
3234
|
pathParams: z43.object({
|
3233
3235
|
contactId: z43.string().uuid()
|
3234
3236
|
}),
|
@@ -3241,7 +3243,7 @@ var mainChatContract = initContract8().router(
|
|
3241
3243
|
},
|
3242
3244
|
updateRoomAttributes: {
|
3243
3245
|
method: "PUT",
|
3244
|
-
path: "/room",
|
3246
|
+
path: "ms/chat/room",
|
3245
3247
|
body: UpdateRoomAttributesSchema,
|
3246
3248
|
responses: {
|
3247
3249
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -3491,10 +3493,26 @@ var BaseSchema = z48.object({
|
|
3491
3493
|
var CompanyContractsValidationSchema = {
|
3492
3494
|
create: {
|
3493
3495
|
request: z48.object({
|
3494
|
-
name: z48.object({
|
3495
|
-
|
3496
|
-
|
3497
|
-
|
3496
|
+
name: z48.object({
|
3497
|
+
value: z48.string(),
|
3498
|
+
isRequired: z48.boolean(),
|
3499
|
+
attributeId: z48.string()
|
3500
|
+
}),
|
3501
|
+
phone: z48.object({
|
3502
|
+
value: z48.string(),
|
3503
|
+
isRequired: z48.boolean(),
|
3504
|
+
attributeId: z48.string()
|
3505
|
+
}),
|
3506
|
+
address: z48.object({
|
3507
|
+
value: z48.string(),
|
3508
|
+
isRequired: z48.boolean(),
|
3509
|
+
attributeId: z48.string()
|
3510
|
+
}),
|
3511
|
+
industry: z48.object({
|
3512
|
+
value: z48.string(),
|
3513
|
+
isRequired: z48.boolean(),
|
3514
|
+
attributeId: z48.string()
|
3515
|
+
}),
|
3498
3516
|
customFields: z48.array(
|
3499
3517
|
BaseSchema.extend({
|
3500
3518
|
value: z48.union([z48.string(), z48.array(z48.string())]),
|
@@ -9671,7 +9689,35 @@ var platformKlinkChatContract = initContract45().router({
|
|
9671
9689
|
|
9672
9690
|
// src/general-setting/index.ts
|
9673
9691
|
import { initContract as initContract46 } from "@ts-rest/core";
|
9674
|
-
import
|
9692
|
+
import z121 from "zod";
|
9693
|
+
|
9694
|
+
// src/general-setting/validation.ts
|
9695
|
+
import { z as z119 } from "zod";
|
9696
|
+
var CreateUpdateAiTranslateRequestSetting = z119.object({
|
9697
|
+
languageList: z119.array(
|
9698
|
+
z119.object({
|
9699
|
+
languageName: z119.string(),
|
9700
|
+
languageCode: z119.string()
|
9701
|
+
})
|
9702
|
+
).nullable(),
|
9703
|
+
aiTranslationInstructions: z119.string().nullable(),
|
9704
|
+
displayAiTranslationNotice: z119.string().nullable()
|
9705
|
+
});
|
9706
|
+
|
9707
|
+
// src/general-setting/schema.ts
|
9708
|
+
import z120 from "zod";
|
9709
|
+
var AiTranslateSettingSchema = z120.object({
|
9710
|
+
languageList: z120.array(
|
9711
|
+
z120.object({
|
9712
|
+
languageName: z120.string(),
|
9713
|
+
languageCode: z120.string()
|
9714
|
+
})
|
9715
|
+
).nullable(),
|
9716
|
+
aiTranslationInstructions: z120.string().nullable(),
|
9717
|
+
displayAiTranslationNotice: z120.string().nullable()
|
9718
|
+
});
|
9719
|
+
|
9720
|
+
// src/general-setting/index.ts
|
9675
9721
|
var generalSettingContract = initContract46().router(
|
9676
9722
|
{
|
9677
9723
|
autoOpenedContactWidgetId: {
|
@@ -9679,23 +9725,62 @@ var generalSettingContract = initContract46().router(
|
|
9679
9725
|
method: "GET",
|
9680
9726
|
path: "/auto-opened-contact-widget-id",
|
9681
9727
|
responses: {
|
9682
|
-
200:
|
9683
|
-
autoOpenedContactWidgetId:
|
9728
|
+
200: z121.object({
|
9729
|
+
autoOpenedContactWidgetId: z121.string().nullable()
|
9684
9730
|
})
|
9685
9731
|
}
|
9686
9732
|
},
|
9687
9733
|
updateAutoOpenedContactWidgetId: {
|
9688
9734
|
method: "PATCH",
|
9689
9735
|
path: "/auto-opened-contact-widget-id",
|
9690
|
-
body:
|
9691
|
-
autoOpenedContactWidgetId:
|
9736
|
+
body: z121.object({
|
9737
|
+
autoOpenedContactWidgetId: z121.string().nullable()
|
9692
9738
|
}),
|
9693
9739
|
responses: {
|
9694
|
-
200:
|
9695
|
-
autoOpenedContactWidgetId:
|
9740
|
+
200: z121.object({
|
9741
|
+
autoOpenedContactWidgetId: z121.string().nullable()
|
9696
9742
|
})
|
9697
9743
|
}
|
9698
9744
|
}
|
9745
|
+
},
|
9746
|
+
aiTranslateSetting: {
|
9747
|
+
getAiTranslateSetting: {
|
9748
|
+
method: "GET",
|
9749
|
+
path: "/ai-translate-setting",
|
9750
|
+
responses: {
|
9751
|
+
200: z121.object({
|
9752
|
+
requestId: z121.string().uuid(),
|
9753
|
+
aiTranslateSetting: AiTranslateSettingSchema
|
9754
|
+
}),
|
9755
|
+
400: z121.object({
|
9756
|
+
message: z121.string()
|
9757
|
+
}),
|
9758
|
+
401: DefaultUnauthorizedSchema,
|
9759
|
+
404: DefaultNotFoundSchema,
|
9760
|
+
422: DefaultUnprocessibleSchema,
|
9761
|
+
500: DefaultErrorResponseSchema
|
9762
|
+
},
|
9763
|
+
summary: "Get ai translate setting"
|
9764
|
+
},
|
9765
|
+
updateAiTranslateSetting: {
|
9766
|
+
method: "PATCH",
|
9767
|
+
path: "/ai-translate-setting",
|
9768
|
+
body: CreateUpdateAiTranslateRequestSetting,
|
9769
|
+
responses: {
|
9770
|
+
200: z121.object({
|
9771
|
+
requestId: z121.string().uuid(),
|
9772
|
+
aiTranslateSetting: AiTranslateSettingSchema
|
9773
|
+
}),
|
9774
|
+
400: z121.object({
|
9775
|
+
message: z121.string()
|
9776
|
+
}),
|
9777
|
+
401: DefaultUnauthorizedSchema,
|
9778
|
+
404: DefaultNotFoundSchema,
|
9779
|
+
422: DefaultUnprocessibleSchema,
|
9780
|
+
500: DefaultErrorResponseSchema
|
9781
|
+
},
|
9782
|
+
summary: "Update ai translate setting"
|
9783
|
+
}
|
9699
9784
|
}
|
9700
9785
|
},
|
9701
9786
|
{
|
@@ -9705,51 +9790,51 @@ var generalSettingContract = initContract46().router(
|
|
9705
9790
|
|
9706
9791
|
// src/automation-queue/index.ts
|
9707
9792
|
import { initContract as initContract47 } from "@ts-rest/core";
|
9708
|
-
import { z as
|
9793
|
+
import { z as z124 } from "zod";
|
9709
9794
|
|
9710
9795
|
// src/automation-queue/validation.ts
|
9711
|
-
import { z as
|
9712
|
-
var QueueDistributionStrategySchema =
|
9713
|
-
|
9714
|
-
|
9715
|
-
|
9716
|
-
|
9796
|
+
import { z as z122 } from "zod";
|
9797
|
+
var QueueDistributionStrategySchema = z122.union([
|
9798
|
+
z122.literal("round-robin"),
|
9799
|
+
z122.literal("fewest-assignments"),
|
9800
|
+
z122.literal("random"),
|
9801
|
+
z122.literal("notify-all")
|
9717
9802
|
]);
|
9718
|
-
var CreateAutomationQueueSchema =
|
9719
|
-
emoji:
|
9720
|
-
name:
|
9721
|
-
description:
|
9722
|
-
managerIds:
|
9723
|
-
agentIds:
|
9803
|
+
var CreateAutomationQueueSchema = z122.object({
|
9804
|
+
emoji: z122.string().emoji(),
|
9805
|
+
name: z122.string(),
|
9806
|
+
description: z122.string().nullable(),
|
9807
|
+
managerIds: z122.array(z122.string().uuid()).min(1),
|
9808
|
+
agentIds: z122.array(z122.string().uuid()).min(1),
|
9724
9809
|
distributionStrategy: QueueDistributionStrategySchema.nullable(),
|
9725
|
-
maximumAssignPerAgent:
|
9726
|
-
autoAssign:
|
9810
|
+
maximumAssignPerAgent: z122.number().positive().nullable(),
|
9811
|
+
autoAssign: z122.boolean().nullable()
|
9727
9812
|
// ringTimeOut: z.number().positive(),
|
9728
9813
|
// retryInterval: z.number().positive(),
|
9729
9814
|
// queueTimeOut: z.number().positive(),
|
9730
9815
|
// isAssignmentDeniable: z.coerce.boolean(),
|
9731
9816
|
});
|
9732
9817
|
var UpdateAutomationQueueSchema = CreateAutomationQueueSchema;
|
9733
|
-
var CheckHasAssignedRoomSchema =
|
9734
|
-
userId:
|
9735
|
-
queueId:
|
9818
|
+
var CheckHasAssignedRoomSchema = z122.object({
|
9819
|
+
userId: z122.string().uuid().optional(),
|
9820
|
+
queueId: z122.string().uuid().optional()
|
9736
9821
|
});
|
9737
9822
|
|
9738
9823
|
// src/automation-queue/schema.ts
|
9739
|
-
import { z as
|
9824
|
+
import { z as z123 } from "zod";
|
9740
9825
|
var AutomationQueueSchema = DefaultEntitySchema.extend({
|
9741
|
-
emoji:
|
9742
|
-
name:
|
9743
|
-
description:
|
9826
|
+
emoji: z123.string(),
|
9827
|
+
name: z123.string(),
|
9828
|
+
description: z123.string().nullable(),
|
9744
9829
|
distributionStrategy: QueueDistributionStrategySchema,
|
9745
|
-
maximumAssignPerAgent:
|
9830
|
+
maximumAssignPerAgent: z123.number().positive(),
|
9746
9831
|
// ringTimeOut: z.number(),
|
9747
9832
|
// retryInterval: z.number(),
|
9748
9833
|
// queueTimeOut: z.number(),
|
9749
9834
|
// isAssignmentDeniable: z.boolean(),
|
9750
|
-
autoAssign:
|
9751
|
-
managers:
|
9752
|
-
agents:
|
9835
|
+
autoAssign: z123.boolean(),
|
9836
|
+
managers: z123.array(UserSchema),
|
9837
|
+
agents: z123.array(UserSchema)
|
9753
9838
|
});
|
9754
9839
|
|
9755
9840
|
// src/automation-queue/index.ts
|
@@ -9768,8 +9853,8 @@ var automationQueueContract = initContract47().router(
|
|
9768
9853
|
duplicateAutomationQueue: {
|
9769
9854
|
method: "POST",
|
9770
9855
|
path: "/:id/duplicate",
|
9771
|
-
pathParams:
|
9772
|
-
id:
|
9856
|
+
pathParams: z124.object({
|
9857
|
+
id: z124.string().uuid()
|
9773
9858
|
}),
|
9774
9859
|
body: null,
|
9775
9860
|
responses: {
|
@@ -9781,21 +9866,21 @@ var automationQueueContract = initContract47().router(
|
|
9781
9866
|
getAutomationQueues: {
|
9782
9867
|
method: "GET",
|
9783
9868
|
path: "",
|
9784
|
-
query:
|
9785
|
-
userId:
|
9786
|
-
withRelations:
|
9869
|
+
query: z124.object({
|
9870
|
+
userId: z124.string().uuid().optional(),
|
9871
|
+
withRelations: z124.coerce.boolean().default(true).optional()
|
9787
9872
|
}).optional(),
|
9788
9873
|
responses: {
|
9789
9874
|
200: DefaultSuccessResponseSchema.extend({
|
9790
|
-
data:
|
9875
|
+
data: z124.array(AutomationQueueSchema)
|
9791
9876
|
})
|
9792
9877
|
}
|
9793
9878
|
},
|
9794
9879
|
getAutomationQueueById: {
|
9795
9880
|
method: "GET",
|
9796
9881
|
path: "/:id",
|
9797
|
-
pathParams:
|
9798
|
-
id:
|
9882
|
+
pathParams: z124.object({
|
9883
|
+
id: z124.string().uuid()
|
9799
9884
|
}),
|
9800
9885
|
responses: {
|
9801
9886
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -9806,8 +9891,8 @@ var automationQueueContract = initContract47().router(
|
|
9806
9891
|
updateAutomationQueue: {
|
9807
9892
|
method: "PATCH",
|
9808
9893
|
path: "/:id",
|
9809
|
-
pathParams:
|
9810
|
-
id:
|
9894
|
+
pathParams: z124.object({
|
9895
|
+
id: z124.string().uuid()
|
9811
9896
|
}),
|
9812
9897
|
body: UpdateAutomationQueueSchema,
|
9813
9898
|
responses: {
|
@@ -9819,13 +9904,13 @@ var automationQueueContract = initContract47().router(
|
|
9819
9904
|
deleteAutomationQueue: {
|
9820
9905
|
method: "DELETE",
|
9821
9906
|
path: "/:id",
|
9822
|
-
pathParams:
|
9823
|
-
id:
|
9907
|
+
pathParams: z124.object({
|
9908
|
+
id: z124.string().uuid()
|
9824
9909
|
}),
|
9825
9910
|
body: null,
|
9826
9911
|
responses: {
|
9827
9912
|
200: DefaultSuccessResponseSchema.extend({
|
9828
|
-
message:
|
9913
|
+
message: z124.string()
|
9829
9914
|
})
|
9830
9915
|
}
|
9831
9916
|
},
|
@@ -9835,8 +9920,8 @@ var automationQueueContract = initContract47().router(
|
|
9835
9920
|
body: CheckHasAssignedRoomSchema,
|
9836
9921
|
responses: {
|
9837
9922
|
200: DefaultSuccessResponseSchema.extend({
|
9838
|
-
data:
|
9839
|
-
hasAssignedRoom:
|
9923
|
+
data: z124.object({
|
9924
|
+
hasAssignedRoom: z124.boolean()
|
9840
9925
|
})
|
9841
9926
|
})
|
9842
9927
|
}
|
@@ -9853,276 +9938,276 @@ import { initContract as initContract52 } from "@ts-rest/core";
|
|
9853
9938
|
|
9854
9939
|
// src/mail/room-contract.ts
|
9855
9940
|
import { initContract as initContract48 } from "@ts-rest/core";
|
9856
|
-
import
|
9941
|
+
import z129 from "zod";
|
9857
9942
|
|
9858
9943
|
// src/mail/schemas/room.schema.ts
|
9859
|
-
import
|
9944
|
+
import z127 from "zod";
|
9860
9945
|
|
9861
9946
|
// src/mail/schemas/account.schema.ts
|
9862
|
-
import
|
9863
|
-
var MailServerSchema =
|
9864
|
-
id:
|
9865
|
-
createdAt:
|
9866
|
-
updatedAt:
|
9867
|
-
deletedAt:
|
9868
|
-
name:
|
9869
|
-
smtpHost:
|
9870
|
-
smtpPort:
|
9871
|
-
smtpTlsPort:
|
9872
|
-
useTlsForSmtp:
|
9873
|
-
imapHost:
|
9874
|
-
imapPort:
|
9875
|
-
imapTlsPort:
|
9876
|
-
useTlsForImap:
|
9877
|
-
});
|
9878
|
-
var MailAccountSchema =
|
9879
|
-
id:
|
9880
|
-
name:
|
9881
|
-
address:
|
9882
|
-
signature:
|
9883
|
-
accountId:
|
9884
|
-
mailServerId:
|
9947
|
+
import z125 from "zod";
|
9948
|
+
var MailServerSchema = z125.object({
|
9949
|
+
id: z125.string(),
|
9950
|
+
createdAt: z125.date(),
|
9951
|
+
updatedAt: z125.date(),
|
9952
|
+
deletedAt: z125.date().nullable(),
|
9953
|
+
name: z125.string(),
|
9954
|
+
smtpHost: z125.string(),
|
9955
|
+
smtpPort: z125.number(),
|
9956
|
+
smtpTlsPort: z125.number(),
|
9957
|
+
useTlsForSmtp: z125.boolean(),
|
9958
|
+
imapHost: z125.string(),
|
9959
|
+
imapPort: z125.number(),
|
9960
|
+
imapTlsPort: z125.number(),
|
9961
|
+
useTlsForImap: z125.boolean()
|
9962
|
+
});
|
9963
|
+
var MailAccountSchema = z125.object({
|
9964
|
+
id: z125.string(),
|
9965
|
+
name: z125.string(),
|
9966
|
+
address: z125.string(),
|
9967
|
+
signature: z125.string().nullable(),
|
9968
|
+
accountId: z125.string(),
|
9969
|
+
mailServerId: z125.string(),
|
9885
9970
|
mailServer: MailServerSchema,
|
9886
|
-
state:
|
9887
|
-
|
9888
|
-
|
9889
|
-
|
9890
|
-
|
9891
|
-
|
9892
|
-
|
9893
|
-
|
9894
|
-
|
9971
|
+
state: z125.union([
|
9972
|
+
z125.literal("init"),
|
9973
|
+
z125.literal("syncing"),
|
9974
|
+
z125.literal("connecting"),
|
9975
|
+
z125.literal("connected"),
|
9976
|
+
z125.literal("disconnected"),
|
9977
|
+
z125.literal("authenticationError"),
|
9978
|
+
z125.literal("connectError"),
|
9979
|
+
z125.literal("unset")
|
9895
9980
|
]),
|
9896
|
-
createdAt:
|
9897
|
-
updatedAt:
|
9898
|
-
deletedAt:
|
9981
|
+
createdAt: z125.date(),
|
9982
|
+
updatedAt: z125.date(),
|
9983
|
+
deletedAt: z125.date().nullable()
|
9899
9984
|
});
|
9900
|
-
var OAuth2AppSchema =
|
9901
|
-
id:
|
9902
|
-
name:
|
9903
|
-
description:
|
9904
|
-
title:
|
9905
|
-
provider:
|
9906
|
-
enabled:
|
9907
|
-
legacy:
|
9908
|
-
created:
|
9909
|
-
updated:
|
9910
|
-
includeInListing:
|
9911
|
-
clientId:
|
9912
|
-
clientSecret:
|
9913
|
-
authority:
|
9914
|
-
redirectUrl:
|
9915
|
-
serviceClient:
|
9916
|
-
googleProjectId:
|
9917
|
-
serviceClientEmail:
|
9918
|
-
serviceKey:
|
9985
|
+
var OAuth2AppSchema = z125.object({
|
9986
|
+
id: z125.string(),
|
9987
|
+
name: z125.string(),
|
9988
|
+
description: z125.string(),
|
9989
|
+
title: z125.string(),
|
9990
|
+
provider: z125.string(),
|
9991
|
+
enabled: z125.boolean(),
|
9992
|
+
legacy: z125.boolean(),
|
9993
|
+
created: z125.string(),
|
9994
|
+
updated: z125.string(),
|
9995
|
+
includeInListing: z125.boolean(),
|
9996
|
+
clientId: z125.string(),
|
9997
|
+
clientSecret: z125.string(),
|
9998
|
+
authority: z125.string(),
|
9999
|
+
redirectUrl: z125.string(),
|
10000
|
+
serviceClient: z125.string(),
|
10001
|
+
googleProjectId: z125.string(),
|
10002
|
+
serviceClientEmail: z125.string(),
|
10003
|
+
serviceKey: z125.string()
|
9919
10004
|
});
|
9920
10005
|
|
9921
10006
|
// src/mail/schemas/message.schema.ts
|
9922
|
-
import
|
9923
|
-
var AttachmentSchema =
|
9924
|
-
id:
|
9925
|
-
createdAt:
|
9926
|
-
updatedAt:
|
9927
|
-
deletedAt:
|
9928
|
-
roomId:
|
9929
|
-
messageId:
|
9930
|
-
fileName:
|
9931
|
-
fileType:
|
9932
|
-
emailEngineAttachmentId:
|
9933
|
-
uploadId:
|
9934
|
-
upload:
|
9935
|
-
id:
|
9936
|
-
createdAt:
|
9937
|
-
updatedAt:
|
9938
|
-
deletedAt:
|
9939
|
-
bucketName:
|
9940
|
-
fileName:
|
9941
|
-
fileKey:
|
9942
|
-
fileSize:
|
9943
|
-
fileUrl:
|
9944
|
-
extensionName:
|
10007
|
+
import z126 from "zod";
|
10008
|
+
var AttachmentSchema = z126.object({
|
10009
|
+
id: z126.string(),
|
10010
|
+
createdAt: z126.date(),
|
10011
|
+
updatedAt: z126.date(),
|
10012
|
+
deletedAt: z126.nullable(z126.date()),
|
10013
|
+
roomId: z126.string(),
|
10014
|
+
messageId: z126.string(),
|
10015
|
+
fileName: z126.string(),
|
10016
|
+
fileType: z126.string(),
|
10017
|
+
emailEngineAttachmentId: z126.string(),
|
10018
|
+
uploadId: z126.string(),
|
10019
|
+
upload: z126.object({
|
10020
|
+
id: z126.string(),
|
10021
|
+
createdAt: z126.date(),
|
10022
|
+
updatedAt: z126.date(),
|
10023
|
+
deletedAt: z126.nullable(z126.date()),
|
10024
|
+
bucketName: z126.string(),
|
10025
|
+
fileName: z126.string(),
|
10026
|
+
fileKey: z126.string(),
|
10027
|
+
fileSize: z126.number(),
|
10028
|
+
fileUrl: z126.string(),
|
10029
|
+
extensionName: z126.string()
|
9945
10030
|
})
|
9946
10031
|
});
|
9947
|
-
var MessageSchema2 =
|
9948
|
-
id:
|
9949
|
-
createdAt:
|
9950
|
-
updatedAt:
|
9951
|
-
deletedAt:
|
9952
|
-
roomId:
|
9953
|
-
subject:
|
9954
|
-
textPlain:
|
9955
|
-
textHtml:
|
9956
|
-
textId:
|
9957
|
-
emailEngineEmailId:
|
9958
|
-
emailEngineMessageId:
|
9959
|
-
emailEngineReplyTo:
|
9960
|
-
direction:
|
9961
|
-
date:
|
9962
|
-
action:
|
9963
|
-
unseen:
|
9964
|
-
sendAt:
|
9965
|
-
starred:
|
9966
|
-
seemsLikeNew:
|
9967
|
-
from:
|
9968
|
-
to:
|
9969
|
-
cc:
|
9970
|
-
bcc:
|
9971
|
-
attachments:
|
10032
|
+
var MessageSchema2 = z126.object({
|
10033
|
+
id: z126.string(),
|
10034
|
+
createdAt: z126.date(),
|
10035
|
+
updatedAt: z126.date(),
|
10036
|
+
deletedAt: z126.nullable(z126.date()),
|
10037
|
+
roomId: z126.string(),
|
10038
|
+
subject: z126.string(),
|
10039
|
+
textPlain: z126.string(),
|
10040
|
+
textHtml: z126.string(),
|
10041
|
+
textId: z126.string(),
|
10042
|
+
emailEngineEmailId: z126.string(),
|
10043
|
+
emailEngineMessageId: z126.string(),
|
10044
|
+
emailEngineReplyTo: z126.nullable(z126.string()),
|
10045
|
+
direction: z126.string(),
|
10046
|
+
date: z126.date(),
|
10047
|
+
action: z126.string(),
|
10048
|
+
unseen: z126.boolean(),
|
10049
|
+
sendAt: z126.date(),
|
10050
|
+
starred: z126.boolean(),
|
10051
|
+
seemsLikeNew: z126.boolean(),
|
10052
|
+
from: z126.array(MailParticipant),
|
10053
|
+
to: z126.array(MailParticipant),
|
10054
|
+
cc: z126.array(MailParticipant),
|
10055
|
+
bcc: z126.array(MailParticipant),
|
10056
|
+
attachments: z126.array(AttachmentSchema)
|
9972
10057
|
});
|
9973
10058
|
|
9974
10059
|
// src/mail/schemas/room.schema.ts
|
9975
|
-
var ContactSchema3 =
|
9976
|
-
id:
|
9977
|
-
createdAt:
|
9978
|
-
updatedAt:
|
9979
|
-
deletedAt:
|
9980
|
-
name:
|
9981
|
-
address:
|
9982
|
-
channel:
|
9983
|
-
notes:
|
9984
|
-
contactProfile:
|
9985
|
-
socialProfileUrl:
|
9986
|
-
});
|
9987
|
-
var MailUserSchema =
|
9988
|
-
id:
|
9989
|
-
createdAt:
|
9990
|
-
updatedAt:
|
9991
|
-
deletedAt:
|
9992
|
-
name:
|
9993
|
-
address:
|
9994
|
-
contactId:
|
10060
|
+
var ContactSchema3 = z127.object({
|
10061
|
+
id: z127.string().uuid(),
|
10062
|
+
createdAt: z127.date(),
|
10063
|
+
updatedAt: z127.date(),
|
10064
|
+
deletedAt: z127.date().nullable(),
|
10065
|
+
name: z127.string(),
|
10066
|
+
address: z127.string().nullable(),
|
10067
|
+
channel: z127.string().nullable(),
|
10068
|
+
notes: z127.string().nullable(),
|
10069
|
+
contactProfile: z127.string().nullable(),
|
10070
|
+
socialProfileUrl: z127.string().nullable()
|
10071
|
+
});
|
10072
|
+
var MailUserSchema = z127.object({
|
10073
|
+
id: z127.string(),
|
10074
|
+
createdAt: z127.date(),
|
10075
|
+
updatedAt: z127.date(),
|
10076
|
+
deletedAt: z127.date().nullable(),
|
10077
|
+
name: z127.string(),
|
10078
|
+
address: z127.string(),
|
10079
|
+
contactId: z127.string(),
|
9995
10080
|
contact: ContactSchema3,
|
9996
|
-
isNewContact:
|
9997
|
-
});
|
9998
|
-
var MailParticipant =
|
9999
|
-
id:
|
10000
|
-
createdAt:
|
10001
|
-
updatedAt:
|
10002
|
-
deletedAt:
|
10003
|
-
roomId:
|
10004
|
-
messageId:
|
10005
|
-
mailUserId:
|
10081
|
+
isNewContact: z127.boolean()
|
10082
|
+
});
|
10083
|
+
var MailParticipant = z127.object({
|
10084
|
+
id: z127.string(),
|
10085
|
+
createdAt: z127.date(),
|
10086
|
+
updatedAt: z127.date(),
|
10087
|
+
deletedAt: z127.date().nullable(),
|
10088
|
+
roomId: z127.string(),
|
10089
|
+
messageId: z127.string(),
|
10090
|
+
mailUserId: z127.string(),
|
10006
10091
|
mailUser: MailUserSchema
|
10007
10092
|
});
|
10008
|
-
var TagSchema2 =
|
10009
|
-
color:
|
10010
|
-
id:
|
10011
|
-
createdAt:
|
10012
|
-
updatedAt:
|
10013
|
-
deletedAt:
|
10014
|
-
name:
|
10015
|
-
});
|
10016
|
-
var UserModel =
|
10017
|
-
id:
|
10018
|
-
createdAt:
|
10019
|
-
updatedAt:
|
10020
|
-
deletedAt:
|
10021
|
-
name:
|
10022
|
-
email:
|
10023
|
-
address:
|
10024
|
-
phone:
|
10025
|
-
notificationCount:
|
10026
|
-
});
|
10027
|
-
var ActivityLogModel =
|
10028
|
-
id:
|
10029
|
-
createdAt:
|
10030
|
-
updatedAt:
|
10031
|
-
deletedAt:
|
10032
|
-
description:
|
10033
|
-
actorId:
|
10034
|
-
roomId:
|
10093
|
+
var TagSchema2 = z127.object({
|
10094
|
+
color: z127.string(),
|
10095
|
+
id: z127.string(),
|
10096
|
+
createdAt: z127.date(),
|
10097
|
+
updatedAt: z127.date(),
|
10098
|
+
deletedAt: z127.date().nullable(),
|
10099
|
+
name: z127.string()
|
10100
|
+
});
|
10101
|
+
var UserModel = z127.object({
|
10102
|
+
id: z127.string().uuid(),
|
10103
|
+
createdAt: z127.date(),
|
10104
|
+
updatedAt: z127.date(),
|
10105
|
+
deletedAt: z127.date().nullable(),
|
10106
|
+
name: z127.string(),
|
10107
|
+
email: z127.string(),
|
10108
|
+
address: z127.string().nullable(),
|
10109
|
+
phone: z127.string().nullable(),
|
10110
|
+
notificationCount: z127.number().nullable()
|
10111
|
+
});
|
10112
|
+
var ActivityLogModel = z127.object({
|
10113
|
+
id: z127.string(),
|
10114
|
+
createdAt: z127.date(),
|
10115
|
+
updatedAt: z127.date(),
|
10116
|
+
deletedAt: z127.nullable(z127.string()),
|
10117
|
+
description: z127.string(),
|
10118
|
+
actorId: z127.string(),
|
10119
|
+
roomId: z127.string(),
|
10035
10120
|
actor: UserModel
|
10036
10121
|
});
|
10037
|
-
var MessagesAndLogsSchema =
|
10038
|
-
|
10122
|
+
var MessagesAndLogsSchema = z127.array(
|
10123
|
+
z127.union([MessageSchema2, ActivityLogModel])
|
10039
10124
|
);
|
10040
|
-
var MailRoomSchema =
|
10041
|
-
id:
|
10042
|
-
createdAt:
|
10043
|
-
updatedAt:
|
10044
|
-
deletedAt:
|
10045
|
-
subject:
|
10046
|
-
resolved:
|
10047
|
-
assigneeId:
|
10048
|
-
note:
|
10049
|
-
mailId:
|
10050
|
-
direction:
|
10051
|
-
lastMessageId:
|
10052
|
-
firstMessageId:
|
10053
|
-
from:
|
10054
|
-
to:
|
10055
|
-
cc:
|
10056
|
-
bcc:
|
10125
|
+
var MailRoomSchema = z127.object({
|
10126
|
+
id: z127.string(),
|
10127
|
+
createdAt: z127.date(),
|
10128
|
+
updatedAt: z127.date(),
|
10129
|
+
deletedAt: z127.date().nullable(),
|
10130
|
+
subject: z127.string(),
|
10131
|
+
resolved: z127.boolean(),
|
10132
|
+
assigneeId: z127.string().nullable(),
|
10133
|
+
note: z127.string(),
|
10134
|
+
mailId: z127.string(),
|
10135
|
+
direction: z127.string(),
|
10136
|
+
lastMessageId: z127.string(),
|
10137
|
+
firstMessageId: z127.string(),
|
10138
|
+
from: z127.array(MailParticipant),
|
10139
|
+
to: z127.array(MailParticipant),
|
10140
|
+
cc: z127.array(MailParticipant),
|
10141
|
+
bcc: z127.array(MailParticipant),
|
10057
10142
|
firstMessage: MessageSchema2,
|
10058
10143
|
lastMessage: MessageSchema2,
|
10059
|
-
tags:
|
10144
|
+
tags: z127.array(TagSchema2),
|
10060
10145
|
assignee: UserModel,
|
10061
|
-
messages:
|
10146
|
+
messages: z127.array(MessageSchema2),
|
10062
10147
|
messagesAndLogs: MessagesAndLogsSchema,
|
10063
10148
|
mail: MailAccountSchema,
|
10064
|
-
unReadMessageCount:
|
10149
|
+
unReadMessageCount: z127.number(),
|
10065
10150
|
cxlog: CxLogSchema
|
10066
10151
|
});
|
10067
|
-
var AttachmentSchema2 =
|
10068
|
-
fileName:
|
10069
|
-
fileType:
|
10070
|
-
emailEngineAttachmentId:
|
10071
|
-
uploadId:
|
10072
|
-
messageId:
|
10073
|
-
roomId:
|
10152
|
+
var AttachmentSchema2 = z127.object({
|
10153
|
+
fileName: z127.string(),
|
10154
|
+
fileType: z127.string(),
|
10155
|
+
emailEngineAttachmentId: z127.string(),
|
10156
|
+
uploadId: z127.string(),
|
10157
|
+
messageId: z127.string(),
|
10158
|
+
roomId: z127.string(),
|
10074
10159
|
upload: UploadSchema
|
10075
10160
|
});
|
10076
10161
|
|
10077
10162
|
// src/mail/schemas/room-validation.schema.ts
|
10078
|
-
import
|
10163
|
+
import z128 from "zod";
|
10079
10164
|
var RoomContractsValidationSchema = {
|
10080
10165
|
getAll: {
|
10081
|
-
input:
|
10082
|
-
page:
|
10083
|
-
pageSize:
|
10084
|
-
keyword:
|
10085
|
-
value:
|
10086
|
-
category:
|
10166
|
+
input: z128.object({
|
10167
|
+
page: z128.coerce.number().default(1),
|
10168
|
+
pageSize: z128.coerce.number().default(10),
|
10169
|
+
keyword: z128.object({
|
10170
|
+
value: z128.string(),
|
10171
|
+
category: z128.union([z128.literal("contact"), z128.literal("message")])
|
10087
10172
|
}).optional(),
|
10088
|
-
contactLabels:
|
10089
|
-
channels:
|
10090
|
-
date:
|
10091
|
-
contacts:
|
10092
|
-
assignees:
|
10093
|
-
level1:
|
10094
|
-
|
10095
|
-
|
10096
|
-
|
10097
|
-
|
10098
|
-
|
10099
|
-
|
10173
|
+
contactLabels: z128.array(z128.string()).optional(),
|
10174
|
+
channels: z128.array(z128.string()).optional(),
|
10175
|
+
date: z128.string().optional(),
|
10176
|
+
contacts: z128.array(z128.string()).optional(),
|
10177
|
+
assignees: z128.array(z128.string()).optional(),
|
10178
|
+
level1: z128.union([
|
10179
|
+
z128.literal("open"),
|
10180
|
+
z128.literal("close"),
|
10181
|
+
z128.literal("inbox"),
|
10182
|
+
z128.literal("sent"),
|
10183
|
+
z128.literal("scheduled"),
|
10184
|
+
z128.literal("starred")
|
10100
10185
|
]).optional(),
|
10101
|
-
level2:
|
10102
|
-
|
10103
|
-
|
10104
|
-
|
10105
|
-
|
10186
|
+
level2: z128.union([
|
10187
|
+
z128.literal("all"),
|
10188
|
+
z128.literal("unassign"),
|
10189
|
+
z128.literal("mine"),
|
10190
|
+
z128.literal("other")
|
10106
10191
|
]).optional()
|
10107
10192
|
}),
|
10108
|
-
output:
|
10109
|
-
data:
|
10110
|
-
total:
|
10111
|
-
page:
|
10112
|
-
pageSize:
|
10193
|
+
output: z128.object({
|
10194
|
+
data: z128.array(MailRoomSchema),
|
10195
|
+
total: z128.number(),
|
10196
|
+
page: z128.number(),
|
10197
|
+
pageSize: z128.number()
|
10113
10198
|
})
|
10114
10199
|
},
|
10115
10200
|
update: {
|
10116
|
-
input:
|
10117
|
-
disposition:
|
10118
|
-
assigneeId:
|
10119
|
-
note:
|
10120
|
-
tags:
|
10121
|
-
handover:
|
10122
|
-
|
10201
|
+
input: z128.object({
|
10202
|
+
disposition: z128.string().optional().nullable(),
|
10203
|
+
assigneeId: z128.string().uuid().optional().nullable(),
|
10204
|
+
note: z128.string().optional(),
|
10205
|
+
tags: z128.array(z128.string().uuid()).optional(),
|
10206
|
+
handover: z128.boolean().or(
|
10207
|
+
z128.union([z128.literal("true"), z128.literal("false")]).transform((value) => value.toLowerCase() === "true")
|
10123
10208
|
).optional().nullable(),
|
10124
|
-
selfAssign:
|
10125
|
-
|
10209
|
+
selfAssign: z128.boolean().or(
|
10210
|
+
z128.union([z128.literal("true"), z128.literal("false")]).transform((value) => value.toLowerCase() === "true")
|
10126
10211
|
).optional().nullable()
|
10127
10212
|
})
|
10128
10213
|
}
|
@@ -10136,7 +10221,7 @@ var roomContract = initContract48().router(
|
|
10136
10221
|
path: "/",
|
10137
10222
|
responses: {
|
10138
10223
|
200: DefaultSuccessResponseSchema.extend({
|
10139
|
-
message:
|
10224
|
+
message: z129.string()
|
10140
10225
|
}),
|
10141
10226
|
...DefaultResponses
|
10142
10227
|
},
|
@@ -10149,10 +10234,10 @@ var roomContract = initContract48().router(
|
|
10149
10234
|
query: RoomContractsValidationSchema.getAll.input,
|
10150
10235
|
responses: {
|
10151
10236
|
200: DefaultSuccessResponseSchema.extend({
|
10152
|
-
data:
|
10153
|
-
total:
|
10154
|
-
page:
|
10155
|
-
pageSize:
|
10237
|
+
data: z129.array(MailRoomSchema),
|
10238
|
+
total: z129.number(),
|
10239
|
+
page: z129.number(),
|
10240
|
+
pageSize: z129.number()
|
10156
10241
|
}),
|
10157
10242
|
...DefaultResponses
|
10158
10243
|
},
|
@@ -10164,24 +10249,24 @@ var roomContract = initContract48().router(
|
|
10164
10249
|
path: "/count_rooms/all",
|
10165
10250
|
responses: {
|
10166
10251
|
200: DefaultSuccessResponseSchema.extend({
|
10167
|
-
data:
|
10168
|
-
general:
|
10169
|
-
|
10170
|
-
name:
|
10171
|
-
count:
|
10172
|
-
unReadMessagesCount:
|
10252
|
+
data: z129.object({
|
10253
|
+
general: z129.array(
|
10254
|
+
z129.object({
|
10255
|
+
name: z129.string(),
|
10256
|
+
count: z129.number(),
|
10257
|
+
unReadMessagesCount: z129.number()
|
10173
10258
|
})
|
10174
10259
|
),
|
10175
|
-
channels:
|
10176
|
-
|
10260
|
+
channels: z129.array(
|
10261
|
+
z129.object({
|
10177
10262
|
channel: MailAccountSchema,
|
10178
|
-
count:
|
10263
|
+
count: z129.number()
|
10179
10264
|
})
|
10180
10265
|
),
|
10181
|
-
contactLabels:
|
10182
|
-
|
10266
|
+
contactLabels: z129.array(
|
10267
|
+
z129.object({
|
10183
10268
|
label: TagSchema,
|
10184
|
-
count:
|
10269
|
+
count: z129.number()
|
10185
10270
|
})
|
10186
10271
|
)
|
10187
10272
|
})
|
@@ -10193,12 +10278,12 @@ var roomContract = initContract48().router(
|
|
10193
10278
|
getAttachments: {
|
10194
10279
|
method: "GET",
|
10195
10280
|
path: "/:id/attachments",
|
10196
|
-
pathParams:
|
10197
|
-
id:
|
10281
|
+
pathParams: z129.object({
|
10282
|
+
id: z129.string().uuid()
|
10198
10283
|
}),
|
10199
10284
|
responses: {
|
10200
10285
|
200: DefaultSuccessResponseSchema.extend({
|
10201
|
-
data:
|
10286
|
+
data: z129.array(AttachmentSchema2)
|
10202
10287
|
}),
|
10203
10288
|
...DefaultResponses
|
10204
10289
|
},
|
@@ -10207,12 +10292,12 @@ var roomContract = initContract48().router(
|
|
10207
10292
|
getParticipants: {
|
10208
10293
|
method: "GET",
|
10209
10294
|
path: "/:id/participants",
|
10210
|
-
pathParams:
|
10211
|
-
id:
|
10295
|
+
pathParams: z129.object({
|
10296
|
+
id: z129.string().uuid()
|
10212
10297
|
}),
|
10213
10298
|
responses: {
|
10214
10299
|
200: DefaultSuccessResponseSchema.extend({
|
10215
|
-
data:
|
10300
|
+
data: z129.array(MailParticipant)
|
10216
10301
|
}),
|
10217
10302
|
...DefaultResponses
|
10218
10303
|
},
|
@@ -10223,22 +10308,22 @@ var roomContract = initContract48().router(
|
|
10223
10308
|
path: "/add_email_to_contact",
|
10224
10309
|
responses: {
|
10225
10310
|
200: DefaultSuccessResponseSchema.extend({
|
10226
|
-
data:
|
10311
|
+
data: z129.string()
|
10227
10312
|
}),
|
10228
10313
|
...DefaultResponses
|
10229
10314
|
},
|
10230
|
-
body:
|
10231
|
-
email:
|
10232
|
-
contactId:
|
10233
|
-
mailUserId:
|
10315
|
+
body: z129.object({
|
10316
|
+
email: z129.string(),
|
10317
|
+
contactId: z129.string(),
|
10318
|
+
mailUserId: z129.string()
|
10234
10319
|
}),
|
10235
10320
|
summary: "Add a new email of a mail room participant to an existing contact"
|
10236
10321
|
},
|
10237
10322
|
update: {
|
10238
10323
|
method: "PATCH",
|
10239
10324
|
path: "/:id",
|
10240
|
-
pathParams:
|
10241
|
-
id:
|
10325
|
+
pathParams: z129.object({
|
10326
|
+
id: z129.string()
|
10242
10327
|
}),
|
10243
10328
|
responses: {
|
10244
10329
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -10252,12 +10337,12 @@ var roomContract = initContract48().router(
|
|
10252
10337
|
markAsRead: {
|
10253
10338
|
method: "POST",
|
10254
10339
|
path: "/mark_as_read",
|
10255
|
-
body:
|
10256
|
-
id:
|
10340
|
+
body: z129.object({
|
10341
|
+
id: z129.string()
|
10257
10342
|
}),
|
10258
10343
|
responses: {
|
10259
10344
|
200: DefaultSuccessResponseSchema.extend({
|
10260
|
-
message:
|
10345
|
+
message: z129.string()
|
10261
10346
|
}),
|
10262
10347
|
...DefaultResponses
|
10263
10348
|
},
|
@@ -10266,8 +10351,8 @@ var roomContract = initContract48().router(
|
|
10266
10351
|
getById: {
|
10267
10352
|
method: "GET",
|
10268
10353
|
path: "/:id",
|
10269
|
-
pathParams:
|
10270
|
-
id:
|
10354
|
+
pathParams: z129.object({
|
10355
|
+
id: z129.string().uuid()
|
10271
10356
|
}),
|
10272
10357
|
responses: {
|
10273
10358
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -10285,90 +10370,90 @@ var roomContract = initContract48().router(
|
|
10285
10370
|
|
10286
10371
|
// src/mail/account-contract.ts
|
10287
10372
|
import { initContract as initContract49 } from "@ts-rest/core";
|
10288
|
-
import
|
10373
|
+
import z131 from "zod";
|
10289
10374
|
|
10290
10375
|
// src/mail/schemas/account-validation.schema.ts
|
10291
|
-
import
|
10376
|
+
import z130 from "zod";
|
10292
10377
|
var AccountContractsValidationSchemas = {
|
10293
10378
|
create: {
|
10294
|
-
input:
|
10295
|
-
address:
|
10296
|
-
name:
|
10297
|
-
password:
|
10298
|
-
mailServerId:
|
10299
|
-
signature:
|
10379
|
+
input: z130.object({
|
10380
|
+
address: z130.string().min(1, "Email address cannot be empty.").email("Invalid email address."),
|
10381
|
+
name: z130.string().min(1, "Account name cannot be empty."),
|
10382
|
+
password: z130.string().min(1, "Password cannot be empty."),
|
10383
|
+
mailServerId: z130.string().uuid("Invalid mail_server_id"),
|
10384
|
+
signature: z130.string().optional().default("")
|
10300
10385
|
})
|
10301
10386
|
},
|
10302
10387
|
createWithCustomSmtpAndImap: {
|
10303
|
-
input:
|
10304
|
-
email:
|
10305
|
-
name:
|
10306
|
-
password:
|
10307
|
-
imap:
|
10308
|
-
host:
|
10309
|
-
port:
|
10310
|
-
secure:
|
10388
|
+
input: z130.object({
|
10389
|
+
email: z130.string(),
|
10390
|
+
name: z130.string(),
|
10391
|
+
password: z130.string(),
|
10392
|
+
imap: z130.object({
|
10393
|
+
host: z130.string(),
|
10394
|
+
port: z130.number(),
|
10395
|
+
secure: z130.boolean().default(false)
|
10311
10396
|
//Whether to use TLS for the connection (usually true for port 993)
|
10312
10397
|
}),
|
10313
|
-
smtp:
|
10314
|
-
host:
|
10315
|
-
port:
|
10316
|
-
secure:
|
10398
|
+
smtp: z130.object({
|
10399
|
+
host: z130.string(),
|
10400
|
+
port: z130.number(),
|
10401
|
+
secure: z130.boolean().default(false)
|
10317
10402
|
//Whether to use TLS for the connection (usually true for port 993)
|
10318
10403
|
})
|
10319
10404
|
})
|
10320
10405
|
},
|
10321
10406
|
getById: {
|
10322
|
-
input:
|
10323
|
-
id:
|
10407
|
+
input: z130.object({
|
10408
|
+
id: z130.string().uuid()
|
10324
10409
|
}),
|
10325
10410
|
output: MailAccountSchema
|
10326
10411
|
},
|
10327
10412
|
getAll: {
|
10328
|
-
output:
|
10413
|
+
output: z130.array(MailAccountSchema)
|
10329
10414
|
},
|
10330
10415
|
update: {
|
10331
10416
|
input: MailAccountSchema,
|
10332
10417
|
output: MailAccountSchema
|
10333
10418
|
},
|
10334
10419
|
disconnect: {
|
10335
|
-
input:
|
10336
|
-
id:
|
10420
|
+
input: z130.object({
|
10421
|
+
id: z130.string().uuid()
|
10337
10422
|
}),
|
10338
10423
|
output: MailAccountSchema
|
10339
10424
|
},
|
10340
10425
|
reconnect: {
|
10341
|
-
input:
|
10342
|
-
id:
|
10426
|
+
input: z130.object({
|
10427
|
+
id: z130.string()
|
10343
10428
|
}),
|
10344
10429
|
output: MailAccountSchema
|
10345
10430
|
},
|
10346
10431
|
delete: {
|
10347
|
-
input:
|
10348
|
-
id:
|
10432
|
+
input: z130.object({
|
10433
|
+
id: z130.string()
|
10349
10434
|
}),
|
10350
|
-
output:
|
10435
|
+
output: z130.string()
|
10351
10436
|
},
|
10352
10437
|
deleteEmailEngineAcc: {
|
10353
|
-
input:
|
10354
|
-
account:
|
10438
|
+
input: z130.object({
|
10439
|
+
account: z130.string()
|
10355
10440
|
}),
|
10356
10441
|
output: MailAccountSchema
|
10357
10442
|
},
|
10358
10443
|
generateOAuth2AuthenticationLink: {
|
10359
|
-
body:
|
10360
|
-
oAuth2AppId:
|
10361
|
-
mailServerId:
|
10444
|
+
body: z130.object({
|
10445
|
+
oAuth2AppId: z130.string(),
|
10446
|
+
mailServerId: z130.string()
|
10362
10447
|
}),
|
10363
|
-
response:
|
10364
|
-
url:
|
10365
|
-
account:
|
10448
|
+
response: z130.object({
|
10449
|
+
url: z130.string(),
|
10450
|
+
account: z130.string()
|
10366
10451
|
})
|
10367
10452
|
},
|
10368
10453
|
createOAuth2Acc: {
|
10369
|
-
body:
|
10370
|
-
account:
|
10371
|
-
name:
|
10454
|
+
body: z130.object({
|
10455
|
+
account: z130.string(),
|
10456
|
+
name: z130.string()
|
10372
10457
|
}),
|
10373
10458
|
response: MailAccountSchema
|
10374
10459
|
}
|
@@ -10386,14 +10471,14 @@ var accountContract = initContract49().router(
|
|
10386
10471
|
// data: AccountContractsValidationSchemas.create.output,
|
10387
10472
|
data: MailAccountSchema
|
10388
10473
|
}),
|
10389
|
-
400:
|
10390
|
-
message:
|
10474
|
+
400: z131.object({
|
10475
|
+
message: z131.string()
|
10391
10476
|
}),
|
10392
|
-
409:
|
10393
|
-
message:
|
10477
|
+
409: z131.object({
|
10478
|
+
message: z131.string()
|
10394
10479
|
}),
|
10395
|
-
500:
|
10396
|
-
message:
|
10480
|
+
500: z131.object({
|
10481
|
+
message: z131.string()
|
10397
10482
|
}),
|
10398
10483
|
...DefaultResponses
|
10399
10484
|
},
|
@@ -10408,14 +10493,14 @@ var accountContract = initContract49().router(
|
|
10408
10493
|
// data: AccountContractsValidationSchemas.create.output,
|
10409
10494
|
// data: MailAccountSchema,
|
10410
10495
|
}),
|
10411
|
-
400:
|
10412
|
-
message:
|
10496
|
+
400: z131.object({
|
10497
|
+
message: z131.string()
|
10413
10498
|
}),
|
10414
|
-
409:
|
10415
|
-
message:
|
10499
|
+
409: z131.object({
|
10500
|
+
message: z131.string()
|
10416
10501
|
}),
|
10417
|
-
500:
|
10418
|
-
message:
|
10502
|
+
500: z131.object({
|
10503
|
+
message: z131.string()
|
10419
10504
|
}),
|
10420
10505
|
...DefaultResponses
|
10421
10506
|
},
|
@@ -10431,14 +10516,14 @@ var accountContract = initContract49().router(
|
|
10431
10516
|
201: DefaultSuccessResponseSchema.extend({
|
10432
10517
|
data: AccountContractsValidationSchemas.generateOAuth2AuthenticationLink.response
|
10433
10518
|
}),
|
10434
|
-
400:
|
10435
|
-
message:
|
10519
|
+
400: z131.object({
|
10520
|
+
message: z131.string()
|
10436
10521
|
}),
|
10437
|
-
409:
|
10438
|
-
message:
|
10522
|
+
409: z131.object({
|
10523
|
+
message: z131.string()
|
10439
10524
|
}),
|
10440
|
-
500:
|
10441
|
-
message:
|
10525
|
+
500: z131.object({
|
10526
|
+
message: z131.string()
|
10442
10527
|
}),
|
10443
10528
|
...DefaultResponses
|
10444
10529
|
},
|
@@ -10452,7 +10537,7 @@ var accountContract = initContract49().router(
|
|
10452
10537
|
path: "/sync",
|
10453
10538
|
responses: {
|
10454
10539
|
200: DefaultSuccessResponseSchema.extend({
|
10455
|
-
message:
|
10540
|
+
message: z131.string()
|
10456
10541
|
}),
|
10457
10542
|
...DefaultResponses
|
10458
10543
|
},
|
@@ -10477,13 +10562,13 @@ var accountContract = initContract49().router(
|
|
10477
10562
|
getAll: {
|
10478
10563
|
method: "GET",
|
10479
10564
|
path: "",
|
10480
|
-
query:
|
10481
|
-
state:
|
10482
|
-
withDeleted:
|
10565
|
+
query: z131.object({
|
10566
|
+
state: z131.union([z131.literal("connected"), z131.literal("disconnected")]).optional(),
|
10567
|
+
withDeleted: z131.boolean().default(false)
|
10483
10568
|
}).optional(),
|
10484
10569
|
responses: {
|
10485
10570
|
200: DefaultSuccessResponseSchema.extend({
|
10486
|
-
data:
|
10571
|
+
data: z131.array(MailAccountSchema)
|
10487
10572
|
}),
|
10488
10573
|
...DefaultResponses
|
10489
10574
|
},
|
@@ -10494,8 +10579,8 @@ var accountContract = initContract49().router(
|
|
10494
10579
|
update: {
|
10495
10580
|
method: "PATCH",
|
10496
10581
|
path: "/:id",
|
10497
|
-
pathParams:
|
10498
|
-
id:
|
10582
|
+
pathParams: z131.object({
|
10583
|
+
id: z131.string().uuid()
|
10499
10584
|
}),
|
10500
10585
|
responses: {
|
10501
10586
|
201: DefaultSuccessResponseSchema.extend({
|
@@ -10544,7 +10629,7 @@ var accountContract = initContract49().router(
|
|
10544
10629
|
pathParams: AccountContractsValidationSchemas.delete.input,
|
10545
10630
|
responses: {
|
10546
10631
|
200: DefaultSuccessResponseSchema.extend({
|
10547
|
-
message:
|
10632
|
+
message: z131.string()
|
10548
10633
|
}),
|
10549
10634
|
...DefaultResponses
|
10550
10635
|
},
|
@@ -10559,7 +10644,7 @@ var accountContract = initContract49().router(
|
|
10559
10644
|
pathParams: AccountContractsValidationSchemas.deleteEmailEngineAcc.input,
|
10560
10645
|
responses: {
|
10561
10646
|
200: DefaultSuccessResponseSchema.extend({
|
10562
|
-
message:
|
10647
|
+
message: z131.string()
|
10563
10648
|
}),
|
10564
10649
|
...DefaultResponses
|
10565
10650
|
},
|
@@ -10588,20 +10673,20 @@ var accountContract = initContract49().router(
|
|
10588
10673
|
|
10589
10674
|
// src/mail/mail-server-contract.ts
|
10590
10675
|
import { initContract as initContract50 } from "@ts-rest/core";
|
10591
|
-
import
|
10676
|
+
import z133 from "zod";
|
10592
10677
|
|
10593
10678
|
// src/mail/schemas/servers-validation.schema.ts
|
10594
|
-
import
|
10595
|
-
var CreateMailServerSchema =
|
10596
|
-
name:
|
10597
|
-
smtpHost:
|
10598
|
-
smtpPort:
|
10599
|
-
smtpTlsPort:
|
10600
|
-
useTlsForSmtp:
|
10601
|
-
imapHost:
|
10602
|
-
imapPort:
|
10603
|
-
imapTlsPort:
|
10604
|
-
useTlsForImap:
|
10679
|
+
import z132 from "zod";
|
10680
|
+
var CreateMailServerSchema = z132.object({
|
10681
|
+
name: z132.string(),
|
10682
|
+
smtpHost: z132.string(),
|
10683
|
+
smtpPort: z132.number(),
|
10684
|
+
smtpTlsPort: z132.number(),
|
10685
|
+
useTlsForSmtp: z132.boolean(),
|
10686
|
+
imapHost: z132.string(),
|
10687
|
+
imapPort: z132.number(),
|
10688
|
+
imapTlsPort: z132.number(),
|
10689
|
+
useTlsForImap: z132.boolean()
|
10605
10690
|
});
|
10606
10691
|
|
10607
10692
|
// src/mail/mail-server-contract.ts
|
@@ -10624,11 +10709,11 @@ var serverContract = initContract50().router(
|
|
10624
10709
|
path: "/oauth2/apps",
|
10625
10710
|
responses: {
|
10626
10711
|
200: DefaultSuccessResponseSchema.extend({
|
10627
|
-
data:
|
10628
|
-
total:
|
10629
|
-
pages:
|
10630
|
-
page:
|
10631
|
-
apps:
|
10712
|
+
data: z133.object({
|
10713
|
+
total: z133.number(),
|
10714
|
+
pages: z133.number(),
|
10715
|
+
page: z133.number(),
|
10716
|
+
apps: z133.array(OAuth2AppSchema)
|
10632
10717
|
})
|
10633
10718
|
}),
|
10634
10719
|
...DefaultResponses
|
@@ -10638,8 +10723,8 @@ var serverContract = initContract50().router(
|
|
10638
10723
|
getById: {
|
10639
10724
|
method: "GET",
|
10640
10725
|
path: "/:id",
|
10641
|
-
pathParams:
|
10642
|
-
id:
|
10726
|
+
pathParams: z133.object({
|
10727
|
+
id: z133.string().uuid()
|
10643
10728
|
}),
|
10644
10729
|
responses: {
|
10645
10730
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -10654,7 +10739,7 @@ var serverContract = initContract50().router(
|
|
10654
10739
|
path: "/",
|
10655
10740
|
responses: {
|
10656
10741
|
200: DefaultSuccessResponseSchema.extend({
|
10657
|
-
data:
|
10742
|
+
data: z133.array(MailServerSchema)
|
10658
10743
|
}),
|
10659
10744
|
...DefaultResponses
|
10660
10745
|
},
|
@@ -10663,8 +10748,8 @@ var serverContract = initContract50().router(
|
|
10663
10748
|
update: {
|
10664
10749
|
method: "PATCH",
|
10665
10750
|
path: "/:id",
|
10666
|
-
pathParams:
|
10667
|
-
id:
|
10751
|
+
pathParams: z133.object({
|
10752
|
+
id: z133.string().uuid()
|
10668
10753
|
}),
|
10669
10754
|
responses: {
|
10670
10755
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -10678,8 +10763,8 @@ var serverContract = initContract50().router(
|
|
10678
10763
|
delete: {
|
10679
10764
|
method: "DELETE",
|
10680
10765
|
path: "/:id",
|
10681
|
-
pathParams:
|
10682
|
-
id:
|
10766
|
+
pathParams: z133.object({
|
10767
|
+
id: z133.string().uuid()
|
10683
10768
|
}),
|
10684
10769
|
responses: {
|
10685
10770
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -10698,45 +10783,45 @@ var serverContract = initContract50().router(
|
|
10698
10783
|
|
10699
10784
|
// src/mail/message-contract.ts
|
10700
10785
|
import { initContract as initContract51 } from "@ts-rest/core";
|
10701
|
-
import
|
10786
|
+
import z135 from "zod";
|
10702
10787
|
|
10703
10788
|
// src/mail/schemas/message-validation.schema.ts
|
10704
|
-
import
|
10705
|
-
var MailParticipant2 =
|
10706
|
-
name:
|
10707
|
-
address:
|
10789
|
+
import z134 from "zod";
|
10790
|
+
var MailParticipant2 = z134.object({
|
10791
|
+
name: z134.string().optional(),
|
10792
|
+
address: z134.string().email()
|
10708
10793
|
});
|
10709
10794
|
var MessageContractsValidationsSchema = {
|
10710
10795
|
submit: {
|
10711
|
-
input:
|
10712
|
-
subject:
|
10713
|
-
text:
|
10714
|
-
html:
|
10796
|
+
input: z134.object({
|
10797
|
+
subject: z134.string(),
|
10798
|
+
text: z134.string(),
|
10799
|
+
html: z134.string(),
|
10715
10800
|
from: MailParticipant2,
|
10716
10801
|
to: MailParticipant2,
|
10717
|
-
cc:
|
10718
|
-
bcc:
|
10719
|
-
sendAt:
|
10720
|
-
reference:
|
10721
|
-
messageId:
|
10722
|
-
action:
|
10802
|
+
cc: z134.array(MailParticipant2).optional(),
|
10803
|
+
bcc: z134.array(MailParticipant2).optional(),
|
10804
|
+
sendAt: z134.string().optional(),
|
10805
|
+
reference: z134.object({
|
10806
|
+
messageId: z134.string(),
|
10807
|
+
action: z134.union([z134.literal("reply"), z134.literal("forward")])
|
10723
10808
|
}).optional(),
|
10724
|
-
attachments:
|
10725
|
-
|
10726
|
-
fileType:
|
10727
|
-
fileName:
|
10728
|
-
fileKey:
|
10729
|
-
fileSize:
|
10730
|
-
bucketName:
|
10731
|
-
presignedUrl:
|
10809
|
+
attachments: z134.array(
|
10810
|
+
z134.object({
|
10811
|
+
fileType: z134.string(),
|
10812
|
+
fileName: z134.string(),
|
10813
|
+
fileKey: z134.string(),
|
10814
|
+
fileSize: z134.number(),
|
10815
|
+
bucketName: z134.string(),
|
10816
|
+
presignedUrl: z134.string()
|
10732
10817
|
})
|
10733
10818
|
).optional()
|
10734
10819
|
}),
|
10735
|
-
output:
|
10736
|
-
response:
|
10737
|
-
messageId:
|
10738
|
-
sendAt:
|
10739
|
-
queueId:
|
10820
|
+
output: z134.object({
|
10821
|
+
response: z134.string(),
|
10822
|
+
messageId: z134.string(),
|
10823
|
+
sendAt: z134.string(),
|
10824
|
+
queueId: z134.string()
|
10740
10825
|
})
|
10741
10826
|
}
|
10742
10827
|
};
|
@@ -10765,8 +10850,8 @@ var messageContract = initContract51().router(
|
|
10765
10850
|
path: "/new_message_count",
|
10766
10851
|
responses: {
|
10767
10852
|
200: DefaultSuccessResponseSchema.extend({
|
10768
|
-
data:
|
10769
|
-
count:
|
10853
|
+
data: z135.object({
|
10854
|
+
count: z135.number()
|
10770
10855
|
})
|
10771
10856
|
}),
|
10772
10857
|
...DefaultResponses
|
@@ -10778,8 +10863,8 @@ var messageContract = initContract51().router(
|
|
10778
10863
|
getById: {
|
10779
10864
|
method: "GET",
|
10780
10865
|
path: "/:id",
|
10781
|
-
pathParams:
|
10782
|
-
id:
|
10866
|
+
pathParams: z135.object({
|
10867
|
+
id: z135.string()
|
10783
10868
|
}),
|
10784
10869
|
responses: {
|
10785
10870
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -10794,8 +10879,8 @@ var messageContract = initContract51().router(
|
|
10794
10879
|
update: {
|
10795
10880
|
method: "PATCH",
|
10796
10881
|
path: "/:id",
|
10797
|
-
pathParams:
|
10798
|
-
id:
|
10882
|
+
pathParams: z135.object({
|
10883
|
+
id: z135.string()
|
10799
10884
|
}),
|
10800
10885
|
responses: {
|
10801
10886
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -10811,8 +10896,8 @@ var messageContract = initContract51().router(
|
|
10811
10896
|
delete: {
|
10812
10897
|
method: "DELETE",
|
10813
10898
|
path: "/:id",
|
10814
|
-
pathParams:
|
10815
|
-
id:
|
10899
|
+
pathParams: z135.object({
|
10900
|
+
id: z135.string()
|
10816
10901
|
}),
|
10817
10902
|
responses: {
|
10818
10903
|
200: DefaultSuccessResponseSchema.extend({
|
@@ -10828,13 +10913,13 @@ var messageContract = initContract51().router(
|
|
10828
10913
|
cancelScheduledMessage: {
|
10829
10914
|
method: "DELETE",
|
10830
10915
|
path: "/scheduled_message/:id",
|
10831
|
-
pathParams:
|
10832
|
-
id:
|
10916
|
+
pathParams: z135.object({
|
10917
|
+
id: z135.string()
|
10833
10918
|
}),
|
10834
10919
|
responses: {
|
10835
10920
|
200: DefaultSuccessResponseSchema.extend({
|
10836
|
-
data:
|
10837
|
-
totalMessagesCount:
|
10921
|
+
data: z135.object({
|
10922
|
+
totalMessagesCount: z135.number()
|
10838
10923
|
})
|
10839
10924
|
}),
|
10840
10925
|
...DefaultResponses
|
@@ -10859,38 +10944,38 @@ var mailContract = initContract52().router({
|
|
10859
10944
|
|
10860
10945
|
// src/webchat/index.ts
|
10861
10946
|
import { initContract as initContract53 } from "@ts-rest/core";
|
10862
|
-
import
|
10947
|
+
import z138 from "zod";
|
10863
10948
|
|
10864
10949
|
// src/webchat/schema.ts
|
10865
|
-
import
|
10950
|
+
import z137 from "zod";
|
10866
10951
|
|
10867
10952
|
// src/webchat/validation.ts
|
10868
|
-
import
|
10953
|
+
import z136 from "zod";
|
10869
10954
|
var ChatwootChannelType2 = /* @__PURE__ */ ((ChatwootChannelType3) => {
|
10870
10955
|
ChatwootChannelType3["WEB_WIDGET"] = "web_widget";
|
10871
10956
|
return ChatwootChannelType3;
|
10872
10957
|
})(ChatwootChannelType2 || {});
|
10873
|
-
var WebChatChannelSchema =
|
10874
|
-
avatar:
|
10875
|
-
name:
|
10876
|
-
type:
|
10877
|
-
websiteName:
|
10878
|
-
welcomeTitle:
|
10879
|
-
websiteUrl:
|
10880
|
-
welcomeTagline:
|
10881
|
-
agentAwayMessage:
|
10882
|
-
widgetColor:
|
10958
|
+
var WebChatChannelSchema = z136.object({
|
10959
|
+
avatar: z136.string().optional(),
|
10960
|
+
name: z136.string(),
|
10961
|
+
type: z136.nativeEnum(ChatwootChannelType2),
|
10962
|
+
websiteName: z136.string(),
|
10963
|
+
welcomeTitle: z136.string(),
|
10964
|
+
websiteUrl: z136.string().url(),
|
10965
|
+
welcomeTagline: z136.string().optional(),
|
10966
|
+
agentAwayMessage: z136.string().optional(),
|
10967
|
+
widgetColor: z136.string().optional()
|
10883
10968
|
});
|
10884
10969
|
|
10885
10970
|
// src/webchat/schema.ts
|
10886
|
-
var ConnectWebChatChannelSchema =
|
10887
|
-
name:
|
10888
|
-
actor:
|
10889
|
-
id:
|
10890
|
-
name:
|
10891
|
-
email:
|
10892
|
-
address:
|
10893
|
-
phone:
|
10971
|
+
var ConnectWebChatChannelSchema = z137.object({
|
10972
|
+
name: z137.string(),
|
10973
|
+
actor: z137.object({
|
10974
|
+
id: z137.string().uuid(),
|
10975
|
+
name: z137.string(),
|
10976
|
+
email: z137.string().email(),
|
10977
|
+
address: z137.string().nullable(),
|
10978
|
+
phone: z137.string().nullable()
|
10894
10979
|
}),
|
10895
10980
|
channel: WebChatChannelSchema
|
10896
10981
|
});
|
@@ -10924,8 +11009,8 @@ var platformWebchatContract = initContract53().router(
|
|
10924
11009
|
disconnectToService: {
|
10925
11010
|
method: "POST",
|
10926
11011
|
path: "/disconnect",
|
10927
|
-
body:
|
10928
|
-
id:
|
11012
|
+
body: z138.object({
|
11013
|
+
id: z138.string().uuid()
|
10929
11014
|
}),
|
10930
11015
|
responses: {
|
10931
11016
|
200: ChannelServiceResponseSchema,
|
@@ -10936,8 +11021,8 @@ var platformWebchatContract = initContract53().router(
|
|
10936
11021
|
reconnect: {
|
10937
11022
|
method: "POST",
|
10938
11023
|
path: "/reconnect/:channelId",
|
10939
|
-
pathParams:
|
10940
|
-
channelId:
|
11024
|
+
pathParams: z138.object({
|
11025
|
+
channelId: z138.string().uuid()
|
10941
11026
|
}),
|
10942
11027
|
body: null,
|
10943
11028
|
responses: {
|
@@ -10949,8 +11034,8 @@ var platformWebchatContract = initContract53().router(
|
|
10949
11034
|
delete: {
|
10950
11035
|
method: "DELETE",
|
10951
11036
|
path: "/delete/:channelId",
|
10952
|
-
pathParams:
|
10953
|
-
channelId:
|
11037
|
+
pathParams: z138.object({
|
11038
|
+
channelId: z138.string().uuid()
|
10954
11039
|
}),
|
10955
11040
|
body: null,
|
10956
11041
|
responses: {
|
@@ -10967,18 +11052,18 @@ var platformWebchatContract = initContract53().router(
|
|
10967
11052
|
|
10968
11053
|
// src/hold-label/index.ts
|
10969
11054
|
import { initContract as initContract54 } from "@ts-rest/core";
|
10970
|
-
import
|
11055
|
+
import z140 from "zod";
|
10971
11056
|
|
10972
11057
|
// src/hold-label/validation.ts
|
10973
|
-
import
|
10974
|
-
var UpdatePositionSchema2 =
|
10975
|
-
holdLabels:
|
10976
|
-
|
11058
|
+
import z139 from "zod";
|
11059
|
+
var UpdatePositionSchema2 = z139.object({
|
11060
|
+
holdLabels: z139.array(
|
11061
|
+
z139.object({ id: z139.string().uuid(), position: z139.number() })
|
10977
11062
|
)
|
10978
11063
|
});
|
10979
|
-
var HoldRoomSchema =
|
10980
|
-
roomId:
|
10981
|
-
holdLabelId:
|
11064
|
+
var HoldRoomSchema = z139.object({
|
11065
|
+
roomId: z139.string().uuid(),
|
11066
|
+
holdLabelId: z139.string().uuid()
|
10982
11067
|
});
|
10983
11068
|
|
10984
11069
|
// src/hold-label/index.ts
|
@@ -10986,7 +11071,7 @@ var holdLabelContract = initContract54().router({
|
|
10986
11071
|
createHoldLabel: {
|
10987
11072
|
method: "POST",
|
10988
11073
|
path: "ms/hold-label",
|
10989
|
-
body:
|
11074
|
+
body: z140.object({ name: z140.string() }),
|
10990
11075
|
responses: {
|
10991
11076
|
201: DefaultSuccessResponseSchema.extend({
|
10992
11077
|
holdLabel: HoldLabelSchema
|
@@ -10998,7 +11083,7 @@ var holdLabelContract = initContract54().router({
|
|
10998
11083
|
path: "chs/api/v1/hold-label",
|
10999
11084
|
responses: {
|
11000
11085
|
200: DefaultSuccessResponseSchema.extend({
|
11001
|
-
holdLabels:
|
11086
|
+
holdLabels: z140.array(HoldLabelSchema)
|
11002
11087
|
})
|
11003
11088
|
}
|
11004
11089
|
},
|
@@ -11016,8 +11101,8 @@ var holdLabelContract = initContract54().router({
|
|
11016
11101
|
updateHoldLabel: {
|
11017
11102
|
method: "PATCH",
|
11018
11103
|
path: "ms/hold-label/:id",
|
11019
|
-
pathParams:
|
11020
|
-
body:
|
11104
|
+
pathParams: z140.object({ id: z140.string().uuid() }),
|
11105
|
+
body: z140.object({ name: z140.string() }),
|
11021
11106
|
responses: {
|
11022
11107
|
200: DefaultSuccessResponseSchema.extend({
|
11023
11108
|
holdLabel: HoldLabelSchema
|
@@ -11027,7 +11112,7 @@ var holdLabelContract = initContract54().router({
|
|
11027
11112
|
deleteHoldLabel: {
|
11028
11113
|
method: "DELETE",
|
11029
11114
|
path: "ms/hold-label/:id",
|
11030
|
-
pathParams:
|
11115
|
+
pathParams: z140.object({ id: z140.string().uuid() }),
|
11031
11116
|
body: null,
|
11032
11117
|
responses: {
|
11033
11118
|
200: DefaultSuccessResponseSchema
|
@@ -11038,10 +11123,10 @@ var holdLabelContract = initContract54().router({
|
|
11038
11123
|
path: "ms/hold-label/auto-unhold",
|
11039
11124
|
responses: {
|
11040
11125
|
200: DefaultSuccessResponseSchema.extend({
|
11041
|
-
autoUnhold:
|
11042
|
-
resumeLabel:
|
11043
|
-
show:
|
11044
|
-
name:
|
11126
|
+
autoUnhold: z140.boolean(),
|
11127
|
+
resumeLabel: z140.object({
|
11128
|
+
show: z140.boolean(),
|
11129
|
+
name: z140.string()
|
11045
11130
|
})
|
11046
11131
|
})
|
11047
11132
|
}
|
@@ -11049,19 +11134,19 @@ var holdLabelContract = initContract54().router({
|
|
11049
11134
|
updateAutoUnhold: {
|
11050
11135
|
method: "POST",
|
11051
11136
|
path: "ms/hold-label/auto-unhold",
|
11052
|
-
body:
|
11053
|
-
autoUnhold:
|
11054
|
-
resumeLabel:
|
11055
|
-
show:
|
11056
|
-
name:
|
11137
|
+
body: z140.object({
|
11138
|
+
autoUnhold: z140.boolean().optional(),
|
11139
|
+
resumeLabel: z140.object({
|
11140
|
+
show: z140.boolean().optional(),
|
11141
|
+
name: z140.string().optional()
|
11057
11142
|
}).optional()
|
11058
11143
|
}),
|
11059
11144
|
responses: {
|
11060
11145
|
200: DefaultSuccessResponseSchema.extend({
|
11061
|
-
autoUnhold:
|
11062
|
-
resumeLabel:
|
11063
|
-
show:
|
11064
|
-
name:
|
11146
|
+
autoUnhold: z140.boolean(),
|
11147
|
+
resumeLabel: z140.object({
|
11148
|
+
show: z140.boolean(),
|
11149
|
+
name: z140.string()
|
11065
11150
|
})
|
11066
11151
|
})
|
11067
11152
|
}
|
@@ -11069,10 +11154,10 @@ var holdLabelContract = initContract54().router({
|
|
11069
11154
|
getHoldLogs: {
|
11070
11155
|
method: "GET",
|
11071
11156
|
path: "ms/hold-label/hold-logs",
|
11072
|
-
query:
|
11157
|
+
query: z140.object({ cxLogId: z140.string().uuid() }),
|
11073
11158
|
responses: {
|
11074
|
-
200:
|
11075
|
-
holdLogs:
|
11159
|
+
200: z140.object({
|
11160
|
+
holdLogs: z140.array(FormattedHoldLogSchema)
|
11076
11161
|
})
|
11077
11162
|
}
|
11078
11163
|
},
|
@@ -11089,7 +11174,7 @@ var holdLabelContract = initContract54().router({
|
|
11089
11174
|
unholdRoom: {
|
11090
11175
|
method: "POST",
|
11091
11176
|
path: "ms/hold-label/unhold-room",
|
11092
|
-
body:
|
11177
|
+
body: z140.object({ roomId: z140.string().uuid() }),
|
11093
11178
|
responses: {
|
11094
11179
|
200: DefaultSuccessResponseSchema.extend({
|
11095
11180
|
holdLog: HoldLogSchema.optional()
|
@@ -11100,89 +11185,89 @@ var holdLabelContract = initContract54().router({
|
|
11100
11185
|
|
11101
11186
|
// src/subscription/index.ts
|
11102
11187
|
import { initContract as initContract55 } from "@ts-rest/core";
|
11103
|
-
import { z as
|
11188
|
+
import { z as z143 } from "zod";
|
11104
11189
|
|
11105
11190
|
// src/subscription/schema.ts
|
11106
|
-
import
|
11191
|
+
import z141 from "zod";
|
11107
11192
|
var ProductPriceSchema = DefaultEntitySchema.extend({
|
11108
|
-
priceId:
|
11109
|
-
name:
|
11110
|
-
perUnit:
|
11111
|
-
price:
|
11112
|
-
currency:
|
11193
|
+
priceId: z141.string(),
|
11194
|
+
name: z141.string().nullable(),
|
11195
|
+
perUnit: z141.number(),
|
11196
|
+
price: z141.number(),
|
11197
|
+
currency: z141.string().nullable()
|
11113
11198
|
});
|
11114
11199
|
var ProductWithoutRelatedSchema = DefaultEntitySchema.extend({
|
11115
|
-
provider:
|
11116
|
-
productId:
|
11117
|
-
name:
|
11118
|
-
type:
|
11119
|
-
omnichannel:
|
11120
|
-
usageType:
|
11200
|
+
provider: z141.string(),
|
11201
|
+
productId: z141.string(),
|
11202
|
+
name: z141.string(),
|
11203
|
+
type: z141.string(),
|
11204
|
+
omnichannel: z141.string(),
|
11205
|
+
usageType: z141.string().nullable(),
|
11121
11206
|
productPrice: ProductPriceSchema
|
11122
11207
|
});
|
11123
11208
|
var RelatedProductSchema = DefaultEntitySchema.extend({
|
11124
|
-
includedQuantity:
|
11209
|
+
includedQuantity: z141.number(),
|
11125
11210
|
product: ProductWithoutRelatedSchema
|
11126
11211
|
});
|
11127
11212
|
var ProductSchema = DefaultEntitySchema.extend({
|
11128
|
-
provider:
|
11129
|
-
productId:
|
11130
|
-
name:
|
11131
|
-
type:
|
11132
|
-
omnichannel:
|
11133
|
-
usageType:
|
11213
|
+
provider: z141.string(),
|
11214
|
+
productId: z141.string(),
|
11215
|
+
name: z141.string(),
|
11216
|
+
type: z141.string(),
|
11217
|
+
omnichannel: z141.string(),
|
11218
|
+
usageType: z141.string().nullable(),
|
11134
11219
|
productPrice: ProductPriceSchema,
|
11135
|
-
relatedProducts:
|
11220
|
+
relatedProducts: z141.array(RelatedProductSchema)
|
11136
11221
|
});
|
11137
11222
|
var CustomerSchema = DefaultEntitySchema.extend({
|
11138
|
-
provider:
|
11139
|
-
customerId:
|
11140
|
-
email:
|
11141
|
-
name:
|
11142
|
-
balance:
|
11223
|
+
provider: z141.string(),
|
11224
|
+
customerId: z141.string(),
|
11225
|
+
email: z141.string(),
|
11226
|
+
name: z141.string(),
|
11227
|
+
balance: z141.number()
|
11143
11228
|
});
|
11144
11229
|
var SubscriptionProuctSchema = DefaultEntitySchema.extend({
|
11145
|
-
limit:
|
11146
|
-
subscriptionItemId:
|
11147
|
-
usage:
|
11230
|
+
limit: z141.number(),
|
11231
|
+
subscriptionItemId: z141.string(),
|
11232
|
+
usage: z141.number().nullable(),
|
11148
11233
|
product: ProductSchema
|
11149
11234
|
});
|
11150
11235
|
var SubscriptionSchema = DefaultEntitySchema.extend({
|
11151
|
-
provider:
|
11152
|
-
type:
|
11153
|
-
subscriptionId:
|
11154
|
-
interval:
|
11155
|
-
quantity:
|
11156
|
-
amount:
|
11157
|
-
startAt:
|
11158
|
-
expireAt:
|
11159
|
-
status:
|
11160
|
-
name:
|
11161
|
-
subscriptionProducts:
|
11236
|
+
provider: z141.string(),
|
11237
|
+
type: z141.string(),
|
11238
|
+
subscriptionId: z141.string(),
|
11239
|
+
interval: z141.string(),
|
11240
|
+
quantity: z141.number(),
|
11241
|
+
amount: z141.number(),
|
11242
|
+
startAt: z141.date().nullable(),
|
11243
|
+
expireAt: z141.date(),
|
11244
|
+
status: z141.string(),
|
11245
|
+
name: z141.string().nullable(),
|
11246
|
+
subscriptionProducts: z141.array(SubscriptionProuctSchema),
|
11162
11247
|
productPrice: ProductPriceSchema,
|
11163
11248
|
product: ProductSchema
|
11164
11249
|
});
|
11165
11250
|
|
11166
11251
|
// src/subscription/validation.ts
|
11167
|
-
import { z as
|
11168
|
-
var GetAvailablePlanSchema =
|
11169
|
-
type:
|
11170
|
-
currency:
|
11171
|
-
});
|
11172
|
-
var UpdateSubscriptionSchema =
|
11173
|
-
planProductId:
|
11174
|
-
planProductPriceId:
|
11175
|
-
subscriptionId:
|
11176
|
-
subscriptionProducts:
|
11177
|
-
|
11178
|
-
productId:
|
11179
|
-
productPriceId:
|
11180
|
-
quantity:
|
11252
|
+
import { z as z142 } from "zod";
|
11253
|
+
var GetAvailablePlanSchema = z142.object({
|
11254
|
+
type: z142.string(),
|
11255
|
+
currency: z142.string()
|
11256
|
+
});
|
11257
|
+
var UpdateSubscriptionSchema = z142.object({
|
11258
|
+
planProductId: z142.string(),
|
11259
|
+
planProductPriceId: z142.string(),
|
11260
|
+
subscriptionId: z142.string(),
|
11261
|
+
subscriptionProducts: z142.array(
|
11262
|
+
z142.object({
|
11263
|
+
productId: z142.string(),
|
11264
|
+
productPriceId: z142.string(),
|
11265
|
+
quantity: z142.number()
|
11181
11266
|
})
|
11182
11267
|
)
|
11183
11268
|
});
|
11184
|
-
var TopUpBalanceSchema =
|
11185
|
-
quantity:
|
11269
|
+
var TopUpBalanceSchema = z142.object({
|
11270
|
+
quantity: z142.number()
|
11186
11271
|
});
|
11187
11272
|
|
11188
11273
|
// src/subscription/index.ts
|
@@ -11206,9 +11291,9 @@ var subscriptionContract = initContract55().router(
|
|
11206
11291
|
body: UpdateSubscriptionSchema,
|
11207
11292
|
responses: {
|
11208
11293
|
200: DefaultSuccessResponseSchema.extend({
|
11209
|
-
message:
|
11210
|
-
requireCheckout:
|
11211
|
-
checkoutUrl:
|
11294
|
+
message: z143.string(),
|
11295
|
+
requireCheckout: z143.boolean(),
|
11296
|
+
checkoutUrl: z143.string().nullable()
|
11212
11297
|
}),
|
11213
11298
|
402: DefaultErrorResponseSchema,
|
11214
11299
|
500: DefaultErrorResponseSchema
|
@@ -11220,7 +11305,7 @@ var subscriptionContract = initContract55().router(
|
|
11220
11305
|
body: TopUpBalanceSchema,
|
11221
11306
|
responses: {
|
11222
11307
|
200: DefaultSuccessResponseSchema.extend({
|
11223
|
-
checkoutUrl:
|
11308
|
+
checkoutUrl: z143.string()
|
11224
11309
|
}),
|
11225
11310
|
500: DefaultErrorResponseSchema
|
11226
11311
|
}
|
@@ -11231,7 +11316,7 @@ var subscriptionContract = initContract55().router(
|
|
11231
11316
|
query: null,
|
11232
11317
|
responses: {
|
11233
11318
|
200: DefaultSuccessResponseSchema.extend({
|
11234
|
-
balance:
|
11319
|
+
balance: z143.number()
|
11235
11320
|
}),
|
11236
11321
|
500: DefaultErrorResponseSchema
|
11237
11322
|
}
|
@@ -11242,7 +11327,7 @@ var subscriptionContract = initContract55().router(
|
|
11242
11327
|
query: GetAvailablePlanSchema,
|
11243
11328
|
responses: {
|
11244
11329
|
200: DefaultSuccessResponseSchema.extend({
|
11245
|
-
data:
|
11330
|
+
data: z143.array(ProductSchema)
|
11246
11331
|
}),
|
11247
11332
|
500: DefaultErrorResponseSchema
|
11248
11333
|
}
|
@@ -11253,7 +11338,7 @@ var subscriptionContract = initContract55().router(
|
|
11253
11338
|
query: GetAvailablePlanSchema,
|
11254
11339
|
responses: {
|
11255
11340
|
200: DefaultSuccessResponseSchema.extend({
|
11256
|
-
data:
|
11341
|
+
data: z143.array(ProductSchema)
|
11257
11342
|
}),
|
11258
11343
|
500: DefaultErrorResponseSchema
|
11259
11344
|
}
|
@@ -11276,19 +11361,19 @@ var subscriptionContract = initContract55().router(
|
|
11276
11361
|
|
11277
11362
|
// src/cx-intelligence/index.ts
|
11278
11363
|
import { initContract as initContract56 } from "@ts-rest/core";
|
11279
|
-
import
|
11364
|
+
import z144 from "zod";
|
11280
11365
|
var cxIntelligenceContract = initContract56().router(
|
11281
11366
|
{
|
11282
11367
|
toggle: {
|
11283
11368
|
method: "POST",
|
11284
11369
|
path: "/toggle",
|
11285
11370
|
headers: DefaultHeaderSchema,
|
11286
|
-
body:
|
11287
|
-
enabled:
|
11371
|
+
body: z144.object({
|
11372
|
+
enabled: z144.union([z144.literal(true), z144.literal(false)])
|
11288
11373
|
}),
|
11289
11374
|
responses: {
|
11290
11375
|
200: DefaultSuccessResponseSchema.extend({
|
11291
|
-
message:
|
11376
|
+
message: z144.string()
|
11292
11377
|
}),
|
11293
11378
|
500: DefaultErrorResponseSchema
|
11294
11379
|
},
|
@@ -11298,15 +11383,15 @@ var cxIntelligenceContract = initContract56().router(
|
|
11298
11383
|
method: "POST",
|
11299
11384
|
path: "/cx-logs/:id/transcribe",
|
11300
11385
|
headers: DefaultHeaderSchema,
|
11301
|
-
pathParams:
|
11302
|
-
id:
|
11386
|
+
pathParams: z144.object({
|
11387
|
+
id: z144.string().uuid()
|
11303
11388
|
}),
|
11304
|
-
body:
|
11305
|
-
fileUrl:
|
11389
|
+
body: z144.object({
|
11390
|
+
fileUrl: z144.string()
|
11306
11391
|
}),
|
11307
11392
|
responses: {
|
11308
11393
|
200: DefaultSuccessResponseSchema.extend({
|
11309
|
-
message:
|
11394
|
+
message: z144.string()
|
11310
11395
|
}),
|
11311
11396
|
403: DefaultErrorResponseSchema,
|
11312
11397
|
404: DefaultErrorResponseSchema,
|
@@ -11326,13 +11411,13 @@ var settingCxIntelligenceContract = initContract56().router(
|
|
11326
11411
|
headers: DefaultHeaderSchema,
|
11327
11412
|
responses: {
|
11328
11413
|
200: DefaultSuccessResponseSchema.extend({
|
11329
|
-
message:
|
11330
|
-
status:
|
11414
|
+
message: z144.string(),
|
11415
|
+
status: z144.boolean()
|
11331
11416
|
}),
|
11332
|
-
422:
|
11333
|
-
requestId:
|
11334
|
-
message:
|
11335
|
-
status:
|
11417
|
+
422: z144.object({
|
11418
|
+
requestId: z144.string(),
|
11419
|
+
message: z144.string(),
|
11420
|
+
status: z144.boolean()
|
11336
11421
|
}),
|
11337
11422
|
500: DefaultErrorResponseSchema
|
11338
11423
|
},
|
@@ -11344,20 +11429,20 @@ var settingCxIntelligenceContract = initContract56().router(
|
|
11344
11429
|
|
11345
11430
|
// src/export/index.ts
|
11346
11431
|
import { initContract as initContract57 } from "@ts-rest/core";
|
11347
|
-
import
|
11432
|
+
import z145 from "zod";
|
11348
11433
|
var exportContract = initContract57().router(
|
11349
11434
|
{
|
11350
11435
|
notifyExport: {
|
11351
11436
|
method: "POST",
|
11352
11437
|
path: "notify",
|
11353
|
-
body:
|
11354
|
-
userId:
|
11355
|
-
module:
|
11356
|
-
fileUrl:
|
11438
|
+
body: z145.object({
|
11439
|
+
userId: z145.string().uuid(),
|
11440
|
+
module: z145.string(),
|
11441
|
+
fileUrl: z145.string()
|
11357
11442
|
}),
|
11358
11443
|
responses: {
|
11359
11444
|
200: DefaultSuccessResponseSchema.extend({
|
11360
|
-
success:
|
11445
|
+
success: z145.boolean()
|
11361
11446
|
}),
|
11362
11447
|
500: DefaultErrorResponseSchema
|
11363
11448
|
}
|