@blogmcp/sdk 0.8.1 → 0.9.1
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/community/channels.d.ts +12 -0
- package/dist/community/channels.js +7 -0
- package/dist/community/client.d.ts +211 -0
- package/dist/community/client.js +188 -0
- package/dist/community/index.d.ts +34 -0
- package/dist/community/index.js +93 -0
- package/dist/community/links.d.ts +73 -0
- package/dist/community/links.js +85 -0
- package/dist/community/messages.cs.d.ts +331 -0
- package/dist/community/messages.cs.js +342 -0
- package/dist/community/messages.d.ts +40 -0
- package/dist/community/messages.en.d.ts +315 -0
- package/dist/community/messages.en.js +313 -0
- package/dist/community/messages.js +66 -0
- package/dist/community/outcome.d.ts +96 -0
- package/dist/community/outcome.js +211 -0
- package/dist/community/poll.d.ts +35 -0
- package/dist/community/poll.js +70 -0
- package/dist/community/routes.d.ts +110 -0
- package/dist/community/routes.js +66 -0
- package/dist/community/server/bff.d.ts +123 -0
- package/dist/community/server/bff.js +214 -0
- package/dist/community/server/env.d.ts +20 -0
- package/dist/community/server/env.js +16 -0
- package/dist/community/server/host-routes.d.ts +15 -0
- package/dist/community/server/host-routes.js +35 -0
- package/dist/community/server/http.d.ts +64 -0
- package/dist/community/server/http.js +90 -0
- package/dist/community/server/index.d.ts +45 -0
- package/dist/community/server/index.js +19 -0
- package/dist/community/server/route-decision.d.ts +70 -0
- package/dist/community/server/route-decision.js +89 -0
- package/dist/community/server/unknown-path.d.ts +21 -0
- package/dist/community/server/unknown-path.js +11 -0
- package/dist/community/shapes.d.ts +472 -0
- package/dist/community/shapes.js +63 -0
- package/dist/community/store.d.ts +183 -0
- package/dist/community/store.js +423 -0
- package/dist/community/transport.d.ts +42 -0
- package/dist/community/transport.js +59 -0
- package/dist/core/client.d.ts +17 -0
- package/dist/core/client.js +58 -55
- package/dist/core/comments-legacy.d.ts +19 -0
- package/dist/core/comments-legacy.js +18 -0
- package/dist/core/index.d.ts +3 -0
- package/dist/core/index.js +107 -101
- package/dist/core/queries.d.ts +46 -0
- package/dist/core/queries.js +128 -84
- package/dist/core/seo.js +40 -39
- package/dist/core/translations/cs.json.js +6 -6
- package/dist/core/translations/en.json.js +1 -1
- package/dist/core/types.d.ts +23 -1
- package/dist/core/view-model.d.ts +7 -0
- package/dist/core/view-model.js +29 -25
- package/dist/packages/tripmap-core/dist/generated/maplibre-worker.bundle.js +1 -1
- package/dist/react/KbMdxContent.js +4 -3
- package/dist/vue/components/KbMdxContent.vue2.js +3 -2
- package/dist/vue/composables/useKbComments.d.ts +8 -0
- package/package.json +13 -4
- package/src/community/channels.ts +12 -0
- package/src/community/client.ts +437 -0
- package/src/community/index.ts +192 -0
- package/src/community/links.ts +174 -0
- package/src/community/messages.cs.ts +371 -0
- package/src/community/messages.en.ts +341 -0
- package/src/community/messages.ts +112 -0
- package/src/community/outcome.ts +317 -0
- package/src/community/poll.ts +154 -0
- package/src/community/routes.ts +139 -0
- package/src/community/server/bff.ts +530 -0
- package/src/community/server/env.ts +42 -0
- package/src/community/server/host-routes.ts +48 -0
- package/src/community/server/http.ts +175 -0
- package/src/community/server/index.ts +55 -0
- package/src/community/server/route-decision.ts +226 -0
- package/src/community/server/unknown-path.ts +32 -0
- package/src/community/shapes.ts +541 -0
- package/src/community/store.ts +786 -0
- package/src/community/transport.ts +111 -0
- package/src/core/client.ts +24 -1
- package/src/core/comments-legacy.ts +39 -0
- package/src/core/index.ts +8 -0
- package/src/core/queries.ts +93 -0
- package/src/core/seo.ts +5 -1
- package/src/core/translations/cs.json +3 -1
- package/src/core/translations/en.json +3 -1
- package/src/core/types.ts +19 -1
- package/src/core/view-model.ts +12 -1
- package/src/vue/composables/useKbComments.ts +8 -0
package/dist/core/seo.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { inlineMarkdownToPlainText as I } from "@blogmcp/mdx-schema/title";
|
|
1
2
|
import { generateDescription as O } from "./article-seo.js";
|
|
2
|
-
const
|
|
3
|
-
function
|
|
4
|
-
const
|
|
5
|
-
return e === i.defaultLocale ?
|
|
3
|
+
const v = 25;
|
|
4
|
+
function x(t, e, i) {
|
|
5
|
+
const n = t.startsWith("/") ? t : `/${t}`;
|
|
6
|
+
return e === i.defaultLocale ? n : n === "/" ? `/${e}` : `/${e}${n}`;
|
|
6
7
|
}
|
|
7
|
-
function
|
|
8
|
+
function G(t, e) {
|
|
8
9
|
for (const i of e.locales)
|
|
9
10
|
if (i !== e.defaultLocale) {
|
|
10
11
|
if (t === `/${i}`) return "/";
|
|
@@ -16,20 +17,20 @@ function d(t, e) {
|
|
|
16
17
|
return e === "/" ? t : `${t}${e}`;
|
|
17
18
|
}
|
|
18
19
|
function L(t, e) {
|
|
19
|
-
const i =
|
|
20
|
-
hreflang:
|
|
21
|
-
href: d(e.siteUrl,
|
|
20
|
+
const i = G(t, e), n = e.locales.map((a) => ({
|
|
21
|
+
hreflang: a,
|
|
22
|
+
href: d(e.siteUrl, x(i, a, e))
|
|
22
23
|
}));
|
|
23
|
-
return
|
|
24
|
+
return n.push({
|
|
24
25
|
hreflang: "x-default",
|
|
25
|
-
href: d(e.siteUrl,
|
|
26
|
-
}),
|
|
26
|
+
href: d(e.siteUrl, x(i, e.defaultLocale, e))
|
|
27
|
+
}), n;
|
|
27
28
|
}
|
|
28
29
|
function N(t, e) {
|
|
29
30
|
if (t)
|
|
30
31
|
return t.startsWith("http") ? t : `${e}${t}`;
|
|
31
32
|
}
|
|
32
|
-
function
|
|
33
|
+
function S(t) {
|
|
33
34
|
if (!(!t || typeof t.latitude != "number" || typeof t.longitude != "number"))
|
|
34
35
|
return {
|
|
35
36
|
"@type": "Place",
|
|
@@ -43,14 +44,14 @@ function j(t) {
|
|
|
43
44
|
};
|
|
44
45
|
}
|
|
45
46
|
function C(t) {
|
|
46
|
-
const { article: e, config: i, locale:
|
|
47
|
+
const { article: e, config: i, locale: n, routePath: a, brandSuffix: l, fallbackTitle: o } = t, m = I(e.title), s = m || o, c = `${s} | ${l}`, f = e.description || O(e.content || "") || l, h = d(i.siteUrl, a), r = N(e.featuredImageUrl, i.siteUrl), T = {
|
|
47
48
|
title: s,
|
|
48
49
|
description: f,
|
|
49
50
|
type: "article",
|
|
50
51
|
url: h,
|
|
51
52
|
siteName: i.siteName,
|
|
52
53
|
...r ? { image: r } : {}
|
|
53
|
-
},
|
|
54
|
+
}, j = {
|
|
54
55
|
card: r ? "summary_large_image" : "summary",
|
|
55
56
|
title: s,
|
|
56
57
|
description: f,
|
|
@@ -58,14 +59,14 @@ function C(t) {
|
|
|
58
59
|
}, U = {
|
|
59
60
|
...e.publishedAt ? { publishedTime: e.publishedAt } : {},
|
|
60
61
|
...e.updatedAt ? { modifiedTime: e.updatedAt } : {}
|
|
61
|
-
}, g =
|
|
62
|
+
}, g = S(e.featuredImageGeo), u = [], b = /* @__PURE__ */ new Set();
|
|
62
63
|
let y;
|
|
63
64
|
r && (b.add(r), u.push(g ? { "@type": "ImageObject", url: r, contentLocation: g } : r));
|
|
64
65
|
for (const _ of e.contentImagesGeo ?? []) {
|
|
65
|
-
if (u.length >=
|
|
66
|
+
if (u.length >= v) break;
|
|
66
67
|
const p = N(_.url, i.siteUrl);
|
|
67
68
|
if (!p || b.has(p)) continue;
|
|
68
|
-
const A =
|
|
69
|
+
const A = S(_);
|
|
69
70
|
A && (b.add(p), y || (y = A), u.push({ "@type": "ImageObject", url: p, contentLocation: A }));
|
|
70
71
|
}
|
|
71
72
|
const $ = u.length > 1 ? u : u[0], P = g ?? y, w = {
|
|
@@ -84,28 +85,28 @@ function C(t) {
|
|
|
84
85
|
title: c,
|
|
85
86
|
description: f,
|
|
86
87
|
canonical: h,
|
|
87
|
-
htmlLang:
|
|
88
|
-
hreflang: L(
|
|
89
|
-
og:
|
|
90
|
-
twitter:
|
|
88
|
+
htmlLang: n,
|
|
89
|
+
hreflang: L(a, i),
|
|
90
|
+
og: T,
|
|
91
|
+
twitter: j,
|
|
91
92
|
...Object.keys(U).length ? { articleMeta: U } : {},
|
|
92
93
|
jsonLd: w
|
|
93
94
|
};
|
|
94
95
|
}
|
|
95
|
-
function
|
|
96
|
-
const { title: e, description: i, config:
|
|
96
|
+
function W(t) {
|
|
97
|
+
const { title: e, description: i, config: n, locale: a, routePath: l, jsonLdName: o, image: m } = t, s = d(n.siteUrl, l), c = N(m, n.siteUrl);
|
|
97
98
|
return {
|
|
98
99
|
title: e,
|
|
99
100
|
description: i,
|
|
100
101
|
canonical: s,
|
|
101
|
-
htmlLang:
|
|
102
|
-
hreflang: L(l,
|
|
102
|
+
htmlLang: a,
|
|
103
|
+
hreflang: L(l, n),
|
|
103
104
|
og: {
|
|
104
105
|
title: e,
|
|
105
106
|
description: i,
|
|
106
107
|
type: "website",
|
|
107
108
|
url: s,
|
|
108
|
-
siteName:
|
|
109
|
+
siteName: n.siteName,
|
|
109
110
|
...c ? { image: c } : {}
|
|
110
111
|
},
|
|
111
112
|
twitter: {
|
|
@@ -123,34 +124,34 @@ function M(t) {
|
|
|
123
124
|
}
|
|
124
125
|
};
|
|
125
126
|
}
|
|
126
|
-
function
|
|
127
|
-
const { title: e, description: i, config:
|
|
127
|
+
function q(t) {
|
|
128
|
+
const { title: e, description: i, config: n, locale: a, routePath: l } = t, o = d(n.siteUrl, l);
|
|
128
129
|
return {
|
|
129
130
|
title: e,
|
|
130
131
|
description: i,
|
|
131
132
|
canonical: o,
|
|
132
|
-
htmlLang:
|
|
133
|
-
hreflang: L(l,
|
|
133
|
+
htmlLang: a,
|
|
134
|
+
hreflang: L(l, n),
|
|
134
135
|
og: {
|
|
135
|
-
title:
|
|
136
|
+
title: n.siteName,
|
|
136
137
|
description: i,
|
|
137
138
|
type: "website",
|
|
138
139
|
url: o,
|
|
139
|
-
siteName:
|
|
140
|
+
siteName: n.siteName
|
|
140
141
|
},
|
|
141
142
|
twitter: {
|
|
142
143
|
card: "summary",
|
|
143
|
-
title:
|
|
144
|
+
title: n.siteName,
|
|
144
145
|
description: i
|
|
145
146
|
},
|
|
146
147
|
jsonLd: {
|
|
147
148
|
"@context": "https://schema.org",
|
|
148
149
|
"@type": "WebSite",
|
|
149
|
-
name:
|
|
150
|
+
name: n.siteName,
|
|
150
151
|
url: o,
|
|
151
152
|
potentialAction: {
|
|
152
153
|
"@type": "SearchAction",
|
|
153
|
-
target: `${
|
|
154
|
+
target: `${n.siteUrl}/search?q={search_term_string}`,
|
|
154
155
|
"query-input": "required name=search_term_string"
|
|
155
156
|
}
|
|
156
157
|
}
|
|
@@ -158,9 +159,9 @@ function W(t) {
|
|
|
158
159
|
}
|
|
159
160
|
export {
|
|
160
161
|
C as buildArticleSeo,
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
162
|
+
q as buildHomeSeo,
|
|
163
|
+
W as buildListPageSeo,
|
|
164
|
+
x as localizedHref,
|
|
164
165
|
d as pageUrl,
|
|
165
|
-
|
|
166
|
+
G as stripLocalePrefix
|
|
166
167
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e = { articles: "Články", topics: "Témata", search: "Hledání", knowledgeBase: "Znalostní báze", account: "Účet" }, o = { title: "Znalostní báze", subtitle: "Objevte odborné články, výzkumné poznámky a průvodce", searchPlaceholder: "Hledat články...", featured: "Doporučené", recentArticles: "Nejnovější články", viewAll: "Zobrazit vše", noArticles: "Zatím žádné články", checkBackSoon: "Brzy přidáme nový obsah.", loadError: "Nepodařilo se načíst články. Zkuste to prosím znovu." }, t = { title: "Články", browseCollection: "Procházejte naši sbírku {count} článků", filterByTopic: "Filtrovat podle tématu", allArticles: "Všechny články", noArticlesFound: "Žádné články nenalezeny", tryDifferentTopic: "Zkuste vybrat jiné téma nebo se vraťte později.", loadError: "Nepodařilo se načíst články. Zkuste to prosím znovu.", previous: "Předchozí", next: "Další", pageOf: "Stránka {page} z {total}", backToArticles: "Zpět na články", backToAllArticles: "Zpět na všechny články", allArticlesLink: "Všechny články", notFound: "Článek nenalezen", notFoundDescription: "Článek, který hledáte, neexistuje nebo byl odstraněn.", browseAllArticles: "Procházet všechny články", loadErrorTitle: "Nepodařilo se načíst článek", loadErrorDescription: "Článek nebyl nalezen nebo došlo k chybě při načítání.", translationNotAvailable: "Překlad není k dispozici – zobrazuje se původní obsah", share: "Sdílet:", copyLink: "Zkopírovat odkaz" }, n = { title: "Hledání", pageTitle: "Hledání | Znalostní báze", placeholder: "Hledat články...", matchBroad: "Volné", matchBroadDesc: "Více výsledků", matchBalanced: "Vyvážené", matchBalancedDesc: "Doporučeno", matchStrict: "Přesné", matchStrictDesc: "Přesné shody", foundResults: "Nalezen {count} výsledek | Nalezeny {count} výsledky | Nalezeno {count} výsledků", match: "shoda", noResults: "Žádné výsledky", tryDifferentKeywords: "Zkuste jiná klíčová slova nebo procházejte naše", articlesLink: "články", startSearching: "Začněte hledat", enterQuery: "Zadejte dotaz pro vyhledávání ve znalostní bázi", searchError: "Vyhledávání se nezdařilo. Zkuste to prosím znovu." }, a = { title: "Témata", subtitle: "Prozkoumejte obsah podle tématu", tags: "Štítky", browseByTopic: "Procházet články podle tématu", noTags: "Zatím žádné štítky.", allTopics: "Všechna témata", topicNotFound: "Téma nenalezeno", topicNotFoundDescription: 'Téma "{slug}" neexistuje.', articleCount: "{count} článek | {count} články | {count} článků", noArticlesYet: "Zatím žádné články", checkBackSoon: "Brzy přidáme články o {name}.", browseAllArticles: "Procházet všechny články", backToAllTopics: "Zpět na všechna témata" }, l = { signIn: "Přihlásit se", signInTitle: "Přihlášení", signInSubtitle: "Přistupte ke svému účtu a prémiovému obsahu", email: "E-mail", emailPlaceholder: "vas{'@'}email.cz", password: "Heslo", passwordPlaceholder: "Zadejte heslo", forgotPassword: "Zapomenuté heslo?", noAccount: "Nemáte účet?", createAccount: "Vytvořit účet", orContinueWith: "Nebo pokračujte přes", signOut: "Odhlásit se", register: "Registrace", registerTitle: "Vytvořit účet", registerSubtitle: "Zaregistrujte se pro přístup k prémiovému obsahu", displayName: "Jméno", displayNamePlaceholder: "Vaše jméno", confirmPassword: "Potvrzení hesla", confirmPasswordPlaceholder: "Zadejte heslo znovu", haveAccount: "Již máte účet?", goToSignIn: "Přihlásit se", checkEmail: "Zkontrolujte svůj e-mail", verificationSent: "Odeslali jsme ověřovací odkaz na {email}. Klikněte na odkaz v e-mailu pro dokončení registrace.", forgotPasswordTitle: "Zapomenuté heslo?", forgotPasswordSubtitle: "Zadejte svůj e-mail a my vám pošleme odkaz pro obnovení hesla.", sendResetLink: "Odeslat odkaz pro obnovení", resetEmailSent: "Zkontrolujte svůj e-mail", resetEmailSentDescription: "Pokud účet s adresou {email} existuje, odeslali jsme odkaz pro obnovení hesla.", backToSignIn: "Zpět na přihlášení", resetPasswordTitle: "Obnovení hesla", resetPasswordSubtitle: "Zadejte nové heslo pro svůj účet.", newPassword: "Nové heslo", newPasswordPlaceholder: "Zadejte nové heslo", confirmNewPassword: "Potvrzení nového hesla", confirmNewPasswordPlaceholder: "Zadejte nové heslo znovu", resetPassword: "Obnovit heslo", passwordResetSuccess: "Heslo obnoveno!", passwordResetSuccessDescription: "Vaše heslo bylo úspěšně obnoveno. Nyní se můžete přihlásit.", invalidResetLink: "Neplatný odkaz", invalidResetLinkDescription: "Tento odkaz pro obnovení hesla je neplatný nebo vypršel.", requestNewLink: "Požádat o nový odkaz", verifyEmailTitle: "Ověření e-mailu", verifying: "Ověřujeme váš e-mail...", emailVerified: "E-mail ověřen!", emailVerifiedDescription: "Váš e-mail byl úspěšně ověřen. Nyní se můžete přihlásit.", verificationFailed: "Ověření se nezdařilo", verificationFailedDescription: "Tento ověřovací odkaz je neplatný nebo vypršel.", validationRequired: "Toto pole je povinné", validationEmail: "Zadejte platnou e-mailovou adresu", validationPasswordMin: "Heslo musí mít alespoň 8 znaků", validationPasswordMatch: "Hesla se neshodují" }, s = { title: "Komentáře", open: "Otevřít komentáře", noComments: "Zatím žádné komentáře", beFirst: "Buďte první, kdo sdílí své myšlenky k tomuto článku.", loginPrompt: "pro přidání komentáře", loginLink: "Přihlásit se", placeholder: "Napište komentář...", cancel: "Zrušit", comment: "Komentovat", reply: "Odpovědět", edit: "Upravit", delete: "Smazat", save: "Uložit", replyingTo: "Odpovídáte na komentář...", replyPlaceholder: "Napište odpověď...", editPlaceholder: "Upravte komentář...", editing: "Úprava komentáře", confirmDelete: "Opravdu chcete smazat tento komentář?", anonymous: "Anonymní", edited: "(upraveno)", original: "Originál ({code}):", justNow: "právě teď", minutesAgo: "před {count} min", hoursAgo: "před {count} h", daysAgo: "před {count} d", charCount: "{count}/{max}", submitHint: "Stiskněte {key}+Enter pro odeslání", loadError: "Nepodařilo se načíst komentáře", submitError: "Nepodařilo se odeslat komentář" }, i = { signInToAccess: "Pro přístup k tomuto obsahu ({level}) se přihlaste.", requiresAccess: "Tento obsah vyžaduje přístup úrovně {level}.", signIn: "Přihlásit se", upgradeToPremium: "Upgradovat na Premium", browseFreeArticles: "Procházet volné články", levelPublic: "Veřejné", levelPremium: "Premium", levelPartners: "Partneři", levelInternal: "Interní", lockedFor: "Jen pro čtenáře úrovně {level}" }, r = { copyright: "© {year} Znalostní báze. Všechna práva vyhrazena." },
|
|
1
|
+
const e = { articles: "Články", topics: "Témata", search: "Hledání", knowledgeBase: "Znalostní báze", account: "Účet" }, o = { title: "Znalostní báze", subtitle: "Objevte odborné články, výzkumné poznámky a průvodce", searchPlaceholder: "Hledat články...", featured: "Doporučené", recentArticles: "Nejnovější články", viewAll: "Zobrazit vše", noArticles: "Zatím žádné články", checkBackSoon: "Brzy přidáme nový obsah.", loadError: "Nepodařilo se načíst články. Zkuste to prosím znovu." }, t = { title: "Články", browseCollection: "Procházejte naši sbírku {count} článků", filterByTopic: "Filtrovat podle tématu", allArticles: "Všechny články", noArticlesFound: "Žádné články nenalezeny", tryDifferentTopic: "Zkuste vybrat jiné téma nebo se vraťte později.", loadError: "Nepodařilo se načíst články. Zkuste to prosím znovu.", previous: "Předchozí", next: "Další", pageOf: "Stránka {page} z {total}", backToArticles: "Zpět na články", backToAllArticles: "Zpět na všechny články", allArticlesLink: "Všechny články", notFound: "Článek nenalezen", notFoundDescription: "Článek, který hledáte, neexistuje nebo byl odstraněn.", browseAllArticles: "Procházet všechny články", loadErrorTitle: "Nepodařilo se načíst článek", loadErrorDescription: "Článek nebyl nalezen nebo došlo k chybě při načítání.", translationNotAvailable: "Překlad není k dispozici – zobrazuje se původní obsah", share: "Sdílet:", copyLink: "Zkopírovat odkaz" }, n = { title: "Hledání", pageTitle: "Hledání | Znalostní báze", placeholder: "Hledat články...", matchBroad: "Volné", matchBroadDesc: "Více výsledků", matchBalanced: "Vyvážené", matchBalancedDesc: "Doporučeno", matchStrict: "Přesné", matchStrictDesc: "Přesné shody", foundResults: "Nalezen {count} výsledek | Nalezeny {count} výsledky | Nalezeno {count} výsledků", match: "shoda", noResults: "Žádné výsledky", tryDifferentKeywords: "Zkuste jiná klíčová slova nebo procházejte naše", articlesLink: "články", startSearching: "Začněte hledat", enterQuery: "Zadejte dotaz pro vyhledávání ve znalostní bázi", searchError: "Vyhledávání se nezdařilo. Zkuste to prosím znovu." }, a = { title: "Témata", subtitle: "Prozkoumejte obsah podle tématu", tags: "Štítky", browseByTopic: "Procházet články podle tématu", noTags: "Zatím žádné štítky.", allTopics: "Všechna témata", topicNotFound: "Téma nenalezeno", topicNotFoundDescription: 'Téma "{slug}" neexistuje.', articleCount: "{count} článek | {count} články | {count} článků", noArticlesYet: "Zatím žádné články", checkBackSoon: "Brzy přidáme články o {name}.", browseAllArticles: "Procházet všechny články", backToAllTopics: "Zpět na všechna témata" }, l = { signIn: "Přihlásit se", signInTitle: "Přihlášení", signInSubtitle: "Přistupte ke svému účtu a prémiovému obsahu", email: "E-mail", emailPlaceholder: "vas{'@'}email.cz", password: "Heslo", passwordPlaceholder: "Zadejte heslo", forgotPassword: "Zapomenuté heslo?", noAccount: "Nemáte účet?", createAccount: "Vytvořit účet", orContinueWith: "Nebo pokračujte přes", signOut: "Odhlásit se", register: "Registrace", registerTitle: "Vytvořit účet", registerSubtitle: "Zaregistrujte se pro přístup k prémiovému obsahu", displayName: "Jméno", displayNamePlaceholder: "Vaše jméno", confirmPassword: "Potvrzení hesla", confirmPasswordPlaceholder: "Zadejte heslo znovu", haveAccount: "Již máte účet?", goToSignIn: "Přihlásit se", checkEmail: "Zkontrolujte svůj e-mail", verificationSent: "Odeslali jsme ověřovací odkaz na {email}. Klikněte na odkaz v e-mailu pro dokončení registrace.", forgotPasswordTitle: "Zapomenuté heslo?", forgotPasswordSubtitle: "Zadejte svůj e-mail a my vám pošleme odkaz pro obnovení hesla.", sendResetLink: "Odeslat odkaz pro obnovení", resetEmailSent: "Zkontrolujte svůj e-mail", resetEmailSentDescription: "Pokud účet s adresou {email} existuje, odeslali jsme odkaz pro obnovení hesla.", backToSignIn: "Zpět na přihlášení", resetPasswordTitle: "Obnovení hesla", resetPasswordSubtitle: "Zadejte nové heslo pro svůj účet.", newPassword: "Nové heslo", newPasswordPlaceholder: "Zadejte nové heslo", confirmNewPassword: "Potvrzení nového hesla", confirmNewPasswordPlaceholder: "Zadejte nové heslo znovu", resetPassword: "Obnovit heslo", passwordResetSuccess: "Heslo obnoveno!", passwordResetSuccessDescription: "Vaše heslo bylo úspěšně obnoveno. Nyní se můžete přihlásit.", invalidResetLink: "Neplatný odkaz", invalidResetLinkDescription: "Tento odkaz pro obnovení hesla je neplatný nebo vypršel.", requestNewLink: "Požádat o nový odkaz", verifyEmailTitle: "Ověření e-mailu", verifying: "Ověřujeme váš e-mail...", emailVerified: "E-mail ověřen!", emailVerifiedDescription: "Váš e-mail byl úspěšně ověřen. Nyní se můžete přihlásit.", verificationFailed: "Ověření se nezdařilo", verificationFailedDescription: "Tento ověřovací odkaz je neplatný nebo vypršel.", validationRequired: "Toto pole je povinné", validationEmail: "Zadejte platnou e-mailovou adresu", validationPasswordMin: "Heslo musí mít alespoň 8 znaků", validationPasswordMatch: "Hesla se neshodují" }, s = { title: "Komentáře", open: "Otevřít komentáře", noComments: "Zatím žádné komentáře", beFirst: "Buďte první, kdo sdílí své myšlenky k tomuto článku.", loginPrompt: "pro přidání komentáře", loginLink: "Přihlásit se", placeholder: "Napište komentář...", cancel: "Zrušit", comment: "Komentovat", reply: "Odpovědět", edit: "Upravit", delete: "Smazat", save: "Uložit", replyingTo: "Odpovídáte na komentář...", replyPlaceholder: "Napište odpověď...", editPlaceholder: "Upravte komentář...", editing: "Úprava komentáře", confirmDelete: "Opravdu chcete smazat tento komentář?", anonymous: "Anonymní", edited: "(upraveno)", original: "Originál ({code}):", justNow: "právě teď", minutesAgo: "před {count} min", hoursAgo: "před {count} h", daysAgo: "před {count} d", charCount: "{count}/{max}", submitHint: "Stiskněte {key}+Enter pro odeslání", loadError: "Nepodařilo se načíst komentáře", submitError: "Nepodařilo se odeslat komentář", frozen: "Komentáře se právě přesouvají do nové diskuse. Psát půjde za chvíli.", moved: "Komentáře se přesunuly do nové diskuse. Obnovte prosím stránku." }, i = { signInToAccess: "Pro přístup k tomuto obsahu ({level}) se přihlaste.", requiresAccess: "Tento obsah vyžaduje přístup úrovně {level}.", signIn: "Přihlásit se", upgradeToPremium: "Upgradovat na Premium", browseFreeArticles: "Procházet volné články", levelPublic: "Veřejné", levelPremium: "Premium", levelPartners: "Partneři", levelInternal: "Interní", lockedFor: "Jen pro čtenáře úrovně {level}" }, r = { copyright: "© {year} Znalostní báze. Všechna práva vyhrazena." }, d = { loading: "Načítání...", error: "Chyba", retry: "Zkusit znovu", close: "Zavřít", switchToLight: "Přepnout na světlý režim", switchToDark: "Přepnout na tmavý režim", languageSelector: "Aktuální jazyk: {name}. Klikněte pro změnu.", skipToContent: "Přeskočit na hlavní obsah" }, c = { pageTitle: "Účet", pageSubtitle: "Spravujte své jméno, heslo a oznámení.", profileTitle: "Profil", profileSubtitle: "Vaše jméno a e-mail.", name: "Jméno", namePlaceholder: "Vaše jméno", email: "E-mail", emailPlaceholder: "vy{'@'}priklad.cz", emailUnverified: "E-mail zatím není ověřený.", resendVerification: "Znovu odeslat ověřovací e-mail", verificationSent: "Ověřovací e-mail byl odeslán — zkontrolujte si schránku.", saveProfile: "Uložit profil", profileSaved: "Profil byl aktualizován.", emailChangeNotice: "Poslali jsme ověřovací odkaz na novou adresu. Než se příště přihlásíte, musíte si e-mail ověřit.", passwordTitle: "Heslo", passwordSubtitle: "Změňte si heslo k účtu.", currentPassword: "Současné heslo", newPassword: "Nové heslo", confirmNewPassword: "Potvrzení nového hesla", passwordsDoNotMatch: "Nová hesla se neshodují.", changePassword: "Změnit heslo", passwordChanged: "Heslo bylo aktualizováno.", passwordOauthOnly: "Váš účet používá přihlášení přes sociální síť. Heslo spravuje váš poskytovatel.", notificationsTitle: "Oznámení", notificationsSubtitle: "Rozhodněte, kdy vám máme posílat reporty a e-maily.", autoReportErrors: "Automaticky hlásit chyby, které narazím", autoReportContent: "Automaticky hlásit chybějící nebo nesprávný obsah", policyAlways: "Vždy", policyAsk: "Nejprve se zeptej", policyNever: "Nikdy", emailNotifications: "E-mailová oznámení", emailFrequencyInstant: "Posílat hned", emailFrequencyDailyDigest: "Denní souhrn", emailFrequencyNever: "Žádné e-maily", saveSettings: "Uložit předvolby", settingsSaved: "Předvolby byly uloženy.", advancedFooter: "Hledáte API klíče, MCP přístup nebo agentní klienty? Spravujte je v", advancedFooterLinkLabel: "developer portálu" }, v = {
|
|
2
2
|
nav: e,
|
|
3
3
|
home: o,
|
|
4
4
|
articles: t,
|
|
@@ -8,17 +8,17 @@ const e = { articles: "Články", topics: "Témata", search: "Hledání", knowle
|
|
|
8
8
|
comments: s,
|
|
9
9
|
accessGate: i,
|
|
10
10
|
footer: r,
|
|
11
|
-
common:
|
|
12
|
-
account:
|
|
11
|
+
common: d,
|
|
12
|
+
account: c
|
|
13
13
|
};
|
|
14
14
|
export {
|
|
15
15
|
i as accessGate,
|
|
16
|
-
|
|
16
|
+
c as account,
|
|
17
17
|
t as articles,
|
|
18
18
|
l as auth,
|
|
19
19
|
s as comments,
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
d as common,
|
|
21
|
+
v as default,
|
|
22
22
|
r as footer,
|
|
23
23
|
o as home,
|
|
24
24
|
e as nav,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e = { articles: "Articles", topics: "Topics", search: "Search", knowledgeBase: "Knowledge Base", account: "Account" }, o = { title: "Knowledge Base", subtitle: "Discover in-depth articles, research notes, and expert guides", searchPlaceholder: "Search articles...", featured: "Featured", recentArticles: "Recent Articles", viewAll: "View all", noArticles: "No articles yet", checkBackSoon: "Check back soon for new content.", loadError: "Failed to load articles. Please try again." }, t = { title: "Articles", browseCollection: "Browse our collection of {count} articles", filterByTopic: "Filter by topic", allArticles: "All articles", noArticlesFound: "No articles found", tryDifferentTopic: "Try selecting a different topic or check back later.", loadError: "Failed to load articles. Please try again.", previous: "Previous", next: "Next", pageOf: "Page {page} of {total}", backToArticles: "Back to articles", backToAllArticles: "Back to all articles", allArticlesLink: "All articles", notFound: "Article not found", notFoundDescription: "The article you're looking for doesn't exist or has been removed.", browseAllArticles: "Browse all articles", loadErrorTitle: "Failed to load article", loadErrorDescription: "The article could not be found or there was an error loading it.", translationNotAvailable: "Translation not available - showing original content", share: "Share:", copyLink: "Copy link" }, i = { title: "Search", pageTitle: "Search | Knowledge Base", placeholder: "Search articles...", matchBroad: "Broad", matchBroadDesc: "More results", matchBalanced: "Balanced", matchBalancedDesc: "Recommended", matchStrict: "Strict", matchStrictDesc: "Precise matches", foundResults: "Found {count} result | Found {count} results", match: "match", noResults: "No results found", tryDifferentKeywords: "Try different keywords or browse our", articlesLink: "articles", startSearching: "Start searching", enterQuery: "Enter a query to search our knowledge base", searchError: "Search failed. Please try again." }, a = { title: "Topics", subtitle: "Explore content by topic", tags: "Tags", browseByTopic: "Browse articles by topic", noTags: "No tags available yet.", allTopics: "All topics", topicNotFound: "Topic not found", topicNotFoundDescription: `The topic "{slug}" doesn't exist.`, articleCount: "{count} article | {count} articles", noArticlesYet: "No articles yet", checkBackSoon: "Check back soon for articles about {name}.", browseAllArticles: "Browse all articles", backToAllTopics: "Back to all topics" }, r = { signIn: "Sign in", signInTitle: "Sign in", signInSubtitle: "Access your account and premium content", email: "Email", emailPlaceholder: "you{'@'}example.com", password: "Password", passwordPlaceholder: "Enter your password", forgotPassword: "Forgot password?", noAccount: "Don't have an account?", createAccount: "Create an account", orContinueWith: "Or continue with", signOut: "Sign out", register: "Sign up", registerTitle: "Create an account", registerSubtitle: "Sign up to access premium content", displayName: "Display name", displayNamePlaceholder: "Your name", confirmPassword: "Confirm password", confirmPasswordPlaceholder: "Enter your password again", haveAccount: "Already have an account?", goToSignIn: "Sign in", checkEmail: "Check your email", verificationSent: "We've sent a verification link to {email}. Click the link in the email to complete your registration.", forgotPasswordTitle: "Forgot password?", forgotPasswordSubtitle: "Enter your email and we'll send you a reset link.", sendResetLink: "Send reset link", resetEmailSent: "Check your email", resetEmailSentDescription: "If an account with {email} exists, we've sent a password reset link.", backToSignIn: "Back to sign in", resetPasswordTitle: "Reset password", resetPasswordSubtitle: "Enter a new password for your account.", newPassword: "New password", newPasswordPlaceholder: "Enter new password", confirmNewPassword: "Confirm new password", confirmNewPasswordPlaceholder: "Enter new password again", resetPassword: "Reset password", passwordResetSuccess: "Password reset!", passwordResetSuccessDescription: "Your password has been successfully reset. You can now sign in.", invalidResetLink: "Invalid link", invalidResetLinkDescription: "This password reset link is invalid or has expired.", requestNewLink: "Request a new link", verifyEmailTitle: "Verify Email", verifying: "Verifying your email...", emailVerified: "Email verified!", emailVerifiedDescription: "Your email has been successfully verified. You can now sign in.", verificationFailed: "Verification failed", verificationFailedDescription: "This verification link is invalid or has expired.", validationRequired: "This field is required", validationEmail: "Please enter a valid email address", validationPasswordMin: "Password must be at least 8 characters", validationPasswordMatch: "Passwords do not match" }, s = { title: "Comments", open: "Open comments", noComments: "No comments yet", beFirst: "Be the first to share your thoughts on this article.", loginPrompt: "to leave a comment", loginLink: "Log in", placeholder: "Write a comment...", cancel: "Cancel", comment: "Comment", reply: "Reply", edit: "Edit", delete: "Delete", save: "Save", replyingTo: "Replying to comment...", replyPlaceholder: "Write a reply...", editPlaceholder: "Edit your comment...", editing: "Editing comment", confirmDelete: "Are you sure you want to delete this comment?", anonymous: "Anonymous", edited: "(edited)", original: "Original ({code}):", justNow: "just now", minutesAgo: "{count}m ago", hoursAgo: "{count}h ago", daysAgo: "{count}d ago", charCount: "{count}/{max}", submitHint: "Press {key}+Enter to submit", loadError: "Failed to load comments", submitError: "Failed to submit comment" }, n = { signInToAccess: "Sign in to access this {level} content.", requiresAccess: "This content requires {level} access.", signIn: "Sign in", upgradeToPremium: "Upgrade to Premium", browseFreeArticles: "Browse free articles", levelPublic: "Public", levelPremium: "Premium", levelPartners: "Partners", levelInternal: "Internal", lockedFor: "Only for {level} readers" }, l = { copyright: "© {year} Knowledge Base. All rights reserved." }, c = { loading: "Loading...", error: "Error", retry: "Try again", close: "Close", switchToLight: "Switch to light mode", switchToDark: "Switch to dark mode", languageSelector: "Current language: {name}. Click to change.", skipToContent: "Skip to main content" }, d = { pageTitle: "Account", pageSubtitle: "Manage your profile, password and notification preferences.", profileTitle: "Profile", profileSubtitle: "Your name and email.", name: "Name", namePlaceholder: "Your name", email: "Email", emailPlaceholder: "you{'@'}example.com", emailUnverified: "Email is not verified yet.", resendVerification: "Resend verification email", verificationSent: "Verification email sent — please check your inbox.", saveProfile: "Save profile", profileSaved: "Profile updated.", emailChangeNotice: "We've sent a verification link to your new email. You'll need to verify it before signing in next time.", passwordTitle: "Password", passwordSubtitle: "Change your account password.", currentPassword: "Current password", newPassword: "New password", confirmNewPassword: "Confirm new password", passwordsDoNotMatch: "New passwords don't match.", changePassword: "Change password", passwordChanged: "Password updated.", passwordOauthOnly: "Your account uses social sign-in. Password change is managed by your provider.", notificationsTitle: "Notifications", notificationsSubtitle: "Decide when we should send you reports and emails.", autoReportErrors: "Auto-report errors I encounter", autoReportContent: "Auto-report missing or wrong content", policyAlways: "Always", policyAsk: "Ask first", policyNever: "Never", emailNotifications: "Email notifications", emailFrequencyInstant: "Send immediately", emailFrequencyDailyDigest: "Daily digest", emailFrequencyNever: "Don't email me", saveSettings: "Save preferences", settingsSaved: "Preferences updated.", advancedFooter: "Looking for API keys, MCP credentials or agent clients? Manage them in the", advancedFooterLinkLabel: "developer portal" }, u = {
|
|
1
|
+
const e = { articles: "Articles", topics: "Topics", search: "Search", knowledgeBase: "Knowledge Base", account: "Account" }, o = { title: "Knowledge Base", subtitle: "Discover in-depth articles, research notes, and expert guides", searchPlaceholder: "Search articles...", featured: "Featured", recentArticles: "Recent Articles", viewAll: "View all", noArticles: "No articles yet", checkBackSoon: "Check back soon for new content.", loadError: "Failed to load articles. Please try again." }, t = { title: "Articles", browseCollection: "Browse our collection of {count} articles", filterByTopic: "Filter by topic", allArticles: "All articles", noArticlesFound: "No articles found", tryDifferentTopic: "Try selecting a different topic or check back later.", loadError: "Failed to load articles. Please try again.", previous: "Previous", next: "Next", pageOf: "Page {page} of {total}", backToArticles: "Back to articles", backToAllArticles: "Back to all articles", allArticlesLink: "All articles", notFound: "Article not found", notFoundDescription: "The article you're looking for doesn't exist or has been removed.", browseAllArticles: "Browse all articles", loadErrorTitle: "Failed to load article", loadErrorDescription: "The article could not be found or there was an error loading it.", translationNotAvailable: "Translation not available - showing original content", share: "Share:", copyLink: "Copy link" }, i = { title: "Search", pageTitle: "Search | Knowledge Base", placeholder: "Search articles...", matchBroad: "Broad", matchBroadDesc: "More results", matchBalanced: "Balanced", matchBalancedDesc: "Recommended", matchStrict: "Strict", matchStrictDesc: "Precise matches", foundResults: "Found {count} result | Found {count} results", match: "match", noResults: "No results found", tryDifferentKeywords: "Try different keywords or browse our", articlesLink: "articles", startSearching: "Start searching", enterQuery: "Enter a query to search our knowledge base", searchError: "Search failed. Please try again." }, a = { title: "Topics", subtitle: "Explore content by topic", tags: "Tags", browseByTopic: "Browse articles by topic", noTags: "No tags available yet.", allTopics: "All topics", topicNotFound: "Topic not found", topicNotFoundDescription: `The topic "{slug}" doesn't exist.`, articleCount: "{count} article | {count} articles", noArticlesYet: "No articles yet", checkBackSoon: "Check back soon for articles about {name}.", browseAllArticles: "Browse all articles", backToAllTopics: "Back to all topics" }, r = { signIn: "Sign in", signInTitle: "Sign in", signInSubtitle: "Access your account and premium content", email: "Email", emailPlaceholder: "you{'@'}example.com", password: "Password", passwordPlaceholder: "Enter your password", forgotPassword: "Forgot password?", noAccount: "Don't have an account?", createAccount: "Create an account", orContinueWith: "Or continue with", signOut: "Sign out", register: "Sign up", registerTitle: "Create an account", registerSubtitle: "Sign up to access premium content", displayName: "Display name", displayNamePlaceholder: "Your name", confirmPassword: "Confirm password", confirmPasswordPlaceholder: "Enter your password again", haveAccount: "Already have an account?", goToSignIn: "Sign in", checkEmail: "Check your email", verificationSent: "We've sent a verification link to {email}. Click the link in the email to complete your registration.", forgotPasswordTitle: "Forgot password?", forgotPasswordSubtitle: "Enter your email and we'll send you a reset link.", sendResetLink: "Send reset link", resetEmailSent: "Check your email", resetEmailSentDescription: "If an account with {email} exists, we've sent a password reset link.", backToSignIn: "Back to sign in", resetPasswordTitle: "Reset password", resetPasswordSubtitle: "Enter a new password for your account.", newPassword: "New password", newPasswordPlaceholder: "Enter new password", confirmNewPassword: "Confirm new password", confirmNewPasswordPlaceholder: "Enter new password again", resetPassword: "Reset password", passwordResetSuccess: "Password reset!", passwordResetSuccessDescription: "Your password has been successfully reset. You can now sign in.", invalidResetLink: "Invalid link", invalidResetLinkDescription: "This password reset link is invalid or has expired.", requestNewLink: "Request a new link", verifyEmailTitle: "Verify Email", verifying: "Verifying your email...", emailVerified: "Email verified!", emailVerifiedDescription: "Your email has been successfully verified. You can now sign in.", verificationFailed: "Verification failed", verificationFailedDescription: "This verification link is invalid or has expired.", validationRequired: "This field is required", validationEmail: "Please enter a valid email address", validationPasswordMin: "Password must be at least 8 characters", validationPasswordMatch: "Passwords do not match" }, s = { title: "Comments", open: "Open comments", noComments: "No comments yet", beFirst: "Be the first to share your thoughts on this article.", loginPrompt: "to leave a comment", loginLink: "Log in", placeholder: "Write a comment...", cancel: "Cancel", comment: "Comment", reply: "Reply", edit: "Edit", delete: "Delete", save: "Save", replyingTo: "Replying to comment...", replyPlaceholder: "Write a reply...", editPlaceholder: "Edit your comment...", editing: "Editing comment", confirmDelete: "Are you sure you want to delete this comment?", anonymous: "Anonymous", edited: "(edited)", original: "Original ({code}):", justNow: "just now", minutesAgo: "{count}m ago", hoursAgo: "{count}h ago", daysAgo: "{count}d ago", charCount: "{count}/{max}", submitHint: "Press {key}+Enter to submit", loadError: "Failed to load comments", submitError: "Failed to submit comment", frozen: "Comments are moving to the new discussion right now. You can write again shortly.", moved: "Comments have moved to the new discussion. Please reload the page." }, n = { signInToAccess: "Sign in to access this {level} content.", requiresAccess: "This content requires {level} access.", signIn: "Sign in", upgradeToPremium: "Upgrade to Premium", browseFreeArticles: "Browse free articles", levelPublic: "Public", levelPremium: "Premium", levelPartners: "Partners", levelInternal: "Internal", lockedFor: "Only for {level} readers" }, l = { copyright: "© {year} Knowledge Base. All rights reserved." }, c = { loading: "Loading...", error: "Error", retry: "Try again", close: "Close", switchToLight: "Switch to light mode", switchToDark: "Switch to dark mode", languageSelector: "Current language: {name}. Click to change.", skipToContent: "Skip to main content" }, d = { pageTitle: "Account", pageSubtitle: "Manage your profile, password and notification preferences.", profileTitle: "Profile", profileSubtitle: "Your name and email.", name: "Name", namePlaceholder: "Your name", email: "Email", emailPlaceholder: "you{'@'}example.com", emailUnverified: "Email is not verified yet.", resendVerification: "Resend verification email", verificationSent: "Verification email sent — please check your inbox.", saveProfile: "Save profile", profileSaved: "Profile updated.", emailChangeNotice: "We've sent a verification link to your new email. You'll need to verify it before signing in next time.", passwordTitle: "Password", passwordSubtitle: "Change your account password.", currentPassword: "Current password", newPassword: "New password", confirmNewPassword: "Confirm new password", passwordsDoNotMatch: "New passwords don't match.", changePassword: "Change password", passwordChanged: "Password updated.", passwordOauthOnly: "Your account uses social sign-in. Password change is managed by your provider.", notificationsTitle: "Notifications", notificationsSubtitle: "Decide when we should send you reports and emails.", autoReportErrors: "Auto-report errors I encounter", autoReportContent: "Auto-report missing or wrong content", policyAlways: "Always", policyAsk: "Ask first", policyNever: "Never", emailNotifications: "Email notifications", emailFrequencyInstant: "Send immediately", emailFrequencyDailyDigest: "Daily digest", emailFrequencyNever: "Don't email me", saveSettings: "Save preferences", settingsSaved: "Preferences updated.", advancedFooter: "Looking for API keys, MCP credentials or agent clients? Manage them in the", advancedFooterLinkLabel: "developer portal" }, u = {
|
|
2
2
|
nav: e,
|
|
3
3
|
home: o,
|
|
4
4
|
articles: t,
|
package/dist/core/types.d.ts
CHANGED
|
@@ -47,6 +47,16 @@ export interface Article {
|
|
|
47
47
|
* article page, which shows `articles.getPreview` instead of the article.
|
|
48
48
|
*/
|
|
49
49
|
locked?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Only from `articles.list({ languageCode })`: the language of `title` and `description` —
|
|
52
|
+
* the requested one, or the source language for a fallback.
|
|
53
|
+
*/
|
|
54
|
+
languageCode?: string | null;
|
|
55
|
+
/**
|
|
56
|
+
* Only from `articles.list({ languageCode, includeUntranslated: true })`: no translation into
|
|
57
|
+
* the requested language, so `title` and `description` are the source language's.
|
|
58
|
+
*/
|
|
59
|
+
isFallback?: boolean;
|
|
50
60
|
}
|
|
51
61
|
/** What a locked article shows to a reader without access (the tenant's choice). */
|
|
52
62
|
export type LockedPreviewMode = 'title' | 'excerpt';
|
|
@@ -524,11 +534,23 @@ export interface ConsultationEraseInput {
|
|
|
524
534
|
export interface ConsultationEraseResult {
|
|
525
535
|
requestId: string;
|
|
526
536
|
dryRun: boolean;
|
|
527
|
-
/**
|
|
537
|
+
/**
|
|
538
|
+
* `partial` when a thread under legal hold was kept (and marked for deletion once released),
|
|
539
|
+
* or — on instances with M1 — a community message under legal hold was kept whole.
|
|
540
|
+
*/
|
|
528
541
|
status: 'done' | 'partial';
|
|
529
542
|
threadsErased: number;
|
|
530
543
|
threadsHeld: number;
|
|
531
544
|
accountsAnonymised: number;
|
|
545
|
+
/**
|
|
546
|
+
* The person's community member (m1-contracts.md §8.2): members erased, messages tombstoned,
|
|
547
|
+
* messages kept by a legal hold; a dry run counts the same way. Present on instances with M1.
|
|
548
|
+
*/
|
|
549
|
+
community?: {
|
|
550
|
+
membersErased: number;
|
|
551
|
+
messagesTombstoned: number;
|
|
552
|
+
messagesHeld: number;
|
|
553
|
+
};
|
|
532
554
|
}
|
|
533
555
|
export interface ConsultationOwnerRefsInput {
|
|
534
556
|
/** Narrow the scan; must lie under the key's prefix. */
|
|
@@ -53,6 +53,13 @@ export interface ArticleListItemVM {
|
|
|
53
53
|
locked: boolean;
|
|
54
54
|
/** For a locked article, the tier that opens it; null otherwise. */
|
|
55
55
|
requiredAccess: 'premium' | 'partners' | null;
|
|
56
|
+
/** Language of `title` / `description` (from a localized list), or null when unknown. */
|
|
57
|
+
languageCode: string | null;
|
|
58
|
+
/**
|
|
59
|
+
* The list was asked for another language and the article has no translation into it
|
|
60
|
+
* (only with `includeUntranslated`): the card should say the article is in `languageCode`.
|
|
61
|
+
*/
|
|
62
|
+
isFallback: boolean;
|
|
56
63
|
}
|
|
57
64
|
export interface BuildArticleListItemOptions {
|
|
58
65
|
article: Article;
|
package/dist/core/view-model.js
CHANGED
|
@@ -1,53 +1,57 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { inlineMarkdownToPlainText as d } from "@blogmcp/mdx-schema/title";
|
|
2
|
+
import { ACCESS_LEVEL_ORDER as u } from "./types.js";
|
|
2
3
|
import { localizedHref as c } from "./seo.js";
|
|
3
|
-
function
|
|
4
|
+
function s(t) {
|
|
4
5
|
if (!t) return null;
|
|
5
6
|
const e = new Date(t);
|
|
6
7
|
return Number.isNaN(e.getTime()) ? t : e.toISOString();
|
|
7
8
|
}
|
|
8
|
-
function
|
|
9
|
-
const
|
|
10
|
-
return new Date(t).toLocaleDateString(
|
|
9
|
+
function f(t, e) {
|
|
10
|
+
const n = e === "cs" ? "cs-CZ" : "en-US";
|
|
11
|
+
return new Date(t).toLocaleDateString(n, {
|
|
11
12
|
year: "numeric",
|
|
12
13
|
month: "long",
|
|
13
14
|
day: "numeric"
|
|
14
15
|
});
|
|
15
16
|
}
|
|
16
|
-
function
|
|
17
|
+
function A(t) {
|
|
17
18
|
if (!t || t.length === 0) return "public";
|
|
18
19
|
let e = 0;
|
|
19
|
-
for (const
|
|
20
|
-
const
|
|
21
|
-
|
|
20
|
+
for (const n of t) {
|
|
21
|
+
const r = u.indexOf(n);
|
|
22
|
+
r > e && (e = r);
|
|
22
23
|
}
|
|
23
|
-
return
|
|
24
|
+
return u[e] ?? "public";
|
|
24
25
|
}
|
|
25
|
-
function
|
|
26
|
+
function m(t) {
|
|
26
27
|
return !t || t.includes("public") ? null : t.includes("premium") ? "premium" : t.includes("partners") ? "partners" : null;
|
|
27
28
|
}
|
|
28
|
-
function
|
|
29
|
-
const { article: e, config:
|
|
29
|
+
function D(t) {
|
|
30
|
+
const { article: e, config: n, locale: r } = t, o = e.slug || e.filename.replace(/\.(md|mdx)$/, ""), l = e.publishedAt || e.updatedAt || null, a = s(l);
|
|
30
31
|
return {
|
|
31
|
-
slug:
|
|
32
|
-
href: c(`/articles/${
|
|
33
|
-
title:
|
|
32
|
+
slug: o,
|
|
33
|
+
href: c(`/articles/${o}`, r, n),
|
|
34
|
+
// Cards print the title as text: plain text, never the stored Markdown.
|
|
35
|
+
title: d(e.title),
|
|
34
36
|
description: e.description ?? null,
|
|
35
37
|
image: e.featuredImageUrl ?? null,
|
|
36
|
-
isoDate:
|
|
37
|
-
formattedDate: l ?
|
|
38
|
+
isoDate: a,
|
|
39
|
+
formattedDate: l ? f(l, r) : null,
|
|
38
40
|
tags: (e.tags || []).map((i) => ({
|
|
39
41
|
label: i,
|
|
40
42
|
slug: i,
|
|
41
|
-
href: c(`/topics/${i}`,
|
|
43
|
+
href: c(`/topics/${i}`, r, n)
|
|
42
44
|
})),
|
|
43
45
|
locked: e.locked === !0,
|
|
44
|
-
requiredAccess: e.locked === !0 ?
|
|
46
|
+
requiredAccess: e.locked === !0 ? m(e.access) : null,
|
|
47
|
+
languageCode: e.languageCode ?? null,
|
|
48
|
+
isFallback: e.isFallback === !0
|
|
45
49
|
};
|
|
46
50
|
}
|
|
47
51
|
export {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
D as buildArticleListItem,
|
|
53
|
+
f as formatArticleDate,
|
|
54
|
+
m as lockedRequiredAccess,
|
|
55
|
+
A as resolveArticleAccessLevel,
|
|
56
|
+
s as toIsoDate
|
|
53
57
|
};
|