@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/src/util.d.ts
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
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/waiter.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
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/tsconfig.cjs.json
CHANGED
package/tsconfig.es.json
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
+
"baseUrl": ".",
|
|
3
4
|
"lib": ["es5", "es2015.promise", "es2015.collection", "es2015.iterable", "es2015.symbol.wellknown"],
|
|
4
|
-
"
|
|
5
|
-
"rootDir": "
|
|
6
|
-
"outDir": "./dist/es",
|
|
7
|
-
"baseUrl": "."
|
|
5
|
+
"outDir": "dist/es",
|
|
6
|
+
"rootDir": "src"
|
|
8
7
|
},
|
|
9
8
|
"extends": "../../tsconfig.es.json",
|
|
10
9
|
"include": ["src/"]
|