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.
Files changed (66) hide show
  1. package/dist/attributes/attribute-map.d.ts +11 -7
  2. package/dist/attributes/index.d.ts +1 -1
  3. package/dist/commands/base-command.d.ts +13 -10
  4. package/dist/commands/batch-get.d.ts +11 -7
  5. package/dist/commands/batch-write.d.ts +17 -11
  6. package/dist/commands/condition-check.d.ts +12 -8
  7. package/dist/commands/conditional-delete.d.ts +14 -10
  8. package/dist/commands/conditional-put.d.ts +17 -11
  9. package/dist/commands/conditional-update.d.ts +14 -10
  10. package/dist/commands/delete.d.ts +12 -8
  11. package/dist/commands/get.d.ts +11 -7
  12. package/dist/commands/index.d.ts +18 -18
  13. package/dist/commands/projected-get.d.ts +13 -9
  14. package/dist/commands/projected-query.d.ts +14 -10
  15. package/dist/commands/projected-scan.d.ts +14 -10
  16. package/dist/commands/put.d.ts +15 -9
  17. package/dist/commands/query.d.ts +14 -10
  18. package/dist/commands/scan.d.ts +14 -10
  19. package/dist/commands/transact-get.d.ts +11 -7
  20. package/dist/commands/transact-write.d.ts +12 -8
  21. package/dist/commands/update.d.ts +13 -9
  22. package/dist/conditions/and.d.ts +5 -2
  23. package/dist/conditions/begins-with.d.ts +5 -2
  24. package/dist/conditions/between.d.ts +5 -2
  25. package/dist/conditions/condition-parser.d.ts +8 -4
  26. package/dist/conditions/condition-symbols.d.ts +13 -11
  27. package/dist/conditions/condition-types.d.ts +34 -31
  28. package/dist/conditions/contains.d.ts +6 -3
  29. package/dist/conditions/equals.d.ts +5 -2
  30. package/dist/conditions/exists.d.ts +5 -2
  31. package/dist/conditions/greater-than-or-equal.d.ts +5 -2
  32. package/dist/conditions/greater-than.d.ts +5 -2
  33. package/dist/conditions/index.d.ts +19 -19
  34. package/dist/conditions/is-in.d.ts +5 -2
  35. package/dist/conditions/less-than-or-equal.d.ts +5 -2
  36. package/dist/conditions/less-than.d.ts +5 -2
  37. package/dist/conditions/not-equals.d.ts +5 -2
  38. package/dist/conditions/not-exists.d.ts +5 -2
  39. package/dist/conditions/not.d.ts +5 -2
  40. package/dist/conditions/or.d.ts +5 -2
  41. package/dist/conditions/size.d.ts +5 -2
  42. package/dist/conditions/type-is.d.ts +5 -2
  43. package/dist/core/core-types.d.ts +17 -14
  44. package/dist/core/entity.d.ts +12 -8
  45. package/dist/core/index.d.ts +4 -4
  46. package/dist/core/key.d.ts +11 -7
  47. package/dist/core/table.d.ts +8 -4
  48. package/dist/errors.d.ts +3 -1
  49. package/dist/index.d.ts +55 -7
  50. package/dist/internal-constants.d.ts +10 -8
  51. package/dist/projections/index.d.ts +2 -2
  52. package/dist/projections/projection-parser.d.ts +8 -4
  53. package/dist/projections/projection-types.d.ts +3 -1
  54. package/dist/updates/add-to-set.d.ts +6 -3
  55. package/dist/updates/add.d.ts +5 -2
  56. package/dist/updates/append.d.ts +6 -3
  57. package/dist/updates/index.d.ts +10 -10
  58. package/dist/updates/prepend.d.ts +6 -3
  59. package/dist/updates/ref.d.ts +6 -3
  60. package/dist/updates/remove-from-set.d.ts +6 -3
  61. package/dist/updates/remove.d.ts +5 -2
  62. package/dist/updates/subtract.d.ts +5 -2
  63. package/dist/updates/update-parser.d.ts +8 -4
  64. package/dist/updates/update-symbols.d.ts +12 -10
  65. package/dist/updates/update-types.d.ts +16 -13
  66. package/package.json +1 -1
@@ -1,12 +1,16 @@
1
- import type { IndexName } from './core-types';
2
- export type DynamoKeyableValue = string | number | Buffer;
3
- export type DynamoKeyBuilder<Item> = (item: Item) => DynamoKeyableValue;
4
- export type GlobalSecondaryIndexKeyBuilders<Item> = Record<IndexName, {
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
- export type LocalSecondaryIndexKeyBuilders<Item> = Record<IndexName, {
9
+ type LocalSecondaryIndexKeyBuilders<Item> = Record<IndexName, {
9
10
  sortKey: DynamoKeyBuilder<Item>;
10
11
  }>;
11
- export type DynamoKey = Record<string, DynamoKeyableValue>;
12
- export declare function key(...parts: DynamoKeyableValue[]): string;
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 };
@@ -1,6 +1,7 @@
1
- import type { DynamoDBDocumentClient } from '@aws-sdk/lib-dynamodb';
2
- import type { NamedGlobalSecondaryIndexKeyNames, NamedLocalSecondaryIndexKeyNames } from '@/core/core-types';
3
- export type DynamoTableConfig = {
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
- export declare class DynamoTable {
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
@@ -1,3 +1,5 @@
1
- export declare class DocumentBuilderError extends Error {
1
+ declare class DocumentBuilderError extends Error {
2
2
  constructor(message: string);
3
3
  }
4
+
5
+ export { DocumentBuilderError };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,55 @@
1
- export * from './attributes';
2
- export * from './commands';
3
- export * from './conditions';
4
- export * from './core';
5
- export * from './errors';
6
- export * from './projections';
7
- export * from './updates';
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
- export declare const QUERY_VALIDATION_CONCURRENCY = 64;
2
- export declare const PROJECTED_QUERY_VALIDATION_CONCURRENCY = 64;
3
- export declare const SCAN_VALIDATION_CONCURRENCY = 64;
4
- export declare const PROJECTED_SCAN_VALIDATION_CONCURRENCY = 64;
5
- export declare const BATCH_GET_VALIDATION_CONCURRENCY = 64;
6
- export declare const BATCH_WRITE_VALIDATION_CONCURRENCY = 64;
7
- export declare const TRANSACTION_WRITE_VALIDATION_CONCURRENCY = 64;
8
- export declare const TRANSACTION_GET_VALIDATION_CONCURRENCY = 64;
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 * from './projection-types';
2
- export * from './projection-parser';
1
+ export { Projection } from './projection-types.js';
2
+ export { ProjectionResult, parseProjection } from './projection-parser.js';
@@ -1,7 +1,11 @@
1
- import { AttributeExpressionMap } from '@/attributes/attribute-map';
2
- import type { Projection } from '@/projections/projection-types';
3
- export type ProjectionResult = {
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
- export declare function parseProjection(projection: Projection, attributeExpressionMap?: AttributeExpressionMap): ProjectionResult;
8
+ declare function parseProjection(projection: Projection, attributeExpressionMap?: AttributeExpressionMap): ProjectionResult;
9
+
10
+ export { parseProjection };
11
+ export type { ProjectionResult };
@@ -1 +1,3 @@
1
- export type Projection = string[];
1
+ type Projection = string[];
2
+
3
+ export type { Projection };
@@ -1,3 +1,6 @@
1
- import type { NativeAttributeValue } from '@aws-sdk/lib-dynamodb';
2
- import type { AddToSetExpression, ValueReference } from '@/updates/update-types';
3
- export declare function addToSet(values: NativeAttributeValue[] | ValueReference): AddToSetExpression;
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 };
@@ -1,2 +1,5 @@
1
- import type { AddExpression, ValueReference } from '@/updates/update-types';
2
- export declare function add(value: number | ValueReference<number>): AddExpression;
1
+ import { ValueReference, AddExpression } from './update-types.js';
2
+
3
+ declare function add(value: number | ValueReference<number>): AddExpression;
4
+
5
+ export { add };
@@ -1,3 +1,6 @@
1
- import type { NativeAttributeValue } from '@aws-sdk/lib-dynamodb';
2
- import type { AppendExpression, ValueReference } from '@/updates/update-types';
3
- export declare function append(values: NativeAttributeValue[] | ValueReference): AppendExpression;
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 };
@@ -1,10 +1,10 @@
1
- export * from './update-parser';
2
- export * from './update-types';
3
- export * from './ref';
4
- export * from './remove';
5
- export * from './add';
6
- export * from './subtract';
7
- export * from './append';
8
- export * from './prepend';
9
- export * from './add-to-set';
10
- export * from './remove-from-set';
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 type { NativeAttributeValue } from '@aws-sdk/lib-dynamodb';
2
- import type { PrependExpression, ValueReference } from '@/updates/update-types';
3
- export declare function prepend(values: NativeAttributeValue[] | ValueReference): PrependExpression;
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 };
@@ -1,3 +1,6 @@
1
- import type { ValueReference } from '@/updates/update-types';
2
- import type { NativeAttributeValue } from '@aws-sdk/lib-dynamodb';
3
- export declare function ref(attributePath: string, defaultTo?: NativeAttributeValue): ValueReference;
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 type { NativeAttributeValue } from '@aws-sdk/lib-dynamodb';
2
- import type { DeleteExpression, ValueReference } from '@/updates/update-types';
3
- export declare function removeFromSet(values: NativeAttributeValue[] | ValueReference): DeleteExpression;
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 };
@@ -1,2 +1,5 @@
1
- import type { RemoveExpression } from '@/updates/update-types';
2
- export declare function remove(): RemoveExpression;
1
+ import { RemoveExpression } from './update-types.js';
2
+
3
+ declare function remove(): RemoveExpression;
4
+
5
+ export { remove };
@@ -1,2 +1,5 @@
1
- import type { SubtractExpression, ValueReference } from '@/updates/update-types';
2
- export declare function subtract(value: number | ValueReference<number>): SubtractExpression;
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 '@/attributes/attribute-map';
2
- import type { UpdateValues } from '@/updates/update-types';
3
- export type UpdateParserResult = {
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
- export declare function parseUpdate(update: UpdateValues, attributeExpressionMap?: AttributeExpressionMap): UpdateParserResult;
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
- export declare const $set: unique symbol;
5
- export declare const $remove: unique symbol;
6
- export declare const $delete: unique symbol;
7
- export declare const $add: unique symbol;
8
- export declare const $subtract: unique symbol;
9
- export declare const $append: unique symbol;
10
- export declare const $prepend: unique symbol;
11
- export declare const $addToSet: unique symbol;
12
- export declare const $ref: unique symbol;
13
- export declare function isUpdateSymbol(value: unknown): boolean;
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 type { NativeAttributeValue } from '@aws-sdk/lib-dynamodb';
2
- import type { $set, $remove, $delete, $add, $subtract, $append, $addToSet, $prepend, $ref } from '@/updates/update-symbols';
3
- export type UpdateType = 'SET' | 'REMOVE' | 'ADD' | 'DELETE';
4
- export type ValueReference<ValueType extends NativeAttributeValue = NativeAttributeValue> = {
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
- export type RemoveExpression = {
10
+ type RemoveExpression = {
10
11
  type: typeof $remove;
11
12
  };
12
- export type DeleteExpression = {
13
+ type DeleteExpression = {
13
14
  type: typeof $delete;
14
15
  values: NativeAttributeValue[] | ValueReference;
15
16
  };
16
- export type AddExpression = {
17
+ type AddExpression = {
17
18
  type: typeof $set;
18
19
  op: typeof $add;
19
20
  value: number | ValueReference<number>;
20
21
  };
21
- export type SubtractExpression = {
22
+ type SubtractExpression = {
22
23
  type: typeof $set;
23
24
  op: typeof $subtract;
24
25
  value: number | ValueReference<number>;
25
26
  };
26
- export type AppendExpression = {
27
+ type AppendExpression = {
27
28
  type: typeof $set;
28
29
  op: typeof $append;
29
30
  values: NativeAttributeValue[] | ValueReference;
30
31
  };
31
- export type PrependExpression = {
32
+ type PrependExpression = {
32
33
  type: typeof $set;
33
34
  op: typeof $prepend;
34
35
  values: NativeAttributeValue[] | ValueReference;
35
36
  };
36
- export type AddToSetExpression = {
37
+ type AddToSetExpression = {
37
38
  type: typeof $add;
38
39
  op: typeof $addToSet;
39
40
  values: NativeAttributeValue[] | ValueReference;
40
41
  };
41
- export type UpdateExpression = AddExpression | SubtractExpression | AppendExpression | PrependExpression | AddToSetExpression | DeleteExpression | RemoveExpression;
42
- export type UpdateValues = Record<string, NativeAttributeValue | UpdateExpression | ValueReference>;
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dynamo-document-builder",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "DynamoDB single table design and data validation made easy using TypeScript and Zod ⚡️",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",