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