@mdbase-dev/connect-protocol 0.1.0-beta.21 → 0.1.0-beta.22

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.
@@ -0,0 +1,1067 @@
1
+ export declare const CONNECT_PROBLEM_VERSION: 1;
2
+ export declare const CONNECT_PROBLEM_CATALOG: {
3
+ readonly access_denied: {
4
+ readonly category: "authorization";
5
+ readonly recovery: "reauthorize";
6
+ };
7
+ readonly access_paused: {
8
+ readonly category: "availability";
9
+ readonly recovery: "resume_connector_access";
10
+ };
11
+ readonly approval_window_blocked: {
12
+ readonly category: "authorization";
13
+ readonly recovery: "reauthorize";
14
+ };
15
+ readonly authority_authorization_changed: {
16
+ readonly category: "authorization";
17
+ readonly recovery: "reauthorize";
18
+ };
19
+ readonly authorization_cancelled: {
20
+ readonly category: "cancellation";
21
+ readonly recovery: "none";
22
+ };
23
+ readonly authorization_expired: {
24
+ readonly category: "authorization";
25
+ readonly recovery: "reauthorize";
26
+ };
27
+ readonly browser_required: {
28
+ readonly category: "compatibility";
29
+ readonly recovery: "none";
30
+ };
31
+ readonly callback_url_required: {
32
+ readonly category: "validation";
33
+ readonly recovery: "fix_request";
34
+ };
35
+ readonly change_cursor_reset: {
36
+ readonly category: "conflict";
37
+ readonly recovery: "refresh";
38
+ };
39
+ readonly collection_access_denied: {
40
+ readonly category: "authorization";
41
+ readonly recovery: "reauthorize";
42
+ };
43
+ readonly collection_configuration_invalid: {
44
+ readonly category: "validation";
45
+ readonly recovery: "repair_collection";
46
+ };
47
+ readonly collection_contracts_missing: {
48
+ readonly category: "compatibility";
49
+ readonly recovery: "choose_collection";
50
+ };
51
+ readonly collection_incompatible: {
52
+ readonly category: "compatibility";
53
+ readonly recovery: "choose_collection";
54
+ };
55
+ readonly collection_invalid: {
56
+ readonly category: "validation";
57
+ readonly recovery: "repair_collection";
58
+ };
59
+ readonly collection_kind_unsupported: {
60
+ readonly category: "compatibility";
61
+ readonly recovery: "choose_collection";
62
+ };
63
+ readonly collection_mismatch: {
64
+ readonly category: "selection";
65
+ readonly recovery: "choose_collection";
66
+ };
67
+ readonly collection_not_found: {
68
+ readonly category: "selection";
69
+ readonly recovery: "choose_collection";
70
+ };
71
+ readonly collection_not_ready: {
72
+ readonly category: "selection";
73
+ readonly recovery: "choose_collection";
74
+ };
75
+ readonly collection_not_selected: {
76
+ readonly category: "selection";
77
+ readonly recovery: "choose_collection";
78
+ };
79
+ readonly collection_type_registry_invalid: {
80
+ readonly category: "validation";
81
+ readonly recovery: "repair_collection";
82
+ };
83
+ readonly collection_version_unsupported: {
84
+ readonly category: "compatibility";
85
+ readonly recovery: "upgrade_collection";
86
+ };
87
+ readonly concurrent_modification: {
88
+ readonly category: "conflict";
89
+ readonly recovery: "refresh";
90
+ };
91
+ readonly connector_identity_changed: {
92
+ readonly category: "integrity";
93
+ readonly recovery: "reauthorize";
94
+ };
95
+ readonly connector_offline: {
96
+ readonly category: "availability";
97
+ readonly recovery: "retry";
98
+ };
99
+ readonly connector_upgrade_required: {
100
+ readonly category: "compatibility";
101
+ readonly recovery: "upgrade_connector";
102
+ };
103
+ readonly device_authorization_failed: {
104
+ readonly category: "authorization";
105
+ readonly recovery: "reauthorize";
106
+ };
107
+ readonly direct_operation_rejected: {
108
+ readonly category: "authorization";
109
+ readonly recovery: "reauthorize";
110
+ };
111
+ readonly discovery_failed: {
112
+ readonly category: "availability";
113
+ readonly recovery: "retry";
114
+ };
115
+ readonly encrypted_relay_rejected: {
116
+ readonly category: "authorization";
117
+ readonly recovery: "reauthorize";
118
+ };
119
+ readonly encryption_required: {
120
+ readonly category: "authorization";
121
+ readonly recovery: "reauthorize";
122
+ };
123
+ readonly expired_token: {
124
+ readonly category: "authorization";
125
+ readonly recovery: "reauthorize";
126
+ };
127
+ readonly file_changed_during_move: {
128
+ readonly category: "conflict";
129
+ readonly recovery: "refresh";
130
+ };
131
+ readonly file_changed_during_read: {
132
+ readonly category: "conflict";
133
+ readonly recovery: "refresh";
134
+ };
135
+ readonly file_move_failed: {
136
+ readonly category: "internal";
137
+ readonly recovery: "contact_support";
138
+ };
139
+ readonly file_mutation_conflict: {
140
+ readonly category: "conflict";
141
+ readonly recovery: "resolve_conflict";
142
+ };
143
+ readonly file_not_found: {
144
+ readonly category: "conflict";
145
+ readonly recovery: "refresh";
146
+ };
147
+ readonly file_source_mismatch: {
148
+ readonly category: "conflict";
149
+ readonly recovery: "refresh";
150
+ };
151
+ readonly file_upload_incomplete: {
152
+ readonly category: "conflict";
153
+ readonly recovery: "retry";
154
+ };
155
+ readonly hosted_provider_unavailable: {
156
+ readonly category: "availability";
157
+ readonly recovery: "retry";
158
+ };
159
+ readonly insufficient_access: {
160
+ readonly category: "authorization";
161
+ readonly recovery: "reauthorize";
162
+ };
163
+ readonly invalid_application_manifest: {
164
+ readonly category: "validation";
165
+ readonly recovery: "fix_request";
166
+ };
167
+ readonly invalid_callback: {
168
+ readonly category: "validation";
169
+ readonly recovery: "fix_request";
170
+ };
171
+ readonly invalid_device_authorization_response: {
172
+ readonly category: "integrity";
173
+ readonly recovery: "contact_support";
174
+ };
175
+ readonly invalid_encrypted_response: {
176
+ readonly category: "integrity";
177
+ readonly recovery: "contact_support";
178
+ };
179
+ readonly invalid_loopback_url: {
180
+ readonly category: "validation";
181
+ readonly recovery: "fix_request";
182
+ };
183
+ readonly invalid_mutation_id: {
184
+ readonly category: "validation";
185
+ readonly recovery: "fix_request";
186
+ };
187
+ readonly invalid_operation_response: {
188
+ readonly category: "integrity";
189
+ readonly recovery: "contact_support";
190
+ };
191
+ readonly invalid_path: {
192
+ readonly category: "validation";
193
+ readonly recovery: "fix_request";
194
+ };
195
+ readonly invalid_preflight: {
196
+ readonly category: "conflict";
197
+ readonly recovery: "refresh";
198
+ };
199
+ readonly invalid_push_payload: {
200
+ readonly category: "validation";
201
+ readonly recovery: "fix_request";
202
+ };
203
+ readonly invalid_push_subscription: {
204
+ readonly category: "validation";
205
+ readonly recovery: "fix_request";
206
+ };
207
+ readonly invalid_request: {
208
+ readonly category: "validation";
209
+ readonly recovery: "fix_request";
210
+ };
211
+ readonly invalid_token_response: {
212
+ readonly category: "integrity";
213
+ readonly recovery: "contact_support";
214
+ };
215
+ readonly managed_fcm_not_declared: {
216
+ readonly category: "compatibility";
217
+ readonly recovery: "fix_request";
218
+ };
219
+ readonly manifest_load_failed: {
220
+ readonly category: "availability";
221
+ readonly recovery: "retry";
222
+ };
223
+ readonly manifest_required: {
224
+ readonly category: "validation";
225
+ readonly recovery: "fix_request";
226
+ };
227
+ readonly missing_grant_key: {
228
+ readonly category: "authorization";
229
+ readonly recovery: "reauthorize";
230
+ };
231
+ readonly no_pending_mutation: {
232
+ readonly category: "conflict";
233
+ readonly recovery: "refresh";
234
+ };
235
+ readonly not_authorized: {
236
+ readonly category: "authorization";
237
+ readonly recovery: "reauthorize";
238
+ };
239
+ readonly not_remote_authority: {
240
+ readonly category: "compatibility";
241
+ readonly recovery: "choose_collection";
242
+ };
243
+ readonly notification_criterion_not_declared: {
244
+ readonly category: "validation";
245
+ readonly recovery: "fix_request";
246
+ };
247
+ readonly notification_reauthorization_required: {
248
+ readonly category: "authorization";
249
+ readonly recovery: "reauthorize";
250
+ };
251
+ readonly notification_registration_failed: {
252
+ readonly category: "availability";
253
+ readonly recovery: "retry";
254
+ };
255
+ readonly notification_unregistration_failed: {
256
+ readonly category: "availability";
257
+ readonly recovery: "retry";
258
+ };
259
+ readonly notifications_not_declared: {
260
+ readonly category: "compatibility";
261
+ readonly recovery: "fix_request";
262
+ };
263
+ readonly notifications_unavailable: {
264
+ readonly category: "availability";
265
+ readonly recovery: "retry";
266
+ };
267
+ readonly operation_cancelled: {
268
+ readonly category: "cancellation";
269
+ readonly recovery: "none";
270
+ };
271
+ readonly operation_failed: {
272
+ readonly category: "internal";
273
+ readonly recovery: "contact_support";
274
+ };
275
+ readonly operation_invalid: {
276
+ readonly category: "validation";
277
+ readonly recovery: "fix_request";
278
+ };
279
+ readonly operation_outcome_unknown: {
280
+ readonly category: "conflict";
281
+ readonly recovery: "resolve_outcome";
282
+ };
283
+ readonly path_occupied: {
284
+ readonly category: "conflict";
285
+ readonly recovery: "resolve_conflict";
286
+ };
287
+ readonly pending_mutation_unresolved: {
288
+ readonly category: "conflict";
289
+ readonly recovery: "resolve_outcome";
290
+ };
291
+ readonly query_snapshot_changed: {
292
+ readonly category: "conflict";
293
+ readonly recovery: "refresh";
294
+ };
295
+ readonly rate_limited: {
296
+ readonly category: "availability";
297
+ readonly recovery: "retry";
298
+ };
299
+ readonly redirect_uri_required: {
300
+ readonly category: "validation";
301
+ readonly recovery: "fix_request";
302
+ };
303
+ readonly reference_updates_unsupported: {
304
+ readonly category: "compatibility";
305
+ readonly recovery: "fix_request";
306
+ };
307
+ readonly relay_authorization_expired: {
308
+ readonly category: "authorization";
309
+ readonly recovery: "reauthorize";
310
+ };
311
+ readonly relay_unavailable: {
312
+ readonly category: "availability";
313
+ readonly recovery: "retry";
314
+ };
315
+ readonly sandbox_unsupported: {
316
+ readonly category: "compatibility";
317
+ readonly recovery: "fix_request";
318
+ };
319
+ readonly scope_denied: {
320
+ readonly category: "authorization";
321
+ readonly recovery: "reauthorize";
322
+ };
323
+ readonly stale_file_revision: {
324
+ readonly category: "conflict";
325
+ readonly recovery: "refresh";
326
+ };
327
+ readonly storage_required: {
328
+ readonly category: "compatibility";
329
+ readonly recovery: "none";
330
+ };
331
+ readonly sync_failed: {
332
+ readonly category: "availability";
333
+ readonly recovery: "retry";
334
+ };
335
+ readonly temporarily_unavailable: {
336
+ readonly category: "availability";
337
+ readonly recovery: "retry";
338
+ };
339
+ readonly timeout: {
340
+ readonly category: "availability";
341
+ readonly recovery: "retry";
342
+ };
343
+ readonly token_exchange_failed: {
344
+ readonly category: "availability";
345
+ readonly recovery: "retry";
346
+ };
347
+ readonly type_pack_provision_failed: {
348
+ readonly category: "validation";
349
+ readonly recovery: "repair_collection";
350
+ };
351
+ readonly unknown_collection: {
352
+ readonly category: "selection";
353
+ readonly recovery: "choose_collection";
354
+ };
355
+ readonly unsafe_file_path: {
356
+ readonly category: "validation";
357
+ readonly recovery: "fix_request";
358
+ };
359
+ readonly unsupported_encryption: {
360
+ readonly category: "compatibility";
361
+ readonly recovery: "upgrade_application";
362
+ };
363
+ readonly unsupported_operation: {
364
+ readonly category: "compatibility";
365
+ readonly recovery: "fix_request";
366
+ };
367
+ };
368
+ export type ConnectProblemCode = keyof typeof CONNECT_PROBLEM_CATALOG;
369
+ export type ConnectProblemCategory = "authorization" | "availability" | "cancellation" | "compatibility" | "conflict" | "integrity" | "internal" | "selection" | "validation" | "unknown";
370
+ export type ConnectRecoveryAction = "choose_collection" | "contact_support" | "fix_request" | "none" | "reauthorize" | "refresh" | "repair_collection" | "resume_connector_access" | "resolve_conflict" | "resolve_outcome" | "retry" | "upgrade_application" | "upgrade_collection" | "upgrade_connector";
371
+ export type ConnectOperationOutcome = "not_sent" | "rejected" | "unknown";
372
+ export interface ConnectProblemBase {
373
+ problem_version: typeof CONNECT_PROBLEM_VERSION;
374
+ message: string;
375
+ operation_outcome?: ConnectOperationOutcome;
376
+ trace_id?: string;
377
+ }
378
+ export interface ConnectProblemDetailsByCode {
379
+ "access_denied": {
380
+ "return_to"?: string;
381
+ };
382
+ "access_paused": undefined;
383
+ "approval_window_blocked": {
384
+ "user_code": string;
385
+ "verification_uri": string;
386
+ "verification_uri_complete": string;
387
+ "expires_at": number;
388
+ "interval_seconds": number;
389
+ };
390
+ "authority_authorization_changed": undefined;
391
+ "authorization_cancelled": undefined;
392
+ "authorization_expired": undefined;
393
+ "browser_required": undefined;
394
+ "callback_url_required": undefined;
395
+ "change_cursor_reset": undefined;
396
+ "collection_access_denied": undefined;
397
+ "collection_configuration_invalid": {
398
+ "diagnostics": Array<Record<string, unknown>>;
399
+ };
400
+ "collection_contracts_missing": {
401
+ "contracts": Array<{
402
+ "id": string;
403
+ "version": string;
404
+ }>;
405
+ };
406
+ "collection_incompatible": undefined;
407
+ "collection_invalid": {
408
+ "diagnostics": Array<Record<string, unknown>>;
409
+ };
410
+ "collection_kind_unsupported": undefined;
411
+ "collection_mismatch": undefined;
412
+ "collection_not_found": undefined;
413
+ "collection_not_ready": undefined;
414
+ "collection_not_selected": undefined;
415
+ "collection_type_registry_invalid": {
416
+ "diagnostics": Array<Record<string, unknown>>;
417
+ };
418
+ "collection_version_unsupported": {
419
+ "current_version": string;
420
+ "required_version": string;
421
+ };
422
+ "concurrent_modification": undefined;
423
+ "connector_identity_changed": undefined;
424
+ "connector_offline": {
425
+ "connector_name"?: string;
426
+ };
427
+ "connector_upgrade_required": undefined;
428
+ "device_authorization_failed": undefined;
429
+ "direct_operation_rejected": undefined;
430
+ "discovery_failed": undefined;
431
+ "encrypted_relay_rejected": undefined;
432
+ "encryption_required": undefined;
433
+ "expired_token": undefined;
434
+ "file_changed_during_move": undefined;
435
+ "file_changed_during_read": undefined;
436
+ "file_move_failed": undefined;
437
+ "file_mutation_conflict": undefined;
438
+ "file_not_found": undefined;
439
+ "file_source_mismatch": undefined;
440
+ "file_upload_incomplete": undefined;
441
+ "hosted_provider_unavailable": undefined;
442
+ "insufficient_access": {
443
+ "required_operations": Array<string>;
444
+ "granted_operations": Array<string>;
445
+ "missing_operations": Array<string>;
446
+ };
447
+ "invalid_application_manifest": undefined;
448
+ "invalid_callback": undefined;
449
+ "invalid_device_authorization_response": undefined;
450
+ "invalid_encrypted_response": undefined;
451
+ "invalid_loopback_url": undefined;
452
+ "invalid_mutation_id": undefined;
453
+ "invalid_operation_response": undefined;
454
+ "invalid_path": undefined;
455
+ "invalid_preflight": undefined;
456
+ "invalid_push_payload": undefined;
457
+ "invalid_push_subscription": undefined;
458
+ "invalid_request": undefined;
459
+ "invalid_token_response": undefined;
460
+ "managed_fcm_not_declared": undefined;
461
+ "manifest_load_failed": undefined;
462
+ "manifest_required": undefined;
463
+ "missing_grant_key": undefined;
464
+ "no_pending_mutation": undefined;
465
+ "not_authorized": undefined;
466
+ "not_remote_authority": undefined;
467
+ "notification_criterion_not_declared": undefined;
468
+ "notification_reauthorization_required": undefined;
469
+ "notification_registration_failed": undefined;
470
+ "notification_unregistration_failed": undefined;
471
+ "notifications_not_declared": undefined;
472
+ "notifications_unavailable": undefined;
473
+ "operation_cancelled": undefined;
474
+ "operation_failed": undefined;
475
+ "operation_invalid": {
476
+ "diagnostics": Array<Record<string, unknown>>;
477
+ "partial_result"?: unknown;
478
+ };
479
+ "operation_outcome_unknown": undefined;
480
+ "path_occupied": undefined;
481
+ "pending_mutation_unresolved": undefined;
482
+ "query_snapshot_changed": undefined;
483
+ "rate_limited": {
484
+ "retry_after_ms"?: number;
485
+ };
486
+ "redirect_uri_required": undefined;
487
+ "reference_updates_unsupported": undefined;
488
+ "relay_authorization_expired": undefined;
489
+ "relay_unavailable": undefined;
490
+ "sandbox_unsupported": undefined;
491
+ "scope_denied": undefined;
492
+ "stale_file_revision": undefined;
493
+ "storage_required": undefined;
494
+ "sync_failed": undefined;
495
+ "temporarily_unavailable": undefined;
496
+ "timeout": undefined;
497
+ "token_exchange_failed": undefined;
498
+ "type_pack_provision_failed": undefined;
499
+ "unknown_collection": undefined;
500
+ "unsafe_file_path": undefined;
501
+ "unsupported_encryption": undefined;
502
+ "unsupported_operation": undefined;
503
+ }
504
+ export interface ConnectProblemByCode {
505
+ "access_denied": ConnectProblemBase & {
506
+ code: "access_denied";
507
+ category: "authorization";
508
+ recovery: "reauthorize";
509
+ details?: ConnectProblemDetailsByCode["access_denied"];
510
+ };
511
+ "access_paused": ConnectProblemBase & {
512
+ code: "access_paused";
513
+ category: "availability";
514
+ recovery: "resume_connector_access";
515
+ details?: never;
516
+ };
517
+ "approval_window_blocked": ConnectProblemBase & {
518
+ code: "approval_window_blocked";
519
+ category: "authorization";
520
+ recovery: "reauthorize";
521
+ details: ConnectProblemDetailsByCode["approval_window_blocked"];
522
+ };
523
+ "authority_authorization_changed": ConnectProblemBase & {
524
+ code: "authority_authorization_changed";
525
+ category: "authorization";
526
+ recovery: "reauthorize";
527
+ details?: never;
528
+ };
529
+ "authorization_cancelled": ConnectProblemBase & {
530
+ code: "authorization_cancelled";
531
+ category: "cancellation";
532
+ recovery: "none";
533
+ details?: never;
534
+ };
535
+ "authorization_expired": ConnectProblemBase & {
536
+ code: "authorization_expired";
537
+ category: "authorization";
538
+ recovery: "reauthorize";
539
+ details?: never;
540
+ };
541
+ "browser_required": ConnectProblemBase & {
542
+ code: "browser_required";
543
+ category: "compatibility";
544
+ recovery: "none";
545
+ details?: never;
546
+ };
547
+ "callback_url_required": ConnectProblemBase & {
548
+ code: "callback_url_required";
549
+ category: "validation";
550
+ recovery: "fix_request";
551
+ details?: never;
552
+ };
553
+ "change_cursor_reset": ConnectProblemBase & {
554
+ code: "change_cursor_reset";
555
+ category: "conflict";
556
+ recovery: "refresh";
557
+ details?: never;
558
+ };
559
+ "collection_access_denied": ConnectProblemBase & {
560
+ code: "collection_access_denied";
561
+ category: "authorization";
562
+ recovery: "reauthorize";
563
+ details?: never;
564
+ };
565
+ "collection_configuration_invalid": ConnectProblemBase & {
566
+ code: "collection_configuration_invalid";
567
+ category: "validation";
568
+ recovery: "repair_collection";
569
+ details: ConnectProblemDetailsByCode["collection_configuration_invalid"];
570
+ };
571
+ "collection_contracts_missing": ConnectProblemBase & {
572
+ code: "collection_contracts_missing";
573
+ category: "compatibility";
574
+ recovery: "choose_collection";
575
+ details: ConnectProblemDetailsByCode["collection_contracts_missing"];
576
+ };
577
+ "collection_incompatible": ConnectProblemBase & {
578
+ code: "collection_incompatible";
579
+ category: "compatibility";
580
+ recovery: "choose_collection";
581
+ details?: never;
582
+ };
583
+ "collection_invalid": ConnectProblemBase & {
584
+ code: "collection_invalid";
585
+ category: "validation";
586
+ recovery: "repair_collection";
587
+ details: ConnectProblemDetailsByCode["collection_invalid"];
588
+ };
589
+ "collection_kind_unsupported": ConnectProblemBase & {
590
+ code: "collection_kind_unsupported";
591
+ category: "compatibility";
592
+ recovery: "choose_collection";
593
+ details?: never;
594
+ };
595
+ "collection_mismatch": ConnectProblemBase & {
596
+ code: "collection_mismatch";
597
+ category: "selection";
598
+ recovery: "choose_collection";
599
+ details?: never;
600
+ };
601
+ "collection_not_found": ConnectProblemBase & {
602
+ code: "collection_not_found";
603
+ category: "selection";
604
+ recovery: "choose_collection";
605
+ details?: never;
606
+ };
607
+ "collection_not_ready": ConnectProblemBase & {
608
+ code: "collection_not_ready";
609
+ category: "selection";
610
+ recovery: "choose_collection";
611
+ details?: never;
612
+ };
613
+ "collection_not_selected": ConnectProblemBase & {
614
+ code: "collection_not_selected";
615
+ category: "selection";
616
+ recovery: "choose_collection";
617
+ details?: never;
618
+ };
619
+ "collection_type_registry_invalid": ConnectProblemBase & {
620
+ code: "collection_type_registry_invalid";
621
+ category: "validation";
622
+ recovery: "repair_collection";
623
+ details: ConnectProblemDetailsByCode["collection_type_registry_invalid"];
624
+ };
625
+ "collection_version_unsupported": ConnectProblemBase & {
626
+ code: "collection_version_unsupported";
627
+ category: "compatibility";
628
+ recovery: "upgrade_collection";
629
+ details: ConnectProblemDetailsByCode["collection_version_unsupported"];
630
+ };
631
+ "concurrent_modification": ConnectProblemBase & {
632
+ code: "concurrent_modification";
633
+ category: "conflict";
634
+ recovery: "refresh";
635
+ details?: never;
636
+ };
637
+ "connector_identity_changed": ConnectProblemBase & {
638
+ code: "connector_identity_changed";
639
+ category: "integrity";
640
+ recovery: "reauthorize";
641
+ details?: never;
642
+ };
643
+ "connector_offline": ConnectProblemBase & {
644
+ code: "connector_offline";
645
+ category: "availability";
646
+ recovery: "retry";
647
+ details?: ConnectProblemDetailsByCode["connector_offline"];
648
+ };
649
+ "connector_upgrade_required": ConnectProblemBase & {
650
+ code: "connector_upgrade_required";
651
+ category: "compatibility";
652
+ recovery: "upgrade_connector";
653
+ details?: never;
654
+ };
655
+ "device_authorization_failed": ConnectProblemBase & {
656
+ code: "device_authorization_failed";
657
+ category: "authorization";
658
+ recovery: "reauthorize";
659
+ details?: never;
660
+ };
661
+ "direct_operation_rejected": ConnectProblemBase & {
662
+ code: "direct_operation_rejected";
663
+ category: "authorization";
664
+ recovery: "reauthorize";
665
+ details?: never;
666
+ };
667
+ "discovery_failed": ConnectProblemBase & {
668
+ code: "discovery_failed";
669
+ category: "availability";
670
+ recovery: "retry";
671
+ details?: never;
672
+ };
673
+ "encrypted_relay_rejected": ConnectProblemBase & {
674
+ code: "encrypted_relay_rejected";
675
+ category: "authorization";
676
+ recovery: "reauthorize";
677
+ details?: never;
678
+ };
679
+ "encryption_required": ConnectProblemBase & {
680
+ code: "encryption_required";
681
+ category: "authorization";
682
+ recovery: "reauthorize";
683
+ details?: never;
684
+ };
685
+ "expired_token": ConnectProblemBase & {
686
+ code: "expired_token";
687
+ category: "authorization";
688
+ recovery: "reauthorize";
689
+ details?: never;
690
+ };
691
+ "file_changed_during_move": ConnectProblemBase & {
692
+ code: "file_changed_during_move";
693
+ category: "conflict";
694
+ recovery: "refresh";
695
+ details?: never;
696
+ };
697
+ "file_changed_during_read": ConnectProblemBase & {
698
+ code: "file_changed_during_read";
699
+ category: "conflict";
700
+ recovery: "refresh";
701
+ details?: never;
702
+ };
703
+ "file_move_failed": ConnectProblemBase & {
704
+ code: "file_move_failed";
705
+ category: "internal";
706
+ recovery: "contact_support";
707
+ details?: never;
708
+ };
709
+ "file_mutation_conflict": ConnectProblemBase & {
710
+ code: "file_mutation_conflict";
711
+ category: "conflict";
712
+ recovery: "resolve_conflict";
713
+ details?: never;
714
+ };
715
+ "file_not_found": ConnectProblemBase & {
716
+ code: "file_not_found";
717
+ category: "conflict";
718
+ recovery: "refresh";
719
+ details?: never;
720
+ };
721
+ "file_source_mismatch": ConnectProblemBase & {
722
+ code: "file_source_mismatch";
723
+ category: "conflict";
724
+ recovery: "refresh";
725
+ details?: never;
726
+ };
727
+ "file_upload_incomplete": ConnectProblemBase & {
728
+ code: "file_upload_incomplete";
729
+ category: "conflict";
730
+ recovery: "retry";
731
+ details?: never;
732
+ };
733
+ "hosted_provider_unavailable": ConnectProblemBase & {
734
+ code: "hosted_provider_unavailable";
735
+ category: "availability";
736
+ recovery: "retry";
737
+ details?: never;
738
+ };
739
+ "insufficient_access": ConnectProblemBase & {
740
+ code: "insufficient_access";
741
+ category: "authorization";
742
+ recovery: "reauthorize";
743
+ details: ConnectProblemDetailsByCode["insufficient_access"];
744
+ };
745
+ "invalid_application_manifest": ConnectProblemBase & {
746
+ code: "invalid_application_manifest";
747
+ category: "validation";
748
+ recovery: "fix_request";
749
+ details?: never;
750
+ };
751
+ "invalid_callback": ConnectProblemBase & {
752
+ code: "invalid_callback";
753
+ category: "validation";
754
+ recovery: "fix_request";
755
+ details?: never;
756
+ };
757
+ "invalid_device_authorization_response": ConnectProblemBase & {
758
+ code: "invalid_device_authorization_response";
759
+ category: "integrity";
760
+ recovery: "contact_support";
761
+ details?: never;
762
+ };
763
+ "invalid_encrypted_response": ConnectProblemBase & {
764
+ code: "invalid_encrypted_response";
765
+ category: "integrity";
766
+ recovery: "contact_support";
767
+ details?: never;
768
+ };
769
+ "invalid_loopback_url": ConnectProblemBase & {
770
+ code: "invalid_loopback_url";
771
+ category: "validation";
772
+ recovery: "fix_request";
773
+ details?: never;
774
+ };
775
+ "invalid_mutation_id": ConnectProblemBase & {
776
+ code: "invalid_mutation_id";
777
+ category: "validation";
778
+ recovery: "fix_request";
779
+ details?: never;
780
+ };
781
+ "invalid_operation_response": ConnectProblemBase & {
782
+ code: "invalid_operation_response";
783
+ category: "integrity";
784
+ recovery: "contact_support";
785
+ details?: never;
786
+ };
787
+ "invalid_path": ConnectProblemBase & {
788
+ code: "invalid_path";
789
+ category: "validation";
790
+ recovery: "fix_request";
791
+ details?: never;
792
+ };
793
+ "invalid_preflight": ConnectProblemBase & {
794
+ code: "invalid_preflight";
795
+ category: "conflict";
796
+ recovery: "refresh";
797
+ details?: never;
798
+ };
799
+ "invalid_push_payload": ConnectProblemBase & {
800
+ code: "invalid_push_payload";
801
+ category: "validation";
802
+ recovery: "fix_request";
803
+ details?: never;
804
+ };
805
+ "invalid_push_subscription": ConnectProblemBase & {
806
+ code: "invalid_push_subscription";
807
+ category: "validation";
808
+ recovery: "fix_request";
809
+ details?: never;
810
+ };
811
+ "invalid_request": ConnectProblemBase & {
812
+ code: "invalid_request";
813
+ category: "validation";
814
+ recovery: "fix_request";
815
+ details?: never;
816
+ };
817
+ "invalid_token_response": ConnectProblemBase & {
818
+ code: "invalid_token_response";
819
+ category: "integrity";
820
+ recovery: "contact_support";
821
+ details?: never;
822
+ };
823
+ "managed_fcm_not_declared": ConnectProblemBase & {
824
+ code: "managed_fcm_not_declared";
825
+ category: "compatibility";
826
+ recovery: "fix_request";
827
+ details?: never;
828
+ };
829
+ "manifest_load_failed": ConnectProblemBase & {
830
+ code: "manifest_load_failed";
831
+ category: "availability";
832
+ recovery: "retry";
833
+ details?: never;
834
+ };
835
+ "manifest_required": ConnectProblemBase & {
836
+ code: "manifest_required";
837
+ category: "validation";
838
+ recovery: "fix_request";
839
+ details?: never;
840
+ };
841
+ "missing_grant_key": ConnectProblemBase & {
842
+ code: "missing_grant_key";
843
+ category: "authorization";
844
+ recovery: "reauthorize";
845
+ details?: never;
846
+ };
847
+ "no_pending_mutation": ConnectProblemBase & {
848
+ code: "no_pending_mutation";
849
+ category: "conflict";
850
+ recovery: "refresh";
851
+ details?: never;
852
+ };
853
+ "not_authorized": ConnectProblemBase & {
854
+ code: "not_authorized";
855
+ category: "authorization";
856
+ recovery: "reauthorize";
857
+ details?: never;
858
+ };
859
+ "not_remote_authority": ConnectProblemBase & {
860
+ code: "not_remote_authority";
861
+ category: "compatibility";
862
+ recovery: "choose_collection";
863
+ details?: never;
864
+ };
865
+ "notification_criterion_not_declared": ConnectProblemBase & {
866
+ code: "notification_criterion_not_declared";
867
+ category: "validation";
868
+ recovery: "fix_request";
869
+ details?: never;
870
+ };
871
+ "notification_reauthorization_required": ConnectProblemBase & {
872
+ code: "notification_reauthorization_required";
873
+ category: "authorization";
874
+ recovery: "reauthorize";
875
+ details?: never;
876
+ };
877
+ "notification_registration_failed": ConnectProblemBase & {
878
+ code: "notification_registration_failed";
879
+ category: "availability";
880
+ recovery: "retry";
881
+ details?: never;
882
+ };
883
+ "notification_unregistration_failed": ConnectProblemBase & {
884
+ code: "notification_unregistration_failed";
885
+ category: "availability";
886
+ recovery: "retry";
887
+ details?: never;
888
+ };
889
+ "notifications_not_declared": ConnectProblemBase & {
890
+ code: "notifications_not_declared";
891
+ category: "compatibility";
892
+ recovery: "fix_request";
893
+ details?: never;
894
+ };
895
+ "notifications_unavailable": ConnectProblemBase & {
896
+ code: "notifications_unavailable";
897
+ category: "availability";
898
+ recovery: "retry";
899
+ details?: never;
900
+ };
901
+ "operation_cancelled": ConnectProblemBase & {
902
+ code: "operation_cancelled";
903
+ category: "cancellation";
904
+ recovery: "none";
905
+ details?: never;
906
+ };
907
+ "operation_failed": ConnectProblemBase & {
908
+ code: "operation_failed";
909
+ category: "internal";
910
+ recovery: "contact_support";
911
+ details?: never;
912
+ };
913
+ "operation_invalid": ConnectProblemBase & {
914
+ code: "operation_invalid";
915
+ category: "validation";
916
+ recovery: "fix_request";
917
+ details: ConnectProblemDetailsByCode["operation_invalid"];
918
+ };
919
+ "operation_outcome_unknown": ConnectProblemBase & {
920
+ code: "operation_outcome_unknown";
921
+ category: "conflict";
922
+ recovery: "resolve_outcome";
923
+ details?: never;
924
+ };
925
+ "path_occupied": ConnectProblemBase & {
926
+ code: "path_occupied";
927
+ category: "conflict";
928
+ recovery: "resolve_conflict";
929
+ details?: never;
930
+ };
931
+ "pending_mutation_unresolved": ConnectProblemBase & {
932
+ code: "pending_mutation_unresolved";
933
+ category: "conflict";
934
+ recovery: "resolve_outcome";
935
+ details?: never;
936
+ };
937
+ "query_snapshot_changed": ConnectProblemBase & {
938
+ code: "query_snapshot_changed";
939
+ category: "conflict";
940
+ recovery: "refresh";
941
+ details?: never;
942
+ };
943
+ "rate_limited": ConnectProblemBase & {
944
+ code: "rate_limited";
945
+ category: "availability";
946
+ recovery: "retry";
947
+ details?: ConnectProblemDetailsByCode["rate_limited"];
948
+ };
949
+ "redirect_uri_required": ConnectProblemBase & {
950
+ code: "redirect_uri_required";
951
+ category: "validation";
952
+ recovery: "fix_request";
953
+ details?: never;
954
+ };
955
+ "reference_updates_unsupported": ConnectProblemBase & {
956
+ code: "reference_updates_unsupported";
957
+ category: "compatibility";
958
+ recovery: "fix_request";
959
+ details?: never;
960
+ };
961
+ "relay_authorization_expired": ConnectProblemBase & {
962
+ code: "relay_authorization_expired";
963
+ category: "authorization";
964
+ recovery: "reauthorize";
965
+ details?: never;
966
+ };
967
+ "relay_unavailable": ConnectProblemBase & {
968
+ code: "relay_unavailable";
969
+ category: "availability";
970
+ recovery: "retry";
971
+ details?: never;
972
+ };
973
+ "sandbox_unsupported": ConnectProblemBase & {
974
+ code: "sandbox_unsupported";
975
+ category: "compatibility";
976
+ recovery: "fix_request";
977
+ details?: never;
978
+ };
979
+ "scope_denied": ConnectProblemBase & {
980
+ code: "scope_denied";
981
+ category: "authorization";
982
+ recovery: "reauthorize";
983
+ details?: never;
984
+ };
985
+ "stale_file_revision": ConnectProblemBase & {
986
+ code: "stale_file_revision";
987
+ category: "conflict";
988
+ recovery: "refresh";
989
+ details?: never;
990
+ };
991
+ "storage_required": ConnectProblemBase & {
992
+ code: "storage_required";
993
+ category: "compatibility";
994
+ recovery: "none";
995
+ details?: never;
996
+ };
997
+ "sync_failed": ConnectProblemBase & {
998
+ code: "sync_failed";
999
+ category: "availability";
1000
+ recovery: "retry";
1001
+ details?: never;
1002
+ };
1003
+ "temporarily_unavailable": ConnectProblemBase & {
1004
+ code: "temporarily_unavailable";
1005
+ category: "availability";
1006
+ recovery: "retry";
1007
+ details?: never;
1008
+ };
1009
+ "timeout": ConnectProblemBase & {
1010
+ code: "timeout";
1011
+ category: "availability";
1012
+ recovery: "retry";
1013
+ details?: never;
1014
+ };
1015
+ "token_exchange_failed": ConnectProblemBase & {
1016
+ code: "token_exchange_failed";
1017
+ category: "availability";
1018
+ recovery: "retry";
1019
+ details?: never;
1020
+ };
1021
+ "type_pack_provision_failed": ConnectProblemBase & {
1022
+ code: "type_pack_provision_failed";
1023
+ category: "validation";
1024
+ recovery: "repair_collection";
1025
+ details?: never;
1026
+ };
1027
+ "unknown_collection": ConnectProblemBase & {
1028
+ code: "unknown_collection";
1029
+ category: "selection";
1030
+ recovery: "choose_collection";
1031
+ details?: never;
1032
+ };
1033
+ "unsafe_file_path": ConnectProblemBase & {
1034
+ code: "unsafe_file_path";
1035
+ category: "validation";
1036
+ recovery: "fix_request";
1037
+ details?: never;
1038
+ };
1039
+ "unsupported_encryption": ConnectProblemBase & {
1040
+ code: "unsupported_encryption";
1041
+ category: "compatibility";
1042
+ recovery: "upgrade_application";
1043
+ details?: never;
1044
+ };
1045
+ "unsupported_operation": ConnectProblemBase & {
1046
+ code: "unsupported_operation";
1047
+ category: "compatibility";
1048
+ recovery: "fix_request";
1049
+ details?: never;
1050
+ };
1051
+ }
1052
+ export type KnownConnectProblem<Code extends ConnectProblemCode = ConnectProblemCode> = ConnectProblemByCode[Code];
1053
+ export type UnknownConnectProblem = ConnectProblemBase & {
1054
+ code: "unknown";
1055
+ server_code: string;
1056
+ category: "unknown";
1057
+ recovery: "none";
1058
+ details?: unknown;
1059
+ };
1060
+ export type ConnectProblem<Code extends ConnectProblemCode = ConnectProblemCode> = KnownConnectProblem<Code> | UnknownConnectProblem;
1061
+ export declare function isConnectProblemCode(code: string): code is ConnectProblemCode;
1062
+ export declare function isConnectProblem(value: unknown): value is ConnectProblem;
1063
+ export declare function normalizeConnectProblem(serverCode: string, message: string, options?: {
1064
+ details?: unknown;
1065
+ operation_outcome?: ConnectOperationOutcome;
1066
+ trace_id?: string;
1067
+ }): ConnectProblem;