@purpleschool/gptbot 0.2.3 → 0.2.5

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 (33) hide show
  1. package/api/controllers/auth.ts +1 -0
  2. package/api/controllers/chat-private.ts +1 -0
  3. package/api/controllers/chat-public.ts +1 -0
  4. package/api/routes.ts +5 -0
  5. package/build/api/controllers/auth.js +1 -0
  6. package/build/api/controllers/chat-private.js +1 -0
  7. package/build/api/controllers/chat-public.js +1 -0
  8. package/build/api/routes.js +5 -0
  9. package/build/commands/auth/index.js +1 -0
  10. package/build/commands/auth/verify-email.command.js +17 -0
  11. package/build/commands/category/find-category.command.js +2 -4
  12. package/build/constants/category/enums/category-type.enum.js +9 -0
  13. package/build/constants/category/enums/index.js +17 -0
  14. package/build/constants/category/index.js +17 -0
  15. package/build/constants/domains/white-list.js +52 -8
  16. package/build/constants/errors/errors.js +5 -0
  17. package/build/constants/index.js +1 -0
  18. package/build/constants/user/enums/user-status.js +8 -0
  19. package/build/models/category.schema.js +2 -0
  20. package/build/models/user.schema.js +2 -0
  21. package/commands/auth/index.ts +1 -0
  22. package/commands/auth/verify-email.command.ts +18 -0
  23. package/commands/category/find-category.command.ts +2 -8
  24. package/constants/category/enums/category-type.enum.ts +5 -0
  25. package/constants/category/enums/index.ts +1 -0
  26. package/constants/category/index.ts +1 -0
  27. package/constants/domains/white-list.ts +52 -8
  28. package/constants/errors/errors.ts +5 -0
  29. package/constants/index.ts +1 -0
  30. package/constants/user/enums/user-status.ts +4 -0
  31. package/models/category.schema.ts +2 -0
  32. package/models/user.schema.ts +2 -0
  33. package/package.json +1 -1
@@ -6,4 +6,5 @@ export const AUTH_ROUTES = {
6
6
  CREATE_USER: 'create-user',
7
7
  RESTORE_PASSWORD: 'restore-password',
8
8
  RESET_PASSWORD: 'reset-password',
9
+ VERIFY_EMAIL: 'verify-email',
9
10
  } as const;
@@ -7,4 +7,5 @@ export const CHAT_PRIVATE_ROUTES = {
7
7
  GET_LAST_ACTIVE_CHAT: `last-active-chat`,
8
8
  GET_LIMIT: 'limits',
9
9
  CREATE_MESSAGE: (uuid: string) => `my/${uuid}/send`,
10
+ ARCHIVE: 'archive',
10
11
  } as const;
@@ -4,4 +4,5 @@ export const CHAT_PUBLIC_ROUTES = {
4
4
  FIND_BY_UUID: 'by/uuid',
5
5
  GET_MY: 'get/my',
6
6
  CREATE_MESSAGE: (uuid: string) => `my/${uuid}/send`,
7
+ CHECK_LIMIT: 'limits',
7
8
  } as const;
package/api/routes.ts CHANGED
@@ -9,9 +9,11 @@ export const REST_API = {
9
9
  CREATE_USER: `${ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.CREATE_USER}`,
10
10
  RESTORE_PASSWORD: `${ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.RESTORE_PASSWORD}`,
11
11
  RESET_PASSWORD: `${ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.RESET_PASSWORD}`,
12
+ VERIFY_EMAIL: `${ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.VERIFY_EMAIL}`,
12
13
  },
13
14
  USERS: {
14
15
  GET: `${ROOT}/${CONTROLLERS.USER_CONTROLLER}/${CONTROLLERS.USER_ROUTES.GET}`,
16
+ POST: `${ROOT}/${CONTROLLERS.USER_CONTROLLER}/${CONTROLLERS.USER_ROUTES.POST}`,
15
17
  },
16
18
  PAGE: {
17
19
  GET: `${ROOT}/${CONTROLLERS.PAGE_CONTROLLER}/${CONTROLLERS.PAGE_ROUTES.GET_ALL}`,
@@ -65,10 +67,13 @@ export const REST_API = {
65
67
  `${ROOT}/${CONTROLLERS.CHAT_PRIVATE_CONTROLLER(categoryId)}/${CONTROLLERS.CHAT_PRIVATE_ROUTES.CREATE_MESSAGE(uuid)}`,
66
68
  DELETE: (uuid: string, categoryId: string) =>
67
69
  `${ROOT}/${CONTROLLERS.CHAT_PRIVATE_CONTROLLER(categoryId)}/${uuid}`,
70
+ GET_LIMIT: `${ROOT}/${CONTROLLERS.CHAT_PRIVATE_CONTROLLER}/${CONTROLLERS.CHAT_PRIVATE_ROUTES.GET_LIMIT}`,
71
+ ARCHIVE: `${ROOT}/${CONTROLLERS.CHAT_PRIVATE_CONTROLLER}/${CONTROLLERS.CHAT_PRIVATE_ROUTES.ARCHIVE}`,
68
72
  },
69
73
  CHAT_PUBLIC: {
70
74
  CREATE_MESSAGE: (uuid: string, categoryId: string): string =>
71
75
  `${ROOT}/${CONTROLLERS.CHAT_PUBLIC_CONTROLLER(categoryId)}/${CONTROLLERS.CHAT_PUBLIC_ROUTES.CREATE_MESSAGE(uuid)}`,
76
+ CHECK_LIMIT: `${ROOT}/${CONTROLLERS.CHAT_PUBLIC_CONTROLLER}/${CONTROLLERS.CHAT_PUBLIC_ROUTES.CHECK_LIMIT}`,
72
77
  },
73
78
  PRODUCT: {
74
79
  GET: `${ROOT}/${CONTROLLERS.PRODUCT_CONTROLLER}/${CONTROLLERS.PRODUCT_ROUTES.GET_ALL}`,
@@ -8,4 +8,5 @@ exports.AUTH_ROUTES = {
8
8
  CREATE_USER: 'create-user',
9
9
  RESTORE_PASSWORD: 'restore-password',
10
10
  RESET_PASSWORD: 'reset-password',
11
+ VERIFY_EMAIL: 'verify-email',
11
12
  };
@@ -9,4 +9,5 @@ exports.CHAT_PRIVATE_ROUTES = {
9
9
  GET_LAST_ACTIVE_CHAT: `last-active-chat`,
10
10
  GET_LIMIT: 'limits',
11
11
  CREATE_MESSAGE: (uuid) => `my/${uuid}/send`,
12
+ ARCHIVE: 'archive',
12
13
  };
@@ -7,4 +7,5 @@ exports.CHAT_PUBLIC_ROUTES = {
7
7
  FIND_BY_UUID: 'by/uuid',
8
8
  GET_MY: 'get/my',
9
9
  CREATE_MESSAGE: (uuid) => `my/${uuid}/send`,
10
+ CHECK_LIMIT: 'limits',
10
11
  };
@@ -33,9 +33,11 @@ exports.REST_API = {
33
33
  CREATE_USER: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.CREATE_USER}`,
34
34
  RESTORE_PASSWORD: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.RESTORE_PASSWORD}`,
35
35
  RESET_PASSWORD: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.RESET_PASSWORD}`,
36
+ VERIFY_EMAIL: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.VERIFY_EMAIL}`,
36
37
  },
37
38
  USERS: {
38
39
  GET: `${exports.ROOT}/${CONTROLLERS.USER_CONTROLLER}/${CONTROLLERS.USER_ROUTES.GET}`,
40
+ POST: `${exports.ROOT}/${CONTROLLERS.USER_CONTROLLER}/${CONTROLLERS.USER_ROUTES.POST}`,
39
41
  },
40
42
  PAGE: {
41
43
  GET: `${exports.ROOT}/${CONTROLLERS.PAGE_CONTROLLER}/${CONTROLLERS.PAGE_ROUTES.GET_ALL}`,
@@ -79,9 +81,12 @@ exports.REST_API = {
79
81
  PUT_LAST_CHAT: (categoryId) => `${exports.ROOT}/${CONTROLLERS.CHAT_PRIVATE_CONTROLLER(categoryId)}/${CONTROLLERS.CHAT_PRIVATE_ROUTES.GET_LAST_ACTIVE_CHAT}`,
80
82
  CREATE_MESSAGE: (uuid, categoryId) => `${exports.ROOT}/${CONTROLLERS.CHAT_PRIVATE_CONTROLLER(categoryId)}/${CONTROLLERS.CHAT_PRIVATE_ROUTES.CREATE_MESSAGE(uuid)}`,
81
83
  DELETE: (uuid, categoryId) => `${exports.ROOT}/${CONTROLLERS.CHAT_PRIVATE_CONTROLLER(categoryId)}/${uuid}`,
84
+ GET_LIMIT: `${exports.ROOT}/${CONTROLLERS.CHAT_PRIVATE_CONTROLLER}/${CONTROLLERS.CHAT_PRIVATE_ROUTES.GET_LIMIT}`,
85
+ ARCHIVE: `${exports.ROOT}/${CONTROLLERS.CHAT_PRIVATE_CONTROLLER}/${CONTROLLERS.CHAT_PRIVATE_ROUTES.ARCHIVE}`,
82
86
  },
83
87
  CHAT_PUBLIC: {
84
88
  CREATE_MESSAGE: (uuid, categoryId) => `${exports.ROOT}/${CONTROLLERS.CHAT_PUBLIC_CONTROLLER(categoryId)}/${CONTROLLERS.CHAT_PUBLIC_ROUTES.CREATE_MESSAGE(uuid)}`,
89
+ CHECK_LIMIT: `${exports.ROOT}/${CONTROLLERS.CHAT_PUBLIC_CONTROLLER}/${CONTROLLERS.CHAT_PUBLIC_ROUTES.CHECK_LIMIT}`,
85
90
  },
86
91
  PRODUCT: {
87
92
  GET: `${exports.ROOT}/${CONTROLLERS.PRODUCT_CONTROLLER}/${CONTROLLERS.PRODUCT_ROUTES.GET_ALL}`,
@@ -19,3 +19,4 @@ __exportStar(require("./restore-password.command"), exports);
19
19
  __exportStar(require("./login.command"), exports);
20
20
  __exportStar(require("./register-user.command"), exports);
21
21
  __exportStar(require("./create-user.command"), exports);
22
+ __exportStar(require("./verify-email.command"), exports);
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VerifyEmailCommand = void 0;
4
+ const models_1 = require("../../models");
5
+ const zod_1 = require("zod");
6
+ var VerifyEmailCommand;
7
+ (function (VerifyEmailCommand) {
8
+ VerifyEmailCommand.RequestSchema = models_1.UserSchema.pick({
9
+ verifyTokenHash: true,
10
+ email: true,
11
+ });
12
+ VerifyEmailCommand.ResponseSchema = zod_1.z.object({
13
+ data: zod_1.z.object({
14
+ isSuccess: zod_1.z.boolean(),
15
+ }),
16
+ });
17
+ })(VerifyEmailCommand || (exports.VerifyEmailCommand = VerifyEmailCommand = {}));
@@ -12,20 +12,18 @@ var FindCategoryCommand;
12
12
  FindCategoryCommand.ResponseSchema = zod_1.z.object({
13
13
  data: zod_1.z.array(models_1.CategorySchema),
14
14
  });
15
- FindCategoryCommand.RequestByFormattedSchema = zod_1.z.object({
16
- type: zod_1.z.enum(['short', 'long']),
17
- });
18
15
  FindCategoryCommand.RequestByFilterSchema = zod_1.z.object({
19
16
  type: zod_1.z.enum(['child', 'parent']),
20
17
  });
21
18
  FindCategoryCommand.ResponseByFormattedSchema = zod_1.z.object({
22
- data: zod_1.z.array(models_1.CategorySchema.extend({
19
+ categories: zod_1.z.array(models_1.CategorySchema.extend({
23
20
  subCategories: zod_1.z.array(models_1.CategorySchema.extend({
24
21
  page: zod_1.z.nullable(models_2.PageSchema.pick({
25
22
  alias: true,
26
23
  })),
27
24
  })),
28
25
  })),
26
+ systemCategory: zod_1.z.nullable(models_1.CategorySchema),
29
27
  });
30
28
  FindCategoryCommand.ResponseByUUIDSchema = zod_1.z.object({
31
29
  data: models_1.CategorySchema,
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CATEGORY_TYPE = void 0;
4
+ var CATEGORY_TYPE;
5
+ (function (CATEGORY_TYPE) {
6
+ CATEGORY_TYPE["SUB"] = "sub";
7
+ CATEGORY_TYPE["MAIN"] = "main";
8
+ CATEGORY_TYPE["SYSTEM"] = "system";
9
+ })(CATEGORY_TYPE || (exports.CATEGORY_TYPE = CATEGORY_TYPE = {}));
@@ -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("./category-type.enum"), exports);
@@ -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("./enums"), exports);
@@ -1,11 +1,55 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.WHITE_LIST = void 0;
4
- exports.WHITE_LIST = ['mail.ru', 'yandex.ru', 'gmail.com', 'rambler.ru', 'bk.ru', 'inbox.ru', 'list.ru',
5
- 'ya.ru', 'hotmail.com', 'outlook.com', 'msn.com', 'live.com', 'qip.ru', 'pochta.ru',
6
- 'icloud.com', 'mail.com', 'tut.by', 'ukr.net', 'e1.ru', 'online.ua', 'bigmir.net',
7
- 'meta.ua', 'me.com', 'yandex.com', 'yandex.kz', 'mail.ua', 'protonmail.com',
8
- 'zoho.com', 'gmx.com', 'web.de', 'aol.com', 'gmx.net', 'yandex.by', 'live.ru',
9
- 'inbox.lv', 'mail.kz', 'outlook.ru', 'yandex.ua', 'email.com', 'fastmail.com',
10
- 'hinet.net', 'zohomail.com', 'tut.net', 'yahoo.com', 'rocketmail.com', 'live.fr',
11
- 'yahoo.co.jp', 'rediffmail.com', 'ymail.com', 'hushmail.com'];
4
+ exports.WHITE_LIST = [
5
+ 'mail.ru',
6
+ 'yandex.ru',
7
+ 'gmail.com',
8
+ 'rambler.ru',
9
+ 'bk.ru',
10
+ 'inbox.ru',
11
+ 'list.ru',
12
+ 'ya.ru',
13
+ 'hotmail.com',
14
+ 'outlook.com',
15
+ 'msn.com',
16
+ 'live.com',
17
+ 'qip.ru',
18
+ 'pochta.ru',
19
+ 'icloud.com',
20
+ 'mail.com',
21
+ 'tut.by',
22
+ 'ukr.net',
23
+ 'e1.ru',
24
+ 'online.ua',
25
+ 'bigmir.net',
26
+ 'meta.ua',
27
+ 'me.com',
28
+ 'yandex.com',
29
+ 'yandex.kz',
30
+ 'mail.ua',
31
+ 'protonmail.com',
32
+ 'zoho.com',
33
+ 'gmx.com',
34
+ 'web.de',
35
+ 'aol.com',
36
+ 'gmx.net',
37
+ 'yandex.by',
38
+ 'live.ru',
39
+ 'inbox.lv',
40
+ 'mail.kz',
41
+ 'outlook.ru',
42
+ 'yandex.ua',
43
+ 'email.com',
44
+ 'fastmail.com',
45
+ 'hinet.net',
46
+ 'zohomail.com',
47
+ 'tut.net',
48
+ 'yahoo.com',
49
+ 'rocketmail.com',
50
+ 'live.fr',
51
+ 'yahoo.co.jp',
52
+ 'rediffmail.com',
53
+ 'ymail.com',
54
+ 'hushmail.com',
55
+ ];
@@ -400,4 +400,9 @@ exports.ERRORS = {
400
400
  message: 'Не удалось получить количество сообщений',
401
401
  httpCode: 500,
402
402
  },
403
+ VERIFY_EMAIL: {
404
+ code: 'A097',
405
+ message: 'Не удалось подтвердить почту',
406
+ httpCode: 500,
407
+ },
403
408
  };
@@ -21,3 +21,4 @@ __exportStar(require("./order"), exports);
21
21
  __exportStar(require("./chat"), exports);
22
22
  __exportStar(require("./subscription"), exports);
23
23
  __exportStar(require("./product"), exports);
24
+ __exportStar(require("./category"), exports);
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.USER_STATUS = void 0;
4
+ var USER_STATUS;
5
+ (function (USER_STATUS) {
6
+ USER_STATUS["ACTIVE"] = "active";
7
+ USER_STATUS["INACTIVE"] = "inactive";
8
+ })(USER_STATUS || (exports.USER_STATUS = USER_STATUS = {}));
@@ -6,6 +6,8 @@ exports.CategorySchema = zod_1.z.object({
6
6
  uuid: zod_1.z.string().uuid(),
7
7
  mainCategoryId: zod_1.z.nullable(zod_1.z.string().uuid()),
8
8
  name: zod_1.z.string().min(3).max(16384),
9
+ type: zod_1.z.string(),
10
+ order: zod_1.z.number().min(0),
9
11
  prompt: zod_1.z.string().min(3).max(16384),
10
12
  placeholder: zod_1.z.nullable(zod_1.z.string()),
11
13
  seoName: zod_1.z.string().min(3).max(16384),
@@ -6,6 +6,8 @@ exports.UserSchema = zod_1.z.object({
6
6
  uuid: zod_1.z.string().uuid(),
7
7
  email: zod_1.z.string().email(),
8
8
  ip: zod_1.z.string(),
9
+ status: zod_1.z.string(),
10
+ verifyTokenHash: zod_1.z.string(),
9
11
  password: zod_1.z.string(),
10
12
  passwordHash: zod_1.z.string(),
11
13
  restoreTokenHash: zod_1.z.string(),
@@ -3,3 +3,4 @@ export * from './restore-password.command';
3
3
  export * from './login.command';
4
4
  export * from './register-user.command';
5
5
  export * from './create-user.command';
6
+ export * from './verify-email.command';
@@ -0,0 +1,18 @@
1
+ import { UserSchema } from '../../models';
2
+ import { z } from 'zod';
3
+
4
+ export namespace VerifyEmailCommand {
5
+ export const RequestSchema = UserSchema.pick({
6
+ verifyTokenHash: true,
7
+ email: true,
8
+ });
9
+
10
+ export type Request = z.infer<typeof RequestSchema>;
11
+
12
+ export const ResponseSchema = z.object({
13
+ data: z.object({
14
+ isSuccess: z.boolean(),
15
+ }),
16
+ });
17
+ export type Response = z.infer<typeof ResponseSchema>;
18
+ }
@@ -12,17 +12,12 @@ export namespace FindCategoryCommand {
12
12
  export const ResponseSchema = z.object({
13
13
  data: z.array(CategorySchema),
14
14
  });
15
-
16
- export const RequestByFormattedSchema = z.object({
17
- type: z.enum(['short', 'long']),
18
- });
19
-
20
15
  export const RequestByFilterSchema = z.object({
21
16
  type: z.enum(['child', 'parent']),
22
17
  });
23
18
 
24
19
  export const ResponseByFormattedSchema = z.object({
25
- data: z.array(
20
+ categories: z.array(
26
21
  CategorySchema.extend({
27
22
  subCategories: z.array(
28
23
  CategorySchema.extend({
@@ -35,10 +30,9 @@ export namespace FindCategoryCommand {
35
30
  ),
36
31
  }),
37
32
  ),
33
+ systemCategory: z.nullable(CategorySchema),
38
34
  });
39
35
 
40
- export type ResponseByFormatted = z.infer<typeof ResponseByFormattedSchema>;
41
-
42
36
  export type Response = z.infer<typeof ResponseSchema>;
43
37
 
44
38
  export const ResponseByUUIDSchema = z.object({
@@ -0,0 +1,5 @@
1
+ export enum CATEGORY_TYPE {
2
+ SUB = 'sub',
3
+ MAIN = 'main',
4
+ SYSTEM = 'system',
5
+ }
@@ -0,0 +1 @@
1
+ export * from './category-type.enum';
@@ -0,0 +1 @@
1
+ export * from './enums';
@@ -1,8 +1,52 @@
1
- export const WHITE_LIST = ['mail.ru', 'yandex.ru', 'gmail.com', 'rambler.ru', 'bk.ru', 'inbox.ru', 'list.ru',
2
- 'ya.ru', 'hotmail.com', 'outlook.com', 'msn.com', 'live.com', 'qip.ru', 'pochta.ru',
3
- 'icloud.com', 'mail.com', 'tut.by', 'ukr.net', 'e1.ru', 'online.ua', 'bigmir.net',
4
- 'meta.ua', 'me.com', 'yandex.com', 'yandex.kz', 'mail.ua', 'protonmail.com',
5
- 'zoho.com', 'gmx.com', 'web.de', 'aol.com', 'gmx.net', 'yandex.by', 'live.ru',
6
- 'inbox.lv', 'mail.kz', 'outlook.ru', 'yandex.ua', 'email.com', 'fastmail.com',
7
- 'hinet.net', 'zohomail.com', 'tut.net', 'yahoo.com', 'rocketmail.com', 'live.fr',
8
- 'yahoo.co.jp', 'rediffmail.com', 'ymail.com', 'hushmail.com'];
1
+ export const WHITE_LIST = [
2
+ 'mail.ru',
3
+ 'yandex.ru',
4
+ 'gmail.com',
5
+ 'rambler.ru',
6
+ 'bk.ru',
7
+ 'inbox.ru',
8
+ 'list.ru',
9
+ 'ya.ru',
10
+ 'hotmail.com',
11
+ 'outlook.com',
12
+ 'msn.com',
13
+ 'live.com',
14
+ 'qip.ru',
15
+ 'pochta.ru',
16
+ 'icloud.com',
17
+ 'mail.com',
18
+ 'tut.by',
19
+ 'ukr.net',
20
+ 'e1.ru',
21
+ 'online.ua',
22
+ 'bigmir.net',
23
+ 'meta.ua',
24
+ 'me.com',
25
+ 'yandex.com',
26
+ 'yandex.kz',
27
+ 'mail.ua',
28
+ 'protonmail.com',
29
+ 'zoho.com',
30
+ 'gmx.com',
31
+ 'web.de',
32
+ 'aol.com',
33
+ 'gmx.net',
34
+ 'yandex.by',
35
+ 'live.ru',
36
+ 'inbox.lv',
37
+ 'mail.kz',
38
+ 'outlook.ru',
39
+ 'yandex.ua',
40
+ 'email.com',
41
+ 'fastmail.com',
42
+ 'hinet.net',
43
+ 'zohomail.com',
44
+ 'tut.net',
45
+ 'yahoo.com',
46
+ 'rocketmail.com',
47
+ 'live.fr',
48
+ 'yahoo.co.jp',
49
+ 'rediffmail.com',
50
+ 'ymail.com',
51
+ 'hushmail.com',
52
+ ];
@@ -399,4 +399,9 @@ export const ERRORS = {
399
399
  message: 'Не удалось получить количество сообщений',
400
400
  httpCode: 500,
401
401
  },
402
+ VERIFY_EMAIL: {
403
+ code: 'A097',
404
+ message: 'Не удалось подтвердить почту',
405
+ httpCode: 500,
406
+ },
402
407
  };
@@ -5,3 +5,4 @@ export * from './order';
5
5
  export * from './chat';
6
6
  export * from './subscription';
7
7
  export * from './product';
8
+ export * from './category';
@@ -0,0 +1,4 @@
1
+ export enum USER_STATUS {
2
+ ACTIVE = 'active',
3
+ INACTIVE = 'inactive',
4
+ }
@@ -4,6 +4,8 @@ export const CategorySchema = z.object({
4
4
  uuid: z.string().uuid(),
5
5
  mainCategoryId: z.nullable(z.string().uuid()),
6
6
  name: z.string().min(3).max(16384),
7
+ type: z.string(),
8
+ order: z.number().min(0),
7
9
  prompt: z.string().min(3).max(16384),
8
10
  placeholder: z.nullable(z.string()),
9
11
  seoName: z.string().min(3).max(16384),
@@ -4,6 +4,8 @@ export const UserSchema = z.object({
4
4
  uuid: z.string().uuid(),
5
5
  email: z.string().email(),
6
6
  ip: z.string(),
7
+ status: z.string(),
8
+ verifyTokenHash: z.string(),
7
9
  password: z.string(),
8
10
  passwordHash: z.string(),
9
11
  restoreTokenHash: z.string(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {