@aws-sdk/types 3.357.0 → 3.370.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/dist-cjs/auth.js +2 -5
- package/dist-cjs/endpoint.js +2 -5
- package/dist-cjs/transfer.js +2 -6
- package/dist-es/auth.js +1 -5
- package/dist-es/endpoint.js +1 -5
- package/dist-es/transfer.js +1 -6
- package/dist-types/abort.d.ts +1 -49
- package/dist-types/auth.d.ts +1 -55
- package/dist-types/checksum.d.ts +1 -63
- package/dist-types/client.d.ts +1 -25
- package/dist-types/command.d.ts +1 -10
- package/dist-types/connection.d.ts +1 -0
- package/dist-types/crypto.d.ts +1 -60
- package/dist-types/encode.d.ts +1 -19
- package/dist-types/endpoint.d.ts +1 -77
- package/dist-types/eventStream.d.ts +1 -108
- package/dist-types/http.d.ts +2 -87
- package/dist-types/identity/AwsCredentialIdentity.d.ts +1 -23
- package/dist-types/identity/Identity.d.ts +1 -15
- package/dist-types/logger.d.ts +2 -13
- package/dist-types/middleware.d.ts +1 -475
- package/dist-types/pagination.d.ts +1 -26
- package/dist-types/profile.d.ts +1 -22
- package/dist-types/response.d.ts +1 -40
- package/dist-types/retry.d.ts +1 -128
- package/dist-types/serde.d.ts +1 -104
- package/dist-types/shapes.d.ts +1 -72
- package/dist-types/signature.d.ts +1 -150
- package/dist-types/stream.d.ts +1 -22
- package/dist-types/transfer.d.ts +1 -33
- package/dist-types/ts3.4/abort.d.ts +1 -11
- package/dist-types/ts3.4/auth.d.ts +5 -17
- package/dist-types/ts3.4/checksum.d.ts +1 -12
- package/dist-types/ts3.4/client.d.ts +1 -52
- package/dist-types/ts3.4/command.d.ts +1 -17
- package/dist-types/ts3.4/connection.d.ts +6 -0
- package/dist-types/ts3.4/crypto.d.ts +7 -14
- package/dist-types/ts3.4/encode.d.ts +6 -19
- package/dist-types/ts3.4/endpoint.d.ts +9 -43
- package/dist-types/ts3.4/eventStream.d.ts +24 -77
- package/dist-types/ts3.4/http.d.ts +10 -26
- package/dist-types/ts3.4/identity/AwsCredentialIdentity.d.ts +4 -8
- package/dist-types/ts3.4/identity/Identity.d.ts +1 -6
- package/dist-types/ts3.4/logger.d.ts +2 -7
- package/dist-types/ts3.4/middleware.d.ts +40 -211
- package/dist-types/ts3.4/pagination.d.ts +1 -8
- package/dist-types/ts3.4/profile.d.ts +6 -7
- package/dist-types/ts3.4/response.d.ts +1 -11
- package/dist-types/ts3.4/retry.d.ts +12 -43
- package/dist-types/ts3.4/serde.d.ts +12 -46
- package/dist-types/ts3.4/shapes.d.ts +6 -24
- package/dist-types/ts3.4/signature.d.ts +15 -59
- package/dist-types/ts3.4/stream.d.ts +4 -16
- package/dist-types/ts3.4/transfer.d.ts +7 -26
- package/dist-types/ts3.4/uri.d.ts +1 -11
- package/dist-types/ts3.4/util.d.ts +14 -50
- package/dist-types/ts3.4/waiter.d.ts +1 -9
- package/dist-types/uri.d.ts +1 -17
- package/dist-types/util.d.ts +1 -155
- package/dist-types/waiter.d.ts +1 -35
- package/package.json +2 -1
- package/dist-cjs/connection/index.js +0 -6
- package/dist-cjs/connection/manager.js +0 -2
- package/dist-cjs/connection/pool.js +0 -2
- package/dist-es/connection/index.js +0 -3
- package/dist-es/connection/manager.js +0 -1
- package/dist-es/connection/pool.js +0 -1
- package/dist-types/connection/config.d.ts +0 -7
- package/dist-types/connection/index.d.ts +0 -3
- package/dist-types/connection/manager.d.ts +0 -28
- package/dist-types/connection/pool.d.ts +0 -24
- package/dist-types/ts3.4/connection/config.d.ts +0 -3
- package/dist-types/ts3.4/connection/index.d.ts +0 -3
- package/dist-types/ts3.4/connection/manager.d.ts +0 -14
- package/dist-types/ts3.4/connection/pool.d.ts +0 -9
- /package/dist-cjs/{connection/config.js → connection.js} +0 -0
- /package/dist-es/{connection/config.js → connection.js} +0 -0
package/dist-types/retry.d.ts
CHANGED
|
@@ -1,128 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* @public
|
|
3
|
-
*/
|
|
4
|
-
export type RetryErrorType =
|
|
5
|
-
/**
|
|
6
|
-
* This is a connection level error such as a socket timeout, socket connect
|
|
7
|
-
* error, tls negotiation timeout etc...
|
|
8
|
-
* Typically these should never be applied for non-idempotent request types
|
|
9
|
-
* since in this scenario, it's impossible to know whether the operation had
|
|
10
|
-
* a side effect on the server.
|
|
11
|
-
*/
|
|
12
|
-
"TRANSIENT"
|
|
13
|
-
/**
|
|
14
|
-
* This is an error where the server explicitly told the client to back off,
|
|
15
|
-
* such as a 429 or 503 Http error.
|
|
16
|
-
*/
|
|
17
|
-
| "THROTTLING"
|
|
18
|
-
/**
|
|
19
|
-
* This is a server error that isn't explicitly throttling but is considered
|
|
20
|
-
* by the client to be something that should be retried.
|
|
21
|
-
*/
|
|
22
|
-
| "SERVER_ERROR"
|
|
23
|
-
/**
|
|
24
|
-
* Doesn't count against any budgets. This could be something like a 401
|
|
25
|
-
* challenge in Http.
|
|
26
|
-
*/
|
|
27
|
-
| "CLIENT_ERROR";
|
|
28
|
-
/**
|
|
29
|
-
* @public
|
|
30
|
-
*/
|
|
31
|
-
export interface RetryErrorInfo {
|
|
32
|
-
errorType: RetryErrorType;
|
|
33
|
-
/**
|
|
34
|
-
* Protocol hint. This could come from Http's 'retry-after' header or
|
|
35
|
-
* something from MQTT or any other protocol that has the ability to convey
|
|
36
|
-
* retry info from a peer.
|
|
37
|
-
*
|
|
38
|
-
* @returns the Date after which a retry should be attempted.
|
|
39
|
-
*/
|
|
40
|
-
retryAfterHint?: Date;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* @public
|
|
44
|
-
*/
|
|
45
|
-
export interface RetryBackoffStrategy {
|
|
46
|
-
/**
|
|
47
|
-
* @returns the number of milliseconds to wait before retrying an action.
|
|
48
|
-
*/
|
|
49
|
-
computeNextBackoffDelay(retryAttempt: number): number;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* @public
|
|
53
|
-
*/
|
|
54
|
-
export interface StandardRetryBackoffStrategy extends RetryBackoffStrategy {
|
|
55
|
-
/**
|
|
56
|
-
* Sets the delayBase used to compute backoff delays.
|
|
57
|
-
* @param delayBase -
|
|
58
|
-
*/
|
|
59
|
-
setDelayBase(delayBase: number): void;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* @public
|
|
63
|
-
*/
|
|
64
|
-
export interface RetryStrategyOptions {
|
|
65
|
-
backoffStrategy: RetryBackoffStrategy;
|
|
66
|
-
maxRetriesBase: number;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* @public
|
|
70
|
-
*/
|
|
71
|
-
export interface RetryToken {
|
|
72
|
-
/**
|
|
73
|
-
* @returns the current count of retry.
|
|
74
|
-
*/
|
|
75
|
-
getRetryCount(): number;
|
|
76
|
-
/**
|
|
77
|
-
* @returns the number of milliseconds to wait before retrying an action.
|
|
78
|
-
*/
|
|
79
|
-
getRetryDelay(): number;
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* @public
|
|
83
|
-
*/
|
|
84
|
-
export interface StandardRetryToken extends RetryToken {
|
|
85
|
-
/**
|
|
86
|
-
* @returns the cost of the last retry attempt.
|
|
87
|
-
*/
|
|
88
|
-
getRetryCost(): number | undefined;
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* @public
|
|
92
|
-
*/
|
|
93
|
-
export interface RetryStrategyV2 {
|
|
94
|
-
/**
|
|
95
|
-
* Called before any retries (for the first call to the operation). It either
|
|
96
|
-
* returns a retry token or an error upon the failure to acquire a token prior.
|
|
97
|
-
*
|
|
98
|
-
* tokenScope is arbitrary and out of scope for this component. However,
|
|
99
|
-
* adding it here offers us a lot of future flexibility for outage detection.
|
|
100
|
-
* For example, it could be "us-east-1" on a shared retry strategy, or
|
|
101
|
-
* "us-west-2-c:dynamodb".
|
|
102
|
-
*/
|
|
103
|
-
acquireInitialRetryToken(retryTokenScope: string): Promise<RetryToken>;
|
|
104
|
-
/**
|
|
105
|
-
* After a failed operation call, this function is invoked to refresh the
|
|
106
|
-
* retryToken returned by acquireInitialRetryToken(). This function can
|
|
107
|
-
* either choose to allow another retry and send a new or updated token,
|
|
108
|
-
* or reject the retry attempt and report the error either in an exception
|
|
109
|
-
* or returning an error.
|
|
110
|
-
*/
|
|
111
|
-
refreshRetryTokenForRetry(tokenToRenew: RetryToken, errorInfo: RetryErrorInfo): Promise<RetryToken>;
|
|
112
|
-
/**
|
|
113
|
-
* Upon successful completion of the operation, this function is called
|
|
114
|
-
* to record that the operation was successful.
|
|
115
|
-
*/
|
|
116
|
-
recordSuccess(token: RetryToken): void;
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* @public
|
|
120
|
-
*/
|
|
121
|
-
export type ExponentialBackoffJitterType = "DEFAULT" | "NONE" | "FULL" | "DECORRELATED";
|
|
122
|
-
/**
|
|
123
|
-
* @public
|
|
124
|
-
*/
|
|
125
|
-
export interface ExponentialBackoffStrategyOptions {
|
|
126
|
-
jitterType: ExponentialBackoffJitterType;
|
|
127
|
-
backoffScaleValue?: number;
|
|
128
|
-
}
|
|
1
|
+
export { ExponentialBackoffJitterType, ExponentialBackoffStrategyOptions, RetryBackoffStrategy, RetryErrorInfo, RetryErrorType, RetryStrategyOptions, RetryStrategyV2, RetryToken, StandardRetryBackoffStrategy, StandardRetryToken, } from "@smithy/types";
|
package/dist-types/serde.d.ts
CHANGED
|
@@ -1,65 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { RequestHandler } from "./transfer";
|
|
3
|
-
import { Decoder, Encoder, Provider } from "./util";
|
|
4
|
-
/**
|
|
5
|
-
* @public
|
|
6
|
-
*
|
|
7
|
-
* Interface for object requires an Endpoint set.
|
|
8
|
-
*/
|
|
9
|
-
export interface EndpointBearer {
|
|
10
|
-
endpoint: Provider<Endpoint>;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* @public
|
|
14
|
-
*/
|
|
15
|
-
export interface StreamCollector {
|
|
16
|
-
/**
|
|
17
|
-
* A function that converts a stream into an array of bytes.
|
|
18
|
-
*
|
|
19
|
-
* @param stream - The low-level native stream from browser or Nodejs runtime
|
|
20
|
-
*/
|
|
21
|
-
(stream: any): Promise<Uint8Array>;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* @public
|
|
25
|
-
*
|
|
26
|
-
* Request and Response serde util functions and settings for AWS services
|
|
27
|
-
*/
|
|
28
|
-
export interface SerdeContext extends EndpointBearer {
|
|
29
|
-
base64Encoder: Encoder;
|
|
30
|
-
base64Decoder: Decoder;
|
|
31
|
-
utf8Encoder: Encoder;
|
|
32
|
-
utf8Decoder: Decoder;
|
|
33
|
-
streamCollector: StreamCollector;
|
|
34
|
-
requestHandler: RequestHandler<any, any>;
|
|
35
|
-
disableHostPrefix: boolean;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* @public
|
|
39
|
-
*/
|
|
40
|
-
export interface RequestSerializer<Request, Context extends EndpointBearer = any> {
|
|
41
|
-
/**
|
|
42
|
-
* Converts the provided `input` into a request object
|
|
43
|
-
*
|
|
44
|
-
* @param input - The user input to serialize.
|
|
45
|
-
*
|
|
46
|
-
* @param context - Context containing runtime-specific util functions.
|
|
47
|
-
*/
|
|
48
|
-
(input: any, context: Context): Promise<Request>;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* @public
|
|
52
|
-
*/
|
|
53
|
-
export interface ResponseDeserializer<OutputType, ResponseType = any, Context = any> {
|
|
54
|
-
/**
|
|
55
|
-
* Converts the output of an operation into JavaScript types.
|
|
56
|
-
*
|
|
57
|
-
* @param output - The HTTP response received from the service
|
|
58
|
-
*
|
|
59
|
-
* @param context - context containing runtime-specific util functions.
|
|
60
|
-
*/
|
|
61
|
-
(output: ResponseType, context: Context): Promise<OutputType>;
|
|
62
|
-
}
|
|
1
|
+
export { EndpointBearer, StreamCollector, SerdeContext, ResponseDeserializer, RequestSerializer, SdkStreamMixin, SdkStream, WithSdkStreamMixin, SdkStreamMixinInjector, SdkStreamSerdeContext, } from "@smithy/types";
|
|
63
2
|
/**
|
|
64
3
|
* @public
|
|
65
4
|
*
|
|
@@ -83,45 +22,3 @@ declare global {
|
|
|
83
22
|
export interface Blob {
|
|
84
23
|
}
|
|
85
24
|
}
|
|
86
|
-
/**
|
|
87
|
-
* The interface contains mix-in utility functions to transfer the runtime-specific
|
|
88
|
-
* stream implementation to specified format. Each stream can ONLY be transformed
|
|
89
|
-
* once.
|
|
90
|
-
*/
|
|
91
|
-
export interface SdkStreamMixin {
|
|
92
|
-
transformToByteArray: () => Promise<Uint8Array>;
|
|
93
|
-
transformToString: (encoding?: string) => Promise<string>;
|
|
94
|
-
transformToWebStream: () => ReadableStream;
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* @public
|
|
98
|
-
*
|
|
99
|
-
* The type describing a runtime-specific stream implementation with mix-in
|
|
100
|
-
* utility functions.
|
|
101
|
-
*/
|
|
102
|
-
export type SdkStream<BaseStream> = BaseStream & SdkStreamMixin;
|
|
103
|
-
/**
|
|
104
|
-
* @public
|
|
105
|
-
*
|
|
106
|
-
* Indicates that the member of type T with
|
|
107
|
-
* key StreamKey have been extended
|
|
108
|
-
* with the SdkStreamMixin helper methods.
|
|
109
|
-
*/
|
|
110
|
-
export type WithSdkStreamMixin<T, StreamKey extends keyof T> = {
|
|
111
|
-
[key in keyof T]: key extends StreamKey ? SdkStream<T[StreamKey]> : T[key];
|
|
112
|
-
};
|
|
113
|
-
/**
|
|
114
|
-
* Interface for internal function to inject stream utility functions
|
|
115
|
-
* implementation
|
|
116
|
-
*
|
|
117
|
-
* @internal
|
|
118
|
-
*/
|
|
119
|
-
export interface SdkStreamMixinInjector {
|
|
120
|
-
(stream: unknown): SdkStreamMixin;
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* @internal
|
|
124
|
-
*/
|
|
125
|
-
export interface SdkStreamSerdeContext {
|
|
126
|
-
sdkStreamMixin: SdkStreamMixinInjector;
|
|
127
|
-
}
|
package/dist-types/shapes.d.ts
CHANGED
|
@@ -1,72 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { MetadataBearer } from "./response";
|
|
3
|
-
/**
|
|
4
|
-
* @public
|
|
5
|
-
*
|
|
6
|
-
* A document type represents an untyped JSON-like value.
|
|
7
|
-
*
|
|
8
|
-
* Not all protocols support document types, and the serialization format of a
|
|
9
|
-
* document type is protocol specific. All JSON protocols SHOULD support
|
|
10
|
-
* document types and they SHOULD serialize document types inline as normal
|
|
11
|
-
* JSON values.
|
|
12
|
-
*/
|
|
13
|
-
export type DocumentType = null | boolean | number | string | DocumentType[] | {
|
|
14
|
-
[prop: string]: DocumentType;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* @public
|
|
18
|
-
*
|
|
19
|
-
* A structure shape with the error trait.
|
|
20
|
-
* https://smithy.io/2.0/spec/behavior-traits.html#smithy-api-retryable-trait
|
|
21
|
-
*/
|
|
22
|
-
export interface RetryableTrait {
|
|
23
|
-
/**
|
|
24
|
-
* Indicates that the error is a retryable throttling error.
|
|
25
|
-
*/
|
|
26
|
-
readonly throttling?: boolean;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* @public
|
|
30
|
-
*
|
|
31
|
-
* Type that is implemented by all Smithy shapes marked with the
|
|
32
|
-
* error trait.
|
|
33
|
-
* @deprecated
|
|
34
|
-
*/
|
|
35
|
-
export interface SmithyException {
|
|
36
|
-
/**
|
|
37
|
-
* The shape ID name of the exception.
|
|
38
|
-
*/
|
|
39
|
-
readonly name: string;
|
|
40
|
-
/**
|
|
41
|
-
* Whether the client or server are at fault.
|
|
42
|
-
*/
|
|
43
|
-
readonly $fault: "client" | "server";
|
|
44
|
-
/**
|
|
45
|
-
* The service that encountered the exception.
|
|
46
|
-
*/
|
|
47
|
-
readonly $service?: string;
|
|
48
|
-
/**
|
|
49
|
-
* Indicates that an error MAY be retried by the client.
|
|
50
|
-
*/
|
|
51
|
-
readonly $retryable?: RetryableTrait;
|
|
52
|
-
/**
|
|
53
|
-
* Reference to low-level HTTP response object.
|
|
54
|
-
*/
|
|
55
|
-
readonly $response?: HttpResponse;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* @public
|
|
59
|
-
*
|
|
60
|
-
* @deprecated See {@link https://aws.amazon.com/blogs/developer/service-error-handling-modular-aws-sdk-js/}
|
|
61
|
-
*
|
|
62
|
-
* This type should not be used in your application.
|
|
63
|
-
* Users of the AWS SDK for JavaScript v3 service clients should prefer to
|
|
64
|
-
* use the specific Exception classes corresponding to each operation.
|
|
65
|
-
* These can be found as code in the deserializer for the operation's Command class,
|
|
66
|
-
* or as declarations in the service model file in codegen/sdk-codegen/aws-models.
|
|
67
|
-
*
|
|
68
|
-
* If no exceptions are enumerated by a particular Command operation,
|
|
69
|
-
* the base exception for the service should be used. Each client exports
|
|
70
|
-
* a base ServiceException prefixed with the service name.
|
|
71
|
-
*/
|
|
72
|
-
export type SdkError = Error & Partial<SmithyException> & Partial<MetadataBearer>;
|
|
1
|
+
export { DocumentType, RetryableTrait, SmithyException, SdkError } from "@smithy/types";
|
|
@@ -1,150 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { HttpRequest } from "./http";
|
|
3
|
-
/**
|
|
4
|
-
* @public
|
|
5
|
-
*
|
|
6
|
-
* A `Date` object, a unix (epoch) timestamp in seconds, or a string that can be
|
|
7
|
-
* understood by the JavaScript `Date` constructor.
|
|
8
|
-
*/
|
|
9
|
-
export type DateInput = number | string | Date;
|
|
10
|
-
/**
|
|
11
|
-
* @public
|
|
12
|
-
*/
|
|
13
|
-
export interface SigningArguments {
|
|
14
|
-
/**
|
|
15
|
-
* The date and time to be used as signature metadata. This value should be
|
|
16
|
-
* a Date object, a unix (epoch) timestamp, or a string that can be
|
|
17
|
-
* understood by the JavaScript `Date` constructor.If not supplied, the
|
|
18
|
-
* value returned by `new Date()` will be used.
|
|
19
|
-
*/
|
|
20
|
-
signingDate?: DateInput;
|
|
21
|
-
/**
|
|
22
|
-
* The service signing name. It will override the service name of the signer
|
|
23
|
-
* in current invocation
|
|
24
|
-
*/
|
|
25
|
-
signingService?: string;
|
|
26
|
-
/**
|
|
27
|
-
* The region name to sign the request. It will override the signing region of the
|
|
28
|
-
* signer in current invocation
|
|
29
|
-
*/
|
|
30
|
-
signingRegion?: string;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* @public
|
|
34
|
-
*/
|
|
35
|
-
export interface RequestSigningArguments extends SigningArguments {
|
|
36
|
-
/**
|
|
37
|
-
* A set of strings whose members represents headers that cannot be signed.
|
|
38
|
-
* All headers in the provided request will have their names converted to
|
|
39
|
-
* lower case and then checked for existence in the unsignableHeaders set.
|
|
40
|
-
*/
|
|
41
|
-
unsignableHeaders?: Set<string>;
|
|
42
|
-
/**
|
|
43
|
-
* A set of strings whose members represents headers that should be signed.
|
|
44
|
-
* Any values passed here will override those provided via unsignableHeaders,
|
|
45
|
-
* allowing them to be signed.
|
|
46
|
-
*
|
|
47
|
-
* All headers in the provided request will have their names converted to
|
|
48
|
-
* lower case before signing.
|
|
49
|
-
*/
|
|
50
|
-
signableHeaders?: Set<string>;
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* @public
|
|
54
|
-
*/
|
|
55
|
-
export interface RequestPresigningArguments extends RequestSigningArguments {
|
|
56
|
-
/**
|
|
57
|
-
* The number of seconds before the presigned URL expires
|
|
58
|
-
*/
|
|
59
|
-
expiresIn?: number;
|
|
60
|
-
/**
|
|
61
|
-
* A set of strings whose representing headers that should not be hoisted
|
|
62
|
-
* to presigned request's query string. If not supplied, the presigner
|
|
63
|
-
* moves all the AWS-specific headers (starting with `x-amz-`) to the request
|
|
64
|
-
* query string. If supplied, these headers remain in the presigned request's
|
|
65
|
-
* header.
|
|
66
|
-
* All headers in the provided request will have their names converted to
|
|
67
|
-
* lower case and then checked for existence in the unhoistableHeaders set.
|
|
68
|
-
*/
|
|
69
|
-
unhoistableHeaders?: Set<string>;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* @public
|
|
73
|
-
*/
|
|
74
|
-
export interface EventSigningArguments extends SigningArguments {
|
|
75
|
-
priorSignature: string;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* @public
|
|
79
|
-
*/
|
|
80
|
-
export interface RequestPresigner {
|
|
81
|
-
/**
|
|
82
|
-
* Signs a request for future use.
|
|
83
|
-
*
|
|
84
|
-
* The request will be valid until either the provided `expiration` time has
|
|
85
|
-
* passed or the underlying credentials have expired.
|
|
86
|
-
*
|
|
87
|
-
* @param requestToSign - The request that should be signed.
|
|
88
|
-
* @param options - Additional signing options.
|
|
89
|
-
*/
|
|
90
|
-
presign(requestToSign: HttpRequest, options?: RequestPresigningArguments): Promise<HttpRequest>;
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* @public
|
|
94
|
-
*
|
|
95
|
-
* An object that signs request objects with AWS credentials using one of the
|
|
96
|
-
* AWS authentication protocols.
|
|
97
|
-
*/
|
|
98
|
-
export interface RequestSigner {
|
|
99
|
-
/**
|
|
100
|
-
* Sign the provided request for immediate dispatch.
|
|
101
|
-
*/
|
|
102
|
-
sign(requestToSign: HttpRequest, options?: RequestSigningArguments): Promise<HttpRequest>;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* @public
|
|
106
|
-
*/
|
|
107
|
-
export interface StringSigner {
|
|
108
|
-
/**
|
|
109
|
-
* Sign the provided `stringToSign` for use outside of the context of
|
|
110
|
-
* request signing. Typical uses include signed policy generation.
|
|
111
|
-
*/
|
|
112
|
-
sign(stringToSign: string, options?: SigningArguments): Promise<string>;
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* @public
|
|
116
|
-
*/
|
|
117
|
-
export interface FormattedEvent {
|
|
118
|
-
headers: Uint8Array;
|
|
119
|
-
payload: Uint8Array;
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* @public
|
|
123
|
-
*/
|
|
124
|
-
export interface EventSigner {
|
|
125
|
-
/**
|
|
126
|
-
* Sign the individual event of the event stream.
|
|
127
|
-
*/
|
|
128
|
-
sign(event: FormattedEvent, options: EventSigningArguments): Promise<string>;
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* @public
|
|
132
|
-
*/
|
|
133
|
-
export interface SignableMessage {
|
|
134
|
-
message: Message;
|
|
135
|
-
priorSignature: string;
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* @public
|
|
139
|
-
*/
|
|
140
|
-
export interface SignedMessage {
|
|
141
|
-
message: Message;
|
|
142
|
-
signature: string;
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* @public
|
|
146
|
-
*/
|
|
147
|
-
export interface MessageSigner {
|
|
148
|
-
signMessage(message: SignableMessage, args: SigningArguments): Promise<SignedMessage>;
|
|
149
|
-
sign(event: SignableMessage, options: SigningArguments): Promise<SignedMessage>;
|
|
150
|
-
}
|
|
1
|
+
export { DateInput, EventSigner, EventSigningArguments, FormattedEvent, MessageSigner, RequestSigningArguments, RequestPresigner, RequestPresigningArguments, RequestSigner, SignableMessage, SignedMessage, SigningArguments, StringSigner, } from "@smithy/types";
|
package/dist-types/stream.d.ts
CHANGED
|
@@ -1,22 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { HashConstructor, StreamHasher } from "./crypto";
|
|
3
|
-
import { BodyLengthCalculator, Encoder } from "./util";
|
|
4
|
-
/**
|
|
5
|
-
* @public
|
|
6
|
-
*/
|
|
7
|
-
export interface GetAwsChunkedEncodingStreamOptions {
|
|
8
|
-
base64Encoder?: Encoder;
|
|
9
|
-
bodyLengthChecker: BodyLengthCalculator;
|
|
10
|
-
checksumAlgorithmFn?: ChecksumConstructor | HashConstructor;
|
|
11
|
-
checksumLocationName?: string;
|
|
12
|
-
streamHasher?: StreamHasher;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* @public
|
|
16
|
-
*
|
|
17
|
-
* A function that returns Readable Stream which follows aws-chunked encoding stream.
|
|
18
|
-
* It optionally adds checksum if options are provided.
|
|
19
|
-
*/
|
|
20
|
-
export interface GetAwsChunkedEncodingStream<StreamType = any> {
|
|
21
|
-
(readableStream: StreamType, options: GetAwsChunkedEncodingStreamOptions): StreamType;
|
|
22
|
-
}
|
|
1
|
+
export { GetAwsChunkedEncodingStream, GetAwsChunkedEncodingStreamOptions } from "@smithy/types";
|
package/dist-types/transfer.d.ts
CHANGED
|
@@ -1,33 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* @public
|
|
3
|
-
*/
|
|
4
|
-
export type RequestHandlerOutput<ResponseType> = {
|
|
5
|
-
response: ResponseType;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* @public
|
|
9
|
-
*/
|
|
10
|
-
export interface RequestHandler<RequestType, ResponseType, HandlerOptions = {}> {
|
|
11
|
-
/**
|
|
12
|
-
* metadata contains information of a handler. For example
|
|
13
|
-
* 'h2' refers this handler is for handling HTTP/2 requests,
|
|
14
|
-
* whereas 'h1' refers handling HTTP1 requests
|
|
15
|
-
*/
|
|
16
|
-
metadata?: RequestHandlerMetadata;
|
|
17
|
-
destroy?: () => void;
|
|
18
|
-
handle: (request: RequestType, handlerOptions?: HandlerOptions) => Promise<RequestHandlerOutput<ResponseType>>;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* @public
|
|
22
|
-
*/
|
|
23
|
-
export interface RequestHandlerMetadata {
|
|
24
|
-
handlerProtocol: RequestHandlerProtocol | string;
|
|
25
|
-
}
|
|
26
|
-
export declare enum RequestHandlerProtocol {
|
|
27
|
-
HTTP_0_9 = "http/0.9",
|
|
28
|
-
HTTP_1_0 = "http/1.0",
|
|
29
|
-
TDS_8_0 = "tds/8.0"
|
|
30
|
-
}
|
|
31
|
-
export interface RequestContext {
|
|
32
|
-
destination: URL;
|
|
33
|
-
}
|
|
1
|
+
export { RequestContext, RequestHandler, RequestHandlerMetadata, RequestHandlerOutput, RequestHandlerProtocol, } from "@smithy/types";
|
|
@@ -1,11 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
(this: AbortSignal, ev: any): any;
|
|
3
|
-
}
|
|
4
|
-
export interface AbortSignal {
|
|
5
|
-
readonly aborted: boolean;
|
|
6
|
-
onabort: AbortHandler | Function | null;
|
|
7
|
-
}
|
|
8
|
-
export interface AbortController {
|
|
9
|
-
readonly signal: AbortSignal;
|
|
10
|
-
abort(): void;
|
|
11
|
-
}
|
|
1
|
+
export { AbortController, AbortHandler, AbortSignal } from "@smithy/types";
|
|
@@ -1,17 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
signingScope?: never;
|
|
7
|
-
properties: Record<string, unknown>;
|
|
8
|
-
}
|
|
9
|
-
export interface HttpAuthDefinition {
|
|
10
|
-
in: HttpAuthLocation;
|
|
11
|
-
name: string;
|
|
12
|
-
scheme?: string;
|
|
13
|
-
}
|
|
14
|
-
export declare enum HttpAuthLocation {
|
|
15
|
-
HEADER = "header",
|
|
16
|
-
QUERY = "query",
|
|
17
|
-
}
|
|
1
|
+
export {
|
|
2
|
+
AuthScheme,
|
|
3
|
+
HttpAuthDefinition,
|
|
4
|
+
HttpAuthLocation,
|
|
5
|
+
} from "@smithy/types";
|
|
@@ -1,12 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export interface Checksum {
|
|
3
|
-
digestLength?: number;
|
|
4
|
-
copy?(): Checksum;
|
|
5
|
-
digest(): Promise<Uint8Array>;
|
|
6
|
-
mark?(readLimit: number): void;
|
|
7
|
-
reset(): void;
|
|
8
|
-
update(chunk: Uint8Array): void;
|
|
9
|
-
}
|
|
10
|
-
export interface ChecksumConstructor {
|
|
11
|
-
new (secret?: SourceData): Checksum;
|
|
12
|
-
}
|
|
1
|
+
export { Checksum, ChecksumConstructor } from "@smithy/types";
|
|
@@ -1,52 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { MiddlewareStack } from "./middleware";
|
|
3
|
-
import { MetadataBearer } from "./response";
|
|
4
|
-
interface InvokeFunction<
|
|
5
|
-
InputTypes extends object,
|
|
6
|
-
OutputTypes extends MetadataBearer,
|
|
7
|
-
ResolvedClientConfiguration
|
|
8
|
-
> {
|
|
9
|
-
<InputType extends InputTypes, OutputType extends OutputTypes>(
|
|
10
|
-
command: Command<
|
|
11
|
-
InputTypes,
|
|
12
|
-
InputType,
|
|
13
|
-
OutputTypes,
|
|
14
|
-
OutputType,
|
|
15
|
-
ResolvedClientConfiguration
|
|
16
|
-
>,
|
|
17
|
-
options?: any
|
|
18
|
-
): Promise<OutputType>;
|
|
19
|
-
<InputType extends InputTypes, OutputType extends OutputTypes>(
|
|
20
|
-
command: Command<
|
|
21
|
-
InputTypes,
|
|
22
|
-
InputType,
|
|
23
|
-
OutputTypes,
|
|
24
|
-
OutputType,
|
|
25
|
-
ResolvedClientConfiguration
|
|
26
|
-
>,
|
|
27
|
-
options: any,
|
|
28
|
-
cb: (err: any, data?: OutputType) => void
|
|
29
|
-
): void;
|
|
30
|
-
<InputType extends InputTypes, OutputType extends OutputTypes>(
|
|
31
|
-
command: Command<
|
|
32
|
-
InputTypes,
|
|
33
|
-
InputType,
|
|
34
|
-
OutputTypes,
|
|
35
|
-
OutputType,
|
|
36
|
-
ResolvedClientConfiguration
|
|
37
|
-
>,
|
|
38
|
-
options?: any,
|
|
39
|
-
cb?: (err: any, data?: OutputType) => void
|
|
40
|
-
): Promise<OutputType> | void;
|
|
41
|
-
}
|
|
42
|
-
export interface Client<
|
|
43
|
-
Input extends object,
|
|
44
|
-
Output extends MetadataBearer,
|
|
45
|
-
ResolvedClientConfiguration
|
|
46
|
-
> {
|
|
47
|
-
readonly config: ResolvedClientConfiguration;
|
|
48
|
-
middlewareStack: MiddlewareStack<Input, Output>;
|
|
49
|
-
send: InvokeFunction<Input, Output, ResolvedClientConfiguration>;
|
|
50
|
-
destroy: () => void;
|
|
51
|
-
}
|
|
52
|
-
export {};
|
|
1
|
+
export { Client } from "@smithy/types";
|
|
@@ -1,17 +1 @@
|
|
|
1
|
-
|
|
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
|
-
}
|
|
1
|
+
export { Command } from "@smithy/types";
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
export interface StreamHasher<StreamType = any> {
|
|
10
|
-
(hashCtor: HashConstructor, stream: StreamType): Promise<Uint8Array>;
|
|
11
|
-
}
|
|
12
|
-
export interface randomValues {
|
|
13
|
-
(byteLength: number): Promise<Uint8Array>;
|
|
14
|
-
}
|
|
1
|
+
export {
|
|
2
|
+
Hash,
|
|
3
|
+
HashConstructor,
|
|
4
|
+
StreamHasher,
|
|
5
|
+
randomValues,
|
|
6
|
+
SourceData,
|
|
7
|
+
} from "@smithy/types";
|