@veruna/api-contracts 1.0.38 → 1.0.39
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/v1/blog/admin/commands/create-post.command.d.ts +8 -0
- package/build/v1/blog/admin/commands/update-post.command.d.ts +8 -0
- package/build/v1/blog/admin/queries/get-post.query.d.ts +4 -0
- package/build/v1/blog/admin/queries/get-posts.query.d.ts +4 -0
- package/build/v1/blog/blog.errors.d.ts +2 -1
- package/build/v1/blog/blog.errors.js +5 -0
- package/build/v1/blog/public/queries/get-post-by-alias.query.d.ts +4 -0
- package/build/v1/blog/public/queries/get-posts.query.d.ts +4 -0
- package/build/v1/blog/schemas/create-post-request.schema.d.ts +4 -0
- package/build/v1/blog/schemas/create-post-request.schema.js +20 -2
- package/build/v1/blog/schemas/post-response.schema.d.ts +4 -0
- package/build/v1/blog/schemas/post-response.schema.js +4 -0
- package/build/v1/blog/schemas/update-post-request.schema.d.ts +4 -0
- package/build/v1/blog/schemas/update-post-request.schema.js +21 -2
- package/build/v1/seo-pages/public/queries/get-hierarchy-list.query.d.ts +17 -8
- package/build/v1/seo-pages/public/queries/get-hierarchy-list.query.js +1 -1
- package/build/v1/seo-pages/schemas/index.d.ts +1 -1
- package/build/v1/seo-pages/schemas/index.js +2 -1
- package/build/v1/seo-pages/schemas/page-hierarchy.schema.d.ts +28 -1
- package/build/v1/seo-pages/schemas/page-hierarchy.schema.js +9 -2
- package/package.json +1 -1
|
@@ -11,6 +11,10 @@ export declare namespace AdminBlogCreatePostCommand {
|
|
|
11
11
|
author: z.ZodString;
|
|
12
12
|
categoryIds: z.ZodArray<z.ZodString>;
|
|
13
13
|
status: z.ZodDefault<z.ZodEnum<typeof import("../../schemas").BlogPostStatus>>;
|
|
14
|
+
pageId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
15
|
+
aiWidgetEnabled: z.ZodDefault<z.ZodBoolean>;
|
|
16
|
+
aiWidgetPlaceholder: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
17
|
+
aiWidgetPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
14
18
|
}, z.core.$strip>;
|
|
15
19
|
const Response: z.ZodObject<{
|
|
16
20
|
uuid: z.ZodString;
|
|
@@ -32,6 +36,10 @@ export declare namespace AdminBlogCreatePostCommand {
|
|
|
32
36
|
}, z.core.$strip>>;
|
|
33
37
|
viewsCount: z.ZodNumber;
|
|
34
38
|
status: z.ZodEnum<typeof import("../../schemas").BlogPostStatus>;
|
|
39
|
+
pageId: z.ZodNullable<z.ZodString>;
|
|
40
|
+
aiWidgetEnabled: z.ZodBoolean;
|
|
41
|
+
aiWidgetPlaceholder: z.ZodNullable<z.ZodString>;
|
|
42
|
+
aiWidgetPrompt: z.ZodNullable<z.ZodString>;
|
|
35
43
|
createdAt: z.ZodString;
|
|
36
44
|
updatedAt: z.ZodString;
|
|
37
45
|
}, z.core.$strip>;
|
|
@@ -11,6 +11,10 @@ export declare namespace AdminBlogUpdatePostCommand {
|
|
|
11
11
|
author: z.ZodOptional<z.ZodString>;
|
|
12
12
|
categoryIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
13
13
|
status: z.ZodOptional<z.ZodEnum<typeof import("../../schemas").BlogPostStatus>>;
|
|
14
|
+
pageId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
15
|
+
aiWidgetEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
16
|
+
aiWidgetPlaceholder: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
17
|
+
aiWidgetPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
14
18
|
}, z.core.$strip>;
|
|
15
19
|
const Response: z.ZodObject<{
|
|
16
20
|
uuid: z.ZodString;
|
|
@@ -32,6 +36,10 @@ export declare namespace AdminBlogUpdatePostCommand {
|
|
|
32
36
|
}, z.core.$strip>>;
|
|
33
37
|
viewsCount: z.ZodNumber;
|
|
34
38
|
status: z.ZodEnum<typeof import("../../schemas").BlogPostStatus>;
|
|
39
|
+
pageId: z.ZodNullable<z.ZodString>;
|
|
40
|
+
aiWidgetEnabled: z.ZodBoolean;
|
|
41
|
+
aiWidgetPlaceholder: z.ZodNullable<z.ZodString>;
|
|
42
|
+
aiWidgetPrompt: z.ZodNullable<z.ZodString>;
|
|
35
43
|
createdAt: z.ZodString;
|
|
36
44
|
updatedAt: z.ZodString;
|
|
37
45
|
}, z.core.$strip>;
|
|
@@ -24,6 +24,10 @@ export declare namespace AdminBlogGetPostQuery {
|
|
|
24
24
|
}, z.core.$strip>>;
|
|
25
25
|
viewsCount: z.ZodNumber;
|
|
26
26
|
status: z.ZodEnum<typeof import("../../schemas").BlogPostStatus>;
|
|
27
|
+
pageId: z.ZodNullable<z.ZodString>;
|
|
28
|
+
aiWidgetEnabled: z.ZodBoolean;
|
|
29
|
+
aiWidgetPlaceholder: z.ZodNullable<z.ZodString>;
|
|
30
|
+
aiWidgetPrompt: z.ZodNullable<z.ZodString>;
|
|
27
31
|
createdAt: z.ZodString;
|
|
28
32
|
updatedAt: z.ZodString;
|
|
29
33
|
}, z.core.$strip>;
|
|
@@ -28,6 +28,10 @@ export declare namespace AdminBlogGetPostsQuery {
|
|
|
28
28
|
}, z.core.$strip>>;
|
|
29
29
|
viewsCount: z.ZodNumber;
|
|
30
30
|
status: z.ZodEnum<typeof import("../../schemas").BlogPostStatus>;
|
|
31
|
+
pageId: z.ZodNullable<z.ZodString>;
|
|
32
|
+
aiWidgetEnabled: z.ZodBoolean;
|
|
33
|
+
aiWidgetPlaceholder: z.ZodNullable<z.ZodString>;
|
|
34
|
+
aiWidgetPrompt: z.ZodNullable<z.ZodString>;
|
|
31
35
|
createdAt: z.ZodString;
|
|
32
36
|
updatedAt: z.ZodString;
|
|
33
37
|
}, z.core.$strip>>;
|
|
@@ -13,6 +13,7 @@ export declare enum BlogErrorCode {
|
|
|
13
13
|
POST_CREATION_FAILED = "POST_CREATION_FAILED",
|
|
14
14
|
POST_UPDATE_FAILED = "POST_UPDATE_FAILED",
|
|
15
15
|
POST_DELETE_FAILED = "POST_DELETE_FAILED",
|
|
16
|
-
INVALID_ALIAS_FORMAT = "INVALID_ALIAS_FORMAT"
|
|
16
|
+
INVALID_ALIAS_FORMAT = "INVALID_ALIAS_FORMAT",
|
|
17
|
+
AI_WIDGET_VALIDATION_FAILED = "AI_WIDGET_VALIDATION_FAILED"
|
|
17
18
|
}
|
|
18
19
|
export declare const BLOG_ERRORS: Record<BlogErrorCode, ErrorMetadata>;
|
|
@@ -20,6 +20,7 @@ var BlogErrorCode;
|
|
|
20
20
|
BlogErrorCode["POST_DELETE_FAILED"] = "POST_DELETE_FAILED";
|
|
21
21
|
// Validation errors
|
|
22
22
|
BlogErrorCode["INVALID_ALIAS_FORMAT"] = "INVALID_ALIAS_FORMAT";
|
|
23
|
+
BlogErrorCode["AI_WIDGET_VALIDATION_FAILED"] = "AI_WIDGET_VALIDATION_FAILED";
|
|
23
24
|
})(BlogErrorCode || (exports.BlogErrorCode = BlogErrorCode = {}));
|
|
24
25
|
exports.BLOG_ERRORS = {
|
|
25
26
|
// Category errors
|
|
@@ -81,4 +82,8 @@ exports.BLOG_ERRORS = {
|
|
|
81
82
|
code: BlogErrorCode.INVALID_ALIAS_FORMAT,
|
|
82
83
|
statusCode: 400,
|
|
83
84
|
},
|
|
85
|
+
[BlogErrorCode.AI_WIDGET_VALIDATION_FAILED]: {
|
|
86
|
+
code: BlogErrorCode.AI_WIDGET_VALIDATION_FAILED,
|
|
87
|
+
statusCode: 400,
|
|
88
|
+
},
|
|
84
89
|
};
|
|
@@ -24,6 +24,10 @@ export declare namespace BlogGetPostByAliasQuery {
|
|
|
24
24
|
}, z.core.$strip>>;
|
|
25
25
|
viewsCount: z.ZodNumber;
|
|
26
26
|
status: z.ZodEnum<typeof import("../../schemas").BlogPostStatus>;
|
|
27
|
+
pageId: z.ZodNullable<z.ZodString>;
|
|
28
|
+
aiWidgetEnabled: z.ZodBoolean;
|
|
29
|
+
aiWidgetPlaceholder: z.ZodNullable<z.ZodString>;
|
|
30
|
+
aiWidgetPrompt: z.ZodNullable<z.ZodString>;
|
|
27
31
|
createdAt: z.ZodString;
|
|
28
32
|
updatedAt: z.ZodString;
|
|
29
33
|
}, z.core.$strip>;
|
|
@@ -27,6 +27,10 @@ export declare namespace BlogGetPostsQuery {
|
|
|
27
27
|
}, z.core.$strip>>;
|
|
28
28
|
viewsCount: z.ZodNumber;
|
|
29
29
|
status: z.ZodEnum<typeof import("../../schemas").BlogPostStatus>;
|
|
30
|
+
pageId: z.ZodNullable<z.ZodString>;
|
|
31
|
+
aiWidgetEnabled: z.ZodBoolean;
|
|
32
|
+
aiWidgetPlaceholder: z.ZodNullable<z.ZodString>;
|
|
33
|
+
aiWidgetPrompt: z.ZodNullable<z.ZodString>;
|
|
30
34
|
createdAt: z.ZodString;
|
|
31
35
|
updatedAt: z.ZodString;
|
|
32
36
|
}, z.core.$strip>>;
|
|
@@ -10,4 +10,8 @@ export declare const CreatePostRequestSchema: z.ZodObject<{
|
|
|
10
10
|
author: z.ZodString;
|
|
11
11
|
categoryIds: z.ZodArray<z.ZodString>;
|
|
12
12
|
status: z.ZodDefault<z.ZodEnum<typeof BlogPostStatus>>;
|
|
13
|
+
pageId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
14
|
+
aiWidgetEnabled: z.ZodDefault<z.ZodBoolean>;
|
|
15
|
+
aiWidgetPlaceholder: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
16
|
+
aiWidgetPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
13
17
|
}, z.core.$strip>;
|
|
@@ -4,8 +4,14 @@ exports.CreatePostRequestSchema = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const shared_1 = require("../../../shared");
|
|
6
6
|
const blog_post_status_enum_1 = require("./blog-post-status.enum");
|
|
7
|
-
exports.CreatePostRequestSchema = zod_1.z
|
|
8
|
-
|
|
7
|
+
exports.CreatePostRequestSchema = zod_1.z
|
|
8
|
+
.object({
|
|
9
|
+
alias: zod_1.z
|
|
10
|
+
.string()
|
|
11
|
+
.min(1)
|
|
12
|
+
.max(200)
|
|
13
|
+
.regex(shared_1.SLUG_REGEX)
|
|
14
|
+
.transform((val) => val.toLowerCase().trim()),
|
|
9
15
|
title: zod_1.z.string().min(1).max(300),
|
|
10
16
|
metaTitle: zod_1.z.string().min(1).max(100),
|
|
11
17
|
metaDescription: zod_1.z.string().min(1).max(200),
|
|
@@ -14,4 +20,16 @@ exports.CreatePostRequestSchema = zod_1.z.object({
|
|
|
14
20
|
author: zod_1.z.string().min(1).max(100),
|
|
15
21
|
categoryIds: zod_1.z.array(zod_1.z.string().regex(shared_1.UUID_REGEX)).min(1),
|
|
16
22
|
status: zod_1.z.enum(blog_post_status_enum_1.BlogPostStatus).default(blog_post_status_enum_1.BlogPostStatus.DRAFT),
|
|
23
|
+
pageId: zod_1.z.string().regex(shared_1.UUID_REGEX).nullable().optional(),
|
|
24
|
+
aiWidgetEnabled: zod_1.z.boolean().default(false),
|
|
25
|
+
aiWidgetPlaceholder: zod_1.z.string().max(500).nullable().optional(),
|
|
26
|
+
aiWidgetPrompt: zod_1.z.string().max(2000).nullable().optional(),
|
|
27
|
+
})
|
|
28
|
+
.refine((data) => {
|
|
29
|
+
if (data.aiWidgetEnabled) {
|
|
30
|
+
return data.pageId && data.aiWidgetPlaceholder && data.aiWidgetPrompt;
|
|
31
|
+
}
|
|
32
|
+
return true;
|
|
33
|
+
}, {
|
|
34
|
+
message: 'pageId, aiWidgetPlaceholder and aiWidgetPrompt are required when aiWidgetEnabled is true',
|
|
17
35
|
});
|
|
@@ -23,6 +23,10 @@ export declare const PostResponseSchema: z.ZodObject<{
|
|
|
23
23
|
}, z.core.$strip>>;
|
|
24
24
|
viewsCount: z.ZodNumber;
|
|
25
25
|
status: z.ZodEnum<typeof BlogPostStatus>;
|
|
26
|
+
pageId: z.ZodNullable<z.ZodString>;
|
|
27
|
+
aiWidgetEnabled: z.ZodBoolean;
|
|
28
|
+
aiWidgetPlaceholder: z.ZodNullable<z.ZodString>;
|
|
29
|
+
aiWidgetPrompt: z.ZodNullable<z.ZodString>;
|
|
26
30
|
createdAt: z.ZodString;
|
|
27
31
|
updatedAt: z.ZodString;
|
|
28
32
|
}, z.core.$strip>;
|
|
@@ -20,6 +20,10 @@ exports.PostResponseSchema = zod_1.z.object({
|
|
|
20
20
|
categories: zod_1.z.array(category_response_schema_1.CategoryResponseSchema),
|
|
21
21
|
viewsCount: zod_1.z.number().int().nonnegative(),
|
|
22
22
|
status: zod_1.z.nativeEnum(blog_post_status_enum_1.BlogPostStatus),
|
|
23
|
+
pageId: zod_1.z.string().regex(regex_1.UUID_REGEX).nullable(),
|
|
24
|
+
aiWidgetEnabled: zod_1.z.boolean(),
|
|
25
|
+
aiWidgetPlaceholder: zod_1.z.string().nullable(),
|
|
26
|
+
aiWidgetPrompt: zod_1.z.string().nullable(),
|
|
23
27
|
createdAt: zod_1.z.string().regex(regex_1.DATETIME_REGEX),
|
|
24
28
|
updatedAt: zod_1.z.string().regex(regex_1.DATETIME_REGEX),
|
|
25
29
|
});
|
|
@@ -10,4 +10,8 @@ export declare const UpdatePostRequestSchema: z.ZodObject<{
|
|
|
10
10
|
author: z.ZodOptional<z.ZodString>;
|
|
11
11
|
categoryIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
12
12
|
status: z.ZodOptional<z.ZodEnum<typeof BlogPostStatus>>;
|
|
13
|
+
pageId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
14
|
+
aiWidgetEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
15
|
+
aiWidgetPlaceholder: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
16
|
+
aiWidgetPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
13
17
|
}, z.core.$strip>;
|
|
@@ -4,8 +4,15 @@ exports.UpdatePostRequestSchema = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const regex_1 = require("../../../shared/regex");
|
|
6
6
|
const blog_post_status_enum_1 = require("./blog-post-status.enum");
|
|
7
|
-
exports.UpdatePostRequestSchema = zod_1.z
|
|
8
|
-
|
|
7
|
+
exports.UpdatePostRequestSchema = zod_1.z
|
|
8
|
+
.object({
|
|
9
|
+
alias: zod_1.z
|
|
10
|
+
.string()
|
|
11
|
+
.min(1)
|
|
12
|
+
.max(200)
|
|
13
|
+
.regex(regex_1.SLUG_REGEX)
|
|
14
|
+
.transform((val) => val.toLowerCase().trim())
|
|
15
|
+
.optional(),
|
|
9
16
|
title: zod_1.z.string().min(1).max(300).optional(),
|
|
10
17
|
metaTitle: zod_1.z.string().min(1).max(100).optional(),
|
|
11
18
|
metaDescription: zod_1.z.string().min(1).max(200).optional(),
|
|
@@ -14,4 +21,16 @@ exports.UpdatePostRequestSchema = zod_1.z.object({
|
|
|
14
21
|
author: zod_1.z.string().min(1).max(100).optional(),
|
|
15
22
|
categoryIds: zod_1.z.array(zod_1.z.string().regex(regex_1.UUID_REGEX)).min(1).optional(),
|
|
16
23
|
status: zod_1.z.nativeEnum(blog_post_status_enum_1.BlogPostStatus).optional(),
|
|
24
|
+
pageId: zod_1.z.string().regex(regex_1.UUID_REGEX).nullable().optional(),
|
|
25
|
+
aiWidgetEnabled: zod_1.z.boolean().optional(),
|
|
26
|
+
aiWidgetPlaceholder: zod_1.z.string().max(500).nullable().optional(),
|
|
27
|
+
aiWidgetPrompt: zod_1.z.string().max(2000).nullable().optional(),
|
|
28
|
+
})
|
|
29
|
+
.refine((data) => {
|
|
30
|
+
if (data.aiWidgetEnabled === true) {
|
|
31
|
+
return data.pageId && data.aiWidgetPlaceholder && data.aiWidgetPrompt;
|
|
32
|
+
}
|
|
33
|
+
return true;
|
|
34
|
+
}, {
|
|
35
|
+
message: 'pageId, aiWidgetPlaceholder and aiWidgetPrompt are required when aiWidgetEnabled is true',
|
|
17
36
|
});
|
|
@@ -2,20 +2,29 @@ import { z } from 'zod';
|
|
|
2
2
|
import { HttpMethod } from '../../../../shared/http-method';
|
|
3
3
|
export declare namespace SeoPageGetHierarchyListQuery {
|
|
4
4
|
const Request: z.ZodObject<{}, z.core.$strip>;
|
|
5
|
-
const Response: z.
|
|
6
|
-
|
|
7
|
-
alias: z.ZodString;
|
|
8
|
-
icon: z.ZodString;
|
|
9
|
-
seoText: z.ZodNullable<z.ZodString>;
|
|
10
|
-
marks: z.ZodArray<z.ZodString>;
|
|
11
|
-
sub: z.ZodArray<z.ZodObject<{
|
|
5
|
+
const Response: z.ZodObject<{
|
|
6
|
+
index: z.ZodNullable<z.ZodObject<{
|
|
12
7
|
uuid: z.ZodString;
|
|
13
8
|
alias: z.ZodString;
|
|
14
9
|
icon: z.ZodString;
|
|
15
10
|
seoText: z.ZodNullable<z.ZodString>;
|
|
16
11
|
marks: z.ZodArray<z.ZodString>;
|
|
17
12
|
}, z.core.$strip>>;
|
|
18
|
-
|
|
13
|
+
pages: z.ZodArray<z.ZodObject<{
|
|
14
|
+
uuid: z.ZodString;
|
|
15
|
+
alias: z.ZodString;
|
|
16
|
+
icon: z.ZodString;
|
|
17
|
+
seoText: z.ZodNullable<z.ZodString>;
|
|
18
|
+
marks: z.ZodArray<z.ZodString>;
|
|
19
|
+
sub: z.ZodArray<z.ZodObject<{
|
|
20
|
+
uuid: z.ZodString;
|
|
21
|
+
alias: z.ZodString;
|
|
22
|
+
icon: z.ZodString;
|
|
23
|
+
seoText: z.ZodNullable<z.ZodString>;
|
|
24
|
+
marks: z.ZodArray<z.ZodString>;
|
|
25
|
+
}, z.core.$strip>>;
|
|
26
|
+
}, z.core.$strip>>;
|
|
27
|
+
}, z.core.$strip>;
|
|
19
28
|
const URL: "/api/v1/seo-pages/list";
|
|
20
29
|
const METHOD = HttpMethod.GET;
|
|
21
30
|
type RequestType = z.infer<typeof Request>;
|
|
@@ -8,7 +8,7 @@ const http_method_1 = require("../../../../shared/http-method");
|
|
|
8
8
|
var SeoPageGetHierarchyListQuery;
|
|
9
9
|
(function (SeoPageGetHierarchyListQuery) {
|
|
10
10
|
SeoPageGetHierarchyListQuery.Request = zod_1.z.object({});
|
|
11
|
-
SeoPageGetHierarchyListQuery.Response = schemas_1.
|
|
11
|
+
SeoPageGetHierarchyListQuery.Response = schemas_1.PageHierarchyResponseSchema;
|
|
12
12
|
SeoPageGetHierarchyListQuery.URL = rest_api_1.REST_API.V1.SEO_PAGES.PUBLIC.GET_LIST;
|
|
13
13
|
SeoPageGetHierarchyListQuery.METHOD = http_method_1.HttpMethod.GET;
|
|
14
14
|
})(SeoPageGetHierarchyListQuery || (exports.SeoPageGetHierarchyListQuery = SeoPageGetHierarchyListQuery = {}));
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export { PageType } from './page-type.enum';
|
|
5
5
|
export { PageResponseSchema, PageListItemSchema } from './page-response.schema';
|
|
6
|
-
export { PageHierarchySubItemSchema, PageHierarchyItemSchema, PageHierarchyListSchema, type PageHierarchySubItem, type PageHierarchyItem, type PageHierarchyList, } from './page-hierarchy.schema';
|
|
6
|
+
export { PageHierarchySubItemSchema, PageHierarchyItemSchema, PageHierarchyListSchema, PageHierarchyResponseSchema, type PageHierarchySubItem, type PageHierarchyItem, type PageHierarchyList, type PageHierarchyResponse, } from './page-hierarchy.schema';
|
|
7
7
|
export { CreatePageRequestSchema } from './create-page-request.schema';
|
|
8
8
|
export { UpdatePageRequestSchema } from './update-page-request.schema';
|
|
9
9
|
export { FaqSchema, FaqItemSchema, type Faq, type FaqItem } from './faq.schema';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FaqItemSchema = exports.FaqSchema = exports.UpdatePageRequestSchema = exports.CreatePageRequestSchema = exports.PageHierarchyListSchema = exports.PageHierarchyItemSchema = exports.PageHierarchySubItemSchema = exports.PageListItemSchema = exports.PageResponseSchema = exports.PageType = void 0;
|
|
3
|
+
exports.FaqItemSchema = exports.FaqSchema = exports.UpdatePageRequestSchema = exports.CreatePageRequestSchema = exports.PageHierarchyResponseSchema = exports.PageHierarchyListSchema = exports.PageHierarchyItemSchema = exports.PageHierarchySubItemSchema = exports.PageListItemSchema = exports.PageResponseSchema = exports.PageType = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Centralized exports for SEO Pages schemas
|
|
6
6
|
*/
|
|
@@ -13,6 +13,7 @@ var page_hierarchy_schema_1 = require("./page-hierarchy.schema");
|
|
|
13
13
|
Object.defineProperty(exports, "PageHierarchySubItemSchema", { enumerable: true, get: function () { return page_hierarchy_schema_1.PageHierarchySubItemSchema; } });
|
|
14
14
|
Object.defineProperty(exports, "PageHierarchyItemSchema", { enumerable: true, get: function () { return page_hierarchy_schema_1.PageHierarchyItemSchema; } });
|
|
15
15
|
Object.defineProperty(exports, "PageHierarchyListSchema", { enumerable: true, get: function () { return page_hierarchy_schema_1.PageHierarchyListSchema; } });
|
|
16
|
+
Object.defineProperty(exports, "PageHierarchyResponseSchema", { enumerable: true, get: function () { return page_hierarchy_schema_1.PageHierarchyResponseSchema; } });
|
|
16
17
|
var create_page_request_schema_1 = require("./create-page-request.schema");
|
|
17
18
|
Object.defineProperty(exports, "CreatePageRequestSchema", { enumerable: true, get: function () { return create_page_request_schema_1.CreatePageRequestSchema; } });
|
|
18
19
|
var update_page_request_schema_1 = require("./update-page-request.schema");
|
|
@@ -27,7 +27,7 @@ export declare const PageHierarchyItemSchema: z.ZodObject<{
|
|
|
27
27
|
}, z.core.$strip>>;
|
|
28
28
|
}, z.core.$strip>;
|
|
29
29
|
/**
|
|
30
|
-
* Full hierarchical list response
|
|
30
|
+
* Full hierarchical list response (array of main pages)
|
|
31
31
|
*/
|
|
32
32
|
export declare const PageHierarchyListSchema: z.ZodArray<z.ZodObject<{
|
|
33
33
|
uuid: z.ZodString;
|
|
@@ -43,6 +43,33 @@ export declare const PageHierarchyListSchema: z.ZodArray<z.ZodObject<{
|
|
|
43
43
|
marks: z.ZodArray<z.ZodString>;
|
|
44
44
|
}, z.core.$strip>>;
|
|
45
45
|
}, z.core.$strip>>;
|
|
46
|
+
/**
|
|
47
|
+
* Hierarchy response with index page
|
|
48
|
+
*/
|
|
49
|
+
export declare const PageHierarchyResponseSchema: z.ZodObject<{
|
|
50
|
+
index: z.ZodNullable<z.ZodObject<{
|
|
51
|
+
uuid: z.ZodString;
|
|
52
|
+
alias: z.ZodString;
|
|
53
|
+
icon: z.ZodString;
|
|
54
|
+
seoText: z.ZodNullable<z.ZodString>;
|
|
55
|
+
marks: z.ZodArray<z.ZodString>;
|
|
56
|
+
}, z.core.$strip>>;
|
|
57
|
+
pages: z.ZodArray<z.ZodObject<{
|
|
58
|
+
uuid: z.ZodString;
|
|
59
|
+
alias: z.ZodString;
|
|
60
|
+
icon: z.ZodString;
|
|
61
|
+
seoText: z.ZodNullable<z.ZodString>;
|
|
62
|
+
marks: z.ZodArray<z.ZodString>;
|
|
63
|
+
sub: z.ZodArray<z.ZodObject<{
|
|
64
|
+
uuid: z.ZodString;
|
|
65
|
+
alias: z.ZodString;
|
|
66
|
+
icon: z.ZodString;
|
|
67
|
+
seoText: z.ZodNullable<z.ZodString>;
|
|
68
|
+
marks: z.ZodArray<z.ZodString>;
|
|
69
|
+
}, z.core.$strip>>;
|
|
70
|
+
}, z.core.$strip>>;
|
|
71
|
+
}, z.core.$strip>;
|
|
46
72
|
export type PageHierarchySubItem = z.infer<typeof PageHierarchySubItemSchema>;
|
|
47
73
|
export type PageHierarchyItem = z.infer<typeof PageHierarchyItemSchema>;
|
|
48
74
|
export type PageHierarchyList = z.infer<typeof PageHierarchyListSchema>;
|
|
75
|
+
export type PageHierarchyResponse = z.infer<typeof PageHierarchyResponseSchema>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PageHierarchyListSchema = exports.PageHierarchyItemSchema = exports.PageHierarchySubItemSchema = void 0;
|
|
3
|
+
exports.PageHierarchyResponseSchema = exports.PageHierarchyListSchema = exports.PageHierarchyItemSchema = exports.PageHierarchySubItemSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const shared_1 = require("../../../shared");
|
|
6
6
|
/**
|
|
@@ -25,6 +25,13 @@ exports.PageHierarchyItemSchema = zod_1.z.object({
|
|
|
25
25
|
sub: zod_1.z.array(exports.PageHierarchySubItemSchema),
|
|
26
26
|
});
|
|
27
27
|
/**
|
|
28
|
-
* Full hierarchical list response
|
|
28
|
+
* Full hierarchical list response (array of main pages)
|
|
29
29
|
*/
|
|
30
30
|
exports.PageHierarchyListSchema = zod_1.z.array(exports.PageHierarchyItemSchema);
|
|
31
|
+
/**
|
|
32
|
+
* Hierarchy response with index page
|
|
33
|
+
*/
|
|
34
|
+
exports.PageHierarchyResponseSchema = zod_1.z.object({
|
|
35
|
+
index: exports.PageHierarchySubItemSchema.nullable(),
|
|
36
|
+
pages: exports.PageHierarchyListSchema,
|
|
37
|
+
});
|