@vettly/supabase 0.1.3 → 0.1.4
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 +32 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,37 @@
|
|
|
1
1
|
# @vettly/supabase
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Supabase Edge Functions for App Store Guideline 1.2 compliance. Deno-compatible client with fetch-based transport for serverless environments.
|
|
4
|
+
|
|
5
|
+
## App Store Guideline 1.2
|
|
6
|
+
|
|
7
|
+
Apple requires every iOS app with user-generated content to implement four things. This package handles all four in Supabase Edge Functions:
|
|
8
|
+
|
|
9
|
+
| Requirement | Guideline | Supabase Integration |
|
|
10
|
+
|-------------|-----------|----------------------|
|
|
11
|
+
| **Content filtering** | 1.2.1 | `createModerationHandler()`, `client.check()` |
|
|
12
|
+
| **User reporting** | 1.2.2 | Fetch to REST API (`POST /v1/reports`) |
|
|
13
|
+
| **User blocking** | 1.2.3 | Fetch to REST API (`POST /v1/blocks`) |
|
|
14
|
+
| **Audit trail** | — | `result.decisionId` on every decision |
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
// supabase/functions/comments/index.ts
|
|
18
|
+
import { createModerationHandler } from '@vettly/supabase'
|
|
19
|
+
|
|
20
|
+
Deno.serve(createModerationHandler({
|
|
21
|
+
policyId: 'app-store',
|
|
22
|
+
onBlock: (result) => new Response(
|
|
23
|
+
JSON.stringify({ error: 'Blocked', decisionId: result.decisionId }),
|
|
24
|
+
{ status: 403, headers: { 'Content-Type': 'application/json' } }
|
|
25
|
+
)
|
|
26
|
+
}))
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Get Your API Key
|
|
30
|
+
|
|
31
|
+
1. Sign up at [vettly.dev](https://vettly.dev)
|
|
32
|
+
2. Go to Dashboard > API Keys
|
|
33
|
+
3. Create and copy your key
|
|
34
|
+
4. See [Environment Setup](#environment-setup) below for Supabase-specific configuration
|
|
4
35
|
|
|
5
36
|
## Why Edge-Native?
|
|
6
37
|
|