|
2 | 2 | "$schema": "https://json-schema.org/draft/2020-12/schema", |
3 | 3 | "$id": "activity.schema.json", |
4 | 4 | "type": "object", |
| 5 | + "description": "Activity entity for feeds import.", |
| 6 | + "required": ["id", "type", "user_id", "fids"], |
5 | 7 | "properties": { |
6 | | - "id": { "type": "string" }, |
7 | | - "type": { "type": "string" }, |
8 | | - "user_id": { "type": "string" }, |
| 8 | + "id": { "type": "string", "minLength": 1 }, |
| 9 | + "type": { |
| 10 | + "type": "string", |
| 11 | + "minLength": 1, |
| 12 | + "description": "Activity type, e.g. 'post', 'photo'." |
| 13 | + }, |
| 14 | + "user_id": { "type": "string", "minLength": 1 }, |
9 | 15 | "fids": { |
10 | 16 | "type": "array", |
11 | | - "items": { "type": "string" } |
| 17 | + "items": { "type": "string", "minLength": 1 }, |
| 18 | + "minItems": 1, |
| 19 | + "description": "List of feed IDs (fids) this activity is posted to." |
12 | 20 | }, |
13 | 21 | "text": { "type": "string" }, |
14 | 22 | "attachments": { |
15 | 23 | "type": "array", |
16 | 24 | "items": { |
17 | 25 | "type": "object", |
18 | 26 | "properties": { |
19 | | - "type": { "type": "string" }, |
20 | | - "image_url": { "type": "string" }, |
21 | | - "thumb_url": { "type": "string" }, |
22 | | - "asset_url": { "type": "string" }, |
| 27 | + "type": { |
| 28 | + "type": "string", |
| 29 | + "description": "e.g. text, image, audio, video, file, poll." |
| 30 | + }, |
| 31 | + "image_url": { |
| 32 | + "type": "string", |
| 33 | + "format": "uri", |
| 34 | + "pattern": "^https://" |
| 35 | + }, |
| 36 | + "thumb_url": { |
| 37 | + "type": "string", |
| 38 | + "format": "uri", |
| 39 | + "pattern": "^https://" |
| 40 | + }, |
| 41 | + "asset_url": { |
| 42 | + "type": "string", |
| 43 | + "format": "uri", |
| 44 | + "pattern": "^https://" |
| 45 | + }, |
23 | 46 | "migrate_resources": { "type": "boolean" }, |
24 | | - "custom": { "type": "object" } |
| 47 | + "custom": { "type": "object", "additionalProperties": true } |
25 | 48 | } |
26 | 49 | } |
27 | 50 | }, |
28 | | - "visibility": { "type": "string" }, |
29 | | - "visibility_tag": { "type": "string" }, |
| 51 | + "visibility": { |
| 52 | + "type": "string", |
| 53 | + "enum": ["public", "private", "tag"], |
| 54 | + "description": "Defaults to 'public' when empty." |
| 55 | + }, |
| 56 | + "visibility_tag": { |
| 57 | + "type": "string", |
| 58 | + "description": "Required semantics when visibility='tag' (enforced at runtime, not in schema)." |
| 59 | + }, |
30 | 60 | "location": { |
31 | 61 | "type": "object", |
32 | 62 | "properties": { |
|
41 | 71 | }, |
42 | 72 | "parent_id": { "type": "string" }, |
43 | 73 | "poll_id": { "type": "string" }, |
44 | | - "custom": { "type": "object" }, |
| 74 | + "custom": { "type": "object", "additionalProperties": true }, |
45 | 75 | "created_at": { "type": "string", "format": "date-time" }, |
46 | 76 | "updated_at": { "type": "string", "format": "date-time" }, |
47 | 77 | "edited_at": { "type": "string", "format": "date-time" }, |
|
53 | 83 | "interest_tags": { |
54 | 84 | "type": "array", |
55 | 85 | "items": { "type": "string" } |
| 86 | + }, |
| 87 | + "collection_refs": { |
| 88 | + "type": "array", |
| 89 | + "items": { "type": "string" }, |
| 90 | + "description": "Collection IDs this activity references." |
56 | 91 | } |
57 | | - }, |
58 | | - "required": ["id", "type", "user_id", "fids"] |
| 92 | + } |
59 | 93 | } |
0 commit comments