atproto blogging
1{
2 "lexicon": 1,
3 "id": "tools.ozone.safelink.defs",
4 "defs": {
5 "actionType": {
6 "type": "string",
7 "knownValues": [
8 "block",
9 "warn",
10 "whitelist"
11 ]
12 },
13 "event": {
14 "type": "object",
15 "description": "An event for URL safety decisions",
16 "required": [
17 "id",
18 "eventType",
19 "url",
20 "pattern",
21 "action",
22 "reason",
23 "createdBy",
24 "createdAt"
25 ],
26 "properties": {
27 "action": {
28 "type": "ref",
29 "ref": "#actionType"
30 },
31 "comment": {
32 "type": "string",
33 "description": "Optional comment about the decision"
34 },
35 "createdAt": {
36 "type": "string",
37 "format": "datetime"
38 },
39 "createdBy": {
40 "type": "string",
41 "description": "DID of the user who created this rule",
42 "format": "did"
43 },
44 "eventType": {
45 "type": "ref",
46 "ref": "#eventType"
47 },
48 "id": {
49 "type": "integer",
50 "description": "Auto-incrementing row ID"
51 },
52 "pattern": {
53 "type": "ref",
54 "ref": "#patternType"
55 },
56 "reason": {
57 "type": "ref",
58 "ref": "#reasonType"
59 },
60 "url": {
61 "type": "string",
62 "description": "The URL that this rule applies to"
63 }
64 }
65 },
66 "eventType": {
67 "type": "string",
68 "knownValues": [
69 "addRule",
70 "updateRule",
71 "removeRule"
72 ]
73 },
74 "patternType": {
75 "type": "string",
76 "knownValues": [
77 "domain",
78 "url"
79 ]
80 },
81 "reasonType": {
82 "type": "string",
83 "knownValues": [
84 "csam",
85 "spam",
86 "phishing",
87 "none"
88 ]
89 },
90 "urlRule": {
91 "type": "object",
92 "description": "Input for creating a URL safety rule",
93 "required": [
94 "url",
95 "pattern",
96 "action",
97 "reason",
98 "createdBy",
99 "createdAt",
100 "updatedAt"
101 ],
102 "properties": {
103 "action": {
104 "type": "ref",
105 "ref": "#actionType"
106 },
107 "comment": {
108 "type": "string",
109 "description": "Optional comment about the decision"
110 },
111 "createdAt": {
112 "type": "string",
113 "description": "Timestamp when the rule was created",
114 "format": "datetime"
115 },
116 "createdBy": {
117 "type": "string",
118 "description": "DID of the user added the rule.",
119 "format": "did"
120 },
121 "pattern": {
122 "type": "ref",
123 "ref": "#patternType"
124 },
125 "reason": {
126 "type": "ref",
127 "ref": "#reasonType"
128 },
129 "updatedAt": {
130 "type": "string",
131 "description": "Timestamp when the rule was last updated",
132 "format": "datetime"
133 },
134 "url": {
135 "type": "string",
136 "description": "The URL or domain to apply the rule to"
137 }
138 }
139 }
140 }
141}