@aws-sdk/lib-dynamodb 3.186.0 → 3.188.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 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.188.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.187.0...v3.188.0) (2022-10-13)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/lib-dynamodb
9
+
10
+
11
+
12
+
13
+
6
14
  # [3.186.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.185.0...v3.186.0) (2022-10-06)
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
- var DynamoDBDocument = (function (_super) {
17
- __extends(DynamoDBDocument, _super);
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
- DynamoDBDocument.prototype.batchExecuteStatement = function (args, optionsOrCb, cb) {
25
- var command = new BatchExecuteStatementCommand(args);
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("Expect http options but get ".concat(typeof optionsOrCb));
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
- DynamoDBDocument.prototype.batchGet = function (args, optionsOrCb, cb) {
39
- var command = new BatchGetCommand(args);
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("Expect http options but get ".concat(typeof optionsOrCb));
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
- DynamoDBDocument.prototype.batchWrite = function (args, optionsOrCb, cb) {
53
- var command = new BatchWriteCommand(args);
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("Expect http options but get ".concat(typeof optionsOrCb));
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
- DynamoDBDocument.prototype.delete = function (args, optionsOrCb, cb) {
67
- var command = new DeleteCommand(args);
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("Expect http options but get ".concat(typeof optionsOrCb));
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
- DynamoDBDocument.prototype.executeStatement = function (args, optionsOrCb, cb) {
81
- var command = new ExecuteStatementCommand(args);
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("Expect http options but get ".concat(typeof optionsOrCb));
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
- DynamoDBDocument.prototype.executeTransaction = function (args, optionsOrCb, cb) {
95
- var command = new ExecuteTransactionCommand(args);
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("Expect http options but get ".concat(typeof optionsOrCb));
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
- DynamoDBDocument.prototype.get = function (args, optionsOrCb, cb) {
109
- var command = new GetCommand(args);
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("Expect http options but get ".concat(typeof optionsOrCb));
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
- DynamoDBDocument.prototype.put = function (args, optionsOrCb, cb) {
123
- var command = new PutCommand(args);
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("Expect http options but get ".concat(typeof optionsOrCb));
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
- DynamoDBDocument.prototype.query = function (args, optionsOrCb, cb) {
137
- var command = new QueryCommand(args);
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("Expect http options but get ".concat(typeof optionsOrCb));
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
- DynamoDBDocument.prototype.scan = function (args, optionsOrCb, cb) {
151
- var command = new ScanCommand(args);
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("Expect http options but get ".concat(typeof optionsOrCb));
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
- DynamoDBDocument.prototype.transactGet = function (args, optionsOrCb, cb) {
165
- var command = new TransactGetCommand(args);
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("Expect http options but get ".concat(typeof optionsOrCb));
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
- DynamoDBDocument.prototype.transactWrite = function (args, optionsOrCb, cb) {
179
- var command = new TransactWriteCommand(args);
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("Expect http options but get ".concat(typeof optionsOrCb));
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
- DynamoDBDocument.prototype.update = function (args, optionsOrCb, cb) {
193
- var command = new UpdateCommand(args);
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("Expect http options but get ".concat(typeof optionsOrCb));
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
- return DynamoDBDocument;
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
- var DynamoDBDocumentClient = (function (_super) {
4
- __extends(DynamoDBDocumentClient, _super);
5
- function DynamoDBDocumentClient(client, translateConfig) {
6
- var _this = _super.call(this, client.config) || this;
7
- _this.config = client.config;
8
- _this.config.translateConfig = translateConfig;
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
- DynamoDBDocumentClient.from = function (client, translateConfig) {
9
+ static from(client, translateConfig) {
13
10
  return new DynamoDBDocumentClient(client, translateConfig);
14
- };
15
- DynamoDBDocumentClient.prototype.destroy = function () {
16
- };
17
- return DynamoDBDocumentClient;
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
- var DynamoDBDocumentClientCommand = (function (_super) {
5
- __extends(DynamoDBDocumentClientCommand, _super);
6
- function DynamoDBDocumentClientCommand() {
7
- return _super !== null && _super.apply(this, arguments) || this;
8
- }
9
- DynamoDBDocumentClientCommand.prototype.addMarshallingMiddleware = function (configuration) {
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(function (next) {
25
- return function (args) { return __awaiter(_this, void 0, void 0, function () {
26
- var deserialized;
27
- return __generator(this, function (_a) {
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
- return DynamoDBDocumentClientCommand;
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
- var BatchExecuteStatementCommand = (function (_super) {
5
- __extends(BatchExecuteStatementCommand, _super);
6
- function BatchExecuteStatementCommand(input) {
7
- var _this = _super.call(this) || this;
8
- _this.input = input;
9
- _this.inputKeyNodes = [{ key: "Statements", children: [{ key: "Parameters" }] }];
10
- _this.outputKeyNodes = [{ key: "Responses", children: [{ key: "Item" }] }];
11
- _this.clientCommand = new __BatchExecuteStatementCommand(_this.input);
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
- BatchExecuteStatementCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
16
- var _this = this;
12
+ resolveMiddleware(clientStack, configuration, options) {
17
13
  this.addMarshallingMiddleware(configuration);
18
- var stack = clientStack.concat(this.middlewareStack);
19
- var handler = this.clientCommand.resolveMiddleware(stack, configuration, options);
20
- return function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
21
- return [2, handler(this.clientCommand)];
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
- var BatchGetCommand = (function (_super) {
5
- __extends(BatchGetCommand, _super);
6
- function BatchGetCommand(input) {
7
- var _this = _super.call(this) || this;
8
- _this.input = input;
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
- _this.outputKeyNodes = [
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
- _this.clientCommand = new __BatchGetItemCommand(_this.input);
27
- _this.middlewareStack = _this.clientCommand.middlewareStack;
28
- return _this;
24
+ this.clientCommand = new __BatchGetItemCommand(this.input);
25
+ this.middlewareStack = this.clientCommand.middlewareStack;
29
26
  }
30
- BatchGetCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
31
- var _this = this;
27
+ resolveMiddleware(clientStack, configuration, options) {
32
28
  this.addMarshallingMiddleware(configuration);
33
- var stack = clientStack.concat(this.middlewareStack);
34
- var handler = this.clientCommand.resolveMiddleware(stack, configuration, options);
35
- return function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
36
- return [2, handler(this.clientCommand)];
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
- var BatchWriteCommand = (function (_super) {
5
- __extends(BatchWriteCommand, _super);
6
- function BatchWriteCommand(input) {
7
- var _this = _super.call(this) || this;
8
- _this.input = input;
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
- _this.outputKeyNodes = [
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
- _this.clientCommand = new __BatchWriteItemCommand(_this.input);
38
- _this.middlewareStack = _this.clientCommand.middlewareStack;
39
- return _this;
35
+ this.clientCommand = new __BatchWriteItemCommand(this.input);
36
+ this.middlewareStack = this.clientCommand.middlewareStack;
40
37
  }
41
- BatchWriteCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
42
- var _this = this;
38
+ resolveMiddleware(clientStack, configuration, options) {
43
39
  this.addMarshallingMiddleware(configuration);
44
- var stack = clientStack.concat(this.middlewareStack);
45
- var handler = this.clientCommand.resolveMiddleware(stack, configuration, options);
46
- return function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
47
- return [2, handler(this.clientCommand)];
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
- var DeleteCommand = (function (_super) {
5
- __extends(DeleteCommand, _super);
6
- function DeleteCommand(input) {
7
- var _this = _super.call(this) || this;
8
- _this.input = input;
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
- _this.outputKeyNodes = [
17
+ this.outputKeyNodes = [
20
18
  { key: "Attributes" },
21
19
  { key: "ItemCollectionMetrics", children: [{ key: "ItemCollectionKey" }] },
22
20
  ];
23
- _this.clientCommand = new __DeleteItemCommand(_this.input);
24
- _this.middlewareStack = _this.clientCommand.middlewareStack;
25
- return _this;
21
+ this.clientCommand = new __DeleteItemCommand(this.input);
22
+ this.middlewareStack = this.clientCommand.middlewareStack;
26
23
  }
27
- DeleteCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
28
- var _this = this;
24
+ resolveMiddleware(clientStack, configuration, options) {
29
25
  this.addMarshallingMiddleware(configuration);
30
- var stack = clientStack.concat(this.middlewareStack);
31
- var handler = this.clientCommand.resolveMiddleware(stack, configuration, options);
32
- return function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
33
- return [2, handler(this.clientCommand)];
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
- var ExecuteStatementCommand = (function (_super) {
5
- __extends(ExecuteStatementCommand, _super);
6
- function ExecuteStatementCommand(input) {
7
- var _this = _super.call(this) || this;
8
- _this.input = input;
9
- _this.inputKeyNodes = [{ key: "Parameters" }];
10
- _this.outputKeyNodes = [{ key: "Items" }, { key: "LastEvaluatedKey" }];
11
- _this.clientCommand = new __ExecuteStatementCommand(_this.input);
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
- ExecuteStatementCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
16
- var _this = this;
12
+ resolveMiddleware(clientStack, configuration, options) {
17
13
  this.addMarshallingMiddleware(configuration);
18
- var stack = clientStack.concat(this.middlewareStack);
19
- var handler = this.clientCommand.resolveMiddleware(stack, configuration, options);
20
- return function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
21
- return [2, handler(this.clientCommand)];
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
+ }