@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
@@ -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,3 @@
1
+ export * from './get-support-history.query';
2
+ export * from './get-support-unread-count.query';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -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,2 @@
1
+ export * from './support-message-author-type.enum';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -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,5 @@
1
+ export declare enum SUPPORT_MESSAGE_AUTHOR_TYPE {
2
+ USER = "user",
3
+ ADMIN = "admin"
4
+ }
5
+ //# sourceMappingURL=support-message-author-type.enum.d.ts.map
@@ -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,5 @@
1
+ export * from './enums';
2
+ export * from './models';
3
+ export * from './endpoints';
4
+ export * from './websocket';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -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"}
@@ -0,0 +1,20 @@
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("./enums"), exports);
18
+ __exportStar(require("./models"), exports);
19
+ __exportStar(require("./endpoints"), exports);
20
+ __exportStar(require("./websocket"), exports);
@@ -0,0 +1,2 @@
1
+ export * from './support-message-response.schema';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../support/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,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-response.schema"), exports);
@@ -0,0 +1,28 @@
1
+ import { z } from 'zod';
2
+ import { SUPPORT_MESSAGE_AUTHOR_TYPE } from '../enums';
3
+ export declare const SupportMessageResponseSchema: z.ZodObject<{
4
+ uuid: z.ZodUUID;
5
+ chatId: z.ZodUUID;
6
+ authorType: z.ZodEnum<typeof SUPPORT_MESSAGE_AUTHOR_TYPE>;
7
+ text: z.ZodNullable<z.ZodString>;
8
+ files: z.ZodArray<z.ZodObject<{
9
+ uuid: z.ZodUUID;
10
+ fileName: z.ZodString;
11
+ fileUrl: z.ZodString;
12
+ thumbnailUrl: z.ZodNullable<z.ZodString>;
13
+ mimeType: z.ZodString;
14
+ fileType: z.ZodString;
15
+ extention: z.ZodNullable<z.ZodString>;
16
+ size: z.ZodNumber;
17
+ userId: z.ZodUUID;
18
+ messageId: z.ZodNullable<z.ZodUUID>;
19
+ durationMs: z.ZodNullable<z.ZodNumber>;
20
+ content: z.ZodNullable<z.ZodString>;
21
+ contentLength: z.ZodNullable<z.ZodNumber>;
22
+ createdAt: z.ZodISODateTime;
23
+ updatedAt: z.ZodISODateTime;
24
+ }, z.core.$strip>>;
25
+ createdAt: z.ZodISODateTime;
26
+ }, z.core.$strip>;
27
+ export type SupportMessageResponseSchemaType = z.infer<typeof SupportMessageResponseSchema>;
28
+ //# sourceMappingURL=support-message-response.schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"support-message-response.schema.d.ts","sourceRoot":"","sources":["../../../support/models/support-message-response.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAC;AAGvD,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;iBAOvC,CAAC;AAEH,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SupportMessageResponseSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const enums_1 = require("../enums");
6
+ const file_1 = require("../../file");
7
+ exports.SupportMessageResponseSchema = zod_1.z.object({
8
+ uuid: zod_1.z.uuid(),
9
+ chatId: zod_1.z.uuid(),
10
+ authorType: zod_1.z.enum(enums_1.SUPPORT_MESSAGE_AUTHOR_TYPE),
11
+ text: zod_1.z.string().nullable(),
12
+ files: zod_1.z.array(file_1.FileResponseSchema),
13
+ createdAt: zod_1.z.iso.datetime(),
14
+ });
@@ -0,0 +1,2 @@
1
+ export * from './support-socket-events';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../support/websocket/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,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-socket-events"), exports);
@@ -0,0 +1,50 @@
1
+ import { z } from 'zod';
2
+ export declare const SUPPORT_SOCKET_NAMESPACE: "/support";
3
+ export declare const SUPPORT_SOCKET_EVENTS: {
4
+ readonly MESSAGE: "support:message";
5
+ readonly UNREAD_COUNT: "support:unread-count";
6
+ readonly CHAT_UPDATED: "support:chat-updated";
7
+ };
8
+ export declare const SupportSocketMessagePayloadSchema: z.ZodObject<{
9
+ userId: z.ZodUUID;
10
+ message: z.ZodObject<{
11
+ uuid: z.ZodUUID;
12
+ chatId: z.ZodUUID;
13
+ authorType: z.ZodEnum<typeof import("..").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
+ }, z.core.$strip>;
35
+ export type SupportSocketMessagePayloadSchemaType = z.infer<typeof SupportSocketMessagePayloadSchema>;
36
+ export declare const SupportSocketUnreadCountPayloadSchema: z.ZodObject<{
37
+ unreadCount: z.ZodNumber;
38
+ }, z.core.$strip>;
39
+ export type SupportSocketUnreadCountPayloadSchemaType = z.infer<typeof SupportSocketUnreadCountPayloadSchema>;
40
+ export declare const SupportSocketChatUpdatedPayloadSchema: z.ZodObject<{
41
+ userId: z.ZodUUID;
42
+ userEmail: z.ZodEmail;
43
+ userName: z.ZodNullable<z.ZodString>;
44
+ lastMessage: z.ZodNullable<z.ZodString>;
45
+ lastMessageHasAttachment: z.ZodBoolean;
46
+ lastMessageAt: z.ZodISODateTime;
47
+ unreadCount: z.ZodNumber;
48
+ }, z.core.$strip>;
49
+ export type SupportSocketChatUpdatedPayloadSchemaType = z.infer<typeof SupportSocketChatUpdatedPayloadSchema>;
50
+ //# sourceMappingURL=support-socket-events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"support-socket-events.d.ts","sourceRoot":"","sources":["../../../support/websocket/support-socket-events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,wBAAwB,EAAG,UAAmB,CAAC;AAE5D,eAAO,MAAM,qBAAqB;;;;CAIxB,CAAC;AAEX,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;iBAG5C,CAAC;AAEH,MAAM,MAAM,qCAAqC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAEtG,eAAO,MAAM,qCAAqC;;iBAEhD,CAAC;AAEH,MAAM,MAAM,yCAAyC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC;AAE9G,eAAO,MAAM,qCAAqC;;;;;;;;iBAQhD,CAAC;AAEH,MAAM,MAAM,yCAAyC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SupportSocketChatUpdatedPayloadSchema = exports.SupportSocketUnreadCountPayloadSchema = exports.SupportSocketMessagePayloadSchema = exports.SUPPORT_SOCKET_EVENTS = exports.SUPPORT_SOCKET_NAMESPACE = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../models");
6
+ exports.SUPPORT_SOCKET_NAMESPACE = '/support';
7
+ exports.SUPPORT_SOCKET_EVENTS = {
8
+ MESSAGE: 'support:message',
9
+ UNREAD_COUNT: 'support:unread-count',
10
+ CHAT_UPDATED: 'support:chat-updated',
11
+ };
12
+ exports.SupportSocketMessagePayloadSchema = zod_1.z.object({
13
+ userId: zod_1.z.uuid(),
14
+ message: models_1.SupportMessageResponseSchema,
15
+ });
16
+ exports.SupportSocketUnreadCountPayloadSchema = zod_1.z.object({
17
+ unreadCount: zod_1.z.number().int().nonnegative(),
18
+ });
19
+ exports.SupportSocketChatUpdatedPayloadSchema = zod_1.z.object({
20
+ userId: zod_1.z.uuid(),
21
+ userEmail: zod_1.z.email(),
22
+ userName: zod_1.z.string().nullable(),
23
+ lastMessage: zod_1.z.string().nullable(),
24
+ lastMessageHasAttachment: zod_1.z.boolean(),
25
+ lastMessageAt: zod_1.z.iso.datetime(),
26
+ unreadCount: zod_1.z.number().int().nonnegative(),
27
+ });