@veruna/api-contracts 1.0.8 → 1.0.10

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 (153) hide show
  1. package/build/controllers/auth.controllers.d.ts +4 -0
  2. package/build/controllers/blog.controllers.d.ts +7 -0
  3. package/build/controllers/index.d.ts +7 -0
  4. package/build/controllers/index.js +17 -0
  5. package/build/controllers/unreg-users.controllers.d.ts +4 -0
  6. package/build/controllers/users.controllers.d.ts +4 -0
  7. package/build/index.d.ts +5 -0
  8. package/build/index.js +1 -0
  9. package/build/locales/en.d.ts +31 -0
  10. package/build/locales/index.d.ts +66 -0
  11. package/build/locales/ru.d.ts +30 -0
  12. package/build/rest-api.d.ts +52 -0
  13. package/build/rest-api.js +12 -18
  14. package/build/routes/auth.routes.d.ts +12 -0
  15. package/build/{v1/auth/routes → routes}/auth.routes.js +1 -1
  16. package/build/routes/blog-admin-categories.routes.d.ts +11 -0
  17. package/build/routes/blog-admin-posts.routes.d.ts +10 -0
  18. package/build/routes/blog-public.routes.d.ts +10 -0
  19. package/build/routes/index.d.ts +9 -0
  20. package/build/routes/index.js +19 -0
  21. package/build/routes/unreg-users.routes.d.ts +6 -0
  22. package/build/routes/users.routes.d.ts +9 -0
  23. package/build/shared/common-schemas.d.ts +12 -0
  24. package/build/shared/error-response.schema.d.ts +25 -0
  25. package/build/shared/http-method.d.ts +10 -0
  26. package/build/shared/index.d.ts +2 -0
  27. package/build/shared/pagination.schema.d.ts +35 -0
  28. package/build/shared/regex.d.ts +8 -0
  29. package/build/utils/index.d.ts +1 -0
  30. package/build/utils/path-builder.d.ts +20 -0
  31. package/build/v1/auth/auth.errors.d.ts +12 -0
  32. package/build/v1/auth/auth.paths.d.ts +17 -0
  33. package/build/v1/auth/auth.paths.js +2 -2
  34. package/build/v1/auth/auth.types.d.ts +8 -0
  35. package/build/v1/auth/commands/delete-session.command.d.ts +12 -0
  36. package/build/v1/auth/commands/delete-session.command.js +1 -3
  37. package/build/v1/auth/commands/index.d.ts +5 -0
  38. package/build/v1/auth/commands/index.js +1 -1
  39. package/build/v1/auth/commands/logout-all.command.d.ts +12 -0
  40. package/build/v1/auth/commands/logout-all.command.js +1 -3
  41. package/build/v1/auth/commands/logout.command.d.ts +12 -0
  42. package/build/v1/auth/commands/logout.command.js +1 -3
  43. package/build/v1/auth/commands/signin.command.d.ts +31 -0
  44. package/build/v1/auth/commands/signin.command.js +16 -0
  45. package/build/v1/auth/commands/signup.command.d.ts +33 -0
  46. package/build/v1/auth/commands/signup.command.js +1 -3
  47. package/build/v1/auth/index.d.ts +8 -0
  48. package/build/v1/auth/index.js +6 -2
  49. package/build/v1/auth/queries/get-sessions.query.d.ts +19 -0
  50. package/build/v1/auth/queries/get-sessions.query.js +1 -3
  51. package/build/v1/auth/queries/index.d.ts +1 -0
  52. package/build/v1/auth/schemas/auth-response.schema.d.ts +36 -0
  53. package/build/v1/auth/schemas/index.d.ts +5 -0
  54. package/build/v1/auth/schemas/index.js +1 -1
  55. package/build/v1/auth/schemas/session-response.schema.d.ts +13 -0
  56. package/build/v1/auth/schemas/signin-request.schema.d.ts +9 -0
  57. package/build/v1/auth/schemas/{login-request.schema.js → signin-request.schema.js} +3 -3
  58. package/build/v1/auth/schemas/signup-request.schema.d.ts +11 -0
  59. package/build/v1/auth/schemas/signup-request.schema.js +1 -12
  60. package/build/v1/auth/schemas/user-role.enum.d.ts +7 -0
  61. package/build/v1/blog/admin/commands/create-category.command.d.ts +23 -0
  62. package/build/v1/blog/admin/commands/create-category.command.js +0 -2
  63. package/build/v1/blog/admin/commands/create-post.command.d.ts +42 -0
  64. package/build/v1/blog/admin/commands/create-post.command.js +0 -2
  65. package/build/v1/blog/admin/commands/delete-category.command.d.ts +10 -0
  66. package/build/v1/blog/admin/commands/delete-category.command.js +0 -2
  67. package/build/v1/blog/admin/commands/delete-post.command.d.ts +10 -0
  68. package/build/v1/blog/admin/commands/delete-post.command.js +0 -2
  69. package/build/v1/blog/admin/commands/index.d.ts +6 -0
  70. package/build/v1/blog/admin/commands/update-category.command.d.ts +23 -0
  71. package/build/v1/blog/admin/commands/update-category.command.js +0 -2
  72. package/build/v1/blog/admin/commands/update-post.command.d.ts +42 -0
  73. package/build/v1/blog/admin/commands/update-post.command.js +0 -2
  74. package/build/v1/blog/admin/queries/get-categories.query.d.ts +23 -0
  75. package/build/v1/blog/admin/queries/get-categories.query.js +0 -2
  76. package/build/v1/blog/admin/queries/get-category.query.d.ts +18 -0
  77. package/build/v1/blog/admin/queries/get-category.query.js +0 -2
  78. package/build/v1/blog/admin/queries/get-post.query.d.ts +32 -0
  79. package/build/v1/blog/admin/queries/get-post.query.js +0 -2
  80. package/build/v1/blog/admin/queries/get-posts.query.d.ts +47 -0
  81. package/build/v1/blog/admin/queries/get-posts.query.js +0 -2
  82. package/build/v1/blog/admin/queries/index.d.ts +4 -0
  83. package/build/v1/blog/blog.paths.d.ts +36 -0
  84. package/build/v1/blog/blog.types.d.ts +12 -0
  85. package/build/v1/blog/index.d.ts +8 -0
  86. package/build/v1/blog/index.js +12 -2
  87. package/build/v1/blog/public/queries/get-categories.query.d.ts +20 -0
  88. package/build/v1/blog/public/queries/get-categories.query.js +0 -2
  89. package/build/v1/blog/public/queries/get-post-by-alias.query.d.ts +32 -0
  90. package/build/v1/blog/public/queries/get-post-by-alias.query.js +0 -2
  91. package/build/v1/blog/public/queries/get-posts.query.d.ts +46 -0
  92. package/build/v1/blog/public/queries/get-posts.query.js +0 -2
  93. package/build/v1/blog/public/queries/index.d.ts +3 -0
  94. package/build/v1/blog/schemas/blog-category-status.enum.d.ts +8 -0
  95. package/build/v1/blog/schemas/blog-post-status.enum.d.ts +8 -0
  96. package/build/v1/blog/schemas/category-response.schema.d.ts +14 -0
  97. package/build/v1/blog/schemas/create-category-request.schema.d.ts +8 -0
  98. package/build/v1/blog/schemas/create-post-request.schema.d.ts +13 -0
  99. package/build/v1/blog/schemas/get-posts-query.schema.d.ts +13 -0
  100. package/build/v1/blog/schemas/index.d.ts +9 -0
  101. package/build/v1/blog/schemas/post-response.schema.d.ts +28 -0
  102. package/build/v1/blog/schemas/update-category-request.schema.d.ts +8 -0
  103. package/build/v1/blog/schemas/update-post-request.schema.d.ts +13 -0
  104. package/build/v1/index.d.ts +2 -0
  105. package/build/v1/unregistered-users/commands/authenticate.command.d.ts +24 -0
  106. package/build/v1/unregistered-users/commands/authenticate.command.js +0 -2
  107. package/build/v1/unregistered-users/commands/index.d.ts +1 -0
  108. package/build/v1/unregistered-users/index.d.ts +7 -0
  109. package/build/v1/unregistered-users/index.js +6 -0
  110. package/build/v1/unregistered-users/schemas/authenticate-request.schema.d.ts +24 -0
  111. package/build/v1/unregistered-users/schemas/authenticate-request.schema.js +12 -1
  112. package/build/v1/unregistered-users/schemas/authenticate-response.schema.d.ts +11 -0
  113. package/build/v1/unregistered-users/schemas/index.d.ts +3 -0
  114. package/build/v1/unregistered-users/schemas/unreg-user-status.enum.d.ts +8 -0
  115. package/build/v1/unregistered-users/unregistered-users.errors.d.ts +15 -0
  116. package/build/v1/unregistered-users/unregistered-users.paths.d.ts +15 -0
  117. package/build/v1/unregistered-users/unregistered-users.types.d.ts +9 -0
  118. package/build/v1/users/commands/change-password.command.d.ts +16 -0
  119. package/build/v1/users/commands/change-password.command.js +7 -6
  120. package/build/v1/users/commands/delete-account.command.d.ts +12 -0
  121. package/build/v1/users/commands/delete-account.command.js +4 -4
  122. package/build/v1/users/commands/index.d.ts +4 -0
  123. package/build/v1/users/commands/toggle-marketing-consent.command.d.ts +19 -0
  124. package/build/v1/users/commands/toggle-marketing-consent.command.js +2 -4
  125. package/build/v1/users/commands/update-profile.command.d.ts +19 -0
  126. package/build/v1/users/commands/update-profile.command.js +2 -4
  127. package/build/v1/users/index.d.ts +7 -0
  128. package/build/v1/users/index.js +6 -2
  129. package/build/v1/users/queries/get-current-user.query.d.ts +17 -0
  130. package/build/v1/users/queries/get-current-user.query.js +0 -2
  131. package/build/v1/users/queries/index.d.ts +1 -0
  132. package/build/v1/users/schemas/change-password-request.schema.d.ts +10 -0
  133. package/build/v1/users/schemas/delete-account-request.schema.d.ts +5 -0
  134. package/build/v1/users/schemas/index.d.ts +6 -0
  135. package/build/v1/users/schemas/response-unions.schema.d.ts +34 -0
  136. package/build/v1/users/schemas/response-unions.schema.js +6 -6
  137. package/build/v1/users/schemas/toggle-marketing-consent-request.schema.d.ts +7 -0
  138. package/build/v1/users/schemas/update-profile-request.schema.d.ts +8 -0
  139. package/build/v1/users/schemas/user-response.schema.d.ts +12 -0
  140. package/build/v1/users/users.paths.d.ts +11 -0
  141. package/build/v1/users/users.types.d.ts +11 -0
  142. package/package.json +1 -1
  143. package/build/v1/auth/commands/login.command.js +0 -18
  144. package/build/v1/blog/routes/index.js +0 -19
  145. /package/build/{v1/auth/controllers.js → controllers/auth.controllers.js} +0 -0
  146. /package/build/{v1/blog/controllers.js → controllers/blog.controllers.js} +0 -0
  147. /package/build/{v1/unregistered-users/controllers.js → controllers/unreg-users.controllers.js} +0 -0
  148. /package/build/{v1/users/controllers.js → controllers/users.controllers.js} +0 -0
  149. /package/build/{v1/blog/routes → routes}/blog-admin-categories.routes.js +0 -0
  150. /package/build/{v1/blog/routes → routes}/blog-admin-posts.routes.js +0 -0
  151. /package/build/{v1/blog/routes → routes}/blog-public.routes.js +0 -0
  152. /package/build/{v1/unregistered-users/routes → routes}/unreg-users.routes.js +0 -0
  153. /package/build/{v1/users/routes → routes}/users.routes.js +0 -0
@@ -0,0 +1,5 @@
1
+ export * from './signup.command';
2
+ export * from './signin.command';
3
+ export * from './logout.command';
4
+ export * from './logout-all.command';
5
+ export * from './delete-session.command';
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./signup.command"), exports);
18
- __exportStar(require("./login.command"), exports);
18
+ __exportStar(require("./signin.command"), exports);
19
19
  __exportStar(require("./logout.command"), exports);
20
20
  __exportStar(require("./logout-all.command"), exports);
21
21
  __exportStar(require("./delete-session.command"), exports);
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+ import { HttpMethod } from '../../../shared/http-method';
3
+ export declare namespace AuthLogoutAllCommand {
4
+ const Request: z.ZodObject<{}, z.core.$strip>;
5
+ const Response: z.ZodObject<{
6
+ sessionIds: z.ZodArray<z.ZodString>;
7
+ }, z.core.$strip>;
8
+ const URL: "/api/v1/auth/logout-all";
9
+ const METHOD = HttpMethod.POST;
10
+ type RequestType = z.infer<typeof Request>;
11
+ type ResponseType = z.infer<typeof Response>;
12
+ }
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AuthLogoutAllCommand = void 0;
4
4
  const zod_1 = require("zod");
5
- const auth_routes_1 = require("../routes/auth.routes");
6
5
  const rest_api_1 = require("../../../rest-api");
7
6
  const http_method_1 = require("../../../shared/http-method");
8
7
  var AuthLogoutAllCommand;
@@ -12,8 +11,7 @@ var AuthLogoutAllCommand;
12
11
  AuthLogoutAllCommand.Response = zod_1.z.object({
13
12
  sessionIds: zod_1.z.array(zod_1.z.string().uuid()),
14
13
  });
15
- // Path/URL/Method
16
- AuthLogoutAllCommand.PATH = auth_routes_1.AUTH_ROUTES.LOGOUT_ALL;
14
+ // URL/Method
17
15
  AuthLogoutAllCommand.URL = rest_api_1.REST_API.V1.AUTH.LOGOUT_ALL;
18
16
  AuthLogoutAllCommand.METHOD = http_method_1.HttpMethod.POST;
19
17
  })(AuthLogoutAllCommand || (exports.AuthLogoutAllCommand = AuthLogoutAllCommand = {}));
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+ import { HttpMethod } from '../../../shared/http-method';
3
+ export declare namespace AuthLogoutCommand {
4
+ const Request: z.ZodObject<{}, z.core.$strip>;
5
+ const Response: z.ZodObject<{
6
+ sessionId: z.ZodString;
7
+ }, z.core.$strip>;
8
+ const URL: "/api/v1/auth/logout";
9
+ const METHOD = HttpMethod.POST;
10
+ type RequestType = z.infer<typeof Request>;
11
+ type ResponseType = z.infer<typeof Response>;
12
+ }
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AuthLogoutCommand = void 0;
4
4
  const zod_1 = require("zod");
5
- const auth_routes_1 = require("../routes/auth.routes");
6
5
  const rest_api_1 = require("../../../rest-api");
7
6
  const http_method_1 = require("../../../shared/http-method");
8
7
  var AuthLogoutCommand;
@@ -12,8 +11,7 @@ var AuthLogoutCommand;
12
11
  AuthLogoutCommand.Response = zod_1.z.object({
13
12
  sessionId: zod_1.z.string().uuid(),
14
13
  });
15
- // Path/URL/Method
16
- AuthLogoutCommand.PATH = auth_routes_1.AUTH_ROUTES.LOGOUT;
14
+ // URL/Method
17
15
  AuthLogoutCommand.URL = rest_api_1.REST_API.V1.AUTH.LOGOUT;
18
16
  AuthLogoutCommand.METHOD = http_method_1.HttpMethod.POST;
19
17
  })(AuthLogoutCommand || (exports.AuthLogoutCommand = AuthLogoutCommand = {}));
@@ -0,0 +1,31 @@
1
+ import { z } from 'zod';
2
+ import { HttpMethod } from '../../../shared/http-method';
3
+ export declare namespace AuthSignInCommand {
4
+ const Request: z.ZodObject<{
5
+ email: z.ZodString;
6
+ password: z.ZodString;
7
+ }, z.core.$strip>;
8
+ const Response: z.ZodObject<{
9
+ user: z.ZodObject<{
10
+ uuid: z.ZodString;
11
+ email: z.ZodString;
12
+ name: z.ZodString;
13
+ role: z.ZodString;
14
+ marketingConsent: z.ZodBoolean;
15
+ createdAt: z.ZodString;
16
+ }, z.core.$strip>;
17
+ accessToken: z.ZodString;
18
+ session: z.ZodObject<{
19
+ uuid: z.ZodString;
20
+ deviceName: z.ZodString;
21
+ ip: z.ZodString;
22
+ isCurrent: z.ZodBoolean;
23
+ createdAt: z.ZodString;
24
+ lastUsedAt: z.ZodString;
25
+ }, z.core.$strip>;
26
+ }, z.core.$strip>;
27
+ const URL: "/api/v1/auth/signin";
28
+ const METHOD = HttpMethod.POST;
29
+ type RequestType = z.infer<typeof Request>;
30
+ type ResponseType = z.infer<typeof Response>;
31
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuthSignInCommand = void 0;
4
+ const signin_request_schema_1 = require("../schemas/signin-request.schema");
5
+ const auth_response_schema_1 = require("../schemas/auth-response.schema");
6
+ const rest_api_1 = require("../../../rest-api");
7
+ const http_method_1 = require("../../../shared/http-method");
8
+ var AuthSignInCommand;
9
+ (function (AuthSignInCommand) {
10
+ // Request/Response
11
+ AuthSignInCommand.Request = signin_request_schema_1.SignInRequestSchema;
12
+ AuthSignInCommand.Response = auth_response_schema_1.AuthResponseSchema;
13
+ // URL/Method
14
+ AuthSignInCommand.URL = rest_api_1.REST_API.V1.AUTH.SIGNIN;
15
+ AuthSignInCommand.METHOD = http_method_1.HttpMethod.POST;
16
+ })(AuthSignInCommand || (exports.AuthSignInCommand = AuthSignInCommand = {}));
@@ -0,0 +1,33 @@
1
+ import { z } from 'zod';
2
+ import { HttpMethod } from '../../../shared/http-method';
3
+ export declare namespace AuthSignupCommand {
4
+ const Request: z.ZodObject<{
5
+ email: z.ZodString;
6
+ password: z.ZodString;
7
+ name: z.ZodString;
8
+ marketingConsent: z.ZodDefault<z.ZodBoolean>;
9
+ }, z.core.$strip>;
10
+ const Response: z.ZodObject<{
11
+ user: z.ZodObject<{
12
+ uuid: z.ZodString;
13
+ email: z.ZodString;
14
+ name: z.ZodString;
15
+ role: z.ZodString;
16
+ marketingConsent: z.ZodBoolean;
17
+ createdAt: z.ZodString;
18
+ }, z.core.$strip>;
19
+ accessToken: z.ZodString;
20
+ session: z.ZodObject<{
21
+ uuid: z.ZodString;
22
+ deviceName: z.ZodString;
23
+ ip: z.ZodString;
24
+ isCurrent: z.ZodBoolean;
25
+ createdAt: z.ZodString;
26
+ lastUsedAt: z.ZodString;
27
+ }, z.core.$strip>;
28
+ }, z.core.$strip>;
29
+ const URL: "/api/v1/auth/signup";
30
+ const METHOD = HttpMethod.POST;
31
+ type RequestType = z.infer<typeof Request>;
32
+ type ResponseType = z.infer<typeof Response>;
33
+ }
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AuthSignupCommand = void 0;
4
4
  const signup_request_schema_1 = require("../schemas/signup-request.schema");
5
5
  const auth_response_schema_1 = require("../schemas/auth-response.schema");
6
- const auth_routes_1 = require("../routes/auth.routes");
7
6
  const rest_api_1 = require("../../../rest-api");
8
7
  const http_method_1 = require("../../../shared/http-method");
9
8
  var AuthSignupCommand;
@@ -11,8 +10,7 @@ var AuthSignupCommand;
11
10
  // Request/Response
12
11
  AuthSignupCommand.Request = signup_request_schema_1.SignUpRequestSchema;
13
12
  AuthSignupCommand.Response = auth_response_schema_1.AuthResponseSchema;
14
- // Path/URL/Method
15
- AuthSignupCommand.PATH = auth_routes_1.AUTH_ROUTES.SIGNUP;
13
+ // URL/Method
16
14
  AuthSignupCommand.URL = rest_api_1.REST_API.V1.AUTH.SIGNUP;
17
15
  AuthSignupCommand.METHOD = http_method_1.HttpMethod.POST;
18
16
  })(AuthSignupCommand || (exports.AuthSignupCommand = AuthSignupCommand = {}));
@@ -0,0 +1,8 @@
1
+ export * from './schemas';
2
+ export * from './auth.types';
3
+ export * from './auth.paths';
4
+ export * from './auth.errors';
5
+ export * from './commands';
6
+ export * from './queries';
7
+ export { AUTH_CONTROLLER } from '../../controllers';
8
+ export { AUTH_ROUTES } from '../../routes';
@@ -14,11 +14,15 @@ 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
+ exports.AUTH_ROUTES = exports.AUTH_CONTROLLER = void 0;
17
18
  __exportStar(require("./schemas"), exports);
18
19
  __exportStar(require("./auth.types"), exports);
19
20
  __exportStar(require("./auth.paths"), exports);
20
21
  __exportStar(require("./auth.errors"), exports);
21
- __exportStar(require("./controllers"), exports);
22
- __exportStar(require("./routes/auth.routes"), exports);
23
22
  __exportStar(require("./commands"), exports);
24
23
  __exportStar(require("./queries"), exports);
24
+ // Re-export from centralized locations
25
+ var controllers_1 = require("../../controllers");
26
+ Object.defineProperty(exports, "AUTH_CONTROLLER", { enumerable: true, get: function () { return controllers_1.AUTH_CONTROLLER; } });
27
+ var routes_1 = require("../../routes");
28
+ Object.defineProperty(exports, "AUTH_ROUTES", { enumerable: true, get: function () { return routes_1.AUTH_ROUTES; } });
@@ -0,0 +1,19 @@
1
+ import { z } from 'zod';
2
+ import { HttpMethod } from '../../../shared/http-method';
3
+ export declare namespace AuthGetSessionsQuery {
4
+ const Request: z.ZodObject<{}, z.core.$strip>;
5
+ const Response: z.ZodObject<{
6
+ sessions: z.ZodArray<z.ZodObject<{
7
+ uuid: z.ZodString;
8
+ deviceName: z.ZodString;
9
+ ip: z.ZodString;
10
+ isCurrent: z.ZodBoolean;
11
+ createdAt: z.ZodString;
12
+ lastUsedAt: z.ZodString;
13
+ }, z.core.$strip>>;
14
+ }, z.core.$strip>;
15
+ const URL: "/api/v1/auth/sessions";
16
+ const METHOD = HttpMethod.GET;
17
+ type RequestType = z.infer<typeof Request>;
18
+ type ResponseType = z.infer<typeof Response>;
19
+ }
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AuthGetSessionsQuery = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const auth_response_schema_1 = require("../schemas/auth-response.schema");
6
- const auth_routes_1 = require("../routes/auth.routes");
7
6
  const rest_api_1 = require("../../../rest-api");
8
7
  const http_method_1 = require("../../../shared/http-method");
9
8
  var AuthGetSessionsQuery;
@@ -11,8 +10,7 @@ var AuthGetSessionsQuery;
11
10
  // Request/Response
12
11
  AuthGetSessionsQuery.Request = zod_1.z.object({});
13
12
  AuthGetSessionsQuery.Response = auth_response_schema_1.SessionsListResponseSchema;
14
- // Path/URL/Method
15
- AuthGetSessionsQuery.PATH = auth_routes_1.AUTH_ROUTES.SESSIONS;
13
+ // URL/Method
16
14
  AuthGetSessionsQuery.URL = rest_api_1.REST_API.V1.AUTH.SESSIONS;
17
15
  AuthGetSessionsQuery.METHOD = http_method_1.HttpMethod.GET;
18
16
  })(AuthGetSessionsQuery || (exports.AuthGetSessionsQuery = AuthGetSessionsQuery = {}));
@@ -0,0 +1 @@
1
+ export * from './get-sessions.query';
@@ -0,0 +1,36 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Auth Response Schema (signup/login)
4
+ */
5
+ export declare const AuthResponseSchema: z.ZodObject<{
6
+ user: z.ZodObject<{
7
+ uuid: z.ZodString;
8
+ email: z.ZodString;
9
+ name: z.ZodString;
10
+ role: z.ZodString;
11
+ marketingConsent: z.ZodBoolean;
12
+ createdAt: z.ZodString;
13
+ }, z.core.$strip>;
14
+ accessToken: z.ZodString;
15
+ session: z.ZodObject<{
16
+ uuid: z.ZodString;
17
+ deviceName: z.ZodString;
18
+ ip: z.ZodString;
19
+ isCurrent: z.ZodBoolean;
20
+ createdAt: z.ZodString;
21
+ lastUsedAt: z.ZodString;
22
+ }, z.core.$strip>;
23
+ }, z.core.$strip>;
24
+ /**
25
+ * Sessions List Response Schema
26
+ */
27
+ export declare const SessionsListResponseSchema: z.ZodObject<{
28
+ sessions: z.ZodArray<z.ZodObject<{
29
+ uuid: z.ZodString;
30
+ deviceName: z.ZodString;
31
+ ip: z.ZodString;
32
+ isCurrent: z.ZodBoolean;
33
+ createdAt: z.ZodString;
34
+ lastUsedAt: z.ZodString;
35
+ }, z.core.$strip>>;
36
+ }, z.core.$strip>;
@@ -0,0 +1,5 @@
1
+ export * from './user-role.enum';
2
+ export * from './signup-request.schema';
3
+ export * from './signin-request.schema';
4
+ export * from './session-response.schema';
5
+ export * from './auth-response.schema';
@@ -16,6 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./user-role.enum"), exports);
18
18
  __exportStar(require("./signup-request.schema"), exports);
19
- __exportStar(require("./login-request.schema"), exports);
19
+ __exportStar(require("./signin-request.schema"), exports);
20
20
  __exportStar(require("./session-response.schema"), exports);
21
21
  __exportStar(require("./auth-response.schema"), exports);
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Session Response Schema
4
+ * Error messages are in locales (en.ts, ru.ts)
5
+ */
6
+ export declare const SessionResponseSchema: z.ZodObject<{
7
+ uuid: z.ZodString;
8
+ deviceName: z.ZodString;
9
+ ip: z.ZodString;
10
+ isCurrent: z.ZodBoolean;
11
+ createdAt: z.ZodString;
12
+ lastUsedAt: z.ZodString;
13
+ }, z.core.$strip>;
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * SignIn Request Schema
4
+ * Error messages are in locales (en.ts, ru.ts)
5
+ */
6
+ export declare const SignInRequestSchema: z.ZodObject<{
7
+ email: z.ZodString;
8
+ password: z.ZodString;
9
+ }, z.core.$strip>;
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LoginRequestSchema = void 0;
3
+ exports.SignInRequestSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const regex_1 = require("../../../shared/regex");
6
6
  /**
7
- * Login Request Schema
7
+ * SignIn Request Schema
8
8
  * Error messages are in locales (en.ts, ru.ts)
9
9
  */
10
- exports.LoginRequestSchema = zod_1.z.object({
10
+ exports.SignInRequestSchema = zod_1.z.object({
11
11
  email: zod_1.z.string().regex(regex_1.EMAIL_REGEX),
12
12
  password: zod_1.z.string().min(1),
13
13
  });
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Sign Up Request Schema
4
+ * Error messages are in locales (en.ts, ru.ts)
5
+ */
6
+ export declare const SignUpRequestSchema: z.ZodObject<{
7
+ email: z.ZodString;
8
+ password: z.ZodString;
9
+ name: z.ZodString;
10
+ marketingConsent: z.ZodDefault<z.ZodBoolean>;
11
+ }, z.core.$strip>;
@@ -1,18 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SignUpRequestSchema = exports.UtmSchema = void 0;
3
+ exports.SignUpRequestSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const regex_1 = require("../../../shared/regex");
6
- /**
7
- * UTM Schema
8
- */
9
- exports.UtmSchema = zod_1.z.object({
10
- utmSource: zod_1.z.string().optional(),
11
- utmMedium: zod_1.z.string().optional(),
12
- utmCampaign: zod_1.z.string().optional(),
13
- utmContent: zod_1.z.string().optional(),
14
- utmTerm: zod_1.z.string().optional(),
15
- });
16
6
  /**
17
7
  * Sign Up Request Schema
18
8
  * Error messages are in locales (en.ts, ru.ts)
@@ -22,5 +12,4 @@ exports.SignUpRequestSchema = zod_1.z.object({
22
12
  password: zod_1.z.string().min(8).max(128).regex(regex_1.PASSWORD_STRENGTH_REGEX),
23
13
  name: zod_1.z.string().min(2),
24
14
  marketingConsent: zod_1.z.boolean().default(false),
25
- utm: exports.UtmSchema.optional(),
26
15
  });
@@ -0,0 +1,7 @@
1
+ /**
2
+ * User Role enum
3
+ */
4
+ export declare enum UserRole {
5
+ USER = "user",
6
+ ADMIN = "admin"
7
+ }
@@ -0,0 +1,23 @@
1
+ import { z } from 'zod';
2
+ import { HttpMethod } from '../../../../shared/http-method';
3
+ export declare namespace AdminBlogCreateCategoryCommand {
4
+ const Request: z.ZodObject<{
5
+ alias: z.ZodString;
6
+ title: z.ZodString;
7
+ order: z.ZodDefault<z.ZodNumber>;
8
+ status: z.ZodDefault<z.ZodEnum<typeof import("../../schemas").BlogCategoryStatus>>;
9
+ }, z.core.$strip>;
10
+ const Response: z.ZodObject<{
11
+ uuid: z.ZodString;
12
+ alias: z.ZodString;
13
+ title: z.ZodString;
14
+ order: z.ZodNumber;
15
+ status: z.ZodEnum<typeof import("../../schemas").BlogCategoryStatus>;
16
+ createdAt: z.ZodString;
17
+ updatedAt: z.ZodString;
18
+ }, z.core.$strip>;
19
+ const URL: "/api/v1/admin/blog/categories/";
20
+ const METHOD = HttpMethod.POST;
21
+ type RequestType = z.infer<typeof Request>;
22
+ type ResponseType = z.infer<typeof Response>;
23
+ }
@@ -2,14 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AdminBlogCreateCategoryCommand = void 0;
4
4
  const schemas_1 = require("../../schemas");
5
- const blog_admin_categories_routes_1 = require("../../routes/blog-admin-categories.routes");
6
5
  const rest_api_1 = require("../../../../rest-api");
7
6
  const http_method_1 = require("../../../../shared/http-method");
8
7
  var AdminBlogCreateCategoryCommand;
9
8
  (function (AdminBlogCreateCategoryCommand) {
10
9
  AdminBlogCreateCategoryCommand.Request = schemas_1.CreateCategoryRequestSchema;
11
10
  AdminBlogCreateCategoryCommand.Response = schemas_1.CategoryResponseSchema;
12
- AdminBlogCreateCategoryCommand.PATH = blog_admin_categories_routes_1.BLOG_ADMIN_CATEGORIES_ROUTES.CREATE;
13
11
  AdminBlogCreateCategoryCommand.URL = rest_api_1.REST_API.V1.BLOG.ADMIN.CATEGORIES.CREATE;
14
12
  AdminBlogCreateCategoryCommand.METHOD = http_method_1.HttpMethod.POST;
15
13
  })(AdminBlogCreateCategoryCommand || (exports.AdminBlogCreateCategoryCommand = AdminBlogCreateCategoryCommand = {}));
@@ -0,0 +1,42 @@
1
+ import { z } from 'zod';
2
+ import { HttpMethod } from '../../../../shared/http-method';
3
+ export declare namespace AdminBlogCreatePostCommand {
4
+ const Request: z.ZodObject<{
5
+ alias: z.ZodString;
6
+ title: z.ZodString;
7
+ metaTitle: z.ZodString;
8
+ metaDescription: z.ZodString;
9
+ content: z.ZodString;
10
+ image: z.ZodString;
11
+ author: z.ZodString;
12
+ categoryIds: z.ZodArray<z.ZodString>;
13
+ status: z.ZodDefault<z.ZodEnum<typeof import("../../schemas").BlogPostStatus>>;
14
+ }, z.core.$strip>;
15
+ const Response: z.ZodObject<{
16
+ uuid: z.ZodString;
17
+ alias: z.ZodString;
18
+ title: z.ZodString;
19
+ metaTitle: z.ZodString;
20
+ metaDescription: z.ZodString;
21
+ content: z.ZodString;
22
+ image: z.ZodString;
23
+ author: z.ZodString;
24
+ categories: z.ZodArray<z.ZodObject<{
25
+ uuid: z.ZodString;
26
+ alias: z.ZodString;
27
+ title: z.ZodString;
28
+ order: z.ZodNumber;
29
+ status: z.ZodEnum<typeof import("../../schemas").BlogCategoryStatus>;
30
+ createdAt: z.ZodString;
31
+ updatedAt: z.ZodString;
32
+ }, z.core.$strip>>;
33
+ viewsCount: z.ZodNumber;
34
+ status: z.ZodEnum<typeof import("../../schemas").BlogPostStatus>;
35
+ createdAt: z.ZodString;
36
+ updatedAt: z.ZodString;
37
+ }, z.core.$strip>;
38
+ const URL: "/api/v1/admin/blog/posts/";
39
+ const METHOD = HttpMethod.POST;
40
+ type RequestType = z.infer<typeof Request>;
41
+ type ResponseType = z.infer<typeof Response>;
42
+ }
@@ -2,14 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AdminBlogCreatePostCommand = void 0;
4
4
  const schemas_1 = require("../../schemas");
5
- const blog_admin_posts_routes_1 = require("../../routes/blog-admin-posts.routes");
6
5
  const rest_api_1 = require("../../../../rest-api");
7
6
  const http_method_1 = require("../../../../shared/http-method");
8
7
  var AdminBlogCreatePostCommand;
9
8
  (function (AdminBlogCreatePostCommand) {
10
9
  AdminBlogCreatePostCommand.Request = schemas_1.CreatePostRequestSchema;
11
10
  AdminBlogCreatePostCommand.Response = schemas_1.PostResponseSchema;
12
- AdminBlogCreatePostCommand.PATH = blog_admin_posts_routes_1.BLOG_ADMIN_POSTS_ROUTES.CREATE;
13
11
  AdminBlogCreatePostCommand.URL = rest_api_1.REST_API.V1.BLOG.ADMIN.POSTS.CREATE;
14
12
  AdminBlogCreatePostCommand.METHOD = http_method_1.HttpMethod.POST;
15
13
  })(AdminBlogCreatePostCommand || (exports.AdminBlogCreatePostCommand = AdminBlogCreatePostCommand = {}));
@@ -0,0 +1,10 @@
1
+ import { z } from 'zod';
2
+ import { HttpMethod } from '../../../../shared/http-method';
3
+ export declare namespace AdminBlogDeleteCategoryCommand {
4
+ const Request: z.ZodObject<{}, z.core.$strip>;
5
+ const Response: z.ZodObject<{}, z.core.$strip>;
6
+ const URL: (uuid: string) => string;
7
+ const METHOD = HttpMethod.DELETE;
8
+ type RequestType = z.infer<typeof Request>;
9
+ type ResponseType = z.infer<typeof Response>;
10
+ }
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AdminBlogDeleteCategoryCommand = void 0;
4
4
  const zod_1 = require("zod");
5
- const blog_admin_categories_routes_1 = require("../../routes/blog-admin-categories.routes");
6
5
  const rest_api_1 = require("../../../../rest-api");
7
6
  const http_method_1 = require("../../../../shared/http-method");
8
7
  const common_schemas_1 = require("../../../../shared/common-schemas");
@@ -10,7 +9,6 @@ var AdminBlogDeleteCategoryCommand;
10
9
  (function (AdminBlogDeleteCategoryCommand) {
11
10
  AdminBlogDeleteCategoryCommand.Request = zod_1.z.object({});
12
11
  AdminBlogDeleteCategoryCommand.Response = common_schemas_1.EmptyResponseSchema;
13
- AdminBlogDeleteCategoryCommand.PATH = blog_admin_categories_routes_1.BLOG_ADMIN_CATEGORIES_ROUTES.DELETE;
14
12
  AdminBlogDeleteCategoryCommand.URL = (uuid) => rest_api_1.REST_API.V1.BLOG.ADMIN.CATEGORIES.DELETE(uuid);
15
13
  AdminBlogDeleteCategoryCommand.METHOD = http_method_1.HttpMethod.DELETE;
16
14
  })(AdminBlogDeleteCategoryCommand || (exports.AdminBlogDeleteCategoryCommand = AdminBlogDeleteCategoryCommand = {}));
@@ -0,0 +1,10 @@
1
+ import { z } from 'zod';
2
+ import { HttpMethod } from '../../../../shared/http-method';
3
+ export declare namespace AdminBlogDeletePostCommand {
4
+ const Request: z.ZodObject<{}, z.core.$strip>;
5
+ const Response: z.ZodObject<{}, z.core.$strip>;
6
+ const URL: (uuid: string) => string;
7
+ const METHOD = HttpMethod.DELETE;
8
+ type RequestType = z.infer<typeof Request>;
9
+ type ResponseType = z.infer<typeof Response>;
10
+ }
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AdminBlogDeletePostCommand = void 0;
4
4
  const zod_1 = require("zod");
5
- const blog_admin_posts_routes_1 = require("../../routes/blog-admin-posts.routes");
6
5
  const rest_api_1 = require("../../../../rest-api");
7
6
  const http_method_1 = require("../../../../shared/http-method");
8
7
  const common_schemas_1 = require("../../../../shared/common-schemas");
@@ -10,7 +9,6 @@ var AdminBlogDeletePostCommand;
10
9
  (function (AdminBlogDeletePostCommand) {
11
10
  AdminBlogDeletePostCommand.Request = zod_1.z.object({});
12
11
  AdminBlogDeletePostCommand.Response = common_schemas_1.EmptyResponseSchema;
13
- AdminBlogDeletePostCommand.PATH = blog_admin_posts_routes_1.BLOG_ADMIN_POSTS_ROUTES.DELETE;
14
12
  AdminBlogDeletePostCommand.URL = (uuid) => rest_api_1.REST_API.V1.BLOG.ADMIN.POSTS.DELETE(uuid);
15
13
  AdminBlogDeletePostCommand.METHOD = http_method_1.HttpMethod.DELETE;
16
14
  })(AdminBlogDeletePostCommand || (exports.AdminBlogDeletePostCommand = AdminBlogDeletePostCommand = {}));
@@ -0,0 +1,6 @@
1
+ export * from './create-category.command';
2
+ export * from './update-category.command';
3
+ export * from './delete-category.command';
4
+ export * from './create-post.command';
5
+ export * from './update-post.command';
6
+ export * from './delete-post.command';
@@ -0,0 +1,23 @@
1
+ import { z } from 'zod';
2
+ import { HttpMethod } from '../../../../shared/http-method';
3
+ export declare namespace AdminBlogUpdateCategoryCommand {
4
+ const Request: z.ZodObject<{
5
+ alias: z.ZodOptional<z.ZodString>;
6
+ title: z.ZodOptional<z.ZodString>;
7
+ order: z.ZodOptional<z.ZodNumber>;
8
+ status: z.ZodOptional<z.ZodEnum<typeof import("../../schemas").BlogCategoryStatus>>;
9
+ }, z.core.$strip>;
10
+ const Response: z.ZodObject<{
11
+ uuid: z.ZodString;
12
+ alias: z.ZodString;
13
+ title: z.ZodString;
14
+ order: z.ZodNumber;
15
+ status: z.ZodEnum<typeof import("../../schemas").BlogCategoryStatus>;
16
+ createdAt: z.ZodString;
17
+ updatedAt: z.ZodString;
18
+ }, z.core.$strip>;
19
+ const URL: (uuid: string) => string;
20
+ const METHOD = HttpMethod.PATCH;
21
+ type RequestType = z.infer<typeof Request>;
22
+ type ResponseType = z.infer<typeof Response>;
23
+ }
@@ -2,14 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AdminBlogUpdateCategoryCommand = void 0;
4
4
  const schemas_1 = require("../../schemas");
5
- const blog_admin_categories_routes_1 = require("../../routes/blog-admin-categories.routes");
6
5
  const rest_api_1 = require("../../../../rest-api");
7
6
  const http_method_1 = require("../../../../shared/http-method");
8
7
  var AdminBlogUpdateCategoryCommand;
9
8
  (function (AdminBlogUpdateCategoryCommand) {
10
9
  AdminBlogUpdateCategoryCommand.Request = schemas_1.UpdateCategoryRequestSchema;
11
10
  AdminBlogUpdateCategoryCommand.Response = schemas_1.CategoryResponseSchema;
12
- AdminBlogUpdateCategoryCommand.PATH = blog_admin_categories_routes_1.BLOG_ADMIN_CATEGORIES_ROUTES.UPDATE;
13
11
  AdminBlogUpdateCategoryCommand.URL = (uuid) => rest_api_1.REST_API.V1.BLOG.ADMIN.CATEGORIES.UPDATE(uuid);
14
12
  AdminBlogUpdateCategoryCommand.METHOD = http_method_1.HttpMethod.PATCH;
15
13
  })(AdminBlogUpdateCategoryCommand || (exports.AdminBlogUpdateCategoryCommand = AdminBlogUpdateCategoryCommand = {}));