@futdevpro/nts-dynamo 1.5.31 → 1.5.32
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/_modules/usage/usage.service.js +4 -4
- package/lib/_modules/usage/usage.service.js.map +1 -1
- package/lib/_services/dynamo-nts-api.service.js +3 -3
- package/lib/_services/dynamo-nts-api.service.js.map +1 -1
- package/lib/_services/dynamo-nts-auth.service.js +2 -2
- package/lib/_services/dynamo-nts-auth.service.js.map +1 -1
- package/lib/_services/dynamo-nts-data.service.d.ts +3 -3
- package/lib/_services/dynamo-nts-data.service.d.ts.map +1 -1
- package/lib/_services/dynamo-nts-data.service.js +18 -18
- package/lib/_services/dynamo-nts-data.service.js.map +1 -1
- package/lib/_services/dynamo-nts-db.service.d.ts +3 -3
- package/lib/_services/dynamo-nts-db.service.d.ts.map +1 -1
- package/lib/_services/dynamo-nts-db.service.js +25 -25
- package/lib/_services/dynamo-nts-db.service.js.map +1 -1
- package/lib/_services/dynamo-nts-email.service.js +4 -4
- package/lib/_services/dynamo-nts-email.service.js.map +1 -1
- package/lib/_services/dynamo-nts-global.service.d.ts +3 -3
- package/lib/_services/dynamo-nts-global.service.d.ts.map +1 -1
- package/lib/_services/dynamo-nts-global.service.js.map +1 -1
- package/lib/_services/dynamo-nts-routing-module.service.js +3 -3
- package/lib/_services/dynamo-nts-routing-module.service.js.map +1 -1
- package/lib/_services/dynamo-nts-shared.service.d.ts +2 -2
- package/lib/_services/dynamo-nts-shared.service.d.ts.map +1 -1
- package/lib/_services/dynamo-nts-shared.service.js +1 -1
- package/lib/_services/dynamo-nts-shared.service.js.map +1 -1
- package/lib/_services/dynamobe-db.service.js +1 -1
- package/lib/tsconfig.tsbuildinfo +59 -59
- package/package.json +3 -2
- package/src/_modules/usage/usage.service.ts +5 -5
- package/src/_services/dynamo-nts-api.service.ts +4 -4
- package/src/_services/dynamo-nts-auth.service.ts +3 -3
- package/src/_services/dynamo-nts-data.service.ts +22 -22
- package/src/_services/dynamo-nts-db.service.ts +32 -32
- package/src/_services/dynamo-nts-email.service.ts +5 -5
- package/src/_services/dynamo-nts-global.service.ts +4 -4
- package/src/_services/dynamo-nts-routing-module.service.ts +4 -4
- package/src/_services/dynamo-nts-shared.service.ts +2 -2
|
@@ -20,7 +20,7 @@ class UsageService extends dynamo_nts_data_service_1.DynamoNTS_DataService {
|
|
|
20
20
|
/* console.log(`...getLocationDataFromRequest... ip: ${this.data.address}`, this.data.locationData); */
|
|
21
21
|
}
|
|
22
22
|
catch (error) {
|
|
23
|
-
throw new fsm_dynamo_1.
|
|
23
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
24
24
|
status: 417, message: 'getLocationDataFromRequest was unsuccessful',
|
|
25
25
|
userMessage: `We were unable to deep analyze your request.`,
|
|
26
26
|
error
|
|
@@ -65,7 +65,7 @@ class UsageService extends dynamo_nts_data_service_1.DynamoNTS_DataService {
|
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
catch (error) {
|
|
68
|
-
throw new fsm_dynamo_1.
|
|
68
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
69
69
|
status: 417, message: 'getDailyUsage was unsuccessful',
|
|
70
70
|
userMessage: `We've failed to collect last week's usage data.`,
|
|
71
71
|
error
|
|
@@ -89,7 +89,7 @@ class UsageService extends dynamo_nts_data_service_1.DynamoNTS_DataService {
|
|
|
89
89
|
yield this.saveData();
|
|
90
90
|
}
|
|
91
91
|
catch (error) {
|
|
92
|
-
throw new fsm_dynamo_1.
|
|
92
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
93
93
|
status: 417, message: 'updateSessionData was unsuccessful',
|
|
94
94
|
userMessage: `The attempt to update Usage Data was unsuccessful.`,
|
|
95
95
|
error
|
|
@@ -112,7 +112,7 @@ class UsageService extends dynamo_nts_data_service_1.DynamoNTS_DataService {
|
|
|
112
112
|
yield this.saveData();
|
|
113
113
|
}
|
|
114
114
|
catch (error) {
|
|
115
|
-
throw new fsm_dynamo_1.
|
|
115
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
116
116
|
status: 417, message: 'closeSession was unsuccessful',
|
|
117
117
|
userMessage: `The attempt to close Usage Session was unsuccessful.`,
|
|
118
118
|
error
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usage.service.js","sourceRoot":"","sources":["../../../src/_modules/usage/usage.service.ts"],"names":[],"mappings":";;;;AAEA,
|
|
1
|
+
{"version":3,"file":"usage.service.js","sourceRoot":"","sources":["../../../src/_modules/usage/usage.service.ts"],"names":[],"mappings":";;;;AAEA,sDAAwD;AACxD,qEAC6D;AAE7D,qFAAgF;AAChF,yFAA6E;AAE7E,MAAa,YAAa,SAAQ,+CAAyC;IAIzE,YACE,GAIC;QAED,KAAK,CACH,IAAI,iCAAkB,CAAC,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,YAAY,CAAC,EACzC,sCAAuB,EACvB,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,MAAM,CACZ,CAAC;QAdJ,cAAS,GAAsB,EAAE,CAAC;QAClC,yBAAoB,GAAqB,EAAE,CAAC;QAc1C,IAAI,CAAC,SAAS,GAAG,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,SAAS,EAAC,CAAC,CAAC,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IACxD,CAAC;IAED,0BAA0B,CAAC,GAAY;QACrC,IAAI;YACF,IAAI,CAAC,IAAI,CAAC,OAAO,GAAG,4CAAgB,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;YAC3D,IAAI,CAAC,IAAI,CAAC,YAAY,GAAG,4CAAgB,CAAC,wBAAwB,CAAC,GAAG,CAAC,CAAC;YAExE,uGAAuG;SACxG;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,IAAI,4BAAe,CAAC;gBACxB,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,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AAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAkB,EAAE,CAAkB,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;gBAC5F,IAAI,CAAC,IAAI,CAAC,gBAAgB,GAAG,mBAAmB,CAAC;gBACjD,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;aACvB;YAAC,OAAO,KAAK,EAAE;gBACd,MAAM,IAAI,4BAAe,CAAC;oBACxB,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,+BAA+B;oBACrD,WAAW,EAAE,sDAAsD;oBACnE,KAAK;iBACN,CAAC,CAAC;aACJ;QACH,CAAC;KAAA;CACF;AAhID,oCAgIC"}
|
|
@@ -138,18 +138,18 @@ class DynamoNTS_ApiService {
|
|
|
138
138
|
}
|
|
139
139
|
if (((_d = (_c = error === null || error === void 0 ? void 0 : error.response) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.flag) === 'DYNAMO-BE ERROR OBJECT') {
|
|
140
140
|
dynamo_nts_shared_service_1.DynamoNTS_Shared.logError(`\n${callParams.name} was UNSUCCESSFUL\n\n`, new Error());
|
|
141
|
-
throw new fsm_dynamo_1.
|
|
141
|
+
throw new fsm_dynamo_1.DynamoNTS_Error(error.response.data);
|
|
142
142
|
}
|
|
143
143
|
else if (error.code === 'ENOTFOUND') {
|
|
144
144
|
dynamo_nts_shared_service_1.DynamoNTS_Shared.logError(`\n${callParams.name} was UNSUCCESSFUL\n\n`, new Error());
|
|
145
|
-
throw new fsm_dynamo_1.
|
|
145
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
146
146
|
status: 404, message: 'DNS error; address cannot be resolved!',
|
|
147
147
|
userMessage: `We encountered a BackEnd API Error, please contact the responsible development team. errorcode: 965-453-300`,
|
|
148
148
|
error: error
|
|
149
149
|
});
|
|
150
150
|
}
|
|
151
151
|
else if (error.config && error.message) {
|
|
152
|
-
throw new fsm_dynamo_1.
|
|
152
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
153
153
|
status: +error.message.substring(error.message.length - 4, 3),
|
|
154
154
|
userMessage: `We encountered a BackEnd API Error, please contact the responsible development team. errorcode: 965-453-303`,
|
|
155
155
|
error: error
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamo-nts-api.service.js","sourceRoot":"","sources":["../../src/_services/dynamo-nts-api.service.ts"],"names":[],"mappings":";;;;AACA,qDAA+B;AAC/B,
|
|
1
|
+
{"version":3,"file":"dynamo-nts-api.service.js","sourceRoot":"","sources":["../../src/_services/dynamo-nts-api.service.ts"],"names":[],"mappings":";;;;AACA,qDAA+B;AAC/B,sDAAwD;AAExD,4EAAkE;AAClE,oFAA0E;AAE1E,2EAA+D;AAE/D;;GAEG;AACH,MAAa,oBAAoB;IAE7B;;;;;OAKG;IACE,MAAM,CAAO,YAAY,CAC9B,UAAmC,EACnC,WAMC;;;YAED,IAAI;gBACA,IAAI,CAAM,CAAC;gBACX,IAAI,GAAG,GAAW,UAAU,CAAC,OAAO,GAAG,UAAU,CAAC,QAAQ,CAAC;gBAC3D,MAAM,oBAAoB,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;gBAEpD,UAAI,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,WAAW,0CAAE,OAAO,EAAE;oBAClC,KAAK,MAAM,SAAS,IAAI,UAAU,CAAC,WAAW,CAAC,OAAO,EAAE;wBACpD,IAAI,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;4BAC3C,oBAAoB,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;yBACvG;6BAAM;4BACH,4CAAgB,CAAC,QAAQ,CAAC,oCAAoC,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,KAAK,EAAE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,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;iBAClD;qBAAM,IAAI,KAAK,CAAC,IAAI,KAAK,WAAW,EAAE;oBACnC,4CAAgB,CAAC,QAAQ,CAAC,KAAK,UAAU,CAAC,IAAI,uBAAuB,EAAE,IAAI,KAAK,EAAE,CAAC,CAAC;oBACpF,MAAM,IAAI,4BAAe,CAAC;wBACtB,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,wCAAwC;wBAC9D,WAAW,EAAE,6GAA6G;wBAC1H,KAAK,EAAE,KAAK;qBACf,CAAC,CAAC;iBACN;qBAAM,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,OAAO,EAAE;oBACtC,MAAM,IAAI,4BAAe,CAAC;wBACtB,MAAM,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,CAAC;wBAC7D,WAAW,EAAE,6GAA6G;wBAC1H,KAAK,EAAE,KAAK;qBACf,CAAC,CAAC;iBACN;qBAAM;oBACH,4CAAgB,CAAC,QAAQ,CAAC,KAAK,UAAU,CAAC,IAAI,mBAAmB,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,KAAK,EAAE,CAAC,CAAC;oBAC/F,MAAM,KAAK,CAAC;iBACf;aACJ;;KACF;CACF;AA3JD,oDA2JC"}
|
|
@@ -27,14 +27,14 @@ class DynamoNTS_AuthService extends dynamo_nts_singleton_service_1.DynamoNTS_Sin
|
|
|
27
27
|
static getTokenFromRequest(req) {
|
|
28
28
|
const authHeader = req.headers['authorization'];
|
|
29
29
|
if (!authHeader) {
|
|
30
|
-
throw new fsm_dynamo_1.
|
|
30
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
31
31
|
message: 'AuthHeader missing!',
|
|
32
32
|
userMessage: `We encountered a BackEnd Auth Error, please contact the responsible development team. errorcode: 007-636-500`,
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
const token = authHeader.split(' ')[1];
|
|
36
36
|
if (!token) {
|
|
37
|
-
throw new fsm_dynamo_1.
|
|
37
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
38
38
|
message: 'Token missing!',
|
|
39
39
|
userMessage: `We encountered a BackEnd Auth Error, please contact the responsible development team. errorcode: 007-636-501`,
|
|
40
40
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamo-nts-auth.service.js","sourceRoot":"","sources":["../../src/_services/dynamo-nts-auth.service.ts"],"names":[],"mappings":";;;AAEA,
|
|
1
|
+
{"version":3,"file":"dynamo-nts-auth.service.js","sourceRoot":"","sources":["../../src/_services/dynamo-nts-auth.service.ts"],"names":[],"mappings":";;;AAEA,sDAAwD;AAExD,iFAA4E;AAE5E;;;;;;;;;;;;GAYG;AACH,MAAsB,qBAAsB,SAAQ,yDAA0B;IAE5E;;;;;;OAMG;IACH,MAAM,CAAC,mBAAmB,CAAC,GAAY;QACrC,MAAM,UAAU,GAAG,GAAG,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;QAChD,IAAI,CAAC,UAAU,EAAE;YACf,MAAM,IAAI,4BAAe,CAAC;gBACxB,OAAO,EAAE,qBAAqB;gBAC9B,WAAW,EAAE,8GAA8G;aAC5H,CAAC,CAAC;SACJ;QACD,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QACvC,IAAI,CAAC,KAAK,EAAE;YACV,MAAM,IAAI,4BAAe,CAAC;gBACxB,OAAO,EAAE,gBAAgB;gBACzB,WAAW,EAAE,8GAA8G;aAC5H,CAAC,CAAC;SACJ;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CAgCF;AAzDD,sDAyDC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Metadata,
|
|
1
|
+
import { Metadata, DynamoNTS_DataParams } from '@futdevpro/fsm-dynamo';
|
|
2
2
|
import { DynamoNTS_DBService } from './dynamo-nts-db.service';
|
|
3
3
|
export declare class DynamoNTS_DataService<T extends Metadata> {
|
|
4
4
|
dataDBService: DynamoNTS_DBService<T>;
|
|
@@ -7,8 +7,8 @@ export declare class DynamoNTS_DataService<T extends Metadata> {
|
|
|
7
7
|
issuer?: string;
|
|
8
8
|
depKey?: string;
|
|
9
9
|
depDBServiceKey?: string;
|
|
10
|
-
dataParams:
|
|
11
|
-
constructor(data: T, dataParams:
|
|
10
|
+
dataParams: DynamoNTS_DataParams;
|
|
11
|
+
constructor(data: T, dataParams: DynamoNTS_DataParams, issuer?: string);
|
|
12
12
|
/**
|
|
13
13
|
* returns all data from database to service dataList
|
|
14
14
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamo-nts-data.service.d.ts","sourceRoot":"","sources":["../../src/_services/dynamo-nts-data.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"dynamo-nts-data.service.d.ts","sourceRoot":"","sources":["../../src/_services/dynamo-nts-data.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAiD,MAAM,uBAAuB,CAAC;AAEtH,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAG9D,qBAAa,qBAAqB,CAAC,CAAC,SAAS,QAAQ;IACnD,aAAa,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC;IACtC,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,oBAAoB,CAAC;gBAG/B,IAAI,EAAE,CAAC,EACP,UAAU,EAAE,oBAAoB,EAChC,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;IA2BtE;;;OAGG;IACG,qBAAqB,CAAC,YAAY,CAAC,EAAE,MAAM,EAAE,gBAAgB,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC;IAmC1F;;;OAGG;IACG,yBAAyB,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA8BrE;;;;OAIG;IACG,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAwD/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,mBAAmB,CAAC,GAAG,CAAC;CAWvD"}
|
|
@@ -25,7 +25,7 @@ class DynamoNTS_DataService {
|
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
catch (error) {
|
|
28
|
-
throw new fsm_dynamo_1.
|
|
28
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
29
29
|
status: 417, message: 'getAll was unsuccessful',
|
|
30
30
|
userMessage: `We encountered a DB Error, please contact the responsible development team. errorcode: 744-234-130`,
|
|
31
31
|
error: error
|
|
@@ -50,7 +50,7 @@ class DynamoNTS_DataService {
|
|
|
50
50
|
return dataExists;
|
|
51
51
|
}
|
|
52
52
|
else {
|
|
53
|
-
throw new fsm_dynamo_1.
|
|
53
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
54
54
|
status: 417, message: `ID is missing! (maybe you wanted to use getDataByDependencyId instead...)`,
|
|
55
55
|
userMessage: `We encountered a DB Error, please contact the responsible development team. errorcode: 744-234-131B`,
|
|
56
56
|
error: new Error()
|
|
@@ -58,7 +58,7 @@ class DynamoNTS_DataService {
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
catch (error) {
|
|
61
|
-
throw new fsm_dynamo_1.
|
|
61
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
62
62
|
status: 417, message: 'getDataById was unsuccessful',
|
|
63
63
|
userMessage: `We encountered a DB Error, please contact the responsible development team. errorcode: 744-234-131A`,
|
|
64
64
|
error: error
|
|
@@ -85,7 +85,7 @@ class DynamoNTS_DataService {
|
|
|
85
85
|
return dataExists;
|
|
86
86
|
}
|
|
87
87
|
else {
|
|
88
|
-
throw new fsm_dynamo_1.
|
|
88
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
89
89
|
status: 417, message: `${this.depKey} is missing!`,
|
|
90
90
|
userMessage: `We encountered a DB Error, please contact the responsible development team. errorcode: 744-234-132C`,
|
|
91
91
|
error: new Error()
|
|
@@ -93,7 +93,7 @@ class DynamoNTS_DataService {
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
else {
|
|
96
|
-
throw new fsm_dynamo_1.
|
|
96
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
97
97
|
status: 417, message: 'dependencyDataIdKey is missing from service!',
|
|
98
98
|
userMessage: `We encountered a DB Error, please contact the responsible development team. errorcode: 744-234-132B`,
|
|
99
99
|
error: new Error()
|
|
@@ -101,7 +101,7 @@ class DynamoNTS_DataService {
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
catch (error) {
|
|
104
|
-
throw new fsm_dynamo_1.
|
|
104
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
105
105
|
status: 417, message: 'getDataByDependencyId was unsuccessful',
|
|
106
106
|
userMessage: `We encountered a DB Error, please contact the responsible development team. errorcode: 744-234-132A`,
|
|
107
107
|
error: error
|
|
@@ -123,7 +123,7 @@ class DynamoNTS_DataService {
|
|
|
123
123
|
});
|
|
124
124
|
}
|
|
125
125
|
else {
|
|
126
|
-
throw new fsm_dynamo_1.
|
|
126
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
127
127
|
status: 417, message: `${this.depKey} is missing!`,
|
|
128
128
|
userMessage: `We encountered a DB Error, please contact the responsible development team. errorcode: 744-234-133C`,
|
|
129
129
|
error: new Error()
|
|
@@ -131,7 +131,7 @@ class DynamoNTS_DataService {
|
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
else {
|
|
134
|
-
throw new fsm_dynamo_1.
|
|
134
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
135
135
|
status: 417, message: 'dependencyDataIdKey is missing from service!',
|
|
136
136
|
userMessage: `We encountered a DB Error, please contact the responsible development team. errorcode: 744-234-133B`,
|
|
137
137
|
error: new Error()
|
|
@@ -139,7 +139,7 @@ class DynamoNTS_DataService {
|
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
catch (error) {
|
|
142
|
-
throw new fsm_dynamo_1.
|
|
142
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({ status: 417,
|
|
143
143
|
message: 'getDataListByDependencyId was unsuccessful',
|
|
144
144
|
userMessage: `We encountered a DB Error, please contact the responsible development team. errorcode: 744-234-133A`,
|
|
145
145
|
error: error
|
|
@@ -170,7 +170,7 @@ class DynamoNTS_DataService {
|
|
|
170
170
|
dependencyExists = !!dep;
|
|
171
171
|
});
|
|
172
172
|
if (!dependencyExists) {
|
|
173
|
-
throw new fsm_dynamo_1.
|
|
173
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({ status: 417,
|
|
174
174
|
message: `saveData was unsuccessful: dependency data not exists (key: ${this.depKey}, id: ${this.data[this.depKey]})`,
|
|
175
175
|
userMessage: `We encountered a DB Error, please contact the responsible development team. errorcode: 744-234-333A`,
|
|
176
176
|
error: new Error()
|
|
@@ -178,7 +178,7 @@ class DynamoNTS_DataService {
|
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
else {
|
|
181
|
-
throw new fsm_dynamo_1.
|
|
181
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({ status: 417,
|
|
182
182
|
message: `saveData was unsuccessful: dependency data id missing from data (key: ${this.depKey})`,
|
|
183
183
|
userMessage: `We encountered a DB Error, please contact the responsible development team. errorcode: 744-234-333B`,
|
|
184
184
|
error: new Error()
|
|
@@ -205,7 +205,7 @@ class DynamoNTS_DataService {
|
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
207
|
catch (error) {
|
|
208
|
-
throw new fsm_dynamo_1.
|
|
208
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
209
209
|
status: 417, message: `modifyData was unsuccessful (${this.dataParams.dataName})`,
|
|
210
210
|
userMessage: `We encountered a DB Error, please contact the responsible development team. errorcode: 744-234-222`,
|
|
211
211
|
error: error
|
|
@@ -223,11 +223,11 @@ class DynamoNTS_DataService {
|
|
|
223
223
|
yield this.dataDBService.deleteDataById(this.data._id);
|
|
224
224
|
}
|
|
225
225
|
else {
|
|
226
|
-
throw new fsm_dynamo_1.
|
|
226
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({ status: 417, message: 'ID is missing!' });
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
229
|
catch (error) {
|
|
230
|
-
throw new fsm_dynamo_1.
|
|
230
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
231
231
|
status: 417, message: 'deleteData was unsuccessful',
|
|
232
232
|
userMessage: `We encountered a DB Error, please contact the responsible development team. errorcode: 744-234-223`,
|
|
233
233
|
error: error
|
|
@@ -245,11 +245,11 @@ class DynamoNTS_DataService {
|
|
|
245
245
|
// basic required validations
|
|
246
246
|
if ((this.dataParams.modelParams[i].required && (this.data[this.dataParams.modelParams[i].key] === null || this.data[this.dataParams.modelParams[i].key] === undefined)) ||
|
|
247
247
|
(this.dataParams.modelParams[i].index && (this.data[this.dataParams.modelParams[i].key] === null || this.data[this.dataParams.modelParams[i].key] === undefined))) {
|
|
248
|
-
throw new fsm_dynamo_1.
|
|
248
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({ status: 422, message: `${this.dataParams.modelParams[i].key} is missing! (${this.dataParams.modelParams[i].required ? 'required' : 'index'})` });
|
|
249
249
|
}
|
|
250
250
|
// specific Date validation
|
|
251
251
|
if (this.dataParams.modelParams[i].type === 'Date' && !(new Date(this.data[this.dataParams.modelParams[i].key]) instanceof Date)) {
|
|
252
|
-
throw new fsm_dynamo_1.
|
|
252
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({ status: 422, message: `${this.dataParams.modelParams[i].key} is not a date!` });
|
|
253
253
|
}
|
|
254
254
|
// call additional validators
|
|
255
255
|
if (this.dataParams.modelParams[i].additionalValidators) {
|
|
@@ -260,7 +260,7 @@ class DynamoNTS_DataService {
|
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
262
|
catch (error) {
|
|
263
|
-
throw new fsm_dynamo_1.
|
|
263
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
264
264
|
status: 422, message: 'validateForSave was unsuccessful',
|
|
265
265
|
userMessage: `We encountered a DB Error, please contact the responsible development team. errorcode: 744-234-220`,
|
|
266
266
|
error: error
|
|
@@ -289,7 +289,7 @@ class DynamoNTS_DataService {
|
|
|
289
289
|
return dynamo_nts_global_service_1.DynamoNTS_GlobalService.getDBService(this.dataParams);
|
|
290
290
|
}
|
|
291
291
|
else {
|
|
292
|
-
throw new fsm_dynamo_1.
|
|
292
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
293
293
|
status: 501, message: 'getDependencyDataDBService was unsuccessful, service key not setted up!',
|
|
294
294
|
userMessage: `We encountered a DB Error, please contact the responsible development team. errorcode: 744-234-200`,
|
|
295
295
|
error: new Error()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamo-nts-data.service.js","sourceRoot":"","sources":["../../src/_services/dynamo-nts-data.service.ts"],"names":[],"mappings":";;;;AACA,
|
|
1
|
+
{"version":3,"file":"dynamo-nts-data.service.js","sourceRoot":"","sources":["../../src/_services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AAC;yBACvG;qBACF;iBACF;aACF;YAAC,OAAO,KAAK,EAAE;gBACd,MAAM,IAAI,4BAAe,CAAC;oBACxB,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,kCAAkC;oBACxD,WAAW,EAAE,oGAAoG;oBACjH,KAAK,EAAE,KAAK;iBACb,CAAC,CAAC;aACJ;QACH,CAAC;KAAA;IAED;;OAEG;IACK,6BAA6B;QACnC,MAAM,eAAe,GAAiC,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,WAAyC,EAAE,EAAE,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC;QACpK,IAAI,eAAe,EAAE;YACnB,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,mDAAuB,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;SAC9D;aAAM;YACL,MAAM,IAAI,4BAAe,CAAC;gBACxB,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,yEAAyE;gBAC/F,WAAW,EAAE,oGAAoG;gBACjH,KAAK,EAAE,IAAI,KAAK,EAAE;aACnB,CAAC,CAAC;SACJ;IACH,CAAC;CACF;AA5RD,sDA4RC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as mongoose from 'mongoose';
|
|
2
|
-
import { Metadata,
|
|
2
|
+
import { Metadata, DynamoNTS_DataParams } from '@futdevpro/fsm-dynamo';
|
|
3
3
|
/**
|
|
4
4
|
*
|
|
5
5
|
*/
|
|
6
6
|
export declare class DynamoNTS_DBService<T extends Metadata> {
|
|
7
|
-
dataParams:
|
|
7
|
+
dataParams: DynamoNTS_DataParams;
|
|
8
8
|
dataModel: mongoose.Model<mongoose.Document<any, any, any>, any, any>;
|
|
9
9
|
private depDataName;
|
|
10
10
|
/**
|
|
@@ -13,7 +13,7 @@ export declare class DynamoNTS_DBService<T extends Metadata> {
|
|
|
13
13
|
* @param schemaSettings additional settings for specific parameters as unique, required, minlength or maxlength
|
|
14
14
|
* schemaSettings also MUST contain specific types that differs from the listed above (Array, Date)
|
|
15
15
|
*/
|
|
16
|
-
constructor(dataParams:
|
|
16
|
+
constructor(dataParams: DynamoNTS_DataParams);
|
|
17
17
|
/**
|
|
18
18
|
* save new data
|
|
19
19
|
* @param data data
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamo-nts-db.service.d.ts","sourceRoot":"","sources":["../../src/_services/dynamo-nts-db.service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAErC,OAAO,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"dynamo-nts-db.service.d.ts","sourceRoot":"","sources":["../../src/_services/dynamo-nts-db.service.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAErC,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAiD,MAAM,uBAAuB,CAAC;AAEtH;;GAEG;AACH,qBAAa,mBAAmB,CAAC,CAAC,SAAS,QAAQ;IAYxC,UAAU,EAAE,oBAAoB;IAXzC,SAAS,6DAA4D;IAErE,OAAO,CAAC,WAAW,CAAS;IAE5B;;;;;OAKG;gBAEM,UAAU,EAAE,oBAAoB;IAKzC;;;;OAIG;IACG,UAAU,CAAC,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IAgCtD;;;;OAIG;IACG,UAAU,CAAC,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IA0BvD;;;;OAIG;IACG,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,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;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACG,SAAS,CAAC,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAY5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACG,UAAU,CAAC,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAiB7E;;;OAGG;IACH,OAAO,CAAC,SAAS;IAWjB;;;;OAIG;IACH,OAAO,CAAC,gCAAgC;IAiCxC,OAAO,CAAC,SAAS;IAuBjB;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;IAQ3B;;OAEG;IACH,OAAO,CAAC,6BAA6B;CAOtC"}
|
|
@@ -38,14 +38,14 @@ class DynamoNTS_DBService {
|
|
|
38
38
|
newData = res.toObject();
|
|
39
39
|
}
|
|
40
40
|
else {
|
|
41
|
-
throw new fsm_dynamo_1.
|
|
41
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
42
42
|
status: 204, message: `${this.dataParams.dbName} not found! (BD)`,
|
|
43
43
|
userMessage: `We encountered an uncought DB Error, please contact the responsible development team. errorcode: 505-223-401`,
|
|
44
44
|
error: new Error()
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
}).catch(error => {
|
|
48
|
-
throw new fsm_dynamo_1.
|
|
48
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
49
49
|
status: 422, message: `Create new ${this.dataParams.dbName} was unsuccessful (BD)`,
|
|
50
50
|
userMessage: `We encountered an uncought DB Error, please contact the responsible development team. errorcode: 505-223-400`,
|
|
51
51
|
error
|
|
@@ -75,14 +75,14 @@ class DynamoNTS_DBService {
|
|
|
75
75
|
newData = res.toObject();
|
|
76
76
|
}
|
|
77
77
|
else {
|
|
78
|
-
throw new fsm_dynamo_1.
|
|
78
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
79
79
|
status: 204, message: `${this.dataParams.dbName} not found! (BD)`,
|
|
80
80
|
userMessage: `We encountered an uncought DB Error, please contact the responsible development team. errorcode: 505-223-411`,
|
|
81
81
|
error: new Error()
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
84
|
}).catch(error => {
|
|
85
|
-
throw new fsm_dynamo_1.
|
|
85
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
86
86
|
status: 417, message: `modify ${this.dataParams.dbName} was unsuccessful (DB)`,
|
|
87
87
|
userMessage: `We encountered an uncought DB Error, please contact the responsible development team. errorcode: 505-223-410`,
|
|
88
88
|
error
|
|
@@ -108,7 +108,7 @@ class DynamoNTS_DBService {
|
|
|
108
108
|
data = null;
|
|
109
109
|
}
|
|
110
110
|
}).catch(error => {
|
|
111
|
-
throw new fsm_dynamo_1.
|
|
111
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
112
112
|
status: 417, message: `get ${this.dataParams.dbName} by ID was unsuccessful (DB)`,
|
|
113
113
|
userMessage: `We encountered an uncought DB Error, please contact the responsible development team. errorcode: 505-223-430`,
|
|
114
114
|
error
|
|
@@ -137,7 +137,7 @@ class DynamoNTS_DBService {
|
|
|
137
137
|
data = null;
|
|
138
138
|
}
|
|
139
139
|
}).catch(error => {
|
|
140
|
-
throw new fsm_dynamo_1.
|
|
140
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
141
141
|
status: 417, message: `get ${this.dataParams.dbName} by ${this.depDataName} was unsuccessful (DB)`,
|
|
142
142
|
userMessage: `We encountered an uncought DB Error, please contact the responsible development team. errorcode: 505-223-441`,
|
|
143
143
|
error
|
|
@@ -149,7 +149,7 @@ class DynamoNTS_DBService {
|
|
|
149
149
|
return data;
|
|
150
150
|
}
|
|
151
151
|
else {
|
|
152
|
-
throw new fsm_dynamo_1.
|
|
152
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
153
153
|
status: 501, message: `dependencyDataIdKey not setted up for this db-service (${this.dataParams.dbName}) (BD)`,
|
|
154
154
|
userMessage: `We encountered an uncought DB Error, please contact the responsible development team. errorcode: 505-223-440`,
|
|
155
155
|
error: new Error()
|
|
@@ -171,7 +171,7 @@ class DynamoNTS_DBService {
|
|
|
171
171
|
dataList = res;
|
|
172
172
|
}
|
|
173
173
|
}).catch(error => {
|
|
174
|
-
throw new fsm_dynamo_1.
|
|
174
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
175
175
|
status: 417, message: `get ${this.dataParams.dbName} by ${this.depDataName} was unsuccessful (DB)`,
|
|
176
176
|
userMessage: `We encountered an uncought DB Error, please contact the responsible development team. errorcode: 505-223-451`,
|
|
177
177
|
error
|
|
@@ -185,7 +185,7 @@ class DynamoNTS_DBService {
|
|
|
185
185
|
return dataList;
|
|
186
186
|
}
|
|
187
187
|
else {
|
|
188
|
-
throw new fsm_dynamo_1.
|
|
188
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
189
189
|
status: 501, message: `dependencyDataIdKey not setted up for this db-service (${this.dataParams.dbName}) (BD)`,
|
|
190
190
|
userMessage: `We encountered an uncought DB Error, please contact the responsible development team. errorcode: 505-223-450`,
|
|
191
191
|
error: new Error()
|
|
@@ -207,7 +207,7 @@ class DynamoNTS_DBService {
|
|
|
207
207
|
dataList = res;
|
|
208
208
|
}
|
|
209
209
|
}).catch(error => {
|
|
210
|
-
throw new fsm_dynamo_1.
|
|
210
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
211
211
|
status: 417, message: `get ${this.dataParams.dbName}s by ${this.depDataName}s was unsuccessful (DB)`,
|
|
212
212
|
userMessage: `We encountered an uncought DB Error, please contact the responsible development team. errorcode: 505-223-461`,
|
|
213
213
|
error
|
|
@@ -216,7 +216,7 @@ class DynamoNTS_DBService {
|
|
|
216
216
|
return dataList;
|
|
217
217
|
}
|
|
218
218
|
else {
|
|
219
|
-
throw new fsm_dynamo_1.
|
|
219
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
220
220
|
status: 501, message: `dependencyDataIdKey not setted up for this db-service (${this.dataParams.dbName}) (BD)`,
|
|
221
221
|
userMessage: `We encountered an uncought DB Error, please contact the responsible development team. errorcode: 505-223-460`,
|
|
222
222
|
error: new Error()
|
|
@@ -239,7 +239,7 @@ class DynamoNTS_DBService {
|
|
|
239
239
|
filter[this.depDataName] = { $in: narrowByDependencyIds };
|
|
240
240
|
}
|
|
241
241
|
else {
|
|
242
|
-
throw new fsm_dynamo_1.
|
|
242
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
243
243
|
status: 501, message: `dependencyDataIdKey not setted up for this db-service (${this.dataParams.dbName}) (BD)`,
|
|
244
244
|
userMessage: `We encountered an uncought DB Error, please contact the responsible development team. errorcode: 505-223-470`,
|
|
245
245
|
error: new Error()
|
|
@@ -292,7 +292,7 @@ class DynamoNTS_DBService {
|
|
|
292
292
|
dataList = res;
|
|
293
293
|
}
|
|
294
294
|
}).catch(error => {
|
|
295
|
-
throw new fsm_dynamo_1.
|
|
295
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
296
296
|
status: 417, message: `search ${this.dataParams.dbName} was unsuccessful (DB)`,
|
|
297
297
|
userMessage: `We encountered an uncought DB Error, please contact the responsible development team. errorcode: 505-223-471`,
|
|
298
298
|
error
|
|
@@ -326,7 +326,7 @@ class DynamoNTS_DBService {
|
|
|
326
326
|
data = null;
|
|
327
327
|
}
|
|
328
328
|
}).catch(error => {
|
|
329
|
-
throw new
|
|
329
|
+
throw new DynamoNTS_Error({ status: 417, message: `find ${this.dataParams.dbName} was unsuccessful (DB)`, error });
|
|
330
330
|
});
|
|
331
331
|
if (data && typeof data._id === 'object') {
|
|
332
332
|
data._id = `${data._id}`;
|
|
@@ -345,7 +345,7 @@ class DynamoNTS_DBService {
|
|
|
345
345
|
dataList = res;
|
|
346
346
|
}
|
|
347
347
|
}).catch(error => {
|
|
348
|
-
throw new fsm_dynamo_1.
|
|
348
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
349
349
|
status: 417, message: `get all ${this.dataParams.dbName} was unsuccessful (DB)`,
|
|
350
350
|
userMessage: `We encountered an uncought DB Error, please contact the responsible development team. errorcode: 505-223-480`,
|
|
351
351
|
error
|
|
@@ -366,7 +366,7 @@ class DynamoNTS_DBService {
|
|
|
366
366
|
deleteDataById(id) {
|
|
367
367
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
368
368
|
yield this.dataModel.findByIdAndDelete(id).catch(error => {
|
|
369
|
-
throw new fsm_dynamo_1.
|
|
369
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
370
370
|
status: 417, message: `delete ${this.dataParams.dbName} was unsuccessful (DB)`,
|
|
371
371
|
userMessage: `We encountered an uncought DB Error, please contact the responsible development team. errorcode: 505-223-490`,
|
|
372
372
|
error
|
|
@@ -382,7 +382,7 @@ class DynamoNTS_DBService {
|
|
|
382
382
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
383
383
|
if (this.depDataName) {
|
|
384
384
|
yield this.dataModel.deleteMany({ [this.depDataName]: dependencyId }).catch(error => {
|
|
385
|
-
throw new fsm_dynamo_1.
|
|
385
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
386
386
|
status: 417, message: `delete ${this.dataParams.dbName} by ${this.depDataName} was unsuccessful (DB)`,
|
|
387
387
|
userMessage: `We encountered an uncought DB Error, please contact the responsible development team. errorcode: 505-223-591`,
|
|
388
388
|
error
|
|
@@ -390,7 +390,7 @@ class DynamoNTS_DBService {
|
|
|
390
390
|
});
|
|
391
391
|
}
|
|
392
392
|
else {
|
|
393
|
-
throw new fsm_dynamo_1.
|
|
393
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
394
394
|
status: 501, message: `dependencyDataIdKey not setted up for this db-service (${this.dataParams.dbName}) (BD)`,
|
|
395
395
|
userMessage: `We encountered an uncought DB Error, please contact the responsible development team. errorcode: 505-223-590`,
|
|
396
396
|
error: new Error()
|
|
@@ -432,7 +432,7 @@ class DynamoNTS_DBService {
|
|
|
432
432
|
data = null;
|
|
433
433
|
}
|
|
434
434
|
}).catch(error => {
|
|
435
|
-
throw new fsm_dynamo_1.
|
|
435
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
436
436
|
status: 417, message: `findOne ${this.dataParams.dbName} was unsuccessful (DB)`,
|
|
437
437
|
userMessage: `We encountered an uncought DB Error, please contact the responsible development team. errorcode: 505-223-510`,
|
|
438
438
|
error
|
|
@@ -470,7 +470,7 @@ class DynamoNTS_DBService {
|
|
|
470
470
|
dataList = res;
|
|
471
471
|
}
|
|
472
472
|
}).catch(error => {
|
|
473
|
-
throw new fsm_dynamo_1.
|
|
473
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
474
474
|
status: 417, message: `find ${this.dataParams.dbName} was unsuccessful (DB)`,
|
|
475
475
|
userMessage: `We encountered an uncought DB Error, please contact the responsible development team. errorcode: 505-223-520`,
|
|
476
476
|
error
|
|
@@ -517,7 +517,7 @@ class DynamoNTS_DBService {
|
|
|
517
517
|
dataList = res;
|
|
518
518
|
}
|
|
519
519
|
}).catch(error => {
|
|
520
|
-
throw new fsm_dynamo_1.
|
|
520
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
521
521
|
status: 417, message: `findWithPaging ${this.dataParams.dbName} was unsuccessful (DB)`,
|
|
522
522
|
userMessage: `We encountered an uncought DB Error, please contact the responsible development team. errorcode: 505-223-530`,
|
|
523
523
|
error
|
|
@@ -547,14 +547,14 @@ class DynamoNTS_DBService {
|
|
|
547
547
|
data = res.toObject();
|
|
548
548
|
}
|
|
549
549
|
else {
|
|
550
|
-
throw new fsm_dynamo_1.
|
|
550
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
551
551
|
status: 204, message: `${this.dataParams.dbName} not found! (BD)`,
|
|
552
552
|
userMessage: `We encountered an uncought DB Error, please contact the responsible development team. errorcode: 505-223-541`,
|
|
553
553
|
error: new Error()
|
|
554
554
|
});
|
|
555
555
|
}
|
|
556
556
|
}).catch(error => {
|
|
557
|
-
throw new fsm_dynamo_1.
|
|
557
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
558
558
|
status: 417, message: `findByIdAndUpdate ${this.dataParams.dbName} was unsuccessful (DB)`,
|
|
559
559
|
userMessage: `We encountered an uncought DB Error, please contact the responsible development team. errorcode: 505-223-540`,
|
|
560
560
|
error
|
|
@@ -601,7 +601,7 @@ class DynamoNTS_DBService {
|
|
|
601
601
|
update.__lastModified = new Date();
|
|
602
602
|
update.__lastModifiedBy = modifier;
|
|
603
603
|
yield this.dataModel.updateOne(updateBy, update).catch(error => {
|
|
604
|
-
throw new fsm_dynamo_1.
|
|
604
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
605
605
|
status: 417, message: `updateOne ${this.dataParams.dbName} was unsuccessful (DB)`,
|
|
606
606
|
userMessage: `We encountered an uncought DB Error, please contact the responsible development team. errorcode: 505-223-550`,
|
|
607
607
|
error
|
|
@@ -645,7 +645,7 @@ class DynamoNTS_DBService {
|
|
|
645
645
|
update.__lastModified = new Date();
|
|
646
646
|
update.__lastModifiedBy = modifier;
|
|
647
647
|
yield this.dataModel.updateMany(updateBy, update).catch(error => {
|
|
648
|
-
throw new fsm_dynamo_1.
|
|
648
|
+
throw new fsm_dynamo_1.DynamoNTS_Error({
|
|
649
649
|
status: 417, message: `updateMany ${this.dataParams.dbName} was unsuccessful (DB)`,
|
|
650
650
|
userMessage: `We encountered an uncought DB Error, please contact the responsible development team. errorcode: 505-223-560`,
|
|
651
651
|
error
|