@mdbase-dev/connect-protocol 0.1.0-beta.83 → 0.1.0-beta.85
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/connect-problems.generated.d.ts +44 -0
- package/dist/connect-problems.generated.js +4 -0
- package/dist/operations.d.ts +1 -0
- package/dist/operations.js +9 -0
- package/package.json +1 -1
- package/schemas/connect-problem.v1.schema.json +160 -0
- package/schemas/connect-problems.v1.catalog.json +4 -0
- package/schemas/operation-catalog.v1.json +4 -4
|
@@ -8,6 +8,10 @@ export declare const CONNECT_PROBLEM_CATALOG: {
|
|
|
8
8
|
readonly category: "availability";
|
|
9
9
|
readonly recovery: "resume_connector_access";
|
|
10
10
|
};
|
|
11
|
+
readonly application_declaration_mismatch: {
|
|
12
|
+
readonly category: "authorization";
|
|
13
|
+
readonly recovery: "reauthorize";
|
|
14
|
+
};
|
|
11
15
|
readonly application_identity_unavailable: {
|
|
12
16
|
readonly category: "compatibility";
|
|
13
17
|
readonly recovery: "upgrade_application";
|
|
@@ -400,6 +404,18 @@ export declare const CONNECT_PROBLEM_CATALOG: {
|
|
|
400
404
|
readonly category: "authorization";
|
|
401
405
|
readonly recovery: "reauthorize";
|
|
402
406
|
};
|
|
407
|
+
readonly session_destroyed: {
|
|
408
|
+
readonly category: "cancellation";
|
|
409
|
+
readonly recovery: "none";
|
|
410
|
+
};
|
|
411
|
+
readonly session_not_started: {
|
|
412
|
+
readonly category: "validation";
|
|
413
|
+
readonly recovery: "fix_request";
|
|
414
|
+
};
|
|
415
|
+
readonly session_starting: {
|
|
416
|
+
readonly category: "availability";
|
|
417
|
+
readonly recovery: "retry";
|
|
418
|
+
};
|
|
403
419
|
readonly stale_file_revision: {
|
|
404
420
|
readonly category: "conflict";
|
|
405
421
|
readonly recovery: "refresh";
|
|
@@ -464,6 +480,7 @@ export interface ConnectProblemDetailsByCode {
|
|
|
464
480
|
"return_to"?: string;
|
|
465
481
|
};
|
|
466
482
|
"access_paused": undefined;
|
|
483
|
+
"application_declaration_mismatch": undefined;
|
|
467
484
|
"application_identity_unavailable": undefined;
|
|
468
485
|
"approval_window_blocked": {
|
|
469
486
|
"user_code": string;
|
|
@@ -622,6 +639,9 @@ export interface ConnectProblemDetailsByCode {
|
|
|
622
639
|
"relay_unavailable": undefined;
|
|
623
640
|
"sandbox_unsupported": undefined;
|
|
624
641
|
"scope_denied": undefined;
|
|
642
|
+
"session_destroyed": undefined;
|
|
643
|
+
"session_not_started": undefined;
|
|
644
|
+
"session_starting": undefined;
|
|
625
645
|
"stale_file_revision": undefined;
|
|
626
646
|
"storage_required": undefined;
|
|
627
647
|
"sync_failed": undefined;
|
|
@@ -654,6 +674,12 @@ export interface ConnectProblemByCode {
|
|
|
654
674
|
recovery: "resume_connector_access";
|
|
655
675
|
details?: never;
|
|
656
676
|
};
|
|
677
|
+
"application_declaration_mismatch": ConnectProblemBase & {
|
|
678
|
+
code: "application_declaration_mismatch";
|
|
679
|
+
category: "authorization";
|
|
680
|
+
recovery: "reauthorize";
|
|
681
|
+
details?: never;
|
|
682
|
+
};
|
|
657
683
|
"application_identity_unavailable": ConnectProblemBase & {
|
|
658
684
|
code: "application_identity_unavailable";
|
|
659
685
|
category: "compatibility";
|
|
@@ -1242,6 +1268,24 @@ export interface ConnectProblemByCode {
|
|
|
1242
1268
|
recovery: "reauthorize";
|
|
1243
1269
|
details?: never;
|
|
1244
1270
|
};
|
|
1271
|
+
"session_destroyed": ConnectProblemBase & {
|
|
1272
|
+
code: "session_destroyed";
|
|
1273
|
+
category: "cancellation";
|
|
1274
|
+
recovery: "none";
|
|
1275
|
+
details?: never;
|
|
1276
|
+
};
|
|
1277
|
+
"session_not_started": ConnectProblemBase & {
|
|
1278
|
+
code: "session_not_started";
|
|
1279
|
+
category: "validation";
|
|
1280
|
+
recovery: "fix_request";
|
|
1281
|
+
details?: never;
|
|
1282
|
+
};
|
|
1283
|
+
"session_starting": ConnectProblemBase & {
|
|
1284
|
+
code: "session_starting";
|
|
1285
|
+
category: "availability";
|
|
1286
|
+
recovery: "retry";
|
|
1287
|
+
details?: never;
|
|
1288
|
+
};
|
|
1245
1289
|
"stale_file_revision": ConnectProblemBase & {
|
|
1246
1290
|
code: "stale_file_revision";
|
|
1247
1291
|
category: "conflict";
|
|
@@ -3,6 +3,7 @@ export const CONNECT_PROBLEM_VERSION = 1;
|
|
|
3
3
|
export const CONNECT_PROBLEM_CATALOG = {
|
|
4
4
|
"access_denied": { category: "authorization", recovery: "reauthorize" },
|
|
5
5
|
"access_paused": { category: "availability", recovery: "resume_connector_access" },
|
|
6
|
+
"application_declaration_mismatch": { category: "authorization", recovery: "reauthorize" },
|
|
6
7
|
"application_identity_unavailable": { category: "compatibility", recovery: "upgrade_application" },
|
|
7
8
|
"approval_window_blocked": { category: "authorization", recovery: "reauthorize" },
|
|
8
9
|
"authority_authorization_changed": { category: "authorization", recovery: "reauthorize" },
|
|
@@ -101,6 +102,9 @@ export const CONNECT_PROBLEM_CATALOG = {
|
|
|
101
102
|
"relay_unavailable": { category: "availability", recovery: "retry" },
|
|
102
103
|
"sandbox_unsupported": { category: "compatibility", recovery: "fix_request" },
|
|
103
104
|
"scope_denied": { category: "authorization", recovery: "reauthorize" },
|
|
105
|
+
"session_destroyed": { category: "cancellation", recovery: "none" },
|
|
106
|
+
"session_not_started": { category: "validation", recovery: "fix_request" },
|
|
107
|
+
"session_starting": { category: "availability", recovery: "retry" },
|
|
104
108
|
"stale_file_revision": { category: "conflict", recovery: "refresh" },
|
|
105
109
|
"storage_required": { category: "compatibility", recovery: "none" },
|
|
106
110
|
"sync_failed": { category: "availability", recovery: "retry" },
|
package/dist/operations.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export declare const MUTATING_OPERATION_IDENTIFIERS: readonly ["create_view_sour
|
|
|
8
8
|
export type MutationOperationIdentifier = typeof MUTATING_OPERATION_IDENTIFIERS[number];
|
|
9
9
|
export declare function isCollectionOperation(value: string): value is CollectionOperation;
|
|
10
10
|
export declare function areCollectionOperations(values: readonly string[]): values is readonly CollectionOperation[];
|
|
11
|
+
export declare function operationRequiresTimerCriterion(operation: CollectionOperation): boolean;
|
|
11
12
|
export declare function isFileControlMessageType(value: string): value is FileControlMessageType;
|
|
12
13
|
export declare function operationInputSchemaVersion(operation: EncryptedOperation, input: unknown): number;
|
|
13
14
|
export declare function mutationOperationIdentifier(operation: EncryptedOperation, input: unknown): MutationOperationIdentifier | null;
|
package/dist/operations.js
CHANGED
|
@@ -136,6 +136,12 @@ export const MUTATING_OPERATION_IDENTIFIERS = [
|
|
|
136
136
|
"file_control:commit_file_upload",
|
|
137
137
|
"file_control:abort_file_transfer"
|
|
138
138
|
];
|
|
139
|
+
const TIMER_CRITERION_OPERATIONS = new Set([
|
|
140
|
+
"list_timers",
|
|
141
|
+
"put_timer",
|
|
142
|
+
"cancel_timer",
|
|
143
|
+
"reconcile_timers"
|
|
144
|
+
]);
|
|
139
145
|
const COLLECTION_OPERATION_SET = new Set(COLLECTION_OPERATIONS);
|
|
140
146
|
const FILE_CONTROL_MESSAGE_TYPE_SET = new Set(FILE_CONTROL_MESSAGE_TYPES);
|
|
141
147
|
export function isCollectionOperation(value) {
|
|
@@ -144,6 +150,9 @@ export function isCollectionOperation(value) {
|
|
|
144
150
|
export function areCollectionOperations(values) {
|
|
145
151
|
return values.every(isCollectionOperation);
|
|
146
152
|
}
|
|
153
|
+
export function operationRequiresTimerCriterion(operation) {
|
|
154
|
+
return TIMER_CRITERION_OPERATIONS.has(operation);
|
|
155
|
+
}
|
|
147
156
|
export function isFileControlMessageType(value) {
|
|
148
157
|
return FILE_CONTROL_MESSAGE_TYPE_SET.has(value);
|
|
149
158
|
}
|
package/package.json
CHANGED
|
@@ -93,6 +93,46 @@
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
},
|
|
96
|
+
{
|
|
97
|
+
"type": "object",
|
|
98
|
+
"additionalProperties": false,
|
|
99
|
+
"required": [
|
|
100
|
+
"problem_version",
|
|
101
|
+
"code",
|
|
102
|
+
"category",
|
|
103
|
+
"recovery",
|
|
104
|
+
"message"
|
|
105
|
+
],
|
|
106
|
+
"properties": {
|
|
107
|
+
"problem_version": {
|
|
108
|
+
"const": 1
|
|
109
|
+
},
|
|
110
|
+
"code": {
|
|
111
|
+
"const": "application_declaration_mismatch"
|
|
112
|
+
},
|
|
113
|
+
"category": {
|
|
114
|
+
"const": "authorization"
|
|
115
|
+
},
|
|
116
|
+
"recovery": {
|
|
117
|
+
"const": "reauthorize"
|
|
118
|
+
},
|
|
119
|
+
"message": {
|
|
120
|
+
"type": "string",
|
|
121
|
+
"minLength": 1
|
|
122
|
+
},
|
|
123
|
+
"operation_outcome": {
|
|
124
|
+
"enum": [
|
|
125
|
+
"not_sent",
|
|
126
|
+
"rejected",
|
|
127
|
+
"unknown"
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
"trace_id": {
|
|
131
|
+
"type": "string",
|
|
132
|
+
"minLength": 1
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
},
|
|
96
136
|
{
|
|
97
137
|
"type": "object",
|
|
98
138
|
"additionalProperties": false,
|
|
@@ -4368,6 +4408,126 @@
|
|
|
4368
4408
|
}
|
|
4369
4409
|
}
|
|
4370
4410
|
},
|
|
4411
|
+
{
|
|
4412
|
+
"type": "object",
|
|
4413
|
+
"additionalProperties": false,
|
|
4414
|
+
"required": [
|
|
4415
|
+
"problem_version",
|
|
4416
|
+
"code",
|
|
4417
|
+
"category",
|
|
4418
|
+
"recovery",
|
|
4419
|
+
"message"
|
|
4420
|
+
],
|
|
4421
|
+
"properties": {
|
|
4422
|
+
"problem_version": {
|
|
4423
|
+
"const": 1
|
|
4424
|
+
},
|
|
4425
|
+
"code": {
|
|
4426
|
+
"const": "session_destroyed"
|
|
4427
|
+
},
|
|
4428
|
+
"category": {
|
|
4429
|
+
"const": "cancellation"
|
|
4430
|
+
},
|
|
4431
|
+
"recovery": {
|
|
4432
|
+
"const": "none"
|
|
4433
|
+
},
|
|
4434
|
+
"message": {
|
|
4435
|
+
"type": "string",
|
|
4436
|
+
"minLength": 1
|
|
4437
|
+
},
|
|
4438
|
+
"operation_outcome": {
|
|
4439
|
+
"enum": [
|
|
4440
|
+
"not_sent",
|
|
4441
|
+
"rejected",
|
|
4442
|
+
"unknown"
|
|
4443
|
+
]
|
|
4444
|
+
},
|
|
4445
|
+
"trace_id": {
|
|
4446
|
+
"type": "string",
|
|
4447
|
+
"minLength": 1
|
|
4448
|
+
}
|
|
4449
|
+
}
|
|
4450
|
+
},
|
|
4451
|
+
{
|
|
4452
|
+
"type": "object",
|
|
4453
|
+
"additionalProperties": false,
|
|
4454
|
+
"required": [
|
|
4455
|
+
"problem_version",
|
|
4456
|
+
"code",
|
|
4457
|
+
"category",
|
|
4458
|
+
"recovery",
|
|
4459
|
+
"message"
|
|
4460
|
+
],
|
|
4461
|
+
"properties": {
|
|
4462
|
+
"problem_version": {
|
|
4463
|
+
"const": 1
|
|
4464
|
+
},
|
|
4465
|
+
"code": {
|
|
4466
|
+
"const": "session_not_started"
|
|
4467
|
+
},
|
|
4468
|
+
"category": {
|
|
4469
|
+
"const": "validation"
|
|
4470
|
+
},
|
|
4471
|
+
"recovery": {
|
|
4472
|
+
"const": "fix_request"
|
|
4473
|
+
},
|
|
4474
|
+
"message": {
|
|
4475
|
+
"type": "string",
|
|
4476
|
+
"minLength": 1
|
|
4477
|
+
},
|
|
4478
|
+
"operation_outcome": {
|
|
4479
|
+
"enum": [
|
|
4480
|
+
"not_sent",
|
|
4481
|
+
"rejected",
|
|
4482
|
+
"unknown"
|
|
4483
|
+
]
|
|
4484
|
+
},
|
|
4485
|
+
"trace_id": {
|
|
4486
|
+
"type": "string",
|
|
4487
|
+
"minLength": 1
|
|
4488
|
+
}
|
|
4489
|
+
}
|
|
4490
|
+
},
|
|
4491
|
+
{
|
|
4492
|
+
"type": "object",
|
|
4493
|
+
"additionalProperties": false,
|
|
4494
|
+
"required": [
|
|
4495
|
+
"problem_version",
|
|
4496
|
+
"code",
|
|
4497
|
+
"category",
|
|
4498
|
+
"recovery",
|
|
4499
|
+
"message"
|
|
4500
|
+
],
|
|
4501
|
+
"properties": {
|
|
4502
|
+
"problem_version": {
|
|
4503
|
+
"const": 1
|
|
4504
|
+
},
|
|
4505
|
+
"code": {
|
|
4506
|
+
"const": "session_starting"
|
|
4507
|
+
},
|
|
4508
|
+
"category": {
|
|
4509
|
+
"const": "availability"
|
|
4510
|
+
},
|
|
4511
|
+
"recovery": {
|
|
4512
|
+
"const": "retry"
|
|
4513
|
+
},
|
|
4514
|
+
"message": {
|
|
4515
|
+
"type": "string",
|
|
4516
|
+
"minLength": 1
|
|
4517
|
+
},
|
|
4518
|
+
"operation_outcome": {
|
|
4519
|
+
"enum": [
|
|
4520
|
+
"not_sent",
|
|
4521
|
+
"rejected",
|
|
4522
|
+
"unknown"
|
|
4523
|
+
]
|
|
4524
|
+
},
|
|
4525
|
+
"trace_id": {
|
|
4526
|
+
"type": "string",
|
|
4527
|
+
"minLength": 1
|
|
4528
|
+
}
|
|
4529
|
+
}
|
|
4530
|
+
},
|
|
4371
4531
|
{
|
|
4372
4532
|
"type": "object",
|
|
4373
4533
|
"additionalProperties": false,
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
"access_paused": { "category": "availability", "recovery": "resume_connector_access" },
|
|
40
|
+
"application_declaration_mismatch": { "category": "authorization", "recovery": "reauthorize" },
|
|
40
41
|
"application_identity_unavailable": { "category": "compatibility", "recovery": "upgrade_application" },
|
|
41
42
|
"approval_window_blocked": {
|
|
42
43
|
"category": "authorization",
|
|
@@ -317,6 +318,9 @@
|
|
|
317
318
|
"relay_unavailable": { "category": "availability", "recovery": "retry" },
|
|
318
319
|
"sandbox_unsupported": { "category": "compatibility", "recovery": "fix_request" },
|
|
319
320
|
"scope_denied": { "category": "authorization", "recovery": "reauthorize" },
|
|
321
|
+
"session_destroyed": { "category": "cancellation", "recovery": "none" },
|
|
322
|
+
"session_not_started": { "category": "validation", "recovery": "fix_request" },
|
|
323
|
+
"session_starting": { "category": "availability", "recovery": "retry" },
|
|
320
324
|
"stale_file_revision": { "category": "conflict", "recovery": "refresh" },
|
|
321
325
|
"storage_required": { "category": "compatibility", "recovery": "none" },
|
|
322
326
|
"sync_failed": { "category": "availability", "recovery": "retry" },
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
{ "id": "apply_type_pack", "input_schema_version": 1, "mutation": "always" },
|
|
24
24
|
{ "id": "assess_collection_setup", "input_schema_version": 1, "mutation": "never" },
|
|
25
25
|
{ "id": "apply_collection_setup", "input_schema_version": 1, "mutation": "always" },
|
|
26
|
-
{ "id": "list_timers", "input_schema_version": 1, "mutation": "never" },
|
|
27
|
-
{ "id": "put_timer", "input_schema_version": 1, "mutation": "always" },
|
|
28
|
-
{ "id": "cancel_timer", "input_schema_version": 1, "mutation": "always" },
|
|
29
|
-
{ "id": "reconcile_timers", "input_schema_version": 1, "mutation": "always" },
|
|
26
|
+
{ "id": "list_timers", "input_schema_version": 1, "mutation": "never", "requires_timer_criterion": true },
|
|
27
|
+
{ "id": "put_timer", "input_schema_version": 1, "mutation": "always", "requires_timer_criterion": true },
|
|
28
|
+
{ "id": "cancel_timer", "input_schema_version": 1, "mutation": "always", "requires_timer_criterion": true },
|
|
29
|
+
{ "id": "reconcile_timers", "input_schema_version": 1, "mutation": "always", "requires_timer_criterion": true },
|
|
30
30
|
{ "id": "sync", "input_schema_version": 1, "mutation": "sync_action" }
|
|
31
31
|
],
|
|
32
32
|
"file_control_messages": [
|