@purpleschool/multisite 0.0.34 → 0.0.41

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 (184) hide show
  1. package/api/controller/http/auth.ts +1 -0
  2. package/api/controller/http/catalog.ts +6 -0
  3. package/api/controller/http/file.ts +1 -0
  4. package/api/controller/http/index.ts +2 -0
  5. package/api/controller/http/text-chat.ts +18 -0
  6. package/api/routes.ts +1 -0
  7. package/build/api/controller/http/auth.d.ts +1 -0
  8. package/build/api/controller/http/auth.d.ts.map +1 -1
  9. package/build/api/controller/http/auth.js +1 -0
  10. package/build/api/controller/http/catalog.d.ts +7 -0
  11. package/build/api/controller/http/catalog.d.ts.map +1 -0
  12. package/build/api/controller/http/catalog.js +9 -0
  13. package/build/api/controller/http/file.d.ts +1 -0
  14. package/build/api/controller/http/file.d.ts.map +1 -1
  15. package/build/api/controller/http/file.js +1 -0
  16. package/build/api/controller/http/index.d.ts +2 -0
  17. package/build/api/controller/http/index.d.ts.map +1 -1
  18. package/build/api/controller/http/index.js +2 -0
  19. package/build/api/controller/http/text-chat.d.ts +18 -0
  20. package/build/api/controller/http/text-chat.d.ts.map +1 -0
  21. package/build/api/controller/http/text-chat.js +20 -0
  22. package/build/api/routes.d.ts +1 -0
  23. package/build/api/routes.d.ts.map +1 -1
  24. package/build/api/routes.js +1 -0
  25. package/build/commands/auth/change-password.command.d.ts +5 -0
  26. package/build/commands/auth/change-password.command.d.ts.map +1 -1
  27. package/build/commands/auth/change-password.command.js +1 -0
  28. package/build/commands/auth/index.d.ts +1 -0
  29. package/build/commands/auth/index.d.ts.map +1 -1
  30. package/build/commands/auth/index.js +1 -0
  31. package/build/commands/auth/login.command.d.ts +5 -0
  32. package/build/commands/auth/login.command.d.ts.map +1 -1
  33. package/build/commands/auth/login.command.js +1 -0
  34. package/build/commands/auth/refresh.command.d.ts +30 -0
  35. package/build/commands/auth/refresh.command.d.ts.map +1 -0
  36. package/build/commands/auth/refresh.command.js +15 -0
  37. package/build/commands/auth/register.command.d.ts +5 -0
  38. package/build/commands/auth/register.command.d.ts.map +1 -1
  39. package/build/commands/auth/register.command.js +1 -0
  40. package/build/commands/auth/reset-password.command.d.ts +5 -0
  41. package/build/commands/auth/reset-password.command.d.ts.map +1 -1
  42. package/build/commands/auth/reset-password.command.js +1 -0
  43. package/build/commands/auth/verify-email.command.d.ts.map +1 -1
  44. package/build/commands/auth/verify-email.command.js +2 -1
  45. package/build/commands/auth/vk-login.command.d.ts +5 -0
  46. package/build/commands/auth/vk-login.command.d.ts.map +1 -1
  47. package/build/commands/auth/vk-login.command.js +1 -0
  48. package/build/commands/auth/yandex-login.command.d.ts +5 -0
  49. package/build/commands/auth/yandex-login.command.d.ts.map +1 -1
  50. package/build/commands/auth/yandex-login.command.js +1 -0
  51. package/build/commands/catalog/index.d.ts +156 -0
  52. package/build/commands/catalog/index.d.ts.map +1 -0
  53. package/build/commands/catalog/index.js +23 -0
  54. package/build/commands/index.d.ts +2 -0
  55. package/build/commands/index.d.ts.map +1 -1
  56. package/build/commands/index.js +2 -0
  57. package/build/commands/page/create-page.command.d.ts +8 -0
  58. package/build/commands/page/create-page.command.d.ts.map +1 -1
  59. package/build/commands/page/find-page-by-alias.command.d.ts +16 -0
  60. package/build/commands/page/find-page-by-alias.command.d.ts.map +1 -1
  61. package/build/commands/page/find-page-by-criteria.command.d.ts +5 -0
  62. package/build/commands/page/find-page-by-criteria.command.d.ts.map +1 -1
  63. package/build/commands/page/find-page.command.d.ts +11 -0
  64. package/build/commands/page/find-page.command.d.ts.map +1 -1
  65. package/build/commands/page/update-page.command.d.ts +8 -0
  66. package/build/commands/page/update-page.command.d.ts.map +1 -1
  67. package/build/commands/product/fast-buy-product.command.d.ts.map +1 -1
  68. package/build/commands/product/fast-buy-product.command.js +2 -1
  69. package/build/commands/subscription/fast-buy-subscription.command.d.ts.map +1 -1
  70. package/build/commands/subscription/fast-buy-subscription.command.js +2 -1
  71. package/build/commands/text-chat/category.d.ts +321 -0
  72. package/build/commands/text-chat/category.d.ts.map +1 -0
  73. package/build/commands/text-chat/category.js +29 -0
  74. package/build/commands/text-chat/index.d.ts +292 -0
  75. package/build/commands/text-chat/index.d.ts.map +1 -0
  76. package/build/commands/text-chat/index.js +73 -0
  77. package/build/constants/catalog.d.ts +5 -0
  78. package/build/constants/catalog.d.ts.map +1 -0
  79. package/build/constants/catalog.js +8 -0
  80. package/build/constants/errors/errors.d.ts +77 -0
  81. package/build/constants/errors/errors.d.ts.map +1 -1
  82. package/build/constants/errors/errors.js +77 -0
  83. package/build/constants/files/enums/file-type.enum.d.ts +3 -1
  84. package/build/constants/files/enums/file-type.enum.d.ts.map +1 -1
  85. package/build/constants/files/enums/file-type.enum.js +2 -0
  86. package/build/constants/index.d.ts +3 -0
  87. package/build/constants/index.d.ts.map +1 -1
  88. package/build/constants/index.js +3 -0
  89. package/build/constants/text-chat/attachments.d.ts +12 -0
  90. package/build/constants/text-chat/attachments.d.ts.map +1 -0
  91. package/build/constants/text-chat/attachments.js +52 -0
  92. package/build/constants/text-chat/index.d.ts +38 -0
  93. package/build/constants/text-chat/index.d.ts.map +1 -0
  94. package/build/constants/text-chat/index.js +59 -0
  95. package/build/constants/text-provider/index.d.ts +37 -0
  96. package/build/constants/text-provider/index.d.ts.map +1 -0
  97. package/build/constants/text-provider/index.js +46 -0
  98. package/build/constants/tools/enums/tool-type.enum.d.ts +1 -0
  99. package/build/constants/tools/enums/tool-type.enum.d.ts.map +1 -1
  100. package/build/constants/tools/enums/tool-type.enum.js +1 -0
  101. package/build/helpers/index.d.ts +1 -0
  102. package/build/helpers/index.d.ts.map +1 -1
  103. package/build/helpers/index.js +1 -0
  104. package/build/helpers/text-chat/index.d.ts +23 -0
  105. package/build/helpers/text-chat/index.d.ts.map +1 -0
  106. package/build/helpers/text-chat/index.js +91 -0
  107. package/build/models/catalog/index.d.ts +181 -0
  108. package/build/models/catalog/index.d.ts.map +1 -0
  109. package/build/models/catalog/index.js +36 -0
  110. package/build/models/index.d.ts +2 -0
  111. package/build/models/index.d.ts.map +1 -1
  112. package/build/models/index.js +2 -0
  113. package/build/models/page.schema.d.ts +6 -0
  114. package/build/models/page.schema.d.ts.map +1 -1
  115. package/build/models/page.schema.js +1 -0
  116. package/build/models/text-chat/category.schema.d.ts +79 -0
  117. package/build/models/text-chat/category.schema.d.ts.map +1 -0
  118. package/build/models/text-chat/category.schema.js +38 -0
  119. package/build/models/text-chat/index.d.ts +319 -0
  120. package/build/models/text-chat/index.d.ts.map +1 -0
  121. package/build/models/text-chat/index.js +79 -0
  122. package/build/models/text-chat/provider-config.schema.d.ts +92 -0
  123. package/build/models/text-chat/provider-config.schema.d.ts.map +1 -0
  124. package/build/models/text-chat/provider-config.schema.js +42 -0
  125. package/build/models/text-chat/stream.schema.d.ts +83 -0
  126. package/build/models/text-chat/stream.schema.d.ts.map +1 -0
  127. package/build/models/text-chat/stream.schema.js +24 -0
  128. package/build/models/user.schema.d.ts +1 -0
  129. package/build/models/user.schema.d.ts.map +1 -1
  130. package/build/models/user.schema.js +3 -2
  131. package/build/queries/catalog/index.d.ts +259 -0
  132. package/build/queries/catalog/index.d.ts.map +1 -0
  133. package/build/queries/catalog/index.js +31 -0
  134. package/build/queries/index.d.ts +2 -0
  135. package/build/queries/index.d.ts.map +1 -1
  136. package/build/queries/index.js +2 -0
  137. package/build/queries/subscription/get-subscriptions-summary.command.d.ts +5 -0
  138. package/build/queries/subscription/get-subscriptions-summary.command.d.ts.map +1 -1
  139. package/build/queries/subscription/get-subscriptions-summary.command.js +1 -0
  140. package/build/queries/text-chat/category.d.ts +297 -0
  141. package/build/queries/text-chat/category.d.ts.map +1 -0
  142. package/build/queries/text-chat/category.js +45 -0
  143. package/build/queries/text-chat/index.d.ts +472 -0
  144. package/build/queries/text-chat/index.d.ts.map +1 -0
  145. package/build/queries/text-chat/index.js +61 -0
  146. package/commands/auth/change-password.command.ts +1 -0
  147. package/commands/auth/index.ts +1 -0
  148. package/commands/auth/login.command.ts +1 -0
  149. package/commands/auth/refresh.command.ts +15 -0
  150. package/commands/auth/register.command.ts +1 -0
  151. package/commands/auth/reset-password.command.ts +1 -0
  152. package/commands/auth/verify-email.command.ts +2 -1
  153. package/commands/auth/vk-login.command.ts +1 -0
  154. package/commands/auth/yandex-login.command.ts +1 -0
  155. package/commands/catalog/index.ts +26 -0
  156. package/commands/index.ts +2 -0
  157. package/commands/product/fast-buy-product.command.ts +2 -1
  158. package/commands/subscription/fast-buy-subscription.command.ts +2 -1
  159. package/commands/text-chat/category.ts +42 -0
  160. package/commands/text-chat/index.ts +71 -0
  161. package/constants/catalog.ts +4 -0
  162. package/constants/errors/errors.ts +78 -0
  163. package/constants/files/enums/file-type.enum.ts +2 -0
  164. package/constants/index.ts +3 -0
  165. package/constants/text-chat/attachments.ts +55 -0
  166. package/constants/text-chat/index.ts +43 -0
  167. package/constants/text-provider/index.ts +42 -0
  168. package/constants/tools/enums/tool-type.enum.ts +1 -0
  169. package/helpers/index.ts +1 -0
  170. package/helpers/text-chat/index.ts +91 -0
  171. package/models/catalog/index.ts +35 -0
  172. package/models/index.ts +2 -0
  173. package/models/page.schema.ts +1 -0
  174. package/models/text-chat/category.schema.ts +40 -0
  175. package/models/text-chat/index.ts +82 -0
  176. package/models/text-chat/provider-config.schema.ts +47 -0
  177. package/models/text-chat/stream.schema.ts +43 -0
  178. package/models/user.schema.ts +3 -1
  179. package/package.json +1 -1
  180. package/queries/catalog/index.ts +29 -0
  181. package/queries/index.ts +2 -0
  182. package/queries/subscription/get-subscriptions-summary.command.ts +1 -0
  183. package/queries/text-chat/category.ts +51 -0
  184. package/queries/text-chat/index.ts +56 -0
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetAdminTextChatCategoryCommand = exports.FindAdminTextChatCategoriesCommand = exports.GetTextChatCategoryCommand = exports.FindTextChatCategoriesCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const tools_1 = require("../../constants/tools");
6
+ const text_chat_1 = require("../../constants/text-chat");
7
+ const category_schema_1 = require("../../models/text-chat/category.schema");
8
+ const PaginationSchema = zod_1.z.object({
9
+ limit: zod_1.z.coerce.number().int().min(1).max(100).default(20),
10
+ offset: zod_1.z.coerce.number().int().min(0).default(0),
11
+ });
12
+ const MetaSchema = zod_1.z.object({
13
+ limit: zod_1.z.number().int().positive(),
14
+ offset: zod_1.z.number().int().nonnegative(),
15
+ total: zod_1.z.number().int().nonnegative(),
16
+ });
17
+ var FindTextChatCategoriesCommand;
18
+ (function (FindTextChatCategoriesCommand) {
19
+ FindTextChatCategoriesCommand.RequestQuerySchema = PaginationSchema.strict();
20
+ FindTextChatCategoriesCommand.ResponseSchema = zod_1.z.object({
21
+ data: zod_1.z.array(category_schema_1.TextChatCategoryPublicSchema),
22
+ meta: MetaSchema,
23
+ });
24
+ })(FindTextChatCategoriesCommand || (exports.FindTextChatCategoriesCommand = FindTextChatCategoriesCommand = {}));
25
+ var GetTextChatCategoryCommand;
26
+ (function (GetTextChatCategoryCommand) {
27
+ GetTextChatCategoryCommand.RequestParamsSchema = zod_1.z.object({ uuid: zod_1.z.string().uuid() }).strict();
28
+ GetTextChatCategoryCommand.ResponseSchema = zod_1.z.object({ data: category_schema_1.TextChatCategoryPublicSchema });
29
+ })(GetTextChatCategoryCommand || (exports.GetTextChatCategoryCommand = GetTextChatCategoryCommand = {}));
30
+ var FindAdminTextChatCategoriesCommand;
31
+ (function (FindAdminTextChatCategoriesCommand) {
32
+ FindAdminTextChatCategoriesCommand.RequestQuerySchema = PaginationSchema.extend({
33
+ toolType: zod_1.z.nativeEnum(tools_1.TOOL_TYPE).optional(),
34
+ scope: zod_1.z.nativeEnum(text_chat_1.TEXT_CHAT_CATEGORY_SCOPE).default(text_chat_1.TEXT_CHAT_CATEGORY_SCOPE.ACTIVE),
35
+ }).strict();
36
+ FindAdminTextChatCategoriesCommand.ResponseSchema = zod_1.z.object({
37
+ data: zod_1.z.array(category_schema_1.TextChatCategoryAdminSchema),
38
+ meta: MetaSchema,
39
+ });
40
+ })(FindAdminTextChatCategoriesCommand || (exports.FindAdminTextChatCategoriesCommand = FindAdminTextChatCategoriesCommand = {}));
41
+ var GetAdminTextChatCategoryCommand;
42
+ (function (GetAdminTextChatCategoryCommand) {
43
+ GetAdminTextChatCategoryCommand.RequestParamsSchema = GetTextChatCategoryCommand.RequestParamsSchema;
44
+ GetAdminTextChatCategoryCommand.ResponseSchema = zod_1.z.object({ data: category_schema_1.TextChatCategoryAdminSchema });
45
+ })(GetAdminTextChatCategoryCommand || (exports.GetAdminTextChatCategoryCommand = GetAdminTextChatCategoryCommand = {}));
@@ -0,0 +1,472 @@
1
+ import { z } from 'zod';
2
+ export * from './category';
3
+ export declare namespace GetTextChatConfigCommand {
4
+ const ResponseSchema: z.ZodObject<{
5
+ data: z.ZodObject<{
6
+ models: z.ZodArray<z.ZodObject<{
7
+ uuid: z.ZodString;
8
+ title: z.ZodString;
9
+ model: z.ZodString;
10
+ description: z.ZodString;
11
+ status: z.ZodNativeEnum<typeof import("../..").TOOL_MODEL_STATUS>;
12
+ canUse: z.ZodBoolean;
13
+ unlockedBy: z.ZodNullable<z.ZodObject<{
14
+ uuid: z.ZodString;
15
+ name: z.ZodString;
16
+ }, "strip", z.ZodTypeAny, {
17
+ uuid: string;
18
+ name: string;
19
+ }, {
20
+ uuid: string;
21
+ name: string;
22
+ }>>;
23
+ supportsImageAttachment: z.ZodBoolean;
24
+ maxPromptLength: z.ZodNumber;
25
+ maxContextCharacters: z.ZodNumber;
26
+ order: z.ZodNumber;
27
+ }, "strip", z.ZodTypeAny, {
28
+ uuid: string;
29
+ title: string;
30
+ model: string;
31
+ description: string;
32
+ status: import("../..").TOOL_MODEL_STATUS;
33
+ canUse: boolean;
34
+ unlockedBy: {
35
+ uuid: string;
36
+ name: string;
37
+ } | null;
38
+ supportsImageAttachment: boolean;
39
+ maxPromptLength: number;
40
+ maxContextCharacters: number;
41
+ order: number;
42
+ }, {
43
+ uuid: string;
44
+ title: string;
45
+ model: string;
46
+ description: string;
47
+ status: import("../..").TOOL_MODEL_STATUS;
48
+ canUse: boolean;
49
+ unlockedBy: {
50
+ uuid: string;
51
+ name: string;
52
+ } | null;
53
+ supportsImageAttachment: boolean;
54
+ maxPromptLength: number;
55
+ maxContextCharacters: number;
56
+ order: number;
57
+ }>, "many">;
58
+ maxFileAttachments: z.ZodNumber;
59
+ maxImageUploadSize: z.ZodNumber;
60
+ maxDocumentUploadSize: z.ZodNumber;
61
+ maxTextUploadSize: z.ZodNumber;
62
+ isAttachmentAvailable: z.ZodLiteral<true>;
63
+ }, "strip", z.ZodTypeAny, {
64
+ models: {
65
+ uuid: string;
66
+ title: string;
67
+ model: string;
68
+ description: string;
69
+ status: import("../..").TOOL_MODEL_STATUS;
70
+ canUse: boolean;
71
+ unlockedBy: {
72
+ uuid: string;
73
+ name: string;
74
+ } | null;
75
+ supportsImageAttachment: boolean;
76
+ maxPromptLength: number;
77
+ maxContextCharacters: number;
78
+ order: number;
79
+ }[];
80
+ maxFileAttachments: number;
81
+ maxImageUploadSize: number;
82
+ maxDocumentUploadSize: number;
83
+ maxTextUploadSize: number;
84
+ isAttachmentAvailable: true;
85
+ }, {
86
+ models: {
87
+ uuid: string;
88
+ title: string;
89
+ model: string;
90
+ description: string;
91
+ status: import("../..").TOOL_MODEL_STATUS;
92
+ canUse: boolean;
93
+ unlockedBy: {
94
+ uuid: string;
95
+ name: string;
96
+ } | null;
97
+ supportsImageAttachment: boolean;
98
+ maxPromptLength: number;
99
+ maxContextCharacters: number;
100
+ order: number;
101
+ }[];
102
+ maxFileAttachments: number;
103
+ maxImageUploadSize: number;
104
+ maxDocumentUploadSize: number;
105
+ maxTextUploadSize: number;
106
+ isAttachmentAvailable: true;
107
+ }>;
108
+ }, "strip", z.ZodTypeAny, {
109
+ data: {
110
+ models: {
111
+ uuid: string;
112
+ title: string;
113
+ model: string;
114
+ description: string;
115
+ status: import("../..").TOOL_MODEL_STATUS;
116
+ canUse: boolean;
117
+ unlockedBy: {
118
+ uuid: string;
119
+ name: string;
120
+ } | null;
121
+ supportsImageAttachment: boolean;
122
+ maxPromptLength: number;
123
+ maxContextCharacters: number;
124
+ order: number;
125
+ }[];
126
+ maxFileAttachments: number;
127
+ maxImageUploadSize: number;
128
+ maxDocumentUploadSize: number;
129
+ maxTextUploadSize: number;
130
+ isAttachmentAvailable: true;
131
+ };
132
+ }, {
133
+ data: {
134
+ models: {
135
+ uuid: string;
136
+ title: string;
137
+ model: string;
138
+ description: string;
139
+ status: import("../..").TOOL_MODEL_STATUS;
140
+ canUse: boolean;
141
+ unlockedBy: {
142
+ uuid: string;
143
+ name: string;
144
+ } | null;
145
+ supportsImageAttachment: boolean;
146
+ maxPromptLength: number;
147
+ maxContextCharacters: number;
148
+ order: number;
149
+ }[];
150
+ maxFileAttachments: number;
151
+ maxImageUploadSize: number;
152
+ maxDocumentUploadSize: number;
153
+ maxTextUploadSize: number;
154
+ isAttachmentAvailable: true;
155
+ };
156
+ }>;
157
+ type Response = z.infer<typeof ResponseSchema>;
158
+ }
159
+ export declare namespace FindTextChatsCommand {
160
+ const RequestQuerySchema: z.ZodObject<{
161
+ limit: z.ZodDefault<z.ZodNumber>;
162
+ offset: z.ZodDefault<z.ZodNumber>;
163
+ search: z.ZodOptional<z.ZodString>;
164
+ }, "strip", z.ZodTypeAny, {
165
+ limit: number;
166
+ offset: number;
167
+ search?: string | undefined;
168
+ }, {
169
+ limit?: number | undefined;
170
+ offset?: number | undefined;
171
+ search?: string | undefined;
172
+ }>;
173
+ type RequestQuery = z.infer<typeof RequestQuerySchema>;
174
+ const ResponseSchema: z.ZodObject<{
175
+ data: z.ZodArray<z.ZodObject<{
176
+ uuid: z.ZodString;
177
+ title: z.ZodString;
178
+ categoryId: z.ZodNullable<z.ZodString>;
179
+ lastUsedAiModelId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
180
+ createdAt: z.ZodUnion<[z.ZodString, z.ZodDate]>;
181
+ updatedAt: z.ZodUnion<[z.ZodString, z.ZodDate]>;
182
+ }, "strip", z.ZodTypeAny, {
183
+ uuid: string;
184
+ title: string;
185
+ categoryId: string | null;
186
+ lastUsedAiModelId?: string | null | undefined;
187
+ createdAt: string | Date;
188
+ updatedAt: string | Date;
189
+ }, {
190
+ uuid: string;
191
+ title: string;
192
+ categoryId: string | null;
193
+ lastUsedAiModelId?: string | null | undefined;
194
+ createdAt: string | Date;
195
+ updatedAt: string | Date;
196
+ }>, "many">;
197
+ meta: z.ZodObject<{
198
+ limit: z.ZodNumber;
199
+ offset: z.ZodNumber;
200
+ total: z.ZodNumber;
201
+ }, "strip", z.ZodTypeAny, {
202
+ limit: number;
203
+ offset: number;
204
+ total: number;
205
+ }, {
206
+ limit: number;
207
+ offset: number;
208
+ total: number;
209
+ }>;
210
+ }, "strip", z.ZodTypeAny, {
211
+ data: {
212
+ uuid: string;
213
+ title: string;
214
+ categoryId: string | null;
215
+ lastUsedAiModelId?: string | null | undefined;
216
+ createdAt: string | Date;
217
+ updatedAt: string | Date;
218
+ }[];
219
+ meta: {
220
+ limit: number;
221
+ offset: number;
222
+ total: number;
223
+ };
224
+ }, {
225
+ data: {
226
+ uuid: string;
227
+ title: string;
228
+ categoryId: string | null;
229
+ lastUsedAiModelId?: string | null | undefined;
230
+ createdAt: string | Date;
231
+ updatedAt: string | Date;
232
+ }[];
233
+ meta: {
234
+ limit: number;
235
+ offset: number;
236
+ total: number;
237
+ };
238
+ }>;
239
+ type Response = z.infer<typeof ResponseSchema>;
240
+ }
241
+ export declare namespace GetTextChatCommand {
242
+ const RequestParamsSchema: z.ZodObject<{
243
+ uuid: z.ZodString;
244
+ }, "strip", z.ZodTypeAny, {
245
+ uuid: string;
246
+ }, {
247
+ uuid: string;
248
+ }>;
249
+ type RequestParams = z.infer<typeof RequestParamsSchema>;
250
+ const ResponseSchema: z.ZodObject<{
251
+ data: z.ZodObject<{
252
+ uuid: z.ZodString;
253
+ title: z.ZodString;
254
+ categoryId: z.ZodNullable<z.ZodString>;
255
+ lastUsedAiModelId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
256
+ createdAt: z.ZodUnion<[z.ZodString, z.ZodDate]>;
257
+ updatedAt: z.ZodUnion<[z.ZodString, z.ZodDate]>;
258
+ }, "strip", z.ZodTypeAny, {
259
+ uuid: string;
260
+ title: string;
261
+ categoryId: string | null;
262
+ lastUsedAiModelId?: string | null | undefined;
263
+ createdAt: string | Date;
264
+ updatedAt: string | Date;
265
+ }, {
266
+ uuid: string;
267
+ title: string;
268
+ categoryId: string | null;
269
+ lastUsedAiModelId?: string | null | undefined;
270
+ createdAt: string | Date;
271
+ updatedAt: string | Date;
272
+ }>;
273
+ }, "strip", z.ZodTypeAny, {
274
+ data: {
275
+ uuid: string;
276
+ title: string;
277
+ categoryId: string | null;
278
+ lastUsedAiModelId?: string | null | undefined;
279
+ createdAt: string | Date;
280
+ updatedAt: string | Date;
281
+ };
282
+ }, {
283
+ data: {
284
+ uuid: string;
285
+ title: string;
286
+ categoryId: string | null;
287
+ lastUsedAiModelId?: string | null | undefined;
288
+ createdAt: string | Date;
289
+ updatedAt: string | Date;
290
+ };
291
+ }>;
292
+ type Response = z.infer<typeof ResponseSchema>;
293
+ }
294
+ export declare namespace FindTextChatMessagesCommand {
295
+ const RequestParamsSchema: z.ZodObject<{
296
+ uuid: z.ZodString;
297
+ }, "strip", z.ZodTypeAny, {
298
+ uuid: string;
299
+ }, {
300
+ uuid: string;
301
+ }>;
302
+ type RequestParams = z.infer<typeof RequestParamsSchema>;
303
+ const RequestQuerySchema: z.ZodObject<{
304
+ limit: z.ZodDefault<z.ZodNumber>;
305
+ offset: z.ZodDefault<z.ZodNumber>;
306
+ }, "strip", z.ZodTypeAny, {
307
+ limit: number;
308
+ offset: number;
309
+ }, {
310
+ limit?: number | undefined;
311
+ offset?: number | undefined;
312
+ }>;
313
+ type RequestQuery = z.infer<typeof RequestQuerySchema>;
314
+ const ResponseSchema: z.ZodObject<{
315
+ data: z.ZodArray<z.ZodObject<{
316
+ uuid: z.ZodString;
317
+ chatId: z.ZodString;
318
+ role: z.ZodNativeEnum<typeof import("../..").TEXT_CHAT_MESSAGE_ROLE>;
319
+ status: z.ZodNativeEnum<typeof import("../..").TEXT_CHAT_MESSAGE_STATUS>;
320
+ text: z.ZodString;
321
+ modelId: z.ZodNullable<z.ZodString>;
322
+ files: z.ZodArray<z.ZodObject<{
323
+ uuid: z.ZodString;
324
+ name: z.ZodString;
325
+ key: z.ZodString;
326
+ url: z.ZodString;
327
+ mimeType: z.ZodString;
328
+ size: z.ZodNumber;
329
+ createdAt: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodDate]>>;
330
+ } & {
331
+ type: z.ZodEnum<[import("../..").FILE_TYPE.IMAGE, import("../..").FILE_TYPE.TEXT, import("../..").FILE_TYPE.DOCUMENT]>;
332
+ contentLength: z.ZodNullable<z.ZodNumber>;
333
+ }, "strip", z.ZodTypeAny, {
334
+ uuid: string;
335
+ name: string;
336
+ key: string;
337
+ url: string;
338
+ mimeType: string;
339
+ size: number;
340
+ createdAt?: string | Date | undefined;
341
+ type: import("../..").FILE_TYPE.IMAGE | import("../..").FILE_TYPE.TEXT | import("../..").FILE_TYPE.DOCUMENT;
342
+ contentLength: number | null;
343
+ }, {
344
+ uuid: string;
345
+ name: string;
346
+ key: string;
347
+ url: string;
348
+ mimeType: string;
349
+ size: number;
350
+ createdAt?: string | Date | undefined;
351
+ type: import("../..").FILE_TYPE.IMAGE | import("../..").FILE_TYPE.TEXT | import("../..").FILE_TYPE.DOCUMENT;
352
+ contentLength: number | null;
353
+ }>, "many">;
354
+ errorCode: z.ZodNullable<z.ZodNativeEnum<typeof import("../..").TEXT_CHAT_ERROR_CODE>>;
355
+ price: z.ZodNullable<z.ZodNumber>;
356
+ createdAt: z.ZodUnion<[z.ZodString, z.ZodDate]>;
357
+ }, "strip", z.ZodTypeAny, {
358
+ uuid: string;
359
+ chatId: string;
360
+ role: import("../..").TEXT_CHAT_MESSAGE_ROLE;
361
+ status: import("../..").TEXT_CHAT_MESSAGE_STATUS;
362
+ text: string;
363
+ modelId: string | null;
364
+ files: {
365
+ uuid: string;
366
+ name: string;
367
+ key: string;
368
+ url: string;
369
+ mimeType: string;
370
+ size: number;
371
+ createdAt?: string | Date | undefined;
372
+ type: import("../..").FILE_TYPE.IMAGE | import("../..").FILE_TYPE.TEXT | import("../..").FILE_TYPE.DOCUMENT;
373
+ contentLength: number | null;
374
+ }[];
375
+ errorCode: import("../..").TEXT_CHAT_ERROR_CODE | null;
376
+ price: number | null;
377
+ createdAt: string | Date;
378
+ }, {
379
+ uuid: string;
380
+ chatId: string;
381
+ role: import("../..").TEXT_CHAT_MESSAGE_ROLE;
382
+ status: import("../..").TEXT_CHAT_MESSAGE_STATUS;
383
+ text: string;
384
+ modelId: string | null;
385
+ files: {
386
+ uuid: string;
387
+ name: string;
388
+ key: string;
389
+ url: string;
390
+ mimeType: string;
391
+ size: number;
392
+ createdAt?: string | Date | undefined;
393
+ type: import("../..").FILE_TYPE.IMAGE | import("../..").FILE_TYPE.TEXT | import("../..").FILE_TYPE.DOCUMENT;
394
+ contentLength: number | null;
395
+ }[];
396
+ errorCode: import("../..").TEXT_CHAT_ERROR_CODE | null;
397
+ price: number | null;
398
+ createdAt: string | Date;
399
+ }>, "many">;
400
+ meta: z.ZodObject<{
401
+ limit: z.ZodNumber;
402
+ offset: z.ZodNumber;
403
+ total: z.ZodNumber;
404
+ }, "strip", z.ZodTypeAny, {
405
+ limit: number;
406
+ offset: number;
407
+ total: number;
408
+ }, {
409
+ limit: number;
410
+ offset: number;
411
+ total: number;
412
+ }>;
413
+ }, "strip", z.ZodTypeAny, {
414
+ data: {
415
+ uuid: string;
416
+ chatId: string;
417
+ role: import("../..").TEXT_CHAT_MESSAGE_ROLE;
418
+ status: import("../..").TEXT_CHAT_MESSAGE_STATUS;
419
+ text: string;
420
+ modelId: string | null;
421
+ files: {
422
+ uuid: string;
423
+ name: string;
424
+ key: string;
425
+ url: string;
426
+ mimeType: string;
427
+ size: number;
428
+ createdAt?: string | Date | undefined;
429
+ type: import("../..").FILE_TYPE.IMAGE | import("../..").FILE_TYPE.TEXT | import("../..").FILE_TYPE.DOCUMENT;
430
+ contentLength: number | null;
431
+ }[];
432
+ errorCode: import("../..").TEXT_CHAT_ERROR_CODE | null;
433
+ price: number | null;
434
+ createdAt: string | Date;
435
+ }[];
436
+ meta: {
437
+ limit: number;
438
+ offset: number;
439
+ total: number;
440
+ };
441
+ }, {
442
+ data: {
443
+ uuid: string;
444
+ chatId: string;
445
+ role: import("../..").TEXT_CHAT_MESSAGE_ROLE;
446
+ status: import("../..").TEXT_CHAT_MESSAGE_STATUS;
447
+ text: string;
448
+ modelId: string | null;
449
+ files: {
450
+ uuid: string;
451
+ name: string;
452
+ key: string;
453
+ url: string;
454
+ mimeType: string;
455
+ size: number;
456
+ createdAt?: string | Date | undefined;
457
+ type: import("../..").FILE_TYPE.IMAGE | import("../..").FILE_TYPE.TEXT | import("../..").FILE_TYPE.DOCUMENT;
458
+ contentLength: number | null;
459
+ }[];
460
+ errorCode: import("../..").TEXT_CHAT_ERROR_CODE | null;
461
+ price: number | null;
462
+ createdAt: string | Date;
463
+ }[];
464
+ meta: {
465
+ limit: number;
466
+ offset: number;
467
+ total: number;
468
+ };
469
+ }>;
470
+ type Response = z.infer<typeof ResponseSchema>;
471
+ }
472
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../queries/text-chat/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,cAAc,YAAY,CAAC;AAO3B,yBAAiB,wBAAwB,CAAC;IAC/B,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAA2C,CAAC;IACvE,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD;AAED,yBAAiB,oBAAoB,CAAC;IAC3B,MAAM,kBAAkB;;;;;;;;;;;;MAI7B,CAAC;IACH,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IACvD,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAOzB,CAAC;IACH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD;AAED,yBAAiB,kBAAkB,CAAC;IACzB,MAAM,mBAAmB;;;;;;MAAwC,CAAC;IACzE,KAAY,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;IACzD,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAAqC,CAAC;IACjE,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD;AAED,yBAAiB,2BAA2B,CAAC;IAClC,MAAM,mBAAmB;;;;;;MAAwC,CAAC;IACzE,KAAY,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;IACzD,MAAM,kBAAkB;;;;;;;;;MAG7B,CAAC;IACH,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IACvD,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAOzB,CAAC;IACH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -0,0 +1,61 @@
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
+ exports.FindTextChatMessagesCommand = exports.GetTextChatCommand = exports.FindTextChatsCommand = exports.GetTextChatConfigCommand = void 0;
18
+ const zod_1 = require("zod");
19
+ __exportStar(require("./category"), exports);
20
+ const text_chat_1 = require("../../models/text-chat");
21
+ var GetTextChatConfigCommand;
22
+ (function (GetTextChatConfigCommand) {
23
+ GetTextChatConfigCommand.ResponseSchema = zod_1.z.object({ data: text_chat_1.TextChatConfigSchema });
24
+ })(GetTextChatConfigCommand || (exports.GetTextChatConfigCommand = GetTextChatConfigCommand = {}));
25
+ var FindTextChatsCommand;
26
+ (function (FindTextChatsCommand) {
27
+ FindTextChatsCommand.RequestQuerySchema = zod_1.z.object({
28
+ limit: zod_1.z.coerce.number().int().min(1).max(100).default(20),
29
+ offset: zod_1.z.coerce.number().int().min(0).default(0),
30
+ search: zod_1.z.string().trim().max(200).optional(),
31
+ });
32
+ FindTextChatsCommand.ResponseSchema = zod_1.z.object({
33
+ data: zod_1.z.array(text_chat_1.TextChatSchema),
34
+ meta: zod_1.z.object({
35
+ limit: zod_1.z.number().int().positive(),
36
+ offset: zod_1.z.number().int().nonnegative(),
37
+ total: zod_1.z.number().int().nonnegative(),
38
+ }),
39
+ });
40
+ })(FindTextChatsCommand || (exports.FindTextChatsCommand = FindTextChatsCommand = {}));
41
+ var GetTextChatCommand;
42
+ (function (GetTextChatCommand) {
43
+ GetTextChatCommand.RequestParamsSchema = zod_1.z.object({ uuid: zod_1.z.string().uuid() });
44
+ GetTextChatCommand.ResponseSchema = zod_1.z.object({ data: text_chat_1.TextChatSchema });
45
+ })(GetTextChatCommand || (exports.GetTextChatCommand = GetTextChatCommand = {}));
46
+ var FindTextChatMessagesCommand;
47
+ (function (FindTextChatMessagesCommand) {
48
+ FindTextChatMessagesCommand.RequestParamsSchema = zod_1.z.object({ uuid: zod_1.z.string().uuid() });
49
+ FindTextChatMessagesCommand.RequestQuerySchema = zod_1.z.object({
50
+ limit: zod_1.z.coerce.number().int().min(1).max(100).default(50),
51
+ offset: zod_1.z.coerce.number().int().min(0).default(0),
52
+ });
53
+ FindTextChatMessagesCommand.ResponseSchema = zod_1.z.object({
54
+ data: zod_1.z.array(text_chat_1.TextChatMessageSchema),
55
+ meta: zod_1.z.object({
56
+ limit: zod_1.z.number().int().positive(),
57
+ offset: zod_1.z.number().int().nonnegative(),
58
+ total: zod_1.z.number().int().nonnegative(),
59
+ }),
60
+ });
61
+ })(FindTextChatMessagesCommand || (exports.FindTextChatMessagesCommand = FindTextChatMessagesCommand = {}));
@@ -11,6 +11,7 @@ export namespace ChangePasswordCommand {
11
11
  export const ResponseSchema = z.object({
12
12
  data: z.object({
13
13
  accessToken: z.string(),
14
+ refreshToken: z.string().optional(),
14
15
  }),
15
16
  });
16
17
 
@@ -8,3 +8,4 @@ export * from './verify-email.command';
8
8
  export * from './verify-email-retry.command';
9
9
  export * from './vk-login.command';
10
10
  export * from './yandex-login.command';
11
+ export * from './refresh.command';
@@ -11,6 +11,7 @@ export namespace LoginCommand {
11
11
  export const ResponseSchema = z.object({
12
12
  data: z.object({
13
13
  accessToken: z.string(),
14
+ refreshToken: z.string().optional(),
14
15
  }),
15
16
  });
16
17
  export type Response = z.infer<typeof ResponseSchema>;
@@ -0,0 +1,15 @@
1
+ import { z } from 'zod';
2
+
3
+ export namespace RefreshCommand {
4
+ export const RequestSchema = z.object({
5
+ refreshToken: z.string().min(1),
6
+ });
7
+ export type Request = z.infer<typeof RequestSchema>;
8
+
9
+ export const ResponseSchema = z.object({
10
+ data: z.object({
11
+ accessToken: z.string(),
12
+ }),
13
+ });
14
+ export type Response = z.infer<typeof ResponseSchema>;
15
+ }
@@ -14,6 +14,7 @@ export namespace RegisterCommand {
14
14
  export const ResponseSchema = z.object({
15
15
  data: z.object({
16
16
  accessToken: z.string(),
17
+ refreshToken: z.string().optional(),
17
18
  }),
18
19
  });
19
20
  export type Response = z.infer<typeof ResponseSchema>;
@@ -12,6 +12,7 @@ export namespace ResetPasswordCommand {
12
12
  export const ResponseSchema = z.object({
13
13
  data: z.object({
14
14
  accessToken: z.string(),
15
+ refreshToken: z.string().optional(),
15
16
  }),
16
17
  });
17
18
 
@@ -1,9 +1,10 @@
1
1
  import { z } from 'zod';
2
+ import { EmailInputSchema } from '../../models/user.schema';
2
3
 
3
4
  export namespace VerifyEmailCommand {
4
5
  export const RequestSchema = z.object({
5
6
  verifyTokenHash: z.string().min(6),
6
- email: z.string().email(),
7
+ email: EmailInputSchema,
7
8
  });
8
9
 
9
10
  export type Request = z.infer<typeof RequestSchema>;
@@ -15,6 +15,7 @@ export namespace VKLoginCommand {
15
15
  export const ResponseSchema = z.object({
16
16
  data: z.object({
17
17
  accessToken: z.string(),
18
+ refreshToken: z.string().optional(),
18
19
  }),
19
20
  });
20
21
  export type Response = z.infer<typeof ResponseSchema>;
@@ -13,6 +13,7 @@ export namespace YandexLoginCommand {
13
13
  export const ResponseSchema = z.object({
14
14
  data: z.object({
15
15
  accessToken: z.string(),
16
+ refreshToken: z.string().optional(),
16
17
  }),
17
18
  });
18
19
  export type Response = z.infer<typeof ResponseSchema>;