@veruna/api-contracts 1.0.4 → 1.0.8

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 (130) hide show
  1. package/build/index.js +3 -5
  2. package/build/rest-api.js +6 -0
  3. package/build/shared/error-response.schema.js +22 -0
  4. package/build/shared/index.js +18 -0
  5. package/build/utils/index.js +17 -0
  6. package/build/utils/path-builder.js +46 -0
  7. package/build/v1/auth/commands/delete-session.command.js +10 -5
  8. package/build/v1/auth/commands/login.command.js +7 -5
  9. package/build/v1/auth/commands/logout-all.command.js +10 -5
  10. package/build/v1/auth/commands/logout.command.js +10 -5
  11. package/build/v1/auth/commands/signup.command.js +7 -5
  12. package/build/v1/auth/index.js +2 -0
  13. package/build/v1/auth/queries/get-sessions.query.js +8 -5
  14. package/build/v1/blog/admin/commands/create-category.command.js +1 -5
  15. package/build/v1/blog/admin/commands/create-post.command.js +1 -5
  16. package/build/v1/blog/admin/commands/delete-category.command.js +1 -3
  17. package/build/v1/blog/admin/commands/delete-post.command.js +1 -3
  18. package/build/v1/blog/admin/commands/update-category.command.js +1 -5
  19. package/build/v1/blog/admin/commands/update-post.command.js +1 -5
  20. package/build/v1/blog/admin/queries/get-categories.query.js +1 -4
  21. package/build/v1/blog/admin/queries/get-category.query.js +1 -4
  22. package/build/v1/blog/admin/queries/get-post.query.js +1 -4
  23. package/build/v1/blog/admin/queries/get-posts.query.js +3 -6
  24. package/build/v1/blog/index.js +2 -0
  25. package/build/v1/blog/public/queries/get-categories.query.js +1 -4
  26. package/build/v1/blog/public/queries/get-post-by-alias.query.js +1 -4
  27. package/build/v1/blog/public/queries/get-posts.query.js +3 -6
  28. package/build/v1/unregistered-users/commands/authenticate.command.js +5 -5
  29. package/build/v1/unregistered-users/controllers.js +7 -0
  30. package/build/v1/unregistered-users/routes/unreg-users.routes.js +9 -0
  31. package/build/v1/users/commands/change-password.command.js +8 -5
  32. package/build/v1/users/commands/delete-account.command.js +8 -5
  33. package/build/v1/users/commands/toggle-marketing-consent.command.js +8 -5
  34. package/build/v1/users/commands/update-profile.command.js +8 -5
  35. package/build/v1/users/index.js +2 -0
  36. package/build/v1/users/queries/get-current-user.query.js +7 -5
  37. package/package.json +2 -1
  38. package/build/index.d.ts +0 -6
  39. package/build/locales/en.d.ts +0 -31
  40. package/build/locales/index.d.ts +0 -66
  41. package/build/locales/ru.d.ts +0 -30
  42. package/build/rest-api.d.ts +0 -49
  43. package/build/shared/common-schemas.d.ts +0 -12
  44. package/build/shared/http-method.d.ts +0 -10
  45. package/build/shared/pagination.schema.d.ts +0 -35
  46. package/build/shared/regex.d.ts +0 -8
  47. package/build/v1/auth/auth.errors.d.ts +0 -12
  48. package/build/v1/auth/auth.paths.d.ts +0 -17
  49. package/build/v1/auth/auth.types.d.ts +0 -9
  50. package/build/v1/auth/commands/delete-session.command.d.ts +0 -13
  51. package/build/v1/auth/commands/index.d.ts +0 -5
  52. package/build/v1/auth/commands/login.command.d.ts +0 -34
  53. package/build/v1/auth/commands/logout-all.command.d.ts +0 -13
  54. package/build/v1/auth/commands/logout.command.d.ts +0 -13
  55. package/build/v1/auth/commands/signup.command.d.ts +0 -43
  56. package/build/v1/auth/controllers.d.ts +0 -4
  57. package/build/v1/auth/index.d.ts +0 -6
  58. package/build/v1/auth/queries/get-sessions.query.d.ts +0 -22
  59. package/build/v1/auth/queries/index.d.ts +0 -1
  60. package/build/v1/auth/routes/auth.routes.d.ts +0 -12
  61. package/build/v1/auth/schemas/auth-response.schema.d.ts +0 -36
  62. package/build/v1/auth/schemas/index.d.ts +0 -5
  63. package/build/v1/auth/schemas/login-request.schema.d.ts +0 -9
  64. package/build/v1/auth/schemas/session-response.schema.d.ts +0 -13
  65. package/build/v1/auth/schemas/signup-request.schema.d.ts +0 -28
  66. package/build/v1/auth/schemas/user-role.enum.d.ts +0 -7
  67. package/build/v1/blog/admin/commands/create-category.command.d.ts +0 -27
  68. package/build/v1/blog/admin/commands/create-post.command.d.ts +0 -46
  69. package/build/v1/blog/admin/commands/delete-category.command.d.ts +0 -14
  70. package/build/v1/blog/admin/commands/delete-post.command.d.ts +0 -14
  71. package/build/v1/blog/admin/commands/index.d.ts +0 -6
  72. package/build/v1/blog/admin/commands/update-category.command.d.ts +0 -27
  73. package/build/v1/blog/admin/commands/update-post.command.d.ts +0 -46
  74. package/build/v1/blog/admin/queries/get-categories.query.d.ts +0 -27
  75. package/build/v1/blog/admin/queries/get-category.query.d.ts +0 -22
  76. package/build/v1/blog/admin/queries/get-post.query.d.ts +0 -36
  77. package/build/v1/blog/admin/queries/get-posts.query.d.ts +0 -84
  78. package/build/v1/blog/admin/queries/index.d.ts +0 -4
  79. package/build/v1/blog/blog.paths.d.ts +0 -36
  80. package/build/v1/blog/blog.types.d.ts +0 -12
  81. package/build/v1/blog/controllers.d.ts +0 -7
  82. package/build/v1/blog/index.d.ts +0 -6
  83. package/build/v1/blog/public/queries/get-categories.query.d.ts +0 -24
  84. package/build/v1/blog/public/queries/get-post-by-alias.query.d.ts +0 -36
  85. package/build/v1/blog/public/queries/get-posts.query.d.ts +0 -83
  86. package/build/v1/blog/public/queries/index.d.ts +0 -3
  87. package/build/v1/blog/routes/blog-admin-categories.routes.d.ts +0 -11
  88. package/build/v1/blog/routes/blog-admin-posts.routes.d.ts +0 -10
  89. package/build/v1/blog/routes/blog-public.routes.d.ts +0 -10
  90. package/build/v1/blog/routes/index.d.ts +0 -3
  91. package/build/v1/blog/schemas/blog-category-status.enum.d.ts +0 -8
  92. package/build/v1/blog/schemas/blog-post-status.enum.d.ts +0 -8
  93. package/build/v1/blog/schemas/category-response.schema.d.ts +0 -14
  94. package/build/v1/blog/schemas/create-category-request.schema.d.ts +0 -8
  95. package/build/v1/blog/schemas/create-post-request.schema.d.ts +0 -13
  96. package/build/v1/blog/schemas/get-posts-query.schema.d.ts +0 -13
  97. package/build/v1/blog/schemas/index.d.ts +0 -9
  98. package/build/v1/blog/schemas/post-response.schema.d.ts +0 -28
  99. package/build/v1/blog/schemas/update-category-request.schema.d.ts +0 -8
  100. package/build/v1/blog/schemas/update-post-request.schema.d.ts +0 -13
  101. package/build/v1/index.d.ts +0 -2
  102. package/build/v1/unregistered-users/commands/authenticate.command.d.ts +0 -20
  103. package/build/v1/unregistered-users/commands/index.d.ts +0 -1
  104. package/build/v1/unregistered-users/index.d.ts +0 -5
  105. package/build/v1/unregistered-users/schemas/authenticate-request.schema.d.ts +0 -7
  106. package/build/v1/unregistered-users/schemas/authenticate-response.schema.d.ts +0 -11
  107. package/build/v1/unregistered-users/schemas/index.d.ts +0 -3
  108. package/build/v1/unregistered-users/schemas/unreg-user-status.enum.d.ts +0 -8
  109. package/build/v1/unregistered-users/unregistered-users.errors.d.ts +0 -15
  110. package/build/v1/unregistered-users/unregistered-users.paths.d.ts +0 -15
  111. package/build/v1/unregistered-users/unregistered-users.types.d.ts +0 -9
  112. package/build/v1/users/commands/change-password.command.d.ts +0 -17
  113. package/build/v1/users/commands/delete-account.command.d.ts +0 -13
  114. package/build/v1/users/commands/index.d.ts +0 -4
  115. package/build/v1/users/commands/toggle-marketing-consent.command.d.ts +0 -15
  116. package/build/v1/users/commands/update-profile.command.d.ts +0 -15
  117. package/build/v1/users/controllers.d.ts +0 -4
  118. package/build/v1/users/index.d.ts +0 -5
  119. package/build/v1/users/queries/get-current-user.query.d.ts +0 -20
  120. package/build/v1/users/queries/index.d.ts +0 -1
  121. package/build/v1/users/routes/users.routes.d.ts +0 -9
  122. package/build/v1/users/schemas/change-password-request.schema.d.ts +0 -10
  123. package/build/v1/users/schemas/delete-account-request.schema.d.ts +0 -5
  124. package/build/v1/users/schemas/index.d.ts +0 -6
  125. package/build/v1/users/schemas/response-unions.schema.d.ts +0 -31
  126. package/build/v1/users/schemas/toggle-marketing-consent-request.schema.d.ts +0 -7
  127. package/build/v1/users/schemas/update-profile-request.schema.d.ts +0 -8
  128. package/build/v1/users/schemas/user-response.schema.d.ts +0 -12
  129. package/build/v1/users/users.paths.d.ts +0 -11
  130. package/build/v1/users/users.types.d.ts +0 -11
@@ -1,36 +0,0 @@
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>;
@@ -1,5 +0,0 @@
1
- export * from './user-role.enum';
2
- export * from './signup-request.schema';
3
- export * from './login-request.schema';
4
- export * from './session-response.schema';
5
- export * from './auth-response.schema';
@@ -1,9 +0,0 @@
1
- import { z } from 'zod';
2
- /**
3
- * Login Request Schema
4
- * Error messages are in locales (en.ts, ru.ts)
5
- */
6
- export declare const LoginRequestSchema: z.ZodObject<{
7
- email: z.ZodString;
8
- password: z.ZodString;
9
- }, z.core.$strip>;
@@ -1,13 +0,0 @@
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>;
@@ -1,28 +0,0 @@
1
- import { z } from 'zod';
2
- /**
3
- * UTM Schema
4
- */
5
- export declare const UtmSchema: z.ZodObject<{
6
- utmSource: z.ZodOptional<z.ZodString>;
7
- utmMedium: z.ZodOptional<z.ZodString>;
8
- utmCampaign: z.ZodOptional<z.ZodString>;
9
- utmContent: z.ZodOptional<z.ZodString>;
10
- utmTerm: z.ZodOptional<z.ZodString>;
11
- }, z.core.$strip>;
12
- /**
13
- * Sign Up Request Schema
14
- * Error messages are in locales (en.ts, ru.ts)
15
- */
16
- export declare const SignUpRequestSchema: z.ZodObject<{
17
- email: z.ZodString;
18
- password: z.ZodString;
19
- name: z.ZodString;
20
- marketingConsent: z.ZodDefault<z.ZodBoolean>;
21
- utm: z.ZodOptional<z.ZodObject<{
22
- utmSource: z.ZodOptional<z.ZodString>;
23
- utmMedium: z.ZodOptional<z.ZodString>;
24
- utmCampaign: z.ZodOptional<z.ZodString>;
25
- utmContent: z.ZodOptional<z.ZodString>;
26
- utmTerm: z.ZodOptional<z.ZodString>;
27
- }, z.core.$strip>>;
28
- }, z.core.$strip>;
@@ -1,7 +0,0 @@
1
- /**
2
- * User Role enum
3
- */
4
- export declare enum UserRole {
5
- USER = "user",
6
- ADMIN = "admin"
7
- }
@@ -1,27 +0,0 @@
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.ZodUnion<readonly [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>, z.ZodObject<{
19
- code: z.ZodString;
20
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
21
- }, z.core.$strip>]>;
22
- const PATH: "";
23
- const URL: "/api/v1/admin/blog/categories/";
24
- const METHOD = HttpMethod.POST;
25
- type RequestType = z.infer<typeof Request>;
26
- type ResponseType = z.infer<typeof Response>;
27
- }
@@ -1,46 +0,0 @@
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.ZodUnion<readonly [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>, z.ZodObject<{
38
- code: z.ZodString;
39
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
40
- }, z.core.$strip>]>;
41
- const PATH: "";
42
- const URL: "/api/v1/admin/blog/posts/";
43
- const METHOD = HttpMethod.POST;
44
- type RequestType = z.infer<typeof Request>;
45
- type ResponseType = z.infer<typeof Response>;
46
- }
@@ -1,14 +0,0 @@
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.ZodUnion<readonly [z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
6
- code: z.ZodString;
7
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
8
- }, z.core.$strip>]>;
9
- const PATH: ":uuid";
10
- const URL: (uuid: string) => string;
11
- const METHOD = HttpMethod.DELETE;
12
- type RequestType = z.infer<typeof Request>;
13
- type ResponseType = z.infer<typeof Response>;
14
- }
@@ -1,14 +0,0 @@
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.ZodUnion<readonly [z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
6
- code: z.ZodString;
7
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
8
- }, z.core.$strip>]>;
9
- const PATH: ":uuid";
10
- const URL: (uuid: string) => string;
11
- const METHOD = HttpMethod.DELETE;
12
- type RequestType = z.infer<typeof Request>;
13
- type ResponseType = z.infer<typeof Response>;
14
- }
@@ -1,6 +0,0 @@
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';
@@ -1,27 +0,0 @@
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.ZodUnion<readonly [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>, z.ZodObject<{
19
- code: z.ZodString;
20
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
21
- }, z.core.$strip>]>;
22
- const PATH: ":uuid";
23
- const URL: (uuid: string) => string;
24
- const METHOD = HttpMethod.PATCH;
25
- type RequestType = z.infer<typeof Request>;
26
- type ResponseType = z.infer<typeof Response>;
27
- }
@@ -1,46 +0,0 @@
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.ZodUnion<readonly [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>, z.ZodObject<{
38
- code: z.ZodString;
39
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
40
- }, z.core.$strip>]>;
41
- const PATH: ":uuid";
42
- const URL: (uuid: string) => string;
43
- const METHOD = HttpMethod.PATCH;
44
- type RequestType = z.infer<typeof Request>;
45
- type ResponseType = z.infer<typeof Response>;
46
- }
@@ -1,27 +0,0 @@
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.ZodUnion<readonly [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>, z.ZodObject<{
19
- code: z.ZodString;
20
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
21
- }, z.core.$strip>]>;
22
- const PATH: "";
23
- const URL: "/api/v1/admin/blog/categories/";
24
- const METHOD = HttpMethod.GET;
25
- type RequestType = z.infer<typeof Request>;
26
- type ResponseType = z.infer<typeof Response>;
27
- }
@@ -1,22 +0,0 @@
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.ZodUnion<readonly [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>, z.ZodObject<{
14
- code: z.ZodString;
15
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
16
- }, z.core.$strip>]>;
17
- const PATH: ":uuid";
18
- const URL: (uuid: string) => string;
19
- const METHOD = HttpMethod.GET;
20
- type RequestType = z.infer<typeof Request>;
21
- type ResponseType = z.infer<typeof Response>;
22
- }
@@ -1,36 +0,0 @@
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.ZodUnion<readonly [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>, z.ZodObject<{
28
- code: z.ZodString;
29
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
30
- }, z.core.$strip>]>;
31
- const PATH: ":uuid";
32
- const URL: (uuid: string) => string;
33
- const METHOD = HttpMethod.GET;
34
- type RequestType = z.infer<typeof Request>;
35
- type ResponseType = z.infer<typeof Response>;
36
- }
@@ -1,84 +0,0 @@
1
- import { z } from 'zod';
2
- import { HttpMethod } from '../../../../shared/http-method';
3
- export declare const PostsListAdminResponseSchema: z.ZodObject<{
4
- data: z.ZodArray<z.ZodObject<{
5
- uuid: z.ZodString;
6
- alias: z.ZodString;
7
- title: z.ZodString;
8
- metaTitle: z.ZodString;
9
- metaDescription: z.ZodString;
10
- content: z.ZodString;
11
- image: z.ZodString;
12
- author: z.ZodString;
13
- categories: z.ZodArray<z.ZodObject<{
14
- uuid: z.ZodString;
15
- alias: z.ZodString;
16
- title: z.ZodString;
17
- order: z.ZodNumber;
18
- status: z.ZodEnum<typeof import("../../schemas").BlogCategoryStatus>;
19
- createdAt: z.ZodString;
20
- updatedAt: z.ZodString;
21
- }, z.core.$strip>>;
22
- viewsCount: z.ZodNumber;
23
- status: z.ZodEnum<typeof import("../../schemas").BlogPostStatus>;
24
- createdAt: z.ZodString;
25
- updatedAt: z.ZodString;
26
- }, z.core.$strip>>;
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>;
36
- export declare namespace AdminBlogGetPostsQuery {
37
- const Request: z.ZodObject<{
38
- page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
39
- limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
40
- status: z.ZodOptional<z.ZodEnum<typeof import("../../schemas").BlogPostStatus>>;
41
- categoryAliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
42
- }, z.core.$strip>;
43
- const Response: z.ZodUnion<readonly [z.ZodObject<{
44
- data: z.ZodArray<z.ZodObject<{
45
- uuid: z.ZodString;
46
- alias: z.ZodString;
47
- title: z.ZodString;
48
- metaTitle: z.ZodString;
49
- metaDescription: z.ZodString;
50
- content: z.ZodString;
51
- image: z.ZodString;
52
- author: z.ZodString;
53
- categories: z.ZodArray<z.ZodObject<{
54
- uuid: z.ZodString;
55
- alias: z.ZodString;
56
- title: z.ZodString;
57
- order: z.ZodNumber;
58
- status: z.ZodEnum<typeof import("../../schemas").BlogCategoryStatus>;
59
- createdAt: z.ZodString;
60
- updatedAt: z.ZodString;
61
- }, z.core.$strip>>;
62
- viewsCount: z.ZodNumber;
63
- status: z.ZodEnum<typeof import("../../schemas").BlogPostStatus>;
64
- createdAt: z.ZodString;
65
- updatedAt: z.ZodString;
66
- }, z.core.$strip>>;
67
- meta: z.ZodObject<{
68
- page: z.ZodNumber;
69
- limit: z.ZodNumber;
70
- total: z.ZodNumber;
71
- totalPages: z.ZodNumber;
72
- hasNext: z.ZodBoolean;
73
- hasPrev: z.ZodBoolean;
74
- }, z.core.$strip>;
75
- }, z.core.$strip>, z.ZodObject<{
76
- code: z.ZodString;
77
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
78
- }, z.core.$strip>]>;
79
- const PATH: "";
80
- const URL: "/api/v1/admin/blog/posts/";
81
- const METHOD = HttpMethod.GET;
82
- type RequestType = z.infer<typeof Request>;
83
- type ResponseType = z.infer<typeof Response>;
84
- }
@@ -1,4 +0,0 @@
1
- export * from './get-category.query';
2
- export * from './get-categories.query';
3
- export * from './get-post.query';
4
- export * from './get-posts.query';
@@ -1,36 +0,0 @@
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
- };
@@ -1,12 +0,0 @@
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>;
@@ -1,7 +0,0 @@
1
- /**
2
- * Blog Controller paths for NestJS @Controller decorator
3
- */
4
- export declare const BLOG_ADMIN_CATEGORIES_CONTROLLER: "v1/admin/blog/categories";
5
- export declare const BLOG_ADMIN_POSTS_CONTROLLER: "v1/admin/blog/posts";
6
- export declare const BLOG_PUBLIC_CATEGORIES_CONTROLLER: "v1/blog/categories";
7
- export declare const BLOG_PUBLIC_POSTS_CONTROLLER: "v1/blog/posts";
@@ -1,6 +0,0 @@
1
- export * from './schemas';
2
- export * from './blog.types';
3
- export * from './blog.paths';
4
- export * from './admin/commands';
5
- export * from './admin/queries';
6
- export * from './public/queries';
@@ -1,24 +0,0 @@
1
- import { z } from 'zod';
2
- import { HttpMethod } from '../../../../shared/http-method';
3
- export declare namespace BlogGetCategoriesQuery {
4
- const Request: z.ZodObject<{}, z.core.$strip>;
5
- const Response: z.ZodUnion<readonly [z.ZodObject<{
6
- categories: z.ZodArray<z.ZodObject<{
7
- uuid: z.ZodString;
8
- alias: z.ZodString;
9
- title: z.ZodString;
10
- order: z.ZodNumber;
11
- status: z.ZodEnum<typeof import("../../schemas").BlogCategoryStatus>;
12
- createdAt: z.ZodString;
13
- updatedAt: z.ZodString;
14
- }, z.core.$strip>>;
15
- }, z.core.$strip>, z.ZodObject<{
16
- code: z.ZodString;
17
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
18
- }, z.core.$strip>]>;
19
- const PATH: "";
20
- const URL: "/api/v1/blog/categories/";
21
- const METHOD = HttpMethod.GET;
22
- type RequestType = z.infer<typeof Request>;
23
- type ResponseType = z.infer<typeof Response>;
24
- }
@@ -1,36 +0,0 @@
1
- import { z } from 'zod';
2
- import { HttpMethod } from '../../../../shared/http-method';
3
- export declare namespace BlogGetPostByAliasQuery {
4
- const Request: z.ZodObject<{}, z.core.$strip>;
5
- const Response: z.ZodUnion<readonly [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>, z.ZodObject<{
28
- code: z.ZodString;
29
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
30
- }, z.core.$strip>]>;
31
- const PATH: ":alias";
32
- const URL: (alias: string) => string;
33
- const METHOD = HttpMethod.GET;
34
- type RequestType = z.infer<typeof Request>;
35
- type ResponseType = z.infer<typeof Response>;
36
- }