@sockethub/schemas 3.0.0-alpha.8 → 3.0.0-beta.0
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/dist/activity-stream-helper.d.ts +5 -0
- package/dist/activity-stream-helper.js +36 -0
- package/dist/activity-stream-helper.js.map +10 -0
- package/dist/context.d.ts +56 -0
- package/dist/context.js +80 -0
- package/dist/context.js.map +10 -0
- package/dist/contexts/platform/caldav/v1.jsonld +8 -0
- package/dist/contexts/platform/carddav/v1.jsonld +8 -0
- package/dist/contexts/platform/dummy/v1.jsonld +8 -0
- package/dist/contexts/platform/error/v1.jsonld +8 -0
- package/dist/contexts/platform/feeds/v1.jsonld +8 -0
- package/dist/contexts/platform/irc/v1.jsonld +8 -0
- package/dist/contexts/platform/metadata/v1.jsonld +8 -0
- package/dist/contexts/platform/sockethub%3Ainternal/v1.jsonld +8 -0
- package/dist/contexts/platform/xmpp/v1.jsonld +8 -0
- package/dist/contexts/v1.jsonld +7 -0
- package/dist/helpers/error-parser.d.ts +13 -0
- package/dist/helpers/objects.d.ts +157 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +1235 -1143
- package/dist/index.js.map +15 -17
- package/dist/maps/context-map.json +41 -0
- package/dist/object-types.d.ts +2 -0
- package/dist/object-types.js +299 -0
- package/dist/object-types.js.map +12 -0
- package/dist/schema-id.d.ts +11 -0
- package/dist/schemas/activity-stream.d.ts +196 -0
- package/{src/schemas/json/activity-object.json → dist/schemas/json/activity-stream.json} +99 -158
- package/dist/schemas/json/platform.json +52 -0
- package/dist/schemas/json/service-descriptor.json +58 -0
- package/dist/schemas/json/sockethub-config.json +500 -0
- package/dist/schemas/platform/caldav/v1/credentials.schema.json +71 -0
- package/dist/schemas/platform/caldav/v1/messages.schema.json +769 -0
- package/dist/schemas/platform/carddav/v1/credentials.schema.json +67 -0
- package/dist/schemas/platform/carddav/v1/messages.schema.json +375 -0
- package/dist/schemas/platform/dummy/v1/credentials.schema.json +1 -0
- package/dist/schemas/platform/dummy/v1/messages.schema.json +22 -0
- package/dist/schemas/platform/error/v1/credentials.schema.json +1 -0
- package/dist/schemas/platform/error/v1/messages.schema.json +1 -0
- package/dist/schemas/platform/feeds/v1/credentials.schema.json +1 -0
- package/dist/schemas/platform/feeds/v1/messages.schema.json +27 -0
- package/dist/schemas/platform/irc/v1/credentials.schema.json +118 -0
- package/dist/schemas/platform/irc/v1/messages.schema.json +149 -0
- package/dist/schemas/platform/metadata/v1/credentials.schema.json +1 -0
- package/dist/schemas/platform/metadata/v1/messages.schema.json +14 -0
- package/dist/schemas/platform/sockethub%3Ainternal/v1/credentials.schema.json +1 -0
- package/dist/schemas/platform/sockethub%3Ainternal/v1/messages.schema.json +1 -0
- package/dist/schemas/platform/xmpp/v1/credentials.schema.json +43 -0
- package/dist/schemas/platform/xmpp/v1/messages.schema.json +129 -0
- package/dist/schemas/platform.d.ts +62 -0
- package/dist/schemas/service-descriptor.d.ts +84 -0
- package/dist/schemas/sockethub-config.d.ts +466 -0
- package/dist/service-descriptor.d.ts +4 -0
- package/dist/service-descriptor.js +6280 -0
- package/dist/service-descriptor.js.map +77 -0
- package/{src/types.ts → dist/types.d.ts} +52 -53
- package/dist/validator.d.ts +26 -0
- package/package.json +32 -11
- package/src/helpers/error-parser.ts +0 -113
- package/src/helpers/objects.ts +0 -227
- package/src/index.test.data.credentials.ts +0 -71
- package/src/index.test.data.objects.ts +0 -241
- package/src/index.test.data.platform.ts +0 -45
- package/src/index.test.data.streams.ts +0 -498
- package/src/index.test.ts +0 -99
- package/src/index.ts +0 -27
- package/src/schemas/activity-object.ts +0 -19
- package/src/schemas/activity-stream.ts +0 -54
- package/src/schemas/json/activity-stream.json +0 -469
- package/src/schemas/json/platform.json +0 -28
- package/src/schemas/json/sockethub-config.json +0 -144
- package/src/schemas/platform.ts +0 -47
- package/src/schemas/sockethub-config.ts +0 -140
- package/src/validator.ts +0 -94
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "3.0.0-beta.0",
|
|
3
|
+
"generatedAt": "2026-10-12T13:04:34.157Z",
|
|
4
|
+
"contextToPlatformId": {
|
|
5
|
+
"https://sockethub.org/ns/context/platform/caldav/v1.jsonld": "caldav",
|
|
6
|
+
"https://sockethub.org/ns/context/platform/carddav/v1.jsonld": "carddav",
|
|
7
|
+
"https://sockethub.org/ns/context/platform/dummy/v1.jsonld": "dummy",
|
|
8
|
+
"https://sockethub.org/ns/context/platform/error/v1.jsonld": "error",
|
|
9
|
+
"https://sockethub.org/ns/context/platform/feeds/v1.jsonld": "feeds",
|
|
10
|
+
"https://sockethub.org/ns/context/platform/irc/v1.jsonld": "irc",
|
|
11
|
+
"https://sockethub.org/ns/context/platform/metadata/v1.jsonld": "metadata",
|
|
12
|
+
"https://sockethub.org/ns/context/platform/sockethub:internal/v1.jsonld": "sockethub:internal",
|
|
13
|
+
"https://sockethub.org/ns/context/platform/xmpp/v1.jsonld": "xmpp"
|
|
14
|
+
},
|
|
15
|
+
"contextToSchemaId": {
|
|
16
|
+
"https://sockethub.org/ns/context/platform/caldav/v1.jsonld": "https://sockethub.org/schemas/as2/platform/caldav/v1/messages.schema.json",
|
|
17
|
+
"https://sockethub.org/ns/context/platform/carddav/v1.jsonld": "https://sockethub.org/schemas/as2/platform/carddav/v1/messages.schema.json",
|
|
18
|
+
"https://sockethub.org/ns/context/platform/dummy/v1.jsonld": "https://sockethub.org/schemas/as2/platform/dummy/v1/messages.schema.json",
|
|
19
|
+
"https://sockethub.org/ns/context/platform/error/v1.jsonld": "https://sockethub.org/schemas/as2/platform/error/v1/messages.schema.json",
|
|
20
|
+
"https://sockethub.org/ns/context/platform/feeds/v1.jsonld": "https://sockethub.org/schemas/as2/platform/feeds/v1/messages.schema.json",
|
|
21
|
+
"https://sockethub.org/ns/context/platform/irc/v1.jsonld": "https://sockethub.org/schemas/as2/platform/irc/v1/messages.schema.json",
|
|
22
|
+
"https://sockethub.org/ns/context/platform/metadata/v1.jsonld": "https://sockethub.org/schemas/as2/platform/metadata/v1/messages.schema.json",
|
|
23
|
+
"https://sockethub.org/ns/context/platform/sockethub:internal/v1.jsonld": "https://sockethub.org/schemas/as2/platform/sockethub%3Ainternal/v1/messages.schema.json",
|
|
24
|
+
"https://sockethub.org/ns/context/platform/xmpp/v1.jsonld": "https://sockethub.org/schemas/as2/platform/xmpp/v1/messages.schema.json"
|
|
25
|
+
},
|
|
26
|
+
"contextToCredentialsSchemaId": {
|
|
27
|
+
"https://sockethub.org/ns/context/platform/caldav/v1.jsonld": "https://sockethub.org/schemas/as2/platform/caldav/v1/credentials.schema.json",
|
|
28
|
+
"https://sockethub.org/ns/context/platform/carddav/v1.jsonld": "https://sockethub.org/schemas/as2/platform/carddav/v1/credentials.schema.json",
|
|
29
|
+
"https://sockethub.org/ns/context/platform/dummy/v1.jsonld": "https://sockethub.org/schemas/as2/platform/dummy/v1/credentials.schema.json",
|
|
30
|
+
"https://sockethub.org/ns/context/platform/error/v1.jsonld": "https://sockethub.org/schemas/as2/platform/error/v1/credentials.schema.json",
|
|
31
|
+
"https://sockethub.org/ns/context/platform/feeds/v1.jsonld": "https://sockethub.org/schemas/as2/platform/feeds/v1/credentials.schema.json",
|
|
32
|
+
"https://sockethub.org/ns/context/platform/irc/v1.jsonld": "https://sockethub.org/schemas/as2/platform/irc/v1/credentials.schema.json",
|
|
33
|
+
"https://sockethub.org/ns/context/platform/metadata/v1.jsonld": "https://sockethub.org/schemas/as2/platform/metadata/v1/credentials.schema.json",
|
|
34
|
+
"https://sockethub.org/ns/context/platform/sockethub:internal/v1.jsonld": "https://sockethub.org/schemas/as2/platform/sockethub%3Ainternal/v1/credentials.schema.json",
|
|
35
|
+
"https://sockethub.org/ns/context/platform/xmpp/v1.jsonld": "https://sockethub.org/schemas/as2/platform/xmpp/v1/credentials.schema.json"
|
|
36
|
+
},
|
|
37
|
+
"constants": {
|
|
38
|
+
"as2": "https://www.w3.org/ns/activitystreams",
|
|
39
|
+
"sockethub": "https://sockethub.org/ns/context/v1.jsonld"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
// src/helpers/objects.ts
|
|
2
|
+
var ObjectTypesSchema = {
|
|
3
|
+
feed: {
|
|
4
|
+
required: ["id", "type"],
|
|
5
|
+
additionalProperties: true,
|
|
6
|
+
properties: {
|
|
7
|
+
type: {
|
|
8
|
+
enum: ["feed"]
|
|
9
|
+
},
|
|
10
|
+
id: {
|
|
11
|
+
type: "string",
|
|
12
|
+
format: "iri"
|
|
13
|
+
},
|
|
14
|
+
name: {
|
|
15
|
+
type: "string"
|
|
16
|
+
},
|
|
17
|
+
description: {
|
|
18
|
+
type: "string"
|
|
19
|
+
},
|
|
20
|
+
author: {
|
|
21
|
+
type: "string"
|
|
22
|
+
},
|
|
23
|
+
favicon: {
|
|
24
|
+
type: "string"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
person: {
|
|
29
|
+
required: ["id", "type"],
|
|
30
|
+
additionalProperties: true,
|
|
31
|
+
properties: {
|
|
32
|
+
id: {
|
|
33
|
+
type: "string"
|
|
34
|
+
},
|
|
35
|
+
type: {
|
|
36
|
+
enum: ["person"]
|
|
37
|
+
},
|
|
38
|
+
name: {
|
|
39
|
+
type: "string"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
room: {
|
|
44
|
+
required: ["id", "type"],
|
|
45
|
+
additionalProperties: true,
|
|
46
|
+
properties: {
|
|
47
|
+
id: {
|
|
48
|
+
type: "string"
|
|
49
|
+
},
|
|
50
|
+
type: {
|
|
51
|
+
enum: ["room"]
|
|
52
|
+
},
|
|
53
|
+
name: {
|
|
54
|
+
type: "string"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
service: {
|
|
59
|
+
required: ["id", "type"],
|
|
60
|
+
additionalProperties: true,
|
|
61
|
+
properties: {
|
|
62
|
+
id: {
|
|
63
|
+
type: "string"
|
|
64
|
+
},
|
|
65
|
+
type: {
|
|
66
|
+
enum: ["service"]
|
|
67
|
+
},
|
|
68
|
+
name: {
|
|
69
|
+
type: "string"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
platform: {
|
|
74
|
+
required: ["id", "type"],
|
|
75
|
+
additionalProperties: true,
|
|
76
|
+
properties: {
|
|
77
|
+
id: {
|
|
78
|
+
type: "string"
|
|
79
|
+
},
|
|
80
|
+
type: {
|
|
81
|
+
enum: ["platform"]
|
|
82
|
+
},
|
|
83
|
+
name: {
|
|
84
|
+
type: "string"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
website: {
|
|
89
|
+
required: ["id", "type"],
|
|
90
|
+
additionalProperties: true,
|
|
91
|
+
properties: {
|
|
92
|
+
id: {
|
|
93
|
+
type: "string",
|
|
94
|
+
format: "iri"
|
|
95
|
+
},
|
|
96
|
+
type: {
|
|
97
|
+
enum: ["website"]
|
|
98
|
+
},
|
|
99
|
+
name: {
|
|
100
|
+
type: "string"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
address: {
|
|
105
|
+
required: ["type"],
|
|
106
|
+
additionalProperties: false,
|
|
107
|
+
properties: {
|
|
108
|
+
type: {
|
|
109
|
+
enum: ["address"]
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
calendar: {
|
|
114
|
+
required: ["id", "type"],
|
|
115
|
+
additionalProperties: true,
|
|
116
|
+
properties: {
|
|
117
|
+
id: {
|
|
118
|
+
type: "string",
|
|
119
|
+
format: "iri"
|
|
120
|
+
},
|
|
121
|
+
type: {
|
|
122
|
+
enum: ["calendar"]
|
|
123
|
+
},
|
|
124
|
+
name: {
|
|
125
|
+
type: "string"
|
|
126
|
+
},
|
|
127
|
+
components: {
|
|
128
|
+
type: "array",
|
|
129
|
+
items: {
|
|
130
|
+
enum: ["event", "task"]
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
addressBook: {
|
|
136
|
+
required: ["id", "type"],
|
|
137
|
+
additionalProperties: false,
|
|
138
|
+
properties: {
|
|
139
|
+
id: {
|
|
140
|
+
type: "string",
|
|
141
|
+
format: "iri"
|
|
142
|
+
},
|
|
143
|
+
type: {
|
|
144
|
+
enum: ["addressBook"]
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
var InternalObjectTypesList = ["platform", "heartbeat"];
|
|
150
|
+
var ObjectTypesList = Object.keys(ObjectTypesSchema);
|
|
151
|
+
var ActorTypesList = [
|
|
152
|
+
"person",
|
|
153
|
+
"room",
|
|
154
|
+
"service",
|
|
155
|
+
"feed",
|
|
156
|
+
"website",
|
|
157
|
+
"platform"
|
|
158
|
+
];
|
|
159
|
+
var TargetTypesList = [
|
|
160
|
+
"person",
|
|
161
|
+
"room",
|
|
162
|
+
"service",
|
|
163
|
+
"feed",
|
|
164
|
+
"website",
|
|
165
|
+
"platform",
|
|
166
|
+
"address",
|
|
167
|
+
"calendar",
|
|
168
|
+
"addressBook"
|
|
169
|
+
];
|
|
170
|
+
var validActorRefs = ActorTypesList.map((type) => ({
|
|
171
|
+
$ref: `#/definitions/type/${type}`
|
|
172
|
+
}));
|
|
173
|
+
var validTargetRefs = TargetTypesList.map((type) => ({
|
|
174
|
+
$ref: `#/definitions/type/${type}`
|
|
175
|
+
}));
|
|
176
|
+
// src/context.ts
|
|
177
|
+
var AS2_BASE_CONTEXT_URL = "https://www.w3.org/ns/activitystreams";
|
|
178
|
+
var SOCKETHUB_BASE_CONTEXT_URL = "https://sockethub.org/ns/context/v1.jsonld";
|
|
179
|
+
var PLATFORM_CONTEXT_PREFIX = "https://sockethub.org/ns/context/platform/";
|
|
180
|
+
var ERROR_PLATFORM_ID = "error";
|
|
181
|
+
var ERROR_PLATFORM_CONTEXT_URL = "https://sockethub.org/ns/context/platform/error/v1.jsonld";
|
|
182
|
+
var INTERNAL_PLATFORM_ID = "sockethub:internal";
|
|
183
|
+
var INTERNAL_PLATFORM_CONTEXT_URL = "https://sockethub.org/ns/context/platform/sockethub:internal/v1.jsonld";
|
|
184
|
+
var platformContextToPlatformId = new Map;
|
|
185
|
+
var platformContextToSchemaId = new Map;
|
|
186
|
+
var platformContextToCredentialsSchemaId = new Map;
|
|
187
|
+
function buildCanonicalContext(platform) {
|
|
188
|
+
const platformUrl = platform.startsWith("https://") ? platform : `${PLATFORM_CONTEXT_PREFIX}${platform}/v1.jsonld`;
|
|
189
|
+
return [AS2_BASE_CONTEXT_URL, SOCKETHUB_BASE_CONTEXT_URL, platformUrl];
|
|
190
|
+
}
|
|
191
|
+
function platformIdFromContext(context) {
|
|
192
|
+
if (!Array.isArray(context)) {
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
for (const entry of context) {
|
|
196
|
+
if (typeof entry === "string" && entry.startsWith(PLATFORM_CONTEXT_PREFIX)) {
|
|
197
|
+
const rest = entry.slice(PLATFORM_CONTEXT_PREFIX.length);
|
|
198
|
+
const slashIdx = rest.indexOf("/");
|
|
199
|
+
if (slashIdx > 0) {
|
|
200
|
+
return rest.slice(0, slashIdx);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
function normalizeContextArray(value) {
|
|
207
|
+
if (!Array.isArray(value)) {
|
|
208
|
+
return [];
|
|
209
|
+
}
|
|
210
|
+
return value.filter((entry) => typeof entry === "string");
|
|
211
|
+
}
|
|
212
|
+
function getContextArray(msg) {
|
|
213
|
+
return normalizeContextArray(msg["@context"]);
|
|
214
|
+
}
|
|
215
|
+
function registerPlatformContext(platformId, platformContextUrl, schemaId, credentialsSchemaId) {
|
|
216
|
+
platformContextToPlatformId.set(platformContextUrl, platformId);
|
|
217
|
+
platformContextToSchemaId.set(platformContextUrl, schemaId);
|
|
218
|
+
platformContextToCredentialsSchemaId.set(platformContextUrl, credentialsSchemaId);
|
|
219
|
+
}
|
|
220
|
+
function resolvePlatformContextUrl(msg) {
|
|
221
|
+
const contexts = getContextArray(msg);
|
|
222
|
+
const matches = contexts.filter((contextUrl) => platformContextToPlatformId.has(contextUrl));
|
|
223
|
+
if (matches.length !== 1) {
|
|
224
|
+
return null;
|
|
225
|
+
}
|
|
226
|
+
return matches[0];
|
|
227
|
+
}
|
|
228
|
+
function getPlatformIdByContextUrl(platformContextUrl) {
|
|
229
|
+
return platformContextToPlatformId.get(platformContextUrl);
|
|
230
|
+
}
|
|
231
|
+
function getSchemaIdByContextUrl(platformContextUrl) {
|
|
232
|
+
return platformContextToSchemaId.get(platformContextUrl);
|
|
233
|
+
}
|
|
234
|
+
function getCredentialsSchemaIdByContextUrl(platformContextUrl) {
|
|
235
|
+
return platformContextToCredentialsSchemaId.get(platformContextUrl);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
// src/schemas/activity-stream.ts
|
|
239
|
+
var contextSchema = {
|
|
240
|
+
type: "array",
|
|
241
|
+
minItems: 3,
|
|
242
|
+
maxItems: 3,
|
|
243
|
+
items: {
|
|
244
|
+
type: "string"
|
|
245
|
+
},
|
|
246
|
+
allOf: [
|
|
247
|
+
{
|
|
248
|
+
contains: {
|
|
249
|
+
const: AS2_BASE_CONTEXT_URL
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
contains: {
|
|
254
|
+
const: SOCKETHUB_BASE_CONTEXT_URL
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
]
|
|
258
|
+
};
|
|
259
|
+
var typeSchema = {
|
|
260
|
+
type: "string"
|
|
261
|
+
};
|
|
262
|
+
var ActivityStreamSchema = {
|
|
263
|
+
$id: "https://sockethub.org/schemas/v/activity-stream.json",
|
|
264
|
+
description: "Schema for Sockethub Activity Streams",
|
|
265
|
+
type: "object",
|
|
266
|
+
required: ["@context", "type", "actor"],
|
|
267
|
+
additionalProperties: false,
|
|
268
|
+
properties: {
|
|
269
|
+
"@context": contextSchema,
|
|
270
|
+
id: {
|
|
271
|
+
type: "string"
|
|
272
|
+
},
|
|
273
|
+
type: typeSchema,
|
|
274
|
+
actor: {
|
|
275
|
+
type: "object",
|
|
276
|
+
oneOf: validActorRefs
|
|
277
|
+
},
|
|
278
|
+
target: {
|
|
279
|
+
type: "object",
|
|
280
|
+
oneOf: validTargetRefs
|
|
281
|
+
},
|
|
282
|
+
object: {
|
|
283
|
+
type: "object"
|
|
284
|
+
},
|
|
285
|
+
published: {
|
|
286
|
+
type: "string",
|
|
287
|
+
format: "date-time"
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
definitions: {
|
|
291
|
+
type: ObjectTypesSchema
|
|
292
|
+
}
|
|
293
|
+
};
|
|
294
|
+
export {
|
|
295
|
+
ActivityStreamSchema,
|
|
296
|
+
ObjectTypesSchema
|
|
297
|
+
};
|
|
298
|
+
|
|
299
|
+
//# debugId=25E0C4DC556BC56D64756E2164756E21
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/helpers/objects.ts", "../src/context.ts", "../src/schemas/activity-stream.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"// The shared actor/target entity vocabulary. Content object types (message,\n// presence, attendance, room-info, topic, …) are owned by each platform's\n// `messages` (inbound) and `responses` (outbound) schemas; the base envelope no\n// longer enumerates a global object vocabulary.\nexport const ObjectTypesSchema = {\n feed: {\n required: [\"id\", \"type\"],\n additionalProperties: true,\n properties: {\n type: {\n enum: [\"feed\"],\n },\n id: {\n type: \"string\",\n format: \"iri\",\n },\n name: {\n type: \"string\",\n },\n description: {\n type: \"string\",\n },\n author: {\n type: \"string\",\n },\n favicon: {\n type: \"string\",\n },\n },\n },\n\n person: {\n required: [\"id\", \"type\"],\n additionalProperties: true,\n properties: {\n id: {\n type: \"string\",\n },\n type: {\n enum: [\"person\"],\n },\n name: {\n type: \"string\",\n },\n },\n },\n\n room: {\n required: [\"id\", \"type\"],\n additionalProperties: true,\n properties: {\n id: {\n type: \"string\",\n },\n type: {\n enum: [\"room\"],\n },\n name: {\n type: \"string\",\n },\n },\n },\n\n service: {\n required: [\"id\", \"type\"],\n additionalProperties: true,\n properties: {\n id: {\n type: \"string\",\n },\n type: {\n enum: [\"service\"],\n },\n name: {\n type: \"string\",\n },\n },\n },\n\n platform: {\n required: [\"id\", \"type\"],\n additionalProperties: true,\n properties: {\n id: {\n type: \"string\",\n },\n type: {\n enum: [\"platform\"],\n },\n name: {\n type: \"string\",\n },\n },\n },\n\n website: {\n required: [\"id\", \"type\"],\n additionalProperties: true,\n properties: {\n id: {\n type: \"string\",\n format: \"iri\",\n },\n type: {\n enum: [\"website\"],\n },\n name: {\n type: \"string\",\n },\n },\n },\n\n address: {\n required: [\"type\"],\n additionalProperties: false,\n properties: {\n type: {\n enum: [\"address\"],\n },\n },\n },\n\n calendar: {\n required: [\"id\", \"type\"],\n additionalProperties: true,\n properties: {\n id: {\n type: \"string\",\n format: \"iri\",\n },\n type: {\n enum: [\"calendar\"],\n },\n name: {\n type: \"string\",\n },\n components: {\n type: \"array\",\n items: {\n enum: [\"event\", \"task\"],\n },\n },\n },\n },\n\n addressBook: {\n required: [\"id\", \"type\"],\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n format: \"iri\",\n },\n type: {\n enum: [\"addressBook\"],\n },\n },\n },\n};\n\n// Internal AS object types reserved for Sockethub IPC/housekeeping.\nexport const InternalObjectTypesList = [\"platform\", \"heartbeat\"];\nexport const ObjectTypesList = Object.keys(ObjectTypesSchema);\nexport const ActorTypesList = [\n \"person\",\n \"room\",\n \"service\",\n \"feed\",\n \"website\",\n \"platform\",\n];\nexport const TargetTypesList = [\n \"person\",\n \"room\",\n \"service\",\n \"feed\",\n \"website\",\n \"platform\",\n \"address\",\n \"calendar\",\n \"addressBook\",\n];\nexport const validActorRefs = ActorTypesList.map((type) => ({\n $ref: `#/definitions/type/${type}`,\n}));\nexport const validTargetRefs = TargetTypesList.map((type) => ({\n $ref: `#/definitions/type/${type}`,\n}));\n",
|
|
6
|
+
"import type { ActivityStream, JsonLdContext } from \"./types.js\";\n\n/**\n * Canonical AS2 base vocabulary URL.\n */\nexport const AS2_BASE_CONTEXT_URL = \"https://www.w3.org/ns/activitystreams\";\n\n/**\n * Sockethub base vocabulary URL for shared platform terms.\n */\nexport const SOCKETHUB_BASE_CONTEXT_URL =\n \"https://sockethub.org/ns/context/v1.jsonld\";\n\n/**\n * URL prefix for per-platform context URLs.\n */\nexport const PLATFORM_CONTEXT_PREFIX =\n \"https://sockethub.org/ns/context/platform/\";\n\n/**\n * Built-in pseudo-platform used for server-side error payloads.\n */\nexport const ERROR_PLATFORM_ID = \"error\";\nexport const ERROR_PLATFORM_CONTEXT_URL =\n \"https://sockethub.org/ns/context/platform/error/v1.jsonld\";\n\n/**\n * Built-in pseudo-platform used for internal control messages.\n */\nexport const INTERNAL_PLATFORM_ID = \"sockethub:internal\";\nexport const INTERNAL_PLATFORM_CONTEXT_URL =\n \"https://sockethub.org/ns/context/platform/sockethub:internal/v1.jsonld\";\n\nconst platformContextToPlatformId = new Map<string, string>();\nconst platformContextToSchemaId = new Map<string, string>();\nconst platformContextToCredentialsSchemaId = new Map<string, string>();\n\n/**\n * Build the canonical Sockethub @context array from a platform id or full context URL.\n */\nexport function buildCanonicalContext(platform: string): JsonLdContext {\n const platformUrl = platform.startsWith(\"https://\")\n ? platform\n : `${PLATFORM_CONTEXT_PREFIX}${platform}/v1.jsonld`;\n return [AS2_BASE_CONTEXT_URL, SOCKETHUB_BASE_CONTEXT_URL, platformUrl];\n}\n\n/**\n * Extract the platform ID from a canonical @context array.\n */\nexport function platformIdFromContext(\n context: string[] | unknown,\n): string | undefined {\n if (!Array.isArray(context)) {\n return undefined;\n }\n for (const entry of context) {\n if (\n typeof entry === \"string\" &&\n entry.startsWith(PLATFORM_CONTEXT_PREFIX)\n ) {\n const rest = entry.slice(PLATFORM_CONTEXT_PREFIX.length);\n const slashIdx = rest.indexOf(\"/\");\n if (slashIdx > 0) {\n return rest.slice(0, slashIdx);\n }\n }\n }\n return undefined;\n}\n\n/**\n * Normalize unknown @context input into a string-only array.\n */\nfunction normalizeContextArray(value: unknown): Array<string> {\n if (!Array.isArray(value)) {\n return [];\n }\n return value.filter((entry): entry is string => typeof entry === \"string\");\n}\n\n/**\n * Get a normalized @context array from an activity stream.\n */\nexport function getContextArray(msg: ActivityStream): Array<string> {\n return normalizeContextArray(msg[\"@context\"]);\n}\n\n/**\n * Register a platform context URL and its schema IDs for runtime resolution.\n */\nexport function registerPlatformContext(\n platformId: string,\n platformContextUrl: string,\n schemaId: string,\n credentialsSchemaId: string,\n) {\n platformContextToPlatformId.set(platformContextUrl, platformId);\n platformContextToSchemaId.set(platformContextUrl, schemaId);\n platformContextToCredentialsSchemaId.set(\n platformContextUrl,\n credentialsSchemaId,\n );\n}\n\n/**\n * Resolve the single registered platform context URL from a message.\n * Returns null when there are zero or multiple registered platform contexts.\n */\nexport function resolvePlatformContextUrl(msg: ActivityStream): string | null {\n const contexts = getContextArray(msg);\n const matches = contexts.filter((contextUrl) =>\n platformContextToPlatformId.has(contextUrl),\n );\n if (matches.length !== 1) {\n return null;\n }\n return matches[0];\n}\n\n/**\n * Resolve a platform ID from a platform context URL.\n */\nexport function getPlatformIdByContextUrl(\n platformContextUrl: string,\n): string | undefined {\n return platformContextToPlatformId.get(platformContextUrl);\n}\n\n/**\n * Resolve a message schema ID from a platform context URL.\n */\nexport function getSchemaIdByContextUrl(\n platformContextUrl: string,\n): string | undefined {\n return platformContextToSchemaId.get(platformContextUrl);\n}\n\n/**\n * Resolve a credentials schema ID from a platform context URL.\n */\nexport function getCredentialsSchemaIdByContextUrl(\n platformContextUrl: string,\n): string | undefined {\n return platformContextToCredentialsSchemaId.get(platformContextUrl);\n}\n",
|
|
7
|
+
"import {\n AS2_BASE_CONTEXT_URL,\n SOCKETHUB_BASE_CONTEXT_URL,\n} from \"../context.js\";\nimport {\n ObjectTypesSchema,\n validActorRefs,\n validTargetRefs,\n} from \"../helpers/objects.js\";\n\nconst contextSchema = {\n type: \"array\",\n minItems: 3,\n maxItems: 3,\n items: {\n type: \"string\",\n },\n allOf: [\n {\n contains: {\n const: AS2_BASE_CONTEXT_URL,\n },\n },\n {\n contains: {\n const: SOCKETHUB_BASE_CONTEXT_URL,\n },\n },\n ],\n};\nconst typeSchema = {\n type: \"string\",\n};\n\nexport const ActivityStreamSchema = {\n $id: \"https://sockethub.org/schemas/v/activity-stream.json\",\n description: \"Schema for Sockethub Activity Streams\",\n\n type: \"object\",\n required: [\"@context\", \"type\", \"actor\"],\n // Reject unknown top-level message properties. Inbound messages carry only\n // the properties below; `error`/`sessionSecret` are added server-side after\n // validation, so they never reach this schema.\n additionalProperties: false,\n properties: {\n \"@context\": contextSchema,\n id: {\n type: \"string\",\n },\n type: typeSchema,\n actor: {\n type: \"object\",\n oneOf: validActorRefs,\n },\n target: {\n type: \"object\",\n oneOf: validTargetRefs,\n },\n // Object shape is validated per-platform by each platform's `messages`\n // (inbound) and `responses` (outbound) schemas, which own their object\n // vocabulary. The base envelope only requires it to be an object.\n object: {\n type: \"object\",\n },\n published: {\n type: \"string\",\n format: \"date-time\",\n },\n },\n\n definitions: {\n type: ObjectTypesSchema,\n },\n};\n"
|
|
8
|
+
],
|
|
9
|
+
"mappings": ";AAIO,IAAM,oBAAoB;AAAA,EAC7B,MAAM;AAAA,IACF,UAAU,CAAC,MAAM,MAAM;AAAA,IACvB,sBAAsB;AAAA,IACtB,YAAY;AAAA,MACR,MAAM;AAAA,QACF,MAAM,CAAC,MAAM;AAAA,MACjB;AAAA,MACA,IAAI;AAAA,QACA,MAAM;AAAA,QACN,QAAQ;AAAA,MACZ;AAAA,MACA,MAAM;AAAA,QACF,MAAM;AAAA,MACV;AAAA,MACA,aAAa;AAAA,QACT,MAAM;AAAA,MACV;AAAA,MACA,QAAQ;AAAA,QACJ,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,IAAI;AAAA,MACA,MAAM;AAAA,IACV;AAAA,IACA,MAAM;AAAA,IACN,OAAO;AAAA,MACH,MAAM;AAAA,MACN,OAAO;AAAA,IACX;AAAA,IACA,QAAQ;AAAA,MACJ,MAAM;AAAA,MACN,OAAO;AAAA,IACX;AAAA,IAIA,QAAQ;AAAA,MACJ,MAAM;AAAA,IACV;AAAA,IACA,WAAW;AAAA,MACP,MAAM;AAAA,MACN,QAAQ;AAAA,IACZ;AAAA,EACJ;AAAA,EAEA,aAAa;AAAA,IACT,MAAM;AAAA,EACV;AACJ;",
|
|
10
|
+
"debugId": "25E0C4DC556BC56D64756E2164756E21",
|
|
11
|
+
"names": []
|
|
12
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Substitute the `/v/` placeholder segment in a canonical schema `$id` with a
|
|
3
|
+
* concrete package version, e.g.
|
|
4
|
+
* `https://sockethub.org/schemas/v/sockethub-config.json` →
|
|
5
|
+
* `https://sockethub.org/schemas/3.0.0/sockethub-config.json`.
|
|
6
|
+
*
|
|
7
|
+
* Shared by the build's JSON-schema export (which stamps the version into the
|
|
8
|
+
* published artifacts) and by `SockethubConfigSchemaId`, so the two never
|
|
9
|
+
* drift.
|
|
10
|
+
*/
|
|
11
|
+
export declare function versionedSchemaId(id: string, version: string): string;
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
export declare const ActivityStreamSchema: {
|
|
2
|
+
$id: string;
|
|
3
|
+
description: string;
|
|
4
|
+
type: string;
|
|
5
|
+
required: string[];
|
|
6
|
+
additionalProperties: boolean;
|
|
7
|
+
properties: {
|
|
8
|
+
"@context": {
|
|
9
|
+
type: string;
|
|
10
|
+
minItems: number;
|
|
11
|
+
maxItems: number;
|
|
12
|
+
items: {
|
|
13
|
+
type: string;
|
|
14
|
+
};
|
|
15
|
+
allOf: {
|
|
16
|
+
contains: {
|
|
17
|
+
const: string;
|
|
18
|
+
};
|
|
19
|
+
}[];
|
|
20
|
+
};
|
|
21
|
+
id: {
|
|
22
|
+
type: string;
|
|
23
|
+
};
|
|
24
|
+
type: {
|
|
25
|
+
type: string;
|
|
26
|
+
};
|
|
27
|
+
actor: {
|
|
28
|
+
type: string;
|
|
29
|
+
oneOf: {
|
|
30
|
+
$ref: string;
|
|
31
|
+
}[];
|
|
32
|
+
};
|
|
33
|
+
target: {
|
|
34
|
+
type: string;
|
|
35
|
+
oneOf: {
|
|
36
|
+
$ref: string;
|
|
37
|
+
}[];
|
|
38
|
+
};
|
|
39
|
+
object: {
|
|
40
|
+
type: string;
|
|
41
|
+
};
|
|
42
|
+
published: {
|
|
43
|
+
type: string;
|
|
44
|
+
format: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
definitions: {
|
|
48
|
+
type: {
|
|
49
|
+
feed: {
|
|
50
|
+
required: string[];
|
|
51
|
+
additionalProperties: boolean;
|
|
52
|
+
properties: {
|
|
53
|
+
type: {
|
|
54
|
+
enum: string[];
|
|
55
|
+
};
|
|
56
|
+
id: {
|
|
57
|
+
type: string;
|
|
58
|
+
format: string;
|
|
59
|
+
};
|
|
60
|
+
name: {
|
|
61
|
+
type: string;
|
|
62
|
+
};
|
|
63
|
+
description: {
|
|
64
|
+
type: string;
|
|
65
|
+
};
|
|
66
|
+
author: {
|
|
67
|
+
type: string;
|
|
68
|
+
};
|
|
69
|
+
favicon: {
|
|
70
|
+
type: string;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
person: {
|
|
75
|
+
required: string[];
|
|
76
|
+
additionalProperties: boolean;
|
|
77
|
+
properties: {
|
|
78
|
+
id: {
|
|
79
|
+
type: string;
|
|
80
|
+
};
|
|
81
|
+
type: {
|
|
82
|
+
enum: string[];
|
|
83
|
+
};
|
|
84
|
+
name: {
|
|
85
|
+
type: string;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
room: {
|
|
90
|
+
required: string[];
|
|
91
|
+
additionalProperties: boolean;
|
|
92
|
+
properties: {
|
|
93
|
+
id: {
|
|
94
|
+
type: string;
|
|
95
|
+
};
|
|
96
|
+
type: {
|
|
97
|
+
enum: string[];
|
|
98
|
+
};
|
|
99
|
+
name: {
|
|
100
|
+
type: string;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
service: {
|
|
105
|
+
required: string[];
|
|
106
|
+
additionalProperties: boolean;
|
|
107
|
+
properties: {
|
|
108
|
+
id: {
|
|
109
|
+
type: string;
|
|
110
|
+
};
|
|
111
|
+
type: {
|
|
112
|
+
enum: string[];
|
|
113
|
+
};
|
|
114
|
+
name: {
|
|
115
|
+
type: string;
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
platform: {
|
|
120
|
+
required: string[];
|
|
121
|
+
additionalProperties: boolean;
|
|
122
|
+
properties: {
|
|
123
|
+
id: {
|
|
124
|
+
type: string;
|
|
125
|
+
};
|
|
126
|
+
type: {
|
|
127
|
+
enum: string[];
|
|
128
|
+
};
|
|
129
|
+
name: {
|
|
130
|
+
type: string;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
website: {
|
|
135
|
+
required: string[];
|
|
136
|
+
additionalProperties: boolean;
|
|
137
|
+
properties: {
|
|
138
|
+
id: {
|
|
139
|
+
type: string;
|
|
140
|
+
format: string;
|
|
141
|
+
};
|
|
142
|
+
type: {
|
|
143
|
+
enum: string[];
|
|
144
|
+
};
|
|
145
|
+
name: {
|
|
146
|
+
type: string;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
address: {
|
|
151
|
+
required: string[];
|
|
152
|
+
additionalProperties: boolean;
|
|
153
|
+
properties: {
|
|
154
|
+
type: {
|
|
155
|
+
enum: string[];
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
calendar: {
|
|
160
|
+
required: string[];
|
|
161
|
+
additionalProperties: boolean;
|
|
162
|
+
properties: {
|
|
163
|
+
id: {
|
|
164
|
+
type: string;
|
|
165
|
+
format: string;
|
|
166
|
+
};
|
|
167
|
+
type: {
|
|
168
|
+
enum: string[];
|
|
169
|
+
};
|
|
170
|
+
name: {
|
|
171
|
+
type: string;
|
|
172
|
+
};
|
|
173
|
+
components: {
|
|
174
|
+
type: string;
|
|
175
|
+
items: {
|
|
176
|
+
enum: string[];
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
addressBook: {
|
|
182
|
+
required: string[];
|
|
183
|
+
additionalProperties: boolean;
|
|
184
|
+
properties: {
|
|
185
|
+
id: {
|
|
186
|
+
type: string;
|
|
187
|
+
format: string;
|
|
188
|
+
};
|
|
189
|
+
type: {
|
|
190
|
+
enum: string[];
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
};
|