@veruna/api-contracts 1.0.13 → 1.0.15

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 (118) hide show
  1. package/build/controllers/index.d.ts +1 -0
  2. package/build/controllers/index.js +4 -1
  3. package/build/controllers/seo-pages.controllers.d.ts +5 -0
  4. package/build/controllers/seo-pages.controllers.js +8 -0
  5. package/build/index.d.ts +3 -1
  6. package/build/index.js +3 -1
  7. package/build/locales/en.d.ts +5 -0
  8. package/build/locales/en.js +6 -0
  9. package/build/locales/index.d.ts +10 -0
  10. package/build/locales/ru.d.ts +5 -0
  11. package/build/locales/ru.js +6 -0
  12. package/build/rest-api.d.ts +12 -0
  13. package/build/rest-api.js +13 -0
  14. package/build/routes/index.d.ts +2 -0
  15. package/build/routes/index.js +5 -1
  16. package/build/routes/seo-pages-admin.routes.d.ts +10 -0
  17. package/build/routes/seo-pages-admin.routes.js +13 -0
  18. package/build/routes/seo-pages-public.routes.d.ts +6 -0
  19. package/build/routes/seo-pages-public.routes.js +9 -0
  20. package/build/shared/common.errors.d.ts +8 -0
  21. package/build/shared/common.errors.js +28 -0
  22. package/build/shared/device-type.enum.d.ts +11 -0
  23. package/build/shared/device-type.enum.js +15 -0
  24. package/build/shared/error-metadata.d.ts +9 -0
  25. package/build/shared/index.d.ts +4 -0
  26. package/build/shared/index.js +4 -0
  27. package/build/v1/auth/auth.errors.d.ts +4 -1
  28. package/build/v1/auth/auth.errors.js +30 -1
  29. package/build/v1/auth/commands/signin.command.d.ts +2 -0
  30. package/build/v1/auth/commands/signup.command.d.ts +2 -0
  31. package/build/v1/auth/commands/signup.command.js +4 -4
  32. package/build/v1/auth/index.d.ts +0 -2
  33. package/build/v1/auth/index.js +0 -2
  34. package/build/v1/auth/queries/get-sessions.query.d.ts +2 -0
  35. package/build/v1/auth/schemas/auth-response.schema.d.ts +4 -0
  36. package/build/v1/auth/schemas/session-response.schema.d.ts +3 -0
  37. package/build/v1/auth/schemas/session-response.schema.js +6 -4
  38. package/build/v1/blog/blog.errors.d.ts +18 -0
  39. package/build/v1/blog/blog.errors.js +84 -0
  40. package/build/v1/blog/index.d.ts +1 -2
  41. package/build/v1/blog/index.js +1 -2
  42. package/build/v1/blog/schemas/create-category-request.schema.js +3 -3
  43. package/build/v1/blog/schemas/create-post-request.schema.js +4 -4
  44. package/build/v1/email/email.errors.d.ts +15 -0
  45. package/build/v1/email/email.errors.js +63 -0
  46. package/build/v1/email/index.d.ts +1 -0
  47. package/build/v1/email/index.js +17 -0
  48. package/build/v1/index.d.ts +3 -0
  49. package/build/v1/index.js +3 -0
  50. package/build/v1/notifications/index.d.ts +2 -0
  51. package/build/v1/notifications/index.js +18 -0
  52. package/build/v1/notifications/notifications.errors.d.ts +26 -0
  53. package/build/v1/notifications/notifications.errors.js +101 -0
  54. package/build/v1/notifications/schemas/email-template.enum.d.ts +12 -0
  55. package/build/v1/notifications/schemas/email-template.enum.js +20 -0
  56. package/build/v1/notifications/schemas/index.d.ts +3 -0
  57. package/build/v1/notifications/schemas/index.js +19 -0
  58. package/build/v1/notifications/schemas/notification-status.enum.d.ts +11 -0
  59. package/build/v1/notifications/schemas/notification-status.enum.js +15 -0
  60. package/build/v1/notifications/schemas/notification-type.enum.d.ts +8 -0
  61. package/build/v1/notifications/schemas/notification-type.enum.js +14 -0
  62. package/build/v1/seo-pages/admin/commands/create-page.command.d.ts +29 -0
  63. package/build/v1/seo-pages/admin/commands/create-page.command.js +13 -0
  64. package/build/v1/seo-pages/admin/commands/delete-page.command.d.ts +12 -0
  65. package/build/v1/seo-pages/admin/commands/delete-page.command.js +13 -0
  66. package/build/v1/seo-pages/admin/commands/index.d.ts +6 -0
  67. package/build/v1/seo-pages/admin/commands/index.js +12 -0
  68. package/build/v1/seo-pages/admin/commands/update-page.command.d.ts +29 -0
  69. package/build/v1/seo-pages/admin/commands/update-page.command.js +13 -0
  70. package/build/v1/seo-pages/admin/queries/get-page.query.d.ts +21 -0
  71. package/build/v1/seo-pages/admin/queries/get-page.query.js +14 -0
  72. package/build/v1/seo-pages/admin/queries/get-pages.query.d.ts +34 -0
  73. package/build/v1/seo-pages/admin/queries/get-pages.query.js +19 -0
  74. package/build/v1/seo-pages/admin/queries/index.d.ts +5 -0
  75. package/build/v1/seo-pages/admin/queries/index.js +10 -0
  76. package/build/v1/seo-pages/index.d.ts +8 -0
  77. package/build/v1/seo-pages/index.js +32 -0
  78. package/build/v1/seo-pages/public/queries/get-page-by-alias.query.d.ts +21 -0
  79. package/build/v1/seo-pages/public/queries/get-page-by-alias.query.js +14 -0
  80. package/build/v1/seo-pages/public/queries/index.d.ts +4 -0
  81. package/build/v1/seo-pages/public/queries/index.js +8 -0
  82. package/build/v1/seo-pages/schemas/create-page-request.schema.d.ts +14 -0
  83. package/build/v1/seo-pages/schemas/create-page-request.schema.js +18 -0
  84. package/build/v1/seo-pages/schemas/index.d.ts +7 -0
  85. package/build/v1/seo-pages/schemas/index.js +14 -0
  86. package/build/v1/seo-pages/schemas/page-response.schema.d.ts +17 -0
  87. package/build/v1/seo-pages/schemas/page-response.schema.js +21 -0
  88. package/build/v1/seo-pages/schemas/page-type.enum.d.ts +8 -0
  89. package/build/v1/seo-pages/schemas/page-type.enum.js +12 -0
  90. package/build/v1/seo-pages/schemas/update-page-request.schema.d.ts +14 -0
  91. package/build/v1/seo-pages/schemas/update-page-request.schema.js +18 -0
  92. package/build/v1/seo-pages/seo-pages.errors.d.ts +11 -0
  93. package/build/v1/seo-pages/seo-pages.errors.js +43 -0
  94. package/build/v1/unregistered-users/index.d.ts +1 -5
  95. package/build/v1/unregistered-users/index.js +1 -9
  96. package/build/v1/unregistered-users/unregistered-users.errors.d.ts +8 -9
  97. package/build/v1/unregistered-users/unregistered-users.errors.js +18 -9
  98. package/build/v1/users/index.d.ts +1 -2
  99. package/build/v1/users/index.js +1 -2
  100. package/build/v1/users/users.errors.d.ts +18 -0
  101. package/build/v1/users/users.errors.js +51 -0
  102. package/package.json +1 -1
  103. package/build/v1/auth/auth.paths.d.ts +0 -17
  104. package/build/v1/auth/auth.paths.js +0 -20
  105. package/build/v1/auth/auth.types.d.ts +0 -8
  106. package/build/v1/auth/auth.types.js +0 -6
  107. package/build/v1/blog/blog.paths.d.ts +0 -36
  108. package/build/v1/blog/blog.paths.js +0 -47
  109. package/build/v1/blog/blog.types.d.ts +0 -12
  110. package/build/v1/blog/blog.types.js +0 -7
  111. package/build/v1/unregistered-users/unregistered-users.paths.d.ts +0 -15
  112. package/build/v1/unregistered-users/unregistered-users.paths.js +0 -18
  113. package/build/v1/unregistered-users/unregistered-users.types.d.ts +0 -9
  114. package/build/v1/unregistered-users/unregistered-users.types.js +0 -8
  115. package/build/v1/users/users.paths.d.ts +0 -11
  116. package/build/v1/users/users.paths.js +0 -14
  117. package/build/v1/users/users.types.d.ts +0 -11
  118. /package/build/{v1/users/users.types.js → shared/error-metadata.js} +0 -0
@@ -5,3 +5,4 @@ export { AUTH_CONTROLLER } from './auth.controllers';
5
5
  export { USERS_CONTROLLER } from './users.controllers';
6
6
  export { UNREG_USERS_CONTROLLER } from './unreg-users.controllers';
7
7
  export { BLOG_ADMIN_CATEGORIES_CONTROLLER, BLOG_ADMIN_POSTS_CONTROLLER, BLOG_PUBLIC_CATEGORIES_CONTROLLER, BLOG_PUBLIC_POSTS_CONTROLLER, } from './blog.controllers';
8
+ export { SEO_PAGES_ADMIN_CONTROLLER, SEO_PAGES_PUBLIC_CONTROLLER, } from './seo-pages.controllers';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BLOG_PUBLIC_POSTS_CONTROLLER = exports.BLOG_PUBLIC_CATEGORIES_CONTROLLER = exports.BLOG_ADMIN_POSTS_CONTROLLER = exports.BLOG_ADMIN_CATEGORIES_CONTROLLER = exports.UNREG_USERS_CONTROLLER = exports.USERS_CONTROLLER = exports.AUTH_CONTROLLER = void 0;
3
+ exports.SEO_PAGES_PUBLIC_CONTROLLER = exports.SEO_PAGES_ADMIN_CONTROLLER = exports.BLOG_PUBLIC_POSTS_CONTROLLER = exports.BLOG_PUBLIC_CATEGORIES_CONTROLLER = exports.BLOG_ADMIN_POSTS_CONTROLLER = exports.BLOG_ADMIN_CATEGORIES_CONTROLLER = exports.UNREG_USERS_CONTROLLER = exports.USERS_CONTROLLER = exports.AUTH_CONTROLLER = void 0;
4
4
  /**
5
5
  * Centralized exports for all controllers
6
6
  */
@@ -15,3 +15,6 @@ Object.defineProperty(exports, "BLOG_ADMIN_CATEGORIES_CONTROLLER", { enumerable:
15
15
  Object.defineProperty(exports, "BLOG_ADMIN_POSTS_CONTROLLER", { enumerable: true, get: function () { return blog_controllers_1.BLOG_ADMIN_POSTS_CONTROLLER; } });
16
16
  Object.defineProperty(exports, "BLOG_PUBLIC_CATEGORIES_CONTROLLER", { enumerable: true, get: function () { return blog_controllers_1.BLOG_PUBLIC_CATEGORIES_CONTROLLER; } });
17
17
  Object.defineProperty(exports, "BLOG_PUBLIC_POSTS_CONTROLLER", { enumerable: true, get: function () { return blog_controllers_1.BLOG_PUBLIC_POSTS_CONTROLLER; } });
18
+ var seo_pages_controllers_1 = require("./seo-pages.controllers");
19
+ Object.defineProperty(exports, "SEO_PAGES_ADMIN_CONTROLLER", { enumerable: true, get: function () { return seo_pages_controllers_1.SEO_PAGES_ADMIN_CONTROLLER; } });
20
+ Object.defineProperty(exports, "SEO_PAGES_PUBLIC_CONTROLLER", { enumerable: true, get: function () { return seo_pages_controllers_1.SEO_PAGES_PUBLIC_CONTROLLER; } });
@@ -0,0 +1,5 @@
1
+ /**
2
+ * SEO Pages Controller paths for NestJS @Controller decorator
3
+ */
4
+ export declare const SEO_PAGES_ADMIN_CONTROLLER: "v1/admin/seo-pages";
5
+ export declare const SEO_PAGES_PUBLIC_CONTROLLER: "v1/seo-pages";
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SEO_PAGES_PUBLIC_CONTROLLER = exports.SEO_PAGES_ADMIN_CONTROLLER = void 0;
4
+ /**
5
+ * SEO Pages Controller paths for NestJS @Controller decorator
6
+ */
7
+ exports.SEO_PAGES_ADMIN_CONTROLLER = 'v1/admin/seo-pages';
8
+ exports.SEO_PAGES_PUBLIC_CONTROLLER = 'v1/seo-pages';
package/build/index.d.ts CHANGED
@@ -1,5 +1,7 @@
1
- export * from './shared';
2
1
  export * from './v1';
3
2
  export * from './locales';
4
3
  export * from './utils';
5
4
  export * from './rest-api';
5
+ export * from './routes';
6
+ export * from './controllers';
7
+ export * from './shared';
package/build/index.js CHANGED
@@ -15,8 +15,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  // Export all contracts
18
- __exportStar(require("./shared"), exports);
19
18
  __exportStar(require("./v1"), exports);
20
19
  __exportStar(require("./locales"), exports);
21
20
  __exportStar(require("./utils"), exports);
22
21
  __exportStar(require("./rest-api"), exports);
22
+ __exportStar(require("./routes"), exports);
23
+ __exportStar(require("./controllers"), exports);
24
+ __exportStar(require("./shared"), exports);
@@ -12,6 +12,11 @@ export declare const en: {
12
12
  readonly PASSWORD_TOO_WEAK: "Password is too weak";
13
13
  readonly UNREG_USER_ALREADY_MIGRATED: "Guest user already migrated";
14
14
  readonly SESSION_NOT_OWNED_BY_USER: "Session does not belong to user";
15
+ readonly INCORRECT_PASSWORD: "Current password is incorrect";
16
+ readonly TOKEN_EXPIRED: "Token expired or invalidated";
17
+ readonly IP_MISMATCH: "IP address mismatch";
18
+ readonly FRAUD_DETECTED: "User marked as fraud";
19
+ readonly TOKEN_VERSION_MISMATCH: "Token version mismatch";
15
20
  readonly DOMAIN_VALIDATION_ERROR: "Validation error";
16
21
  readonly ENTITY_NOT_FOUND: "Resource not found";
17
22
  readonly CONFLICT: "Resource already exists";
@@ -16,6 +16,12 @@ exports.en = {
16
16
  PASSWORD_TOO_WEAK: 'Password is too weak',
17
17
  UNREG_USER_ALREADY_MIGRATED: 'Guest user already migrated',
18
18
  SESSION_NOT_OWNED_BY_USER: 'Session does not belong to user',
19
+ INCORRECT_PASSWORD: 'Current password is incorrect',
20
+ // Unregistered user errors
21
+ TOKEN_EXPIRED: 'Token expired or invalidated',
22
+ IP_MISMATCH: 'IP address mismatch',
23
+ FRAUD_DETECTED: 'User marked as fraud',
24
+ TOKEN_VERSION_MISMATCH: 'Token version mismatch',
19
25
  // Domain errors
20
26
  DOMAIN_VALIDATION_ERROR: 'Validation error',
21
27
  ENTITY_NOT_FOUND: 'Resource not found',
@@ -20,6 +20,11 @@ export declare const errorMessages: {
20
20
  readonly PASSWORD_TOO_WEAK: "Password is too weak";
21
21
  readonly UNREG_USER_ALREADY_MIGRATED: "Guest user already migrated";
22
22
  readonly SESSION_NOT_OWNED_BY_USER: "Session does not belong to user";
23
+ readonly INCORRECT_PASSWORD: "Current password is incorrect";
24
+ readonly TOKEN_EXPIRED: "Token expired or invalidated";
25
+ readonly IP_MISMATCH: "IP address mismatch";
26
+ readonly FRAUD_DETECTED: "User marked as fraud";
27
+ readonly TOKEN_VERSION_MISMATCH: "Token version mismatch";
23
28
  readonly DOMAIN_VALIDATION_ERROR: "Validation error";
24
29
  readonly ENTITY_NOT_FOUND: "Resource not found";
25
30
  readonly CONFLICT: "Resource already exists";
@@ -47,6 +52,11 @@ export declare const errorMessages: {
47
52
  readonly PASSWORD_TOO_WEAK: "Пароль слишком слабый";
48
53
  readonly UNREG_USER_ALREADY_MIGRATED: "Гостевой пользователь уже мигрирован";
49
54
  readonly SESSION_NOT_OWNED_BY_USER: "Сессия не принадлежит пользователю";
55
+ readonly INCORRECT_PASSWORD: "Текущий пароль неверный";
56
+ readonly TOKEN_EXPIRED: "Токен истёк или недействителен";
57
+ readonly IP_MISMATCH: "Несоответствие IP-адреса";
58
+ readonly FRAUD_DETECTED: "Пользователь помечен как мошенник";
59
+ readonly TOKEN_VERSION_MISMATCH: "Несоответствие версии токена";
50
60
  readonly DOMAIN_VALIDATION_ERROR: "Ошибка валидации";
51
61
  readonly ENTITY_NOT_FOUND: "Ресурс не найден";
52
62
  readonly CONFLICT: "Ресурс уже существует";
@@ -12,6 +12,11 @@ export declare const ru: {
12
12
  readonly PASSWORD_TOO_WEAK: "Пароль слишком слабый";
13
13
  readonly UNREG_USER_ALREADY_MIGRATED: "Гостевой пользователь уже мигрирован";
14
14
  readonly SESSION_NOT_OWNED_BY_USER: "Сессия не принадлежит пользователю";
15
+ readonly INCORRECT_PASSWORD: "Текущий пароль неверный";
16
+ readonly TOKEN_EXPIRED: "Токен истёк или недействителен";
17
+ readonly IP_MISMATCH: "Несоответствие IP-адреса";
18
+ readonly FRAUD_DETECTED: "Пользователь помечен как мошенник";
19
+ readonly TOKEN_VERSION_MISMATCH: "Несоответствие версии токена";
15
20
  readonly DOMAIN_VALIDATION_ERROR: "Ошибка валидации";
16
21
  readonly ENTITY_NOT_FOUND: "Ресурс не найден";
17
22
  readonly CONFLICT: "Ресурс уже существует";
@@ -16,6 +16,12 @@ exports.ru = {
16
16
  PASSWORD_TOO_WEAK: 'Пароль слишком слабый',
17
17
  UNREG_USER_ALREADY_MIGRATED: 'Гостевой пользователь уже мигрирован',
18
18
  SESSION_NOT_OWNED_BY_USER: 'Сессия не принадлежит пользователю',
19
+ INCORRECT_PASSWORD: 'Текущий пароль неверный',
20
+ // Unregistered user errors
21
+ TOKEN_EXPIRED: 'Токен истёк или недействителен',
22
+ IP_MISMATCH: 'Несоответствие IP-адреса',
23
+ FRAUD_DETECTED: 'Пользователь помечен как мошенник',
24
+ TOKEN_VERSION_MISMATCH: 'Несоответствие версии токена',
19
25
  // Domain errors
20
26
  DOMAIN_VALIDATION_ERROR: 'Ошибка валидации',
21
27
  ENTITY_NOT_FOUND: 'Ресурс не найден',
@@ -48,5 +48,17 @@ export declare const REST_API: {
48
48
  };
49
49
  };
50
50
  };
51
+ readonly SEO_PAGES: {
52
+ readonly ADMIN: {
53
+ readonly CREATE: "/api/v1/admin/seo-pages/";
54
+ readonly GET_ALL: "/api/v1/admin/seo-pages/";
55
+ readonly GET_BY_UUID: (uuid: string) => string;
56
+ readonly UPDATE: (uuid: string) => string;
57
+ readonly DELETE: (uuid: string) => string;
58
+ };
59
+ readonly PUBLIC: {
60
+ readonly GET_BY_ALIAS: (alias: string) => string;
61
+ };
62
+ };
51
63
  };
52
64
  };
package/build/rest-api.js CHANGED
@@ -57,5 +57,18 @@ exports.REST_API = {
57
57
  },
58
58
  },
59
59
  },
60
+ // SEO Pages module
61
+ SEO_PAGES: {
62
+ ADMIN: {
63
+ CREATE: `${exports.ROOT}/${controllers_1.SEO_PAGES_ADMIN_CONTROLLER}/${routes_1.SEO_PAGES_ADMIN_ROUTES.CREATE}`,
64
+ GET_ALL: `${exports.ROOT}/${controllers_1.SEO_PAGES_ADMIN_CONTROLLER}/${routes_1.SEO_PAGES_ADMIN_ROUTES.GET_ALL}`,
65
+ GET_BY_UUID: (uuid) => `${exports.ROOT}/${controllers_1.SEO_PAGES_ADMIN_CONTROLLER}/${uuid}`,
66
+ UPDATE: (uuid) => `${exports.ROOT}/${controllers_1.SEO_PAGES_ADMIN_CONTROLLER}/${uuid}`,
67
+ DELETE: (uuid) => `${exports.ROOT}/${controllers_1.SEO_PAGES_ADMIN_CONTROLLER}/${uuid}`,
68
+ },
69
+ PUBLIC: {
70
+ GET_BY_ALIAS: (alias) => `${exports.ROOT}/${controllers_1.SEO_PAGES_PUBLIC_CONTROLLER}/${alias}`,
71
+ },
72
+ },
60
73
  },
61
74
  };
@@ -7,3 +7,5 @@ export { UNREG_USERS_ROUTES } from './unreg-users.routes';
7
7
  export { BLOG_ADMIN_CATEGORIES_ROUTES } from './blog-admin-categories.routes';
8
8
  export { BLOG_ADMIN_POSTS_ROUTES } from './blog-admin-posts.routes';
9
9
  export { BLOG_PUBLIC_CATEGORIES_ROUTES, BLOG_PUBLIC_POSTS_ROUTES } from './blog-public.routes';
10
+ export { SEO_PAGES_ADMIN_ROUTES } from './seo-pages-admin.routes';
11
+ export { SEO_PAGES_PUBLIC_ROUTES } from './seo-pages-public.routes';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BLOG_PUBLIC_POSTS_ROUTES = exports.BLOG_PUBLIC_CATEGORIES_ROUTES = exports.BLOG_ADMIN_POSTS_ROUTES = exports.BLOG_ADMIN_CATEGORIES_ROUTES = exports.UNREG_USERS_ROUTES = exports.USERS_ROUTES = exports.AUTH_ROUTES = void 0;
3
+ exports.SEO_PAGES_PUBLIC_ROUTES = exports.SEO_PAGES_ADMIN_ROUTES = exports.BLOG_PUBLIC_POSTS_ROUTES = exports.BLOG_PUBLIC_CATEGORIES_ROUTES = exports.BLOG_ADMIN_POSTS_ROUTES = exports.BLOG_ADMIN_CATEGORIES_ROUTES = exports.UNREG_USERS_ROUTES = exports.USERS_ROUTES = exports.AUTH_ROUTES = void 0;
4
4
  /**
5
5
  * Centralized exports for all routes
6
6
  */
@@ -17,3 +17,7 @@ Object.defineProperty(exports, "BLOG_ADMIN_POSTS_ROUTES", { enumerable: true, ge
17
17
  var blog_public_routes_1 = require("./blog-public.routes");
18
18
  Object.defineProperty(exports, "BLOG_PUBLIC_CATEGORIES_ROUTES", { enumerable: true, get: function () { return blog_public_routes_1.BLOG_PUBLIC_CATEGORIES_ROUTES; } });
19
19
  Object.defineProperty(exports, "BLOG_PUBLIC_POSTS_ROUTES", { enumerable: true, get: function () { return blog_public_routes_1.BLOG_PUBLIC_POSTS_ROUTES; } });
20
+ var seo_pages_admin_routes_1 = require("./seo-pages-admin.routes");
21
+ Object.defineProperty(exports, "SEO_PAGES_ADMIN_ROUTES", { enumerable: true, get: function () { return seo_pages_admin_routes_1.SEO_PAGES_ADMIN_ROUTES; } });
22
+ var seo_pages_public_routes_1 = require("./seo-pages-public.routes");
23
+ Object.defineProperty(exports, "SEO_PAGES_PUBLIC_ROUTES", { enumerable: true, get: function () { return seo_pages_public_routes_1.SEO_PAGES_PUBLIC_ROUTES; } });
@@ -0,0 +1,10 @@
1
+ /**
2
+ * SEO Pages Admin Routes
3
+ */
4
+ export declare const SEO_PAGES_ADMIN_ROUTES: {
5
+ readonly CREATE: "";
6
+ readonly GET_ALL: "";
7
+ readonly GET_BY_UUID: ":uuid";
8
+ readonly UPDATE: ":uuid";
9
+ readonly DELETE: ":uuid";
10
+ };
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SEO_PAGES_ADMIN_ROUTES = void 0;
4
+ /**
5
+ * SEO Pages Admin Routes
6
+ */
7
+ exports.SEO_PAGES_ADMIN_ROUTES = {
8
+ CREATE: '',
9
+ GET_ALL: '',
10
+ GET_BY_UUID: ':uuid',
11
+ UPDATE: ':uuid',
12
+ DELETE: ':uuid',
13
+ };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * SEO Pages Public Routes
3
+ */
4
+ export declare const SEO_PAGES_PUBLIC_ROUTES: {
5
+ readonly GET_BY_ALIAS: ":alias";
6
+ };
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SEO_PAGES_PUBLIC_ROUTES = void 0;
4
+ /**
5
+ * SEO Pages Public Routes
6
+ */
7
+ exports.SEO_PAGES_PUBLIC_ROUTES = {
8
+ GET_BY_ALIAS: ':alias', // GET /seo-pages/:alias
9
+ };
@@ -0,0 +1,8 @@
1
+ import { ErrorMetadata } from './error-metadata';
2
+ export declare enum CommonErrorCode {
3
+ INTERNAL_SERVER_ERROR = "INTERNAL_SERVER_ERROR",
4
+ VALIDATION_ERROR = "VALIDATION_ERROR",
5
+ DEVICE_NAME_EMPTY = "DEVICE_NAME_EMPTY",
6
+ USER_AGENT_EMPTY = "USER_AGENT_EMPTY"
7
+ }
8
+ export declare const COMMON_ERRORS: Record<CommonErrorCode, ErrorMetadata>;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.COMMON_ERRORS = exports.CommonErrorCode = void 0;
4
+ var CommonErrorCode;
5
+ (function (CommonErrorCode) {
6
+ CommonErrorCode["INTERNAL_SERVER_ERROR"] = "INTERNAL_SERVER_ERROR";
7
+ CommonErrorCode["VALIDATION_ERROR"] = "VALIDATION_ERROR";
8
+ CommonErrorCode["DEVICE_NAME_EMPTY"] = "DEVICE_NAME_EMPTY";
9
+ CommonErrorCode["USER_AGENT_EMPTY"] = "USER_AGENT_EMPTY";
10
+ })(CommonErrorCode || (exports.CommonErrorCode = CommonErrorCode = {}));
11
+ exports.COMMON_ERRORS = {
12
+ [CommonErrorCode.INTERNAL_SERVER_ERROR]: {
13
+ code: CommonErrorCode.INTERNAL_SERVER_ERROR,
14
+ statusCode: 500,
15
+ },
16
+ [CommonErrorCode.VALIDATION_ERROR]: {
17
+ code: CommonErrorCode.VALIDATION_ERROR,
18
+ statusCode: 400,
19
+ },
20
+ [CommonErrorCode.DEVICE_NAME_EMPTY]: {
21
+ code: CommonErrorCode.DEVICE_NAME_EMPTY,
22
+ statusCode: 400,
23
+ },
24
+ [CommonErrorCode.USER_AGENT_EMPTY]: {
25
+ code: CommonErrorCode.USER_AGENT_EMPTY,
26
+ statusCode: 400,
27
+ },
28
+ };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Device Type Enum
3
+ * Used for classifying devices based on User-Agent parsing
4
+ */
5
+ export declare enum DeviceType {
6
+ MOBILE = "mobile",
7
+ TABLET = "tablet",
8
+ SMART_TV = "smarttv",
9
+ WEARABLE = "wearable",
10
+ DESKTOP = "desktop"
11
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeviceType = void 0;
4
+ /**
5
+ * Device Type Enum
6
+ * Used for classifying devices based on User-Agent parsing
7
+ */
8
+ var DeviceType;
9
+ (function (DeviceType) {
10
+ DeviceType["MOBILE"] = "mobile";
11
+ DeviceType["TABLET"] = "tablet";
12
+ DeviceType["SMART_TV"] = "smarttv";
13
+ DeviceType["WEARABLE"] = "wearable";
14
+ DeviceType["DESKTOP"] = "desktop";
15
+ })(DeviceType || (exports.DeviceType = DeviceType = {}));
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Error metadata interface
3
+ * Describes error code and HTTP status
4
+ * Message mapping is handled on the frontend
5
+ */
6
+ export interface ErrorMetadata {
7
+ code: string;
8
+ statusCode: number;
9
+ }
@@ -1,2 +1,6 @@
1
+ export * from './error-metadata';
1
2
  export * from './error-response.schema';
2
3
  export * from './pagination.schema';
4
+ export * from './common.errors';
5
+ export * from './regex';
6
+ export * from './device-type.enum';
@@ -14,5 +14,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./error-metadata"), exports);
17
18
  __exportStar(require("./error-response.schema"), exports);
18
19
  __exportStar(require("./pagination.schema"), exports);
20
+ __exportStar(require("./common.errors"), exports);
21
+ __exportStar(require("./regex"), exports);
22
+ __exportStar(require("./device-type.enum"), exports);
@@ -1,3 +1,4 @@
1
+ import { ErrorMetadata } from '../../shared';
1
2
  export declare enum AuthErrorCode {
2
3
  EMAIL_ALREADY_EXISTS = "EMAIL_ALREADY_EXISTS",
3
4
  INVALID_CREDENTIALS = "INVALID_CREDENTIALS",
@@ -8,5 +9,7 @@ export declare enum AuthErrorCode {
8
9
  INVALID_TOKEN = "INVALID_TOKEN",
9
10
  PASSWORD_TOO_WEAK = "PASSWORD_TOO_WEAK",
10
11
  UNREG_USER_ALREADY_MIGRATED = "UNREG_USER_ALREADY_MIGRATED",
11
- SESSION_NOT_OWNED_BY_USER = "SESSION_NOT_OWNED_BY_USER"
12
+ SESSION_NOT_OWNED_BY_USER = "SESSION_NOT_OWNED_BY_USER",
13
+ INSUFFICIENT_PERMISSIONS = "INSUFFICIENT_PERMISSIONS"
12
14
  }
15
+ export declare const AUTH_ERRORS: Record<AuthErrorCode, ErrorMetadata>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AuthErrorCode = void 0;
3
+ exports.AUTH_ERRORS = exports.AuthErrorCode = void 0;
4
4
  var AuthErrorCode;
5
5
  (function (AuthErrorCode) {
6
6
  AuthErrorCode["EMAIL_ALREADY_EXISTS"] = "EMAIL_ALREADY_EXISTS";
@@ -13,4 +13,33 @@ var AuthErrorCode;
13
13
  AuthErrorCode["PASSWORD_TOO_WEAK"] = "PASSWORD_TOO_WEAK";
14
14
  AuthErrorCode["UNREG_USER_ALREADY_MIGRATED"] = "UNREG_USER_ALREADY_MIGRATED";
15
15
  AuthErrorCode["SESSION_NOT_OWNED_BY_USER"] = "SESSION_NOT_OWNED_BY_USER";
16
+ AuthErrorCode["INSUFFICIENT_PERMISSIONS"] = "INSUFFICIENT_PERMISSIONS";
16
17
  })(AuthErrorCode || (exports.AuthErrorCode = AuthErrorCode = {}));
18
+ exports.AUTH_ERRORS = {
19
+ [AuthErrorCode.EMAIL_ALREADY_EXISTS]: {
20
+ code: AuthErrorCode.EMAIL_ALREADY_EXISTS,
21
+ statusCode: 409,
22
+ },
23
+ [AuthErrorCode.INVALID_CREDENTIALS]: {
24
+ code: AuthErrorCode.INVALID_CREDENTIALS,
25
+ statusCode: 401,
26
+ },
27
+ [AuthErrorCode.USER_NOT_FOUND]: { code: AuthErrorCode.USER_NOT_FOUND, statusCode: 404 },
28
+ [AuthErrorCode.USER_DELETED]: { code: AuthErrorCode.USER_DELETED, statusCode: 401 },
29
+ [AuthErrorCode.SESSION_NOT_FOUND]: { code: AuthErrorCode.SESSION_NOT_FOUND, statusCode: 404 },
30
+ [AuthErrorCode.SESSION_INACTIVE]: { code: AuthErrorCode.SESSION_INACTIVE, statusCode: 401 },
31
+ [AuthErrorCode.INVALID_TOKEN]: { code: AuthErrorCode.INVALID_TOKEN, statusCode: 401 },
32
+ [AuthErrorCode.PASSWORD_TOO_WEAK]: { code: AuthErrorCode.PASSWORD_TOO_WEAK, statusCode: 400 },
33
+ [AuthErrorCode.UNREG_USER_ALREADY_MIGRATED]: {
34
+ code: AuthErrorCode.UNREG_USER_ALREADY_MIGRATED,
35
+ statusCode: 400,
36
+ },
37
+ [AuthErrorCode.SESSION_NOT_OWNED_BY_USER]: {
38
+ code: AuthErrorCode.SESSION_NOT_OWNED_BY_USER,
39
+ statusCode: 403,
40
+ },
41
+ [AuthErrorCode.INSUFFICIENT_PERMISSIONS]: {
42
+ code: AuthErrorCode.INSUFFICIENT_PERMISSIONS,
43
+ statusCode: 403,
44
+ },
45
+ };
@@ -18,7 +18,9 @@ export declare namespace AuthSignInCommand {
18
18
  session: z.ZodObject<{
19
19
  uuid: z.ZodString;
20
20
  deviceName: z.ZodString;
21
+ deviceType: z.ZodEnum<typeof import("../../..").DeviceType>;
21
22
  ip: z.ZodString;
23
+ location: z.ZodString;
22
24
  isCurrent: z.ZodBoolean;
23
25
  createdAt: z.ZodString;
24
26
  lastUsedAt: z.ZodString;
@@ -20,7 +20,9 @@ export declare namespace AuthSignupCommand {
20
20
  session: z.ZodObject<{
21
21
  uuid: z.ZodString;
22
22
  deviceName: z.ZodString;
23
+ deviceType: z.ZodEnum<typeof import("../../..").DeviceType>;
23
24
  ip: z.ZodString;
25
+ location: z.ZodString;
24
26
  isCurrent: z.ZodBoolean;
25
27
  createdAt: z.ZodString;
26
28
  lastUsedAt: z.ZodString;
@@ -1,15 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AuthSignupCommand = void 0;
4
- const signup_request_schema_1 = require("../schemas/signup-request.schema");
5
- const auth_response_schema_1 = require("../schemas/auth-response.schema");
4
+ const schemas_1 = require("../schemas");
5
+ const schemas_2 = require("../schemas");
6
6
  const rest_api_1 = require("../../../rest-api");
7
7
  const http_method_1 = require("../../../shared/http-method");
8
8
  var AuthSignupCommand;
9
9
  (function (AuthSignupCommand) {
10
10
  // Request/Response
11
- AuthSignupCommand.Request = signup_request_schema_1.SignUpRequestSchema;
12
- AuthSignupCommand.Response = auth_response_schema_1.AuthResponseSchema;
11
+ AuthSignupCommand.Request = schemas_1.SignUpRequestSchema;
12
+ AuthSignupCommand.Response = schemas_2.AuthResponseSchema;
13
13
  // URL/Method
14
14
  AuthSignupCommand.URL = rest_api_1.REST_API.V1.AUTH.SIGNUP;
15
15
  AuthSignupCommand.METHOD = http_method_1.HttpMethod.POST;
@@ -1,6 +1,4 @@
1
1
  export * from './schemas';
2
- export * from './auth.types';
3
- export * from './auth.paths';
4
2
  export * from './auth.errors';
5
3
  export * from './commands';
6
4
  export * from './queries';
@@ -16,8 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.AUTH_ROUTES = exports.AUTH_CONTROLLER = void 0;
18
18
  __exportStar(require("./schemas"), exports);
19
- __exportStar(require("./auth.types"), exports);
20
- __exportStar(require("./auth.paths"), exports);
21
19
  __exportStar(require("./auth.errors"), exports);
22
20
  __exportStar(require("./commands"), exports);
23
21
  __exportStar(require("./queries"), exports);
@@ -6,7 +6,9 @@ export declare namespace AuthGetSessionsQuery {
6
6
  sessions: z.ZodArray<z.ZodObject<{
7
7
  uuid: z.ZodString;
8
8
  deviceName: z.ZodString;
9
+ deviceType: z.ZodEnum<typeof import("../../..").DeviceType>;
9
10
  ip: z.ZodString;
11
+ location: z.ZodString;
10
12
  isCurrent: z.ZodBoolean;
11
13
  createdAt: z.ZodString;
12
14
  lastUsedAt: z.ZodString;
@@ -15,7 +15,9 @@ export declare const AuthResponseSchema: z.ZodObject<{
15
15
  session: z.ZodObject<{
16
16
  uuid: z.ZodString;
17
17
  deviceName: z.ZodString;
18
+ deviceType: z.ZodEnum<typeof import("../../..").DeviceType>;
18
19
  ip: z.ZodString;
20
+ location: z.ZodString;
19
21
  isCurrent: z.ZodBoolean;
20
22
  createdAt: z.ZodString;
21
23
  lastUsedAt: z.ZodString;
@@ -28,7 +30,9 @@ export declare const SessionsListResponseSchema: z.ZodObject<{
28
30
  sessions: z.ZodArray<z.ZodObject<{
29
31
  uuid: z.ZodString;
30
32
  deviceName: z.ZodString;
33
+ deviceType: z.ZodEnum<typeof import("../../..").DeviceType>;
31
34
  ip: z.ZodString;
35
+ location: z.ZodString;
32
36
  isCurrent: z.ZodBoolean;
33
37
  createdAt: z.ZodString;
34
38
  lastUsedAt: z.ZodString;
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { DeviceType } from '../../../shared';
2
3
  /**
3
4
  * Session Response Schema
4
5
  * Error messages are in locales (en.ts, ru.ts)
@@ -6,7 +7,9 @@ import { z } from 'zod';
6
7
  export declare const SessionResponseSchema: z.ZodObject<{
7
8
  uuid: z.ZodString;
8
9
  deviceName: z.ZodString;
10
+ deviceType: z.ZodEnum<typeof DeviceType>;
9
11
  ip: z.ZodString;
12
+ location: z.ZodString;
10
13
  isCurrent: z.ZodBoolean;
11
14
  createdAt: z.ZodString;
12
15
  lastUsedAt: z.ZodString;
@@ -2,16 +2,18 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SessionResponseSchema = void 0;
4
4
  const zod_1 = require("zod");
5
- const regex_1 = require("../../../shared/regex");
5
+ const shared_1 = require("../../../shared");
6
6
  /**
7
7
  * Session Response Schema
8
8
  * Error messages are in locales (en.ts, ru.ts)
9
9
  */
10
10
  exports.SessionResponseSchema = zod_1.z.object({
11
- uuid: zod_1.z.string().regex(regex_1.UUID_REGEX),
11
+ uuid: zod_1.z.string().regex(shared_1.UUID_REGEX),
12
12
  deviceName: zod_1.z.string(),
13
+ deviceType: zod_1.z.enum(shared_1.DeviceType),
13
14
  ip: zod_1.z.string(),
15
+ location: zod_1.z.string(),
14
16
  isCurrent: zod_1.z.boolean(),
15
- createdAt: zod_1.z.string().regex(regex_1.DATETIME_REGEX),
16
- lastUsedAt: zod_1.z.string().regex(regex_1.DATETIME_REGEX),
17
+ createdAt: zod_1.z.string().regex(shared_1.DATETIME_REGEX),
18
+ lastUsedAt: zod_1.z.string().regex(shared_1.DATETIME_REGEX),
17
19
  });
@@ -0,0 +1,18 @@
1
+ import { ErrorMetadata } from '../../shared';
2
+ export declare enum BlogErrorCode {
3
+ CATEGORY_NOT_FOUND = "CATEGORY_NOT_FOUND",
4
+ CATEGORY_ALIAS_ALREADY_EXISTS = "CATEGORY_ALIAS_ALREADY_EXISTS",
5
+ CATEGORY_IN_USE = "CATEGORY_IN_USE",
6
+ INVALID_CATEGORY_STATUS = "INVALID_CATEGORY_STATUS",
7
+ CATEGORY_CREATION_FAILED = "CATEGORY_CREATION_FAILED",
8
+ CATEGORY_UPDATE_FAILED = "CATEGORY_UPDATE_FAILED",
9
+ CATEGORY_DELETE_FAILED = "CATEGORY_DELETE_FAILED",
10
+ POST_NOT_FOUND = "POST_NOT_FOUND",
11
+ POST_ALIAS_ALREADY_EXISTS = "POST_ALIAS_ALREADY_EXISTS",
12
+ INVALID_POST_STATUS = "INVALID_POST_STATUS",
13
+ POST_CREATION_FAILED = "POST_CREATION_FAILED",
14
+ POST_UPDATE_FAILED = "POST_UPDATE_FAILED",
15
+ POST_DELETE_FAILED = "POST_DELETE_FAILED",
16
+ INVALID_ALIAS_FORMAT = "INVALID_ALIAS_FORMAT"
17
+ }
18
+ export declare const BLOG_ERRORS: Record<BlogErrorCode, ErrorMetadata>;