@carlonicora/nestjs-neo4jsonapi 6.7.0 → 6.8.0
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/dist/bootstrap/app.module.factory.d.ts.map +1 -1
- package/dist/bootstrap/app.module.factory.js +1 -0
- package/dist/bootstrap/app.module.factory.js.map +1 -1
- package/dist/bootstrap/bootstrap.options.d.ts +15 -0
- package/dist/bootstrap/bootstrap.options.d.ts.map +1 -1
- package/dist/common/constants/core-module.ids.d.ts +1 -0
- package/dist/common/constants/core-module.ids.d.ts.map +1 -1
- package/dist/common/constants/core-module.ids.js +1 -0
- package/dist/common/constants/core-module.ids.js.map +1 -1
- package/dist/config/enums/queue.id.d.ts +1 -0
- package/dist/config/enums/queue.id.d.ts.map +1 -1
- package/dist/config/enums/queue.id.js +1 -0
- package/dist/config/enums/queue.id.js.map +1 -1
- package/dist/core/blocknote/services/blocknote.service.d.ts +25 -0
- package/dist/core/blocknote/services/blocknote.service.d.ts.map +1 -1
- package/dist/core/blocknote/services/blocknote.service.js +84 -0
- package/dist/core/blocknote/services/blocknote.service.js.map +1 -1
- package/dist/foundations/blog/blog.constants.d.ts +17 -0
- package/dist/foundations/blog/blog.constants.d.ts.map +1 -0
- package/dist/foundations/blog/blog.constants.js +17 -0
- package/dist/foundations/blog/blog.constants.js.map +1 -0
- package/dist/foundations/blog/blog.module.d.ts +28 -0
- package/dist/foundations/blog/blog.module.d.ts.map +1 -0
- package/dist/foundations/blog/blog.module.js +143 -0
- package/dist/foundations/blog/blog.module.js.map +1 -0
- package/dist/foundations/blog/controllers/blog-category-translation.controller.d.ts +17 -0
- package/dist/foundations/blog/controllers/blog-category-translation.controller.d.ts.map +1 -0
- package/dist/foundations/blog/controllers/blog-category-translation.controller.js +81 -0
- package/dist/foundations/blog/controllers/blog-category-translation.controller.js.map +1 -0
- package/dist/foundations/blog/controllers/blog-category.controller.d.ts +24 -0
- package/dist/foundations/blog/controllers/blog-category.controller.d.ts.map +1 -0
- package/dist/foundations/blog/controllers/blog-category.controller.js +125 -0
- package/dist/foundations/blog/controllers/blog-category.controller.js.map +1 -0
- package/dist/foundations/blog/controllers/blog-post-translation.controller.d.ts +17 -0
- package/dist/foundations/blog/controllers/blog-post-translation.controller.d.ts.map +1 -0
- package/dist/foundations/blog/controllers/blog-post-translation.controller.js +81 -0
- package/dist/foundations/blog/controllers/blog-post-translation.controller.js.map +1 -0
- package/dist/foundations/blog/controllers/blog-post.controller.d.ts +28 -0
- package/dist/foundations/blog/controllers/blog-post.controller.d.ts.map +1 -0
- package/dist/foundations/blog/controllers/blog-post.controller.js +157 -0
- package/dist/foundations/blog/controllers/blog-post.controller.js.map +1 -0
- package/dist/foundations/blog/controllers/blog-settings.controller.d.ts +16 -0
- package/dist/foundations/blog/controllers/blog-settings.controller.d.ts.map +1 -0
- package/dist/foundations/blog/controllers/blog-settings.controller.js +73 -0
- package/dist/foundations/blog/controllers/blog-settings.controller.js.map +1 -0
- package/dist/foundations/blog/controllers/blog.public.controller.d.ts +26 -0
- package/dist/foundations/blog/controllers/blog.public.controller.d.ts.map +1 -0
- package/dist/foundations/blog/controllers/blog.public.controller.js +117 -0
- package/dist/foundations/blog/controllers/blog.public.controller.js.map +1 -0
- package/dist/foundations/blog/dtos/blog-category-translation.put.dto.d.ts +16 -0
- package/dist/foundations/blog/dtos/blog-category-translation.put.dto.d.ts.map +1 -0
- package/dist/foundations/blog/dtos/blog-category-translation.put.dto.js +62 -0
- package/dist/foundations/blog/dtos/blog-category-translation.put.dto.js.map +1 -0
- package/dist/foundations/blog/dtos/blog-category.dto.d.ts +11 -0
- package/dist/foundations/blog/dtos/blog-category.dto.d.ts.map +1 -0
- package/dist/foundations/blog/dtos/blog-category.dto.js +45 -0
- package/dist/foundations/blog/dtos/blog-category.dto.js.map +1 -0
- package/dist/foundations/blog/dtos/blog-category.post.dto.d.ts +16 -0
- package/dist/foundations/blog/dtos/blog-category.post.dto.d.ts.map +1 -0
- package/dist/foundations/blog/dtos/blog-category.post.dto.js +68 -0
- package/dist/foundations/blog/dtos/blog-category.post.dto.js.map +1 -0
- package/dist/foundations/blog/dtos/blog-category.put.dto.d.ts +21 -0
- package/dist/foundations/blog/dtos/blog-category.put.dto.d.ts.map +1 -0
- package/dist/foundations/blog/dtos/blog-category.put.dto.js +76 -0
- package/dist/foundations/blog/dtos/blog-category.put.dto.js.map +1 -0
- package/dist/foundations/blog/dtos/blog-post-translation.put.dto.d.ts +19 -0
- package/dist/foundations/blog/dtos/blog-post-translation.put.dto.d.ts.map +1 -0
- package/dist/foundations/blog/dtos/blog-post-translation.put.dto.js +73 -0
- package/dist/foundations/blog/dtos/blog-post-translation.put.dto.js.map +1 -0
- package/dist/foundations/blog/dtos/blog-post.dto.d.ts +11 -0
- package/dist/foundations/blog/dtos/blog-post.dto.d.ts.map +1 -0
- package/dist/foundations/blog/dtos/blog-post.dto.js +45 -0
- package/dist/foundations/blog/dtos/blog-post.dto.js.map +1 -0
- package/dist/foundations/blog/dtos/blog-post.post.dto.d.ts +27 -0
- package/dist/foundations/blog/dtos/blog-post.post.dto.d.ts.map +1 -0
- package/dist/foundations/blog/dtos/blog-post.post.dto.js +98 -0
- package/dist/foundations/blog/dtos/blog-post.post.dto.js.map +1 -0
- package/dist/foundations/blog/dtos/blog-post.put.dto.d.ts +30 -0
- package/dist/foundations/blog/dtos/blog-post.put.dto.d.ts.map +1 -0
- package/dist/foundations/blog/dtos/blog-post.put.dto.js +104 -0
- package/dist/foundations/blog/dtos/blog-post.put.dto.js.map +1 -0
- package/dist/foundations/blog/dtos/blog-settings.put.dto.d.ts +14 -0
- package/dist/foundations/blog/dtos/blog-settings.put.dto.d.ts.map +1 -0
- package/dist/foundations/blog/dtos/blog-settings.put.dto.js +52 -0
- package/dist/foundations/blog/dtos/blog-settings.put.dto.js.map +1 -0
- package/dist/foundations/blog/entities/blog-category-translation.d.ts +36 -0
- package/dist/foundations/blog/entities/blog-category-translation.d.ts.map +1 -0
- package/dist/foundations/blog/entities/blog-category-translation.js +70 -0
- package/dist/foundations/blog/entities/blog-category-translation.js.map +1 -0
- package/dist/foundations/blog/entities/blog-category-translation.meta.d.ts +3 -0
- package/dist/foundations/blog/entities/blog-category-translation.meta.d.ts.map +1 -0
- package/dist/foundations/blog/entities/blog-category-translation.meta.js +10 -0
- package/dist/foundations/blog/entities/blog-category-translation.meta.js.map +1 -0
- package/dist/foundations/blog/entities/blog-category.d.ts +35 -0
- package/dist/foundations/blog/entities/blog-category.d.ts.map +1 -0
- package/dist/foundations/blog/entities/blog-category.js +78 -0
- package/dist/foundations/blog/entities/blog-category.js.map +1 -0
- package/dist/foundations/blog/entities/blog-category.meta.d.ts +3 -0
- package/dist/foundations/blog/entities/blog-category.meta.d.ts.map +1 -0
- package/dist/foundations/blog/entities/blog-category.meta.js +10 -0
- package/dist/foundations/blog/entities/blog-category.meta.js.map +1 -0
- package/dist/foundations/blog/entities/blog-post-translation.d.ts +43 -0
- package/dist/foundations/blog/entities/blog-post-translation.d.ts.map +1 -0
- package/dist/foundations/blog/entities/blog-post-translation.js +91 -0
- package/dist/foundations/blog/entities/blog-post-translation.js.map +1 -0
- package/dist/foundations/blog/entities/blog-post-translation.meta.d.ts +3 -0
- package/dist/foundations/blog/entities/blog-post-translation.meta.d.ts.map +1 -0
- package/dist/foundations/blog/entities/blog-post-translation.meta.js +10 -0
- package/dist/foundations/blog/entities/blog-post-translation.meta.js.map +1 -0
- package/dist/foundations/blog/entities/blog-post.d.ts +63 -0
- package/dist/foundations/blog/entities/blog-post.d.ts.map +1 -0
- package/dist/foundations/blog/entities/blog-post.js +149 -0
- package/dist/foundations/blog/entities/blog-post.js.map +1 -0
- package/dist/foundations/blog/entities/blog-post.meta.d.ts +3 -0
- package/dist/foundations/blog/entities/blog-post.meta.d.ts.map +1 -0
- package/dist/foundations/blog/entities/blog-post.meta.js +10 -0
- package/dist/foundations/blog/entities/blog-post.meta.js.map +1 -0
- package/dist/foundations/blog/entities/blog-settings.d.ts +18 -0
- package/dist/foundations/blog/entities/blog-settings.d.ts.map +1 -0
- package/dist/foundations/blog/entities/blog-settings.js +26 -0
- package/dist/foundations/blog/entities/blog-settings.js.map +1 -0
- package/dist/foundations/blog/entities/blog-settings.meta.d.ts +3 -0
- package/dist/foundations/blog/entities/blog-settings.meta.d.ts.map +1 -0
- package/dist/foundations/blog/entities/blog-settings.meta.js +10 -0
- package/dist/foundations/blog/entities/blog-settings.meta.js.map +1 -0
- package/dist/foundations/blog/index.d.ts +34 -0
- package/dist/foundations/blog/index.d.ts.map +1 -0
- package/dist/foundations/blog/index.js +50 -0
- package/dist/foundations/blog/index.js.map +1 -0
- package/dist/foundations/blog/interfaces/blog.config.interface.d.ts +22 -0
- package/dist/foundations/blog/interfaces/blog.config.interface.d.ts.map +1 -0
- package/dist/foundations/blog/interfaces/blog.config.interface.js +10 -0
- package/dist/foundations/blog/interfaces/blog.config.interface.js.map +1 -0
- package/dist/foundations/blog/processors/blog.processor.d.ts +77 -0
- package/dist/foundations/blog/processors/blog.processor.d.ts.map +1 -0
- package/dist/foundations/blog/processors/blog.processor.js +404 -0
- package/dist/foundations/blog/processors/blog.processor.js.map +1 -0
- package/dist/foundations/blog/prompts/blog-summary.prompt.d.ts +6 -0
- package/dist/foundations/blog/prompts/blog-summary.prompt.d.ts.map +1 -0
- package/dist/foundations/blog/prompts/blog-summary.prompt.js +19 -0
- package/dist/foundations/blog/prompts/blog-summary.prompt.js.map +1 -0
- package/dist/foundations/blog/prompts/blog-translate.prompt.d.ts +7 -0
- package/dist/foundations/blog/prompts/blog-translate.prompt.d.ts.map +1 -0
- package/dist/foundations/blog/prompts/blog-translate.prompt.js +24 -0
- package/dist/foundations/blog/prompts/blog-translate.prompt.js.map +1 -0
- package/dist/foundations/blog/repositories/blog-category-translation.repository.d.ts +78 -0
- package/dist/foundations/blog/repositories/blog-category-translation.repository.d.ts.map +1 -0
- package/dist/foundations/blog/repositories/blog-category-translation.repository.js +199 -0
- package/dist/foundations/blog/repositories/blog-category-translation.repository.js.map +1 -0
- package/dist/foundations/blog/repositories/blog-category.repository.d.ts +56 -0
- package/dist/foundations/blog/repositories/blog-category.repository.d.ts.map +1 -0
- package/dist/foundations/blog/repositories/blog-category.repository.js +166 -0
- package/dist/foundations/blog/repositories/blog-category.repository.js.map +1 -0
- package/dist/foundations/blog/repositories/blog-post-translation.repository.d.ts +88 -0
- package/dist/foundations/blog/repositories/blog-post-translation.repository.d.ts.map +1 -0
- package/dist/foundations/blog/repositories/blog-post-translation.repository.js +220 -0
- package/dist/foundations/blog/repositories/blog-post-translation.repository.js.map +1 -0
- package/dist/foundations/blog/repositories/blog-post.repository.d.ts +118 -0
- package/dist/foundations/blog/repositories/blog-post.repository.d.ts.map +1 -0
- package/dist/foundations/blog/repositories/blog-post.repository.js +350 -0
- package/dist/foundations/blog/repositories/blog-post.repository.js.map +1 -0
- package/dist/foundations/blog/repositories/blog-settings.repository.d.ts +21 -0
- package/dist/foundations/blog/repositories/blog-settings.repository.d.ts.map +1 -0
- package/dist/foundations/blog/repositories/blog-settings.repository.js +60 -0
- package/dist/foundations/blog/repositories/blog-settings.repository.js.map +1 -0
- package/dist/foundations/blog/services/blog-category-translation.service.d.ts +37 -0
- package/dist/foundations/blog/services/blog-category-translation.service.d.ts.map +1 -0
- package/dist/foundations/blog/services/blog-category-translation.service.js +97 -0
- package/dist/foundations/blog/services/blog-category-translation.service.js.map +1 -0
- package/dist/foundations/blog/services/blog-category.service.d.ts +56 -0
- package/dist/foundations/blog/services/blog-category.service.d.ts.map +1 -0
- package/dist/foundations/blog/services/blog-category.service.js +164 -0
- package/dist/foundations/blog/services/blog-category.service.js.map +1 -0
- package/dist/foundations/blog/services/blog-post-translation.service.d.ts +44 -0
- package/dist/foundations/blog/services/blog-post-translation.service.d.ts.map +1 -0
- package/dist/foundations/blog/services/blog-post-translation.service.js +115 -0
- package/dist/foundations/blog/services/blog-post-translation.service.js.map +1 -0
- package/dist/foundations/blog/services/blog-post.service.d.ts +109 -0
- package/dist/foundations/blog/services/blog-post.service.d.ts.map +1 -0
- package/dist/foundations/blog/services/blog-post.service.js +276 -0
- package/dist/foundations/blog/services/blog-post.service.js.map +1 -0
- package/dist/foundations/blog/services/blog-queue.service.d.ts +36 -0
- package/dist/foundations/blog/services/blog-queue.service.d.ts.map +1 -0
- package/dist/foundations/blog/services/blog-queue.service.js +79 -0
- package/dist/foundations/blog/services/blog-queue.service.js.map +1 -0
- package/dist/foundations/blog/services/blog-settings.service.d.ts +21 -0
- package/dist/foundations/blog/services/blog-settings.service.d.ts.map +1 -0
- package/dist/foundations/blog/services/blog-settings.service.js +49 -0
- package/dist/foundations/blog/services/blog-settings.service.js.map +1 -0
- package/dist/foundations/blog/utils/reading-time.d.ts +5 -0
- package/dist/foundations/blog/utils/reading-time.d.ts.map +1 -0
- package/dist/foundations/blog/utils/reading-time.js +12 -0
- package/dist/foundations/blog/utils/reading-time.js.map +1 -0
- package/dist/foundations/blog/utils/slug.d.ts +12 -0
- package/dist/foundations/blog/utils/slug.d.ts.map +1 -0
- package/dist/foundations/blog/utils/slug.js +36 -0
- package/dist/foundations/blog/utils/slug.js.map +1 -0
- package/dist/foundations/foundations.modules.d.ts +8 -0
- package/dist/foundations/foundations.modules.d.ts.map +1 -1
- package/dist/foundations/foundations.modules.js +4 -1
- package/dist/foundations/foundations.modules.js.map +1 -1
- package/dist/foundations/index.d.ts +1 -0
- package/dist/foundations/index.d.ts.map +1 -1
- package/dist/foundations/index.js +1 -0
- package/dist/foundations/index.js.map +1 -1
- package/dist/foundations/tokenusage/enums/tokenusage.type.d.ts +3 -1
- package/dist/foundations/tokenusage/enums/tokenusage.type.d.ts.map +1 -1
- package/dist/foundations/tokenusage/enums/tokenusage.type.js +2 -0
- package/dist/foundations/tokenusage/enums/tokenusage.type.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Entity } from "../../../common/abstracts/entity";
|
|
2
|
+
import type { BlogCategoryTranslation } from "./blog-category-translation";
|
|
3
|
+
/**
|
|
4
|
+
* BlogCategory Entity Type
|
|
5
|
+
*
|
|
6
|
+
* The language-independent part of a blog category. Its name, slug and
|
|
7
|
+
* description live on one BlogCategoryTranslation per language; queries that
|
|
8
|
+
* resolve one language fill the computed fields below.
|
|
9
|
+
*/
|
|
10
|
+
export type BlogCategory = Entity & {
|
|
11
|
+
originalLanguage: string;
|
|
12
|
+
image?: string;
|
|
13
|
+
language?: string;
|
|
14
|
+
name?: string;
|
|
15
|
+
slug?: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
translations?: BlogCategoryTranslation[];
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* BlogCategory Entity Descriptor
|
|
21
|
+
*
|
|
22
|
+
* Single source of truth for the BlogCategory entity configuration.
|
|
23
|
+
*/
|
|
24
|
+
export declare const BlogCategoryDescriptor: import("../../..").EntityDescriptor<BlogCategory, {
|
|
25
|
+
translations: {
|
|
26
|
+
model: import("../../..").DataMeta;
|
|
27
|
+
direction: "out";
|
|
28
|
+
relationship: string;
|
|
29
|
+
cardinality: "many";
|
|
30
|
+
required: false;
|
|
31
|
+
description: string;
|
|
32
|
+
};
|
|
33
|
+
}>;
|
|
34
|
+
export type BlogCategoryDescriptorType = typeof BlogCategoryDescriptor;
|
|
35
|
+
//# sourceMappingURL=blog-category.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blog-category.d.ts","sourceRoot":"","sources":["../../../../src/foundations/blog/entities/blog-category.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAG1D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAI3E;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG;IAClC,gBAAgB,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,YAAY,CAAC,EAAE,uBAAuB,EAAE,CAAC;CAC1C,CAAC;AAQF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;EAkEjC,CAAC;AAEH,MAAM,MAAM,0BAA0B,GAAG,OAAO,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BlogCategoryDescriptor = void 0;
|
|
4
|
+
const define_entity_1 = require("../../../common/helpers/define-entity");
|
|
5
|
+
const s3_service_1 = require("../../s3/services/s3.service");
|
|
6
|
+
const blog_category_translation_meta_1 = require("./blog-category-translation.meta");
|
|
7
|
+
const blog_category_meta_1 = require("./blog-category.meta");
|
|
8
|
+
const readString = (record, alias) => {
|
|
9
|
+
if (!record?.has?.(alias))
|
|
10
|
+
return undefined;
|
|
11
|
+
const value = record.get(alias);
|
|
12
|
+
return value === null || value === undefined ? undefined : String(value);
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* BlogCategory Entity Descriptor
|
|
16
|
+
*
|
|
17
|
+
* Single source of truth for the BlogCategory entity configuration.
|
|
18
|
+
*/
|
|
19
|
+
exports.BlogCategoryDescriptor = (0, define_entity_1.defineEntity)()({
|
|
20
|
+
...blog_category_meta_1.blogCategoryMeta,
|
|
21
|
+
isCompanyScoped: false,
|
|
22
|
+
tenancy: "global",
|
|
23
|
+
description: "A category of the platform's public blog, used to group posts and filter the public list. Global content, not owned by any company. Its per-language name and description live on its BlogCategoryTranslation records.",
|
|
24
|
+
injectServices: [s3_service_1.S3Service],
|
|
25
|
+
fields: {
|
|
26
|
+
originalLanguage: {
|
|
27
|
+
type: "string",
|
|
28
|
+
required: true,
|
|
29
|
+
excludeFromSearch: true,
|
|
30
|
+
description: "The language code the category was written in. Set at creation and fixed afterwards; every other language is translated from this one.",
|
|
31
|
+
},
|
|
32
|
+
image: {
|
|
33
|
+
type: "string",
|
|
34
|
+
excludeFromSearch: true,
|
|
35
|
+
description: "S3 key of the optional category image, serialised as a signed public URL.",
|
|
36
|
+
transform: async (data, services) => {
|
|
37
|
+
if (!data.image)
|
|
38
|
+
return undefined;
|
|
39
|
+
if (data.image.startsWith("~"))
|
|
40
|
+
return data.image.substring(1);
|
|
41
|
+
return await services.S3Service.generateSignedUrl({ key: data.image, isPublic: true });
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
computed: {
|
|
46
|
+
language: {
|
|
47
|
+
description: "The language whose text the resolved fields carry: the requested language when its translation is completed, otherwise the original language. Undefined outside language-resolving queries.",
|
|
48
|
+
meta: true,
|
|
49
|
+
compute: (params) => readString(params.record, "resolvedLanguage"),
|
|
50
|
+
},
|
|
51
|
+
name: {
|
|
52
|
+
description: "The category name in the resolved language. Undefined outside language-resolving queries.",
|
|
53
|
+
meta: true,
|
|
54
|
+
compute: (params) => readString(params.record, "resolvedName"),
|
|
55
|
+
},
|
|
56
|
+
slug: {
|
|
57
|
+
description: "The URL slug of the category in the resolved language, used as the public list's category filter. Undefined outside language-resolving queries.",
|
|
58
|
+
meta: true,
|
|
59
|
+
compute: (params) => readString(params.record, "resolvedSlug"),
|
|
60
|
+
},
|
|
61
|
+
description: {
|
|
62
|
+
description: "The category description in the resolved language. Undefined outside language-resolving queries.",
|
|
63
|
+
meta: true,
|
|
64
|
+
compute: (params) => readString(params.record, "resolvedDescription"),
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
relationships: {
|
|
68
|
+
translations: {
|
|
69
|
+
model: blog_category_translation_meta_1.blogCategoryTranslationMeta,
|
|
70
|
+
direction: "out",
|
|
71
|
+
relationship: "HAS_TRANSLATION",
|
|
72
|
+
cardinality: "many",
|
|
73
|
+
required: false,
|
|
74
|
+
description: "The per-language text records of the category, one per language, the original included.",
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
//# sourceMappingURL=blog-category.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blog-category.js","sourceRoot":"","sources":["../../../../src/foundations/blog/entities/blog-category.ts"],"names":[],"mappings":";;;AACA,yEAAqE;AACrE,6DAAyD;AAEzD,qFAA+E;AAC/E,6DAAwD;AAsBxD,MAAM,UAAU,GAAG,CAAC,MAAW,EAAE,KAAa,EAAsB,EAAE;IACpE,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IAC5C,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAChC,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC3E,CAAC,CAAC;AAEF;;;;GAIG;AACU,QAAA,sBAAsB,GAAG,IAAA,4BAAY,GAAgB,CAAC;IACjE,GAAG,qCAAgB;IAEnB,eAAe,EAAE,KAAK;IACtB,OAAO,EAAE,QAAQ;IAEjB,WAAW,EACT,wNAAwN;IAE1N,cAAc,EAAE,CAAC,sBAAS,CAAC;IAE3B,MAAM,EAAE;QACN,gBAAgB,EAAE;YAChB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,iBAAiB,EAAE,IAAI;YACvB,WAAW,EACT,wIAAwI;SAC3I;QACD,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,iBAAiB,EAAE,IAAI;YACvB,WAAW,EAAE,2EAA2E;YACxF,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;gBAClC,IAAI,CAAC,IAAI,CAAC,KAAK;oBAAE,OAAO,SAAS,CAAC;gBAClC,IAAI,IAAI,CAAC,KAAK,CAAC,UAAU,C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ourceRoot":"","sources":["../../../../src/foundations/blog/entities/blog-category.meta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAE1E,eAAO,MAAM,gBAAgB,EAAE,QAK9B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.blogCategoryMeta = void 0;
|
|
4
|
+
exports.blogCategoryMeta = {
|
|
5
|
+
type: "blog-categories",
|
|
6
|
+
endpoint: "blog-categories",
|
|
7
|
+
nodeName: "blogCategory",
|
|
8
|
+
labelName: "BlogCategory",
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=blog-category.meta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blog-category.meta.js","sourceRoot":"","sources":["../../../../src/foundations/blog/entities/blog-category.meta.ts"],"names":[],"mappings":";;;AAEa,QAAA,gBAAgB,GAAa;IACxC,IAAI,EAAE,iBAAiB;IACvB,QAAQ,EAAE,iBAAiB;IAC3B,QAAQ,EAAE,cAAc;IACxB,SAAS,EAAE,cAAc;CAC1B,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Entity } from "../../../common/abstracts/entity";
|
|
2
|
+
import { BlogTranslationSource } from "../blog.constants";
|
|
3
|
+
import type { BlogPost } from "./blog-post";
|
|
4
|
+
/**
|
|
5
|
+
* BlogPostTranslation Entity Type
|
|
6
|
+
*
|
|
7
|
+
* The text of one blog post in one language. Every post has exactly one
|
|
8
|
+
* original translation (`isOriginal`) and one AI-maintained record per other
|
|
9
|
+
* supported language.
|
|
10
|
+
*/
|
|
11
|
+
export type BlogPostTranslation = Entity & {
|
|
12
|
+
language: string;
|
|
13
|
+
isOriginal: boolean;
|
|
14
|
+
source: BlogTranslationSource;
|
|
15
|
+
aiStatus: string;
|
|
16
|
+
title?: string;
|
|
17
|
+
slug?: string;
|
|
18
|
+
summary?: string;
|
|
19
|
+
body?: string;
|
|
20
|
+
bodyText?: string;
|
|
21
|
+
coverImageAlt?: string;
|
|
22
|
+
readingMinutes?: number;
|
|
23
|
+
translatedAt?: Date;
|
|
24
|
+
post?: BlogPost;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* BlogPostTranslation Entity Descriptor
|
|
28
|
+
*
|
|
29
|
+
* Single source of truth for the BlogPostTranslation entity configuration.
|
|
30
|
+
* Only `title`, `summary` and `bodyText` are searchable, so the derived
|
|
31
|
+
* FULLTEXT index `blogPostTranslation_search_index` covers exactly those three.
|
|
32
|
+
*/
|
|
33
|
+
export declare const BlogPostTranslationDescriptor: import("../../..").EntityDescriptor<BlogPostTranslation, {
|
|
34
|
+
post: {
|
|
35
|
+
model: import("../../..").DataMeta;
|
|
36
|
+
direction: "in";
|
|
37
|
+
relationship: string;
|
|
38
|
+
cardinality: "one";
|
|
39
|
+
description: string;
|
|
40
|
+
};
|
|
41
|
+
}>;
|
|
42
|
+
export type BlogPostTranslationDescriptorType = typeof BlogPostTranslationDescriptor;
|
|
43
|
+
//# sourceMappingURL=blog-post-translation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blog-post-translation.d.ts","sourceRoot":"","sources":["../../../../src/foundations/blog/entities/blog-post-translation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAE1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAI5C;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,qBAAqB,CAAC;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,IAAI,CAAC;IAEpB,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;EA2FxC,CAAC;AAEH,MAAM,MAAM,iCAAiC,GAAG,OAAO,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BlogPostTranslationDescriptor = void 0;
|
|
4
|
+
const define_entity_1 = require("../../../common/helpers/define-entity");
|
|
5
|
+
const blog_post_meta_1 = require("./blog-post.meta");
|
|
6
|
+
const blog_post_translation_meta_1 = require("./blog-post-translation.meta");
|
|
7
|
+
/**
|
|
8
|
+
* BlogPostTranslation Entity Descriptor
|
|
9
|
+
*
|
|
10
|
+
* Single source of truth for the BlogPostTranslation entity configuration.
|
|
11
|
+
* Only `title`, `summary` and `bodyText` are searchable, so the derived
|
|
12
|
+
* FULLTEXT index `blogPostTranslation_search_index` covers exactly those three.
|
|
13
|
+
*/
|
|
14
|
+
exports.BlogPostTranslationDescriptor = (0, define_entity_1.defineEntity)()({
|
|
15
|
+
...blog_post_translation_meta_1.blogPostTranslationMeta,
|
|
16
|
+
isCompanyScoped: false,
|
|
17
|
+
// "internal": drafts and unpublished text must never reach the assistant catalog;
|
|
18
|
+
// visitors read published posts through the public routes only.
|
|
19
|
+
tenancy: "internal",
|
|
20
|
+
description: "The text of one blog post in one language: title, slug, summary and body. Each post has one original translation, written by an administrator, and one record per other supported language, AI-translated from the original and optionally edited by hand.",
|
|
21
|
+
fields: {
|
|
22
|
+
language: {
|
|
23
|
+
type: "string",
|
|
24
|
+
required: true,
|
|
25
|
+
excludeFromSearch: true,
|
|
26
|
+
description: "The language code of this text (one of the app's supported languages). One record per language per post.",
|
|
27
|
+
},
|
|
28
|
+
isOriginal: {
|
|
29
|
+
type: "boolean",
|
|
30
|
+
required: true,
|
|
31
|
+
description: "True for the text the administrator wrote, in the post's original language. Exactly one per post; every other language is translated from it.",
|
|
32
|
+
},
|
|
33
|
+
source: {
|
|
34
|
+
type: "string",
|
|
35
|
+
required: true,
|
|
36
|
+
excludeFromSearch: true,
|
|
37
|
+
description: "Who produced the text: original (written by the administrator), ai (machine translation of the original) or manual (an AI translation an administrator edited by hand; re-translating the original overwrites it).",
|
|
38
|
+
},
|
|
39
|
+
aiStatus: {
|
|
40
|
+
type: "string",
|
|
41
|
+
required: true,
|
|
42
|
+
excludeFromSearch: true,
|
|
43
|
+
description: "Translation state of this language: pending (queued), in_progress, completed or failed. The original is always completed. Public reads use a translation only once it is completed, otherwise they fall back to the original.",
|
|
44
|
+
},
|
|
45
|
+
title: {
|
|
46
|
+
type: "string",
|
|
47
|
+
description: "The post title in this language. Empty on a placeholder that is still waiting for its first translation.",
|
|
48
|
+
},
|
|
49
|
+
slug: {
|
|
50
|
+
type: "string",
|
|
51
|
+
excludeFromSearch: true,
|
|
52
|
+
description: "The URL slug of the post in this language, built from the title in plain code (kebab-case ASCII). Unique per language across all posts; a collision gets -2, -3 and so on. Stable once the post is published.",
|
|
53
|
+
},
|
|
54
|
+
summary: {
|
|
55
|
+
type: "string",
|
|
56
|
+
description: "A short (about 160 characters) summary of the post in this language, shown as the teaser on the public list. AI-generated from the original body unless written by hand.",
|
|
57
|
+
},
|
|
58
|
+
body: {
|
|
59
|
+
type: "string",
|
|
60
|
+
excludeFromSearch: true,
|
|
61
|
+
description: "The post body in this language, stored as BlockNote rich-text-editor JSON (not plain text).",
|
|
62
|
+
},
|
|
63
|
+
bodyText: {
|
|
64
|
+
type: "string",
|
|
65
|
+
description: "Plain text derived from the body. Feeds full-text search and the reading time; never edited directly.",
|
|
66
|
+
},
|
|
67
|
+
coverImageAlt: {
|
|
68
|
+
type: "string",
|
|
69
|
+
excludeFromSearch: true,
|
|
70
|
+
description: "The description of the post's cover image in this language, used as the image alt text.",
|
|
71
|
+
},
|
|
72
|
+
readingMinutes: {
|
|
73
|
+
type: "number",
|
|
74
|
+
description: "Estimated reading time of this language's body in minutes (about 200 words per minute, at least 1).",
|
|
75
|
+
},
|
|
76
|
+
translatedAt: {
|
|
77
|
+
type: "datetime",
|
|
78
|
+
description: "When this language was last AI-translated from the original. Unset on the original and on placeholders not yet translated.",
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
relationships: {
|
|
82
|
+
post: {
|
|
83
|
+
model: blog_post_meta_1.blogPostMeta,
|
|
84
|
+
direction: "in",
|
|
85
|
+
relationship: "HAS_TRANSLATION",
|
|
86
|
+
cardinality: "one",
|
|
87
|
+
description: "The blog post this text belongs to.",
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
//# sourceMappingURL=blog-post-translation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blog-post-translation.js","sourceRoot":"","sources":["../../../../src/foundations/blog/entities/blog-post-translation.ts"],"names":[],"mappings":";;;AACA,yEAAqE;AAGrE,qDAAgD;AAChD,6EAAuE;AA0BvE;;;;;;GAMG;AACU,QAAA,6BAA6B,GAAG,IAAA,4BAAY,GAAuB,CAAC;IAC/E,GAAG,oDAAuB;IAE1B,eAAe,EAAE,KAAK;IACtB,kFAAkF;IAClF,gEAAgE;IAChE,OAAO,EAAE,UAAU;IAEnB,WAAW,EACT,4PAA4P;IAE9P,MAAM,EAAE;QACN,QAAQ,EAAE;YACR,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,iBAAiB,EAAE,IAAI;YACvB,WAAW,EACT,0GAA0G;SAC7G;QACD,UAAU,EAAE;YAC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.meta.d.ts","sourceRoot":"","sources":["../../../../src/foundations/blog/entities/blog-post-translation.meta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAE1E,eAAO,MAAM,uBAAuB,EAAE,QAKrC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.blogPostTranslationMeta = void 0;
|
|
4
|
+
exports.blogPostTranslationMeta = {
|
|
5
|
+
type: "blog-post-translations",
|
|
6
|
+
endpoint: "blog-post-translations",
|
|
7
|
+
nodeName: "blogPostTranslation",
|
|
8
|
+
labelName: "BlogPostTranslation",
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=blog-post-translation.meta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blog-post-translation.meta.js","sourceRoot":"","sources":["../../../../src/foundations/blog/entities/blog-post-translation.meta.ts"],"names":[],"mappings":";;;AAEa,QAAA,uBAAuB,GAAa;IAC/C,IAAI,EAAE,wBAAwB;IAC9B,QAAQ,EAAE,wBAAwB;IAClC,QAAQ,EAAE,qBAAqB;IAC/B,SAAS,EAAE,qBAAqB;CACjC,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Entity } from "../../../common/abstracts/entity";
|
|
2
|
+
import type { User } from "../../user/entities/user";
|
|
3
|
+
import { BlogPostStatus } from "../blog.constants";
|
|
4
|
+
import type { BlogCategory } from "./blog-category";
|
|
5
|
+
import type { BlogPostTranslation } from "./blog-post-translation";
|
|
6
|
+
/**
|
|
7
|
+
* BlogPost Entity Type
|
|
8
|
+
*
|
|
9
|
+
* The language-independent part of a blog post. The text lives on one
|
|
10
|
+
* BlogPostTranslation per language; queries that resolve one language fill the
|
|
11
|
+
* computed fields below.
|
|
12
|
+
*/
|
|
13
|
+
export type BlogPost = Entity & {
|
|
14
|
+
status: BlogPostStatus;
|
|
15
|
+
originalLanguage: string;
|
|
16
|
+
coverImage?: string;
|
|
17
|
+
publishedAt?: Date;
|
|
18
|
+
language?: string;
|
|
19
|
+
title?: string;
|
|
20
|
+
slug?: string;
|
|
21
|
+
summary?: string;
|
|
22
|
+
body?: string;
|
|
23
|
+
coverImageAlt?: string;
|
|
24
|
+
readingMinutes?: number;
|
|
25
|
+
authorName?: string;
|
|
26
|
+
categoryIds?: string[];
|
|
27
|
+
author?: User;
|
|
28
|
+
categories?: BlogCategory[];
|
|
29
|
+
translations?: BlogPostTranslation[];
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* BlogPost Entity Descriptor
|
|
33
|
+
*
|
|
34
|
+
* Single source of truth for the BlogPost entity configuration.
|
|
35
|
+
*/
|
|
36
|
+
export declare const BlogPostDescriptor: import("../../..").EntityDescriptor<BlogPost, {
|
|
37
|
+
author: {
|
|
38
|
+
model: import("../../..").DataMeta;
|
|
39
|
+
direction: "in";
|
|
40
|
+
relationship: string;
|
|
41
|
+
cardinality: "one";
|
|
42
|
+
description: string;
|
|
43
|
+
};
|
|
44
|
+
categories: {
|
|
45
|
+
model: import("../../..").DataMeta;
|
|
46
|
+
direction: "out";
|
|
47
|
+
relationship: string;
|
|
48
|
+
cardinality: "many";
|
|
49
|
+
required: false;
|
|
50
|
+
dtoKey: string;
|
|
51
|
+
description: string;
|
|
52
|
+
};
|
|
53
|
+
translations: {
|
|
54
|
+
model: import("../../..").DataMeta;
|
|
55
|
+
direction: "out";
|
|
56
|
+
relationship: string;
|
|
57
|
+
cardinality: "many";
|
|
58
|
+
required: false;
|
|
59
|
+
description: string;
|
|
60
|
+
};
|
|
61
|
+
}>;
|
|
62
|
+
export type BlogPostDescriptorType = typeof BlogPostDescriptor;
|
|
63
|
+
//# sourceMappingURL=blog-post.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blog-post.d.ts","sourceRoot":"","sources":["../../../../src/foundations/blog/entities/blog-post.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAG1D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAErD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAInE;;;;;;GAMG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG;IAC9B,MAAM,EAAE,cAAc,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,IAAI,CAAC;IAGnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IAEvB,MAAM,CAAC,EAAE,IAAI,CAAC;IACd,UAAU,CAAC,EAAE,YAAY,EAAE,CAAC;IAC5B,YAAY,CAAC,EAAE,mBAAmB,EAAE,CAAC;CACtC,CAAC;AAiBF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;EAmI7B,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,OAAO,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BlogPostDescriptor = void 0;
|
|
4
|
+
const define_entity_1 = require("../../../common/helpers/define-entity");
|
|
5
|
+
const s3_service_1 = require("../../s3/services/s3.service");
|
|
6
|
+
const user_meta_1 = require("../../user/entities/user.meta");
|
|
7
|
+
const blog_category_meta_1 = require("./blog-category.meta");
|
|
8
|
+
const blog_post_translation_meta_1 = require("./blog-post-translation.meta");
|
|
9
|
+
const blog_post_meta_1 = require("./blog-post.meta");
|
|
10
|
+
const readString = (record, alias) => {
|
|
11
|
+
if (!record?.has?.(alias))
|
|
12
|
+
return undefined;
|
|
13
|
+
const value = record.get(alias);
|
|
14
|
+
return value === null || value === undefined ? undefined : String(value);
|
|
15
|
+
};
|
|
16
|
+
const readNumber = (record, alias) => {
|
|
17
|
+
if (!record?.has?.(alias))
|
|
18
|
+
return undefined;
|
|
19
|
+
const value = record.get(alias);
|
|
20
|
+
if (value === null || value === undefined)
|
|
21
|
+
return undefined;
|
|
22
|
+
if (value?.toNumber)
|
|
23
|
+
return value.toNumber();
|
|
24
|
+
const parsed = Number(value);
|
|
25
|
+
return Number.isNaN(parsed) ? undefined : parsed;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* BlogPost Entity Descriptor
|
|
29
|
+
*
|
|
30
|
+
* Single source of truth for the BlogPost entity configuration.
|
|
31
|
+
*/
|
|
32
|
+
exports.BlogPostDescriptor = (0, define_entity_1.defineEntity)()({
|
|
33
|
+
...blog_post_meta_1.blogPostMeta,
|
|
34
|
+
isCompanyScoped: false,
|
|
35
|
+
// "internal": drafts and unpublished text must never reach the assistant catalog;
|
|
36
|
+
// visitors read published posts through the public routes only.
|
|
37
|
+
tenancy: "internal",
|
|
38
|
+
description: "A blog post of the platform's public blog: written by a platform administrator in one language and AI-translated into every supported language. Global content, not owned by any company. Its per-language text (title, summary, body) lives on its BlogPostTranslation records.",
|
|
39
|
+
injectServices: [s3_service_1.S3Service],
|
|
40
|
+
fields: {
|
|
41
|
+
status: {
|
|
42
|
+
type: "string",
|
|
43
|
+
required: true,
|
|
44
|
+
excludeFromSearch: true,
|
|
45
|
+
description: "Publication state: draft (never shown publicly), published (shown on the public blog) or unpublished (taken down; can be published again). Server-owned, changed only by the publish and unpublish actions.",
|
|
46
|
+
},
|
|
47
|
+
originalLanguage: {
|
|
48
|
+
type: "string",
|
|
49
|
+
required: true,
|
|
50
|
+
excludeFromSearch: true,
|
|
51
|
+
description: "The language code the post was written in (one of the app's supported languages). Set at creation and fixed afterwards; the translation in this language is the original every other language is translated from.",
|
|
52
|
+
},
|
|
53
|
+
coverImage: {
|
|
54
|
+
type: "string",
|
|
55
|
+
excludeFromSearch: true,
|
|
56
|
+
description: "S3 key of the optional cover image, serialised as a signed public URL. Shown at the top of the post page and on the post's card in the public list.",
|
|
57
|
+
transform: async (data, services) => {
|
|
58
|
+
if (!data.coverImage)
|
|
59
|
+
return undefined;
|
|
60
|
+
if (data.coverImage.startsWith("~"))
|
|
61
|
+
return data.coverImage.substring(1);
|
|
62
|
+
return await services.S3Service.generateSignedUrl({ key: data.coverImage, isPublic: true });
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
publishedAt: {
|
|
66
|
+
type: "datetime",
|
|
67
|
+
description: "When the post was first published. Set on the first publish and kept through unpublish and republish; the public list is ordered by it, newest first.",
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
computed: {
|
|
71
|
+
language: {
|
|
72
|
+
description: "The language whose text the resolved fields carry: the requested language when its translation is completed, otherwise the original language. Undefined outside language-resolving queries.",
|
|
73
|
+
meta: true,
|
|
74
|
+
compute: (params) => readString(params.record, "resolvedLanguage"),
|
|
75
|
+
},
|
|
76
|
+
title: {
|
|
77
|
+
description: "The post title in the resolved language. Undefined outside language-resolving queries.",
|
|
78
|
+
meta: true,
|
|
79
|
+
compute: (params) => readString(params.record, "resolvedTitle"),
|
|
80
|
+
},
|
|
81
|
+
slug: {
|
|
82
|
+
description: "The URL slug of the post in the resolved language (kebab-case, unique per language). Undefined outside language-resolving queries.",
|
|
83
|
+
meta: true,
|
|
84
|
+
compute: (params) => readString(params.record, "resolvedSlug"),
|
|
85
|
+
},
|
|
86
|
+
summary: {
|
|
87
|
+
description: "The short summary of the post in the resolved language. Undefined outside language-resolving queries.",
|
|
88
|
+
meta: true,
|
|
89
|
+
compute: (params) => readString(params.record, "resolvedSummary"),
|
|
90
|
+
},
|
|
91
|
+
body: {
|
|
92
|
+
description: "The post body in the resolved language, as BlockNote rich-text-editor JSON. Undefined outside language-resolving queries.",
|
|
93
|
+
meta: true,
|
|
94
|
+
compute: (params) => readString(params.record, "resolvedBody"),
|
|
95
|
+
},
|
|
96
|
+
coverImageAlt: {
|
|
97
|
+
description: "The cover image description in the resolved language. Undefined outside language-resolving queries.",
|
|
98
|
+
meta: true,
|
|
99
|
+
compute: (params) => readString(params.record, "resolvedCoverImageAlt"),
|
|
100
|
+
},
|
|
101
|
+
readingMinutes: {
|
|
102
|
+
description: "Estimated reading time in minutes of the resolved-language body. Undefined outside language-resolving queries.",
|
|
103
|
+
meta: true,
|
|
104
|
+
compute: (params) => readNumber(params.record, "resolvedReadingMinutes"),
|
|
105
|
+
},
|
|
106
|
+
authorName: {
|
|
107
|
+
description: "The display name of the administrator who wrote the post. Public reads return this instead of the author user, so no user data leaks.",
|
|
108
|
+
meta: true,
|
|
109
|
+
compute: (params) => readString(params.record, "authorName"),
|
|
110
|
+
},
|
|
111
|
+
categoryIds: {
|
|
112
|
+
description: "Ids of the blog categories the post belongs to, as collected by public reads.",
|
|
113
|
+
meta: true,
|
|
114
|
+
compute: (params) => {
|
|
115
|
+
if (!params.record?.has?.("categoryIds"))
|
|
116
|
+
return undefined;
|
|
117
|
+
const ids = params.record.get("categoryIds") ?? [];
|
|
118
|
+
return ids.filter((id) => id !== null && id !== undefined).map((id) => String(id));
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
relationships: {
|
|
123
|
+
author: {
|
|
124
|
+
model: user_meta_1.userMeta,
|
|
125
|
+
direction: "in",
|
|
126
|
+
relationship: "AUTHORED",
|
|
127
|
+
cardinality: "one",
|
|
128
|
+
description: "The platform administrator who created the post. Set at creation, never editable.",
|
|
129
|
+
},
|
|
130
|
+
categories: {
|
|
131
|
+
model: blog_category_meta_1.blogCategoryMeta,
|
|
132
|
+
direction: "out",
|
|
133
|
+
relationship: "IN_BLOG_CATEGORY",
|
|
134
|
+
cardinality: "many",
|
|
135
|
+
required: false,
|
|
136
|
+
dtoKey: "categories",
|
|
137
|
+
description: "The blog categories the post is filed under; the public list can be filtered by one of them.",
|
|
138
|
+
},
|
|
139
|
+
translations: {
|
|
140
|
+
model: blog_post_translation_meta_1.blogPostTranslationMeta,
|
|
141
|
+
direction: "out",
|
|
142
|
+
relationship: "HAS_TRANSLATION",
|
|
143
|
+
cardinality: "many",
|
|
144
|
+
required: false,
|
|
145
|
+
description: "The per-language text records of the post, one per language, the original included.",
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
});
|
|
149
|
+
//# sourceMappingURL=blog-post.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blog-post.js","sourceRoot":"","sources":["../../../../src/foundations/blog/entities/blog-post.ts"],"names":[],"mappings":";;;AACA,yEAAqE;AACrE,6DAAyD;AAEzD,6DAAyD;AAGzD,6DAAwD;AAExD,6EAAuE;AACvE,qDAAgD;AA+BhD,MAAM,UAAU,GAAG,CAAC,MAAW,EAAE,KAAa,EAAsB,EAAE;IACpE,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IAC5C,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAChC,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC3E,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,MAAW,EAAE,KAAa,EAAsB,EAAE;I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kB;YAChC,WAAW,EAAE,MAAM;YACnB,QAAQ,EAAE,KAAK;YACf,MAAM,EAAE,YAAY;YACpB,WAAW,EAAE,8FAA8F;SAC5G;QACD,YAAY,EAAE;YACZ,KAAK,EAAE,oDAAuB;YAC9B,SAAS,EAAE,KAAK;YAChB,YAAY,EAAE,iBAAiB;YAC/B,WAAW,EAAE,MAAM;YACnB,QAAQ,EAAE,KAAK;YACf,WAAW,EAAE,qFAAqF;SACnG;KACF;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blog-post.meta.d.ts","sourceRoot":"","sources":["../../../../src/foundations/blog/entities/blog-post.meta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAE1E,eAAO,MAAM,YAAY,EAAE,QAK1B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.blogPostMeta = void 0;
|
|
4
|
+
exports.blogPostMeta = {
|
|
5
|
+
type: "blog-posts",
|
|
6
|
+
endpoint: "blog-posts",
|
|
7
|
+
nodeName: "blogPost",
|
|
8
|
+
labelName: "BlogPost",
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=blog-post.meta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blog-post.meta.js","sourceRoot":"","sources":["../../../../src/foundations/blog/entities/blog-post.meta.ts"],"names":[],"mappings":";;;AAEa,QAAA,YAAY,GAAa;IACpC,IAAI,EAAE,YAAY;IAClB,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,UAAU;CACtB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Entity } from "../../../common/abstracts/entity";
|
|
2
|
+
import { BlogListLayout } from "../blog.constants";
|
|
3
|
+
/**
|
|
4
|
+
* BlogSettings Entity Type
|
|
5
|
+
*
|
|
6
|
+
* The blog's singleton settings node, stored under `BLOG_SETTINGS_ID`.
|
|
7
|
+
*/
|
|
8
|
+
export type BlogSettings = Entity & {
|
|
9
|
+
listLayout: BlogListLayout;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* BlogSettings Entity Descriptor
|
|
13
|
+
*
|
|
14
|
+
* Single source of truth for the BlogSettings entity configuration.
|
|
15
|
+
*/
|
|
16
|
+
export declare const BlogSettingsDescriptor: import("../../..").EntityDescriptor<BlogSettings, {}>;
|
|
17
|
+
export type BlogSettingsDescriptorType = typeof BlogSettingsDescriptor;
|
|
18
|
+
//# sourceMappingURL=blog-settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blog-settings.d.ts","sourceRoot":"","sources":["../../../../src/foundations/blog/entities/blog-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAE1D,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGnD;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG;IAClC,UAAU,EAAE,cAAc,CAAC;CAC5B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,uDAoBjC,CAAC;AAEH,MAAM,MAAM,0BAA0B,GAAG,OAAO,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BlogSettingsDescriptor = void 0;
|
|
4
|
+
const define_entity_1 = require("../../../common/helpers/define-entity");
|
|
5
|
+
const blog_settings_meta_1 = require("./blog-settings.meta");
|
|
6
|
+
/**
|
|
7
|
+
* BlogSettings Entity Descriptor
|
|
8
|
+
*
|
|
9
|
+
* Single source of truth for the BlogSettings entity configuration.
|
|
10
|
+
*/
|
|
11
|
+
exports.BlogSettingsDescriptor = (0, define_entity_1.defineEntity)()({
|
|
12
|
+
...blog_settings_meta_1.blogSettingsMeta,
|
|
13
|
+
isCompanyScoped: false,
|
|
14
|
+
tenancy: "global",
|
|
15
|
+
description: "The settings of the platform's public blog. A single node for the whole app, edited by platform administrators.",
|
|
16
|
+
fields: {
|
|
17
|
+
listLayout: {
|
|
18
|
+
type: "string",
|
|
19
|
+
required: true,
|
|
20
|
+
excludeFromSearch: true,
|
|
21
|
+
description: "Which layout the public blog list uses: featured (newest post as a hero, then a card grid), column (a narrow reading column, one row per post) or rail (search and categories in a side rail). Defaults to featured.",
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
relationships: {},
|
|
25
|
+
});
|
|
26
|
+
//# sourceMappingURL=blog-settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blog-settings.js","sourceRoot":"","sources":["../../../../src/foundations/blog/entities/blog-settings.ts"],"names":[],"mappings":";;;AACA,yEAAqE;AAErE,6DAAwD;AAWxD;;;;GAIG;AACU,QAAA,sBAAsB,GAAG,IAAA,4BAAY,GAAgB,CAAC;IACjE,GAAG,qCAAgB;IAEnB,eAAe,EAAE,KAAK;IACtB,OAAO,EAAE,QAAQ;IAEjB,WAAW,EACT,iHAAiH;IAEnH,MAAM,EAAE;QACN,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,iBAAiB,EAAE,IAAI;YACvB,WAAW,EACT,sNAAsN;SACzN;KACF;IAED,aAAa,EAAE,EAAE;CAClB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blog-settings.meta.d.ts","sourceRoot":"","sources":["../../../../src/foundations/blog/entities/blog-settings.meta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAE1E,eAAO,MAAM,gBAAgB,EAAE,QAK9B,CAAC"}
|