@aws-sdk/types 3.295.0 → 3.303.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,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RequestHandlerProtocol = void 0;
4
+ var RequestHandlerProtocol;
5
+ (function (RequestHandlerProtocol) {
6
+ RequestHandlerProtocol["HTTP_0_9"] = "http/0.9";
7
+ RequestHandlerProtocol["HTTP_1_0"] = "http/1.0";
8
+ RequestHandlerProtocol["TDS_8_0"] = "tds/8.0";
9
+ })(RequestHandlerProtocol = exports.RequestHandlerProtocol || (exports.RequestHandlerProtocol = {}));
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -1 +1,6 @@
1
- export {};
1
+ export var RequestHandlerProtocol;
2
+ (function (RequestHandlerProtocol) {
3
+ RequestHandlerProtocol["HTTP_0_9"] = "http/0.9";
4
+ RequestHandlerProtocol["HTTP_1_0"] = "http/1.0";
5
+ RequestHandlerProtocol["TDS_8_0"] = "tds/8.0";
6
+ })(RequestHandlerProtocol || (RequestHandlerProtocol = {}));
@@ -21,7 +21,7 @@ export interface AbortSignal {
21
21
  * A function to be invoked when the action represented by this signal has
22
22
  * been cancelled.
23
23
  */
24
- onabort: AbortHandler | null;
24
+ onabort: AbortHandler | Function | null;
25
25
  }
26
26
  /**
27
27
  * @public
@@ -0,0 +1,7 @@
1
+ export interface ConnectConfiguration {
2
+ /**
3
+ * The maximum time in milliseconds that the connection phase of a request
4
+ * may take before the connection attempt is abandoned.
5
+ */
6
+ requestTimeout?: number;
7
+ }
@@ -0,0 +1,28 @@
1
+ import { RequestContext } from "../transfer";
2
+ import { ConnectConfiguration } from "./config";
3
+ export interface ConnectionManagerConfiguration {
4
+ /**
5
+ * Maximum number of allowed concurrent requests per connection.
6
+ */
7
+ maxConcurrency?: number;
8
+ /**
9
+ * Disables concurrent requests per connection.
10
+ */
11
+ disableConcurrency?: boolean;
12
+ }
13
+ export interface ConnectionManager<T> {
14
+ /**
15
+ * Retrieves a connection from the connection pool if available,
16
+ * otherwise establish a new connection
17
+ */
18
+ lease(requestContext: RequestContext, connectionConfiguration: ConnectConfiguration): T;
19
+ /**
20
+ * Releases the connection back to the pool making it potentially
21
+ * re-usable by other requests.
22
+ */
23
+ release(requestContext: RequestContext, connection: T): void;
24
+ /**
25
+ * Destroys the connection manager. All connections will be closed.
26
+ */
27
+ destroy(): void;
28
+ }
@@ -0,0 +1,24 @@
1
+ export interface ConnectionPool<T> {
2
+ /**
3
+ * Retrieve the first connection in the pool
4
+ */
5
+ poll(): T | void;
6
+ /**
7
+ * Release the connection back to the pool making it potentially
8
+ * re-usable by other requests.
9
+ */
10
+ offerLast(connection: T): void;
11
+ /**
12
+ * Removes the connection from the pool, and destroys it.
13
+ */
14
+ destroy(connection: T): void;
15
+ /**
16
+ * Implements the iterable protocol and allows arrays to be consumed
17
+ * by most syntaxes expecting iterables, such as the spread syntax
18
+ * and for...of loops
19
+ */
20
+ [Symbol.iterator](): Iterator<T>;
21
+ }
22
+ export interface CacheKey {
23
+ destination: string;
24
+ }
@@ -108,4 +108,9 @@ export interface ResolvedHttpResponse extends HttpResponse {
108
108
  */
109
109
  export interface HttpHandlerOptions {
110
110
  abortSignal?: AbortSignal;
111
+ /**
112
+ * The maximum time in milliseconds that the connection phase of a request
113
+ * may take before the connection attempt is abandoned.
114
+ */
115
+ requestTimeout?: number;
111
116
  }
@@ -21,5 +21,13 @@ export interface RequestHandler<RequestType, ResponseType, HandlerOptions = {}>
21
21
  * @public
22
22
  */
23
23
  export interface RequestHandlerMetadata {
24
- handlerProtocol: string;
24
+ handlerProtocol: RequestHandlerProtocol | string;
25
+ }
26
+ export declare enum RequestHandlerProtocol {
27
+ HTTP_0_9 = "http/0.9",
28
+ HTTP_1_0 = "http/1.0",
29
+ TDS_8_0 = "tds/8.0"
30
+ }
31
+ export interface RequestContext {
32
+ destination: URL;
25
33
  }
@@ -3,7 +3,7 @@ export interface AbortHandler {
3
3
  }
4
4
  export interface AbortSignal {
5
5
  readonly aborted: boolean;
6
- onabort: AbortHandler | null;
6
+ onabort: AbortHandler | Function | null;
7
7
  }
8
8
  export interface AbortController {
9
9
  readonly signal: AbortSignal;
@@ -0,0 +1,3 @@
1
+ export interface ConnectConfiguration {
2
+ requestTimeout?: number;
3
+ }
@@ -0,0 +1,14 @@
1
+ import { RequestContext } from "../transfer";
2
+ import { ConnectConfiguration } from "./config";
3
+ export interface ConnectionManagerConfiguration {
4
+ maxConcurrency?: number;
5
+ disableConcurrency?: boolean;
6
+ }
7
+ export interface ConnectionManager<T> {
8
+ lease(
9
+ requestContext: RequestContext,
10
+ connectionConfiguration: ConnectConfiguration
11
+ ): T;
12
+ release(requestContext: RequestContext, connection: T): void;
13
+ destroy(): void;
14
+ }
@@ -0,0 +1,9 @@
1
+ export interface ConnectionPool<T> {
2
+ poll(): T | void;
3
+ offerLast(connection: T): void;
4
+ destroy(connection: T): void;
5
+ [Symbol.iterator](): Iterator<T>;
6
+ }
7
+ export interface CacheKey {
8
+ destination: string;
9
+ }
@@ -27,4 +27,5 @@ export interface ResolvedHttpResponse extends HttpResponse {
27
27
  }
28
28
  export interface HttpHandlerOptions {
29
29
  abortSignal?: AbortSignal;
30
+ requestTimeout?: number;
30
31
  }
@@ -14,5 +14,13 @@ export interface RequestHandler<
14
14
  ) => Promise<RequestHandlerOutput<ResponseType>>;
15
15
  }
16
16
  export interface RequestHandlerMetadata {
17
- handlerProtocol: string;
17
+ handlerProtocol: RequestHandlerProtocol | string;
18
+ }
19
+ export declare enum RequestHandlerProtocol {
20
+ HTTP_0_9 = "http/0.9",
21
+ HTTP_1_0 = "http/1.0",
22
+ TDS_8_0 = "tds/8.0",
23
+ }
24
+ export interface RequestContext {
25
+ destination: URL;
18
26
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/types",
3
- "version": "3.295.0",
3
+ "version": "3.303.0",
4
4
  "main": "./dist-cjs/index.js",
5
5
  "module": "./dist-es/index.js",
6
6
  "types": "./dist-types/index.d.ts",
@@ -13,7 +13,7 @@
13
13
  "build:types": "tsc -p tsconfig.types.json",
14
14
  "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
15
15
  "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo",
16
- "test": "exit 0"
16
+ "test": "tsc -p tsconfig.test.json"
17
17
  },
18
18
  "author": {
19
19
  "name": "AWS SDK for JavaScript Team",