1
1
import * as __aws_sdk_core_handler from "@aws-sdk/core-handler" ;
2
2
import * as __aws_sdk_credential_provider_node from "@aws-sdk/credential-provider-node" ;
3
3
import * as __aws_sdk_hash_node from "@aws-sdk/hash-node" ;
4
- import * as __aws_sdk_json_builder from "@aws-sdk/json-builder" ;
5
4
import * as __aws_sdk_json_error_unmarshaller from "@aws-sdk/json-error-unmarshaller" ;
6
5
import * as __aws_sdk_json_parser from "@aws-sdk/json-parser" ;
7
6
import * as __aws_sdk_middleware_serializer from "@aws-sdk/middleware-serializer" ;
8
7
import * as __aws_sdk_node_http_handler from "@aws-sdk/node-http-handler" ;
9
- import * as __aws_sdk_protocol_rest from "@aws-sdk/protocol-rest" ;
10
8
import * as __aws_sdk_region_provider from "@aws-sdk/region-provider" ;
11
9
import * as __aws_sdk_signature_v4 from "@aws-sdk/signature-v4" ;
12
10
import * as __aws_sdk_signing_middleware from "@aws-sdk/signing-middleware" ;
13
- import * as __aws_sdk_stream_collector_node from "@aws-sdk/stream-collector-node" ;
14
11
import * as __aws_sdk_types from "@aws-sdk/types" ;
15
12
import * as __aws_sdk_url_parser_node from "@aws-sdk/url-parser-node" ;
16
- import * as __aws_sdk_util_base64_node from "@aws-sdk/util-base64-node" ;
17
13
import * as __aws_sdk_util_body_length_node from "@aws-sdk/util-body-length-node" ;
18
- import * as __aws_sdk_util_utf8_node from "@aws-sdk/util-utf8-node " ;
19
- import * as _stream from "stream " ;
20
- import { OutputTypesUnion } from "./types/OutputTypesUnion " ;
14
+ import { Protocol , TransferHandler } from "@aws-sdk/types " ;
15
+ import { HttpRequest , HttpResponse , HttpHandler } from "@aws-sdk/protocol-http " ;
16
+ import { RestJsonProtocol } from "@aws-sdk/protocol-rest-json " ;
21
17
22
18
export interface RDSDataConfiguration {
23
- /**
24
- * The function that will be used to convert a base64-encoded string to a byte array
25
- */
26
- base64Decoder ?: __aws_sdk_types . Decoder ;
27
-
28
- /**
29
- * The function that will be used to convert binary data to a base64-encoded string
30
- */
31
- base64Encoder ?: __aws_sdk_types . Encoder ;
32
-
33
19
/**
34
20
* The credentials used to sign requests.
35
21
*
36
22
* If no static credentials are supplied, the SDK will attempt to credentials from known environment variables, from shared configuration and credentials files, and from the EC2 Instance Metadata Service, in that order.
37
23
*/
38
24
credentials ?:
39
- | __aws_sdk_types . Credentials
40
- | __aws_sdk_types . Provider < __aws_sdk_types . Credentials > ;
25
+ | __aws_sdk_types . Credentials
26
+ | __aws_sdk_types . Provider < __aws_sdk_types . Credentials > ;
41
27
42
28
/**
43
29
* A function that determines how long (in milliseconds) the SDK should wait before retrying a request
@@ -48,24 +34,19 @@ export interface RDSDataConfiguration {
48
34
* The fully qualified endpoint of the webservice. This is only required when using a custom endpoint (for example, when using a local version of S3).
49
35
*/
50
36
endpoint ?:
51
- | string
52
- | __aws_sdk_types . HttpEndpoint
53
- | __aws_sdk_types . Provider < __aws_sdk_types . HttpEndpoint > ;
37
+ | string
38
+ | __aws_sdk_types . HttpEndpoint
39
+ | __aws_sdk_types . Provider < __aws_sdk_types . HttpEndpoint > ;
54
40
55
41
/**
56
42
* The endpoint provider to call if no endpoint is provided
57
43
*/
58
44
endpointProvider ?: any ;
59
45
60
- /**
61
- * The handler to use as the core of the client's middleware stack
62
- */
63
- handler ?: __aws_sdk_types . Terminalware < any , _stream . Readable > ;
64
-
65
46
/**
66
47
* The HTTP handler to use
67
48
*/
68
- httpHandler ?: __aws_sdk_types . HttpHandler < _stream . Readable > ;
49
+ httpHandler ?: HttpHandler ;
69
50
70
51
/**
71
52
* Whether sockets should be kept open even when there are no outstanding requests so that future requests can forgo having to reestablish a TCP or TLS connection. Defaults to true.
@@ -117,25 +98,15 @@ export interface RDSDataConfiguration {
117
98
*/
118
99
sslEnabled ?: boolean ;
119
100
120
- /**
121
- * A function that converts a stream into an array of bytes.
122
- */
123
- streamCollector ?: __aws_sdk_types . StreamCollector < _stream . Readable > ;
124
-
125
101
/**
126
102
* The function that will be used to convert strings into HTTP endpoints
127
103
*/
128
104
urlParser ?: __aws_sdk_types . UrlParser ;
129
105
130
106
/**
131
- * The function that will be used to convert a UTF8-encoded string to a byte array
132
- */
133
- utf8Decoder ?: __aws_sdk_types . Decoder ;
134
-
135
- /**
136
- * The function that will be used to convert binary data to a UTF-8 encoded string
107
+ *
137
108
*/
138
- utf8Encoder ?: __aws_sdk_types . Encoder ;
109
+ protocol ?: Protocol < any , any > ;
139
110
}
140
111
141
112
export interface RDSDataResolvableConfiguration extends RDSDataConfiguration {
@@ -148,32 +119,12 @@ export interface RDSDataResolvableConfiguration extends RDSDataConfiguration {
148
119
* A function that can calculate the length of a request body.
149
120
*/
150
121
bodyLengthChecker : ( body : any ) => number | undefined ;
151
-
152
- /**
153
- * The parser to use when converting HTTP responses to SDK output types
154
- */
155
- parser : __aws_sdk_types . ResponseParser < _stream . Readable > ;
156
-
157
- /**
158
- * The serializer to use when converting SDK input to HTTP requests
159
- */
160
- serializer : __aws_sdk_types . Provider <
161
- __aws_sdk_types . RequestSerializer < _stream . Readable >
162
- > ;
163
122
}
164
123
165
124
export interface RDSDataResolvedConfiguration
166
- extends RDSDataConfiguration ,
167
- __aws_sdk_types . ClientResolvedConfigurationBase <
168
- OutputTypesUnion ,
169
- _stream . Readable
170
- > {
125
+ extends RDSDataConfiguration {
171
126
_user_injected_http_handler : boolean ;
172
127
173
- base64Decoder : __aws_sdk_types . Decoder ;
174
-
175
- base64Encoder : __aws_sdk_types . Encoder ;
176
-
177
128
bodyLengthChecker : ( body : any ) => number | undefined ;
178
129
179
130
credentials : __aws_sdk_types . Provider < __aws_sdk_types . Credentials > ;
@@ -182,24 +133,16 @@ export interface RDSDataResolvedConfiguration
182
133
183
134
endpointProvider : any ;
184
135
185
- handler : __aws_sdk_types . Terminalware < any , _stream . Readable > ;
186
-
187
- httpHandler : __aws_sdk_types . HttpHandler < _stream . Readable > ;
136
+ httpHandler : HttpHandler ;
188
137
189
138
keepAlive : boolean ;
190
139
191
140
maxRedirects : number ;
192
141
193
142
maxRetries : number ;
194
143
195
- parser : __aws_sdk_types . ResponseParser < _stream . Readable > ;
196
-
197
144
region : __aws_sdk_types . Provider < string > ;
198
145
199
- serializer : __aws_sdk_types . Provider <
200
- __aws_sdk_types . RequestSerializer < _stream . Readable >
201
- > ;
202
-
203
146
sha256 : __aws_sdk_types . HashConstructor ;
204
147
205
148
signer : __aws_sdk_types . RequestSigner ;
@@ -208,13 +151,9 @@ export interface RDSDataResolvedConfiguration
208
151
209
152
sslEnabled : boolean ;
210
153
211
- streamCollector : __aws_sdk_types . StreamCollector < _stream . Readable > ;
212
-
213
154
urlParser : __aws_sdk_types . UrlParser ;
214
155
215
- utf8Decoder : __aws_sdk_types . Decoder ;
216
-
217
- utf8Encoder : __aws_sdk_types . Encoder ;
156
+ protocol : Protocol < any , any > ;
218
157
}
219
158
220
159
export const configurationProperties : __aws_sdk_types . ConfigurationDefinition <
@@ -292,58 +231,6 @@ export const configurationProperties: __aws_sdk_types.ConfigurationDefinition<
292
231
return value ! ;
293
232
}
294
233
} ,
295
- base64Decoder : {
296
- defaultValue : __aws_sdk_util_base64_node . fromBase64
297
- } ,
298
- base64Encoder : {
299
- defaultValue : __aws_sdk_util_base64_node . toBase64
300
- } ,
301
- utf8Decoder : {
302
- defaultValue : __aws_sdk_util_utf8_node . fromUtf8
303
- } ,
304
- utf8Encoder : {
305
- defaultValue : __aws_sdk_util_utf8_node . toUtf8
306
- } ,
307
- streamCollector : {
308
- defaultValue : __aws_sdk_stream_collector_node . streamCollector
309
- } ,
310
- serializer : {
311
- defaultProvider : ( configuration : {
312
- base64Encoder : __aws_sdk_types . Encoder ;
313
- endpoint : __aws_sdk_types . Provider < __aws_sdk_types . HttpEndpoint > ;
314
- utf8Decoder : __aws_sdk_types . Decoder ;
315
- } ) => {
316
- const promisified = configuration
317
- . endpoint ( )
318
- . then (
319
- endpoint =>
320
- new __aws_sdk_protocol_rest . RestSerializer < _stream . Readable > (
321
- endpoint ,
322
- new __aws_sdk_json_builder . JsonBuilder (
323
- configuration . base64Encoder ,
324
- configuration . utf8Decoder
325
- ) ,
326
- configuration . base64Encoder ,
327
- configuration . utf8Decoder
328
- )
329
- ) ;
330
- return ( ) => promisified ;
331
- }
332
- } ,
333
- parser : {
334
- defaultProvider : ( configuration : {
335
- base64Decoder : __aws_sdk_types . Decoder ;
336
- streamCollector : __aws_sdk_types . StreamCollector < _stream . Readable > ;
337
- utf8Encoder : __aws_sdk_types . Encoder ;
338
- } ) =>
339
- new __aws_sdk_protocol_rest . RestParser < _stream . Readable > (
340
- new __aws_sdk_json_parser . JsonParser ( configuration . base64Decoder ) ,
341
- configuration . streamCollector ,
342
- __aws_sdk_json_error_unmarshaller . jsonErrorUnmarshaller ,
343
- configuration . utf8Encoder ,
344
- configuration . base64Decoder
345
- )
346
- } ,
347
234
keepAlive : {
348
235
defaultValue : true
349
236
} ,
@@ -355,16 +242,6 @@ export const configurationProperties: __aws_sdk_types.ConfigurationDefinition<
355
242
defaultProvider : ( configuration : { keepAlive : boolean } ) =>
356
243
new __aws_sdk_node_http_handler . NodeHttpHandler ( configuration )
357
244
} ,
358
- handler : {
359
- defaultProvider : ( configuration : {
360
- httpHandler : __aws_sdk_types . HttpHandler < _stream . Readable > ;
361
- parser : __aws_sdk_types . ResponseParser < _stream . Readable > ;
362
- } ) =>
363
- __aws_sdk_core_handler . coreHandler < OutputTypesUnion , _stream . Readable > (
364
- configuration . httpHandler ,
365
- configuration . parser
366
- )
367
- } ,
368
245
bodyLengthChecker : {
369
246
defaultValue : __aws_sdk_util_body_length_node . calculateBodyLength
370
247
} ,
@@ -406,5 +283,13 @@ export const configurationProperties: __aws_sdk_types.ConfigurationDefinition<
406
283
sha256 : configuration . sha256 ,
407
284
uriEscapePath : true
408
285
} )
286
+ } ,
287
+ protocol : {
288
+ defaultProvider : ( configuration : {
289
+ httpHandler : TransferHandler <
290
+ HttpRequest ,
291
+ HttpResponse
292
+ > ;
293
+ } ) => new RestJsonProtocol ( configuration . httpHandler )
409
294
}
410
295
} ;
0 commit comments