Skip to content

Commit 885a226

Browse files
committed
chore: resolve merging conflicts
1 parent c01c845 commit 885a226

File tree

14 files changed

+330
-671
lines changed

14 files changed

+330
-671
lines changed

clients/node/client-rds-data-node/RDSDataConfiguration.ts

Lines changed: 95 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,116 @@
1-
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
2-
import { Hash } from "@aws-sdk/hash-node";
3-
import { NodeHttpHandler } from "@aws-sdk/node-http-handler";
4-
import { defaultProvider as regionDefaultProvider } from "@aws-sdk/region-provider";
5-
import { parseUrl } from "@aws-sdk/url-parser-node";
6-
import { calculateBodyLength } from "@aws-sdk/util-body-length-node";
7-
import { streamCollector } from "@aws-sdk/stream-collector-node";
8-
import { RestJsonProtocol } from "@aws-sdk/protocol-rest-json";
9-
import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node";
10-
import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
11-
import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
121
import { AwsAuth, AwsAuthInput } from "@aws-sdk/middleware-signing";
132
import { UserAgent, UserAgentInput } from "@aws-sdk/middleware-user-agent";
143
import { Retry, RetryInput } from "@aws-sdk/middleware-retry";
15-
import { name, version } from "./package.json";
164
import {
175
Region,
186
RegionInput,
197
Endpoints,
208
EndpointsInput,
219
ClientProtocol,
22-
ClientProtocolInput,
23-
AWSClientRuntimeConfiguration
10+
ClientProtocolInput
2411
} from "@aws-sdk/config-resolver";
12+
import {
13+
Credentials,
14+
Provider,
15+
HashConstructor,
16+
UrlParser,
17+
Protocol,
18+
StreamCollector,
19+
Decoder,
20+
Encoder
21+
} from "@aws-sdk/types";
22+
import { HttpHandler, HttpRequest, HttpResponse } from "@aws-sdk/protocol-http";
23+
24+
export interface RDSDataRuntimeDependencies {
25+
/**
26+
* The HTTP handler to use. Fetch in browser and Https in Nodejs
27+
*/
28+
httpHandler?: HttpHandler;
29+
30+
/**
31+
* A constructor for a class implementing the @aws-sdk/types.Hash interface that computes the SHA-256 HMAC or checksum of a string or binary buffer
32+
*/
33+
sha256?: HashConstructor;
34+
35+
/**
36+
* Default credentials provider; Not available in browser runtime
37+
*/
38+
credentialDefaultProvider?: (input: any) => Provider<Credentials>;
39+
40+
/**
41+
* Provider function that return promise of a region string
42+
*/
43+
regionDefaultProvider?: (input: any) => Provider<string>;
44+
45+
/**
46+
* The function that will be used to convert strings into HTTP endpoints
47+
*/
48+
urlParser?: UrlParser;
49+
50+
/**
51+
* A function that can calculate the length of a request body.
52+
*/
53+
bodyLengthChecker?: (body: any) => number | undefined;
54+
55+
/**
56+
* A function that converts a stream into an array of bytes.
57+
*/
58+
streamCollector?: StreamCollector;
59+
60+
/**
61+
* The function that will be used to convert a base64-encoded string to a byte array
62+
*/
63+
base64Decoder?: Decoder;
64+
65+
/**
66+
* The function that will be used to convert binary data to a base64-encoded string
67+
*/
68+
base64Encoder?: Encoder;
69+
70+
/**
71+
* The function that will be used to convert a UTF8-encoded string to a byte array
72+
*/
73+
utf8Decoder?: Decoder;
74+
75+
/**
76+
* The function that will be used to convert binary data to a UTF-8 encoded string
77+
*/
78+
utf8Encoder?: Encoder;
79+
80+
/**
81+
* The function that will be used to populate default value in 'User-Agent' header
82+
*/
83+
defaultUserAgent?: string;
84+
85+
/**
86+
* The function that will be used to populate serializing protocol
87+
*/
88+
protocolDefaultProvider?: (
89+
handler: HttpHandler
90+
) => Protocol<HttpRequest, HttpResponse>;
91+
92+
/**
93+
* The service name with which to sign requests.
94+
*/
95+
signingName?: string;
96+
97+
/**
98+
* The service name with which to construct endpoints.
99+
*/
100+
service?: string;
101+
}
25102

26-
export type AWSClientRuntimeResolvedConfiguration = Required<
27-
AWSClientRuntimeConfiguration
28-
>;
29-
30-
export const RDSRuntimeConfiguration: AWSClientRuntimeResolvedConfiguration = {
31-
protocolDefaultProvider: handler => new RestJsonProtocol(handler),
32-
signingName: "rds-data",
33-
service: "rds-data",
34-
httpHandler: new NodeHttpHandler(),
35-
sha256: Hash.bind(null, "sha256"),
36-
credentialDefaultProvider,
37-
regionDefaultProvider,
38-
urlParser: parseUrl,
39-
bodyLengthChecker: calculateBodyLength,
40-
streamCollector,
41-
base64Decoder: fromBase64,
42-
base64Encoder: toBase64,
43-
utf8Decoder: fromUtf8,
44-
utf8Encoder: toUtf8,
45-
defaultUserAgent: defaultUserAgent(name, version)
46-
};
47-
48-
export type RDSDataConfiguration = AWSClientRuntimeConfiguration &
103+
export type RDSDataConfiguration = RDSDataRuntimeDependencies &
49104
AwsAuthInput &
50105
RegionInput &
51106
RetryInput &
52107
EndpointsInput &
53108
ClientProtocolInput &
54109
UserAgentInput;
55110

56-
export type RDSDataResolvedConfiguration = AWSClientRuntimeResolvedConfiguration &
111+
export type RDSDataResolvedConfiguration = Required<
112+
RDSDataRuntimeDependencies
113+
> &
57114
AwsAuth.Resolved &
58115
Region.Resolved &
59116
Retry.Resolved &

clients/node/client-rds-data-node/RdsDataServiceClient.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,13 @@ import {
1212
RollbackTransactionRequest,
1313
RollbackTransactionResponse
1414
} from "./models/index";
15-
import {
16-
Endpoints,
17-
ClientProtocol,
18-
Region,
19-
AWSClientRuntimeConfiguration
20-
} from "@aws-sdk/config-resolver";
15+
import { Endpoints, ClientProtocol, Region } from "@aws-sdk/config-resolver";
2116
import { ContentLength } from "@aws-sdk/middleware-content-length";
2217
import { UserAgent } from "@aws-sdk/middleware-user-agent";
2318
import { Retry } from "@aws-sdk/middleware-retry";
2419
import { AwsAuth } from "@aws-sdk/middleware-signing";
25-
import { RDSRuntimeConfiguration } from "./RDSDataConfiguration";
20+
import { RDSDataRuntimeDependencies } from "./RDSDataConfiguration";
21+
import { RDSRuntimeConfiguration } from "./runtimeConfig";
2622
import {
2723
Client as SmithyClient,
2824
SmithyConfiguration,
@@ -61,7 +57,7 @@ export type RdsDataServiceResolvedConfig = SmithyResolvedConfiguration<
6157
Endpoints.Resolved &
6258
Retry.Resolved &
6359
UserAgent.Resolved &
64-
Required<AWSClientRuntimeConfiguration>;
60+
Required<RDSDataRuntimeDependencies>;
6561

6662
export class RdsDataService extends SmithyClient<
6763
__HttpOptions,

clients/node/client-rds-data-node/commands/ExecuteStatementCommand.ts

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ import {
1111
import { RDSDataResolvedConfiguration } from "../RDSDataConfiguration";
1212
import { HttpRequest, HttpResponse } from "@aws-sdk/protocol-http";
1313
import {
14-
ExecuteStatementRequest,
15-
ExecuteStatementResponse
16-
} from "../models/index";
14+
executeStatementAwsRestJson1_1Serialize,
15+
executeStatementAwsRestJson1_1Deserialize
16+
} from "../protocol/AwsRestJson1_1";
17+
import { ExecuteStatementRequest, ExecuteStatementResponse } from "../models";
1718

1819
type InputTypesUnion = any;
1920
type OutputTypesUnion = any;
@@ -35,13 +36,7 @@ export class ExecuteStatementCommand extends Command<
3536
protocol: { handler }
3637
} = configuration;
3738

38-
this.use(
39-
serdePlugin(
40-
configuration,
41-
executeStatementSerializer,
42-
executeStatementDeserializer
43-
)
44-
);
39+
this.use(serdePlugin(configuration, this.serialize, this.deserialize));
4540

4641
const stack = clientStack.concat(this.middlewareStack);
4742

0 commit comments

Comments
 (0)