@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
|
@@ -1,23 +1,15 @@
|
|
|
1
1
|
import { Endpoint } from "./http";
|
|
2
2
|
import { RequestHandler } from "./transfer";
|
|
3
3
|
import { Decoder, Encoder, Provider } from "./util";
|
|
4
|
-
|
|
5
|
-
* Interface for object requires an Endpoint set.
|
|
6
|
-
*/
|
|
4
|
+
|
|
7
5
|
export interface EndpointBearer {
|
|
8
6
|
endpoint: Provider<Endpoint>;
|
|
9
7
|
}
|
|
10
8
|
export interface StreamCollector {
|
|
11
|
-
|
|
12
|
-
* A function that converts a stream into an array of bytes.
|
|
13
|
-
*
|
|
14
|
-
* @param stream The low-level native stream from browser or Nodejs runtime
|
|
15
|
-
*/
|
|
9
|
+
|
|
16
10
|
(stream: any): Promise<Uint8Array>;
|
|
17
11
|
}
|
|
18
|
-
|
|
19
|
-
* Request and Response serde util functions and settings for AWS services
|
|
20
|
-
*/
|
|
12
|
+
|
|
21
13
|
export interface SerdeContext extends EndpointBearer {
|
|
22
14
|
base64Encoder: Encoder;
|
|
23
15
|
base64Decoder: Decoder;
|
|
@@ -28,22 +20,10 @@ export interface SerdeContext extends EndpointBearer {
|
|
|
28
20
|
disableHostPrefix: boolean;
|
|
29
21
|
}
|
|
30
22
|
export interface RequestSerializer<Request, Context extends EndpointBearer = any> {
|
|
31
|
-
|
|
32
|
-
* Converts the provided `input` into a request object
|
|
33
|
-
*
|
|
34
|
-
* @param input The user input to serialize.
|
|
35
|
-
*
|
|
36
|
-
* @param context Context containing runtime-specific util functions.
|
|
37
|
-
*/
|
|
23
|
+
|
|
38
24
|
(input: any, context: Context): Promise<Request>;
|
|
39
25
|
}
|
|
40
26
|
export interface ResponseDeserializer<OutputType, ResponseType = any, Context = any> {
|
|
41
|
-
|
|
42
|
-
* Converts the output of an operation into JavaScript types.
|
|
43
|
-
*
|
|
44
|
-
* @param output The HTTP response received from the service
|
|
45
|
-
*
|
|
46
|
-
* @param context context containing runtime-specific util functions.
|
|
47
|
-
*/
|
|
27
|
+
|
|
48
28
|
(output: ResponseType, context: Context): Promise<OutputType>;
|
|
49
29
|
}
|
|
@@ -1,45 +1,22 @@
|
|
|
1
1
|
import { MetadataBearer } from "./response";
|
|
2
|
-
|
|
3
|
-
* A document type represents an untyped JSON-like value.
|
|
4
|
-
*
|
|
5
|
-
* Not all protocols support document types, and the serialization format of a
|
|
6
|
-
* document type is protocol specific. All JSON protocols SHOULD support
|
|
7
|
-
* document types and they SHOULD serialize document types inline as normal
|
|
8
|
-
* JSON values.
|
|
9
|
-
*/
|
|
2
|
+
|
|
10
3
|
export declare type DocumentType = null | boolean | number | string | DocumentType[] | {
|
|
11
4
|
[prop: string]: DocumentType;
|
|
12
5
|
};
|
|
13
|
-
|
|
14
|
-
* A structure shape with the error trait.
|
|
15
|
-
* https://awslabs.github.io/smithy/spec/core.html#retryable-trait
|
|
16
|
-
*/
|
|
6
|
+
|
|
17
7
|
export interface RetryableTrait {
|
|
18
|
-
|
|
19
|
-
* Indicates that the error is a retryable throttling error.
|
|
20
|
-
*/
|
|
8
|
+
|
|
21
9
|
readonly throttling?: boolean;
|
|
22
10
|
}
|
|
23
|
-
|
|
24
|
-
* Type that is implemented by all Smithy shapes marked with the
|
|
25
|
-
* error trait.
|
|
26
|
-
*/
|
|
11
|
+
|
|
27
12
|
export interface SmithyException {
|
|
28
|
-
|
|
29
|
-
* The shape ID name of the exception.
|
|
30
|
-
*/
|
|
13
|
+
|
|
31
14
|
readonly name: string;
|
|
32
|
-
|
|
33
|
-
* Whether the client or server are at fault.
|
|
34
|
-
*/
|
|
15
|
+
|
|
35
16
|
readonly $fault: "client" | "server";
|
|
36
|
-
|
|
37
|
-
* The service that encountered the exception.
|
|
38
|
-
*/
|
|
17
|
+
|
|
39
18
|
readonly $service?: string;
|
|
40
|
-
|
|
41
|
-
* Indicates that an error MAY be retried by the client.
|
|
42
|
-
*/
|
|
19
|
+
|
|
43
20
|
readonly $retryable?: RetryableTrait;
|
|
44
21
|
}
|
|
45
22
|
export declare type SdkError = Error & Partial<SmithyException> & Partial<MetadataBearer>;
|
|
@@ -1,91 +1,40 @@
|
|
|
1
1
|
import { HttpRequest } from "./http";
|
|
2
|
-
|
|
3
|
-
* A {Date} object, a unix (epoch) timestamp in seconds, or a string that can be
|
|
4
|
-
* understood by the JavaScript {Date} constructor.
|
|
5
|
-
*/
|
|
2
|
+
|
|
6
3
|
export declare type DateInput = number | string | Date;
|
|
7
4
|
export interface SigningArguments {
|
|
8
|
-
|
|
9
|
-
* The date and time to be used as signature metadata. This value should be
|
|
10
|
-
* a Date object, a unix (epoch) timestamp, or a string that can be
|
|
11
|
-
* understood by the JavaScript `Date` constructor.If not supplied, the
|
|
12
|
-
* value returned by `new Date()` will be used.
|
|
13
|
-
*/
|
|
5
|
+
|
|
14
6
|
signingDate?: DateInput;
|
|
15
|
-
|
|
16
|
-
* The service signing name. It will override the service name of the signer
|
|
17
|
-
* in current invocation
|
|
18
|
-
*/
|
|
7
|
+
|
|
19
8
|
signingService?: string;
|
|
20
|
-
|
|
21
|
-
* The region name to sign the request. It will override the signing region of the
|
|
22
|
-
* signer in current invocation
|
|
23
|
-
*/
|
|
9
|
+
|
|
24
10
|
signingRegion?: string;
|
|
25
11
|
}
|
|
26
12
|
export interface RequestSigningArguments extends SigningArguments {
|
|
27
|
-
|
|
28
|
-
* A set of strings whose members represents headers that cannot be signed.
|
|
29
|
-
* All headers in the provided request will have their names converted to
|
|
30
|
-
* lower case and then checked for existence in the unsignableHeaders set.
|
|
31
|
-
*/
|
|
13
|
+
|
|
32
14
|
unsignableHeaders?: Set<string>;
|
|
33
|
-
|
|
34
|
-
* A set of strings whose members represents headers that should be signed.
|
|
35
|
-
* Any values passed here will override those provided via unsignableHeaders,
|
|
36
|
-
* allowing them to be signed.
|
|
37
|
-
*
|
|
38
|
-
* All headers in the provided request will have their names converted to
|
|
39
|
-
* lower case before signing.
|
|
40
|
-
*/
|
|
15
|
+
|
|
41
16
|
signableHeaders?: Set<string>;
|
|
42
17
|
}
|
|
43
18
|
export interface RequestPresigningArguments extends RequestSigningArguments {
|
|
44
|
-
|
|
45
|
-
* The number of seconds before the presigned URL expires
|
|
46
|
-
*/
|
|
19
|
+
|
|
47
20
|
expiresIn?: number;
|
|
48
|
-
|
|
49
|
-
* A set of strings whose representing headers that should not be hoisted
|
|
50
|
-
* to presigned request's query string. If not supplied, the presigner
|
|
51
|
-
* moves all the AWS-specific headers (starting with `x-amz-`) to the request
|
|
52
|
-
* query string. If supplied, these headers remain in the presigned request's
|
|
53
|
-
* header.
|
|
54
|
-
* All headers in the provided request will have their names converted to
|
|
55
|
-
* lower case and then checked for existence in the unhoistableHeaders set.
|
|
56
|
-
*/
|
|
21
|
+
|
|
57
22
|
unhoistableHeaders?: Set<string>;
|
|
58
23
|
}
|
|
59
24
|
export interface EventSigningArguments extends SigningArguments {
|
|
60
25
|
priorSignature: string;
|
|
61
26
|
}
|
|
62
27
|
export interface RequestPresigner {
|
|
63
|
-
|
|
64
|
-
* Signs a request for future use.
|
|
65
|
-
*
|
|
66
|
-
* The request will be valid until either the provided `expiration` time has
|
|
67
|
-
* passed or the underlying credentials have expired.
|
|
68
|
-
*
|
|
69
|
-
* @param requestToSign The request that should be signed.
|
|
70
|
-
* @param options Additional signing options.
|
|
71
|
-
*/
|
|
28
|
+
|
|
72
29
|
presign(requestToSign: HttpRequest, options?: RequestPresigningArguments): Promise<HttpRequest>;
|
|
73
30
|
}
|
|
74
|
-
|
|
75
|
-
* An object that signs request objects with AWS credentials using one of the
|
|
76
|
-
* AWS authentication protocols.
|
|
77
|
-
*/
|
|
31
|
+
|
|
78
32
|
export interface RequestSigner {
|
|
79
|
-
|
|
80
|
-
* Sign the provided request for immediate dispatch.
|
|
81
|
-
*/
|
|
33
|
+
|
|
82
34
|
sign(requestToSign: HttpRequest, options?: RequestSigningArguments): Promise<HttpRequest>;
|
|
83
35
|
}
|
|
84
36
|
export interface StringSigner {
|
|
85
|
-
|
|
86
|
-
* Sign the provided `stringToSign` for use outside of the context of
|
|
87
|
-
* request signing. Typical uses include signed policy generation.
|
|
88
|
-
*/
|
|
37
|
+
|
|
89
38
|
sign(stringToSign: string, options?: SigningArguments): Promise<string>;
|
|
90
39
|
}
|
|
91
40
|
export interface FormattedEvent {
|
|
@@ -93,8 +42,6 @@ export interface FormattedEvent {
|
|
|
93
42
|
payload: Uint8Array;
|
|
94
43
|
}
|
|
95
44
|
export interface EventSigner {
|
|
96
|
-
|
|
97
|
-
* Sign the individual event of the event stream.
|
|
98
|
-
*/
|
|
45
|
+
|
|
99
46
|
sign(event: FormattedEvent, options: EventSigningArguments): Promise<string>;
|
|
100
47
|
}
|
|
@@ -2,11 +2,7 @@ export declare type RequestHandlerOutput<ResponseType> = {
|
|
|
2
2
|
response: ResponseType;
|
|
3
3
|
};
|
|
4
4
|
export interface RequestHandler<RequestType, ResponseType, HandlerOptions = {}> {
|
|
5
|
-
|
|
6
|
-
* metadata contains information of a handler. For example
|
|
7
|
-
* 'h2' refers this handler is for handling HTTP/2 requests,
|
|
8
|
-
* whereas 'h1' refers handling HTTP1 requests
|
|
9
|
-
*/
|
|
5
|
+
|
|
10
6
|
metadata?: RequestHandlerMetadata;
|
|
11
7
|
destroy?: () => void;
|
|
12
8
|
handle: (request: RequestType, handlerOptions?: HandlerOptions) => Promise<RequestHandlerOutput<ResponseType>>;
|
|
@@ -1,74 +1,34 @@
|
|
|
1
1
|
import { Endpoint } from "./http";
|
|
2
2
|
import { FinalizeHandler, FinalizeHandlerArguments, FinalizeHandlerOutput } from "./middleware";
|
|
3
3
|
import { MetadataBearer } from "./response";
|
|
4
|
-
|
|
5
|
-
* A function that, given a TypedArray of bytes, can produce a string
|
|
6
|
-
* representation thereof.
|
|
7
|
-
*
|
|
8
|
-
* @example An encoder function that converts bytes to hexadecimal
|
|
9
|
-
* representation would return `'deadbeef'` when given `new
|
|
10
|
-
* Uint8Array([0xde, 0xad, 0xbe, 0xef])`.
|
|
11
|
-
*/
|
|
4
|
+
|
|
12
5
|
export interface Encoder {
|
|
13
6
|
(input: Uint8Array): string;
|
|
14
7
|
}
|
|
15
|
-
|
|
16
|
-
* A function that, given a string, can derive the bytes represented by that
|
|
17
|
-
* string.
|
|
18
|
-
*
|
|
19
|
-
* @example A decoder function that converts bytes to hexadecimal
|
|
20
|
-
* representation would return `new Uint8Array([0xde, 0xad, 0xbe, 0xef])` when
|
|
21
|
-
* given the string `'deadbeef'`.
|
|
22
|
-
*/
|
|
8
|
+
|
|
23
9
|
export interface Decoder {
|
|
24
10
|
(input: string): Uint8Array;
|
|
25
11
|
}
|
|
26
|
-
|
|
27
|
-
* A function that, when invoked, returns a promise that will be fulfilled with
|
|
28
|
-
* a value of type T.
|
|
29
|
-
*
|
|
30
|
-
* @example A function that reads credentials from shared SDK configuration
|
|
31
|
-
* files, assuming roles and collecting MFA tokens as necessary.
|
|
32
|
-
*/
|
|
12
|
+
|
|
33
13
|
export interface Provider<T> {
|
|
34
14
|
(): Promise<T>;
|
|
35
15
|
}
|
|
36
|
-
|
|
37
|
-
* A function that, given a request body, determines the
|
|
38
|
-
* length of the body. This is used to determine the Content-Length
|
|
39
|
-
* that should be sent with a request.
|
|
40
|
-
*
|
|
41
|
-
* @example A function that reads a file stream and calculates
|
|
42
|
-
* the size of the file.
|
|
43
|
-
*/
|
|
16
|
+
|
|
44
17
|
export interface BodyLengthCalculator {
|
|
45
18
|
(body: any): number | undefined;
|
|
46
19
|
}
|
|
47
|
-
|
|
48
|
-
* Interface that specifies the retry behavior
|
|
49
|
-
*/
|
|
20
|
+
|
|
50
21
|
export interface RetryStrategy {
|
|
51
|
-
|
|
52
|
-
* The retry mode describing how the retry strategy control the traffic flow.
|
|
53
|
-
*/
|
|
22
|
+
|
|
54
23
|
mode?: string;
|
|
55
|
-
|
|
56
|
-
* the retry behavior the will invoke the next handler and handle the retry accordingly.
|
|
57
|
-
* This function should also update the $metadata from the response accordingly.
|
|
58
|
-
* @see {@link ResponseMetadata}
|
|
59
|
-
*/
|
|
24
|
+
|
|
60
25
|
retry: <Input extends object, Output extends MetadataBearer>(next: FinalizeHandler<Input, Output>, args: FinalizeHandlerArguments<Input>) => Promise<FinalizeHandlerOutput<Output>>;
|
|
61
26
|
}
|
|
62
|
-
|
|
63
|
-
* Parses a URL in string form into an Endpoint object.
|
|
64
|
-
*/
|
|
27
|
+
|
|
65
28
|
export interface UrlParser {
|
|
66
29
|
(url: string): Endpoint;
|
|
67
30
|
}
|
|
68
|
-
|
|
69
|
-
* Object containing regionalization information of
|
|
70
|
-
* AWS services.
|
|
71
|
-
*/
|
|
31
|
+
|
|
72
32
|
export interface RegionInfo {
|
|
73
33
|
hostname: string;
|
|
74
34
|
partition: string;
|
|
@@ -76,25 +36,21 @@ export interface RegionInfo {
|
|
|
76
36
|
signingService?: string;
|
|
77
37
|
signingRegion?: string;
|
|
78
38
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
39
|
+
|
|
40
|
+
export interface RegionInfoProviderOptions {
|
|
41
|
+
|
|
42
|
+
useDualstackEndpoint: boolean;
|
|
43
|
+
|
|
44
|
+
useFipsEndpoint: boolean;
|
|
45
|
+
}
|
|
46
|
+
|
|
85
47
|
export interface RegionInfoProvider {
|
|
86
|
-
(region: string, options?:
|
|
48
|
+
(region: string, options?: RegionInfoProviderOptions): Promise<RegionInfo | undefined>;
|
|
87
49
|
}
|
|
88
|
-
|
|
89
|
-
* A tuple that represents an API name and optional version
|
|
90
|
-
* of a library built using the AWS SDK.
|
|
91
|
-
*/
|
|
50
|
+
|
|
92
51
|
export declare type UserAgentPair = [
|
|
93
|
-
|
|
94
|
-
|
|
52
|
+
string,
|
|
53
|
+
string
|
|
95
54
|
];
|
|
96
|
-
|
|
97
|
-
* User agent data that to be put into the request's user
|
|
98
|
-
* agent.
|
|
99
|
-
*/
|
|
55
|
+
|
|
100
56
|
export declare type UserAgent = UserAgentPair[];
|
|
@@ -1,32 +1,15 @@
|
|
|
1
1
|
import { AbortController } from "./abort";
|
|
2
2
|
export interface WaiterConfiguration<Client> {
|
|
3
|
-
|
|
4
|
-
* Required service client
|
|
5
|
-
*/
|
|
3
|
+
|
|
6
4
|
client: Client;
|
|
7
|
-
|
|
8
|
-
* The amount of time in seconds a user is willing to wait for a waiter to complete.
|
|
9
|
-
*/
|
|
5
|
+
|
|
10
6
|
maxWaitTime: number;
|
|
11
|
-
|
|
12
|
-
* @deprecated Use abortSignal
|
|
13
|
-
* Abort controller. Used for ending the waiter early.
|
|
14
|
-
*/
|
|
7
|
+
|
|
15
8
|
abortController?: AbortController;
|
|
16
|
-
|
|
17
|
-
* Abort Signal. Used for ending the waiter early.
|
|
18
|
-
*/
|
|
9
|
+
|
|
19
10
|
abortSignal?: AbortController["signal"];
|
|
20
|
-
|
|
21
|
-
* The minimum amount of time to delay between retries in seconds. This is the
|
|
22
|
-
* floor of the exponential backoff. This value defaults to service default
|
|
23
|
-
* if not specified. This value MUST be less than or equal to maxDelay and greater than 0.
|
|
24
|
-
*/
|
|
11
|
+
|
|
25
12
|
minDelay?: number;
|
|
26
|
-
|
|
27
|
-
* The maximum amount of time to delay between retries in seconds. This is the
|
|
28
|
-
* ceiling of the exponential backoff. This value defaults to service default
|
|
29
|
-
* if not specified. If specified, this value MUST be greater than or equal to 1.
|
|
30
|
-
*/
|
|
13
|
+
|
|
31
14
|
maxDelay?: number;
|
|
32
15
|
}
|
package/dist-types/util.d.ts
CHANGED
|
@@ -76,6 +76,21 @@ export interface RegionInfo {
|
|
|
76
76
|
signingService?: string;
|
|
77
77
|
signingRegion?: string;
|
|
78
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* Options to pass when calling {@link RegionInfoProvider}
|
|
81
|
+
*/
|
|
82
|
+
export interface RegionInfoProviderOptions {
|
|
83
|
+
/**
|
|
84
|
+
* Enables IPv6/IPv4 dualstack endpoint.
|
|
85
|
+
* @default false
|
|
86
|
+
*/
|
|
87
|
+
useDualstackEndpoint: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Enables FIPS compatible endpoints.
|
|
90
|
+
* @default false
|
|
91
|
+
*/
|
|
92
|
+
useFipsEndpoint: boolean;
|
|
93
|
+
}
|
|
79
94
|
/**
|
|
80
95
|
* Function returns designated service's regionalization
|
|
81
96
|
* information from given region. Each service client
|
|
@@ -83,7 +98,7 @@ export interface RegionInfo {
|
|
|
83
98
|
* to provide the default values of related configurations
|
|
84
99
|
*/
|
|
85
100
|
export interface RegionInfoProvider {
|
|
86
|
-
(region: string, options?:
|
|
101
|
+
(region: string, options?: RegionInfoProviderOptions): Promise<RegionInfo | undefined>;
|
|
87
102
|
}
|
|
88
103
|
/**
|
|
89
104
|
* A tuple that represents an API name and optional version
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/types",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.40.0",
|
|
4
4
|
"main": "./dist-cjs/index.js",
|
|
5
5
|
"module": "./dist-es/index.js",
|
|
6
6
|
"types": "./dist-types/index.d.ts",
|
|
@@ -31,6 +31,9 @@
|
|
|
31
31
|
]
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
|
+
"files": [
|
|
35
|
+
"dist-*"
|
|
36
|
+
],
|
|
34
37
|
"homepage": "https://github.com/aws/aws-sdk-js-v3/tree/main/packages/types",
|
|
35
38
|
"repository": {
|
|
36
39
|
"type": "git",
|
package/src/abort.d.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
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/abort.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
export interface AbortHandler {
|
|
2
|
-
(this: AbortSignal, ev: any): any;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Holders of an AbortSignal object may query if the associated operation has
|
|
7
|
-
* been aborted and register an onabort handler.
|
|
8
|
-
*
|
|
9
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
|
|
10
|
-
*/
|
|
11
|
-
export interface AbortSignal {
|
|
12
|
-
/**
|
|
13
|
-
* Whether the action represented by this signal has been cancelled.
|
|
14
|
-
*/
|
|
15
|
-
readonly aborted: boolean;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* A function to be invoked when the action represented by this signal has
|
|
19
|
-
* been cancelled.
|
|
20
|
-
*/
|
|
21
|
-
onabort: AbortHandler | null;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* The AWS SDK uses a Controller/Signal model to allow for cooperative
|
|
26
|
-
* cancellation of asynchronous operations. When initiating such an operation,
|
|
27
|
-
* the caller can create an AbortController and then provide linked signal to
|
|
28
|
-
* subtasks. This allows a single source to communicate to multiple consumers
|
|
29
|
-
* that an action has been aborted without dictating how that cancellation
|
|
30
|
-
* should be handled.
|
|
31
|
-
*
|
|
32
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/AbortController
|
|
33
|
-
*/
|
|
34
|
-
export interface AbortController {
|
|
35
|
-
/**
|
|
36
|
-
* An object that reports whether the action associated with this
|
|
37
|
-
* {AbortController} has been cancelled.
|
|
38
|
-
*/
|
|
39
|
-
readonly signal: AbortSignal;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Declares the operation associated with this AbortController to have been
|
|
43
|
-
* cancelled.
|
|
44
|
-
*/
|
|
45
|
-
abort(): void;
|
|
46
|
-
}
|
package/src/client.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
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/client.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { Command } from "./command";
|
|
2
|
-
import { MiddlewareStack } from "./middleware";
|
|
3
|
-
import { MetadataBearer } from "./response";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* function definition for different overrides of client's 'send' function.
|
|
7
|
-
*/
|
|
8
|
-
interface InvokeFunction<InputTypes extends object, OutputTypes extends MetadataBearer, ResolvedClientConfiguration> {
|
|
9
|
-
<InputType extends InputTypes, OutputType extends OutputTypes>(
|
|
10
|
-
command: Command<InputTypes, InputType, OutputTypes, OutputType, ResolvedClientConfiguration>,
|
|
11
|
-
options?: any
|
|
12
|
-
): Promise<OutputType>;
|
|
13
|
-
<InputType extends InputTypes, OutputType extends OutputTypes>(
|
|
14
|
-
command: Command<InputTypes, InputType, OutputTypes, OutputType, ResolvedClientConfiguration>,
|
|
15
|
-
options: any,
|
|
16
|
-
cb: (err: any, data?: OutputType) => void
|
|
17
|
-
): void;
|
|
18
|
-
<InputType extends InputTypes, OutputType extends OutputTypes>(
|
|
19
|
-
command: Command<InputTypes, InputType, OutputTypes, OutputType, ResolvedClientConfiguration>,
|
|
20
|
-
options?: any,
|
|
21
|
-
cb?: (err: any, data?: OutputType) => void
|
|
22
|
-
): Promise<OutputType> | void;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* A general interface for service clients, idempotent to browser or node clients
|
|
27
|
-
* This type corresponds to SmithyClient(https://github.com/aws/aws-sdk-js-v3/blob/main/packages/smithy-client/src/client.ts).
|
|
28
|
-
* It's provided for using without importing the SmithyClient class.
|
|
29
|
-
*/
|
|
30
|
-
export interface Client<Input extends object, Output extends MetadataBearer, ResolvedClientConfiguration> {
|
|
31
|
-
readonly config: ResolvedClientConfiguration;
|
|
32
|
-
middlewareStack: MiddlewareStack<Input, Output>;
|
|
33
|
-
send: InvokeFunction<Input, Output, ResolvedClientConfiguration>;
|
|
34
|
-
destroy: () => void;
|
|
35
|
-
}
|
package/src/command.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
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
|
-
}
|
package/src/command.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Handler, MiddlewareStack } from "./middleware";
|
|
2
|
-
import { MetadataBearer } from "./response";
|
|
3
|
-
|
|
4
|
-
export interface Command<
|
|
5
|
-
ClientInput extends object,
|
|
6
|
-
InputType extends ClientInput,
|
|
7
|
-
ClientOutput extends MetadataBearer,
|
|
8
|
-
OutputType extends ClientOutput,
|
|
9
|
-
ResolvedConfiguration
|
|
10
|
-
> {
|
|
11
|
-
readonly input: InputType;
|
|
12
|
-
readonly middlewareStack: MiddlewareStack<InputType, OutputType>;
|
|
13
|
-
resolveMiddleware(
|
|
14
|
-
stack: MiddlewareStack<ClientInput, ClientOutput>,
|
|
15
|
-
configuration: ResolvedConfiguration,
|
|
16
|
-
options: any
|
|
17
|
-
): Handler<InputType, OutputType>;
|
|
18
|
-
}
|
package/src/credentials.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
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>;
|