@veruna/api-contracts 1.0.3 → 1.0.7

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 (187) hide show
  1. package/build/index.d.ts +4 -3
  2. package/build/index.js +4 -3
  3. package/build/locales/en.d.ts +31 -0
  4. package/build/locales/en.js +38 -0
  5. package/build/locales/index.d.ts +66 -0
  6. package/build/locales/index.js +22 -0
  7. package/build/locales/ru.d.ts +30 -0
  8. package/build/locales/ru.js +38 -0
  9. package/build/rest-api.d.ts +52 -0
  10. package/build/rest-api.js +67 -0
  11. package/build/shared/common-schemas.d.ts +12 -0
  12. package/build/shared/common-schemas.js +15 -0
  13. package/build/shared/error-response.schema.d.ts +25 -0
  14. package/build/shared/error-response.schema.js +22 -0
  15. package/build/shared/index.d.ts +2 -0
  16. package/build/shared/index.js +18 -0
  17. package/build/shared/pagination.schema.d.ts +35 -0
  18. package/build/shared/pagination.schema.js +30 -0
  19. package/build/shared/regex.d.ts +8 -0
  20. package/build/shared/regex.js +16 -0
  21. package/build/utils/index.d.ts +1 -0
  22. package/build/utils/index.js +17 -0
  23. package/build/utils/path-builder.d.ts +20 -0
  24. package/build/utils/path-builder.js +46 -0
  25. package/build/v1/auth/auth.types.d.ts +2 -1
  26. package/build/v1/auth/auth.types.js +4 -1
  27. package/build/v1/auth/commands/delete-session.command.d.ts +11 -0
  28. package/build/v1/auth/commands/delete-session.command.js +18 -0
  29. package/build/v1/auth/commands/index.d.ts +2 -0
  30. package/build/v1/auth/commands/index.js +2 -0
  31. package/build/v1/auth/commands/login.command.d.ts +3 -5
  32. package/build/v1/auth/commands/login.command.js +10 -7
  33. package/build/v1/auth/commands/logout-all.command.d.ts +11 -0
  34. package/build/v1/auth/commands/logout-all.command.js +18 -0
  35. package/build/v1/auth/commands/logout.command.d.ts +2 -4
  36. package/build/v1/auth/commands/logout.command.js +9 -5
  37. package/build/v1/auth/commands/signup.command.d.ts +3 -5
  38. package/build/v1/auth/commands/signup.command.js +10 -7
  39. package/build/v1/auth/controllers.d.ts +4 -0
  40. package/build/v1/auth/controllers.js +7 -0
  41. package/build/v1/auth/index.d.ts +4 -1
  42. package/build/v1/auth/index.js +4 -1
  43. package/build/v1/auth/queries/get-sessions.query.d.ts +20 -0
  44. package/build/v1/auth/queries/get-sessions.query.js +18 -0
  45. package/build/v1/auth/queries/index.d.ts +1 -0
  46. package/build/v1/auth/queries/index.js +17 -0
  47. package/build/v1/auth/routes/auth.routes.d.ts +12 -0
  48. package/build/v1/auth/routes/auth.routes.js +15 -0
  49. package/build/v1/auth/schemas/auth-response.schema.d.ts +36 -0
  50. package/build/v1/auth/schemas/auth-response.schema.js +20 -0
  51. package/build/v1/auth/schemas/index.d.ts +5 -0
  52. package/build/v1/auth/schemas/index.js +21 -0
  53. package/build/v1/auth/schemas/login-request.schema.d.ts +9 -0
  54. package/build/v1/auth/schemas/login-request.schema.js +13 -0
  55. package/build/v1/auth/schemas/session-response.schema.d.ts +13 -0
  56. package/build/v1/auth/schemas/session-response.schema.js +17 -0
  57. package/build/v1/auth/schemas/signup-request.schema.d.ts +28 -0
  58. package/build/v1/auth/schemas/signup-request.schema.js +26 -0
  59. package/build/v1/auth/schemas/user-role.enum.d.ts +7 -0
  60. package/build/v1/auth/schemas/user-role.enum.js +11 -0
  61. package/build/v1/blog/admin/commands/create-category.command.d.ts +24 -0
  62. package/build/v1/blog/admin/commands/create-category.command.js +15 -0
  63. package/build/v1/blog/admin/commands/create-post.command.d.ts +43 -0
  64. package/build/v1/blog/admin/commands/create-post.command.js +15 -0
  65. package/build/v1/blog/admin/commands/delete-category.command.d.ts +11 -0
  66. package/build/v1/blog/admin/commands/delete-category.command.js +16 -0
  67. package/build/v1/blog/admin/commands/delete-post.command.d.ts +11 -0
  68. package/build/v1/blog/admin/commands/delete-post.command.js +16 -0
  69. package/build/v1/blog/admin/commands/index.d.ts +6 -0
  70. package/build/v1/blog/admin/commands/index.js +22 -0
  71. package/build/v1/blog/admin/commands/update-category.command.d.ts +24 -0
  72. package/build/v1/blog/admin/commands/update-category.command.js +15 -0
  73. package/build/v1/blog/admin/commands/update-post.command.d.ts +43 -0
  74. package/build/v1/blog/admin/commands/update-post.command.js +15 -0
  75. package/build/v1/blog/admin/queries/get-categories.query.d.ts +24 -0
  76. package/build/v1/blog/admin/queries/get-categories.query.js +22 -0
  77. package/build/v1/blog/admin/queries/get-category.query.d.ts +19 -0
  78. package/build/v1/blog/admin/queries/get-category.query.js +16 -0
  79. package/build/v1/blog/admin/queries/get-post.query.d.ts +33 -0
  80. package/build/v1/blog/admin/queries/get-post.query.js +16 -0
  81. package/build/v1/blog/admin/queries/get-posts.query.d.ts +48 -0
  82. package/build/v1/blog/admin/queries/get-posts.query.js +21 -0
  83. package/build/v1/blog/admin/queries/index.d.ts +4 -0
  84. package/build/v1/blog/admin/queries/index.js +20 -0
  85. package/build/v1/blog/blog.paths.d.ts +36 -0
  86. package/build/v1/blog/blog.paths.js +47 -0
  87. package/build/v1/blog/blog.types.d.ts +12 -0
  88. package/build/v1/blog/blog.types.js +7 -0
  89. package/build/v1/blog/controllers.d.ts +7 -0
  90. package/build/v1/blog/controllers.js +10 -0
  91. package/build/v1/blog/index.d.ts +8 -0
  92. package/build/v1/blog/index.js +24 -0
  93. package/build/v1/blog/public/queries/get-categories.query.d.ts +21 -0
  94. package/build/v1/blog/public/queries/get-categories.query.js +19 -0
  95. package/build/v1/blog/public/queries/get-post-by-alias.query.d.ts +33 -0
  96. package/build/v1/blog/public/queries/get-post-by-alias.query.js +16 -0
  97. package/build/v1/blog/public/queries/get-posts.query.d.ts +47 -0
  98. package/build/v1/blog/public/queries/get-posts.query.js +21 -0
  99. package/build/v1/blog/public/queries/index.d.ts +3 -0
  100. package/build/v1/blog/public/queries/index.js +19 -0
  101. package/build/v1/blog/routes/blog-admin-categories.routes.d.ts +11 -0
  102. package/build/v1/blog/routes/blog-admin-categories.routes.js +14 -0
  103. package/build/v1/blog/routes/blog-admin-posts.routes.d.ts +10 -0
  104. package/build/v1/blog/routes/blog-admin-posts.routes.js +13 -0
  105. package/build/v1/blog/routes/blog-public.routes.d.ts +10 -0
  106. package/build/v1/blog/routes/blog-public.routes.js +13 -0
  107. package/build/v1/blog/routes/index.d.ts +3 -0
  108. package/build/v1/blog/routes/index.js +19 -0
  109. package/build/v1/blog/schemas/blog-category-status.enum.d.ts +8 -0
  110. package/build/v1/blog/schemas/blog-category-status.enum.js +12 -0
  111. package/build/v1/blog/schemas/blog-post-status.enum.d.ts +8 -0
  112. package/build/v1/blog/schemas/blog-post-status.enum.js +12 -0
  113. package/build/v1/blog/schemas/category-response.schema.d.ts +14 -0
  114. package/build/v1/blog/schemas/category-response.schema.js +18 -0
  115. package/build/v1/blog/schemas/create-category-request.schema.d.ts +8 -0
  116. package/build/v1/blog/schemas/create-category-request.schema.js +12 -0
  117. package/build/v1/blog/schemas/create-post-request.schema.d.ts +13 -0
  118. package/build/v1/blog/schemas/create-post-request.schema.js +17 -0
  119. package/build/v1/blog/schemas/get-posts-query.schema.d.ts +13 -0
  120. package/build/v1/blog/schemas/get-posts-query.schema.js +13 -0
  121. package/build/v1/blog/schemas/index.d.ts +9 -0
  122. package/build/v1/blog/schemas/index.js +25 -0
  123. package/build/v1/blog/schemas/post-response.schema.d.ts +28 -0
  124. package/build/v1/blog/schemas/post-response.schema.js +25 -0
  125. package/build/v1/blog/schemas/update-category-request.schema.d.ts +8 -0
  126. package/build/v1/blog/schemas/update-category-request.schema.js +12 -0
  127. package/build/v1/blog/schemas/update-post-request.schema.d.ts +13 -0
  128. package/build/v1/blog/schemas/update-post-request.schema.js +17 -0
  129. package/build/v1/unregistered-users/commands/authenticate.command.d.ts +18 -0
  130. package/build/v1/unregistered-users/commands/authenticate.command.js +15 -0
  131. package/build/v1/unregistered-users/commands/index.d.ts +1 -0
  132. package/build/v1/unregistered-users/commands/index.js +17 -0
  133. package/build/v1/unregistered-users/controllers.d.ts +4 -0
  134. package/build/v1/unregistered-users/controllers.js +7 -0
  135. package/build/v1/unregistered-users/index.d.ts +2 -1
  136. package/build/v1/unregistered-users/index.js +2 -1
  137. package/build/v1/unregistered-users/routes/unreg-users.routes.d.ts +6 -0
  138. package/build/v1/unregistered-users/routes/unreg-users.routes.js +9 -0
  139. package/build/v1/unregistered-users/schemas/authenticate-request.schema.d.ts +7 -0
  140. package/build/v1/unregistered-users/schemas/authenticate-request.schema.js +10 -0
  141. package/build/v1/unregistered-users/schemas/authenticate-response.schema.d.ts +11 -0
  142. package/build/v1/unregistered-users/schemas/authenticate-response.schema.js +15 -0
  143. package/build/v1/unregistered-users/schemas/index.d.ts +3 -0
  144. package/build/v1/unregistered-users/schemas/index.js +19 -0
  145. package/build/v1/unregistered-users/schemas/unreg-user-status.enum.d.ts +8 -0
  146. package/build/v1/unregistered-users/schemas/unreg-user-status.enum.js +12 -0
  147. package/build/v1/unregistered-users/unregistered-users.types.d.ts +3 -1
  148. package/build/v1/unregistered-users/unregistered-users.types.js +6 -0
  149. package/build/v1/users/commands/change-password.command.d.ts +2 -4
  150. package/build/v1/users/commands/change-password.command.js +8 -5
  151. package/build/v1/users/commands/delete-account.command.d.ts +11 -0
  152. package/build/v1/users/commands/delete-account.command.js +16 -0
  153. package/build/v1/users/commands/index.d.ts +2 -0
  154. package/build/v1/users/commands/index.js +2 -0
  155. package/build/v1/users/commands/toggle-marketing-consent.command.d.ts +13 -0
  156. package/build/v1/users/commands/toggle-marketing-consent.command.js +16 -0
  157. package/build/v1/users/commands/update-profile.command.d.ts +2 -4
  158. package/build/v1/users/commands/update-profile.command.js +8 -5
  159. package/build/v1/users/controllers.d.ts +4 -0
  160. package/build/v1/users/controllers.js +7 -0
  161. package/build/v1/users/index.d.ts +3 -1
  162. package/build/v1/users/index.js +3 -1
  163. package/build/v1/users/queries/get-current-user.query.d.ts +3 -5
  164. package/build/v1/users/queries/get-current-user.query.js +7 -5
  165. package/build/v1/users/routes/users.routes.d.ts +9 -0
  166. package/build/v1/users/routes/users.routes.js +12 -0
  167. package/build/v1/users/schemas/change-password-request.schema.d.ts +10 -0
  168. package/build/v1/users/schemas/change-password-request.schema.js +14 -0
  169. package/build/v1/users/schemas/delete-account-request.schema.d.ts +5 -0
  170. package/build/v1/users/schemas/delete-account-request.schema.js +8 -0
  171. package/build/v1/users/schemas/index.d.ts +6 -0
  172. package/build/v1/users/schemas/index.js +22 -0
  173. package/build/v1/users/{users.schemas.d.ts → schemas/response-unions.schema.d.ts} +0 -42
  174. package/build/v1/users/schemas/response-unions.schema.js +14 -0
  175. package/build/v1/users/schemas/toggle-marketing-consent-request.schema.d.ts +7 -0
  176. package/build/v1/users/schemas/toggle-marketing-consent-request.schema.js +10 -0
  177. package/build/v1/users/schemas/update-profile-request.schema.d.ts +8 -0
  178. package/build/v1/users/schemas/update-profile-request.schema.js +11 -0
  179. package/build/v1/users/schemas/user-response.schema.d.ts +12 -0
  180. package/build/v1/users/schemas/user-response.schema.js +16 -0
  181. package/build/v1/users/users.types.d.ts +2 -4
  182. package/package.json +1 -1
  183. package/build/v1/auth/auth.schemas.d.ts +0 -87
  184. package/build/v1/auth/auth.schemas.js +0 -69
  185. package/build/v1/unregistered-users/unregistered-users.schemas.d.ts +0 -24
  186. package/build/v1/unregistered-users/unregistered-users.schemas.js +0 -28
  187. package/build/v1/users/users.schemas.js +0 -58
package/build/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
- export * from './v1/auth';
2
- export * from './v1/users';
3
- export * from './v1/unregistered-users';
1
+ export * from './shared';
2
+ export * from './v1';
3
+ export * from './locales';
4
+ export * from './utils';
package/build/index.js CHANGED
@@ -15,6 +15,7 @@ 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("./v1/auth"), exports);
19
- __exportStar(require("./v1/users"), exports);
20
- __exportStar(require("./v1/unregistered-users"), exports);
18
+ __exportStar(require("./shared"), exports);
19
+ __exportStar(require("./v1"), exports);
20
+ __exportStar(require("./locales"), exports);
21
+ __exportStar(require("./utils"), exports);
@@ -0,0 +1,31 @@
1
+ /**
2
+ * English error messages
3
+ */
4
+ export declare const en: {
5
+ readonly EMAIL_ALREADY_EXISTS: "Email already exists";
6
+ readonly INVALID_CREDENTIALS: "Invalid email or password";
7
+ readonly USER_NOT_FOUND: "User not found";
8
+ readonly USER_DELETED: "User account has been deleted";
9
+ readonly SESSION_NOT_FOUND: "Session not found";
10
+ readonly SESSION_INACTIVE: "Session is inactive";
11
+ readonly INVALID_TOKEN: "Invalid or expired token";
12
+ readonly PASSWORD_TOO_WEAK: "Password is too weak";
13
+ readonly UNREG_USER_ALREADY_MIGRATED: "Guest user already migrated";
14
+ readonly SESSION_NOT_OWNED_BY_USER: "Session does not belong to user";
15
+ readonly DOMAIN_VALIDATION_ERROR: "Validation error";
16
+ readonly ENTITY_NOT_FOUND: "Resource not found";
17
+ readonly CONFLICT: "Resource already exists";
18
+ readonly BUSINESS_RULE_VIOLATION: "Business rule violation";
19
+ readonly UNAUTHORIZED: "Unauthorized";
20
+ readonly FORBIDDEN: "Access forbidden";
21
+ readonly VALIDATION_ERROR: "Validation failed";
22
+ readonly INTERNAL_SERVER_ERROR: "Internal server error";
23
+ readonly CATEGORY_NOT_FOUND: "Category not found";
24
+ readonly CATEGORY_ALIAS_EXISTS: "Category alias already exists";
25
+ readonly POST_NOT_FOUND: "Post not found";
26
+ readonly POST_ALIAS_EXISTS: "Post alias already exists";
27
+ readonly INVALID_CATEGORY_ID: "Invalid category ID";
28
+ readonly AT_LEAST_ONE_CATEGORY_REQUIRED: "At least one category required";
29
+ readonly UNKNOWN_ERROR: "An unexpected error occurred";
30
+ };
31
+ export type ErrorCode = keyof typeof en;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.en = void 0;
4
+ /**
5
+ * English error messages
6
+ */
7
+ exports.en = {
8
+ // Auth errors
9
+ EMAIL_ALREADY_EXISTS: 'Email already exists',
10
+ INVALID_CREDENTIALS: 'Invalid email or password',
11
+ USER_NOT_FOUND: 'User not found',
12
+ USER_DELETED: 'User account has been deleted',
13
+ SESSION_NOT_FOUND: 'Session not found',
14
+ SESSION_INACTIVE: 'Session is inactive',
15
+ INVALID_TOKEN: 'Invalid or expired token',
16
+ PASSWORD_TOO_WEAK: 'Password is too weak',
17
+ UNREG_USER_ALREADY_MIGRATED: 'Guest user already migrated',
18
+ SESSION_NOT_OWNED_BY_USER: 'Session does not belong to user',
19
+ // Domain errors
20
+ DOMAIN_VALIDATION_ERROR: 'Validation error',
21
+ ENTITY_NOT_FOUND: 'Resource not found',
22
+ CONFLICT: 'Resource already exists',
23
+ BUSINESS_RULE_VIOLATION: 'Business rule violation',
24
+ // Application errors
25
+ UNAUTHORIZED: 'Unauthorized',
26
+ FORBIDDEN: 'Access forbidden',
27
+ VALIDATION_ERROR: 'Validation failed',
28
+ INTERNAL_SERVER_ERROR: 'Internal server error',
29
+ // Blog errors
30
+ CATEGORY_NOT_FOUND: 'Category not found',
31
+ CATEGORY_ALIAS_EXISTS: 'Category alias already exists',
32
+ POST_NOT_FOUND: 'Post not found',
33
+ POST_ALIAS_EXISTS: 'Post alias already exists',
34
+ INVALID_CATEGORY_ID: 'Invalid category ID',
35
+ AT_LEAST_ONE_CATEGORY_REQUIRED: 'At least one category required',
36
+ // Generic
37
+ UNKNOWN_ERROR: 'An unexpected error occurred',
38
+ };
@@ -0,0 +1,66 @@
1
+ import { en, ErrorCode } from './en';
2
+ import { ru } from './ru';
3
+ export { en, ru, ErrorCode };
4
+ /**
5
+ * Get localized error message
6
+ */
7
+ export declare function getErrorMessage(code: string, locale?: 'en' | 'ru'): string;
8
+ /**
9
+ * Type-safe error messages
10
+ */
11
+ export declare const errorMessages: {
12
+ readonly en: {
13
+ readonly EMAIL_ALREADY_EXISTS: "Email already exists";
14
+ readonly INVALID_CREDENTIALS: "Invalid email or password";
15
+ readonly USER_NOT_FOUND: "User not found";
16
+ readonly USER_DELETED: "User account has been deleted";
17
+ readonly SESSION_NOT_FOUND: "Session not found";
18
+ readonly SESSION_INACTIVE: "Session is inactive";
19
+ readonly INVALID_TOKEN: "Invalid or expired token";
20
+ readonly PASSWORD_TOO_WEAK: "Password is too weak";
21
+ readonly UNREG_USER_ALREADY_MIGRATED: "Guest user already migrated";
22
+ readonly SESSION_NOT_OWNED_BY_USER: "Session does not belong to user";
23
+ readonly DOMAIN_VALIDATION_ERROR: "Validation error";
24
+ readonly ENTITY_NOT_FOUND: "Resource not found";
25
+ readonly CONFLICT: "Resource already exists";
26
+ readonly BUSINESS_RULE_VIOLATION: "Business rule violation";
27
+ readonly UNAUTHORIZED: "Unauthorized";
28
+ readonly FORBIDDEN: "Access forbidden";
29
+ readonly VALIDATION_ERROR: "Validation failed";
30
+ readonly INTERNAL_SERVER_ERROR: "Internal server error";
31
+ readonly CATEGORY_NOT_FOUND: "Category not found";
32
+ readonly CATEGORY_ALIAS_EXISTS: "Category alias already exists";
33
+ readonly POST_NOT_FOUND: "Post not found";
34
+ readonly POST_ALIAS_EXISTS: "Post alias already exists";
35
+ readonly INVALID_CATEGORY_ID: "Invalid category ID";
36
+ readonly AT_LEAST_ONE_CATEGORY_REQUIRED: "At least one category required";
37
+ readonly UNKNOWN_ERROR: "An unexpected error occurred";
38
+ };
39
+ readonly ru: {
40
+ readonly EMAIL_ALREADY_EXISTS: "Email уже зарегистрирован";
41
+ readonly INVALID_CREDENTIALS: "Неверный email или пароль";
42
+ readonly USER_NOT_FOUND: "Пользователь не найден";
43
+ readonly USER_DELETED: "Аккаунт пользователя удалён";
44
+ readonly SESSION_NOT_FOUND: "Сессия не найдена";
45
+ readonly SESSION_INACTIVE: "Сессия неактивна";
46
+ readonly INVALID_TOKEN: "Невалидный или истёкший токен";
47
+ readonly PASSWORD_TOO_WEAK: "Пароль слишком слабый";
48
+ readonly UNREG_USER_ALREADY_MIGRATED: "Гостевой пользователь уже мигрирован";
49
+ readonly SESSION_NOT_OWNED_BY_USER: "Сессия не принадлежит пользователю";
50
+ readonly DOMAIN_VALIDATION_ERROR: "Ошибка валидации";
51
+ readonly ENTITY_NOT_FOUND: "Ресурс не найден";
52
+ readonly CONFLICT: "Ресурс уже существует";
53
+ readonly BUSINESS_RULE_VIOLATION: "Нарушение бизнес-правила";
54
+ readonly UNAUTHORIZED: "Не авторизован";
55
+ readonly FORBIDDEN: "Доступ запрещён";
56
+ readonly VALIDATION_ERROR: "Ошибка валидации";
57
+ readonly INTERNAL_SERVER_ERROR: "Внутренняя ошибка сервера";
58
+ readonly CATEGORY_NOT_FOUND: "Категория не найдена";
59
+ readonly CATEGORY_ALIAS_EXISTS: "Alias категории уже существует";
60
+ readonly POST_NOT_FOUND: "Пост не найден";
61
+ readonly POST_ALIAS_EXISTS: "Alias поста уже существует";
62
+ readonly INVALID_CATEGORY_ID: "Невалидный ID категории";
63
+ readonly AT_LEAST_ONE_CATEGORY_REQUIRED: "Требуется минимум одна категория";
64
+ readonly UNKNOWN_ERROR: "Произошла неожиданная ошибка";
65
+ };
66
+ };
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.errorMessages = exports.ru = exports.en = void 0;
4
+ exports.getErrorMessage = getErrorMessage;
5
+ const en_1 = require("./en");
6
+ Object.defineProperty(exports, "en", { enumerable: true, get: function () { return en_1.en; } });
7
+ const ru_1 = require("./ru");
8
+ Object.defineProperty(exports, "ru", { enumerable: true, get: function () { return ru_1.ru; } });
9
+ /**
10
+ * Get localized error message
11
+ */
12
+ function getErrorMessage(code, locale = 'en') {
13
+ const messages = locale === 'ru' ? ru_1.ru : en_1.en;
14
+ return messages[code] || messages.UNKNOWN_ERROR;
15
+ }
16
+ /**
17
+ * Type-safe error messages
18
+ */
19
+ exports.errorMessages = {
20
+ en: en_1.en,
21
+ ru: ru_1.ru,
22
+ };
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Russian error messages
3
+ */
4
+ export declare const ru: {
5
+ readonly EMAIL_ALREADY_EXISTS: "Email уже зарегистрирован";
6
+ readonly INVALID_CREDENTIALS: "Неверный email или пароль";
7
+ readonly USER_NOT_FOUND: "Пользователь не найден";
8
+ readonly USER_DELETED: "Аккаунт пользователя удалён";
9
+ readonly SESSION_NOT_FOUND: "Сессия не найдена";
10
+ readonly SESSION_INACTIVE: "Сессия неактивна";
11
+ readonly INVALID_TOKEN: "Невалидный или истёкший токен";
12
+ readonly PASSWORD_TOO_WEAK: "Пароль слишком слабый";
13
+ readonly UNREG_USER_ALREADY_MIGRATED: "Гостевой пользователь уже мигрирован";
14
+ readonly SESSION_NOT_OWNED_BY_USER: "Сессия не принадлежит пользователю";
15
+ readonly DOMAIN_VALIDATION_ERROR: "Ошибка валидации";
16
+ readonly ENTITY_NOT_FOUND: "Ресурс не найден";
17
+ readonly CONFLICT: "Ресурс уже существует";
18
+ readonly BUSINESS_RULE_VIOLATION: "Нарушение бизнес-правила";
19
+ readonly UNAUTHORIZED: "Не авторизован";
20
+ readonly FORBIDDEN: "Доступ запрещён";
21
+ readonly VALIDATION_ERROR: "Ошибка валидации";
22
+ readonly INTERNAL_SERVER_ERROR: "Внутренняя ошибка сервера";
23
+ readonly CATEGORY_NOT_FOUND: "Категория не найдена";
24
+ readonly CATEGORY_ALIAS_EXISTS: "Alias категории уже существует";
25
+ readonly POST_NOT_FOUND: "Пост не найден";
26
+ readonly POST_ALIAS_EXISTS: "Alias поста уже существует";
27
+ readonly INVALID_CATEGORY_ID: "Невалидный ID категории";
28
+ readonly AT_LEAST_ONE_CATEGORY_REQUIRED: "Требуется минимум одна категория";
29
+ readonly UNKNOWN_ERROR: "Произошла неожиданная ошибка";
30
+ };
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ru = void 0;
4
+ /**
5
+ * Russian error messages
6
+ */
7
+ exports.ru = {
8
+ // Auth errors
9
+ EMAIL_ALREADY_EXISTS: 'Email уже зарегистрирован',
10
+ INVALID_CREDENTIALS: 'Неверный email или пароль',
11
+ USER_NOT_FOUND: 'Пользователь не найден',
12
+ USER_DELETED: 'Аккаунт пользователя удалён',
13
+ SESSION_NOT_FOUND: 'Сессия не найдена',
14
+ SESSION_INACTIVE: 'Сессия неактивна',
15
+ INVALID_TOKEN: 'Невалидный или истёкший токен',
16
+ PASSWORD_TOO_WEAK: 'Пароль слишком слабый',
17
+ UNREG_USER_ALREADY_MIGRATED: 'Гостевой пользователь уже мигрирован',
18
+ SESSION_NOT_OWNED_BY_USER: 'Сессия не принадлежит пользователю',
19
+ // Domain errors
20
+ DOMAIN_VALIDATION_ERROR: 'Ошибка валидации',
21
+ ENTITY_NOT_FOUND: 'Ресурс не найден',
22
+ CONFLICT: 'Ресурс уже существует',
23
+ BUSINESS_RULE_VIOLATION: 'Нарушение бизнес-правила',
24
+ // Application errors
25
+ UNAUTHORIZED: 'Не авторизован',
26
+ FORBIDDEN: 'Доступ запрещён',
27
+ VALIDATION_ERROR: 'Ошибка валидации',
28
+ INTERNAL_SERVER_ERROR: 'Внутренняя ошибка сервера',
29
+ // Blog errors
30
+ CATEGORY_NOT_FOUND: 'Категория не найдена',
31
+ CATEGORY_ALIAS_EXISTS: 'Alias категории уже существует',
32
+ POST_NOT_FOUND: 'Пост не найден',
33
+ POST_ALIAS_EXISTS: 'Alias поста уже существует',
34
+ INVALID_CATEGORY_ID: 'Невалидный ID категории',
35
+ AT_LEAST_ONE_CATEGORY_REQUIRED: 'Требуется минимум одна категория',
36
+ // Generic
37
+ UNKNOWN_ERROR: 'Произошла неожиданная ошибка',
38
+ };
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Centralized REST API URLs
3
+ * Used by frontend for API calls
4
+ */
5
+ export declare const ROOT: "/api";
6
+ export declare const REST_API: {
7
+ readonly V1: {
8
+ readonly AUTH: {
9
+ readonly SIGNUP: "/api/v1/auth/signup";
10
+ readonly LOGIN: "/api/v1/auth/login";
11
+ readonly LOGOUT: "/api/v1/auth/logout";
12
+ readonly LOGOUT_ALL: "/api/v1/auth/logout-all";
13
+ readonly SESSIONS: "/api/v1/auth/sessions";
14
+ readonly SESSION_BY_ID: (id: string) => string;
15
+ };
16
+ readonly USERS: {
17
+ readonly ME: "/api/v1/users/me";
18
+ readonly ME_MARKETING_CONSENT: "/api/v1/users/me/marketing-consent";
19
+ readonly ME_PASSWORD: "/api/v1/users/me/password";
20
+ };
21
+ readonly UNREG: {
22
+ readonly AUTHENTICATE: "/api/v1/unreg/";
23
+ };
24
+ readonly BLOG: {
25
+ readonly ADMIN: {
26
+ readonly CATEGORIES: {
27
+ readonly CREATE: "/api/v1/admin/blog/categories/";
28
+ readonly GET_ALL: "/api/v1/admin/blog/categories/";
29
+ readonly GET_BY_UUID: (uuid: string) => string;
30
+ readonly UPDATE: (uuid: string) => string;
31
+ readonly DELETE: (uuid: string) => string;
32
+ };
33
+ readonly POSTS: {
34
+ readonly CREATE: "/api/v1/admin/blog/posts/";
35
+ readonly GET_ALL: "/api/v1/admin/blog/posts/";
36
+ readonly GET_BY_UUID: (uuid: string) => string;
37
+ readonly UPDATE: (uuid: string) => string;
38
+ readonly DELETE: (uuid: string) => string;
39
+ };
40
+ };
41
+ readonly PUBLIC: {
42
+ readonly CATEGORIES: {
43
+ readonly GET_ALL: "/api/v1/blog/categories/";
44
+ };
45
+ readonly POSTS: {
46
+ readonly GET_ALL: "/api/v1/blog/posts/";
47
+ readonly GET_BY_ALIAS: (alias: string) => string;
48
+ };
49
+ };
50
+ };
51
+ };
52
+ };
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ /**
3
+ * Centralized REST API URLs
4
+ * Used by frontend for API calls
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.REST_API = exports.ROOT = void 0;
8
+ const controllers_1 = require("./v1/blog/controllers");
9
+ const routes_1 = require("./v1/blog/routes");
10
+ const controllers_2 = require("./v1/auth/controllers");
11
+ const auth_routes_1 = require("./v1/auth/routes/auth.routes");
12
+ const controllers_3 = require("./v1/users/controllers");
13
+ const users_routes_1 = require("./v1/users/routes/users.routes");
14
+ const controllers_4 = require("./v1/unregistered-users/controllers");
15
+ const unreg_users_routes_1 = require("./v1/unregistered-users/routes/unreg-users.routes");
16
+ exports.ROOT = '/api';
17
+ exports.REST_API = {
18
+ V1: {
19
+ // Auth module
20
+ AUTH: {
21
+ SIGNUP: `${exports.ROOT}/${controllers_2.AUTH_CONTROLLER}/${auth_routes_1.AUTH_ROUTES.SIGNUP}`,
22
+ LOGIN: `${exports.ROOT}/${controllers_2.AUTH_CONTROLLER}/${auth_routes_1.AUTH_ROUTES.LOGIN}`,
23
+ LOGOUT: `${exports.ROOT}/${controllers_2.AUTH_CONTROLLER}/${auth_routes_1.AUTH_ROUTES.LOGOUT}`,
24
+ LOGOUT_ALL: `${exports.ROOT}/${controllers_2.AUTH_CONTROLLER}/${auth_routes_1.AUTH_ROUTES.LOGOUT_ALL}`,
25
+ SESSIONS: `${exports.ROOT}/${controllers_2.AUTH_CONTROLLER}/${auth_routes_1.AUTH_ROUTES.SESSIONS}`,
26
+ SESSION_BY_ID: (id) => `${exports.ROOT}/${controllers_2.AUTH_CONTROLLER}/sessions/${id}`,
27
+ },
28
+ // Users module
29
+ USERS: {
30
+ ME: `${exports.ROOT}/${controllers_3.USERS_CONTROLLER}/${users_routes_1.USERS_ROUTES.ME}`,
31
+ ME_MARKETING_CONSENT: `${exports.ROOT}/${controllers_3.USERS_CONTROLLER}/${users_routes_1.USERS_ROUTES.ME_MARKETING_CONSENT}`,
32
+ ME_PASSWORD: `${exports.ROOT}/${controllers_3.USERS_CONTROLLER}/${users_routes_1.USERS_ROUTES.ME_PASSWORD}`,
33
+ },
34
+ // Unregistered Users
35
+ UNREG: {
36
+ AUTHENTICATE: `${exports.ROOT}/${controllers_4.UNREG_USERS_CONTROLLER}/${unreg_users_routes_1.UNREG_USERS_ROUTES.AUTHENTICATE}`,
37
+ },
38
+ // Blog module
39
+ BLOG: {
40
+ ADMIN: {
41
+ CATEGORIES: {
42
+ CREATE: `${exports.ROOT}/${controllers_1.BLOG_ADMIN_CATEGORIES_CONTROLLER}/${routes_1.BLOG_ADMIN_CATEGORIES_ROUTES.CREATE}`,
43
+ GET_ALL: `${exports.ROOT}/${controllers_1.BLOG_ADMIN_CATEGORIES_CONTROLLER}/${routes_1.BLOG_ADMIN_CATEGORIES_ROUTES.GET_ALL}`,
44
+ GET_BY_UUID: (uuid) => `${exports.ROOT}/${controllers_1.BLOG_ADMIN_CATEGORIES_CONTROLLER}/${uuid}`,
45
+ UPDATE: (uuid) => `${exports.ROOT}/${controllers_1.BLOG_ADMIN_CATEGORIES_CONTROLLER}/${uuid}`,
46
+ DELETE: (uuid) => `${exports.ROOT}/${controllers_1.BLOG_ADMIN_CATEGORIES_CONTROLLER}/${uuid}`,
47
+ },
48
+ POSTS: {
49
+ CREATE: `${exports.ROOT}/${controllers_1.BLOG_ADMIN_POSTS_CONTROLLER}/${routes_1.BLOG_ADMIN_POSTS_ROUTES.CREATE}`,
50
+ GET_ALL: `${exports.ROOT}/${controllers_1.BLOG_ADMIN_POSTS_CONTROLLER}/${routes_1.BLOG_ADMIN_POSTS_ROUTES.GET_ALL}`,
51
+ GET_BY_UUID: (uuid) => `${exports.ROOT}/${controllers_1.BLOG_ADMIN_POSTS_CONTROLLER}/${uuid}`,
52
+ UPDATE: (uuid) => `${exports.ROOT}/${controllers_1.BLOG_ADMIN_POSTS_CONTROLLER}/${uuid}`,
53
+ DELETE: (uuid) => `${exports.ROOT}/${controllers_1.BLOG_ADMIN_POSTS_CONTROLLER}/${uuid}`,
54
+ },
55
+ },
56
+ PUBLIC: {
57
+ CATEGORIES: {
58
+ GET_ALL: `${exports.ROOT}/${controllers_1.BLOG_PUBLIC_CATEGORIES_CONTROLLER}/${routes_1.BLOG_PUBLIC_CATEGORIES_ROUTES.GET_ALL}`,
59
+ },
60
+ POSTS: {
61
+ GET_ALL: `${exports.ROOT}/${controllers_1.BLOG_PUBLIC_POSTS_CONTROLLER}/${routes_1.BLOG_PUBLIC_POSTS_ROUTES.GET_ALL}`,
62
+ GET_BY_ALIAS: (alias) => `${exports.ROOT}/${controllers_1.BLOG_PUBLIC_POSTS_CONTROLLER}/${alias}`,
63
+ },
64
+ },
65
+ },
66
+ },
67
+ };
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Empty Response (for void operations)
4
+ */
5
+ export declare const EmptyResponseSchema: z.ZodObject<{}, z.core.$strip>;
6
+ /**
7
+ * Error Response Schema
8
+ */
9
+ export declare const ErrorResponseSchema: z.ZodObject<{
10
+ code: z.ZodString;
11
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
12
+ }, z.core.$strip>;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ErrorResponseSchema = exports.EmptyResponseSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ /**
6
+ * Empty Response (for void operations)
7
+ */
8
+ exports.EmptyResponseSchema = zod_1.z.object({});
9
+ /**
10
+ * Error Response Schema
11
+ */
12
+ exports.ErrorResponseSchema = zod_1.z.object({
13
+ code: zod_1.z.string(),
14
+ details: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
15
+ });
@@ -0,0 +1,25 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Base error response schema
4
+ */
5
+ export declare const ErrorResponseSchema: z.ZodObject<{
6
+ statusCode: z.ZodNumber;
7
+ message: z.ZodString;
8
+ error: z.ZodString;
9
+ code: z.ZodOptional<z.ZodString>;
10
+ details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
11
+ timestamp: z.ZodString;
12
+ }, z.core.$strip>;
13
+ export type ErrorResponse = z.infer<typeof ErrorResponseSchema>;
14
+ /**
15
+ * Validation error response schema
16
+ */
17
+ export declare const ValidationErrorResponseSchema: z.ZodObject<{
18
+ statusCode: z.ZodNumber;
19
+ message: z.ZodString;
20
+ error: z.ZodString;
21
+ timestamp: z.ZodString;
22
+ code: z.ZodLiteral<"VALIDATION_ERROR">;
23
+ details: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>;
24
+ }, z.core.$strip>;
25
+ export type ValidationErrorResponse = z.infer<typeof ValidationErrorResponseSchema>;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ValidationErrorResponseSchema = exports.ErrorResponseSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ /**
6
+ * Base error response schema
7
+ */
8
+ exports.ErrorResponseSchema = zod_1.z.object({
9
+ statusCode: zod_1.z.number(),
10
+ message: zod_1.z.string(),
11
+ error: zod_1.z.string(),
12
+ code: zod_1.z.string().optional(),
13
+ details: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
14
+ timestamp: zod_1.z.string(),
15
+ });
16
+ /**
17
+ * Validation error response schema
18
+ */
19
+ exports.ValidationErrorResponseSchema = exports.ErrorResponseSchema.extend({
20
+ code: zod_1.z.literal('VALIDATION_ERROR'),
21
+ details: zod_1.z.record(zod_1.z.string(), zod_1.z.array(zod_1.z.string())),
22
+ });
@@ -0,0 +1,2 @@
1
+ export * from './error-response.schema';
2
+ export * from './pagination.schema';
@@ -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("./error-response.schema"), exports);
18
+ __exportStar(require("./pagination.schema"), exports);
@@ -0,0 +1,35 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Pagination query params schema
4
+ */
5
+ export declare const PaginationQuerySchema: z.ZodObject<{
6
+ page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
7
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
8
+ }, z.core.$strip>;
9
+ export type PaginationQuery = z.infer<typeof PaginationQuerySchema>;
10
+ /**
11
+ * Pagination metadata schema
12
+ */
13
+ export declare const PaginationMetaSchema: z.ZodObject<{
14
+ page: z.ZodNumber;
15
+ limit: z.ZodNumber;
16
+ total: z.ZodNumber;
17
+ totalPages: z.ZodNumber;
18
+ hasNext: z.ZodBoolean;
19
+ hasPrev: z.ZodBoolean;
20
+ }, z.core.$strip>;
21
+ export type PaginationMeta = z.infer<typeof PaginationMetaSchema>;
22
+ /**
23
+ * Paginated response schema
24
+ */
25
+ export declare const createPaginatedResponseSchema: <T extends z.ZodType>(itemSchema: T) => z.ZodObject<{
26
+ data: z.ZodArray<T>;
27
+ meta: z.ZodObject<{
28
+ page: z.ZodNumber;
29
+ limit: z.ZodNumber;
30
+ total: z.ZodNumber;
31
+ totalPages: z.ZodNumber;
32
+ hasNext: z.ZodBoolean;
33
+ hasPrev: z.ZodBoolean;
34
+ }, z.core.$strip>;
35
+ }, z.core.$strip>;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createPaginatedResponseSchema = exports.PaginationMetaSchema = exports.PaginationQuerySchema = void 0;
4
+ const zod_1 = require("zod");
5
+ /**
6
+ * Pagination query params schema
7
+ */
8
+ exports.PaginationQuerySchema = zod_1.z.object({
9
+ page: zod_1.z.coerce.number().int().positive().default(1),
10
+ limit: zod_1.z.coerce.number().int().positive().max(100).default(10),
11
+ });
12
+ /**
13
+ * Pagination metadata schema
14
+ */
15
+ exports.PaginationMetaSchema = zod_1.z.object({
16
+ page: zod_1.z.number().int().positive(),
17
+ limit: zod_1.z.number().int().positive(),
18
+ total: zod_1.z.number().int().nonnegative(),
19
+ totalPages: zod_1.z.number().int().nonnegative(),
20
+ hasNext: zod_1.z.boolean(),
21
+ hasPrev: zod_1.z.boolean(),
22
+ });
23
+ /**
24
+ * Paginated response schema
25
+ */
26
+ const createPaginatedResponseSchema = (itemSchema) => zod_1.z.object({
27
+ data: zod_1.z.array(itemSchema),
28
+ meta: exports.PaginationMetaSchema,
29
+ });
30
+ exports.createPaginatedResponseSchema = createPaginatedResponseSchema;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Common regex patterns for validation
3
+ */
4
+ export declare const EMAIL_REGEX: RegExp;
5
+ export declare const UUID_REGEX: RegExp;
6
+ export declare const DATETIME_REGEX: RegExp;
7
+ export declare const PASSWORD_STRENGTH_REGEX: RegExp;
8
+ export declare const SLUG_REGEX: RegExp;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ /**
3
+ * Common regex patterns for validation
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.SLUG_REGEX = exports.PASSWORD_STRENGTH_REGEX = exports.DATETIME_REGEX = exports.UUID_REGEX = exports.EMAIL_REGEX = void 0;
7
+ // RFC 5322 email regex (simplified)
8
+ exports.EMAIL_REGEX = /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
9
+ // UUID v4 regex
10
+ exports.UUID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
11
+ // ISO 8601 datetime regex
12
+ exports.DATETIME_REGEX = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{3})?Z$/;
13
+ // Password strength regex (at least one number or special character)
14
+ exports.PASSWORD_STRENGTH_REGEX = /[0-9!@#$%^&*(),.?":{}|<>]/;
15
+ // Slug/alias regex (lowercase letters, numbers, hyphens)
16
+ exports.SLUG_REGEX = /^[a-z0-9-]+$/;
@@ -0,0 +1 @@
1
+ export * from './path-builder';
@@ -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("./path-builder"), exports);
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Build URL path with parameters
3
+ * @example
4
+ * buildPath('/users/:id', { id: '123' }) // '/users/123'
5
+ * buildPath('/users/:id/posts/:postId', { id: '1', postId: '2' }) // '/users/1/posts/2'
6
+ */
7
+ export declare function buildPath(pattern: string, params?: Record<string, string | number>): string;
8
+ /**
9
+ * Build URL with query parameters
10
+ * @example
11
+ * buildUrl('/users', { page: 1, limit: 10 }) // '/users?page=1&limit=10'
12
+ */
13
+ export declare function buildUrl(path: string, queryParams?: Record<string, string | number | boolean | undefined>): string;
14
+ /**
15
+ * Build full URL with path params and query params
16
+ * @example
17
+ * buildFullUrl('/users/:id', { id: '123' }, { include: 'posts' })
18
+ * // '/users/123?include=posts'
19
+ */
20
+ export declare function buildFullUrl(pattern: string, pathParams?: Record<string, string | number>, queryParams?: Record<string, string | number | boolean | undefined>): string;