@blogmcp/sdk 0.6.1 → 0.7.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.
Files changed (137) hide show
  1. package/dist/consultations/channel-text.d.ts +118 -0
  2. package/dist/consultations/channel-text.js +40 -0
  3. package/dist/consultations/index.d.ts +28 -0
  4. package/dist/consultations/index.js +60 -0
  5. package/dist/consultations/messages.cs.d.ts +149 -0
  6. package/dist/consultations/messages.cs.js +143 -0
  7. package/dist/consultations/messages.d.ts +34 -0
  8. package/dist/consultations/messages.en.d.ts +143 -0
  9. package/dist/consultations/messages.en.js +141 -0
  10. package/dist/consultations/messages.js +48 -0
  11. package/dist/consultations/outcome.d.ts +121 -0
  12. package/dist/consultations/outcome.js +161 -0
  13. package/dist/consultations/public-config.d.ts +71 -0
  14. package/dist/consultations/public-config.js +104 -0
  15. package/dist/consultations/reader.d.ts +83 -0
  16. package/dist/consultations/reader.js +128 -0
  17. package/dist/consultations/routes.d.ts +214 -0
  18. package/dist/consultations/routes.js +149 -0
  19. package/dist/consultations/server/client-ip.d.ts +50 -0
  20. package/dist/consultations/server/client-ip.js +44 -0
  21. package/dist/consultations/server/contact.d.ts +23 -0
  22. package/dist/consultations/server/contact.js +138 -0
  23. package/dist/consultations/server/context.d.ts +246 -0
  24. package/dist/consultations/server/context.js +152 -0
  25. package/dist/consultations/server/cookie.d.ts +60 -0
  26. package/dist/consultations/server/cookie.js +57 -0
  27. package/dist/consultations/server/env.d.ts +20 -0
  28. package/dist/consultations/server/env.js +35 -0
  29. package/dist/consultations/server/http.d.ts +59 -0
  30. package/dist/consultations/server/http.js +64 -0
  31. package/dist/consultations/server/index.d.ts +37 -0
  32. package/dist/consultations/server/index.js +19 -0
  33. package/dist/consultations/server/origin.d.ts +39 -0
  34. package/dist/consultations/server/origin.js +31 -0
  35. package/dist/consultations/server/server.d.ts +106 -0
  36. package/dist/consultations/server/server.js +122 -0
  37. package/dist/consultations/server/session.d.ts +38 -0
  38. package/dist/consultations/server/session.js +210 -0
  39. package/dist/consultations/server/transport.d.ts +69 -0
  40. package/dist/consultations/server/transport.js +117 -0
  41. package/dist/consultations/server/turnstile.d.ts +44 -0
  42. package/dist/consultations/server/turnstile.js +31 -0
  43. package/dist/consultations/site.d.ts +100 -0
  44. package/dist/consultations/site.js +60 -0
  45. package/dist/consultations/submit-new.d.ts +103 -0
  46. package/dist/consultations/submit-new.js +72 -0
  47. package/dist/core/auth.d.ts +2 -2
  48. package/dist/core/auth.js +21 -21
  49. package/dist/core/client.d.ts +25 -4
  50. package/dist/core/client.js +35 -30
  51. package/dist/core/consultation-adapter.d.ts +2 -2
  52. package/dist/core/consultations.d.ts +1 -1
  53. package/dist/core/errors.d.ts +1 -1
  54. package/dist/core/errors.js +16 -15
  55. package/dist/core/index.d.ts +31 -31
  56. package/dist/core/index.js +35 -34
  57. package/dist/core/markdown.d.ts +1 -1
  58. package/dist/core/queries.d.ts +4 -1
  59. package/dist/core/queries.js +131 -86
  60. package/dist/core/review/format.d.ts +1 -1
  61. package/dist/core/review/index.d.ts +2 -2
  62. package/dist/core/seo.d.ts +1 -1
  63. package/dist/core/translations/cs.json.js +1 -1
  64. package/dist/core/translations/en.json.js +1 -1
  65. package/dist/core/types.d.ts +50 -1
  66. package/dist/core/view-model.d.ts +12 -2
  67. package/dist/core/view-model.js +40 -34
  68. package/dist/{packages/tripmap-core/node_modules → node_modules}/pmtiles/dist/esm/index.js +1 -1
  69. package/dist/nuxt/composables/useAsyncKb.d.ts +4 -4
  70. package/dist/nuxt/index.d.ts +1 -1
  71. package/dist/packages/tripmap-core/dist/engine.js +3 -3
  72. package/dist/packages/tripmap-core/dist/generated/maplibre-worker.bundle.js +1 -1
  73. package/dist/react/KbMdxContent.d.ts +1 -1
  74. package/dist/react/context.d.ts +4 -4
  75. package/dist/react/hooks/useImageRenderer.d.ts +1 -1
  76. package/dist/react/hooks/useKbClient.d.ts +1 -1
  77. package/dist/react/hooks/useKbContext.d.ts +1 -1
  78. package/dist/react/hooks/useKbI18n.d.ts +1 -1
  79. package/dist/react/hooks/useKbLanguage.d.ts +1 -1
  80. package/dist/react/hooks/useKbSearch.d.ts +1 -1
  81. package/dist/react/hooks/useMdxContent.d.ts +1 -1
  82. package/dist/react/index.d.ts +15 -15
  83. package/dist/react/provider.d.ts +2 -2
  84. package/dist/react/server/index.d.ts +2 -2
  85. package/dist/vue/components/KbAccessGate.vue.d.ts +4 -1
  86. package/dist/vue/components/KbAccessGate.vue.js +42 -32
  87. package/dist/vue/components/KbArticleCard.vue.d.ts +3 -1
  88. package/dist/vue/components/KbArticleCard.vue.js +67 -39
  89. package/dist/vue/composables/useArticles.d.ts +1 -1
  90. package/dist/vue/composables/useImageRenderer.d.ts +1 -1
  91. package/dist/vue/composables/useKbAuth.d.ts +1 -1
  92. package/dist/vue/composables/useKbClient.d.ts +1 -1
  93. package/dist/vue/composables/useKbComments.d.ts +1 -1
  94. package/dist/vue/composables/useKbI18n.d.ts +1 -1
  95. package/dist/vue/composables/useKbLanguage.d.ts +1 -1
  96. package/dist/vue/composables/useNavigation.d.ts +1 -1
  97. package/dist/vue/composables/useSearch.d.ts +1 -1
  98. package/dist/vue/composables/useTags.d.ts +1 -1
  99. package/dist/vue/index.d.ts +19 -19
  100. package/dist/vue/plugin.d.ts +4 -4
  101. package/package.json +15 -5
  102. package/src/consultations/channel-text.ts +168 -0
  103. package/src/consultations/index.ts +87 -0
  104. package/src/consultations/messages.cs.ts +175 -0
  105. package/src/consultations/messages.en.ts +171 -0
  106. package/src/consultations/messages.ts +91 -0
  107. package/src/consultations/outcome.ts +278 -0
  108. package/src/consultations/public-config.ts +246 -0
  109. package/src/consultations/reader.ts +281 -0
  110. package/src/consultations/routes.ts +341 -0
  111. package/src/consultations/server/client-ip.ts +106 -0
  112. package/src/consultations/server/contact.ts +267 -0
  113. package/src/consultations/server/context.ts +403 -0
  114. package/src/consultations/server/cookie.ts +129 -0
  115. package/src/consultations/server/env.ts +66 -0
  116. package/src/consultations/server/http.ts +148 -0
  117. package/src/consultations/server/index.ts +55 -0
  118. package/src/consultations/server/origin.ts +71 -0
  119. package/src/consultations/server/server.ts +322 -0
  120. package/src/consultations/server/session.ts +414 -0
  121. package/src/consultations/server/transport.ts +196 -0
  122. package/src/consultations/server/turnstile.ts +98 -0
  123. package/src/consultations/site.ts +183 -0
  124. package/src/consultations/submit-new.ts +266 -0
  125. package/src/core/auth.ts +5 -1
  126. package/src/core/client.ts +32 -1
  127. package/src/core/errors.ts +5 -2
  128. package/src/core/index.ts +3 -0
  129. package/src/core/queries.ts +56 -0
  130. package/src/core/translations/cs.json +2 -1
  131. package/src/core/translations/en.json +2 -1
  132. package/src/core/types.ts +51 -0
  133. package/src/core/view-model.ts +18 -0
  134. package/src/vue/components/KbAccessGate.vue +14 -1
  135. package/src/vue/components/KbArticleCard.vue +25 -0
  136. /package/dist/{packages/tripmap-core/node_modules → node_modules}/maplibre-gl/dist/maplibre-gl-shared.js +0 -0
  137. /package/dist/{packages/tripmap-core/node_modules → node_modules}/maplibre-gl/dist/maplibre-gl.js +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blogmcp/sdk",
3
- "version": "0.6.1",
3
+ "version": "0.7.1",
4
4
  "description": "Headless SDK for Knowledge Base blog — core client, Vue composables, Nuxt adapter",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -31,6 +31,14 @@
31
31
  "./review": {
32
32
  "types": "./dist/core/review/index.d.ts",
33
33
  "import": "./dist/core/review/index.js"
34
+ },
35
+ "./consultations": {
36
+ "types": "./dist/consultations/index.d.ts",
37
+ "import": "./dist/consultations/index.js"
38
+ },
39
+ "./consultations/server": {
40
+ "types": "./dist/consultations/server/index.d.ts",
41
+ "import": "./dist/consultations/server/index.js"
34
42
  }
35
43
  },
36
44
  "main": "./dist/core/index.js",
@@ -40,11 +48,12 @@
40
48
  "src"
41
49
  ],
42
50
  "scripts": {
43
- "build": "vite build && vue-tsc --emitDeclarationOnly",
51
+ "build": "vite build && vue-tsc --emitDeclarationOnly && node scripts/fix-dts-specifiers.mjs",
44
52
  "dev": "vite build --watch",
45
53
  "test": "vitest run",
46
54
  "test:watch": "vitest",
47
55
  "typecheck": "vue-tsc --noEmit",
56
+ "verify:pack": "node scripts/verify-pack.mjs",
48
57
  "prepack": "node scripts/prepack.mjs",
49
58
  "postpack": "node scripts/postpack.mjs"
50
59
  },
@@ -65,8 +74,8 @@
65
74
  }
66
75
  },
67
76
  "dependencies": {
68
- "@blogmcp/mdx-schema": "^0.6.1",
69
- "@blogmcp/sanitize": "^0.6.1",
77
+ "@blogmcp/mdx-schema": "^0.7.1",
78
+ "@blogmcp/sanitize": "^0.7.1",
70
79
  "marked": "^15.0.7"
71
80
  },
72
81
  "optionalDependencies": {
@@ -96,7 +105,8 @@
96
105
  "headless",
97
106
  "vue",
98
107
  "nuxt",
99
- "graphql"
108
+ "graphql",
109
+ "consultations"
100
110
  ],
101
111
  "license": "MIT"
102
112
  }
@@ -0,0 +1,168 @@
1
+ /**
2
+ * Which legal text a reader form shows, and what the new-question page offers
3
+ * a signed-in reader (docs/internal/reader-consultations.md §6, §6.1, §8.1).
4
+ *
5
+ * Pure and TOTAL: anything unexpected is "no text" / `closed`, never a form
6
+ * the KB would refuse. The legal wording always comes from the KB; these
7
+ * functions only decide whether a text may be shown.
8
+ */
9
+
10
+ import type { ConsultationPublicConfig, ReaderConsultationConsent } from '../core/types'
11
+ import { LEGAL_VERSION_RE, LOCALE_RE } from './routes'
12
+
13
+ /** The KB channels the reader pages use. */
14
+ export const CONSULTATION_CHANNELS = {
15
+ /** A signed-in reader asks on the site itself (`/my-consultations/new`). */
16
+ web: 'web',
17
+ /** The anonymous contact form (`/contact`). */
18
+ contactForm: 'contact_form',
19
+ } as const
20
+
21
+ /**
22
+ * What a form shows under the message: nothing (`enabled: false`), an
23
+ * information `notice`, or a `consent` text with an UNTICKED box. `version`
24
+ * and `locale` go back with the question, so the KB records which text the
25
+ * reader saw.
26
+ */
27
+ export type ChannelText =
28
+ | { enabled: false }
29
+ | { enabled: true; mode: 'notice' | 'consent'; version: string; locale: string; text: string }
30
+
31
+ /** A text a form shows. */
32
+ export type ShownLegalText = Extract<ChannelText, { enabled: true }>
33
+
34
+ /** "Show nothing." */
35
+ export const CHANNEL_TEXT_DISABLED: ChannelText = Object.freeze({ enabled: false })
36
+
37
+ /** A text as the KB gave it → what may be shown, or `CHANNEL_TEXT_DISABLED`. */
38
+ function shownText(mode: unknown, text: unknown): ChannelText {
39
+ const t = text as Partial<Record<'purpose' | 'version' | 'locale' | 'body', unknown>> | null | undefined
40
+ if (!t || typeof t !== 'object') return CHANNEL_TEXT_DISABLED
41
+ if (mode !== 'notice' && mode !== 'consent') return CHANNEL_TEXT_DISABLED
42
+ // The KB looks a version up by the channel's MODE: a notice version sent on a consent channel
43
+ // would come back CONSENT_VERSION_UNKNOWN. Better no text than a form that cannot be sent.
44
+ if (t.purpose !== mode) return CHANNEL_TEXT_DISABLED
45
+ if (typeof t.version !== 'string' || !LEGAL_VERSION_RE.test(t.version)) return CHANNEL_TEXT_DISABLED
46
+ if (typeof t.locale !== 'string' || !LOCALE_RE.test(t.locale)) return CHANNEL_TEXT_DISABLED
47
+ if (typeof t.body !== 'string' || t.body.trim() === '') return CHANNEL_TEXT_DISABLED
48
+ return { enabled: true, mode, version: t.version, locale: t.locale, text: t.body }
49
+ }
50
+
51
+ /**
52
+ * The text a channel's form shows, from the public config asked for in
53
+ * `locale` (e.g. `contact_form` for the contact form, `web` for a new
54
+ * question in notice mode).
55
+ *
56
+ * Nothing is shown when the module or the channel is off, the channel has no
57
+ * text, the text's purpose is not the channel's mode, or its version, locale
58
+ * or body is unusable.
59
+ *
60
+ * **A consent text counts only in the page's language.** When the asked
61
+ * locale has no text, the KB falls back to `en`, then to any locale. A
62
+ * notice in another language is better than none — nothing is agreed to. A
63
+ * consent must be informed: a reader of an English page would tick, under an
64
+ * English label, a Czech text they may not understand, and the KB would
65
+ * record it as their consent. So a consent text in another locale means "this
66
+ * channel does not exist in this language" (the page is a 404, its button is
67
+ * hidden).
68
+ */
69
+ export function channelTextFrom(
70
+ config: ConsultationPublicConfig | null | undefined,
71
+ channel: string,
72
+ locale: string,
73
+ ): ChannelText {
74
+ if (!config || config.enabled !== true || !Array.isArray(config.channels)) return CHANNEL_TEXT_DISABLED
75
+ const entry = config.channels.find((c) => c?.channel === channel)
76
+ if (!entry) return CHANNEL_TEXT_DISABLED
77
+ const shown = shownText(entry.mode, entry.text)
78
+ if (shown.enabled && shown.mode === 'consent' && shown.locale !== locale) return CHANNEL_TEXT_DISABLED
79
+ return shown
80
+ }
81
+
82
+ /**
83
+ * What the new-question page offers one signed-in reader, and what goes with
84
+ * the question:
85
+ *
86
+ * - `closed` — the `web` channel is not open to them in this language (the
87
+ * module or the channel is off, their kind of account is not accepted, or
88
+ * no usable text): the page is a 404 and "Ask a new question" is hidden;
89
+ * - `consent` — a consent is needed (a first question, a withdrawn or lapsed
90
+ * consent, or the tenant asked everyone again): the consent text in the
91
+ * page's language and an UNTICKED box; `consent` goes with the question.
92
+ * `renew` = the reader HAS an active consent, it just no longer covers new
93
+ * questions (the tenant published a text that asks everyone again — the one
94
+ * case where the KB reports `active` and `needsConsent` together). The page
95
+ * then says why it asks again instead of "you give it only once";
96
+ * - `covered` — the reader's consent covers new questions: no box, only when
97
+ * it was given; nothing goes with the question (the KB links it itself);
98
+ * - `notice` — the channel is in notice mode: the notice text, no box;
99
+ * `notice` goes with the question.
100
+ */
101
+ export type WebAsk =
102
+ | { kind: 'closed' }
103
+ | { kind: 'consent'; legal: ShownLegalText; renew?: true }
104
+ | { kind: 'covered'; givenAt: string | null }
105
+ | { kind: 'notice'; legal: ShownLegalText }
106
+
107
+ export interface WebAskStatus {
108
+ /**
109
+ * The consent the reader has, whether or not they can ask right now (the
110
+ * channel off, notice mode): withdrawing it must always be possible, as
111
+ * easily as it was given.
112
+ */
113
+ consent: { active: boolean; givenAt: string | null }
114
+ ask: WebAsk
115
+ }
116
+
117
+ const WEB_ASK_CLOSED: WebAsk = Object.freeze({ kind: 'closed' })
118
+
119
+ /** A date from the KB only when it really is one — otherwise the page shows its sentence without a date. */
120
+ function isoDateOrNull(value: unknown): string | null {
121
+ return typeof value === 'string' && !Number.isNaN(Date.parse(value)) ? value : null
122
+ }
123
+
124
+ /**
125
+ * The reader's consent status from the KB (asked in `locale`) → what the
126
+ * new-question page offers. TOTAL: anything unexpected is `closed`.
127
+ *
128
+ * - The KB decides the mode and whether a consent is needed (`mode`,
129
+ * `needsConsent`): only it knows the coverage rule (a newer text flagged
130
+ * "ask everyone again").
131
+ * - A consent text counts only in the page's language (see `channelTextFrom`).
132
+ * A reader whose consent already covers new questions needs no text:
133
+ * `covered` ignores the language — the consent belongs to the person.
134
+ * - `needsConsent: false` in consent mode without an active consent is a
135
+ * contradiction (the KB "needs none" but the reader has none) → `closed`,
136
+ * never "you gave your consent".
137
+ * - `needsConsent: true` with an active consent → `consent` with `renew`.
138
+ * - Notice mode: the notice text comes only from the public config
139
+ * (`notice`, e.g. `channelTextFrom(config, 'web', locale)`).
140
+ */
141
+ export function webAskFrom(
142
+ consent: ReaderConsultationConsent | null | undefined,
143
+ locale: string,
144
+ notice: ChannelText = CHANNEL_TEXT_DISABLED,
145
+ ): WebAskStatus {
146
+ const c = consent && typeof consent === 'object' ? consent : null
147
+ const active = c?.active === true
148
+ const summary = { active, givenAt: active ? isoDateOrNull(c?.givenAt) : null }
149
+ const status = (ask: WebAsk): WebAskStatus => ({ consent: summary, ask })
150
+
151
+ if (c?.mode === 'notice') {
152
+ // Re-checked, not trusted: a stale memo can still hold the CONSENT text of a channel that has
153
+ // just switched to notice mode.
154
+ const shown =
155
+ notice?.enabled === true
156
+ ? shownText('notice', { purpose: notice.mode, version: notice.version, locale: notice.locale, body: notice.text })
157
+ : CHANNEL_TEXT_DISABLED
158
+ return status(shown.enabled ? { kind: 'notice', legal: shown } : WEB_ASK_CLOSED)
159
+ }
160
+ if (c?.mode !== 'consent') return status(WEB_ASK_CLOSED)
161
+ if (c.needsConsent !== true) {
162
+ return status(active ? { kind: 'covered', givenAt: summary.givenAt } : WEB_ASK_CLOSED)
163
+ }
164
+ const shown = shownText('consent', c.text)
165
+ if (!shown.enabled || shown.locale !== locale) return status(WEB_ASK_CLOSED)
166
+ // An active consent that no longer covers new questions: the tenant asked everyone again.
167
+ return status(active ? { kind: 'consent', legal: shown, renew: true } : { kind: 'consent', legal: shown })
168
+ }
@@ -0,0 +1,87 @@
1
+ /**
2
+ * `@blogmcp/sdk/consultations` — the reader consultation pages' shared logic,
3
+ * for the browser and the server alike (docs/internal/reader-consultations.md).
4
+ *
5
+ * Pure logic and browser helpers only: nothing here takes a key, a session,
6
+ * a cookie or a reader's IP. Everything that does lives in
7
+ * `@blogmcp/sdk/consultations/server`. This entry must never import that one,
8
+ * the adapter client, the delegated-identity minter, the root entry (which
9
+ * drags the MDX schema and the sanitiser) or any `node:*` module — a test
10
+ * walks its import graph.
11
+ */
12
+
13
+ export {
14
+ CONSULTATION_ROUTES,
15
+ CONSULTATION_API_PATHS,
16
+ CONSULTATION_KB_READER_LINK_PATH,
17
+ CONSULTATION_KB_READER_THREAD_PATH,
18
+ CONSULTATION_SECRET_RE,
19
+ CLIENT_REQUEST_ID_RE,
20
+ LEGAL_VERSION_RE,
21
+ CONSULTATION_ID_RE,
22
+ LOCALE_RE,
23
+ READER_BODY_MAX,
24
+ NEW_QUESTION_BODY_MAX,
25
+ CONTACT_MESSAGE_MAX,
26
+ CONTACT_NAME_MAX,
27
+ READER_EMAIL_MAX,
28
+ CONSULTATION_TURNSTILE_ACTION,
29
+ NEW_QUESTION_FIELDS,
30
+ SESSION_FIELDS,
31
+ CONSULTATION_INTENTS,
32
+ NEW_LINK_FIELDS,
33
+ CONTACT_FIELDS,
34
+ accountThreadPath,
35
+ normalizeBody,
36
+ newClientRequestId,
37
+ isReaderEmail,
38
+ tokenFromHash,
39
+ readLinkToken,
40
+ } from './routes'
41
+
42
+ export {
43
+ CONSULTATION_UI_CODES,
44
+ CONSULTATION_OUTCOME_OF_KB,
45
+ CONSULTATION_UI_HTTP_STATUS,
46
+ CONSULTATION_RESPONSE_HEADERS,
47
+ ConsultationTransportError,
48
+ isConsultationTransportError,
49
+ isConsultationUiCode,
50
+ isLoggedConsultationOutcome,
51
+ consultationOutcomeOf,
52
+ consultationFailureOf,
53
+ } from './outcome'
54
+ export type { ConsultationUiCode, ConsultationOutcome, ConsultationLogger } from './outcome'
55
+
56
+ export { createPublicConfigCache, sanitizePublicConfig } from './public-config'
57
+ export type { PublicConfigCache, PublicConfigCacheOptions } from './public-config'
58
+
59
+ export { CONSULTATION_CHANNELS, CHANNEL_TEXT_DISABLED, channelTextFrom, webAskFrom } from './channel-text'
60
+ export type { ChannelText, ShownLegalText, WebAsk, WebAskStatus } from './channel-text'
61
+
62
+ export { canonicalSiteUrl, parseSiteUrls, readerSiteStatus } from './site'
63
+ export type { ConsultationSiteStatus } from './site'
64
+
65
+ export { createReaderConsultations } from './reader'
66
+ export type { NewQuestion, ReaderConsultations } from './reader'
67
+
68
+ export { submitNewConsultation } from './submit-new'
69
+ export type { NewQuestionResult } from './submit-new'
70
+
71
+ export { CONSULTATION_MESSAGES, consultationMessage, consultationMessageLanguage } from './messages'
72
+ export type { ConsultationMessageKey, ConsultationMessageLanguage } from './messages'
73
+
74
+ // The KB types these helpers speak in, so a page needs one import.
75
+ export type {
76
+ ConsultationPublicConfig,
77
+ ConsultationChannelConfig,
78
+ ConsultationLegalText,
79
+ ConsultationLegalMode,
80
+ ConsultationMessageInput,
81
+ ReaderConsultation,
82
+ ReaderConsultationConsent,
83
+ ReaderConsultationMessage,
84
+ ReaderConsultationStatus,
85
+ ReaderConsultationSummary,
86
+ } from '../core/types'
87
+ export type { ConsultationErrorCode } from '../core/errors'
@@ -0,0 +1,175 @@
1
+ /**
2
+ * Czech texts of the reader consultation pages. Rules (the owner's, and a
3
+ * test enforces them): short and human; never tell readers what they may not
4
+ * ask; no legal wording (that always comes from the KB's own text); nothing
5
+ * tenant-specific (no addresses, no shop, no brand).
6
+ *
7
+ * Plurals follow `Intl.PluralRules('cs')`: `_one`, `_few`, `_many`
8
+ * (fractions), `_other`. Parameters are `{name}`.
9
+ */
10
+ export const CONSULTATION_MESSAGES_CS = {
11
+ 'error.method': 'Tohle se takhle spustit nedá. Vraťte se prosím na stránku s dotazem.',
12
+ 'error.origin': 'Požadavek nepřišel z této stránky. Obnovte ji prosím a zkuste to znovu.',
13
+ 'error.disabled': 'Dotazy tu teď nejsou k dispozici.',
14
+ 'error.auth': 'Přihlaste se prosím a zkuste to znovu.',
15
+ 'error.unavailable': 'Teď se to nepodařilo načíst ani uložit. Zkuste to prosím za chvíli.',
16
+ 'error.invalid': 'Něco ve formuláři nesedí. Zkontrolujte ho prosím a zkuste to znovu.',
17
+ 'error.consent': 'Aby šel dotaz odeslat, zaškrtněte prosím souhlas pod textem.',
18
+ 'error.tooLong': 'Zpráva je moc dlouhá. Zkraťte ji prosím.',
19
+ 'error.quota': 'Posíláte toho hodně najednou. Zkuste to prosím za chvíli.',
20
+ 'error.captcha': 'Nepodařilo se ověřit, že nejste robot. Počkejte prosím na nové ověření a odešlete to znovu.',
21
+ 'error.notFound': 'Tenhle dotaz jsme nenašli.',
22
+ 'error.expired': 'Odkaz nebo přihlášení k dotazu už neplatí.',
23
+ 'error.closed': 'Dotaz je uzavřený, odpovídat do něj už nejde.',
24
+ 'error.mismatch': 'Dotaz jde přesunout jen do účtu se stejnou e-mailovou adresou, ze které přišel.',
25
+ 'error.conflict':
26
+ 'Tohle jsme nejspíš už dostali, jen se k vám nedostalo potvrzení. Než to pošlete znovu, obnovte prosím stránku a podívejte se.',
27
+ 'error.submit': 'Nepovedlo se to. Obnovte prosím stránku a zkuste to znovu.',
28
+
29
+ 'status.OPEN': 'Čeká na odpověď',
30
+ 'status.ANSWERED': 'Zodpovězeno',
31
+ 'status.CLOSED': 'Uzavřeno',
32
+ 'status.ERASURE_REQUESTED': 'Čeká na smazání',
33
+
34
+ 'thread.you': 'Vy',
35
+ 'thread.team': 'Náš tým',
36
+ 'thread.created': 'Položeno {date}',
37
+ 'thread.replyLabel': 'Vaše odpověď',
38
+ 'thread.replySubmit': 'Odeslat odpověď',
39
+ 'thread.replySending': 'Odesílám…',
40
+ 'thread.counter': '{length} / {max} znaků',
41
+ 'thread.posted': 'Vaši odpověď máme.',
42
+ 'thread.cannotReply': 'Do tohoto dotazu už odpovídat nejde.',
43
+ 'thread.erase': 'Smazat dotaz',
44
+ 'thread.eraseTitle': 'Opravdu smazat dotaz?',
45
+ 'thread.eraseExplain':
46
+ 'Dotaz se hned uzavře a odpovídat do něj už nepůjde. Po ochranné lhůtě ho i s odpověďmi smažeme, pokud ho nemusíme ze zákona uchovat.',
47
+ 'thread.eraseKeepsConsent': 'Souhlas se zpracováním tím neodvoláváte — to jde v Mých dotazech.',
48
+ 'thread.eraseConfirm': 'Ano, smazat',
49
+ 'thread.eraseCancel': 'Ponechat',
50
+ 'thread.erasureRequestedTitle': 'Dotaz čeká na smazání',
51
+ 'thread.erasureRequestedBody':
52
+ 'Dotaz je uzavřený. Po ochranné lhůtě ho i s odpověďmi smažeme, pokud ho nemusíme ze zákona uchovat.',
53
+
54
+ 'open.title': 'Váš dotaz',
55
+ 'open.reading': 'Načítám…',
56
+ 'open.lede': 'Dotaz i naši odpověď zobrazíte tlačítkem níže.',
57
+ 'open.show': 'Zobrazit můj dotaz',
58
+ 'open.opening': 'Otevírám…',
59
+ 'open.invalidTitle': 'Odkaz už neplatí',
60
+ 'open.invalidBody': 'Mohl vypršet nebo už byl použitý. Pošleme vám nový.',
61
+ 'open.missingBody': 'V odkazu chybí přístupový kód. Otevřete prosím celý odkaz z e-mailu, nebo si nechte poslat nový.',
62
+
63
+ 'session.title': 'Váš dotaz',
64
+ 'session.lede': 'Tady najdete svůj dotaz a naši odpověď. Stránka je jen pro vás a po chvíli nečinnosti vás sama odhlásí.',
65
+ 'session.noneBody':
66
+ 'Dotaz se otevírá odkazem z e-mailu, který vám přišel s naší odpovědí. Když ho nemáte nebo už neplatí, pošleme vám nový.',
67
+ 'session.expiredTitle': 'Přihlášení k dotazu vypršelo',
68
+ 'session.expiredBody': 'Odkaz nebo přihlášení už neplatí. Pošleme vám nový odkaz.',
69
+ 'session.requestLink': 'Poslat nový odkaz',
70
+ 'session.logout': 'Odhlásit',
71
+ 'session.loggedOut': 'Odhlásili jste se. Dotaz znovu otevřete odkazem z e-mailu.',
72
+ 'session.attachTitle': 'Přesunout do účtu',
73
+ 'session.attachExplain':
74
+ 'Jste přihlášení, takže dotaz můžete přesunout do Mých dotazů. Jde to jen u účtu se stejnou e-mailovou adresou, ze které jste psali. Odkaz z e-mailu pak přestane platit.',
75
+ 'session.attach': 'Přesunout do mého účtu',
76
+ 'session.attachedTitle': 'Dotaz je ve vašem účtu',
77
+ 'session.attachedBody': 'Najdete ho v Mých dotazech. Odkaz z e-mailu už neplatí.',
78
+ 'session.attachedLink': 'Otevřít Moje dotazy',
79
+ 'session.erasedTitle': 'Dotaz jsme uzavřeli',
80
+ 'session.erasedBody':
81
+ 'Odpovídat do něj už nejde. Po ochranné lhůtě ho i s odpověďmi smažeme, pokud ho nemusíme ze zákona uchovat.',
82
+
83
+ 'newLink.title': 'Nový odkaz k dotazu',
84
+ 'newLink.lede':
85
+ 'Napište e-mail, ze kterého jste nám psali. Pokud k němu máme zodpovězený dotaz, pošleme na něj nový odkaz.',
86
+ 'newLink.email': 'E-mail',
87
+ 'newLink.emailInvalid': 'Tohle nevypadá jako e-mailová adresa.',
88
+ 'newLink.honeypot': 'Tohle pole nechte prázdné',
89
+ 'newLink.submit': 'Poslat odkaz',
90
+ 'newLink.sending': 'Odesílám…',
91
+ 'newLink.done': 'Pokud k té adrese máme zodpovězený dotaz, poslali jsme na ni nový odkaz.',
92
+
93
+ 'account.title': 'Moje dotazy',
94
+ 'account.empty': 'Zatím tu nemáte žádný dotaz',
95
+ 'account.emptyBody': 'Dotazy, které nám pošlete, tady najdete i s naší odpovědí.',
96
+ 'account.emptyBodyAsk': 'Zeptejte se nás tady — odpověď najdete na této stránce.',
97
+ 'account.created': 'Dotaz z {date}',
98
+ 'account.summary': 'Zpráv: {count} · naposledy {date}',
99
+ 'account.back': '← Moje dotazy',
100
+ 'account.ask': 'Položit nový dotaz',
101
+ 'account.consentGiven': 'Souhlas se zpracováním udělen {date}',
102
+ 'account.consentGivenNoDate': 'Souhlas se zpracováním udělen',
103
+ 'account.consentWithdraw': 'Odvolat souhlas',
104
+ 'account.consentWithdrawTitle': 'Odvolat souhlas se zpracováním?',
105
+ 'account.consentWithdrawExplain':
106
+ 'Dotazy, které jste položili se souhlasem, hned uzavřeme a odpovídat do nich už nepůjde. Po ochranné lhůtě je i s odpověďmi smažeme, pokud je nemusíme ze zákona uchovat. Dotazy bez souhlasu (třeba z kontaktního formuláře) zůstanou — ty můžete smazat každý zvlášť. Až se nás příště zeptáte tady, požádáme vás o souhlas znovu.',
107
+ 'account.consentWithdrawConfirm': 'Ano, odvolat souhlas',
108
+ 'account.consentWithdrawCancel': 'Ponechat souhlas',
109
+ 'account.consentWithdrawing': 'Odvolávám…',
110
+ 'account.consentWithdrawFailed': 'Souhlas se teď nepodařilo odvolat. Zkuste to prosím za chvíli.',
111
+ 'account.consentWithdrawnTitle': 'Souhlas jste odvolali',
112
+ 'account.consentWithdrawnClosed_one':
113
+ 'Uzavřeli jsme {count} dotaz položený se souhlasem. Po ochranné lhůtě ho i s odpověďmi smažeme, pokud ho nemusíme ze zákona uchovat.',
114
+ 'account.consentWithdrawnClosed_few':
115
+ 'Uzavřeli jsme {count} dotazy položené se souhlasem. Po ochranné lhůtě je i s odpověďmi smažeme, pokud je nemusíme ze zákona uchovat.',
116
+ 'account.consentWithdrawnClosed_many':
117
+ 'Uzavřeli jsme {count} dotazu položeného se souhlasem. Po ochranné lhůtě ho i s odpověďmi smažeme, pokud ho nemusíme ze zákona uchovat.',
118
+ 'account.consentWithdrawnClosed_other':
119
+ 'Uzavřeli jsme {count} dotazů položených se souhlasem. Po ochranné lhůtě je i s odpověďmi smažeme, pokud je nemusíme ze zákona uchovat.',
120
+ 'account.consentWithdrawnNone': 'Otevřený dotaz se souhlasem jste neměli, nic jsme tedy neuzavírali.',
121
+ 'account.consentWithdrawnNext': 'Až se nás příště zeptáte tady, požádáme vás o souhlas znovu.',
122
+ 'account.consentAlreadyWithdrawn': 'Platný souhlas už nemáte — nejspíš jste ho odvolali v jiném okně.',
123
+
124
+ 'ask.title': 'Nový dotaz',
125
+ 'ask.lede': 'Napište nám, na co se chcete zeptat. Odpověď najdete tady v Mých dotazech.',
126
+ 'ask.bodyLabel': 'Váš dotaz',
127
+ 'ask.counter': '{length} / {max} znaků',
128
+ 'ask.tooLong': 'Dotaz je moc dlouhý. Zkraťte ho prosím nejvýš na {max} znaků.',
129
+ 'ask.quota':
130
+ 'Nových dotazů je teď moc najednou. Další můžete položit později, nebo otázku připsat k některému z dotazů v Mých dotazech.',
131
+ 'ask.conflict':
132
+ 'Tenhle dotaz jsme nejspíš už dostali, jen se k vám nedostalo potvrzení. Podívejte se prosím do Mých dotazů. Pokud tam není, odešlete ho znovu.',
133
+ 'ask.openList': 'Otevřít Moje dotazy',
134
+ 'ask.consentLabel': 'Souhlasím se zpracováním podle textu výše.',
135
+ 'ask.consentOnce':
136
+ 'Souhlas dáváte jen jednou: platí i pro další dotazy, dokud ho v Mých dotazech neodvoláte nebo dokud vás o nový nepožádáme.',
137
+ 'ask.consentRenew':
138
+ 'Text souhlasu se změnil, proto vás o souhlas žádáme znovu. Bude platit i pro další dotazy, dokud ho neodvoláte nebo dokud vás o nový nepožádáme.',
139
+ 'ask.consentGiven': 'Souhlas se zpracováním jste dali {date}; platí, dokud ho neodvoláte nebo dokud vás o nový nepožádáme.',
140
+ 'ask.consentGivenNoDate': 'Souhlas se zpracováním jste už dali; platí, dokud ho neodvoláte nebo dokud vás o nový nepožádáme.',
141
+ 'ask.consentUnknown': 'Jestli váš souhlas pořád platí, teď nejde ověřit.',
142
+ 'ask.textChanged': 'Text o zpracování jsme mezitím upravili. Přečtěte si prosím novou verzi a dotaz odešlete znovu.',
143
+ 'ask.consentNeeded': 'Váš dřívější souhlas už neplatí. Přečtěte si prosím text výše a pro odeslání dotazu ho dejte znovu.',
144
+ 'ask.answerHint': 'Odpověď najdete tady v Mých dotazech.',
145
+ 'ask.answerHintEmail': 'Až odpovíme, pošleme vám e-mail s odkazem.',
146
+ 'ask.submit': 'Odeslat dotaz',
147
+ 'ask.sending': 'Odesílám…',
148
+ 'ask.unavailableTitle': 'Nový dotaz teď položit nejde',
149
+ 'ask.unavailableBody': 'Zkuste to prosím za chvíli.',
150
+ 'ask.draftLabel': 'Váš rozepsaný dotaz',
151
+ 'ask.draftHint': 'Teď ho uložit nejde. Zkopírujte si ho, ať o něj nepřijdete, a pošlete ho, až to zase půjde.',
152
+ 'ask.privacyLink': 'Jak zpracováváme osobní údaje',
153
+
154
+ 'contact.title': 'Napište nám',
155
+ 'contact.lede': 'Napište nám, na co se chcete zeptat.',
156
+ 'contact.name': 'Jméno (nepovinné)',
157
+ 'contact.email': 'E-mail',
158
+ 'contact.emailHint': 'Sem vám pošleme odkaz na odpověď.',
159
+ 'contact.message': 'Zpráva',
160
+ 'contact.counter': '{length} / {max} znaků',
161
+ 'contact.consentLabel': 'Souhlasím se zpracováním podle textu výše.',
162
+ 'contact.submit': 'Odeslat',
163
+ 'contact.sending': 'Odesílám…',
164
+ 'contact.done': 'Díky, dotaz máme. Až odpovíme, pošleme vám e-mail s odkazem.',
165
+ 'contact.honeypot': 'Tohle pole nechte prázdné',
166
+ 'contact.captchaUnavailable':
167
+ 'Ověření proti robotům se nenačetlo (možná ho blokuje rozšíření prohlížeče), takže formulář teď odeslat nejde. Zkuste prosím stránku obnovit.',
168
+ 'contact.textChanged': 'Text o zpracování jsme mezitím upravili. Přečtěte si prosím novou verzi a zprávu odešlete znovu.',
169
+ 'contact.emailInvalid': 'Tohle nevypadá jako e-mailová adresa.',
170
+ 'contact.nameTooLong': 'Jméno je moc dlouhé (nejvýš {max} znaků).',
171
+ 'contact.messageTooLong': 'Zpráva je moc dlouhá (nejvýš {max} znaků).',
172
+
173
+ 'common.signIn': 'Přihlásit se',
174
+ 'common.needsJs': 'Tahle stránka potřebuje zapnutý JavaScript. Zapněte ho prosím a stránku obnovte.',
175
+ } as const