dynamo-document-builder 0.6.0 → 0.6.1
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/README.md +270 -0
- package/dist/attributes/attribute-map.cjs +52 -0
- package/dist/attributes/attribute-map.cjs.map +1 -1
- package/dist/attributes/attribute-map.d.ts +67 -0
- package/dist/attributes/attribute-map.mjs +52 -0
- package/dist/attributes/attribute-map.mjs.map +1 -1
- package/dist/commands/batch-get.cjs +36 -0
- package/dist/commands/batch-get.cjs.map +1 -1
- package/dist/commands/batch-get.d.ts +48 -2
- package/dist/commands/batch-get.mjs +36 -0
- package/dist/commands/batch-get.mjs.map +1 -1
- package/dist/commands/batch-projected-get.cjs +42 -0
- package/dist/commands/batch-projected-get.cjs.map +1 -1
- package/dist/commands/batch-projected-get.d.ts +56 -3
- package/dist/commands/batch-projected-get.mjs +42 -0
- package/dist/commands/batch-projected-get.mjs.map +1 -1
- package/dist/commands/batch-write.cjs +38 -0
- package/dist/commands/batch-write.cjs.map +1 -1
- package/dist/commands/batch-write.d.ts +51 -3
- package/dist/commands/batch-write.mjs +38 -0
- package/dist/commands/batch-write.mjs.map +1 -1
- package/dist/commands/condition-check.cjs +37 -0
- package/dist/commands/condition-check.cjs.map +1 -1
- package/dist/commands/condition-check.d.ts +45 -3
- package/dist/commands/condition-check.mjs +37 -0
- package/dist/commands/condition-check.mjs.map +1 -1
- package/dist/commands/conditional-delete.cjs +33 -0
- package/dist/commands/conditional-delete.cjs.map +1 -1
- package/dist/commands/conditional-delete.d.ts +46 -3
- package/dist/commands/conditional-delete.mjs +33 -0
- package/dist/commands/conditional-delete.mjs.map +1 -1
- package/dist/commands/conditional-put.cjs +34 -0
- package/dist/commands/conditional-put.cjs.map +1 -1
- package/dist/commands/conditional-put.d.ts +48 -4
- package/dist/commands/conditional-put.mjs +34 -0
- package/dist/commands/conditional-put.mjs.map +1 -1
- package/dist/commands/conditional-update.cjs +35 -0
- package/dist/commands/conditional-update.cjs.map +1 -1
- package/dist/commands/conditional-update.d.ts +48 -3
- package/dist/commands/conditional-update.mjs +35 -0
- package/dist/commands/conditional-update.mjs.map +1 -1
- package/dist/commands/delete.cjs +32 -0
- package/dist/commands/delete.cjs.map +1 -1
- package/dist/commands/delete.d.ts +44 -2
- package/dist/commands/delete.mjs +32 -0
- package/dist/commands/delete.mjs.map +1 -1
- package/dist/commands/get.cjs +33 -0
- package/dist/commands/get.cjs.map +1 -1
- package/dist/commands/get.d.ts +45 -2
- package/dist/commands/get.mjs +33 -0
- package/dist/commands/get.mjs.map +1 -1
- package/dist/commands/index.d.ts +62 -1
- package/dist/commands/projected-get.cjs +40 -0
- package/dist/commands/projected-get.cjs.map +1 -1
- package/dist/commands/projected-get.d.ts +54 -3
- package/dist/commands/projected-get.mjs +40 -0
- package/dist/commands/projected-get.mjs.map +1 -1
- package/dist/commands/projected-query.cjs +41 -0
- package/dist/commands/projected-query.cjs.map +1 -1
- package/dist/commands/projected-query.d.ts +56 -3
- package/dist/commands/projected-query.mjs +41 -0
- package/dist/commands/projected-query.mjs.map +1 -1
- package/dist/commands/projected-scan.cjs +41 -0
- package/dist/commands/projected-scan.cjs.map +1 -1
- package/dist/commands/projected-scan.d.ts +55 -3
- package/dist/commands/projected-scan.mjs +41 -0
- package/dist/commands/projected-scan.mjs.map +1 -1
- package/dist/commands/put.cjs +37 -0
- package/dist/commands/put.cjs.map +1 -1
- package/dist/commands/put.d.ts +50 -3
- package/dist/commands/put.mjs +37 -0
- package/dist/commands/put.mjs.map +1 -1
- package/dist/commands/query.cjs +36 -1
- package/dist/commands/query.cjs.map +1 -1
- package/dist/commands/query.d.ts +48 -3
- package/dist/commands/query.mjs +36 -1
- package/dist/commands/query.mjs.map +1 -1
- package/dist/commands/scan.cjs +33 -0
- package/dist/commands/scan.cjs.map +1 -1
- package/dist/commands/scan.d.ts +46 -3
- package/dist/commands/scan.mjs +33 -0
- package/dist/commands/scan.mjs.map +1 -1
- package/dist/commands/transact-get.cjs +35 -0
- package/dist/commands/transact-get.cjs.map +1 -1
- package/dist/commands/transact-get.d.ts +47 -2
- package/dist/commands/transact-get.mjs +35 -0
- package/dist/commands/transact-get.mjs.map +1 -1
- package/dist/commands/transact-write.cjs +37 -0
- package/dist/commands/transact-write.cjs.map +1 -1
- package/dist/commands/transact-write.d.ts +46 -1
- package/dist/commands/transact-write.mjs +37 -0
- package/dist/commands/transact-write.mjs.map +1 -1
- package/dist/commands/update.cjs +37 -0
- package/dist/commands/update.cjs.map +1 -1
- package/dist/commands/update.d.ts +50 -3
- package/dist/commands/update.mjs +37 -0
- package/dist/commands/update.mjs.map +1 -1
- package/dist/conditions/and.cjs +3 -0
- package/dist/conditions/and.cjs.map +1 -1
- package/dist/conditions/and.d.ts +4 -1
- package/dist/conditions/and.mjs +3 -0
- package/dist/conditions/and.mjs.map +1 -1
- package/dist/conditions/begins-with.cjs +3 -0
- package/dist/conditions/begins-with.cjs.map +1 -1
- package/dist/conditions/begins-with.d.ts +4 -1
- package/dist/conditions/begins-with.mjs +3 -0
- package/dist/conditions/begins-with.mjs.map +1 -1
- package/dist/conditions/between.cjs +3 -0
- package/dist/conditions/between.cjs.map +1 -1
- package/dist/conditions/between.d.ts +4 -1
- package/dist/conditions/between.mjs +3 -0
- package/dist/conditions/between.mjs.map +1 -1
- package/dist/conditions/condition-parser.d.ts +1 -1
- package/dist/conditions/contains.cjs +3 -0
- package/dist/conditions/contains.cjs.map +1 -1
- package/dist/conditions/contains.d.ts +4 -1
- package/dist/conditions/contains.mjs +3 -0
- package/dist/conditions/contains.mjs.map +1 -1
- package/dist/conditions/equals.cjs +3 -0
- package/dist/conditions/equals.cjs.map +1 -1
- package/dist/conditions/equals.d.ts +4 -1
- package/dist/conditions/equals.mjs +3 -0
- package/dist/conditions/equals.mjs.map +1 -1
- package/dist/conditions/exists.cjs +3 -0
- package/dist/conditions/exists.cjs.map +1 -1
- package/dist/conditions/exists.d.ts +4 -1
- package/dist/conditions/exists.mjs +3 -0
- package/dist/conditions/exists.mjs.map +1 -1
- package/dist/conditions/greater-than-or-equal.cjs +3 -0
- package/dist/conditions/greater-than-or-equal.cjs.map +1 -1
- package/dist/conditions/greater-than-or-equal.d.ts +4 -1
- package/dist/conditions/greater-than-or-equal.mjs +3 -0
- package/dist/conditions/greater-than-or-equal.mjs.map +1 -1
- package/dist/conditions/greater-than.cjs +3 -0
- package/dist/conditions/greater-than.cjs.map +1 -1
- package/dist/conditions/greater-than.d.ts +4 -1
- package/dist/conditions/greater-than.mjs +3 -0
- package/dist/conditions/greater-than.mjs.map +1 -1
- package/dist/conditions/index.cjs +2 -2
- package/dist/conditions/index.d.ts +185 -2
- package/dist/conditions/index.mjs +1 -1
- package/dist/conditions/is-in.cjs +3 -0
- package/dist/conditions/is-in.cjs.map +1 -1
- package/dist/conditions/is-in.d.ts +4 -1
- package/dist/conditions/is-in.mjs +3 -0
- package/dist/conditions/is-in.mjs.map +1 -1
- package/dist/conditions/less-than-or-equal.cjs +3 -0
- package/dist/conditions/less-than-or-equal.cjs.map +1 -1
- package/dist/conditions/less-than-or-equal.d.ts +4 -1
- package/dist/conditions/less-than-or-equal.mjs +3 -0
- package/dist/conditions/less-than-or-equal.mjs.map +1 -1
- package/dist/conditions/less-than.cjs +3 -0
- package/dist/conditions/less-than.cjs.map +1 -1
- package/dist/conditions/less-than.d.ts +4 -1
- package/dist/conditions/less-than.mjs +3 -0
- package/dist/conditions/less-than.mjs.map +1 -1
- package/dist/conditions/not-equals.cjs +3 -0
- package/dist/conditions/not-equals.cjs.map +1 -1
- package/dist/conditions/not-equals.d.ts +4 -1
- package/dist/conditions/not-equals.mjs +3 -0
- package/dist/conditions/not-equals.mjs.map +1 -1
- package/dist/conditions/not-exists.cjs +3 -0
- package/dist/conditions/not-exists.cjs.map +1 -1
- package/dist/conditions/not-exists.d.ts +4 -1
- package/dist/conditions/not-exists.mjs +3 -0
- package/dist/conditions/not-exists.mjs.map +1 -1
- package/dist/conditions/not.cjs +3 -0
- package/dist/conditions/not.cjs.map +1 -1
- package/dist/conditions/not.d.ts +4 -1
- package/dist/conditions/not.mjs +3 -0
- package/dist/conditions/not.mjs.map +1 -1
- package/dist/conditions/or.cjs +3 -0
- package/dist/conditions/or.cjs.map +1 -1
- package/dist/conditions/or.d.ts +4 -1
- package/dist/conditions/or.mjs +3 -0
- package/dist/conditions/or.mjs.map +1 -1
- package/dist/conditions/size.cjs +3 -0
- package/dist/conditions/size.cjs.map +1 -1
- package/dist/conditions/size.d.ts +4 -1
- package/dist/conditions/size.mjs +3 -0
- package/dist/conditions/size.mjs.map +1 -1
- package/dist/conditions/type-is.cjs +3 -0
- package/dist/conditions/type-is.cjs.map +1 -1
- package/dist/conditions/type-is.d.ts +4 -1
- package/dist/conditions/type-is.mjs +3 -0
- package/dist/conditions/type-is.mjs.map +1 -1
- package/dist/core/entity.cjs +57 -0
- package/dist/core/entity.cjs.map +1 -1
- package/dist/core/entity.d.ts +79 -4
- package/dist/core/entity.mjs +57 -0
- package/dist/core/entity.mjs.map +1 -1
- package/dist/core/index.d.ts +139 -2
- package/dist/core/key.cjs +1 -1
- package/dist/core/key.cjs.map +1 -1
- package/dist/core/key.d.ts +26 -2
- package/dist/core/key.mjs +1 -1
- package/dist/core/key.mjs.map +1 -1
- package/dist/core/table.cjs +22 -0
- package/dist/core/table.cjs.map +1 -1
- package/dist/core/table.d.ts +35 -1
- package/dist/core/table.mjs +22 -0
- package/dist/core/table.mjs.map +1 -1
- package/dist/errors.cjs +3 -0
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.ts +3 -0
- package/dist/errors.mjs +3 -0
- package/dist/errors.mjs.map +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.d.ts +7 -7
- package/dist/index.mjs +2 -2
- package/dist/projections/index.d.ts +7 -1
- package/dist/projections/projection-parser.d.ts +1 -1
- package/dist/updates/add-to-set.cjs +5 -0
- package/dist/updates/add-to-set.cjs.map +1 -1
- package/dist/updates/add-to-set.d.ts +6 -1
- package/dist/updates/add-to-set.mjs +5 -0
- package/dist/updates/add-to-set.mjs.map +1 -1
- package/dist/updates/add.cjs +5 -0
- package/dist/updates/add.cjs.map +1 -1
- package/dist/updates/add.d.ts +6 -1
- package/dist/updates/add.mjs +5 -0
- package/dist/updates/add.mjs.map +1 -1
- package/dist/updates/append.cjs +5 -0
- package/dist/updates/append.cjs.map +1 -1
- package/dist/updates/append.d.ts +6 -1
- package/dist/updates/append.mjs +5 -0
- package/dist/updates/append.mjs.map +1 -1
- package/dist/updates/index.d.ts +78 -1
- package/dist/updates/prepend.cjs +5 -0
- package/dist/updates/prepend.cjs.map +1 -1
- package/dist/updates/prepend.d.ts +6 -1
- package/dist/updates/prepend.mjs +5 -0
- package/dist/updates/prepend.mjs.map +1 -1
- package/dist/updates/ref.cjs +6 -0
- package/dist/updates/ref.cjs.map +1 -1
- package/dist/updates/ref.d.ts +7 -1
- package/dist/updates/ref.mjs +6 -0
- package/dist/updates/ref.mjs.map +1 -1
- package/dist/updates/remove-from-set.cjs +5 -0
- package/dist/updates/remove-from-set.cjs.map +1 -1
- package/dist/updates/remove-from-set.d.ts +6 -1
- package/dist/updates/remove-from-set.mjs +5 -0
- package/dist/updates/remove-from-set.mjs.map +1 -1
- package/dist/updates/remove.cjs +3 -0
- package/dist/updates/remove.cjs.map +1 -1
- package/dist/updates/remove.d.ts +4 -1
- package/dist/updates/remove.mjs +3 -0
- package/dist/updates/remove.mjs.map +1 -1
- package/dist/updates/subtract.cjs +5 -0
- package/dist/updates/subtract.cjs.map +1 -1
- package/dist/updates/subtract.d.ts +6 -1
- package/dist/updates/subtract.mjs +5 -0
- package/dist/updates/subtract.mjs.map +1 -1
- package/dist/updates/update-parser.cjs +10 -0
- package/dist/updates/update-parser.cjs.map +1 -1
- package/dist/updates/update-parser.d.ts +17 -1
- package/dist/updates/update-parser.mjs +10 -0
- package/dist/updates/update-parser.mjs.map +1 -1
- package/package.json +2 -1
- package/dist/commands/base-command.cjs +0 -3
- package/dist/commands/base-command.cjs.map +0 -1
- package/dist/commands/base-command.d.ts +0 -27
- package/dist/commands/base-command.mjs +0 -2
- package/dist/commands/base-command.mjs.map +0 -1
- package/dist/conditions/condition-types.cjs +0 -3
- package/dist/conditions/condition-types.cjs.map +0 -1
- package/dist/conditions/condition-types.d.ts +0 -95
- package/dist/conditions/condition-types.mjs +0 -2
- package/dist/conditions/condition-types.mjs.map +0 -1
- package/dist/core/core-types.cjs +0 -3
- package/dist/core/core-types.cjs.map +0 -1
- package/dist/core/core-types.d.ts +0 -44
- package/dist/core/core-types.mjs +0 -2
- package/dist/core/core-types.mjs.map +0 -1
- package/dist/projections/projection-types.cjs +0 -3
- package/dist/projections/projection-types.cjs.map +0 -1
- package/dist/projections/projection-types.d.ts +0 -3
- package/dist/projections/projection-types.mjs +0 -2
- package/dist/projections/projection-types.mjs.map +0 -1
- package/dist/updates/update-types.cjs +0 -3
- package/dist/updates/update-types.cjs.map +0 -1
- package/dist/updates/update-types.d.ts +0 -45
- package/dist/updates/update-types.mjs +0 -2
- package/dist/updates/update-types.mjs.map +0 -1
|
@@ -1,18 +1,60 @@
|
|
|
1
1
|
import { DynamoEntity } from '../core/entity.js';
|
|
2
|
-
import { EntitySchema, TransactWriteOperation } from '../core/
|
|
2
|
+
import { EntitySchema, TransactWriteOperation } from '../core/index.js';
|
|
3
3
|
import { ReturnValue, ReturnItemCollectionMetrics, ItemCollectionMetrics } from '@aws-sdk/client-dynamodb';
|
|
4
4
|
import { ZodObject } from 'zod/v4';
|
|
5
|
-
import { BaseConfig, BaseResult, BaseCommand, WriteTransactable } from './
|
|
5
|
+
import { BaseConfig, BaseResult, BaseCommand, WriteTransactable } from './index.js';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Configuration for the Delete command.
|
|
9
|
+
*
|
|
10
|
+
* @template Schema - The Zod schema defining the structure of the entity.
|
|
11
|
+
*/
|
|
7
12
|
type DeleteConfig<Schema extends ZodObject> = BaseConfig & {
|
|
8
13
|
key: Partial<EntitySchema<Schema>>;
|
|
9
14
|
returnValues?: ReturnValue;
|
|
10
15
|
returnItemCollectionMetrics?: ReturnItemCollectionMetrics;
|
|
11
16
|
};
|
|
17
|
+
/**
|
|
18
|
+
* Result of the Delete command.
|
|
19
|
+
*
|
|
20
|
+
* @template Schema - The Zod schema defining the structure of the entity.
|
|
21
|
+
*/
|
|
12
22
|
type DeleteResult<Schema extends ZodObject> = BaseResult & {
|
|
13
23
|
deletedItem?: Partial<EntitySchema<Schema>> | undefined;
|
|
14
24
|
itemCollectionMetrics?: ItemCollectionMetrics;
|
|
15
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* Command to remove an item from a DynamoDB table.
|
|
28
|
+
*
|
|
29
|
+
* @template Schema - The Zod schema defining the structure of the entity.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```typescript
|
|
33
|
+
* import { DynamoTable, DynamoEntity, key, Delete } from 'dynamo-document-builder';
|
|
34
|
+
*
|
|
35
|
+
* const table = new DynamoTable({
|
|
36
|
+
* tableName: 'ExampleTable',
|
|
37
|
+
* documentClient,
|
|
38
|
+
* });
|
|
39
|
+
*
|
|
40
|
+
* const userEntity = new DynamoEntity({
|
|
41
|
+
* table,
|
|
42
|
+
* schema: z.object({
|
|
43
|
+
* userId: z.string(),
|
|
44
|
+
* name: z.string(),
|
|
45
|
+
* }),
|
|
46
|
+
* partitionKey: user => key('USER', user.userId),
|
|
47
|
+
* sortKey: () => 'METADATA',
|
|
48
|
+
* });
|
|
49
|
+
*
|
|
50
|
+
* const deleteCommand = new Delete({
|
|
51
|
+
* key: { userId: 'user123' },
|
|
52
|
+
* returnValues: 'ALL_OLD',
|
|
53
|
+
* });
|
|
54
|
+
*
|
|
55
|
+
* const { deletedItem } = await userEntity.send(deleteCommand);
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
16
58
|
declare class Delete<Schema extends ZodObject> implements BaseCommand<DeleteResult<Schema>, Schema>, WriteTransactable<Schema> {
|
|
17
59
|
#private;
|
|
18
60
|
constructor(config: DeleteConfig<Schema>);
|
package/dist/commands/delete.mjs
CHANGED
|
@@ -2,6 +2,38 @@ import { __classPrivateFieldSet, __awaiter, __classPrivateFieldGet } from '../no
|
|
|
2
2
|
import { DeleteCommand } from '@aws-sdk/lib-dynamodb';
|
|
3
3
|
|
|
4
4
|
var _Delete_config;
|
|
5
|
+
/**
|
|
6
|
+
* Command to remove an item from a DynamoDB table.
|
|
7
|
+
*
|
|
8
|
+
* @template Schema - The Zod schema defining the structure of the entity.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* import { DynamoTable, DynamoEntity, key, Delete } from 'dynamo-document-builder';
|
|
13
|
+
*
|
|
14
|
+
* const table = new DynamoTable({
|
|
15
|
+
* tableName: 'ExampleTable',
|
|
16
|
+
* documentClient,
|
|
17
|
+
* });
|
|
18
|
+
*
|
|
19
|
+
* const userEntity = new DynamoEntity({
|
|
20
|
+
* table,
|
|
21
|
+
* schema: z.object({
|
|
22
|
+
* userId: z.string(),
|
|
23
|
+
* name: z.string(),
|
|
24
|
+
* }),
|
|
25
|
+
* partitionKey: user => key('USER', user.userId),
|
|
26
|
+
* sortKey: () => 'METADATA',
|
|
27
|
+
* });
|
|
28
|
+
*
|
|
29
|
+
* const deleteCommand = new Delete({
|
|
30
|
+
* key: { userId: 'user123' },
|
|
31
|
+
* returnValues: 'ALL_OLD',
|
|
32
|
+
* });
|
|
33
|
+
*
|
|
34
|
+
* const { deletedItem } = await userEntity.send(deleteCommand);
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
5
37
|
class Delete {
|
|
6
38
|
constructor(config) {
|
|
7
39
|
_Delete_config.set(this, void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete.mjs","sources":["../../src/commands/delete.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"delete.mjs","sources":["../../src/commands/delete.ts"],"sourcesContent":[null],"names":[],"mappings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AAA,WAAW,GAAG,YAAY,CAAC,UAA2C;gBACxE;qBAAO;AACL,oBAAA,WAAW,IAAI,MAAM,MAAM,CAAC;AACzB,yBAAA,OAAO;AACP,yBAAA,UAAU,CAAC,YAAY,CAAC,UAAU,CAAC,CAAkC;gBAC1E;YACF;YAEA,OAAO;gBACL,WAAW;gBACX,gBAAgB,EAAE,YAAY,CAAC,SAAS;gBACxC,gBAAgB,EAAE,YAAY,CAAC,gBAAgB;gBAC/C,qBAAqB,EAAE,YAAY,CAAC,qBAAqB;aAC1D;QACH,CAAC,CAAA;AAAA,IAAA;AAEY,IAAA,uBAAuB,CAClC,MAA4B,EAAA;;YAE5B,OAAO;AACL,gBAAA,MAAM,EAAE;AACN,oBAAA,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,SAAS;oBACjC,GAAG,EAAE,MAAM,CAAC,eAAe,CAAC,uBAAA,IAAI,EAAA,cAAA,EAAA,GAAA,CAAQ,CAAC,GAAG,CAAC;AAC9C,iBAAA;aACF;QACH,CAAC,CAAA;AAAA,IAAA;AACF;;;;;"}
|
package/dist/commands/get.cjs
CHANGED
|
@@ -4,6 +4,39 @@ var tslib_es6 = require('../node_modules/tslib/tslib.es6.cjs');
|
|
|
4
4
|
var libDynamodb = require('@aws-sdk/lib-dynamodb');
|
|
5
5
|
|
|
6
6
|
var _Get_config;
|
|
7
|
+
/**
|
|
8
|
+
* Command to retrieve a single item by primary key from a DynamoDB table.
|
|
9
|
+
*
|
|
10
|
+
* @template Schema - The Zod schema defining the structure of the entity.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* import { DynamoTable, DynamoEntity, key, Get } from 'dynamo-document-builder';
|
|
15
|
+
*
|
|
16
|
+
* const table = new DynamoTable({
|
|
17
|
+
* tableName: 'ExampleTable',
|
|
18
|
+
* documentClient,
|
|
19
|
+
* });
|
|
20
|
+
*
|
|
21
|
+
* const userEntity = new DynamoEntity({
|
|
22
|
+
* table,
|
|
23
|
+
* schema: z.object({
|
|
24
|
+
* userId: z.string(),
|
|
25
|
+
* name: z.string(),
|
|
26
|
+
* email: z.string(),
|
|
27
|
+
* }),
|
|
28
|
+
* partitionKey: user => key('USER', user.userId),
|
|
29
|
+
* sortKey: () => 'METADATA',
|
|
30
|
+
* });
|
|
31
|
+
*
|
|
32
|
+
* const getCommand = new Get({
|
|
33
|
+
* key: { userId: 'user123' },
|
|
34
|
+
* consistent: true,
|
|
35
|
+
* });
|
|
36
|
+
*
|
|
37
|
+
* const { item } = await userEntity.send(getCommand);
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
7
40
|
class Get {
|
|
8
41
|
constructor(config) {
|
|
9
42
|
_Get_config.set(this, void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get.cjs","sources":["../../src/commands/get.ts"],"sourcesContent":[null],"names":["__classPrivateFieldSet","GetCommand","__classPrivateFieldGet"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"get.cjs","sources":["../../src/commands/get.ts"],"sourcesContent":[null],"names":["__classPrivateFieldSet","GetCommand","__classPrivateFieldGet"],"mappings":";;;;;;AAyBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCG;MACU,GAAG,CAAA;AAGd,IAAA,WAAA,CAAY,MAAyB,EAAA;QAFrC,WAAA,CAAA,GAAA,CAAA,IAAA,EAAA,MAAA,CAAA;AAGE,QAAAA,gCAAA,CAAA,IAAI,EAAA,WAAA,EAAW,MAAM,EAAA,GAAA,CAAA;IACvB;AAEa,IAAA,OAAO,CAAC,MAA4B,EAAA;;;AAC/C,YAAA,MAAM,OAAO,GAAG,IAAIC,sBAAU,CAAC;AAC7B,gBAAA,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,SAAS;gBACjC,GAAG,EAAE,MAAM,CAAC,eAAe,CAACC,iCAAA,IAAI,EAAA,WAAA,EAAA,GAAA,CAAQ,CAAC,GAAG,CAAC;gBAC7C,cAAc,EAAE,MAAAA,gCAAA,CAAA,IAAI,mBAAQ,CAAC,UAAU,mCAAI,KAAK;AAChD,gBAAA,sBAAsB,EAAEA,gCAAA,CAAA,IAAI,EAAA,WAAA,EAAA,GAAA,CAAQ,CAAC,sBAAsB;AAC5D,aAAA,CAAC;AAEF,YAAA,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE;gBAChE,WAAW,EAAE,MAAAA,gCAAA,CAAA,IAAI,mBAAQ,CAAC,eAAe,0CAAE,MAAM;AACjD,gBAAA,cAAc,EAAEA,gCAAA,CAAA,IAAI,EAAA,WAAA,EAAA,GAAA,CAAQ,CAAC,SAAS;AACvC,aAAA,CAAC;AAEF,YAAA,IAAI,SAAS,CAAC,IAAI,EAAE;AAClB,gBAAA,MAAM,IAAI,GAAGA,gCAAA,CAAA,IAAI,EAAA,WAAA,EAAA,GAAA,CAAQ,CAAC;sBACrB,SAAS,CAAC;AACb,sBAAE,MAAM,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC;gBAElD,OAAO;oBACL,IAAI;oBACJ,gBAAgB,EAAE,SAAS,CAAC,SAAS;oBACrC,gBAAgB,EAAE,SAAS,CAAC,gBAAgB;iBAC7C;YACH;YAEA,OAAO;AACL,gBAAA,IAAI,EAAE,SAAS;gBACf,gBAAgB,EAAE,SAAS,CAAC,SAAS;gBACrC,gBAAgB,EAAE,SAAS,CAAC,gBAAgB;aAC7C;QACH,CAAC,CAAA;AAAA,IAAA;AACF;;;;;"}
|
package/dist/commands/get.d.ts
CHANGED
|
@@ -1,15 +1,58 @@
|
|
|
1
1
|
import { DynamoEntity } from '../core/entity.js';
|
|
2
|
-
import { BaseConfig, BaseResult, BaseCommand } from './
|
|
2
|
+
import { BaseConfig, BaseResult, BaseCommand } from './index.js';
|
|
3
3
|
import { ZodObject } from 'zod/v4';
|
|
4
|
-
import { EntitySchema } from '../core/
|
|
4
|
+
import { EntitySchema } from '../core/index.js';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* Configuration for the Get command.
|
|
8
|
+
*
|
|
9
|
+
* @template Schema - The Zod schema defining the structure of the entity.
|
|
10
|
+
*/
|
|
6
11
|
type GetConfig<Schema extends ZodObject> = BaseConfig & {
|
|
7
12
|
key: Partial<EntitySchema<Schema>>;
|
|
8
13
|
consistent?: boolean;
|
|
9
14
|
};
|
|
15
|
+
/**
|
|
16
|
+
* Result of the Get command.
|
|
17
|
+
*
|
|
18
|
+
* @template Schema - The Zod schema defining the structure of the entity.
|
|
19
|
+
*/
|
|
10
20
|
type GetResult<Schema extends ZodObject> = BaseResult & {
|
|
11
21
|
item: EntitySchema<Schema> | undefined;
|
|
12
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* Command to retrieve a single item by primary key from a DynamoDB table.
|
|
25
|
+
*
|
|
26
|
+
* @template Schema - The Zod schema defining the structure of the entity.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```typescript
|
|
30
|
+
* import { DynamoTable, DynamoEntity, key, Get } from 'dynamo-document-builder';
|
|
31
|
+
*
|
|
32
|
+
* const table = new DynamoTable({
|
|
33
|
+
* tableName: 'ExampleTable',
|
|
34
|
+
* documentClient,
|
|
35
|
+
* });
|
|
36
|
+
*
|
|
37
|
+
* const userEntity = new DynamoEntity({
|
|
38
|
+
* table,
|
|
39
|
+
* schema: z.object({
|
|
40
|
+
* userId: z.string(),
|
|
41
|
+
* name: z.string(),
|
|
42
|
+
* email: z.string(),
|
|
43
|
+
* }),
|
|
44
|
+
* partitionKey: user => key('USER', user.userId),
|
|
45
|
+
* sortKey: () => 'METADATA',
|
|
46
|
+
* });
|
|
47
|
+
*
|
|
48
|
+
* const getCommand = new Get({
|
|
49
|
+
* key: { userId: 'user123' },
|
|
50
|
+
* consistent: true,
|
|
51
|
+
* });
|
|
52
|
+
*
|
|
53
|
+
* const { item } = await userEntity.send(getCommand);
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
13
56
|
declare class Get<Schema extends ZodObject> implements BaseCommand<GetResult<Schema>, Schema> {
|
|
14
57
|
#private;
|
|
15
58
|
constructor(config: GetConfig<Schema>);
|
package/dist/commands/get.mjs
CHANGED
|
@@ -2,6 +2,39 @@ import { __classPrivateFieldSet, __awaiter, __classPrivateFieldGet } from '../no
|
|
|
2
2
|
import { GetCommand } from '@aws-sdk/lib-dynamodb';
|
|
3
3
|
|
|
4
4
|
var _Get_config;
|
|
5
|
+
/**
|
|
6
|
+
* Command to retrieve a single item by primary key from a DynamoDB table.
|
|
7
|
+
*
|
|
8
|
+
* @template Schema - The Zod schema defining the structure of the entity.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```typescript
|
|
12
|
+
* import { DynamoTable, DynamoEntity, key, Get } from 'dynamo-document-builder';
|
|
13
|
+
*
|
|
14
|
+
* const table = new DynamoTable({
|
|
15
|
+
* tableName: 'ExampleTable',
|
|
16
|
+
* documentClient,
|
|
17
|
+
* });
|
|
18
|
+
*
|
|
19
|
+
* const userEntity = new DynamoEntity({
|
|
20
|
+
* table,
|
|
21
|
+
* schema: z.object({
|
|
22
|
+
* userId: z.string(),
|
|
23
|
+
* name: z.string(),
|
|
24
|
+
* email: z.string(),
|
|
25
|
+
* }),
|
|
26
|
+
* partitionKey: user => key('USER', user.userId),
|
|
27
|
+
* sortKey: () => 'METADATA',
|
|
28
|
+
* });
|
|
29
|
+
*
|
|
30
|
+
* const getCommand = new Get({
|
|
31
|
+
* key: { userId: 'user123' },
|
|
32
|
+
* consistent: true,
|
|
33
|
+
* });
|
|
34
|
+
*
|
|
35
|
+
* const { item } = await userEntity.send(getCommand);
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
5
38
|
class Get {
|
|
6
39
|
constructor(config) {
|
|
7
40
|
_Get_config.set(this, void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get.mjs","sources":["../../src/commands/get.ts"],"sourcesContent":[null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MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC;gBAElD,OAAO;oBACL,IAAI;oBACJ,gBAAgB,EAAE,SAAS,CAAC,SAAS;oBACrC,gBAAgB,EAAE,SAAS,CAAC,gBAAgB;iBAC7C;YACH;YAEA,OAAO;AACL,gBAAA,IAAI,EAAE,SAAS;gBACf,gBAAgB,EAAE,SAAS,CAAC,SAAS;gBACrC,gBAAgB,EAAE,SAAS,CAAC,gBAAgB;aAC7C;QACH,CAAC,CAAA;AAAA,IAAA;AACF;;;;;"}
|
package/dist/commands/index.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { TransactWriteOperation } from '../core/index.js';
|
|
2
|
+
import { DynamoEntity } from '../core/entity.js';
|
|
3
|
+
import { ReturnConsumedCapacity, ConsumedCapacity } from '@aws-sdk/client-dynamodb';
|
|
4
|
+
import { ResponseMetadata } from '@aws-sdk/types';
|
|
5
|
+
import { ZodObject } from 'zod/v4';
|
|
2
6
|
export { Get, GetConfig, GetResult } from './get.js';
|
|
3
7
|
export { Query, QueryConfig, QueryResult } from './query.js';
|
|
4
8
|
export { Scan, ScanConfig, ScanResult } from './scan.js';
|
|
@@ -17,3 +21,60 @@ export { ConditionalDelete, ConditionalDeleteConfig, ConditionalDeleteResult } f
|
|
|
17
21
|
export { BatchWrite, BatchWriteConfig, BatchWriteResult } from './batch-write.js';
|
|
18
22
|
export { TransactWrite, TransactWriteConfig, TransactWriteResult } from './transact-write.js';
|
|
19
23
|
export { ConditionCheck, ConditionCheckConfig } from './condition-check.js';
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Interface-like type for command classes to extend from that defines the execute method.
|
|
27
|
+
*
|
|
28
|
+
* This is what enables the command-based pattern for DynamoDB operations that makes tree-shaking possible.
|
|
29
|
+
*
|
|
30
|
+
* @template Output The output type of the command's execute method.
|
|
31
|
+
* @template Schema The Zod schema type associated with the DynamoEntity.
|
|
32
|
+
*/
|
|
33
|
+
type BaseCommand<Output, Schema extends ZodObject> = {
|
|
34
|
+
execute(entity: DynamoEntity<Schema>): Promise<Output>;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Interface-like type for paginatable command classes to extend from that defines the executePaginated method.
|
|
38
|
+
*
|
|
39
|
+
* Commands should only implement this interface if they support pagination.
|
|
40
|
+
*
|
|
41
|
+
* @template Output The output type of the command's executePaginated method.
|
|
42
|
+
* @template Schema The Zod schema type associated with the DynamoEntity.
|
|
43
|
+
*/
|
|
44
|
+
type BasePaginatable<Output, Schema extends ZodObject> = {
|
|
45
|
+
executePaginated(entity: DynamoEntity<Schema>): AsyncGenerator<Output, void, unknown>;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Interface-like type for write commands that can be included in a write transaction.
|
|
49
|
+
*
|
|
50
|
+
* @template Schema The Zod schema type associated with the DynamoEntity.
|
|
51
|
+
*/
|
|
52
|
+
type WriteTransactable<Schema extends ZodObject> = {
|
|
53
|
+
prepareWriteTransaction(entity: DynamoEntity<Schema>): Promise<TransactWriteOperation>;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Base configuration options for DynamoDB commands.
|
|
57
|
+
*
|
|
58
|
+
* @property skipValidation - If true, skips schema validation of the returned item(s).
|
|
59
|
+
* @property returnConsumedCapacity - Specifies the level of detail about provisioned throughput consumption that is returned in the response.
|
|
60
|
+
* @property abortController - An AbortController to allow cancellation of the operation.
|
|
61
|
+
* @property timeoutMs - The maximum time in milliseconds to wait for the operation to complete.
|
|
62
|
+
*/
|
|
63
|
+
type BaseConfig = {
|
|
64
|
+
skipValidation?: boolean;
|
|
65
|
+
returnConsumedCapacity?: ReturnConsumedCapacity;
|
|
66
|
+
abortController?: AbortController;
|
|
67
|
+
timeoutMs?: number;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Base result type for DynamoDB commands.
|
|
71
|
+
*
|
|
72
|
+
* @property responseMetadata - Metadata about the response from DynamoDB.
|
|
73
|
+
* @property consumedCapacity - Information about the capacity units consumed by the operation.
|
|
74
|
+
*/
|
|
75
|
+
type BaseResult = {
|
|
76
|
+
responseMetadata?: ResponseMetadata;
|
|
77
|
+
consumedCapacity?: ConsumedCapacity | undefined;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export type { BaseCommand, BaseConfig, BasePaginatable, BaseResult, WriteTransactable };
|
|
@@ -5,6 +5,46 @@ var libDynamodb = require('@aws-sdk/lib-dynamodb');
|
|
|
5
5
|
var projections_projectionParser = require('../projections/projection-parser.cjs');
|
|
6
6
|
|
|
7
7
|
var _ProjectedGet_config;
|
|
8
|
+
/**
|
|
9
|
+
* Command to retrieve specific attributes of a single item by primary key.
|
|
10
|
+
*
|
|
11
|
+
* @template Schema - The Zod schema defining the structure of the entity.
|
|
12
|
+
* @template ProjectionSchema - The Zod schema defining the structure of the projected attributes.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* import { DynamoTable, DynamoEntity, key, ProjectedGet } from 'dynamo-document-builder';
|
|
17
|
+
*
|
|
18
|
+
* const table = new DynamoTable({
|
|
19
|
+
* tableName: 'ExampleTable',
|
|
20
|
+
* documentClient,
|
|
21
|
+
* });
|
|
22
|
+
*
|
|
23
|
+
* const userEntity = new DynamoEntity({
|
|
24
|
+
* table,
|
|
25
|
+
* schema: z.object({
|
|
26
|
+
* userId: z.string(),
|
|
27
|
+
* name: z.string(),
|
|
28
|
+
* email: z.string(),
|
|
29
|
+
* age: z.number(),
|
|
30
|
+
* }),
|
|
31
|
+
* partitionKey: user => key('USER', user.userId),
|
|
32
|
+
* sortKey: () => 'METADATA',
|
|
33
|
+
* });
|
|
34
|
+
*
|
|
35
|
+
* const projectedGetCommand = new ProjectedGet({
|
|
36
|
+
* key: { userId: 'user123' },
|
|
37
|
+
* projection: ['name', 'email'],
|
|
38
|
+
* projectionSchema: z.object({
|
|
39
|
+
* name: z.string(),
|
|
40
|
+
* email: z.string(),
|
|
41
|
+
* }),
|
|
42
|
+
* consistent: true,
|
|
43
|
+
* });
|
|
44
|
+
*
|
|
45
|
+
* const { item } = await userEntity.send(projectedGetCommand);
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
8
48
|
class ProjectedGet {
|
|
9
49
|
constructor(config) {
|
|
10
50
|
_ProjectedGet_config.set(this, void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projected-get.cjs","sources":["../../src/commands/projected-get.ts"],"sourcesContent":[null],"names":["__classPrivateFieldSet","parseProjection","__classPrivateFieldGet","GetCommand"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"projected-get.cjs","sources":["../../src/commands/projected-get.ts"],"sourcesContent":[null],"names":["__classPrivateFieldSet","parseProjection","__classPrivateFieldGet","GetCommand"],"mappings":";;;;;;;AAgCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCG;MACU,YAAY,CAAA;AAKvB,IAAA,WAAA,CAAY,MAAoD,EAAA;QAFhE,oBAAA,CAAA,GAAA,CAAA,IAAA,EAAA,MAAA,CAAA;AAGE,QAAAA,gCAAA,CAAA,IAAI,EAAA,oBAAA,EAAW,MAAM,EAAA,GAAA,CAAA;IACvB;AAEa,IAAA,OAAO,CAClB,MAA4B,EAAA;;;AAE5B,YAAA,MAAM,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,GAAGC,4CAAe,CACtEC,gCAAA,CAAA,IAAI,EAAA,oBAAA,EAAA,GAAA,CAAQ,CAAC,UAAU,CACxB;AAED,YAAA,MAAM,OAAO,GAAG,IAAIC,sBAAU,CAAC;AAC7B,gBAAA,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,SAAS;gBACjC,GAAG,EAAE,MAAM,CAAC,eAAe,CAACD,iCAAA,IAAI,EAAA,oBAAA,EAAA,GAAA,CAAQ,CAAC,GAAG,CAAC;AAC7C,gBAAA,oBAAoB,EAAE,oBAAoB;AAC1C,gBAAA,wBAAwB,EAAE,sBAAsB,CAAC,sBAAsB,EAAE;gBACzE,cAAc,EAAE,MAAAA,gCAAA,CAAA,IAAI,4BAAQ,CAAC,UAAU,mCAAI,KAAK;AAChD,gBAAA,sBAAsB,EAAEA,gCAAA,CAAA,IAAI,EAAA,oBAAA,EAAA,GAAA,CAAQ,CAAC,sBAAsB;AAC5D,aAAA,CAAC;AAEF,YAAA,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE;gBAChE,WAAW,EAAE,MAAAA,gCAAA,CAAA,IAAI,4BAAQ,CAAC,eAAe,0CAAE,MAAM;AACjD,gBAAA,cAAc,EAAEA,gCAAA,CAAA,IAAI,EAAA,oBAAA,EAAA,GAAA,CAAQ,CAAC,SAAS;AACvC,aAAA,CAAC;AAEF,YAAA,IAAI,SAAS,CAAC,IAAI,EAAE;AAClB,gBAAA,MAAM,IAAI,GAAGA,gCAAA,CAAA,IAAI,EAAA,oBAAA,EAAA,GAAA,CAAQ,CAAC;sBACrB,SAAS,CAAC;AACb,sBAAE,MAAMA,gCAAA,CAAA,IAAI,4BAAQ,CAAC,gBAAgB,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC;gBAElE,OAAO;oBACL,IAAI;oBACJ,gBAAgB,EAAE,SAAS,CAAC,SAAS;oBACrC,gBAAgB,EAAE,SAAS,CAAC,gBAAgB;iBAC7C;YACH;YAEA,OAAO;AACL,gBAAA,IAAI,EAAE,SAAS;gBACf,gBAAgB,EAAE,SAAS,CAAC,SAAS;gBACrC,gBAAgB,EAAE,SAAS,CAAC,gBAAgB;aAC7C;QACH,CAAC,CAAA;AAAA,IAAA;AACF;;;;;"}
|
|
@@ -1,17 +1,68 @@
|
|
|
1
1
|
import { DynamoEntity } from '../core/entity.js';
|
|
2
|
-
import { EntitySchema } from '../core/
|
|
2
|
+
import { EntitySchema } from '../core/index.js';
|
|
3
3
|
import { GetConfig } from './get.js';
|
|
4
|
-
import { Projection } from '../projections/
|
|
4
|
+
import { Projection } from '../projections/index.js';
|
|
5
5
|
import { ZodObject } from 'zod/v4';
|
|
6
|
-
import { BaseResult, BaseCommand } from './
|
|
6
|
+
import { BaseResult, BaseCommand } from './index.js';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Configuration for the ProjectedGet command.
|
|
10
|
+
*
|
|
11
|
+
* @template Schema - The Zod schema defining the structure of the entity.
|
|
12
|
+
* @template ProjectionSchema - The Zod schema defining the structure of the projected attributes.
|
|
13
|
+
*/
|
|
8
14
|
type ProjectedGetConfig<Schema extends ZodObject, ProjectionSchema extends ZodObject> = GetConfig<Schema> & {
|
|
9
15
|
projection: Projection;
|
|
10
16
|
projectionSchema: ProjectionSchema;
|
|
11
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* Result of the ProjectedGet command.
|
|
20
|
+
*
|
|
21
|
+
* @template ProjectionSchema - The Zod schema defining the structure of the projected attributes.
|
|
22
|
+
*/
|
|
12
23
|
type ProjectedGetResult<ProjectionSchema extends ZodObject> = BaseResult & {
|
|
13
24
|
item: EntitySchema<ProjectionSchema> | undefined;
|
|
14
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* Command to retrieve specific attributes of a single item by primary key.
|
|
28
|
+
*
|
|
29
|
+
* @template Schema - The Zod schema defining the structure of the entity.
|
|
30
|
+
* @template ProjectionSchema - The Zod schema defining the structure of the projected attributes.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```typescript
|
|
34
|
+
* import { DynamoTable, DynamoEntity, key, ProjectedGet } from 'dynamo-document-builder';
|
|
35
|
+
*
|
|
36
|
+
* const table = new DynamoTable({
|
|
37
|
+
* tableName: 'ExampleTable',
|
|
38
|
+
* documentClient,
|
|
39
|
+
* });
|
|
40
|
+
*
|
|
41
|
+
* const userEntity = new DynamoEntity({
|
|
42
|
+
* table,
|
|
43
|
+
* schema: z.object({
|
|
44
|
+
* userId: z.string(),
|
|
45
|
+
* name: z.string(),
|
|
46
|
+
* email: z.string(),
|
|
47
|
+
* age: z.number(),
|
|
48
|
+
* }),
|
|
49
|
+
* partitionKey: user => key('USER', user.userId),
|
|
50
|
+
* sortKey: () => 'METADATA',
|
|
51
|
+
* });
|
|
52
|
+
*
|
|
53
|
+
* const projectedGetCommand = new ProjectedGet({
|
|
54
|
+
* key: { userId: 'user123' },
|
|
55
|
+
* projection: ['name', 'email'],
|
|
56
|
+
* projectionSchema: z.object({
|
|
57
|
+
* name: z.string(),
|
|
58
|
+
* email: z.string(),
|
|
59
|
+
* }),
|
|
60
|
+
* consistent: true,
|
|
61
|
+
* });
|
|
62
|
+
*
|
|
63
|
+
* const { item } = await userEntity.send(projectedGetCommand);
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
15
66
|
declare class ProjectedGet<Schema extends ZodObject, ProjectionSchema extends ZodObject> implements BaseCommand<ProjectedGetResult<ProjectionSchema>, Schema> {
|
|
16
67
|
#private;
|
|
17
68
|
constructor(config: ProjectedGetConfig<Schema, ProjectionSchema>);
|
|
@@ -3,6 +3,46 @@ import { GetCommand } from '@aws-sdk/lib-dynamodb';
|
|
|
3
3
|
import { parseProjection } from '../projections/projection-parser.mjs';
|
|
4
4
|
|
|
5
5
|
var _ProjectedGet_config;
|
|
6
|
+
/**
|
|
7
|
+
* Command to retrieve specific attributes of a single item by primary key.
|
|
8
|
+
*
|
|
9
|
+
* @template Schema - The Zod schema defining the structure of the entity.
|
|
10
|
+
* @template ProjectionSchema - The Zod schema defining the structure of the projected attributes.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* import { DynamoTable, DynamoEntity, key, ProjectedGet } from 'dynamo-document-builder';
|
|
15
|
+
*
|
|
16
|
+
* const table = new DynamoTable({
|
|
17
|
+
* tableName: 'ExampleTable',
|
|
18
|
+
* documentClient,
|
|
19
|
+
* });
|
|
20
|
+
*
|
|
21
|
+
* const userEntity = new DynamoEntity({
|
|
22
|
+
* table,
|
|
23
|
+
* schema: z.object({
|
|
24
|
+
* userId: z.string(),
|
|
25
|
+
* name: z.string(),
|
|
26
|
+
* email: z.string(),
|
|
27
|
+
* age: z.number(),
|
|
28
|
+
* }),
|
|
29
|
+
* partitionKey: user => key('USER', user.userId),
|
|
30
|
+
* sortKey: () => 'METADATA',
|
|
31
|
+
* });
|
|
32
|
+
*
|
|
33
|
+
* const projectedGetCommand = new ProjectedGet({
|
|
34
|
+
* key: { userId: 'user123' },
|
|
35
|
+
* projection: ['name', 'email'],
|
|
36
|
+
* projectionSchema: z.object({
|
|
37
|
+
* name: z.string(),
|
|
38
|
+
* email: z.string(),
|
|
39
|
+
* }),
|
|
40
|
+
* consistent: true,
|
|
41
|
+
* });
|
|
42
|
+
*
|
|
43
|
+
* const { item } = await userEntity.send(projectedGetCommand);
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
6
46
|
class ProjectedGet {
|
|
7
47
|
constructor(config) {
|
|
8
48
|
_ProjectedGet_config.set(this, void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projected-get.mjs","sources":["../../src/commands/projected-get.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"projected-get.mjs","sources":["../../src/commands/projected-get.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;AAgCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCG;MACU,YAAY,CAAA;AAKvB,IAAA,WAAA,CAAY,MAAoD,EAAA;QAFhE,oBAAA,CAAA,GAAA,CAAA,IAAA,EAAA,MAAA,CAAA;AAGE,QAAA,sBAAA,CAAA,IAAI,EAAA,oBAAA,EAAW,MAAM,EAAA,GAAA,CAAA;IACvB;AAEa,IAAA,OAAO,CAClB,MAA4B,EAAA;;;AAE5B,YAAA,MAAM,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,GAAG,eAAe,CACtE,sBAAA,CAAA,IAAI,EAAA,oBAAA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gBACf,gBAAgB,EAAE,SAAS,CAAC,SAAS;gBACrC,gBAAgB,EAAE,SAAS,CAAC,gBAAgB;aAC7C;QACH,CAAC,CAAA;AAAA,IAAA;AACF;;;;;"}
|
|
@@ -10,6 +10,47 @@ var libDynamodb = require('@aws-sdk/lib-dynamodb');
|
|
|
10
10
|
var pMap = require('p-map');
|
|
11
11
|
|
|
12
12
|
var _ProjectedQuery_config;
|
|
13
|
+
/**
|
|
14
|
+
* Command to retrieve specific attributes of multiple items by partition key with optional sort key conditions.
|
|
15
|
+
*
|
|
16
|
+
* @template Schema - The Zod schema defining the structure of the entity.
|
|
17
|
+
* @template ProjectionSchema - The Zod schema defining the structure of the projected attributes.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```typescript
|
|
21
|
+
* import { DynamoTable, DynamoEntity, key, ProjectedQuery, beginsWith } from 'dynamo-document-builder';
|
|
22
|
+
*
|
|
23
|
+
* const table = new DynamoTable({
|
|
24
|
+
* tableName: 'ExampleTable',
|
|
25
|
+
* documentClient,
|
|
26
|
+
* });
|
|
27
|
+
*
|
|
28
|
+
* const todoEntity = new DynamoEntity({
|
|
29
|
+
* table,
|
|
30
|
+
* schema: z.object({
|
|
31
|
+
* userId: z.string(),
|
|
32
|
+
* todoId: z.string(),
|
|
33
|
+
* title: z.string(),
|
|
34
|
+
* description: z.string(),
|
|
35
|
+
* isComplete: z.boolean(),
|
|
36
|
+
* }),
|
|
37
|
+
* partitionKey: todo => key('USER', todo.userId),
|
|
38
|
+
* sortKey: todo => key('TODO', todo.todoId),
|
|
39
|
+
* });
|
|
40
|
+
*
|
|
41
|
+
* const projectedQueryCommand = new ProjectedQuery({
|
|
42
|
+
* key: { userId: 'user123' },
|
|
43
|
+
* projection: ['title', 'isComplete'],
|
|
44
|
+
* projectionSchema: z.object({
|
|
45
|
+
* title: z.string(),
|
|
46
|
+
* isComplete: z.boolean(),
|
|
47
|
+
* }),
|
|
48
|
+
* limit: 10,
|
|
49
|
+
* });
|
|
50
|
+
*
|
|
51
|
+
* const { items, count } = await todoEntity.send(projectedQueryCommand);
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
13
54
|
class ProjectedQuery {
|
|
14
55
|
constructor(config) {
|
|
15
56
|
_ProjectedQuery_config.set(this, void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projected-query.cjs","sources":["../../src/commands/projected-query.ts"],"sourcesContent":[null],"names":["__classPrivateFieldSet","AttributeExpressionMap","__classPrivateFieldGet","DocumentBuilderError","parseCondition","parseProjection","PROJECTED_QUERY_VALIDATION_CONCURRENCY","QueryCommand","paginateQuery","__asyncValues","__await"],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"projected-query.cjs","sources":["../../src/commands/projected-query.ts"],"sourcesContent":[null],"names":["__classPrivateFieldSet","AttributeExpressionMap","__classPrivateFieldGet","DocumentBuilderError","parseCondition","parseProjection","PROJECTED_QUERY_VALIDATION_CONCURRENCY","QueryCommand","paginateQuery","__asyncValues","__await"],"mappings":";;;;;;;;;;;;AAkDA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCG;MACU,cAAc,CAAA;AAOzB,IAAA,WAAA,CAAY,MAAqD,EAAA;QAFjE,sBAAA,CAAA,GAAA,CAAA,IAAA,EAAA,MAAA,CAAA;AAGE,QAAAA,gCAAA,CAAA,IAAI,EAAA,sBAAA,EAAW,MAAM,EAAA,GAAA,CAAA;IACvB;AAEO,IAAA,iBAAiB,CAAC,MAA4B,EAAA;;AACnD,QAAA,MAAM,sBAAsB,GAAG,IAAIC,8CAAsB,EAAE;;QAG3D,MAAM,OAAO,GAAG,MAAM,CAAC,sBAAsB,CAACC,gCAAA,CAAA,IAAI,EAAA,sBAAA,EAAA,GAAA,CAAQ,CAAC;AAC3D,QAAA,IAAI,YAAoB;AACxB,QAAA,IAAI,KAAK,IAAIA,gCAAA,CAAA,IAAI,EAAA,sBAAA,EAAA,GAAA,CAAQ,E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