@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,83 +0,0 @@
1
- import { z } from 'zod';
2
- import { HttpMethod } from '../../../../shared/http-method';
3
- export declare const PostsListResponseSchema: 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 BlogGetPostsQuery {
37
- const Request: z.ZodObject<{
38
- page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
39
- limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
40
- categoryAliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
41
- }, z.core.$strip>;
42
- const Response: z.ZodUnion<readonly [z.ZodObject<{
43
- data: z.ZodArray<z.ZodObject<{
44
- uuid: z.ZodString;
45
- alias: z.ZodString;
46
- title: z.ZodString;
47
- metaTitle: z.ZodString;
48
- metaDescription: z.ZodString;
49
- content: z.ZodString;
50
- image: z.ZodString;
51
- author: z.ZodString;
52
- categories: z.ZodArray<z.ZodObject<{
53
- uuid: z.ZodString;
54
- alias: z.ZodString;
55
- title: z.ZodString;
56
- order: z.ZodNumber;
57
- status: z.ZodEnum<typeof import("../../schemas").BlogCategoryStatus>;
58
- createdAt: z.ZodString;
59
- updatedAt: z.ZodString;
60
- }, z.core.$strip>>;
61
- viewsCount: z.ZodNumber;
62
- status: z.ZodEnum<typeof import("../../schemas").BlogPostStatus>;
63
- createdAt: z.ZodString;
64
- updatedAt: z.ZodString;
65
- }, z.core.$strip>>;
66
- meta: z.ZodObject<{
67
- page: z.ZodNumber;
68
- limit: z.ZodNumber;
69
- total: z.ZodNumber;
70
- totalPages: z.ZodNumber;
71
- hasNext: z.ZodBoolean;
72
- hasPrev: z.ZodBoolean;
73
- }, z.core.$strip>;
74
- }, z.core.$strip>, z.ZodObject<{
75
- code: z.ZodString;
76
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
77
- }, z.core.$strip>]>;
78
- const PATH: "";
79
- const URL: "/api/v1/blog/posts/";
80
- const METHOD = HttpMethod.GET;
81
- type RequestType = z.infer<typeof Request>;
82
- type ResponseType = z.infer<typeof Response>;
83
- }
@@ -1,3 +0,0 @@
1
- export * from './get-categories.query';
2
- export * from './get-posts.query';
3
- export * from './get-post-by-alias.query';
@@ -1,11 +0,0 @@
1
- /**
2
- * Blog Admin Categories Routes
3
- * For NestJS method decorators (@Get, @Post, etc.)
4
- */
5
- export declare const BLOG_ADMIN_CATEGORIES_ROUTES: {
6
- readonly CREATE: "";
7
- readonly GET_ALL: "";
8
- readonly GET_BY_UUID: ":uuid";
9
- readonly UPDATE: ":uuid";
10
- readonly DELETE: ":uuid";
11
- };
@@ -1,10 +0,0 @@
1
- /**
2
- * Blog Admin Posts Routes
3
- */
4
- export declare const BLOG_ADMIN_POSTS_ROUTES: {
5
- readonly CREATE: "";
6
- readonly GET_ALL: "";
7
- readonly GET_BY_UUID: ":uuid";
8
- readonly UPDATE: ":uuid";
9
- readonly DELETE: ":uuid";
10
- };
@@ -1,10 +0,0 @@
1
- /**
2
- * Blog Public Routes
3
- */
4
- export declare const BLOG_PUBLIC_CATEGORIES_ROUTES: {
5
- readonly GET_ALL: "";
6
- };
7
- export declare const BLOG_PUBLIC_POSTS_ROUTES: {
8
- readonly GET_ALL: "";
9
- readonly GET_BY_ALIAS: ":alias";
10
- };
@@ -1,3 +0,0 @@
1
- export * from './blog-admin-categories.routes';
2
- export * from './blog-admin-posts.routes';
3
- export * from './blog-public.routes';
@@ -1,8 +0,0 @@
1
- /**
2
- * Blog Category Status
3
- */
4
- export declare enum BlogCategoryStatus {
5
- DRAFT = "draft",
6
- PUBLISHED = "published",
7
- ARCHIVED = "archived"
8
- }
@@ -1,8 +0,0 @@
1
- /**
2
- * Blog Post Status
3
- */
4
- export declare enum BlogPostStatus {
5
- DRAFT = "draft",
6
- PUBLISHED = "published",
7
- ARCHIVED = "archived"
8
- }
@@ -1,14 +0,0 @@
1
- import { z } from 'zod';
2
- import { BlogCategoryStatus } from './blog-category-status.enum';
3
- /**
4
- * Category Response Schema
5
- */
6
- export declare const CategoryResponseSchema: z.ZodObject<{
7
- uuid: z.ZodString;
8
- alias: z.ZodString;
9
- title: z.ZodString;
10
- order: z.ZodNumber;
11
- status: z.ZodEnum<typeof BlogCategoryStatus>;
12
- createdAt: z.ZodString;
13
- updatedAt: z.ZodString;
14
- }, z.core.$strip>;
@@ -1,8 +0,0 @@
1
- import { z } from 'zod';
2
- import { BlogCategoryStatus } from './blog-category-status.enum';
3
- export declare const CreateCategoryRequestSchema: z.ZodObject<{
4
- alias: z.ZodString;
5
- title: z.ZodString;
6
- order: z.ZodDefault<z.ZodNumber>;
7
- status: z.ZodDefault<z.ZodEnum<typeof BlogCategoryStatus>>;
8
- }, z.core.$strip>;
@@ -1,13 +0,0 @@
1
- import { z } from 'zod';
2
- import { BlogPostStatus } from './blog-post-status.enum';
3
- export declare const CreatePostRequestSchema: z.ZodObject<{
4
- alias: z.ZodString;
5
- title: z.ZodString;
6
- metaTitle: z.ZodString;
7
- metaDescription: z.ZodString;
8
- content: z.ZodString;
9
- image: z.ZodString;
10
- author: z.ZodString;
11
- categoryIds: z.ZodArray<z.ZodString>;
12
- status: z.ZodDefault<z.ZodEnum<typeof BlogPostStatus>>;
13
- }, z.core.$strip>;
@@ -1,13 +0,0 @@
1
- import { z } from 'zod';
2
- import { BlogPostStatus } from './blog-post-status.enum';
3
- export declare const GetPostsQueryAdminSchema: z.ZodObject<{
4
- page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
5
- limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
6
- status: z.ZodOptional<z.ZodEnum<typeof BlogPostStatus>>;
7
- categoryAliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
8
- }, z.core.$strip>;
9
- export declare const GetPostsQueryPublicSchema: z.ZodObject<{
10
- page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
11
- limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
12
- categoryAliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
13
- }, z.core.$strip>;
@@ -1,9 +0,0 @@
1
- export * from './blog-category-status.enum';
2
- export * from './blog-post-status.enum';
3
- export * from './category-response.schema';
4
- export * from './create-category-request.schema';
5
- export * from './update-category-request.schema';
6
- export * from './post-response.schema';
7
- export * from './create-post-request.schema';
8
- export * from './update-post-request.schema';
9
- export * from './get-posts-query.schema';
@@ -1,28 +0,0 @@
1
- import { z } from 'zod';
2
- import { BlogPostStatus } from './blog-post-status.enum';
3
- /**
4
- * Post Response Schema
5
- */
6
- export declare const PostResponseSchema: z.ZodObject<{
7
- uuid: z.ZodString;
8
- alias: z.ZodString;
9
- title: z.ZodString;
10
- metaTitle: z.ZodString;
11
- metaDescription: z.ZodString;
12
- content: z.ZodString;
13
- image: z.ZodString;
14
- author: z.ZodString;
15
- categories: z.ZodArray<z.ZodObject<{
16
- uuid: z.ZodString;
17
- alias: z.ZodString;
18
- title: z.ZodString;
19
- order: z.ZodNumber;
20
- status: z.ZodEnum<typeof import("./blog-category-status.enum").BlogCategoryStatus>;
21
- createdAt: z.ZodString;
22
- updatedAt: z.ZodString;
23
- }, z.core.$strip>>;
24
- viewsCount: z.ZodNumber;
25
- status: z.ZodEnum<typeof BlogPostStatus>;
26
- createdAt: z.ZodString;
27
- updatedAt: z.ZodString;
28
- }, z.core.$strip>;
@@ -1,8 +0,0 @@
1
- import { z } from 'zod';
2
- import { BlogCategoryStatus } from './blog-category-status.enum';
3
- export declare const UpdateCategoryRequestSchema: z.ZodObject<{
4
- alias: z.ZodOptional<z.ZodString>;
5
- title: z.ZodOptional<z.ZodString>;
6
- order: z.ZodOptional<z.ZodNumber>;
7
- status: z.ZodOptional<z.ZodEnum<typeof BlogCategoryStatus>>;
8
- }, z.core.$strip>;
@@ -1,13 +0,0 @@
1
- import { z } from 'zod';
2
- import { BlogPostStatus } from './blog-post-status.enum';
3
- export declare const UpdatePostRequestSchema: z.ZodObject<{
4
- alias: z.ZodOptional<z.ZodString>;
5
- title: z.ZodOptional<z.ZodString>;
6
- metaTitle: z.ZodOptional<z.ZodString>;
7
- metaDescription: z.ZodOptional<z.ZodString>;
8
- content: z.ZodOptional<z.ZodString>;
9
- image: z.ZodOptional<z.ZodString>;
10
- author: z.ZodOptional<z.ZodString>;
11
- categoryIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
12
- status: z.ZodOptional<z.ZodEnum<typeof BlogPostStatus>>;
13
- }, z.core.$strip>;
@@ -1,2 +0,0 @@
1
- export * from './auth';
2
- export * from './unregistered-users';
@@ -1,20 +0,0 @@
1
- import { z } from 'zod';
2
- import { HttpMethod } from '../../../shared/http-method';
3
- export declare namespace UnregAuthenticateCommand {
4
- const Request: z.ZodObject<{
5
- token: z.ZodOptional<z.ZodString>;
6
- }, z.core.$strip>;
7
- const Response: z.ZodUnion<readonly [z.ZodObject<{
8
- token: z.ZodString;
9
- requests: z.ZodNumber;
10
- nextResetAt: z.ZodString;
11
- status: z.ZodEnum<typeof import("../schemas").UnregUserStatus>;
12
- }, z.core.$strip>, z.ZodObject<{
13
- code: z.ZodString;
14
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
15
- }, z.core.$strip>]>;
16
- const URL: "/api/v1/unreg";
17
- const METHOD = HttpMethod.PUT;
18
- type RequestType = z.infer<typeof Request>;
19
- type ResponseType = z.infer<typeof Response>;
20
- }
@@ -1 +0,0 @@
1
- export * from './authenticate.command';
@@ -1,5 +0,0 @@
1
- export * from './schemas';
2
- export * from './unregistered-users.types';
3
- export * from './unregistered-users.paths';
4
- export * from './unregistered-users.errors';
5
- export * from './commands';
@@ -1,7 +0,0 @@
1
- import { z } from 'zod';
2
- /**
3
- * Authenticate Unregistered User Request Schema
4
- */
5
- export declare const AuthenticateUnregUserRequestSchema: z.ZodObject<{
6
- token: z.ZodOptional<z.ZodString>;
7
- }, z.core.$strip>;
@@ -1,11 +0,0 @@
1
- import { z } from 'zod';
2
- import { UnregUserStatus } from './unreg-user-status.enum';
3
- /**
4
- * Authenticate Unregistered User Response Schema
5
- */
6
- export declare const AuthenticateUnregUserResponseSchema: z.ZodObject<{
7
- token: z.ZodString;
8
- requests: z.ZodNumber;
9
- nextResetAt: z.ZodString;
10
- status: z.ZodEnum<typeof UnregUserStatus>;
11
- }, z.core.$strip>;
@@ -1,3 +0,0 @@
1
- export * from './unreg-user-status.enum';
2
- export * from './authenticate-request.schema';
3
- export * from './authenticate-response.schema';
@@ -1,8 +0,0 @@
1
- /**
2
- * Unregistered User Status
3
- */
4
- export declare enum UnregUserStatus {
5
- ACTIVE = "active",
6
- FRAUD = "fraud",
7
- MIGRATED = "migrated"
8
- }
@@ -1,15 +0,0 @@
1
- /**
2
- * Unregistered User error codes
3
- */
4
- export declare enum UnregUserErrorCode {
5
- /** Invalid JWT token */
6
- INVALID_TOKEN = "INVALID_TOKEN",
7
- /** Token expired or invalidated */
8
- TOKEN_EXPIRED = "TOKEN_EXPIRED",
9
- /** IP mismatch - token bound to different IP */
10
- IP_MISMATCH = "IP_MISMATCH",
11
- /** User marked as fraud */
12
- FRAUD_DETECTED = "FRAUD_DETECTED",
13
- /** Token version mismatch */
14
- TOKEN_VERSION_MISMATCH = "TOKEN_VERSION_MISMATCH"
15
- }
@@ -1,15 +0,0 @@
1
- /**
2
- * Unregistered Users API paths
3
- */
4
- export declare const UNREG_USERS_PATHS: {
5
- /** Base path for unregistered users controller */
6
- readonly BASE: "v1/unreg";
7
- /** Authenticate unregistered user - PUT /api/v1/unreg */
8
- readonly AUTHENTICATE: "";
9
- };
10
- /**
11
- * Full API paths (with /api prefix)
12
- */
13
- export declare const UNREG_USERS_API_PATHS: {
14
- readonly AUTHENTICATE: "/api/v1/unreg";
15
- };
@@ -1,9 +0,0 @@
1
- import { z } from 'zod';
2
- import { AuthenticateUnregUserRequestSchema, AuthenticateUnregUserResponseSchema } from './schemas';
3
- export { UnregUserStatus } from './schemas/unreg-user-status.enum';
4
- export { UnregUserStatus as UnregUserStatusContract } from './schemas/unreg-user-status.enum';
5
- /**
6
- * Request/Response Types
7
- */
8
- export type AuthenticateUnregUserRequest = z.infer<typeof AuthenticateUnregUserRequestSchema>;
9
- export type AuthenticateUnregUserResponse = z.infer<typeof AuthenticateUnregUserResponseSchema>;
@@ -1,17 +0,0 @@
1
- import { z } from 'zod';
2
- import { HttpMethod } from '../../../shared/http-method';
3
- export declare namespace UserChangePasswordCommand {
4
- const Request: z.ZodObject<{
5
- oldPassword: z.ZodString;
6
- newPassword: z.ZodString;
7
- logoutFromAllDevices: z.ZodDefault<z.ZodBoolean>;
8
- }, z.core.$strip>;
9
- const Response: z.ZodUnion<readonly [z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
10
- code: z.ZodString;
11
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
12
- }, z.core.$strip>]>;
13
- const URL: "/api/v1/users/me/password";
14
- const METHOD = HttpMethod.PUT;
15
- type RequestType = z.infer<typeof Request>;
16
- type ResponseType = z.infer<typeof Response>;
17
- }
@@ -1,13 +0,0 @@
1
- import { z } from 'zod';
2
- import { HttpMethod } from '../../../shared/http-method';
3
- export declare namespace UserDeleteAccountCommand {
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 URL: "/api/v1/users/me";
10
- const METHOD = HttpMethod.DELETE;
11
- type RequestType = z.infer<typeof Request>;
12
- type ResponseType = z.infer<typeof Response>;
13
- }
@@ -1,4 +0,0 @@
1
- export * from './update-profile.command';
2
- export * from './change-password.command';
3
- export * from './toggle-marketing-consent.command';
4
- export * from './delete-account.command';
@@ -1,15 +0,0 @@
1
- import { z } from 'zod';
2
- import { HttpMethod } from '../../../shared/http-method';
3
- export declare namespace UserToggleMarketingConsentCommand {
4
- const Request: z.ZodObject<{
5
- marketingConsent: z.ZodBoolean;
6
- }, z.core.$strip>;
7
- const Response: z.ZodUnion<readonly [z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
8
- code: z.ZodString;
9
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
10
- }, z.core.$strip>]>;
11
- const URL: "/api/v1/users/me/marketing-consent";
12
- const METHOD = HttpMethod.PUT;
13
- type RequestType = z.infer<typeof Request>;
14
- type ResponseType = z.infer<typeof Response>;
15
- }
@@ -1,15 +0,0 @@
1
- import { z } from 'zod';
2
- import { HttpMethod } from '../../../shared/http-method';
3
- export declare namespace UserUpdateProfileCommand {
4
- const Request: z.ZodObject<{
5
- name: z.ZodString;
6
- }, z.core.$strip>;
7
- const Response: z.ZodUnion<readonly [z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
8
- code: z.ZodString;
9
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
10
- }, z.core.$strip>]>;
11
- const URL: "/api/v1/users/me";
12
- const METHOD = HttpMethod.PATCH;
13
- type RequestType = z.infer<typeof Request>;
14
- type ResponseType = z.infer<typeof Response>;
15
- }
@@ -1,4 +0,0 @@
1
- /**
2
- * Users Controller paths for NestJS @Controller decorator
3
- */
4
- export declare const USERS_CONTROLLER: "v1/users";
@@ -1,5 +0,0 @@
1
- export * from './schemas';
2
- export * from './users.types';
3
- export * from './users.paths';
4
- export * from './commands';
5
- export * from './queries';
@@ -1,20 +0,0 @@
1
- import { z } from 'zod';
2
- import { HttpMethod } from '../../../shared/http-method';
3
- export declare namespace UserGetCurrentUserQuery {
4
- const Request: z.ZodObject<{}, z.core.$strip>;
5
- const Response: z.ZodUnion<readonly [z.ZodObject<{
6
- uuid: z.ZodString;
7
- email: z.ZodString;
8
- name: z.ZodString;
9
- role: z.ZodString;
10
- marketingConsent: z.ZodBoolean;
11
- createdAt: z.ZodString;
12
- }, z.core.$strip>, z.ZodObject<{
13
- code: z.ZodString;
14
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
15
- }, z.core.$strip>]>;
16
- const URL: "/api/v1/users/me";
17
- const METHOD = HttpMethod.GET;
18
- type RequestType = z.infer<typeof Request>;
19
- type ResponseType = z.infer<typeof Response>;
20
- }
@@ -1 +0,0 @@
1
- export * from './get-current-user.query';
@@ -1,9 +0,0 @@
1
- /**
2
- * Users Routes
3
- * For NestJS method decorators
4
- */
5
- export declare const USERS_ROUTES: {
6
- readonly ME: "me";
7
- readonly ME_MARKETING_CONSENT: "me/marketing-consent";
8
- readonly ME_PASSWORD: "me/password";
9
- };
@@ -1,10 +0,0 @@
1
- import { z } from 'zod';
2
- /**
3
- * Change Password Request Schema
4
- * Error messages are in locales (en.ts, ru.ts)
5
- */
6
- export declare const ChangePasswordRequestSchema: z.ZodObject<{
7
- oldPassword: z.ZodString;
8
- newPassword: z.ZodString;
9
- logoutFromAllDevices: z.ZodDefault<z.ZodBoolean>;
10
- }, z.core.$strip>;
@@ -1,5 +0,0 @@
1
- import { z } from 'zod';
2
- /**
3
- * Delete Account Request Schema (empty - no body)
4
- */
5
- export declare const DeleteAccountRequestSchema: z.ZodObject<{}, z.core.$strip>;
@@ -1,6 +0,0 @@
1
- export * from './user-response.schema';
2
- export * from './update-profile-request.schema';
3
- export * from './change-password-request.schema';
4
- export * from './toggle-marketing-consent-request.schema';
5
- export * from './delete-account-request.schema';
6
- export * from './response-unions.schema';
@@ -1,31 +0,0 @@
1
- import { z } from 'zod';
2
- /**
3
- * Endpoint Response Unions (for frontend type safety)
4
- */
5
- export declare const UpdateProfileResponseSchema: 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
- export declare const DeleteAccountResponseSchema: z.ZodUnion<readonly [z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
10
- code: z.ZodString;
11
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
12
- }, z.core.$strip>]>;
13
- export declare const ToggleMarketingConsentResponseSchema: z.ZodUnion<readonly [z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
14
- code: z.ZodString;
15
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
16
- }, z.core.$strip>]>;
17
- export declare const ChangePasswordResponseSchema: z.ZodUnion<readonly [z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
18
- code: z.ZodString;
19
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
20
- }, z.core.$strip>]>;
21
- export declare const GetCurrentUserResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
22
- uuid: z.ZodString;
23
- email: z.ZodString;
24
- name: z.ZodString;
25
- role: z.ZodString;
26
- marketingConsent: z.ZodBoolean;
27
- createdAt: z.ZodString;
28
- }, z.core.$strip>, z.ZodObject<{
29
- code: z.ZodString;
30
- details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
31
- }, z.core.$strip>]>;
@@ -1,7 +0,0 @@
1
- import { z } from 'zod';
2
- /**
3
- * Toggle Marketing Consent Request Schema
4
- */
5
- export declare const ToggleMarketingConsentRequestSchema: z.ZodObject<{
6
- marketingConsent: z.ZodBoolean;
7
- }, z.core.$strip>;
@@ -1,8 +0,0 @@
1
- import { z } from 'zod';
2
- /**
3
- * Update Profile Request Schema
4
- * Error messages are in locales (en.ts, ru.ts)
5
- */
6
- export declare const UpdateProfileRequestSchema: z.ZodObject<{
7
- name: z.ZodString;
8
- }, z.core.$strip>;
@@ -1,12 +0,0 @@
1
- import { z } from 'zod';
2
- /**
3
- * User Response Schema
4
- */
5
- export declare const UserResponseSchema: z.ZodObject<{
6
- uuid: z.ZodString;
7
- email: z.ZodString;
8
- name: z.ZodString;
9
- role: z.ZodString;
10
- marketingConsent: z.ZodBoolean;
11
- createdAt: z.ZodString;
12
- }, z.core.$strip>;
@@ -1,11 +0,0 @@
1
- export declare const USERS_PATHS: {
2
- readonly BASE: "v1/users";
3
- readonly ME: "me";
4
- readonly ME_MARKETING_CONSENT: "me/marketing-consent";
5
- readonly ME_PASSWORD: "me/password";
6
- };
7
- export declare const USERS_API_PATHS: {
8
- readonly ME: "/api/v1/users/me";
9
- readonly ME_MARKETING_CONSENT: "/api/v1/users/me/marketing-consent";
10
- readonly ME_PASSWORD: "/api/v1/users/me/password";
11
- };
@@ -1,11 +0,0 @@
1
- import { z } from 'zod';
2
- import { UserResponseSchema, UpdateProfileRequestSchema, ChangePasswordRequestSchema, ToggleMarketingConsentRequestSchema, UpdateProfileResponseSchema, DeleteAccountResponseSchema, ToggleMarketingConsentResponseSchema, ChangePasswordResponseSchema, GetCurrentUserResponseSchema } from './schemas';
3
- export type UpdateProfileRequest = z.infer<typeof UpdateProfileRequestSchema>;
4
- export type ChangePasswordRequest = z.infer<typeof ChangePasswordRequestSchema>;
5
- export type ToggleMarketingConsentRequest = z.infer<typeof ToggleMarketingConsentRequestSchema>;
6
- export type UserResponse = z.infer<typeof UserResponseSchema>;
7
- export type UpdateProfileResponse = z.infer<typeof UpdateProfileResponseSchema>;
8
- export type DeleteAccountResponse = z.infer<typeof DeleteAccountResponseSchema>;
9
- export type ToggleMarketingConsentResponse = z.infer<typeof ToggleMarketingConsentResponseSchema>;
10
- export type ChangePasswordResponse = z.infer<typeof ChangePasswordResponseSchema>;
11
- export type GetCurrentUserResponse = z.infer<typeof GetCurrentUserResponseSchema>;