@sockethub/schemas 3.0.0-alpha.19 → 3.0.0-alpha.21

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.
@@ -0,0 +1,375 @@
1
+ {
2
+ "required": [
3
+ "type",
4
+ "actor"
5
+ ],
6
+ "properties": {
7
+ "type": {
8
+ "enum": [
9
+ "fetch",
10
+ "query",
11
+ "create",
12
+ "update",
13
+ "delete"
14
+ ]
15
+ },
16
+ "actor": {
17
+ "type": "object",
18
+ "required": [
19
+ "id",
20
+ "type"
21
+ ],
22
+ "additionalProperties": false,
23
+ "properties": {
24
+ "id": {
25
+ "type": "string",
26
+ "minLength": 1,
27
+ "maxLength": 1024
28
+ },
29
+ "type": {
30
+ "enum": [
31
+ "person"
32
+ ]
33
+ }
34
+ }
35
+ },
36
+ "target": {
37
+ "type": "object",
38
+ "required": [
39
+ "id",
40
+ "type"
41
+ ],
42
+ "additionalProperties": false,
43
+ "properties": {
44
+ "id": {
45
+ "type": "string",
46
+ "format": "uri",
47
+ "maxLength": 4096
48
+ },
49
+ "type": {
50
+ "enum": [
51
+ "addressBook"
52
+ ]
53
+ }
54
+ }
55
+ },
56
+ "object": {
57
+ "oneOf": [
58
+ {
59
+ "type": "object",
60
+ "required": [
61
+ "type",
62
+ "name"
63
+ ],
64
+ "additionalProperties": false,
65
+ "properties": {
66
+ "id": {
67
+ "type": "string",
68
+ "format": "uri",
69
+ "maxLength": 4096
70
+ },
71
+ "etag": {
72
+ "type": "string",
73
+ "minLength": 1,
74
+ "maxLength": 1024
75
+ },
76
+ "uid": {
77
+ "type": "string",
78
+ "minLength": 1,
79
+ "maxLength": 255
80
+ },
81
+ "type": {
82
+ "const": "person"
83
+ },
84
+ "name": {
85
+ "type": "string",
86
+ "minLength": 1,
87
+ "maxLength": 4096
88
+ },
89
+ "givenName": {
90
+ "type": "string",
91
+ "maxLength": 1024
92
+ },
93
+ "additionalNames": {
94
+ "type": "array",
95
+ "maxItems": 32,
96
+ "items": {
97
+ "type": "string",
98
+ "maxLength": 1024
99
+ }
100
+ },
101
+ "familyName": {
102
+ "type": "string",
103
+ "maxLength": 1024
104
+ },
105
+ "honorificPrefixes": {
106
+ "type": "array",
107
+ "maxItems": 16,
108
+ "items": {
109
+ "type": "string",
110
+ "maxLength": 256
111
+ }
112
+ },
113
+ "honorificSuffixes": {
114
+ "type": "array",
115
+ "maxItems": 16,
116
+ "items": {
117
+ "type": "string",
118
+ "maxLength": 256
119
+ }
120
+ },
121
+ "nickname": {
122
+ "type": "string",
123
+ "maxLength": 1024
124
+ },
125
+ "emails": {
126
+ "type": "array",
127
+ "maxItems": 100,
128
+ "items": {
129
+ "type": "object",
130
+ "required": [
131
+ "value"
132
+ ],
133
+ "additionalProperties": false,
134
+ "properties": {
135
+ "value": {
136
+ "type": "string",
137
+ "minLength": 1,
138
+ "maxLength": 4096
139
+ },
140
+ "types": {
141
+ "type": "array",
142
+ "uniqueItems": true,
143
+ "maxItems": 32,
144
+ "items": {
145
+ "type": "string",
146
+ "minLength": 1,
147
+ "maxLength": 64,
148
+ "pattern": "^[A-Za-z0-9-]+$"
149
+ }
150
+ },
151
+ "preferred": {
152
+ "type": "boolean"
153
+ }
154
+ }
155
+ }
156
+ },
157
+ "telephones": {
158
+ "type": "array",
159
+ "maxItems": 100,
160
+ "items": {
161
+ "type": "object",
162
+ "required": [
163
+ "value"
164
+ ],
165
+ "additionalProperties": false,
166
+ "properties": {
167
+ "value": {
168
+ "type": "string",
169
+ "minLength": 1,
170
+ "maxLength": 4096
171
+ },
172
+ "types": {
173
+ "type": "array",
174
+ "uniqueItems": true,
175
+ "maxItems": 32,
176
+ "items": {
177
+ "type": "string",
178
+ "minLength": 1,
179
+ "maxLength": 64,
180
+ "pattern": "^[A-Za-z0-9-]+$"
181
+ }
182
+ },
183
+ "preferred": {
184
+ "type": "boolean"
185
+ }
186
+ }
187
+ }
188
+ },
189
+ "addresses": {
190
+ "type": "array",
191
+ "maxItems": 100,
192
+ "items": {
193
+ "type": "object",
194
+ "additionalProperties": false,
195
+ "properties": {
196
+ "types": {
197
+ "type": "array",
198
+ "uniqueItems": true,
199
+ "maxItems": 32,
200
+ "items": {
201
+ "type": "string",
202
+ "minLength": 1,
203
+ "maxLength": 64,
204
+ "pattern": "^[A-Za-z0-9-]+$"
205
+ }
206
+ },
207
+ "preferred": {
208
+ "type": "boolean"
209
+ },
210
+ "postOfficeBox": {
211
+ "type": "string",
212
+ "maxLength": 1024
213
+ },
214
+ "extendedAddress": {
215
+ "type": "string",
216
+ "maxLength": 1024
217
+ },
218
+ "street": {
219
+ "type": "string",
220
+ "maxLength": 4096
221
+ },
222
+ "locality": {
223
+ "type": "string",
224
+ "maxLength": 1024
225
+ },
226
+ "region": {
227
+ "type": "string",
228
+ "maxLength": 1024
229
+ },
230
+ "postalCode": {
231
+ "type": "string",
232
+ "maxLength": 256
233
+ },
234
+ "country": {
235
+ "type": "string",
236
+ "maxLength": 1024
237
+ }
238
+ }
239
+ }
240
+ },
241
+ "organization": {
242
+ "type": "string",
243
+ "maxLength": 4096
244
+ },
245
+ "title": {
246
+ "type": "string",
247
+ "maxLength": 1024
248
+ },
249
+ "role": {
250
+ "type": "string",
251
+ "maxLength": 1024
252
+ },
253
+ "urls": {
254
+ "type": "array",
255
+ "maxItems": 100,
256
+ "items": {
257
+ "type": "object",
258
+ "required": [
259
+ "value"
260
+ ],
261
+ "additionalProperties": false,
262
+ "properties": {
263
+ "value": {
264
+ "type": "string",
265
+ "minLength": 1,
266
+ "maxLength": 4096
267
+ },
268
+ "types": {
269
+ "type": "array",
270
+ "uniqueItems": true,
271
+ "maxItems": 32,
272
+ "items": {
273
+ "type": "string",
274
+ "minLength": 1,
275
+ "maxLength": 64,
276
+ "pattern": "^[A-Za-z0-9-]+$"
277
+ }
278
+ },
279
+ "preferred": {
280
+ "type": "boolean"
281
+ }
282
+ }
283
+ }
284
+ },
285
+ "photoUrls": {
286
+ "type": "array",
287
+ "maxItems": 16,
288
+ "items": {
289
+ "type": "string",
290
+ "format": "uri",
291
+ "pattern": "^https?://[^\\r\\n]+$",
292
+ "maxLength": 4096
293
+ }
294
+ },
295
+ "note": {
296
+ "type": "string",
297
+ "maxLength": 65536
298
+ },
299
+ "birthday": {
300
+ "type": "string",
301
+ "minLength": 4,
302
+ "maxLength": 32,
303
+ "pattern": "^[^\\r\\n]+$"
304
+ },
305
+ "vcardVersion": {
306
+ "enum": [
307
+ "3.0",
308
+ "4.0"
309
+ ]
310
+ },
311
+ "updateSupported": {
312
+ "type": "boolean"
313
+ }
314
+ }
315
+ },
316
+ {
317
+ "type": "object",
318
+ "additionalProperties": false,
319
+ "properties": {
320
+ "type": {
321
+ "const": "contactQuery"
322
+ },
323
+ "text": {
324
+ "type": "string",
325
+ "minLength": 1,
326
+ "maxLength": 1024
327
+ },
328
+ "fields": {
329
+ "type": "array",
330
+ "uniqueItems": true,
331
+ "maxItems": 4,
332
+ "items": {
333
+ "enum": [
334
+ "name",
335
+ "email",
336
+ "telephone",
337
+ "organization"
338
+ ]
339
+ }
340
+ },
341
+ "limit": {
342
+ "type": "integer",
343
+ "minimum": 1,
344
+ "maximum": 1000
345
+ }
346
+ }
347
+ },
348
+ {
349
+ "type": "object",
350
+ "required": [
351
+ "id",
352
+ "type",
353
+ "etag"
354
+ ],
355
+ "additionalProperties": false,
356
+ "properties": {
357
+ "id": {
358
+ "type": "string",
359
+ "format": "uri",
360
+ "maxLength": 4096
361
+ },
362
+ "type": {
363
+ "const": "person"
364
+ },
365
+ "etag": {
366
+ "type": "string",
367
+ "minLength": 1,
368
+ "maxLength": 1024
369
+ }
370
+ }
371
+ }
372
+ ]
373
+ }
374
+ }
375
+ }
@@ -51,6 +51,26 @@ export declare const SockethubConfigSchema: {
51
51
  default: {};
52
52
  description: string;
53
53
  properties: {
54
+ "@sockethub/platform-carddav": {
55
+ type: string;
56
+ additionalProperties: boolean;
57
+ properties: {
58
+ connectTimeoutMs: {
59
+ type: string;
60
+ minimum: number;
61
+ };
62
+ allowPrivateAddresses: {
63
+ type: string;
64
+ };
65
+ allowInsecureHttp: {
66
+ type: string;
67
+ };
68
+ concurrency: {
69
+ type: string;
70
+ minimum: number;
71
+ };
72
+ };
73
+ };
54
74
  "@sockethub/platform-caldav": {
55
75
  type: string;
56
76
  additionalProperties: boolean;
@@ -248,10 +268,46 @@ export declare const SockethubConfigSchema: {
248
268
  type: string;
249
269
  default: string;
250
270
  };
251
- traceSampleRate: {
271
+ environment: {
272
+ type: string;
273
+ default: string;
274
+ };
275
+ release: {
276
+ type: string;
277
+ default: string;
278
+ };
279
+ enableLogs: {
280
+ type: string;
281
+ default: boolean;
282
+ };
283
+ logLevels: {
284
+ type: string;
285
+ items: {
286
+ type: string;
287
+ enum: string[];
288
+ };
289
+ default: string[];
290
+ };
291
+ enableMetrics: {
292
+ type: string;
293
+ default: boolean;
294
+ };
295
+ tracesSampleRate: {
296
+ type: string;
297
+ minimum: number;
298
+ maximum: number;
299
+ default: number;
300
+ };
301
+ profileSessionSampleRate: {
252
302
  type: string;
303
+ minimum: number;
304
+ maximum: number;
253
305
  default: number;
254
306
  };
307
+ sendDefaultPii: {
308
+ type: string;
309
+ default: boolean;
310
+ };
255
311
  };
256
312
  };
257
313
  sockethub: {
@@ -270,6 +326,12 @@ export declare const SockethubConfigSchema: {
270
326
  type: string;
271
327
  default: string;
272
328
  };
329
+ maxPayloadBytes: {
330
+ type: string;
331
+ minimum: number;
332
+ default: number;
333
+ description: string;
334
+ };
273
335
  cors: {
274
336
  type: string;
275
337
  additionalProperties: boolean;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sockethub/schemas",
3
3
  "description": "JSON schema files for validating Sockethub Activity Streams",
4
- "version": "3.0.0-alpha.19",
4
+ "version": "3.0.0-alpha.21",
5
5
  "type": "module",
6
6
  "private": false,
7
7
  "author": "Nick Jennings <nick@silverbucket.net>",
@@ -26,8 +26,17 @@
26
26
  "import": "./dist/object-types.js",
27
27
  "default": "./dist/object-types.js"
28
28
  },
29
+ "./examples-config": {
30
+ "types": "./dist/examples-config.d.ts",
31
+ "bun": "./src/examples-config.ts",
32
+ "import": "./dist/examples-config.js",
33
+ "default": "./dist/examples-config.js"
34
+ },
29
35
  "./schemas/json/sockethub-config.json": {
30
36
  "default": "./dist/schemas/json/sockethub-config.json"
37
+ },
38
+ "./schemas/json/examples-config.json": {
39
+ "default": "./dist/schemas/json/examples-config.json"
31
40
  }
32
41
  },
33
42
  "files": [
@@ -53,7 +62,7 @@
53
62
  "@types/bun": "latest"
54
63
  },
55
64
  "scripts": {
56
- "build": "bun ./scripts/export-json-schema.ts && bun ./scripts/export-canonical-assets.ts && bun build src/index.ts src/object-types.ts --outdir dist --target node --format esm --sourcemap=external && bun build src/context.ts src/activity-stream-helper.ts --outdir dist --target browser --format esm --sourcemap=external",
65
+ "build": "bun ./scripts/export-json-schema.ts && bun ./scripts/export-canonical-assets.ts && bun build src/index.ts src/object-types.ts --outdir dist --target node --format esm --sourcemap=external && bun build src/context.ts src/activity-stream-helper.ts src/examples-config.ts --outdir dist --target browser --format esm --sourcemap=external",
57
66
  "clean": "rm -rf dist",
58
67
  "clean:deps": "rm -rf node_modules"
59
68
  },
@@ -62,6 +71,6 @@
62
71
  "ajv-formats": "^2.1.1",
63
72
  "ajv-formats-draft2019": "^1.6.1"
64
73
  },
65
- "gitHead": "8e315bd27fbf9324079f2a5a4a09f3c6057c6500",
74
+ "gitHead": "1d87ef9d415159ef624e86e929ef2a2fb7a4b50e",
66
75
  "types": "./dist/index.d.ts"
67
76
  }