simple-dynamo-ts 1.0.5 → 1.0.7
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 +125 -1
- package/dist/decorators.d.ts +5 -6
- package/dist/decorators.d.ts.map +1 -1
- package/dist/decorators.js +87 -62
- package/dist/decorators.js.map +1 -1
- package/dist/entity-example2.d.ts +11 -0
- package/dist/entity-example2.d.ts.map +1 -0
- package/dist/entity-example2.js +44 -0
- package/dist/entity-example2.js.map +1 -0
- package/dist/exceptions.d.ts +1 -0
- package/dist/helper-functions.d.ts +14 -0
- package/dist/helper-functions.d.ts.map +1 -0
- package/dist/helper-functions.js +81 -0
- package/dist/helper-functions.js.map +1 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -6
- package/dist/index.js.map +1 -1
- package/dist/simple-dynamodb-repository.d.ts +9 -1
- package/dist/simple-dynamodb-repository.d.ts.map +1 -1
- package/dist/simple-dynamodb-repository.js +64 -15
- package/dist/simple-dynamodb-repository.js.map +1 -1
- package/dist/types.d.ts +5 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -0
- package/package.json +2 -2
- package/dist/exceptions.js +0 -35
- package/dist/exceptions.js.map +0 -1
- package/dist/tsconfig.build.tsbuildinfo +0 -1
package/dist/index.js
CHANGED
|
@@ -1,21 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DuplicateDecoratorError = exports.DecoratorMissingError = exports.InvalidParametersError = exports.ItemNotFoundError = exports.getIndexSortKeyName = exports.getIndexPartitionKeyName = exports.getSortKeyName = exports.getPartitionKeyName = exports.getDynamoTableName = exports.IndexSortKey = exports.IndexPartitionKey = exports.SortKey = exports.PartitionKey = exports.DynamoTable = exports.DynamoDBRepository = void 0;
|
|
3
|
+
exports.DuplicateDecoratorError = exports.DecoratorMissingError = exports.InvalidParametersError = exports.ItemNotFoundError = exports.getIndexSortKeyName = exports.getIndexPartitionKeyName = exports.getSortKeyName = exports.getCompositeSortKeyFields = exports.getCompositePartitionKeyFields = exports.getPartitionKeyName = exports.getDynamoTableName = exports.IndexSortKey = exports.IndexPartitionKey = exports.SortKey = exports.CompositeSortKey = exports.CompositePartitionKey = exports.PartitionKey = exports.DynamoTable = exports.DynamoDBRepository = void 0;
|
|
4
4
|
var simple_dynamodb_repository_1 = require("./simple-dynamodb-repository");
|
|
5
5
|
Object.defineProperty(exports, "DynamoDBRepository", { enumerable: true, get: function () { return simple_dynamodb_repository_1.DynamoDBRepository; } });
|
|
6
6
|
var decorators_1 = require("./decorators");
|
|
7
7
|
Object.defineProperty(exports, "DynamoTable", { enumerable: true, get: function () { return decorators_1.DynamoTable; } });
|
|
8
8
|
Object.defineProperty(exports, "PartitionKey", { enumerable: true, get: function () { return decorators_1.PartitionKey; } });
|
|
9
|
+
Object.defineProperty(exports, "CompositePartitionKey", { enumerable: true, get: function () { return decorators_1.CompositePartitionKey; } });
|
|
10
|
+
Object.defineProperty(exports, "CompositeSortKey", { enumerable: true, get: function () { return decorators_1.CompositeSortKey; } });
|
|
9
11
|
Object.defineProperty(exports, "SortKey", { enumerable: true, get: function () { return decorators_1.SortKey; } });
|
|
10
12
|
Object.defineProperty(exports, "IndexPartitionKey", { enumerable: true, get: function () { return decorators_1.IndexPartitionKey; } });
|
|
11
13
|
Object.defineProperty(exports, "IndexSortKey", { enumerable: true, get: function () { return decorators_1.IndexSortKey; } });
|
|
12
|
-
|
|
13
|
-
Object.defineProperty(exports, "
|
|
14
|
-
Object.defineProperty(exports, "
|
|
15
|
-
Object.defineProperty(exports, "
|
|
16
|
-
Object.defineProperty(exports, "
|
|
14
|
+
var helper_functions_1 = require("./helper-functions");
|
|
15
|
+
Object.defineProperty(exports, "getDynamoTableName", { enumerable: true, get: function () { return helper_functions_1.getDynamoTableName; } });
|
|
16
|
+
Object.defineProperty(exports, "getPartitionKeyName", { enumerable: true, get: function () { return helper_functions_1.getPartitionKeyName; } });
|
|
17
|
+
Object.defineProperty(exports, "getCompositePartitionKeyFields", { enumerable: true, get: function () { return helper_functions_1.getCompositePartitionKeyFields; } });
|
|
18
|
+
Object.defineProperty(exports, "getCompositeSortKeyFields", { enumerable: true, get: function () { return helper_functions_1.getCompositeSortKeyFields; } });
|
|
19
|
+
Object.defineProperty(exports, "getSortKeyName", { enumerable: true, get: function () { return helper_functions_1.getSortKeyName; } });
|
|
20
|
+
Object.defineProperty(exports, "getIndexPartitionKeyName", { enumerable: true, get: function () { return helper_functions_1.getIndexPartitionKeyName; } });
|
|
21
|
+
Object.defineProperty(exports, "getIndexSortKeyName", { enumerable: true, get: function () { return helper_functions_1.getIndexSortKeyName; } });
|
|
17
22
|
var exceptions_1 = require("./exceptions");
|
|
18
23
|
Object.defineProperty(exports, "ItemNotFoundError", { enumerable: true, get: function () { return exceptions_1.ItemNotFoundError; } });
|
|
19
24
|
Object.defineProperty(exports, "InvalidParametersError", { enumerable: true, get: function () { return exceptions_1.InvalidParametersError; } });
|
|
20
25
|
Object.defineProperty(exports, "DecoratorMissingError", { enumerable: true, get: function () { return exceptions_1.DecoratorMissingError; } });
|
|
21
26
|
Object.defineProperty(exports, "DuplicateDecoratorError", { enumerable: true, get: function () { return exceptions_1.DuplicateDecoratorError; } });
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,2EAAkE;AAAzD,gIAAA,kBAAkB,OAAA;AAG3B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,2EAAkE;AAAzD,gIAAA,kBAAkB,OAAA;AAG3B,2CAQsB;AAPpB,yGAAA,WAAW,OAAA;AACX,0GAAA,YAAY,OAAA;AACZ,mHAAA,qBAAqB,OAAA;AACrB,8GAAA,gBAAgB,OAAA;AAChB,qGAAA,OAAO,OAAA;AACP,+GAAA,iBAAiB,OAAA;AACjB,0GAAA,YAAY,OAAA;AAId,uDAQ4B;AAP1B,sHAAA,kBAAkB,OAAA;AAClB,uHAAA,mBAAmB,OAAA;AACnB,kIAAA,8BAA8B,OAAA;AAC9B,6HAAA,yBAAyB,OAAA;AACzB,kHAAA,cAAc,OAAA;AACd,4HAAA,wBAAwB,OAAA;AACxB,uHAAA,mBAAmB,OAAA;AAYrB,2CAKsB;AAJpB,+GAAA,iBAAiB,OAAA;AACjB,oHAAA,sBAAsB,OAAA;AACtB,mHAAA,qBAAqB,OAAA;AACrB,qHAAA,uBAAuB,OAAA"}
|
|
@@ -3,21 +3,28 @@ import { DynamoKey, DynamoKeyMap, QueryOptions } from "./types";
|
|
|
3
3
|
export declare abstract class DynamoDBRepository<T> {
|
|
4
4
|
protected readonly client: DynamoDBDocumentClient;
|
|
5
5
|
protected readonly entityClass: NewableFunction;
|
|
6
|
+
private readonly COMPOSITE_KEY_DELIMITER;
|
|
6
7
|
constructor(client: DynamoDBDocumentClient, entityClass: NewableFunction);
|
|
7
8
|
protected getTableName(): string;
|
|
8
9
|
protected getPKName(indexName?: string): string;
|
|
9
10
|
protected getSKName(indexName?: string): string | undefined;
|
|
11
|
+
protected buildCompositeKey(item: Record<string, unknown>, keys: string[]): string | undefined;
|
|
12
|
+
private convertValueToString;
|
|
13
|
+
protected transformItemForSave(item: T): Record<string, unknown>;
|
|
14
|
+
private addCompositeKeyToItemIfExists;
|
|
10
15
|
protected buildKeyMap(pk: DynamoKey, sk?: DynamoKey): DynamoKeyMap;
|
|
11
16
|
private buildCreateConditionExpression;
|
|
12
17
|
private buildExpressionAttributeNames;
|
|
13
18
|
create(item: T): Promise<T>;
|
|
14
19
|
getItem(pk: DynamoKey, sk?: DynamoKey): Promise<T>;
|
|
20
|
+
protected convertDynamoItemToEntity(item: Record<string, unknown>): T;
|
|
21
|
+
private splitCompositeKeyIntoFieldsIfExists;
|
|
15
22
|
put(item: T): Promise<T>;
|
|
16
23
|
softDelete(pk: DynamoKey, sk?: DynamoKey): Promise<void>;
|
|
17
24
|
remove(pk: DynamoKey, sk?: DynamoKey): Promise<void>;
|
|
18
25
|
query(options: QueryOptions): Promise<{
|
|
19
26
|
items: T[];
|
|
20
|
-
lastEvaluatedKey:
|
|
27
|
+
lastEvaluatedKey: DynamoKeyMap | undefined;
|
|
21
28
|
count: number;
|
|
22
29
|
}>;
|
|
23
30
|
protected buildQueryExpressions(pk: DynamoKey, pkName: string, sk?: DynamoKey, skName?: string, skComparator?: string): {
|
|
@@ -26,3 +33,4 @@ export declare abstract class DynamoDBRepository<T> {
|
|
|
26
33
|
expressionAttributeValues: Record<string, string | number>;
|
|
27
34
|
};
|
|
28
35
|
}
|
|
36
|
+
//# sourceMappingURL=simple-dynamodb-repository.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simple-dynamodb-repository.d.ts","sourceRoot":"","sources":["../src/simple-dynamodb-repository.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EAMvB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"simple-dynamodb-repository.d.ts","sourceRoot":"","sources":["../src/simple-dynamodb-repository.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EAMvB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAgBhE,8BAAsB,kBAAkB,CAAC,CAAC;IAItC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,sBAAsB;IACjD,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,eAAe;IAJjD,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAAO;gBAG1B,MAAM,EAAE,sBAAsB,EAC9B,WAAW,EAAE,eAAe;IAQjD,SAAS,CAAC,YAAY,IAAI,MAAM;IAgBhC,SAAS,CAAC,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AAY,GAAG,SAAS,CAAC;QAC3C,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IAmEF,SAAS,CAAC,qBAAqB,CAC7B,EAAE,EAAE,SAAS,EACb,MAAM,EAAE,MAAM,EACd,EAAE,CAAC,EAAE,SAAS,EACd,MAAM,CAAC,EAAE,MAAM,EACf,YAAY,CAAC,EAAE,MAAM,GACpB;QACD,sBAAsB,EAAE,MAAM,CAAC;QAC/B,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACjD,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;KAC5D;CAyBF"}
|
|
@@ -2,36 +2,63 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DynamoDBRepository = void 0;
|
|
4
4
|
const lib_dynamodb_1 = require("@aws-sdk/lib-dynamodb");
|
|
5
|
-
const decorators_1 = require("./decorators");
|
|
6
5
|
const exceptions_1 = require("./exceptions");
|
|
6
|
+
const helper_functions_1 = require("./helper-functions");
|
|
7
7
|
class DynamoDBRepository {
|
|
8
8
|
client;
|
|
9
9
|
entityClass;
|
|
10
|
+
COMPOSITE_KEY_DELIMITER = "#";
|
|
10
11
|
constructor(client, entityClass) {
|
|
11
12
|
this.client = client;
|
|
12
13
|
this.entityClass = entityClass;
|
|
13
14
|
}
|
|
14
15
|
getTableName() {
|
|
15
|
-
const tableName = (0,
|
|
16
|
+
const tableName = (0, helper_functions_1.getDynamoTableName)(this.entityClass);
|
|
16
17
|
if (!tableName) {
|
|
17
18
|
throw new exceptions_1.DecoratorMissingError(`Table name not found for entity class "${this.entityClass.name}". Make sure the class is decorated with @DynamoTable.`);
|
|
18
19
|
}
|
|
19
20
|
return tableName;
|
|
20
21
|
}
|
|
21
22
|
getPKName(indexName) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
if (indexName) {
|
|
24
|
+
const indexPkName = (0, helper_functions_1.getIndexPartitionKeyName)(this.entityClass, indexName);
|
|
25
|
+
if (indexPkName)
|
|
26
|
+
return indexPkName;
|
|
27
|
+
}
|
|
28
|
+
const pkName = (0, helper_functions_1.getPartitionKeyName)(this.entityClass);
|
|
26
29
|
if (pkName)
|
|
27
30
|
return pkName;
|
|
28
|
-
throw new exceptions_1.DecoratorMissingError(`Partition key not found for entity class "${this.entityClass.name}". Make sure a property is decorated with @PartitionKey.`);
|
|
31
|
+
throw new exceptions_1.DecoratorMissingError(`Partition key not found for entity class "${this.entityClass.name}". Make sure a property is decorated with @PartitionKey or @CompositePartitionKey.`);
|
|
29
32
|
}
|
|
30
33
|
getSKName(indexName) {
|
|
31
34
|
let skName = undefined;
|
|
32
35
|
if (indexName)
|
|
33
|
-
skName = (0,
|
|
34
|
-
return skName ? skName : (0,
|
|
36
|
+
skName = (0, helper_functions_1.getIndexSortKeyName)(this.entityClass, indexName);
|
|
37
|
+
return skName ? skName : (0, helper_functions_1.getSortKeyName)(this.entityClass);
|
|
38
|
+
}
|
|
39
|
+
buildCompositeKey(item, keys) {
|
|
40
|
+
if (!keys || keys.length === 0)
|
|
41
|
+
return undefined;
|
|
42
|
+
const keyValues = keys.map((key) => this.convertValueToString(item[key]));
|
|
43
|
+
return keyValues.join(this.COMPOSITE_KEY_DELIMITER);
|
|
44
|
+
}
|
|
45
|
+
convertValueToString(value) {
|
|
46
|
+
return value instanceof Date ? value.toISOString() : String(value);
|
|
47
|
+
}
|
|
48
|
+
transformItemForSave(item) {
|
|
49
|
+
let itemRecord = { ...item };
|
|
50
|
+
itemRecord = this.addCompositeKeyToItemIfExists((0, helper_functions_1.getCompositePartitionKeyFields)(this.entityClass), this.getPKName(), itemRecord);
|
|
51
|
+
itemRecord = this.addCompositeKeyToItemIfExists((0, helper_functions_1.getCompositeSortKeyFields)(this.entityClass), this.getSKName(), itemRecord);
|
|
52
|
+
return itemRecord;
|
|
53
|
+
}
|
|
54
|
+
addCompositeKeyToItemIfExists(keys, keyName, item) {
|
|
55
|
+
if (keys === undefined || keys.length === 0)
|
|
56
|
+
return item;
|
|
57
|
+
const itemRecord = { ...item };
|
|
58
|
+
const builtKey = this.buildCompositeKey(item, keys);
|
|
59
|
+
itemRecord[keyName] = builtKey;
|
|
60
|
+
keys.forEach((key) => delete itemRecord[key]);
|
|
61
|
+
return itemRecord;
|
|
35
62
|
}
|
|
36
63
|
buildKeyMap(pk, sk) {
|
|
37
64
|
const partitionKey = this.getPKName();
|
|
@@ -61,16 +88,17 @@ class DynamoDBRepository {
|
|
|
61
88
|
}
|
|
62
89
|
async create(item) {
|
|
63
90
|
if (!item) {
|
|
64
|
-
throw new
|
|
91
|
+
throw new exceptions_1.InvalidParametersError("Item cannot be null or undefined");
|
|
65
92
|
}
|
|
66
93
|
const tableName = this.getTableName();
|
|
67
94
|
const partitionKey = this.getPKName();
|
|
68
95
|
const sortKey = this.getSKName();
|
|
69
96
|
const conditionExpression = this.buildCreateConditionExpression(sortKey);
|
|
70
97
|
const expressionAttributeNames = this.buildExpressionAttributeNames(partitionKey, sortKey);
|
|
98
|
+
const transformedItem = this.transformItemForSave(item);
|
|
71
99
|
const command = new lib_dynamodb_1.PutCommand({
|
|
72
100
|
TableName: tableName,
|
|
73
|
-
Item:
|
|
101
|
+
Item: transformedItem,
|
|
74
102
|
ConditionExpression: conditionExpression,
|
|
75
103
|
ExpressionAttributeNames: expressionAttributeNames,
|
|
76
104
|
});
|
|
@@ -92,8 +120,9 @@ class DynamoDBRepository {
|
|
|
92
120
|
});
|
|
93
121
|
try {
|
|
94
122
|
const response = await this.client.send(command);
|
|
95
|
-
if (response.Item)
|
|
96
|
-
return response.Item;
|
|
123
|
+
if (response.Item) {
|
|
124
|
+
return this.convertDynamoItemToEntity(response.Item);
|
|
125
|
+
}
|
|
97
126
|
throw new exceptions_1.ItemNotFoundError("Item not found in your DynamoDB Table!");
|
|
98
127
|
}
|
|
99
128
|
catch (error) {
|
|
@@ -101,12 +130,28 @@ class DynamoDBRepository {
|
|
|
101
130
|
throw error;
|
|
102
131
|
}
|
|
103
132
|
}
|
|
133
|
+
convertDynamoItemToEntity(item) {
|
|
134
|
+
let entity = { ...item };
|
|
135
|
+
entity = this.splitCompositeKeyIntoFieldsIfExists((0, helper_functions_1.getCompositePartitionKeyFields)(this.entityClass), this.getPKName(), entity);
|
|
136
|
+
entity = this.splitCompositeKeyIntoFieldsIfExists((0, helper_functions_1.getCompositeSortKeyFields)(this.entityClass), this.getSKName(), entity);
|
|
137
|
+
return entity;
|
|
138
|
+
}
|
|
139
|
+
splitCompositeKeyIntoFieldsIfExists(keys, keyName, entity) {
|
|
140
|
+
if (keys === undefined || keys.length === 0)
|
|
141
|
+
return entity;
|
|
142
|
+
const newEntity = { ...entity };
|
|
143
|
+
const keysValues = entity[keyName].split(this.COMPOSITE_KEY_DELIMITER);
|
|
144
|
+
keys.forEach((key, index) => (newEntity[key] = keysValues[index]));
|
|
145
|
+
delete newEntity[keyName];
|
|
146
|
+
return newEntity;
|
|
147
|
+
}
|
|
104
148
|
async put(item) {
|
|
105
149
|
if (!item)
|
|
106
150
|
throw new exceptions_1.InvalidParametersError("Item cannot be null or undefined!");
|
|
151
|
+
const transformedItem = this.transformItemForSave(item);
|
|
107
152
|
const command = new lib_dynamodb_1.PutCommand({
|
|
108
153
|
TableName: this.getTableName(),
|
|
109
|
-
Item:
|
|
154
|
+
Item: transformedItem,
|
|
110
155
|
});
|
|
111
156
|
try {
|
|
112
157
|
await this.client.send(command);
|
|
@@ -155,8 +200,11 @@ class DynamoDBRepository {
|
|
|
155
200
|
};
|
|
156
201
|
try {
|
|
157
202
|
const response = await this.client.send(new lib_dynamodb_1.QueryCommand(commandInput));
|
|
203
|
+
const transformedItems = response.Items
|
|
204
|
+
? response.Items.map((item) => this.convertDynamoItemToEntity(item))
|
|
205
|
+
: [];
|
|
158
206
|
return {
|
|
159
|
-
items:
|
|
207
|
+
items: transformedItems,
|
|
160
208
|
lastEvaluatedKey: response.LastEvaluatedKey,
|
|
161
209
|
count: response.Count ? response.Count : 0,
|
|
162
210
|
};
|
|
@@ -188,3 +236,4 @@ class DynamoDBRepository {
|
|
|
188
236
|
}
|
|
189
237
|
}
|
|
190
238
|
exports.DynamoDBRepository = DynamoDBRepository;
|
|
239
|
+
//# sourceMappingURL=simple-dynamodb-repository.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"simple-dynamodb-repository.js","sourceRoot":"","sources":["../src/simple-dynamodb-repository.ts"],"names":[],"mappings":";;;AAAA,wDAO+B;
|
|
1
|
+
{"version":3,"file":"simple-dynamodb-repository.js","sourceRoot":"","sources":["../src/simple-dynamodb-repository.ts"],"names":[],"mappings":";;;AAAA,wDAO+B;AAG/B,6CAIsB;AACtB,yDAQ4B;AAE5B,MAAsB,kBAAkB;IAIjB;IACA;IAJJ,uBAAuB,GAAG,GAAG,CAAC;IAE/C,YACqB,MAA8B,EAC9B,WAA4B;QAD5B,WAAM,GAAN,MAAM,CAAwB;QAC9B,gBAAW,GAAX,WAAW,CAAiB;IAC9C,CAAC;IAOM,YAAY;QACpB,MAAM,SAAS,GAAG,IAAA,qCAAkB,EAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACvD,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,MAAM,IAAI,kCAAqB,CAC7B,0CAA0C,IAAI,CAAC,WAAW,CAAC,IAAI,wDAAwD,CACxH,CAAC;QACJ,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IAQS,SAAS,CAAC,SAAkB;QACpC,IAAI,SAAS,EAAE,CAAC;YACd,MAAM,WAAW,GAAG,IAAA,2CAAwB,EAAC,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;YAC1E,IAAI,WAAW;gBAAE,OAAO,WAAW,CAAC;QACtC,CAAC;QAED,MAAM,MAAM,GAAG,IAAA,sCAAmB,EAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACrD,IAAI,MAAM;YAAE,OAAO,MAAM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,QAAQ,kBAAkB,EAAE,CAAC;YAC/E,wBAAwB,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC;YACzC,yBAAyB,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC;QAC7C,CAAC;QAED,OAAO;YACL,sBAAsB;YACtB,wBAAwB;YACxB,yBAAyB;SAC1B,CAAC;IACJ,CAAC;CACF;AA/cD,gDA+cC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -11,3 +11,8 @@ export type DynamoKeyMap = Record<string, DynamoKey>;
|
|
|
11
11
|
export type DynamoEntityTarget = NewableFunction | {
|
|
12
12
|
constructor: NewableFunction;
|
|
13
13
|
};
|
|
14
|
+
export type CompositeKeyGroup = {
|
|
15
|
+
name: string;
|
|
16
|
+
fields: string[];
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,SAAS,CAAC;IACd,EAAE,CAAC,EAAE,SAAS,CAAC;IACf,YAAY,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,GAAG,aAAa,CAAC;IACzE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;AACxC,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AAKrD,MAAM,MAAM,kBAAkB,GAC1B,eAAe,GACf;IAAE,WAAW,EAAE,eAAe,CAAA;CAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,SAAS,CAAC;IACd,EAAE,CAAC,EAAE,SAAS,CAAC;IACf,YAAY,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,GAAG,aAAa,CAAC;IACzE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;AACxC,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AAKrD,MAAM,MAAM,kBAAkB,GAC1B,eAAe,GACf;IAAE,WAAW,EAAE,eAAe,CAAA;CAAE,CAAC;AAErC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC"}
|
package/dist/types.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "simple-dynamo-ts",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "A simple TypeScript library for working with DynamoDB using decorators and a repository pattern",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dynamodb",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
".": {
|
|
26
26
|
"types": "./dist/index.d.ts",
|
|
27
27
|
"import": "./dist/index.js",
|
|
28
|
-
"require": "./dist/index.
|
|
28
|
+
"require": "./dist/index.js"
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"main": "./dist/index.js",
|
package/dist/exceptions.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DuplicateDecoratorError = exports.DecoratorMissingError = exports.InvalidParametersError = exports.ItemNotFoundError = void 0;
|
|
4
|
-
class ItemNotFoundError extends Error {
|
|
5
|
-
constructor(message) {
|
|
6
|
-
super(message);
|
|
7
|
-
this.name = "ItemNotFoundError";
|
|
8
|
-
Object.setPrototypeOf(this, ItemNotFoundError.prototype);
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
exports.ItemNotFoundError = ItemNotFoundError;
|
|
12
|
-
class InvalidParametersError extends Error {
|
|
13
|
-
constructor(message) {
|
|
14
|
-
super(message);
|
|
15
|
-
this.name = "InvalidParametersError";
|
|
16
|
-
Object.setPrototypeOf(this, InvalidParametersError.prototype);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
exports.InvalidParametersError = InvalidParametersError;
|
|
20
|
-
class DecoratorMissingError extends Error {
|
|
21
|
-
constructor(message) {
|
|
22
|
-
super(message);
|
|
23
|
-
this.name = "DecoratorMissingError";
|
|
24
|
-
Object.setPrototypeOf(this, DecoratorMissingError.prototype);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
exports.DecoratorMissingError = DecoratorMissingError;
|
|
28
|
-
class DuplicateDecoratorError extends Error {
|
|
29
|
-
constructor(message) {
|
|
30
|
-
super(message);
|
|
31
|
-
this.name = "DuplicateDecoratorError";
|
|
32
|
-
Object.setPrototypeOf(this, DuplicateDecoratorError.prototype);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
exports.DuplicateDecoratorError = DuplicateDecoratorError;
|
package/dist/exceptions.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exceptions.js","sourceRoot":"","sources":["../src/exceptions.ts"],"names":[],"mappings":";;;AAAA,MAAa,iBAAkB,SAAQ,KAAK;IAC1C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;QAGhC,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAC;IAC3D,CAAC;CACF;AARD,8CAQC;AAED,MAAa,sBAAuB,SAAQ,KAAK;IAC/C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,wBAAwB,CAAC;QAGrC,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,sBAAsB,CAAC,SAAS,CAAC,CAAC;IAChE,CAAC;CACF;AARD,wDAQC;AAED,MAAa,qBAAsB,SAAQ,KAAK;IAC9C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC;QAGpC,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAC;IAC/D,CAAC;CACF;AARD,sDAQC;AAED,MAAa,uBAAwB,SAAQ,KAAK;IAChD,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,yBAAyB,CAAC;QAGtC,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,uBAAuB,CAAC,SAAS,CAAC,CAAC;IACjE,CAAC;CACF;AARD,0DAQC"}
|