@markee_team/sdk 0.1.0-beta.5 → 0.1.0-beta.7
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/README.md +19 -0
- package/dist/index.js +4 -3
- package/dist/react.js +4 -3
- package/dist/styles.d.ts +1 -1
- package/dist/types.d.ts +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -357,3 +357,22 @@ Snapshots retain `entry.moderated` (`false`, `true`, or `null`) and can addition
|
|
|
357
357
|
record views for it. A moderator's false-positive exception on Markee applies only on Markee;
|
|
358
358
|
it does not change SDK visibility. Automatic moderation is enabled by default on Markee.
|
|
359
359
|
Markee operators can explicitly disable it with `FLAG_AUTO_MODERATION=false`; host apps need no configuration.
|
|
360
|
+
|
|
361
|
+
## Automatic moderation presets
|
|
362
|
+
|
|
363
|
+
Both React components and `createMarkee`, `createMarkeeSign`, and `MarkeeClient` accept:
|
|
364
|
+
|
|
365
|
+
```ts
|
|
366
|
+
const moderation = { severity: 'standard' } as const;
|
|
367
|
+
// <MarkeeSign placement={placement} moderation={moderation} />
|
|
368
|
+
// <MarkeeModal placement={placement} moderation={moderation} ... />
|
|
369
|
+
// new MarkeeClient({ moderation }).checkMessage('Your message');
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
- `relaxed`: existing scam/phishing, concealed-link, and payment-solicitation rules; no profanity dictionary.
|
|
373
|
+
- `standard` (default): current rules plus all supported profanity dictionaries.
|
|
374
|
+
- `strict`: Standard plus any detected link/domain or wallet address/ENS name, even without payment instructions.
|
|
375
|
+
|
|
376
|
+
These are dictionary/rule presets, not contextual AI classifications or guarantees of safety. They check message text only. Manual flags, exact-text moderator approvals, and unavailable-state hiding still apply. An integration's preset does not change Markee's own Standard policy or the shared moderation queue.
|
|
377
|
+
|
|
378
|
+
`POST /api/moderation/check` and `/api/sdk/v1/moderation/check` accept an optional top-level `severity` with either `{ kind: 'draft', message }` or `{ kind: 'published', chainId: 8453, markeeIds }`. Omission preserves Standard behavior; invalid values return 400. Verdict caches include the preset policy version. The SDK forwards its setting for draft checks, snapshots, payment reviews, hosted checkout, and view validation. Existing clients need no changes.
|