dynamo-document-builder 0.2.0 → 0.3.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/dist/attributes/attribute-map.d.ts +11 -7
- package/dist/attributes/index.d.ts +1 -1
- package/dist/commands/base-command.d.ts +13 -10
- package/dist/commands/batch-get.d.ts +11 -7
- package/dist/commands/batch-write.d.ts +17 -11
- package/dist/commands/condition-check.d.ts +12 -8
- package/dist/commands/conditional-delete.d.ts +14 -10
- package/dist/commands/conditional-put.d.ts +17 -11
- package/dist/commands/conditional-update.d.ts +14 -10
- package/dist/commands/delete.d.ts +12 -8
- package/dist/commands/get.d.ts +11 -7
- package/dist/commands/index.d.ts +18 -18
- package/dist/commands/projected-get.d.ts +13 -9
- package/dist/commands/projected-query.d.ts +14 -10
- package/dist/commands/projected-scan.d.ts +14 -10
- package/dist/commands/put.d.ts +15 -9
- package/dist/commands/query.d.ts +14 -10
- package/dist/commands/scan.d.ts +14 -10
- package/dist/commands/transact-get.d.ts +11 -7
- package/dist/commands/transact-write.d.ts +12 -8
- package/dist/commands/update.d.ts +13 -9
- package/dist/conditions/and.d.ts +5 -2
- package/dist/conditions/begins-with.d.ts +5 -2
- package/dist/conditions/between.d.ts +5 -2
- package/dist/conditions/condition-parser.d.ts +8 -4
- package/dist/conditions/condition-symbols.d.ts +13 -11
- package/dist/conditions/condition-types.d.ts +34 -31
- package/dist/conditions/contains.d.ts +6 -3
- package/dist/conditions/equals.d.ts +5 -2
- package/dist/conditions/exists.d.ts +5 -2
- package/dist/conditions/greater-than-or-equal.d.ts +5 -2
- package/dist/conditions/greater-than.d.ts +5 -2
- package/dist/conditions/index.d.ts +19 -19
- package/dist/conditions/is-in.d.ts +5 -2
- package/dist/conditions/less-than-or-equal.d.ts +5 -2
- package/dist/conditions/less-than.d.ts +5 -2
- package/dist/conditions/not-equals.d.ts +5 -2
- package/dist/conditions/not-exists.d.ts +5 -2
- package/dist/conditions/not.d.ts +5 -2
- package/dist/conditions/or.d.ts +5 -2
- package/dist/conditions/size.d.ts +5 -2
- package/dist/conditions/type-is.d.ts +5 -2
- package/dist/core/core-types.d.ts +17 -14
- package/dist/core/entity.d.ts +12 -8
- package/dist/core/index.d.ts +4 -4
- package/dist/core/key.d.ts +11 -7
- package/dist/core/table.d.ts +8 -4
- package/dist/errors.d.ts +3 -1
- package/dist/index.d.ts +55 -7
- package/dist/internal-constants.d.ts +10 -8
- package/dist/projections/index.d.ts +2 -2
- package/dist/projections/projection-parser.d.ts +8 -4
- package/dist/projections/projection-types.d.ts +3 -1
- package/dist/updates/add-to-set.d.ts +6 -3
- package/dist/updates/add.d.ts +5 -2
- package/dist/updates/append.d.ts +6 -3
- package/dist/updates/index.d.ts +10 -10
- package/dist/updates/prepend.d.ts +6 -3
- package/dist/updates/ref.d.ts +6 -3
- package/dist/updates/remove-from-set.d.ts +6 -3
- package/dist/updates/remove.d.ts +5 -2
- package/dist/updates/subtract.d.ts +5 -2
- package/dist/updates/update-parser.d.ts +8 -4
- package/dist/updates/update-symbols.d.ts +12 -10
- package/dist/updates/update-types.d.ts +16 -13
- package/package.json +1 -1
package/dist/core/key.d.ts
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { IndexName } from './core-types.js';
|
|
2
|
+
|
|
3
|
+
type DynamoKeyableValue = string | number | Buffer;
|
|
4
|
+
type DynamoKeyBuilder<Item> = (item: Item) => DynamoKeyableValue;
|
|
5
|
+
type GlobalSecondaryIndexKeyBuilders<Item> = Record<IndexName, {
|
|
5
6
|
partitionKey: DynamoKeyBuilder<Item>;
|
|
6
7
|
sortKey?: DynamoKeyBuilder<Item>;
|
|
7
8
|
}>;
|
|
8
|
-
|
|
9
|
+
type LocalSecondaryIndexKeyBuilders<Item> = Record<IndexName, {
|
|
9
10
|
sortKey: DynamoKeyBuilder<Item>;
|
|
10
11
|
}>;
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
type DynamoKey = Record<string, DynamoKeyableValue>;
|
|
13
|
+
declare function key(...parts: DynamoKeyableValue[]): string;
|
|
14
|
+
|
|
15
|
+
export { key };
|
|
16
|
+
export type { DynamoKey, DynamoKeyBuilder, DynamoKeyableValue, GlobalSecondaryIndexKeyBuilders, LocalSecondaryIndexKeyBuilders };
|
package/dist/core/table.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { DynamoDBDocumentClient } from '@aws-sdk/lib-dynamodb';
|
|
2
|
+
import { NamedGlobalSecondaryIndexKeyNames, NamedLocalSecondaryIndexKeyNames } from './core-types.js';
|
|
3
|
+
|
|
4
|
+
type DynamoTableConfig = {
|
|
4
5
|
tableName: string;
|
|
5
6
|
documentClient: DynamoDBDocumentClient;
|
|
6
7
|
keyNames?: {
|
|
@@ -10,7 +11,7 @@ export type DynamoTableConfig = {
|
|
|
10
11
|
localSecondaryIndexes?: NamedLocalSecondaryIndexKeyNames;
|
|
11
12
|
};
|
|
12
13
|
};
|
|
13
|
-
|
|
14
|
+
declare class DynamoTable {
|
|
14
15
|
#private;
|
|
15
16
|
constructor(config: DynamoTableConfig);
|
|
16
17
|
get tableName(): string;
|
|
@@ -20,3 +21,6 @@ export declare class DynamoTable {
|
|
|
20
21
|
get globalSecondaryIndexKeyNames(): NamedGlobalSecondaryIndexKeyNames;
|
|
21
22
|
get localSecondaryIndexKeyNames(): NamedLocalSecondaryIndexKeyNames;
|
|
22
23
|
}
|
|
24
|
+
|
|
25
|
+
export { DynamoTable };
|
|
26
|
+
export type { DynamoTableConfig };
|
package/dist/errors.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,55 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
1
|
+
export { AttributeExpressionMap, AttributeNamePlaceholder, AttributeNames, AttributeValuePlaceholder, AttributeValues, DynamoAttributeExpression } from './attributes/attribute-map.js';
|
|
2
|
+
export { BaseCommand, BaseConfig, BasePaginatable, BaseResult, WriteTransactable } from './commands/base-command.js';
|
|
3
|
+
export { Get, GetConfig, GetResult } from './commands/get.js';
|
|
4
|
+
export { Query, QueryConfig, QueryResult } from './commands/query.js';
|
|
5
|
+
export { Scan, ScanConfig, ScanResult } from './commands/scan.js';
|
|
6
|
+
export { ProjectedGet, ProjectedGetConfig, ProjectedGetResult } from './commands/projected-get.js';
|
|
7
|
+
export { ProjectedQuery, ProjectedQueryConfig, ProjectedQueryResult } from './commands/projected-query.js';
|
|
8
|
+
export { ProjectedScan, ProjectedScanConfig, ProjectedScanResult } from './commands/projected-scan.js';
|
|
9
|
+
export { BatchGet, BatchGetConfig, BatchGetResult } from './commands/batch-get.js';
|
|
10
|
+
export { TransactGet, TransactGetConfig, TransactGetResult } from './commands/transact-get.js';
|
|
11
|
+
export { Put, PutConfig, PutResult } from './commands/put.js';
|
|
12
|
+
export { Update, UpdateConfig, UpdateResult } from './commands/update.js';
|
|
13
|
+
export { Delete, DeleteConfig, DeleteResult } from './commands/delete.js';
|
|
14
|
+
export { ConditionalPut, ConditionalPutConfig, ConditionalPutResult } from './commands/conditional-put.js';
|
|
15
|
+
export { ConditionalUpdate, ConditionalUpdateConfig, ConditionalUpdateResult } from './commands/conditional-update.js';
|
|
16
|
+
export { ConditionalDelete, ConditionalDeleteConfig, ConditionalDeleteResult } from './commands/conditional-delete.js';
|
|
17
|
+
export { BatchWrite, BatchWriteConfig, BatchWriteResult } from './commands/batch-write.js';
|
|
18
|
+
export { TransactWrite, TransactWriteConfig, TransactWriteResult } from './commands/transact-write.js';
|
|
19
|
+
export { ConditionCheck, ConditionCheckConfig } from './commands/condition-check.js';
|
|
20
|
+
export { and } from './conditions/and.js';
|
|
21
|
+
export { beginsWith } from './conditions/begins-with.js';
|
|
22
|
+
export { between } from './conditions/between.js';
|
|
23
|
+
export { ConditionParserResult, parseCondition } from './conditions/condition-parser.js';
|
|
24
|
+
export { BeginsWithExpression, BeginsWithExpressionTemplate, BetweenExpression, BetweenExpressionTemplate, BooleanExpression, ComparisonExpression, ComparisonExpressionTemplate, ComparisonOperator, Condition, ConditionExpression, ConditionExpressionTemplate, ConditionTemplate, ContainsExpression, ContainsExpressionTemplate, DynamoAttributeType, ExistsExpression, ExistsExpressionTemplate, FunctionExpression, InExpression, InExpressionTemplate, LogicalExpression, LogicalOperator, NotExpression, Operand, SizeExpression, TemplateExpression, TypeCheckExpression, TypeCheckExpressionTemplate, ValueExpression } from './conditions/condition-types.js';
|
|
25
|
+
export { contains } from './conditions/contains.js';
|
|
26
|
+
export { equals } from './conditions/equals.js';
|
|
27
|
+
export { exists } from './conditions/exists.js';
|
|
28
|
+
export { greaterThan } from './conditions/greater-than.js';
|
|
29
|
+
export { greaterThanOrEqual } from './conditions/greater-than-or-equal.js';
|
|
30
|
+
export { isIn } from './conditions/is-in.js';
|
|
31
|
+
export { lessThan } from './conditions/less-than.js';
|
|
32
|
+
export { lessThanOrEqual } from './conditions/less-than-or-equal.js';
|
|
33
|
+
export { not } from './conditions/not.js';
|
|
34
|
+
export { notEquals } from './conditions/not-equals.js';
|
|
35
|
+
export { notExists } from './conditions/not-exists.js';
|
|
36
|
+
export { or } from './conditions/or.js';
|
|
37
|
+
export { size } from './conditions/size.js';
|
|
38
|
+
export { typeIs } from './conditions/type-is.js';
|
|
39
|
+
export { EncodedEntity, EncodedEntitySchema, Entity, EntitySchema, GlobalSecondaryIndexKeyName, IndexName, LocalSecondaryIndexKeyName, NamedGlobalSecondaryIndexKeyNames, NamedLocalSecondaryIndexKeyNames, TransactWriteOperation } from './core/core-types.js';
|
|
40
|
+
export { DynamoEntity, DynamoEntityConfig, EntityKeyInput } from './core/entity.js';
|
|
41
|
+
export { DynamoKey, DynamoKeyBuilder, DynamoKeyableValue, GlobalSecondaryIndexKeyBuilders, LocalSecondaryIndexKeyBuilders, key } from './core/key.js';
|
|
42
|
+
export { DynamoTable, DynamoTableConfig } from './core/table.js';
|
|
43
|
+
export { DocumentBuilderError } from './errors.js';
|
|
44
|
+
export { Projection } from './projections/projection-types.js';
|
|
45
|
+
export { ProjectionResult, parseProjection } from './projections/projection-parser.js';
|
|
46
|
+
export { UpdateParserResult, parseUpdate } from './updates/update-parser.js';
|
|
47
|
+
export { AddExpression, AddToSetExpression, AppendExpression, DeleteExpression, PrependExpression, RemoveExpression, SubtractExpression, UpdateExpression, UpdateType, UpdateValues, ValueReference } from './updates/update-types.js';
|
|
48
|
+
export { ref } from './updates/ref.js';
|
|
49
|
+
export { remove } from './updates/remove.js';
|
|
50
|
+
export { add } from './updates/add.js';
|
|
51
|
+
export { subtract } from './updates/subtract.js';
|
|
52
|
+
export { append } from './updates/append.js';
|
|
53
|
+
export { prepend } from './updates/prepend.js';
|
|
54
|
+
export { addToSet } from './updates/add-to-set.js';
|
|
55
|
+
export { removeFromSet } from './updates/remove-from-set.js';
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
declare const QUERY_VALIDATION_CONCURRENCY = 64;
|
|
2
|
+
declare const PROJECTED_QUERY_VALIDATION_CONCURRENCY = 64;
|
|
3
|
+
declare const SCAN_VALIDATION_CONCURRENCY = 64;
|
|
4
|
+
declare const PROJECTED_SCAN_VALIDATION_CONCURRENCY = 64;
|
|
5
|
+
declare const BATCH_GET_VALIDATION_CONCURRENCY = 64;
|
|
6
|
+
declare const BATCH_WRITE_VALIDATION_CONCURRENCY = 64;
|
|
7
|
+
declare const TRANSACTION_WRITE_VALIDATION_CONCURRENCY = 64;
|
|
8
|
+
declare const TRANSACTION_GET_VALIDATION_CONCURRENCY = 64;
|
|
9
|
+
|
|
10
|
+
export { BATCH_GET_VALIDATION_CONCURRENCY, BATCH_WRITE_VALIDATION_CONCURRENCY, PROJECTED_QUERY_VALIDATION_CONCURRENCY, PROJECTED_SCAN_VALIDATION_CONCURRENCY, QUERY_VALIDATION_CONCURRENCY, SCAN_VALIDATION_CONCURRENCY, TRANSACTION_GET_VALIDATION_CONCURRENCY, TRANSACTION_WRITE_VALIDATION_CONCURRENCY };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export { Projection } from './projection-types.js';
|
|
2
|
+
export { ProjectionResult, parseProjection } from './projection-parser.js';
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import { AttributeExpressionMap } from '
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { AttributeExpressionMap } from '../attributes/attribute-map.js';
|
|
2
|
+
import { Projection } from './projection-types.js';
|
|
3
|
+
|
|
4
|
+
type ProjectionResult = {
|
|
4
5
|
projectionExpression: string;
|
|
5
6
|
attributeExpressionMap: AttributeExpressionMap;
|
|
6
7
|
};
|
|
7
|
-
|
|
8
|
+
declare function parseProjection(projection: Projection, attributeExpressionMap?: AttributeExpressionMap): ProjectionResult;
|
|
9
|
+
|
|
10
|
+
export { parseProjection };
|
|
11
|
+
export type { ProjectionResult };
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { NativeAttributeValue } from '@aws-sdk/lib-dynamodb';
|
|
2
|
+
import { ValueReference, AddToSetExpression } from './update-types.js';
|
|
3
|
+
|
|
4
|
+
declare function addToSet(values: NativeAttributeValue[] | ValueReference): AddToSetExpression;
|
|
5
|
+
|
|
6
|
+
export { addToSet };
|
package/dist/updates/add.d.ts
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { ValueReference, AddExpression } from './update-types.js';
|
|
2
|
+
|
|
3
|
+
declare function add(value: number | ValueReference<number>): AddExpression;
|
|
4
|
+
|
|
5
|
+
export { add };
|
package/dist/updates/append.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { NativeAttributeValue } from '@aws-sdk/lib-dynamodb';
|
|
2
|
+
import { ValueReference, AppendExpression } from './update-types.js';
|
|
3
|
+
|
|
4
|
+
declare function append(values: NativeAttributeValue[] | ValueReference): AppendExpression;
|
|
5
|
+
|
|
6
|
+
export { append };
|
package/dist/updates/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
1
|
+
export { UpdateParserResult, parseUpdate } from './update-parser.js';
|
|
2
|
+
export { AddExpression, AddToSetExpression, AppendExpression, DeleteExpression, PrependExpression, RemoveExpression, SubtractExpression, UpdateExpression, UpdateType, UpdateValues, ValueReference } from './update-types.js';
|
|
3
|
+
export { ref } from './ref.js';
|
|
4
|
+
export { remove } from './remove.js';
|
|
5
|
+
export { add } from './add.js';
|
|
6
|
+
export { subtract } from './subtract.js';
|
|
7
|
+
export { append } from './append.js';
|
|
8
|
+
export { prepend } from './prepend.js';
|
|
9
|
+
export { addToSet } from './add-to-set.js';
|
|
10
|
+
export { removeFromSet } from './remove-from-set.js';
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { NativeAttributeValue } from '@aws-sdk/lib-dynamodb';
|
|
2
|
+
import { ValueReference, PrependExpression } from './update-types.js';
|
|
3
|
+
|
|
4
|
+
declare function prepend(values: NativeAttributeValue[] | ValueReference): PrependExpression;
|
|
5
|
+
|
|
6
|
+
export { prepend };
|
package/dist/updates/ref.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { ValueReference } from './update-types.js';
|
|
2
|
+
import { NativeAttributeValue } from '@aws-sdk/lib-dynamodb';
|
|
3
|
+
|
|
4
|
+
declare function ref(attributePath: string, defaultTo?: NativeAttributeValue): ValueReference;
|
|
5
|
+
|
|
6
|
+
export { ref };
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { NativeAttributeValue } from '@aws-sdk/lib-dynamodb';
|
|
2
|
+
import { ValueReference, DeleteExpression } from './update-types.js';
|
|
3
|
+
|
|
4
|
+
declare function removeFromSet(values: NativeAttributeValue[] | ValueReference): DeleteExpression;
|
|
5
|
+
|
|
6
|
+
export { removeFromSet };
|
package/dist/updates/remove.d.ts
CHANGED
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { ValueReference, SubtractExpression } from './update-types.js';
|
|
2
|
+
|
|
3
|
+
declare function subtract(value: number | ValueReference<number>): SubtractExpression;
|
|
4
|
+
|
|
5
|
+
export { subtract };
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import { AttributeExpressionMap } from '
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import { AttributeExpressionMap } from '../attributes/attribute-map.js';
|
|
2
|
+
import { UpdateValues } from './update-types.js';
|
|
3
|
+
|
|
4
|
+
type UpdateParserResult = {
|
|
4
5
|
updateExpression: string;
|
|
5
6
|
attributeExpressionMap: AttributeExpressionMap;
|
|
6
7
|
};
|
|
7
|
-
|
|
8
|
+
declare function parseUpdate(update: UpdateValues, attributeExpressionMap?: AttributeExpressionMap): UpdateParserResult;
|
|
9
|
+
|
|
10
|
+
export { parseUpdate };
|
|
11
|
+
export type { UpdateParserResult };
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Internal symbols used to identify different types of updates.
|
|
3
3
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
declare const $set: unique symbol;
|
|
5
|
+
declare const $remove: unique symbol;
|
|
6
|
+
declare const $delete: unique symbol;
|
|
7
|
+
declare const $add: unique symbol;
|
|
8
|
+
declare const $subtract: unique symbol;
|
|
9
|
+
declare const $append: unique symbol;
|
|
10
|
+
declare const $prepend: unique symbol;
|
|
11
|
+
declare const $addToSet: unique symbol;
|
|
12
|
+
declare const $ref: unique symbol;
|
|
13
|
+
declare function isUpdateSymbol(value: unknown): boolean;
|
|
14
|
+
|
|
15
|
+
export { $add, $addToSet, $append, $delete, $prepend, $ref, $remove, $set, $subtract, isUpdateSymbol };
|
|
@@ -1,42 +1,45 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { NativeAttributeValue } from '@aws-sdk/lib-dynamodb';
|
|
2
|
+
import { $set, $add, $ref, $subtract, $append, $prepend, $addToSet, $delete, $remove } from './update-symbols.js';
|
|
3
|
+
|
|
4
|
+
type UpdateType = 'SET' | 'REMOVE' | 'ADD' | 'DELETE';
|
|
5
|
+
type ValueReference<ValueType extends NativeAttributeValue = NativeAttributeValue> = {
|
|
5
6
|
type: typeof $ref;
|
|
6
7
|
to: string;
|
|
7
8
|
default?: ValueType;
|
|
8
9
|
};
|
|
9
|
-
|
|
10
|
+
type RemoveExpression = {
|
|
10
11
|
type: typeof $remove;
|
|
11
12
|
};
|
|
12
|
-
|
|
13
|
+
type DeleteExpression = {
|
|
13
14
|
type: typeof $delete;
|
|
14
15
|
values: NativeAttributeValue[] | ValueReference;
|
|
15
16
|
};
|
|
16
|
-
|
|
17
|
+
type AddExpression = {
|
|
17
18
|
type: typeof $set;
|
|
18
19
|
op: typeof $add;
|
|
19
20
|
value: number | ValueReference<number>;
|
|
20
21
|
};
|
|
21
|
-
|
|
22
|
+
type SubtractExpression = {
|
|
22
23
|
type: typeof $set;
|
|
23
24
|
op: typeof $subtract;
|
|
24
25
|
value: number | ValueReference<number>;
|
|
25
26
|
};
|
|
26
|
-
|
|
27
|
+
type AppendExpression = {
|
|
27
28
|
type: typeof $set;
|
|
28
29
|
op: typeof $append;
|
|
29
30
|
values: NativeAttributeValue[] | ValueReference;
|
|
30
31
|
};
|
|
31
|
-
|
|
32
|
+
type PrependExpression = {
|
|
32
33
|
type: typeof $set;
|
|
33
34
|
op: typeof $prepend;
|
|
34
35
|
values: NativeAttributeValue[] | ValueReference;
|
|
35
36
|
};
|
|
36
|
-
|
|
37
|
+
type AddToSetExpression = {
|
|
37
38
|
type: typeof $add;
|
|
38
39
|
op: typeof $addToSet;
|
|
39
40
|
values: NativeAttributeValue[] | ValueReference;
|
|
40
41
|
};
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
type UpdateExpression = AddExpression | SubtractExpression | AppendExpression | PrependExpression | AddToSetExpression | DeleteExpression | RemoveExpression;
|
|
43
|
+
type UpdateValues = Record<string, NativeAttributeValue | UpdateExpression | ValueReference>;
|
|
44
|
+
|
|
45
|
+
export type { AddExpression, AddToSetExpression, AppendExpression, DeleteExpression, PrependExpression, RemoveExpression, SubtractExpression, UpdateExpression, UpdateType, UpdateValues, ValueReference };
|
package/package.json
CHANGED