@veruna/api-contracts 1.0.4 → 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.
- package/build/index.d.ts +3 -5
- package/build/index.js +3 -5
- package/build/rest-api.d.ts +3 -0
- package/build/rest-api.js +6 -0
- package/build/shared/error-response.schema.d.ts +25 -0
- package/build/shared/error-response.schema.js +22 -0
- package/build/shared/index.d.ts +2 -0
- package/build/shared/index.js +18 -0
- package/build/utils/index.d.ts +1 -0
- package/build/utils/index.js +17 -0
- package/build/utils/path-builder.d.ts +20 -0
- package/build/utils/path-builder.js +46 -0
- package/build/v1/auth/commands/delete-session.command.d.ts +3 -5
- package/build/v1/auth/commands/delete-session.command.js +8 -4
- package/build/v1/auth/commands/login.command.d.ts +3 -5
- package/build/v1/auth/commands/login.command.js +7 -5
- package/build/v1/auth/commands/logout-all.command.d.ts +2 -4
- package/build/v1/auth/commands/logout-all.command.js +8 -4
- package/build/v1/auth/commands/logout.command.d.ts +2 -4
- package/build/v1/auth/commands/logout.command.js +8 -4
- package/build/v1/auth/commands/signup.command.d.ts +3 -5
- package/build/v1/auth/commands/signup.command.js +7 -5
- package/build/v1/auth/index.d.ts +2 -0
- package/build/v1/auth/index.js +2 -0
- package/build/v1/auth/queries/get-sessions.query.d.ts +3 -5
- package/build/v1/auth/queries/get-sessions.query.js +8 -5
- package/build/v1/blog/admin/commands/create-category.command.d.ts +2 -5
- package/build/v1/blog/admin/commands/create-category.command.js +1 -5
- package/build/v1/blog/admin/commands/create-post.command.d.ts +2 -5
- package/build/v1/blog/admin/commands/create-post.command.js +1 -5
- package/build/v1/blog/admin/commands/delete-category.command.d.ts +1 -4
- package/build/v1/blog/admin/commands/delete-category.command.js +1 -3
- package/build/v1/blog/admin/commands/delete-post.command.d.ts +1 -4
- package/build/v1/blog/admin/commands/delete-post.command.js +1 -3
- package/build/v1/blog/admin/commands/update-category.command.d.ts +2 -5
- package/build/v1/blog/admin/commands/update-category.command.js +1 -5
- package/build/v1/blog/admin/commands/update-post.command.d.ts +2 -5
- package/build/v1/blog/admin/commands/update-post.command.js +1 -5
- package/build/v1/blog/admin/queries/get-categories.query.d.ts +2 -5
- package/build/v1/blog/admin/queries/get-categories.query.js +1 -4
- package/build/v1/blog/admin/queries/get-category.query.d.ts +2 -5
- package/build/v1/blog/admin/queries/get-category.query.js +1 -4
- package/build/v1/blog/admin/queries/get-post.query.d.ts +2 -5
- package/build/v1/blog/admin/queries/get-post.query.js +1 -4
- package/build/v1/blog/admin/queries/get-posts.query.d.ts +2 -38
- package/build/v1/blog/admin/queries/get-posts.query.js +3 -6
- package/build/v1/blog/index.d.ts +2 -0
- package/build/v1/blog/index.js +2 -0
- package/build/v1/blog/public/queries/get-categories.query.d.ts +2 -5
- package/build/v1/blog/public/queries/get-categories.query.js +1 -4
- package/build/v1/blog/public/queries/get-post-by-alias.query.d.ts +2 -5
- package/build/v1/blog/public/queries/get-post-by-alias.query.js +1 -4
- package/build/v1/blog/public/queries/get-posts.query.d.ts +2 -38
- package/build/v1/blog/public/queries/get-posts.query.js +3 -6
- package/build/v1/unregistered-users/commands/authenticate.command.d.ts +4 -6
- package/build/v1/unregistered-users/commands/authenticate.command.js +5 -5
- package/build/v1/unregistered-users/controllers.d.ts +4 -0
- package/build/v1/unregistered-users/controllers.js +7 -0
- package/build/v1/unregistered-users/routes/unreg-users.routes.d.ts +6 -0
- package/build/v1/unregistered-users/routes/unreg-users.routes.js +9 -0
- package/build/v1/users/commands/change-password.command.d.ts +2 -4
- package/build/v1/users/commands/change-password.command.js +8 -5
- package/build/v1/users/commands/delete-account.command.d.ts +2 -4
- package/build/v1/users/commands/delete-account.command.js +8 -5
- package/build/v1/users/commands/toggle-marketing-consent.command.d.ts +2 -4
- package/build/v1/users/commands/toggle-marketing-consent.command.js +8 -5
- package/build/v1/users/commands/update-profile.command.d.ts +2 -4
- package/build/v1/users/commands/update-profile.command.js +8 -5
- package/build/v1/users/index.d.ts +2 -0
- package/build/v1/users/index.js +2 -0
- package/build/v1/users/queries/get-current-user.query.d.ts +3 -5
- package/build/v1/users/queries/get-current-user.query.js +7 -5
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ export declare namespace AdminBlogUpdateCategoryCommand {
|
|
|
7
7
|
order: z.ZodOptional<z.ZodNumber>;
|
|
8
8
|
status: z.ZodOptional<z.ZodEnum<typeof import("../../schemas").BlogCategoryStatus>>;
|
|
9
9
|
}, z.core.$strip>;
|
|
10
|
-
const Response: z.
|
|
10
|
+
const Response: z.ZodObject<{
|
|
11
11
|
uuid: z.ZodString;
|
|
12
12
|
alias: z.ZodString;
|
|
13
13
|
title: z.ZodString;
|
|
@@ -15,10 +15,7 @@ export declare namespace AdminBlogUpdateCategoryCommand {
|
|
|
15
15
|
status: z.ZodEnum<typeof import("../../schemas").BlogCategoryStatus>;
|
|
16
16
|
createdAt: z.ZodString;
|
|
17
17
|
updatedAt: z.ZodString;
|
|
18
|
-
}, z.core.$strip
|
|
19
|
-
code: z.ZodString;
|
|
20
|
-
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
21
|
-
}, z.core.$strip>]>;
|
|
18
|
+
}, z.core.$strip>;
|
|
22
19
|
const PATH: ":uuid";
|
|
23
20
|
const URL: (uuid: string) => string;
|
|
24
21
|
const METHOD = HttpMethod.PATCH;
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AdminBlogUpdateCategoryCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
4
|
const schemas_1 = require("../../schemas");
|
|
6
5
|
const blog_admin_categories_routes_1 = require("../../routes/blog-admin-categories.routes");
|
|
7
6
|
const rest_api_1 = require("../../../../rest-api");
|
|
8
7
|
const http_method_1 = require("../../../../shared/http-method");
|
|
9
|
-
const common_schemas_1 = require("../../../../shared/common-schemas");
|
|
10
8
|
var AdminBlogUpdateCategoryCommand;
|
|
11
9
|
(function (AdminBlogUpdateCategoryCommand) {
|
|
12
|
-
// Request/Response
|
|
13
10
|
AdminBlogUpdateCategoryCommand.Request = schemas_1.UpdateCategoryRequestSchema;
|
|
14
|
-
AdminBlogUpdateCategoryCommand.Response =
|
|
15
|
-
// Path/URL/Method
|
|
11
|
+
AdminBlogUpdateCategoryCommand.Response = schemas_1.CategoryResponseSchema;
|
|
16
12
|
AdminBlogUpdateCategoryCommand.PATH = blog_admin_categories_routes_1.BLOG_ADMIN_CATEGORIES_ROUTES.UPDATE;
|
|
17
13
|
AdminBlogUpdateCategoryCommand.URL = (uuid) => rest_api_1.REST_API.V1.BLOG.ADMIN.CATEGORIES.UPDATE(uuid);
|
|
18
14
|
AdminBlogUpdateCategoryCommand.METHOD = http_method_1.HttpMethod.PATCH;
|
|
@@ -12,7 +12,7 @@ export declare namespace AdminBlogUpdatePostCommand {
|
|
|
12
12
|
categoryIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
13
13
|
status: z.ZodOptional<z.ZodEnum<typeof import("../../schemas").BlogPostStatus>>;
|
|
14
14
|
}, z.core.$strip>;
|
|
15
|
-
const Response: z.
|
|
15
|
+
const Response: z.ZodObject<{
|
|
16
16
|
uuid: z.ZodString;
|
|
17
17
|
alias: z.ZodString;
|
|
18
18
|
title: z.ZodString;
|
|
@@ -34,10 +34,7 @@ export declare namespace AdminBlogUpdatePostCommand {
|
|
|
34
34
|
status: z.ZodEnum<typeof import("../../schemas").BlogPostStatus>;
|
|
35
35
|
createdAt: z.ZodString;
|
|
36
36
|
updatedAt: z.ZodString;
|
|
37
|
-
}, z.core.$strip
|
|
38
|
-
code: z.ZodString;
|
|
39
|
-
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
40
|
-
}, z.core.$strip>]>;
|
|
37
|
+
}, z.core.$strip>;
|
|
41
38
|
const PATH: ":uuid";
|
|
42
39
|
const URL: (uuid: string) => string;
|
|
43
40
|
const METHOD = HttpMethod.PATCH;
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AdminBlogUpdatePostCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
4
|
const schemas_1 = require("../../schemas");
|
|
6
5
|
const blog_admin_posts_routes_1 = require("../../routes/blog-admin-posts.routes");
|
|
7
6
|
const rest_api_1 = require("../../../../rest-api");
|
|
8
7
|
const http_method_1 = require("../../../../shared/http-method");
|
|
9
|
-
const common_schemas_1 = require("../../../../shared/common-schemas");
|
|
10
8
|
var AdminBlogUpdatePostCommand;
|
|
11
9
|
(function (AdminBlogUpdatePostCommand) {
|
|
12
|
-
// Request/Response
|
|
13
10
|
AdminBlogUpdatePostCommand.Request = schemas_1.UpdatePostRequestSchema;
|
|
14
|
-
AdminBlogUpdatePostCommand.Response =
|
|
15
|
-
// Path/URL/Method
|
|
11
|
+
AdminBlogUpdatePostCommand.Response = schemas_1.PostResponseSchema;
|
|
16
12
|
AdminBlogUpdatePostCommand.PATH = blog_admin_posts_routes_1.BLOG_ADMIN_POSTS_ROUTES.UPDATE;
|
|
17
13
|
AdminBlogUpdatePostCommand.URL = (uuid) => rest_api_1.REST_API.V1.BLOG.ADMIN.POSTS.UPDATE(uuid);
|
|
18
14
|
AdminBlogUpdatePostCommand.METHOD = http_method_1.HttpMethod.PATCH;
|
|
@@ -5,7 +5,7 @@ export declare namespace AdminBlogGetCategoriesQuery {
|
|
|
5
5
|
const Request: z.ZodObject<{
|
|
6
6
|
status: z.ZodOptional<z.ZodEnum<typeof BlogCategoryStatus>>;
|
|
7
7
|
}, z.core.$strip>;
|
|
8
|
-
const Response: z.
|
|
8
|
+
const Response: z.ZodObject<{
|
|
9
9
|
categories: z.ZodArray<z.ZodObject<{
|
|
10
10
|
uuid: z.ZodString;
|
|
11
11
|
alias: z.ZodString;
|
|
@@ -15,10 +15,7 @@ export declare namespace AdminBlogGetCategoriesQuery {
|
|
|
15
15
|
createdAt: z.ZodString;
|
|
16
16
|
updatedAt: z.ZodString;
|
|
17
17
|
}, z.core.$strip>>;
|
|
18
|
-
}, z.core.$strip
|
|
19
|
-
code: z.ZodString;
|
|
20
|
-
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
21
|
-
}, z.core.$strip>]>;
|
|
18
|
+
}, z.core.$strip>;
|
|
22
19
|
const PATH: "";
|
|
23
20
|
const URL: "/api/v1/admin/blog/categories/";
|
|
24
21
|
const METHOD = HttpMethod.GET;
|
|
@@ -6,7 +6,6 @@ const schemas_1 = require("../../schemas");
|
|
|
6
6
|
const blog_admin_categories_routes_1 = require("../../routes/blog-admin-categories.routes");
|
|
7
7
|
const rest_api_1 = require("../../../../rest-api");
|
|
8
8
|
const http_method_1 = require("../../../../shared/http-method");
|
|
9
|
-
const common_schemas_1 = require("../../../../shared/common-schemas");
|
|
10
9
|
const CategoriesListAdminResponseSchema = zod_1.z.object({
|
|
11
10
|
categories: zod_1.z.array(schemas_1.CategoryResponseSchema),
|
|
12
11
|
});
|
|
@@ -15,10 +14,8 @@ const GetCategoriesQueryAdminSchema = zod_1.z.object({
|
|
|
15
14
|
});
|
|
16
15
|
var AdminBlogGetCategoriesQuery;
|
|
17
16
|
(function (AdminBlogGetCategoriesQuery) {
|
|
18
|
-
// Request/Response
|
|
19
17
|
AdminBlogGetCategoriesQuery.Request = GetCategoriesQueryAdminSchema;
|
|
20
|
-
AdminBlogGetCategoriesQuery.Response =
|
|
21
|
-
// Path/URL/Method
|
|
18
|
+
AdminBlogGetCategoriesQuery.Response = CategoriesListAdminResponseSchema;
|
|
22
19
|
AdminBlogGetCategoriesQuery.PATH = blog_admin_categories_routes_1.BLOG_ADMIN_CATEGORIES_ROUTES.GET_ALL;
|
|
23
20
|
AdminBlogGetCategoriesQuery.URL = rest_api_1.REST_API.V1.BLOG.ADMIN.CATEGORIES.GET_ALL;
|
|
24
21
|
AdminBlogGetCategoriesQuery.METHOD = http_method_1.HttpMethod.GET;
|
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { HttpMethod } from '../../../../shared/http-method';
|
|
3
3
|
export declare namespace AdminBlogGetCategoryQuery {
|
|
4
4
|
const Request: z.ZodObject<{}, z.core.$strip>;
|
|
5
|
-
const Response: z.
|
|
5
|
+
const Response: z.ZodObject<{
|
|
6
6
|
uuid: z.ZodString;
|
|
7
7
|
alias: z.ZodString;
|
|
8
8
|
title: z.ZodString;
|
|
@@ -10,10 +10,7 @@ export declare namespace AdminBlogGetCategoryQuery {
|
|
|
10
10
|
status: z.ZodEnum<typeof import("../../schemas").BlogCategoryStatus>;
|
|
11
11
|
createdAt: z.ZodString;
|
|
12
12
|
updatedAt: z.ZodString;
|
|
13
|
-
}, z.core.$strip
|
|
14
|
-
code: z.ZodString;
|
|
15
|
-
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
16
|
-
}, z.core.$strip>]>;
|
|
13
|
+
}, z.core.$strip>;
|
|
17
14
|
const PATH: ":uuid";
|
|
18
15
|
const URL: (uuid: string) => string;
|
|
19
16
|
const METHOD = HttpMethod.GET;
|
|
@@ -6,13 +6,10 @@ const schemas_1 = require("../../schemas");
|
|
|
6
6
|
const blog_admin_categories_routes_1 = require("../../routes/blog-admin-categories.routes");
|
|
7
7
|
const rest_api_1 = require("../../../../rest-api");
|
|
8
8
|
const http_method_1 = require("../../../../shared/http-method");
|
|
9
|
-
const common_schemas_1 = require("../../../../shared/common-schemas");
|
|
10
9
|
var AdminBlogGetCategoryQuery;
|
|
11
10
|
(function (AdminBlogGetCategoryQuery) {
|
|
12
|
-
// Request/Response
|
|
13
11
|
AdminBlogGetCategoryQuery.Request = zod_1.z.object({});
|
|
14
|
-
AdminBlogGetCategoryQuery.Response =
|
|
15
|
-
// Path/URL/Method
|
|
12
|
+
AdminBlogGetCategoryQuery.Response = schemas_1.CategoryResponseSchema;
|
|
16
13
|
AdminBlogGetCategoryQuery.PATH = blog_admin_categories_routes_1.BLOG_ADMIN_CATEGORIES_ROUTES.GET_BY_UUID;
|
|
17
14
|
AdminBlogGetCategoryQuery.URL = (uuid) => rest_api_1.REST_API.V1.BLOG.ADMIN.CATEGORIES.GET_BY_UUID(uuid);
|
|
18
15
|
AdminBlogGetCategoryQuery.METHOD = http_method_1.HttpMethod.GET;
|
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { HttpMethod } from '../../../../shared/http-method';
|
|
3
3
|
export declare namespace AdminBlogGetPostQuery {
|
|
4
4
|
const Request: z.ZodObject<{}, z.core.$strip>;
|
|
5
|
-
const Response: z.
|
|
5
|
+
const Response: z.ZodObject<{
|
|
6
6
|
uuid: z.ZodString;
|
|
7
7
|
alias: z.ZodString;
|
|
8
8
|
title: z.ZodString;
|
|
@@ -24,10 +24,7 @@ export declare namespace AdminBlogGetPostQuery {
|
|
|
24
24
|
status: z.ZodEnum<typeof import("../../schemas").BlogPostStatus>;
|
|
25
25
|
createdAt: z.ZodString;
|
|
26
26
|
updatedAt: z.ZodString;
|
|
27
|
-
}, z.core.$strip
|
|
28
|
-
code: z.ZodString;
|
|
29
|
-
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
30
|
-
}, z.core.$strip>]>;
|
|
27
|
+
}, z.core.$strip>;
|
|
31
28
|
const PATH: ":uuid";
|
|
32
29
|
const URL: (uuid: string) => string;
|
|
33
30
|
const METHOD = HttpMethod.GET;
|
|
@@ -6,13 +6,10 @@ const schemas_1 = require("../../schemas");
|
|
|
6
6
|
const blog_admin_posts_routes_1 = require("../../routes/blog-admin-posts.routes");
|
|
7
7
|
const rest_api_1 = require("../../../../rest-api");
|
|
8
8
|
const http_method_1 = require("../../../../shared/http-method");
|
|
9
|
-
const common_schemas_1 = require("../../../../shared/common-schemas");
|
|
10
9
|
var AdminBlogGetPostQuery;
|
|
11
10
|
(function (AdminBlogGetPostQuery) {
|
|
12
|
-
// Request/Response
|
|
13
11
|
AdminBlogGetPostQuery.Request = zod_1.z.object({});
|
|
14
|
-
AdminBlogGetPostQuery.Response =
|
|
15
|
-
// Path/URL/Method
|
|
12
|
+
AdminBlogGetPostQuery.Response = schemas_1.PostResponseSchema;
|
|
16
13
|
AdminBlogGetPostQuery.PATH = blog_admin_posts_routes_1.BLOG_ADMIN_POSTS_ROUTES.GET_BY_UUID;
|
|
17
14
|
AdminBlogGetPostQuery.URL = (uuid) => rest_api_1.REST_API.V1.BLOG.ADMIN.POSTS.GET_BY_UUID(uuid);
|
|
18
15
|
AdminBlogGetPostQuery.METHOD = http_method_1.HttpMethod.GET;
|
|
@@ -1,38 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
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
3
|
export declare namespace AdminBlogGetPostsQuery {
|
|
37
4
|
const Request: z.ZodObject<{
|
|
38
5
|
page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
@@ -40,7 +7,7 @@ export declare namespace AdminBlogGetPostsQuery {
|
|
|
40
7
|
status: z.ZodOptional<z.ZodEnum<typeof import("../../schemas").BlogPostStatus>>;
|
|
41
8
|
categoryAliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
42
9
|
}, z.core.$strip>;
|
|
43
|
-
const Response: z.
|
|
10
|
+
const Response: z.ZodObject<{
|
|
44
11
|
data: z.ZodArray<z.ZodObject<{
|
|
45
12
|
uuid: z.ZodString;
|
|
46
13
|
alias: z.ZodString;
|
|
@@ -72,10 +39,7 @@ export declare namespace AdminBlogGetPostsQuery {
|
|
|
72
39
|
hasNext: z.ZodBoolean;
|
|
73
40
|
hasPrev: z.ZodBoolean;
|
|
74
41
|
}, z.core.$strip>;
|
|
75
|
-
}, z.core.$strip
|
|
76
|
-
code: z.ZodString;
|
|
77
|
-
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
78
|
-
}, z.core.$strip>]>;
|
|
42
|
+
}, z.core.$strip>;
|
|
79
43
|
const PATH: "";
|
|
80
44
|
const URL: "/api/v1/admin/blog/posts/";
|
|
81
45
|
const METHOD = HttpMethod.GET;
|
|
@@ -1,23 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AdminBlogGetPostsQuery =
|
|
3
|
+
exports.AdminBlogGetPostsQuery = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const schemas_1 = require("../../schemas");
|
|
6
6
|
const pagination_schema_1 = require("../../../../shared/pagination.schema");
|
|
7
7
|
const blog_admin_posts_routes_1 = require("../../routes/blog-admin-posts.routes");
|
|
8
8
|
const rest_api_1 = require("../../../../rest-api");
|
|
9
9
|
const http_method_1 = require("../../../../shared/http-method");
|
|
10
|
-
const
|
|
11
|
-
exports.PostsListAdminResponseSchema = zod_1.z.object({
|
|
10
|
+
const PostsListAdminResponseSchema = zod_1.z.object({
|
|
12
11
|
data: zod_1.z.array(schemas_1.PostResponseSchema),
|
|
13
12
|
meta: pagination_schema_1.PaginationMetaSchema,
|
|
14
13
|
});
|
|
15
14
|
var AdminBlogGetPostsQuery;
|
|
16
15
|
(function (AdminBlogGetPostsQuery) {
|
|
17
|
-
// Request/Response
|
|
18
16
|
AdminBlogGetPostsQuery.Request = schemas_1.GetPostsQueryAdminSchema;
|
|
19
|
-
AdminBlogGetPostsQuery.Response =
|
|
20
|
-
// Path/URL/Method
|
|
17
|
+
AdminBlogGetPostsQuery.Response = PostsListAdminResponseSchema;
|
|
21
18
|
AdminBlogGetPostsQuery.PATH = blog_admin_posts_routes_1.BLOG_ADMIN_POSTS_ROUTES.GET_ALL;
|
|
22
19
|
AdminBlogGetPostsQuery.URL = rest_api_1.REST_API.V1.BLOG.ADMIN.POSTS.GET_ALL;
|
|
23
20
|
AdminBlogGetPostsQuery.METHOD = http_method_1.HttpMethod.GET;
|
package/build/v1/blog/index.d.ts
CHANGED
package/build/v1/blog/index.js
CHANGED
|
@@ -17,6 +17,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./schemas"), exports);
|
|
18
18
|
__exportStar(require("./blog.types"), exports);
|
|
19
19
|
__exportStar(require("./blog.paths"), exports);
|
|
20
|
+
__exportStar(require("./controllers"), exports);
|
|
21
|
+
__exportStar(require("./routes"), exports);
|
|
20
22
|
__exportStar(require("./admin/commands"), exports);
|
|
21
23
|
__exportStar(require("./admin/queries"), exports);
|
|
22
24
|
__exportStar(require("./public/queries"), exports);
|
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { HttpMethod } from '../../../../shared/http-method';
|
|
3
3
|
export declare namespace BlogGetCategoriesQuery {
|
|
4
4
|
const Request: z.ZodObject<{}, z.core.$strip>;
|
|
5
|
-
const Response: z.
|
|
5
|
+
const Response: z.ZodObject<{
|
|
6
6
|
categories: z.ZodArray<z.ZodObject<{
|
|
7
7
|
uuid: z.ZodString;
|
|
8
8
|
alias: z.ZodString;
|
|
@@ -12,10 +12,7 @@ export declare namespace BlogGetCategoriesQuery {
|
|
|
12
12
|
createdAt: z.ZodString;
|
|
13
13
|
updatedAt: z.ZodString;
|
|
14
14
|
}, z.core.$strip>>;
|
|
15
|
-
}, z.core.$strip
|
|
16
|
-
code: z.ZodString;
|
|
17
|
-
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
18
|
-
}, z.core.$strip>]>;
|
|
15
|
+
}, z.core.$strip>;
|
|
19
16
|
const PATH: "";
|
|
20
17
|
const URL: "/api/v1/blog/categories/";
|
|
21
18
|
const METHOD = HttpMethod.GET;
|
|
@@ -6,16 +6,13 @@ const schemas_1 = require("../../schemas");
|
|
|
6
6
|
const blog_public_routes_1 = require("../../routes/blog-public.routes");
|
|
7
7
|
const rest_api_1 = require("../../../../rest-api");
|
|
8
8
|
const http_method_1 = require("../../../../shared/http-method");
|
|
9
|
-
const common_schemas_1 = require("../../../../shared/common-schemas");
|
|
10
9
|
const CategoriesListPublicResponseSchema = zod_1.z.object({
|
|
11
10
|
categories: zod_1.z.array(schemas_1.CategoryResponseSchema),
|
|
12
11
|
});
|
|
13
12
|
var BlogGetCategoriesQuery;
|
|
14
13
|
(function (BlogGetCategoriesQuery) {
|
|
15
|
-
// Request/Response
|
|
16
14
|
BlogGetCategoriesQuery.Request = zod_1.z.object({});
|
|
17
|
-
BlogGetCategoriesQuery.Response =
|
|
18
|
-
// Path/URL/Method
|
|
15
|
+
BlogGetCategoriesQuery.Response = CategoriesListPublicResponseSchema;
|
|
19
16
|
BlogGetCategoriesQuery.PATH = blog_public_routes_1.BLOG_PUBLIC_CATEGORIES_ROUTES.GET_ALL;
|
|
20
17
|
BlogGetCategoriesQuery.URL = rest_api_1.REST_API.V1.BLOG.PUBLIC.CATEGORIES.GET_ALL;
|
|
21
18
|
BlogGetCategoriesQuery.METHOD = http_method_1.HttpMethod.GET;
|
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { HttpMethod } from '../../../../shared/http-method';
|
|
3
3
|
export declare namespace BlogGetPostByAliasQuery {
|
|
4
4
|
const Request: z.ZodObject<{}, z.core.$strip>;
|
|
5
|
-
const Response: z.
|
|
5
|
+
const Response: z.ZodObject<{
|
|
6
6
|
uuid: z.ZodString;
|
|
7
7
|
alias: z.ZodString;
|
|
8
8
|
title: z.ZodString;
|
|
@@ -24,10 +24,7 @@ export declare namespace BlogGetPostByAliasQuery {
|
|
|
24
24
|
status: z.ZodEnum<typeof import("../../schemas").BlogPostStatus>;
|
|
25
25
|
createdAt: z.ZodString;
|
|
26
26
|
updatedAt: z.ZodString;
|
|
27
|
-
}, z.core.$strip
|
|
28
|
-
code: z.ZodString;
|
|
29
|
-
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
30
|
-
}, z.core.$strip>]>;
|
|
27
|
+
}, z.core.$strip>;
|
|
31
28
|
const PATH: ":alias";
|
|
32
29
|
const URL: (alias: string) => string;
|
|
33
30
|
const METHOD = HttpMethod.GET;
|
|
@@ -6,13 +6,10 @@ const schemas_1 = require("../../schemas");
|
|
|
6
6
|
const blog_public_routes_1 = require("../../routes/blog-public.routes");
|
|
7
7
|
const rest_api_1 = require("../../../../rest-api");
|
|
8
8
|
const http_method_1 = require("../../../../shared/http-method");
|
|
9
|
-
const common_schemas_1 = require("../../../../shared/common-schemas");
|
|
10
9
|
var BlogGetPostByAliasQuery;
|
|
11
10
|
(function (BlogGetPostByAliasQuery) {
|
|
12
|
-
// Request/Response
|
|
13
11
|
BlogGetPostByAliasQuery.Request = zod_1.z.object({});
|
|
14
|
-
BlogGetPostByAliasQuery.Response =
|
|
15
|
-
// Path/URL/Method
|
|
12
|
+
BlogGetPostByAliasQuery.Response = schemas_1.PostResponseSchema;
|
|
16
13
|
BlogGetPostByAliasQuery.PATH = blog_public_routes_1.BLOG_PUBLIC_POSTS_ROUTES.GET_BY_ALIAS;
|
|
17
14
|
BlogGetPostByAliasQuery.URL = (alias) => rest_api_1.REST_API.V1.BLOG.PUBLIC.POSTS.GET_BY_ALIAS(alias);
|
|
18
15
|
BlogGetPostByAliasQuery.METHOD = http_method_1.HttpMethod.GET;
|
|
@@ -1,45 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
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
3
|
export declare namespace BlogGetPostsQuery {
|
|
37
4
|
const Request: z.ZodObject<{
|
|
38
5
|
page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
39
6
|
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
40
7
|
categoryAliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
41
8
|
}, z.core.$strip>;
|
|
42
|
-
const Response: z.
|
|
9
|
+
const Response: z.ZodObject<{
|
|
43
10
|
data: z.ZodArray<z.ZodObject<{
|
|
44
11
|
uuid: z.ZodString;
|
|
45
12
|
alias: z.ZodString;
|
|
@@ -71,10 +38,7 @@ export declare namespace BlogGetPostsQuery {
|
|
|
71
38
|
hasNext: z.ZodBoolean;
|
|
72
39
|
hasPrev: z.ZodBoolean;
|
|
73
40
|
}, z.core.$strip>;
|
|
74
|
-
}, z.core.$strip
|
|
75
|
-
code: z.ZodString;
|
|
76
|
-
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
77
|
-
}, z.core.$strip>]>;
|
|
41
|
+
}, z.core.$strip>;
|
|
78
42
|
const PATH: "";
|
|
79
43
|
const URL: "/api/v1/blog/posts/";
|
|
80
44
|
const METHOD = HttpMethod.GET;
|
|
@@ -1,23 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BlogGetPostsQuery =
|
|
3
|
+
exports.BlogGetPostsQuery = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const schemas_1 = require("../../schemas");
|
|
6
6
|
const pagination_schema_1 = require("../../../../shared/pagination.schema");
|
|
7
7
|
const blog_public_routes_1 = require("../../routes/blog-public.routes");
|
|
8
8
|
const rest_api_1 = require("../../../../rest-api");
|
|
9
9
|
const http_method_1 = require("../../../../shared/http-method");
|
|
10
|
-
const
|
|
11
|
-
exports.PostsListResponseSchema = zod_1.z.object({
|
|
10
|
+
const PostsListResponseSchema = zod_1.z.object({
|
|
12
11
|
data: zod_1.z.array(schemas_1.PostResponseSchema),
|
|
13
12
|
meta: pagination_schema_1.PaginationMetaSchema,
|
|
14
13
|
});
|
|
15
14
|
var BlogGetPostsQuery;
|
|
16
15
|
(function (BlogGetPostsQuery) {
|
|
17
|
-
// Request/Response
|
|
18
16
|
BlogGetPostsQuery.Request = schemas_1.GetPostsQueryPublicSchema;
|
|
19
|
-
BlogGetPostsQuery.Response =
|
|
20
|
-
// Path/URL/Method
|
|
17
|
+
BlogGetPostsQuery.Response = PostsListResponseSchema;
|
|
21
18
|
BlogGetPostsQuery.PATH = blog_public_routes_1.BLOG_PUBLIC_POSTS_ROUTES.GET_ALL;
|
|
22
19
|
BlogGetPostsQuery.URL = rest_api_1.REST_API.V1.BLOG.PUBLIC.POSTS.GET_ALL;
|
|
23
20
|
BlogGetPostsQuery.METHOD = http_method_1.HttpMethod.GET;
|
|
@@ -4,16 +4,14 @@ export declare namespace UnregAuthenticateCommand {
|
|
|
4
4
|
const Request: z.ZodObject<{
|
|
5
5
|
token: z.ZodOptional<z.ZodString>;
|
|
6
6
|
}, z.core.$strip>;
|
|
7
|
-
const Response: z.
|
|
7
|
+
const Response: z.ZodObject<{
|
|
8
8
|
token: z.ZodString;
|
|
9
9
|
requests: z.ZodNumber;
|
|
10
10
|
nextResetAt: z.ZodString;
|
|
11
11
|
status: z.ZodEnum<typeof import("../schemas").UnregUserStatus>;
|
|
12
|
-
}, z.core.$strip
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}, z.core.$strip>]>;
|
|
16
|
-
const URL: "/api/v1/unreg";
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
const PATH: "";
|
|
14
|
+
const URL: "/api/v1/unreg/";
|
|
17
15
|
const METHOD = HttpMethod.PUT;
|
|
18
16
|
type RequestType = z.infer<typeof Request>;
|
|
19
17
|
type ResponseType = z.infer<typeof Response>;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UnregAuthenticateCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
4
|
const schemas_1 = require("../schemas");
|
|
6
|
-
const
|
|
5
|
+
const unreg_users_routes_1 = require("../routes/unreg-users.routes");
|
|
6
|
+
const rest_api_1 = require("../../../rest-api");
|
|
7
7
|
const http_method_1 = require("../../../shared/http-method");
|
|
8
|
-
const common_schemas_1 = require("../../../shared/common-schemas");
|
|
9
8
|
var UnregAuthenticateCommand;
|
|
10
9
|
(function (UnregAuthenticateCommand) {
|
|
11
10
|
UnregAuthenticateCommand.Request = schemas_1.AuthenticateUnregUserRequestSchema;
|
|
12
|
-
UnregAuthenticateCommand.Response =
|
|
13
|
-
UnregAuthenticateCommand.
|
|
11
|
+
UnregAuthenticateCommand.Response = schemas_1.AuthenticateUnregUserResponseSchema;
|
|
12
|
+
UnregAuthenticateCommand.PATH = unreg_users_routes_1.UNREG_USERS_ROUTES.AUTHENTICATE;
|
|
13
|
+
UnregAuthenticateCommand.URL = rest_api_1.REST_API.V1.UNREG.AUTHENTICATE;
|
|
14
14
|
UnregAuthenticateCommand.METHOD = http_method_1.HttpMethod.PUT;
|
|
15
15
|
})(UnregAuthenticateCommand || (exports.UnregAuthenticateCommand = UnregAuthenticateCommand = {}));
|
|
@@ -6,10 +6,8 @@ export declare namespace UserChangePasswordCommand {
|
|
|
6
6
|
newPassword: z.ZodString;
|
|
7
7
|
logoutFromAllDevices: z.ZodDefault<z.ZodBoolean>;
|
|
8
8
|
}, z.core.$strip>;
|
|
9
|
-
const Response: z.
|
|
10
|
-
|
|
11
|
-
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
12
|
-
}, z.core.$strip>]>;
|
|
9
|
+
const Response: z.ZodObject<{}, z.core.$strip>;
|
|
10
|
+
const PATH: "me/password";
|
|
13
11
|
const URL: "/api/v1/users/me/password";
|
|
14
12
|
const METHOD = HttpMethod.PUT;
|
|
15
13
|
type RequestType = z.infer<typeof Request>;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UserChangePasswordCommand = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const change_password_request_schema_1 = require("../schemas/change-password-request.schema");
|
|
5
|
+
const users_routes_1 = require("../routes/users.routes");
|
|
6
|
+
const rest_api_1 = require("../../../rest-api");
|
|
6
7
|
const http_method_1 = require("../../../shared/http-method");
|
|
8
|
+
const common_schemas_1 = require("../../../shared/common-schemas");
|
|
7
9
|
var UserChangePasswordCommand;
|
|
8
10
|
(function (UserChangePasswordCommand) {
|
|
9
|
-
UserChangePasswordCommand.Request =
|
|
10
|
-
UserChangePasswordCommand.Response =
|
|
11
|
-
UserChangePasswordCommand.
|
|
11
|
+
UserChangePasswordCommand.Request = change_password_request_schema_1.ChangePasswordRequestSchema;
|
|
12
|
+
UserChangePasswordCommand.Response = common_schemas_1.EmptyResponseSchema;
|
|
13
|
+
UserChangePasswordCommand.PATH = users_routes_1.USERS_ROUTES.ME_PASSWORD;
|
|
14
|
+
UserChangePasswordCommand.URL = rest_api_1.REST_API.V1.USERS.ME_PASSWORD;
|
|
12
15
|
UserChangePasswordCommand.METHOD = http_method_1.HttpMethod.PUT;
|
|
13
16
|
})(UserChangePasswordCommand || (exports.UserChangePasswordCommand = UserChangePasswordCommand = {}));
|
|
@@ -2,10 +2,8 @@ import { z } from 'zod';
|
|
|
2
2
|
import { HttpMethod } from '../../../shared/http-method';
|
|
3
3
|
export declare namespace UserDeleteAccountCommand {
|
|
4
4
|
const Request: z.ZodObject<{}, z.core.$strip>;
|
|
5
|
-
const Response: z.
|
|
6
|
-
|
|
7
|
-
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
8
|
-
}, z.core.$strip>]>;
|
|
5
|
+
const Response: z.ZodObject<{}, z.core.$strip>;
|
|
6
|
+
const PATH: "me";
|
|
9
7
|
const URL: "/api/v1/users/me";
|
|
10
8
|
const METHOD = HttpMethod.DELETE;
|
|
11
9
|
type RequestType = z.infer<typeof Request>;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UserDeleteAccountCommand = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const users_routes_1 = require("../routes/users.routes");
|
|
6
|
+
const rest_api_1 = require("../../../rest-api");
|
|
6
7
|
const http_method_1 = require("../../../shared/http-method");
|
|
8
|
+
const common_schemas_1 = require("../../../shared/common-schemas");
|
|
7
9
|
var UserDeleteAccountCommand;
|
|
8
10
|
(function (UserDeleteAccountCommand) {
|
|
9
|
-
UserDeleteAccountCommand.Request =
|
|
10
|
-
UserDeleteAccountCommand.Response =
|
|
11
|
-
UserDeleteAccountCommand.
|
|
11
|
+
UserDeleteAccountCommand.Request = zod_1.z.object({});
|
|
12
|
+
UserDeleteAccountCommand.Response = common_schemas_1.EmptyResponseSchema;
|
|
13
|
+
UserDeleteAccountCommand.PATH = users_routes_1.USERS_ROUTES.ME;
|
|
14
|
+
UserDeleteAccountCommand.URL = rest_api_1.REST_API.V1.USERS.ME;
|
|
12
15
|
UserDeleteAccountCommand.METHOD = http_method_1.HttpMethod.DELETE;
|
|
13
16
|
})(UserDeleteAccountCommand || (exports.UserDeleteAccountCommand = UserDeleteAccountCommand = {}));
|