@oddington/sdk 0.1.70 → 0.1.71
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.
|
@@ -216,7 +216,10 @@ export type RunFailure = {
|
|
|
216
216
|
message: string;
|
|
217
217
|
} & ({
|
|
218
218
|
code?: never;
|
|
219
|
-
} | import('../../../shared/routine-step-output.js').RoutineStepOutputFailure
|
|
219
|
+
} | import('../../../shared/routine-step-output.js').RoutineStepOutputFailure | {
|
|
220
|
+
code: import('../../../shared/connection-acquisition.js').ConnectionAcquisitionCode;
|
|
221
|
+
detail: import('../../../shared/connection-error.js').ConnectionFailureDetail;
|
|
222
|
+
});
|
|
220
223
|
export type RunHandle = {
|
|
221
224
|
current(): Promise<RunSummary>;
|
|
222
225
|
watch(): AsyncIterable<RunSummary>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Safe canonical Connection use failure. No upstream body or private error. */
|
|
2
|
+
export type ConnectionAcquisitionCode = 'temporarily_unavailable' | 'attention_required' | 'invalid_response';
|
|
3
|
+
export type ConnectionAcquisitionStage = 'authorization' | 'provider' | 'finalization';
|
|
4
|
+
export type ConnectionAcquisitionFailure = {
|
|
5
|
+
code: ConnectionAcquisitionCode;
|
|
6
|
+
stage: ConnectionAcquisitionStage;
|
|
7
|
+
retryable: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare function parseConnectionAcquisitionFailure(value: unknown): ConnectionAcquisitionFailure;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ConnectionAcquisitionCode, ConnectionAcquisitionStage } from './connection-acquisition.js';
|
|
2
|
+
export type ConnectionFailureFacts = {
|
|
3
|
+
code: ConnectionAcquisitionCode;
|
|
4
|
+
stage: ConnectionAcquisitionStage | 'transport' | 'validation';
|
|
5
|
+
retryable: boolean;
|
|
6
|
+
attempts: number;
|
|
7
|
+
elapsedMs: number;
|
|
8
|
+
status?: number;
|
|
9
|
+
};
|
|
10
|
+
export type ConnectionFailureDetail = ConnectionFailureFacts & {
|
|
11
|
+
identity: string;
|
|
12
|
+
workspace?: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function parseConnectionFailureDetail(value: unknown): ConnectionFailureDetail;
|
|
15
|
+
export declare function connectionFailureMessage(value: ConnectionFailureDetail): string;
|
|
16
|
+
export declare function connectionRunFailureMessage(detail: ConnectionFailureDetail, completedWork?: boolean): string;
|
|
17
|
+
export declare class ConnectionOperationError extends Error {
|
|
18
|
+
readonly detail: ConnectionFailureDetail;
|
|
19
|
+
get code(): ConnectionAcquisitionCode;
|
|
20
|
+
get stage(): "transport" | "validation" | ConnectionAcquisitionStage;
|
|
21
|
+
get retryable(): boolean;
|
|
22
|
+
get attempts(): number;
|
|
23
|
+
get elapsedMs(): number;
|
|
24
|
+
get status(): number | undefined;
|
|
25
|
+
constructor(identity: string, workspace?: string, facts?: ConnectionFailureFacts);
|
|
26
|
+
}
|