@infra-blocks/aws-dynamodb 0.82.0 → 0.83.0-alpha.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/lib/cjs/client.d.ts +16 -3
- package/lib/cjs/client.js +20 -2
- package/lib/cjs/client.js.map +1 -1
- package/lib/cjs/commands/command.d.ts +2 -1
- package/lib/cjs/commands/command.js.map +1 -1
- package/lib/cjs/commands/index.d.ts +3 -2
- package/lib/cjs/commands/index.js +3 -1
- package/lib/cjs/commands/index.js.map +1 -1
- package/lib/cjs/commands/inputs/index.d.ts +1 -0
- package/lib/cjs/commands/inputs/index.js +1 -0
- package/lib/cjs/commands/inputs/index.js.map +1 -1
- package/lib/cjs/commands/inputs/query.d.ts +33 -0
- package/lib/cjs/commands/inputs/query.js.map +1 -1
- package/lib/cjs/commands/inputs/scan.d.ts +55 -0
- package/lib/cjs/commands/inputs/scan.js +28 -0
- package/lib/cjs/commands/inputs/scan.js.map +1 -0
- package/lib/cjs/commands/outputs/index.d.ts +1 -0
- package/lib/cjs/commands/outputs/index.js +1 -0
- package/lib/cjs/commands/outputs/index.js.map +1 -1
- package/lib/cjs/commands/outputs/scan.d.ts +15 -0
- package/lib/cjs/commands/outputs/scan.js +21 -0
- package/lib/cjs/commands/outputs/scan.js.map +1 -0
- package/lib/cjs/commands/scan.d.ts +8 -0
- package/lib/cjs/commands/scan.js +21 -0
- package/lib/cjs/commands/scan.js.map +1 -0
- package/lib/esm/client.d.ts +16 -3
- package/lib/esm/client.js +21 -3
- package/lib/esm/client.js.map +1 -1
- package/lib/esm/commands/command.d.ts +2 -1
- package/lib/esm/commands/command.js.map +1 -1
- package/lib/esm/commands/index.d.ts +3 -2
- package/lib/esm/commands/index.js +1 -0
- package/lib/esm/commands/index.js.map +1 -1
- package/lib/esm/commands/inputs/index.d.ts +1 -0
- package/lib/esm/commands/inputs/index.js +1 -0
- package/lib/esm/commands/inputs/index.js.map +1 -1
- package/lib/esm/commands/inputs/query.d.ts +33 -0
- package/lib/esm/commands/inputs/query.js.map +1 -1
- package/lib/esm/commands/inputs/scan.d.ts +55 -0
- package/lib/esm/commands/inputs/scan.js +25 -0
- package/lib/esm/commands/inputs/scan.js.map +1 -0
- package/lib/esm/commands/outputs/index.d.ts +1 -0
- package/lib/esm/commands/outputs/index.js +1 -0
- package/lib/esm/commands/outputs/index.js.map +1 -1
- package/lib/esm/commands/outputs/scan.d.ts +15 -0
- package/lib/esm/commands/outputs/scan.js +18 -0
- package/lib/esm/commands/outputs/scan.js.map +1 -0
- package/lib/esm/commands/scan.d.ts +8 -0
- package/lib/esm/commands/scan.js +17 -0
- package/lib/esm/commands/scan.js.map +1 -0
- package/package.json +1 -1
package/lib/cjs/client.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type AttributeValue, type DynamoDBClientConfig } from "@aws-sdk/client-dynamodb";
|
|
2
2
|
import type { Logger } from "@infra-blocks/logger-interface";
|
|
3
3
|
import { type Retry, type RetryConfig } from "@infra-blocks/retry";
|
|
4
|
-
import { type CommandOutput, type CreateTableInput, type CreateTableOutput, type DeleteItemInput, type DeleteItemOutput, type DeleteTableInput, type DeleteTableOutput, type DynamoDbClientCommand, type GetItemInput, type GetItemOutput, type PutItemInput, type PutItemOutput, type QueryInput, type QueryOutput, type UpdateItemInput, type UpdateItemOutput, type UpdateTimeToLiveInput, type UpdateTimeToLiveOutput, type WriteTransactionInput, type WriteTransactionOutput } from "./commands/index.js";
|
|
4
|
+
import { type CommandOutput, type CreateTableInput, type CreateTableOutput, type DeleteItemInput, type DeleteItemOutput, type DeleteTableInput, type DeleteTableOutput, type DynamoDbClientCommand, type GetItemInput, type GetItemOutput, type PutItemInput, type PutItemOutput, type QueryInput, type QueryOutput, type ScanInput, type ScanOutput, type UpdateItemInput, type UpdateItemOutput, type UpdateTimeToLiveInput, type UpdateTimeToLiveOutput, type WriteTransactionInput, type WriteTransactionOutput } from "./commands/index.js";
|
|
5
5
|
import type { Attributes, KeyAttributes, KeySchema } from "./types.js";
|
|
6
6
|
/**
|
|
7
7
|
* Re-export of the native client's, renamed.
|
|
@@ -117,8 +117,7 @@ export declare class DynamoDbClient {
|
|
|
117
117
|
*
|
|
118
118
|
* @param input - The parameters to use to query the table or index.
|
|
119
119
|
*
|
|
120
|
-
* @returns
|
|
121
|
-
* at a time, and that handles pagination automatically.
|
|
120
|
+
* @returns A page resulting from the query operation using the provided input.
|
|
122
121
|
*
|
|
123
122
|
* @see https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Query.html
|
|
124
123
|
*/
|
|
@@ -152,6 +151,20 @@ export declare class DynamoDbClient {
|
|
|
152
151
|
* @param options - Options to pass to the underlying retry mechanism.
|
|
153
152
|
*/
|
|
154
153
|
ready(options?: Omit<RetryConfig, "isRetryableError">): Retry<void>;
|
|
154
|
+
/**
|
|
155
|
+
* Scans a table, or an index, using the Scan API.
|
|
156
|
+
*
|
|
157
|
+
* It produces a single page of results, which may or may not contain all the
|
|
158
|
+
* items of the scan. If the result is incomplete, the {@link ScanOutput.lastEvaluatedKey}
|
|
159
|
+
* will be set, and should be used in a follow up scan as the {@link ScanInput.exclusiveStartKey}.
|
|
160
|
+
*
|
|
161
|
+
* @param input - The parameters to use to scan the table or index.
|
|
162
|
+
*
|
|
163
|
+
* @returns A page resulting from the scan operation using the provided input.
|
|
164
|
+
*
|
|
165
|
+
* @see https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Scan.html
|
|
166
|
+
*/
|
|
167
|
+
scan<T extends Attributes = Attributes, K extends KeyAttributes = KeyAttributes>(input: ScanInput<K>): Promise<ScanOutput<T, K>>;
|
|
155
168
|
send<C extends DynamoDbClientCommand>(command: C): Promise<CommandOutput<C>>;
|
|
156
169
|
/**
|
|
157
170
|
* Updates an item using the UpdateItem API.
|
package/lib/cjs/client.js
CHANGED
|
@@ -171,8 +171,7 @@ class DynamoDbClient {
|
|
|
171
171
|
*
|
|
172
172
|
* @param input - The parameters to use to query the table or index.
|
|
173
173
|
*
|
|
174
|
-
* @returns
|
|
175
|
-
* at a time, and that handles pagination automatically.
|
|
174
|
+
* @returns A page resulting from the query operation using the provided input.
|
|
176
175
|
*
|
|
177
176
|
* @see https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Query.html
|
|
178
177
|
*/
|
|
@@ -233,6 +232,25 @@ class DynamoDbClient {
|
|
|
233
232
|
},
|
|
234
233
|
});
|
|
235
234
|
}
|
|
235
|
+
/**
|
|
236
|
+
* Scans a table, or an index, using the Scan API.
|
|
237
|
+
*
|
|
238
|
+
* It produces a single page of results, which may or may not contain all the
|
|
239
|
+
* items of the scan. If the result is incomplete, the {@link ScanOutput.lastEvaluatedKey}
|
|
240
|
+
* will be set, and should be used in a follow up scan as the {@link ScanInput.exclusiveStartKey}.
|
|
241
|
+
*
|
|
242
|
+
* @param input - The parameters to use to scan the table or index.
|
|
243
|
+
*
|
|
244
|
+
* @returns A page resulting from the scan operation using the provided input.
|
|
245
|
+
*
|
|
246
|
+
* @see https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Scan.html
|
|
247
|
+
*/
|
|
248
|
+
scan(input) {
|
|
249
|
+
if (this.logger.isDebugEnabled()) {
|
|
250
|
+
this.logger.debug("scan(%s)", JSON.stringify(input));
|
|
251
|
+
}
|
|
252
|
+
return this.send(new index_js_1.Scan(input));
|
|
253
|
+
}
|
|
236
254
|
// TODO: without branding, one type equals all types...
|
|
237
255
|
async send(command) {
|
|
238
256
|
return (0, types_1.trusted)(command.execute({ client: this.client }));
|
package/lib/cjs/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":";;;AAAA,8DAKkC;AAClC,wDAA+D;AAC/D,0DAAoD;AAEpD,2DAAuD;AACvD,+CAA0E;AAC1E,+CAA8C;AAC9C,
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/client.ts"],"names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AA,eAAO,EACZ,IAAA,0BAAU,EAAC,IAAI,EAAE;YACf,GAAG,kBAAkB;YACrB,wBAAwB,EAAE,KAAK;SAChC,CAAC,CACH,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;OAWG;IACK,MAAM,CAAC,IAAI,CAAC,MAGnB;QACC,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,wBAAU,CAAC,MAAM,EAAE,EAAE,GAAG,MAAM,CAAC;QACxD,OAAO,IAAI,cAAc,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAChD,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,MAAM,CAAC,MAAM,CAAC,MAAqB;QACjC,MAAM,CAAC,GAAG,MAAM,IAAI,EAAE,CAAC;QACvB,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC;QACrB,MAAM,QAAQ,GAAG,IAAI,gCAAc,CAAC,CAAC,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC;QACtD,MAAM,MAAM,GAAG,qCAAsB,CAAC,IAAI,CAAC,QAAQ,EAAE,gBAAgB,CAAC,CAAC;QACvE,OAAO,cAAc,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACjD,CAAC;CACF;AA9bD,wCA8bC"}
|
|
@@ -4,7 +4,8 @@ import type { DeleteTable } from "./delete-table.js";
|
|
|
4
4
|
import type { GetItem } from "./get-item.js";
|
|
5
5
|
import type { PutItem } from "./put-item.js";
|
|
6
6
|
import type { Query } from "./query.js";
|
|
7
|
+
import type { Scan } from "./scan.js";
|
|
7
8
|
import type { UpdateItem } from "./update-item.js";
|
|
8
9
|
import type { UpdateTimeToLive } from "./update-time-to-live.js";
|
|
9
10
|
import type { WriteTransaction } from "./write-transaction.js";
|
|
10
|
-
export type DynamoDbClientCommand = DeleteItem | GetItem | CreateTable | DeleteTable | PutItem | Query | UpdateItem | UpdateTimeToLive | WriteTransaction;
|
|
11
|
+
export type DynamoDbClientCommand = DeleteItem | GetItem | CreateTable | DeleteTable | PutItem | Query | Scan | UpdateItem | UpdateTimeToLive | WriteTransaction;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.js","sourceRoot":"","sources":["../../../src/commands/command.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"command.js","sourceRoot":"","sources":["../../../src/commands/command.ts"],"names":[],"mappings":";;AAuBA,8CAA8C"}
|
|
@@ -5,10 +5,11 @@ export { DeleteItem } from "./delete-item.js";
|
|
|
5
5
|
export { DeleteTable } from "./delete-table.js";
|
|
6
6
|
export { type And, type AttributeExists, type AttributeNotExists, add, and, attributeExists, attributeNotExists, attributeType, type BeginsWith, type BeginsWithOperand, type BetweenInput, beginsWith, type ComparableValue, type ConditionComparisonInput, type ConditionFunction, type ConditionInput, type ConditionLogic, type Contains, contains, deleteFrom, type EqualsInput, type GreaterThanInput, type GreaterThanOrEqualsInput, type InInput, type IsAttributeOfType, ifNotExists, type KeyConditionComparisonInput, type KeyConditionFunction, type KeyConditionInput, type KeyConditionLogic, type LowerThanInput, type LowerThanOrEqualsInput, literal, type Not, type NotEqualsInput, not, type Or, or, type PathInput, type PathOrValueInput, type ProjectionInput, path, remove, set, size, type UpdateAction, type UpdateInput, type ValueInput, value, } from "./expressions/index.js";
|
|
7
7
|
export { GetItem } from "./get-item.js";
|
|
8
|
-
export type { ConditionCheckInput, CreateTableInput, DeleteItemInput, DeleteItemReturnValue, DeleteTableInput, GetItemConsumedCapacityReturnValue, GetItemInput, PutItemInput, QueryInput, UpdateItemInput, UpdateTimeToLiveInput, WriteTransactionDeleteItemInput, WriteTransactionInput, WriteTransactionPutItemInput, WriteTransactionUpdateItemInput, WriteTransactionWrite, } from "./inputs/index.js";
|
|
9
|
-
export type { CapacityUnits, ConsumedCapacity, CreateTableOutput, DeleteItemOutput, DeleteTableOutput, GetItemOutput, ItemCollectionMetrics, PutItemOutput, QueryOutput, UpdateItemOutput, UpdateTimeToLiveOutput, WriteTransactionOutput, } from "./outputs/index.js";
|
|
8
|
+
export type { ConditionCheckInput, CreateTableInput, DeleteItemInput, DeleteItemReturnValue, DeleteTableInput, GetItemConsumedCapacityReturnValue, GetItemInput, PutItemInput, QueryInput, ScanInput, UpdateItemInput, UpdateTimeToLiveInput, WriteTransactionDeleteItemInput, WriteTransactionInput, WriteTransactionPutItemInput, WriteTransactionUpdateItemInput, WriteTransactionWrite, } from "./inputs/index.js";
|
|
9
|
+
export type { CapacityUnits, ConsumedCapacity, CreateTableOutput, DeleteItemOutput, DeleteTableOutput, GetItemOutput, ItemCollectionMetrics, PutItemOutput, QueryOutput, ScanOutput, UpdateItemOutput, UpdateTimeToLiveOutput, WriteTransactionOutput, } from "./outputs/index.js";
|
|
10
10
|
export { PutItem } from "./put-item.js";
|
|
11
11
|
export { Query } from "./query.js";
|
|
12
|
+
export { Scan } from "./scan.js";
|
|
12
13
|
export { UpdateItem } from "./update-item.js";
|
|
13
14
|
export { UpdateTimeToLive } from "./update-time-to-live.js";
|
|
14
15
|
export { WriteTransaction } from "./write-transaction.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WriteTransaction = exports.UpdateTimeToLive = exports.UpdateItem = exports.Query = exports.PutItem = exports.GetItem = exports.value = exports.size = exports.set = exports.remove = exports.path = exports.or = exports.not = exports.literal = exports.ifNotExists = exports.deleteFrom = exports.contains = exports.beginsWith = exports.attributeType = exports.attributeNotExists = exports.attributeExists = exports.and = exports.add = exports.DeleteTable = exports.DeleteItem = exports.CreateTable = void 0;
|
|
3
|
+
exports.WriteTransaction = exports.UpdateTimeToLive = exports.UpdateItem = exports.Scan = exports.Query = exports.PutItem = exports.GetItem = exports.value = exports.size = exports.set = exports.remove = exports.path = exports.or = exports.not = exports.literal = exports.ifNotExists = exports.deleteFrom = exports.contains = exports.beginsWith = exports.attributeType = exports.attributeNotExists = exports.attributeExists = exports.and = exports.add = exports.DeleteTable = exports.DeleteItem = exports.CreateTable = void 0;
|
|
4
4
|
var create_table_js_1 = require("./create-table.js");
|
|
5
5
|
Object.defineProperty(exports, "CreateTable", { enumerable: true, get: function () { return create_table_js_1.CreateTable; } });
|
|
6
6
|
var delete_item_js_1 = require("./delete-item.js");
|
|
@@ -31,6 +31,8 @@ var put_item_js_1 = require("./put-item.js");
|
|
|
31
31
|
Object.defineProperty(exports, "PutItem", { enumerable: true, get: function () { return put_item_js_1.PutItem; } });
|
|
32
32
|
var query_js_1 = require("./query.js");
|
|
33
33
|
Object.defineProperty(exports, "Query", { enumerable: true, get: function () { return query_js_1.Query; } });
|
|
34
|
+
var scan_js_1 = require("./scan.js");
|
|
35
|
+
Object.defineProperty(exports, "Scan", { enumerable: true, get: function () { return scan_js_1.Scan; } });
|
|
34
36
|
var update_item_js_1 = require("./update-item.js");
|
|
35
37
|
Object.defineProperty(exports, "UpdateItem", { enumerable: true, get: function () { return update_item_js_1.UpdateItem; } });
|
|
36
38
|
var update_time_to_live_js_1 = require("./update-time-to-live.js");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/index.ts"],"names":[],"mappings":";;;AAEA,qDAAgD;AAAvC,8GAAA,WAAW,OAAA;AACpB,mDAA8C;AAArC,4GAAA,UAAU,OAAA;AACnB,qDAAgD;AAAvC,8GAAA,WAAW,OAAA;AACpB,mDAkDgC;AA9C9B,+FAAA,GAAG,OAAA;AACH,+FAAA,GAAG,OAAA;AACH,2GAAA,eAAe,OAAA;AACf,8GAAA,kBAAkB,OAAA;AAClB,yGAAA,aAAa,OAAA;AAIb,sGAAA,UAAU,OAAA;AAOV,oGAAA,QAAQ,OAAA;AACR,sGAAA,UAAU,OAAA;AAMV,uGAAA,WAAW,OAAA;AAOX,mGAAA,OAAO,OAAA;AAGP,+FAAA,GAAG,OAAA;AAEH,8FAAA,EAAE,OAAA;AAIF,gGAAA,IAAI,OAAA;AACJ,kGAAA,MAAM,OAAA;AACN,+FAAA,GAAG,OAAA;AACH,gGAAA,IAAI,OAAA;AAIJ,iGAAA,KAAK,OAAA;AAEP,6CAAwC;AAA/B,sGAAA,OAAO,OAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/index.ts"],"names":[],"mappings":";;;AAEA,qDAAgD;AAAvC,8GAAA,WAAW,OAAA;AACpB,mDAA8C;AAArC,4GAAA,UAAU,OAAA;AACnB,qDAAgD;AAAvC,8GAAA,WAAW,OAAA;AACpB,mDAkDgC;AA9C9B,+FAAA,GAAG,OAAA;AACH,+FAAA,GAAG,OAAA;AACH,2GAAA,eAAe,OAAA;AACf,8GAAA,kBAAkB,OAAA;AAClB,yGAAA,aAAa,OAAA;AAIb,sGAAA,UAAU,OAAA;AAOV,oGAAA,QAAQ,OAAA;AACR,sGAAA,UAAU,OAAA;AAMV,uGAAA,WAAW,OAAA;AAOX,mGAAA,OAAO,OAAA;AAGP,+FAAA,GAAG,OAAA;AAEH,8FAAA,EAAE,OAAA;AAIF,gGAAA,IAAI,OAAA;AACJ,kGAAA,MAAM,OAAA;AACN,+FAAA,GAAG,OAAA;AACH,gGAAA,IAAI,OAAA;AAIJ,iGAAA,KAAK,OAAA;AAEP,6CAAwC;AAA/B,sGAAA,OAAO,OAAA;AAmChB,6CAAwC;AAA/B,sGAAA,OAAO,OAAA;AAChB,uCAAmC;AAA1B,iGAAA,KAAK,OAAA;AACd,qCAAiC;AAAxB,+FAAA,IAAI,OAAA;AACb,mDAA8C;AAArC,4GAAA,UAAU,OAAA;AACnB,mEAA4D;AAAnD,0HAAA,gBAAgB,OAAA;AACzB,+DAA0D;AAAjD,wHAAA,gBAAgB,OAAA"}
|
|
@@ -5,6 +5,7 @@ export * from "./delete-table.js";
|
|
|
5
5
|
export * from "./get-item.js";
|
|
6
6
|
export * from "./put-item.js";
|
|
7
7
|
export * from "./query.js";
|
|
8
|
+
export * from "./scan.js";
|
|
8
9
|
export * from "./update-item.js";
|
|
9
10
|
export * from "./update-time-to-live.js";
|
|
10
11
|
export * from "./write-transaction.js";
|
|
@@ -21,6 +21,7 @@ __exportStar(require("./delete-table.js"), exports);
|
|
|
21
21
|
__exportStar(require("./get-item.js"), exports);
|
|
22
22
|
__exportStar(require("./put-item.js"), exports);
|
|
23
23
|
__exportStar(require("./query.js"), exports);
|
|
24
|
+
__exportStar(require("./scan.js"), exports);
|
|
24
25
|
__exportStar(require("./update-item.js"), exports);
|
|
25
26
|
__exportStar(require("./update-time-to-live.js"), exports);
|
|
26
27
|
__exportStar(require("./write-transaction.js"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/commands/inputs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,oDAAkC;AAClC,mDAAiC;AACjC,oDAAkC;AAClC,gDAA8B;AAC9B,gDAA8B;AAC9B,6CAA2B;AAC3B,mDAAiC;AACjC,2DAAyC;AACzC,yDAAuC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/commands/inputs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,uDAAqC;AACrC,oDAAkC;AAClC,mDAAiC;AACjC,oDAAkC;AAClC,gDAA8B;AAC9B,gDAA8B;AAC9B,6CAA2B;AAC3B,4CAA0B;AAC1B,mDAAiC;AACjC,2DAAyC;AACzC,yDAAuC"}
|
|
@@ -4,15 +4,48 @@ import { type FilterInput, type KeyConditionInput, type ProjectionInput } from "
|
|
|
4
4
|
import { type ConsumedCapacityReturnValue } from "./lib.js";
|
|
5
5
|
export type QueryConsumedCapacityReturnValue = ConsumedCapacityReturnValue;
|
|
6
6
|
export type QueryInput<K extends KeyAttributes = KeyAttributes> = {
|
|
7
|
+
/**
|
|
8
|
+
* The name of the table to query, or the name of the table owning
|
|
9
|
+
* the index to query, when provided.
|
|
10
|
+
*/
|
|
7
11
|
table: string;
|
|
12
|
+
/**
|
|
13
|
+
* The key condition narrowing the query. This minimally needs to
|
|
14
|
+
* include an equality check on the partition key.
|
|
15
|
+
*/
|
|
8
16
|
keyCondition: KeyConditionInput;
|
|
17
|
+
/**
|
|
18
|
+
* Whether to perform a consistent read. Defaults to false.
|
|
19
|
+
*/
|
|
9
20
|
consistentRead?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* The primary key of the first item to evaluate.
|
|
23
|
+
*/
|
|
10
24
|
exclusiveStartKey?: K;
|
|
25
|
+
/**
|
|
26
|
+
* The filter expression used to process results, if any.
|
|
27
|
+
*/
|
|
11
28
|
filter?: FilterInput;
|
|
29
|
+
/**
|
|
30
|
+
* The index to query, if any.
|
|
31
|
+
*/
|
|
12
32
|
index?: string;
|
|
33
|
+
/**
|
|
34
|
+
* The maximum number of items to evaluate.
|
|
35
|
+
*/
|
|
13
36
|
limit?: number;
|
|
37
|
+
/**
|
|
38
|
+
* The project expression to apply to matching items, if any.
|
|
39
|
+
*/
|
|
14
40
|
projection?: ProjectionInput;
|
|
41
|
+
/**
|
|
42
|
+
* The requested consumed capacity metrics on return, if any.
|
|
43
|
+
*/
|
|
15
44
|
returnConsumedCapacity?: QueryConsumedCapacityReturnValue;
|
|
45
|
+
/**
|
|
46
|
+
* Whether to scan the index forward or backwards. Forwards means ascending, while backwards means descending.
|
|
47
|
+
* Defaults to true.
|
|
48
|
+
*/
|
|
16
49
|
scanIndexForward?: boolean;
|
|
17
50
|
};
|
|
18
51
|
export declare const QueryInput: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../src/commands/inputs/query.ts"],"names":[],"mappings":";;;AACA,mDAAkD;AAElD,sDAOiC;AACjC,sCAA2C;AAC3C,qCAGkB;
|
|
1
|
+
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../src/commands/inputs/query.ts"],"names":[],"mappings":";;;AACA,mDAAkD;AAElD,sDAOiC;AACjC,sCAA2C;AAC3C,qCAGkB;AAkDL,QAAA,UAAU,GAAG;IACxB,MAAM;CACP,CAAC;AAEF,SAAS,MAAM,CACb,KAAoB;IAEpB,MAAM,SAAS,GAAG,6BAAoB,CAAC,MAAM,EAAE,CAAC;IAChD,OAAO,IAAA,uBAAc,EAAC;QACpB,SAAS,EAAE,KAAK,CAAC,KAAK;QACtB,SAAS,EAAE,KAAK,CAAC,KAAK;QACtB,cAAc,EAAE,KAAK,CAAC,cAAc;QACpC,iBAAiB,EAAE,KAAK,CAAC,iBAAiB;QAC1C,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,sBAAsB,EAAE,KAAK,CAAC,sBAAsB;QACpD,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;QACxC,cAAc;QACd,sBAAsB,EAAE,SAAS,CAAC,MAAM,CACtC,uBAAY,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CACtC;QACD,gBAAgB,EAAE,IAAA,mBAAS,EAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAC9C,SAAS,CAAC,MAAM,CAAC,iBAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CACjC;QACD,oBAAoB,EAAE,IAAA,mBAAS,EAAC,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE,CACtD,SAAS,CAAC,MAAM,CAAC,qBAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CACrC;QACD,wBAAwB,EAAE,SAAS,CAAC,2BAA2B,EAAE;QACjE,yBAAyB,EAAE,SAAS,CAAC,4BAA4B,EAAE;KACpE,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { ScanCommandInput } from "@aws-sdk/lib-dynamodb";
|
|
2
|
+
import type { KeyAttributes } from "../../types.js";
|
|
3
|
+
import { type FilterInput, type ProjectionInput } from "../expressions/index.js";
|
|
4
|
+
import { type ConsumedCapacityReturnValue } from "./lib.js";
|
|
5
|
+
export type ScanConsumedCapacityReturnValue = ConsumedCapacityReturnValue;
|
|
6
|
+
export type ScanInput<K extends KeyAttributes = KeyAttributes> = {
|
|
7
|
+
/**
|
|
8
|
+
* The name of the table to query, or the name of the table owning
|
|
9
|
+
* the index to query, when provided.
|
|
10
|
+
*/
|
|
11
|
+
table: string;
|
|
12
|
+
/**
|
|
13
|
+
* Whether to perform a consistent read. Defaults to false.
|
|
14
|
+
*/
|
|
15
|
+
consistentRead?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* The primary key of the first item to evaluate.
|
|
18
|
+
*/
|
|
19
|
+
exclusiveStartKey?: K;
|
|
20
|
+
/**
|
|
21
|
+
* The filter expression used to process results, if any.
|
|
22
|
+
*/
|
|
23
|
+
filter?: FilterInput;
|
|
24
|
+
/**
|
|
25
|
+
* The index to query, if any.
|
|
26
|
+
*/
|
|
27
|
+
index?: string;
|
|
28
|
+
/**
|
|
29
|
+
* The maximum number of items to evaluate.
|
|
30
|
+
*/
|
|
31
|
+
limit?: number;
|
|
32
|
+
/**
|
|
33
|
+
* The project expression to apply to matching items, if any.
|
|
34
|
+
*/
|
|
35
|
+
projection?: ProjectionInput;
|
|
36
|
+
/**
|
|
37
|
+
* The requested consumed capacity metrics on return, if any.
|
|
38
|
+
*/
|
|
39
|
+
returnConsumedCapacity?: ScanConsumedCapacityReturnValue;
|
|
40
|
+
/**
|
|
41
|
+
* The segment ID of the parallel query. Must always be provided in conjunction
|
|
42
|
+
* with `totalSegments`.
|
|
43
|
+
*/
|
|
44
|
+
segment?: number;
|
|
45
|
+
/**
|
|
46
|
+
* The number of segments dividing the parallel query. Must always be provided
|
|
47
|
+
* in conjunction with `segment`.
|
|
48
|
+
*/
|
|
49
|
+
totalSegments?: number;
|
|
50
|
+
};
|
|
51
|
+
export declare const ScanInput: {
|
|
52
|
+
encode: typeof encode;
|
|
53
|
+
};
|
|
54
|
+
declare function encode<K extends KeyAttributes = KeyAttributes>(input: ScanInput<K>): ScanCommandInput;
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ScanInput = void 0;
|
|
4
|
+
const toolkit_1 = require("@infra-blocks/toolkit");
|
|
5
|
+
const index_js_1 = require("../expressions/index.js");
|
|
6
|
+
const lib_js_1 = require("../lib.js");
|
|
7
|
+
const lib_js_2 = require("./lib.js");
|
|
8
|
+
exports.ScanInput = {
|
|
9
|
+
encode,
|
|
10
|
+
};
|
|
11
|
+
function encode(input) {
|
|
12
|
+
const formatter = lib_js_2.ExpressionsFormatter.create();
|
|
13
|
+
return (0, lib_js_1.unsetUndefined)({
|
|
14
|
+
TableName: input.table,
|
|
15
|
+
ConsistentRead: input.consistentRead,
|
|
16
|
+
ExclusiveStartKey: input.exclusiveStartKey,
|
|
17
|
+
FilterExpression: (0, toolkit_1.ifDefined)(input.filter, (f) => formatter.format(index_js_1.Filter.from(f))),
|
|
18
|
+
IndexName: input.index,
|
|
19
|
+
Limit: input.limit,
|
|
20
|
+
ProjectionExpression: (0, toolkit_1.ifDefined)(input.projection, (p) => formatter.format(index_js_1.Projection.from(p))),
|
|
21
|
+
ReturnConsumedCapacity: input.returnConsumedCapacity,
|
|
22
|
+
Segment: input.segment,
|
|
23
|
+
TotalSegments: input.totalSegments,
|
|
24
|
+
ExpressionAttributeNames: formatter.getExpressionAttributeNames(),
|
|
25
|
+
ExpressionAttributeValues: formatter.getExpressionAttributeValues(),
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=scan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scan.js","sourceRoot":"","sources":["../../../../src/commands/inputs/scan.ts"],"names":[],"mappings":";;;AACA,mDAAkD;AAElD,sDAKiC;AACjC,sCAA2C;AAC3C,qCAGkB;AAkDL,QAAA,SAAS,GAAG;IACvB,MAAM;CACP,CAAC;AAEF,SAAS,MAAM,CACb,KAAmB;IAEnB,MAAM,SAAS,GAAG,6BAAoB,CAAC,MAAM,EAAE,CAAC;IAChD,OAAO,IAAA,uBAAc,EAAC;QACpB,SAAS,EAAE,KAAK,CAAC,KAAK;QACtB,cAAc,EAAE,KAAK,CAAC,cAAc;QACpC,iBAAiB,EAAE,KAAK,CAAC,iBAAiB;QAC1C,gBAAgB,EAAE,IAAA,mBAAS,EAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAC9C,SAAS,CAAC,MAAM,CAAC,iBAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CACjC;QACD,SAAS,EAAE,KAAK,CAAC,KAAK;QACtB,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,oBAAoB,EAAE,IAAA,mBAAS,EAAC,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE,CACtD,SAAS,CAAC,MAAM,CAAC,qBAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CACrC;QACD,sBAAsB,EAAE,KAAK,CAAC,sBAAsB;QACpD,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,aAAa,EAAE,KAAK,CAAC,aAAa;QAClC,wBAAwB,EAAE,SAAS,CAAC,2BAA2B,EAAE;QACjE,yBAAyB,EAAE,SAAS,CAAC,4BAA4B,EAAE;KACpE,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -6,6 +6,7 @@ export * from "./get-item.js";
|
|
|
6
6
|
export type { ItemCollectionMetrics, NativeItemCollectionMetrics, } from "./item-collection-metrics.js";
|
|
7
7
|
export * from "./put-item.js";
|
|
8
8
|
export * from "./query.js";
|
|
9
|
+
export * from "./scan.js";
|
|
9
10
|
export * from "./update-item.js";
|
|
10
11
|
export * from "./update-time-to-live.js";
|
|
11
12
|
export * from "./write-transaction.js";
|
|
@@ -20,6 +20,7 @@ __exportStar(require("./delete-table.js"), exports);
|
|
|
20
20
|
__exportStar(require("./get-item.js"), exports);
|
|
21
21
|
__exportStar(require("./put-item.js"), exports);
|
|
22
22
|
__exportStar(require("./query.js"), exports);
|
|
23
|
+
__exportStar(require("./scan.js"), exports);
|
|
23
24
|
__exportStar(require("./update-item.js"), exports);
|
|
24
25
|
__exportStar(require("./update-time-to-live.js"), exports);
|
|
25
26
|
__exportStar(require("./write-transaction.js"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/commands/outputs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,oDAAkC;AAClC,mDAAiC;AACjC,oDAAkC;AAClC,gDAA8B;AAK9B,gDAA8B;AAC9B,6CAA2B;AAC3B,mDAAiC;AACjC,2DAAyC;AACzC,yDAAuC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/commands/outputs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,oDAAkC;AAClC,mDAAiC;AACjC,oDAAkC;AAClC,gDAA8B;AAK9B,gDAA8B;AAC9B,6CAA2B;AAC3B,4CAA0B;AAC1B,mDAAiC;AACjC,2DAAyC;AACzC,yDAAuC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ScanCommandOutput } from "@aws-sdk/lib-dynamodb";
|
|
2
|
+
import type { Attributes, KeyAttributes } from "../../index.js";
|
|
3
|
+
import { ConsumedCapacity } from "./consumed-capacity.js";
|
|
4
|
+
export type ScanOutput<T extends Attributes = Attributes, K extends KeyAttributes = KeyAttributes> = {
|
|
5
|
+
count: number;
|
|
6
|
+
items: Array<T>;
|
|
7
|
+
scannedCount: number;
|
|
8
|
+
lastEvaluatedKey?: K;
|
|
9
|
+
consumedCapacity?: ConsumedCapacity;
|
|
10
|
+
};
|
|
11
|
+
export declare const ScanOutput: {
|
|
12
|
+
decode: typeof decode;
|
|
13
|
+
};
|
|
14
|
+
declare function decode<T extends Attributes = Attributes, K extends KeyAttributes = KeyAttributes>(output: ScanCommandOutput): ScanOutput<T, K>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ScanOutput = void 0;
|
|
4
|
+
const checks_1 = require("@infra-blocks/checks");
|
|
5
|
+
const toolkit_1 = require("@infra-blocks/toolkit");
|
|
6
|
+
const types_1 = require("@infra-blocks/types");
|
|
7
|
+
const lib_js_1 = require("../lib.js");
|
|
8
|
+
const consumed_capacity_js_1 = require("./consumed-capacity.js");
|
|
9
|
+
exports.ScanOutput = {
|
|
10
|
+
decode,
|
|
11
|
+
};
|
|
12
|
+
function decode(output) {
|
|
13
|
+
return (0, lib_js_1.unsetUndefined)({
|
|
14
|
+
count: (0, checks_1.checkNotNull)(output.Count),
|
|
15
|
+
items: (output.Items ?? []),
|
|
16
|
+
scannedCount: (0, checks_1.checkNotNull)(output.ScannedCount),
|
|
17
|
+
consumedCapacity: (0, toolkit_1.ifDefined)(output.ConsumedCapacity, consumed_capacity_js_1.ConsumedCapacity.decode),
|
|
18
|
+
lastEvaluatedKey: (0, toolkit_1.ifDefined)(output.LastEvaluatedKey, (types_1.trusted)),
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=scan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scan.js","sourceRoot":"","sources":["../../../../src/commands/outputs/scan.ts"],"names":[],"mappings":";;;AACA,iDAAoD;AACpD,mDAAkD;AAClD,+CAA8C;AAE9C,sCAA2C;AAC3C,iEAA0D;AAa7C,QAAA,UAAU,GAAG;IACxB,MAAM;CACP,CAAC;AAEF,SAAS,MAAM,CAGb,MAAyB;IACzB,OAAO,IAAA,uBAAc,EAAC;QACpB,KAAK,EAAE,IAAA,qBAAY,EAAC,MAAM,CAAC,KAAK,CAAC;QACjC,KAAK,EAAE,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,CAAa;QACvC,YAAY,EAAE,IAAA,qBAAY,EAAC,MAAM,CAAC,YAAY,CAAC;QAC/C,gBAAgB,EAAE,IAAA,mBAAS,EACzB,MAAM,CAAC,gBAAgB,EACvB,uCAAgB,CAAC,MAAM,CACxB;QACD,gBAAgB,EAAE,IAAA,mBAAS,EAAC,MAAM,CAAC,gBAAgB,EAAE,CAAA,eAAU,CAAA,CAAC;KACjE,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ScanCommand } from "@aws-sdk/lib-dynamodb";
|
|
2
|
+
import type { Attributes, KeyAttributes } from "../types.js";
|
|
3
|
+
import { AbstractCommand } from "./base.js";
|
|
4
|
+
import { ScanInput } from "./inputs/index.js";
|
|
5
|
+
import { ScanOutput } from "./outputs/index.js";
|
|
6
|
+
export declare class Scan<T extends Attributes = Attributes, K extends KeyAttributes = KeyAttributes> extends AbstractCommand<ScanInput<K>, ScanOutput<T, K>, ScanCommand> {
|
|
7
|
+
constructor(input: ScanInput<K>);
|
|
8
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Scan = void 0;
|
|
4
|
+
const lib_dynamodb_1 = require("@aws-sdk/lib-dynamodb");
|
|
5
|
+
const base_js_1 = require("./base.js");
|
|
6
|
+
const index_js_1 = require("./inputs/index.js");
|
|
7
|
+
const index_js_2 = require("./outputs/index.js");
|
|
8
|
+
class Scan extends base_js_1.AbstractCommand {
|
|
9
|
+
constructor(input) {
|
|
10
|
+
super({
|
|
11
|
+
input,
|
|
12
|
+
codec: {
|
|
13
|
+
encode: index_js_1.ScanInput.encode,
|
|
14
|
+
decode: index_js_2.ScanOutput.decode,
|
|
15
|
+
},
|
|
16
|
+
command: lib_dynamodb_1.ScanCommand,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.Scan = Scan;
|
|
21
|
+
//# sourceMappingURL=scan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scan.js","sourceRoot":"","sources":["../../../src/commands/scan.ts"],"names":[],"mappings":";;;AAAA,wDAAoD;AAEpD,uCAA4C;AAC5C,gDAA8C;AAC9C,iDAAgD;AAEhD,MAAa,IAGX,SAAQ,yBAA4D;IACpE,YAAY,KAAmB;QAC7B,KAAK,CAAC;YACJ,KAAK;YACL,KAAK,EAAE;gBACL,MAAM,EAAE,oBAAS,CAAC,MAAM;gBACxB,MAAM,EAAE,qBAAU,CAAC,MAAM;aAC1B;YACD,OAAO,EAAE,0BAAW;SACrB,CAAC,CAAC;IACL,CAAC;CACF;AAdD,oBAcC"}
|
package/lib/esm/client.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type AttributeValue, type DynamoDBClientConfig } from "@aws-sdk/client-dynamodb";
|
|
2
2
|
import type { Logger } from "@infra-blocks/logger-interface";
|
|
3
3
|
import { type Retry, type RetryConfig } from "@infra-blocks/retry";
|
|
4
|
-
import { type CommandOutput, type CreateTableInput, type CreateTableOutput, type DeleteItemInput, type DeleteItemOutput, type DeleteTableInput, type DeleteTableOutput, type DynamoDbClientCommand, type GetItemInput, type GetItemOutput, type PutItemInput, type PutItemOutput, type QueryInput, type QueryOutput, type UpdateItemInput, type UpdateItemOutput, type UpdateTimeToLiveInput, type UpdateTimeToLiveOutput, type WriteTransactionInput, type WriteTransactionOutput } from "./commands/index.js";
|
|
4
|
+
import { type CommandOutput, type CreateTableInput, type CreateTableOutput, type DeleteItemInput, type DeleteItemOutput, type DeleteTableInput, type DeleteTableOutput, type DynamoDbClientCommand, type GetItemInput, type GetItemOutput, type PutItemInput, type PutItemOutput, type QueryInput, type QueryOutput, type ScanInput, type ScanOutput, type UpdateItemInput, type UpdateItemOutput, type UpdateTimeToLiveInput, type UpdateTimeToLiveOutput, type WriteTransactionInput, type WriteTransactionOutput } from "./commands/index.js";
|
|
5
5
|
import type { Attributes, KeyAttributes, KeySchema } from "./types.js";
|
|
6
6
|
/**
|
|
7
7
|
* Re-export of the native client's, renamed.
|
|
@@ -117,8 +117,7 @@ export declare class DynamoDbClient {
|
|
|
117
117
|
*
|
|
118
118
|
* @param input - The parameters to use to query the table or index.
|
|
119
119
|
*
|
|
120
|
-
* @returns
|
|
121
|
-
* at a time, and that handles pagination automatically.
|
|
120
|
+
* @returns A page resulting from the query operation using the provided input.
|
|
122
121
|
*
|
|
123
122
|
* @see https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Query.html
|
|
124
123
|
*/
|
|
@@ -152,6 +151,20 @@ export declare class DynamoDbClient {
|
|
|
152
151
|
* @param options - Options to pass to the underlying retry mechanism.
|
|
153
152
|
*/
|
|
154
153
|
ready(options?: Omit<RetryConfig, "isRetryableError">): Retry<void>;
|
|
154
|
+
/**
|
|
155
|
+
* Scans a table, or an index, using the Scan API.
|
|
156
|
+
*
|
|
157
|
+
* It produces a single page of results, which may or may not contain all the
|
|
158
|
+
* items of the scan. If the result is incomplete, the {@link ScanOutput.lastEvaluatedKey}
|
|
159
|
+
* will be set, and should be used in a follow up scan as the {@link ScanInput.exclusiveStartKey}.
|
|
160
|
+
*
|
|
161
|
+
* @param input - The parameters to use to scan the table or index.
|
|
162
|
+
*
|
|
163
|
+
* @returns A page resulting from the scan operation using the provided input.
|
|
164
|
+
*
|
|
165
|
+
* @see https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Scan.html
|
|
166
|
+
*/
|
|
167
|
+
scan<T extends Attributes = Attributes, K extends KeyAttributes = KeyAttributes>(input: ScanInput<K>): Promise<ScanOutput<T, K>>;
|
|
155
168
|
send<C extends DynamoDbClientCommand>(command: C): Promise<CommandOutput<C>>;
|
|
156
169
|
/**
|
|
157
170
|
* Updates an item using the UpdateItem API.
|
package/lib/esm/client.js
CHANGED
|
@@ -4,7 +4,7 @@ import { unmarshall } from "@aws-sdk/util-dynamodb";
|
|
|
4
4
|
import { NullLogger } from "@infra-blocks/null-logger";
|
|
5
5
|
import { retry } from "@infra-blocks/retry";
|
|
6
6
|
import { trusted } from "@infra-blocks/types";
|
|
7
|
-
import { CreateTable, DeleteItem, DeleteTable, GetItem, PutItem, Query, UpdateItem, UpdateTimeToLive, WriteTransaction, } from "./commands/index.js";
|
|
7
|
+
import { CreateTable, DeleteItem, DeleteTable, GetItem, PutItem, Query, Scan, UpdateItem, UpdateTimeToLive, WriteTransaction, } from "./commands/index.js";
|
|
8
8
|
import { TooManyItemsException } from "./error.js";
|
|
9
9
|
const MARSHALL_OPTIONS = {
|
|
10
10
|
convertEmptyValues: false,
|
|
@@ -168,8 +168,7 @@ export class DynamoDbClient {
|
|
|
168
168
|
*
|
|
169
169
|
* @param input - The parameters to use to query the table or index.
|
|
170
170
|
*
|
|
171
|
-
* @returns
|
|
172
|
-
* at a time, and that handles pagination automatically.
|
|
171
|
+
* @returns A page resulting from the query operation using the provided input.
|
|
173
172
|
*
|
|
174
173
|
* @see https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Query.html
|
|
175
174
|
*/
|
|
@@ -230,6 +229,25 @@ export class DynamoDbClient {
|
|
|
230
229
|
},
|
|
231
230
|
});
|
|
232
231
|
}
|
|
232
|
+
/**
|
|
233
|
+
* Scans a table, or an index, using the Scan API.
|
|
234
|
+
*
|
|
235
|
+
* It produces a single page of results, which may or may not contain all the
|
|
236
|
+
* items of the scan. If the result is incomplete, the {@link ScanOutput.lastEvaluatedKey}
|
|
237
|
+
* will be set, and should be used in a follow up scan as the {@link ScanInput.exclusiveStartKey}.
|
|
238
|
+
*
|
|
239
|
+
* @param input - The parameters to use to scan the table or index.
|
|
240
|
+
*
|
|
241
|
+
* @returns A page resulting from the scan operation using the provided input.
|
|
242
|
+
*
|
|
243
|
+
* @see https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Scan.html
|
|
244
|
+
*/
|
|
245
|
+
scan(input) {
|
|
246
|
+
if (this.logger.isDebugEnabled()) {
|
|
247
|
+
this.logger.debug("scan(%s)", JSON.stringify(input));
|
|
248
|
+
}
|
|
249
|
+
return this.send(new Scan(input));
|
|
250
|
+
}
|
|
233
251
|
// TODO: without branding, one type equals all types...
|
|
234
252
|
async send(command) {
|
|
235
253
|
return trusted(command.execute({ client: this.client }));
|
package/lib/esm/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,cAAc,EAEd,iBAAiB,GAClB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAgC,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAEL,WAAW,EAGX,UAAU,EAGV,WAAW,EAIX,OAAO,EAGP,OAAO,EAGP,KAAK,EAGL,UAAU,EAGV,gBAAgB,EAGhB,gBAAgB,GAGjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAGnD,MAAM,gBAAgB,GAAG;IACvB,kBAAkB,EAAE,KAAK;IACzB,qBAAqB,EAAE,KAAK;IAC5B,yBAAyB,EAAE,KAAK;IAChC,wBAAwB,EAAE,IAAI;IAC9B,qBAAqB,EAAE,KAAK;CAC7B,CAAC;AAEF,MAAM,kBAAkB,GAAG;IACzB,WAAW,EAAE,KAAK;IAClB,4EAA4E;IAC5E,4CAA4C;IAC5C,wBAAwB,EAAE,IAAI;CAC/B,CAAC;AAEF,8EAA8E;AAC9E,MAAM,gBAAgB,GAAG;IACvB,eAAe,EAAE,gBAAgB;IACjC,iBAAiB,EAAE,kBAAkB;CACtC,CAAC;AA0BF;;;GAGG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;;;;;;;;OAwBG;IACH,MAAM,CAAC,MAAM,CAAC,MAAqB;QACjC,MAAM,CAAC,GAAG,MAAM,IAAI,EAAE,CAAC;QACvB,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC;QACrB,MAAM,QAAQ,GAAG,IAAI,cAAc,CAAC,CAAC,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC;QACtD,MAAM,MAAM,GAAG,sBAAsB,CAAC,IAAI,CAAC,QAAQ,EAAE,gBAAgB,CAAC,CAAC;QACvE,OAAO,cAAc,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACjD,CAAC;CACF"}
|
|
@@ -4,7 +4,8 @@ import type { DeleteTable } from "./delete-table.js";
|
|
|
4
4
|
import type { GetItem } from "./get-item.js";
|
|
5
5
|
import type { PutItem } from "./put-item.js";
|
|
6
6
|
import type { Query } from "./query.js";
|
|
7
|
+
import type { Scan } from "./scan.js";
|
|
7
8
|
import type { UpdateItem } from "./update-item.js";
|
|
8
9
|
import type { UpdateTimeToLive } from "./update-time-to-live.js";
|
|
9
10
|
import type { WriteTransaction } from "./write-transaction.js";
|
|
10
|
-
export type DynamoDbClientCommand = DeleteItem | GetItem | CreateTable | DeleteTable | PutItem | Query | UpdateItem | UpdateTimeToLive | WriteTransaction;
|
|
11
|
+
export type DynamoDbClientCommand = DeleteItem | GetItem | CreateTable | DeleteTable | PutItem | Query | Scan | UpdateItem | UpdateTimeToLive | WriteTransaction;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.js","sourceRoot":"","sources":["../../../src/commands/command.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"command.js","sourceRoot":"","sources":["../../../src/commands/command.ts"],"names":[],"mappings":";AAuBA,8CAA8C"}
|
|
@@ -5,10 +5,11 @@ export { DeleteItem } from "./delete-item.js";
|
|
|
5
5
|
export { DeleteTable } from "./delete-table.js";
|
|
6
6
|
export { type And, type AttributeExists, type AttributeNotExists, add, and, attributeExists, attributeNotExists, attributeType, type BeginsWith, type BeginsWithOperand, type BetweenInput, beginsWith, type ComparableValue, type ConditionComparisonInput, type ConditionFunction, type ConditionInput, type ConditionLogic, type Contains, contains, deleteFrom, type EqualsInput, type GreaterThanInput, type GreaterThanOrEqualsInput, type InInput, type IsAttributeOfType, ifNotExists, type KeyConditionComparisonInput, type KeyConditionFunction, type KeyConditionInput, type KeyConditionLogic, type LowerThanInput, type LowerThanOrEqualsInput, literal, type Not, type NotEqualsInput, not, type Or, or, type PathInput, type PathOrValueInput, type ProjectionInput, path, remove, set, size, type UpdateAction, type UpdateInput, type ValueInput, value, } from "./expressions/index.js";
|
|
7
7
|
export { GetItem } from "./get-item.js";
|
|
8
|
-
export type { ConditionCheckInput, CreateTableInput, DeleteItemInput, DeleteItemReturnValue, DeleteTableInput, GetItemConsumedCapacityReturnValue, GetItemInput, PutItemInput, QueryInput, UpdateItemInput, UpdateTimeToLiveInput, WriteTransactionDeleteItemInput, WriteTransactionInput, WriteTransactionPutItemInput, WriteTransactionUpdateItemInput, WriteTransactionWrite, } from "./inputs/index.js";
|
|
9
|
-
export type { CapacityUnits, ConsumedCapacity, CreateTableOutput, DeleteItemOutput, DeleteTableOutput, GetItemOutput, ItemCollectionMetrics, PutItemOutput, QueryOutput, UpdateItemOutput, UpdateTimeToLiveOutput, WriteTransactionOutput, } from "./outputs/index.js";
|
|
8
|
+
export type { ConditionCheckInput, CreateTableInput, DeleteItemInput, DeleteItemReturnValue, DeleteTableInput, GetItemConsumedCapacityReturnValue, GetItemInput, PutItemInput, QueryInput, ScanInput, UpdateItemInput, UpdateTimeToLiveInput, WriteTransactionDeleteItemInput, WriteTransactionInput, WriteTransactionPutItemInput, WriteTransactionUpdateItemInput, WriteTransactionWrite, } from "./inputs/index.js";
|
|
9
|
+
export type { CapacityUnits, ConsumedCapacity, CreateTableOutput, DeleteItemOutput, DeleteTableOutput, GetItemOutput, ItemCollectionMetrics, PutItemOutput, QueryOutput, ScanOutput, UpdateItemOutput, UpdateTimeToLiveOutput, WriteTransactionOutput, } from "./outputs/index.js";
|
|
10
10
|
export { PutItem } from "./put-item.js";
|
|
11
11
|
export { Query } from "./query.js";
|
|
12
|
+
export { Scan } from "./scan.js";
|
|
12
13
|
export { UpdateItem } from "./update-item.js";
|
|
13
14
|
export { UpdateTimeToLive } from "./update-time-to-live.js";
|
|
14
15
|
export { WriteTransaction } from "./write-transaction.js";
|
|
@@ -5,6 +5,7 @@ export { add, and, attributeExists, attributeNotExists, attributeType, beginsWit
|
|
|
5
5
|
export { GetItem } from "./get-item.js";
|
|
6
6
|
export { PutItem } from "./put-item.js";
|
|
7
7
|
export { Query } from "./query.js";
|
|
8
|
+
export { Scan } from "./scan.js";
|
|
8
9
|
export { UpdateItem } from "./update-item.js";
|
|
9
10
|
export { UpdateTimeToLive } from "./update-time-to-live.js";
|
|
10
11
|
export { WriteTransaction } from "./write-transaction.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAIL,GAAG,EACH,GAAG,EACH,eAAe,EACf,kBAAkB,EAClB,aAAa,EAIb,UAAU,EAOV,QAAQ,EACR,UAAU,EAMV,WAAW,EAOX,OAAO,EAGP,GAAG,EAEH,EAAE,EAIF,IAAI,EACJ,MAAM,EACN,GAAG,EACH,IAAI,EAIJ,KAAK,GACN,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAIL,GAAG,EACH,GAAG,EACH,eAAe,EACf,kBAAkB,EAClB,aAAa,EAIb,UAAU,EAOV,QAAQ,EACR,UAAU,EAMV,WAAW,EAOX,OAAO,EAGP,GAAG,EAEH,EAAE,EAIF,IAAI,EACJ,MAAM,EACN,GAAG,EACH,IAAI,EAIJ,KAAK,GACN,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAmCxC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -5,6 +5,7 @@ export * from "./delete-table.js";
|
|
|
5
5
|
export * from "./get-item.js";
|
|
6
6
|
export * from "./put-item.js";
|
|
7
7
|
export * from "./query.js";
|
|
8
|
+
export * from "./scan.js";
|
|
8
9
|
export * from "./update-item.js";
|
|
9
10
|
export * from "./update-time-to-live.js";
|
|
10
11
|
export * from "./write-transaction.js";
|
|
@@ -5,6 +5,7 @@ export * from "./delete-table.js";
|
|
|
5
5
|
export * from "./get-item.js";
|
|
6
6
|
export * from "./put-item.js";
|
|
7
7
|
export * from "./query.js";
|
|
8
|
+
export * from "./scan.js";
|
|
8
9
|
export * from "./update-item.js";
|
|
9
10
|
export * from "./update-time-to-live.js";
|
|
10
11
|
export * from "./write-transaction.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/commands/inputs/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/commands/inputs/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC"}
|
|
@@ -4,15 +4,48 @@ import { type FilterInput, type KeyConditionInput, type ProjectionInput } from "
|
|
|
4
4
|
import { type ConsumedCapacityReturnValue } from "./lib.js";
|
|
5
5
|
export type QueryConsumedCapacityReturnValue = ConsumedCapacityReturnValue;
|
|
6
6
|
export type QueryInput<K extends KeyAttributes = KeyAttributes> = {
|
|
7
|
+
/**
|
|
8
|
+
* The name of the table to query, or the name of the table owning
|
|
9
|
+
* the index to query, when provided.
|
|
10
|
+
*/
|
|
7
11
|
table: string;
|
|
12
|
+
/**
|
|
13
|
+
* The key condition narrowing the query. This minimally needs to
|
|
14
|
+
* include an equality check on the partition key.
|
|
15
|
+
*/
|
|
8
16
|
keyCondition: KeyConditionInput;
|
|
17
|
+
/**
|
|
18
|
+
* Whether to perform a consistent read. Defaults to false.
|
|
19
|
+
*/
|
|
9
20
|
consistentRead?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* The primary key of the first item to evaluate.
|
|
23
|
+
*/
|
|
10
24
|
exclusiveStartKey?: K;
|
|
25
|
+
/**
|
|
26
|
+
* The filter expression used to process results, if any.
|
|
27
|
+
*/
|
|
11
28
|
filter?: FilterInput;
|
|
29
|
+
/**
|
|
30
|
+
* The index to query, if any.
|
|
31
|
+
*/
|
|
12
32
|
index?: string;
|
|
33
|
+
/**
|
|
34
|
+
* The maximum number of items to evaluate.
|
|
35
|
+
*/
|
|
13
36
|
limit?: number;
|
|
37
|
+
/**
|
|
38
|
+
* The project expression to apply to matching items, if any.
|
|
39
|
+
*/
|
|
14
40
|
projection?: ProjectionInput;
|
|
41
|
+
/**
|
|
42
|
+
* The requested consumed capacity metrics on return, if any.
|
|
43
|
+
*/
|
|
15
44
|
returnConsumedCapacity?: QueryConsumedCapacityReturnValue;
|
|
45
|
+
/**
|
|
46
|
+
* Whether to scan the index forward or backwards. Forwards means ascending, while backwards means descending.
|
|
47
|
+
* Defaults to true.
|
|
48
|
+
*/
|
|
16
49
|
scanIndexForward?: boolean;
|
|
17
50
|
};
|
|
18
51
|
export declare const QueryInput: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../src/commands/inputs/query.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,OAAO,EACL,MAAM,EAEN,YAAY,EAEZ,UAAU,GAEX,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAEL,oBAAoB,GACrB,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../../src/commands/inputs/query.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,OAAO,EACL,MAAM,EAEN,YAAY,EAEZ,UAAU,GAEX,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAEL,oBAAoB,GACrB,MAAM,UAAU,CAAC;AAkDlB,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,MAAM;CACP,CAAC;AAEF,SAAS,MAAM,CACb,KAAoB;IAEpB,MAAM,SAAS,GAAG,oBAAoB,CAAC,MAAM,EAAE,CAAC;IAChD,OAAO,cAAc,CAAC;QACpB,SAAS,EAAE,KAAK,CAAC,KAAK;QACtB,SAAS,EAAE,KAAK,CAAC,KAAK;QACtB,cAAc,EAAE,KAAK,CAAC,cAAc;QACpC,iBAAiB,EAAE,KAAK,CAAC,iBAAiB;QAC1C,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,sBAAsB,EAAE,KAAK,CAAC,sBAAsB;QACpD,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;QACxC,cAAc;QACd,sBAAsB,EAAE,SAAS,CAAC,MAAM,CACtC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CACtC;QACD,gBAAgB,EAAE,SAAS,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAC9C,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CACjC;QACD,oBAAoB,EAAE,SAAS,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE,CACtD,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CACrC;QACD,wBAAwB,EAAE,SAAS,CAAC,2BAA2B,EAAE;QACjE,yBAAyB,EAAE,SAAS,CAAC,4BAA4B,EAAE;KACpE,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { ScanCommandInput } from "@aws-sdk/lib-dynamodb";
|
|
2
|
+
import type { KeyAttributes } from "../../types.js";
|
|
3
|
+
import { type FilterInput, type ProjectionInput } from "../expressions/index.js";
|
|
4
|
+
import { type ConsumedCapacityReturnValue } from "./lib.js";
|
|
5
|
+
export type ScanConsumedCapacityReturnValue = ConsumedCapacityReturnValue;
|
|
6
|
+
export type ScanInput<K extends KeyAttributes = KeyAttributes> = {
|
|
7
|
+
/**
|
|
8
|
+
* The name of the table to query, or the name of the table owning
|
|
9
|
+
* the index to query, when provided.
|
|
10
|
+
*/
|
|
11
|
+
table: string;
|
|
12
|
+
/**
|
|
13
|
+
* Whether to perform a consistent read. Defaults to false.
|
|
14
|
+
*/
|
|
15
|
+
consistentRead?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* The primary key of the first item to evaluate.
|
|
18
|
+
*/
|
|
19
|
+
exclusiveStartKey?: K;
|
|
20
|
+
/**
|
|
21
|
+
* The filter expression used to process results, if any.
|
|
22
|
+
*/
|
|
23
|
+
filter?: FilterInput;
|
|
24
|
+
/**
|
|
25
|
+
* The index to query, if any.
|
|
26
|
+
*/
|
|
27
|
+
index?: string;
|
|
28
|
+
/**
|
|
29
|
+
* The maximum number of items to evaluate.
|
|
30
|
+
*/
|
|
31
|
+
limit?: number;
|
|
32
|
+
/**
|
|
33
|
+
* The project expression to apply to matching items, if any.
|
|
34
|
+
*/
|
|
35
|
+
projection?: ProjectionInput;
|
|
36
|
+
/**
|
|
37
|
+
* The requested consumed capacity metrics on return, if any.
|
|
38
|
+
*/
|
|
39
|
+
returnConsumedCapacity?: ScanConsumedCapacityReturnValue;
|
|
40
|
+
/**
|
|
41
|
+
* The segment ID of the parallel query. Must always be provided in conjunction
|
|
42
|
+
* with `totalSegments`.
|
|
43
|
+
*/
|
|
44
|
+
segment?: number;
|
|
45
|
+
/**
|
|
46
|
+
* The number of segments dividing the parallel query. Must always be provided
|
|
47
|
+
* in conjunction with `segment`.
|
|
48
|
+
*/
|
|
49
|
+
totalSegments?: number;
|
|
50
|
+
};
|
|
51
|
+
export declare const ScanInput: {
|
|
52
|
+
encode: typeof encode;
|
|
53
|
+
};
|
|
54
|
+
declare function encode<K extends KeyAttributes = KeyAttributes>(input: ScanInput<K>): ScanCommandInput;
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ifDefined } from "@infra-blocks/toolkit";
|
|
2
|
+
import { Filter, Projection, } from "../expressions/index.js";
|
|
3
|
+
import { unsetUndefined } from "../lib.js";
|
|
4
|
+
import { ExpressionsFormatter, } from "./lib.js";
|
|
5
|
+
export const ScanInput = {
|
|
6
|
+
encode,
|
|
7
|
+
};
|
|
8
|
+
function encode(input) {
|
|
9
|
+
const formatter = ExpressionsFormatter.create();
|
|
10
|
+
return unsetUndefined({
|
|
11
|
+
TableName: input.table,
|
|
12
|
+
ConsistentRead: input.consistentRead,
|
|
13
|
+
ExclusiveStartKey: input.exclusiveStartKey,
|
|
14
|
+
FilterExpression: ifDefined(input.filter, (f) => formatter.format(Filter.from(f))),
|
|
15
|
+
IndexName: input.index,
|
|
16
|
+
Limit: input.limit,
|
|
17
|
+
ProjectionExpression: ifDefined(input.projection, (p) => formatter.format(Projection.from(p))),
|
|
18
|
+
ReturnConsumedCapacity: input.returnConsumedCapacity,
|
|
19
|
+
Segment: input.segment,
|
|
20
|
+
TotalSegments: input.totalSegments,
|
|
21
|
+
ExpressionAttributeNames: formatter.getExpressionAttributeNames(),
|
|
22
|
+
ExpressionAttributeValues: formatter.getExpressionAttributeValues(),
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=scan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scan.js","sourceRoot":"","sources":["../../../../src/commands/inputs/scan.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,OAAO,EACL,MAAM,EAEN,UAAU,GAEX,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAEL,oBAAoB,GACrB,MAAM,UAAU,CAAC;AAkDlB,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,MAAM;CACP,CAAC;AAEF,SAAS,MAAM,CACb,KAAmB;IAEnB,MAAM,SAAS,GAAG,oBAAoB,CAAC,MAAM,EAAE,CAAC;IAChD,OAAO,cAAc,CAAC;QACpB,SAAS,EAAE,KAAK,CAAC,KAAK;QACtB,cAAc,EAAE,KAAK,CAAC,cAAc;QACpC,iBAAiB,EAAE,KAAK,CAAC,iBAAiB;QAC1C,gBAAgB,EAAE,SAAS,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAC9C,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CACjC;QACD,SAAS,EAAE,KAAK,CAAC,KAAK;QACtB,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,oBAAoB,EAAE,SAAS,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE,CACtD,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CACrC;QACD,sBAAsB,EAAE,KAAK,CAAC,sBAAsB;QACpD,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,aAAa,EAAE,KAAK,CAAC,aAAa;QAClC,wBAAwB,EAAE,SAAS,CAAC,2BAA2B,EAAE;QACjE,yBAAyB,EAAE,SAAS,CAAC,4BAA4B,EAAE;KACpE,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -6,6 +6,7 @@ export * from "./get-item.js";
|
|
|
6
6
|
export type { ItemCollectionMetrics, NativeItemCollectionMetrics, } from "./item-collection-metrics.js";
|
|
7
7
|
export * from "./put-item.js";
|
|
8
8
|
export * from "./query.js";
|
|
9
|
+
export * from "./scan.js";
|
|
9
10
|
export * from "./update-item.js";
|
|
10
11
|
export * from "./update-time-to-live.js";
|
|
11
12
|
export * from "./write-transaction.js";
|
|
@@ -4,6 +4,7 @@ export * from "./delete-table.js";
|
|
|
4
4
|
export * from "./get-item.js";
|
|
5
5
|
export * from "./put-item.js";
|
|
6
6
|
export * from "./query.js";
|
|
7
|
+
export * from "./scan.js";
|
|
7
8
|
export * from "./update-item.js";
|
|
8
9
|
export * from "./update-time-to-live.js";
|
|
9
10
|
export * from "./write-transaction.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/commands/outputs/index.ts"],"names":[],"mappings":"AACA,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAK9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/commands/outputs/index.ts"],"names":[],"mappings":"AACA,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAK9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ScanCommandOutput } from "@aws-sdk/lib-dynamodb";
|
|
2
|
+
import type { Attributes, KeyAttributes } from "../../index.js";
|
|
3
|
+
import { ConsumedCapacity } from "./consumed-capacity.js";
|
|
4
|
+
export type ScanOutput<T extends Attributes = Attributes, K extends KeyAttributes = KeyAttributes> = {
|
|
5
|
+
count: number;
|
|
6
|
+
items: Array<T>;
|
|
7
|
+
scannedCount: number;
|
|
8
|
+
lastEvaluatedKey?: K;
|
|
9
|
+
consumedCapacity?: ConsumedCapacity;
|
|
10
|
+
};
|
|
11
|
+
export declare const ScanOutput: {
|
|
12
|
+
decode: typeof decode;
|
|
13
|
+
};
|
|
14
|
+
declare function decode<T extends Attributes = Attributes, K extends KeyAttributes = KeyAttributes>(output: ScanCommandOutput): ScanOutput<T, K>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { checkNotNull } from "@infra-blocks/checks";
|
|
2
|
+
import { ifDefined } from "@infra-blocks/toolkit";
|
|
3
|
+
import { trusted } from "@infra-blocks/types";
|
|
4
|
+
import { unsetUndefined } from "../lib.js";
|
|
5
|
+
import { ConsumedCapacity } from "./consumed-capacity.js";
|
|
6
|
+
export const ScanOutput = {
|
|
7
|
+
decode,
|
|
8
|
+
};
|
|
9
|
+
function decode(output) {
|
|
10
|
+
return unsetUndefined({
|
|
11
|
+
count: checkNotNull(output.Count),
|
|
12
|
+
items: (output.Items ?? []),
|
|
13
|
+
scannedCount: checkNotNull(output.ScannedCount),
|
|
14
|
+
consumedCapacity: ifDefined(output.ConsumedCapacity, ConsumedCapacity.decode),
|
|
15
|
+
lastEvaluatedKey: ifDefined(output.LastEvaluatedKey, (trusted)),
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=scan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scan.js","sourceRoot":"","sources":["../../../../src/commands/outputs/scan.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAE9C,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAa1D,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,MAAM;CACP,CAAC;AAEF,SAAS,MAAM,CAGb,MAAyB;IACzB,OAAO,cAAc,CAAC;QACpB,KAAK,EAAE,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC;QACjC,KAAK,EAAE,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,CAAa;QACvC,YAAY,EAAE,YAAY,CAAC,MAAM,CAAC,YAAY,CAAC;QAC/C,gBAAgB,EAAE,SAAS,CACzB,MAAM,CAAC,gBAAgB,EACvB,gBAAgB,CAAC,MAAM,CACxB;QACD,gBAAgB,EAAE,SAAS,CAAC,MAAM,CAAC,gBAAgB,EAAE,CAAA,OAAU,CAAA,CAAC;KACjE,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ScanCommand } from "@aws-sdk/lib-dynamodb";
|
|
2
|
+
import type { Attributes, KeyAttributes } from "../types.js";
|
|
3
|
+
import { AbstractCommand } from "./base.js";
|
|
4
|
+
import { ScanInput } from "./inputs/index.js";
|
|
5
|
+
import { ScanOutput } from "./outputs/index.js";
|
|
6
|
+
export declare class Scan<T extends Attributes = Attributes, K extends KeyAttributes = KeyAttributes> extends AbstractCommand<ScanInput<K>, ScanOutput<T, K>, ScanCommand> {
|
|
7
|
+
constructor(input: ScanInput<K>);
|
|
8
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ScanCommand } from "@aws-sdk/lib-dynamodb";
|
|
2
|
+
import { AbstractCommand } from "./base.js";
|
|
3
|
+
import { ScanInput } from "./inputs/index.js";
|
|
4
|
+
import { ScanOutput } from "./outputs/index.js";
|
|
5
|
+
export class Scan extends AbstractCommand {
|
|
6
|
+
constructor(input) {
|
|
7
|
+
super({
|
|
8
|
+
input,
|
|
9
|
+
codec: {
|
|
10
|
+
encode: ScanInput.encode,
|
|
11
|
+
decode: ScanOutput.decode,
|
|
12
|
+
},
|
|
13
|
+
command: ScanCommand,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=scan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scan.js","sourceRoot":"","sources":["../../../src/commands/scan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,MAAM,OAAO,IAGX,SAAQ,eAA4D;IACpE,YAAY,KAAmB;QAC7B,KAAK,CAAC;YACJ,KAAK;YACL,KAAK,EAAE;gBACL,MAAM,EAAE,SAAS,CAAC,MAAM;gBACxB,MAAM,EAAE,UAAU,CAAC,MAAM;aAC1B;YACD,OAAO,EAAE,WAAW;SACrB,CAAC,CAAC;IACL,CAAC;CACF"}
|