@aws-sdk/lib-dynamodb 3.490.0 → 3.495.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.
@@ -1,44 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.QueryCommand = exports.$Command = exports.DynamoDBDocumentClientCommand = void 0;
4
- const client_dynamodb_1 = require("@aws-sdk/client-dynamodb");
5
- const smithy_client_1 = require("@smithy/smithy-client");
6
- Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
7
- const DynamoDBDocumentClientCommand_1 = require("../baseCommand/DynamoDBDocumentClientCommand");
8
- Object.defineProperty(exports, "DynamoDBDocumentClientCommand", { enumerable: true, get: function () { return DynamoDBDocumentClientCommand_1.DynamoDBDocumentClientCommand; } });
9
- const utils_1 = require("../commands/utils");
10
- class QueryCommand extends DynamoDBDocumentClientCommand_1.DynamoDBDocumentClientCommand {
11
- constructor(input) {
12
- super();
13
- this.input = input;
14
- this.inputKeyNodes = {
15
- KeyConditions: {
16
- "*": {
17
- AttributeValueList: utils_1.ALL_MEMBERS,
18
- },
19
- },
20
- QueryFilter: {
21
- "*": {
22
- AttributeValueList: utils_1.ALL_MEMBERS,
23
- },
24
- },
25
- ExclusiveStartKey: utils_1.ALL_VALUES,
26
- ExpressionAttributeValues: utils_1.ALL_VALUES,
27
- };
28
- this.outputKeyNodes = {
29
- Items: {
30
- "*": utils_1.ALL_VALUES,
31
- },
32
- LastEvaluatedKey: utils_1.ALL_VALUES,
33
- };
34
- this.clientCommand = new client_dynamodb_1.QueryCommand(this.input);
35
- this.middlewareStack = this.clientCommand.middlewareStack;
36
- }
37
- resolveMiddleware(clientStack, configuration, options) {
38
- this.addMarshallingMiddleware(configuration);
39
- const stack = clientStack.concat(this.middlewareStack);
40
- const handler = this.clientCommand.resolveMiddleware(stack, configuration, options);
41
- return async () => handler(this.clientCommand);
42
- }
43
- }
44
- exports.QueryCommand = QueryCommand;
1
+ module.exports = require("../index.js");
@@ -1,39 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ScanCommand = exports.$Command = exports.DynamoDBDocumentClientCommand = void 0;
4
- const client_dynamodb_1 = require("@aws-sdk/client-dynamodb");
5
- const smithy_client_1 = require("@smithy/smithy-client");
6
- Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
7
- const DynamoDBDocumentClientCommand_1 = require("../baseCommand/DynamoDBDocumentClientCommand");
8
- Object.defineProperty(exports, "DynamoDBDocumentClientCommand", { enumerable: true, get: function () { return DynamoDBDocumentClientCommand_1.DynamoDBDocumentClientCommand; } });
9
- const utils_1 = require("../commands/utils");
10
- class ScanCommand extends DynamoDBDocumentClientCommand_1.DynamoDBDocumentClientCommand {
11
- constructor(input) {
12
- super();
13
- this.input = input;
14
- this.inputKeyNodes = {
15
- ScanFilter: {
16
- "*": {
17
- AttributeValueList: utils_1.ALL_MEMBERS,
18
- },
19
- },
20
- ExclusiveStartKey: utils_1.ALL_VALUES,
21
- ExpressionAttributeValues: utils_1.ALL_VALUES,
22
- };
23
- this.outputKeyNodes = {
24
- Items: {
25
- "*": utils_1.ALL_VALUES,
26
- },
27
- LastEvaluatedKey: utils_1.ALL_VALUES,
28
- };
29
- this.clientCommand = new client_dynamodb_1.ScanCommand(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
- }
39
- exports.ScanCommand = ScanCommand;
1
+ module.exports = require("../index.js");
@@ -1,40 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TransactGetCommand = exports.$Command = exports.DynamoDBDocumentClientCommand = void 0;
4
- const client_dynamodb_1 = require("@aws-sdk/client-dynamodb");
5
- const smithy_client_1 = require("@smithy/smithy-client");
6
- Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
7
- const DynamoDBDocumentClientCommand_1 = require("../baseCommand/DynamoDBDocumentClientCommand");
8
- Object.defineProperty(exports, "DynamoDBDocumentClientCommand", { enumerable: true, get: function () { return DynamoDBDocumentClientCommand_1.DynamoDBDocumentClientCommand; } });
9
- const utils_1 = require("../commands/utils");
10
- class TransactGetCommand extends DynamoDBDocumentClientCommand_1.DynamoDBDocumentClientCommand {
11
- constructor(input) {
12
- super();
13
- this.input = input;
14
- this.inputKeyNodes = {
15
- TransactItems: {
16
- "*": {
17
- Get: {
18
- Key: utils_1.ALL_VALUES,
19
- },
20
- },
21
- },
22
- };
23
- this.outputKeyNodes = {
24
- Responses: {
25
- "*": {
26
- Item: utils_1.ALL_VALUES,
27
- },
28
- },
29
- };
30
- this.clientCommand = new client_dynamodb_1.TransactGetItemsCommand(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
- }
40
- exports.TransactGetCommand = TransactGetCommand;
1
+ module.exports = require("../index.js");
@@ -1,55 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TransactWriteCommand = exports.$Command = exports.DynamoDBDocumentClientCommand = void 0;
4
- const client_dynamodb_1 = require("@aws-sdk/client-dynamodb");
5
- const smithy_client_1 = require("@smithy/smithy-client");
6
- Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
7
- const DynamoDBDocumentClientCommand_1 = require("../baseCommand/DynamoDBDocumentClientCommand");
8
- Object.defineProperty(exports, "DynamoDBDocumentClientCommand", { enumerable: true, get: function () { return DynamoDBDocumentClientCommand_1.DynamoDBDocumentClientCommand; } });
9
- const utils_1 = require("../commands/utils");
10
- class TransactWriteCommand extends DynamoDBDocumentClientCommand_1.DynamoDBDocumentClientCommand {
11
- constructor(input) {
12
- super();
13
- this.input = input;
14
- this.inputKeyNodes = {
15
- TransactItems: {
16
- "*": {
17
- ConditionCheck: {
18
- Key: utils_1.ALL_VALUES,
19
- ExpressionAttributeValues: utils_1.ALL_VALUES,
20
- },
21
- Put: {
22
- Item: utils_1.ALL_VALUES,
23
- ExpressionAttributeValues: utils_1.ALL_VALUES,
24
- },
25
- Delete: {
26
- Key: utils_1.ALL_VALUES,
27
- ExpressionAttributeValues: utils_1.ALL_VALUES,
28
- },
29
- Update: {
30
- Key: utils_1.ALL_VALUES,
31
- ExpressionAttributeValues: utils_1.ALL_VALUES,
32
- },
33
- },
34
- },
35
- };
36
- this.outputKeyNodes = {
37
- ItemCollectionMetrics: {
38
- "*": {
39
- "*": {
40
- ItemCollectionKey: utils_1.ALL_VALUES,
41
- },
42
- },
43
- },
44
- };
45
- this.clientCommand = new client_dynamodb_1.TransactWriteItemsCommand(this.input);
46
- this.middlewareStack = this.clientCommand.middlewareStack;
47
- }
48
- resolveMiddleware(clientStack, configuration, options) {
49
- this.addMarshallingMiddleware(configuration);
50
- const stack = clientStack.concat(this.middlewareStack);
51
- const handler = this.clientCommand.resolveMiddleware(stack, configuration, options);
52
- return async () => handler(this.clientCommand);
53
- }
54
- }
55
- exports.TransactWriteCommand = TransactWriteCommand;
1
+ module.exports = require("../index.js");
@@ -1,45 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UpdateCommand = exports.$Command = exports.DynamoDBDocumentClientCommand = void 0;
4
- const client_dynamodb_1 = require("@aws-sdk/client-dynamodb");
5
- const smithy_client_1 = require("@smithy/smithy-client");
6
- Object.defineProperty(exports, "$Command", { enumerable: true, get: function () { return smithy_client_1.Command; } });
7
- const DynamoDBDocumentClientCommand_1 = require("../baseCommand/DynamoDBDocumentClientCommand");
8
- Object.defineProperty(exports, "DynamoDBDocumentClientCommand", { enumerable: true, get: function () { return DynamoDBDocumentClientCommand_1.DynamoDBDocumentClientCommand; } });
9
- const utils_1 = require("../commands/utils");
10
- class UpdateCommand extends DynamoDBDocumentClientCommand_1.DynamoDBDocumentClientCommand {
11
- constructor(input) {
12
- super();
13
- this.input = input;
14
- this.inputKeyNodes = {
15
- Key: utils_1.ALL_VALUES,
16
- AttributeUpdates: {
17
- "*": {
18
- Value: utils_1.SELF,
19
- },
20
- },
21
- Expected: {
22
- "*": {
23
- Value: utils_1.SELF,
24
- AttributeValueList: utils_1.ALL_MEMBERS,
25
- },
26
- },
27
- ExpressionAttributeValues: utils_1.ALL_VALUES,
28
- };
29
- this.outputKeyNodes = {
30
- Attributes: utils_1.ALL_VALUES,
31
- ItemCollectionMetrics: {
32
- ItemCollectionKey: utils_1.ALL_VALUES,
33
- },
34
- };
35
- this.clientCommand = new client_dynamodb_1.UpdateItemCommand(this.input);
36
- this.middlewareStack = this.clientCommand.middlewareStack;
37
- }
38
- resolveMiddleware(clientStack, configuration, options) {
39
- this.addMarshallingMiddleware(configuration);
40
- const stack = clientStack.concat(this.middlewareStack);
41
- const handler = this.clientCommand.resolveMiddleware(stack, configuration, options);
42
- return async () => handler(this.clientCommand);
43
- }
44
- }
45
- exports.UpdateCommand = UpdateCommand;
1
+ module.exports = require("../index.js");
@@ -1,16 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./BatchExecuteStatementCommand"), exports);
5
- tslib_1.__exportStar(require("./BatchGetCommand"), exports);
6
- tslib_1.__exportStar(require("./BatchWriteCommand"), exports);
7
- tslib_1.__exportStar(require("./DeleteCommand"), exports);
8
- tslib_1.__exportStar(require("./ExecuteStatementCommand"), exports);
9
- tslib_1.__exportStar(require("./ExecuteTransactionCommand"), exports);
10
- tslib_1.__exportStar(require("./GetCommand"), exports);
11
- tslib_1.__exportStar(require("./PutCommand"), exports);
12
- tslib_1.__exportStar(require("./QueryCommand"), exports);
13
- tslib_1.__exportStar(require("./ScanCommand"), exports);
14
- tslib_1.__exportStar(require("./TransactGetCommand"), exports);
15
- tslib_1.__exportStar(require("./TransactWriteCommand"), exports);
16
- tslib_1.__exportStar(require("./UpdateCommand"), exports);
1
+ module.exports = require("../index.js");
@@ -1,72 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.unmarshallOutput = exports.marshallInput = exports.ALL_MEMBERS = exports.ALL_VALUES = exports.SELF = void 0;
4
- const util_dynamodb_1 = require("@aws-sdk/util-dynamodb");
5
- exports.SELF = null;
6
- exports.ALL_VALUES = {};
7
- exports.ALL_MEMBERS = [];
8
- const NEXT_LEVEL = "*";
9
- const processObj = (obj, processFunc, keyNodes) => {
10
- if (obj !== undefined) {
11
- if (keyNodes == null) {
12
- return processFunc(obj);
13
- }
14
- else {
15
- const keys = Object.keys(keyNodes);
16
- const goToNextLevel = keys.length === 1 && keys[0] === NEXT_LEVEL;
17
- const someChildren = keys.length >= 1 && !goToNextLevel;
18
- const allChildren = keys.length === 0;
19
- if (someChildren) {
20
- return processKeysInObj(obj, processFunc, keyNodes);
21
- }
22
- else if (allChildren) {
23
- return processAllKeysInObj(obj, processFunc, exports.SELF);
24
- }
25
- else if (goToNextLevel) {
26
- return Object.entries(obj !== null && obj !== void 0 ? obj : {}).reduce((acc, [k, v]) => {
27
- acc[k] = processObj(v, processFunc, keyNodes[NEXT_LEVEL]);
28
- return acc;
29
- }, (Array.isArray(obj) ? [] : {}));
30
- }
31
- }
32
- }
33
- return undefined;
34
- };
35
- const processKeysInObj = (obj, processFunc, keyNodes) => {
36
- let accumulator;
37
- if (Array.isArray(obj)) {
38
- accumulator = [...obj];
39
- }
40
- else {
41
- accumulator = { ...obj };
42
- }
43
- for (const [nodeKey, nodes] of Object.entries(keyNodes)) {
44
- const processedValue = processObj(obj[nodeKey], processFunc, nodes);
45
- if (processedValue !== undefined) {
46
- accumulator[nodeKey] = processedValue;
47
- }
48
- }
49
- return accumulator;
50
- };
51
- const processAllKeysInObj = (obj, processFunc, keyNodes) => {
52
- if (Array.isArray(obj)) {
53
- return obj.map((item) => processObj(item, processFunc, keyNodes));
54
- }
55
- return Object.entries(obj).reduce((acc, [key, value]) => {
56
- const processedValue = processObj(value, processFunc, keyNodes);
57
- if (processedValue !== undefined) {
58
- acc[key] = processedValue;
59
- }
60
- return acc;
61
- }, {});
62
- };
63
- const marshallInput = (obj, keyNodes, options) => {
64
- const marshallFunc = (toMarshall) => (0, util_dynamodb_1.marshall)(toMarshall, options);
65
- return processKeysInObj(obj, marshallFunc, keyNodes);
66
- };
67
- exports.marshallInput = marshallInput;
68
- const unmarshallOutput = (obj, keyNodes, options) => {
69
- const unmarshallFunc = (toMarshall) => (0, util_dynamodb_1.unmarshall)(toMarshall, options);
70
- return processKeysInObj(obj, unmarshallFunc, keyNodes);
71
- };
72
- exports.unmarshallOutput = unmarshallOutput;
1
+ module.exports = require("../index.js");