@aws-sdk/types 3.35.0 → 3.40.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 +0 -1
- package/dist-cjs/client.js +0 -1
- package/dist-cjs/command.js +0 -1
- package/dist-cjs/credentials.js +0 -1
- package/dist-cjs/crypto.js +0 -1
- package/dist-cjs/eventStream.js +0 -1
- package/dist-cjs/http.js +0 -1
- package/dist-cjs/index.js +2 -3
- package/dist-cjs/logger.js +0 -1
- package/dist-cjs/middleware.js +0 -1
- package/dist-cjs/pagination.js +0 -1
- package/dist-cjs/response.js +0 -1
- package/dist-cjs/serde.js +0 -1
- package/dist-cjs/shapes.js +0 -1
- package/dist-cjs/signature.js +0 -1
- package/dist-cjs/transfer.js +0 -1
- package/dist-cjs/util.js +0 -1
- package/dist-cjs/waiter.js +0 -1
- package/dist-es/abort.js +0 -1
- package/dist-es/client.js +0 -1
- package/dist-es/command.js +0 -1
- package/dist-es/credentials.js +0 -1
- package/dist-es/crypto.js +0 -1
- package/dist-es/eventStream.js +0 -1
- package/dist-es/http.js +0 -1
- package/dist-es/index.js +2 -3
- package/dist-es/logger.js +0 -1
- package/dist-es/middleware.js +0 -1
- package/dist-es/pagination.js +0 -1
- package/dist-es/response.js +0 -1
- package/dist-es/serde.js +0 -1
- package/dist-es/shapes.js +0 -1
- package/dist-es/signature.js +0 -1
- package/dist-es/transfer.js +0 -1
- package/dist-es/util.js +0 -1
- package/dist-es/waiter.js +0 -1
- package/dist-types/index.d.ts +2 -2
- package/dist-types/ts3.4/abort.d.ts +6 -31
- package/dist-types/ts3.4/client.d.ts +2 -8
- package/dist-types/ts3.4/credentials.d.ts +5 -16
- package/dist-types/ts3.4/crypto.d.ts +6 -31
- package/dist-types/ts3.4/eventStream.d.ts +2 -8
- package/dist-types/ts3.4/http.d.ts +10 -58
- package/dist-types/ts3.4/index.d.ts +2 -2
- package/dist-types/ts3.4/logger.d.ts +3 -15
- package/dist-types/ts3.4/middleware.d.ts +38 -221
- package/dist-types/ts3.4/pagination.d.ts +2 -7
- package/dist-types/ts3.4/response.d.ts +7 -23
- package/dist-types/ts3.4/serde.d.ts +5 -25
- package/dist-types/ts3.4/shapes.d.ts +8 -31
- package/dist-types/ts3.4/signature.d.ts +13 -66
- package/dist-types/ts3.4/transfer.d.ts +1 -5
- package/dist-types/ts3.4/util.d.ts +22 -66
- package/dist-types/ts3.4/waiter.d.ts +6 -23
- package/dist-types/util.d.ts +16 -1
- package/package.json +4 -1
- 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.d.ts +0 -17
- 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/src/credentials.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { Provider } from "./util";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* An object representing temporary or permanent AWS credentials.
|
|
5
|
-
*/
|
|
6
|
-
export interface Credentials {
|
|
7
|
-
/**
|
|
8
|
-
* AWS access key ID
|
|
9
|
-
*/
|
|
10
|
-
readonly accessKeyId: string;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* AWS secret access key
|
|
14
|
-
*/
|
|
15
|
-
readonly secretAccessKey: string;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* A security or session token to use with these credentials. Usually
|
|
19
|
-
* present for temporary credentials.
|
|
20
|
-
*/
|
|
21
|
-
readonly sessionToken?: string;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* A {Date} when these credentials will no longer be accepted.
|
|
25
|
-
*/
|
|
26
|
-
readonly expiration?: Date;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export type CredentialProvider = Provider<Credentials>;
|
package/src/crypto.d.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
export type SourceData = string | ArrayBuffer | ArrayBufferView;
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* An object that provides a hash of data provided in chunks to `update`. The
|
|
5
|
-
* hash may be performed incrementally as chunks are received or all at once
|
|
6
|
-
* when the hash is finalized, depending on the underlying implementation.
|
|
7
|
-
*/
|
|
8
|
-
export interface Hash {
|
|
9
|
-
/**
|
|
10
|
-
* Adds a chunk of data to the hash. If a buffer is provided, the `encoding`
|
|
11
|
-
* argument will be ignored. If a string is provided without a specified
|
|
12
|
-
* encoding, implementations must assume UTF-8 encoding.
|
|
13
|
-
*
|
|
14
|
-
* Not all encodings are supported on all platforms, though all must support
|
|
15
|
-
* UTF-8.
|
|
16
|
-
*/
|
|
17
|
-
update(toHash: SourceData, encoding?: "utf8" | "ascii" | "latin1"): void;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Finalizes the hash and provides a promise that will be fulfilled with the
|
|
21
|
-
* raw bytes of the calculated hash.
|
|
22
|
-
*/
|
|
23
|
-
digest(): Promise<Uint8Array>;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* A constructor for a hash that may be used to calculate an HMAC. Implementing
|
|
28
|
-
* classes should not directly hold the provided key in memory beyond the
|
|
29
|
-
* lexical scope of the constructor.
|
|
30
|
-
*/
|
|
31
|
-
export interface HashConstructor {
|
|
32
|
-
new (secret?: SourceData): Hash;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* A function that calculates the hash of a data stream. Determining the hash
|
|
37
|
-
* will consume the stream, so only replayable streams should be provided to an
|
|
38
|
-
* implementation of this interface.
|
|
39
|
-
*/
|
|
40
|
-
export interface StreamHasher<StreamType = any> {
|
|
41
|
-
(hashCtor: HashConstructor, stream: StreamType): Promise<Uint8Array>;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* A function that returns a promise fulfilled with bytes from a
|
|
46
|
-
* cryptographically secure pseudorandom number generator.
|
|
47
|
-
*/
|
|
48
|
-
export interface randomValues {
|
|
49
|
-
(byteLength: number): Promise<Uint8Array>;
|
|
50
|
-
}
|
package/src/eventStream.d.ts
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
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/eventStream.ts
DELETED
|
@@ -1,119 +0,0 @@
|
|
|
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
|
-
|
|
19
|
-
export interface MessageHeaders {
|
|
20
|
-
[name: string]: MessageHeaderValue;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export interface BooleanHeaderValue {
|
|
24
|
-
type: "boolean";
|
|
25
|
-
value: boolean;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export interface ByteHeaderValue {
|
|
29
|
-
type: "byte";
|
|
30
|
-
value: number;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export interface ShortHeaderValue {
|
|
34
|
-
type: "short";
|
|
35
|
-
value: number;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export interface IntegerHeaderValue {
|
|
39
|
-
type: "integer";
|
|
40
|
-
value: number;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export interface LongHeaderValue {
|
|
44
|
-
type: "long";
|
|
45
|
-
value: Int64;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export interface BinaryHeaderValue {
|
|
49
|
-
type: "binary";
|
|
50
|
-
value: Uint8Array;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export interface StringHeaderValue {
|
|
54
|
-
type: "string";
|
|
55
|
-
value: string;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export interface TimestampHeaderValue {
|
|
59
|
-
type: "timestamp";
|
|
60
|
-
value: Date;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export interface UuidHeaderValue {
|
|
64
|
-
type: "uuid";
|
|
65
|
-
value: string;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export type MessageHeaderValue =
|
|
69
|
-
| BooleanHeaderValue
|
|
70
|
-
| ByteHeaderValue
|
|
71
|
-
| ShortHeaderValue
|
|
72
|
-
| IntegerHeaderValue
|
|
73
|
-
| LongHeaderValue
|
|
74
|
-
| BinaryHeaderValue
|
|
75
|
-
| StringHeaderValue
|
|
76
|
-
| TimestampHeaderValue
|
|
77
|
-
| UuidHeaderValue;
|
|
78
|
-
|
|
79
|
-
export interface Int64 {
|
|
80
|
-
readonly bytes: Uint8Array;
|
|
81
|
-
valueOf: () => number;
|
|
82
|
-
toString: () => string;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* Util functions for serializing or deserializing event stream
|
|
87
|
-
*/
|
|
88
|
-
export interface EventStreamSerdeContext {
|
|
89
|
-
eventStreamMarshaller: EventStreamMarshaller;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export interface EventStreamMarshaller {
|
|
93
|
-
deserialize: (body: any, deserializer: (input: { [event: string]: Message }) => any) => AsyncIterable<any>;
|
|
94
|
-
serialize: (input: AsyncIterable<any>, serializer: (event: any) => Message) => any;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export interface EventStreamRequestSigner {
|
|
98
|
-
sign(request: HttpRequest): Promise<HttpRequest>;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export interface EventStreamPayloadHandler {
|
|
102
|
-
handle: <Input extends object, Output extends MetadataBearer>(
|
|
103
|
-
next: FinalizeHandler<Input, Output>,
|
|
104
|
-
args: FinalizeHandlerArguments<Input>,
|
|
105
|
-
context?: HandlerExecutionContext
|
|
106
|
-
) => Promise<FinalizeHandlerOutput<Output>>;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
export interface EventStreamPayloadHandlerProvider {
|
|
110
|
-
(options: any): EventStreamPayloadHandler;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export interface EventStreamSerdeProvider {
|
|
114
|
-
(options: any): EventStreamMarshaller;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
export interface EventStreamSignerProvider {
|
|
118
|
-
(options: any): EventStreamRequestSigner;
|
|
119
|
-
}
|
package/src/http.d.ts
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
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/http.ts
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
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
|
-
/**
|
|
16
|
-
* Returns a new instance of Headers without the specified header. Does not
|
|
17
|
-
* modify the original Headers instance.
|
|
18
|
-
*
|
|
19
|
-
* @param headerName The name of the header to remove
|
|
20
|
-
*/
|
|
21
|
-
withoutHeader(headerName: string): Headers;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* A mapping of header names to string values. Multiple values for the same
|
|
26
|
-
* header should be represented as a single string with values separated by
|
|
27
|
-
* `, `.
|
|
28
|
-
*
|
|
29
|
-
* Keys should be considered case insensitive, even if this is not enforced by a
|
|
30
|
-
* particular implementation. For example, given the following HeaderBag, where
|
|
31
|
-
* keys differ only in case:
|
|
32
|
-
*
|
|
33
|
-
* {
|
|
34
|
-
* 'x-amz-date': '2000-01-01T00:00:00Z',
|
|
35
|
-
* 'X-Amz-Date': '2001-01-01T00:00:00Z'
|
|
36
|
-
* }
|
|
37
|
-
*
|
|
38
|
-
* The SDK may at any point during processing remove one of the object
|
|
39
|
-
* properties in favor of the other. The headers may or may not be combined, and
|
|
40
|
-
* the SDK will not deterministically select which header candidate to use.
|
|
41
|
-
*/
|
|
42
|
-
export interface HeaderBag {
|
|
43
|
-
[key: string]: string;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Represents an HTTP message with headers and an optional static or streaming
|
|
48
|
-
* body. bode: ArrayBuffer | ArrayBufferView | string | Uint8Array | Readable | ReadableStream;
|
|
49
|
-
*/
|
|
50
|
-
export interface HttpMessage {
|
|
51
|
-
headers: HeaderBag;
|
|
52
|
-
body?: any;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* A mapping of query parameter names to strings or arrays of strings, with the
|
|
57
|
-
* second being used when a parameter contains a list of values. Value can be set
|
|
58
|
-
* to null when query is not in key-value pairs shape
|
|
59
|
-
*/
|
|
60
|
-
export interface QueryParameterBag {
|
|
61
|
-
[key: string]: string | Array<string> | null;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export interface Endpoint {
|
|
65
|
-
protocol: string;
|
|
66
|
-
hostname: string;
|
|
67
|
-
port?: number;
|
|
68
|
-
path: string;
|
|
69
|
-
query?: QueryParameterBag;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Interface an HTTP request class. Contains
|
|
74
|
-
* addressing information in addition to standard message properties.
|
|
75
|
-
*/
|
|
76
|
-
export interface HttpRequest extends HttpMessage, Endpoint {
|
|
77
|
-
method: string;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Represents an HTTP message as received in reply to a request. Contains a
|
|
82
|
-
* numeric status code in addition to standard message properties.
|
|
83
|
-
*/
|
|
84
|
-
export interface HttpResponse extends HttpMessage {
|
|
85
|
-
statusCode: number;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Represents HTTP message whose body has been resolved to a string. This is
|
|
90
|
-
* used in parsing http message.
|
|
91
|
-
*/
|
|
92
|
-
export interface ResolvedHttpResponse extends HttpResponse {
|
|
93
|
-
body: string;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
/**
|
|
97
|
-
* Represents the options that may be passed to an Http Handler.
|
|
98
|
-
*/
|
|
99
|
-
export interface HttpHandlerOptions {
|
|
100
|
-
abortSignal?: AbortSignal;
|
|
101
|
-
}
|
package/src/index.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
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/index.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
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
|
-
}
|
package/src/logger.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
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 type LogLevel = "all" | "log" | "info" | "warn" | "error" | "off";
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* An object consumed by Logger constructor to initiate a logger object.
|
|
13
|
-
*/
|
|
14
|
-
export interface LoggerOptions {
|
|
15
|
-
logger?: Logger;
|
|
16
|
-
logLevel?: LogLevel;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Represents a logger object that is available in HandlerExecutionContext
|
|
21
|
-
* throughout the middleware stack.
|
|
22
|
-
*/
|
|
23
|
-
export interface Logger {
|
|
24
|
-
debug(content: object): void;
|
|
25
|
-
info(content: object): void;
|
|
26
|
-
warn(content: object): void;
|
|
27
|
-
error(content: object): void;
|
|
28
|
-
}
|