@veruna/api-contracts 1.0.3 → 1.0.4
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 -0
- package/build/index.js +3 -0
- package/build/locales/en.d.ts +31 -0
- package/build/locales/en.js +38 -0
- package/build/locales/index.d.ts +66 -0
- package/build/locales/index.js +22 -0
- package/build/locales/ru.d.ts +30 -0
- package/build/locales/ru.js +38 -0
- package/build/rest-api.d.ts +49 -0
- package/build/rest-api.js +61 -0
- package/build/shared/common-schemas.d.ts +12 -0
- package/build/shared/common-schemas.js +15 -0
- package/build/shared/pagination.schema.d.ts +35 -0
- package/build/shared/pagination.schema.js +30 -0
- package/build/shared/regex.d.ts +8 -0
- package/build/shared/regex.js +16 -0
- package/build/v1/auth/auth.types.d.ts +2 -1
- package/build/v1/auth/auth.types.js +4 -1
- package/build/v1/auth/commands/delete-session.command.d.ts +13 -0
- package/build/v1/auth/commands/delete-session.command.js +14 -0
- package/build/v1/auth/commands/index.d.ts +2 -0
- package/build/v1/auth/commands/index.js +2 -0
- package/build/v1/auth/commands/login.command.js +5 -4
- package/build/v1/auth/commands/logout-all.command.d.ts +13 -0
- package/build/v1/auth/commands/logout-all.command.js +14 -0
- package/build/v1/auth/commands/logout.command.js +2 -2
- package/build/v1/auth/commands/signup.command.js +5 -4
- package/build/v1/auth/controllers.d.ts +4 -0
- package/build/v1/auth/controllers.js +7 -0
- package/build/v1/auth/index.d.ts +2 -1
- package/build/v1/auth/index.js +2 -1
- package/build/v1/auth/queries/get-sessions.query.d.ts +22 -0
- package/build/v1/auth/queries/get-sessions.query.js +15 -0
- package/build/v1/auth/queries/index.d.ts +1 -0
- package/build/v1/auth/queries/index.js +17 -0
- package/build/v1/auth/routes/auth.routes.d.ts +12 -0
- package/build/v1/auth/routes/auth.routes.js +15 -0
- package/build/v1/auth/schemas/auth-response.schema.d.ts +36 -0
- package/build/v1/auth/schemas/auth-response.schema.js +20 -0
- package/build/v1/auth/schemas/index.d.ts +5 -0
- package/build/v1/auth/schemas/index.js +21 -0
- package/build/v1/auth/schemas/login-request.schema.d.ts +9 -0
- package/build/v1/auth/schemas/login-request.schema.js +13 -0
- package/build/v1/auth/schemas/session-response.schema.d.ts +13 -0
- package/build/v1/auth/schemas/session-response.schema.js +17 -0
- package/build/v1/auth/schemas/signup-request.schema.d.ts +28 -0
- package/build/v1/auth/schemas/signup-request.schema.js +26 -0
- package/build/v1/auth/schemas/user-role.enum.d.ts +7 -0
- package/build/v1/auth/schemas/user-role.enum.js +11 -0
- package/build/v1/blog/admin/commands/create-category.command.d.ts +27 -0
- package/build/v1/blog/admin/commands/create-category.command.js +19 -0
- package/build/v1/blog/admin/commands/create-post.command.d.ts +46 -0
- package/build/v1/blog/admin/commands/create-post.command.js +19 -0
- package/build/v1/blog/admin/commands/delete-category.command.d.ts +14 -0
- package/build/v1/blog/admin/commands/delete-category.command.js +18 -0
- package/build/v1/blog/admin/commands/delete-post.command.d.ts +14 -0
- package/build/v1/blog/admin/commands/delete-post.command.js +18 -0
- package/build/v1/blog/admin/commands/index.d.ts +6 -0
- package/build/v1/blog/admin/commands/index.js +22 -0
- package/build/v1/blog/admin/commands/update-category.command.d.ts +27 -0
- package/build/v1/blog/admin/commands/update-category.command.js +19 -0
- package/build/v1/blog/admin/commands/update-post.command.d.ts +46 -0
- package/build/v1/blog/admin/commands/update-post.command.js +19 -0
- package/build/v1/blog/admin/queries/get-categories.query.d.ts +27 -0
- package/build/v1/blog/admin/queries/get-categories.query.js +25 -0
- package/build/v1/blog/admin/queries/get-category.query.d.ts +22 -0
- package/build/v1/blog/admin/queries/get-category.query.js +19 -0
- package/build/v1/blog/admin/queries/get-post.query.d.ts +36 -0
- package/build/v1/blog/admin/queries/get-post.query.js +19 -0
- package/build/v1/blog/admin/queries/get-posts.query.d.ts +84 -0
- package/build/v1/blog/admin/queries/get-posts.query.js +24 -0
- package/build/v1/blog/admin/queries/index.d.ts +4 -0
- package/build/v1/blog/admin/queries/index.js +20 -0
- package/build/v1/blog/blog.paths.d.ts +36 -0
- package/build/v1/blog/blog.paths.js +47 -0
- package/build/v1/blog/blog.types.d.ts +12 -0
- package/build/v1/blog/blog.types.js +7 -0
- package/build/v1/blog/controllers.d.ts +7 -0
- package/build/v1/blog/controllers.js +10 -0
- package/build/v1/blog/index.d.ts +6 -0
- package/build/v1/blog/index.js +22 -0
- package/build/v1/blog/public/queries/get-categories.query.d.ts +24 -0
- package/build/v1/blog/public/queries/get-categories.query.js +22 -0
- package/build/v1/blog/public/queries/get-post-by-alias.query.d.ts +36 -0
- package/build/v1/blog/public/queries/get-post-by-alias.query.js +19 -0
- package/build/v1/blog/public/queries/get-posts.query.d.ts +83 -0
- package/build/v1/blog/public/queries/get-posts.query.js +24 -0
- package/build/v1/blog/public/queries/index.d.ts +3 -0
- package/build/v1/blog/public/queries/index.js +19 -0
- package/build/v1/blog/routes/blog-admin-categories.routes.d.ts +11 -0
- package/build/v1/blog/routes/blog-admin-categories.routes.js +14 -0
- package/build/v1/blog/routes/blog-admin-posts.routes.d.ts +10 -0
- package/build/v1/blog/routes/blog-admin-posts.routes.js +13 -0
- package/build/v1/blog/routes/blog-public.routes.d.ts +10 -0
- package/build/v1/blog/routes/blog-public.routes.js +13 -0
- package/build/v1/blog/routes/index.d.ts +3 -0
- package/build/v1/blog/routes/index.js +19 -0
- package/build/v1/blog/schemas/blog-category-status.enum.d.ts +8 -0
- package/build/v1/blog/schemas/blog-category-status.enum.js +12 -0
- package/build/v1/blog/schemas/blog-post-status.enum.d.ts +8 -0
- package/build/v1/blog/schemas/blog-post-status.enum.js +12 -0
- package/build/v1/blog/schemas/category-response.schema.d.ts +14 -0
- package/build/v1/blog/schemas/category-response.schema.js +18 -0
- package/build/v1/blog/schemas/create-category-request.schema.d.ts +8 -0
- package/build/v1/blog/schemas/create-category-request.schema.js +12 -0
- package/build/v1/blog/schemas/create-post-request.schema.d.ts +13 -0
- package/build/v1/blog/schemas/create-post-request.schema.js +17 -0
- package/build/v1/blog/schemas/get-posts-query.schema.d.ts +13 -0
- package/build/v1/blog/schemas/get-posts-query.schema.js +13 -0
- package/build/v1/blog/schemas/index.d.ts +9 -0
- package/build/v1/blog/schemas/index.js +25 -0
- package/build/v1/blog/schemas/post-response.schema.d.ts +28 -0
- package/build/v1/blog/schemas/post-response.schema.js +25 -0
- package/build/v1/blog/schemas/update-category-request.schema.d.ts +8 -0
- package/build/v1/blog/schemas/update-category-request.schema.js +12 -0
- package/build/v1/blog/schemas/update-post-request.schema.d.ts +13 -0
- package/build/v1/blog/schemas/update-post-request.schema.js +17 -0
- package/build/v1/unregistered-users/commands/authenticate.command.d.ts +20 -0
- package/build/v1/unregistered-users/commands/authenticate.command.js +15 -0
- package/build/v1/unregistered-users/commands/index.d.ts +1 -0
- package/build/v1/unregistered-users/commands/index.js +17 -0
- package/build/v1/unregistered-users/index.d.ts +2 -1
- package/build/v1/unregistered-users/index.js +2 -1
- package/build/v1/unregistered-users/schemas/authenticate-request.schema.d.ts +7 -0
- package/build/v1/unregistered-users/schemas/authenticate-request.schema.js +10 -0
- package/build/v1/unregistered-users/schemas/authenticate-response.schema.d.ts +11 -0
- package/build/v1/unregistered-users/schemas/authenticate-response.schema.js +15 -0
- package/build/v1/unregistered-users/schemas/index.d.ts +3 -0
- package/build/v1/unregistered-users/schemas/index.js +19 -0
- package/build/v1/unregistered-users/schemas/unreg-user-status.enum.d.ts +8 -0
- package/build/v1/unregistered-users/schemas/unreg-user-status.enum.js +12 -0
- package/build/v1/unregistered-users/unregistered-users.types.d.ts +3 -1
- package/build/v1/unregistered-users/unregistered-users.types.js +6 -0
- package/build/v1/users/commands/change-password.command.js +3 -3
- package/build/v1/users/commands/delete-account.command.d.ts +13 -0
- package/build/v1/users/commands/delete-account.command.js +13 -0
- package/build/v1/users/commands/index.d.ts +2 -0
- package/build/v1/users/commands/index.js +2 -0
- package/build/v1/users/commands/toggle-marketing-consent.command.d.ts +15 -0
- package/build/v1/users/commands/toggle-marketing-consent.command.js +13 -0
- package/build/v1/users/commands/update-profile.command.js +3 -3
- package/build/v1/users/controllers.d.ts +4 -0
- package/build/v1/users/controllers.js +7 -0
- package/build/v1/users/index.d.ts +1 -1
- package/build/v1/users/index.js +1 -1
- package/build/v1/users/queries/get-current-user.query.js +2 -2
- package/build/v1/users/routes/users.routes.d.ts +9 -0
- package/build/v1/users/routes/users.routes.js +12 -0
- package/build/v1/users/schemas/change-password-request.schema.d.ts +10 -0
- package/build/v1/users/schemas/change-password-request.schema.js +14 -0
- package/build/v1/users/schemas/delete-account-request.schema.d.ts +5 -0
- package/build/v1/users/schemas/delete-account-request.schema.js +8 -0
- package/build/v1/users/schemas/index.d.ts +6 -0
- package/build/v1/users/schemas/index.js +22 -0
- package/build/v1/users/{users.schemas.d.ts → schemas/response-unions.schema.d.ts} +0 -42
- package/build/v1/users/schemas/response-unions.schema.js +14 -0
- package/build/v1/users/schemas/toggle-marketing-consent-request.schema.d.ts +7 -0
- package/build/v1/users/schemas/toggle-marketing-consent-request.schema.js +10 -0
- package/build/v1/users/schemas/update-profile-request.schema.d.ts +8 -0
- package/build/v1/users/schemas/update-profile-request.schema.js +11 -0
- package/build/v1/users/schemas/user-response.schema.d.ts +12 -0
- package/build/v1/users/schemas/user-response.schema.js +16 -0
- package/build/v1/users/users.types.d.ts +2 -4
- package/package.json +1 -1
- package/build/v1/auth/auth.schemas.d.ts +0 -87
- package/build/v1/auth/auth.schemas.js +0 -69
- package/build/v1/unregistered-users/unregistered-users.schemas.d.ts +0 -24
- package/build/v1/unregistered-users/unregistered-users.schemas.js +0 -28
- package/build/v1/users/users.schemas.js +0 -58
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminBlogUpdatePostCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const schemas_1 = require("../../schemas");
|
|
6
|
+
const blog_admin_posts_routes_1 = require("../../routes/blog-admin-posts.routes");
|
|
7
|
+
const rest_api_1 = require("../../../../rest-api");
|
|
8
|
+
const http_method_1 = require("../../../../shared/http-method");
|
|
9
|
+
const common_schemas_1 = require("../../../../shared/common-schemas");
|
|
10
|
+
var AdminBlogUpdatePostCommand;
|
|
11
|
+
(function (AdminBlogUpdatePostCommand) {
|
|
12
|
+
// Request/Response
|
|
13
|
+
AdminBlogUpdatePostCommand.Request = schemas_1.UpdatePostRequestSchema;
|
|
14
|
+
AdminBlogUpdatePostCommand.Response = zod_1.z.union([schemas_1.PostResponseSchema, common_schemas_1.ErrorResponseSchema]);
|
|
15
|
+
// Path/URL/Method
|
|
16
|
+
AdminBlogUpdatePostCommand.PATH = blog_admin_posts_routes_1.BLOG_ADMIN_POSTS_ROUTES.UPDATE;
|
|
17
|
+
AdminBlogUpdatePostCommand.URL = (uuid) => rest_api_1.REST_API.V1.BLOG.ADMIN.POSTS.UPDATE(uuid);
|
|
18
|
+
AdminBlogUpdatePostCommand.METHOD = http_method_1.HttpMethod.PATCH;
|
|
19
|
+
})(AdminBlogUpdatePostCommand || (exports.AdminBlogUpdatePostCommand = AdminBlogUpdatePostCommand = {}));
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminBlogGetCategoriesQuery = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const schemas_1 = require("../../schemas");
|
|
6
|
+
const blog_admin_categories_routes_1 = require("../../routes/blog-admin-categories.routes");
|
|
7
|
+
const rest_api_1 = require("../../../../rest-api");
|
|
8
|
+
const http_method_1 = require("../../../../shared/http-method");
|
|
9
|
+
const common_schemas_1 = require("../../../../shared/common-schemas");
|
|
10
|
+
const CategoriesListAdminResponseSchema = zod_1.z.object({
|
|
11
|
+
categories: zod_1.z.array(schemas_1.CategoryResponseSchema),
|
|
12
|
+
});
|
|
13
|
+
const GetCategoriesQueryAdminSchema = zod_1.z.object({
|
|
14
|
+
status: zod_1.z.nativeEnum(schemas_1.BlogCategoryStatus).optional(),
|
|
15
|
+
});
|
|
16
|
+
var AdminBlogGetCategoriesQuery;
|
|
17
|
+
(function (AdminBlogGetCategoriesQuery) {
|
|
18
|
+
// Request/Response
|
|
19
|
+
AdminBlogGetCategoriesQuery.Request = GetCategoriesQueryAdminSchema;
|
|
20
|
+
AdminBlogGetCategoriesQuery.Response = zod_1.z.union([CategoriesListAdminResponseSchema, common_schemas_1.ErrorResponseSchema]);
|
|
21
|
+
// Path/URL/Method
|
|
22
|
+
AdminBlogGetCategoriesQuery.PATH = blog_admin_categories_routes_1.BLOG_ADMIN_CATEGORIES_ROUTES.GET_ALL;
|
|
23
|
+
AdminBlogGetCategoriesQuery.URL = rest_api_1.REST_API.V1.BLOG.ADMIN.CATEGORIES.GET_ALL;
|
|
24
|
+
AdminBlogGetCategoriesQuery.METHOD = http_method_1.HttpMethod.GET;
|
|
25
|
+
})(AdminBlogGetCategoriesQuery || (exports.AdminBlogGetCategoriesQuery = AdminBlogGetCategoriesQuery = {}));
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminBlogGetCategoryQuery = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const schemas_1 = require("../../schemas");
|
|
6
|
+
const blog_admin_categories_routes_1 = require("../../routes/blog-admin-categories.routes");
|
|
7
|
+
const rest_api_1 = require("../../../../rest-api");
|
|
8
|
+
const http_method_1 = require("../../../../shared/http-method");
|
|
9
|
+
const common_schemas_1 = require("../../../../shared/common-schemas");
|
|
10
|
+
var AdminBlogGetCategoryQuery;
|
|
11
|
+
(function (AdminBlogGetCategoryQuery) {
|
|
12
|
+
// Request/Response
|
|
13
|
+
AdminBlogGetCategoryQuery.Request = zod_1.z.object({});
|
|
14
|
+
AdminBlogGetCategoryQuery.Response = zod_1.z.union([schemas_1.CategoryResponseSchema, common_schemas_1.ErrorResponseSchema]);
|
|
15
|
+
// Path/URL/Method
|
|
16
|
+
AdminBlogGetCategoryQuery.PATH = blog_admin_categories_routes_1.BLOG_ADMIN_CATEGORIES_ROUTES.GET_BY_UUID;
|
|
17
|
+
AdminBlogGetCategoryQuery.URL = (uuid) => rest_api_1.REST_API.V1.BLOG.ADMIN.CATEGORIES.GET_BY_UUID(uuid);
|
|
18
|
+
AdminBlogGetCategoryQuery.METHOD = http_method_1.HttpMethod.GET;
|
|
19
|
+
})(AdminBlogGetCategoryQuery || (exports.AdminBlogGetCategoryQuery = AdminBlogGetCategoryQuery = {}));
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminBlogGetPostQuery = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const schemas_1 = require("../../schemas");
|
|
6
|
+
const blog_admin_posts_routes_1 = require("../../routes/blog-admin-posts.routes");
|
|
7
|
+
const rest_api_1 = require("../../../../rest-api");
|
|
8
|
+
const http_method_1 = require("../../../../shared/http-method");
|
|
9
|
+
const common_schemas_1 = require("../../../../shared/common-schemas");
|
|
10
|
+
var AdminBlogGetPostQuery;
|
|
11
|
+
(function (AdminBlogGetPostQuery) {
|
|
12
|
+
// Request/Response
|
|
13
|
+
AdminBlogGetPostQuery.Request = zod_1.z.object({});
|
|
14
|
+
AdminBlogGetPostQuery.Response = zod_1.z.union([schemas_1.PostResponseSchema, common_schemas_1.ErrorResponseSchema]);
|
|
15
|
+
// Path/URL/Method
|
|
16
|
+
AdminBlogGetPostQuery.PATH = blog_admin_posts_routes_1.BLOG_ADMIN_POSTS_ROUTES.GET_BY_UUID;
|
|
17
|
+
AdminBlogGetPostQuery.URL = (uuid) => rest_api_1.REST_API.V1.BLOG.ADMIN.POSTS.GET_BY_UUID(uuid);
|
|
18
|
+
AdminBlogGetPostQuery.METHOD = http_method_1.HttpMethod.GET;
|
|
19
|
+
})(AdminBlogGetPostQuery || (exports.AdminBlogGetPostQuery = AdminBlogGetPostQuery = {}));
|
|
@@ -0,0 +1,84 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminBlogGetPostsQuery = exports.PostsListAdminResponseSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const schemas_1 = require("../../schemas");
|
|
6
|
+
const pagination_schema_1 = require("../../../../shared/pagination.schema");
|
|
7
|
+
const blog_admin_posts_routes_1 = require("../../routes/blog-admin-posts.routes");
|
|
8
|
+
const rest_api_1 = require("../../../../rest-api");
|
|
9
|
+
const http_method_1 = require("../../../../shared/http-method");
|
|
10
|
+
const common_schemas_1 = require("../../../../shared/common-schemas");
|
|
11
|
+
exports.PostsListAdminResponseSchema = zod_1.z.object({
|
|
12
|
+
data: zod_1.z.array(schemas_1.PostResponseSchema),
|
|
13
|
+
meta: pagination_schema_1.PaginationMetaSchema,
|
|
14
|
+
});
|
|
15
|
+
var AdminBlogGetPostsQuery;
|
|
16
|
+
(function (AdminBlogGetPostsQuery) {
|
|
17
|
+
// Request/Response
|
|
18
|
+
AdminBlogGetPostsQuery.Request = schemas_1.GetPostsQueryAdminSchema;
|
|
19
|
+
AdminBlogGetPostsQuery.Response = zod_1.z.union([exports.PostsListAdminResponseSchema, common_schemas_1.ErrorResponseSchema]);
|
|
20
|
+
// Path/URL/Method
|
|
21
|
+
AdminBlogGetPostsQuery.PATH = blog_admin_posts_routes_1.BLOG_ADMIN_POSTS_ROUTES.GET_ALL;
|
|
22
|
+
AdminBlogGetPostsQuery.URL = rest_api_1.REST_API.V1.BLOG.ADMIN.POSTS.GET_ALL;
|
|
23
|
+
AdminBlogGetPostsQuery.METHOD = http_method_1.HttpMethod.GET;
|
|
24
|
+
})(AdminBlogGetPostsQuery || (exports.AdminBlogGetPostsQuery = AdminBlogGetPostsQuery = {}));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./get-category.query"), exports);
|
|
18
|
+
__exportStar(require("./get-categories.query"), exports);
|
|
19
|
+
__exportStar(require("./get-post.query"), exports);
|
|
20
|
+
__exportStar(require("./get-posts.query"), exports);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Blog Admin API Paths (UUID-based, requires admin role)
|
|
3
|
+
*/
|
|
4
|
+
export declare const BLOG_ADMIN_PATHS: {
|
|
5
|
+
readonly BASE: "v1/admin/blog";
|
|
6
|
+
readonly CATEGORIES: "categories";
|
|
7
|
+
readonly CATEGORY_BY_UUID: "categories/:uuid";
|
|
8
|
+
readonly POSTS: "posts";
|
|
9
|
+
readonly POST_BY_UUID: "posts/:uuid";
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Blog Public API Paths (alias-based, public access)
|
|
13
|
+
*/
|
|
14
|
+
export declare const BLOG_PUBLIC_PATHS: {
|
|
15
|
+
readonly BASE: "v1/blog";
|
|
16
|
+
readonly CATEGORIES: "categories";
|
|
17
|
+
readonly POSTS: "posts";
|
|
18
|
+
readonly POST_BY_ALIAS: "posts/:alias";
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Full Admin API URLs
|
|
22
|
+
*/
|
|
23
|
+
export declare const BLOG_ADMIN_API_PATHS: {
|
|
24
|
+
readonly CATEGORIES: "/api/v1/admin/blog/categories";
|
|
25
|
+
readonly CATEGORY_BY_UUID: (uuid: string) => string;
|
|
26
|
+
readonly POSTS: "/api/v1/admin/blog/posts";
|
|
27
|
+
readonly POST_BY_UUID: (uuid: string) => string;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Full Public API URLs
|
|
31
|
+
*/
|
|
32
|
+
export declare const BLOG_PUBLIC_API_PATHS: {
|
|
33
|
+
readonly CATEGORIES: "/api/v1/blog/categories";
|
|
34
|
+
readonly POSTS: "/api/v1/blog/posts";
|
|
35
|
+
readonly POST_BY_ALIAS: (alias: string) => string;
|
|
36
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BLOG_PUBLIC_API_PATHS = exports.BLOG_ADMIN_API_PATHS = exports.BLOG_PUBLIC_PATHS = exports.BLOG_ADMIN_PATHS = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Blog Admin API Paths (UUID-based, requires admin role)
|
|
6
|
+
*/
|
|
7
|
+
exports.BLOG_ADMIN_PATHS = {
|
|
8
|
+
BASE: 'v1/admin/blog',
|
|
9
|
+
// Categories
|
|
10
|
+
CATEGORIES: 'categories',
|
|
11
|
+
CATEGORY_BY_UUID: 'categories/:uuid',
|
|
12
|
+
// Posts
|
|
13
|
+
POSTS: 'posts',
|
|
14
|
+
POST_BY_UUID: 'posts/:uuid',
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Blog Public API Paths (alias-based, public access)
|
|
18
|
+
*/
|
|
19
|
+
exports.BLOG_PUBLIC_PATHS = {
|
|
20
|
+
BASE: 'v1/blog',
|
|
21
|
+
// Categories
|
|
22
|
+
CATEGORIES: 'categories',
|
|
23
|
+
// Posts
|
|
24
|
+
POSTS: 'posts',
|
|
25
|
+
POST_BY_ALIAS: 'posts/:alias',
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Full Admin API URLs
|
|
29
|
+
*/
|
|
30
|
+
exports.BLOG_ADMIN_API_PATHS = {
|
|
31
|
+
// Categories
|
|
32
|
+
CATEGORIES: `/api/${exports.BLOG_ADMIN_PATHS.BASE}/${exports.BLOG_ADMIN_PATHS.CATEGORIES}`,
|
|
33
|
+
CATEGORY_BY_UUID: (uuid) => `/api/${exports.BLOG_ADMIN_PATHS.BASE}/categories/${uuid}`,
|
|
34
|
+
// Posts
|
|
35
|
+
POSTS: `/api/${exports.BLOG_ADMIN_PATHS.BASE}/${exports.BLOG_ADMIN_PATHS.POSTS}`,
|
|
36
|
+
POST_BY_UUID: (uuid) => `/api/${exports.BLOG_ADMIN_PATHS.BASE}/posts/${uuid}`,
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Full Public API URLs
|
|
40
|
+
*/
|
|
41
|
+
exports.BLOG_PUBLIC_API_PATHS = {
|
|
42
|
+
// Categories
|
|
43
|
+
CATEGORIES: `/api/${exports.BLOG_PUBLIC_PATHS.BASE}/${exports.BLOG_PUBLIC_PATHS.CATEGORIES}`,
|
|
44
|
+
// Posts
|
|
45
|
+
POSTS: `/api/${exports.BLOG_PUBLIC_PATHS.BASE}/${exports.BLOG_PUBLIC_PATHS.POSTS}`,
|
|
46
|
+
POST_BY_ALIAS: (alias) => `/api/${exports.BLOG_PUBLIC_PATHS.BASE}/posts/${alias}`,
|
|
47
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { CategoryResponseSchema, CreateCategoryRequestSchema, UpdateCategoryRequestSchema, PostResponseSchema, CreatePostRequestSchema, UpdatePostRequestSchema, GetPostsQueryAdminSchema, GetPostsQueryPublicSchema } from './schemas';
|
|
3
|
+
export { BlogCategoryStatus } from './schemas/blog-category-status.enum';
|
|
4
|
+
export { BlogPostStatus } from './schemas/blog-post-status.enum';
|
|
5
|
+
export type CategoryResponse = z.infer<typeof CategoryResponseSchema>;
|
|
6
|
+
export type CreateCategoryRequest = z.infer<typeof CreateCategoryRequestSchema>;
|
|
7
|
+
export type UpdateCategoryRequest = z.infer<typeof UpdateCategoryRequestSchema>;
|
|
8
|
+
export type PostResponse = z.infer<typeof PostResponseSchema>;
|
|
9
|
+
export type CreatePostRequest = z.infer<typeof CreatePostRequestSchema>;
|
|
10
|
+
export type UpdatePostRequest = z.infer<typeof UpdatePostRequestSchema>;
|
|
11
|
+
export type GetPostsQueryAdmin = z.infer<typeof GetPostsQueryAdminSchema>;
|
|
12
|
+
export type GetPostsQueryPublic = z.infer<typeof GetPostsQueryPublicSchema>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BlogPostStatus = exports.BlogCategoryStatus = void 0;
|
|
4
|
+
var blog_category_status_enum_1 = require("./schemas/blog-category-status.enum");
|
|
5
|
+
Object.defineProperty(exports, "BlogCategoryStatus", { enumerable: true, get: function () { return blog_category_status_enum_1.BlogCategoryStatus; } });
|
|
6
|
+
var blog_post_status_enum_1 = require("./schemas/blog-post-status.enum");
|
|
7
|
+
Object.defineProperty(exports, "BlogPostStatus", { enumerable: true, get: function () { return blog_post_status_enum_1.BlogPostStatus; } });
|
|
@@ -0,0 +1,7 @@
|
|
|
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";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BLOG_PUBLIC_POSTS_CONTROLLER = exports.BLOG_PUBLIC_CATEGORIES_CONTROLLER = exports.BLOG_ADMIN_POSTS_CONTROLLER = exports.BLOG_ADMIN_CATEGORIES_CONTROLLER = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Blog Controller paths for NestJS @Controller decorator
|
|
6
|
+
*/
|
|
7
|
+
exports.BLOG_ADMIN_CATEGORIES_CONTROLLER = 'v1/admin/blog/categories';
|
|
8
|
+
exports.BLOG_ADMIN_POSTS_CONTROLLER = 'v1/admin/blog/posts';
|
|
9
|
+
exports.BLOG_PUBLIC_CATEGORIES_CONTROLLER = 'v1/blog/categories';
|
|
10
|
+
exports.BLOG_PUBLIC_POSTS_CONTROLLER = 'v1/blog/posts';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./schemas"), exports);
|
|
18
|
+
__exportStar(require("./blog.types"), exports);
|
|
19
|
+
__exportStar(require("./blog.paths"), exports);
|
|
20
|
+
__exportStar(require("./admin/commands"), exports);
|
|
21
|
+
__exportStar(require("./admin/queries"), exports);
|
|
22
|
+
__exportStar(require("./public/queries"), exports);
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BlogGetCategoriesQuery = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const schemas_1 = require("../../schemas");
|
|
6
|
+
const blog_public_routes_1 = require("../../routes/blog-public.routes");
|
|
7
|
+
const rest_api_1 = require("../../../../rest-api");
|
|
8
|
+
const http_method_1 = require("../../../../shared/http-method");
|
|
9
|
+
const common_schemas_1 = require("../../../../shared/common-schemas");
|
|
10
|
+
const CategoriesListPublicResponseSchema = zod_1.z.object({
|
|
11
|
+
categories: zod_1.z.array(schemas_1.CategoryResponseSchema),
|
|
12
|
+
});
|
|
13
|
+
var BlogGetCategoriesQuery;
|
|
14
|
+
(function (BlogGetCategoriesQuery) {
|
|
15
|
+
// Request/Response
|
|
16
|
+
BlogGetCategoriesQuery.Request = zod_1.z.object({});
|
|
17
|
+
BlogGetCategoriesQuery.Response = zod_1.z.union([CategoriesListPublicResponseSchema, common_schemas_1.ErrorResponseSchema]);
|
|
18
|
+
// Path/URL/Method
|
|
19
|
+
BlogGetCategoriesQuery.PATH = blog_public_routes_1.BLOG_PUBLIC_CATEGORIES_ROUTES.GET_ALL;
|
|
20
|
+
BlogGetCategoriesQuery.URL = rest_api_1.REST_API.V1.BLOG.PUBLIC.CATEGORIES.GET_ALL;
|
|
21
|
+
BlogGetCategoriesQuery.METHOD = http_method_1.HttpMethod.GET;
|
|
22
|
+
})(BlogGetCategoriesQuery || (exports.BlogGetCategoriesQuery = BlogGetCategoriesQuery = {}));
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BlogGetPostByAliasQuery = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const schemas_1 = require("../../schemas");
|
|
6
|
+
const blog_public_routes_1 = require("../../routes/blog-public.routes");
|
|
7
|
+
const rest_api_1 = require("../../../../rest-api");
|
|
8
|
+
const http_method_1 = require("../../../../shared/http-method");
|
|
9
|
+
const common_schemas_1 = require("../../../../shared/common-schemas");
|
|
10
|
+
var BlogGetPostByAliasQuery;
|
|
11
|
+
(function (BlogGetPostByAliasQuery) {
|
|
12
|
+
// Request/Response
|
|
13
|
+
BlogGetPostByAliasQuery.Request = zod_1.z.object({});
|
|
14
|
+
BlogGetPostByAliasQuery.Response = zod_1.z.union([schemas_1.PostResponseSchema, common_schemas_1.ErrorResponseSchema]);
|
|
15
|
+
// Path/URL/Method
|
|
16
|
+
BlogGetPostByAliasQuery.PATH = blog_public_routes_1.BLOG_PUBLIC_POSTS_ROUTES.GET_BY_ALIAS;
|
|
17
|
+
BlogGetPostByAliasQuery.URL = (alias) => rest_api_1.REST_API.V1.BLOG.PUBLIC.POSTS.GET_BY_ALIAS(alias);
|
|
18
|
+
BlogGetPostByAliasQuery.METHOD = http_method_1.HttpMethod.GET;
|
|
19
|
+
})(BlogGetPostByAliasQuery || (exports.BlogGetPostByAliasQuery = BlogGetPostByAliasQuery = {}));
|