@aws-sdk/types 3.34.0 → 3.38.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.
- package/CHANGELOG.md +35 -0
- package/dist-cjs/abort.js +2 -0
- package/dist-cjs/client.js +2 -0
- package/dist-cjs/command.js +2 -0
- package/dist-cjs/credentials.js +2 -0
- package/dist-cjs/crypto.js +2 -0
- package/dist-cjs/eventStream.js +2 -0
- package/dist-cjs/http.js +2 -0
- package/dist-cjs/index.js +20 -0
- package/dist-cjs/logger.js +2 -0
- package/dist-cjs/middleware.js +2 -0
- package/dist-cjs/pagination.js +2 -0
- package/dist-cjs/response.js +2 -0
- package/dist-cjs/serde.js +2 -0
- package/dist-cjs/shapes.js +2 -0
- package/dist-cjs/signature.js +2 -0
- package/dist-cjs/transfer.js +2 -0
- package/dist-cjs/util.js +2 -0
- package/dist-cjs/waiter.js +2 -0
- package/dist-es/abort.js +1 -0
- package/dist-es/client.js +1 -0
- package/dist-es/command.js +1 -0
- package/dist-es/credentials.js +1 -0
- package/dist-es/crypto.js +1 -0
- package/dist-es/eventStream.js +1 -0
- package/dist-es/http.js +1 -0
- package/{src/index.d.ts → dist-es/index.js} +2 -2
- package/dist-es/logger.js +1 -0
- package/dist-es/middleware.js +1 -0
- package/dist-es/pagination.js +1 -0
- package/dist-es/response.js +1 -0
- package/dist-es/serde.js +1 -0
- package/dist-es/shapes.js +1 -0
- package/dist-es/signature.js +1 -0
- package/dist-es/transfer.js +1 -0
- package/dist-es/util.js +1 -0
- package/dist-es/waiter.js +1 -0
- package/{dist/types → dist-types}/abort.d.ts +0 -0
- package/{dist/types → dist-types}/client.d.ts +0 -0
- package/{dist/types → dist-types}/command.d.ts +0 -0
- package/{dist/types → dist-types}/credentials.d.ts +0 -0
- package/{dist/types → dist-types}/crypto.d.ts +0 -0
- package/{dist/types → dist-types}/eventStream.d.ts +0 -0
- package/{dist/types → dist-types}/http.d.ts +0 -0
- package/{dist/types → dist-types}/index.d.ts +2 -2
- package/{dist/types → dist-types}/logger.d.ts +0 -0
- package/{dist/types → dist-types}/middleware.d.ts +0 -0
- package/{dist/types → dist-types}/pagination.d.ts +0 -0
- package/{dist/types → dist-types}/response.d.ts +0 -0
- package/{dist/types → dist-types}/serde.d.ts +0 -0
- package/{dist/types → dist-types}/shapes.d.ts +0 -0
- package/{dist/types → dist-types}/signature.d.ts +0 -0
- package/{dist/types → dist-types}/transfer.d.ts +0 -0
- package/dist-types/ts3.4/abort.d.ts +17 -0
- package/{dist/types → dist-types}/ts3.4/client.d.ts +2 -8
- package/{dist/types → dist-types}/ts3.4/command.d.ts +0 -0
- package/dist-types/ts3.4/credentials.d.ts +13 -0
- package/dist-types/ts3.4/crypto.d.ts +20 -0
- package/{dist/types → dist-types}/ts3.4/eventStream.d.ts +2 -8
- package/dist-types/ts3.4/http.d.ts +44 -0
- package/{dist/types → dist-types}/ts3.4/index.d.ts +2 -2
- package/dist-types/ts3.4/logger.d.ts +14 -0
- package/dist-types/ts3.4/middleware.d.ts +155 -0
- package/{dist/types → dist-types}/ts3.4/pagination.d.ts +2 -7
- package/dist-types/ts3.4/response.d.ts +18 -0
- package/{dist/types → dist-types}/ts3.4/serde.d.ts +5 -25
- package/dist-types/ts3.4/shapes.d.ts +22 -0
- package/dist-types/ts3.4/signature.d.ts +47 -0
- package/{dist/types → dist-types}/ts3.4/transfer.d.ts +1 -5
- package/dist-types/ts3.4/util.d.ts +49 -0
- package/dist-types/ts3.4/waiter.d.ts +15 -0
- package/{dist/types → dist-types}/util.d.ts +0 -0
- package/{dist/types → dist-types}/waiter.d.ts +0 -0
- package/package.json +10 -7
- package/dist/cjs/abort.js +0 -3
- package/dist/cjs/client.js +0 -3
- package/dist/cjs/command.js +0 -3
- package/dist/cjs/credentials.js +0 -3
- package/dist/cjs/crypto.js +0 -3
- package/dist/cjs/eventStream.js +0 -3
- package/dist/cjs/http.js +0 -3
- package/dist/cjs/index.js +0 -21
- package/dist/cjs/logger.js +0 -3
- package/dist/cjs/middleware.js +0 -3
- package/dist/cjs/pagination.js +0 -3
- package/dist/cjs/response.js +0 -3
- package/dist/cjs/serde.js +0 -3
- package/dist/cjs/shapes.js +0 -3
- package/dist/cjs/signature.js +0 -3
- package/dist/cjs/transfer.js +0 -3
- package/dist/cjs/util.js +0 -3
- package/dist/cjs/waiter.js +0 -3
- package/dist/es/abort.js +0 -2
- package/dist/es/client.js +0 -2
- package/dist/es/command.js +0 -2
- package/dist/es/credentials.js +0 -2
- package/dist/es/crypto.js +0 -2
- package/dist/es/eventStream.js +0 -2
- package/dist/es/http.js +0 -2
- package/dist/es/index.js +0 -18
- package/dist/es/logger.js +0 -2
- package/dist/es/middleware.js +0 -2
- package/dist/es/pagination.js +0 -2
- package/dist/es/response.js +0 -2
- package/dist/es/serde.js +0 -2
- package/dist/es/shapes.js +0 -2
- package/dist/es/signature.js +0 -2
- package/dist/es/transfer.js +0 -2
- package/dist/es/util.js +0 -2
- package/dist/es/waiter.js +0 -2
- package/dist/types/ts3.4/abort.d.ts +0 -42
- package/dist/types/ts3.4/credentials.d.ts +0 -24
- package/dist/types/ts3.4/crypto.d.ts +0 -45
- package/dist/types/ts3.4/http.d.ts +0 -92
- package/dist/types/ts3.4/logger.d.ts +0 -26
- package/dist/types/ts3.4/middleware.d.ts +0 -338
- package/dist/types/ts3.4/response.d.ts +0 -34
- package/dist/types/ts3.4/shapes.d.ts +0 -45
- package/dist/types/ts3.4/signature.d.ts +0 -100
- package/dist/types/ts3.4/util.d.ts +0 -100
- package/dist/types/ts3.4/waiter.d.ts +0 -32
- package/src/abort.d.ts +0 -42
- package/src/abort.ts +0 -46
- package/src/client.d.ts +0 -34
- package/src/client.ts +0 -35
- package/src/command.d.ts +0 -17
- package/src/command.ts +0 -18
- package/src/credentials.d.ts +0 -24
- package/src/credentials.ts +0 -29
- package/src/crypto.d.ts +0 -45
- package/src/crypto.ts +0 -50
- package/src/eventStream.d.ts +0 -100
- package/src/eventStream.ts +0 -119
- package/src/http.d.ts +0 -92
- package/src/http.ts +0 -101
- package/src/index.ts +0 -17
- package/src/logger.d.ts +0 -26
- package/src/logger.ts +0 -28
- package/src/middleware.d.ts +0 -346
- package/src/middleware.ts +0 -400
- package/src/pagination.d.ts +0 -14
- package/src/pagination.ts +0 -16
- package/src/response.d.ts +0 -34
- package/src/response.ts +0 -40
- package/src/serde.d.ts +0 -49
- package/src/serde.ts +0 -54
- package/src/shapes.d.ts +0 -51
- package/src/shapes.ts +0 -50
- package/src/signature.d.ts +0 -100
- package/src/signature.ts +0 -113
- package/src/transfer.d.ts +0 -16
- package/src/transfer.ts +0 -18
- package/src/util.d.ts +0 -100
- package/src/util.ts +0 -115
- package/src/waiter.d.ts +0 -32
- package/src/waiter.ts +0 -38
- package/tsconfig.cjs.json +0 -9
- package/tsconfig.es.json +0 -10
- package/tsconfig.types.json +0 -9
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,41 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.38.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.37.0...v3.38.0) (2021-10-22)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @aws-sdk/types
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [3.37.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.36.1...v3.37.0) (2021-10-15)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @aws-sdk/types
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [3.36.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.35.0...v3.36.0) (2021-10-08)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Features
|
|
26
|
+
|
|
27
|
+
* publish files in dist-* only ([#2873](https://github.com/aws/aws-sdk-js-v3/issues/2873)) ([53b4243](https://github.com/aws/aws-sdk-js-v3/commit/53b4243b066f25ff2412d5f0dea1036054b2df32))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
# [3.35.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.34.0...v3.35.0) (2021-10-04)
|
|
34
|
+
|
|
35
|
+
**Note:** Version bump only for package @aws-sdk/types
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
6
41
|
# [3.34.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.33.0...v3.34.0) (2021-09-24)
|
|
7
42
|
|
|
8
43
|
|
package/dist-cjs/http.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./abort"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./client"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./command"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./credentials"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./crypto"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./eventStream"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./http"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./logger"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./middleware"), exports);
|
|
13
|
+
tslib_1.__exportStar(require("./pagination"), exports);
|
|
14
|
+
tslib_1.__exportStar(require("./response"), exports);
|
|
15
|
+
tslib_1.__exportStar(require("./serde"), exports);
|
|
16
|
+
tslib_1.__exportStar(require("./shapes"), exports);
|
|
17
|
+
tslib_1.__exportStar(require("./signature"), exports);
|
|
18
|
+
tslib_1.__exportStar(require("./transfer"), exports);
|
|
19
|
+
tslib_1.__exportStar(require("./util"), exports);
|
|
20
|
+
tslib_1.__exportStar(require("./waiter"), exports);
|
package/dist-cjs/util.js
ADDED
package/dist-es/abort.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist-es/http.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -6,10 +6,10 @@ export * from "./crypto";
|
|
|
6
6
|
export * from "./eventStream";
|
|
7
7
|
export * from "./http";
|
|
8
8
|
export * from "./logger";
|
|
9
|
-
export * from "./pagination";
|
|
10
|
-
export * from "./serde";
|
|
11
9
|
export * from "./middleware";
|
|
10
|
+
export * from "./pagination";
|
|
12
11
|
export * from "./response";
|
|
12
|
+
export * from "./serde";
|
|
13
13
|
export * from "./shapes";
|
|
14
14
|
export * from "./signature";
|
|
15
15
|
export * from "./transfer";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist-es/serde.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist-es/util.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -6,10 +6,10 @@ export * from "./crypto";
|
|
|
6
6
|
export * from "./eventStream";
|
|
7
7
|
export * from "./http";
|
|
8
8
|
export * from "./logger";
|
|
9
|
-
export * from "./pagination";
|
|
10
|
-
export * from "./serde";
|
|
11
9
|
export * from "./middleware";
|
|
10
|
+
export * from "./pagination";
|
|
12
11
|
export * from "./response";
|
|
12
|
+
export * from "./serde";
|
|
13
13
|
export * from "./shapes";
|
|
14
14
|
export * from "./signature";
|
|
15
15
|
export * from "./transfer";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface AbortHandler {
|
|
2
|
+
(this: AbortSignal, ev: any): any;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export interface AbortSignal {
|
|
6
|
+
|
|
7
|
+
readonly aborted: boolean;
|
|
8
|
+
|
|
9
|
+
onabort: AbortHandler | null;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface AbortController {
|
|
13
|
+
|
|
14
|
+
readonly signal: AbortSignal;
|
|
15
|
+
|
|
16
|
+
abort(): void;
|
|
17
|
+
}
|
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
import { Command } from "./command";
|
|
2
2
|
import { MiddlewareStack } from "./middleware";
|
|
3
3
|
import { MetadataBearer } from "./response";
|
|
4
|
-
|
|
5
|
-
* function definition for different overrides of client's 'send' function.
|
|
6
|
-
*/
|
|
4
|
+
|
|
7
5
|
interface InvokeFunction<InputTypes extends object, OutputTypes extends MetadataBearer, ResolvedClientConfiguration> {
|
|
8
6
|
<InputType extends InputTypes, OutputType extends OutputTypes>(command: Command<InputTypes, InputType, OutputTypes, OutputType, ResolvedClientConfiguration>, options?: any): Promise<OutputType>;
|
|
9
7
|
<InputType extends InputTypes, OutputType extends OutputTypes>(command: Command<InputTypes, InputType, OutputTypes, OutputType, ResolvedClientConfiguration>, options: any, cb: (err: any, data?: OutputType) => void): void;
|
|
10
8
|
<InputType extends InputTypes, OutputType extends OutputTypes>(command: Command<InputTypes, InputType, OutputTypes, OutputType, ResolvedClientConfiguration>, options?: any, cb?: (err: any, data?: OutputType) => void): Promise<OutputType> | void;
|
|
11
9
|
}
|
|
12
|
-
|
|
13
|
-
* A general interface for service clients, idempotent to browser or node clients
|
|
14
|
-
* This type corresponds to SmithyClient(https://github.com/aws/aws-sdk-js-v3/blob/main/packages/smithy-client/src/client.ts).
|
|
15
|
-
* It's provided for using without importing the SmithyClient class.
|
|
16
|
-
*/
|
|
10
|
+
|
|
17
11
|
export interface Client<Input extends object, Output extends MetadataBearer, ResolvedClientConfiguration> {
|
|
18
12
|
readonly config: ResolvedClientConfiguration;
|
|
19
13
|
middlewareStack: MiddlewareStack<Input, Output>;
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Provider } from "./util";
|
|
2
|
+
|
|
3
|
+
export interface Credentials {
|
|
4
|
+
|
|
5
|
+
readonly accessKeyId: string;
|
|
6
|
+
|
|
7
|
+
readonly secretAccessKey: string;
|
|
8
|
+
|
|
9
|
+
readonly sessionToken?: string;
|
|
10
|
+
|
|
11
|
+
readonly expiration?: Date;
|
|
12
|
+
}
|
|
13
|
+
export declare type CredentialProvider = Provider<Credentials>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare type SourceData = string | ArrayBuffer | ArrayBufferView;
|
|
2
|
+
|
|
3
|
+
export interface Hash {
|
|
4
|
+
|
|
5
|
+
update(toHash: SourceData, encoding?: "utf8" | "ascii" | "latin1"): void;
|
|
6
|
+
|
|
7
|
+
digest(): Promise<Uint8Array>;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface HashConstructor {
|
|
11
|
+
new (secret?: SourceData): Hash;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface StreamHasher<StreamType = any> {
|
|
15
|
+
(hashCtor: HashConstructor, stream: StreamType): Promise<Uint8Array>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface randomValues {
|
|
19
|
+
(byteLength: number): Promise<Uint8Array>;
|
|
20
|
+
}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { HttpRequest } from "./http";
|
|
2
2
|
import { FinalizeHandler, FinalizeHandlerArguments, FinalizeHandlerOutput, HandlerExecutionContext } from "./middleware";
|
|
3
3
|
import { MetadataBearer } from "./response";
|
|
4
|
-
|
|
5
|
-
* An event stream message. The headers and body properties will always be
|
|
6
|
-
* defined, with empty headers represented as an object with no keys and an
|
|
7
|
-
* empty body represented as a zero-length Uint8Array.
|
|
8
|
-
*/
|
|
4
|
+
|
|
9
5
|
export interface Message {
|
|
10
6
|
headers: MessageHeaders;
|
|
11
7
|
body: Uint8Array;
|
|
@@ -55,9 +51,7 @@ export interface Int64 {
|
|
|
55
51
|
valueOf: () => number;
|
|
56
52
|
toString: () => string;
|
|
57
53
|
}
|
|
58
|
-
|
|
59
|
-
* Util functions for serializing or deserializing event stream
|
|
60
|
-
*/
|
|
54
|
+
|
|
61
55
|
export interface EventStreamSerdeContext {
|
|
62
56
|
eventStreamMarshaller: EventStreamMarshaller;
|
|
63
57
|
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { AbortSignal } from "./abort";
|
|
2
|
+
|
|
3
|
+
export interface Headers extends Map<string, string> {
|
|
4
|
+
|
|
5
|
+
withHeader(headerName: string, headerValue: string): Headers;
|
|
6
|
+
|
|
7
|
+
withoutHeader(headerName: string): Headers;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface HeaderBag {
|
|
11
|
+
[key: string]: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface HttpMessage {
|
|
15
|
+
headers: HeaderBag;
|
|
16
|
+
body?: any;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface QueryParameterBag {
|
|
20
|
+
[key: string]: string | Array<string> | null;
|
|
21
|
+
}
|
|
22
|
+
export interface Endpoint {
|
|
23
|
+
protocol: string;
|
|
24
|
+
hostname: string;
|
|
25
|
+
port?: number;
|
|
26
|
+
path: string;
|
|
27
|
+
query?: QueryParameterBag;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface HttpRequest extends HttpMessage, Endpoint {
|
|
31
|
+
method: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface HttpResponse extends HttpMessage {
|
|
35
|
+
statusCode: number;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface ResolvedHttpResponse extends HttpResponse {
|
|
39
|
+
body: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface HttpHandlerOptions {
|
|
43
|
+
abortSignal?: AbortSignal;
|
|
44
|
+
}
|
|
@@ -6,10 +6,10 @@ export * from "./crypto";
|
|
|
6
6
|
export * from "./eventStream";
|
|
7
7
|
export * from "./http";
|
|
8
8
|
export * from "./logger";
|
|
9
|
-
export * from "./pagination";
|
|
10
|
-
export * from "./serde";
|
|
11
9
|
export * from "./middleware";
|
|
10
|
+
export * from "./pagination";
|
|
12
11
|
export * from "./response";
|
|
12
|
+
export * from "./serde";
|
|
13
13
|
export * from "./shapes";
|
|
14
14
|
export * from "./signature";
|
|
15
15
|
export * from "./transfer";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
export declare type LogLevel = "all" | "log" | "info" | "warn" | "error" | "off";
|
|
3
|
+
|
|
4
|
+
export interface LoggerOptions {
|
|
5
|
+
logger?: Logger;
|
|
6
|
+
logLevel?: LogLevel;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface Logger {
|
|
10
|
+
debug(content: object): void;
|
|
11
|
+
info(content: object): void;
|
|
12
|
+
warn(content: object): void;
|
|
13
|
+
error(content: object): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { Logger } from "./logger";
|
|
2
|
+
import { UserAgent } from "./util";
|
|
3
|
+
export interface InitializeHandlerArguments<Input extends object> {
|
|
4
|
+
|
|
5
|
+
input: Input;
|
|
6
|
+
}
|
|
7
|
+
export interface InitializeHandlerOutput<Output extends object> extends DeserializeHandlerOutput<Output> {
|
|
8
|
+
output: Output;
|
|
9
|
+
}
|
|
10
|
+
export interface SerializeHandlerArguments<Input extends object> extends InitializeHandlerArguments<Input> {
|
|
11
|
+
|
|
12
|
+
request?: unknown;
|
|
13
|
+
}
|
|
14
|
+
export interface SerializeHandlerOutput<Output extends object> extends InitializeHandlerOutput<Output> {
|
|
15
|
+
}
|
|
16
|
+
export interface BuildHandlerArguments<Input extends object> extends FinalizeHandlerArguments<Input> {
|
|
17
|
+
}
|
|
18
|
+
export interface BuildHandlerOutput<Output extends object> extends InitializeHandlerOutput<Output> {
|
|
19
|
+
}
|
|
20
|
+
export interface FinalizeHandlerArguments<Input extends object> extends SerializeHandlerArguments<Input> {
|
|
21
|
+
|
|
22
|
+
request: unknown;
|
|
23
|
+
}
|
|
24
|
+
export interface FinalizeHandlerOutput<Output extends object> extends InitializeHandlerOutput<Output> {
|
|
25
|
+
}
|
|
26
|
+
export interface DeserializeHandlerArguments<Input extends object> extends FinalizeHandlerArguments<Input> {
|
|
27
|
+
}
|
|
28
|
+
export interface DeserializeHandlerOutput<Output extends object> {
|
|
29
|
+
|
|
30
|
+
response: unknown;
|
|
31
|
+
output?: Output;
|
|
32
|
+
}
|
|
33
|
+
export interface InitializeHandler<Input extends object, Output extends object> {
|
|
34
|
+
|
|
35
|
+
(args: InitializeHandlerArguments<Input>): Promise<InitializeHandlerOutput<Output>>;
|
|
36
|
+
}
|
|
37
|
+
export declare type Handler<Input extends object, Output extends object> = InitializeHandler<Input, Output>;
|
|
38
|
+
export interface SerializeHandler<Input extends object, Output extends object> {
|
|
39
|
+
|
|
40
|
+
(args: SerializeHandlerArguments<Input>): Promise<SerializeHandlerOutput<Output>>;
|
|
41
|
+
}
|
|
42
|
+
export interface FinalizeHandler<Input extends object, Output extends object> {
|
|
43
|
+
|
|
44
|
+
(args: FinalizeHandlerArguments<Input>): Promise<FinalizeHandlerOutput<Output>>;
|
|
45
|
+
}
|
|
46
|
+
export interface BuildHandler<Input extends object, Output extends object> {
|
|
47
|
+
(args: BuildHandlerArguments<Input>): Promise<BuildHandlerOutput<Output>>;
|
|
48
|
+
}
|
|
49
|
+
export interface DeserializeHandler<Input extends object, Output extends object> {
|
|
50
|
+
(args: DeserializeHandlerArguments<Input>): Promise<DeserializeHandlerOutput<Output>>;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface InitializeMiddleware<Input extends object, Output extends object> {
|
|
54
|
+
|
|
55
|
+
(next: InitializeHandler<Input, Output>, context: HandlerExecutionContext): InitializeHandler<Input, Output>;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface SerializeMiddleware<Input extends object, Output extends object> {
|
|
59
|
+
|
|
60
|
+
(next: SerializeHandler<Input, Output>, context: HandlerExecutionContext): SerializeHandler<Input, Output>;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface FinalizeRequestMiddleware<Input extends object, Output extends object> {
|
|
64
|
+
|
|
65
|
+
(next: FinalizeHandler<Input, Output>, context: HandlerExecutionContext): FinalizeHandler<Input, Output>;
|
|
66
|
+
}
|
|
67
|
+
export interface BuildMiddleware<Input extends object, Output extends object> {
|
|
68
|
+
(next: BuildHandler<Input, Output>, context: HandlerExecutionContext): BuildHandler<Input, Output>;
|
|
69
|
+
}
|
|
70
|
+
export interface DeserializeMiddleware<Input extends object, Output extends object> {
|
|
71
|
+
(next: DeserializeHandler<Input, Output>, context: HandlerExecutionContext): DeserializeHandler<Input, Output>;
|
|
72
|
+
}
|
|
73
|
+
export declare type MiddlewareType<Input extends object, Output extends object> = InitializeMiddleware<Input, Output> | SerializeMiddleware<Input, Output> | BuildMiddleware<Input, Output> | FinalizeRequestMiddleware<Input, Output> | DeserializeMiddleware<Input, Output>;
|
|
74
|
+
|
|
75
|
+
export interface Terminalware {
|
|
76
|
+
<Input extends object, Output extends object>(context: HandlerExecutionContext): DeserializeHandler<Input, Output>;
|
|
77
|
+
}
|
|
78
|
+
export declare type Step = "initialize" | "serialize" | "build" | "finalizeRequest" | "deserialize";
|
|
79
|
+
export declare type Priority = "high" | "normal" | "low";
|
|
80
|
+
export interface HandlerOptions {
|
|
81
|
+
|
|
82
|
+
step?: Step;
|
|
83
|
+
|
|
84
|
+
tags?: Array<string>;
|
|
85
|
+
|
|
86
|
+
name?: string;
|
|
87
|
+
|
|
88
|
+
override?: boolean;
|
|
89
|
+
}
|
|
90
|
+
export interface AbsoluteLocation {
|
|
91
|
+
|
|
92
|
+
priority?: Priority;
|
|
93
|
+
}
|
|
94
|
+
export declare type Relation = "before" | "after";
|
|
95
|
+
export interface RelativeLocation {
|
|
96
|
+
|
|
97
|
+
relation: Relation;
|
|
98
|
+
|
|
99
|
+
toMiddleware: string;
|
|
100
|
+
}
|
|
101
|
+
export declare type RelativeMiddlewareOptions = RelativeLocation & Pick<HandlerOptions, Exclude<keyof HandlerOptions, "step">>;
|
|
102
|
+
export interface InitializeHandlerOptions extends HandlerOptions {
|
|
103
|
+
step?: "initialize";
|
|
104
|
+
}
|
|
105
|
+
export interface SerializeHandlerOptions extends HandlerOptions {
|
|
106
|
+
step: "serialize";
|
|
107
|
+
}
|
|
108
|
+
export interface BuildHandlerOptions extends HandlerOptions {
|
|
109
|
+
step: "build";
|
|
110
|
+
}
|
|
111
|
+
export interface FinalizeRequestHandlerOptions extends HandlerOptions {
|
|
112
|
+
step: "finalizeRequest";
|
|
113
|
+
}
|
|
114
|
+
export interface DeserializeHandlerOptions extends HandlerOptions {
|
|
115
|
+
step: "deserialize";
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface MiddlewareStack<Input extends object, Output extends object> extends Pluggable<Input, Output> {
|
|
119
|
+
|
|
120
|
+
add(middleware: InitializeMiddleware<Input, Output>, options?: InitializeHandlerOptions & AbsoluteLocation): void;
|
|
121
|
+
|
|
122
|
+
add(middleware: SerializeMiddleware<Input, Output>, options: SerializeHandlerOptions & AbsoluteLocation): void;
|
|
123
|
+
|
|
124
|
+
add(middleware: BuildMiddleware<Input, Output>, options: BuildHandlerOptions & AbsoluteLocation): void;
|
|
125
|
+
|
|
126
|
+
add(middleware: FinalizeRequestMiddleware<Input, Output>, options: FinalizeRequestHandlerOptions & AbsoluteLocation): void;
|
|
127
|
+
|
|
128
|
+
add(middleware: DeserializeMiddleware<Input, Output>, options: DeserializeHandlerOptions & AbsoluteLocation): void;
|
|
129
|
+
|
|
130
|
+
addRelativeTo(middleware: MiddlewareType<Input, Output>, options: RelativeMiddlewareOptions): void;
|
|
131
|
+
|
|
132
|
+
use(pluggable: Pluggable<Input, Output>): void;
|
|
133
|
+
|
|
134
|
+
clone(): MiddlewareStack<Input, Output>;
|
|
135
|
+
|
|
136
|
+
remove(toRemove: MiddlewareType<Input, Output> | string): boolean;
|
|
137
|
+
|
|
138
|
+
removeByTag(toRemove: string): boolean;
|
|
139
|
+
|
|
140
|
+
concat<InputType extends Input, OutputType extends Output>(from: MiddlewareStack<InputType, OutputType>): MiddlewareStack<InputType, OutputType>;
|
|
141
|
+
|
|
142
|
+
resolve<InputType extends Input, OutputType extends Output>(handler: DeserializeHandler<InputType, OutputType>, context: HandlerExecutionContext): InitializeHandler<InputType, OutputType>;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export interface HandlerExecutionContext {
|
|
146
|
+
|
|
147
|
+
logger?: Logger;
|
|
148
|
+
|
|
149
|
+
userAgent?: UserAgent;
|
|
150
|
+
[key: string]: any;
|
|
151
|
+
}
|
|
152
|
+
export interface Pluggable<Input extends object, Output extends object> {
|
|
153
|
+
|
|
154
|
+
applyToStack: (stack: MiddlewareStack<Input, Output>) => void;
|
|
155
|
+
}
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
import { Client } from "./client";
|
|
2
|
-
|
|
3
|
-
* Expected type definition of a paginator.
|
|
4
|
-
*/
|
|
2
|
+
|
|
5
3
|
export declare type Paginator<T> = AsyncGenerator<T, T, unknown>;
|
|
6
|
-
|
|
7
|
-
* Expected paginator configuration passed to an operation. Services will extend
|
|
8
|
-
* this interface definition and may type client further.
|
|
9
|
-
*/
|
|
4
|
+
|
|
10
5
|
export interface PaginationConfiguration {
|
|
11
6
|
client: Client<any, any, any>;
|
|
12
7
|
pageSize?: number;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface ResponseMetadata {
|
|
2
|
+
|
|
3
|
+
httpStatusCode?: number;
|
|
4
|
+
|
|
5
|
+
requestId?: string;
|
|
6
|
+
|
|
7
|
+
extendedRequestId?: string;
|
|
8
|
+
|
|
9
|
+
cfId?: string;
|
|
10
|
+
|
|
11
|
+
attempts?: number;
|
|
12
|
+
|
|
13
|
+
totalRetryDelay?: number;
|
|
14
|
+
}
|
|
15
|
+
export interface MetadataBearer {
|
|
16
|
+
|
|
17
|
+
$metadata: ResponseMetadata;
|
|
18
|
+
}
|