@xylex-group/athena 1.6.1 → 1.7.0

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,31 @@
1
+ import { h as AthenaGatewayErrorCode, u as AthenaGatewayEndpointPath, v as AthenaGatewayMethod, f as AthenaGatewayErrorDetails, r as AthenaGatewayResponse } from './types-wPA1Z4vQ.cjs';
2
+
3
+ interface AthenaGatewayErrorInput {
4
+ code: AthenaGatewayErrorCode;
5
+ message: string;
6
+ status?: number;
7
+ endpoint?: AthenaGatewayEndpointPath;
8
+ method?: AthenaGatewayMethod;
9
+ requestId?: string;
10
+ hint?: string;
11
+ cause?: string;
12
+ }
13
+ /**
14
+ * Canonical error for gateway failures.
15
+ * Holds request context and machine-readable classification.
16
+ */
17
+ declare class AthenaGatewayError extends Error {
18
+ readonly code: AthenaGatewayErrorCode;
19
+ readonly status: number;
20
+ readonly endpoint?: AthenaGatewayEndpointPath;
21
+ readonly method?: AthenaGatewayMethod;
22
+ readonly requestId?: string;
23
+ readonly hint?: string;
24
+ readonly causeDetail?: string;
25
+ constructor(input: AthenaGatewayErrorInput);
26
+ toDetails(): AthenaGatewayErrorDetails;
27
+ static fromResponse<T>(response: AthenaGatewayResponse<T>, fallback: Omit<AthenaGatewayErrorInput, 'code' | 'message' | 'status'>): AthenaGatewayError;
28
+ }
29
+ declare function isAthenaGatewayError(error: unknown): error is AthenaGatewayError;
30
+
31
+ export { AthenaGatewayError as A, isAthenaGatewayError as i };
@@ -0,0 +1,31 @@
1
+ import { h as AthenaGatewayErrorCode, u as AthenaGatewayEndpointPath, v as AthenaGatewayMethod, f as AthenaGatewayErrorDetails, r as AthenaGatewayResponse } from './types-wPA1Z4vQ.js';
2
+
3
+ interface AthenaGatewayErrorInput {
4
+ code: AthenaGatewayErrorCode;
5
+ message: string;
6
+ status?: number;
7
+ endpoint?: AthenaGatewayEndpointPath;
8
+ method?: AthenaGatewayMethod;
9
+ requestId?: string;
10
+ hint?: string;
11
+ cause?: string;
12
+ }
13
+ /**
14
+ * Canonical error for gateway failures.
15
+ * Holds request context and machine-readable classification.
16
+ */
17
+ declare class AthenaGatewayError extends Error {
18
+ readonly code: AthenaGatewayErrorCode;
19
+ readonly status: number;
20
+ readonly endpoint?: AthenaGatewayEndpointPath;
21
+ readonly method?: AthenaGatewayMethod;
22
+ readonly requestId?: string;
23
+ readonly hint?: string;
24
+ readonly causeDetail?: string;
25
+ constructor(input: AthenaGatewayErrorInput);
26
+ toDetails(): AthenaGatewayErrorDetails;
27
+ static fromResponse<T>(response: AthenaGatewayResponse<T>, fallback: Omit<AthenaGatewayErrorInput, 'code' | 'message' | 'status'>): AthenaGatewayError;
28
+ }
29
+ declare function isAthenaGatewayError(error: unknown): error is AthenaGatewayError;
30
+
31
+ export { AthenaGatewayError as A, isAthenaGatewayError as i };