@aws-sdk/types 3.50.0 → 3.52.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 +8 -0
- package/dist-types/ts3.4/abort.d.ts +17 -0
- package/dist-types/ts3.4/client.d.ts +17 -0
- package/dist-types/ts3.4/command.d.ts +7 -0
- package/dist-types/ts3.4/credentials.d.ts +13 -0
- package/dist-types/ts3.4/crypto.d.ts +20 -0
- package/dist-types/ts3.4/eventStream.d.ts +78 -0
- package/dist-types/ts3.4/http.d.ts +44 -0
- package/dist-types/ts3.4/index.d.ts +17 -0
- package/dist-types/ts3.4/logger.d.ts +14 -0
- package/dist-types/ts3.4/middleware.d.ts +155 -0
- package/dist-types/ts3.4/pagination.d.ts +9 -0
- package/dist-types/ts3.4/response.d.ts +18 -0
- package/dist-types/ts3.4/serde.d.ts +29 -0
- package/dist-types/ts3.4/shapes.d.ts +26 -0
- package/dist-types/ts3.4/signature.d.ts +47 -0
- package/dist-types/ts3.4/transfer.d.ts +12 -0
- package/dist-types/ts3.4/util.d.ts +56 -0
- package/dist-types/ts3.4/waiter.d.ts +15 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.52.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.51.0...v3.52.0) (2022-02-18)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @aws-sdk/types
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [3.50.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.49.0...v3.50.0) (2022-02-08)
|
|
7
15
|
|
|
8
16
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface AbortHandler {
|
|
2
|
+
(this: AbortSignal, ev: any): any;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export interface AbortSignal {
|
|
6
|
+
|
|
7
|
+
readonly aborted: boolean;
|
|
8
|
+
|
|
9
|
+
onabort: AbortHandler | null;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface AbortController {
|
|
13
|
+
|
|
14
|
+
readonly signal: AbortSignal;
|
|
15
|
+
|
|
16
|
+
abort(): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Command } from "./command";
|
|
2
|
+
import { MiddlewareStack } from "./middleware";
|
|
3
|
+
import { MetadataBearer } from "./response";
|
|
4
|
+
|
|
5
|
+
interface InvokeFunction<InputTypes extends object, OutputTypes extends MetadataBearer, ResolvedClientConfiguration> {
|
|
6
|
+
<InputType extends InputTypes, OutputType extends OutputTypes>(command: Command<InputTypes, InputType, OutputTypes, OutputType, ResolvedClientConfiguration>, options?: any): Promise<OutputType>;
|
|
7
|
+
<InputType extends InputTypes, OutputType extends OutputTypes>(command: Command<InputTypes, InputType, OutputTypes, OutputType, ResolvedClientConfiguration>, options: any, cb: (err: any, data?: OutputType) => void): void;
|
|
8
|
+
<InputType extends InputTypes, OutputType extends OutputTypes>(command: Command<InputTypes, InputType, OutputTypes, OutputType, ResolvedClientConfiguration>, options?: any, cb?: (err: any, data?: OutputType) => void): Promise<OutputType> | void;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface Client<Input extends object, Output extends MetadataBearer, ResolvedClientConfiguration> {
|
|
12
|
+
readonly config: ResolvedClientConfiguration;
|
|
13
|
+
middlewareStack: MiddlewareStack<Input, Output>;
|
|
14
|
+
send: InvokeFunction<Input, Output, ResolvedClientConfiguration>;
|
|
15
|
+
destroy: () => void;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Handler, MiddlewareStack } from "./middleware";
|
|
2
|
+
import { MetadataBearer } from "./response";
|
|
3
|
+
export interface Command<ClientInput extends object, InputType extends ClientInput, ClientOutput extends MetadataBearer, OutputType extends ClientOutput, ResolvedConfiguration> {
|
|
4
|
+
readonly input: InputType;
|
|
5
|
+
readonly middlewareStack: MiddlewareStack<InputType, OutputType>;
|
|
6
|
+
resolveMiddleware(stack: MiddlewareStack<ClientInput, ClientOutput>, configuration: ResolvedConfiguration, options: any): Handler<InputType, OutputType>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Provider } from "./util";
|
|
2
|
+
|
|
3
|
+
export interface Credentials {
|
|
4
|
+
|
|
5
|
+
readonly accessKeyId: string;
|
|
6
|
+
|
|
7
|
+
readonly secretAccessKey: string;
|
|
8
|
+
|
|
9
|
+
readonly sessionToken?: string;
|
|
10
|
+
|
|
11
|
+
readonly expiration?: Date;
|
|
12
|
+
}
|
|
13
|
+
export declare type CredentialProvider = Provider<Credentials>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare type SourceData = string | ArrayBuffer | ArrayBufferView;
|
|
2
|
+
|
|
3
|
+
export interface Hash {
|
|
4
|
+
|
|
5
|
+
update(toHash: SourceData, encoding?: "utf8" | "ascii" | "latin1"): void;
|
|
6
|
+
|
|
7
|
+
digest(): Promise<Uint8Array>;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface HashConstructor {
|
|
11
|
+
new (secret?: SourceData): Hash;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface StreamHasher<StreamType = any> {
|
|
15
|
+
(hashCtor: HashConstructor, stream: StreamType): Promise<Uint8Array>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface randomValues {
|
|
19
|
+
(byteLength: number): Promise<Uint8Array>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { HttpRequest } from "./http";
|
|
2
|
+
import { FinalizeHandler, FinalizeHandlerArguments, FinalizeHandlerOutput, HandlerExecutionContext } from "./middleware";
|
|
3
|
+
import { MetadataBearer } from "./response";
|
|
4
|
+
|
|
5
|
+
export interface Message {
|
|
6
|
+
headers: MessageHeaders;
|
|
7
|
+
body: Uint8Array;
|
|
8
|
+
}
|
|
9
|
+
export interface MessageHeaders {
|
|
10
|
+
[name: string]: MessageHeaderValue;
|
|
11
|
+
}
|
|
12
|
+
export interface BooleanHeaderValue {
|
|
13
|
+
type: "boolean";
|
|
14
|
+
value: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface ByteHeaderValue {
|
|
17
|
+
type: "byte";
|
|
18
|
+
value: number;
|
|
19
|
+
}
|
|
20
|
+
export interface ShortHeaderValue {
|
|
21
|
+
type: "short";
|
|
22
|
+
value: number;
|
|
23
|
+
}
|
|
24
|
+
export interface IntegerHeaderValue {
|
|
25
|
+
type: "integer";
|
|
26
|
+
value: number;
|
|
27
|
+
}
|
|
28
|
+
export interface LongHeaderValue {
|
|
29
|
+
type: "long";
|
|
30
|
+
value: Int64;
|
|
31
|
+
}
|
|
32
|
+
export interface BinaryHeaderValue {
|
|
33
|
+
type: "binary";
|
|
34
|
+
value: Uint8Array;
|
|
35
|
+
}
|
|
36
|
+
export interface StringHeaderValue {
|
|
37
|
+
type: "string";
|
|
38
|
+
value: string;
|
|
39
|
+
}
|
|
40
|
+
export interface TimestampHeaderValue {
|
|
41
|
+
type: "timestamp";
|
|
42
|
+
value: Date;
|
|
43
|
+
}
|
|
44
|
+
export interface UuidHeaderValue {
|
|
45
|
+
type: "uuid";
|
|
46
|
+
value: string;
|
|
47
|
+
}
|
|
48
|
+
export declare type MessageHeaderValue = BooleanHeaderValue | ByteHeaderValue | ShortHeaderValue | IntegerHeaderValue | LongHeaderValue | BinaryHeaderValue | StringHeaderValue | TimestampHeaderValue | UuidHeaderValue;
|
|
49
|
+
export interface Int64 {
|
|
50
|
+
readonly bytes: Uint8Array;
|
|
51
|
+
valueOf: () => number;
|
|
52
|
+
toString: () => string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface EventStreamSerdeContext {
|
|
56
|
+
eventStreamMarshaller: EventStreamMarshaller;
|
|
57
|
+
}
|
|
58
|
+
export interface EventStreamMarshaller {
|
|
59
|
+
deserialize: (body: any, deserializer: (input: {
|
|
60
|
+
[event: string]: Message;
|
|
61
|
+
}) => any) => AsyncIterable<any>;
|
|
62
|
+
serialize: (input: AsyncIterable<any>, serializer: (event: any) => Message) => any;
|
|
63
|
+
}
|
|
64
|
+
export interface EventStreamRequestSigner {
|
|
65
|
+
sign(request: HttpRequest): Promise<HttpRequest>;
|
|
66
|
+
}
|
|
67
|
+
export interface EventStreamPayloadHandler {
|
|
68
|
+
handle: <Input extends object, Output extends MetadataBearer>(next: FinalizeHandler<Input, Output>, args: FinalizeHandlerArguments<Input>, context?: HandlerExecutionContext) => Promise<FinalizeHandlerOutput<Output>>;
|
|
69
|
+
}
|
|
70
|
+
export interface EventStreamPayloadHandlerProvider {
|
|
71
|
+
(options: any): EventStreamPayloadHandler;
|
|
72
|
+
}
|
|
73
|
+
export interface EventStreamSerdeProvider {
|
|
74
|
+
(options: any): EventStreamMarshaller;
|
|
75
|
+
}
|
|
76
|
+
export interface EventStreamSignerProvider {
|
|
77
|
+
(options: any): EventStreamRequestSigner;
|
|
78
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { AbortSignal } from "./abort";
|
|
2
|
+
|
|
3
|
+
export interface Headers extends Map<string, string> {
|
|
4
|
+
|
|
5
|
+
withHeader(headerName: string, headerValue: string): Headers;
|
|
6
|
+
|
|
7
|
+
withoutHeader(headerName: string): Headers;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface HeaderBag {
|
|
11
|
+
[key: string]: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface HttpMessage {
|
|
15
|
+
headers: HeaderBag;
|
|
16
|
+
body?: any;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface QueryParameterBag {
|
|
20
|
+
[key: string]: string | Array<string> | null;
|
|
21
|
+
}
|
|
22
|
+
export interface Endpoint {
|
|
23
|
+
protocol: string;
|
|
24
|
+
hostname: string;
|
|
25
|
+
port?: number;
|
|
26
|
+
path: string;
|
|
27
|
+
query?: QueryParameterBag;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface HttpRequest extends HttpMessage, Endpoint {
|
|
31
|
+
method: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface HttpResponse extends HttpMessage {
|
|
35
|
+
statusCode: number;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface ResolvedHttpResponse extends HttpResponse {
|
|
39
|
+
body: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface HttpHandlerOptions {
|
|
43
|
+
abortSignal?: AbortSignal;
|
|
44
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export * from "./abort";
|
|
2
|
+
export * from "./client";
|
|
3
|
+
export * from "./command";
|
|
4
|
+
export * from "./credentials";
|
|
5
|
+
export * from "./crypto";
|
|
6
|
+
export * from "./eventStream";
|
|
7
|
+
export * from "./http";
|
|
8
|
+
export * from "./logger";
|
|
9
|
+
export * from "./middleware";
|
|
10
|
+
export * from "./pagination";
|
|
11
|
+
export * from "./response";
|
|
12
|
+
export * from "./serde";
|
|
13
|
+
export * from "./shapes";
|
|
14
|
+
export * from "./signature";
|
|
15
|
+
export * from "./transfer";
|
|
16
|
+
export * from "./util";
|
|
17
|
+
export * from "./waiter";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
|
|
2
|
+
export declare type LogLevel = "all" | "log" | "info" | "warn" | "error" | "off";
|
|
3
|
+
|
|
4
|
+
export interface LoggerOptions {
|
|
5
|
+
logger?: Logger;
|
|
6
|
+
logLevel?: LogLevel;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface Logger {
|
|
10
|
+
debug(content: object): void;
|
|
11
|
+
info(content: object): void;
|
|
12
|
+
warn(content: object): void;
|
|
13
|
+
error(content: object): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { Logger } from "./logger";
|
|
2
|
+
import { UserAgent } from "./util";
|
|
3
|
+
export interface InitializeHandlerArguments<Input extends object> {
|
|
4
|
+
|
|
5
|
+
input: Input;
|
|
6
|
+
}
|
|
7
|
+
export interface InitializeHandlerOutput<Output extends object> extends DeserializeHandlerOutput<Output> {
|
|
8
|
+
output: Output;
|
|
9
|
+
}
|
|
10
|
+
export interface SerializeHandlerArguments<Input extends object> extends InitializeHandlerArguments<Input> {
|
|
11
|
+
|
|
12
|
+
request?: unknown;
|
|
13
|
+
}
|
|
14
|
+
export interface SerializeHandlerOutput<Output extends object> extends InitializeHandlerOutput<Output> {
|
|
15
|
+
}
|
|
16
|
+
export interface BuildHandlerArguments<Input extends object> extends FinalizeHandlerArguments<Input> {
|
|
17
|
+
}
|
|
18
|
+
export interface BuildHandlerOutput<Output extends object> extends InitializeHandlerOutput<Output> {
|
|
19
|
+
}
|
|
20
|
+
export interface FinalizeHandlerArguments<Input extends object> extends SerializeHandlerArguments<Input> {
|
|
21
|
+
|
|
22
|
+
request: unknown;
|
|
23
|
+
}
|
|
24
|
+
export interface FinalizeHandlerOutput<Output extends object> extends InitializeHandlerOutput<Output> {
|
|
25
|
+
}
|
|
26
|
+
export interface DeserializeHandlerArguments<Input extends object> extends FinalizeHandlerArguments<Input> {
|
|
27
|
+
}
|
|
28
|
+
export interface DeserializeHandlerOutput<Output extends object> {
|
|
29
|
+
|
|
30
|
+
response: unknown;
|
|
31
|
+
output?: Output;
|
|
32
|
+
}
|
|
33
|
+
export interface InitializeHandler<Input extends object, Output extends object> {
|
|
34
|
+
|
|
35
|
+
(args: InitializeHandlerArguments<Input>): Promise<InitializeHandlerOutput<Output>>;
|
|
36
|
+
}
|
|
37
|
+
export declare type Handler<Input extends object, Output extends object> = InitializeHandler<Input, Output>;
|
|
38
|
+
export interface SerializeHandler<Input extends object, Output extends object> {
|
|
39
|
+
|
|
40
|
+
(args: SerializeHandlerArguments<Input>): Promise<SerializeHandlerOutput<Output>>;
|
|
41
|
+
}
|
|
42
|
+
export interface FinalizeHandler<Input extends object, Output extends object> {
|
|
43
|
+
|
|
44
|
+
(args: FinalizeHandlerArguments<Input>): Promise<FinalizeHandlerOutput<Output>>;
|
|
45
|
+
}
|
|
46
|
+
export interface BuildHandler<Input extends object, Output extends object> {
|
|
47
|
+
(args: BuildHandlerArguments<Input>): Promise<BuildHandlerOutput<Output>>;
|
|
48
|
+
}
|
|
49
|
+
export interface DeserializeHandler<Input extends object, Output extends object> {
|
|
50
|
+
(args: DeserializeHandlerArguments<Input>): Promise<DeserializeHandlerOutput<Output>>;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface InitializeMiddleware<Input extends object, Output extends object> {
|
|
54
|
+
|
|
55
|
+
(next: InitializeHandler<Input, Output>, context: HandlerExecutionContext): InitializeHandler<Input, Output>;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface SerializeMiddleware<Input extends object, Output extends object> {
|
|
59
|
+
|
|
60
|
+
(next: SerializeHandler<Input, Output>, context: HandlerExecutionContext): SerializeHandler<Input, Output>;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface FinalizeRequestMiddleware<Input extends object, Output extends object> {
|
|
64
|
+
|
|
65
|
+
(next: FinalizeHandler<Input, Output>, context: HandlerExecutionContext): FinalizeHandler<Input, Output>;
|
|
66
|
+
}
|
|
67
|
+
export interface BuildMiddleware<Input extends object, Output extends object> {
|
|
68
|
+
(next: BuildHandler<Input, Output>, context: HandlerExecutionContext): BuildHandler<Input, Output>;
|
|
69
|
+
}
|
|
70
|
+
export interface DeserializeMiddleware<Input extends object, Output extends object> {
|
|
71
|
+
(next: DeserializeHandler<Input, Output>, context: HandlerExecutionContext): DeserializeHandler<Input, Output>;
|
|
72
|
+
}
|
|
73
|
+
export declare type MiddlewareType<Input extends object, Output extends object> = InitializeMiddleware<Input, Output> | SerializeMiddleware<Input, Output> | BuildMiddleware<Input, Output> | FinalizeRequestMiddleware<Input, Output> | DeserializeMiddleware<Input, Output>;
|
|
74
|
+
|
|
75
|
+
export interface Terminalware {
|
|
76
|
+
<Input extends object, Output extends object>(context: HandlerExecutionContext): DeserializeHandler<Input, Output>;
|
|
77
|
+
}
|
|
78
|
+
export declare type Step = "initialize" | "serialize" | "build" | "finalizeRequest" | "deserialize";
|
|
79
|
+
export declare type Priority = "high" | "normal" | "low";
|
|
80
|
+
export interface HandlerOptions {
|
|
81
|
+
|
|
82
|
+
step?: Step;
|
|
83
|
+
|
|
84
|
+
tags?: Array<string>;
|
|
85
|
+
|
|
86
|
+
name?: string;
|
|
87
|
+
|
|
88
|
+
override?: boolean;
|
|
89
|
+
}
|
|
90
|
+
export interface AbsoluteLocation {
|
|
91
|
+
|
|
92
|
+
priority?: Priority;
|
|
93
|
+
}
|
|
94
|
+
export declare type Relation = "before" | "after";
|
|
95
|
+
export interface RelativeLocation {
|
|
96
|
+
|
|
97
|
+
relation: Relation;
|
|
98
|
+
|
|
99
|
+
toMiddleware: string;
|
|
100
|
+
}
|
|
101
|
+
export declare type RelativeMiddlewareOptions = RelativeLocation & Pick<HandlerOptions, Exclude<keyof HandlerOptions, "step">>;
|
|
102
|
+
export interface InitializeHandlerOptions extends HandlerOptions {
|
|
103
|
+
step?: "initialize";
|
|
104
|
+
}
|
|
105
|
+
export interface SerializeHandlerOptions extends HandlerOptions {
|
|
106
|
+
step: "serialize";
|
|
107
|
+
}
|
|
108
|
+
export interface BuildHandlerOptions extends HandlerOptions {
|
|
109
|
+
step: "build";
|
|
110
|
+
}
|
|
111
|
+
export interface FinalizeRequestHandlerOptions extends HandlerOptions {
|
|
112
|
+
step: "finalizeRequest";
|
|
113
|
+
}
|
|
114
|
+
export interface DeserializeHandlerOptions extends HandlerOptions {
|
|
115
|
+
step: "deserialize";
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface MiddlewareStack<Input extends object, Output extends object> extends Pluggable<Input, Output> {
|
|
119
|
+
|
|
120
|
+
add(middleware: InitializeMiddleware<Input, Output>, options?: InitializeHandlerOptions & AbsoluteLocation): void;
|
|
121
|
+
|
|
122
|
+
add(middleware: SerializeMiddleware<Input, Output>, options: SerializeHandlerOptions & AbsoluteLocation): void;
|
|
123
|
+
|
|
124
|
+
add(middleware: BuildMiddleware<Input, Output>, options: BuildHandlerOptions & AbsoluteLocation): void;
|
|
125
|
+
|
|
126
|
+
add(middleware: FinalizeRequestMiddleware<Input, Output>, options: FinalizeRequestHandlerOptions & AbsoluteLocation): void;
|
|
127
|
+
|
|
128
|
+
add(middleware: DeserializeMiddleware<Input, Output>, options: DeserializeHandlerOptions & AbsoluteLocation): void;
|
|
129
|
+
|
|
130
|
+
addRelativeTo(middleware: MiddlewareType<Input, Output>, options: RelativeMiddlewareOptions): void;
|
|
131
|
+
|
|
132
|
+
use(pluggable: Pluggable<Input, Output>): void;
|
|
133
|
+
|
|
134
|
+
clone(): MiddlewareStack<Input, Output>;
|
|
135
|
+
|
|
136
|
+
remove(toRemove: MiddlewareType<Input, Output> | string): boolean;
|
|
137
|
+
|
|
138
|
+
removeByTag(toRemove: string): boolean;
|
|
139
|
+
|
|
140
|
+
concat<InputType extends Input, OutputType extends Output>(from: MiddlewareStack<InputType, OutputType>): MiddlewareStack<InputType, OutputType>;
|
|
141
|
+
|
|
142
|
+
resolve<InputType extends Input, OutputType extends Output>(handler: DeserializeHandler<InputType, OutputType>, context: HandlerExecutionContext): InitializeHandler<InputType, OutputType>;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export interface HandlerExecutionContext {
|
|
146
|
+
|
|
147
|
+
logger?: Logger;
|
|
148
|
+
|
|
149
|
+
userAgent?: UserAgent;
|
|
150
|
+
[key: string]: any;
|
|
151
|
+
}
|
|
152
|
+
export interface Pluggable<Input extends object, Output extends object> {
|
|
153
|
+
|
|
154
|
+
applyToStack: (stack: MiddlewareStack<Input, Output>) => void;
|
|
155
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface ResponseMetadata {
|
|
2
|
+
|
|
3
|
+
httpStatusCode?: number;
|
|
4
|
+
|
|
5
|
+
requestId?: string;
|
|
6
|
+
|
|
7
|
+
extendedRequestId?: string;
|
|
8
|
+
|
|
9
|
+
cfId?: string;
|
|
10
|
+
|
|
11
|
+
attempts?: number;
|
|
12
|
+
|
|
13
|
+
totalRetryDelay?: number;
|
|
14
|
+
}
|
|
15
|
+
export interface MetadataBearer {
|
|
16
|
+
|
|
17
|
+
$metadata: ResponseMetadata;
|
|
18
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Endpoint } from "./http";
|
|
2
|
+
import { RequestHandler } from "./transfer";
|
|
3
|
+
import { Decoder, Encoder, Provider } from "./util";
|
|
4
|
+
|
|
5
|
+
export interface EndpointBearer {
|
|
6
|
+
endpoint: Provider<Endpoint>;
|
|
7
|
+
}
|
|
8
|
+
export interface StreamCollector {
|
|
9
|
+
|
|
10
|
+
(stream: any): Promise<Uint8Array>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface SerdeContext extends EndpointBearer {
|
|
14
|
+
base64Encoder: Encoder;
|
|
15
|
+
base64Decoder: Decoder;
|
|
16
|
+
utf8Encoder: Encoder;
|
|
17
|
+
utf8Decoder: Decoder;
|
|
18
|
+
streamCollector: StreamCollector;
|
|
19
|
+
requestHandler: RequestHandler<any, any>;
|
|
20
|
+
disableHostPrefix: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface RequestSerializer<Request, Context extends EndpointBearer = any> {
|
|
23
|
+
|
|
24
|
+
(input: any, context: Context): Promise<Request>;
|
|
25
|
+
}
|
|
26
|
+
export interface ResponseDeserializer<OutputType, ResponseType = any, Context = any> {
|
|
27
|
+
|
|
28
|
+
(output: ResponseType, context: Context): Promise<OutputType>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { HttpResponse } from "./http";
|
|
2
|
+
import { MetadataBearer } from "./response";
|
|
3
|
+
|
|
4
|
+
export declare type DocumentType = null | boolean | number | string | DocumentType[] | {
|
|
5
|
+
[prop: string]: DocumentType;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export interface RetryableTrait {
|
|
9
|
+
|
|
10
|
+
readonly throttling?: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface SmithyException {
|
|
14
|
+
|
|
15
|
+
readonly name: string;
|
|
16
|
+
|
|
17
|
+
readonly $fault: "client" | "server";
|
|
18
|
+
|
|
19
|
+
readonly $service?: string;
|
|
20
|
+
|
|
21
|
+
readonly $retryable?: RetryableTrait;
|
|
22
|
+
|
|
23
|
+
readonly $response?: HttpResponse;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export declare type SdkError = Error & Partial<SmithyException> & Partial<MetadataBearer>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { HttpRequest } from "./http";
|
|
2
|
+
|
|
3
|
+
export declare type DateInput = number | string | Date;
|
|
4
|
+
export interface SigningArguments {
|
|
5
|
+
|
|
6
|
+
signingDate?: DateInput;
|
|
7
|
+
|
|
8
|
+
signingService?: string;
|
|
9
|
+
|
|
10
|
+
signingRegion?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface RequestSigningArguments extends SigningArguments {
|
|
13
|
+
|
|
14
|
+
unsignableHeaders?: Set<string>;
|
|
15
|
+
|
|
16
|
+
signableHeaders?: Set<string>;
|
|
17
|
+
}
|
|
18
|
+
export interface RequestPresigningArguments extends RequestSigningArguments {
|
|
19
|
+
|
|
20
|
+
expiresIn?: number;
|
|
21
|
+
|
|
22
|
+
unhoistableHeaders?: Set<string>;
|
|
23
|
+
}
|
|
24
|
+
export interface EventSigningArguments extends SigningArguments {
|
|
25
|
+
priorSignature: string;
|
|
26
|
+
}
|
|
27
|
+
export interface RequestPresigner {
|
|
28
|
+
|
|
29
|
+
presign(requestToSign: HttpRequest, options?: RequestPresigningArguments): Promise<HttpRequest>;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface RequestSigner {
|
|
33
|
+
|
|
34
|
+
sign(requestToSign: HttpRequest, options?: RequestSigningArguments): Promise<HttpRequest>;
|
|
35
|
+
}
|
|
36
|
+
export interface StringSigner {
|
|
37
|
+
|
|
38
|
+
sign(stringToSign: string, options?: SigningArguments): Promise<string>;
|
|
39
|
+
}
|
|
40
|
+
export interface FormattedEvent {
|
|
41
|
+
headers: Uint8Array;
|
|
42
|
+
payload: Uint8Array;
|
|
43
|
+
}
|
|
44
|
+
export interface EventSigner {
|
|
45
|
+
|
|
46
|
+
sign(event: FormattedEvent, options: EventSigningArguments): Promise<string>;
|
|
47
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare type RequestHandlerOutput<ResponseType> = {
|
|
2
|
+
response: ResponseType;
|
|
3
|
+
};
|
|
4
|
+
export interface RequestHandler<RequestType, ResponseType, HandlerOptions = {}> {
|
|
5
|
+
|
|
6
|
+
metadata?: RequestHandlerMetadata;
|
|
7
|
+
destroy?: () => void;
|
|
8
|
+
handle: (request: RequestType, handlerOptions?: HandlerOptions) => Promise<RequestHandlerOutput<ResponseType>>;
|
|
9
|
+
}
|
|
10
|
+
export interface RequestHandlerMetadata {
|
|
11
|
+
handlerProtocol: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Endpoint } from "./http";
|
|
2
|
+
import { FinalizeHandler, FinalizeHandlerArguments, FinalizeHandlerOutput } from "./middleware";
|
|
3
|
+
import { MetadataBearer } from "./response";
|
|
4
|
+
|
|
5
|
+
export interface Encoder {
|
|
6
|
+
(input: Uint8Array): string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface Decoder {
|
|
10
|
+
(input: string): Uint8Array;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface Provider<T> {
|
|
14
|
+
(): Promise<T>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface BodyLengthCalculator {
|
|
18
|
+
(body: any): number | undefined;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface RetryStrategy {
|
|
22
|
+
|
|
23
|
+
mode?: string;
|
|
24
|
+
|
|
25
|
+
retry: <Input extends object, Output extends MetadataBearer>(next: FinalizeHandler<Input, Output>, args: FinalizeHandlerArguments<Input>) => Promise<FinalizeHandlerOutput<Output>>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface UrlParser {
|
|
29
|
+
(url: string): Endpoint;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface RegionInfo {
|
|
33
|
+
hostname: string;
|
|
34
|
+
partition: string;
|
|
35
|
+
path?: string;
|
|
36
|
+
signingService?: string;
|
|
37
|
+
signingRegion?: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface RegionInfoProviderOptions {
|
|
41
|
+
|
|
42
|
+
useDualstackEndpoint: boolean;
|
|
43
|
+
|
|
44
|
+
useFipsEndpoint: boolean;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface RegionInfoProvider {
|
|
48
|
+
(region: string, options?: RegionInfoProviderOptions): Promise<RegionInfo | undefined>;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export declare type UserAgentPair = [
|
|
52
|
+
string,
|
|
53
|
+
string
|
|
54
|
+
];
|
|
55
|
+
|
|
56
|
+
export declare type UserAgent = UserAgentPair[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AbortController } from "./abort";
|
|
2
|
+
export interface WaiterConfiguration<Client> {
|
|
3
|
+
|
|
4
|
+
client: Client;
|
|
5
|
+
|
|
6
|
+
maxWaitTime: number;
|
|
7
|
+
|
|
8
|
+
abortController?: AbortController;
|
|
9
|
+
|
|
10
|
+
abortSignal?: AbortController["signal"];
|
|
11
|
+
|
|
12
|
+
minDelay?: number;
|
|
13
|
+
|
|
14
|
+
maxDelay?: number;
|
|
15
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/types",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.52.0",
|
|
4
4
|
"main": "./dist-cjs/index.js",
|
|
5
5
|
"module": "./dist-es/index.js",
|
|
6
6
|
"types": "./dist-types/index.d.ts",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"build:es": "tsc -p tsconfig.es.json",
|
|
12
12
|
"build:types": "tsc -p tsconfig.types.json",
|
|
13
13
|
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
|
|
14
|
-
"clean": "rimraf ./dist-*",
|
|
14
|
+
"clean": "rimraf ./dist-* && rimraf *.tsbuildinfo",
|
|
15
15
|
"test": "exit 0"
|
|
16
16
|
},
|
|
17
17
|
"author": {
|