@aws-sdk/lib-dynamodb 3.181.0 → 3.183.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.
- package/CHANGELOG.md +8 -0
- package/dist-es/DynamoDBDocument.js +56 -63
- package/dist-es/DynamoDBDocumentClient.js +11 -16
- package/dist-es/baseCommand/DynamoDBDocumentClientCommand.js +12 -33
- package/dist-es/commands/BatchExecuteStatementCommand.js +14 -22
- package/dist-es/commands/BatchGetCommand.js +14 -22
- package/dist-es/commands/BatchWriteCommand.js +14 -22
- package/dist-es/commands/DeleteCommand.js +14 -22
- package/dist-es/commands/ExecuteStatementCommand.js +14 -22
- package/dist-es/commands/ExecuteTransactionCommand.js +14 -22
- package/dist-es/commands/GetCommand.js +14 -22
- package/dist-es/commands/PutCommand.js +14 -22
- package/dist-es/commands/QueryCommand.js +14 -22
- package/dist-es/commands/ScanCommand.js +14 -22
- package/dist-es/commands/TransactGetCommand.js +14 -22
- package/dist-es/commands/TransactWriteCommand.js +14 -22
- package/dist-es/commands/UpdateCommand.js +14 -22
- package/dist-es/commands/utils.js +15 -22
- package/dist-es/pagination/QueryPaginator.js +24 -67
- package/dist-es/pagination/ScanPaginator.js +24 -67
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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.183.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.182.0...v3.183.0) (2022-10-03)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @aws-sdk/lib-dynamodb
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
# [3.181.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.180.0...v3.181.0) (2022-09-29)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @aws-sdk/lib-dynamodb
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __extends } from "tslib";
|
|
2
1
|
import { BatchExecuteStatementCommand, } from "./commands/BatchExecuteStatementCommand";
|
|
3
2
|
import { BatchGetCommand } from "./commands/BatchGetCommand";
|
|
4
3
|
import { BatchWriteCommand } from "./commands/BatchWriteCommand";
|
|
@@ -13,196 +12,190 @@ import { TransactGetCommand } from "./commands/TransactGetCommand";
|
|
|
13
12
|
import { TransactWriteCommand, } from "./commands/TransactWriteCommand";
|
|
14
13
|
import { UpdateCommand } from "./commands/UpdateCommand";
|
|
15
14
|
import { DynamoDBDocumentClient } from "./DynamoDBDocumentClient";
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
function DynamoDBDocument() {
|
|
19
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
20
|
-
}
|
|
21
|
-
DynamoDBDocument.from = function (client, translateConfig) {
|
|
15
|
+
export class DynamoDBDocument extends DynamoDBDocumentClient {
|
|
16
|
+
static from(client, translateConfig) {
|
|
22
17
|
return new DynamoDBDocument(client, translateConfig);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
}
|
|
19
|
+
batchExecuteStatement(args, optionsOrCb, cb) {
|
|
20
|
+
const command = new BatchExecuteStatementCommand(args);
|
|
26
21
|
if (typeof optionsOrCb === "function") {
|
|
27
22
|
this.send(command, optionsOrCb);
|
|
28
23
|
}
|
|
29
24
|
else if (typeof cb === "function") {
|
|
30
25
|
if (typeof optionsOrCb !== "object")
|
|
31
|
-
throw new Error(
|
|
26
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
32
27
|
this.send(command, optionsOrCb || {}, cb);
|
|
33
28
|
}
|
|
34
29
|
else {
|
|
35
30
|
return this.send(command, optionsOrCb);
|
|
36
31
|
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
|
|
32
|
+
}
|
|
33
|
+
batchGet(args, optionsOrCb, cb) {
|
|
34
|
+
const command = new BatchGetCommand(args);
|
|
40
35
|
if (typeof optionsOrCb === "function") {
|
|
41
36
|
this.send(command, optionsOrCb);
|
|
42
37
|
}
|
|
43
38
|
else if (typeof cb === "function") {
|
|
44
39
|
if (typeof optionsOrCb !== "object")
|
|
45
|
-
throw new Error(
|
|
40
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
46
41
|
this.send(command, optionsOrCb || {}, cb);
|
|
47
42
|
}
|
|
48
43
|
else {
|
|
49
44
|
return this.send(command, optionsOrCb);
|
|
50
45
|
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
46
|
+
}
|
|
47
|
+
batchWrite(args, optionsOrCb, cb) {
|
|
48
|
+
const command = new BatchWriteCommand(args);
|
|
54
49
|
if (typeof optionsOrCb === "function") {
|
|
55
50
|
this.send(command, optionsOrCb);
|
|
56
51
|
}
|
|
57
52
|
else if (typeof cb === "function") {
|
|
58
53
|
if (typeof optionsOrCb !== "object")
|
|
59
|
-
throw new Error(
|
|
54
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
60
55
|
this.send(command, optionsOrCb || {}, cb);
|
|
61
56
|
}
|
|
62
57
|
else {
|
|
63
58
|
return this.send(command, optionsOrCb);
|
|
64
59
|
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
60
|
+
}
|
|
61
|
+
delete(args, optionsOrCb, cb) {
|
|
62
|
+
const command = new DeleteCommand(args);
|
|
68
63
|
if (typeof optionsOrCb === "function") {
|
|
69
64
|
this.send(command, optionsOrCb);
|
|
70
65
|
}
|
|
71
66
|
else if (typeof cb === "function") {
|
|
72
67
|
if (typeof optionsOrCb !== "object")
|
|
73
|
-
throw new Error(
|
|
68
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
74
69
|
this.send(command, optionsOrCb || {}, cb);
|
|
75
70
|
}
|
|
76
71
|
else {
|
|
77
72
|
return this.send(command, optionsOrCb);
|
|
78
73
|
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
74
|
+
}
|
|
75
|
+
executeStatement(args, optionsOrCb, cb) {
|
|
76
|
+
const command = new ExecuteStatementCommand(args);
|
|
82
77
|
if (typeof optionsOrCb === "function") {
|
|
83
78
|
this.send(command, optionsOrCb);
|
|
84
79
|
}
|
|
85
80
|
else if (typeof cb === "function") {
|
|
86
81
|
if (typeof optionsOrCb !== "object")
|
|
87
|
-
throw new Error(
|
|
82
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
88
83
|
this.send(command, optionsOrCb || {}, cb);
|
|
89
84
|
}
|
|
90
85
|
else {
|
|
91
86
|
return this.send(command, optionsOrCb);
|
|
92
87
|
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
88
|
+
}
|
|
89
|
+
executeTransaction(args, optionsOrCb, cb) {
|
|
90
|
+
const command = new ExecuteTransactionCommand(args);
|
|
96
91
|
if (typeof optionsOrCb === "function") {
|
|
97
92
|
this.send(command, optionsOrCb);
|
|
98
93
|
}
|
|
99
94
|
else if (typeof cb === "function") {
|
|
100
95
|
if (typeof optionsOrCb !== "object")
|
|
101
|
-
throw new Error(
|
|
96
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
102
97
|
this.send(command, optionsOrCb || {}, cb);
|
|
103
98
|
}
|
|
104
99
|
else {
|
|
105
100
|
return this.send(command, optionsOrCb);
|
|
106
101
|
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
|
|
102
|
+
}
|
|
103
|
+
get(args, optionsOrCb, cb) {
|
|
104
|
+
const command = new GetCommand(args);
|
|
110
105
|
if (typeof optionsOrCb === "function") {
|
|
111
106
|
this.send(command, optionsOrCb);
|
|
112
107
|
}
|
|
113
108
|
else if (typeof cb === "function") {
|
|
114
109
|
if (typeof optionsOrCb !== "object")
|
|
115
|
-
throw new Error(
|
|
110
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
116
111
|
this.send(command, optionsOrCb || {}, cb);
|
|
117
112
|
}
|
|
118
113
|
else {
|
|
119
114
|
return this.send(command, optionsOrCb);
|
|
120
115
|
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
|
|
116
|
+
}
|
|
117
|
+
put(args, optionsOrCb, cb) {
|
|
118
|
+
const command = new PutCommand(args);
|
|
124
119
|
if (typeof optionsOrCb === "function") {
|
|
125
120
|
this.send(command, optionsOrCb);
|
|
126
121
|
}
|
|
127
122
|
else if (typeof cb === "function") {
|
|
128
123
|
if (typeof optionsOrCb !== "object")
|
|
129
|
-
throw new Error(
|
|
124
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
130
125
|
this.send(command, optionsOrCb || {}, cb);
|
|
131
126
|
}
|
|
132
127
|
else {
|
|
133
128
|
return this.send(command, optionsOrCb);
|
|
134
129
|
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
|
|
130
|
+
}
|
|
131
|
+
query(args, optionsOrCb, cb) {
|
|
132
|
+
const command = new QueryCommand(args);
|
|
138
133
|
if (typeof optionsOrCb === "function") {
|
|
139
134
|
this.send(command, optionsOrCb);
|
|
140
135
|
}
|
|
141
136
|
else if (typeof cb === "function") {
|
|
142
137
|
if (typeof optionsOrCb !== "object")
|
|
143
|
-
throw new Error(
|
|
138
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
144
139
|
this.send(command, optionsOrCb || {}, cb);
|
|
145
140
|
}
|
|
146
141
|
else {
|
|
147
142
|
return this.send(command, optionsOrCb);
|
|
148
143
|
}
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
|
|
144
|
+
}
|
|
145
|
+
scan(args, optionsOrCb, cb) {
|
|
146
|
+
const command = new ScanCommand(args);
|
|
152
147
|
if (typeof optionsOrCb === "function") {
|
|
153
148
|
this.send(command, optionsOrCb);
|
|
154
149
|
}
|
|
155
150
|
else if (typeof cb === "function") {
|
|
156
151
|
if (typeof optionsOrCb !== "object")
|
|
157
|
-
throw new Error(
|
|
152
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
158
153
|
this.send(command, optionsOrCb || {}, cb);
|
|
159
154
|
}
|
|
160
155
|
else {
|
|
161
156
|
return this.send(command, optionsOrCb);
|
|
162
157
|
}
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
|
|
158
|
+
}
|
|
159
|
+
transactGet(args, optionsOrCb, cb) {
|
|
160
|
+
const command = new TransactGetCommand(args);
|
|
166
161
|
if (typeof optionsOrCb === "function") {
|
|
167
162
|
this.send(command, optionsOrCb);
|
|
168
163
|
}
|
|
169
164
|
else if (typeof cb === "function") {
|
|
170
165
|
if (typeof optionsOrCb !== "object")
|
|
171
|
-
throw new Error(
|
|
166
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
172
167
|
this.send(command, optionsOrCb || {}, cb);
|
|
173
168
|
}
|
|
174
169
|
else {
|
|
175
170
|
return this.send(command, optionsOrCb);
|
|
176
171
|
}
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
|
|
172
|
+
}
|
|
173
|
+
transactWrite(args, optionsOrCb, cb) {
|
|
174
|
+
const command = new TransactWriteCommand(args);
|
|
180
175
|
if (typeof optionsOrCb === "function") {
|
|
181
176
|
this.send(command, optionsOrCb);
|
|
182
177
|
}
|
|
183
178
|
else if (typeof cb === "function") {
|
|
184
179
|
if (typeof optionsOrCb !== "object")
|
|
185
|
-
throw new Error(
|
|
180
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
186
181
|
this.send(command, optionsOrCb || {}, cb);
|
|
187
182
|
}
|
|
188
183
|
else {
|
|
189
184
|
return this.send(command, optionsOrCb);
|
|
190
185
|
}
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
|
|
186
|
+
}
|
|
187
|
+
update(args, optionsOrCb, cb) {
|
|
188
|
+
const command = new UpdateCommand(args);
|
|
194
189
|
if (typeof optionsOrCb === "function") {
|
|
195
190
|
this.send(command, optionsOrCb);
|
|
196
191
|
}
|
|
197
192
|
else if (typeof cb === "function") {
|
|
198
193
|
if (typeof optionsOrCb !== "object")
|
|
199
|
-
throw new Error(
|
|
194
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
200
195
|
this.send(command, optionsOrCb || {}, cb);
|
|
201
196
|
}
|
|
202
197
|
else {
|
|
203
198
|
return this.send(command, optionsOrCb);
|
|
204
199
|
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
}(DynamoDBDocumentClient));
|
|
208
|
-
export { DynamoDBDocument };
|
|
200
|
+
}
|
|
201
|
+
}
|
|
@@ -1,19 +1,14 @@
|
|
|
1
|
-
import { __extends } from "tslib";
|
|
2
1
|
import { Client as __Client } from "@aws-sdk/smithy-client";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
_this.middlewareStack = client.middlewareStack;
|
|
10
|
-
return _this;
|
|
2
|
+
export class DynamoDBDocumentClient extends __Client {
|
|
3
|
+
constructor(client, translateConfig) {
|
|
4
|
+
super(client.config);
|
|
5
|
+
this.config = client.config;
|
|
6
|
+
this.config.translateConfig = translateConfig;
|
|
7
|
+
this.middlewareStack = client.middlewareStack;
|
|
11
8
|
}
|
|
12
|
-
|
|
9
|
+
static from(client, translateConfig) {
|
|
13
10
|
return new DynamoDBDocumentClient(client, translateConfig);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
}(__Client));
|
|
19
|
-
export { DynamoDBDocumentClient };
|
|
11
|
+
}
|
|
12
|
+
destroy() {
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -1,45 +1,24 @@
|
|
|
1
|
-
import { __awaiter, __extends, __generator } from "tslib";
|
|
2
1
|
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
3
2
|
import { marshallInput, unmarshallOutput } from "../commands/utils";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var _this = this;
|
|
11
|
-
var _a = configuration.translateConfig || {}, marshallOptions = _a.marshallOptions, unmarshallOptions = _a.unmarshallOptions;
|
|
12
|
-
this.clientCommand.middlewareStack.add(function (next) {
|
|
13
|
-
return function (args) { return __awaiter(_this, void 0, void 0, function () {
|
|
14
|
-
return __generator(this, function (_a) {
|
|
15
|
-
args.input = marshallInput(this.input, this.inputKeyNodes, marshallOptions);
|
|
16
|
-
return [2, next(args)];
|
|
17
|
-
});
|
|
18
|
-
}); };
|
|
3
|
+
export class DynamoDBDocumentClientCommand extends $Command {
|
|
4
|
+
addMarshallingMiddleware(configuration) {
|
|
5
|
+
const { marshallOptions, unmarshallOptions } = configuration.translateConfig || {};
|
|
6
|
+
this.clientCommand.middlewareStack.add((next) => async (args) => {
|
|
7
|
+
args.input = marshallInput(this.input, this.inputKeyNodes, marshallOptions);
|
|
8
|
+
return next(args);
|
|
19
9
|
}, {
|
|
20
10
|
name: "DocumentMarshall",
|
|
21
11
|
step: "initialize",
|
|
22
12
|
override: true,
|
|
23
13
|
});
|
|
24
|
-
this.clientCommand.middlewareStack.add(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
switch (_a.label) {
|
|
29
|
-
case 0: return [4, next(args)];
|
|
30
|
-
case 1:
|
|
31
|
-
deserialized = _a.sent();
|
|
32
|
-
deserialized.output = unmarshallOutput(deserialized.output, this.outputKeyNodes, unmarshallOptions);
|
|
33
|
-
return [2, deserialized];
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
}); };
|
|
14
|
+
this.clientCommand.middlewareStack.add((next) => async (args) => {
|
|
15
|
+
const deserialized = await next(args);
|
|
16
|
+
deserialized.output = unmarshallOutput(deserialized.output, this.outputKeyNodes, unmarshallOptions);
|
|
17
|
+
return deserialized;
|
|
37
18
|
}, {
|
|
38
19
|
name: "DocumentUnmarshall",
|
|
39
20
|
step: "deserialize",
|
|
40
21
|
override: true,
|
|
41
22
|
});
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
}($Command));
|
|
45
|
-
export { DynamoDBDocumentClientCommand };
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -1,26 +1,18 @@
|
|
|
1
|
-
import { __awaiter, __extends, __generator } from "tslib";
|
|
2
1
|
import { BatchExecuteStatementCommand as __BatchExecuteStatementCommand, } from "@aws-sdk/client-dynamodb";
|
|
3
2
|
import { DynamoDBDocumentClientCommand } from "../baseCommand/DynamoDBDocumentClientCommand";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
_this.middlewareStack = _this.clientCommand.middlewareStack;
|
|
13
|
-
return _this;
|
|
3
|
+
export class BatchExecuteStatementCommand extends DynamoDBDocumentClientCommand {
|
|
4
|
+
constructor(input) {
|
|
5
|
+
super();
|
|
6
|
+
this.input = input;
|
|
7
|
+
this.inputKeyNodes = [{ key: "Statements", children: [{ key: "Parameters" }] }];
|
|
8
|
+
this.outputKeyNodes = [{ key: "Responses", children: [{ key: "Item" }] }];
|
|
9
|
+
this.clientCommand = new __BatchExecuteStatementCommand(this.input);
|
|
10
|
+
this.middlewareStack = this.clientCommand.middlewareStack;
|
|
14
11
|
}
|
|
15
|
-
|
|
16
|
-
var _this = this;
|
|
12
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
17
13
|
this.addMarshallingMiddleware(configuration);
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
return
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
};
|
|
24
|
-
return BatchExecuteStatementCommand;
|
|
25
|
-
}(DynamoDBDocumentClientCommand));
|
|
26
|
-
export { BatchExecuteStatementCommand };
|
|
14
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
15
|
+
const handler = this.clientCommand.resolveMiddleware(stack, configuration, options);
|
|
16
|
+
return async () => handler(this.clientCommand);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { __awaiter, __extends, __generator } from "tslib";
|
|
2
1
|
import { BatchGetItemCommand as __BatchGetItemCommand, } from "@aws-sdk/client-dynamodb";
|
|
3
2
|
import { DynamoDBDocumentClientCommand } from "../baseCommand/DynamoDBDocumentClientCommand";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
_this.inputKeyNodes = [
|
|
3
|
+
export class BatchGetCommand extends DynamoDBDocumentClientCommand {
|
|
4
|
+
constructor(input) {
|
|
5
|
+
super();
|
|
6
|
+
this.input = input;
|
|
7
|
+
this.inputKeyNodes = [
|
|
10
8
|
{
|
|
11
9
|
key: "RequestItems",
|
|
12
10
|
children: {
|
|
@@ -14,7 +12,7 @@ var BatchGetCommand = (function (_super) {
|
|
|
14
12
|
},
|
|
15
13
|
},
|
|
16
14
|
];
|
|
17
|
-
|
|
15
|
+
this.outputKeyNodes = [
|
|
18
16
|
{ key: "Responses", children: {} },
|
|
19
17
|
{
|
|
20
18
|
key: "UnprocessedKeys",
|
|
@@ -23,19 +21,13 @@ var BatchGetCommand = (function (_super) {
|
|
|
23
21
|
},
|
|
24
22
|
},
|
|
25
23
|
];
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
return _this;
|
|
24
|
+
this.clientCommand = new __BatchGetItemCommand(this.input);
|
|
25
|
+
this.middlewareStack = this.clientCommand.middlewareStack;
|
|
29
26
|
}
|
|
30
|
-
|
|
31
|
-
var _this = this;
|
|
27
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
32
28
|
this.addMarshallingMiddleware(configuration);
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
};
|
|
39
|
-
return BatchGetCommand;
|
|
40
|
-
}(DynamoDBDocumentClientCommand));
|
|
41
|
-
export { BatchGetCommand };
|
|
29
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
30
|
+
const handler = this.clientCommand.resolveMiddleware(stack, configuration, options);
|
|
31
|
+
return async () => handler(this.clientCommand);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { __awaiter, __extends, __generator } from "tslib";
|
|
2
1
|
import { BatchWriteItemCommand as __BatchWriteItemCommand, } from "@aws-sdk/client-dynamodb";
|
|
3
2
|
import { DynamoDBDocumentClientCommand } from "../baseCommand/DynamoDBDocumentClientCommand";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
_this.inputKeyNodes = [
|
|
3
|
+
export class BatchWriteCommand extends DynamoDBDocumentClientCommand {
|
|
4
|
+
constructor(input) {
|
|
5
|
+
super();
|
|
6
|
+
this.input = input;
|
|
7
|
+
this.inputKeyNodes = [
|
|
10
8
|
{
|
|
11
9
|
key: "RequestItems",
|
|
12
10
|
children: {
|
|
@@ -17,7 +15,7 @@ var BatchWriteCommand = (function (_super) {
|
|
|
17
15
|
},
|
|
18
16
|
},
|
|
19
17
|
];
|
|
20
|
-
|
|
18
|
+
this.outputKeyNodes = [
|
|
21
19
|
{
|
|
22
20
|
key: "UnprocessedItems",
|
|
23
21
|
children: {
|
|
@@ -34,19 +32,13 @@ var BatchWriteCommand = (function (_super) {
|
|
|
34
32
|
},
|
|
35
33
|
},
|
|
36
34
|
];
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return _this;
|
|
35
|
+
this.clientCommand = new __BatchWriteItemCommand(this.input);
|
|
36
|
+
this.middlewareStack = this.clientCommand.middlewareStack;
|
|
40
37
|
}
|
|
41
|
-
|
|
42
|
-
var _this = this;
|
|
38
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
43
39
|
this.addMarshallingMiddleware(configuration);
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
return
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
};
|
|
50
|
-
return BatchWriteCommand;
|
|
51
|
-
}(DynamoDBDocumentClientCommand));
|
|
52
|
-
export { BatchWriteCommand };
|
|
40
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
41
|
+
const handler = this.clientCommand.resolveMiddleware(stack, configuration, options);
|
|
42
|
+
return async () => handler(this.clientCommand);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { __awaiter, __extends, __generator } from "tslib";
|
|
2
1
|
import { DeleteItemCommand as __DeleteItemCommand, } from "@aws-sdk/client-dynamodb";
|
|
3
2
|
import { DynamoDBDocumentClientCommand } from "../baseCommand/DynamoDBDocumentClientCommand";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
_this.inputKeyNodes = [
|
|
3
|
+
export class DeleteCommand extends DynamoDBDocumentClientCommand {
|
|
4
|
+
constructor(input) {
|
|
5
|
+
super();
|
|
6
|
+
this.input = input;
|
|
7
|
+
this.inputKeyNodes = [
|
|
10
8
|
{ key: "Key" },
|
|
11
9
|
{
|
|
12
10
|
key: "Expected",
|
|
@@ -16,23 +14,17 @@ var DeleteCommand = (function (_super) {
|
|
|
16
14
|
},
|
|
17
15
|
{ key: "ExpressionAttributeValues" },
|
|
18
16
|
];
|
|
19
|
-
|
|
17
|
+
this.outputKeyNodes = [
|
|
20
18
|
{ key: "Attributes" },
|
|
21
19
|
{ key: "ItemCollectionMetrics", children: [{ key: "ItemCollectionKey" }] },
|
|
22
20
|
];
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return _this;
|
|
21
|
+
this.clientCommand = new __DeleteItemCommand(this.input);
|
|
22
|
+
this.middlewareStack = this.clientCommand.middlewareStack;
|
|
26
23
|
}
|
|
27
|
-
|
|
28
|
-
var _this = this;
|
|
24
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
29
25
|
this.addMarshallingMiddleware(configuration);
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
return
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
};
|
|
36
|
-
return DeleteCommand;
|
|
37
|
-
}(DynamoDBDocumentClientCommand));
|
|
38
|
-
export { DeleteCommand };
|
|
26
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
27
|
+
const handler = this.clientCommand.resolveMiddleware(stack, configuration, options);
|
|
28
|
+
return async () => handler(this.clientCommand);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -1,26 +1,18 @@
|
|
|
1
|
-
import { __awaiter, __extends, __generator } from "tslib";
|
|
2
1
|
import { ExecuteStatementCommand as __ExecuteStatementCommand, } from "@aws-sdk/client-dynamodb";
|
|
3
2
|
import { DynamoDBDocumentClientCommand } from "../baseCommand/DynamoDBDocumentClientCommand";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
_this.middlewareStack = _this.clientCommand.middlewareStack;
|
|
13
|
-
return _this;
|
|
3
|
+
export class ExecuteStatementCommand extends DynamoDBDocumentClientCommand {
|
|
4
|
+
constructor(input) {
|
|
5
|
+
super();
|
|
6
|
+
this.input = input;
|
|
7
|
+
this.inputKeyNodes = [{ key: "Parameters" }];
|
|
8
|
+
this.outputKeyNodes = [{ key: "Items" }, { key: "LastEvaluatedKey" }];
|
|
9
|
+
this.clientCommand = new __ExecuteStatementCommand(this.input);
|
|
10
|
+
this.middlewareStack = this.clientCommand.middlewareStack;
|
|
14
11
|
}
|
|
15
|
-
|
|
16
|
-
var _this = this;
|
|
12
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
17
13
|
this.addMarshallingMiddleware(configuration);
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
return
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
};
|
|
24
|
-
return ExecuteStatementCommand;
|
|
25
|
-
}(DynamoDBDocumentClientCommand));
|
|
26
|
-
export { ExecuteStatementCommand };
|
|
14
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
15
|
+
const handler = this.clientCommand.resolveMiddleware(stack, configuration, options);
|
|
16
|
+
return async () => handler(this.clientCommand);
|
|
17
|
+
}
|
|
18
|
+
}
|