@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/shapes.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { MetadataBearer } from "./response";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* A document type represents an untyped JSON-like value.
|
|
5
|
-
*
|
|
6
|
-
* Not all protocols support document types, and the serialization format of a
|
|
7
|
-
* document type is protocol specific. All JSON protocols SHOULD support
|
|
8
|
-
* document types and they SHOULD serialize document types inline as normal
|
|
9
|
-
* JSON values.
|
|
10
|
-
*/
|
|
11
|
-
export type DocumentType = null | boolean | number | string | DocumentType[] | { [prop: string]: DocumentType };
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* A structure shape with the error trait.
|
|
15
|
-
* https://awslabs.github.io/smithy/spec/core.html#retryable-trait
|
|
16
|
-
*/
|
|
17
|
-
export interface RetryableTrait {
|
|
18
|
-
/**
|
|
19
|
-
* Indicates that the error is a retryable throttling error.
|
|
20
|
-
*/
|
|
21
|
-
readonly throttling?: boolean;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Type that is implemented by all Smithy shapes marked with the
|
|
26
|
-
* error trait.
|
|
27
|
-
*/
|
|
28
|
-
export interface SmithyException {
|
|
29
|
-
/**
|
|
30
|
-
* The shape ID name of the exception.
|
|
31
|
-
*/
|
|
32
|
-
readonly name: string;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Whether the client or server are at fault.
|
|
36
|
-
*/
|
|
37
|
-
readonly $fault: "client" | "server";
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* The service that encountered the exception.
|
|
41
|
-
*/
|
|
42
|
-
readonly $service?: string;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Indicates that an error MAY be retried by the client.
|
|
46
|
-
*/
|
|
47
|
-
readonly $retryable?: RetryableTrait;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export type SdkError = Error & Partial<SmithyException> & Partial<MetadataBearer>;
|
package/src/signature.d.ts
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
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
|
-
*/
|
|
6
|
-
export declare type DateInput = number | string | Date;
|
|
7
|
-
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
|
-
*/
|
|
14
|
-
signingDate?: DateInput;
|
|
15
|
-
/**
|
|
16
|
-
* The service signing name. It will override the service name of the signer
|
|
17
|
-
* in current invocation
|
|
18
|
-
*/
|
|
19
|
-
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
|
-
*/
|
|
24
|
-
signingRegion?: string;
|
|
25
|
-
}
|
|
26
|
-
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
|
-
*/
|
|
32
|
-
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
|
-
*/
|
|
41
|
-
signableHeaders?: Set<string>;
|
|
42
|
-
}
|
|
43
|
-
export interface RequestPresigningArguments extends RequestSigningArguments {
|
|
44
|
-
/**
|
|
45
|
-
* The number of seconds before the presigned URL expires
|
|
46
|
-
*/
|
|
47
|
-
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
|
-
*/
|
|
57
|
-
unhoistableHeaders?: Set<string>;
|
|
58
|
-
}
|
|
59
|
-
export interface EventSigningArguments extends SigningArguments {
|
|
60
|
-
priorSignature: string;
|
|
61
|
-
}
|
|
62
|
-
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
|
-
*/
|
|
72
|
-
presign(requestToSign: HttpRequest, options?: RequestPresigningArguments): Promise<HttpRequest>;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* An object that signs request objects with AWS credentials using one of the
|
|
76
|
-
* AWS authentication protocols.
|
|
77
|
-
*/
|
|
78
|
-
export interface RequestSigner {
|
|
79
|
-
/**
|
|
80
|
-
* Sign the provided request for immediate dispatch.
|
|
81
|
-
*/
|
|
82
|
-
sign(requestToSign: HttpRequest, options?: RequestSigningArguments): Promise<HttpRequest>;
|
|
83
|
-
}
|
|
84
|
-
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
|
-
*/
|
|
89
|
-
sign(stringToSign: string, options?: SigningArguments): Promise<string>;
|
|
90
|
-
}
|
|
91
|
-
export interface FormattedEvent {
|
|
92
|
-
headers: Uint8Array;
|
|
93
|
-
payload: Uint8Array;
|
|
94
|
-
}
|
|
95
|
-
export interface EventSigner {
|
|
96
|
-
/**
|
|
97
|
-
* Sign the individual event of the event stream.
|
|
98
|
-
*/
|
|
99
|
-
sign(event: FormattedEvent, options: EventSigningArguments): Promise<string>;
|
|
100
|
-
}
|
package/src/signature.ts
DELETED
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import { HttpRequest } from "./http";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* A {Date} object, a unix (epoch) timestamp in seconds, or a string that can be
|
|
5
|
-
* understood by the JavaScript {Date} constructor.
|
|
6
|
-
*/
|
|
7
|
-
export type DateInput = number | string | Date;
|
|
8
|
-
|
|
9
|
-
export interface SigningArguments {
|
|
10
|
-
/**
|
|
11
|
-
* The date and time to be used as signature metadata. This value should be
|
|
12
|
-
* a Date object, a unix (epoch) timestamp, or a string that can be
|
|
13
|
-
* understood by the JavaScript `Date` constructor.If not supplied, the
|
|
14
|
-
* value returned by `new Date()` will be used.
|
|
15
|
-
*/
|
|
16
|
-
signingDate?: DateInput;
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* The service signing name. It will override the service name of the signer
|
|
20
|
-
* in current invocation
|
|
21
|
-
*/
|
|
22
|
-
signingService?: string;
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* The region name to sign the request. It will override the signing region of the
|
|
26
|
-
* signer in current invocation
|
|
27
|
-
*/
|
|
28
|
-
signingRegion?: string;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface RequestSigningArguments extends SigningArguments {
|
|
32
|
-
/**
|
|
33
|
-
* A set of strings whose members represents headers that cannot be signed.
|
|
34
|
-
* All headers in the provided request will have their names converted to
|
|
35
|
-
* lower case and then checked for existence in the unsignableHeaders set.
|
|
36
|
-
*/
|
|
37
|
-
unsignableHeaders?: Set<string>;
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* A set of strings whose members represents headers that should be signed.
|
|
41
|
-
* Any values passed here will override those provided via unsignableHeaders,
|
|
42
|
-
* allowing them to be signed.
|
|
43
|
-
*
|
|
44
|
-
* All headers in the provided request will have their names converted to
|
|
45
|
-
* lower case before signing.
|
|
46
|
-
*/
|
|
47
|
-
signableHeaders?: Set<string>;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export interface RequestPresigningArguments extends RequestSigningArguments {
|
|
51
|
-
/**
|
|
52
|
-
* The number of seconds before the presigned URL expires
|
|
53
|
-
*/
|
|
54
|
-
expiresIn?: number;
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* A set of strings whose representing headers that should not be hoisted
|
|
58
|
-
* to presigned request's query string. If not supplied, the presigner
|
|
59
|
-
* moves all the AWS-specific headers (starting with `x-amz-`) to the request
|
|
60
|
-
* query string. If supplied, these headers remain in the presigned request's
|
|
61
|
-
* header.
|
|
62
|
-
* All headers in the provided request will have their names converted to
|
|
63
|
-
* lower case and then checked for existence in the unhoistableHeaders set.
|
|
64
|
-
*/
|
|
65
|
-
unhoistableHeaders?: Set<string>;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export interface EventSigningArguments extends SigningArguments {
|
|
69
|
-
priorSignature: string;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export interface RequestPresigner {
|
|
73
|
-
/**
|
|
74
|
-
* Signs a request for future use.
|
|
75
|
-
*
|
|
76
|
-
* The request will be valid until either the provided `expiration` time has
|
|
77
|
-
* passed or the underlying credentials have expired.
|
|
78
|
-
*
|
|
79
|
-
* @param requestToSign The request that should be signed.
|
|
80
|
-
* @param options Additional signing options.
|
|
81
|
-
*/
|
|
82
|
-
presign(requestToSign: HttpRequest, options?: RequestPresigningArguments): Promise<HttpRequest>;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* An object that signs request objects with AWS credentials using one of the
|
|
87
|
-
* AWS authentication protocols.
|
|
88
|
-
*/
|
|
89
|
-
export interface RequestSigner {
|
|
90
|
-
/**
|
|
91
|
-
* Sign the provided request for immediate dispatch.
|
|
92
|
-
*/
|
|
93
|
-
sign(requestToSign: HttpRequest, options?: RequestSigningArguments): Promise<HttpRequest>;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
export interface StringSigner {
|
|
97
|
-
/**
|
|
98
|
-
* Sign the provided `stringToSign` for use outside of the context of
|
|
99
|
-
* request signing. Typical uses include signed policy generation.
|
|
100
|
-
*/
|
|
101
|
-
sign(stringToSign: string, options?: SigningArguments): Promise<string>;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export interface FormattedEvent {
|
|
105
|
-
headers: Uint8Array;
|
|
106
|
-
payload: Uint8Array;
|
|
107
|
-
}
|
|
108
|
-
export interface EventSigner {
|
|
109
|
-
/**
|
|
110
|
-
* Sign the individual event of the event stream.
|
|
111
|
-
*/
|
|
112
|
-
sign(event: FormattedEvent, options: EventSigningArguments): Promise<string>;
|
|
113
|
-
}
|
package/src/transfer.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export declare type RequestHandlerOutput<ResponseType> = {
|
|
2
|
-
response: ResponseType;
|
|
3
|
-
};
|
|
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
|
-
*/
|
|
10
|
-
metadata?: RequestHandlerMetadata;
|
|
11
|
-
destroy?: () => void;
|
|
12
|
-
handle: (request: RequestType, handlerOptions?: HandlerOptions) => Promise<RequestHandlerOutput<ResponseType>>;
|
|
13
|
-
}
|
|
14
|
-
export interface RequestHandlerMetadata {
|
|
15
|
-
handlerProtocol: string;
|
|
16
|
-
}
|
package/src/transfer.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export type RequestHandlerOutput<ResponseType> = { response: ResponseType };
|
|
2
|
-
|
|
3
|
-
export interface RequestHandler<RequestType, ResponseType, HandlerOptions = {}> {
|
|
4
|
-
/**
|
|
5
|
-
* metadata contains information of a handler. For example
|
|
6
|
-
* 'h2' refers this handler is for handling HTTP/2 requests,
|
|
7
|
-
* whereas 'h1' refers handling HTTP1 requests
|
|
8
|
-
*/
|
|
9
|
-
metadata?: RequestHandlerMetadata;
|
|
10
|
-
destroy?: () => void;
|
|
11
|
-
handle: (request: RequestType, handlerOptions?: HandlerOptions) => Promise<RequestHandlerOutput<ResponseType>>;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export interface RequestHandlerMetadata {
|
|
15
|
-
// This infers request handler's protocol
|
|
16
|
-
// valid values are stated: https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids
|
|
17
|
-
handlerProtocol: string;
|
|
18
|
-
}
|
package/src/util.d.ts
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { Endpoint } from "./http";
|
|
2
|
-
import { FinalizeHandler, FinalizeHandlerArguments, FinalizeHandlerOutput } from "./middleware";
|
|
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
|
-
*/
|
|
12
|
-
export interface Encoder {
|
|
13
|
-
(input: Uint8Array): string;
|
|
14
|
-
}
|
|
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
|
-
*/
|
|
23
|
-
export interface Decoder {
|
|
24
|
-
(input: string): Uint8Array;
|
|
25
|
-
}
|
|
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
|
-
*/
|
|
33
|
-
export interface Provider<T> {
|
|
34
|
-
(): Promise<T>;
|
|
35
|
-
}
|
|
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
|
-
*/
|
|
44
|
-
export interface BodyLengthCalculator {
|
|
45
|
-
(body: any): number | undefined;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Interface that specifies the retry behavior
|
|
49
|
-
*/
|
|
50
|
-
export interface RetryStrategy {
|
|
51
|
-
/**
|
|
52
|
-
* The retry mode describing how the retry strategy control the traffic flow.
|
|
53
|
-
*/
|
|
54
|
-
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
|
-
*/
|
|
60
|
-
retry: <Input extends object, Output extends MetadataBearer>(
|
|
61
|
-
next: FinalizeHandler<Input, Output>,
|
|
62
|
-
args: FinalizeHandlerArguments<Input>
|
|
63
|
-
) => Promise<FinalizeHandlerOutput<Output>>;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Parses a URL in string form into an Endpoint object.
|
|
67
|
-
*/
|
|
68
|
-
export interface UrlParser {
|
|
69
|
-
(url: string): Endpoint;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Object containing regionalization information of
|
|
73
|
-
* AWS services.
|
|
74
|
-
*/
|
|
75
|
-
export interface RegionInfo {
|
|
76
|
-
hostname: string;
|
|
77
|
-
partition: string;
|
|
78
|
-
path?: string;
|
|
79
|
-
signingService?: string;
|
|
80
|
-
signingRegion?: string;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Function returns designated service's regionalization
|
|
84
|
-
* information from given region. Each service client
|
|
85
|
-
* comes with its regionalization provider. it serves
|
|
86
|
-
* to provide the default values of related configurations
|
|
87
|
-
*/
|
|
88
|
-
export interface RegionInfoProvider {
|
|
89
|
-
(region: string, options?: any): Promise<RegionInfo | undefined>;
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* A tuple that represents an API name and optional version
|
|
93
|
-
* of a library built using the AWS SDK.
|
|
94
|
-
*/
|
|
95
|
-
export declare type UserAgentPair = [name: string, version?: string];
|
|
96
|
-
/**
|
|
97
|
-
* User agent data that to be put into the request's user
|
|
98
|
-
* agent.
|
|
99
|
-
*/
|
|
100
|
-
export declare type UserAgent = UserAgentPair[];
|
package/src/util.ts
DELETED
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { Endpoint } from "./http";
|
|
2
|
-
import {
|
|
3
|
-
FinalizeHandler,
|
|
4
|
-
FinalizeHandlerArguments,
|
|
5
|
-
FinalizeHandlerOutput,
|
|
6
|
-
HandlerExecutionContext,
|
|
7
|
-
} from "./middleware";
|
|
8
|
-
import { MetadataBearer } from "./response";
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* A function that, given a TypedArray of bytes, can produce a string
|
|
12
|
-
* representation thereof.
|
|
13
|
-
*
|
|
14
|
-
* @example An encoder function that converts bytes to hexadecimal
|
|
15
|
-
* representation would return `'deadbeef'` when given `new
|
|
16
|
-
* Uint8Array([0xde, 0xad, 0xbe, 0xef])`.
|
|
17
|
-
*/
|
|
18
|
-
export interface Encoder {
|
|
19
|
-
(input: Uint8Array): string;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* A function that, given a string, can derive the bytes represented by that
|
|
24
|
-
* string.
|
|
25
|
-
*
|
|
26
|
-
* @example A decoder function that converts bytes to hexadecimal
|
|
27
|
-
* representation would return `new Uint8Array([0xde, 0xad, 0xbe, 0xef])` when
|
|
28
|
-
* given the string `'deadbeef'`.
|
|
29
|
-
*/
|
|
30
|
-
export interface Decoder {
|
|
31
|
-
(input: string): Uint8Array;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* A function that, when invoked, returns a promise that will be fulfilled with
|
|
36
|
-
* a value of type T.
|
|
37
|
-
*
|
|
38
|
-
* @example A function that reads credentials from shared SDK configuration
|
|
39
|
-
* files, assuming roles and collecting MFA tokens as necessary.
|
|
40
|
-
*/
|
|
41
|
-
export interface Provider<T> {
|
|
42
|
-
(): Promise<T>;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* A function that, given a request body, determines the
|
|
47
|
-
* length of the body. This is used to determine the Content-Length
|
|
48
|
-
* that should be sent with a request.
|
|
49
|
-
*
|
|
50
|
-
* @example A function that reads a file stream and calculates
|
|
51
|
-
* the size of the file.
|
|
52
|
-
*/
|
|
53
|
-
export interface BodyLengthCalculator {
|
|
54
|
-
(body: any): number | undefined;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Interface that specifies the retry behavior
|
|
59
|
-
*/
|
|
60
|
-
export interface RetryStrategy {
|
|
61
|
-
/**
|
|
62
|
-
* The retry mode describing how the retry strategy control the traffic flow.
|
|
63
|
-
*/
|
|
64
|
-
mode?: string;
|
|
65
|
-
/**
|
|
66
|
-
* the retry behavior the will invoke the next handler and handle the retry accordingly.
|
|
67
|
-
* This function should also update the $metadata from the response accordingly.
|
|
68
|
-
* @see {@link ResponseMetadata}
|
|
69
|
-
*/
|
|
70
|
-
retry: <Input extends object, Output extends MetadataBearer>(
|
|
71
|
-
next: FinalizeHandler<Input, Output>,
|
|
72
|
-
args: FinalizeHandlerArguments<Input>
|
|
73
|
-
) => Promise<FinalizeHandlerOutput<Output>>;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* Parses a URL in string form into an Endpoint object.
|
|
78
|
-
*/
|
|
79
|
-
export interface UrlParser {
|
|
80
|
-
(url: string): Endpoint;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Object containing regionalization information of
|
|
85
|
-
* AWS services.
|
|
86
|
-
*/
|
|
87
|
-
export interface RegionInfo {
|
|
88
|
-
hostname: string;
|
|
89
|
-
partition: string;
|
|
90
|
-
path?: string;
|
|
91
|
-
signingService?: string;
|
|
92
|
-
signingRegion?: string;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Function returns designated service's regionalization
|
|
97
|
-
* information from given region. Each service client
|
|
98
|
-
* comes with its regionalization provider. it serves
|
|
99
|
-
* to provide the default values of related configurations
|
|
100
|
-
*/
|
|
101
|
-
export interface RegionInfoProvider {
|
|
102
|
-
(region: string, options?: any): Promise<RegionInfo | undefined>;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* A tuple that represents an API name and optional version
|
|
107
|
-
* of a library built using the AWS SDK.
|
|
108
|
-
*/
|
|
109
|
-
export type UserAgentPair = [name: string, version?: string];
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* User agent data that to be put into the request's user
|
|
113
|
-
* agent.
|
|
114
|
-
*/
|
|
115
|
-
export type UserAgent = UserAgentPair[];
|
package/src/waiter.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { AbortController } from "./abort";
|
|
2
|
-
export interface WaiterConfiguration<Client> {
|
|
3
|
-
/**
|
|
4
|
-
* Required service client
|
|
5
|
-
*/
|
|
6
|
-
client: Client;
|
|
7
|
-
/**
|
|
8
|
-
* The amount of time in seconds a user is willing to wait for a waiter to complete.
|
|
9
|
-
*/
|
|
10
|
-
maxWaitTime: number;
|
|
11
|
-
/**
|
|
12
|
-
* @deprecated Use abortSignal
|
|
13
|
-
* Abort controller. Used for ending the waiter early.
|
|
14
|
-
*/
|
|
15
|
-
abortController?: AbortController;
|
|
16
|
-
/**
|
|
17
|
-
* Abort Signal. Used for ending the waiter early.
|
|
18
|
-
*/
|
|
19
|
-
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
|
-
*/
|
|
25
|
-
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
|
-
*/
|
|
31
|
-
maxDelay?: number;
|
|
32
|
-
}
|
package/src/waiter.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { AbortController } from "./abort";
|
|
2
|
-
|
|
3
|
-
export interface WaiterConfiguration<Client> {
|
|
4
|
-
/**
|
|
5
|
-
* Required service client
|
|
6
|
-
*/
|
|
7
|
-
client: Client;
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* The amount of time in seconds a user is willing to wait for a waiter to complete.
|
|
11
|
-
*/
|
|
12
|
-
maxWaitTime: number;
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* @deprecated Use abortSignal
|
|
16
|
-
* Abort controller. Used for ending the waiter early.
|
|
17
|
-
*/
|
|
18
|
-
abortController?: AbortController;
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Abort Signal. Used for ending the waiter early.
|
|
22
|
-
*/
|
|
23
|
-
abortSignal?: AbortController["signal"];
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* The minimum amount of time to delay between retries in seconds. This is the
|
|
27
|
-
* floor of the exponential backoff. This value defaults to service default
|
|
28
|
-
* if not specified. This value MUST be less than or equal to maxDelay and greater than 0.
|
|
29
|
-
*/
|
|
30
|
-
minDelay?: number;
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* The maximum amount of time to delay between retries in seconds. This is the
|
|
34
|
-
* ceiling of the exponential backoff. This value defaults to service default
|
|
35
|
-
* if not specified. If specified, this value MUST be greater than or equal to 1.
|
|
36
|
-
*/
|
|
37
|
-
maxDelay?: number;
|
|
38
|
-
}
|
package/tsconfig.cjs.json
DELETED
package/tsconfig.es.json
DELETED