@sockethub/schemas 3.0.0-beta.1 → 3.0.0-beta.3
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/contexts/platform/email/v1.jsonld +8 -0
- package/dist/contexts/platform/instagram/v1.jsonld +8 -0
- package/dist/contexts/platform/messenger/v1.jsonld +8 -0
- package/dist/contexts/platform/whatsapp/v1.jsonld +8 -0
- package/dist/index.js +33 -9
- package/dist/index.js.map +4 -4
- package/dist/maps/context-map.json +14 -2
- package/dist/schemas/json/activity-stream.json +1 -1
- package/dist/schemas/json/platform.json +1 -1
- package/dist/schemas/json/service-descriptor.json +1 -1
- package/dist/schemas/json/sockethub-config.json +36 -1
- package/dist/schemas/platform/caldav/v1/messages.schema.json +7 -0
- package/dist/schemas/platform/email/v1/credentials.schema.json +139 -0
- package/dist/schemas/platform/email/v1/messages.schema.json +289 -0
- package/dist/schemas/platform/instagram/v1/credentials.schema.json +67 -0
- package/dist/schemas/platform/instagram/v1/messages.schema.json +72 -0
- package/dist/schemas/platform/messenger/v1/credentials.schema.json +31 -0
- package/dist/schemas/platform/messenger/v1/messages.schema.json +72 -0
- package/dist/schemas/platform/whatsapp/v1/credentials.schema.json +31 -0
- package/dist/schemas/platform/whatsapp/v1/messages.schema.json +68 -0
- package/dist/schemas/sockethub-config.d.ts +31 -0
- package/dist/types.d.ts +4 -0
- package/dist/validator.d.ts +2 -1
- package/package.json +2 -2
|
@@ -1,37 +1,49 @@
|
|
|
1
1
|
{
|
|
2
|
-
"schemaVersion": "3.0.0-beta.
|
|
3
|
-
"generatedAt": "2026-11-
|
|
2
|
+
"schemaVersion": "3.0.0-beta.3",
|
|
3
|
+
"generatedAt": "2026-11-07T20:11:27.983Z",
|
|
4
4
|
"contextToPlatformId": {
|
|
5
5
|
"https://sockethub.org/ns/context/platform/caldav/v1.jsonld": "caldav",
|
|
6
6
|
"https://sockethub.org/ns/context/platform/carddav/v1.jsonld": "carddav",
|
|
7
7
|
"https://sockethub.org/ns/context/platform/dummy/v1.jsonld": "dummy",
|
|
8
|
+
"https://sockethub.org/ns/context/platform/email/v1.jsonld": "email",
|
|
8
9
|
"https://sockethub.org/ns/context/platform/error/v1.jsonld": "error",
|
|
9
10
|
"https://sockethub.org/ns/context/platform/feeds/v1.jsonld": "feeds",
|
|
11
|
+
"https://sockethub.org/ns/context/platform/instagram/v1.jsonld": "instagram",
|
|
10
12
|
"https://sockethub.org/ns/context/platform/irc/v1.jsonld": "irc",
|
|
13
|
+
"https://sockethub.org/ns/context/platform/messenger/v1.jsonld": "messenger",
|
|
11
14
|
"https://sockethub.org/ns/context/platform/metadata/v1.jsonld": "metadata",
|
|
12
15
|
"https://sockethub.org/ns/context/platform/sockethub:internal/v1.jsonld": "sockethub:internal",
|
|
16
|
+
"https://sockethub.org/ns/context/platform/whatsapp/v1.jsonld": "whatsapp",
|
|
13
17
|
"https://sockethub.org/ns/context/platform/xmpp/v1.jsonld": "xmpp"
|
|
14
18
|
},
|
|
15
19
|
"contextToSchemaId": {
|
|
16
20
|
"https://sockethub.org/ns/context/platform/caldav/v1.jsonld": "https://sockethub.org/schemas/as2/platform/caldav/v1/messages.schema.json",
|
|
17
21
|
"https://sockethub.org/ns/context/platform/carddav/v1.jsonld": "https://sockethub.org/schemas/as2/platform/carddav/v1/messages.schema.json",
|
|
18
22
|
"https://sockethub.org/ns/context/platform/dummy/v1.jsonld": "https://sockethub.org/schemas/as2/platform/dummy/v1/messages.schema.json",
|
|
23
|
+
"https://sockethub.org/ns/context/platform/email/v1.jsonld": "https://sockethub.org/schemas/as2/platform/email/v1/messages.schema.json",
|
|
19
24
|
"https://sockethub.org/ns/context/platform/error/v1.jsonld": "https://sockethub.org/schemas/as2/platform/error/v1/messages.schema.json",
|
|
20
25
|
"https://sockethub.org/ns/context/platform/feeds/v1.jsonld": "https://sockethub.org/schemas/as2/platform/feeds/v1/messages.schema.json",
|
|
26
|
+
"https://sockethub.org/ns/context/platform/instagram/v1.jsonld": "https://sockethub.org/schemas/as2/platform/instagram/v1/messages.schema.json",
|
|
21
27
|
"https://sockethub.org/ns/context/platform/irc/v1.jsonld": "https://sockethub.org/schemas/as2/platform/irc/v1/messages.schema.json",
|
|
28
|
+
"https://sockethub.org/ns/context/platform/messenger/v1.jsonld": "https://sockethub.org/schemas/as2/platform/messenger/v1/messages.schema.json",
|
|
22
29
|
"https://sockethub.org/ns/context/platform/metadata/v1.jsonld": "https://sockethub.org/schemas/as2/platform/metadata/v1/messages.schema.json",
|
|
23
30
|
"https://sockethub.org/ns/context/platform/sockethub:internal/v1.jsonld": "https://sockethub.org/schemas/as2/platform/sockethub%3Ainternal/v1/messages.schema.json",
|
|
31
|
+
"https://sockethub.org/ns/context/platform/whatsapp/v1.jsonld": "https://sockethub.org/schemas/as2/platform/whatsapp/v1/messages.schema.json",
|
|
24
32
|
"https://sockethub.org/ns/context/platform/xmpp/v1.jsonld": "https://sockethub.org/schemas/as2/platform/xmpp/v1/messages.schema.json"
|
|
25
33
|
},
|
|
26
34
|
"contextToCredentialsSchemaId": {
|
|
27
35
|
"https://sockethub.org/ns/context/platform/caldav/v1.jsonld": "https://sockethub.org/schemas/as2/platform/caldav/v1/credentials.schema.json",
|
|
28
36
|
"https://sockethub.org/ns/context/platform/carddav/v1.jsonld": "https://sockethub.org/schemas/as2/platform/carddav/v1/credentials.schema.json",
|
|
29
37
|
"https://sockethub.org/ns/context/platform/dummy/v1.jsonld": "https://sockethub.org/schemas/as2/platform/dummy/v1/credentials.schema.json",
|
|
38
|
+
"https://sockethub.org/ns/context/platform/email/v1.jsonld": "https://sockethub.org/schemas/as2/platform/email/v1/credentials.schema.json",
|
|
30
39
|
"https://sockethub.org/ns/context/platform/error/v1.jsonld": "https://sockethub.org/schemas/as2/platform/error/v1/credentials.schema.json",
|
|
31
40
|
"https://sockethub.org/ns/context/platform/feeds/v1.jsonld": "https://sockethub.org/schemas/as2/platform/feeds/v1/credentials.schema.json",
|
|
41
|
+
"https://sockethub.org/ns/context/platform/instagram/v1.jsonld": "https://sockethub.org/schemas/as2/platform/instagram/v1/credentials.schema.json",
|
|
32
42
|
"https://sockethub.org/ns/context/platform/irc/v1.jsonld": "https://sockethub.org/schemas/as2/platform/irc/v1/credentials.schema.json",
|
|
43
|
+
"https://sockethub.org/ns/context/platform/messenger/v1.jsonld": "https://sockethub.org/schemas/as2/platform/messenger/v1/credentials.schema.json",
|
|
33
44
|
"https://sockethub.org/ns/context/platform/metadata/v1.jsonld": "https://sockethub.org/schemas/as2/platform/metadata/v1/credentials.schema.json",
|
|
34
45
|
"https://sockethub.org/ns/context/platform/sockethub:internal/v1.jsonld": "https://sockethub.org/schemas/as2/platform/sockethub%3Ainternal/v1/credentials.schema.json",
|
|
46
|
+
"https://sockethub.org/ns/context/platform/whatsapp/v1.jsonld": "https://sockethub.org/schemas/as2/platform/whatsapp/v1/credentials.schema.json",
|
|
35
47
|
"https://sockethub.org/ns/context/platform/xmpp/v1.jsonld": "https://sockethub.org/schemas/as2/platform/xmpp/v1/credentials.schema.json"
|
|
36
48
|
},
|
|
37
49
|
"constants": {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$id": "https://sockethub.org/schemas/3.0.0-beta.
|
|
2
|
+
"$id": "https://sockethub.org/schemas/3.0.0-beta.3/sockethub-config.json",
|
|
3
3
|
"description": "Sockethub Config Schema",
|
|
4
4
|
"type": "object",
|
|
5
5
|
"required": [
|
|
@@ -111,8 +111,12 @@
|
|
|
111
111
|
"@sockethub/platform-caldav",
|
|
112
112
|
"@sockethub/platform-dummy",
|
|
113
113
|
"@sockethub/platform-feeds",
|
|
114
|
+
"@sockethub/platform-email",
|
|
114
115
|
"@sockethub/platform-irc",
|
|
115
116
|
"@sockethub/platform-metadata",
|
|
117
|
+
"@sockethub/platform-messenger",
|
|
118
|
+
"@sockethub/platform-instagram",
|
|
119
|
+
"@sockethub/platform-whatsapp",
|
|
116
120
|
"@sockethub/platform-xmpp"
|
|
117
121
|
]
|
|
118
122
|
},
|
|
@@ -138,6 +142,10 @@
|
|
|
138
142
|
"concurrency": {
|
|
139
143
|
"type": "integer",
|
|
140
144
|
"minimum": 1
|
|
145
|
+
},
|
|
146
|
+
"discoveryCacheTtlMs": {
|
|
147
|
+
"type": "integer",
|
|
148
|
+
"minimum": 0
|
|
141
149
|
}
|
|
142
150
|
}
|
|
143
151
|
},
|
|
@@ -158,6 +166,24 @@
|
|
|
158
166
|
"concurrency": {
|
|
159
167
|
"type": "integer",
|
|
160
168
|
"minimum": 1
|
|
169
|
+
},
|
|
170
|
+
"discoveryCacheTtlMs": {
|
|
171
|
+
"type": "integer",
|
|
172
|
+
"minimum": 0
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
},
|
|
176
|
+
"@sockethub/platform-email": {
|
|
177
|
+
"type": "object",
|
|
178
|
+
"additionalProperties": false,
|
|
179
|
+
"properties": {
|
|
180
|
+
"connectTimeoutMs": {
|
|
181
|
+
"type": "integer",
|
|
182
|
+
"minimum": 5000,
|
|
183
|
+
"maximum": 120000
|
|
184
|
+
},
|
|
185
|
+
"allowPrivateAddresses": {
|
|
186
|
+
"type": "boolean"
|
|
161
187
|
}
|
|
162
188
|
}
|
|
163
189
|
},
|
|
@@ -193,6 +219,9 @@
|
|
|
193
219
|
"properties": {
|
|
194
220
|
"connectTimeoutMs": {
|
|
195
221
|
"type": "number"
|
|
222
|
+
},
|
|
223
|
+
"allowPrivateAddresses": {
|
|
224
|
+
"type": "boolean"
|
|
196
225
|
}
|
|
197
226
|
}
|
|
198
227
|
},
|
|
@@ -315,6 +344,12 @@
|
|
|
315
344
|
"default": 20,
|
|
316
345
|
"description": "Maximum persistent instances per client IP, including HTTP actions. 0 disables the cap."
|
|
317
346
|
},
|
|
347
|
+
"maxStartsPerIpPerMinute": {
|
|
348
|
+
"type": "integer",
|
|
349
|
+
"minimum": 0,
|
|
350
|
+
"default": 60,
|
|
351
|
+
"description": "Maximum new persistent instances a client IP may start per minute, including HTTP actions. Bounds fork/teardown churn that the concurrent caps allow. Reusing a running instance does not count. 0 disables the cap."
|
|
352
|
+
},
|
|
318
353
|
"maxPlatformInstances": {
|
|
319
354
|
"type": "number",
|
|
320
355
|
"minimum": 0,
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
{
|
|
2
|
+
"required": [
|
|
3
|
+
"object"
|
|
4
|
+
],
|
|
5
|
+
"properties": {
|
|
6
|
+
"object": {
|
|
7
|
+
"type": "object",
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"required": [
|
|
10
|
+
"type",
|
|
11
|
+
"from"
|
|
12
|
+
],
|
|
13
|
+
"properties": {
|
|
14
|
+
"type": {
|
|
15
|
+
"const": "credentials"
|
|
16
|
+
},
|
|
17
|
+
"from": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"format": "email",
|
|
20
|
+
"maxLength": 254
|
|
21
|
+
},
|
|
22
|
+
"imap": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"required": [
|
|
26
|
+
"host",
|
|
27
|
+
"username"
|
|
28
|
+
],
|
|
29
|
+
"properties": {
|
|
30
|
+
"host": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"minLength": 1,
|
|
33
|
+
"maxLength": 253,
|
|
34
|
+
"pattern": "^[^\\s/\\\\]+$"
|
|
35
|
+
},
|
|
36
|
+
"port": {
|
|
37
|
+
"type": "integer",
|
|
38
|
+
"minimum": 1,
|
|
39
|
+
"maximum": 65535
|
|
40
|
+
},
|
|
41
|
+
"secure": {
|
|
42
|
+
"type": "boolean"
|
|
43
|
+
},
|
|
44
|
+
"username": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"minLength": 1,
|
|
47
|
+
"maxLength": 1024
|
|
48
|
+
},
|
|
49
|
+
"password": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"minLength": 1,
|
|
52
|
+
"maxLength": 4096
|
|
53
|
+
},
|
|
54
|
+
"token": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"minLength": 1,
|
|
57
|
+
"maxLength": 16384
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"oneOf": [
|
|
61
|
+
{
|
|
62
|
+
"required": [
|
|
63
|
+
"password"
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"required": [
|
|
68
|
+
"token"
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
"smtp": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"additionalProperties": false,
|
|
76
|
+
"required": [
|
|
77
|
+
"host",
|
|
78
|
+
"username"
|
|
79
|
+
],
|
|
80
|
+
"properties": {
|
|
81
|
+
"host": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"minLength": 1,
|
|
84
|
+
"maxLength": 253,
|
|
85
|
+
"pattern": "^[^\\s/\\\\]+$"
|
|
86
|
+
},
|
|
87
|
+
"port": {
|
|
88
|
+
"type": "integer",
|
|
89
|
+
"minimum": 1,
|
|
90
|
+
"maximum": 65535
|
|
91
|
+
},
|
|
92
|
+
"secure": {
|
|
93
|
+
"type": "boolean"
|
|
94
|
+
},
|
|
95
|
+
"username": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"minLength": 1,
|
|
98
|
+
"maxLength": 1024
|
|
99
|
+
},
|
|
100
|
+
"password": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"minLength": 1,
|
|
103
|
+
"maxLength": 4096
|
|
104
|
+
},
|
|
105
|
+
"token": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"minLength": 1,
|
|
108
|
+
"maxLength": 16384
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"oneOf": [
|
|
112
|
+
{
|
|
113
|
+
"required": [
|
|
114
|
+
"password"
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"required": [
|
|
119
|
+
"token"
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"anyOf": [
|
|
126
|
+
{
|
|
127
|
+
"required": [
|
|
128
|
+
"imap"
|
|
129
|
+
]
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"required": [
|
|
133
|
+
"smtp"
|
|
134
|
+
]
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
{
|
|
2
|
+
"required": [
|
|
3
|
+
"type"
|
|
4
|
+
],
|
|
5
|
+
"properties": {
|
|
6
|
+
"type": {
|
|
7
|
+
"enum": [
|
|
8
|
+
"connect",
|
|
9
|
+
"disconnect",
|
|
10
|
+
"fetch",
|
|
11
|
+
"watch",
|
|
12
|
+
"unwatch",
|
|
13
|
+
"send"
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
"object": {
|
|
17
|
+
"type": "object"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"allOf": [
|
|
21
|
+
{
|
|
22
|
+
"if": {
|
|
23
|
+
"properties": {
|
|
24
|
+
"type": {
|
|
25
|
+
"const": "fetch"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"then": {
|
|
30
|
+
"properties": {
|
|
31
|
+
"object": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"additionalProperties": false,
|
|
34
|
+
"properties": {
|
|
35
|
+
"type": {
|
|
36
|
+
"const": "message"
|
|
37
|
+
},
|
|
38
|
+
"from": {
|
|
39
|
+
"type": "array",
|
|
40
|
+
"minItems": 1,
|
|
41
|
+
"maxItems": 100,
|
|
42
|
+
"uniqueItems": true,
|
|
43
|
+
"items": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"format": "email",
|
|
46
|
+
"maxLength": 254
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"to": {
|
|
50
|
+
"type": "array",
|
|
51
|
+
"minItems": 1,
|
|
52
|
+
"maxItems": 100,
|
|
53
|
+
"uniqueItems": true,
|
|
54
|
+
"items": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"format": "email",
|
|
57
|
+
"maxLength": 254
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"match": {
|
|
61
|
+
"enum": [
|
|
62
|
+
"any",
|
|
63
|
+
"all"
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
"folders": {
|
|
67
|
+
"type": "array",
|
|
68
|
+
"minItems": 1,
|
|
69
|
+
"maxItems": 10,
|
|
70
|
+
"uniqueItems": true,
|
|
71
|
+
"items": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"minLength": 1,
|
|
74
|
+
"maxLength": 1024,
|
|
75
|
+
"pattern": "^[^\\r\\n\\u0000]+$"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"cursors": {
|
|
79
|
+
"type": "object",
|
|
80
|
+
"maxProperties": 10,
|
|
81
|
+
"additionalProperties": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"additionalProperties": false,
|
|
84
|
+
"required": [
|
|
85
|
+
"uidValidity",
|
|
86
|
+
"uid"
|
|
87
|
+
],
|
|
88
|
+
"properties": {
|
|
89
|
+
"uidValidity": {
|
|
90
|
+
"type": "string",
|
|
91
|
+
"pattern": "^[0-9]+$",
|
|
92
|
+
"maxLength": 20
|
|
93
|
+
},
|
|
94
|
+
"uid": {
|
|
95
|
+
"type": "integer",
|
|
96
|
+
"minimum": 0,
|
|
97
|
+
"maximum": 4294967295
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"limit": {
|
|
103
|
+
"type": "integer",
|
|
104
|
+
"minimum": 1,
|
|
105
|
+
"maximum": 50
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"if": {
|
|
114
|
+
"properties": {
|
|
115
|
+
"type": {
|
|
116
|
+
"const": "watch"
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"then": {
|
|
121
|
+
"properties": {
|
|
122
|
+
"object": {
|
|
123
|
+
"type": "object",
|
|
124
|
+
"additionalProperties": false,
|
|
125
|
+
"properties": {
|
|
126
|
+
"type": {
|
|
127
|
+
"const": "message"
|
|
128
|
+
},
|
|
129
|
+
"from": {
|
|
130
|
+
"type": "array",
|
|
131
|
+
"minItems": 1,
|
|
132
|
+
"maxItems": 100,
|
|
133
|
+
"uniqueItems": true,
|
|
134
|
+
"items": {
|
|
135
|
+
"type": "string",
|
|
136
|
+
"format": "email",
|
|
137
|
+
"maxLength": 254
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"to": {
|
|
141
|
+
"type": "array",
|
|
142
|
+
"minItems": 1,
|
|
143
|
+
"maxItems": 100,
|
|
144
|
+
"uniqueItems": true,
|
|
145
|
+
"items": {
|
|
146
|
+
"type": "string",
|
|
147
|
+
"format": "email",
|
|
148
|
+
"maxLength": 254
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"match": {
|
|
152
|
+
"enum": [
|
|
153
|
+
"any",
|
|
154
|
+
"all"
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
"folder": {
|
|
158
|
+
"type": "string",
|
|
159
|
+
"minLength": 1,
|
|
160
|
+
"maxLength": 1024,
|
|
161
|
+
"pattern": "^[^\\r\\n\\u0000]+$"
|
|
162
|
+
},
|
|
163
|
+
"cursor": {
|
|
164
|
+
"type": "object",
|
|
165
|
+
"additionalProperties": false,
|
|
166
|
+
"required": [
|
|
167
|
+
"uidValidity",
|
|
168
|
+
"uid"
|
|
169
|
+
],
|
|
170
|
+
"properties": {
|
|
171
|
+
"uidValidity": {
|
|
172
|
+
"type": "string",
|
|
173
|
+
"pattern": "^[0-9]+$",
|
|
174
|
+
"maxLength": 20
|
|
175
|
+
},
|
|
176
|
+
"uid": {
|
|
177
|
+
"type": "integer",
|
|
178
|
+
"minimum": 0,
|
|
179
|
+
"maximum": 4294967295
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"if": {
|
|
190
|
+
"properties": {
|
|
191
|
+
"type": {
|
|
192
|
+
"const": "send"
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"then": {
|
|
197
|
+
"required": [
|
|
198
|
+
"object"
|
|
199
|
+
],
|
|
200
|
+
"properties": {
|
|
201
|
+
"object": {
|
|
202
|
+
"type": "object",
|
|
203
|
+
"additionalProperties": false,
|
|
204
|
+
"properties": {
|
|
205
|
+
"type": {
|
|
206
|
+
"const": "message"
|
|
207
|
+
},
|
|
208
|
+
"to": {
|
|
209
|
+
"type": "array",
|
|
210
|
+
"minItems": 1,
|
|
211
|
+
"maxItems": 100,
|
|
212
|
+
"uniqueItems": true,
|
|
213
|
+
"items": {
|
|
214
|
+
"type": "string",
|
|
215
|
+
"format": "email",
|
|
216
|
+
"maxLength": 254
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"cc": {
|
|
220
|
+
"type": "array",
|
|
221
|
+
"minItems": 1,
|
|
222
|
+
"maxItems": 100,
|
|
223
|
+
"uniqueItems": true,
|
|
224
|
+
"items": {
|
|
225
|
+
"type": "string",
|
|
226
|
+
"format": "email",
|
|
227
|
+
"maxLength": 254
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
"bcc": {
|
|
231
|
+
"type": "array",
|
|
232
|
+
"minItems": 1,
|
|
233
|
+
"maxItems": 100,
|
|
234
|
+
"uniqueItems": true,
|
|
235
|
+
"items": {
|
|
236
|
+
"type": "string",
|
|
237
|
+
"format": "email",
|
|
238
|
+
"maxLength": 254
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
"subject": {
|
|
242
|
+
"type": "string",
|
|
243
|
+
"maxLength": 998,
|
|
244
|
+
"pattern": "^[^\\r\\n]*$"
|
|
245
|
+
},
|
|
246
|
+
"content": {
|
|
247
|
+
"type": "string",
|
|
248
|
+
"maxLength": 131072
|
|
249
|
+
},
|
|
250
|
+
"html": {
|
|
251
|
+
"type": "string",
|
|
252
|
+
"maxLength": 131072
|
|
253
|
+
},
|
|
254
|
+
"inReplyTo": {
|
|
255
|
+
"type": "string",
|
|
256
|
+
"maxLength": 998,
|
|
257
|
+
"pattern": "^[^\\r\\n]+$"
|
|
258
|
+
},
|
|
259
|
+
"references": {
|
|
260
|
+
"type": "array",
|
|
261
|
+
"maxItems": 50,
|
|
262
|
+
"items": {
|
|
263
|
+
"type": "string",
|
|
264
|
+
"maxLength": 998,
|
|
265
|
+
"pattern": "^[^\\r\\n]+$"
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
"required": [
|
|
270
|
+
"to"
|
|
271
|
+
],
|
|
272
|
+
"anyOf": [
|
|
273
|
+
{
|
|
274
|
+
"required": [
|
|
275
|
+
"content"
|
|
276
|
+
]
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"required": [
|
|
280
|
+
"html"
|
|
281
|
+
]
|
|
282
|
+
}
|
|
283
|
+
]
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
]
|
|
289
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"required": [
|
|
3
|
+
"object"
|
|
4
|
+
],
|
|
5
|
+
"properties": {
|
|
6
|
+
"object": {
|
|
7
|
+
"type": "object",
|
|
8
|
+
"required": [
|
|
9
|
+
"type",
|
|
10
|
+
"token",
|
|
11
|
+
"apiVersion"
|
|
12
|
+
],
|
|
13
|
+
"additionalProperties": false,
|
|
14
|
+
"oneOf": [
|
|
15
|
+
{
|
|
16
|
+
"required": [
|
|
17
|
+
"login",
|
|
18
|
+
"pageId"
|
|
19
|
+
],
|
|
20
|
+
"properties": {
|
|
21
|
+
"login": {
|
|
22
|
+
"const": "facebook"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"properties": {
|
|
28
|
+
"login": {
|
|
29
|
+
"const": "instagram"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"not": {
|
|
33
|
+
"required": [
|
|
34
|
+
"pageId"
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"properties": {
|
|
40
|
+
"login": {
|
|
41
|
+
"enum": [
|
|
42
|
+
"instagram",
|
|
43
|
+
"facebook"
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
"pageId": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"pattern": "^[0-9]+$",
|
|
49
|
+
"maxLength": 128
|
|
50
|
+
},
|
|
51
|
+
"type": {
|
|
52
|
+
"const": "credentials"
|
|
53
|
+
},
|
|
54
|
+
"token": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"minLength": 1,
|
|
57
|
+
"maxLength": 8192,
|
|
58
|
+
"pattern": "^[^\\r\\n]+$"
|
|
59
|
+
},
|
|
60
|
+
"apiVersion": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"pattern": "^v[0-9]{1,3}\\.[0-9]{1,2}$"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|