Skip to content

Commit 2b77246

Browse files
authored
chore: add updated RDS DATA smithy model (#370)
* chore: add http request type guard for middlewares header default middleware expect continue middleare * chore: add http request type guard for apply body checksum middlewares * chore: only build and test demo smithy client * feat: add isInstance to httpResponse * chore: update rds data model * chore: update to ts3.7; update rds model#3 * chore: update tsconfig to genenerte types only once * chore: update gitignore * chore: parse body with streamCollector * chore: add error deserialization * chore: stub Field union * fix: fix middleware-header-default test * fix: fix retry-middleware unit test
1 parent 20081b7 commit 2b77246

File tree

34 files changed

+1354
-914
lines changed

34 files changed

+1354
-914
lines changed

clients/node/client-rds-data-node/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
/build/
33
/coverage/
44
/docs/
5+
/types/
6+
/dist/
57
*.tsbuildinfo
68
*.tgz
79
*.log

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { deserializerMiddleware } from "@aws-sdk/middleware-deserializer";
44
import * as __aws_sdk_types from "@aws-sdk/types";
55
import { RDSDataResolvedConfiguration } from "../RDSDataConfiguration";
66
import { HttpRequest } from '@aws-sdk/protocol-http';
7-
import { ExecuteStatementSerializer, ExecuteStatementDeserializer } from '../protocol'
7+
import { executeStatementSerializer, executeStatementDeserializer } from '../protocol/ExecuteStatement'
88
import { FinalizeHandlerArguments } from '@aws-sdk/types';
99

1010
/**
@@ -36,7 +36,7 @@ export class ExecuteStatementCommand {
3636
this.middlewareStack.add(
3737
serializerMiddleware(
3838
configuration.protocol,
39-
ExecuteStatementSerializer
39+
executeStatementSerializer
4040
),
4141
{
4242
step: "serialize",
@@ -45,9 +45,9 @@ export class ExecuteStatementCommand {
4545
}
4646
);
4747
this.middlewareStack.add(
48-
deserializerMiddleware(
48+
deserializerMiddleware<ExecuteStatementInput, ExecuteStatementOutput>(
4949
configuration.protocol,
50-
ExecuteStatementDeserializer
50+
executeStatementDeserializer
5151
) as any,
5252
{
5353
step: "deserialize",
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
export const TYPE = "__type";
2+
3+
/**
4+
* Checks if the given value is a Smithy structure of the given type.
5+
*/
6+
export function isa<T>(o: any, ...ids: string[]): o is T {
7+
return typeof o === "object" && TYPE in o && ids.indexOf(o[TYPE]) > -1;
8+
}
9+
10+
/**
11+
* Type that is implemented by all Smithy shapes marked with the
12+
* error trait.
13+
*/
14+
export interface SmithyException {
15+
/**
16+
* The shape ID of the exception.
17+
*/
18+
readonly __type: string;
19+
20+
/**
21+
* Whether the client or server are at fault.
22+
*/
23+
readonly $fault: "client" | "server";
24+
25+
/**
26+
* The name of the error.
27+
*/
28+
readonly $name: string;
29+
30+
/**
31+
* The service that encountered the exception.
32+
*/
33+
readonly $service?: string;
34+
}
35+
36+
/**
37+
* Smithy document type values.
38+
*/
39+
export namespace DocumentType {
40+
export type Value = Scalar | Structure | List;
41+
export type Scalar = string | number | boolean | null | Uint8Array | Date;
42+
export type Structure = { [member: string]: Value };
43+
export interface List extends Array<Value> {}
44+
}

0 commit comments

Comments
 (0)