@aws-sdk/lib-dynamodb 3.34.0 → 3.37.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.
Files changed (109) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist-cjs/DynamoDBDocument.js +205 -0
  3. package/dist-cjs/DynamoDBDocumentClient.js +18 -0
  4. package/dist-cjs/commands/BatchExecuteStatementCommand.js +27 -0
  5. package/dist-cjs/commands/BatchGetCommand.js +42 -0
  6. package/dist-cjs/commands/BatchWriteCommand.js +53 -0
  7. package/dist-cjs/commands/DeleteCommand.js +39 -0
  8. package/dist-cjs/commands/ExecuteStatementCommand.js +27 -0
  9. package/dist-cjs/commands/ExecuteTransactionCommand.js +27 -0
  10. package/dist-cjs/commands/GetCommand.js +27 -0
  11. package/dist-cjs/commands/PutCommand.js +39 -0
  12. package/dist-cjs/commands/QueryCommand.js +42 -0
  13. package/dist-cjs/commands/ScanCommand.js +36 -0
  14. package/dist-cjs/commands/TransactGetCommand.js +27 -0
  15. package/dist-cjs/commands/TransactWriteCommand.js +44 -0
  16. package/dist-cjs/commands/UpdateCommand.js +45 -0
  17. package/dist-cjs/commands/utils.js +44 -0
  18. package/dist-cjs/index.js +18 -0
  19. package/dist-es/DynamoDBDocument.js +208 -0
  20. package/dist-es/DynamoDBDocumentClient.js +19 -0
  21. package/dist-es/commands/BatchExecuteStatementCommand.js +33 -0
  22. package/dist-es/commands/BatchGetCommand.js +48 -0
  23. package/dist-es/commands/BatchWriteCommand.js +59 -0
  24. package/dist-es/commands/DeleteCommand.js +45 -0
  25. package/dist-es/commands/ExecuteStatementCommand.js +33 -0
  26. package/dist-es/commands/ExecuteTransactionCommand.js +33 -0
  27. package/dist-es/commands/GetCommand.js +33 -0
  28. package/dist-es/commands/PutCommand.js +45 -0
  29. package/dist-es/commands/QueryCommand.js +48 -0
  30. package/dist-es/commands/ScanCommand.js +42 -0
  31. package/dist-es/commands/TransactGetCommand.js +33 -0
  32. package/dist-es/commands/TransactWriteCommand.js +50 -0
  33. package/dist-es/commands/UpdateCommand.js +51 -0
  34. package/dist-es/commands/utils.js +46 -0
  35. package/{dist/types/index.d.ts → dist-es/index.js} +0 -0
  36. package/{dist/types → dist-types}/DynamoDBDocument.d.ts +3 -3
  37. package/{dist/types → dist-types}/DynamoDBDocumentClient.d.ts +4 -4
  38. package/{dist/types → dist-types}/commands/BatchExecuteStatementCommand.d.ts +3 -3
  39. package/{dist/types → dist-types}/commands/BatchGetCommand.d.ts +3 -3
  40. package/{dist/types → dist-types}/commands/BatchWriteCommand.d.ts +3 -3
  41. package/{dist/types → dist-types}/commands/DeleteCommand.d.ts +3 -3
  42. package/{dist/types → dist-types}/commands/ExecuteStatementCommand.d.ts +2 -2
  43. package/{dist/types → dist-types}/commands/ExecuteTransactionCommand.d.ts +3 -3
  44. package/{dist/types → dist-types}/commands/GetCommand.d.ts +2 -2
  45. package/{dist/types → dist-types}/commands/PutCommand.d.ts +2 -2
  46. package/{dist/types → dist-types}/commands/QueryCommand.d.ts +2 -2
  47. package/{dist/types → dist-types}/commands/ScanCommand.d.ts +2 -2
  48. package/{dist/types → dist-types}/commands/TransactGetCommand.d.ts +2 -2
  49. package/{dist/types → dist-types}/commands/TransactWriteCommand.d.ts +3 -3
  50. package/{dist/types → dist-types}/commands/UpdateCommand.d.ts +2 -2
  51. package/{dist/types → dist-types}/commands/utils.d.ts +0 -0
  52. package/dist-types/index.d.ts +15 -0
  53. package/dist-types/ts3.4/DynamoDBDocument.d.ts +72 -0
  54. package/{dist/types → dist-types}/ts3.4/DynamoDBDocumentClient.d.ts +5 -50
  55. package/{dist/types → dist-types}/ts3.4/commands/BatchExecuteStatementCommand.d.ts +5 -13
  56. package/{dist/types → dist-types}/ts3.4/commands/BatchGetCommand.d.ts +5 -13
  57. package/{dist/types → dist-types}/ts3.4/commands/BatchWriteCommand.d.ts +5 -13
  58. package/{dist/types → dist-types}/ts3.4/commands/DeleteCommand.d.ts +5 -13
  59. package/{dist/types → dist-types}/ts3.4/commands/ExecuteStatementCommand.d.ts +4 -12
  60. package/{dist/types → dist-types}/ts3.4/commands/ExecuteTransactionCommand.d.ts +5 -13
  61. package/{dist/types → dist-types}/ts3.4/commands/GetCommand.d.ts +4 -12
  62. package/{dist/types → dist-types}/ts3.4/commands/PutCommand.d.ts +4 -12
  63. package/{dist/types → dist-types}/ts3.4/commands/QueryCommand.d.ts +4 -12
  64. package/{dist/types → dist-types}/ts3.4/commands/ScanCommand.d.ts +4 -12
  65. package/{dist/types → dist-types}/ts3.4/commands/TransactGetCommand.d.ts +4 -12
  66. package/{dist/types → dist-types}/ts3.4/commands/TransactWriteCommand.d.ts +5 -13
  67. package/{dist/types → dist-types}/ts3.4/commands/UpdateCommand.d.ts +4 -12
  68. package/{dist/types → dist-types}/ts3.4/commands/utils.d.ts +0 -0
  69. package/{dist/types → dist-types}/ts3.4/index.d.ts +0 -0
  70. package/package.json +14 -11
  71. package/dist/cjs/DynamoDBDocument.js +0 -206
  72. package/dist/cjs/DynamoDBDocumentClient.js +0 -19
  73. package/dist/cjs/commands/BatchExecuteStatementCommand.js +0 -28
  74. package/dist/cjs/commands/BatchGetCommand.js +0 -43
  75. package/dist/cjs/commands/BatchWriteCommand.js +0 -54
  76. package/dist/cjs/commands/DeleteCommand.js +0 -40
  77. package/dist/cjs/commands/ExecuteStatementCommand.js +0 -28
  78. package/dist/cjs/commands/ExecuteTransactionCommand.js +0 -28
  79. package/dist/cjs/commands/GetCommand.js +0 -28
  80. package/dist/cjs/commands/PutCommand.js +0 -40
  81. package/dist/cjs/commands/QueryCommand.js +0 -43
  82. package/dist/cjs/commands/ScanCommand.js +0 -37
  83. package/dist/cjs/commands/TransactGetCommand.js +0 -28
  84. package/dist/cjs/commands/TransactWriteCommand.js +0 -45
  85. package/dist/cjs/commands/UpdateCommand.js +0 -46
  86. package/dist/cjs/commands/utils.js +0 -45
  87. package/dist/cjs/index.js +0 -19
  88. package/dist/es/DynamoDBDocument.js +0 -255
  89. package/dist/es/DynamoDBDocumentClient.js +0 -67
  90. package/dist/es/commands/BatchExecuteStatementCommand.js +0 -44
  91. package/dist/es/commands/BatchGetCommand.js +0 -59
  92. package/dist/es/commands/BatchWriteCommand.js +0 -70
  93. package/dist/es/commands/DeleteCommand.js +0 -56
  94. package/dist/es/commands/ExecuteStatementCommand.js +0 -44
  95. package/dist/es/commands/ExecuteTransactionCommand.js +0 -44
  96. package/dist/es/commands/GetCommand.js +0 -44
  97. package/dist/es/commands/PutCommand.js +0 -56
  98. package/dist/es/commands/QueryCommand.js +0 -59
  99. package/dist/es/commands/ScanCommand.js +0 -53
  100. package/dist/es/commands/TransactGetCommand.js +0 -44
  101. package/dist/es/commands/TransactWriteCommand.js +0 -61
  102. package/dist/es/commands/UpdateCommand.js +0 -62
  103. package/dist/es/commands/utils.js +0 -51
  104. package/dist/es/index.js +0 -16
  105. package/dist/types/ts3.4/DynamoDBDocument.d.ts +0 -195
  106. package/jest.config.js +0 -5
  107. package/tsconfig.cjs.json +0 -9
  108. package/tsconfig.es.json +0 -10
  109. package/tsconfig.types.json +0 -9
package/CHANGELOG.md CHANGED
@@ -3,6 +3,44 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.37.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.36.1...v3.37.0) (2021-10-15)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/lib-dynamodb
9
+
10
+
11
+
12
+
13
+
14
+ ## [3.36.1](https://github.com/aws/aws-sdk-js-v3/compare/v3.36.0...v3.36.1) (2021-10-12)
15
+
16
+ **Note:** Version bump only for package @aws-sdk/lib-dynamodb
17
+
18
+
19
+
20
+
21
+
22
+ # [3.36.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.35.0...v3.36.0) (2021-10-08)
23
+
24
+
25
+ ### Features
26
+
27
+ * publish files in dist-* only ([#2873](https://github.com/aws/aws-sdk-js-v3/issues/2873)) ([53b4243](https://github.com/aws/aws-sdk-js-v3/commit/53b4243b066f25ff2412d5f0dea1036054b2df32))
28
+
29
+
30
+
31
+
32
+
33
+ # [3.35.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.34.0...v3.35.0) (2021-10-04)
34
+
35
+
36
+ ### Features
37
+
38
+ * **clients:** eslint --fix using esprint ([#2849](https://github.com/aws/aws-sdk-js-v3/issues/2849)) ([94d0a2d](https://github.com/aws/aws-sdk-js-v3/commit/94d0a2d8a0579ee0a742337937ad05735cfbc1ba))
39
+
40
+
41
+
42
+
43
+
6
44
  # [3.34.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.33.0...v3.34.0) (2021-09-24)
7
45
 
8
46
 
@@ -0,0 +1,205 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DynamoDBDocument = void 0;
4
+ const BatchExecuteStatementCommand_1 = require("./commands/BatchExecuteStatementCommand");
5
+ const BatchGetCommand_1 = require("./commands/BatchGetCommand");
6
+ const BatchWriteCommand_1 = require("./commands/BatchWriteCommand");
7
+ const DeleteCommand_1 = require("./commands/DeleteCommand");
8
+ const ExecuteStatementCommand_1 = require("./commands/ExecuteStatementCommand");
9
+ const ExecuteTransactionCommand_1 = require("./commands/ExecuteTransactionCommand");
10
+ const GetCommand_1 = require("./commands/GetCommand");
11
+ const PutCommand_1 = require("./commands/PutCommand");
12
+ const QueryCommand_1 = require("./commands/QueryCommand");
13
+ const ScanCommand_1 = require("./commands/ScanCommand");
14
+ const TransactGetCommand_1 = require("./commands/TransactGetCommand");
15
+ const TransactWriteCommand_1 = require("./commands/TransactWriteCommand");
16
+ const UpdateCommand_1 = require("./commands/UpdateCommand");
17
+ const DynamoDBDocumentClient_1 = require("./DynamoDBDocumentClient");
18
+ class DynamoDBDocument extends DynamoDBDocumentClient_1.DynamoDBDocumentClient {
19
+ static from(client, translateConfig) {
20
+ return new DynamoDBDocument(client, translateConfig);
21
+ }
22
+ batchExecuteStatement(args, optionsOrCb, cb) {
23
+ const command = new BatchExecuteStatementCommand_1.BatchExecuteStatementCommand(args);
24
+ if (typeof optionsOrCb === "function") {
25
+ this.send(command, optionsOrCb);
26
+ }
27
+ else if (typeof cb === "function") {
28
+ if (typeof optionsOrCb !== "object")
29
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
30
+ this.send(command, optionsOrCb || {}, cb);
31
+ }
32
+ else {
33
+ return this.send(command, optionsOrCb);
34
+ }
35
+ }
36
+ batchGet(args, optionsOrCb, cb) {
37
+ const command = new BatchGetCommand_1.BatchGetCommand(args);
38
+ if (typeof optionsOrCb === "function") {
39
+ this.send(command, optionsOrCb);
40
+ }
41
+ else if (typeof cb === "function") {
42
+ if (typeof optionsOrCb !== "object")
43
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
44
+ this.send(command, optionsOrCb || {}, cb);
45
+ }
46
+ else {
47
+ return this.send(command, optionsOrCb);
48
+ }
49
+ }
50
+ batchWrite(args, optionsOrCb, cb) {
51
+ const command = new BatchWriteCommand_1.BatchWriteCommand(args);
52
+ if (typeof optionsOrCb === "function") {
53
+ this.send(command, optionsOrCb);
54
+ }
55
+ else if (typeof cb === "function") {
56
+ if (typeof optionsOrCb !== "object")
57
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
58
+ this.send(command, optionsOrCb || {}, cb);
59
+ }
60
+ else {
61
+ return this.send(command, optionsOrCb);
62
+ }
63
+ }
64
+ delete(args, optionsOrCb, cb) {
65
+ const command = new DeleteCommand_1.DeleteCommand(args);
66
+ if (typeof optionsOrCb === "function") {
67
+ this.send(command, optionsOrCb);
68
+ }
69
+ else if (typeof cb === "function") {
70
+ if (typeof optionsOrCb !== "object")
71
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
72
+ this.send(command, optionsOrCb || {}, cb);
73
+ }
74
+ else {
75
+ return this.send(command, optionsOrCb);
76
+ }
77
+ }
78
+ executeStatement(args, optionsOrCb, cb) {
79
+ const command = new ExecuteStatementCommand_1.ExecuteStatementCommand(args);
80
+ if (typeof optionsOrCb === "function") {
81
+ this.send(command, optionsOrCb);
82
+ }
83
+ else if (typeof cb === "function") {
84
+ if (typeof optionsOrCb !== "object")
85
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
86
+ this.send(command, optionsOrCb || {}, cb);
87
+ }
88
+ else {
89
+ return this.send(command, optionsOrCb);
90
+ }
91
+ }
92
+ executeTransaction(args, optionsOrCb, cb) {
93
+ const command = new ExecuteTransactionCommand_1.ExecuteTransactionCommand(args);
94
+ if (typeof optionsOrCb === "function") {
95
+ this.send(command, optionsOrCb);
96
+ }
97
+ else if (typeof cb === "function") {
98
+ if (typeof optionsOrCb !== "object")
99
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
100
+ this.send(command, optionsOrCb || {}, cb);
101
+ }
102
+ else {
103
+ return this.send(command, optionsOrCb);
104
+ }
105
+ }
106
+ get(args, optionsOrCb, cb) {
107
+ const command = new GetCommand_1.GetCommand(args);
108
+ if (typeof optionsOrCb === "function") {
109
+ this.send(command, optionsOrCb);
110
+ }
111
+ else if (typeof cb === "function") {
112
+ if (typeof optionsOrCb !== "object")
113
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
114
+ this.send(command, optionsOrCb || {}, cb);
115
+ }
116
+ else {
117
+ return this.send(command, optionsOrCb);
118
+ }
119
+ }
120
+ put(args, optionsOrCb, cb) {
121
+ const command = new PutCommand_1.PutCommand(args);
122
+ if (typeof optionsOrCb === "function") {
123
+ this.send(command, optionsOrCb);
124
+ }
125
+ else if (typeof cb === "function") {
126
+ if (typeof optionsOrCb !== "object")
127
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
128
+ this.send(command, optionsOrCb || {}, cb);
129
+ }
130
+ else {
131
+ return this.send(command, optionsOrCb);
132
+ }
133
+ }
134
+ query(args, optionsOrCb, cb) {
135
+ const command = new QueryCommand_1.QueryCommand(args);
136
+ if (typeof optionsOrCb === "function") {
137
+ this.send(command, optionsOrCb);
138
+ }
139
+ else if (typeof cb === "function") {
140
+ if (typeof optionsOrCb !== "object")
141
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
142
+ this.send(command, optionsOrCb || {}, cb);
143
+ }
144
+ else {
145
+ return this.send(command, optionsOrCb);
146
+ }
147
+ }
148
+ scan(args, optionsOrCb, cb) {
149
+ const command = new ScanCommand_1.ScanCommand(args);
150
+ if (typeof optionsOrCb === "function") {
151
+ this.send(command, optionsOrCb);
152
+ }
153
+ else if (typeof cb === "function") {
154
+ if (typeof optionsOrCb !== "object")
155
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
156
+ this.send(command, optionsOrCb || {}, cb);
157
+ }
158
+ else {
159
+ return this.send(command, optionsOrCb);
160
+ }
161
+ }
162
+ transactGet(args, optionsOrCb, cb) {
163
+ const command = new TransactGetCommand_1.TransactGetCommand(args);
164
+ if (typeof optionsOrCb === "function") {
165
+ this.send(command, optionsOrCb);
166
+ }
167
+ else if (typeof cb === "function") {
168
+ if (typeof optionsOrCb !== "object")
169
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
170
+ this.send(command, optionsOrCb || {}, cb);
171
+ }
172
+ else {
173
+ return this.send(command, optionsOrCb);
174
+ }
175
+ }
176
+ transactWrite(args, optionsOrCb, cb) {
177
+ const command = new TransactWriteCommand_1.TransactWriteCommand(args);
178
+ if (typeof optionsOrCb === "function") {
179
+ this.send(command, optionsOrCb);
180
+ }
181
+ else if (typeof cb === "function") {
182
+ if (typeof optionsOrCb !== "object")
183
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
184
+ this.send(command, optionsOrCb || {}, cb);
185
+ }
186
+ else {
187
+ return this.send(command, optionsOrCb);
188
+ }
189
+ }
190
+ update(args, optionsOrCb, cb) {
191
+ const command = new UpdateCommand_1.UpdateCommand(args);
192
+ if (typeof optionsOrCb === "function") {
193
+ this.send(command, optionsOrCb);
194
+ }
195
+ else if (typeof cb === "function") {
196
+ if (typeof optionsOrCb !== "object")
197
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
198
+ this.send(command, optionsOrCb || {}, cb);
199
+ }
200
+ else {
201
+ return this.send(command, optionsOrCb);
202
+ }
203
+ }
204
+ }
205
+ exports.DynamoDBDocument = DynamoDBDocument;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DynamoDBDocumentClient = void 0;
4
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
5
+ class DynamoDBDocumentClient extends smithy_client_1.Client {
6
+ constructor(client, translateConfig) {
7
+ super(client.config);
8
+ this.config = client.config;
9
+ this.config.translateConfig = translateConfig;
10
+ this.middlewareStack = client.middlewareStack;
11
+ }
12
+ static from(client, translateConfig) {
13
+ return new DynamoDBDocumentClient(client, translateConfig);
14
+ }
15
+ destroy() {
16
+ }
17
+ }
18
+ exports.DynamoDBDocumentClient = DynamoDBDocumentClient;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BatchExecuteStatementCommand = void 0;
4
+ const client_dynamodb_1 = require("@aws-sdk/client-dynamodb");
5
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
6
+ const utils_1 = require("../commands/utils");
7
+ class BatchExecuteStatementCommand extends smithy_client_1.Command {
8
+ constructor(input) {
9
+ super();
10
+ this.input = input;
11
+ this.inputKeyNodes = [{ key: "Statements", children: [{ key: "Parameters" }] }];
12
+ this.outputKeyNodes = [{ key: "Responses", children: [{ key: "Item" }] }];
13
+ }
14
+ resolveMiddleware(clientStack, configuration, options) {
15
+ const { marshallOptions, unmarshallOptions } = configuration.translateConfig || {};
16
+ const command = new client_dynamodb_1.BatchExecuteStatementCommand(utils_1.marshallInput(this.input, this.inputKeyNodes, marshallOptions));
17
+ const handler = command.resolveMiddleware(clientStack, configuration, options);
18
+ return async () => {
19
+ const data = await handler(command);
20
+ return {
21
+ ...data,
22
+ output: utils_1.unmarshallOutput(data.output, this.outputKeyNodes, unmarshallOptions),
23
+ };
24
+ };
25
+ }
26
+ }
27
+ exports.BatchExecuteStatementCommand = BatchExecuteStatementCommand;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BatchGetCommand = void 0;
4
+ const client_dynamodb_1 = require("@aws-sdk/client-dynamodb");
5
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
6
+ const utils_1 = require("../commands/utils");
7
+ class BatchGetCommand extends smithy_client_1.Command {
8
+ constructor(input) {
9
+ super();
10
+ this.input = input;
11
+ this.inputKeyNodes = [
12
+ {
13
+ key: "RequestItems",
14
+ children: {
15
+ children: [{ key: "Keys" }],
16
+ },
17
+ },
18
+ ];
19
+ this.outputKeyNodes = [
20
+ { key: "Responses", children: {} },
21
+ {
22
+ key: "UnprocessedKeys",
23
+ children: {
24
+ children: [{ key: "Keys" }],
25
+ },
26
+ },
27
+ ];
28
+ }
29
+ resolveMiddleware(clientStack, configuration, options) {
30
+ const { marshallOptions, unmarshallOptions } = configuration.translateConfig || {};
31
+ const command = new client_dynamodb_1.BatchGetItemCommand(utils_1.marshallInput(this.input, this.inputKeyNodes, marshallOptions));
32
+ const handler = command.resolveMiddleware(clientStack, configuration, options);
33
+ return async () => {
34
+ const data = await handler(command);
35
+ return {
36
+ ...data,
37
+ output: utils_1.unmarshallOutput(data.output, this.outputKeyNodes, unmarshallOptions),
38
+ };
39
+ };
40
+ }
41
+ }
42
+ exports.BatchGetCommand = BatchGetCommand;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BatchWriteCommand = void 0;
4
+ const client_dynamodb_1 = require("@aws-sdk/client-dynamodb");
5
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
6
+ const utils_1 = require("../commands/utils");
7
+ class BatchWriteCommand extends smithy_client_1.Command {
8
+ constructor(input) {
9
+ super();
10
+ this.input = input;
11
+ this.inputKeyNodes = [
12
+ {
13
+ key: "RequestItems",
14
+ children: {
15
+ children: [
16
+ { key: "PutRequest", children: [{ key: "Item" }] },
17
+ { key: "DeleteRequest", children: [{ key: "Key" }] },
18
+ ],
19
+ },
20
+ },
21
+ ];
22
+ this.outputKeyNodes = [
23
+ {
24
+ key: "UnprocessedItems",
25
+ children: {
26
+ children: [
27
+ { key: "PutRequest", children: [{ key: "Item" }] },
28
+ { key: "DeleteRequest", children: [{ key: "Key" }] },
29
+ ],
30
+ },
31
+ },
32
+ {
33
+ key: "ItemCollectionMetrics",
34
+ children: {
35
+ children: [{ key: "ItemCollectionKey" }],
36
+ },
37
+ },
38
+ ];
39
+ }
40
+ resolveMiddleware(clientStack, configuration, options) {
41
+ const { marshallOptions, unmarshallOptions } = configuration.translateConfig || {};
42
+ const command = new client_dynamodb_1.BatchWriteItemCommand(utils_1.marshallInput(this.input, this.inputKeyNodes, marshallOptions));
43
+ const handler = command.resolveMiddleware(clientStack, configuration, options);
44
+ return async () => {
45
+ const data = await handler(command);
46
+ return {
47
+ ...data,
48
+ output: utils_1.unmarshallOutput(data.output, this.outputKeyNodes, unmarshallOptions),
49
+ };
50
+ };
51
+ }
52
+ }
53
+ exports.BatchWriteCommand = BatchWriteCommand;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeleteCommand = void 0;
4
+ const client_dynamodb_1 = require("@aws-sdk/client-dynamodb");
5
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
6
+ const utils_1 = require("../commands/utils");
7
+ class DeleteCommand extends smithy_client_1.Command {
8
+ constructor(input) {
9
+ super();
10
+ this.input = input;
11
+ this.inputKeyNodes = [
12
+ { key: "Key" },
13
+ {
14
+ key: "Expected",
15
+ children: {
16
+ children: [{ key: "Value" }, { key: "AttributeValueList" }],
17
+ },
18
+ },
19
+ { key: "ExpressionAttributeValues" },
20
+ ];
21
+ this.outputKeyNodes = [
22
+ { key: "Attributes" },
23
+ { key: "ItemCollectionMetrics", children: [{ key: "ItemCollectionKey" }] },
24
+ ];
25
+ }
26
+ resolveMiddleware(clientStack, configuration, options) {
27
+ const { marshallOptions, unmarshallOptions } = configuration.translateConfig || {};
28
+ const command = new client_dynamodb_1.DeleteItemCommand(utils_1.marshallInput(this.input, this.inputKeyNodes, marshallOptions));
29
+ const handler = command.resolveMiddleware(clientStack, configuration, options);
30
+ return async () => {
31
+ const data = await handler(command);
32
+ return {
33
+ ...data,
34
+ output: utils_1.unmarshallOutput(data.output, this.outputKeyNodes, unmarshallOptions),
35
+ };
36
+ };
37
+ }
38
+ }
39
+ exports.DeleteCommand = DeleteCommand;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ExecuteStatementCommand = void 0;
4
+ const client_dynamodb_1 = require("@aws-sdk/client-dynamodb");
5
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
6
+ const utils_1 = require("../commands/utils");
7
+ class ExecuteStatementCommand extends smithy_client_1.Command {
8
+ constructor(input) {
9
+ super();
10
+ this.input = input;
11
+ this.inputKeyNodes = [{ key: "Parameters" }];
12
+ this.outputKeyNodes = [{ key: "Items" }];
13
+ }
14
+ resolveMiddleware(clientStack, configuration, options) {
15
+ const { marshallOptions, unmarshallOptions } = configuration.translateConfig || {};
16
+ const command = new client_dynamodb_1.ExecuteStatementCommand(utils_1.marshallInput(this.input, this.inputKeyNodes, marshallOptions));
17
+ const handler = command.resolveMiddleware(clientStack, configuration, options);
18
+ return async () => {
19
+ const data = await handler(command);
20
+ return {
21
+ ...data,
22
+ output: utils_1.unmarshallOutput(data.output, this.outputKeyNodes, unmarshallOptions),
23
+ };
24
+ };
25
+ }
26
+ }
27
+ exports.ExecuteStatementCommand = ExecuteStatementCommand;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ExecuteTransactionCommand = void 0;
4
+ const client_dynamodb_1 = require("@aws-sdk/client-dynamodb");
5
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
6
+ const utils_1 = require("../commands/utils");
7
+ class ExecuteTransactionCommand extends smithy_client_1.Command {
8
+ constructor(input) {
9
+ super();
10
+ this.input = input;
11
+ this.inputKeyNodes = [{ key: "TransactStatements", children: [{ key: "Parameters" }] }];
12
+ this.outputKeyNodes = [{ key: "Responses", children: [{ key: "Item" }] }];
13
+ }
14
+ resolveMiddleware(clientStack, configuration, options) {
15
+ const { marshallOptions, unmarshallOptions } = configuration.translateConfig || {};
16
+ const command = new client_dynamodb_1.ExecuteTransactionCommand(utils_1.marshallInput(this.input, this.inputKeyNodes, marshallOptions));
17
+ const handler = command.resolveMiddleware(clientStack, configuration, options);
18
+ return async () => {
19
+ const data = await handler(command);
20
+ return {
21
+ ...data,
22
+ output: utils_1.unmarshallOutput(data.output, this.outputKeyNodes, unmarshallOptions),
23
+ };
24
+ };
25
+ }
26
+ }
27
+ exports.ExecuteTransactionCommand = ExecuteTransactionCommand;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetCommand = void 0;
4
+ const client_dynamodb_1 = require("@aws-sdk/client-dynamodb");
5
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
6
+ const utils_1 = require("../commands/utils");
7
+ class GetCommand extends smithy_client_1.Command {
8
+ constructor(input) {
9
+ super();
10
+ this.input = input;
11
+ this.inputKeyNodes = [{ key: "Key" }];
12
+ this.outputKeyNodes = [{ key: "Item" }];
13
+ }
14
+ resolveMiddleware(clientStack, configuration, options) {
15
+ const { marshallOptions, unmarshallOptions } = configuration.translateConfig || {};
16
+ const command = new client_dynamodb_1.GetItemCommand(utils_1.marshallInput(this.input, this.inputKeyNodes, marshallOptions));
17
+ const handler = command.resolveMiddleware(clientStack, configuration, options);
18
+ return async () => {
19
+ const data = await handler(command);
20
+ return {
21
+ ...data,
22
+ output: utils_1.unmarshallOutput(data.output, this.outputKeyNodes, unmarshallOptions),
23
+ };
24
+ };
25
+ }
26
+ }
27
+ exports.GetCommand = GetCommand;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PutCommand = void 0;
4
+ const client_dynamodb_1 = require("@aws-sdk/client-dynamodb");
5
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
6
+ const utils_1 = require("../commands/utils");
7
+ class PutCommand extends smithy_client_1.Command {
8
+ constructor(input) {
9
+ super();
10
+ this.input = input;
11
+ this.inputKeyNodes = [
12
+ { key: "Item" },
13
+ {
14
+ key: "Expected",
15
+ children: {
16
+ children: [{ key: "Value" }, { key: "AttributeValueList" }],
17
+ },
18
+ },
19
+ { key: "ExpressionAttributeValues" },
20
+ ];
21
+ this.outputKeyNodes = [
22
+ { key: "Attributes" },
23
+ { key: "ItemCollectionMetrics", children: [{ key: "ItemCollectionKey" }] },
24
+ ];
25
+ }
26
+ resolveMiddleware(clientStack, configuration, options) {
27
+ const { marshallOptions, unmarshallOptions } = configuration.translateConfig || {};
28
+ const command = new client_dynamodb_1.PutItemCommand(utils_1.marshallInput(this.input, this.inputKeyNodes, marshallOptions));
29
+ const handler = command.resolveMiddleware(clientStack, configuration, options);
30
+ return async () => {
31
+ const data = await handler(command);
32
+ return {
33
+ ...data,
34
+ output: utils_1.unmarshallOutput(data.output, this.outputKeyNodes, unmarshallOptions),
35
+ };
36
+ };
37
+ }
38
+ }
39
+ exports.PutCommand = PutCommand;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.QueryCommand = void 0;
4
+ const client_dynamodb_1 = require("@aws-sdk/client-dynamodb");
5
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
6
+ const utils_1 = require("../commands/utils");
7
+ class QueryCommand extends smithy_client_1.Command {
8
+ constructor(input) {
9
+ super();
10
+ this.input = input;
11
+ this.inputKeyNodes = [
12
+ {
13
+ key: "KeyConditions",
14
+ children: {
15
+ children: [{ key: "AttributeValueList" }],
16
+ },
17
+ },
18
+ {
19
+ key: "QueryFilter",
20
+ children: {
21
+ children: [{ key: "AttributeValueList" }],
22
+ },
23
+ },
24
+ { key: "ExclusiveStartKey" },
25
+ { key: "ExpressionAttributeValues" },
26
+ ];
27
+ this.outputKeyNodes = [{ key: "Items" }, { key: "LastEvaluatedKey" }];
28
+ }
29
+ resolveMiddleware(clientStack, configuration, options) {
30
+ const { marshallOptions, unmarshallOptions } = configuration.translateConfig || {};
31
+ const command = new client_dynamodb_1.QueryCommand(utils_1.marshallInput(this.input, this.inputKeyNodes, marshallOptions));
32
+ const handler = command.resolveMiddleware(clientStack, configuration, options);
33
+ return async () => {
34
+ const data = await handler(command);
35
+ return {
36
+ ...data,
37
+ output: utils_1.unmarshallOutput(data.output, this.outputKeyNodes, unmarshallOptions),
38
+ };
39
+ };
40
+ }
41
+ }
42
+ exports.QueryCommand = QueryCommand;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ScanCommand = void 0;
4
+ const client_dynamodb_1 = require("@aws-sdk/client-dynamodb");
5
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
6
+ const utils_1 = require("../commands/utils");
7
+ class ScanCommand extends smithy_client_1.Command {
8
+ constructor(input) {
9
+ super();
10
+ this.input = input;
11
+ this.inputKeyNodes = [
12
+ {
13
+ key: "ScanFilter",
14
+ children: {
15
+ children: [{ key: "AttributeValueList" }],
16
+ },
17
+ },
18
+ { key: "ExclusiveStartKey" },
19
+ { key: "ExpressionAttributeValues" },
20
+ ];
21
+ this.outputKeyNodes = [{ key: "Items" }, { key: "LastEvaluatedKey" }];
22
+ }
23
+ resolveMiddleware(clientStack, configuration, options) {
24
+ const { marshallOptions, unmarshallOptions } = configuration.translateConfig || {};
25
+ const command = new client_dynamodb_1.ScanCommand(utils_1.marshallInput(this.input, this.inputKeyNodes, marshallOptions));
26
+ const handler = command.resolveMiddleware(clientStack, configuration, options);
27
+ return async () => {
28
+ const data = await handler(command);
29
+ return {
30
+ ...data,
31
+ output: utils_1.unmarshallOutput(data.output, this.outputKeyNodes, unmarshallOptions),
32
+ };
33
+ };
34
+ }
35
+ }
36
+ exports.ScanCommand = ScanCommand;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TransactGetCommand = void 0;
4
+ const client_dynamodb_1 = require("@aws-sdk/client-dynamodb");
5
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
6
+ const utils_1 = require("../commands/utils");
7
+ class TransactGetCommand extends smithy_client_1.Command {
8
+ constructor(input) {
9
+ super();
10
+ this.input = input;
11
+ this.inputKeyNodes = [{ key: "TransactItems", children: [{ key: "Get", children: [{ key: "Key" }] }] }];
12
+ this.outputKeyNodes = [{ key: "Responses", children: [{ key: "Item" }] }];
13
+ }
14
+ resolveMiddleware(clientStack, configuration, options) {
15
+ const { marshallOptions, unmarshallOptions } = configuration.translateConfig || {};
16
+ const command = new client_dynamodb_1.TransactGetItemsCommand(utils_1.marshallInput(this.input, this.inputKeyNodes, marshallOptions));
17
+ const handler = command.resolveMiddleware(clientStack, configuration, options);
18
+ return async () => {
19
+ const data = await handler(command);
20
+ return {
21
+ ...data,
22
+ output: utils_1.unmarshallOutput(data.output, this.outputKeyNodes, unmarshallOptions),
23
+ };
24
+ };
25
+ }
26
+ }
27
+ exports.TransactGetCommand = TransactGetCommand;