@depup/aws-sdk__lib-dynamodb 3.1005.0-depup.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 (73) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +31 -0
  3. package/dist-cjs/index.js +836 -0
  4. package/dist-es/DynamoDBDocument.js +214 -0
  5. package/dist-es/DynamoDBDocumentClient.js +20 -0
  6. package/dist-es/baseCommand/DynamoDBDocumentClientCommand.js +32 -0
  7. package/dist-es/commands/BatchExecuteStatementCommand.js +39 -0
  8. package/dist-es/commands/BatchGetCommand.js +45 -0
  9. package/dist-es/commands/BatchWriteCommand.js +57 -0
  10. package/dist-es/commands/DeleteCommand.js +38 -0
  11. package/dist-es/commands/ExecuteStatementCommand.js +31 -0
  12. package/dist-es/commands/ExecuteTransactionCommand.js +36 -0
  13. package/dist-es/commands/GetCommand.js +28 -0
  14. package/dist-es/commands/PutCommand.js +38 -0
  15. package/dist-es/commands/QueryCommand.js +42 -0
  16. package/dist-es/commands/ScanCommand.js +37 -0
  17. package/dist-es/commands/TransactGetCommand.js +38 -0
  18. package/dist-es/commands/TransactWriteCommand.js +53 -0
  19. package/dist-es/commands/UpdateCommand.js +43 -0
  20. package/dist-es/commands/index.js +13 -0
  21. package/dist-es/commands/utils.js +80 -0
  22. package/dist-es/index.js +5 -0
  23. package/dist-es/pagination/Interfaces.js +1 -0
  24. package/dist-es/pagination/QueryPaginator.js +4 -0
  25. package/dist-es/pagination/ScanPaginator.js +4 -0
  26. package/dist-es/pagination/index.js +3 -0
  27. package/dist-types/DynamoDBDocument.d.ts +195 -0
  28. package/dist-types/DynamoDBDocumentClient.d.ts +96 -0
  29. package/dist-types/baseCommand/DynamoDBDocumentClientCommand.d.ts +17 -0
  30. package/dist-types/commands/BatchExecuteStatementCommand.d.ts +66 -0
  31. package/dist-types/commands/BatchGetCommand.d.ts +70 -0
  32. package/dist-types/commands/BatchWriteCommand.d.ts +94 -0
  33. package/dist-types/commands/DeleteCommand.d.ts +66 -0
  34. package/dist-types/commands/ExecuteStatementCommand.d.ts +52 -0
  35. package/dist-types/commands/ExecuteTransactionCommand.d.ts +60 -0
  36. package/dist-types/commands/GetCommand.d.ts +48 -0
  37. package/dist-types/commands/PutCommand.d.ts +66 -0
  38. package/dist-types/commands/QueryCommand.d.ts +70 -0
  39. package/dist-types/commands/ScanCommand.d.ts +62 -0
  40. package/dist-types/commands/TransactGetCommand.d.ts +64 -0
  41. package/dist-types/commands/TransactWriteCommand.d.ts +92 -0
  42. package/dist-types/commands/UpdateCommand.d.ts +74 -0
  43. package/dist-types/commands/index.d.ts +13 -0
  44. package/dist-types/commands/utils.d.ts +33 -0
  45. package/dist-types/index.d.ts +7 -0
  46. package/dist-types/pagination/Interfaces.d.ts +13 -0
  47. package/dist-types/pagination/QueryPaginator.d.ts +11 -0
  48. package/dist-types/pagination/ScanPaginator.d.ts +11 -0
  49. package/dist-types/pagination/index.d.ts +3 -0
  50. package/dist-types/ts3.4/DynamoDBDocument.d.ts +221 -0
  51. package/dist-types/ts3.4/DynamoDBDocumentClient.d.ts +105 -0
  52. package/dist-types/ts3.4/baseCommand/DynamoDBDocumentClientCommand.d.ts +30 -0
  53. package/dist-types/ts3.4/commands/BatchExecuteStatementCommand.d.ts +96 -0
  54. package/dist-types/ts3.4/commands/BatchGetCommand.d.ts +92 -0
  55. package/dist-types/ts3.4/commands/BatchWriteCommand.d.ts +142 -0
  56. package/dist-types/ts3.4/commands/DeleteCommand.d.ts +96 -0
  57. package/dist-types/ts3.4/commands/ExecuteStatementCommand.d.ts +61 -0
  58. package/dist-types/ts3.4/commands/ExecuteTransactionCommand.d.ts +78 -0
  59. package/dist-types/ts3.4/commands/GetCommand.d.ts +57 -0
  60. package/dist-types/ts3.4/commands/PutCommand.d.ts +93 -0
  61. package/dist-types/ts3.4/commands/QueryCommand.d.ts +96 -0
  62. package/dist-types/ts3.4/commands/ScanCommand.d.ts +80 -0
  63. package/dist-types/ts3.4/commands/TransactGetCommand.d.ts +82 -0
  64. package/dist-types/ts3.4/commands/TransactWriteCommand.d.ts +151 -0
  65. package/dist-types/ts3.4/commands/UpdateCommand.d.ts +113 -0
  66. package/dist-types/ts3.4/commands/index.d.ts +13 -0
  67. package/dist-types/ts3.4/commands/utils.d.ts +17 -0
  68. package/dist-types/ts3.4/index.d.ts +11 -0
  69. package/dist-types/ts3.4/pagination/Interfaces.d.ts +8 -0
  70. package/dist-types/ts3.4/pagination/QueryPaginator.d.ts +12 -0
  71. package/dist-types/ts3.4/pagination/ScanPaginator.d.ts +9 -0
  72. package/dist-types/ts3.4/pagination/index.d.ts +3 -0
  73. package/package.json +87 -0
@@ -0,0 +1,214 @@
1
+ import { BatchExecuteStatementCommand, } from "./commands/BatchExecuteStatementCommand";
2
+ import { BatchGetCommand } from "./commands/BatchGetCommand";
3
+ import { BatchWriteCommand } from "./commands/BatchWriteCommand";
4
+ import { DeleteCommand } from "./commands/DeleteCommand";
5
+ import { ExecuteStatementCommand, } from "./commands/ExecuteStatementCommand";
6
+ import { ExecuteTransactionCommand, } from "./commands/ExecuteTransactionCommand";
7
+ import { GetCommand } from "./commands/GetCommand";
8
+ import { PutCommand } from "./commands/PutCommand";
9
+ import { QueryCommand } from "./commands/QueryCommand";
10
+ import { ScanCommand } from "./commands/ScanCommand";
11
+ import { TransactGetCommand } from "./commands/TransactGetCommand";
12
+ import { TransactWriteCommand, } from "./commands/TransactWriteCommand";
13
+ import { UpdateCommand } from "./commands/UpdateCommand";
14
+ import { DynamoDBDocumentClient } from "./DynamoDBDocumentClient";
15
+ export class DynamoDBDocument extends DynamoDBDocumentClient {
16
+ static from(client, translateConfig) {
17
+ return new DynamoDBDocument(client, translateConfig);
18
+ }
19
+ batchExecuteStatement(args, optionsOrCb, cb) {
20
+ const command = new BatchExecuteStatementCommand(args);
21
+ if (typeof optionsOrCb === "function") {
22
+ this.send(command, optionsOrCb);
23
+ }
24
+ else if (typeof cb === "function") {
25
+ if (typeof optionsOrCb !== "object") {
26
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
27
+ }
28
+ this.send(command, optionsOrCb || {}, cb);
29
+ }
30
+ else {
31
+ return this.send(command, optionsOrCb);
32
+ }
33
+ }
34
+ batchGet(args, optionsOrCb, cb) {
35
+ const command = new BatchGetCommand(args);
36
+ if (typeof optionsOrCb === "function") {
37
+ this.send(command, optionsOrCb);
38
+ }
39
+ else if (typeof cb === "function") {
40
+ if (typeof optionsOrCb !== "object") {
41
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
42
+ }
43
+ this.send(command, optionsOrCb || {}, cb);
44
+ }
45
+ else {
46
+ return this.send(command, optionsOrCb);
47
+ }
48
+ }
49
+ batchWrite(args, optionsOrCb, cb) {
50
+ const command = new BatchWriteCommand(args);
51
+ if (typeof optionsOrCb === "function") {
52
+ this.send(command, optionsOrCb);
53
+ }
54
+ else if (typeof cb === "function") {
55
+ if (typeof optionsOrCb !== "object") {
56
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
57
+ }
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(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
+ }
73
+ this.send(command, optionsOrCb || {}, cb);
74
+ }
75
+ else {
76
+ return this.send(command, optionsOrCb);
77
+ }
78
+ }
79
+ executeStatement(args, optionsOrCb, cb) {
80
+ const command = new ExecuteStatementCommand(args);
81
+ if (typeof optionsOrCb === "function") {
82
+ this.send(command, optionsOrCb);
83
+ }
84
+ else if (typeof cb === "function") {
85
+ if (typeof optionsOrCb !== "object") {
86
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
87
+ }
88
+ this.send(command, optionsOrCb || {}, cb);
89
+ }
90
+ else {
91
+ return this.send(command, optionsOrCb);
92
+ }
93
+ }
94
+ executeTransaction(args, optionsOrCb, cb) {
95
+ const command = new ExecuteTransactionCommand(args);
96
+ if (typeof optionsOrCb === "function") {
97
+ this.send(command, optionsOrCb);
98
+ }
99
+ else if (typeof cb === "function") {
100
+ if (typeof optionsOrCb !== "object") {
101
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
102
+ }
103
+ this.send(command, optionsOrCb || {}, cb);
104
+ }
105
+ else {
106
+ return this.send(command, optionsOrCb);
107
+ }
108
+ }
109
+ get(args, optionsOrCb, cb) {
110
+ const command = new GetCommand(args);
111
+ if (typeof optionsOrCb === "function") {
112
+ this.send(command, optionsOrCb);
113
+ }
114
+ else if (typeof cb === "function") {
115
+ if (typeof optionsOrCb !== "object") {
116
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
117
+ }
118
+ this.send(command, optionsOrCb || {}, cb);
119
+ }
120
+ else {
121
+ return this.send(command, optionsOrCb);
122
+ }
123
+ }
124
+ put(args, optionsOrCb, cb) {
125
+ const command = new PutCommand(args);
126
+ if (typeof optionsOrCb === "function") {
127
+ this.send(command, optionsOrCb);
128
+ }
129
+ else if (typeof cb === "function") {
130
+ if (typeof optionsOrCb !== "object") {
131
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
132
+ }
133
+ this.send(command, optionsOrCb || {}, cb);
134
+ }
135
+ else {
136
+ return this.send(command, optionsOrCb);
137
+ }
138
+ }
139
+ query(args, optionsOrCb, cb) {
140
+ const command = new QueryCommand(args);
141
+ if (typeof optionsOrCb === "function") {
142
+ this.send(command, optionsOrCb);
143
+ }
144
+ else if (typeof cb === "function") {
145
+ if (typeof optionsOrCb !== "object") {
146
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
147
+ }
148
+ this.send(command, optionsOrCb || {}, cb);
149
+ }
150
+ else {
151
+ return this.send(command, optionsOrCb);
152
+ }
153
+ }
154
+ scan(args, optionsOrCb, cb) {
155
+ const command = new ScanCommand(args);
156
+ if (typeof optionsOrCb === "function") {
157
+ this.send(command, optionsOrCb);
158
+ }
159
+ else if (typeof cb === "function") {
160
+ if (typeof optionsOrCb !== "object") {
161
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
162
+ }
163
+ this.send(command, optionsOrCb || {}, cb);
164
+ }
165
+ else {
166
+ return this.send(command, optionsOrCb);
167
+ }
168
+ }
169
+ transactGet(args, optionsOrCb, cb) {
170
+ const command = new TransactGetCommand(args);
171
+ if (typeof optionsOrCb === "function") {
172
+ this.send(command, optionsOrCb);
173
+ }
174
+ else if (typeof cb === "function") {
175
+ if (typeof optionsOrCb !== "object") {
176
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
177
+ }
178
+ this.send(command, optionsOrCb || {}, cb);
179
+ }
180
+ else {
181
+ return this.send(command, optionsOrCb);
182
+ }
183
+ }
184
+ transactWrite(args, optionsOrCb, cb) {
185
+ const command = new TransactWriteCommand(args);
186
+ if (typeof optionsOrCb === "function") {
187
+ this.send(command, optionsOrCb);
188
+ }
189
+ else if (typeof cb === "function") {
190
+ if (typeof optionsOrCb !== "object") {
191
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
192
+ }
193
+ this.send(command, optionsOrCb || {}, cb);
194
+ }
195
+ else {
196
+ return this.send(command, optionsOrCb);
197
+ }
198
+ }
199
+ update(args, optionsOrCb, cb) {
200
+ const command = new UpdateCommand(args);
201
+ if (typeof optionsOrCb === "function") {
202
+ this.send(command, optionsOrCb);
203
+ }
204
+ else if (typeof cb === "function") {
205
+ if (typeof optionsOrCb !== "object") {
206
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
207
+ }
208
+ this.send(command, optionsOrCb || {}, cb);
209
+ }
210
+ else {
211
+ return this.send(command, optionsOrCb);
212
+ }
213
+ }
214
+ }
@@ -0,0 +1,20 @@
1
+ import { Client as __Client } from "@smithy/smithy-client";
2
+ export { __Client };
3
+ export class DynamoDBDocumentClient extends __Client {
4
+ config;
5
+ constructor(client, translateConfig) {
6
+ super(client.config);
7
+ this.config = client.config;
8
+ this.config.translateConfig = translateConfig;
9
+ this.middlewareStack = client.middlewareStack;
10
+ if (this.config?.cacheMiddleware) {
11
+ throw new Error("@aws-sdk/lib-dynamodb - cacheMiddleware=true is not compatible with the"
12
+ + " DynamoDBDocumentClient. This option must be set to false.");
13
+ }
14
+ }
15
+ static from(client, translateConfig) {
16
+ return new DynamoDBDocumentClient(client, translateConfig);
17
+ }
18
+ destroy() {
19
+ }
20
+ }
@@ -0,0 +1,32 @@
1
+ import { setFeature } from "@aws-sdk/core";
2
+ import { Command as $Command } from "@smithy/smithy-client";
3
+ import { marshallInput, unmarshallOutput } from "../commands/utils";
4
+ export class DynamoDBDocumentClientCommand extends $Command {
5
+ addMarshallingMiddleware(configuration) {
6
+ const { marshallOptions = {}, unmarshallOptions = {} } = configuration.translateConfig || {};
7
+ marshallOptions.convertTopLevelContainer = marshallOptions.convertTopLevelContainer ?? true;
8
+ unmarshallOptions.convertWithoutMapWrapper = unmarshallOptions.convertWithoutMapWrapper ?? true;
9
+ this.clientCommand.middlewareStack.addRelativeTo((next, context) => async (args) => {
10
+ setFeature(context, "DDB_MAPPER", "d");
11
+ return next({
12
+ ...args,
13
+ input: marshallInput(args.input, this.inputKeyNodes, marshallOptions),
14
+ });
15
+ }, {
16
+ name: "DocumentMarshall",
17
+ relation: "before",
18
+ toMiddleware: "serializerMiddleware",
19
+ override: true,
20
+ });
21
+ this.clientCommand.middlewareStack.addRelativeTo((next, context) => async (args) => {
22
+ const deserialized = await next(args);
23
+ deserialized.output = unmarshallOutput(deserialized.output, this.outputKeyNodes, unmarshallOptions);
24
+ return deserialized;
25
+ }, {
26
+ name: "DocumentUnmarshall",
27
+ relation: "before",
28
+ toMiddleware: "deserializerMiddleware",
29
+ override: true,
30
+ });
31
+ }
32
+ }
@@ -0,0 +1,39 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { DynamoDBDocumentClientCommand } from "../baseCommand/DynamoDBDocumentClientCommand";
3
+ import { ALL_MEMBERS, ALL_VALUES } from "../commands/utils";
4
+ import { BatchExecuteStatementCommand as __BatchExecuteStatementCommand } from "@aws-sdk/client-dynamodb";
5
+ export { DynamoDBDocumentClientCommand, $Command };
6
+ export class BatchExecuteStatementCommand extends DynamoDBDocumentClientCommand {
7
+ input;
8
+ inputKeyNodes = {
9
+ 'Statements': {
10
+ '*': {
11
+ 'Parameters': ALL_MEMBERS,
12
+ }
13
+ },
14
+ };
15
+ outputKeyNodes = {
16
+ 'Responses': {
17
+ '*': {
18
+ 'Error': {
19
+ 'Item': ALL_VALUES,
20
+ },
21
+ 'Item': ALL_VALUES,
22
+ }
23
+ },
24
+ };
25
+ clientCommand;
26
+ middlewareStack;
27
+ constructor(input) {
28
+ super();
29
+ this.input = input;
30
+ this.clientCommand = new __BatchExecuteStatementCommand(this.input);
31
+ this.middlewareStack = this.clientCommand.middlewareStack;
32
+ }
33
+ resolveMiddleware(clientStack, configuration, options) {
34
+ this.addMarshallingMiddleware(configuration);
35
+ const stack = clientStack.concat(this.middlewareStack);
36
+ const handler = this.clientCommand.resolveMiddleware(stack, configuration, options);
37
+ return async () => handler(this.clientCommand);
38
+ }
39
+ }
@@ -0,0 +1,45 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { DynamoDBDocumentClientCommand } from "../baseCommand/DynamoDBDocumentClientCommand";
3
+ import { ALL_VALUES } from "../commands/utils";
4
+ import { BatchGetItemCommand as __BatchGetItemCommand } from "@aws-sdk/client-dynamodb";
5
+ export { DynamoDBDocumentClientCommand, $Command };
6
+ export class BatchGetCommand extends DynamoDBDocumentClientCommand {
7
+ input;
8
+ inputKeyNodes = {
9
+ 'RequestItems': {
10
+ '*': {
11
+ 'Keys': {
12
+ '*': ALL_VALUES
13
+ },
14
+ }
15
+ },
16
+ };
17
+ outputKeyNodes = {
18
+ 'Responses': {
19
+ '*': {
20
+ '*': ALL_VALUES
21
+ }
22
+ },
23
+ 'UnprocessedKeys': {
24
+ '*': {
25
+ 'Keys': {
26
+ '*': ALL_VALUES
27
+ },
28
+ }
29
+ },
30
+ };
31
+ clientCommand;
32
+ middlewareStack;
33
+ constructor(input) {
34
+ super();
35
+ this.input = input;
36
+ this.clientCommand = new __BatchGetItemCommand(this.input);
37
+ this.middlewareStack = this.clientCommand.middlewareStack;
38
+ }
39
+ resolveMiddleware(clientStack, configuration, options) {
40
+ this.addMarshallingMiddleware(configuration);
41
+ const stack = clientStack.concat(this.middlewareStack);
42
+ const handler = this.clientCommand.resolveMiddleware(stack, configuration, options);
43
+ return async () => handler(this.clientCommand);
44
+ }
45
+ }
@@ -0,0 +1,57 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { DynamoDBDocumentClientCommand } from "../baseCommand/DynamoDBDocumentClientCommand";
3
+ import { ALL_VALUES } from "../commands/utils";
4
+ import { BatchWriteItemCommand as __BatchWriteItemCommand } from "@aws-sdk/client-dynamodb";
5
+ export { DynamoDBDocumentClientCommand, $Command };
6
+ export class BatchWriteCommand extends DynamoDBDocumentClientCommand {
7
+ input;
8
+ inputKeyNodes = {
9
+ 'RequestItems': {
10
+ '*': {
11
+ '*': {
12
+ 'PutRequest': {
13
+ 'Item': ALL_VALUES,
14
+ },
15
+ 'DeleteRequest': {
16
+ 'Key': ALL_VALUES,
17
+ },
18
+ }
19
+ }
20
+ },
21
+ };
22
+ outputKeyNodes = {
23
+ 'UnprocessedItems': {
24
+ '*': {
25
+ '*': {
26
+ 'PutRequest': {
27
+ 'Item': ALL_VALUES,
28
+ },
29
+ 'DeleteRequest': {
30
+ 'Key': ALL_VALUES,
31
+ },
32
+ }
33
+ }
34
+ },
35
+ 'ItemCollectionMetrics': {
36
+ '*': {
37
+ '*': {
38
+ 'ItemCollectionKey': ALL_VALUES,
39
+ }
40
+ }
41
+ },
42
+ };
43
+ clientCommand;
44
+ middlewareStack;
45
+ constructor(input) {
46
+ super();
47
+ this.input = input;
48
+ this.clientCommand = new __BatchWriteItemCommand(this.input);
49
+ this.middlewareStack = this.clientCommand.middlewareStack;
50
+ }
51
+ resolveMiddleware(clientStack, configuration, options) {
52
+ this.addMarshallingMiddleware(configuration);
53
+ const stack = clientStack.concat(this.middlewareStack);
54
+ const handler = this.clientCommand.resolveMiddleware(stack, configuration, options);
55
+ return async () => handler(this.clientCommand);
56
+ }
57
+ }
@@ -0,0 +1,38 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { DynamoDBDocumentClientCommand } from "../baseCommand/DynamoDBDocumentClientCommand";
3
+ import { ALL_MEMBERS, ALL_VALUES, SELF } from "../commands/utils";
4
+ import { DeleteItemCommand as __DeleteItemCommand } from "@aws-sdk/client-dynamodb";
5
+ export { DynamoDBDocumentClientCommand, $Command };
6
+ export class DeleteCommand extends DynamoDBDocumentClientCommand {
7
+ input;
8
+ inputKeyNodes = {
9
+ 'Key': ALL_VALUES,
10
+ 'Expected': {
11
+ '*': {
12
+ 'Value': SELF,
13
+ 'AttributeValueList': ALL_MEMBERS,
14
+ }
15
+ },
16
+ 'ExpressionAttributeValues': ALL_VALUES,
17
+ };
18
+ outputKeyNodes = {
19
+ 'Attributes': ALL_VALUES,
20
+ 'ItemCollectionMetrics': {
21
+ 'ItemCollectionKey': ALL_VALUES,
22
+ },
23
+ };
24
+ clientCommand;
25
+ middlewareStack;
26
+ constructor(input) {
27
+ super();
28
+ this.input = input;
29
+ this.clientCommand = new __DeleteItemCommand(this.input);
30
+ this.middlewareStack = this.clientCommand.middlewareStack;
31
+ }
32
+ resolveMiddleware(clientStack, configuration, options) {
33
+ this.addMarshallingMiddleware(configuration);
34
+ const stack = clientStack.concat(this.middlewareStack);
35
+ const handler = this.clientCommand.resolveMiddleware(stack, configuration, options);
36
+ return async () => handler(this.clientCommand);
37
+ }
38
+ }
@@ -0,0 +1,31 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { DynamoDBDocumentClientCommand } from "../baseCommand/DynamoDBDocumentClientCommand";
3
+ import { ALL_MEMBERS, ALL_VALUES } from "../commands/utils";
4
+ import { ExecuteStatementCommand as __ExecuteStatementCommand } from "@aws-sdk/client-dynamodb";
5
+ export { DynamoDBDocumentClientCommand, $Command };
6
+ export class ExecuteStatementCommand extends DynamoDBDocumentClientCommand {
7
+ input;
8
+ inputKeyNodes = {
9
+ 'Parameters': ALL_MEMBERS,
10
+ };
11
+ outputKeyNodes = {
12
+ 'Items': {
13
+ '*': ALL_VALUES
14
+ },
15
+ 'LastEvaluatedKey': ALL_VALUES,
16
+ };
17
+ clientCommand;
18
+ middlewareStack;
19
+ constructor(input) {
20
+ super();
21
+ this.input = input;
22
+ this.clientCommand = new __ExecuteStatementCommand(this.input);
23
+ this.middlewareStack = this.clientCommand.middlewareStack;
24
+ }
25
+ resolveMiddleware(clientStack, configuration, options) {
26
+ this.addMarshallingMiddleware(configuration);
27
+ const stack = clientStack.concat(this.middlewareStack);
28
+ const handler = this.clientCommand.resolveMiddleware(stack, configuration, options);
29
+ return async () => handler(this.clientCommand);
30
+ }
31
+ }
@@ -0,0 +1,36 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { DynamoDBDocumentClientCommand } from "../baseCommand/DynamoDBDocumentClientCommand";
3
+ import { ALL_MEMBERS, ALL_VALUES } from "../commands/utils";
4
+ import { ExecuteTransactionCommand as __ExecuteTransactionCommand } from "@aws-sdk/client-dynamodb";
5
+ export { DynamoDBDocumentClientCommand, $Command };
6
+ export class ExecuteTransactionCommand extends DynamoDBDocumentClientCommand {
7
+ input;
8
+ inputKeyNodes = {
9
+ 'TransactStatements': {
10
+ '*': {
11
+ 'Parameters': ALL_MEMBERS,
12
+ }
13
+ },
14
+ };
15
+ outputKeyNodes = {
16
+ 'Responses': {
17
+ '*': {
18
+ 'Item': ALL_VALUES,
19
+ }
20
+ },
21
+ };
22
+ clientCommand;
23
+ middlewareStack;
24
+ constructor(input) {
25
+ super();
26
+ this.input = input;
27
+ this.clientCommand = new __ExecuteTransactionCommand(this.input);
28
+ this.middlewareStack = this.clientCommand.middlewareStack;
29
+ }
30
+ resolveMiddleware(clientStack, configuration, options) {
31
+ this.addMarshallingMiddleware(configuration);
32
+ const stack = clientStack.concat(this.middlewareStack);
33
+ const handler = this.clientCommand.resolveMiddleware(stack, configuration, options);
34
+ return async () => handler(this.clientCommand);
35
+ }
36
+ }
@@ -0,0 +1,28 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { DynamoDBDocumentClientCommand } from "../baseCommand/DynamoDBDocumentClientCommand";
3
+ import { ALL_VALUES } from "../commands/utils";
4
+ import { GetItemCommand as __GetItemCommand } from "@aws-sdk/client-dynamodb";
5
+ export { DynamoDBDocumentClientCommand, $Command };
6
+ export class GetCommand extends DynamoDBDocumentClientCommand {
7
+ input;
8
+ inputKeyNodes = {
9
+ 'Key': ALL_VALUES,
10
+ };
11
+ outputKeyNodes = {
12
+ 'Item': ALL_VALUES,
13
+ };
14
+ clientCommand;
15
+ middlewareStack;
16
+ constructor(input) {
17
+ super();
18
+ this.input = input;
19
+ this.clientCommand = new __GetItemCommand(this.input);
20
+ this.middlewareStack = this.clientCommand.middlewareStack;
21
+ }
22
+ resolveMiddleware(clientStack, configuration, options) {
23
+ this.addMarshallingMiddleware(configuration);
24
+ const stack = clientStack.concat(this.middlewareStack);
25
+ const handler = this.clientCommand.resolveMiddleware(stack, configuration, options);
26
+ return async () => handler(this.clientCommand);
27
+ }
28
+ }
@@ -0,0 +1,38 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { DynamoDBDocumentClientCommand } from "../baseCommand/DynamoDBDocumentClientCommand";
3
+ import { ALL_MEMBERS, ALL_VALUES, SELF } from "../commands/utils";
4
+ import { PutItemCommand as __PutItemCommand } from "@aws-sdk/client-dynamodb";
5
+ export { DynamoDBDocumentClientCommand, $Command };
6
+ export class PutCommand extends DynamoDBDocumentClientCommand {
7
+ input;
8
+ inputKeyNodes = {
9
+ 'Item': ALL_VALUES,
10
+ 'Expected': {
11
+ '*': {
12
+ 'Value': SELF,
13
+ 'AttributeValueList': ALL_MEMBERS,
14
+ }
15
+ },
16
+ 'ExpressionAttributeValues': ALL_VALUES,
17
+ };
18
+ outputKeyNodes = {
19
+ 'Attributes': ALL_VALUES,
20
+ 'ItemCollectionMetrics': {
21
+ 'ItemCollectionKey': ALL_VALUES,
22
+ },
23
+ };
24
+ clientCommand;
25
+ middlewareStack;
26
+ constructor(input) {
27
+ super();
28
+ this.input = input;
29
+ this.clientCommand = new __PutItemCommand(this.input);
30
+ this.middlewareStack = this.clientCommand.middlewareStack;
31
+ }
32
+ resolveMiddleware(clientStack, configuration, options) {
33
+ this.addMarshallingMiddleware(configuration);
34
+ const stack = clientStack.concat(this.middlewareStack);
35
+ const handler = this.clientCommand.resolveMiddleware(stack, configuration, options);
36
+ return async () => handler(this.clientCommand);
37
+ }
38
+ }
@@ -0,0 +1,42 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { DynamoDBDocumentClientCommand } from "../baseCommand/DynamoDBDocumentClientCommand";
3
+ import { ALL_MEMBERS, ALL_VALUES } from "../commands/utils";
4
+ import { QueryCommand as __QueryCommand } from "@aws-sdk/client-dynamodb";
5
+ export { DynamoDBDocumentClientCommand, $Command };
6
+ export class QueryCommand extends DynamoDBDocumentClientCommand {
7
+ input;
8
+ inputKeyNodes = {
9
+ 'KeyConditions': {
10
+ '*': {
11
+ 'AttributeValueList': ALL_MEMBERS,
12
+ }
13
+ },
14
+ 'QueryFilter': {
15
+ '*': {
16
+ 'AttributeValueList': ALL_MEMBERS,
17
+ }
18
+ },
19
+ 'ExclusiveStartKey': ALL_VALUES,
20
+ 'ExpressionAttributeValues': ALL_VALUES,
21
+ };
22
+ outputKeyNodes = {
23
+ 'Items': {
24
+ '*': ALL_VALUES
25
+ },
26
+ 'LastEvaluatedKey': ALL_VALUES,
27
+ };
28
+ clientCommand;
29
+ middlewareStack;
30
+ constructor(input) {
31
+ super();
32
+ this.input = input;
33
+ this.clientCommand = new __QueryCommand(this.input);
34
+ this.middlewareStack = this.clientCommand.middlewareStack;
35
+ }
36
+ resolveMiddleware(clientStack, configuration, options) {
37
+ this.addMarshallingMiddleware(configuration);
38
+ const stack = clientStack.concat(this.middlewareStack);
39
+ const handler = this.clientCommand.resolveMiddleware(stack, configuration, options);
40
+ return async () => handler(this.clientCommand);
41
+ }
42
+ }
@@ -0,0 +1,37 @@
1
+ import { Command as $Command } from "@smithy/smithy-client";
2
+ import { DynamoDBDocumentClientCommand } from "../baseCommand/DynamoDBDocumentClientCommand";
3
+ import { ALL_MEMBERS, ALL_VALUES } from "../commands/utils";
4
+ import { ScanCommand as __ScanCommand } from "@aws-sdk/client-dynamodb";
5
+ export { DynamoDBDocumentClientCommand, $Command };
6
+ export class ScanCommand extends DynamoDBDocumentClientCommand {
7
+ input;
8
+ inputKeyNodes = {
9
+ 'ScanFilter': {
10
+ '*': {
11
+ 'AttributeValueList': ALL_MEMBERS,
12
+ }
13
+ },
14
+ 'ExclusiveStartKey': ALL_VALUES,
15
+ 'ExpressionAttributeValues': ALL_VALUES,
16
+ };
17
+ outputKeyNodes = {
18
+ 'Items': {
19
+ '*': ALL_VALUES
20
+ },
21
+ 'LastEvaluatedKey': ALL_VALUES,
22
+ };
23
+ clientCommand;
24
+ middlewareStack;
25
+ constructor(input) {
26
+ super();
27
+ this.input = input;
28
+ this.clientCommand = new __ScanCommand(this.input);
29
+ this.middlewareStack = this.clientCommand.middlewareStack;
30
+ }
31
+ resolveMiddleware(clientStack, configuration, options) {
32
+ this.addMarshallingMiddleware(configuration);
33
+ const stack = clientStack.concat(this.middlewareStack);
34
+ const handler = this.clientCommand.resolveMiddleware(stack, configuration, options);
35
+ return async () => handler(this.clientCommand);
36
+ }
37
+ }