@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
@@ -0,0 +1,24 @@
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 PATH: "";
20
+ const URL: "/api/v1/admin/blog/categories/";
21
+ const METHOD = HttpMethod.POST;
22
+ type RequestType = z.infer<typeof Request>;
23
+ type ResponseType = z.infer<typeof Response>;
24
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdminBlogCreateCategoryCommand = void 0;
4
+ const schemas_1 = require("../../schemas");
5
+ const blog_admin_categories_routes_1 = require("../../routes/blog-admin-categories.routes");
6
+ const rest_api_1 = require("../../../../rest-api");
7
+ const http_method_1 = require("../../../../shared/http-method");
8
+ var AdminBlogCreateCategoryCommand;
9
+ (function (AdminBlogCreateCategoryCommand) {
10
+ AdminBlogCreateCategoryCommand.Request = schemas_1.CreateCategoryRequestSchema;
11
+ AdminBlogCreateCategoryCommand.Response = schemas_1.CategoryResponseSchema;
12
+ AdminBlogCreateCategoryCommand.PATH = blog_admin_categories_routes_1.BLOG_ADMIN_CATEGORIES_ROUTES.CREATE;
13
+ AdminBlogCreateCategoryCommand.URL = rest_api_1.REST_API.V1.BLOG.ADMIN.CATEGORIES.CREATE;
14
+ AdminBlogCreateCategoryCommand.METHOD = http_method_1.HttpMethod.POST;
15
+ })(AdminBlogCreateCategoryCommand || (exports.AdminBlogCreateCategoryCommand = AdminBlogCreateCategoryCommand = {}));
@@ -0,0 +1,43 @@
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 PATH: "";
39
+ const URL: "/api/v1/admin/blog/posts/";
40
+ const METHOD = HttpMethod.POST;
41
+ type RequestType = z.infer<typeof Request>;
42
+ type ResponseType = z.infer<typeof Response>;
43
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdminBlogCreatePostCommand = void 0;
4
+ const schemas_1 = require("../../schemas");
5
+ const blog_admin_posts_routes_1 = require("../../routes/blog-admin-posts.routes");
6
+ const rest_api_1 = require("../../../../rest-api");
7
+ const http_method_1 = require("../../../../shared/http-method");
8
+ var AdminBlogCreatePostCommand;
9
+ (function (AdminBlogCreatePostCommand) {
10
+ AdminBlogCreatePostCommand.Request = schemas_1.CreatePostRequestSchema;
11
+ AdminBlogCreatePostCommand.Response = schemas_1.PostResponseSchema;
12
+ AdminBlogCreatePostCommand.PATH = blog_admin_posts_routes_1.BLOG_ADMIN_POSTS_ROUTES.CREATE;
13
+ AdminBlogCreatePostCommand.URL = rest_api_1.REST_API.V1.BLOG.ADMIN.POSTS.CREATE;
14
+ AdminBlogCreatePostCommand.METHOD = http_method_1.HttpMethod.POST;
15
+ })(AdminBlogCreatePostCommand || (exports.AdminBlogCreatePostCommand = AdminBlogCreatePostCommand = {}));
@@ -0,0 +1,11 @@
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 PATH: ":uuid";
7
+ const URL: (uuid: string) => string;
8
+ const METHOD = HttpMethod.DELETE;
9
+ type RequestType = z.infer<typeof Request>;
10
+ type ResponseType = z.infer<typeof Response>;
11
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdminBlogDeleteCategoryCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const blog_admin_categories_routes_1 = require("../../routes/blog-admin-categories.routes");
6
+ const rest_api_1 = require("../../../../rest-api");
7
+ const http_method_1 = require("../../../../shared/http-method");
8
+ const common_schemas_1 = require("../../../../shared/common-schemas");
9
+ var AdminBlogDeleteCategoryCommand;
10
+ (function (AdminBlogDeleteCategoryCommand) {
11
+ AdminBlogDeleteCategoryCommand.Request = zod_1.z.object({});
12
+ AdminBlogDeleteCategoryCommand.Response = common_schemas_1.EmptyResponseSchema;
13
+ AdminBlogDeleteCategoryCommand.PATH = blog_admin_categories_routes_1.BLOG_ADMIN_CATEGORIES_ROUTES.DELETE;
14
+ AdminBlogDeleteCategoryCommand.URL = (uuid) => rest_api_1.REST_API.V1.BLOG.ADMIN.CATEGORIES.DELETE(uuid);
15
+ AdminBlogDeleteCategoryCommand.METHOD = http_method_1.HttpMethod.DELETE;
16
+ })(AdminBlogDeleteCategoryCommand || (exports.AdminBlogDeleteCategoryCommand = AdminBlogDeleteCategoryCommand = {}));
@@ -0,0 +1,11 @@
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 PATH: ":uuid";
7
+ const URL: (uuid: string) => string;
8
+ const METHOD = HttpMethod.DELETE;
9
+ type RequestType = z.infer<typeof Request>;
10
+ type ResponseType = z.infer<typeof Response>;
11
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdminBlogDeletePostCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const blog_admin_posts_routes_1 = require("../../routes/blog-admin-posts.routes");
6
+ const rest_api_1 = require("../../../../rest-api");
7
+ const http_method_1 = require("../../../../shared/http-method");
8
+ const common_schemas_1 = require("../../../../shared/common-schemas");
9
+ var AdminBlogDeletePostCommand;
10
+ (function (AdminBlogDeletePostCommand) {
11
+ AdminBlogDeletePostCommand.Request = zod_1.z.object({});
12
+ AdminBlogDeletePostCommand.Response = common_schemas_1.EmptyResponseSchema;
13
+ AdminBlogDeletePostCommand.PATH = blog_admin_posts_routes_1.BLOG_ADMIN_POSTS_ROUTES.DELETE;
14
+ AdminBlogDeletePostCommand.URL = (uuid) => rest_api_1.REST_API.V1.BLOG.ADMIN.POSTS.DELETE(uuid);
15
+ AdminBlogDeletePostCommand.METHOD = http_method_1.HttpMethod.DELETE;
16
+ })(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,22 @@
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("./create-category.command"), exports);
18
+ __exportStar(require("./update-category.command"), exports);
19
+ __exportStar(require("./delete-category.command"), exports);
20
+ __exportStar(require("./create-post.command"), exports);
21
+ __exportStar(require("./update-post.command"), exports);
22
+ __exportStar(require("./delete-post.command"), exports);
@@ -0,0 +1,24 @@
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 PATH: ":uuid";
20
+ const URL: (uuid: string) => string;
21
+ const METHOD = HttpMethod.PATCH;
22
+ type RequestType = z.infer<typeof Request>;
23
+ type ResponseType = z.infer<typeof Response>;
24
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdminBlogUpdateCategoryCommand = void 0;
4
+ const schemas_1 = require("../../schemas");
5
+ const blog_admin_categories_routes_1 = require("../../routes/blog-admin-categories.routes");
6
+ const rest_api_1 = require("../../../../rest-api");
7
+ const http_method_1 = require("../../../../shared/http-method");
8
+ var AdminBlogUpdateCategoryCommand;
9
+ (function (AdminBlogUpdateCategoryCommand) {
10
+ AdminBlogUpdateCategoryCommand.Request = schemas_1.UpdateCategoryRequestSchema;
11
+ AdminBlogUpdateCategoryCommand.Response = schemas_1.CategoryResponseSchema;
12
+ AdminBlogUpdateCategoryCommand.PATH = blog_admin_categories_routes_1.BLOG_ADMIN_CATEGORIES_ROUTES.UPDATE;
13
+ AdminBlogUpdateCategoryCommand.URL = (uuid) => rest_api_1.REST_API.V1.BLOG.ADMIN.CATEGORIES.UPDATE(uuid);
14
+ AdminBlogUpdateCategoryCommand.METHOD = http_method_1.HttpMethod.PATCH;
15
+ })(AdminBlogUpdateCategoryCommand || (exports.AdminBlogUpdateCategoryCommand = AdminBlogUpdateCategoryCommand = {}));
@@ -0,0 +1,43 @@
1
+ import { z } from 'zod';
2
+ import { HttpMethod } from '../../../../shared/http-method';
3
+ export declare namespace AdminBlogUpdatePostCommand {
4
+ const Request: z.ZodObject<{
5
+ alias: z.ZodOptional<z.ZodString>;
6
+ title: z.ZodOptional<z.ZodString>;
7
+ metaTitle: z.ZodOptional<z.ZodString>;
8
+ metaDescription: z.ZodOptional<z.ZodString>;
9
+ content: z.ZodOptional<z.ZodString>;
10
+ image: z.ZodOptional<z.ZodString>;
11
+ author: z.ZodOptional<z.ZodString>;
12
+ categoryIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
13
+ status: z.ZodOptional<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 PATH: ":uuid";
39
+ const URL: (uuid: string) => string;
40
+ const METHOD = HttpMethod.PATCH;
41
+ type RequestType = z.infer<typeof Request>;
42
+ type ResponseType = z.infer<typeof Response>;
43
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdminBlogUpdatePostCommand = void 0;
4
+ const schemas_1 = require("../../schemas");
5
+ const blog_admin_posts_routes_1 = require("../../routes/blog-admin-posts.routes");
6
+ const rest_api_1 = require("../../../../rest-api");
7
+ const http_method_1 = require("../../../../shared/http-method");
8
+ var AdminBlogUpdatePostCommand;
9
+ (function (AdminBlogUpdatePostCommand) {
10
+ AdminBlogUpdatePostCommand.Request = schemas_1.UpdatePostRequestSchema;
11
+ AdminBlogUpdatePostCommand.Response = schemas_1.PostResponseSchema;
12
+ AdminBlogUpdatePostCommand.PATH = blog_admin_posts_routes_1.BLOG_ADMIN_POSTS_ROUTES.UPDATE;
13
+ AdminBlogUpdatePostCommand.URL = (uuid) => rest_api_1.REST_API.V1.BLOG.ADMIN.POSTS.UPDATE(uuid);
14
+ AdminBlogUpdatePostCommand.METHOD = http_method_1.HttpMethod.PATCH;
15
+ })(AdminBlogUpdatePostCommand || (exports.AdminBlogUpdatePostCommand = AdminBlogUpdatePostCommand = {}));
@@ -0,0 +1,24 @@
1
+ import { z } from 'zod';
2
+ import { BlogCategoryStatus } from '../../schemas';
3
+ import { HttpMethod } from '../../../../shared/http-method';
4
+ export declare namespace AdminBlogGetCategoriesQuery {
5
+ const Request: z.ZodObject<{
6
+ status: z.ZodOptional<z.ZodEnum<typeof BlogCategoryStatus>>;
7
+ }, z.core.$strip>;
8
+ const Response: z.ZodObject<{
9
+ categories: z.ZodArray<z.ZodObject<{
10
+ uuid: z.ZodString;
11
+ alias: z.ZodString;
12
+ title: z.ZodString;
13
+ order: z.ZodNumber;
14
+ status: z.ZodEnum<typeof BlogCategoryStatus>;
15
+ createdAt: z.ZodString;
16
+ updatedAt: z.ZodString;
17
+ }, z.core.$strip>>;
18
+ }, z.core.$strip>;
19
+ const PATH: "";
20
+ const URL: "/api/v1/admin/blog/categories/";
21
+ const METHOD = HttpMethod.GET;
22
+ type RequestType = z.infer<typeof Request>;
23
+ type ResponseType = z.infer<typeof Response>;
24
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdminBlogGetCategoriesQuery = void 0;
4
+ const zod_1 = require("zod");
5
+ const schemas_1 = require("../../schemas");
6
+ const blog_admin_categories_routes_1 = require("../../routes/blog-admin-categories.routes");
7
+ const rest_api_1 = require("../../../../rest-api");
8
+ const http_method_1 = require("../../../../shared/http-method");
9
+ const CategoriesListAdminResponseSchema = zod_1.z.object({
10
+ categories: zod_1.z.array(schemas_1.CategoryResponseSchema),
11
+ });
12
+ const GetCategoriesQueryAdminSchema = zod_1.z.object({
13
+ status: zod_1.z.nativeEnum(schemas_1.BlogCategoryStatus).optional(),
14
+ });
15
+ var AdminBlogGetCategoriesQuery;
16
+ (function (AdminBlogGetCategoriesQuery) {
17
+ AdminBlogGetCategoriesQuery.Request = GetCategoriesQueryAdminSchema;
18
+ AdminBlogGetCategoriesQuery.Response = CategoriesListAdminResponseSchema;
19
+ AdminBlogGetCategoriesQuery.PATH = blog_admin_categories_routes_1.BLOG_ADMIN_CATEGORIES_ROUTES.GET_ALL;
20
+ AdminBlogGetCategoriesQuery.URL = rest_api_1.REST_API.V1.BLOG.ADMIN.CATEGORIES.GET_ALL;
21
+ AdminBlogGetCategoriesQuery.METHOD = http_method_1.HttpMethod.GET;
22
+ })(AdminBlogGetCategoriesQuery || (exports.AdminBlogGetCategoriesQuery = AdminBlogGetCategoriesQuery = {}));
@@ -0,0 +1,19 @@
1
+ import { z } from 'zod';
2
+ import { HttpMethod } from '../../../../shared/http-method';
3
+ export declare namespace AdminBlogGetCategoryQuery {
4
+ const Request: z.ZodObject<{}, z.core.$strip>;
5
+ const Response: z.ZodObject<{
6
+ uuid: z.ZodString;
7
+ alias: z.ZodString;
8
+ title: z.ZodString;
9
+ order: z.ZodNumber;
10
+ status: z.ZodEnum<typeof import("../../schemas").BlogCategoryStatus>;
11
+ createdAt: z.ZodString;
12
+ updatedAt: z.ZodString;
13
+ }, z.core.$strip>;
14
+ const PATH: ":uuid";
15
+ const URL: (uuid: string) => string;
16
+ const METHOD = HttpMethod.GET;
17
+ type RequestType = z.infer<typeof Request>;
18
+ type ResponseType = z.infer<typeof Response>;
19
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdminBlogGetCategoryQuery = void 0;
4
+ const zod_1 = require("zod");
5
+ const schemas_1 = require("../../schemas");
6
+ const blog_admin_categories_routes_1 = require("../../routes/blog-admin-categories.routes");
7
+ const rest_api_1 = require("../../../../rest-api");
8
+ const http_method_1 = require("../../../../shared/http-method");
9
+ var AdminBlogGetCategoryQuery;
10
+ (function (AdminBlogGetCategoryQuery) {
11
+ AdminBlogGetCategoryQuery.Request = zod_1.z.object({});
12
+ AdminBlogGetCategoryQuery.Response = schemas_1.CategoryResponseSchema;
13
+ AdminBlogGetCategoryQuery.PATH = blog_admin_categories_routes_1.BLOG_ADMIN_CATEGORIES_ROUTES.GET_BY_UUID;
14
+ AdminBlogGetCategoryQuery.URL = (uuid) => rest_api_1.REST_API.V1.BLOG.ADMIN.CATEGORIES.GET_BY_UUID(uuid);
15
+ AdminBlogGetCategoryQuery.METHOD = http_method_1.HttpMethod.GET;
16
+ })(AdminBlogGetCategoryQuery || (exports.AdminBlogGetCategoryQuery = AdminBlogGetCategoryQuery = {}));
@@ -0,0 +1,33 @@
1
+ import { z } from 'zod';
2
+ import { HttpMethod } from '../../../../shared/http-method';
3
+ export declare namespace AdminBlogGetPostQuery {
4
+ const Request: z.ZodObject<{}, z.core.$strip>;
5
+ const Response: z.ZodObject<{
6
+ uuid: z.ZodString;
7
+ alias: z.ZodString;
8
+ title: z.ZodString;
9
+ metaTitle: z.ZodString;
10
+ metaDescription: z.ZodString;
11
+ content: z.ZodString;
12
+ image: z.ZodString;
13
+ author: z.ZodString;
14
+ categories: z.ZodArray<z.ZodObject<{
15
+ uuid: z.ZodString;
16
+ alias: z.ZodString;
17
+ title: z.ZodString;
18
+ order: z.ZodNumber;
19
+ status: z.ZodEnum<typeof import("../../schemas").BlogCategoryStatus>;
20
+ createdAt: z.ZodString;
21
+ updatedAt: z.ZodString;
22
+ }, z.core.$strip>>;
23
+ viewsCount: z.ZodNumber;
24
+ status: z.ZodEnum<typeof import("../../schemas").BlogPostStatus>;
25
+ createdAt: z.ZodString;
26
+ updatedAt: z.ZodString;
27
+ }, z.core.$strip>;
28
+ const PATH: ":uuid";
29
+ const URL: (uuid: string) => string;
30
+ const METHOD = HttpMethod.GET;
31
+ type RequestType = z.infer<typeof Request>;
32
+ type ResponseType = z.infer<typeof Response>;
33
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdminBlogGetPostQuery = void 0;
4
+ const zod_1 = require("zod");
5
+ const schemas_1 = require("../../schemas");
6
+ const blog_admin_posts_routes_1 = require("../../routes/blog-admin-posts.routes");
7
+ const rest_api_1 = require("../../../../rest-api");
8
+ const http_method_1 = require("../../../../shared/http-method");
9
+ var AdminBlogGetPostQuery;
10
+ (function (AdminBlogGetPostQuery) {
11
+ AdminBlogGetPostQuery.Request = zod_1.z.object({});
12
+ AdminBlogGetPostQuery.Response = schemas_1.PostResponseSchema;
13
+ AdminBlogGetPostQuery.PATH = blog_admin_posts_routes_1.BLOG_ADMIN_POSTS_ROUTES.GET_BY_UUID;
14
+ AdminBlogGetPostQuery.URL = (uuid) => rest_api_1.REST_API.V1.BLOG.ADMIN.POSTS.GET_BY_UUID(uuid);
15
+ AdminBlogGetPostQuery.METHOD = http_method_1.HttpMethod.GET;
16
+ })(AdminBlogGetPostQuery || (exports.AdminBlogGetPostQuery = AdminBlogGetPostQuery = {}));
@@ -0,0 +1,48 @@
1
+ import { z } from 'zod';
2
+ import { HttpMethod } from '../../../../shared/http-method';
3
+ export declare namespace AdminBlogGetPostsQuery {
4
+ const Request: z.ZodObject<{
5
+ page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
6
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
7
+ status: z.ZodOptional<z.ZodEnum<typeof import("../../schemas").BlogPostStatus>>;
8
+ categoryAliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
9
+ }, z.core.$strip>;
10
+ const Response: z.ZodObject<{
11
+ data: z.ZodArray<z.ZodObject<{
12
+ uuid: z.ZodString;
13
+ alias: z.ZodString;
14
+ title: z.ZodString;
15
+ metaTitle: z.ZodString;
16
+ metaDescription: z.ZodString;
17
+ content: z.ZodString;
18
+ image: z.ZodString;
19
+ author: z.ZodString;
20
+ categories: z.ZodArray<z.ZodObject<{
21
+ uuid: z.ZodString;
22
+ alias: z.ZodString;
23
+ title: z.ZodString;
24
+ order: z.ZodNumber;
25
+ status: z.ZodEnum<typeof import("../../schemas").BlogCategoryStatus>;
26
+ createdAt: z.ZodString;
27
+ updatedAt: z.ZodString;
28
+ }, z.core.$strip>>;
29
+ viewsCount: z.ZodNumber;
30
+ status: z.ZodEnum<typeof import("../../schemas").BlogPostStatus>;
31
+ createdAt: z.ZodString;
32
+ updatedAt: z.ZodString;
33
+ }, z.core.$strip>>;
34
+ meta: z.ZodObject<{
35
+ page: z.ZodNumber;
36
+ limit: z.ZodNumber;
37
+ total: z.ZodNumber;
38
+ totalPages: z.ZodNumber;
39
+ hasNext: z.ZodBoolean;
40
+ hasPrev: z.ZodBoolean;
41
+ }, z.core.$strip>;
42
+ }, z.core.$strip>;
43
+ const PATH: "";
44
+ const URL: "/api/v1/admin/blog/posts/";
45
+ const METHOD = HttpMethod.GET;
46
+ type RequestType = z.infer<typeof Request>;
47
+ type ResponseType = z.infer<typeof Response>;
48
+ }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdminBlogGetPostsQuery = void 0;
4
+ const zod_1 = require("zod");
5
+ const schemas_1 = require("../../schemas");
6
+ const pagination_schema_1 = require("../../../../shared/pagination.schema");
7
+ const blog_admin_posts_routes_1 = require("../../routes/blog-admin-posts.routes");
8
+ const rest_api_1 = require("../../../../rest-api");
9
+ const http_method_1 = require("../../../../shared/http-method");
10
+ const PostsListAdminResponseSchema = zod_1.z.object({
11
+ data: zod_1.z.array(schemas_1.PostResponseSchema),
12
+ meta: pagination_schema_1.PaginationMetaSchema,
13
+ });
14
+ var AdminBlogGetPostsQuery;
15
+ (function (AdminBlogGetPostsQuery) {
16
+ AdminBlogGetPostsQuery.Request = schemas_1.GetPostsQueryAdminSchema;
17
+ AdminBlogGetPostsQuery.Response = PostsListAdminResponseSchema;
18
+ AdminBlogGetPostsQuery.PATH = blog_admin_posts_routes_1.BLOG_ADMIN_POSTS_ROUTES.GET_ALL;
19
+ AdminBlogGetPostsQuery.URL = rest_api_1.REST_API.V1.BLOG.ADMIN.POSTS.GET_ALL;
20
+ AdminBlogGetPostsQuery.METHOD = http_method_1.HttpMethod.GET;
21
+ })(AdminBlogGetPostsQuery || (exports.AdminBlogGetPostsQuery = AdminBlogGetPostsQuery = {}));
@@ -0,0 +1,4 @@
1
+ export * from './get-category.query';
2
+ export * from './get-categories.query';
3
+ export * from './get-post.query';
4
+ export * from './get-posts.query';
@@ -0,0 +1,20 @@
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("./get-category.query"), exports);
18
+ __exportStar(require("./get-categories.query"), exports);
19
+ __exportStar(require("./get-post.query"), exports);
20
+ __exportStar(require("./get-posts.query"), exports);
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Blog Admin API Paths (UUID-based, requires admin role)
3
+ */
4
+ export declare const BLOG_ADMIN_PATHS: {
5
+ readonly BASE: "v1/admin/blog";
6
+ readonly CATEGORIES: "categories";
7
+ readonly CATEGORY_BY_UUID: "categories/:uuid";
8
+ readonly POSTS: "posts";
9
+ readonly POST_BY_UUID: "posts/:uuid";
10
+ };
11
+ /**
12
+ * Blog Public API Paths (alias-based, public access)
13
+ */
14
+ export declare const BLOG_PUBLIC_PATHS: {
15
+ readonly BASE: "v1/blog";
16
+ readonly CATEGORIES: "categories";
17
+ readonly POSTS: "posts";
18
+ readonly POST_BY_ALIAS: "posts/:alias";
19
+ };
20
+ /**
21
+ * Full Admin API URLs
22
+ */
23
+ export declare const BLOG_ADMIN_API_PATHS: {
24
+ readonly CATEGORIES: "/api/v1/admin/blog/categories";
25
+ readonly CATEGORY_BY_UUID: (uuid: string) => string;
26
+ readonly POSTS: "/api/v1/admin/blog/posts";
27
+ readonly POST_BY_UUID: (uuid: string) => string;
28
+ };
29
+ /**
30
+ * Full Public API URLs
31
+ */
32
+ export declare const BLOG_PUBLIC_API_PATHS: {
33
+ readonly CATEGORIES: "/api/v1/blog/categories";
34
+ readonly POSTS: "/api/v1/blog/posts";
35
+ readonly POST_BY_ALIAS: (alias: string) => string;
36
+ };
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BLOG_PUBLIC_API_PATHS = exports.BLOG_ADMIN_API_PATHS = exports.BLOG_PUBLIC_PATHS = exports.BLOG_ADMIN_PATHS = void 0;
4
+ /**
5
+ * Blog Admin API Paths (UUID-based, requires admin role)
6
+ */
7
+ exports.BLOG_ADMIN_PATHS = {
8
+ BASE: 'v1/admin/blog',
9
+ // Categories
10
+ CATEGORIES: 'categories',
11
+ CATEGORY_BY_UUID: 'categories/:uuid',
12
+ // Posts
13
+ POSTS: 'posts',
14
+ POST_BY_UUID: 'posts/:uuid',
15
+ };
16
+ /**
17
+ * Blog Public API Paths (alias-based, public access)
18
+ */
19
+ exports.BLOG_PUBLIC_PATHS = {
20
+ BASE: 'v1/blog',
21
+ // Categories
22
+ CATEGORIES: 'categories',
23
+ // Posts
24
+ POSTS: 'posts',
25
+ POST_BY_ALIAS: 'posts/:alias',
26
+ };
27
+ /**
28
+ * Full Admin API URLs
29
+ */
30
+ exports.BLOG_ADMIN_API_PATHS = {
31
+ // Categories
32
+ CATEGORIES: `/api/${exports.BLOG_ADMIN_PATHS.BASE}/${exports.BLOG_ADMIN_PATHS.CATEGORIES}`,
33
+ CATEGORY_BY_UUID: (uuid) => `/api/${exports.BLOG_ADMIN_PATHS.BASE}/categories/${uuid}`,
34
+ // Posts
35
+ POSTS: `/api/${exports.BLOG_ADMIN_PATHS.BASE}/${exports.BLOG_ADMIN_PATHS.POSTS}`,
36
+ POST_BY_UUID: (uuid) => `/api/${exports.BLOG_ADMIN_PATHS.BASE}/posts/${uuid}`,
37
+ };
38
+ /**
39
+ * Full Public API URLs
40
+ */
41
+ exports.BLOG_PUBLIC_API_PATHS = {
42
+ // Categories
43
+ CATEGORIES: `/api/${exports.BLOG_PUBLIC_PATHS.BASE}/${exports.BLOG_PUBLIC_PATHS.CATEGORIES}`,
44
+ // Posts
45
+ POSTS: `/api/${exports.BLOG_PUBLIC_PATHS.BASE}/${exports.BLOG_PUBLIC_PATHS.POSTS}`,
46
+ POST_BY_ALIAS: (alias) => `/api/${exports.BLOG_PUBLIC_PATHS.BASE}/posts/${alias}`,
47
+ };
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod';
2
+ import { CategoryResponseSchema, CreateCategoryRequestSchema, UpdateCategoryRequestSchema, PostResponseSchema, CreatePostRequestSchema, UpdatePostRequestSchema, GetPostsQueryAdminSchema, GetPostsQueryPublicSchema } from './schemas';
3
+ export { BlogCategoryStatus } from './schemas/blog-category-status.enum';
4
+ export { BlogPostStatus } from './schemas/blog-post-status.enum';
5
+ export type CategoryResponse = z.infer<typeof CategoryResponseSchema>;
6
+ export type CreateCategoryRequest = z.infer<typeof CreateCategoryRequestSchema>;
7
+ export type UpdateCategoryRequest = z.infer<typeof UpdateCategoryRequestSchema>;
8
+ export type PostResponse = z.infer<typeof PostResponseSchema>;
9
+ export type CreatePostRequest = z.infer<typeof CreatePostRequestSchema>;
10
+ export type UpdatePostRequest = z.infer<typeof UpdatePostRequestSchema>;
11
+ export type GetPostsQueryAdmin = z.infer<typeof GetPostsQueryAdminSchema>;
12
+ export type GetPostsQueryPublic = z.infer<typeof GetPostsQueryPublicSchema>;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BlogPostStatus = exports.BlogCategoryStatus = void 0;
4
+ var blog_category_status_enum_1 = require("./schemas/blog-category-status.enum");
5
+ Object.defineProperty(exports, "BlogCategoryStatus", { enumerable: true, get: function () { return blog_category_status_enum_1.BlogCategoryStatus; } });
6
+ var blog_post_status_enum_1 = require("./schemas/blog-post-status.enum");
7
+ Object.defineProperty(exports, "BlogPostStatus", { enumerable: true, get: function () { return blog_post_status_enum_1.BlogPostStatus; } });