@futdevpro/nts-dynamo 1.5.18 → 1.5.20
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/lib/_models/dynamo-module-settings.d.ts +3 -0
- package/lib/_models/dynamo-module-settings.d.ts.map +1 -1
- package/lib/_models/dynamobe-app-params.d.ts +3 -0
- package/lib/_models/dynamobe-app-params.d.ts.map +1 -1
- package/lib/_models/dynamobe-app-params.js +3 -0
- package/lib/_models/dynamobe-app-params.js.map +1 -1
- package/lib/_models/dynamobe-endpoint-params.d.ts +17 -1
- package/lib/_models/dynamobe-endpoint-params.d.ts.map +1 -1
- package/lib/_models/dynamobe-endpoint-params.js +16 -0
- package/lib/_models/dynamobe-endpoint-params.js.map +1 -1
- package/lib/_models/dynamobe-global-settings.d.ts +3 -0
- package/lib/_models/dynamobe-global-settings.d.ts.map +1 -1
- package/lib/_modules/usage/usage.service.d.ts.map +1 -1
- package/lib/_modules/usage/usage.service.js +20 -4
- package/lib/_modules/usage/usage.service.js.map +1 -1
- package/lib/_services/dynamobe-api.service.d.ts +9 -0
- package/lib/_services/dynamobe-api.service.d.ts.map +1 -1
- package/lib/_services/dynamobe-api.service.js +20 -3
- package/lib/_services/dynamobe-api.service.js.map +1 -1
- package/lib/_services/dynamobe-app.d.ts +24 -0
- package/lib/_services/dynamobe-app.d.ts.map +1 -1
- package/lib/_services/dynamobe-app.js +28 -4
- package/lib/_services/dynamobe-app.js.map +1 -1
- package/lib/_services/dynamobe-auth.service.d.ts +13 -0
- package/lib/_services/dynamobe-auth.service.d.ts.map +1 -1
- package/lib/_services/dynamobe-auth.service.js +8 -2
- package/lib/_services/dynamobe-auth.service.js.map +1 -1
- package/lib/_services/dynamobe-controller.service.d.ts +3 -0
- package/lib/_services/dynamobe-controller.service.d.ts.map +1 -1
- package/lib/_services/dynamobe-controller.service.js +3 -0
- package/lib/_services/dynamobe-controller.service.js.map +1 -1
- package/lib/_services/dynamobe-data.service.d.ts +6 -2
- package/lib/_services/dynamobe-data.service.d.ts.map +1 -1
- package/lib/_services/dynamobe-data.service.js +76 -26
- package/lib/_services/dynamobe-data.service.js.map +1 -1
- package/lib/_services/dynamobe-db-service-collection.service.d.ts +3 -0
- package/lib/_services/dynamobe-db-service-collection.service.d.ts.map +1 -1
- package/lib/_services/dynamobe-db-service-collection.service.js +3 -0
- package/lib/_services/dynamobe-db-service-collection.service.js.map +1 -1
- package/lib/_services/dynamobe-db.service.d.ts +110 -15
- package/lib/_services/dynamobe-db.service.d.ts.map +1 -1
- package/lib/_services/dynamobe-db.service.js +237 -63
- package/lib/_services/dynamobe-db.service.js.map +1 -1
- package/lib/_services/dynamobe-email.service.d.ts +22 -0
- package/lib/_services/dynamobe-email.service.d.ts.map +1 -1
- package/lib/_services/dynamobe-email.service.js +45 -11
- package/lib/_services/dynamobe-email.service.js.map +1 -1
- package/lib/_services/dynamobe-global.service.d.ts +22 -0
- package/lib/_services/dynamobe-global.service.d.ts.map +1 -1
- package/lib/_services/dynamobe-global.service.js +22 -0
- package/lib/_services/dynamobe-global.service.js.map +1 -1
- package/lib/_services/dynamobe-routing-module.service.d.ts +15 -0
- package/lib/_services/dynamobe-routing-module.service.d.ts.map +1 -1
- package/lib/_services/dynamobe-routing-module.service.js +28 -3
- package/lib/_services/dynamobe-routing-module.service.js.map +1 -1
- package/lib/_services/dynamobe-shared.service.d.ts +18 -0
- package/lib/_services/dynamobe-shared.service.d.ts.map +1 -1
- package/lib/_services/dynamobe-shared.service.js +18 -0
- package/lib/_services/dynamobe-shared.service.js.map +1 -1
- package/lib/_services/dynamobe-singleton.service.d.ts +3 -0
- package/lib/_services/dynamobe-singleton.service.d.ts.map +1 -1
- package/lib/_services/dynamobe-singleton.service.js +3 -0
- package/lib/_services/dynamobe-singleton.service.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +33 -47
- package/package.json +11 -11
- package/src/_models/dynamo-module-settings.ts +3 -1
- package/src/_models/dynamobe-app-params.ts +3 -0
- package/src/_models/dynamobe-endpoint-params.ts +17 -1
- package/src/_models/dynamobe-global-settings.ts +3 -0
- package/src/_modules/usage/usage.service.ts +20 -4
- package/src/_services/dynamobe-api.service.ts +20 -3
- package/src/_services/dynamobe-app.ts +28 -4
- package/src/_services/dynamobe-auth.service.ts +21 -2
- package/src/_services/dynamobe-controller.service.ts +3 -0
- package/src/_services/dynamobe-data.service.ts +78 -26
- package/src/_services/dynamobe-db-service-collection.service.ts +3 -0
- package/src/_services/dynamobe-db.service.ts +224 -48
- package/src/_services/dynamobe-email.service.ts +45 -11
- package/src/_services/dynamobe-global.service.ts +22 -0
- package/src/_services/dynamobe-routing-module.service.ts +28 -3
- package/src/_services/dynamobe-shared.service.ts +18 -0
- package/src/_services/dynamobe-singleton.service.ts +3 -0
- package/src/_models/dynamobe-data-model-params.ts +0 -24
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Metadata, DynamoBEDataParams
|
|
1
|
+
import { Metadata, DynamoBEDataParams } from '@futdevpro/fsm-dynamo';
|
|
2
2
|
import { DynamoBEDBService } from './dynamobe-db.service';
|
|
3
3
|
export declare class DynamoBEDataService<T extends Metadata> {
|
|
4
4
|
dataDBService: DynamoBEDBService<T>;
|
|
@@ -7,7 +7,7 @@ export declare class DynamoBEDataService<T extends Metadata> {
|
|
|
7
7
|
issuer?: string;
|
|
8
8
|
depKey?: string;
|
|
9
9
|
depDBServiceKey?: string;
|
|
10
|
-
|
|
10
|
+
dataParams: DynamoBEDataParams;
|
|
11
11
|
constructor(data: T, dataParams: DynamoBEDataParams, issuer?: string);
|
|
12
12
|
/**
|
|
13
13
|
* returns all data from database to service dataList
|
|
@@ -45,6 +45,10 @@ export declare class DynamoBEDataService<T extends Metadata> {
|
|
|
45
45
|
* setting up dependency dataHook by DynamoBEDataModelParams
|
|
46
46
|
*/
|
|
47
47
|
private lookForDependencyDataSettings;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @returns
|
|
51
|
+
*/
|
|
48
52
|
getDependencyDataDBService(): DynamoBEDBService<any>;
|
|
49
53
|
}
|
|
50
54
|
//# sourceMappingURL=dynamobe-data.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamobe-data.service.d.ts","sourceRoot":"","sources":["../../src/_services/dynamobe-data.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"dynamobe-data.service.d.ts","sourceRoot":"","sources":["../../src/_services/dynamobe-data.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAA6C,MAAM,uBAAuB,CAAC;AAEhH,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAG1D,qBAAa,mBAAmB,CAAC,CAAC,SAAS,QAAQ;IACjD,aAAa,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;IACpC,IAAI,EAAE,CAAC,CAAC;IACR,QAAQ,EAAE,CAAC,EAAE,CAAM;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;IAGzB,UAAU,EAAE,kBAAkB,CAAC;gBAG7B,IAAI,EAAE,CAAC,EACP,UAAU,EAAE,kBAAkB,EAC9B,MAAM,CAAC,EAAE,MAAM;IAUjB;;OAEG;IACG,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAc7B;;OAEG;IACG,WAAW,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,gBAAgB,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC;IA0BtE;;;OAGG;IACG,qBAAqB,CAAC,YAAY,CAAC,EAAE,MAAM,EAAE,gBAAgB,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC;IAiC1F;;;OAGG;IACG,yBAAyB,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA4BrE;;;;OAIG;IACG,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAuC/B;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAgBjC;;OAEG;IACG,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC;IA4BtC;;OAEG;IACH,OAAO,CAAC,6BAA6B;IAUrC;;;OAGG;IACH,0BAA0B,IAAI,iBAAiB,CAAC,GAAG,CAAC;CAUrD"}
|
|
@@ -7,10 +7,10 @@ const dynamobe_global_service_1 = require("./dynamobe-global.service");
|
|
|
7
7
|
class DynamoBEDataService {
|
|
8
8
|
constructor(data, dataParams, issuer) {
|
|
9
9
|
this.dataList = [];
|
|
10
|
-
this.dataModelParams = [];
|
|
11
10
|
this.dataDBService = dynamobe_global_service_1.DBE_Global_S.getDBService(dataParams);
|
|
12
11
|
this.data = data;
|
|
13
|
-
this.
|
|
12
|
+
this.dataParams = dataParams;
|
|
13
|
+
// this.dataModelParams = dataParams.modelParams;
|
|
14
14
|
this.lookForDependencyDataSettings();
|
|
15
15
|
this.issuer = issuer;
|
|
16
16
|
}
|
|
@@ -25,7 +25,11 @@ class DynamoBEDataService {
|
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
catch (error) {
|
|
28
|
-
throw new fsm_dynamo_1.DynamoBEError({
|
|
28
|
+
throw new fsm_dynamo_1.DynamoBEError({
|
|
29
|
+
status: 417, message: 'getAll was unsuccessful',
|
|
30
|
+
userMessage: `We encountered a DB Error, please contact the responsible development team. errorcode: 744-234-130`,
|
|
31
|
+
error: error
|
|
32
|
+
});
|
|
29
33
|
}
|
|
30
34
|
});
|
|
31
35
|
}
|
|
@@ -46,11 +50,18 @@ class DynamoBEDataService {
|
|
|
46
50
|
return dataExists;
|
|
47
51
|
}
|
|
48
52
|
else {
|
|
49
|
-
throw new fsm_dynamo_1.DynamoBEError({
|
|
53
|
+
throw new fsm_dynamo_1.DynamoBEError({
|
|
54
|
+
status: 417, message: 'ID is missing!',
|
|
55
|
+
userMessage: `We encountered a DB Error, please contact the responsible development team. errorcode: 744-234-131B`,
|
|
56
|
+
});
|
|
50
57
|
}
|
|
51
58
|
}
|
|
52
59
|
catch (error) {
|
|
53
|
-
throw new fsm_dynamo_1.DynamoBEError({
|
|
60
|
+
throw new fsm_dynamo_1.DynamoBEError({
|
|
61
|
+
status: 417, message: 'getDataById was unsuccessful',
|
|
62
|
+
userMessage: `We encountered a DB Error, please contact the responsible development team. errorcode: 744-234-131A`,
|
|
63
|
+
error: error
|
|
64
|
+
});
|
|
54
65
|
}
|
|
55
66
|
});
|
|
56
67
|
}
|
|
@@ -73,15 +84,25 @@ class DynamoBEDataService {
|
|
|
73
84
|
return dataExists;
|
|
74
85
|
}
|
|
75
86
|
else {
|
|
76
|
-
throw new fsm_dynamo_1.DynamoBEError({
|
|
87
|
+
throw new fsm_dynamo_1.DynamoBEError({
|
|
88
|
+
status: 417, message: `${this.depKey} is missing!`,
|
|
89
|
+
userMessage: `We encountered a DB Error, please contact the responsible development team. errorcode: 744-234-132C`,
|
|
90
|
+
});
|
|
77
91
|
}
|
|
78
92
|
}
|
|
79
93
|
else {
|
|
80
|
-
throw new fsm_dynamo_1.DynamoBEError({
|
|
94
|
+
throw new fsm_dynamo_1.DynamoBEError({
|
|
95
|
+
status: 417, message: 'dependencyDataIdKey is missing from service!',
|
|
96
|
+
userMessage: `We encountered a DB Error, please contact the responsible development team. errorcode: 744-234-132B`,
|
|
97
|
+
});
|
|
81
98
|
}
|
|
82
99
|
}
|
|
83
100
|
catch (error) {
|
|
84
|
-
throw new fsm_dynamo_1.DynamoBEError({
|
|
101
|
+
throw new fsm_dynamo_1.DynamoBEError({
|
|
102
|
+
status: 417, message: 'getDataByDependencyId was unsuccessful',
|
|
103
|
+
userMessage: `We encountered a DB Error, please contact the responsible development team. errorcode: 744-234-132A`,
|
|
104
|
+
error: error
|
|
105
|
+
});
|
|
85
106
|
}
|
|
86
107
|
});
|
|
87
108
|
}
|
|
@@ -99,15 +120,25 @@ class DynamoBEDataService {
|
|
|
99
120
|
});
|
|
100
121
|
}
|
|
101
122
|
else {
|
|
102
|
-
throw new fsm_dynamo_1.DynamoBEError({
|
|
123
|
+
throw new fsm_dynamo_1.DynamoBEError({
|
|
124
|
+
status: 417, message: `${this.depKey} is missing!`,
|
|
125
|
+
userMessage: `We encountered a DB Error, please contact the responsible development team. errorcode: 744-234-133C`,
|
|
126
|
+
});
|
|
103
127
|
}
|
|
104
128
|
}
|
|
105
129
|
else {
|
|
106
|
-
throw new fsm_dynamo_1.DynamoBEError({
|
|
130
|
+
throw new fsm_dynamo_1.DynamoBEError({
|
|
131
|
+
status: 417, message: 'dependencyDataIdKey is missing from service!',
|
|
132
|
+
userMessage: `We encountered a DB Error, please contact the responsible development team. errorcode: 744-234-133B`,
|
|
133
|
+
});
|
|
107
134
|
}
|
|
108
135
|
}
|
|
109
136
|
catch (error) {
|
|
110
|
-
throw new fsm_dynamo_1.DynamoBEError({ status: 417,
|
|
137
|
+
throw new fsm_dynamo_1.DynamoBEError({ status: 417,
|
|
138
|
+
message: 'getDataListByDependencyId was unsuccessful',
|
|
139
|
+
userMessage: `We encountered a DB Error, please contact the responsible development team. errorcode: 744-234-133A`,
|
|
140
|
+
error: error
|
|
141
|
+
});
|
|
111
142
|
}
|
|
112
143
|
});
|
|
113
144
|
}
|
|
@@ -151,7 +182,11 @@ class DynamoBEDataService {
|
|
|
151
182
|
}
|
|
152
183
|
}
|
|
153
184
|
catch (error) {
|
|
154
|
-
throw new fsm_dynamo_1.DynamoBEError({
|
|
185
|
+
throw new fsm_dynamo_1.DynamoBEError({
|
|
186
|
+
status: 417, message: `modifyData was unsuccessful (${this.dataParams.dataName})`,
|
|
187
|
+
userMessage: `We encountered a DB Error, please contact the responsible development team. errorcode: 744-234-222`,
|
|
188
|
+
error: error
|
|
189
|
+
});
|
|
155
190
|
}
|
|
156
191
|
});
|
|
157
192
|
}
|
|
@@ -169,7 +204,11 @@ class DynamoBEDataService {
|
|
|
169
204
|
}
|
|
170
205
|
}
|
|
171
206
|
catch (error) {
|
|
172
|
-
throw new fsm_dynamo_1.DynamoBEError({
|
|
207
|
+
throw new fsm_dynamo_1.DynamoBEError({
|
|
208
|
+
status: 417, message: 'deleteData was unsuccessful',
|
|
209
|
+
userMessage: `We encountered a DB Error, please contact the responsible development team. errorcode: 744-234-223`,
|
|
210
|
+
error: error
|
|
211
|
+
});
|
|
173
212
|
}
|
|
174
213
|
});
|
|
175
214
|
}
|
|
@@ -179,26 +218,30 @@ class DynamoBEDataService {
|
|
|
179
218
|
validateForSave() {
|
|
180
219
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
181
220
|
try {
|
|
182
|
-
for (let i = 0; i < this.
|
|
221
|
+
for (let i = 0; i < this.dataParams.modelParams.length; i++) {
|
|
183
222
|
// basic required validations
|
|
184
|
-
if ((this.
|
|
185
|
-
(this.
|
|
186
|
-
throw new fsm_dynamo_1.DynamoBEError({ status: 422, message: `${this.
|
|
223
|
+
if ((this.dataParams.modelParams[i].required && (this.data[this.dataParams.modelParams[i].key] === null || this.data[this.dataParams.modelParams[i].key] === undefined)) ||
|
|
224
|
+
(this.dataParams.modelParams[i].index && (this.data[this.dataParams.modelParams[i].key] === null || this.data[this.dataParams.modelParams[i].key] === undefined))) {
|
|
225
|
+
throw new fsm_dynamo_1.DynamoBEError({ status: 422, message: `${this.dataParams.modelParams[i].key} is missing! (${this.dataParams.modelParams[i].required ? 'required' : 'index'})` });
|
|
187
226
|
}
|
|
188
227
|
// specific Date validation
|
|
189
|
-
if (this.
|
|
190
|
-
throw new fsm_dynamo_1.DynamoBEError({ status: 422, message: `${this.
|
|
228
|
+
if (this.dataParams.modelParams[i].type === 'Date' && !(new Date(this.data[this.dataParams.modelParams[i].key]) instanceof Date)) {
|
|
229
|
+
throw new fsm_dynamo_1.DynamoBEError({ status: 422, message: `${this.dataParams.modelParams[i].key} is not a date!` });
|
|
191
230
|
}
|
|
192
231
|
// call additional validators
|
|
193
|
-
if (this.
|
|
194
|
-
for (let j = 0; j < this.
|
|
195
|
-
this.
|
|
232
|
+
if (this.dataParams.modelParams[i].additionalValidators) {
|
|
233
|
+
for (let j = 0; j < this.dataParams.modelParams[i].additionalValidators.length; j++) {
|
|
234
|
+
this.dataParams.modelParams[i].additionalValidators[j](this.data[this.dataParams.modelParams[i].key]);
|
|
196
235
|
}
|
|
197
236
|
}
|
|
198
237
|
}
|
|
199
238
|
}
|
|
200
239
|
catch (error) {
|
|
201
|
-
throw new fsm_dynamo_1.DynamoBEError({
|
|
240
|
+
throw new fsm_dynamo_1.DynamoBEError({
|
|
241
|
+
status: 422, message: 'validateForSave was unsuccessful',
|
|
242
|
+
userMessage: `We encountered a DB Error, please contact the responsible development team. errorcode: 744-234-220`,
|
|
243
|
+
error: error
|
|
244
|
+
});
|
|
202
245
|
}
|
|
203
246
|
});
|
|
204
247
|
}
|
|
@@ -206,7 +249,7 @@ class DynamoBEDataService {
|
|
|
206
249
|
* setting up dependency dataHook by DynamoBEDataModelParams
|
|
207
250
|
*/
|
|
208
251
|
lookForDependencyDataSettings() {
|
|
209
|
-
const dependencyParam = this.
|
|
252
|
+
const dependencyParam = this.dataParams.modelParams.find((modelParams) => modelParams.isDependencyHook);
|
|
210
253
|
if (dependencyParam) {
|
|
211
254
|
this.depKey = dependencyParam.key;
|
|
212
255
|
if (dependencyParam.dependencyName) {
|
|
@@ -214,12 +257,19 @@ class DynamoBEDataService {
|
|
|
214
257
|
}
|
|
215
258
|
}
|
|
216
259
|
}
|
|
260
|
+
/**
|
|
261
|
+
*
|
|
262
|
+
* @returns
|
|
263
|
+
*/
|
|
217
264
|
getDependencyDataDBService() {
|
|
218
265
|
if (this.depDBServiceKey) {
|
|
219
|
-
return dynamobe_global_service_1.DBE_Global_S.
|
|
266
|
+
return dynamobe_global_service_1.DBE_Global_S.getDBService(this.dataParams);
|
|
220
267
|
}
|
|
221
268
|
else {
|
|
222
|
-
throw new fsm_dynamo_1.DynamoBEError({
|
|
269
|
+
throw new fsm_dynamo_1.DynamoBEError({
|
|
270
|
+
status: 501, message: 'getDependencyDataDBService was unsuccessful, service key not setted up!',
|
|
271
|
+
userMessage: `We encountered a DB Error, please contact the responsible development team. errorcode: 744-234-200`,
|
|
272
|
+
});
|
|
223
273
|
}
|
|
224
274
|
}
|
|
225
275
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamobe-data.service.js","sourceRoot":"","sources":["../../src/_services/dynamobe-data.service.ts"],"names":[],"mappings":";;;;AACA,sDAAgH;AAGhH,uEAAyD;AAEzD,MAAa,mBAAmB;
|
|
1
|
+
{"version":3,"file":"dynamobe-data.service.js","sourceRoot":"","sources":["../../src/_services/dynamobe-data.service.ts"],"names":[],"mappings":";;;;AACA,sDAAgH;AAGhH,uEAAyD;AAEzD,MAAa,mBAAmB;IAY9B,YACE,IAAO,EACP,UAA8B,EAC9B,MAAe;QAZjB,aAAQ,GAAQ,EAAE,CAAC;QAcjB,IAAI,CAAC,aAAa,GAAG,sCAAY,CAAC,YAAY,CAAI,UAAU,CAAC,CAAC;QAC9D,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,iDAAiD;QACjD,IAAI,CAAC,6BAA6B,EAAE,CAAC;QACrC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;OAEG;IACG,MAAM;;YACV,IAAI;gBACF,MAAM,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,CAAC,QAAa,EAAE,EAAE;oBACvD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;gBAC3B,CAAC,CAAC,CAAC;aACJ;YAAC,OAAO,KAAK,EAAE;gBACd,MAAM,IAAI,0BAAa,CAAC;oBACtB,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,yBAAyB;oBAC/C,WAAW,EAAE,oGAAoG;oBACjH,KAAK,EAA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nB,IAAI,CAAC,MAAM,GAAG,eAAe,CAAC,GAAG,CAAC;YAClC,IAAI,eAAe,CAAC,cAAc,EAAE;gBAClC,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC,cAAc,CAAC;aACvD;SACF;IACH,CAAC;IAED;;;OAGG;IACH,0BAA0B;QACxB,IAAI,IAAI,CAAC,eAAe,EAAE;YACxB,OAAO,sCAAY,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;SACnD;aAAM;YACL,MAAM,IAAI,0BAAa,CAAC;gBACtB,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,yEAAyE;gBAC/F,WAAW,EAAE,oGAAoG;aAClH,CAAC,CAAC;SACJ;IACH,CAAC;CACF;AArQD,kDAqQC"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { DynamoBEDBService } from './dynamobe-db.service';
|
|
2
2
|
import { DynamoBESingletonService } from './dynamobe-singleton.service';
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
*/
|
|
3
6
|
export declare class DynamoBEDBServiceCollection extends DynamoBESingletonService {
|
|
4
7
|
[service: string]: DynamoBEDBService<any>;
|
|
5
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamobe-db-service-collection.service.d.ts","sourceRoot":"","sources":["../../src/_services/dynamobe-db-service-collection.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAExE,qBAAa,2BAA4B,SAAQ,wBAAwB;IAEvE,CAAC,OAAO,EAAE,MAAM,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC;CAE3C"}
|
|
1
|
+
{"version":3,"file":"dynamobe-db-service-collection.service.d.ts","sourceRoot":"","sources":["../../src/_services/dynamobe-db-service-collection.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAExE;;GAEG;AACH,qBAAa,2BAA4B,SAAQ,wBAAwB;IAEvE,CAAC,OAAO,EAAE,MAAM,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC;CAE3C"}
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DynamoBEDBServiceCollection = void 0;
|
|
4
4
|
const dynamobe_singleton_service_1 = require("./dynamobe-singleton.service");
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
5
8
|
class DynamoBEDBServiceCollection extends dynamobe_singleton_service_1.DynamoBESingletonService {
|
|
6
9
|
}
|
|
7
10
|
exports.DynamoBEDBServiceCollection = DynamoBEDBServiceCollection;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamobe-db-service-collection.service.js","sourceRoot":"","sources":["../../src/_services/dynamobe-db-service-collection.service.ts"],"names":[],"mappings":";;;AAEA,6EAAwE;AAExE,MAAa,2BAA4B,SAAQ,qDAAwB;CAIxE;AAJD,kEAIC"}
|
|
1
|
+
{"version":3,"file":"dynamobe-db-service-collection.service.js","sourceRoot":"","sources":["../../src/_services/dynamobe-db-service-collection.service.ts"],"names":[],"mappings":";;;AAEA,6EAAwE;AAExE;;GAEG;AACH,MAAa,2BAA4B,SAAQ,qDAAwB;CAIxE;AAJD,kEAIC"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import * as mongoose from 'mongoose';
|
|
2
2
|
import { Metadata, DynamoBEDataParams } from '@futdevpro/fsm-dynamo';
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
*/
|
|
3
6
|
export declare class DynamoBEDBService<T extends Metadata> {
|
|
4
7
|
dataParams: DynamoBEDataParams;
|
|
5
8
|
dataModel: mongoose.Model<mongoose.Document<any, any, any>, any, any>;
|
|
@@ -57,22 +60,21 @@ export declare class DynamoBEDBService<T extends Metadata> {
|
|
|
57
60
|
searchData(searchBy: object, narrowByDependencyIds?: string[]): Promise<T[]>;
|
|
58
61
|
/**
|
|
59
62
|
* find data by any of its parameters, throws error if not found
|
|
60
|
-
* @param data
|
|
63
|
+
* @param data
|
|
64
|
+
* (always use unique parameters for find!)
|
|
65
|
+
* etc.: by email:
|
|
66
|
+
* { email: email }
|
|
67
|
+
* or by id that is in list:
|
|
61
68
|
* { userIds: { $in: this.userId } }
|
|
69
|
+
* or by number or Date that is greater than OR less than:
|
|
70
|
+
* { points: { $gte: 2, $lte: 14 } }
|
|
62
71
|
* @returns data
|
|
63
72
|
*/
|
|
64
|
-
findData(data: T): Promise<T>;
|
|
65
73
|
/**
|
|
66
74
|
* returns all data from database, throws error if not found
|
|
67
75
|
* @returns dataList
|
|
68
76
|
*/
|
|
69
77
|
getAll(): Promise<T[]>;
|
|
70
|
-
/**
|
|
71
|
-
* update one parameter by a specific
|
|
72
|
-
* { _id: pictureId }, { approved: true }
|
|
73
|
-
* @param updateBy etc.: { email: email } (always use unique parameters for find!)
|
|
74
|
-
* @param update etc.: { $inc: { popularity: this.newVote.amount }, emailVerified: true }
|
|
75
|
-
*/
|
|
76
78
|
/**
|
|
77
79
|
* deleted data by id
|
|
78
80
|
* @param id id
|
|
@@ -85,19 +87,59 @@ export declare class DynamoBEDBService<T extends Metadata> {
|
|
|
85
87
|
deleteDataByDependencyId(dependencyId: string): Promise<void>;
|
|
86
88
|
/**
|
|
87
89
|
* find the data first by any of its parameters, throws error if not found
|
|
88
|
-
* @param filter
|
|
90
|
+
* @param filter
|
|
91
|
+
* (always use unique parameters for find!)
|
|
92
|
+
* etc.: by email:
|
|
93
|
+
* { email: email }
|
|
94
|
+
* or by id that is in list:
|
|
95
|
+
* { userIds: { $in: this.userId } }
|
|
96
|
+
* or by number or Date that is GREATER THAN OR LESS THAN:
|
|
97
|
+
* { points: { $gt: 2, $lt: 14 } }
|
|
98
|
+
* further tools (syntax matches with $gt):
|
|
99
|
+
* $eq: Matches values that are EQUAL to a specified value.
|
|
100
|
+
* $gte: Matches values that are GREATER THAN or EQUAL to a specified value.
|
|
101
|
+
* $lte: Matches values that are LESS THAN or EQUAL to a specified value.
|
|
102
|
+
* $ne: Matches all values that are NOT EQUAL to a specified value.
|
|
103
|
+
* $nin: Matches NONE of the values specified IN an array.
|
|
104
|
+
*
|
|
89
105
|
* @returns data
|
|
90
106
|
*/
|
|
91
107
|
findOne(filter: any): Promise<T>;
|
|
92
108
|
/**
|
|
93
109
|
* find all data by any of its parameters, throws error if not found
|
|
94
|
-
* @param filter
|
|
110
|
+
* @param filter
|
|
111
|
+
* etc.: by email:
|
|
112
|
+
* { email: email }
|
|
113
|
+
* or by id that is in list:
|
|
114
|
+
* { userIds: { $in: this.userId } }
|
|
115
|
+
* or by number or Date that is GREATER THAN OR LESS THAN:
|
|
116
|
+
* { points: { $gt: 2, $lt: 14 } }
|
|
117
|
+
* further tools (syntax matches with $gt):
|
|
118
|
+
* $eq: Matches values that are EQUAL to a specified value.
|
|
119
|
+
* $gte: Matches values that are GREATER THAN or EQUAL to a specified value.
|
|
120
|
+
* $lte: Matches values that are LESS THAN or EQUAL to a specified value.
|
|
121
|
+
* $ne: Matches all values that are NOT EQUAL to a specified value.
|
|
122
|
+
* $nin: Matches NONE of the values specified IN an array.
|
|
123
|
+
*
|
|
95
124
|
* @returns dataList
|
|
96
125
|
*/
|
|
97
126
|
find(filter: any): Promise<T[]>;
|
|
98
127
|
/**
|
|
99
128
|
* find all data by any of its parameters, throws error if not found
|
|
100
|
-
* @param filter
|
|
129
|
+
* @param filter
|
|
130
|
+
* etc.: by email:
|
|
131
|
+
* { email: email }
|
|
132
|
+
* or by id that is in list:
|
|
133
|
+
* { userIds: { $in: this.userId } }
|
|
134
|
+
* or by number or Date that is GREATER THAN OR LESS THAN:
|
|
135
|
+
* { points: { $gt: 2, $lt: 14 } }
|
|
136
|
+
* further tools (syntax matches with $gt):
|
|
137
|
+
* $eq: Matches values that are EQUAL to a specified value.
|
|
138
|
+
* $gte: Matches values that are GREATER THAN or EQUAL to a specified value.
|
|
139
|
+
* $lte: Matches values that are LESS THAN or EQUAL to a specified value.
|
|
140
|
+
* $ne: Matches all values that are NOT EQUAL to a specified value.
|
|
141
|
+
* $nin: Matches NONE of the values specified IN an array.
|
|
142
|
+
*
|
|
101
143
|
* @param page page
|
|
102
144
|
* @param pageSize pageSize
|
|
103
145
|
* @param sort etc. by dateTime: { dateTime: -1 }
|
|
@@ -113,14 +155,67 @@ export declare class DynamoBEDBService<T extends Metadata> {
|
|
|
113
155
|
findByIdAndUpdate(id: string, update: any, modifier: string): Promise<T>;
|
|
114
156
|
/**
|
|
115
157
|
* update one parameter by a specific
|
|
116
|
-
* @param updateBy
|
|
117
|
-
*
|
|
158
|
+
* @param updateBy
|
|
159
|
+
* (always use unique parameters for find!)
|
|
160
|
+
* etc.: by email:
|
|
161
|
+
* { email: email }
|
|
162
|
+
* or by id that is in list:
|
|
163
|
+
* { userIds: { $in: this.userId } }
|
|
164
|
+
* or by number or Date that is GREATER THAN OR LESS THAN:
|
|
165
|
+
* { points: { $gt: 2, $lt: 14 } }
|
|
166
|
+
* further tools (syntax matches with $gt):
|
|
167
|
+
* $eq: Matches values that are EQUAL to a specified value.
|
|
168
|
+
* $gte: Matches values that are GREATER THAN or EQUAL to a specified value.
|
|
169
|
+
* $lte: Matches values that are LESS THAN or EQUAL to a specified value.
|
|
170
|
+
* $ne: Matches all values that are NOT EQUAL to a specified value.
|
|
171
|
+
* $nin: Matches NONE of the values specified IN an array.
|
|
172
|
+
*
|
|
173
|
+
* @param update
|
|
174
|
+
* etc.: increase a specific value:
|
|
175
|
+
* { $inc: { popularity: 15 } }
|
|
176
|
+
* or add element to a list:
|
|
177
|
+
* { $push: { reactions: this.newReaction }
|
|
178
|
+
* or all at once
|
|
179
|
+
* { $inc: { popularity: this.newVote.amount }, emailVerified: true, $push: { reactions: this.newReaction } }
|
|
180
|
+
* further tools (syntax matches with $inc):
|
|
181
|
+
* $currentDate: Sets the value of a field to current date, either as a Date or a Timestamp.
|
|
182
|
+
* $min: Only updates the field if the specified value is less than the existing field value.
|
|
183
|
+
* $max: Only updates the field if the specified value is greater than the existing field value.
|
|
184
|
+
* $mul: Multiplies the value of the field by the specified amount.
|
|
185
|
+
* $rename: Renames a field.
|
|
186
|
+
* $unset: Removes the specified field from a document. (set: "" to value)
|
|
118
187
|
*/
|
|
119
188
|
updateOne(updateBy: any, update: any, modifier: string): Promise<void>;
|
|
120
189
|
/**
|
|
121
190
|
* update one parameter by a specific
|
|
122
|
-
* @param updateBy
|
|
123
|
-
*
|
|
191
|
+
* @param updateBy
|
|
192
|
+
* etc.: by email:
|
|
193
|
+
* { email: email }
|
|
194
|
+
* or by id that is in list:
|
|
195
|
+
* { userIds: { $in: this.userId } }
|
|
196
|
+
* or by number or Date that is GREATER THAN OR LESS THAN:
|
|
197
|
+
* { points: { $gt: 2, $lt: 14 } }
|
|
198
|
+
* further tools (syntax matches with $gt):
|
|
199
|
+
* $eq: Matches values that are EQUAL to a specified value.
|
|
200
|
+
* $gte: Matches values that are GREATER THAN or EQUAL to a specified value.
|
|
201
|
+
* $lte: Matches values that are LESS THAN or EQUAL to a specified value.
|
|
202
|
+
* $ne: Matches all values that are NOT EQUAL to a specified value.
|
|
203
|
+
* $nin: Matches NONE of the values specified IN an array.
|
|
204
|
+
*
|
|
205
|
+
* @param update
|
|
206
|
+
* etc.: increase a specific value:
|
|
207
|
+
* { $inc: { popularity: 15 } }
|
|
208
|
+
* or add element to a list:
|
|
209
|
+
* { $push: { reactions: this.newReaction }
|
|
210
|
+
* or all at once
|
|
211
|
+
* { $inc: { popularity: this.newVote.amount }, emailVerified: true, $push: { reactions: this.newReaction } }
|
|
212
|
+
* further tools (syntax matches with $inc):
|
|
213
|
+
* $currentDate: Sets the value of a field to current date, either as a Date or a Timestamp.
|
|
214
|
+
* $min: Only updates the field if the specified value is less than the existing field value.
|
|
215
|
+
* $max: Only updates the field if the specified value is greater than the existing field value.
|
|
216
|
+
* $mul: Multiplies the value of the field by the specified amount.
|
|
217
|
+
* $rename: Renames a field.
|
|
218
|
+
* $unset: Removes the specified field from a document. (set: "" to value)
|
|
124
219
|
*/
|
|
125
220
|
updateMany(updateBy: any, update: any, modifier: string): Promise<void>;
|
|
126
221
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamobe-db.service.d.ts","sourceRoot":"","sources":["../../src/_services/dynamobe-db.service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAErC,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAA6C,MAAM,uBAAuB,CAAC;AAEhH,qBAAa,iBAAiB,CAAC,CAAC,SAAS,QAAQ;IAYtC,UAAU,EAAE,kBAAkB;IAXvC,SAAS,6DAA4D;IAErE,OAAO,CAAC,WAAW,CAAS;IAE5B;;;;;OAKG;gBAEM,UAAU,EAAE,kBAAkB;IAKvC;;;;OAIG;IACG,UAAU,CAAC,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"dynamobe-db.service.d.ts","sourceRoot":"","sources":["../../src/_services/dynamobe-db.service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAErC,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAA6C,MAAM,uBAAuB,CAAC;AAEhH;;GAEG;AACH,qBAAa,iBAAiB,CAAC,CAAC,SAAS,QAAQ;IAYtC,UAAU,EAAE,kBAAkB;IAXvC,SAAS,6DAA4D;IAErE,OAAO,CAAC,WAAW,CAAS;IAE5B;;;;;OAKG;gBAEM,UAAU,EAAE,kBAAkB;IAKvC;;;;OAIG;IACG,UAAU,CAAC,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IA+BtD;;;;O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