@blogmcp/sdk 0.10.0 → 0.10.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.
@@ -46,7 +46,7 @@ export type CommunityOutcome<T> = {
46
46
  * Every code kb-api's community routers answer: their own, and the member, trust and quota codes they pass
47
47
  * through. A copy of `COMMUNITY_API_CODES` in kb-api's `routes/community-codes.ts`, in its order.
48
48
  */
49
- export declare const COMMUNITY_API_CODES: readonly ["SURFACE_OFF", "CUTOVER_NOT_MOVED", "NOT_FOUND", "ONBOARDING_REQUIRED", "AGE_BELOW_MINIMUM", "NAME_RESERVED", "NAME_BLOCKED", "HANDLE_TAKEN", "HANDLE_RATE", "POSTING_RESTRICTED", "ACCOUNT_SUSPENDED", "ACCOUNT_TERMINATED", "TOO_MANY_LINKS", "TOO_FAST", "FILTER_BLOCKED", "CONFIRMATION_REQUIRED", "MESSAGE_REMOVED", "REACTION_NOT_ALLOWED", "CAPTCHA_FAILED", "UNAUTHORIZED", "VALIDATION", "UNAVAILABLE", "STALE_LEASE", "STAFF_POSTING_OFF", "PRESET_CONFLICT", "INTERNAL", "MODULE_DARK", "MODULE_READ_ONLY", "BRAKED", "BRAKE_PLATFORM", "MODULE_CONDITIONS", "TRUST_LEVEL_INVALID", "MENTION_LIMIT", "DIGEST_UNSUBSCRIBE_INVALID", "PUSH_ENDPOINT_REFUSED", "PUSH_LIMIT", "REALTIME_OFF", "BUSY", "NOT_A_MEMBER_SESSION", "IDENTITY_NOT_ADMITTED", "ACCOUNT_NOT_ELIGIBLE", "MEMBER_READ_ONLY", "MEMBER_DELETION_REQUESTED", "PRIVATE_SPACE", "WRONG_PROVIDER", "CASE_CLOSED", "NOTIFIER_NOT_ALLOWED", "UNSUPPORTED_RESTRICTION", "LADDER_EXCEEDED", "PERSON_REQUIRED", "APPEAL_OPEN", "APPEAL_WINDOW_CLOSED", "APPEAL_NEEDS_ANOTHER_PERSON", "GAG_PLATFORM_ONLY", "ORDER_FINAL", "BODY_JSON_INVALID", "AUDIT_DETAIL_NOT_CODE", "LEDGER_UNAVAILABLE", "INVALID_INPUT", "LEGAL_HOLD", "TEXT_MISSING", "AGE16_NOT_ALLOWED", "QUOTA_DAILY", "QUOTA_IP_HOURLY"];
49
+ export declare const COMMUNITY_API_CODES: readonly ["SURFACE_OFF", "CUTOVER_NOT_MOVED", "NOT_FOUND", "ONBOARDING_REQUIRED", "AGE_BELOW_MINIMUM", "NAME_RESERVED", "NAME_BLOCKED", "HANDLE_TAKEN", "HANDLE_RATE", "POSTING_RESTRICTED", "ACCOUNT_SUSPENDED", "ACCOUNT_TERMINATED", "TOO_MANY_LINKS", "TOO_FAST", "FILTER_BLOCKED", "CONFIRMATION_REQUIRED", "MESSAGE_REMOVED", "REACTION_NOT_ALLOWED", "CAPTCHA_FAILED", "UNAUTHORIZED", "VALIDATION", "UNAVAILABLE", "STALE_LEASE", "STAFF_POSTING_OFF", "PRESET_CONFLICT", "INTERNAL", "MODULE_DARK", "MODULE_READ_ONLY", "BRAKED", "BRAKE_PLATFORM", "MODULE_CONDITIONS", "TRUST_LEVEL_INVALID", "MENTION_LIMIT", "DIGEST_UNSUBSCRIBE_INVALID", "PUSH_ENDPOINT_REFUSED", "PUSH_LIMIT", "REALTIME_OFF", "BUSY", "BRAKE_KIND_MISMATCH", "NOT_A_MEMBER_SESSION", "IDENTITY_NOT_ADMITTED", "ACCOUNT_NOT_ELIGIBLE", "MEMBER_READ_ONLY", "MEMBER_DELETION_REQUESTED", "PRIVATE_SPACE", "WRONG_PROVIDER", "CASE_CLOSED", "NOTIFIER_NOT_ALLOWED", "UNSUPPORTED_RESTRICTION", "LADDER_EXCEEDED", "PERSON_REQUIRED", "APPEAL_OPEN", "APPEAL_WINDOW_CLOSED", "APPEAL_NEEDS_ANOTHER_PERSON", "GAG_PLATFORM_ONLY", "ORDER_FINAL", "BODY_JSON_INVALID", "AUDIT_DETAIL_NOT_CODE", "LEDGER_UNAVAILABLE", "INVALID_INPUT", "LEGAL_HOLD", "TEXT_MISSING", "AGE16_NOT_ALLOWED", "QUOTA_DAILY", "QUOTA_IP_HOURLY"];
50
50
  /** A code kb-api's community routers answer. */
51
51
  export type CommunityApiCode = (typeof COMMUNITY_API_CODES)[number];
52
52
  /**
@@ -100,6 +100,7 @@ const r = [
100
100
  "PUSH_LIMIT",
101
101
  "REALTIME_OFF",
102
102
  "BUSY",
103
+ "BRAKE_KIND_MISMATCH",
103
104
  "NOT_A_MEMBER_SESSION",
104
105
  "IDENTITY_NOT_ADMITTED",
105
106
  "ACCOUNT_NOT_ELIGIBLE",
@@ -174,6 +175,8 @@ const r = [
174
175
  REALTIME_OFF: "realtimeOff",
175
176
  // F-W0-M4: the team router's lock timeout or deadlock (module/enable's first ranking) — no public operation produces it.
176
177
  BUSY: "submit",
178
+ // M2 follow-up F3: the platform's brakes/lift found another kind of brake (no public operation produces it).
179
+ BRAKE_KIND_MISMATCH: "submit",
177
180
  // A session that is not a reader's (the team, a key) or an identity the tenant does not admit: sign in as a reader.
178
181
  NOT_A_MEMBER_SESSION: "signIn",
179
182
  IDENTITY_NOT_ADMITTED: "signIn",
@@ -211,11 +214,11 @@ const r = [
211
214
  ORIGIN: "origin",
212
215
  TOO_LARGE: "invalid",
213
216
  INVALID_JSON: "invalid"
214
- }), t = (E, O) => Object.prototype.hasOwnProperty.call(E, O);
217
+ }), I = (E, O) => Object.prototype.hasOwnProperty.call(E, O);
215
218
  function s(E) {
216
- return typeof E != "string" || E === "" ? "submit" : t(A, E) ? A[E] : t(N, E) ? N[E] : "submit";
219
+ return typeof E != "string" || E === "" ? "submit" : I(A, E) ? A[E] : I(N, E) ? N[E] : "submit";
217
220
  }
218
- const I = /* @__PURE__ */ Symbol.for("@blogmcp/sdk/CommunityTransportError");
221
+ const t = /* @__PURE__ */ Symbol.for("@blogmcp/sdk/CommunityTransportError");
219
222
  function n(E) {
220
223
  return typeof E == "number" && Number.isInteger(E) && E >= 100 && E <= 599 ? E : null;
221
224
  }
@@ -228,11 +231,11 @@ class L extends Error {
228
231
  /** Seconds to wait before retrying (`Retry-After`), or null. */
229
232
  retryAfterS;
230
233
  constructor(O, _ = {}) {
231
- super(O), this.name = "CommunityTransportError", this.status = n(_.status), this.retryAfterS = i(_.retryAfterS), Object.defineProperty(this, I, { value: !0 });
234
+ super(O), this.name = "CommunityTransportError", this.status = n(_.status), this.retryAfterS = i(_.retryAfterS), Object.defineProperty(this, t, { value: !0 });
232
235
  }
233
236
  }
234
237
  function R(E) {
235
- return E instanceof L ? !0 : E instanceof Error && E[I] === !0;
238
+ return E instanceof L ? !0 : E instanceof Error && E[t] === !0;
236
239
  }
237
240
  function u(E) {
238
241
  return R(E) && E.retryAfterS !== null ? { ok: !1, code: "unavailable", retryAfterS: E.retryAfterS } : { ok: !1, code: "unavailable" };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blogmcp/sdk",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "description": "Headless SDK for Knowledge Base blog — core client, Vue composables, Nuxt adapter",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -98,8 +98,8 @@
98
98
  }
99
99
  },
100
100
  "dependencies": {
101
- "@blogmcp/mdx-schema": "^0.10.0",
102
- "@blogmcp/sanitize": "^0.10.0",
101
+ "@blogmcp/mdx-schema": "^0.10.1",
102
+ "@blogmcp/sanitize": "^0.10.1",
103
103
  "marked": "^15.0.7"
104
104
  },
105
105
  "optionalDependencies": {
@@ -152,6 +152,7 @@ export const COMMUNITY_API_CODES = [
152
152
  'PUSH_LIMIT',
153
153
  'REALTIME_OFF',
154
154
  'BUSY',
155
+ 'BRAKE_KIND_MISMATCH',
155
156
  'NOT_A_MEMBER_SESSION',
156
157
  'IDENTITY_NOT_ADMITTED',
157
158
  'ACCOUNT_NOT_ELIGIBLE',
@@ -238,6 +239,8 @@ export const COMMUNITY_OUTCOME_OF_KB: Readonly<Record<CommunityApiCode, Communit
238
239
  REALTIME_OFF: 'realtimeOff',
239
240
  // F-W0-M4: the team router's lock timeout or deadlock (module/enable's first ranking) — no public operation produces it.
240
241
  BUSY: 'submit',
242
+ // M2 follow-up F3: the platform's brakes/lift found another kind of brake (no public operation produces it).
243
+ BRAKE_KIND_MISMATCH: 'submit',
241
244
  // A session that is not a reader's (the team, a key) or an identity the tenant does not admit: sign in as a reader.
242
245
  NOT_A_MEMBER_SESSION: 'signIn',
243
246
  IDENTITY_NOT_ADMITTED: 'signIn',