@ai-grator/api 0.1.24 → 0.1.27
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/admin/endpoints/admin.ts +6 -0
- package/admin/endpoints/commands/index.ts +2 -0
- package/admin/endpoints/commands/mark-admin-support-chat-read.command.ts +25 -0
- package/admin/endpoints/commands/send-admin-support-reply.command.ts +38 -0
- package/admin/endpoints/queries/get-admin-support-chat-messages.query.ts +33 -0
- package/admin/endpoints/queries/get-admin-support-chats.query.ts +27 -0
- package/admin/endpoints/queries/index.ts +6 -4
- package/admin/models/admin-support-chat-list-item.schema.ts +13 -0
- package/admin/models/index.ts +1 -0
- package/build/admin/endpoints/admin.d.ts +4 -0
- package/build/admin/endpoints/admin.d.ts.map +1 -1
- package/build/admin/endpoints/admin.js +5 -0
- package/build/admin/endpoints/commands/index.d.ts +2 -0
- package/build/admin/endpoints/commands/index.d.ts.map +1 -1
- package/build/admin/endpoints/commands/index.js +2 -0
- package/build/admin/endpoints/commands/mark-admin-support-chat-read.command.d.ts +24 -0
- package/build/admin/endpoints/commands/mark-admin-support-chat-read.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/mark-admin-support-chat-read.command.js +25 -0
- package/build/admin/endpoints/commands/send-admin-support-reply.command.d.ts +79 -0
- package/build/admin/endpoints/commands/send-admin-support-reply.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/send-admin-support-reply.command.js +37 -0
- package/build/admin/endpoints/queries/get-admin-support-chat-messages.query.d.ts +86 -0
- package/build/admin/endpoints/queries/get-admin-support-chat-messages.query.d.ts.map +1 -0
- package/build/admin/endpoints/queries/get-admin-support-chat-messages.query.js +32 -0
- package/build/admin/endpoints/queries/get-admin-support-chats.query.d.ts +49 -0
- package/build/admin/endpoints/queries/get-admin-support-chats.query.d.ts.map +1 -0
- package/build/admin/endpoints/queries/get-admin-support-chats.query.js +27 -0
- package/build/admin/endpoints/queries/index.d.ts +6 -4
- package/build/admin/endpoints/queries/index.d.ts.map +1 -1
- package/build/admin/endpoints/queries/index.js +6 -4
- package/build/admin/models/admin-support-chat-list-item.schema.d.ts +12 -0
- package/build/admin/models/admin-support-chat-list-item.schema.d.ts.map +1 -0
- package/build/admin/models/admin-support-chat-list-item.schema.js +13 -0
- package/build/admin/models/index.d.ts +1 -0
- package/build/admin/models/index.d.ts.map +1 -1
- package/build/admin/models/index.js +1 -0
- package/build/chat/endpoints/commands/create-chat.command.d.ts +2 -0
- package/build/chat/endpoints/commands/create-chat.command.d.ts.map +1 -1
- package/build/chat/endpoints/commands/update-chat.command.d.ts +2 -0
- package/build/chat/endpoints/commands/update-chat.command.d.ts.map +1 -1
- package/build/chat/endpoints/queries/get-chat-by-uuid.query.d.ts +2 -0
- package/build/chat/endpoints/queries/get-chat-by-uuid.query.d.ts.map +1 -1
- package/build/chat/endpoints/queries/get-chats.query.d.ts +2 -0
- package/build/chat/endpoints/queries/get-chats.query.d.ts.map +1 -1
- package/build/chat/models/chat-response.schema.d.ts +1 -0
- package/build/chat/models/chat-response.schema.d.ts.map +1 -1
- package/build/chat/models/chat-response.schema.js +1 -0
- package/build/errors/errors.d.ts +29 -0
- package/build/errors/errors.d.ts.map +1 -1
- package/build/errors/errors.js +29 -0
- package/build/index.d.ts +2 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +2 -0
- package/build/model-catalog/endpoints/index.d.ts +3 -0
- package/build/model-catalog/endpoints/index.d.ts.map +1 -0
- package/build/model-catalog/endpoints/index.js +18 -0
- package/build/model-catalog/endpoints/model-catalog.d.ts +5 -0
- package/build/model-catalog/endpoints/model-catalog.d.ts.map +1 -0
- package/build/model-catalog/endpoints/model-catalog.js +7 -0
- package/build/model-catalog/endpoints/queries/get-model-catalog.query.d.ts +39 -0
- package/build/model-catalog/endpoints/queries/get-model-catalog.query.d.ts.map +1 -0
- package/build/model-catalog/endpoints/queries/get-model-catalog.query.js +19 -0
- package/build/model-catalog/endpoints/queries/index.d.ts +2 -0
- package/build/model-catalog/endpoints/queries/index.d.ts.map +1 -0
- package/build/model-catalog/endpoints/queries/index.js +17 -0
- package/build/model-catalog/enums/index.d.ts +3 -0
- package/build/model-catalog/enums/index.d.ts.map +1 -0
- package/build/model-catalog/enums/index.js +18 -0
- package/build/model-catalog/enums/model-category.enum.d.ts +7 -0
- package/build/model-catalog/enums/model-category.enum.d.ts.map +1 -0
- package/build/model-catalog/enums/model-category.enum.js +10 -0
- package/build/model-catalog/enums/price-unit.enum.d.ts +5 -0
- package/build/model-catalog/enums/price-unit.enum.d.ts.map +1 -0
- package/build/model-catalog/enums/price-unit.enum.js +8 -0
- package/build/model-catalog/index.d.ts +4 -0
- package/build/model-catalog/index.d.ts.map +1 -0
- package/build/model-catalog/index.js +19 -0
- package/build/model-catalog/models/index.d.ts +2 -0
- package/build/model-catalog/models/index.d.ts.map +1 -0
- package/build/model-catalog/models/index.js +17 -0
- package/build/model-catalog/models/model-catalog-item-response.schema.d.ts +16 -0
- package/build/model-catalog/models/model-catalog-item-response.schema.d.ts.map +1 -0
- package/build/model-catalog/models/model-catalog-item-response.schema.js +15 -0
- package/build/scripts/generate-openapi.js +97 -0
- package/build/support/endpoints/commands/index.d.ts +3 -0
- package/build/support/endpoints/commands/index.d.ts.map +1 -0
- package/build/support/endpoints/commands/index.js +18 -0
- package/build/support/endpoints/commands/mark-support-chat-read-by-user.command.d.ts +12 -0
- package/build/support/endpoints/commands/mark-support-chat-read-by-user.command.d.ts.map +1 -0
- package/build/support/endpoints/commands/mark-support-chat-read-by-user.command.js +15 -0
- package/build/support/endpoints/commands/send-support-message.command.d.ts +70 -0
- package/build/support/endpoints/commands/send-support-message.command.d.ts.map +1 -0
- package/build/support/endpoints/commands/send-support-message.command.js +30 -0
- package/build/support/endpoints/index.d.ts +4 -0
- package/build/support/endpoints/index.d.ts.map +1 -0
- package/build/support/endpoints/index.js +19 -0
- package/build/support/endpoints/queries/get-support-history.query.d.ts +77 -0
- package/build/support/endpoints/queries/get-support-history.query.d.ts.map +1 -0
- package/build/support/endpoints/queries/get-support-history.query.js +25 -0
- package/build/support/endpoints/queries/get-support-unread-count.query.d.ts +17 -0
- package/build/support/endpoints/queries/get-support-unread-count.query.d.ts.map +1 -0
- package/build/support/endpoints/queries/get-support-unread-count.query.js +18 -0
- package/build/support/endpoints/queries/index.d.ts +3 -0
- package/build/support/endpoints/queries/index.d.ts.map +1 -0
- package/build/support/endpoints/queries/index.js +18 -0
- package/build/support/endpoints/support.d.ts +8 -0
- package/build/support/endpoints/support.d.ts.map +1 -0
- package/build/support/endpoints/support.js +10 -0
- package/build/support/enums/index.d.ts +2 -0
- package/build/support/enums/index.d.ts.map +1 -0
- package/build/support/enums/index.js +17 -0
- package/build/support/enums/support-message-author-type.enum.d.ts +5 -0
- package/build/support/enums/support-message-author-type.enum.d.ts.map +1 -0
- package/build/support/enums/support-message-author-type.enum.js +8 -0
- package/build/support/index.d.ts +5 -0
- package/build/support/index.d.ts.map +1 -0
- package/build/support/index.js +20 -0
- package/build/support/models/index.d.ts +2 -0
- package/build/support/models/index.d.ts.map +1 -0
- package/build/support/models/index.js +17 -0
- package/build/support/models/support-message-response.schema.d.ts +28 -0
- package/build/support/models/support-message-response.schema.d.ts.map +1 -0
- package/build/support/models/support-message-response.schema.js +14 -0
- package/build/support/websocket/index.d.ts +2 -0
- package/build/support/websocket/index.d.ts.map +1 -0
- package/build/support/websocket/index.js +17 -0
- package/build/support/websocket/support-socket-events.d.ts +50 -0
- package/build/support/websocket/support-socket-events.d.ts.map +1 -0
- package/build/support/websocket/support-socket-events.js +27 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/chat/models/chat-response.schema.ts +1 -0
- package/errors/errors.ts +29 -0
- package/index.ts +2 -0
- package/model-catalog/endpoints/index.ts +2 -0
- package/model-catalog/endpoints/model-catalog.ts +5 -0
- package/model-catalog/endpoints/queries/get-model-catalog.query.ts +18 -0
- package/model-catalog/endpoints/queries/index.ts +1 -0
- package/model-catalog/enums/index.ts +2 -0
- package/model-catalog/enums/model-category.enum.ts +6 -0
- package/model-catalog/enums/price-unit.enum.ts +4 -0
- package/model-catalog/index.ts +3 -0
- package/model-catalog/models/index.ts +1 -0
- package/model-catalog/models/model-catalog-item-response.schema.ts +15 -0
- package/package.json +1 -1
- package/scripts/generate-openapi.ts +136 -0
- package/support/endpoints/commands/index.ts +2 -0
- package/support/endpoints/commands/mark-support-chat-read-by-user.command.ts +14 -0
- package/support/endpoints/commands/send-support-message.command.ts +30 -0
- package/support/endpoints/index.ts +3 -0
- package/support/endpoints/queries/get-support-history.query.ts +25 -0
- package/support/endpoints/queries/get-support-unread-count.query.ts +17 -0
- package/support/endpoints/queries/index.ts +2 -0
- package/support/endpoints/support.ts +8 -0
- package/support/enums/index.ts +1 -0
- package/support/enums/support-message-author-type.enum.ts +4 -0
- package/support/index.ts +4 -0
- package/support/models/index.ts +1 -0
- package/support/models/support-message-response.schema.ts +14 -0
- package/support/websocket/index.ts +1 -0
- package/support/websocket/support-socket-events.ts +35 -0
|
@@ -45,6 +45,15 @@ const get_messages_by_chat_query_1 = require("../message/endpoints/queries/get-m
|
|
|
45
45
|
const get_message_price_estimate_query_1 = require("../message/endpoints/queries/get-message-price-estimate.query");
|
|
46
46
|
const file_1 = require("../file/endpoints/file");
|
|
47
47
|
const upload_file_command_1 = require("../file/endpoints/commands/upload-file.command");
|
|
48
|
+
const support_1 = require("../support/endpoints/support");
|
|
49
|
+
const send_support_message_command_1 = require("../support/endpoints/commands/send-support-message.command");
|
|
50
|
+
const mark_support_chat_read_by_user_command_1 = require("../support/endpoints/commands/mark-support-chat-read-by-user.command");
|
|
51
|
+
const get_support_history_query_1 = require("../support/endpoints/queries/get-support-history.query");
|
|
52
|
+
const get_support_unread_count_query_1 = require("../support/endpoints/queries/get-support-unread-count.query");
|
|
53
|
+
const send_admin_support_reply_command_1 = require("../admin/endpoints/commands/send-admin-support-reply.command");
|
|
54
|
+
const mark_admin_support_chat_read_command_1 = require("../admin/endpoints/commands/mark-admin-support-chat-read.command");
|
|
55
|
+
const get_admin_support_chats_query_1 = require("../admin/endpoints/queries/get-admin-support-chats.query");
|
|
56
|
+
const get_admin_support_chat_messages_query_1 = require("../admin/endpoints/queries/get-admin-support-chat-messages.query");
|
|
48
57
|
const wallet_1 = require("../wallet/endpoints/wallet");
|
|
49
58
|
const get_wallet_balance_query_1 = require("../wallet/endpoints/queries/get-wallet-balance.query");
|
|
50
59
|
const get_wallet_transactions_query_1 = require("../wallet/endpoints/queries/get-wallet-transactions.query");
|
|
@@ -53,6 +62,8 @@ const create_payment_command_1 = require("../payment/endpoints/commands/create-p
|
|
|
53
62
|
const ai_model_1 = require("../ai-model/endpoints/ai-model");
|
|
54
63
|
const get_ai_model_by_uuid_query_1 = require("../ai-model/endpoints/queries/get-ai-model-by-uuid.query");
|
|
55
64
|
const get_ai_models_query_1 = require("../ai-model/endpoints/queries/get-ai-models.query");
|
|
65
|
+
const model_catalog_1 = require("../model-catalog/endpoints/model-catalog");
|
|
66
|
+
const get_model_catalog_query_1 = require("../model-catalog/endpoints/queries/get-model-catalog.query");
|
|
56
67
|
const generation_model_1 = require("../generation-model/endpoints/generation-model");
|
|
57
68
|
const get_generation_models_query_1 = require("../generation-model/endpoints/queries/get-generation-models.query");
|
|
58
69
|
const get_generation_models_by_type_query_1 = require("../generation-model/endpoints/queries/get-generation-models-by-type.query");
|
|
@@ -175,6 +186,7 @@ async function main() {
|
|
|
175
186
|
registerSchema('AiModelsGetAllResponse', get_ai_models_query_1.GetAllAiModelsQueryResponse);
|
|
176
187
|
registerSchema('AiModelsGetByUuidParams', get_ai_model_by_uuid_query_1.GetAiModelByUuidQueryParams);
|
|
177
188
|
registerSchema('AiModelsGetByUuidResponse', get_ai_model_by_uuid_query_1.GetAiModelByUuidQueryResponse);
|
|
189
|
+
registerSchema('ModelCatalogGetAllResponse', get_model_catalog_query_1.GetModelCatalogQueryResponse);
|
|
178
190
|
registerSchema('GenerationModelGetAllResponse', get_generation_models_query_1.GetGenerationModelsQueryResponse);
|
|
179
191
|
registerSchema('GenerationModelGetByTypeParams', get_generation_models_by_type_query_1.GetGenerationModelsByTypeQueryParams);
|
|
180
192
|
registerSchema('GenerationModelGetByTypeResponse', get_generation_models_by_type_query_1.GetGenerationModelsByTypeQueryResponse);
|
|
@@ -239,6 +251,22 @@ async function main() {
|
|
|
239
251
|
registerSchema('AdminGetStatsQuery', get_admin_stats_query_1.GetAdminStatsQueryQuery);
|
|
240
252
|
registerSchema('AdminGetStatsResponse', get_admin_stats_query_1.GetAdminStatsQueryResponse);
|
|
241
253
|
registerSchema('AdminGetKieBalanceResponse', get_admin_kie_balance_query_1.GetAdminKieBalanceQueryResponse);
|
|
254
|
+
registerSchema('AdminGetSupportChatsQuery', get_admin_support_chats_query_1.GetAdminSupportChatsQueryQuery);
|
|
255
|
+
registerSchema('AdminGetSupportChatsResponse', get_admin_support_chats_query_1.GetAdminSupportChatsQueryResponse);
|
|
256
|
+
registerSchema('AdminGetSupportChatMessagesParams', get_admin_support_chat_messages_query_1.GetAdminSupportChatMessagesQueryParams);
|
|
257
|
+
registerSchema('AdminGetSupportChatMessagesQuery', get_admin_support_chat_messages_query_1.GetAdminSupportChatMessagesQueryQuery);
|
|
258
|
+
registerSchema('AdminGetSupportChatMessagesResponse', get_admin_support_chat_messages_query_1.GetAdminSupportChatMessagesQueryResponse);
|
|
259
|
+
registerSchema('AdminSendSupportReplyParams', send_admin_support_reply_command_1.SendAdminSupportReplyCommandParams);
|
|
260
|
+
registerSchema('AdminSendSupportReplyRequest', send_admin_support_reply_command_1.SendAdminSupportReplyCommandBody);
|
|
261
|
+
registerSchema('AdminSendSupportReplyResponse', send_admin_support_reply_command_1.SendAdminSupportReplyCommandResponse);
|
|
262
|
+
registerSchema('AdminMarkSupportChatReadParams', mark_admin_support_chat_read_command_1.MarkAdminSupportChatReadCommandParams);
|
|
263
|
+
registerSchema('AdminMarkSupportChatReadResponse', mark_admin_support_chat_read_command_1.MarkAdminSupportChatReadCommandResponse);
|
|
264
|
+
registerSchema('SupportSendMessageRequest', send_support_message_command_1.SendSupportMessageCommandBody);
|
|
265
|
+
registerSchema('SupportSendMessageResponse', send_support_message_command_1.SendSupportMessageCommandResponse);
|
|
266
|
+
registerSchema('SupportGetHistoryQuery', get_support_history_query_1.GetSupportHistoryQueryQuery);
|
|
267
|
+
registerSchema('SupportGetHistoryResponse', get_support_history_query_1.GetSupportHistoryQueryResponse);
|
|
268
|
+
registerSchema('SupportGetUnreadCountResponse', get_support_unread_count_query_1.GetSupportUnreadCountQueryResponse);
|
|
269
|
+
registerSchema('SupportMarkReadResponse', mark_support_chat_read_by_user_command_1.MarkSupportChatReadByUserCommandResponse);
|
|
242
270
|
registerSchema('MarketplaceCardCreateRequest', create_marketplace_card_command_1.CreateMarketplaceCardCommandBody);
|
|
243
271
|
registerSchema('MarketplaceCardCreateResponse', create_marketplace_card_command_1.CreateMarketplaceCardCommandResponse);
|
|
244
272
|
registerSchema('MarketplaceCardGetByUuidParams', get_marketplace_card_query_1.GetMarketplaceCardQueryParams);
|
|
@@ -276,6 +304,12 @@ async function main() {
|
|
|
276
304
|
delete_message_command_1.DeleteMessageCommand,
|
|
277
305
|
];
|
|
278
306
|
const fileContracts = [upload_file_command_1.UploadFileCommand];
|
|
307
|
+
const supportContracts = [
|
|
308
|
+
send_support_message_command_1.SendSupportMessageCommand,
|
|
309
|
+
get_support_history_query_1.GetSupportHistoryQuery,
|
|
310
|
+
get_support_unread_count_query_1.GetSupportUnreadCountQuery,
|
|
311
|
+
mark_support_chat_read_by_user_command_1.MarkSupportChatReadByUserCommand,
|
|
312
|
+
];
|
|
279
313
|
const walletContracts = [get_wallet_balance_query_1.GetWalletBalanceQuery, get_wallet_transactions_query_1.GetWalletTransactionsQuery];
|
|
280
314
|
const paymentContracts = [create_payment_command_1.CreatePaymentCommand];
|
|
281
315
|
const marketplaceCardContracts = [
|
|
@@ -287,6 +321,7 @@ async function main() {
|
|
|
287
321
|
delete_marketplace_card_command_1.DeleteMarketplaceCardCommand,
|
|
288
322
|
];
|
|
289
323
|
const aiModelContracts = [get_ai_models_query_1.GetAllAiModelsQuery, get_ai_model_by_uuid_query_1.GetAiModelByUuidQuery];
|
|
324
|
+
const modelCatalogContracts = [get_model_catalog_query_1.GetModelCatalogQuery];
|
|
290
325
|
const generationModelContracts = [
|
|
291
326
|
get_generation_models_query_1.GetGenerationModelsQuery,
|
|
292
327
|
get_generation_models_by_type_query_1.GetGenerationModelsByTypeQuery,
|
|
@@ -325,6 +360,10 @@ async function main() {
|
|
|
325
360
|
get_admin_user_transactions_query_1.GetAdminUserTransactionsQuery,
|
|
326
361
|
get_admin_stats_query_1.GetAdminStatsQuery,
|
|
327
362
|
get_admin_kie_balance_query_1.GetAdminKieBalanceQuery,
|
|
363
|
+
get_admin_support_chats_query_1.GetAdminSupportChatsQuery,
|
|
364
|
+
get_admin_support_chat_messages_query_1.GetAdminSupportChatMessagesQuery,
|
|
365
|
+
send_admin_support_reply_command_1.SendAdminSupportReplyCommand,
|
|
366
|
+
mark_admin_support_chat_read_command_1.MarkAdminSupportChatReadCommand,
|
|
328
367
|
];
|
|
329
368
|
for (const contract of authContracts) {
|
|
330
369
|
const method = contract.method.toLowerCase();
|
|
@@ -444,6 +483,35 @@ async function main() {
|
|
|
444
483
|
responses: buildResponses(contract.responses, resolveSchema),
|
|
445
484
|
});
|
|
446
485
|
}
|
|
486
|
+
for (const contract of supportContracts) {
|
|
487
|
+
const method = contract.method.toLowerCase();
|
|
488
|
+
if (!supportedHttpMethods.has(method)) {
|
|
489
|
+
throw new Error(`Unsupported HTTP method: ${contract.method}`);
|
|
490
|
+
}
|
|
491
|
+
registry.registerPath({
|
|
492
|
+
method: method,
|
|
493
|
+
path: toOpenApiPath(support_1.SUPPORT_CONTROLLER, contract.path),
|
|
494
|
+
summary: contract.summary,
|
|
495
|
+
tags: ['Support'],
|
|
496
|
+
request: {
|
|
497
|
+
...(contract.request?.body
|
|
498
|
+
? {
|
|
499
|
+
body: {
|
|
500
|
+
required: true,
|
|
501
|
+
content: {
|
|
502
|
+
'application/json': {
|
|
503
|
+
schema: resolveSchema(contract.request.body),
|
|
504
|
+
},
|
|
505
|
+
},
|
|
506
|
+
},
|
|
507
|
+
}
|
|
508
|
+
: {}),
|
|
509
|
+
...(contract.request?.query ? { query: resolveSchema(contract.request.query) } : {}),
|
|
510
|
+
...(contract.request?.params ? { params: resolveSchema(contract.request.params) } : {}),
|
|
511
|
+
},
|
|
512
|
+
responses: buildResponses(contract.responses, resolveSchema),
|
|
513
|
+
});
|
|
514
|
+
}
|
|
447
515
|
for (const contract of walletContracts) {
|
|
448
516
|
const method = contract.method.toLowerCase();
|
|
449
517
|
if (!supportedHttpMethods.has(method)) {
|
|
@@ -531,6 +599,35 @@ async function main() {
|
|
|
531
599
|
responses: buildResponses(contract.responses, resolveSchema),
|
|
532
600
|
});
|
|
533
601
|
}
|
|
602
|
+
for (const contract of modelCatalogContracts) {
|
|
603
|
+
const method = contract.method.toLowerCase();
|
|
604
|
+
if (!supportedHttpMethods.has(method)) {
|
|
605
|
+
throw new Error(`Unsupported HTTP method: ${contract.method}`);
|
|
606
|
+
}
|
|
607
|
+
registry.registerPath({
|
|
608
|
+
method: method,
|
|
609
|
+
path: toOpenApiPath(model_catalog_1.MODEL_CATALOG_CONTROLLER, contract.path),
|
|
610
|
+
summary: contract.summary,
|
|
611
|
+
tags: ['Model Catalog'],
|
|
612
|
+
request: {
|
|
613
|
+
...(contract.request?.body
|
|
614
|
+
? {
|
|
615
|
+
body: {
|
|
616
|
+
required: true,
|
|
617
|
+
content: {
|
|
618
|
+
'application/json': {
|
|
619
|
+
schema: resolveSchema(contract.request.body),
|
|
620
|
+
},
|
|
621
|
+
},
|
|
622
|
+
},
|
|
623
|
+
}
|
|
624
|
+
: {}),
|
|
625
|
+
...(contract.request?.query ? { query: resolveSchema(contract.request.query) } : {}),
|
|
626
|
+
...(contract.request?.params ? { params: resolveSchema(contract.request.params) } : {}),
|
|
627
|
+
},
|
|
628
|
+
responses: buildResponses(contract.responses, resolveSchema),
|
|
629
|
+
});
|
|
630
|
+
}
|
|
534
631
|
for (const contract of generationModelContracts) {
|
|
535
632
|
const method = contract.method.toLowerCase();
|
|
536
633
|
if (!supportedHttpMethods.has(method)) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../support/endpoints/commands/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0CAA0C,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./send-support-message.command"), exports);
|
|
18
|
+
__exportStar(require("./mark-support-chat-read-by-user.command"), exports);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HTTP_METHODS } from '../../../_common';
|
|
2
|
+
export declare const MarkSupportChatReadByUserCommandResponse: import("zod").ZodType<import("../../../_common").HttpSuccessResponse, unknown, import("zod/v4/core").$ZodTypeInternals<import("../../../_common").HttpSuccessResponse, unknown>>;
|
|
3
|
+
export declare const MarkSupportChatReadByUserCommand: {
|
|
4
|
+
method: HTTP_METHODS.POST;
|
|
5
|
+
path: "read";
|
|
6
|
+
summary: string;
|
|
7
|
+
responses: {
|
|
8
|
+
200: import("zod").ZodType<import("../../../_common").HttpSuccessResponse, unknown, import("zod/v4/core").$ZodTypeInternals<import("../../../_common").HttpSuccessResponse, unknown>>;
|
|
9
|
+
500: import("zod").ZodType<import("../../../_common").HttpErrorResponse, unknown, import("zod/v4/core").$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=mark-support-chat-read-by-user.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mark-support-chat-read-by-user.command.d.ts","sourceRoot":"","sources":["../../../../support/endpoints/commands/mark-support-chat-read-by-user.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,YAAY,EAAsD,MAAM,kBAAkB,CAAC;AAGpH,eAAO,MAAM,wCAAwC,kLAA4B,CAAC;AAElF,eAAO,MAAM,gCAAgC;;;;;;;;CAQ3C,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MarkSupportChatReadByUserCommand = exports.MarkSupportChatReadByUserCommandResponse = void 0;
|
|
4
|
+
const _common_1 = require("../../../_common");
|
|
5
|
+
const support_1 = require("../support");
|
|
6
|
+
exports.MarkSupportChatReadByUserCommandResponse = _common_1.HttpSuccessResponseSchema;
|
|
7
|
+
exports.MarkSupportChatReadByUserCommand = (0, _common_1.defineContract)({
|
|
8
|
+
method: _common_1.HTTP_METHODS.POST,
|
|
9
|
+
path: support_1.SUPPORT_ROUTES.MARK_READ,
|
|
10
|
+
summary: 'Mark support chat as read by the current user',
|
|
11
|
+
responses: {
|
|
12
|
+
200: exports.MarkSupportChatReadByUserCommandResponse,
|
|
13
|
+
500: _common_1.HttpErrorResponseSchema,
|
|
14
|
+
},
|
|
15
|
+
});
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HTTP_METHODS } from '../../../_common';
|
|
3
|
+
export declare const SendSupportMessageCommandBody: z.ZodObject<{
|
|
4
|
+
text: z.ZodOptional<z.ZodString>;
|
|
5
|
+
fileIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export declare const SendSupportMessageCommandResponse: z.ZodObject<{
|
|
8
|
+
uuid: z.ZodUUID;
|
|
9
|
+
chatId: z.ZodUUID;
|
|
10
|
+
authorType: z.ZodEnum<typeof import("../..").SUPPORT_MESSAGE_AUTHOR_TYPE>;
|
|
11
|
+
text: z.ZodNullable<z.ZodString>;
|
|
12
|
+
files: z.ZodArray<z.ZodObject<{
|
|
13
|
+
uuid: z.ZodUUID;
|
|
14
|
+
fileName: z.ZodString;
|
|
15
|
+
fileUrl: z.ZodString;
|
|
16
|
+
thumbnailUrl: z.ZodNullable<z.ZodString>;
|
|
17
|
+
mimeType: z.ZodString;
|
|
18
|
+
fileType: z.ZodString;
|
|
19
|
+
extention: z.ZodNullable<z.ZodString>;
|
|
20
|
+
size: z.ZodNumber;
|
|
21
|
+
userId: z.ZodUUID;
|
|
22
|
+
messageId: z.ZodNullable<z.ZodUUID>;
|
|
23
|
+
durationMs: z.ZodNullable<z.ZodNumber>;
|
|
24
|
+
content: z.ZodNullable<z.ZodString>;
|
|
25
|
+
contentLength: z.ZodNullable<z.ZodNumber>;
|
|
26
|
+
createdAt: z.ZodISODateTime;
|
|
27
|
+
updatedAt: z.ZodISODateTime;
|
|
28
|
+
}, z.core.$strip>>;
|
|
29
|
+
createdAt: z.ZodISODateTime;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
export declare const SendSupportMessageCommand: {
|
|
32
|
+
method: HTTP_METHODS.POST;
|
|
33
|
+
path: "";
|
|
34
|
+
summary: string;
|
|
35
|
+
request: {
|
|
36
|
+
body: z.ZodObject<{
|
|
37
|
+
text: z.ZodOptional<z.ZodString>;
|
|
38
|
+
fileIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
};
|
|
41
|
+
responses: {
|
|
42
|
+
201: z.ZodObject<{
|
|
43
|
+
uuid: z.ZodUUID;
|
|
44
|
+
chatId: z.ZodUUID;
|
|
45
|
+
authorType: z.ZodEnum<typeof import("../..").SUPPORT_MESSAGE_AUTHOR_TYPE>;
|
|
46
|
+
text: z.ZodNullable<z.ZodString>;
|
|
47
|
+
files: z.ZodArray<z.ZodObject<{
|
|
48
|
+
uuid: z.ZodUUID;
|
|
49
|
+
fileName: z.ZodString;
|
|
50
|
+
fileUrl: z.ZodString;
|
|
51
|
+
thumbnailUrl: z.ZodNullable<z.ZodString>;
|
|
52
|
+
mimeType: z.ZodString;
|
|
53
|
+
fileType: z.ZodString;
|
|
54
|
+
extention: z.ZodNullable<z.ZodString>;
|
|
55
|
+
size: z.ZodNumber;
|
|
56
|
+
userId: z.ZodUUID;
|
|
57
|
+
messageId: z.ZodNullable<z.ZodUUID>;
|
|
58
|
+
durationMs: z.ZodNullable<z.ZodNumber>;
|
|
59
|
+
content: z.ZodNullable<z.ZodString>;
|
|
60
|
+
contentLength: z.ZodNullable<z.ZodNumber>;
|
|
61
|
+
createdAt: z.ZodISODateTime;
|
|
62
|
+
updatedAt: z.ZodISODateTime;
|
|
63
|
+
}, z.core.$strip>>;
|
|
64
|
+
createdAt: z.ZodISODateTime;
|
|
65
|
+
}, z.core.$strip>;
|
|
66
|
+
400: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
67
|
+
500: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=send-support-message.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-support-message.command.d.ts","sourceRoot":"","sources":["../../../../support/endpoints/commands/send-support-message.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AAIzF,eAAO,MAAM,6BAA6B;;;iBAQpC,CAAC;AAEP,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;iBAA+B,CAAC;AAE9E,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYpC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SendSupportMessageCommand = exports.SendSupportMessageCommandResponse = exports.SendSupportMessageCommandBody = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const _common_1 = require("../../../_common");
|
|
6
|
+
const support_1 = require("../support");
|
|
7
|
+
const models_1 = require("../../models");
|
|
8
|
+
exports.SendSupportMessageCommandBody = zod_1.z
|
|
9
|
+
.object({
|
|
10
|
+
text: zod_1.z.string().trim().min(1).optional(),
|
|
11
|
+
fileIds: zod_1.z.array(zod_1.z.uuid()).optional(),
|
|
12
|
+
})
|
|
13
|
+
.refine(({ text, fileIds }) => Boolean(text) || Boolean(fileIds?.length), {
|
|
14
|
+
message: 'text or fileIds is required',
|
|
15
|
+
path: ['text'],
|
|
16
|
+
});
|
|
17
|
+
exports.SendSupportMessageCommandResponse = models_1.SupportMessageResponseSchema;
|
|
18
|
+
exports.SendSupportMessageCommand = (0, _common_1.defineContract)({
|
|
19
|
+
method: _common_1.HTTP_METHODS.POST,
|
|
20
|
+
path: support_1.SUPPORT_ROUTES.SEND_MESSAGE,
|
|
21
|
+
summary: 'Send a message to support (creates the chat on the first message)',
|
|
22
|
+
request: {
|
|
23
|
+
body: exports.SendSupportMessageCommandBody,
|
|
24
|
+
},
|
|
25
|
+
responses: {
|
|
26
|
+
201: exports.SendSupportMessageCommandResponse,
|
|
27
|
+
400: _common_1.HttpErrorResponseSchema,
|
|
28
|
+
500: _common_1.HttpErrorResponseSchema,
|
|
29
|
+
},
|
|
30
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../support/endpoints/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./support"), exports);
|
|
18
|
+
__exportStar(require("./commands"), exports);
|
|
19
|
+
__exportStar(require("./queries"), exports);
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HTTP_METHODS } from '../../../_common';
|
|
3
|
+
export declare const GetSupportHistoryQueryQuery: z.ZodObject<{
|
|
4
|
+
cursor: z.ZodOptional<z.ZodUUID>;
|
|
5
|
+
limit: z.ZodOptional<z.ZodDefault<z.ZodCoercedNumber<unknown>>>;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export declare const GetSupportHistoryQueryResponse: z.ZodObject<{
|
|
8
|
+
messages: z.ZodArray<z.ZodObject<{
|
|
9
|
+
uuid: z.ZodUUID;
|
|
10
|
+
chatId: z.ZodUUID;
|
|
11
|
+
authorType: z.ZodEnum<typeof import("../..").SUPPORT_MESSAGE_AUTHOR_TYPE>;
|
|
12
|
+
text: z.ZodNullable<z.ZodString>;
|
|
13
|
+
files: z.ZodArray<z.ZodObject<{
|
|
14
|
+
uuid: z.ZodUUID;
|
|
15
|
+
fileName: z.ZodString;
|
|
16
|
+
fileUrl: z.ZodString;
|
|
17
|
+
thumbnailUrl: z.ZodNullable<z.ZodString>;
|
|
18
|
+
mimeType: z.ZodString;
|
|
19
|
+
fileType: z.ZodString;
|
|
20
|
+
extention: z.ZodNullable<z.ZodString>;
|
|
21
|
+
size: z.ZodNumber;
|
|
22
|
+
userId: z.ZodUUID;
|
|
23
|
+
messageId: z.ZodNullable<z.ZodUUID>;
|
|
24
|
+
durationMs: z.ZodNullable<z.ZodNumber>;
|
|
25
|
+
content: z.ZodNullable<z.ZodString>;
|
|
26
|
+
contentLength: z.ZodNullable<z.ZodNumber>;
|
|
27
|
+
createdAt: z.ZodISODateTime;
|
|
28
|
+
updatedAt: z.ZodISODateTime;
|
|
29
|
+
}, z.core.$strip>>;
|
|
30
|
+
createdAt: z.ZodISODateTime;
|
|
31
|
+
}, z.core.$strip>>;
|
|
32
|
+
nextCursor: z.ZodNullable<z.ZodUUID>;
|
|
33
|
+
hasMore: z.ZodBoolean;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
export declare const GetSupportHistoryQuery: {
|
|
36
|
+
method: HTTP_METHODS.GET;
|
|
37
|
+
path: "";
|
|
38
|
+
summary: string;
|
|
39
|
+
request: {
|
|
40
|
+
query: z.ZodObject<{
|
|
41
|
+
cursor: z.ZodOptional<z.ZodUUID>;
|
|
42
|
+
limit: z.ZodOptional<z.ZodDefault<z.ZodCoercedNumber<unknown>>>;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
};
|
|
45
|
+
responses: {
|
|
46
|
+
200: z.ZodObject<{
|
|
47
|
+
messages: z.ZodArray<z.ZodObject<{
|
|
48
|
+
uuid: z.ZodUUID;
|
|
49
|
+
chatId: z.ZodUUID;
|
|
50
|
+
authorType: z.ZodEnum<typeof import("../..").SUPPORT_MESSAGE_AUTHOR_TYPE>;
|
|
51
|
+
text: z.ZodNullable<z.ZodString>;
|
|
52
|
+
files: z.ZodArray<z.ZodObject<{
|
|
53
|
+
uuid: z.ZodUUID;
|
|
54
|
+
fileName: z.ZodString;
|
|
55
|
+
fileUrl: z.ZodString;
|
|
56
|
+
thumbnailUrl: z.ZodNullable<z.ZodString>;
|
|
57
|
+
mimeType: z.ZodString;
|
|
58
|
+
fileType: z.ZodString;
|
|
59
|
+
extention: z.ZodNullable<z.ZodString>;
|
|
60
|
+
size: z.ZodNumber;
|
|
61
|
+
userId: z.ZodUUID;
|
|
62
|
+
messageId: z.ZodNullable<z.ZodUUID>;
|
|
63
|
+
durationMs: z.ZodNullable<z.ZodNumber>;
|
|
64
|
+
content: z.ZodNullable<z.ZodString>;
|
|
65
|
+
contentLength: z.ZodNullable<z.ZodNumber>;
|
|
66
|
+
createdAt: z.ZodISODateTime;
|
|
67
|
+
updatedAt: z.ZodISODateTime;
|
|
68
|
+
}, z.core.$strip>>;
|
|
69
|
+
createdAt: z.ZodISODateTime;
|
|
70
|
+
}, z.core.$strip>>;
|
|
71
|
+
nextCursor: z.ZodNullable<z.ZodUUID>;
|
|
72
|
+
hasMore: z.ZodBoolean;
|
|
73
|
+
}, z.core.$strip>;
|
|
74
|
+
500: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
//# sourceMappingURL=get-support-history.query.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-support-history.query.d.ts","sourceRoot":"","sources":["../../../../support/endpoints/queries/get-support-history.query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAA+C,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AAItH,eAAO,MAAM,2BAA2B;;;iBAAwC,CAAC;AAEjF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAIzC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWjC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetSupportHistoryQuery = exports.GetSupportHistoryQueryResponse = exports.GetSupportHistoryQueryQuery = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const _common_1 = require("../../../_common");
|
|
6
|
+
const support_1 = require("../support");
|
|
7
|
+
const models_1 = require("../../models");
|
|
8
|
+
exports.GetSupportHistoryQueryQuery = (0, _common_1.defineCursorPaginationQuery)(zod_1.z.uuid());
|
|
9
|
+
exports.GetSupportHistoryQueryResponse = zod_1.z.object({
|
|
10
|
+
messages: zod_1.z.array(models_1.SupportMessageResponseSchema),
|
|
11
|
+
nextCursor: zod_1.z.uuid().nullable(),
|
|
12
|
+
hasMore: zod_1.z.boolean(),
|
|
13
|
+
});
|
|
14
|
+
exports.GetSupportHistoryQuery = (0, _common_1.defineContract)({
|
|
15
|
+
method: _common_1.HTTP_METHODS.GET,
|
|
16
|
+
path: support_1.SUPPORT_ROUTES.GET_HISTORY,
|
|
17
|
+
summary: 'Get support chat history for the current user',
|
|
18
|
+
request: {
|
|
19
|
+
query: exports.GetSupportHistoryQueryQuery,
|
|
20
|
+
},
|
|
21
|
+
responses: {
|
|
22
|
+
200: exports.GetSupportHistoryQueryResponse,
|
|
23
|
+
500: _common_1.HttpErrorResponseSchema,
|
|
24
|
+
},
|
|
25
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HTTP_METHODS } from '../../../_common';
|
|
3
|
+
export declare const GetSupportUnreadCountQueryResponse: z.ZodObject<{
|
|
4
|
+
unreadCount: z.ZodNumber;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export declare const GetSupportUnreadCountQuery: {
|
|
7
|
+
method: HTTP_METHODS.GET;
|
|
8
|
+
path: "unread-count";
|
|
9
|
+
summary: string;
|
|
10
|
+
responses: {
|
|
11
|
+
200: z.ZodObject<{
|
|
12
|
+
unreadCount: z.ZodNumber;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
500: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=get-support-unread-count.query.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-support-unread-count.query.d.ts","sourceRoot":"","sources":["../../../../support/endpoints/queries/get-support-unread-count.query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AAGzF,eAAO,MAAM,kCAAkC;;iBAE7C,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;CAQrC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetSupportUnreadCountQuery = exports.GetSupportUnreadCountQueryResponse = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const _common_1 = require("../../../_common");
|
|
6
|
+
const support_1 = require("../support");
|
|
7
|
+
exports.GetSupportUnreadCountQueryResponse = zod_1.z.object({
|
|
8
|
+
unreadCount: zod_1.z.number().int().nonnegative(),
|
|
9
|
+
});
|
|
10
|
+
exports.GetSupportUnreadCountQuery = (0, _common_1.defineContract)({
|
|
11
|
+
method: _common_1.HTTP_METHODS.GET,
|
|
12
|
+
path: support_1.SUPPORT_ROUTES.GET_UNREAD_COUNT,
|
|
13
|
+
summary: 'Get the count of unread support replies for the current user',
|
|
14
|
+
responses: {
|
|
15
|
+
200: exports.GetSupportUnreadCountQueryResponse,
|
|
16
|
+
500: _common_1.HttpErrorResponseSchema,
|
|
17
|
+
},
|
|
18
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../support/endpoints/queries/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,kCAAkC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./get-support-history.query"), exports);
|
|
18
|
+
__exportStar(require("./get-support-unread-count.query"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const SUPPORT_CONTROLLER: "support";
|
|
2
|
+
export declare const SUPPORT_ROUTES: {
|
|
3
|
+
readonly SEND_MESSAGE: "";
|
|
4
|
+
readonly GET_HISTORY: "";
|
|
5
|
+
readonly GET_UNREAD_COUNT: "unread-count";
|
|
6
|
+
readonly MARK_READ: "read";
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=support.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"support.d.ts","sourceRoot":"","sources":["../../../support/endpoints/support.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,EAAG,SAAkB,CAAC;AAErD,eAAO,MAAM,cAAc;;;;;CAKjB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SUPPORT_ROUTES = exports.SUPPORT_CONTROLLER = void 0;
|
|
4
|
+
exports.SUPPORT_CONTROLLER = 'support';
|
|
5
|
+
exports.SUPPORT_ROUTES = {
|
|
6
|
+
SEND_MESSAGE: '',
|
|
7
|
+
GET_HISTORY: '',
|
|
8
|
+
GET_UNREAD_COUNT: 'unread-count',
|
|
9
|
+
MARK_READ: 'read',
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../support/enums/index.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./support-message-author-type.enum"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"support-message-author-type.enum.d.ts","sourceRoot":"","sources":["../../../support/enums/support-message-author-type.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,2BAA2B;IACnC,IAAI,SAAS;IACb,KAAK,UAAU;CAClB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SUPPORT_MESSAGE_AUTHOR_TYPE = void 0;
|
|
4
|
+
var SUPPORT_MESSAGE_AUTHOR_TYPE;
|
|
5
|
+
(function (SUPPORT_MESSAGE_AUTHOR_TYPE) {
|
|
6
|
+
SUPPORT_MESSAGE_AUTHOR_TYPE["USER"] = "user";
|
|
7
|
+
SUPPORT_MESSAGE_AUTHOR_TYPE["ADMIN"] = "admin";
|
|
8
|
+
})(SUPPORT_MESSAGE_AUTHOR_TYPE || (exports.SUPPORT_MESSAGE_AUTHOR_TYPE = SUPPORT_MESSAGE_AUTHOR_TYPE = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../support/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
|