File tree Expand file tree Collapse file tree 4 files changed +865
-653
lines changed
clients/node/client-rds-data-node Expand file tree Collapse file tree 4 files changed +865
-653
lines changed Original file line number Diff line number Diff line change
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
+ }
You can’t perform that action at this time.
0 commit comments