dynamo-document-builder 0.6.0 → 0.7.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/README.md +367 -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 +43 -0
- package/dist/commands/batch-get.cjs.map +1 -1
- package/dist/commands/batch-get.d.ts +51 -3
- package/dist/commands/batch-get.mjs +44 -1
- 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 +44 -0
- package/dist/commands/batch-write.cjs.map +1 -1
- package/dist/commands/batch-write.d.ts +54 -4
- package/dist/commands/batch-write.mjs +45 -1
- 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.cjs +8 -0
- package/dist/commands/index.cjs.map +1 -1
- package/dist/commands/index.d.ts +160 -1
- package/dist/commands/index.mjs +4 -0
- package/dist/commands/index.mjs.map +1 -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 +35 -0
- package/dist/commands/query.cjs.map +1 -1
- package/dist/commands/query.d.ts +48 -3
- package/dist/commands/query.mjs +35 -0
- 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/table-batch-get.cjs +123 -0
- package/dist/commands/table-batch-get.cjs.map +1 -0
- package/dist/commands/table-batch-get.d.ts +86 -0
- package/dist/commands/table-batch-get.mjs +121 -0
- package/dist/commands/table-batch-get.mjs.map +1 -0
- package/dist/commands/table-batch-write.cjs +119 -0
- package/dist/commands/table-batch-write.cjs.map +1 -0
- package/dist/commands/table-batch-write.d.ts +79 -0
- package/dist/commands/table-batch-write.mjs +117 -0
- package/dist/commands/table-batch-write.mjs.map +1 -0
- package/dist/commands/table-transact-get.cjs +73 -0
- package/dist/commands/table-transact-get.cjs.map +1 -0
- package/dist/commands/table-transact-get.d.ts +60 -0
- package/dist/commands/table-transact-get.mjs +71 -0
- package/dist/commands/table-transact-get.mjs.map +1 -0
- package/dist/commands/table-transact-write.cjs +76 -0
- package/dist/commands/table-transact-write.cjs.map +1 -0
- package/dist/commands/table-transact-write.d.ts +51 -0
- package/dist/commands/table-transact-write.mjs +74 -0
- package/dist/commands/table-transact-write.mjs.map +1 -0
- package/dist/commands/transact-get.cjs +38 -0
- package/dist/commands/transact-get.cjs.map +1 -1
- package/dist/commands/transact-get.d.ts +49 -3
- package/dist/commands/transact-get.mjs +39 -1
- 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 +171 -0
- package/dist/core/entity.cjs.map +1 -1
- package/dist/core/entity.d.ts +99 -4
- package/dist/core/entity.mjs +171 -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 +30 -0
- package/dist/core/table.cjs.map +1 -1
- package/dist/core/table.d.ts +40 -1
- package/dist/core/table.mjs +31 -1
- 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 +10 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +11 -7
- package/dist/index.mjs +5 -1
- package/dist/index.mjs.map +1 -1
- 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,19 +1,64 @@
|
|
|
1
|
-
import { Condition } from '../conditions/
|
|
1
|
+
import { Condition } from '../conditions/index.js';
|
|
2
2
|
import { DynamoEntity } from '../core/entity.js';
|
|
3
|
-
import { EntitySchema, TransactWriteOperation } from '../core/
|
|
3
|
+
import { EntitySchema, TransactWriteOperation } from '../core/index.js';
|
|
4
4
|
import { ReturnValuesOnConditionCheckFailure, ItemCollectionMetrics } from '@aws-sdk/client-dynamodb';
|
|
5
5
|
import { UpdateConfig } from './update.js';
|
|
6
6
|
import { ZodObject } from 'zod/v4';
|
|
7
|
-
import { BaseResult, BaseCommand, WriteTransactable } from './
|
|
7
|
+
import { BaseResult, BaseCommand, WriteTransactable } from './index.js';
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Configuration for the ConditionalUpdate command.
|
|
11
|
+
*
|
|
12
|
+
* @template Schema - The Zod schema defining the structure of the entity.
|
|
13
|
+
*/
|
|
9
14
|
type ConditionalUpdateConfig<Schema extends ZodObject> = UpdateConfig<Schema> & {
|
|
10
15
|
condition: Condition;
|
|
11
16
|
returnValuesOnConditionCheckFailure?: ReturnValuesOnConditionCheckFailure;
|
|
12
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* Result of the ConditionalUpdate command.
|
|
20
|
+
*
|
|
21
|
+
* @template Schema - The Zod schema defining the structure of the entity.
|
|
22
|
+
*/
|
|
13
23
|
type ConditionalUpdateResult<Schema extends ZodObject> = BaseResult & {
|
|
14
24
|
updatedItem?: EntitySchema<Schema> | undefined;
|
|
15
25
|
itemCollectionMetrics?: ItemCollectionMetrics;
|
|
16
26
|
};
|
|
27
|
+
/**
|
|
28
|
+
* Command to modify existing item attributes with a condition expression.
|
|
29
|
+
*
|
|
30
|
+
* @template Schema - The Zod schema defining the structure of the entity.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```typescript
|
|
34
|
+
* import { DynamoTable, DynamoEntity, key, ConditionalUpdate, add } 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
|
+
* balance: z.number(),
|
|
46
|
+
* status: z.string(),
|
|
47
|
+
* }),
|
|
48
|
+
* partitionKey: user => key('USER', user.userId),
|
|
49
|
+
* sortKey: () => 'METADATA',
|
|
50
|
+
* });
|
|
51
|
+
*
|
|
52
|
+
* const conditionalUpdateCommand = new ConditionalUpdate({
|
|
53
|
+
* key: { userId: 'user123' },
|
|
54
|
+
* update: { balance: add(50) },
|
|
55
|
+
* condition: { status: 'active' },
|
|
56
|
+
* returnValues: 'ALL_NEW',
|
|
57
|
+
* });
|
|
58
|
+
*
|
|
59
|
+
* const { updatedItem } = await userEntity.send(conditionalUpdateCommand);
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
17
62
|
declare class ConditionalUpdate<Schema extends ZodObject> implements BaseCommand<ConditionalUpdateResult<Schema>, Schema>, WriteTransactable<Schema> {
|
|
18
63
|
#private;
|
|
19
64
|
constructor(config: ConditionalUpdateConfig<Schema>);
|
|
@@ -5,6 +5,41 @@ import { parseCondition } from '../conditions/condition-parser.mjs';
|
|
|
5
5
|
import { parseUpdate } from '../updates/update-parser.mjs';
|
|
6
6
|
|
|
7
7
|
var _ConditionalUpdate_config;
|
|
8
|
+
/**
|
|
9
|
+
* Command to modify existing item attributes with a condition expression.
|
|
10
|
+
*
|
|
11
|
+
* @template Schema - The Zod schema defining the structure of the entity.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* import { DynamoTable, DynamoEntity, key, ConditionalUpdate, add } from 'dynamo-document-builder';
|
|
16
|
+
*
|
|
17
|
+
* const table = new DynamoTable({
|
|
18
|
+
* tableName: 'ExampleTable',
|
|
19
|
+
* documentClient,
|
|
20
|
+
* });
|
|
21
|
+
*
|
|
22
|
+
* const userEntity = new DynamoEntity({
|
|
23
|
+
* table,
|
|
24
|
+
* schema: z.object({
|
|
25
|
+
* userId: z.string(),
|
|
26
|
+
* balance: z.number(),
|
|
27
|
+
* status: z.string(),
|
|
28
|
+
* }),
|
|
29
|
+
* partitionKey: user => key('USER', user.userId),
|
|
30
|
+
* sortKey: () => 'METADATA',
|
|
31
|
+
* });
|
|
32
|
+
*
|
|
33
|
+
* const conditionalUpdateCommand = new ConditionalUpdate({
|
|
34
|
+
* key: { userId: 'user123' },
|
|
35
|
+
* update: { balance: add(50) },
|
|
36
|
+
* condition: { status: 'active' },
|
|
37
|
+
* returnValues: 'ALL_NEW',
|
|
38
|
+
* });
|
|
39
|
+
*
|
|
40
|
+
* const { updatedItem } = await userEntity.send(conditionalUpdateCommand);
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
8
43
|
class ConditionalUpdate {
|
|
9
44
|
constructor(config) {
|
|
10
45
|
_ConditionalUpdate_config.set(this, void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conditional-update.mjs","sources":["../../src/commands/conditional-update.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"conditional-update.mjs","sources":["../../src/commands/conditional-update.ts"],"sourcesContent":[null],"names":[],"mappings":"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"}
|
package/dist/commands/delete.cjs
CHANGED
|
@@ -4,6 +4,38 @@ var tslib_es6 = require('../node_modules/tslib/tslib.es6.cjs');
|
|
|
4
4
|
var libDynamodb = require('@aws-sdk/lib-dynamodb');
|
|
5
5
|
|
|
6
6
|
var _Delete_config;
|
|
7
|
+
/**
|
|
8
|
+
* Command to remove an item 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, Delete } 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
|
+
* }),
|
|
27
|
+
* partitionKey: user => key('USER', user.userId),
|
|
28
|
+
* sortKey: () => 'METADATA',
|
|
29
|
+
* });
|
|
30
|
+
*
|
|
31
|
+
* const deleteCommand = new Delete({
|
|
32
|
+
* key: { userId: 'user123' },
|
|
33
|
+
* returnValues: 'ALL_OLD',
|
|
34
|
+
* });
|
|
35
|
+
*
|
|
36
|
+
* const { deletedItem } = await userEntity.send(deleteCommand);
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
7
39
|
class Delete {
|
|
8
40
|
constructor(config) {
|
|
9
41
|
_Delete_config.set(this, void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete.cjs","sources":["../../src/commands/delete.ts"],"sourcesContent":[null],"names":["__classPrivateFieldSet","DeleteCommand","__classPrivateFieldGet"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"delete.cjs","sources":["../../src/commands/delete.ts"],"sourcesContent":[null],"names":["__classPrivateFieldSet","DeleteCommand","__classPrivateFieldGet"],"mappings":";;;;;;AAgCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BG;MACU,MAAM,CAAA;AAKjB,IAAA,WAAA,CAAY,MAA4B,EAAA;QAFxC,cAAA,CAAA,GAAA,CAAA,IAAA,EAAA,MAAA,CAAA;AAGE,QAAAA,gCAAA,CAAA,IAAI,EAAA,cAAA,EAAW,MAAM,EAAA,GAAA,CAAA;IACvB;AAEa,IAAA,OAAO,CAAC,MAA4B,EAAA;;;AAC/C,YAAA,MAAM,SAAS,GAAG,IAAIC,yBAAa,CAAC;AAClC,gBAAA,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,SAAS;gBACjC,GAAG,EAAE,MAAM,CAAC,eAAe,CAACC,iCAAA,IAAI,EAAA,cAAA,EAAA,GAAA,CAAQ,CAAC,GAAG,CAAC;AAC7C,gBAAA,YAAY,EAAEA,gCAAA,CAAA,IAAI,EAAA,cAAA,EAAA,GAAA,CAAQ,CAAC,YAAY;AACvC,gBAAA,sBAAsB,EAAEA,gCAAA,CAAA,IAAI,EAAA,cAAA,EAAA,GAAA,CAAQ,CAAC,sBAAsB;AAC3D,gBAAA,2BAA2B,EAAEA,gCAAA,CAAA,IAAI,EAAA,cAAA,EAAA,GAAA,CAAQ,CAAC,2BAA2B;AACtE,aAAA,CAAC;AAEF,YAAA,MAAM,YAAY,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,EAAE;gBACrE,WAAW,EAAE,MAAAA,gCAAA,CAAA,IAAI,sBAAQ,CAAC,eAAe,0CAAE,MAAM;AACjD,gBAAA,cAAc,EAAEA,gCAAA,CAAA,IAAI,EAAA,cAAA,EAAA,GAAA,CAAQ,CAAC,SAAS;AACvC,aAAA,CAAC;AAEF,YAAA,IAAI,WAAsD;AAC1D,YAAA,IAAI,YAAY,CAAC,UAAU,EAAE;AAC3B,gBAAA,IAAIA,iCAAA,IAAI,EAAA,cAAA,EAAA,GAAA,CAAQ,CAAC,cAAc,EAAE;AAC/B,oBAAA,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,CAACA,iCAAA,IAAI,EAAA,cAAA,EAAA,GAAA,CAAQ,CAAC,GAAG,CAAC;AAC9C,iBAAA;aACF;QACH,CAAC,CAAA;AAAA,IAAA;AACF;;;;;"}
|
|
@@ -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":";;;;AAgCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BG;MACU,MAAM,CAAA;AAKjB,IAAA,WAAA,CAAY,MAA4B,EAAA;QAFxC,cAAA,CAAA,GAAA,CAAA,IAAA,EAAA,MAAA,CAAA;AAGE,QAAA,sBAAA,CAAA,IAAI,EAAA,cAAA,EAAW,MAAM,EAAA,GAAA,CAAA;IACvB;AAEa,IAAA,OAAO,CAAC,MAA4B,EAAA;;;AAC/C,YAAA,MAAM,SAAS,GAAG,IAAI,aAAa,CAAC;AAClC,gBAAA,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,SAAS;gBACjC,GAAG,EAAE,MAAM,CAAC,eAAe,CAAC,uBAAA,IAAI,EAAA,cAAA,EAAA,GAAA,CAAQ,CAAC,GAAG,CAAC;AAC7C,gBAAA,YAAY,EAAE,sBAAA,CAAA,IAAI,EAAA,cAAA,EAAA,GAAA,CAAQ,CAAC,YAAY;AACvC,gBAAA,sBAAsB,EAAE,sBAAA,CAAA,IAAI,EAAA,cAAA,EAAA,GAAA,CAAQ,CAAC,sBAAsB;AAC3D,gBAAA,2BAA2B,EAAE,sBAAA,CAAA,IAAI,EAAA,cAAA,EAAA,GAAA,CAAQ,CAAC,2BAA2B;AACtE,aAAA,CAAC;AAEF,YAAA,MAAM,YAAY,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,EAAE;gBACrE,WAAW,EAAE,MAAA,sBAAA,CAAA,IAAI,sBAAQ,CAAC,eAAe,0CAAE,MAAM;AACjD,gBAAA,cAAc,EAAE,sBAAA,CAAA,IAAI,EAAA,cAAA,EAAA,GAAA,CAAQ,CAAC,SAAS;AACvC,aAAA,CAAC;AAEF,YAAA,IAAI,WAAsD;AAC1D,YAAA,IAAI,YAAY,CAAC,UAAU,EAAE;AAC3B,gBAAA,IAAI,uBAAA,IAAI,EAAA,cAAA,EAAA,GAAA,CAAQ,CAAC,cAAc,EAAE;AAC/B,oBAAA,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],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"get.mjs","sources":["../../src/commands/get.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAyBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCG;MACU,GAAG,CAAA;AAGd,IAAA,WAAA,CAAY,MAAyB,EAAA;QAFrC,WAAA,CAAA,GAAA,CAAA,IAAA,EAAA,MAAA,CAAA;AAGE,QAAA,sBAAA,CAAA,IAAI,EAAA,WAAA,EAAW,MAAM,EAAA,GAAA,CAAA;IACvB;AAEa,IAAA,OAAO,CAAC,MAA4B,EAAA;;;AAC/C,YAAA,MAAM,OAAO,GAAG,IAAI,UAAU,CAAC;AAC7B,gBAAA,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,SAAS;gBACjC,GAAG,EAAE,MAAM,CAAC,eAAe,CAAC,uBAAA,IAAI,EAAA,WAAA,EAAA,GAAA,CAAQ,CAAC,GAAG,CAAC;gBAC7C,cAAc,EAAE,MAAA,sBAAA,CAAA,IAAI,mBAAQ,CAAC,UAAU,mCAAI,KAAK;AAChD,gBAAA,sBAAsB,EAAE,sBAAA,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,MAAA,sBAAA,CAAA,IAAI,mBAAQ,CAAC,eAAe,0CAAE,MAAM;AACjD,gBAAA,cAAc,EAAE,sBAAA,CAAA,IAAI,EAAA,WAAA,EAAA,GAAA,CAAQ,CAAC,SAAS;AACvC,aAAA,CAAC;AAEF,YAAA,IAAI,SAAS,CAAC,IAAI,EAAE;AAClB,gBAAA,MAAM,IAAI,GAAG,sBAAA,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/index.cjs
CHANGED
|
@@ -17,6 +17,10 @@ var commands_conditionalUpdate = require('./conditional-update.cjs');
|
|
|
17
17
|
var commands_conditionalDelete = require('./conditional-delete.cjs');
|
|
18
18
|
var commands_batchWrite = require('./batch-write.cjs');
|
|
19
19
|
var commands_transactWrite = require('./transact-write.cjs');
|
|
20
|
+
var commands_tableTransactWrite = require('./table-transact-write.cjs');
|
|
21
|
+
var commands_tableBatchWrite = require('./table-batch-write.cjs');
|
|
22
|
+
var commands_tableTransactGet = require('./table-transact-get.cjs');
|
|
23
|
+
var commands_tableBatchGet = require('./table-batch-get.cjs');
|
|
20
24
|
var commands_conditionCheck = require('./condition-check.cjs');
|
|
21
25
|
|
|
22
26
|
|
|
@@ -38,5 +42,9 @@ exports.ConditionalUpdate = commands_conditionalUpdate.ConditionalUpdate;
|
|
|
38
42
|
exports.ConditionalDelete = commands_conditionalDelete.ConditionalDelete;
|
|
39
43
|
exports.BatchWrite = commands_batchWrite.BatchWrite;
|
|
40
44
|
exports.TransactWrite = commands_transactWrite.TransactWrite;
|
|
45
|
+
exports.TableTransactWrite = commands_tableTransactWrite.TableTransactWrite;
|
|
46
|
+
exports.TableBatchWrite = commands_tableBatchWrite.TableBatchWrite;
|
|
47
|
+
exports.TableTransactGet = commands_tableTransactGet.TableTransactGet;
|
|
48
|
+
exports.TableBatchGet = commands_tableBatchGet.TableBatchGet;
|
|
41
49
|
exports.ConditionCheck = commands_conditionCheck.ConditionCheck;
|
|
42
50
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/commands/index.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import { TransactWriteOperation, EntitySchema } from '../core/index.js';
|
|
2
|
+
import { DynamoEntity } from '../core/entity.js';
|
|
3
|
+
import { DynamoTable } from '../core/table.js';
|
|
4
|
+
import { DynamoKey } from '../core/key.js';
|
|
5
|
+
import { ReturnConsumedCapacity, ConsumedCapacity } from '@aws-sdk/client-dynamodb';
|
|
6
|
+
import { ResponseMetadata } from '@aws-sdk/types';
|
|
7
|
+
import { ZodObject } from 'zod/v4';
|
|
2
8
|
export { Get, GetConfig, GetResult } from './get.js';
|
|
3
9
|
export { Query, QueryConfig, QueryResult } from './query.js';
|
|
4
10
|
export { Scan, ScanConfig, ScanResult } from './scan.js';
|
|
@@ -16,4 +22,157 @@ export { ConditionalUpdate, ConditionalUpdateConfig, ConditionalUpdateResult } f
|
|
|
16
22
|
export { ConditionalDelete, ConditionalDeleteConfig, ConditionalDeleteResult } from './conditional-delete.js';
|
|
17
23
|
export { BatchWrite, BatchWriteConfig, BatchWriteResult } from './batch-write.js';
|
|
18
24
|
export { TransactWrite, TransactWriteConfig, TransactWriteResult } from './transact-write.js';
|
|
25
|
+
export { TableTransactWrite, TableTransactWriteConfig, TableTransactWriteResult } from './table-transact-write.js';
|
|
26
|
+
export { TableBatchWrite, TableBatchWriteConfig, TableBatchWriteResult } from './table-batch-write.js';
|
|
27
|
+
export { TableTransactGet, TableTransactGetConfig, TableTransactGetResult } from './table-transact-get.js';
|
|
28
|
+
export { TableBatchGet, TableBatchGetConfig, TableBatchGetResult } from './table-batch-get.js';
|
|
19
29
|
export { ConditionCheck, ConditionCheckConfig } from './condition-check.js';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Interface for commands that can be prepared for use in a table-level batch write.
|
|
33
|
+
*
|
|
34
|
+
* @template Schema The Zod schema type associated with the DynamoEntity.
|
|
35
|
+
*/
|
|
36
|
+
type BatchWritePreparable<Schema extends ZodObject> = {
|
|
37
|
+
readonly items?: Array<EntitySchema<Schema>>;
|
|
38
|
+
readonly deletes?: Array<Partial<EntitySchema<Schema>>>;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Interface for commands that can be prepared for use in a table-level batch get.
|
|
42
|
+
*
|
|
43
|
+
* @template Schema The Zod schema type associated with the DynamoEntity.
|
|
44
|
+
*/
|
|
45
|
+
type BatchGetPreparable<Schema extends ZodObject> = {
|
|
46
|
+
readonly keys: Array<Partial<EntitySchema<Schema>>>;
|
|
47
|
+
readonly consistent?: boolean;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Interface-like type for command classes to extend from that defines the execute method.
|
|
51
|
+
*
|
|
52
|
+
* This is what enables the command-based pattern for DynamoDB operations that makes tree-shaking possible.
|
|
53
|
+
*
|
|
54
|
+
* @template Output The output type of the command's execute method.
|
|
55
|
+
* @template Schema The Zod schema type associated with the DynamoEntity.
|
|
56
|
+
*/
|
|
57
|
+
type BaseCommand<Output, Schema extends ZodObject> = {
|
|
58
|
+
execute(entity: DynamoEntity<Schema>): Promise<Output>;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Interface-like type for paginatable command classes to extend from that defines the executePaginated method.
|
|
62
|
+
*
|
|
63
|
+
* Commands should only implement this interface if they support pagination.
|
|
64
|
+
*
|
|
65
|
+
* @template Output The output type of the command's executePaginated method.
|
|
66
|
+
* @template Schema The Zod schema type associated with the DynamoEntity.
|
|
67
|
+
*/
|
|
68
|
+
type BasePaginatable<Output, Schema extends ZodObject> = {
|
|
69
|
+
executePaginated(entity: DynamoEntity<Schema>): AsyncGenerator<Output, void, unknown>;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Interface-like type for get commands that can be included in a table-level get transaction.
|
|
73
|
+
*
|
|
74
|
+
* @template Schema The Zod schema type associated with the DynamoEntity.
|
|
75
|
+
*/
|
|
76
|
+
type GetTransactable<Schema extends ZodObject> = {
|
|
77
|
+
readonly keys: Array<Partial<EntitySchema<Schema>>>;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Interface-like type for write commands that can be included in a write transaction.
|
|
81
|
+
*
|
|
82
|
+
* @template Schema The Zod schema type associated with the DynamoEntity.
|
|
83
|
+
*/
|
|
84
|
+
type WriteTransactable<Schema extends ZodObject> = {
|
|
85
|
+
prepareWriteTransaction(entity: DynamoEntity<Schema>): Promise<TransactWriteOperation>;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Interface-like type for table-level commands that execute directly against a DynamoTable.
|
|
89
|
+
*
|
|
90
|
+
* @template Output The output type of the command's execute method.
|
|
91
|
+
*/
|
|
92
|
+
type TableCommand<Output> = {
|
|
93
|
+
execute(table: DynamoTable): Promise<Output>;
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Represents a set of write operations bound to a specific entity, ready to be included
|
|
97
|
+
* in a table-level TransactWrite command.
|
|
98
|
+
*
|
|
99
|
+
* @template Schema The Zod schema type associated with the DynamoEntity.
|
|
100
|
+
*/
|
|
101
|
+
type PreparedWriteTransaction<Schema extends ZodObject> = {
|
|
102
|
+
entity: DynamoEntity<Schema>;
|
|
103
|
+
writes: WriteTransactable<Schema>[];
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Represents a TransactGet command bound to a specific entity, ready to be included
|
|
107
|
+
* in a table-level TransactGet command.
|
|
108
|
+
*
|
|
109
|
+
* @template Schema The Zod schema type associated with the DynamoEntity.
|
|
110
|
+
*/
|
|
111
|
+
type PreparedGetTransaction<Schema extends ZodObject> = {
|
|
112
|
+
entity: DynamoEntity<Schema>;
|
|
113
|
+
keys: Array<{
|
|
114
|
+
TableName: string;
|
|
115
|
+
Key: DynamoKey;
|
|
116
|
+
}>;
|
|
117
|
+
parseResults(items: unknown[], skipValidation: boolean): Promise<Array<EntitySchema<Schema> | undefined>>;
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* Represents a BatchWrite command bound to a specific entity, ready to be included
|
|
121
|
+
* in a table-level TableBatchWrite command.
|
|
122
|
+
*
|
|
123
|
+
* @template Schema The Zod schema type associated with the DynamoEntity.
|
|
124
|
+
*/
|
|
125
|
+
type PreparedBatchWrite<Schema extends ZodObject> = {
|
|
126
|
+
entity: DynamoEntity<Schema>;
|
|
127
|
+
buildRequests(skipValidation: boolean, abortSignal?: AbortSignal): Promise<Array<{
|
|
128
|
+
PutRequest: {
|
|
129
|
+
Item: Record<string, unknown>;
|
|
130
|
+
};
|
|
131
|
+
} | {
|
|
132
|
+
DeleteRequest: {
|
|
133
|
+
Key: DynamoKey;
|
|
134
|
+
};
|
|
135
|
+
}>>;
|
|
136
|
+
matchUnprocessedPut(item: Record<string, unknown>): EntitySchema<Schema> | undefined;
|
|
137
|
+
matchUnprocessedDelete(key: DynamoKey): Partial<EntitySchema<Schema>> | undefined;
|
|
138
|
+
};
|
|
139
|
+
/**
|
|
140
|
+
* Represents a BatchGet command bound to a specific entity, ready to be included
|
|
141
|
+
* in a table-level TableBatchGet command.
|
|
142
|
+
*
|
|
143
|
+
* @template Schema The Zod schema type associated with the DynamoEntity.
|
|
144
|
+
*/
|
|
145
|
+
type PreparedBatchGet<Schema extends ZodObject> = {
|
|
146
|
+
entity: DynamoEntity<Schema>;
|
|
147
|
+
keys: Array<DynamoKey>;
|
|
148
|
+
consistent: boolean;
|
|
149
|
+
matchItem(item: Record<string, unknown>): boolean;
|
|
150
|
+
parseResults(items: unknown[], skipValidation: boolean): Promise<Array<EntitySchema<Schema>>>;
|
|
151
|
+
matchUnprocessedKey(key: DynamoKey): Partial<EntitySchema<Schema>> | undefined;
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* Base configuration options for DynamoDB commands.
|
|
155
|
+
*
|
|
156
|
+
* @property skipValidation - If true, skips schema validation of the returned item(s).
|
|
157
|
+
* @property returnConsumedCapacity - Specifies the level of detail about provisioned throughput consumption that is returned in the response.
|
|
158
|
+
* @property abortController - An AbortController to allow cancellation of the operation.
|
|
159
|
+
* @property timeoutMs - The maximum time in milliseconds to wait for the operation to complete.
|
|
160
|
+
*/
|
|
161
|
+
type BaseConfig = {
|
|
162
|
+
skipValidation?: boolean;
|
|
163
|
+
returnConsumedCapacity?: ReturnConsumedCapacity;
|
|
164
|
+
abortController?: AbortController;
|
|
165
|
+
timeoutMs?: number;
|
|
166
|
+
};
|
|
167
|
+
/**
|
|
168
|
+
* Base result type for DynamoDB commands.
|
|
169
|
+
*
|
|
170
|
+
* @property responseMetadata - Metadata about the response from DynamoDB.
|
|
171
|
+
* @property consumedCapacity - Information about the capacity units consumed by the operation.
|
|
172
|
+
*/
|
|
173
|
+
type BaseResult = {
|
|
174
|
+
responseMetadata?: ResponseMetadata;
|
|
175
|
+
consumedCapacity?: ConsumedCapacity | undefined;
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
export type { BaseCommand, BaseConfig, BasePaginatable, BaseResult, BatchGetPreparable, BatchWritePreparable, GetTransactable, PreparedBatchGet, PreparedBatchWrite, PreparedGetTransaction, PreparedWriteTransaction, TableCommand, WriteTransactable };
|
package/dist/commands/index.mjs
CHANGED
|
@@ -15,5 +15,9 @@ export { ConditionalUpdate } from './conditional-update.mjs';
|
|
|
15
15
|
export { ConditionalDelete } from './conditional-delete.mjs';
|
|
16
16
|
export { BatchWrite } from './batch-write.mjs';
|
|
17
17
|
export { TransactWrite } from './transact-write.mjs';
|
|
18
|
+
export { TableTransactWrite } from './table-transact-write.mjs';
|
|
19
|
+
export { TableBatchWrite } from './table-batch-write.mjs';
|
|
20
|
+
export { TableTransactGet } from './table-transact-get.mjs';
|
|
21
|
+
export { TableBatchGet } from './table-batch-get.mjs';
|
|
18
22
|
export { ConditionCheck } from './condition-check.mjs';
|
|
19
23
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;"}
|