@mdbase-dev/connect-protocol 0.1.0-beta.126 → 0.1.0-beta.148
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-contract.d.ts +23 -0
- package/dist/application-contract.js +76 -0
- package/dist/application-declaration.d.ts +120 -0
- package/dist/application-declaration.js +1 -0
- package/dist/authorization-errors.d.ts +34 -0
- package/dist/authorization-errors.js +52 -0
- package/dist/connect-problems.generated.d.ts +134 -0
- package/dist/connect-problems.generated.js +23 -0
- package/dist/index.d.ts +10 -115
- package/dist/index.js +4 -0
- package/dist/manifest-validators.generated.d.ts +13 -0
- package/dist/manifest-validators.generated.js +7940 -0
- package/dist/manifest.d.ts +3 -0
- package/dist/manifest.js +70 -33
- package/dist/next-authorization.d.ts +30 -0
- package/dist/next-authorization.js +90 -0
- package/package.json +10 -4
- package/schemas/connect-problem.v1.schema.json +493 -0
- package/schemas/connect-problems.v1.catalog.json +21 -0
- package/schemas/connect-protocol.v1.schema.json +1 -0
- package/schemas/mdbase-app.legacy-v1.schema.json +25 -0
- package/schemas/mdbase-app.schema.json +25 -0
- package/schemas/next-trust.v1.schema.json +54 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type ApplicationCapabilityId, type ApplicationCapabilityRequirements, type LegacyApplicationCapabilityRequirements, type LegacyApplicationCapabilityId } from "./capabilities.js";
|
|
2
|
+
import type { ApplicationRequirements, LegacyApplicationRequirements, MdbaseAppManifest, LegacyMdbaseAppManifest } from "./application-declaration.js";
|
|
3
|
+
import type { CollectionOperation } from "./operations.js";
|
|
4
|
+
export declare const DEFAULT_OPERATIONS: CollectionOperation[];
|
|
5
|
+
/** Input compatibility boundary; protocol ApplicationRequirements remains v2-only. */
|
|
6
|
+
export type MdbaseApplicationManifest = MdbaseAppManifest | LegacyMdbaseAppManifest;
|
|
7
|
+
export type MdbaseApplicationRequirements = ApplicationRequirements | LegacyApplicationRequirements;
|
|
8
|
+
export type MdbaseApplicationCapabilityRequirements = ApplicationCapabilityRequirements | LegacyApplicationCapabilityRequirements;
|
|
9
|
+
export type MdbaseApplicationCapabilityId = ApplicationCapabilityId | LegacyApplicationCapabilityId;
|
|
10
|
+
interface MdbaseAuthorizationSelection {
|
|
11
|
+
operations?: CollectionOperation[];
|
|
12
|
+
capabilities?: MdbaseApplicationCapabilityId[];
|
|
13
|
+
}
|
|
14
|
+
export declare function semanticContractVersion(requirements: MdbaseApplicationRequirements): 1 | 2;
|
|
15
|
+
export declare function validateAuthorizationSelection(requirements: MdbaseApplicationRequirements, options: MdbaseAuthorizationSelection): void;
|
|
16
|
+
export declare function declaredOperations(requirements: MdbaseApplicationRequirements): CollectionOperation[];
|
|
17
|
+
export declare function authorizationOperations(application: {
|
|
18
|
+
requirements: MdbaseApplicationRequirements;
|
|
19
|
+
provisions?: MdbaseApplicationManifest["provisions"];
|
|
20
|
+
}, options: MdbaseAuthorizationSelection): CollectionOperation[];
|
|
21
|
+
export declare function retainedCapabilities(requirements: MdbaseApplicationRequirements, operations: CollectionOperation[]): MdbaseApplicationCapabilityId[];
|
|
22
|
+
export declare function authorizationFiles(requirements: MdbaseApplicationRequirements): import("./files.js").ApplicationFileRequest | undefined;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { APPLICATION_SETUP_OPERATIONS, capabilityOperationsForContractVersion } from "./capabilities.js";
|
|
2
|
+
import { applicationFileRequest } from "./files.js";
|
|
3
|
+
import { connectError } from "./authorization-errors.js";
|
|
4
|
+
export const DEFAULT_OPERATIONS = ["describe", "changes", "read", "query"];
|
|
5
|
+
export function semanticContractVersion(requirements) {
|
|
6
|
+
const version = requirements.capabilities === undefined ? 1 : requirements.capabilities?.contract_version;
|
|
7
|
+
if (version !== 1 && version !== 2)
|
|
8
|
+
invalidAuthorizationSelection("Unsupported declared capability contract version.");
|
|
9
|
+
return version;
|
|
10
|
+
}
|
|
11
|
+
function invalidAuthorizationSelection(message) {
|
|
12
|
+
throw connectError("invalid_application_manifest", message, {
|
|
13
|
+
details: { issues: [{ path: "/requirements/capabilities", keyword: "authorizationSelection", message, params: {} }] }
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
export function validateAuthorizationSelection(requirements, options) {
|
|
17
|
+
if (options.operations !== undefined && options.capabilities !== undefined) {
|
|
18
|
+
invalidAuthorizationSelection("Specify operations or capabilities, not both.");
|
|
19
|
+
}
|
|
20
|
+
if (options.operations !== undefined && semanticContractVersion(requirements) !== 1) {
|
|
21
|
+
invalidAuthorizationSelection("Exact operations authorization is only supported for legacy v1 declarations.");
|
|
22
|
+
}
|
|
23
|
+
if (options.capabilities !== undefined) {
|
|
24
|
+
const declared = new Set([
|
|
25
|
+
...(requirements.capabilities?.required ?? []),
|
|
26
|
+
...(requirements.capabilities?.optional ?? [])
|
|
27
|
+
]);
|
|
28
|
+
if (options.capabilities.some((id) => !declared.has(id)
|
|
29
|
+
|| capabilityOperationsForContractVersion(semanticContractVersion(requirements), id) === undefined)) {
|
|
30
|
+
invalidAuthorizationSelection("Authorization can only include capabilities declared by the application.");
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
export function declaredOperations(requirements) {
|
|
35
|
+
const capabilities = requirements.capabilities;
|
|
36
|
+
if (!capabilities)
|
|
37
|
+
return [...DEFAULT_OPERATIONS];
|
|
38
|
+
return [...new Set([...capabilities.required, ...(capabilities.optional ?? [])].flatMap((id) => capabilityOperationsForContractVersion(capabilities.contract_version, id) ?? []))];
|
|
39
|
+
}
|
|
40
|
+
export function authorizationOperations(application, options) {
|
|
41
|
+
const { requirements } = application;
|
|
42
|
+
validateAuthorizationSelection(requirements, options);
|
|
43
|
+
// Legacy callers selected independent exact operations, including subsets of declarations.
|
|
44
|
+
if (semanticContractVersion(requirements) === 1) {
|
|
45
|
+
if (options.operations !== undefined)
|
|
46
|
+
return [...new Set(options.operations)];
|
|
47
|
+
if (options.capabilities === undefined)
|
|
48
|
+
return [...DEFAULT_OPERATIONS];
|
|
49
|
+
}
|
|
50
|
+
const declared = requirements.capabilities;
|
|
51
|
+
const selected = [...(declared?.required ?? []), ...(options.capabilities ?? declared?.optional ?? [])];
|
|
52
|
+
const operations = selected.flatMap((id) => capabilityOperationsForContractVersion(semanticContractVersion(requirements), id) ?? []);
|
|
53
|
+
const hasSetup = (application.provisions?.type_packs.length ?? 0) > 0
|
|
54
|
+
|| (application.provisions?.configuration?.length ?? 0) > 0;
|
|
55
|
+
return [...new Set([
|
|
56
|
+
...operations,
|
|
57
|
+
...(semanticContractVersion(requirements) === 2 && hasSetup ? APPLICATION_SETUP_OPERATIONS : [])
|
|
58
|
+
])];
|
|
59
|
+
}
|
|
60
|
+
export function retainedCapabilities(requirements, operations) {
|
|
61
|
+
return [...(requirements.capabilities?.required ?? []), ...(requirements.capabilities?.optional ?? [])].filter((id) => (capabilityOperationsForContractVersion(semanticContractVersion(requirements), id) ?? []).every((operation) => operations.includes(operation)));
|
|
62
|
+
}
|
|
63
|
+
export function authorizationFiles(requirements) {
|
|
64
|
+
const files = requirements.files;
|
|
65
|
+
if (!files)
|
|
66
|
+
return undefined;
|
|
67
|
+
if (semanticContractVersion(requirements) === 1) {
|
|
68
|
+
if (!("actions" in files) || "required" in files || "optional" in files) {
|
|
69
|
+
invalidAuthorizationSelection("Legacy file declarations must use exact files.actions.");
|
|
70
|
+
}
|
|
71
|
+
return { actions: [...files.actions], scope: structuredClone(files.scope) };
|
|
72
|
+
}
|
|
73
|
+
if ("actions" in files)
|
|
74
|
+
invalidAuthorizationSelection("V2 file declarations must use required/optional file actions.");
|
|
75
|
+
return applicationFileRequest(files);
|
|
76
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import type { ApplicationFileRequirement, LegacyApplicationFileRequirement } from "./files.js";
|
|
2
|
+
import type { ApplicationCapabilityRequirements, LegacyApplicationCapabilityRequirements } from "./capabilities.js";
|
|
3
|
+
import type { ContractRequirement, TypePackProvision } from "./type-packs.js";
|
|
4
|
+
import type { ConfigurationProvision, ConfigurationRequirement } from "./collection-setup.js";
|
|
5
|
+
export interface NotificationCriterion {
|
|
6
|
+
/** Stable, manifest-owned identifier selected by an installation. */
|
|
7
|
+
id: string;
|
|
8
|
+
/** Runtime event contract evaluated at the collection authority. */
|
|
9
|
+
event: ContractRequirement;
|
|
10
|
+
/** Canonical mdbase CEL. Event content never leaves the authority for evaluation. */
|
|
11
|
+
if?: {
|
|
12
|
+
$expr: string;
|
|
13
|
+
};
|
|
14
|
+
debounce?: string;
|
|
15
|
+
minimum_interval?: string;
|
|
16
|
+
/** Static Web Push copy. Dynamic record content is intentionally unsupported. */
|
|
17
|
+
presentation: {
|
|
18
|
+
title: string;
|
|
19
|
+
body?: string;
|
|
20
|
+
tag?: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export type NativeNotificationDelivery = {
|
|
24
|
+
/**
|
|
25
|
+
* Connect sends through FCM using revocable, least-privilege authority
|
|
26
|
+
* granted by the application's Firebase project.
|
|
27
|
+
*/
|
|
28
|
+
mode: "managed_fcm";
|
|
29
|
+
firebase_project_id: string;
|
|
30
|
+
} | {
|
|
31
|
+
/**
|
|
32
|
+
* Connect sends a signed, content-free signal to infrastructure operated
|
|
33
|
+
* by the application developer. That infrastructure owns APNs/FCM.
|
|
34
|
+
*/
|
|
35
|
+
mode: "webhook";
|
|
36
|
+
url: string;
|
|
37
|
+
};
|
|
38
|
+
export interface ApplicationNotifications {
|
|
39
|
+
criteria: NotificationCriterion[];
|
|
40
|
+
/** Optional native delivery route. Web Push registration remains independent. */
|
|
41
|
+
native_delivery?: NativeNotificationDelivery;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The declaration bundled with an application build and registered inline.
|
|
45
|
+
*
|
|
46
|
+
* `id` is stable presentation metadata rather than proof of a publisher. Each
|
|
47
|
+
* exact declaration is independently identified and authorized by Connect.
|
|
48
|
+
*/
|
|
49
|
+
export type CanonicalApplicationRequirements = Omit<ApplicationRequirements, "access" | "contracts"> & {
|
|
50
|
+
access: "full_collection";
|
|
51
|
+
contracts: [];
|
|
52
|
+
};
|
|
53
|
+
interface MdbaseAppManifestBase {
|
|
54
|
+
manifest_version: 1;
|
|
55
|
+
id: string;
|
|
56
|
+
name: string;
|
|
57
|
+
/** Exact additional installation origins; part of the digest-bound declaration. */
|
|
58
|
+
installation_origins?: Partial<Record<"lab" | "staging" | "production", Partial<Record<"app-runtime" | "mobile", string[]>>>>;
|
|
59
|
+
requirements: CanonicalApplicationRequirements;
|
|
60
|
+
provisions?: ApplicationProvisions;
|
|
61
|
+
notifications?: ApplicationNotifications;
|
|
62
|
+
}
|
|
63
|
+
export interface MdbaseWebAppManifest extends MdbaseAppManifestBase {
|
|
64
|
+
/** Omitted by existing v1 declarations; explicit `web` is equivalent. */
|
|
65
|
+
distribution?: "web";
|
|
66
|
+
/** Runtime claim, not publisher identity. Enables literal 127.0.0.1 HTTP. */
|
|
67
|
+
platform?: "native";
|
|
68
|
+
homepage: string;
|
|
69
|
+
icon?: string;
|
|
70
|
+
redirect_uris: string[];
|
|
71
|
+
}
|
|
72
|
+
export interface MdbasePortableAppManifest extends MdbaseAppManifestBase {
|
|
73
|
+
/**
|
|
74
|
+
* A downloaded, publisher-unverified application opened from a local file.
|
|
75
|
+
* Portable declarations use device authorization and never claim a web origin.
|
|
76
|
+
*/
|
|
77
|
+
distribution: "portable";
|
|
78
|
+
/** Optional HTTPS page where the user can inspect the project or source. */
|
|
79
|
+
project_url?: string;
|
|
80
|
+
/** Optional HTTPS icon on the project URL's origin. */
|
|
81
|
+
icon?: string;
|
|
82
|
+
}
|
|
83
|
+
export type MdbaseAppManifest = MdbaseWebAppManifest | MdbasePortableAppManifest;
|
|
84
|
+
export interface ApplicationRequirements {
|
|
85
|
+
contracts: ContractRequirement[];
|
|
86
|
+
/** Collection extension values required before the application is ready. */
|
|
87
|
+
configuration?: ConfigurationRequirement[];
|
|
88
|
+
/** Versioned semantic intent compiled by Connect into exact operations. */
|
|
89
|
+
capabilities?: ApplicationCapabilityRequirements;
|
|
90
|
+
/**
|
|
91
|
+
* Collection boundary request. New declarations must explicitly use
|
|
92
|
+
* `full_collection`; omitted and `contract` remain parseable only for legacy
|
|
93
|
+
* diagnosis and reauthorization.
|
|
94
|
+
*/
|
|
95
|
+
access?: "contract" | "full_collection";
|
|
96
|
+
/** Restrict authorization to durable provider-backed collections. */
|
|
97
|
+
collection_kind?: "hosted";
|
|
98
|
+
/** Explicit identity consent. Omission discloses no account metadata. */
|
|
99
|
+
people?: import("./people.js").ApplicationPeopleRequirement;
|
|
100
|
+
/** First-class non-Markdown file access requested independently of records. */
|
|
101
|
+
files?: ApplicationFileRequirement;
|
|
102
|
+
}
|
|
103
|
+
export type LegacyApplicationRequirements = Omit<ApplicationRequirements, "capabilities" | "files" | "access" | "people"> & {
|
|
104
|
+
access: "full_collection";
|
|
105
|
+
capabilities?: LegacyApplicationCapabilityRequirements;
|
|
106
|
+
files?: LegacyApplicationFileRequirement;
|
|
107
|
+
};
|
|
108
|
+
export type LegacyMdbaseWebAppManifest = Omit<MdbaseWebAppManifest, "requirements"> & {
|
|
109
|
+
requirements: LegacyApplicationRequirements;
|
|
110
|
+
};
|
|
111
|
+
export type LegacyMdbasePortableAppManifest = Omit<MdbasePortableAppManifest, "requirements"> & {
|
|
112
|
+
requirements: LegacyApplicationRequirements;
|
|
113
|
+
};
|
|
114
|
+
export type LegacyMdbaseAppManifest = LegacyMdbaseWebAppManifest | LegacyMdbasePortableAppManifest;
|
|
115
|
+
export interface ApplicationProvisions {
|
|
116
|
+
type_packs: TypePackProvision[];
|
|
117
|
+
/** Narrow semantic changes that may satisfy configuration requirements. */
|
|
118
|
+
configuration?: ConfigurationProvision[];
|
|
119
|
+
}
|
|
120
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type ConnectProblem, type ConnectProblemCode, type ConnectProblemDetailsByCode, type KnownConnectProblem } from "./connect-problems.generated.js";
|
|
2
|
+
interface ProblemOptions {
|
|
3
|
+
operationOutcome?: ConnectProblem["operation_outcome"];
|
|
4
|
+
traceId?: string;
|
|
5
|
+
status?: number;
|
|
6
|
+
cause?: unknown;
|
|
7
|
+
}
|
|
8
|
+
type ProblemOptionsFor<Code extends ConnectProblemCode> = ConnectProblemDetailsByCode[Code] extends undefined ? ProblemOptions & {
|
|
9
|
+
details?: never;
|
|
10
|
+
} : {} extends ConnectProblemDetailsByCode[Code] ? ProblemOptions & {
|
|
11
|
+
details?: ConnectProblemDetailsByCode[Code];
|
|
12
|
+
} : ProblemOptions & {
|
|
13
|
+
details: ConnectProblemDetailsByCode[Code];
|
|
14
|
+
};
|
|
15
|
+
type ProblemArguments<Code extends ConnectProblemCode> = ConnectProblemDetailsByCode[Code] extends undefined ? [options?: ProblemOptionsFor<Code>] : {} extends ConnectProblemDetailsByCode[Code] ? [options?: ProblemOptionsFor<Code>] : [options: ProblemOptionsFor<Code>];
|
|
16
|
+
export interface ConnectErrorContext {
|
|
17
|
+
status?: number;
|
|
18
|
+
cause?: unknown;
|
|
19
|
+
}
|
|
20
|
+
/** Internal carrier used while adapting throwing transports into public outcomes. */
|
|
21
|
+
export declare class MdbaseConnectError extends Error {
|
|
22
|
+
readonly problem: ConnectProblem;
|
|
23
|
+
readonly code: ConnectProblem["code"];
|
|
24
|
+
readonly status?: number;
|
|
25
|
+
constructor(problem: ConnectProblem, context?: ConnectErrorContext);
|
|
26
|
+
get retryable(): boolean;
|
|
27
|
+
get requiresAuthorization(): boolean;
|
|
28
|
+
get outcomeUnknown(): boolean;
|
|
29
|
+
get recovery(): "choose_collection" | "contact_support" | "fix_request" | "none" | "reauthorize" | "refresh" | "repair_collection" | "resolve_conflict" | "resolve_outcome" | "resume_connector_access" | "retry" | "upgrade_application" | "upgrade_collection" | "upgrade_connector";
|
|
30
|
+
get details(): unknown;
|
|
31
|
+
}
|
|
32
|
+
export declare function connectProblem<Code extends ConnectProblemCode>(code: Code, message: string, ...[options]: ProblemArguments<Code>): KnownConnectProblem<Code>;
|
|
33
|
+
export declare function connectError<Code extends ConnectProblemCode>(code: Code, message: string, ...args: ProblemArguments<Code>): MdbaseConnectError;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { CONNECT_PROBLEM_CATALOG, CONNECT_PROBLEM_VERSION } from "./connect-problems.generated.js";
|
|
2
|
+
/** Internal carrier used while adapting throwing transports into public outcomes. */
|
|
3
|
+
export class MdbaseConnectError extends Error {
|
|
4
|
+
problem;
|
|
5
|
+
code;
|
|
6
|
+
status;
|
|
7
|
+
constructor(problem, context = {}) {
|
|
8
|
+
super(problem.message, context.cause === undefined ? undefined : { cause: context.cause });
|
|
9
|
+
this.problem = problem;
|
|
10
|
+
this.name = "MdbaseConnectError";
|
|
11
|
+
this.code = problem.code;
|
|
12
|
+
this.status = context.status;
|
|
13
|
+
}
|
|
14
|
+
get retryable() {
|
|
15
|
+
return this.problem.recovery === "retry"
|
|
16
|
+
&& this.problem.operation_outcome !== "unknown";
|
|
17
|
+
}
|
|
18
|
+
get requiresAuthorization() {
|
|
19
|
+
return this.problem.category === "authorization";
|
|
20
|
+
}
|
|
21
|
+
get outcomeUnknown() {
|
|
22
|
+
return this.problem.operation_outcome === "unknown";
|
|
23
|
+
}
|
|
24
|
+
get recovery() {
|
|
25
|
+
return this.problem.recovery;
|
|
26
|
+
}
|
|
27
|
+
get details() {
|
|
28
|
+
return this.problem.details;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export function connectProblem(code, message, ...[options = {}]) {
|
|
32
|
+
const definition = CONNECT_PROBLEM_CATALOG[code];
|
|
33
|
+
return {
|
|
34
|
+
problem_version: CONNECT_PROBLEM_VERSION,
|
|
35
|
+
code,
|
|
36
|
+
category: definition.category,
|
|
37
|
+
recovery: definition.recovery,
|
|
38
|
+
message,
|
|
39
|
+
...(options.details === undefined ? {} : { details: options.details }),
|
|
40
|
+
...(options.operationOutcome === undefined
|
|
41
|
+
? {}
|
|
42
|
+
: { operation_outcome: options.operationOutcome }),
|
|
43
|
+
...(options.traceId === undefined ? {} : { trace_id: options.traceId })
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export function connectError(code, message, ...args) {
|
|
47
|
+
const options = args[0];
|
|
48
|
+
return new MdbaseConnectError(connectProblem(code, message, ...args), {
|
|
49
|
+
status: options?.status,
|
|
50
|
+
cause: options?.cause
|
|
51
|
+
});
|
|
52
|
+
}
|
|
@@ -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_authorization_issuance_disabled: {
|
|
12
|
+
readonly category: "authorization";
|
|
13
|
+
readonly recovery: "reauthorize";
|
|
14
|
+
};
|
|
11
15
|
readonly application_declaration_mismatch: {
|
|
12
16
|
readonly category: "authorization";
|
|
13
17
|
readonly recovery: "reauthorize";
|
|
@@ -16,6 +20,14 @@ export declare const CONNECT_PROBLEM_CATALOG: {
|
|
|
16
20
|
readonly category: "compatibility";
|
|
17
21
|
readonly recovery: "upgrade_application";
|
|
18
22
|
};
|
|
23
|
+
readonly application_reauthorization_required: {
|
|
24
|
+
readonly category: "authorization";
|
|
25
|
+
readonly recovery: "reauthorize";
|
|
26
|
+
};
|
|
27
|
+
readonly application_semantic_version_mismatch: {
|
|
28
|
+
readonly category: "authorization";
|
|
29
|
+
readonly recovery: "reauthorize";
|
|
30
|
+
};
|
|
19
31
|
readonly approval_window_blocked: {
|
|
20
32
|
readonly category: "authorization";
|
|
21
33
|
readonly recovery: "reauthorize";
|
|
@@ -60,6 +72,10 @@ export declare const CONNECT_PROBLEM_CATALOG: {
|
|
|
60
72
|
readonly category: "authorization";
|
|
61
73
|
readonly recovery: "reauthorize";
|
|
62
74
|
};
|
|
75
|
+
readonly collection_claimed_by_newer_runtime: {
|
|
76
|
+
readonly category: "compatibility";
|
|
77
|
+
readonly recovery: "upgrade_connector";
|
|
78
|
+
};
|
|
63
79
|
readonly collection_configuration_invalid: {
|
|
64
80
|
readonly category: "validation";
|
|
65
81
|
readonly recovery: "repair_collection";
|
|
@@ -100,6 +116,10 @@ export declare const CONNECT_PROBLEM_CATALOG: {
|
|
|
100
116
|
readonly category: "validation";
|
|
101
117
|
readonly recovery: "repair_collection";
|
|
102
118
|
};
|
|
119
|
+
readonly collection_unavailable: {
|
|
120
|
+
readonly category: "availability";
|
|
121
|
+
readonly recovery: "choose_collection";
|
|
122
|
+
};
|
|
103
123
|
readonly collection_version_unsupported: {
|
|
104
124
|
readonly category: "compatibility";
|
|
105
125
|
readonly recovery: "upgrade_collection";
|
|
@@ -260,6 +280,10 @@ export declare const CONNECT_PROBLEM_CATALOG: {
|
|
|
260
280
|
readonly category: "validation";
|
|
261
281
|
readonly recovery: "fix_request";
|
|
262
282
|
};
|
|
283
|
+
readonly invalid_replica: {
|
|
284
|
+
readonly category: "authorization";
|
|
285
|
+
readonly recovery: "reauthorize";
|
|
286
|
+
};
|
|
263
287
|
readonly invalid_request: {
|
|
264
288
|
readonly category: "validation";
|
|
265
289
|
readonly recovery: "fix_request";
|
|
@@ -312,6 +336,10 @@ export declare const CONNECT_PROBLEM_CATALOG: {
|
|
|
312
336
|
readonly category: "validation";
|
|
313
337
|
readonly recovery: "fix_request";
|
|
314
338
|
};
|
|
339
|
+
readonly notification_grant_reauthorization_required: {
|
|
340
|
+
readonly category: "authorization";
|
|
341
|
+
readonly recovery: "reauthorize";
|
|
342
|
+
};
|
|
315
343
|
readonly notification_reauthorization_required: {
|
|
316
344
|
readonly category: "authorization";
|
|
317
345
|
readonly recovery: "reauthorize";
|
|
@@ -348,6 +376,10 @@ export declare const CONNECT_PROBLEM_CATALOG: {
|
|
|
348
376
|
readonly category: "conflict";
|
|
349
377
|
readonly recovery: "resolve_outcome";
|
|
350
378
|
};
|
|
379
|
+
readonly origin_denied: {
|
|
380
|
+
readonly category: "authorization";
|
|
381
|
+
readonly recovery: "reauthorize";
|
|
382
|
+
};
|
|
351
383
|
readonly path_occupied: {
|
|
352
384
|
readonly category: "conflict";
|
|
353
385
|
readonly recovery: "resolve_conflict";
|
|
@@ -404,14 +436,26 @@ export declare const CONNECT_PROBLEM_CATALOG: {
|
|
|
404
436
|
readonly category: "availability";
|
|
405
437
|
readonly recovery: "retry";
|
|
406
438
|
};
|
|
439
|
+
readonly replica_scope_denied: {
|
|
440
|
+
readonly category: "authorization";
|
|
441
|
+
readonly recovery: "reauthorize";
|
|
442
|
+
};
|
|
407
443
|
readonly sandbox_unsupported: {
|
|
408
444
|
readonly category: "compatibility";
|
|
409
445
|
readonly recovery: "fix_request";
|
|
410
446
|
};
|
|
447
|
+
readonly scope_changed: {
|
|
448
|
+
readonly category: "authorization";
|
|
449
|
+
readonly recovery: "reauthorize";
|
|
450
|
+
};
|
|
411
451
|
readonly scope_denied: {
|
|
412
452
|
readonly category: "authorization";
|
|
413
453
|
readonly recovery: "reauthorize";
|
|
414
454
|
};
|
|
455
|
+
readonly scope_epoch_stale: {
|
|
456
|
+
readonly category: "authorization";
|
|
457
|
+
readonly recovery: "reauthorize";
|
|
458
|
+
};
|
|
415
459
|
readonly session_destroyed: {
|
|
416
460
|
readonly category: "cancellation";
|
|
417
461
|
readonly recovery: "none";
|
|
@@ -444,6 +488,10 @@ export declare const CONNECT_PROBLEM_CATALOG: {
|
|
|
444
488
|
readonly category: "availability";
|
|
445
489
|
readonly recovery: "retry";
|
|
446
490
|
};
|
|
491
|
+
readonly timer_grant_unavailable: {
|
|
492
|
+
readonly category: "authorization";
|
|
493
|
+
readonly recovery: "reauthorize";
|
|
494
|
+
};
|
|
447
495
|
readonly token_exchange_failed: {
|
|
448
496
|
readonly category: "availability";
|
|
449
497
|
readonly recovery: "retry";
|
|
@@ -488,8 +536,11 @@ export interface ConnectProblemDetailsByCode {
|
|
|
488
536
|
"return_to"?: string;
|
|
489
537
|
};
|
|
490
538
|
"access_paused": undefined;
|
|
539
|
+
"application_authorization_issuance_disabled": undefined;
|
|
491
540
|
"application_declaration_mismatch": undefined;
|
|
492
541
|
"application_identity_unavailable": undefined;
|
|
542
|
+
"application_reauthorization_required": undefined;
|
|
543
|
+
"application_semantic_version_mismatch": undefined;
|
|
493
544
|
"approval_window_blocked": {
|
|
494
545
|
"user_code": string;
|
|
495
546
|
"verification_uri": string;
|
|
@@ -519,6 +570,7 @@ export interface ConnectProblemDetailsByCode {
|
|
|
519
570
|
};
|
|
520
571
|
"change_cursor_reset": undefined;
|
|
521
572
|
"collection_access_denied": undefined;
|
|
573
|
+
"collection_claimed_by_newer_runtime": undefined;
|
|
522
574
|
"collection_configuration_invalid": {
|
|
523
575
|
"diagnostics": Array<Record<string, unknown>>;
|
|
524
576
|
};
|
|
@@ -540,6 +592,9 @@ export interface ConnectProblemDetailsByCode {
|
|
|
540
592
|
"collection_type_registry_invalid": {
|
|
541
593
|
"diagnostics": Array<Record<string, unknown>>;
|
|
542
594
|
};
|
|
595
|
+
"collection_unavailable": {
|
|
596
|
+
"reason": string;
|
|
597
|
+
};
|
|
543
598
|
"collection_version_unsupported": {
|
|
544
599
|
"current_version": string;
|
|
545
600
|
"required_version": string;
|
|
@@ -602,6 +657,7 @@ export interface ConnectProblemDetailsByCode {
|
|
|
602
657
|
"invalid_push_payload": undefined;
|
|
603
658
|
"invalid_push_subscription": undefined;
|
|
604
659
|
"invalid_read_cursor": undefined;
|
|
660
|
+
"invalid_replica": undefined;
|
|
605
661
|
"invalid_request": undefined;
|
|
606
662
|
"invalid_token_response": undefined;
|
|
607
663
|
"legacy_scope_reauthorization_required": undefined;
|
|
@@ -617,6 +673,7 @@ export interface ConnectProblemDetailsByCode {
|
|
|
617
673
|
"not_authorized": undefined;
|
|
618
674
|
"not_remote_authority": undefined;
|
|
619
675
|
"notification_criterion_not_declared": undefined;
|
|
676
|
+
"notification_grant_reauthorization_required": undefined;
|
|
620
677
|
"notification_reauthorization_required": undefined;
|
|
621
678
|
"notification_registration_failed": undefined;
|
|
622
679
|
"notification_unregistration_failed": undefined;
|
|
@@ -631,6 +688,7 @@ export interface ConnectProblemDetailsByCode {
|
|
|
631
688
|
"operation_outcome_unknown": {
|
|
632
689
|
"request_id": string;
|
|
633
690
|
};
|
|
691
|
+
"origin_denied": undefined;
|
|
634
692
|
"path_occupied": undefined;
|
|
635
693
|
"pending_mutation_unresolved": undefined;
|
|
636
694
|
"query_snapshot_changed": undefined;
|
|
@@ -647,8 +705,11 @@ export interface ConnectProblemDetailsByCode {
|
|
|
647
705
|
"registry_schema_incompatible": undefined;
|
|
648
706
|
"relay_authorization_expired": undefined;
|
|
649
707
|
"relay_unavailable": undefined;
|
|
708
|
+
"replica_scope_denied": undefined;
|
|
650
709
|
"sandbox_unsupported": undefined;
|
|
710
|
+
"scope_changed": undefined;
|
|
651
711
|
"scope_denied": undefined;
|
|
712
|
+
"scope_epoch_stale": undefined;
|
|
652
713
|
"session_destroyed": undefined;
|
|
653
714
|
"session_not_started": undefined;
|
|
654
715
|
"session_starting": undefined;
|
|
@@ -657,6 +718,7 @@ export interface ConnectProblemDetailsByCode {
|
|
|
657
718
|
"sync_failed": undefined;
|
|
658
719
|
"temporarily_unavailable": undefined;
|
|
659
720
|
"timeout": undefined;
|
|
721
|
+
"timer_grant_unavailable": undefined;
|
|
660
722
|
"token_exchange_failed": undefined;
|
|
661
723
|
"transport_protocol_incompatible": {
|
|
662
724
|
"contract": string;
|
|
@@ -684,6 +746,12 @@ export interface ConnectProblemByCode {
|
|
|
684
746
|
recovery: "resume_connector_access";
|
|
685
747
|
details?: never;
|
|
686
748
|
};
|
|
749
|
+
"application_authorization_issuance_disabled": ConnectProblemBase & {
|
|
750
|
+
code: "application_authorization_issuance_disabled";
|
|
751
|
+
category: "authorization";
|
|
752
|
+
recovery: "reauthorize";
|
|
753
|
+
details?: never;
|
|
754
|
+
};
|
|
687
755
|
"application_declaration_mismatch": ConnectProblemBase & {
|
|
688
756
|
code: "application_declaration_mismatch";
|
|
689
757
|
category: "authorization";
|
|
@@ -696,6 +764,18 @@ export interface ConnectProblemByCode {
|
|
|
696
764
|
recovery: "upgrade_application";
|
|
697
765
|
details?: never;
|
|
698
766
|
};
|
|
767
|
+
"application_reauthorization_required": ConnectProblemBase & {
|
|
768
|
+
code: "application_reauthorization_required";
|
|
769
|
+
category: "authorization";
|
|
770
|
+
recovery: "reauthorize";
|
|
771
|
+
details?: never;
|
|
772
|
+
};
|
|
773
|
+
"application_semantic_version_mismatch": ConnectProblemBase & {
|
|
774
|
+
code: "application_semantic_version_mismatch";
|
|
775
|
+
category: "authorization";
|
|
776
|
+
recovery: "reauthorize";
|
|
777
|
+
details?: never;
|
|
778
|
+
};
|
|
699
779
|
"approval_window_blocked": ConnectProblemBase & {
|
|
700
780
|
code: "approval_window_blocked";
|
|
701
781
|
category: "authorization";
|
|
@@ -762,6 +842,12 @@ export interface ConnectProblemByCode {
|
|
|
762
842
|
recovery: "reauthorize";
|
|
763
843
|
details?: never;
|
|
764
844
|
};
|
|
845
|
+
"collection_claimed_by_newer_runtime": ConnectProblemBase & {
|
|
846
|
+
code: "collection_claimed_by_newer_runtime";
|
|
847
|
+
category: "compatibility";
|
|
848
|
+
recovery: "upgrade_connector";
|
|
849
|
+
details?: never;
|
|
850
|
+
};
|
|
765
851
|
"collection_configuration_invalid": ConnectProblemBase & {
|
|
766
852
|
code: "collection_configuration_invalid";
|
|
767
853
|
category: "validation";
|
|
@@ -822,6 +908,12 @@ export interface ConnectProblemByCode {
|
|
|
822
908
|
recovery: "repair_collection";
|
|
823
909
|
details: ConnectProblemDetailsByCode["collection_type_registry_invalid"];
|
|
824
910
|
};
|
|
911
|
+
"collection_unavailable": ConnectProblemBase & {
|
|
912
|
+
code: "collection_unavailable";
|
|
913
|
+
category: "availability";
|
|
914
|
+
recovery: "choose_collection";
|
|
915
|
+
details: ConnectProblemDetailsByCode["collection_unavailable"];
|
|
916
|
+
};
|
|
825
917
|
"collection_version_unsupported": ConnectProblemBase & {
|
|
826
918
|
code: "collection_version_unsupported";
|
|
827
919
|
category: "compatibility";
|
|
@@ -1062,6 +1154,12 @@ export interface ConnectProblemByCode {
|
|
|
1062
1154
|
recovery: "fix_request";
|
|
1063
1155
|
details?: never;
|
|
1064
1156
|
};
|
|
1157
|
+
"invalid_replica": ConnectProblemBase & {
|
|
1158
|
+
code: "invalid_replica";
|
|
1159
|
+
category: "authorization";
|
|
1160
|
+
recovery: "reauthorize";
|
|
1161
|
+
details?: never;
|
|
1162
|
+
};
|
|
1065
1163
|
"invalid_request": ConnectProblemBase & {
|
|
1066
1164
|
code: "invalid_request";
|
|
1067
1165
|
category: "validation";
|
|
@@ -1140,6 +1238,12 @@ export interface ConnectProblemByCode {
|
|
|
1140
1238
|
recovery: "fix_request";
|
|
1141
1239
|
details?: never;
|
|
1142
1240
|
};
|
|
1241
|
+
"notification_grant_reauthorization_required": ConnectProblemBase & {
|
|
1242
|
+
code: "notification_grant_reauthorization_required";
|
|
1243
|
+
category: "authorization";
|
|
1244
|
+
recovery: "reauthorize";
|
|
1245
|
+
details?: never;
|
|
1246
|
+
};
|
|
1143
1247
|
"notification_reauthorization_required": ConnectProblemBase & {
|
|
1144
1248
|
code: "notification_reauthorization_required";
|
|
1145
1249
|
category: "authorization";
|
|
@@ -1194,6 +1298,12 @@ export interface ConnectProblemByCode {
|
|
|
1194
1298
|
recovery: "resolve_outcome";
|
|
1195
1299
|
details: ConnectProblemDetailsByCode["operation_outcome_unknown"];
|
|
1196
1300
|
};
|
|
1301
|
+
"origin_denied": ConnectProblemBase & {
|
|
1302
|
+
code: "origin_denied";
|
|
1303
|
+
category: "authorization";
|
|
1304
|
+
recovery: "reauthorize";
|
|
1305
|
+
details?: never;
|
|
1306
|
+
};
|
|
1197
1307
|
"path_occupied": ConnectProblemBase & {
|
|
1198
1308
|
code: "path_occupied";
|
|
1199
1309
|
category: "conflict";
|
|
@@ -1278,18 +1388,36 @@ export interface ConnectProblemByCode {
|
|
|
1278
1388
|
recovery: "retry";
|
|
1279
1389
|
details?: never;
|
|
1280
1390
|
};
|
|
1391
|
+
"replica_scope_denied": ConnectProblemBase & {
|
|
1392
|
+
code: "replica_scope_denied";
|
|
1393
|
+
category: "authorization";
|
|
1394
|
+
recovery: "reauthorize";
|
|
1395
|
+
details?: never;
|
|
1396
|
+
};
|
|
1281
1397
|
"sandbox_unsupported": ConnectProblemBase & {
|
|
1282
1398
|
code: "sandbox_unsupported";
|
|
1283
1399
|
category: "compatibility";
|
|
1284
1400
|
recovery: "fix_request";
|
|
1285
1401
|
details?: never;
|
|
1286
1402
|
};
|
|
1403
|
+
"scope_changed": ConnectProblemBase & {
|
|
1404
|
+
code: "scope_changed";
|
|
1405
|
+
category: "authorization";
|
|
1406
|
+
recovery: "reauthorize";
|
|
1407
|
+
details?: never;
|
|
1408
|
+
};
|
|
1287
1409
|
"scope_denied": ConnectProblemBase & {
|
|
1288
1410
|
code: "scope_denied";
|
|
1289
1411
|
category: "authorization";
|
|
1290
1412
|
recovery: "reauthorize";
|
|
1291
1413
|
details?: never;
|
|
1292
1414
|
};
|
|
1415
|
+
"scope_epoch_stale": ConnectProblemBase & {
|
|
1416
|
+
code: "scope_epoch_stale";
|
|
1417
|
+
category: "authorization";
|
|
1418
|
+
recovery: "reauthorize";
|
|
1419
|
+
details?: never;
|
|
1420
|
+
};
|
|
1293
1421
|
"session_destroyed": ConnectProblemBase & {
|
|
1294
1422
|
code: "session_destroyed";
|
|
1295
1423
|
category: "cancellation";
|
|
@@ -1338,6 +1466,12 @@ export interface ConnectProblemByCode {
|
|
|
1338
1466
|
recovery: "retry";
|
|
1339
1467
|
details?: never;
|
|
1340
1468
|
};
|
|
1469
|
+
"timer_grant_unavailable": ConnectProblemBase & {
|
|
1470
|
+
code: "timer_grant_unavailable";
|
|
1471
|
+
category: "authorization";
|
|
1472
|
+
recovery: "reauthorize";
|
|
1473
|
+
details?: never;
|
|
1474
|
+
};
|
|
1341
1475
|
"token_exchange_failed": ConnectProblemBase & {
|
|
1342
1476
|
code: "token_exchange_failed";
|
|
1343
1477
|
category: "availability";
|