@aws-sdk/types 3.162.0 → 3.170.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.
@@ -1,155 +1,226 @@
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
- }
1
+ import { Logger } from "./logger";
2
+ import { UserAgent } from "./util";
3
+ export interface InitializeHandlerArguments<Input extends object> {
4
+ input: Input;
5
+ }
6
+ export interface InitializeHandlerOutput<Output extends object>
7
+ extends DeserializeHandlerOutput<Output> {
8
+ output: Output;
9
+ }
10
+ export interface SerializeHandlerArguments<Input extends object>
11
+ extends InitializeHandlerArguments<Input> {
12
+ request?: unknown;
13
+ }
14
+ export interface SerializeHandlerOutput<Output extends object>
15
+ extends InitializeHandlerOutput<Output> {}
16
+ export interface BuildHandlerArguments<Input extends object>
17
+ extends FinalizeHandlerArguments<Input> {}
18
+ export interface BuildHandlerOutput<Output extends object>
19
+ extends InitializeHandlerOutput<Output> {}
20
+ export interface FinalizeHandlerArguments<Input extends object>
21
+ extends SerializeHandlerArguments<Input> {
22
+ request: unknown;
23
+ }
24
+ export interface FinalizeHandlerOutput<Output extends object>
25
+ extends InitializeHandlerOutput<Output> {}
26
+ export interface DeserializeHandlerArguments<Input extends object>
27
+ extends FinalizeHandlerArguments<Input> {}
28
+ export interface DeserializeHandlerOutput<Output extends object> {
29
+ response: unknown;
30
+ output?: Output;
31
+ }
32
+ export interface InitializeHandler<
33
+ Input extends object,
34
+ Output extends object
35
+ > {
36
+ (args: InitializeHandlerArguments<Input>): Promise<
37
+ InitializeHandlerOutput<Output>
38
+ >;
39
+ }
40
+ export declare type Handler<
41
+ Input extends object,
42
+ Output extends object
43
+ > = InitializeHandler<Input, Output>;
44
+ export interface SerializeHandler<Input extends object, Output extends object> {
45
+ (args: SerializeHandlerArguments<Input>): Promise<
46
+ SerializeHandlerOutput<Output>
47
+ >;
48
+ }
49
+ export interface FinalizeHandler<Input extends object, Output extends object> {
50
+ (args: FinalizeHandlerArguments<Input>): Promise<
51
+ FinalizeHandlerOutput<Output>
52
+ >;
53
+ }
54
+ export interface BuildHandler<Input extends object, Output extends object> {
55
+ (args: BuildHandlerArguments<Input>): Promise<BuildHandlerOutput<Output>>;
56
+ }
57
+ export interface DeserializeHandler<
58
+ Input extends object,
59
+ Output extends object
60
+ > {
61
+ (args: DeserializeHandlerArguments<Input>): Promise<
62
+ DeserializeHandlerOutput<Output>
63
+ >;
64
+ }
65
+
66
+ export interface InitializeMiddleware<
67
+ Input extends object,
68
+ Output extends object
69
+ > {
70
+ (
71
+ next: InitializeHandler<Input, Output>,
72
+ context: HandlerExecutionContext
73
+ ): InitializeHandler<Input, Output>;
74
+ }
75
+
76
+ export interface SerializeMiddleware<
77
+ Input extends object,
78
+ Output extends object
79
+ > {
80
+ (
81
+ next: SerializeHandler<Input, Output>,
82
+ context: HandlerExecutionContext
83
+ ): SerializeHandler<Input, Output>;
84
+ }
85
+
86
+ export interface FinalizeRequestMiddleware<
87
+ Input extends object,
88
+ Output extends object
89
+ > {
90
+ (
91
+ next: FinalizeHandler<Input, Output>,
92
+ context: HandlerExecutionContext
93
+ ): FinalizeHandler<Input, Output>;
94
+ }
95
+ export interface BuildMiddleware<Input extends object, Output extends object> {
96
+ (
97
+ next: BuildHandler<Input, Output>,
98
+ context: HandlerExecutionContext
99
+ ): BuildHandler<Input, Output>;
100
+ }
101
+ export interface DeserializeMiddleware<
102
+ Input extends object,
103
+ Output extends object
104
+ > {
105
+ (
106
+ next: DeserializeHandler<Input, Output>,
107
+ context: HandlerExecutionContext
108
+ ): DeserializeHandler<Input, Output>;
109
+ }
110
+ export declare type MiddlewareType<
111
+ Input extends object,
112
+ Output extends object
113
+ > =
114
+ | InitializeMiddleware<Input, Output>
115
+ | SerializeMiddleware<Input, Output>
116
+ | BuildMiddleware<Input, Output>
117
+ | FinalizeRequestMiddleware<Input, Output>
118
+ | DeserializeMiddleware<Input, Output>;
119
+
120
+ export interface Terminalware {
121
+ <Input extends object, Output extends object>(
122
+ context: HandlerExecutionContext
123
+ ): DeserializeHandler<Input, Output>;
124
+ }
125
+ export declare type Step =
126
+ | "initialize"
127
+ | "serialize"
128
+ | "build"
129
+ | "finalizeRequest"
130
+ | "deserialize";
131
+ export declare type Priority = "high" | "normal" | "low";
132
+ export interface HandlerOptions {
133
+ step?: Step;
134
+
135
+ tags?: Array<string>;
136
+
137
+ name?: string;
138
+
139
+ override?: boolean;
140
+ }
141
+ export interface AbsoluteLocation {
142
+ priority?: Priority;
143
+ }
144
+ export declare type Relation = "before" | "after";
145
+ export interface RelativeLocation {
146
+ relation: Relation;
147
+
148
+ toMiddleware: string;
149
+ }
150
+ export declare type RelativeMiddlewareOptions = RelativeLocation &
151
+ Pick<HandlerOptions, Exclude<keyof HandlerOptions, "step">>;
152
+ export interface InitializeHandlerOptions extends HandlerOptions {
153
+ step?: "initialize";
154
+ }
155
+ export interface SerializeHandlerOptions extends HandlerOptions {
156
+ step: "serialize";
157
+ }
158
+ export interface BuildHandlerOptions extends HandlerOptions {
159
+ step: "build";
160
+ }
161
+ export interface FinalizeRequestHandlerOptions extends HandlerOptions {
162
+ step: "finalizeRequest";
163
+ }
164
+ export interface DeserializeHandlerOptions extends HandlerOptions {
165
+ step: "deserialize";
166
+ }
167
+
168
+ export interface MiddlewareStack<Input extends object, Output extends object>
169
+ extends Pluggable<Input, Output> {
170
+ add(
171
+ middleware: InitializeMiddleware<Input, Output>,
172
+ options?: InitializeHandlerOptions & AbsoluteLocation
173
+ ): void;
174
+
175
+ add(
176
+ middleware: SerializeMiddleware<Input, Output>,
177
+ options: SerializeHandlerOptions & AbsoluteLocation
178
+ ): void;
179
+
180
+ add(
181
+ middleware: BuildMiddleware<Input, Output>,
182
+ options: BuildHandlerOptions & AbsoluteLocation
183
+ ): void;
184
+
185
+ add(
186
+ middleware: FinalizeRequestMiddleware<Input, Output>,
187
+ options: FinalizeRequestHandlerOptions & AbsoluteLocation
188
+ ): void;
189
+
190
+ add(
191
+ middleware: DeserializeMiddleware<Input, Output>,
192
+ options: DeserializeHandlerOptions & AbsoluteLocation
193
+ ): void;
194
+
195
+ addRelativeTo(
196
+ middleware: MiddlewareType<Input, Output>,
197
+ options: RelativeMiddlewareOptions
198
+ ): void;
199
+
200
+ use(pluggable: Pluggable<Input, Output>): void;
201
+
202
+ clone(): MiddlewareStack<Input, Output>;
203
+
204
+ remove(toRemove: MiddlewareType<Input, Output> | string): boolean;
205
+
206
+ removeByTag(toRemove: string): boolean;
207
+
208
+ concat<InputType extends Input, OutputType extends Output>(
209
+ from: MiddlewareStack<InputType, OutputType>
210
+ ): MiddlewareStack<InputType, OutputType>;
211
+
212
+ resolve<InputType extends Input, OutputType extends Output>(
213
+ handler: DeserializeHandler<InputType, OutputType>,
214
+ context: HandlerExecutionContext
215
+ ): InitializeHandler<InputType, OutputType>;
216
+ }
217
+
218
+ export interface HandlerExecutionContext {
219
+ logger?: Logger;
220
+
221
+ userAgent?: UserAgent;
222
+ [key: string]: any;
223
+ }
224
+ export interface Pluggable<Input extends object, Output extends object> {
225
+ applyToStack: (stack: MiddlewareStack<Input, Output>) => void;
226
+ }
@@ -1,11 +1,11 @@
1
- import { Client } from "./client";
2
-
3
- export declare type Paginator<T> = AsyncGenerator<T, T, unknown>;
4
-
5
- export interface PaginationConfiguration {
6
- client: Client<any, any, any>;
7
- pageSize?: number;
8
- startingToken?: any;
9
-
10
- stopOnSameToken?: boolean;
11
- }
1
+ import { Client } from "./client";
2
+
3
+ export declare type Paginator<T> = AsyncGenerator<T, T, unknown>;
4
+
5
+ export interface PaginationConfiguration {
6
+ client: Client<any, any, any>;
7
+ pageSize?: number;
8
+ startingToken?: any;
9
+
10
+ stopOnSameToken?: boolean;
11
+ }
@@ -1,9 +1,8 @@
1
- export declare type IniSection = Record<string, string | undefined>;
2
-
3
- export interface Profile extends IniSection {
4
- }
5
- export declare type ParsedIniData = Record<string, IniSection>;
6
- export interface SharedConfigFiles {
7
- credentialsFile: ParsedIniData;
8
- configFile: ParsedIniData;
9
- }
1
+ export declare type IniSection = Record<string, string | undefined>;
2
+
3
+ export interface Profile extends IniSection {}
4
+ export declare type ParsedIniData = Record<string, IniSection>;
5
+ export interface SharedConfigFiles {
6
+ credentialsFile: ParsedIniData;
7
+ configFile: ParsedIniData;
8
+ }
@@ -1,18 +1,16 @@
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
- }
1
+ export interface ResponseMetadata {
2
+ httpStatusCode?: number;
3
+
4
+ requestId?: string;
5
+
6
+ extendedRequestId?: string;
7
+
8
+ cfId?: string;
9
+
10
+ attempts?: number;
11
+
12
+ totalRetryDelay?: number;
13
+ }
14
+ export interface MetadataBearer {
15
+ $metadata: ResponseMetadata;
16
+ }
@@ -1,42 +1,45 @@
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
- }
30
-
31
- declare global {
32
- export interface ReadableStream {
33
- }
34
- }
35
-
36
- export interface SdkStreamMixin {
37
- transformToByteArray: () => Promise<Uint8Array>;
38
- transformToString: (encoding?: string) => Promise<string>;
39
- transformToWebStream: () => ReadableStream;
40
- }
41
-
42
- export declare type SdkStream<BaseStream> = BaseStream & SdkStreamMixin;
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
+ (stream: any): Promise<Uint8Array>;
10
+ }
11
+
12
+ export interface SerdeContext extends EndpointBearer {
13
+ base64Encoder: Encoder;
14
+ base64Decoder: Decoder;
15
+ utf8Encoder: Encoder;
16
+ utf8Decoder: Decoder;
17
+ streamCollector: StreamCollector;
18
+ requestHandler: RequestHandler<any, any>;
19
+ disableHostPrefix: boolean;
20
+ }
21
+ export interface RequestSerializer<
22
+ Request,
23
+ Context extends EndpointBearer = any
24
+ > {
25
+ (input: any, context: Context): Promise<Request>;
26
+ }
27
+ export interface ResponseDeserializer<
28
+ OutputType,
29
+ ResponseType = any,
30
+ Context = any
31
+ > {
32
+ (output: ResponseType, context: Context): Promise<OutputType>;
33
+ }
34
+
35
+ declare global {
36
+ export interface ReadableStream {}
37
+ }
38
+
39
+ export interface SdkStreamMixin {
40
+ transformToByteArray: () => Promise<Uint8Array>;
41
+ transformToString: (encoding?: string) => Promise<string>;
42
+ transformToWebStream: () => ReadableStream;
43
+ }
44
+
45
+ export declare type SdkStream<BaseStream> = BaseStream & SdkStreamMixin;
@@ -1,26 +1,32 @@
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>;
1
+ import { HttpResponse } from "./http";
2
+ import { MetadataBearer } from "./response";
3
+
4
+ export declare type DocumentType =
5
+ | null
6
+ | boolean
7
+ | number
8
+ | string
9
+ | DocumentType[]
10
+ | {
11
+ [prop: string]: DocumentType;
12
+ };
13
+
14
+ export interface RetryableTrait {
15
+ readonly throttling?: boolean;
16
+ }
17
+
18
+ export interface SmithyException {
19
+ readonly name: string;
20
+
21
+ readonly $fault: "client" | "server";
22
+
23
+ readonly $service?: string;
24
+
25
+ readonly $retryable?: RetryableTrait;
26
+
27
+ readonly $response?: HttpResponse;
28
+ }
29
+
30
+ export declare type SdkError = Error &
31
+ Partial<SmithyException> &
32
+ Partial<MetadataBearer>;