@aws-sdk/types 3.22.0 → 3.34.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 +38 -0
- package/dist/cjs/crypto.js +1 -1
- package/dist/es/crypto.js +1 -1
- package/dist/types/crypto.d.ts +1 -3
- package/dist/types/ts3.4/crypto.d.ts +1 -3
- package/package.json +4 -3
- package/src/abort.d.ts +42 -0
- package/src/client.d.ts +34 -0
- package/src/command.d.ts +17 -0
- package/src/credentials.d.ts +24 -0
- package/src/crypto.d.ts +45 -0
- package/src/crypto.ts +1 -1
- package/src/eventStream.d.ts +100 -0
- package/src/http.d.ts +92 -0
- package/src/index.d.ts +17 -0
- package/src/logger.d.ts +26 -0
- package/src/middleware.d.ts +346 -0
- package/src/pagination.d.ts +14 -0
- package/src/response.d.ts +34 -0
- package/src/serde.d.ts +49 -0
- package/src/shapes.d.ts +51 -0
- package/src/signature.d.ts +100 -0
- package/src/transfer.d.ts +16 -0
- package/src/util.d.ts +100 -0
- package/src/waiter.d.ts +32 -0
- package/tsconfig.cjs.json +3 -4
- package/tsconfig.es.json +3 -4
- package/tsconfig.types.json +9 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,44 @@
|
|
|
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.34.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.33.0...v3.34.0) (2021-09-24)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **non-clients:** remove comments from transpiled JS files ([#2813](https://github.com/aws/aws-sdk-js-v3/issues/2813)) ([e6fc7f3](https://github.com/aws/aws-sdk-js-v3/commit/e6fc7f3e0fa74785590ac19e7ed143c916bb9b6e))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
# [3.32.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.31.0...v3.32.0) (2021-09-17)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @aws-sdk/types
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
# [3.29.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.28.0...v3.29.0) (2021-09-02)
|
|
26
|
+
|
|
27
|
+
**Note:** Version bump only for package @aws-sdk/types
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
# [3.25.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.24.0...v3.25.0) (2021-08-05)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Bug Fixes
|
|
37
|
+
|
|
38
|
+
* **packages:** use HashConstructor instead of { new: Hash } ([#2638](https://github.com/aws/aws-sdk-js-v3/issues/2638)) ([6890a47](https://github.com/aws/aws-sdk-js-v3/commit/6890a47322fa37efb7a5589ab57d3273da69ac67))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
6
44
|
# [3.22.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.21.0...v3.22.0) (2021-07-16)
|
|
7
45
|
|
|
8
46
|
|
package/dist/cjs/crypto.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3J5cHRvLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NyeXB0by50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IHR5cGUgU291cmNlRGF0YSA9IHN0cmluZyB8IEFycmF5QnVmZmVyIHwg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Qgd2l0aCBieXRlcyBmcm9tIGFcbiAqIGNyeXB0b2dyYXBoaWNhbGx5IHNlY3VyZSBwc2V1ZG9yYW5kb20gbnVtYmVyIGdlbmVyYXRvci5cbiAqL1xuZXhwb3J0IGludGVyZmFjZSByYW5kb21WYWx1ZXMge1xuICAoYnl0ZUxlbmd0aDogbnVtYmVyKTogUHJvbWlzZTxVaW50OEFycmF5Pjtcbn1cbiJdfQ==
|
package/dist/types/crypto.d.ts
CHANGED
|
@@ -34,9 +34,7 @@ export interface HashConstructor {
|
|
|
34
34
|
* implementation of this interface.
|
|
35
35
|
*/
|
|
36
36
|
export interface StreamHasher<StreamType = any> {
|
|
37
|
-
(hashCtor:
|
|
38
|
-
new (): Hash;
|
|
39
|
-
}, stream: StreamType): Promise<Uint8Array>;
|
|
37
|
+
(hashCtor: HashConstructor, stream: StreamType): Promise<Uint8Array>;
|
|
40
38
|
}
|
|
41
39
|
/**
|
|
42
40
|
* A function that returns a promise fulfilled with bytes from a
|
|
@@ -34,9 +34,7 @@ export interface HashConstructor {
|
|
|
34
34
|
* implementation of this interface.
|
|
35
35
|
*/
|
|
36
36
|
export interface StreamHasher<StreamType = any> {
|
|
37
|
-
(hashCtor:
|
|
38
|
-
new (): Hash;
|
|
39
|
-
}, stream: StreamType): Promise<Uint8Array>;
|
|
37
|
+
(hashCtor: HashConstructor, stream: StreamType): Promise<Uint8Array>;
|
|
40
38
|
}
|
|
41
39
|
/**
|
|
42
40
|
* A function that returns a promise fulfilled with bytes from a
|
package/package.json
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/types",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.34.0",
|
|
4
4
|
"main": "./dist/cjs/index.js",
|
|
5
5
|
"module": "./dist/es/index.js",
|
|
6
6
|
"types": "./dist/types/index.d.ts",
|
|
7
7
|
"description": "Types for the AWS SDK",
|
|
8
8
|
"devDependencies": {
|
|
9
|
-
"typescript": "~4.3.
|
|
9
|
+
"typescript": "~4.3.5"
|
|
10
10
|
},
|
|
11
11
|
"scripts": {
|
|
12
|
+
"build": "yarn build:cjs && yarn build:es && yarn build:types",
|
|
12
13
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
13
14
|
"build:es": "tsc -p tsconfig.es.json",
|
|
14
|
-
"build": "
|
|
15
|
+
"build:types": "tsc -p tsconfig.types.json",
|
|
15
16
|
"downlevel-dts": "downlevel-dts dist/types dist/types/ts3.4",
|
|
16
17
|
"test": "exit 0"
|
|
17
18
|
},
|
package/src/abort.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export interface AbortHandler {
|
|
2
|
+
(this: AbortSignal, ev: any): any;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Holders of an AbortSignal object may query if the associated operation has
|
|
6
|
+
* been aborted and register an onabort handler.
|
|
7
|
+
*
|
|
8
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
|
|
9
|
+
*/
|
|
10
|
+
export interface AbortSignal {
|
|
11
|
+
/**
|
|
12
|
+
* Whether the action represented by this signal has been cancelled.
|
|
13
|
+
*/
|
|
14
|
+
readonly aborted: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* A function to be invoked when the action represented by this signal has
|
|
17
|
+
* been cancelled.
|
|
18
|
+
*/
|
|
19
|
+
onabort: AbortHandler | null;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The AWS SDK uses a Controller/Signal model to allow for cooperative
|
|
23
|
+
* cancellation of asynchronous operations. When initiating such an operation,
|
|
24
|
+
* the caller can create an AbortController and then provide linked signal to
|
|
25
|
+
* subtasks. This allows a single source to communicate to multiple consumers
|
|
26
|
+
* that an action has been aborted without dictating how that cancellation
|
|
27
|
+
* should be handled.
|
|
28
|
+
*
|
|
29
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/AbortController
|
|
30
|
+
*/
|
|
31
|
+
export interface AbortController {
|
|
32
|
+
/**
|
|
33
|
+
* An object that reports whether the action associated with this
|
|
34
|
+
* {AbortController} has been cancelled.
|
|
35
|
+
*/
|
|
36
|
+
readonly signal: AbortSignal;
|
|
37
|
+
/**
|
|
38
|
+
* Declares the operation associated with this AbortController to have been
|
|
39
|
+
* cancelled.
|
|
40
|
+
*/
|
|
41
|
+
abort(): void;
|
|
42
|
+
}
|
package/src/client.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Command } from "./command";
|
|
2
|
+
import { MiddlewareStack } from "./middleware";
|
|
3
|
+
import { MetadataBearer } from "./response";
|
|
4
|
+
/**
|
|
5
|
+
* function definition for different overrides of client's 'send' function.
|
|
6
|
+
*/
|
|
7
|
+
interface InvokeFunction<InputTypes extends object, OutputTypes extends MetadataBearer, ResolvedClientConfiguration> {
|
|
8
|
+
<InputType extends InputTypes, OutputType extends OutputTypes>(
|
|
9
|
+
command: Command<InputTypes, InputType, OutputTypes, OutputType, ResolvedClientConfiguration>,
|
|
10
|
+
options?: any
|
|
11
|
+
): Promise<OutputType>;
|
|
12
|
+
<InputType extends InputTypes, OutputType extends OutputTypes>(
|
|
13
|
+
command: Command<InputTypes, InputType, OutputTypes, OutputType, ResolvedClientConfiguration>,
|
|
14
|
+
options: any,
|
|
15
|
+
cb: (err: any, data?: OutputType) => void
|
|
16
|
+
): void;
|
|
17
|
+
<InputType extends InputTypes, OutputType extends OutputTypes>(
|
|
18
|
+
command: Command<InputTypes, InputType, OutputTypes, OutputType, ResolvedClientConfiguration>,
|
|
19
|
+
options?: any,
|
|
20
|
+
cb?: (err: any, data?: OutputType) => void
|
|
21
|
+
): Promise<OutputType> | void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A general interface for service clients, idempotent to browser or node clients
|
|
25
|
+
* This type corresponds to SmithyClient(https://github.com/aws/aws-sdk-js-v3/blob/main/packages/smithy-client/src/client.ts).
|
|
26
|
+
* It's provided for using without importing the SmithyClient class.
|
|
27
|
+
*/
|
|
28
|
+
export interface Client<Input extends object, Output extends MetadataBearer, ResolvedClientConfiguration> {
|
|
29
|
+
readonly config: ResolvedClientConfiguration;
|
|
30
|
+
middlewareStack: MiddlewareStack<Input, Output>;
|
|
31
|
+
send: InvokeFunction<Input, Output, ResolvedClientConfiguration>;
|
|
32
|
+
destroy: () => void;
|
|
33
|
+
}
|
|
34
|
+
export {};
|
package/src/command.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Handler, MiddlewareStack } from "./middleware";
|
|
2
|
+
import { MetadataBearer } from "./response";
|
|
3
|
+
export interface Command<
|
|
4
|
+
ClientInput extends object,
|
|
5
|
+
InputType extends ClientInput,
|
|
6
|
+
ClientOutput extends MetadataBearer,
|
|
7
|
+
OutputType extends ClientOutput,
|
|
8
|
+
ResolvedConfiguration
|
|
9
|
+
> {
|
|
10
|
+
readonly input: InputType;
|
|
11
|
+
readonly middlewareStack: MiddlewareStack<InputType, OutputType>;
|
|
12
|
+
resolveMiddleware(
|
|
13
|
+
stack: MiddlewareStack<ClientInput, ClientOutput>,
|
|
14
|
+
configuration: ResolvedConfiguration,
|
|
15
|
+
options: any
|
|
16
|
+
): Handler<InputType, OutputType>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Provider } from "./util";
|
|
2
|
+
/**
|
|
3
|
+
* An object representing temporary or permanent AWS credentials.
|
|
4
|
+
*/
|
|
5
|
+
export interface Credentials {
|
|
6
|
+
/**
|
|
7
|
+
* AWS access key ID
|
|
8
|
+
*/
|
|
9
|
+
readonly accessKeyId: string;
|
|
10
|
+
/**
|
|
11
|
+
* AWS secret access key
|
|
12
|
+
*/
|
|
13
|
+
readonly secretAccessKey: string;
|
|
14
|
+
/**
|
|
15
|
+
* A security or session token to use with these credentials. Usually
|
|
16
|
+
* present for temporary credentials.
|
|
17
|
+
*/
|
|
18
|
+
readonly sessionToken?: string;
|
|
19
|
+
/**
|
|
20
|
+
* A {Date} when these credentials will no longer be accepted.
|
|
21
|
+
*/
|
|
22
|
+
readonly expiration?: Date;
|
|
23
|
+
}
|
|
24
|
+
export declare type CredentialProvider = Provider<Credentials>;
|
package/src/crypto.d.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export declare type SourceData = string | ArrayBuffer | ArrayBufferView;
|
|
2
|
+
/**
|
|
3
|
+
* An object that provides a hash of data provided in chunks to `update`. The
|
|
4
|
+
* hash may be performed incrementally as chunks are received or all at once
|
|
5
|
+
* when the hash is finalized, depending on the underlying implementation.
|
|
6
|
+
*/
|
|
7
|
+
export interface Hash {
|
|
8
|
+
/**
|
|
9
|
+
* Adds a chunk of data to the hash. If a buffer is provided, the `encoding`
|
|
10
|
+
* argument will be ignored. If a string is provided without a specified
|
|
11
|
+
* encoding, implementations must assume UTF-8 encoding.
|
|
12
|
+
*
|
|
13
|
+
* Not all encodings are supported on all platforms, though all must support
|
|
14
|
+
* UTF-8.
|
|
15
|
+
*/
|
|
16
|
+
update(toHash: SourceData, encoding?: "utf8" | "ascii" | "latin1"): void;
|
|
17
|
+
/**
|
|
18
|
+
* Finalizes the hash and provides a promise that will be fulfilled with the
|
|
19
|
+
* raw bytes of the calculated hash.
|
|
20
|
+
*/
|
|
21
|
+
digest(): Promise<Uint8Array>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A constructor for a hash that may be used to calculate an HMAC. Implementing
|
|
25
|
+
* classes should not directly hold the provided key in memory beyond the
|
|
26
|
+
* lexical scope of the constructor.
|
|
27
|
+
*/
|
|
28
|
+
export interface HashConstructor {
|
|
29
|
+
new (secret?: SourceData): Hash;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* A function that calculates the hash of a data stream. Determining the hash
|
|
33
|
+
* will consume the stream, so only replayable streams should be provided to an
|
|
34
|
+
* implementation of this interface.
|
|
35
|
+
*/
|
|
36
|
+
export interface StreamHasher<StreamType = any> {
|
|
37
|
+
(hashCtor: HashConstructor, stream: StreamType): Promise<Uint8Array>;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* A function that returns a promise fulfilled with bytes from a
|
|
41
|
+
* cryptographically secure pseudorandom number generator.
|
|
42
|
+
*/
|
|
43
|
+
export interface randomValues {
|
|
44
|
+
(byteLength: number): Promise<Uint8Array>;
|
|
45
|
+
}
|
package/src/crypto.ts
CHANGED
|
@@ -38,7 +38,7 @@ export interface HashConstructor {
|
|
|
38
38
|
* implementation of this interface.
|
|
39
39
|
*/
|
|
40
40
|
export interface StreamHasher<StreamType = any> {
|
|
41
|
-
(hashCtor:
|
|
41
|
+
(hashCtor: HashConstructor, stream: StreamType): Promise<Uint8Array>;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
/**
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { HttpRequest } from "./http";
|
|
2
|
+
import {
|
|
3
|
+
FinalizeHandler,
|
|
4
|
+
FinalizeHandlerArguments,
|
|
5
|
+
FinalizeHandlerOutput,
|
|
6
|
+
HandlerExecutionContext,
|
|
7
|
+
} from "./middleware";
|
|
8
|
+
import { MetadataBearer } from "./response";
|
|
9
|
+
/**
|
|
10
|
+
* An event stream message. The headers and body properties will always be
|
|
11
|
+
* defined, with empty headers represented as an object with no keys and an
|
|
12
|
+
* empty body represented as a zero-length Uint8Array.
|
|
13
|
+
*/
|
|
14
|
+
export interface Message {
|
|
15
|
+
headers: MessageHeaders;
|
|
16
|
+
body: Uint8Array;
|
|
17
|
+
}
|
|
18
|
+
export interface MessageHeaders {
|
|
19
|
+
[name: string]: MessageHeaderValue;
|
|
20
|
+
}
|
|
21
|
+
export interface BooleanHeaderValue {
|
|
22
|
+
type: "boolean";
|
|
23
|
+
value: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface ByteHeaderValue {
|
|
26
|
+
type: "byte";
|
|
27
|
+
value: number;
|
|
28
|
+
}
|
|
29
|
+
export interface ShortHeaderValue {
|
|
30
|
+
type: "short";
|
|
31
|
+
value: number;
|
|
32
|
+
}
|
|
33
|
+
export interface IntegerHeaderValue {
|
|
34
|
+
type: "integer";
|
|
35
|
+
value: number;
|
|
36
|
+
}
|
|
37
|
+
export interface LongHeaderValue {
|
|
38
|
+
type: "long";
|
|
39
|
+
value: Int64;
|
|
40
|
+
}
|
|
41
|
+
export interface BinaryHeaderValue {
|
|
42
|
+
type: "binary";
|
|
43
|
+
value: Uint8Array;
|
|
44
|
+
}
|
|
45
|
+
export interface StringHeaderValue {
|
|
46
|
+
type: "string";
|
|
47
|
+
value: string;
|
|
48
|
+
}
|
|
49
|
+
export interface TimestampHeaderValue {
|
|
50
|
+
type: "timestamp";
|
|
51
|
+
value: Date;
|
|
52
|
+
}
|
|
53
|
+
export interface UuidHeaderValue {
|
|
54
|
+
type: "uuid";
|
|
55
|
+
value: string;
|
|
56
|
+
}
|
|
57
|
+
export declare type MessageHeaderValue =
|
|
58
|
+
| BooleanHeaderValue
|
|
59
|
+
| ByteHeaderValue
|
|
60
|
+
| ShortHeaderValue
|
|
61
|
+
| IntegerHeaderValue
|
|
62
|
+
| LongHeaderValue
|
|
63
|
+
| BinaryHeaderValue
|
|
64
|
+
| StringHeaderValue
|
|
65
|
+
| TimestampHeaderValue
|
|
66
|
+
| UuidHeaderValue;
|
|
67
|
+
export interface Int64 {
|
|
68
|
+
readonly bytes: Uint8Array;
|
|
69
|
+
valueOf: () => number;
|
|
70
|
+
toString: () => string;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Util functions for serializing or deserializing event stream
|
|
74
|
+
*/
|
|
75
|
+
export interface EventStreamSerdeContext {
|
|
76
|
+
eventStreamMarshaller: EventStreamMarshaller;
|
|
77
|
+
}
|
|
78
|
+
export interface EventStreamMarshaller {
|
|
79
|
+
deserialize: (body: any, deserializer: (input: { [event: string]: Message }) => any) => AsyncIterable<any>;
|
|
80
|
+
serialize: (input: AsyncIterable<any>, serializer: (event: any) => Message) => any;
|
|
81
|
+
}
|
|
82
|
+
export interface EventStreamRequestSigner {
|
|
83
|
+
sign(request: HttpRequest): Promise<HttpRequest>;
|
|
84
|
+
}
|
|
85
|
+
export interface EventStreamPayloadHandler {
|
|
86
|
+
handle: <Input extends object, Output extends MetadataBearer>(
|
|
87
|
+
next: FinalizeHandler<Input, Output>,
|
|
88
|
+
args: FinalizeHandlerArguments<Input>,
|
|
89
|
+
context?: HandlerExecutionContext
|
|
90
|
+
) => Promise<FinalizeHandlerOutput<Output>>;
|
|
91
|
+
}
|
|
92
|
+
export interface EventStreamPayloadHandlerProvider {
|
|
93
|
+
(options: any): EventStreamPayloadHandler;
|
|
94
|
+
}
|
|
95
|
+
export interface EventStreamSerdeProvider {
|
|
96
|
+
(options: any): EventStreamMarshaller;
|
|
97
|
+
}
|
|
98
|
+
export interface EventStreamSignerProvider {
|
|
99
|
+
(options: any): EventStreamRequestSigner;
|
|
100
|
+
}
|
package/src/http.d.ts
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { AbortSignal } from "./abort";
|
|
2
|
+
/**
|
|
3
|
+
* A collection of key/value pairs with case-insensitive keys.
|
|
4
|
+
*/
|
|
5
|
+
export interface Headers extends Map<string, string> {
|
|
6
|
+
/**
|
|
7
|
+
* Returns a new instance of Headers with the specified header set to the
|
|
8
|
+
* provided value. Does not modify the original Headers instance.
|
|
9
|
+
*
|
|
10
|
+
* @param headerName The name of the header to add or overwrite
|
|
11
|
+
* @param headerValue The value to which the header should be set
|
|
12
|
+
*/
|
|
13
|
+
withHeader(headerName: string, headerValue: string): Headers;
|
|
14
|
+
/**
|
|
15
|
+
* Returns a new instance of Headers without the specified header. Does not
|
|
16
|
+
* modify the original Headers instance.
|
|
17
|
+
*
|
|
18
|
+
* @param headerName The name of the header to remove
|
|
19
|
+
*/
|
|
20
|
+
withoutHeader(headerName: string): Headers;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* A mapping of header names to string values. Multiple values for the same
|
|
24
|
+
* header should be represented as a single string with values separated by
|
|
25
|
+
* `, `.
|
|
26
|
+
*
|
|
27
|
+
* Keys should be considered case insensitive, even if this is not enforced by a
|
|
28
|
+
* particular implementation. For example, given the following HeaderBag, where
|
|
29
|
+
* keys differ only in case:
|
|
30
|
+
*
|
|
31
|
+
* {
|
|
32
|
+
* 'x-amz-date': '2000-01-01T00:00:00Z',
|
|
33
|
+
* 'X-Amz-Date': '2001-01-01T00:00:00Z'
|
|
34
|
+
* }
|
|
35
|
+
*
|
|
36
|
+
* The SDK may at any point during processing remove one of the object
|
|
37
|
+
* properties in favor of the other. The headers may or may not be combined, and
|
|
38
|
+
* the SDK will not deterministically select which header candidate to use.
|
|
39
|
+
*/
|
|
40
|
+
export interface HeaderBag {
|
|
41
|
+
[key: string]: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Represents an HTTP message with headers and an optional static or streaming
|
|
45
|
+
* body. bode: ArrayBuffer | ArrayBufferView | string | Uint8Array | Readable | ReadableStream;
|
|
46
|
+
*/
|
|
47
|
+
export interface HttpMessage {
|
|
48
|
+
headers: HeaderBag;
|
|
49
|
+
body?: any;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* A mapping of query parameter names to strings or arrays of strings, with the
|
|
53
|
+
* second being used when a parameter contains a list of values. Value can be set
|
|
54
|
+
* to null when query is not in key-value pairs shape
|
|
55
|
+
*/
|
|
56
|
+
export interface QueryParameterBag {
|
|
57
|
+
[key: string]: string | Array<string> | null;
|
|
58
|
+
}
|
|
59
|
+
export interface Endpoint {
|
|
60
|
+
protocol: string;
|
|
61
|
+
hostname: string;
|
|
62
|
+
port?: number;
|
|
63
|
+
path: string;
|
|
64
|
+
query?: QueryParameterBag;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Interface an HTTP request class. Contains
|
|
68
|
+
* addressing information in addition to standard message properties.
|
|
69
|
+
*/
|
|
70
|
+
export interface HttpRequest extends HttpMessage, Endpoint {
|
|
71
|
+
method: string;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Represents an HTTP message as received in reply to a request. Contains a
|
|
75
|
+
* numeric status code in addition to standard message properties.
|
|
76
|
+
*/
|
|
77
|
+
export interface HttpResponse extends HttpMessage {
|
|
78
|
+
statusCode: number;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Represents HTTP message whose body has been resolved to a string. This is
|
|
82
|
+
* used in parsing http message.
|
|
83
|
+
*/
|
|
84
|
+
export interface ResolvedHttpResponse extends HttpResponse {
|
|
85
|
+
body: string;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Represents the options that may be passed to an Http Handler.
|
|
89
|
+
*/
|
|
90
|
+
export interface HttpHandlerOptions {
|
|
91
|
+
abortSignal?: AbortSignal;
|
|
92
|
+
}
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export * from "./abort";
|
|
2
|
+
export * from "./client";
|
|
3
|
+
export * from "./command";
|
|
4
|
+
export * from "./credentials";
|
|
5
|
+
export * from "./crypto";
|
|
6
|
+
export * from "./eventStream";
|
|
7
|
+
export * from "./http";
|
|
8
|
+
export * from "./logger";
|
|
9
|
+
export * from "./pagination";
|
|
10
|
+
export * from "./serde";
|
|
11
|
+
export * from "./middleware";
|
|
12
|
+
export * from "./response";
|
|
13
|
+
export * from "./shapes";
|
|
14
|
+
export * from "./signature";
|
|
15
|
+
export * from "./transfer";
|
|
16
|
+
export * from "./util";
|
|
17
|
+
export * from "./waiter";
|
package/src/logger.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A list of logger's log level. These levels are sorted in
|
|
3
|
+
* order of increasing severity. Each log level includes itself and all
|
|
4
|
+
* the levels behind itself.
|
|
5
|
+
*
|
|
6
|
+
* @example new Logger({logLevel: 'warn'}) will print all the warn and error
|
|
7
|
+
* message.
|
|
8
|
+
*/
|
|
9
|
+
export declare type LogLevel = "all" | "log" | "info" | "warn" | "error" | "off";
|
|
10
|
+
/**
|
|
11
|
+
* An object consumed by Logger constructor to initiate a logger object.
|
|
12
|
+
*/
|
|
13
|
+
export interface LoggerOptions {
|
|
14
|
+
logger?: Logger;
|
|
15
|
+
logLevel?: LogLevel;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Represents a logger object that is available in HandlerExecutionContext
|
|
19
|
+
* throughout the middleware stack.
|
|
20
|
+
*/
|
|
21
|
+
export interface Logger {
|
|
22
|
+
debug(content: object): void;
|
|
23
|
+
info(content: object): void;
|
|
24
|
+
warn(content: object): void;
|
|
25
|
+
error(content: object): void;
|
|
26
|
+
}
|