@ai-grator/api 0.1.23 → 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.
Files changed (164) hide show
  1. package/admin/endpoints/admin.ts +6 -0
  2. package/admin/endpoints/commands/index.ts +2 -0
  3. package/admin/endpoints/commands/mark-admin-support-chat-read.command.ts +25 -0
  4. package/admin/endpoints/commands/send-admin-support-reply.command.ts +38 -0
  5. package/admin/endpoints/queries/get-admin-support-chat-messages.query.ts +33 -0
  6. package/admin/endpoints/queries/get-admin-support-chats.query.ts +27 -0
  7. package/admin/endpoints/queries/index.ts +6 -4
  8. package/admin/models/admin-support-chat-list-item.schema.ts +13 -0
  9. package/admin/models/index.ts +1 -0
  10. package/build/admin/endpoints/admin.d.ts +4 -0
  11. package/build/admin/endpoints/admin.d.ts.map +1 -1
  12. package/build/admin/endpoints/admin.js +5 -0
  13. package/build/admin/endpoints/commands/index.d.ts +2 -0
  14. package/build/admin/endpoints/commands/index.d.ts.map +1 -1
  15. package/build/admin/endpoints/commands/index.js +2 -0
  16. package/build/admin/endpoints/commands/mark-admin-support-chat-read.command.d.ts +24 -0
  17. package/build/admin/endpoints/commands/mark-admin-support-chat-read.command.d.ts.map +1 -0
  18. package/build/admin/endpoints/commands/mark-admin-support-chat-read.command.js +25 -0
  19. package/build/admin/endpoints/commands/send-admin-support-reply.command.d.ts +79 -0
  20. package/build/admin/endpoints/commands/send-admin-support-reply.command.d.ts.map +1 -0
  21. package/build/admin/endpoints/commands/send-admin-support-reply.command.js +37 -0
  22. package/build/admin/endpoints/queries/get-admin-support-chat-messages.query.d.ts +86 -0
  23. package/build/admin/endpoints/queries/get-admin-support-chat-messages.query.d.ts.map +1 -0
  24. package/build/admin/endpoints/queries/get-admin-support-chat-messages.query.js +32 -0
  25. package/build/admin/endpoints/queries/get-admin-support-chats.query.d.ts +49 -0
  26. package/build/admin/endpoints/queries/get-admin-support-chats.query.d.ts.map +1 -0
  27. package/build/admin/endpoints/queries/get-admin-support-chats.query.js +27 -0
  28. package/build/admin/endpoints/queries/index.d.ts +6 -4
  29. package/build/admin/endpoints/queries/index.d.ts.map +1 -1
  30. package/build/admin/endpoints/queries/index.js +6 -4
  31. package/build/admin/models/admin-support-chat-list-item.schema.d.ts +12 -0
  32. package/build/admin/models/admin-support-chat-list-item.schema.d.ts.map +1 -0
  33. package/build/admin/models/admin-support-chat-list-item.schema.js +13 -0
  34. package/build/admin/models/index.d.ts +1 -0
  35. package/build/admin/models/index.d.ts.map +1 -1
  36. package/build/admin/models/index.js +1 -0
  37. package/build/chat/endpoints/commands/create-chat.command.d.ts +2 -0
  38. package/build/chat/endpoints/commands/create-chat.command.d.ts.map +1 -1
  39. package/build/chat/endpoints/commands/update-chat.command.d.ts +2 -0
  40. package/build/chat/endpoints/commands/update-chat.command.d.ts.map +1 -1
  41. package/build/chat/endpoints/queries/get-chat-by-uuid.query.d.ts +2 -0
  42. package/build/chat/endpoints/queries/get-chat-by-uuid.query.d.ts.map +1 -1
  43. package/build/chat/endpoints/queries/get-chats.query.d.ts +2 -0
  44. package/build/chat/endpoints/queries/get-chats.query.d.ts.map +1 -1
  45. package/build/chat/models/chat-response.schema.d.ts +1 -0
  46. package/build/chat/models/chat-response.schema.d.ts.map +1 -1
  47. package/build/chat/models/chat-response.schema.js +1 -0
  48. package/build/errors/errors.d.ts +28 -1
  49. package/build/errors/errors.d.ts.map +1 -1
  50. package/build/errors/errors.js +28 -1
  51. package/build/file/enums/file.enum.d.ts +1 -0
  52. package/build/file/enums/file.enum.d.ts.map +1 -1
  53. package/build/file/enums/file.enum.js +59 -59
  54. package/build/file/helpers/allowed-file-formats.helper.d.ts +4 -0
  55. package/build/file/helpers/allowed-file-formats.helper.d.ts.map +1 -0
  56. package/build/file/helpers/allowed-file-formats.helper.js +15 -0
  57. package/build/file/helpers/index.d.ts +2 -0
  58. package/build/file/helpers/index.d.ts.map +1 -0
  59. package/build/file/helpers/index.js +17 -0
  60. package/build/file/index.d.ts +1 -0
  61. package/build/file/index.d.ts.map +1 -1
  62. package/build/file/index.js +1 -0
  63. package/build/file/models/file-format-list.schema.d.ts +8 -0
  64. package/build/file/models/file-format-list.schema.d.ts.map +1 -0
  65. package/build/file/models/file-format-list.schema.js +9 -0
  66. package/build/file/models/index.d.ts +1 -0
  67. package/build/file/models/index.d.ts.map +1 -1
  68. package/build/file/models/index.js +1 -0
  69. package/build/generation-model/endpoints/queries/get-generation-models-by-type.query.d.ts +20 -2
  70. package/build/generation-model/endpoints/queries/get-generation-models-by-type.query.d.ts.map +1 -1
  71. package/build/generation-model/endpoints/queries/get-generation-models.query.d.ts +20 -2
  72. package/build/generation-model/endpoints/queries/get-generation-models.query.d.ts.map +1 -1
  73. package/build/generation-model/models/generation-model-response.schema.d.ts +31 -1
  74. package/build/generation-model/models/generation-model-response.schema.d.ts.map +1 -1
  75. package/build/generation-model/models/generation-model-response.schema.js +10 -2
  76. package/build/index.d.ts +1 -0
  77. package/build/index.d.ts.map +1 -1
  78. package/build/index.js +1 -0
  79. package/build/marketplace-card/endpoints/marketplace-card.d.ts +1 -0
  80. package/build/marketplace-card/endpoints/marketplace-card.d.ts.map +1 -1
  81. package/build/marketplace-card/endpoints/marketplace-card.js +1 -0
  82. package/build/marketplace-card/endpoints/queries/get-marketplace-card-config.query.d.ts +27 -0
  83. package/build/marketplace-card/endpoints/queries/get-marketplace-card-config.query.d.ts.map +1 -0
  84. package/build/marketplace-card/endpoints/queries/get-marketplace-card-config.query.js +20 -0
  85. package/build/marketplace-card/endpoints/queries/index.d.ts +1 -0
  86. package/build/marketplace-card/endpoints/queries/index.d.ts.map +1 -1
  87. package/build/marketplace-card/endpoints/queries/index.js +1 -0
  88. package/build/scripts/generate-openapi.js +67 -0
  89. package/build/support/endpoints/commands/index.d.ts +3 -0
  90. package/build/support/endpoints/commands/index.d.ts.map +1 -0
  91. package/build/support/endpoints/commands/index.js +18 -0
  92. package/build/support/endpoints/commands/mark-support-chat-read-by-user.command.d.ts +12 -0
  93. package/build/support/endpoints/commands/mark-support-chat-read-by-user.command.d.ts.map +1 -0
  94. package/build/support/endpoints/commands/mark-support-chat-read-by-user.command.js +15 -0
  95. package/build/support/endpoints/commands/send-support-message.command.d.ts +70 -0
  96. package/build/support/endpoints/commands/send-support-message.command.d.ts.map +1 -0
  97. package/build/support/endpoints/commands/send-support-message.command.js +30 -0
  98. package/build/support/endpoints/index.d.ts +4 -0
  99. package/build/support/endpoints/index.d.ts.map +1 -0
  100. package/build/support/endpoints/index.js +19 -0
  101. package/build/support/endpoints/queries/get-support-history.query.d.ts +77 -0
  102. package/build/support/endpoints/queries/get-support-history.query.d.ts.map +1 -0
  103. package/build/support/endpoints/queries/get-support-history.query.js +25 -0
  104. package/build/support/endpoints/queries/get-support-unread-count.query.d.ts +17 -0
  105. package/build/support/endpoints/queries/get-support-unread-count.query.d.ts.map +1 -0
  106. package/build/support/endpoints/queries/get-support-unread-count.query.js +18 -0
  107. package/build/support/endpoints/queries/index.d.ts +3 -0
  108. package/build/support/endpoints/queries/index.d.ts.map +1 -0
  109. package/build/support/endpoints/queries/index.js +18 -0
  110. package/build/support/endpoints/support.d.ts +8 -0
  111. package/build/support/endpoints/support.d.ts.map +1 -0
  112. package/build/support/endpoints/support.js +10 -0
  113. package/build/support/enums/index.d.ts +2 -0
  114. package/build/support/enums/index.d.ts.map +1 -0
  115. package/build/support/enums/index.js +17 -0
  116. package/build/support/enums/support-message-author-type.enum.d.ts +5 -0
  117. package/build/support/enums/support-message-author-type.enum.d.ts.map +1 -0
  118. package/build/support/enums/support-message-author-type.enum.js +8 -0
  119. package/build/support/index.d.ts +5 -0
  120. package/build/support/index.d.ts.map +1 -0
  121. package/build/support/index.js +20 -0
  122. package/build/support/models/index.d.ts +2 -0
  123. package/build/support/models/index.d.ts.map +1 -0
  124. package/build/support/models/index.js +17 -0
  125. package/build/support/models/support-message-response.schema.d.ts +28 -0
  126. package/build/support/models/support-message-response.schema.d.ts.map +1 -0
  127. package/build/support/models/support-message-response.schema.js +14 -0
  128. package/build/support/websocket/index.d.ts +2 -0
  129. package/build/support/websocket/index.d.ts.map +1 -0
  130. package/build/support/websocket/index.js +17 -0
  131. package/build/support/websocket/support-socket-events.d.ts +50 -0
  132. package/build/support/websocket/support-socket-events.d.ts.map +1 -0
  133. package/build/support/websocket/support-socket-events.js +27 -0
  134. package/build/tsconfig.tsbuildinfo +1 -1
  135. package/chat/models/chat-response.schema.ts +1 -0
  136. package/errors/errors.ts +28 -1
  137. package/file/enums/file.enum.ts +60 -59
  138. package/file/helpers/allowed-file-formats.helper.ts +16 -0
  139. package/file/helpers/index.ts +1 -0
  140. package/file/index.ts +1 -0
  141. package/file/models/file-format-list.schema.ts +9 -0
  142. package/file/models/index.ts +1 -0
  143. package/generation-model/models/generation-model-response.schema.ts +11 -1
  144. package/index.ts +1 -0
  145. package/marketplace-card/endpoints/marketplace-card.ts +1 -0
  146. package/marketplace-card/endpoints/queries/get-marketplace-card-config.query.ts +21 -0
  147. package/marketplace-card/endpoints/queries/index.ts +1 -0
  148. package/package.json +1 -1
  149. package/scripts/generate-openapi.ts +104 -0
  150. package/support/endpoints/commands/index.ts +2 -0
  151. package/support/endpoints/commands/mark-support-chat-read-by-user.command.ts +14 -0
  152. package/support/endpoints/commands/send-support-message.command.ts +30 -0
  153. package/support/endpoints/index.ts +3 -0
  154. package/support/endpoints/queries/get-support-history.query.ts +25 -0
  155. package/support/endpoints/queries/get-support-unread-count.query.ts +17 -0
  156. package/support/endpoints/queries/index.ts +2 -0
  157. package/support/endpoints/support.ts +8 -0
  158. package/support/enums/index.ts +1 -0
  159. package/support/enums/support-message-author-type.enum.ts +4 -0
  160. package/support/index.ts +4 -0
  161. package/support/models/index.ts +1 -0
  162. package/support/models/support-message-response.schema.ts +14 -0
  163. package/support/websocket/index.ts +1 -0
  164. package/support/websocket/support-socket-events.ts +35 -0
@@ -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-user.query';
10
- export * from './get-admin-user-transactions.query';
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>;
@@ -10,3 +10,4 @@ export * from './admin-user-response.schema';
10
10
  export * from './admin-user-list-item.schema';
11
11
  export * from './admin-user-details-response.schema';
12
12
  export * from './admin-kie-balance-response.schema';
13
+ export * from './admin-support-chat-list-item.schema';
@@ -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;CACnB,CAAC"}
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-user.query';
10
- export * from './get-admin-user-transactions.query';
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