@mdbase-dev/connect-protocol 0.1.0-beta.27 → 0.1.0-beta.29
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/application-authorization.d.ts +2 -3
- package/dist/application-authorization.js +5 -10
- package/dist/capabilities.d.ts +51 -0
- package/dist/capabilities.js +49 -0
- package/dist/connect-problems.generated.d.ts +53 -24
- package/dist/connect-problems.generated.js +38 -2
- package/dist/index.d.ts +8 -14
- package/dist/index.js +3 -2
- package/dist/manifest.d.ts +45 -0
- package/dist/manifest.js +355 -0
- package/package.json +10 -3
- package/schemas/connect-problem.v1.schema.json +165 -48
- package/schemas/connect-problems.v1.catalog.json +26 -3
- package/schemas/connect-protocol.v1.schema.json +3 -19
- package/schemas/mdbase-app.schema.json +60 -2
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
"access_paused": { "category": "availability", "recovery": "resume_connector_access" },
|
|
40
|
+
"application_identity_unavailable": { "category": "compatibility", "recovery": "upgrade_application" },
|
|
40
41
|
"approval_window_blocked": {
|
|
41
42
|
"category": "authorization",
|
|
42
43
|
"recovery": "reauthorize",
|
|
@@ -54,6 +55,7 @@
|
|
|
54
55
|
"authority_authorization_changed": { "category": "authorization", "recovery": "reauthorize" },
|
|
55
56
|
"authorization_cancelled": { "category": "cancellation", "recovery": "none" },
|
|
56
57
|
"authorization_expired": { "category": "authorization", "recovery": "reauthorize" },
|
|
58
|
+
"authorization_replayed": { "category": "integrity", "recovery": "reauthorize" },
|
|
57
59
|
"browser_required": { "category": "compatibility", "recovery": "none" },
|
|
58
60
|
"callback_url_required": { "category": "validation", "recovery": "fix_request" },
|
|
59
61
|
"change_cursor_reset": { "category": "conflict", "recovery": "refresh" },
|
|
@@ -151,7 +153,6 @@
|
|
|
151
153
|
"file_not_found": { "category": "conflict", "recovery": "refresh" },
|
|
152
154
|
"file_source_mismatch": { "category": "conflict", "recovery": "refresh" },
|
|
153
155
|
"file_upload_incomplete": { "category": "conflict", "recovery": "retry" },
|
|
154
|
-
"first_contact_handler_required": { "category": "compatibility", "recovery": "upgrade_application" },
|
|
155
156
|
"hosted_provider_unavailable": { "category": "availability", "recovery": "retry" },
|
|
156
157
|
"insufficient_access": {
|
|
157
158
|
"category": "authorization",
|
|
@@ -165,11 +166,32 @@
|
|
|
165
166
|
}
|
|
166
167
|
}
|
|
167
168
|
},
|
|
168
|
-
"
|
|
169
|
+
"invalid_application_authorization": { "category": "validation", "recovery": "fix_request" },
|
|
170
|
+
"invalid_application_manifest": {
|
|
171
|
+
"category": "validation",
|
|
172
|
+
"recovery": "fix_request",
|
|
173
|
+
"details": {
|
|
174
|
+
"required": ["issues"],
|
|
175
|
+
"properties": {
|
|
176
|
+
"issues": {
|
|
177
|
+
"type": "array",
|
|
178
|
+
"items": {
|
|
179
|
+
"type": "object",
|
|
180
|
+
"required": ["path", "keyword", "message", "params"],
|
|
181
|
+
"properties": {
|
|
182
|
+
"path": { "type": "string" },
|
|
183
|
+
"keyword": { "type": "string" },
|
|
184
|
+
"message": { "type": "string" },
|
|
185
|
+
"params": { "type": "object" }
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
},
|
|
169
192
|
"invalid_callback": { "category": "validation", "recovery": "fix_request" },
|
|
170
193
|
"invalid_device_authorization_response": { "category": "integrity", "recovery": "contact_support" },
|
|
171
194
|
"invalid_encrypted_response": { "category": "integrity", "recovery": "contact_support" },
|
|
172
|
-
"invalid_first_contact": { "category": "integrity", "recovery": "contact_support" },
|
|
173
195
|
"invalid_loopback_url": { "category": "validation", "recovery": "fix_request" },
|
|
174
196
|
"invalid_mutation_id": { "category": "validation", "recovery": "fix_request" },
|
|
175
197
|
"invalid_operation_response": { "category": "integrity", "recovery": "contact_support" },
|
|
@@ -219,6 +241,7 @@
|
|
|
219
241
|
}
|
|
220
242
|
}
|
|
221
243
|
},
|
|
244
|
+
"reconnect_required": { "category": "authorization", "recovery": "reauthorize" },
|
|
222
245
|
"redirect_uri_required": { "category": "validation", "recovery": "fix_request" },
|
|
223
246
|
"reference_updates_unsupported": { "category": "compatibility", "recovery": "fix_request" },
|
|
224
247
|
"relay_authorization_expired": { "category": "authorization", "recovery": "reauthorize" },
|
|
@@ -203,7 +203,7 @@
|
|
|
203
203
|
"grantPolicy": {
|
|
204
204
|
"type": "object",
|
|
205
205
|
"additionalProperties": false,
|
|
206
|
-
"required": ["id", "application_id", "collection_id", "operations", "scope", "application_name", "application_distribution", "application_homepage", "application_origin", "collection_name", "created_at", "encryption", "
|
|
206
|
+
"required": ["id", "application_id", "collection_id", "operations", "scope", "application_name", "application_distribution", "application_homepage", "application_origin", "collection_name", "created_at", "encryption", "application_authorization"],
|
|
207
207
|
"properties": {
|
|
208
208
|
"id": { "$ref": "#/$defs/uuid" },
|
|
209
209
|
"application_id": { "$ref": "#/$defs/uuid" },
|
|
@@ -232,24 +232,9 @@
|
|
|
232
232
|
"file_capability": {
|
|
233
233
|
"$ref": "https://mdbase.dev/connect/schemas/files.v1.json#/$defs/fileCapability"
|
|
234
234
|
},
|
|
235
|
-
"first_contact": { "$ref": "#/$defs/firstContactBinding" },
|
|
236
235
|
"application_authorization": { "$ref": "#/$defs/applicationAuthorizationProof" }
|
|
237
236
|
}
|
|
238
237
|
},
|
|
239
|
-
"firstContactBinding": {
|
|
240
|
-
"type": "object",
|
|
241
|
-
"additionalProperties": false,
|
|
242
|
-
"required": ["protocol_version", "application_id", "application_installation_id", "application_agreement_public_key", "application_signing_public_key", "connector_id", "connector_agreement_public_key"],
|
|
243
|
-
"properties": {
|
|
244
|
-
"protocol_version": { "const": 1 },
|
|
245
|
-
"application_id": { "$ref": "#/$defs/uuid" },
|
|
246
|
-
"application_installation_id": { "$ref": "#/$defs/uuid" },
|
|
247
|
-
"application_agreement_public_key": { "$ref": "#/$defs/p256PublicKey" },
|
|
248
|
-
"application_signing_public_key": { "$ref": "#/$defs/p256PublicKey" },
|
|
249
|
-
"connector_id": { "$ref": "#/$defs/uuid" },
|
|
250
|
-
"connector_agreement_public_key": { "$ref": "#/$defs/p256PublicKey" }
|
|
251
|
-
}
|
|
252
|
-
},
|
|
253
238
|
"applicationAuthorizationProof": {
|
|
254
239
|
"type": "object",
|
|
255
240
|
"additionalProperties": false,
|
|
@@ -262,14 +247,13 @@
|
|
|
262
247
|
"applicationAuthorizationBinding": {
|
|
263
248
|
"type": "object",
|
|
264
249
|
"additionalProperties": false,
|
|
265
|
-
"required": ["protocol_version", "authorization_id", "application_id", "application_manifest_digest", "application_installation_id", "
|
|
250
|
+
"required": ["protocol_version", "authorization_id", "application_id", "application_manifest_digest", "application_installation_id", "installation_signing_public_key", "grant_agreement_public_key", "grant_signing_public_key", "flow", "authorization_nonce", "issued_at", "expires_at", "code_challenge", "requested_operations"],
|
|
266
251
|
"properties": {
|
|
267
|
-
"protocol_version": { "const":
|
|
252
|
+
"protocol_version": { "const": 2 },
|
|
268
253
|
"authorization_id": { "$ref": "#/$defs/uuid" },
|
|
269
254
|
"application_id": { "$ref": "#/$defs/uuid" },
|
|
270
255
|
"application_manifest_digest": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
|
|
271
256
|
"application_installation_id": { "$ref": "#/$defs/uuid" },
|
|
272
|
-
"installation_agreement_public_key": { "$ref": "#/$defs/p256PublicKey" },
|
|
273
257
|
"installation_signing_public_key": { "$ref": "#/$defs/p256PublicKey" },
|
|
274
258
|
"grant_agreement_public_key": { "$ref": "#/$defs/p256PublicKey" },
|
|
275
259
|
"grant_signing_public_key": { "$ref": "#/$defs/p256PublicKey" },
|
|
@@ -107,8 +107,9 @@
|
|
|
107
107
|
"type": "object",
|
|
108
108
|
"additionalProperties": false,
|
|
109
109
|
"required": ["contracts"],
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
"properties": {
|
|
111
|
+
"capabilities": { "$ref": "#/$defs/capabilityRequirements" },
|
|
112
|
+
"access": {
|
|
112
113
|
"enum": ["contract", "full_collection"],
|
|
113
114
|
"description": "Access boundary requested after compatibility and provisioning checks."
|
|
114
115
|
},
|
|
@@ -125,6 +126,63 @@
|
|
|
125
126
|
}
|
|
126
127
|
}
|
|
127
128
|
},
|
|
129
|
+
"capabilityRequirements": {
|
|
130
|
+
"type": "object",
|
|
131
|
+
"additionalProperties": false,
|
|
132
|
+
"required": ["contract_version", "required"],
|
|
133
|
+
"properties": {
|
|
134
|
+
"contract_version": { "const": 1 },
|
|
135
|
+
"required": {
|
|
136
|
+
"type": "array",
|
|
137
|
+
"maxItems": 32,
|
|
138
|
+
"uniqueItems": true,
|
|
139
|
+
"items": { "$ref": "#/$defs/applicationCapability" }
|
|
140
|
+
},
|
|
141
|
+
"optional": {
|
|
142
|
+
"type": "array",
|
|
143
|
+
"maxItems": 32,
|
|
144
|
+
"uniqueItems": true,
|
|
145
|
+
"items": { "$ref": "#/$defs/applicationCapability" }
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"applicationCapability": {
|
|
150
|
+
"enum": [
|
|
151
|
+
"collection.inspect",
|
|
152
|
+
"records.watch",
|
|
153
|
+
"records.read",
|
|
154
|
+
"records.query",
|
|
155
|
+
"records.validate",
|
|
156
|
+
"records.create",
|
|
157
|
+
"records.update",
|
|
158
|
+
"records.delete",
|
|
159
|
+
"records.rename",
|
|
160
|
+
"views.list",
|
|
161
|
+
"views.execute",
|
|
162
|
+
"views.source.read",
|
|
163
|
+
"views.source.create",
|
|
164
|
+
"views.source.update",
|
|
165
|
+
"views.source.delete",
|
|
166
|
+
"definitions.contracts.current",
|
|
167
|
+
"definitions.read",
|
|
168
|
+
"definitions.create",
|
|
169
|
+
"definitions.update",
|
|
170
|
+
"definitions.type-pack.inspect",
|
|
171
|
+
"definitions.type-pack.apply",
|
|
172
|
+
"timers.list",
|
|
173
|
+
"timers.put",
|
|
174
|
+
"timers.cancel",
|
|
175
|
+
"timers.reconcile",
|
|
176
|
+
"sync.offline-replica",
|
|
177
|
+
"notifications.background-delivery",
|
|
178
|
+
"files.list",
|
|
179
|
+
"files.read",
|
|
180
|
+
"files.add",
|
|
181
|
+
"files.replace",
|
|
182
|
+
"files.move",
|
|
183
|
+
"files.delete"
|
|
184
|
+
]
|
|
185
|
+
},
|
|
128
186
|
"fileRequirement": {
|
|
129
187
|
"type": "object",
|
|
130
188
|
"additionalProperties": false,
|