@blogmcp/sdk 0.9.0 → 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.
@@ -22,8 +22,8 @@ export { COMMUNITY_UI_CODES, COMMUNITY_API_CODES, COMMUNITY_OUTCOME_OF_KB, COMMU
22
22
  export type { CommunityUiCode, CommunityApiCode, CommunityHostCode, CommunityOutcome, CommunityFailure, CommunityLogger, } from './outcome.js';
23
23
  export { fetchTransport, isRelativeCommunityBase, assertCommunityBase, communityOpUrl } from './transport.js';
24
24
  export type { CommunityTransport, CommunityTransportAnswer, FetchTransportOptions } from './transport.js';
25
- export { MESSAGE_STATES, AUTHOR_KINDS, NEEDS, RESTRICTION_KINDS, NOTIFICATION_CODES, CASE_CATEGORIES, CATEGORY_WITHOUT_NOTIFIER, AGE_BANDS, LEGAL_TEXT_KINDS, isKnownState, isKnownAuthorKind, isKnownAuthor, isKnownNeed, isKnownRestrictionKind, isKnownNotificationCode, isCaseCategory, communityRulesOf, } from './shapes.js';
26
- export type { KnownMessageState, MessageState, KnownAuthorKind, AuthorKind, KnownNeed, Need, KnownRestrictionKind, RestrictionKind, KnownNotificationCode, NotificationCode, CaseCategory, AgeBand, LegalTextKind, AcceptanceState, MemberAuthor, DeletedMemberAuthor, StaffAuthor, SystemAuthor, KnownAuthor, UnknownAuthor, Author, ReactionSummary, PublicMessage, RestrictionInEffect, DiscussionViewerState, Discussion, DiscussionHead, WriteAnswer, ReactionTarget, BlockEntry, PublicProfile, OwnProfile, MyState, NotificationItem, CommunityPage, DecisionSummary, StatementSubject, Statement, AppealItem, ReportItem, CurrentLegalText, CommunityRule, MemberExport, NoticeTarget, NoticeReceipt, NoticeStatus, DiscussionListInput, MessagePostInput, MessageEditInput, MessageReportInput, OnboardInput, ProfileUpdateInput, NoticeSubmitInput, } from './shapes.js';
25
+ export { MESSAGE_STATES, AUTHOR_KINDS, NEEDS, RESTRICTION_KINDS, NOTIFICATION_CODES, CASE_CATEGORIES, CATEGORY_WITHOUT_NOTIFIER, AGE_BANDS, LEGAL_TEXT_KINDS, isKnownState, isKnownAuthorKind, isKnownAuthor, isKnownNeed, isKnownRestrictionKind, isKnownNotificationCode, isCaseCategory, communityRulesOf, communityLegalSectionsOf, } from './shapes.js';
26
+ export type { KnownMessageState, MessageState, KnownAuthorKind, AuthorKind, KnownNeed, Need, KnownRestrictionKind, RestrictionKind, KnownNotificationCode, NotificationCode, CaseCategory, AgeBand, LegalTextKind, AcceptanceState, MemberAuthor, DeletedMemberAuthor, StaffAuthor, SystemAuthor, KnownAuthor, UnknownAuthor, Author, ReactionSummary, PublicMessage, RestrictionInEffect, DiscussionViewerState, Discussion, DiscussionHead, WriteAnswer, ReactionTarget, BlockEntry, PublicProfile, OwnProfile, MyState, NotificationItem, CommunityPage, DecisionSummary, StatementSubject, Statement, AppealItem, ReportItem, CurrentLegalText, CommunityRule, CommunityLegalSection, MemberExport, NoticeTarget, NoticeReceipt, NoticeStatus, DiscussionListInput, MessagePostInput, MessageEditInput, MessageReportInput, OnboardInput, ProfileUpdateInput, NoticeSubmitInput, } from './shapes.js';
27
27
  export { createDiscussionStore, refreshDiscussion, loadMoreDiscussion, viewerNeeds, findMessage, isOwnMessage, reactionsFor, reactionAfter, } from './store.js';
28
28
  export type { DiscussionStore, DiscussionState, DiscussionMessage, DiscussionViewer, DiscussionRestriction, MessageChange, ViewerNeeds, } from './store.js';
29
29
  export { pollDiscussionHead, POLL_INTERVAL_MS, POLL_MAX_BACKOFF_MS } from './poll.js';
@@ -1,31 +1,31 @@
1
- import { createCommunityClient as e } from "./client.js";
2
- import { COMMUNITY_APPEAL_MAX as O, COMMUNITY_BIO_MAX as I, COMMUNITY_CLIENT_MSG_ID_RE as t, COMMUNITY_DISPLAY_NAME_MAX as C, COMMUNITY_DISPLAY_NAME_MIN as T, COMMUNITY_GOOD_FAITH as i, COMMUNITY_HANDLE_CHANGE_DAYS as s, COMMUNITY_HANDLE_RE as N, COMMUNITY_HEAD_ARTICLES_MAX as n, COMMUNITY_MESSAGE_LINKS_MAX as E, COMMUNITY_MESSAGE_MAX as r, COMMUNITY_NOTICE_DESCRIPTION_MAX as m, COMMUNITY_NOTICE_TURNSTILE_ACTION as A, COMMUNITY_NOTIFIER_NAME_MAX as S, COMMUNITY_OPS as a, COMMUNITY_PAGE_SIZE as U, COMMUNITY_REPLIES_MAX as Y, COMMUNITY_REPORT_NOTE_MAX as u, communityOpPath as c, newClientMsgId as R } from "./routes.js";
3
- import { COMMUNITY_API_CODES as L, COMMUNITY_HOST_CODES as y, COMMUNITY_OUTCOME_OF_HOST as f, COMMUNITY_OUTCOME_OF_KB as p, COMMUNITY_UI_CODES as K, CommunityTransportError as g, communityFailureOf as P, communityOutcomeOf as H, isCommunityTransportError as d, isCommunityUiCode as F, isLoggedCommunityOutcome as G } from "./outcome.js";
4
- import { assertCommunityBase as h, communityOpUrl as w, fetchTransport as x, isRelativeCommunityBase as l } from "./transport.js";
5
- import { AGE_BANDS as k, AUTHOR_KINDS as v, CASE_CATEGORIES as V, CATEGORY_WITHOUT_NOTIFIER as W, LEGAL_TEXT_KINDS as Z, MESSAGE_STATES as b, NEEDS as j, NOTIFICATION_CODES as q, RESTRICTION_KINDS as z, communityRulesOf as J, isCaseCategory as Q, isKnownAuthor as $, isKnownAuthorKind as MM, isKnownNeed as _M, isKnownNotificationCode as eM, isKnownRestrictionKind as oM, isKnownState as OM } from "./shapes.js";
6
- import { createDiscussionStore as tM, findMessage as CM, isOwnMessage as TM, loadMoreDiscussion as iM, reactionAfter as sM, reactionsFor as NM, refreshDiscussion as nM, viewerNeeds as EM } from "./store.js";
7
- import { POLL_INTERVAL_MS as mM, POLL_MAX_BACKOFF_MS as AM, pollDiscussionHead as SM } from "./poll.js";
8
- import { COMMUNITY_CHANNELS as UM } from "./channels.js";
9
- import { COMMUNITY_RECEIPT_RE as uM, COMMUNITY_ROUTES as cM, myCommunityPath as RM, noticeStatusLink as DM, readReceiptFromHash as LM, receiptFromHash as yM, signInLink as fM, statementPath as pM } from "./links.js";
10
- import { COMMUNITY_MESSAGES as gM, communityMessage as PM, communityMessageLanguage as HM, confirmMessageKey as dM, hasCommunityMessage as FM, noteMessageKey as GM, warningMessageKey as XM } from "./messages.js";
1
+ import { createCommunityClient as _ } from "./client.js";
2
+ import { COMMUNITY_APPEAL_MAX as O, COMMUNITY_BIO_MAX as t, COMMUNITY_CLIENT_MSG_ID_RE as I, COMMUNITY_DISPLAY_NAME_MAX as C, COMMUNITY_DISPLAY_NAME_MIN as T, COMMUNITY_GOOD_FAITH as i, COMMUNITY_HANDLE_CHANGE_DAYS as s, COMMUNITY_HANDLE_RE as n, COMMUNITY_HEAD_ARTICLES_MAX as N, COMMUNITY_MESSAGE_LINKS_MAX as E, COMMUNITY_MESSAGE_MAX as r, COMMUNITY_NOTICE_DESCRIPTION_MAX as m, COMMUNITY_NOTICE_TURNSTILE_ACTION as A, COMMUNITY_NOTIFIER_NAME_MAX as S, COMMUNITY_OPS as a, COMMUNITY_PAGE_SIZE as U, COMMUNITY_REPLIES_MAX as Y, COMMUNITY_REPORT_NOTE_MAX as u, communityOpPath as c, newClientMsgId as L } from "./routes.js";
3
+ import { COMMUNITY_API_CODES as y, COMMUNITY_HOST_CODES as D, COMMUNITY_OUTCOME_OF_HOST as f, COMMUNITY_OUTCOME_OF_KB as p, COMMUNITY_UI_CODES as g, CommunityTransportError as K, communityFailureOf as P, communityOutcomeOf as H, isCommunityTransportError as d, isCommunityUiCode as F, isLoggedCommunityOutcome as G } from "./outcome.js";
4
+ import { assertCommunityBase as h, communityOpUrl as l, fetchTransport as w, isRelativeCommunityBase as x } from "./transport.js";
5
+ import { AGE_BANDS as k, AUTHOR_KINDS as v, CASE_CATEGORIES as V, CATEGORY_WITHOUT_NOTIFIER as W, LEGAL_TEXT_KINDS as Z, MESSAGE_STATES as b, NEEDS as j, NOTIFICATION_CODES as q, RESTRICTION_KINDS as z, communityLegalSectionsOf as J, communityRulesOf as Q, isCaseCategory as $, isKnownAuthor as MM, isKnownAuthorKind as eM, isKnownNeed as _M, isKnownNotificationCode as oM, isKnownRestrictionKind as OM, isKnownState as tM } from "./shapes.js";
6
+ import { createDiscussionStore as CM, findMessage as TM, isOwnMessage as iM, loadMoreDiscussion as sM, reactionAfter as nM, reactionsFor as NM, refreshDiscussion as EM, viewerNeeds as rM } from "./store.js";
7
+ import { POLL_INTERVAL_MS as AM, POLL_MAX_BACKOFF_MS as SM, pollDiscussionHead as aM } from "./poll.js";
8
+ import { COMMUNITY_CHANNELS as YM } from "./channels.js";
9
+ import { COMMUNITY_RECEIPT_RE as cM, COMMUNITY_ROUTES as LM, myCommunityPath as RM, noticeStatusLink as yM, readReceiptFromHash as DM, receiptFromHash as fM, signInLink as pM, statementPath as gM } from "./links.js";
10
+ import { COMMUNITY_MESSAGES as PM, communityMessage as HM, communityMessageLanguage as dM, confirmMessageKey as FM, hasCommunityMessage as GM, noteMessageKey as XM, warningMessageKey as hM } from "./messages.js";
11
11
  export {
12
12
  k as AGE_BANDS,
13
13
  v as AUTHOR_KINDS,
14
14
  V as CASE_CATEGORIES,
15
15
  W as CATEGORY_WITHOUT_NOTIFIER,
16
- L as COMMUNITY_API_CODES,
16
+ y as COMMUNITY_API_CODES,
17
17
  O as COMMUNITY_APPEAL_MAX,
18
- I as COMMUNITY_BIO_MAX,
19
- UM as COMMUNITY_CHANNELS,
20
- t as COMMUNITY_CLIENT_MSG_ID_RE,
18
+ t as COMMUNITY_BIO_MAX,
19
+ YM as COMMUNITY_CHANNELS,
20
+ I as COMMUNITY_CLIENT_MSG_ID_RE,
21
21
  C as COMMUNITY_DISPLAY_NAME_MAX,
22
22
  T as COMMUNITY_DISPLAY_NAME_MIN,
23
23
  i as COMMUNITY_GOOD_FAITH,
24
24
  s as COMMUNITY_HANDLE_CHANGE_DAYS,
25
- N as COMMUNITY_HANDLE_RE,
26
- n as COMMUNITY_HEAD_ARTICLES_MAX,
27
- y as COMMUNITY_HOST_CODES,
28
- gM as COMMUNITY_MESSAGES,
25
+ n as COMMUNITY_HANDLE_RE,
26
+ N as COMMUNITY_HEAD_ARTICLES_MAX,
27
+ D as COMMUNITY_HOST_CODES,
28
+ PM as COMMUNITY_MESSAGES,
29
29
  E as COMMUNITY_MESSAGE_LINKS_MAX,
30
30
  r as COMMUNITY_MESSAGE_MAX,
31
31
  m as COMMUNITY_NOTICE_DESCRIPTION_MAX,
@@ -35,58 +35,59 @@ export {
35
35
  f as COMMUNITY_OUTCOME_OF_HOST,
36
36
  p as COMMUNITY_OUTCOME_OF_KB,
37
37
  U as COMMUNITY_PAGE_SIZE,
38
- uM as COMMUNITY_RECEIPT_RE,
38
+ cM as COMMUNITY_RECEIPT_RE,
39
39
  Y as COMMUNITY_REPLIES_MAX,
40
40
  u as COMMUNITY_REPORT_NOTE_MAX,
41
- cM as COMMUNITY_ROUTES,
42
- K as COMMUNITY_UI_CODES,
43
- g as CommunityTransportError,
41
+ LM as COMMUNITY_ROUTES,
42
+ g as COMMUNITY_UI_CODES,
43
+ K as CommunityTransportError,
44
44
  Z as LEGAL_TEXT_KINDS,
45
45
  b as MESSAGE_STATES,
46
46
  j as NEEDS,
47
47
  q as NOTIFICATION_CODES,
48
- mM as POLL_INTERVAL_MS,
49
- AM as POLL_MAX_BACKOFF_MS,
48
+ AM as POLL_INTERVAL_MS,
49
+ SM as POLL_MAX_BACKOFF_MS,
50
50
  z as RESTRICTION_KINDS,
51
51
  h as assertCommunityBase,
52
52
  P as communityFailureOf,
53
- PM as communityMessage,
54
- HM as communityMessageLanguage,
53
+ J as communityLegalSectionsOf,
54
+ HM as communityMessage,
55
+ dM as communityMessageLanguage,
55
56
  c as communityOpPath,
56
- w as communityOpUrl,
57
+ l as communityOpUrl,
57
58
  H as communityOutcomeOf,
58
- J as communityRulesOf,
59
- dM as confirmMessageKey,
60
- e as createCommunityClient,
61
- tM as createDiscussionStore,
62
- x as fetchTransport,
63
- CM as findMessage,
64
- FM as hasCommunityMessage,
65
- Q as isCaseCategory,
59
+ Q as communityRulesOf,
60
+ FM as confirmMessageKey,
61
+ _ as createCommunityClient,
62
+ CM as createDiscussionStore,
63
+ w as fetchTransport,
64
+ TM as findMessage,
65
+ GM as hasCommunityMessage,
66
+ $ as isCaseCategory,
66
67
  d as isCommunityTransportError,
67
68
  F as isCommunityUiCode,
68
- $ as isKnownAuthor,
69
- MM as isKnownAuthorKind,
69
+ MM as isKnownAuthor,
70
+ eM as isKnownAuthorKind,
70
71
  _M as isKnownNeed,
71
- eM as isKnownNotificationCode,
72
- oM as isKnownRestrictionKind,
73
- OM as isKnownState,
72
+ oM as isKnownNotificationCode,
73
+ OM as isKnownRestrictionKind,
74
+ tM as isKnownState,
74
75
  G as isLoggedCommunityOutcome,
75
- TM as isOwnMessage,
76
- l as isRelativeCommunityBase,
77
- iM as loadMoreDiscussion,
76
+ iM as isOwnMessage,
77
+ x as isRelativeCommunityBase,
78
+ sM as loadMoreDiscussion,
78
79
  RM as myCommunityPath,
79
- R as newClientMsgId,
80
- GM as noteMessageKey,
81
- DM as noticeStatusLink,
82
- SM as pollDiscussionHead,
83
- sM as reactionAfter,
80
+ L as newClientMsgId,
81
+ XM as noteMessageKey,
82
+ yM as noticeStatusLink,
83
+ aM as pollDiscussionHead,
84
+ nM as reactionAfter,
84
85
  NM as reactionsFor,
85
- LM as readReceiptFromHash,
86
- yM as receiptFromHash,
87
- nM as refreshDiscussion,
88
- fM as signInLink,
89
- pM as statementPath,
90
- EM as viewerNeeds,
91
- XM as warningMessageKey
86
+ DM as readReceiptFromHash,
87
+ fM as receiptFromHash,
88
+ EM as refreshDiscussion,
89
+ pM as signInLink,
90
+ gM as statementPath,
91
+ rM as viewerNeeds,
92
+ hM as warningMessageKey
92
93
  };
@@ -11,7 +11,11 @@
11
11
  *
12
12
  * Browser-safe; readReceiptFromHash is the one function that touches `window` (on call, never on import).
13
13
  */
14
- /** The managed blog's community pages (router-relative; the blog prepends its own base). */
14
+ /**
15
+ * The managed blog's community pages (router-relative; the blog prepends its own base). The three legal pages —
16
+ * `rules`, `terms`, `privacy` — are each the tenant's current `legal/current` text of that kind, rendered by the blog's
17
+ * server without JavaScript, with `/community/<kind>.json` as the machine-readable alternate (DSA art. 14(1)).
18
+ */
15
19
  export declare const COMMUNITY_ROUTES: Readonly<{
16
20
  /** The „Moje komunita" panel. */
17
21
  readonly myCommunity: "/community";
@@ -23,6 +27,10 @@ export declare const COMMUNITY_ROUTES: Readonly<{
23
27
  readonly notices: "/community/notices";
24
28
  /** The rules, rendered on the server without JavaScript. */
25
29
  readonly rules: "/community/rules";
30
+ /** The discussion terms (DSA art. 14), rendered on the server without JavaScript, as the rules. */
31
+ readonly terms: "/community/terms";
32
+ /** The discussion privacy notice, rendered the same way. */
33
+ readonly privacy: "/community/privacy";
26
34
  }>;
27
35
  /** A notifier's receipt: kb-api's `kbnt_` capability token (≤ 512 characters, base64url). */
28
36
  export declare const COMMUNITY_RECEIPT_RE: RegExp;
@@ -8,14 +8,18 @@ const f = Object.freeze({
8
8
  /** A notifier's status page; the receipt goes in its fragment (noticeStatusLink). */
9
9
  notices: "/community/notices",
10
10
  /** The rules, rendered on the server without JavaScript. */
11
- rules: "/community/rules"
12
- }), d = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, a = /^kbnt_[A-Za-z0-9_-]{1,507}$/, m = "t";
11
+ rules: "/community/rules",
12
+ /** The discussion terms (DSA art. 14), rendered on the server without JavaScript, as the rules. */
13
+ terms: "/community/terms",
14
+ /** The discussion privacy notice, rendered the same way. */
15
+ privacy: "/community/privacy"
16
+ }), y = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, a = /^kbnt_[A-Za-z0-9_-]{1,507}$/, m = "t";
13
17
  function c(t) {
14
18
  return typeof t == "string" && /^\/(?![/\\])/.test(t) && !/[\s\\\u0000-\u001f\u007f]/.test(t);
15
19
  }
16
20
  function g(t, n) {
17
21
  const e = t == null || t === "" ? f.statement : t;
18
- return !c(e) || !e.includes("{id}") || /[{}]/.test(e.split("{id}").join("")) || typeof n != "string" || !d.test(n) ? null : e.split("{id}").join(n.toLowerCase());
22
+ return !c(e) || !e.includes("{id}") || /[{}]/.test(e.split("{id}").join("")) || typeof n != "string" || !y.test(n) ? null : e.split("{id}").join(n.toLowerCase());
19
23
  }
20
24
  function E(t) {
21
25
  return c(t) ? t : f.myCommunity;
@@ -27,7 +31,7 @@ function C(t, n) {
27
31
  function R(t, n) {
28
32
  return c(t) ? t.includes("#") || !c(n) || n.includes("#") ? t : `${t}#${n}` : null;
29
33
  }
30
- function y(t) {
34
+ function d(t) {
31
35
  const e = /^#t=([^&]*)/.exec(typeof t == "string" ? t : "")?.[1] ?? "";
32
36
  return a.test(e) ? e : null;
33
37
  }
@@ -66,7 +70,7 @@ function O(t, n, e) {
66
70
  return o ? i : t;
67
71
  }
68
72
  function $(t = h()) {
69
- const n = t.location.hash, e = y(n), o = !u.has(t);
73
+ const n = t.location.hash, e = d(n), o = !u.has(t);
70
74
  return n.startsWith(`#${m}=`) && t.history.replaceState(O(t.history.state, n, e), "", t.location.pathname + t.location.search), (o || e !== null) && u.set(t, e), u.get(t) ?? null;
71
75
  }
72
76
  export {
@@ -75,7 +79,7 @@ export {
75
79
  E as myCommunityPath,
76
80
  C as noticeStatusLink,
77
81
  $ as readReceiptFromHash,
78
- y as receiptFromHash,
82
+ d as receiptFromHash,
79
83
  R as signInLink,
80
84
  g as statementPath
81
85
  };
@@ -326,7 +326,10 @@ export interface CurrentLegalText {
326
326
  * An element renders text only: it shows `communityRulesOf(bodyJson)` and links to that page.
327
327
  */
328
328
  readonly body: string;
329
- /** The machine-readable form (DSA art. 14(1)); for `rules` `{ version, rules: [{ id, title, summary?, anchor }] }`. */
329
+ /**
330
+ * The machine-readable form (DSA art. 14(1)); for `rules` `{ version, rules: [{ id, title, summary?, anchor }] }`
331
+ * (communityRulesOf), for `terms` and `privacy` `{ sections: [{ id, title, anchor }] }` (communityLegalSectionsOf).
332
+ */
330
333
  readonly bodyJson: Readonly<Record<string, unknown>> | null;
331
334
  readonly reconsentRequired: boolean;
332
335
  readonly publishedAt: string | null;
@@ -341,6 +344,18 @@ export interface CommunityRule {
341
344
  }
342
345
  /** The rules of a `rules` text's `bodyJson`, in order; an entry without a string id, title and anchor is skipped. */
343
346
  export declare function communityRulesOf(bodyJson: unknown): CommunityRule[];
347
+ /** One section of a `terms` or `privacy` text: what the page's contents list and link. */
348
+ export interface CommunityLegalSection {
349
+ readonly id: string;
350
+ readonly title: string;
351
+ /** The section's anchor on the page (`#<anchor>`). */
352
+ readonly anchor: string;
353
+ }
354
+ /**
355
+ * The sections of a `terms` or `privacy` text's `bodyJson` (`{ sections: [{ id, title, anchor }] }`), in order; an
356
+ * entry without a string id, title and anchor is skipped. A `rules` text has none (its rules are communityRulesOf).
357
+ */
358
+ export declare function communityLegalSectionsOf(bodyJson: unknown): CommunityLegalSection[];
344
359
  /** `me/export`: every section, `providerEntity` on every row; offer it as a JSON download. */
345
360
  export interface MemberExport {
346
361
  readonly generatedAt: string;
@@ -1,4 +1,4 @@
1
- const t = (e, n) => typeof n == "string" && e.includes(n), _ = Object.freeze(["visible", "held", "removed", "deleted"]), y = (e) => t(_, e), f = Object.freeze(["member", "staff", "system"]), l = (e) => t(f, e), u = Object.freeze(["sign_in", "onboarding", "reconsent_rules", "art9_consent"]), h = (e) => t(u, e), d = Object.freeze(["restriction", "suspension", "ban"]), m = (e) => t(d, e), p = Object.freeze(["decision", "appeal_resolved", "erasure_scheduled", "inactivity_warning"]), E = (e) => t(p, e), O = Object.freeze([
1
+ const s = (e, t) => typeof t == "string" && e.includes(t), u = Object.freeze(["visible", "held", "removed", "deleted"]), O = (e) => s(u, e), a = Object.freeze(["member", "staff", "system"]), l = (e) => s(a, e), _ = Object.freeze(["sign_in", "onboarding", "reconsent_rules", "art9_consent"]), h = (e) => s(_, e), p = Object.freeze(["restriction", "suspension", "ban"]), m = (e) => s(p, e), d = Object.freeze(["decision", "appeal_resolved", "erasure_scheduled", "inactivity_warning"]), g = (e) => s(d, e), y = Object.freeze([
2
2
  "fraud_spam",
3
3
  "harassment",
4
4
  "hate",
@@ -15,37 +15,49 @@ const t = (e, n) => typeof n == "string" && e.includes(n), _ = Object.freeze(["v
15
15
  "adverse_event",
16
16
  "third_party_health_data",
17
17
  "suspected_minor"
18
- ]), b = (e) => t(O, e), A = "child_at_risk", S = Object.freeze(["16_17", "18_plus"]), T = Object.freeze(["rules", "terms", "privacy", "art9_consent"]);
19
- function g(e) {
18
+ ]), A = (e) => s(y, e), b = "child_at_risk", j = Object.freeze(["16_17", "18_plus"]), E = Object.freeze(["rules", "terms", "privacy", "art9_consent"]);
19
+ function S(e) {
20
20
  return typeof e == "object" && e !== null && l(e.kind);
21
21
  }
22
- function j(e) {
23
- const n = typeof e == "object" && e !== null ? e.rules : void 0;
24
- if (!Array.isArray(n)) return [];
25
- const r = [];
26
- for (const s of n) {
27
- if (typeof s != "object" || s === null) continue;
28
- const { id: o, title: i, summary: c, anchor: a } = s;
29
- typeof o != "string" || typeof i != "string" || typeof a != "string" || r.push(Object.freeze({ id: o, title: i, summary: typeof c == "string" ? c : null, anchor: a }));
22
+ function T(e) {
23
+ const t = typeof e == "object" && e !== null ? e.rules : void 0;
24
+ if (!Array.isArray(t)) return [];
25
+ const o = [];
26
+ for (const n of t) {
27
+ if (typeof n != "object" || n === null) continue;
28
+ const { id: r, title: i, summary: c, anchor: f } = n;
29
+ typeof r != "string" || typeof i != "string" || typeof f != "string" || o.push(Object.freeze({ id: r, title: i, summary: typeof c == "string" ? c : null, anchor: f }));
30
30
  }
31
- return r;
31
+ return o;
32
+ }
33
+ function I(e) {
34
+ const t = typeof e == "object" && e !== null ? e.sections : void 0;
35
+ if (!Array.isArray(t)) return [];
36
+ const o = [];
37
+ for (const n of t) {
38
+ if (typeof n != "object" || n === null) continue;
39
+ const { id: r, title: i, anchor: c } = n;
40
+ typeof r != "string" || typeof i != "string" || typeof c != "string" || o.push(Object.freeze({ id: r, title: i, anchor: c }));
41
+ }
42
+ return o;
32
43
  }
33
44
  export {
34
- S as AGE_BANDS,
35
- f as AUTHOR_KINDS,
36
- O as CASE_CATEGORIES,
37
- A as CATEGORY_WITHOUT_NOTIFIER,
38
- T as LEGAL_TEXT_KINDS,
39
- _ as MESSAGE_STATES,
40
- u as NEEDS,
41
- p as NOTIFICATION_CODES,
42
- d as RESTRICTION_KINDS,
43
- j as communityRulesOf,
44
- b as isCaseCategory,
45
- g as isKnownAuthor,
45
+ j as AGE_BANDS,
46
+ a as AUTHOR_KINDS,
47
+ y as CASE_CATEGORIES,
48
+ b as CATEGORY_WITHOUT_NOTIFIER,
49
+ E as LEGAL_TEXT_KINDS,
50
+ u as MESSAGE_STATES,
51
+ _ as NEEDS,
52
+ d as NOTIFICATION_CODES,
53
+ p as RESTRICTION_KINDS,
54
+ I as communityLegalSectionsOf,
55
+ T as communityRulesOf,
56
+ A as isCaseCategory,
57
+ S as isKnownAuthor,
46
58
  l as isKnownAuthorKind,
47
59
  h as isKnownNeed,
48
- E as isKnownNotificationCode,
60
+ g as isKnownNotificationCode,
49
61
  m as isKnownRestrictionKind,
50
- y as isKnownState
62
+ O as isKnownState
51
63
  };