@ai-grator/api 0.1.24 → 0.1.25
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 +22 -0
- package/build/errors/errors.d.ts.map +1 -1
- package/build/errors/errors.js +22 -0
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -0
- package/build/scripts/generate-openapi.js +64 -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 +22 -0
- package/index.ts +1 -0
- package/package.json +1 -1
- package/scripts/generate-openapi.ts +98 -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
package/admin/endpoints/admin.ts
CHANGED
|
@@ -23,4 +23,10 @@ export const ADMIN_ROUTES = {
|
|
|
23
23
|
GET_USER: (userId: string) => `users/${userId}`,
|
|
24
24
|
GET_USER_TRANSACTIONS: (userId: string) => `users/${userId}/transactions`,
|
|
25
25
|
BAN_USER: (userId: string) => `users/${userId}/ban`,
|
|
26
|
+
|
|
27
|
+
// SUPPORT
|
|
28
|
+
GET_SUPPORT_CHATS: 'support/chats',
|
|
29
|
+
GET_SUPPORT_CHAT_MESSAGES: (userId: string) => `support/chats/${userId}/messages`,
|
|
30
|
+
SEND_SUPPORT_REPLY: (userId: string) => `support/chats/${userId}/messages`,
|
|
31
|
+
MARK_SUPPORT_CHAT_READ: (userId: string) => `support/chats/${userId}/read`,
|
|
26
32
|
} as const;
|
|
@@ -2,3 +2,5 @@ export * from './ban-admin-user.command';
|
|
|
2
2
|
export * from './create-admin-partner-bonus-operation.command';
|
|
3
3
|
export * from './update-admin-partner-referral-config.command';
|
|
4
4
|
export * from './update-admin-referral-config.command';
|
|
5
|
+
export * from './send-admin-support-reply.command';
|
|
6
|
+
export * from './mark-admin-support-chat-read.command';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defineContract, HTTP_METHODS, HttpErrorResponseSchema, HttpSuccessResponseSchema } from '../../../_common';
|
|
3
|
+
import { ADMIN_ROUTES } from '../admin';
|
|
4
|
+
|
|
5
|
+
export const MarkAdminSupportChatReadCommandParams = z.object({
|
|
6
|
+
userId: z.uuid(),
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export const MarkAdminSupportChatReadCommandResponse = HttpSuccessResponseSchema;
|
|
10
|
+
|
|
11
|
+
export const MarkAdminSupportChatReadCommand = defineContract({
|
|
12
|
+
method: HTTP_METHODS.POST,
|
|
13
|
+
path: ADMIN_ROUTES.MARK_SUPPORT_CHAT_READ(':userId'),
|
|
14
|
+
summary: 'Mark support chat as read by admin',
|
|
15
|
+
request: {
|
|
16
|
+
params: MarkAdminSupportChatReadCommandParams,
|
|
17
|
+
},
|
|
18
|
+
responses: {
|
|
19
|
+
200: MarkAdminSupportChatReadCommandResponse,
|
|
20
|
+
401: HttpErrorResponseSchema,
|
|
21
|
+
403: HttpErrorResponseSchema,
|
|
22
|
+
404: HttpErrorResponseSchema,
|
|
23
|
+
500: HttpErrorResponseSchema,
|
|
24
|
+
},
|
|
25
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defineContract, HTTP_METHODS, HttpErrorResponseSchema } from '../../../_common';
|
|
3
|
+
import { SupportMessageResponseSchema } from '../../../support';
|
|
4
|
+
import { ADMIN_ROUTES } from '../admin';
|
|
5
|
+
|
|
6
|
+
export const SendAdminSupportReplyCommandParams = z.object({
|
|
7
|
+
userId: z.uuid(),
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export const SendAdminSupportReplyCommandBody = z
|
|
11
|
+
.object({
|
|
12
|
+
text: z.string().trim().min(1).optional(),
|
|
13
|
+
fileIds: z.array(z.uuid()).optional(),
|
|
14
|
+
})
|
|
15
|
+
.refine(({ text, fileIds }) => Boolean(text) || Boolean(fileIds?.length), {
|
|
16
|
+
message: 'text or fileIds is required',
|
|
17
|
+
path: ['text'],
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export const SendAdminSupportReplyCommandResponse = SupportMessageResponseSchema;
|
|
21
|
+
|
|
22
|
+
export const SendAdminSupportReplyCommand = defineContract({
|
|
23
|
+
method: HTTP_METHODS.POST,
|
|
24
|
+
path: ADMIN_ROUTES.SEND_SUPPORT_REPLY(':userId'),
|
|
25
|
+
summary: 'Reply to a user in support chat as admin',
|
|
26
|
+
request: {
|
|
27
|
+
params: SendAdminSupportReplyCommandParams,
|
|
28
|
+
body: SendAdminSupportReplyCommandBody,
|
|
29
|
+
},
|
|
30
|
+
responses: {
|
|
31
|
+
201: SendAdminSupportReplyCommandResponse,
|
|
32
|
+
400: HttpErrorResponseSchema,
|
|
33
|
+
401: HttpErrorResponseSchema,
|
|
34
|
+
403: HttpErrorResponseSchema,
|
|
35
|
+
404: HttpErrorResponseSchema,
|
|
36
|
+
500: HttpErrorResponseSchema,
|
|
37
|
+
},
|
|
38
|
+
});
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defineContract, defineCursorPaginationQuery, HTTP_METHODS, HttpErrorResponseSchema } from '../../../_common';
|
|
3
|
+
import { SupportMessageResponseSchema } from '../../../support';
|
|
4
|
+
import { ADMIN_ROUTES } from '../admin';
|
|
5
|
+
|
|
6
|
+
export const GetAdminSupportChatMessagesQueryParams = z.object({
|
|
7
|
+
userId: z.uuid(),
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export const GetAdminSupportChatMessagesQueryQuery = defineCursorPaginationQuery(z.uuid());
|
|
11
|
+
|
|
12
|
+
export const GetAdminSupportChatMessagesQueryResponse = z.object({
|
|
13
|
+
messages: z.array(SupportMessageResponseSchema),
|
|
14
|
+
nextCursor: z.uuid().nullable(),
|
|
15
|
+
hasMore: z.boolean(),
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export const GetAdminSupportChatMessagesQuery = defineContract({
|
|
19
|
+
method: HTTP_METHODS.GET,
|
|
20
|
+
path: ADMIN_ROUTES.GET_SUPPORT_CHAT_MESSAGES(':userId'),
|
|
21
|
+
summary: 'Get support chat history with a specific user for admin',
|
|
22
|
+
request: {
|
|
23
|
+
params: GetAdminSupportChatMessagesQueryParams,
|
|
24
|
+
query: GetAdminSupportChatMessagesQueryQuery,
|
|
25
|
+
},
|
|
26
|
+
responses: {
|
|
27
|
+
200: GetAdminSupportChatMessagesQueryResponse,
|
|
28
|
+
401: HttpErrorResponseSchema,
|
|
29
|
+
403: HttpErrorResponseSchema,
|
|
30
|
+
404: HttpErrorResponseSchema,
|
|
31
|
+
500: HttpErrorResponseSchema,
|
|
32
|
+
},
|
|
33
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defineContract, defineCursorPaginationQuery, HTTP_METHODS, HttpErrorResponseSchema } from '../../../_common';
|
|
3
|
+
import { AdminSupportChatListItemSchema } from '../../models';
|
|
4
|
+
import { ADMIN_ROUTES } from '../admin';
|
|
5
|
+
|
|
6
|
+
export const GetAdminSupportChatsQueryQuery = defineCursorPaginationQuery(z.uuid());
|
|
7
|
+
|
|
8
|
+
export const GetAdminSupportChatsQueryResponse = z.object({
|
|
9
|
+
chats: z.array(AdminSupportChatListItemSchema),
|
|
10
|
+
nextCursor: z.uuid().nullable(),
|
|
11
|
+
hasMore: z.boolean(),
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export const GetAdminSupportChatsQuery = defineContract({
|
|
15
|
+
method: HTTP_METHODS.GET,
|
|
16
|
+
path: ADMIN_ROUTES.GET_SUPPORT_CHATS,
|
|
17
|
+
summary: 'Get support chats list for admin, sorted by last activity',
|
|
18
|
+
request: {
|
|
19
|
+
query: GetAdminSupportChatsQueryQuery,
|
|
20
|
+
},
|
|
21
|
+
responses: {
|
|
22
|
+
200: GetAdminSupportChatsQueryResponse,
|
|
23
|
+
401: HttpErrorResponseSchema,
|
|
24
|
+
403: HttpErrorResponseSchema,
|
|
25
|
+
500: HttpErrorResponseSchema,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
export * from './get-admin-referral-config.query';
|
|
2
1
|
export * from './get-admin-partner.query';
|
|
2
|
+
export * from './get-admin-kie-balance.query';
|
|
3
|
+
export * from './get-admin-user-transactions.query';
|
|
3
4
|
export * from './get-admin-partner-bonus-operations.query';
|
|
4
5
|
export * from './get-admin-partner-l2-bonuses.query';
|
|
6
|
+
export * from './get-admin-user.query';
|
|
5
7
|
export * from './get-admin-partner-referral-config.query';
|
|
6
8
|
export * from './get-admin-partner-referrals.query';
|
|
7
9
|
export * from './get-admin-partners.query';
|
|
10
|
+
export * from './get-admin-referral-config.query';
|
|
8
11
|
export * from './get-admin-users.query';
|
|
9
|
-
export * from './get-admin-
|
|
10
|
-
export * from './get-admin-
|
|
11
|
-
export * from './get-admin-kie-balance.query';
|
|
12
|
+
export * from './get-admin-support-chats.query';
|
|
13
|
+
export * from './get-admin-support-chat-messages.query';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export const AdminSupportChatListItemSchema = z.object({
|
|
4
|
+
userId: z.uuid(),
|
|
5
|
+
userEmail: z.email(),
|
|
6
|
+
userName: z.string().nullable(),
|
|
7
|
+
lastMessage: z.string().nullable(),
|
|
8
|
+
lastMessageHasAttachment: z.boolean(),
|
|
9
|
+
lastMessageAt: z.iso.datetime(),
|
|
10
|
+
unreadCount: z.number().int().nonnegative(),
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
export type AdminSupportChatListItemSchemaType = z.infer<typeof AdminSupportChatListItemSchema>;
|
package/admin/models/index.ts
CHANGED
|
@@ -15,5 +15,9 @@ export declare const ADMIN_ROUTES: {
|
|
|
15
15
|
readonly GET_USER: (userId: string) => string;
|
|
16
16
|
readonly GET_USER_TRANSACTIONS: (userId: string) => string;
|
|
17
17
|
readonly BAN_USER: (userId: string) => string;
|
|
18
|
+
readonly GET_SUPPORT_CHATS: "support/chats";
|
|
19
|
+
readonly GET_SUPPORT_CHAT_MESSAGES: (userId: string) => string;
|
|
20
|
+
readonly SEND_SUPPORT_REPLY: (userId: string) => string;
|
|
21
|
+
readonly MARK_SUPPORT_CHAT_READ: (userId: string) => string;
|
|
18
22
|
};
|
|
19
23
|
//# sourceMappingURL=admin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../../admin/endpoints/admin.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,EAAG,OAAgB,CAAC;AAEjD,eAAO,MAAM,YAAY;;sCAGI,MAAM;gDACI,MAAM;iDACL,MAAM;sDACD,MAAM;yDACH,MAAM;uDACR,MAAM;yDACJ,MAAM;;;;;gCAW/B,MAAM;6CACO,MAAM;gCACnB,MAAM;
|
|
1
|
+
{"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../../admin/endpoints/admin.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,EAAG,OAAgB,CAAC;AAEjD,eAAO,MAAM,YAAY;;sCAGI,MAAM;gDACI,MAAM;iDACL,MAAM;sDACD,MAAM;yDACH,MAAM;uDACR,MAAM;yDACJ,MAAM;;;;;gCAW/B,MAAM;6CACO,MAAM;gCACnB,MAAM;;iDAIW,MAAM;0CACb,MAAM;8CACF,MAAM;CACjC,CAAC"}
|
|
@@ -22,4 +22,9 @@ exports.ADMIN_ROUTES = {
|
|
|
22
22
|
GET_USER: (userId) => `users/${userId}`,
|
|
23
23
|
GET_USER_TRANSACTIONS: (userId) => `users/${userId}/transactions`,
|
|
24
24
|
BAN_USER: (userId) => `users/${userId}/ban`,
|
|
25
|
+
// SUPPORT
|
|
26
|
+
GET_SUPPORT_CHATS: 'support/chats',
|
|
27
|
+
GET_SUPPORT_CHAT_MESSAGES: (userId) => `support/chats/${userId}/messages`,
|
|
28
|
+
SEND_SUPPORT_REPLY: (userId) => `support/chats/${userId}/messages`,
|
|
29
|
+
MARK_SUPPORT_CHAT_READ: (userId) => `support/chats/${userId}/read`,
|
|
25
30
|
};
|
|
@@ -2,4 +2,6 @@ export * from './ban-admin-user.command';
|
|
|
2
2
|
export * from './create-admin-partner-bonus-operation.command';
|
|
3
3
|
export * from './update-admin-partner-referral-config.command';
|
|
4
4
|
export * from './update-admin-referral-config.command';
|
|
5
|
+
export * from './send-admin-support-reply.command';
|
|
6
|
+
export * from './mark-admin-support-chat-read.command';
|
|
5
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../admin/endpoints/commands/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,gDAAgD,CAAC;AAC/D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,wCAAwC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../admin/endpoints/commands/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,gDAAgD,CAAC;AAC/D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,wCAAwC,CAAC;AACvD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wCAAwC,CAAC"}
|
|
@@ -18,3 +18,5 @@ __exportStar(require("./ban-admin-user.command"), exports);
|
|
|
18
18
|
__exportStar(require("./create-admin-partner-bonus-operation.command"), exports);
|
|
19
19
|
__exportStar(require("./update-admin-partner-referral-config.command"), exports);
|
|
20
20
|
__exportStar(require("./update-admin-referral-config.command"), exports);
|
|
21
|
+
__exportStar(require("./send-admin-support-reply.command"), exports);
|
|
22
|
+
__exportStar(require("./mark-admin-support-chat-read.command"), exports);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HTTP_METHODS } from '../../../_common';
|
|
3
|
+
export declare const MarkAdminSupportChatReadCommandParams: z.ZodObject<{
|
|
4
|
+
userId: z.ZodUUID;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export declare const MarkAdminSupportChatReadCommandResponse: z.ZodType<import("../../../_common").HttpSuccessResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpSuccessResponse, unknown>>;
|
|
7
|
+
export declare const MarkAdminSupportChatReadCommand: {
|
|
8
|
+
method: HTTP_METHODS.POST;
|
|
9
|
+
path: string;
|
|
10
|
+
summary: string;
|
|
11
|
+
request: {
|
|
12
|
+
params: z.ZodObject<{
|
|
13
|
+
userId: z.ZodUUID;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
};
|
|
16
|
+
responses: {
|
|
17
|
+
200: z.ZodType<import("../../../_common").HttpSuccessResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpSuccessResponse, unknown>>;
|
|
18
|
+
401: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
19
|
+
403: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
20
|
+
404: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
21
|
+
500: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=mark-admin-support-chat-read.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mark-admin-support-chat-read.command.d.ts","sourceRoot":"","sources":["../../../../admin/endpoints/commands/mark-admin-support-chat-read.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,YAAY,EAAsD,MAAM,kBAAkB,CAAC;AAGpH,eAAO,MAAM,qCAAqC;;iBAEhD,CAAC;AAEH,eAAO,MAAM,uCAAuC,uJAA4B,CAAC;AAEjF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;CAc1C,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MarkAdminSupportChatReadCommand = exports.MarkAdminSupportChatReadCommandResponse = exports.MarkAdminSupportChatReadCommandParams = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const _common_1 = require("../../../_common");
|
|
6
|
+
const admin_1 = require("../admin");
|
|
7
|
+
exports.MarkAdminSupportChatReadCommandParams = zod_1.z.object({
|
|
8
|
+
userId: zod_1.z.uuid(),
|
|
9
|
+
});
|
|
10
|
+
exports.MarkAdminSupportChatReadCommandResponse = _common_1.HttpSuccessResponseSchema;
|
|
11
|
+
exports.MarkAdminSupportChatReadCommand = (0, _common_1.defineContract)({
|
|
12
|
+
method: _common_1.HTTP_METHODS.POST,
|
|
13
|
+
path: admin_1.ADMIN_ROUTES.MARK_SUPPORT_CHAT_READ(':userId'),
|
|
14
|
+
summary: 'Mark support chat as read by admin',
|
|
15
|
+
request: {
|
|
16
|
+
params: exports.MarkAdminSupportChatReadCommandParams,
|
|
17
|
+
},
|
|
18
|
+
responses: {
|
|
19
|
+
200: exports.MarkAdminSupportChatReadCommandResponse,
|
|
20
|
+
401: _common_1.HttpErrorResponseSchema,
|
|
21
|
+
403: _common_1.HttpErrorResponseSchema,
|
|
22
|
+
404: _common_1.HttpErrorResponseSchema,
|
|
23
|
+
500: _common_1.HttpErrorResponseSchema,
|
|
24
|
+
},
|
|
25
|
+
});
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HTTP_METHODS } from '../../../_common';
|
|
3
|
+
export declare const SendAdminSupportReplyCommandParams: z.ZodObject<{
|
|
4
|
+
userId: z.ZodUUID;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export declare const SendAdminSupportReplyCommandBody: z.ZodObject<{
|
|
7
|
+
text: z.ZodOptional<z.ZodString>;
|
|
8
|
+
fileIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export declare const SendAdminSupportReplyCommandResponse: z.ZodObject<{
|
|
11
|
+
uuid: z.ZodUUID;
|
|
12
|
+
chatId: z.ZodUUID;
|
|
13
|
+
authorType: z.ZodEnum<typeof import("../../../support").SUPPORT_MESSAGE_AUTHOR_TYPE>;
|
|
14
|
+
text: z.ZodNullable<z.ZodString>;
|
|
15
|
+
files: z.ZodArray<z.ZodObject<{
|
|
16
|
+
uuid: z.ZodUUID;
|
|
17
|
+
fileName: z.ZodString;
|
|
18
|
+
fileUrl: z.ZodString;
|
|
19
|
+
thumbnailUrl: z.ZodNullable<z.ZodString>;
|
|
20
|
+
mimeType: z.ZodString;
|
|
21
|
+
fileType: z.ZodString;
|
|
22
|
+
extention: z.ZodNullable<z.ZodString>;
|
|
23
|
+
size: z.ZodNumber;
|
|
24
|
+
userId: z.ZodUUID;
|
|
25
|
+
messageId: z.ZodNullable<z.ZodUUID>;
|
|
26
|
+
durationMs: z.ZodNullable<z.ZodNumber>;
|
|
27
|
+
content: z.ZodNullable<z.ZodString>;
|
|
28
|
+
contentLength: z.ZodNullable<z.ZodNumber>;
|
|
29
|
+
createdAt: z.ZodISODateTime;
|
|
30
|
+
updatedAt: z.ZodISODateTime;
|
|
31
|
+
}, z.core.$strip>>;
|
|
32
|
+
createdAt: z.ZodISODateTime;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
export declare const SendAdminSupportReplyCommand: {
|
|
35
|
+
method: HTTP_METHODS.POST;
|
|
36
|
+
path: string;
|
|
37
|
+
summary: string;
|
|
38
|
+
request: {
|
|
39
|
+
params: z.ZodObject<{
|
|
40
|
+
userId: z.ZodUUID;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
body: z.ZodObject<{
|
|
43
|
+
text: z.ZodOptional<z.ZodString>;
|
|
44
|
+
fileIds: z.ZodOptional<z.ZodArray<z.ZodUUID>>;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
};
|
|
47
|
+
responses: {
|
|
48
|
+
201: z.ZodObject<{
|
|
49
|
+
uuid: z.ZodUUID;
|
|
50
|
+
chatId: z.ZodUUID;
|
|
51
|
+
authorType: z.ZodEnum<typeof import("../../../support").SUPPORT_MESSAGE_AUTHOR_TYPE>;
|
|
52
|
+
text: z.ZodNullable<z.ZodString>;
|
|
53
|
+
files: z.ZodArray<z.ZodObject<{
|
|
54
|
+
uuid: z.ZodUUID;
|
|
55
|
+
fileName: z.ZodString;
|
|
56
|
+
fileUrl: z.ZodString;
|
|
57
|
+
thumbnailUrl: z.ZodNullable<z.ZodString>;
|
|
58
|
+
mimeType: z.ZodString;
|
|
59
|
+
fileType: z.ZodString;
|
|
60
|
+
extention: z.ZodNullable<z.ZodString>;
|
|
61
|
+
size: z.ZodNumber;
|
|
62
|
+
userId: z.ZodUUID;
|
|
63
|
+
messageId: z.ZodNullable<z.ZodUUID>;
|
|
64
|
+
durationMs: z.ZodNullable<z.ZodNumber>;
|
|
65
|
+
content: z.ZodNullable<z.ZodString>;
|
|
66
|
+
contentLength: z.ZodNullable<z.ZodNumber>;
|
|
67
|
+
createdAt: z.ZodISODateTime;
|
|
68
|
+
updatedAt: z.ZodISODateTime;
|
|
69
|
+
}, z.core.$strip>>;
|
|
70
|
+
createdAt: z.ZodISODateTime;
|
|
71
|
+
}, z.core.$strip>;
|
|
72
|
+
400: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
73
|
+
401: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
74
|
+
403: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
75
|
+
404: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
76
|
+
500: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
//# sourceMappingURL=send-admin-support-reply.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-admin-support-reply.command.d.ts","sourceRoot":"","sources":["../../../../admin/endpoints/commands/send-admin-support-reply.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AAIzF,eAAO,MAAM,kCAAkC;;iBAE7C,CAAC;AAEH,eAAO,MAAM,gCAAgC;;;iBAQvC,CAAC;AAEP,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;iBAA+B,CAAC;AAEjF,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBvC,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SendAdminSupportReplyCommand = exports.SendAdminSupportReplyCommandResponse = exports.SendAdminSupportReplyCommandBody = exports.SendAdminSupportReplyCommandParams = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const _common_1 = require("../../../_common");
|
|
6
|
+
const support_1 = require("../../../support");
|
|
7
|
+
const admin_1 = require("../admin");
|
|
8
|
+
exports.SendAdminSupportReplyCommandParams = zod_1.z.object({
|
|
9
|
+
userId: zod_1.z.uuid(),
|
|
10
|
+
});
|
|
11
|
+
exports.SendAdminSupportReplyCommandBody = zod_1.z
|
|
12
|
+
.object({
|
|
13
|
+
text: zod_1.z.string().trim().min(1).optional(),
|
|
14
|
+
fileIds: zod_1.z.array(zod_1.z.uuid()).optional(),
|
|
15
|
+
})
|
|
16
|
+
.refine(({ text, fileIds }) => Boolean(text) || Boolean(fileIds?.length), {
|
|
17
|
+
message: 'text or fileIds is required',
|
|
18
|
+
path: ['text'],
|
|
19
|
+
});
|
|
20
|
+
exports.SendAdminSupportReplyCommandResponse = support_1.SupportMessageResponseSchema;
|
|
21
|
+
exports.SendAdminSupportReplyCommand = (0, _common_1.defineContract)({
|
|
22
|
+
method: _common_1.HTTP_METHODS.POST,
|
|
23
|
+
path: admin_1.ADMIN_ROUTES.SEND_SUPPORT_REPLY(':userId'),
|
|
24
|
+
summary: 'Reply to a user in support chat as admin',
|
|
25
|
+
request: {
|
|
26
|
+
params: exports.SendAdminSupportReplyCommandParams,
|
|
27
|
+
body: exports.SendAdminSupportReplyCommandBody,
|
|
28
|
+
},
|
|
29
|
+
responses: {
|
|
30
|
+
201: exports.SendAdminSupportReplyCommandResponse,
|
|
31
|
+
400: _common_1.HttpErrorResponseSchema,
|
|
32
|
+
401: _common_1.HttpErrorResponseSchema,
|
|
33
|
+
403: _common_1.HttpErrorResponseSchema,
|
|
34
|
+
404: _common_1.HttpErrorResponseSchema,
|
|
35
|
+
500: _common_1.HttpErrorResponseSchema,
|
|
36
|
+
},
|
|
37
|
+
});
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HTTP_METHODS } from '../../../_common';
|
|
3
|
+
export declare const GetAdminSupportChatMessagesQueryParams: z.ZodObject<{
|
|
4
|
+
userId: z.ZodUUID;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export declare const GetAdminSupportChatMessagesQueryQuery: z.ZodObject<{
|
|
7
|
+
cursor: z.ZodOptional<z.ZodUUID>;
|
|
8
|
+
limit: z.ZodOptional<z.ZodDefault<z.ZodCoercedNumber<unknown>>>;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export declare const GetAdminSupportChatMessagesQueryResponse: z.ZodObject<{
|
|
11
|
+
messages: z.ZodArray<z.ZodObject<{
|
|
12
|
+
uuid: z.ZodUUID;
|
|
13
|
+
chatId: z.ZodUUID;
|
|
14
|
+
authorType: z.ZodEnum<typeof import("../../../support").SUPPORT_MESSAGE_AUTHOR_TYPE>;
|
|
15
|
+
text: z.ZodNullable<z.ZodString>;
|
|
16
|
+
files: z.ZodArray<z.ZodObject<{
|
|
17
|
+
uuid: z.ZodUUID;
|
|
18
|
+
fileName: z.ZodString;
|
|
19
|
+
fileUrl: z.ZodString;
|
|
20
|
+
thumbnailUrl: z.ZodNullable<z.ZodString>;
|
|
21
|
+
mimeType: z.ZodString;
|
|
22
|
+
fileType: z.ZodString;
|
|
23
|
+
extention: z.ZodNullable<z.ZodString>;
|
|
24
|
+
size: z.ZodNumber;
|
|
25
|
+
userId: z.ZodUUID;
|
|
26
|
+
messageId: z.ZodNullable<z.ZodUUID>;
|
|
27
|
+
durationMs: z.ZodNullable<z.ZodNumber>;
|
|
28
|
+
content: z.ZodNullable<z.ZodString>;
|
|
29
|
+
contentLength: z.ZodNullable<z.ZodNumber>;
|
|
30
|
+
createdAt: z.ZodISODateTime;
|
|
31
|
+
updatedAt: z.ZodISODateTime;
|
|
32
|
+
}, z.core.$strip>>;
|
|
33
|
+
createdAt: z.ZodISODateTime;
|
|
34
|
+
}, z.core.$strip>>;
|
|
35
|
+
nextCursor: z.ZodNullable<z.ZodUUID>;
|
|
36
|
+
hasMore: z.ZodBoolean;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
export declare const GetAdminSupportChatMessagesQuery: {
|
|
39
|
+
method: HTTP_METHODS.GET;
|
|
40
|
+
path: string;
|
|
41
|
+
summary: string;
|
|
42
|
+
request: {
|
|
43
|
+
params: z.ZodObject<{
|
|
44
|
+
userId: z.ZodUUID;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
query: z.ZodObject<{
|
|
47
|
+
cursor: z.ZodOptional<z.ZodUUID>;
|
|
48
|
+
limit: z.ZodOptional<z.ZodDefault<z.ZodCoercedNumber<unknown>>>;
|
|
49
|
+
}, z.core.$strip>;
|
|
50
|
+
};
|
|
51
|
+
responses: {
|
|
52
|
+
200: z.ZodObject<{
|
|
53
|
+
messages: z.ZodArray<z.ZodObject<{
|
|
54
|
+
uuid: z.ZodUUID;
|
|
55
|
+
chatId: z.ZodUUID;
|
|
56
|
+
authorType: z.ZodEnum<typeof import("../../../support").SUPPORT_MESSAGE_AUTHOR_TYPE>;
|
|
57
|
+
text: z.ZodNullable<z.ZodString>;
|
|
58
|
+
files: z.ZodArray<z.ZodObject<{
|
|
59
|
+
uuid: z.ZodUUID;
|
|
60
|
+
fileName: z.ZodString;
|
|
61
|
+
fileUrl: z.ZodString;
|
|
62
|
+
thumbnailUrl: z.ZodNullable<z.ZodString>;
|
|
63
|
+
mimeType: z.ZodString;
|
|
64
|
+
fileType: z.ZodString;
|
|
65
|
+
extention: z.ZodNullable<z.ZodString>;
|
|
66
|
+
size: z.ZodNumber;
|
|
67
|
+
userId: z.ZodUUID;
|
|
68
|
+
messageId: z.ZodNullable<z.ZodUUID>;
|
|
69
|
+
durationMs: z.ZodNullable<z.ZodNumber>;
|
|
70
|
+
content: z.ZodNullable<z.ZodString>;
|
|
71
|
+
contentLength: z.ZodNullable<z.ZodNumber>;
|
|
72
|
+
createdAt: z.ZodISODateTime;
|
|
73
|
+
updatedAt: z.ZodISODateTime;
|
|
74
|
+
}, z.core.$strip>>;
|
|
75
|
+
createdAt: z.ZodISODateTime;
|
|
76
|
+
}, z.core.$strip>>;
|
|
77
|
+
nextCursor: z.ZodNullable<z.ZodUUID>;
|
|
78
|
+
hasMore: z.ZodBoolean;
|
|
79
|
+
}, z.core.$strip>;
|
|
80
|
+
401: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
81
|
+
403: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
82
|
+
404: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
83
|
+
500: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
//# sourceMappingURL=get-admin-support-chat-messages.query.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-admin-support-chat-messages.query.d.ts","sourceRoot":"","sources":["../../../../admin/endpoints/queries/get-admin-support-chat-messages.query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAA+C,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AAItH,eAAO,MAAM,sCAAsC;;iBAEjD,CAAC;AAEH,eAAO,MAAM,qCAAqC;;;iBAAwC,CAAC;AAE3F,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAInD,CAAC;AAEH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAe3C,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetAdminSupportChatMessagesQuery = exports.GetAdminSupportChatMessagesQueryResponse = exports.GetAdminSupportChatMessagesQueryQuery = exports.GetAdminSupportChatMessagesQueryParams = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const _common_1 = require("../../../_common");
|
|
6
|
+
const support_1 = require("../../../support");
|
|
7
|
+
const admin_1 = require("../admin");
|
|
8
|
+
exports.GetAdminSupportChatMessagesQueryParams = zod_1.z.object({
|
|
9
|
+
userId: zod_1.z.uuid(),
|
|
10
|
+
});
|
|
11
|
+
exports.GetAdminSupportChatMessagesQueryQuery = (0, _common_1.defineCursorPaginationQuery)(zod_1.z.uuid());
|
|
12
|
+
exports.GetAdminSupportChatMessagesQueryResponse = zod_1.z.object({
|
|
13
|
+
messages: zod_1.z.array(support_1.SupportMessageResponseSchema),
|
|
14
|
+
nextCursor: zod_1.z.uuid().nullable(),
|
|
15
|
+
hasMore: zod_1.z.boolean(),
|
|
16
|
+
});
|
|
17
|
+
exports.GetAdminSupportChatMessagesQuery = (0, _common_1.defineContract)({
|
|
18
|
+
method: _common_1.HTTP_METHODS.GET,
|
|
19
|
+
path: admin_1.ADMIN_ROUTES.GET_SUPPORT_CHAT_MESSAGES(':userId'),
|
|
20
|
+
summary: 'Get support chat history with a specific user for admin',
|
|
21
|
+
request: {
|
|
22
|
+
params: exports.GetAdminSupportChatMessagesQueryParams,
|
|
23
|
+
query: exports.GetAdminSupportChatMessagesQueryQuery,
|
|
24
|
+
},
|
|
25
|
+
responses: {
|
|
26
|
+
200: exports.GetAdminSupportChatMessagesQueryResponse,
|
|
27
|
+
401: _common_1.HttpErrorResponseSchema,
|
|
28
|
+
403: _common_1.HttpErrorResponseSchema,
|
|
29
|
+
404: _common_1.HttpErrorResponseSchema,
|
|
30
|
+
500: _common_1.HttpErrorResponseSchema,
|
|
31
|
+
},
|
|
32
|
+
});
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HTTP_METHODS } from '../../../_common';
|
|
3
|
+
export declare const GetAdminSupportChatsQueryQuery: 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 GetAdminSupportChatsQueryResponse: z.ZodObject<{
|
|
8
|
+
chats: z.ZodArray<z.ZodObject<{
|
|
9
|
+
userId: z.ZodUUID;
|
|
10
|
+
userEmail: z.ZodEmail;
|
|
11
|
+
userName: z.ZodNullable<z.ZodString>;
|
|
12
|
+
lastMessage: z.ZodNullable<z.ZodString>;
|
|
13
|
+
lastMessageHasAttachment: z.ZodBoolean;
|
|
14
|
+
lastMessageAt: z.ZodISODateTime;
|
|
15
|
+
unreadCount: z.ZodNumber;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
nextCursor: z.ZodNullable<z.ZodUUID>;
|
|
18
|
+
hasMore: z.ZodBoolean;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
export declare const GetAdminSupportChatsQuery: {
|
|
21
|
+
method: HTTP_METHODS.GET;
|
|
22
|
+
path: "support/chats";
|
|
23
|
+
summary: string;
|
|
24
|
+
request: {
|
|
25
|
+
query: z.ZodObject<{
|
|
26
|
+
cursor: z.ZodOptional<z.ZodUUID>;
|
|
27
|
+
limit: z.ZodOptional<z.ZodDefault<z.ZodCoercedNumber<unknown>>>;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
};
|
|
30
|
+
responses: {
|
|
31
|
+
200: z.ZodObject<{
|
|
32
|
+
chats: z.ZodArray<z.ZodObject<{
|
|
33
|
+
userId: z.ZodUUID;
|
|
34
|
+
userEmail: z.ZodEmail;
|
|
35
|
+
userName: z.ZodNullable<z.ZodString>;
|
|
36
|
+
lastMessage: z.ZodNullable<z.ZodString>;
|
|
37
|
+
lastMessageHasAttachment: z.ZodBoolean;
|
|
38
|
+
lastMessageAt: z.ZodISODateTime;
|
|
39
|
+
unreadCount: z.ZodNumber;
|
|
40
|
+
}, z.core.$strip>>;
|
|
41
|
+
nextCursor: z.ZodNullable<z.ZodUUID>;
|
|
42
|
+
hasMore: z.ZodBoolean;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
401: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
45
|
+
403: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
46
|
+
500: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=get-admin-support-chats.query.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-admin-support-chats.query.d.ts","sourceRoot":"","sources":["../../../../admin/endpoints/queries/get-admin-support-chats.query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAA+C,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AAItH,eAAO,MAAM,8BAA8B;;;iBAAwC,CAAC;AAEpF,eAAO,MAAM,iCAAiC;;;;;;;;;;;;iBAI5C,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAapC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetAdminSupportChatsQuery = exports.GetAdminSupportChatsQueryResponse = exports.GetAdminSupportChatsQueryQuery = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const _common_1 = require("../../../_common");
|
|
6
|
+
const models_1 = require("../../models");
|
|
7
|
+
const admin_1 = require("../admin");
|
|
8
|
+
exports.GetAdminSupportChatsQueryQuery = (0, _common_1.defineCursorPaginationQuery)(zod_1.z.uuid());
|
|
9
|
+
exports.GetAdminSupportChatsQueryResponse = zod_1.z.object({
|
|
10
|
+
chats: zod_1.z.array(models_1.AdminSupportChatListItemSchema),
|
|
11
|
+
nextCursor: zod_1.z.uuid().nullable(),
|
|
12
|
+
hasMore: zod_1.z.boolean(),
|
|
13
|
+
});
|
|
14
|
+
exports.GetAdminSupportChatsQuery = (0, _common_1.defineContract)({
|
|
15
|
+
method: _common_1.HTTP_METHODS.GET,
|
|
16
|
+
path: admin_1.ADMIN_ROUTES.GET_SUPPORT_CHATS,
|
|
17
|
+
summary: 'Get support chats list for admin, sorted by last activity',
|
|
18
|
+
request: {
|
|
19
|
+
query: exports.GetAdminSupportChatsQueryQuery,
|
|
20
|
+
},
|
|
21
|
+
responses: {
|
|
22
|
+
200: exports.GetAdminSupportChatsQueryResponse,
|
|
23
|
+
401: _common_1.HttpErrorResponseSchema,
|
|
24
|
+
403: _common_1.HttpErrorResponseSchema,
|
|
25
|
+
500: _common_1.HttpErrorResponseSchema,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
export * from './get-admin-referral-config.query';
|
|
2
1
|
export * from './get-admin-partner.query';
|
|
2
|
+
export * from './get-admin-kie-balance.query';
|
|
3
|
+
export * from './get-admin-user-transactions.query';
|
|
3
4
|
export * from './get-admin-partner-bonus-operations.query';
|
|
4
5
|
export * from './get-admin-partner-l2-bonuses.query';
|
|
6
|
+
export * from './get-admin-user.query';
|
|
5
7
|
export * from './get-admin-partner-referral-config.query';
|
|
6
8
|
export * from './get-admin-partner-referrals.query';
|
|
7
9
|
export * from './get-admin-partners.query';
|
|
10
|
+
export * from './get-admin-referral-config.query';
|
|
8
11
|
export * from './get-admin-users.query';
|
|
9
|
-
export * from './get-admin-
|
|
10
|
-
export * from './get-admin-
|
|
11
|
-
export * from './get-admin-kie-balance.query';
|
|
12
|
+
export * from './get-admin-support-chats.query';
|
|
13
|
+
export * from './get-admin-support-chat-messages.query';
|
|
12
14
|
//# sourceMappingURL=index.d.ts.map
|