@mdbase-dev/connect-protocol 0.1.0-beta.54 → 0.1.0-beta.56
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/compatibility.d.ts +1 -1
- package/dist/compatibility.js +1 -1
- package/dist/connect-problems.generated.d.ts +22 -0
- package/dist/connect-problems.generated.js +2 -0
- package/dist/index.d.ts +8 -8
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/schemas/catalog.json +1 -1
- package/schemas/connect-problem.v1.schema.json +80 -0
- package/schemas/connect-problems.v1.catalog.json +2 -0
- package/schemas/connect-protocol.v1.schema.json +4 -4
- package/schemas/{encrypted-relay.v2.schema.json → encrypted-relay.v3.schema.json} +4 -4
package/dist/compatibility.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ApplicationFileRequirement } from "./files.js";
|
|
2
2
|
import { type CollectionOperation } from "./operations.js";
|
|
3
|
-
export declare const OPERATION_TRANSPORT_PROTOCOL_VERSION:
|
|
3
|
+
export declare const OPERATION_TRANSPORT_PROTOCOL_VERSION: 3;
|
|
4
4
|
export declare const AUTHORIZATION_BINDING_PROTOCOL_VERSION: 4;
|
|
5
5
|
export declare const SEMANTIC_CAPABILITY_CONTRACT_VERSION: 1;
|
|
6
6
|
export declare const DURABLE_MUTATION_CONTRACT_VERSION: 1;
|
package/dist/compatibility.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isMutatingOperation } from "./operations.js";
|
|
2
|
-
export const OPERATION_TRANSPORT_PROTOCOL_VERSION =
|
|
2
|
+
export const OPERATION_TRANSPORT_PROTOCOL_VERSION = 3;
|
|
3
3
|
export const AUTHORIZATION_BINDING_PROTOCOL_VERSION = 4;
|
|
4
4
|
export const SEMANTIC_CAPABILITY_CONTRACT_VERSION = 1;
|
|
5
5
|
export const DURABLE_MUTATION_CONTRACT_VERSION = 1;
|
|
@@ -104,6 +104,10 @@ export declare const CONNECT_PROBLEM_CATALOG: {
|
|
|
104
104
|
readonly category: "conflict";
|
|
105
105
|
readonly recovery: "refresh";
|
|
106
106
|
};
|
|
107
|
+
readonly connector_busy: {
|
|
108
|
+
readonly category: "availability";
|
|
109
|
+
readonly recovery: "retry";
|
|
110
|
+
};
|
|
107
111
|
readonly connector_identity_changed: {
|
|
108
112
|
readonly category: "integrity";
|
|
109
113
|
readonly recovery: "reauthorize";
|
|
@@ -172,6 +176,10 @@ export declare const CONNECT_PROBLEM_CATALOG: {
|
|
|
172
176
|
readonly category: "conflict";
|
|
173
177
|
readonly recovery: "retry";
|
|
174
178
|
};
|
|
179
|
+
readonly fresh_request_required: {
|
|
180
|
+
readonly category: "availability";
|
|
181
|
+
readonly recovery: "retry";
|
|
182
|
+
};
|
|
175
183
|
readonly hosted_provider_unavailable: {
|
|
176
184
|
readonly category: "availability";
|
|
177
185
|
readonly recovery: "retry";
|
|
@@ -496,6 +504,7 @@ export interface ConnectProblemDetailsByCode {
|
|
|
496
504
|
"required_version": string;
|
|
497
505
|
};
|
|
498
506
|
"concurrent_modification": undefined;
|
|
507
|
+
"connector_busy": undefined;
|
|
499
508
|
"connector_identity_changed": undefined;
|
|
500
509
|
"connector_offline": {
|
|
501
510
|
"connector_name"?: string;
|
|
@@ -521,6 +530,7 @@ export interface ConnectProblemDetailsByCode {
|
|
|
521
530
|
"file_not_found": undefined;
|
|
522
531
|
"file_source_mismatch": undefined;
|
|
523
532
|
"file_upload_incomplete": undefined;
|
|
533
|
+
"fresh_request_required": undefined;
|
|
524
534
|
"hosted_provider_unavailable": undefined;
|
|
525
535
|
"insufficient_access": {
|
|
526
536
|
"required_operations": Array<string>;
|
|
@@ -768,6 +778,12 @@ export interface ConnectProblemByCode {
|
|
|
768
778
|
recovery: "refresh";
|
|
769
779
|
details?: never;
|
|
770
780
|
};
|
|
781
|
+
"connector_busy": ConnectProblemBase & {
|
|
782
|
+
code: "connector_busy";
|
|
783
|
+
category: "availability";
|
|
784
|
+
recovery: "retry";
|
|
785
|
+
details?: never;
|
|
786
|
+
};
|
|
771
787
|
"connector_identity_changed": ConnectProblemBase & {
|
|
772
788
|
code: "connector_identity_changed";
|
|
773
789
|
category: "integrity";
|
|
@@ -870,6 +886,12 @@ export interface ConnectProblemByCode {
|
|
|
870
886
|
recovery: "retry";
|
|
871
887
|
details?: never;
|
|
872
888
|
};
|
|
889
|
+
"fresh_request_required": ConnectProblemBase & {
|
|
890
|
+
code: "fresh_request_required";
|
|
891
|
+
category: "availability";
|
|
892
|
+
recovery: "retry";
|
|
893
|
+
details?: never;
|
|
894
|
+
};
|
|
873
895
|
"hosted_provider_unavailable": ConnectProblemBase & {
|
|
874
896
|
code: "hosted_provider_unavailable";
|
|
875
897
|
category: "availability";
|
|
@@ -27,6 +27,7 @@ export const CONNECT_PROBLEM_CATALOG = {
|
|
|
27
27
|
"collection_type_registry_invalid": { category: "validation", recovery: "repair_collection" },
|
|
28
28
|
"collection_version_unsupported": { category: "compatibility", recovery: "upgrade_collection" },
|
|
29
29
|
"concurrent_modification": { category: "conflict", recovery: "refresh" },
|
|
30
|
+
"connector_busy": { category: "availability", recovery: "retry" },
|
|
30
31
|
"connector_identity_changed": { category: "integrity", recovery: "reauthorize" },
|
|
31
32
|
"connector_offline": { category: "availability", recovery: "retry" },
|
|
32
33
|
"connector_upgrade_required": { category: "compatibility", recovery: "upgrade_connector" },
|
|
@@ -44,6 +45,7 @@ export const CONNECT_PROBLEM_CATALOG = {
|
|
|
44
45
|
"file_not_found": { category: "conflict", recovery: "refresh" },
|
|
45
46
|
"file_source_mismatch": { category: "conflict", recovery: "refresh" },
|
|
46
47
|
"file_upload_incomplete": { category: "conflict", recovery: "retry" },
|
|
48
|
+
"fresh_request_required": { category: "availability", recovery: "retry" },
|
|
47
49
|
"hosted_provider_unavailable": { category: "availability", recovery: "retry" },
|
|
48
50
|
"insufficient_access": { category: "authorization", recovery: "reauthorize" },
|
|
49
51
|
"invalid_application_authorization": { category: "validation", recovery: "fix_request" },
|
package/dist/index.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ export declare const CONNECT_SCHEMA_IDS: {
|
|
|
49
49
|
readonly dataContract: "https://mdbase.dev/schemas/v0.3/data-contract.schema.json";
|
|
50
50
|
readonly eventActionInterop: "https://mdbase.dev/schemas/interop/v0.1/profile.schema.json";
|
|
51
51
|
readonly protocol: "https://mdbase.dev/connect/schemas/connect-protocol.v1.json";
|
|
52
|
-
readonly encryptedRelay: "https://mdbase.dev/connect/schemas/encrypted-relay.
|
|
52
|
+
readonly encryptedRelay: "https://mdbase.dev/connect/schemas/encrypted-relay.v3.json";
|
|
53
53
|
readonly files: "https://mdbase.dev/connect/schemas/files.v1.json";
|
|
54
54
|
readonly sync: "https://mdbase.dev/connect/schemas/sync.v1.json";
|
|
55
55
|
};
|
|
@@ -182,7 +182,7 @@ export interface GrantScope {
|
|
|
182
182
|
}
|
|
183
183
|
export interface RelayOperationRequest {
|
|
184
184
|
type: "operation_request";
|
|
185
|
-
protocol_version:
|
|
185
|
+
protocol_version: 3;
|
|
186
186
|
request_id: string;
|
|
187
187
|
grant_id: string;
|
|
188
188
|
collection_id: string;
|
|
@@ -192,29 +192,29 @@ export interface RelayOperationRequest {
|
|
|
192
192
|
}
|
|
193
193
|
export type RelayOperationResponse = {
|
|
194
194
|
type: "operation_response";
|
|
195
|
-
protocol_version:
|
|
195
|
+
protocol_version: 3;
|
|
196
196
|
request_id: string;
|
|
197
197
|
ok: true;
|
|
198
198
|
result: unknown;
|
|
199
199
|
} | {
|
|
200
200
|
type: "operation_response";
|
|
201
|
-
protocol_version:
|
|
201
|
+
protocol_version: 3;
|
|
202
202
|
request_id: string;
|
|
203
203
|
ok: false;
|
|
204
204
|
problem: ConnectProblem;
|
|
205
205
|
};
|
|
206
206
|
export interface MdbaseOperationRequest<Input = unknown> {
|
|
207
|
-
protocol_version:
|
|
207
|
+
protocol_version: 3;
|
|
208
208
|
request_id: string;
|
|
209
209
|
input: Input;
|
|
210
210
|
}
|
|
211
211
|
export type MdbaseOperationResponse<Result = unknown> = {
|
|
212
|
-
protocol_version:
|
|
212
|
+
protocol_version: 3;
|
|
213
213
|
request_id: string;
|
|
214
214
|
ok: true;
|
|
215
215
|
result: Result;
|
|
216
216
|
} | {
|
|
217
|
-
protocol_version:
|
|
217
|
+
protocol_version: 3;
|
|
218
218
|
request_id: string;
|
|
219
219
|
ok: false;
|
|
220
220
|
problem: ConnectProblem;
|
|
@@ -261,7 +261,7 @@ export interface GrantEncryption {
|
|
|
261
261
|
connector_agreement_public_key: string;
|
|
262
262
|
}
|
|
263
263
|
export interface EncryptedRelayEnvelope {
|
|
264
|
-
protocol_version:
|
|
264
|
+
protocol_version: 3;
|
|
265
265
|
suite: typeof RELAY_ENCRYPTION_SUITE;
|
|
266
266
|
request_id: string;
|
|
267
267
|
grant_id: string;
|
package/dist/index.js
CHANGED
|
@@ -74,7 +74,7 @@ export const CONNECT_SCHEMA_IDS = {
|
|
|
74
74
|
dataContract: "https://mdbase.dev/schemas/v0.3/data-contract.schema.json",
|
|
75
75
|
eventActionInterop: "https://mdbase.dev/schemas/interop/v0.1/profile.schema.json",
|
|
76
76
|
protocol: "https://mdbase.dev/connect/schemas/connect-protocol.v1.json",
|
|
77
|
-
encryptedRelay: "https://mdbase.dev/connect/schemas/encrypted-relay.
|
|
77
|
+
encryptedRelay: "https://mdbase.dev/connect/schemas/encrypted-relay.v3.json",
|
|
78
78
|
files: "https://mdbase.dev/connect/schemas/files.v1.json",
|
|
79
79
|
sync: "https://mdbase.dev/connect/schemas/sync.v1.json"
|
|
80
80
|
};
|
package/package.json
CHANGED
package/schemas/catalog.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"connect_problem": "./connect-problem.v1.schema.json",
|
|
9
9
|
"connect_problem_catalog": "./connect-problems.v1.catalog.json",
|
|
10
10
|
"mdbase_query_v0_3": "./mdbase-query.v0.3.schema.json",
|
|
11
|
-
"encrypted_relay": "./encrypted-relay.
|
|
11
|
+
"encrypted_relay": "./encrypted-relay.v3.schema.json",
|
|
12
12
|
"files": "./files.v1.schema.json",
|
|
13
13
|
"notification_webhook": "./notification-webhook.v1.schema.json",
|
|
14
14
|
"sync": "./sync.v1.schema.json"
|
|
@@ -1244,6 +1244,46 @@
|
|
|
1244
1244
|
}
|
|
1245
1245
|
}
|
|
1246
1246
|
},
|
|
1247
|
+
{
|
|
1248
|
+
"type": "object",
|
|
1249
|
+
"additionalProperties": false,
|
|
1250
|
+
"required": [
|
|
1251
|
+
"problem_version",
|
|
1252
|
+
"code",
|
|
1253
|
+
"category",
|
|
1254
|
+
"recovery",
|
|
1255
|
+
"message"
|
|
1256
|
+
],
|
|
1257
|
+
"properties": {
|
|
1258
|
+
"problem_version": {
|
|
1259
|
+
"const": 1
|
|
1260
|
+
},
|
|
1261
|
+
"code": {
|
|
1262
|
+
"const": "connector_busy"
|
|
1263
|
+
},
|
|
1264
|
+
"category": {
|
|
1265
|
+
"const": "availability"
|
|
1266
|
+
},
|
|
1267
|
+
"recovery": {
|
|
1268
|
+
"const": "retry"
|
|
1269
|
+
},
|
|
1270
|
+
"message": {
|
|
1271
|
+
"type": "string",
|
|
1272
|
+
"minLength": 1
|
|
1273
|
+
},
|
|
1274
|
+
"operation_outcome": {
|
|
1275
|
+
"enum": [
|
|
1276
|
+
"not_sent",
|
|
1277
|
+
"rejected",
|
|
1278
|
+
"unknown"
|
|
1279
|
+
]
|
|
1280
|
+
},
|
|
1281
|
+
"trace_id": {
|
|
1282
|
+
"type": "string",
|
|
1283
|
+
"minLength": 1
|
|
1284
|
+
}
|
|
1285
|
+
}
|
|
1286
|
+
},
|
|
1247
1287
|
{
|
|
1248
1288
|
"type": "object",
|
|
1249
1289
|
"additionalProperties": false,
|
|
@@ -1968,6 +2008,46 @@
|
|
|
1968
2008
|
}
|
|
1969
2009
|
}
|
|
1970
2010
|
},
|
|
2011
|
+
{
|
|
2012
|
+
"type": "object",
|
|
2013
|
+
"additionalProperties": false,
|
|
2014
|
+
"required": [
|
|
2015
|
+
"problem_version",
|
|
2016
|
+
"code",
|
|
2017
|
+
"category",
|
|
2018
|
+
"recovery",
|
|
2019
|
+
"message"
|
|
2020
|
+
],
|
|
2021
|
+
"properties": {
|
|
2022
|
+
"problem_version": {
|
|
2023
|
+
"const": 1
|
|
2024
|
+
},
|
|
2025
|
+
"code": {
|
|
2026
|
+
"const": "fresh_request_required"
|
|
2027
|
+
},
|
|
2028
|
+
"category": {
|
|
2029
|
+
"const": "availability"
|
|
2030
|
+
},
|
|
2031
|
+
"recovery": {
|
|
2032
|
+
"const": "retry"
|
|
2033
|
+
},
|
|
2034
|
+
"message": {
|
|
2035
|
+
"type": "string",
|
|
2036
|
+
"minLength": 1
|
|
2037
|
+
},
|
|
2038
|
+
"operation_outcome": {
|
|
2039
|
+
"enum": [
|
|
2040
|
+
"not_sent",
|
|
2041
|
+
"rejected",
|
|
2042
|
+
"unknown"
|
|
2043
|
+
]
|
|
2044
|
+
},
|
|
2045
|
+
"trace_id": {
|
|
2046
|
+
"type": "string",
|
|
2047
|
+
"minLength": 1
|
|
2048
|
+
}
|
|
2049
|
+
}
|
|
2050
|
+
},
|
|
1971
2051
|
{
|
|
1972
2052
|
"type": "object",
|
|
1973
2053
|
"additionalProperties": false,
|
|
@@ -156,6 +156,7 @@
|
|
|
156
156
|
}
|
|
157
157
|
},
|
|
158
158
|
"concurrent_modification": { "category": "conflict", "recovery": "refresh" },
|
|
159
|
+
"connector_busy": { "category": "availability", "recovery": "retry" },
|
|
159
160
|
"connector_identity_changed": { "category": "integrity", "recovery": "reauthorize" },
|
|
160
161
|
"connector_offline": {
|
|
161
162
|
"category": "availability",
|
|
@@ -195,6 +196,7 @@
|
|
|
195
196
|
"file_not_found": { "category": "conflict", "recovery": "refresh" },
|
|
196
197
|
"file_source_mismatch": { "category": "conflict", "recovery": "refresh" },
|
|
197
198
|
"file_upload_incomplete": { "category": "conflict", "recovery": "retry" },
|
|
199
|
+
"fresh_request_required": { "category": "availability", "recovery": "retry" },
|
|
198
200
|
"hosted_provider_unavailable": { "category": "availability", "recovery": "retry" },
|
|
199
201
|
"insufficient_access": {
|
|
200
202
|
"category": "authorization",
|
|
@@ -170,7 +170,7 @@
|
|
|
170
170
|
"required": ["type", "protocol_version", "request_id", "grant_id", "collection_id", "application_id", "operation", "input"],
|
|
171
171
|
"properties": {
|
|
172
172
|
"type": { "const": "operation_request" },
|
|
173
|
-
"protocol_version": { "const":
|
|
173
|
+
"protocol_version": { "const": 3 },
|
|
174
174
|
"request_id": { "$ref": "#/$defs/uuid" },
|
|
175
175
|
"grant_id": { "$ref": "#/$defs/uuid" },
|
|
176
176
|
"collection_id": { "$ref": "#/$defs/uuid" },
|
|
@@ -184,7 +184,7 @@
|
|
|
184
184
|
"additionalProperties": false,
|
|
185
185
|
"required": ["protocol_version", "request_id", "input"],
|
|
186
186
|
"properties": {
|
|
187
|
-
"protocol_version": { "const":
|
|
187
|
+
"protocol_version": { "const": 3 },
|
|
188
188
|
"request_id": { "$ref": "#/$defs/uuid" },
|
|
189
189
|
"input": true
|
|
190
190
|
}
|
|
@@ -194,7 +194,7 @@
|
|
|
194
194
|
"additionalProperties": false,
|
|
195
195
|
"required": ["protocol_version", "request_id", "ok"],
|
|
196
196
|
"properties": {
|
|
197
|
-
"protocol_version": { "const":
|
|
197
|
+
"protocol_version": { "const": 3 },
|
|
198
198
|
"request_id": { "$ref": "#/$defs/uuid" },
|
|
199
199
|
"ok": { "type": "boolean" },
|
|
200
200
|
"result": true,
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
"required": ["type", "protocol_version", "request_id", "ok"],
|
|
221
221
|
"properties": {
|
|
222
222
|
"type": { "const": "operation_response" },
|
|
223
|
-
"protocol_version": { "const":
|
|
223
|
+
"protocol_version": { "const": 3 },
|
|
224
224
|
"request_id": { "$ref": "#/$defs/uuid" },
|
|
225
225
|
"ok": { "type": "boolean" },
|
|
226
226
|
"result": true,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://mdbase.dev/connect/schemas/encrypted-relay.
|
|
4
|
-
"title": "mdbase connect encrypted operation transport
|
|
3
|
+
"$id": "https://mdbase.dev/connect/schemas/encrypted-relay.v3.json",
|
|
4
|
+
"title": "mdbase connect encrypted operation transport 3",
|
|
5
5
|
"description": "Opaque authenticated operation envelopes routed between an application and authority.",
|
|
6
6
|
"oneOf": [
|
|
7
7
|
{ "$ref": "#/$defs/request" },
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"required": ["type", "protocol_version", "suite", "request_id", "grant_id", "application_id", "connector_id", "collection_id", "operation", "scope_epoch", "key_id", "counter", "ciphertext"],
|
|
23
23
|
"properties": {
|
|
24
24
|
"type": { "enum": ["encrypted_operation_request", "encrypted_operation_response"] },
|
|
25
|
-
"protocol_version": { "const":
|
|
25
|
+
"protocol_version": { "const": 3 },
|
|
26
26
|
"suite": { "const": "P256-HKDF-SHA256-AES256GCM" },
|
|
27
27
|
"request_id": { "$ref": "#/$defs/uuid" },
|
|
28
28
|
"grant_id": { "$ref": "#/$defs/uuid" },
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"required": ["type", "protocol_version", "request_id", "problem"],
|
|
55
55
|
"properties": {
|
|
56
56
|
"type": { "const": "encrypted_operation_rejected" },
|
|
57
|
-
"protocol_version": { "const":
|
|
57
|
+
"protocol_version": { "const": 3 },
|
|
58
58
|
"request_id": { "$ref": "#/$defs/uuid" },
|
|
59
59
|
"problem": { "$ref": "https://schemas.mdbase.dev/connect/problem/v1" }
|
|
60
60
|
}
|