@futdevpro/nts-dynamo 1.7.28 → 1.9.1
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/.copilot/patterns.json +1 -1
- package/.eslintrc.json +9 -1
- package/lib/_constants/global-settings.const.d.ts +2 -2
- package/lib/_constants/global-settings.const.d.ts.map +1 -1
- package/lib/_constants/global-settings.const.js +2 -2
- package/lib/_constants/global-settings.const.js.map +1 -1
- package/lib/_constants/mocks/app-extended-server.mock.d.ts +12 -12
- package/lib/_constants/mocks/app-extended-server.mock.d.ts.map +1 -1
- package/lib/_constants/mocks/app-extended-server.mock.js +16 -16
- package/lib/_constants/mocks/app-extended-server.mock.js.map +1 -1
- package/lib/_constants/mocks/app-params.mock.d.ts +2 -2
- package/lib/_constants/mocks/app-params.mock.d.ts.map +1 -1
- package/lib/_constants/mocks/app-params.mock.js +1 -1
- package/lib/_constants/mocks/app-params.mock.js.map +1 -1
- package/lib/_constants/mocks/app-server.mock.d.ts +15 -15
- package/lib/_constants/mocks/app-server.mock.d.ts.map +1 -1
- package/lib/_constants/mocks/app-server.mock.js +10 -10
- package/lib/_constants/mocks/app-server.mock.js.map +1 -1
- package/lib/_constants/mocks/data-model.mock.d.ts +5 -5
- package/lib/_constants/mocks/data-model.mock.d.ts.map +1 -1
- package/lib/_constants/mocks/data-model.mock.js +24 -24
- package/lib/_constants/mocks/data-model.mock.js.map +1 -1
- package/lib/_constants/mocks/email-service-collection.mock.d.ts +2 -2
- package/lib/_constants/mocks/email-service-collection.mock.d.ts.map +1 -1
- package/lib/_constants/mocks/email-service-collection.mock.js +1 -1
- package/lib/_constants/mocks/email-service-collection.mock.js.map +1 -1
- package/lib/_constants/mocks/endpoint.mock.d.ts +8 -8
- package/lib/_constants/mocks/endpoint.mock.d.ts.map +1 -1
- package/lib/_constants/mocks/endpoint.mock.js +18 -18
- package/lib/_constants/mocks/endpoint.mock.js.map +1 -1
- package/lib/_constants/mocks/socket-client.mock.d.ts +2 -2
- package/lib/_constants/mocks/socket-client.mock.d.ts.map +1 -1
- package/lib/_constants/mocks/socket-client.mock.js +1 -1
- package/lib/_constants/mocks/socket-client.mock.js.map +1 -1
- package/lib/_constants/mocks/socket-server.mock.d.ts +2 -2
- package/lib/_constants/mocks/socket-server.mock.d.ts.map +1 -1
- package/lib/_constants/mocks/socket-server.mock.js +1 -1
- package/lib/_constants/mocks/socket-server.mock.js.map +1 -1
- package/lib/_enums/data-model-type.enum.d.ts +1 -0
- package/lib/_enums/data-model-type.enum.d.ts.map +1 -1
- package/lib/_enums/data-model-type.enum.js +1 -0
- package/lib/_enums/data-model-type.enum.js.map +1 -1
- package/lib/_models/control-models/api-call-params.control-model.d.ts +3 -3
- package/lib/_models/control-models/api-call-params.control-model.d.ts.map +1 -1
- package/lib/_models/control-models/api-call-params.control-model.js +6 -6
- package/lib/_models/control-models/api-call-params.control-model.js.map +1 -1
- package/lib/_models/control-models/{app-system-controls.control-model copy.d.ts → app-ext-system-controls.control-model.d.ts} +1 -1
- package/lib/_models/control-models/app-ext-system-controls.control-model.d.ts.map +1 -0
- package/lib/_models/control-models/{app-system-controls.control-model copy.js → app-ext-system-controls.control-model.js} +1 -1
- package/lib/_models/control-models/app-ext-system-controls.control-model.js.map +1 -0
- package/lib/_models/control-models/app-params.control-model.d.ts +2 -2
- package/lib/_models/control-models/app-params.control-model.d.ts.map +1 -1
- package/lib/_models/control-models/app-params.control-model.js +3 -3
- package/lib/_models/control-models/app-params.control-model.js.map +1 -1
- package/lib/_models/control-models/endpoint-params.control-model.d.ts +1 -1
- package/lib/_models/control-models/endpoint-params.control-model.d.ts.map +1 -1
- package/lib/_models/control-models/endpoint-params.control-model.js +25 -25
- package/lib/_models/control-models/endpoint-params.control-model.js.map +1 -1
- package/lib/_models/control-models/http-settings.control-model.d.ts +2 -2
- package/lib/_models/control-models/http-settings.control-model.d.ts.map +1 -1
- package/lib/_models/control-models/http-settings.control-model.js +3 -3
- package/lib/_models/control-models/http-settings.control-model.js.map +1 -1
- package/lib/_models/control-models/socket-client-service-params.control-model.d.ts +2 -2
- package/lib/_models/control-models/socket-client-service-params.control-model.d.ts.map +1 -1
- package/lib/_models/control-models/socket-client-service-params.control-model.js +3 -3
- package/lib/_models/control-models/socket-client-service-params.control-model.js.map +1 -1
- package/lib/_models/control-models/socket-event.control-model.js +11 -11
- package/lib/_models/control-models/socket-event.control-model.js.map +1 -1
- package/lib/_models/control-models/socket-presence.control-model.d.ts +12 -0
- package/lib/_models/control-models/socket-presence.control-model.d.ts.map +1 -1
- package/lib/_models/control-models/socket-presence.control-model.js +12 -8
- package/lib/_models/control-models/socket-presence.control-model.js.map +1 -1
- package/lib/_models/control-models/socket-server-service-params.control-model.d.ts +2 -2
- package/lib/_models/control-models/socket-server-service-params.control-model.d.ts.map +1 -1
- package/lib/_models/control-models/socket-server-service-params.control-model.js +4 -4
- package/lib/_models/control-models/socket-server-service-params.control-model.js.map +1 -1
- package/lib/_models/interfaces/certification-settings.interface.d.ts +1 -1
- package/lib/_models/interfaces/certification-settings.interface.d.ts.map +1 -1
- package/lib/_models/interfaces/global-service-settings.interface.d.ts +6 -6
- package/lib/_models/interfaces/global-service-settings.interface.d.ts.map +1 -1
- package/lib/_models/interfaces/global-settings.interface.d.ts +1 -1
- package/lib/_models/interfaces/global-settings.interface.d.ts.map +1 -1
- package/lib/_models/interfaces/routing-module-settings.interface.d.ts +1 -1
- package/lib/_models/interfaces/routing-module-settings.interface.d.ts.map +1 -1
- package/lib/_models/types/db-filter.type.d.ts.map +1 -1
- package/lib/_models/types/db-update.type.d.ts +2 -1
- package/lib/_models/types/db-update.type.d.ts.map +1 -1
- package/lib/_modules/custom-data/custom-data.controller.d.ts +2 -2
- package/lib/_modules/custom-data/custom-data.controller.d.ts.map +1 -1
- package/lib/_modules/custom-data/custom-data.controller.js +18 -16
- package/lib/_modules/custom-data/custom-data.controller.js.map +1 -1
- package/lib/_modules/custom-data/custom-data.data-service.d.ts +3 -3
- package/lib/_modules/custom-data/custom-data.data-service.d.ts.map +1 -1
- package/lib/_modules/custom-data/custom-data.data-service.js +4 -4
- package/lib/_modules/custom-data/custom-data.data-service.js.map +1 -1
- package/lib/_modules/custom-data/get-custom-data-routing-module.util.d.ts +1 -1
- package/lib/_modules/custom-data/get-custom-data-routing-module.util.d.ts.map +1 -1
- package/lib/_modules/custom-data/get-custom-data-routing-module.util.js +5 -5
- package/lib/_modules/custom-data/get-custom-data-routing-module.util.js.map +1 -1
- package/lib/_modules/test/get-test-routing-module.util.d.ts +1 -1
- package/lib/_modules/test/get-test-routing-module.util.d.ts.map +1 -1
- package/lib/_modules/test/get-test-routing-module.util.js +5 -5
- package/lib/_modules/test/get-test-routing-module.util.js.map +1 -1
- package/lib/_modules/test/test.controller.d.ts +2 -2
- package/lib/_modules/test/test.controller.d.ts.map +1 -1
- package/lib/_modules/test/test.controller.js +33 -33
- package/lib/_modules/test/test.controller.js.map +1 -1
- package/lib/_modules/usage/get-usage-routing-module.util.d.ts +1 -1
- package/lib/_modules/usage/get-usage-routing-module.util.d.ts.map +1 -1
- package/lib/_modules/usage/get-usage-routing-module.util.js +5 -5
- package/lib/_modules/usage/get-usage-routing-module.util.js.map +1 -1
- package/lib/_modules/usage/usage.controller.d.ts +2 -2
- package/lib/_modules/usage/usage.controller.d.ts.map +1 -1
- package/lib/_modules/usage/usage.controller.js +17 -17
- package/lib/_modules/usage/usage.controller.js.map +1 -1
- package/lib/_modules/usage/usage.data-service.d.ts +8 -8
- package/lib/_modules/usage/usage.data-service.d.ts.map +1 -1
- package/lib/_modules/usage/usage.data-service.js +11 -11
- package/lib/_modules/usage/usage.data-service.js.map +1 -1
- package/lib/_services/base/data.service.d.ts +4 -4
- package/lib/_services/base/data.service.d.ts.map +1 -1
- package/lib/_services/base/data.service.js +50 -50
- package/lib/_services/base/data.service.js.map +1 -1
- package/lib/_services/base/db.service.d.ts +6 -6
- package/lib/_services/base/db.service.d.ts.map +1 -1
- package/lib/_services/base/db.service.js +41 -37
- package/lib/_services/base/db.service.js.map +1 -1
- package/lib/_services/core/api.service.d.ts +4 -4
- package/lib/_services/core/api.service.d.ts.map +1 -1
- package/lib/_services/core/api.service.js +34 -34
- package/lib/_services/core/api.service.js.map +1 -1
- package/lib/_services/core/auth.service.d.ts +6 -6
- package/lib/_services/core/auth.service.js +2 -2
- package/lib/_services/core/auth.service.js.map +1 -1
- package/lib/_services/core/email.service.d.ts +4 -4
- package/lib/_services/core/email.service.d.ts.map +1 -1
- package/lib/_services/core/email.service.js +23 -23
- package/lib/_services/core/email.service.js.map +1 -1
- package/lib/_services/core/global.service.d.ts +13 -13
- package/lib/_services/core/global.service.d.ts.map +1 -1
- package/lib/_services/core/global.service.js +20 -7
- package/lib/_services/core/global.service.js.map +1 -1
- package/lib/_services/core/service-collection.service.d.ts +1 -1
- package/lib/_services/core/service-collection.service.d.ts.map +1 -1
- package/lib/_services/core/service-collection.service.js +3 -3
- package/lib/_services/core/service-collection.service.js.map +1 -1
- package/lib/_services/route/controller.service.d.ts +2 -2
- package/lib/_services/route/controller.service.d.ts.map +1 -1
- package/lib/_services/route/controller.service.js +1 -1
- package/lib/_services/route/controller.service.js.map +1 -1
- package/lib/_services/route/routing-module.service.d.ts +4 -4
- package/lib/_services/route/routing-module.service.d.ts.map +1 -1
- package/lib/_services/route/routing-module.service.js +10 -10
- package/lib/_services/route/routing-module.service.js.map +1 -1
- package/lib/_services/server/app-extended.server.d.ts +2 -2
- package/lib/_services/server/app-extended.server.js +27 -27
- package/lib/_services/server/app-extended.server.js.map +1 -1
- package/lib/_services/server/app-extended.server.spec.js +3 -3
- package/lib/_services/server/app-extended.server.spec.js.map +1 -1
- package/lib/_services/server/app.server.d.ts +16 -16
- package/lib/_services/server/app.server.d.ts.map +1 -1
- package/lib/_services/server/app.server.js +91 -90
- package/lib/_services/server/app.server.js.map +1 -1
- package/lib/_services/server/app.server.spec.js +5 -5
- package/lib/_services/server/app.server.spec.js.map +1 -1
- package/lib/_services/shared.static-service.d.ts +4 -4
- package/lib/_services/shared.static-service.d.ts.map +1 -1
- package/lib/_services/shared.static-service.js +2 -2
- package/lib/_services/shared.static-service.js.map +1 -1
- package/lib/_services/socket/socket-client.service.d.ts +3 -3
- package/lib/_services/socket/socket-client.service.d.ts.map +1 -1
- package/lib/_services/socket/socket-client.service.js +35 -29
- package/lib/_services/socket/socket-client.service.js.map +1 -1
- package/lib/_services/socket/socket-server.service.d.ts +3 -3
- package/lib/_services/socket/socket-server.service.d.ts.map +1 -1
- package/lib/_services/socket/socket-server.service.js +51 -51
- package/lib/_services/socket/socket-server.service.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +233 -230
- package/src/_constants/global-settings.const.ts +2 -2
- package/src/_constants/mocks/app-extended-server.mock.ts +34 -35
- package/src/_constants/mocks/app-params.mock.ts +2 -2
- package/src/_constants/mocks/app-server.mock.ts +30 -30
- package/src/_constants/mocks/data-model.mock.ts +25 -25
- package/src/_constants/mocks/email-service-collection.mock.ts +2 -2
- package/src/_constants/mocks/endpoint.mock.ts +22 -22
- package/src/_constants/mocks/socket-client.mock.ts +3 -3
- package/src/_constants/mocks/socket-server.mock.ts +3 -3
- package/src/_enums/data-model-type.enum.ts +1 -0
- package/src/_models/control-models/api-call-params.control-model.ts +5 -5
- package/src/_models/control-models/app-params.control-model.ts +2 -2
- package/src/_models/control-models/endpoint-params.control-model.ts +35 -35
- package/src/_models/control-models/http-settings.control-model.ts +2 -2
- package/src/_models/control-models/socket-client-service-params.control-model.ts +2 -2
- package/src/_models/control-models/socket-event.control-model.ts +13 -13
- package/src/_models/control-models/socket-presence.control-model.ts +26 -14
- package/src/_models/control-models/socket-server-service-params.control-model.ts +4 -4
- package/src/_models/interfaces/certification-settings.interface.ts +1 -1
- package/src/_models/interfaces/global-service-settings.interface.ts +6 -6
- package/src/_models/interfaces/global-settings.interface.ts +1 -1
- package/src/_models/interfaces/routing-module-settings.interface.ts +1 -1
- package/src/_models/types/db-filter.type.ts +5 -2
- package/src/_models/types/db-update.type.ts +3 -2
- package/src/_modules/custom-data/custom-data.controller.ts +20 -18
- package/src/_modules/custom-data/custom-data.data-service.ts +8 -6
- package/src/_modules/custom-data/get-custom-data-routing-module.util.ts +7 -7
- package/src/_modules/test/get-test-routing-module.util.ts +7 -7
- package/src/_modules/test/test.controller.ts +34 -34
- package/src/_modules/usage/get-usage-routing-module.util.ts +7 -7
- package/src/_modules/usage/usage.controller.ts +20 -21
- package/src/_modules/usage/usage.data-service.ts +28 -28
- package/src/_services/base/data.service.ts +62 -61
- package/src/_services/base/db.service.ts +53 -50
- package/src/_services/core/api.service.ts +54 -54
- package/src/_services/core/auth.service.ts +9 -9
- package/src/_services/core/email.service.ts +33 -33
- package/src/_services/core/global.service.ts +37 -23
- package/src/_services/core/service-collection.service.ts +1 -1
- package/src/_services/route/controller.service.ts +4 -4
- package/src/_services/route/routing-module.service.ts +21 -21
- package/src/_services/server/app-extended.server.spec.ts +4 -4
- package/src/_services/server/app-extended.server.ts +27 -27
- package/src/_services/server/app.server.spec.ts +6 -6
- package/src/_services/server/app.server.ts +118 -116
- package/src/_services/shared.static-service.ts +8 -5
- package/src/_services/socket/socket-client.service.ts +79 -47
- package/src/_services/socket/socket-server.service.ts +61 -61
- package/tsconfig.json +8 -7
- package/lib/_models/control-models/app-system-controls.control-model copy.d.ts.map +0 -1
- package/lib/_models/control-models/app-system-controls.control-model copy.js.map +0 -1
- /package/src/_models/control-models/{app-system-controls.control-model copy.ts → app-ext-system-controls.control-model.ts} +0 -0
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import { Request, Response } from 'express';
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { DynamoFM_Array, DynamoFM_Error, DynamoFM_Log } from '@futdevpro/fsm-dynamo';
|
|
6
6
|
import { DynamoNTS_RouteSecurity } from '../../_enums/route-security.enum';
|
|
7
7
|
import { DynamoNTS_HttpCallType } from '../../_enums/http/http-call-type.enum';
|
|
8
|
-
import {
|
|
8
|
+
import { DynamoNTS_globalSettings } from '../../_constants/global-settings.const';
|
|
9
9
|
import { DynamoNTS_GlobalService } from '../../_services/core/global.service';
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -13,7 +13,7 @@ import { DynamoNTS_GlobalService } from '../../_services/core/global.service';
|
|
|
13
13
|
* used for specific events such as saving or getting data,
|
|
14
14
|
* triggering events, logging in or out, and much more
|
|
15
15
|
*/
|
|
16
|
-
export class
|
|
16
|
+
export class DynamoNTS_Endpoint_Params {
|
|
17
17
|
name: string;
|
|
18
18
|
security: DynamoNTS_RouteSecurity;
|
|
19
19
|
|
|
@@ -85,13 +85,13 @@ export class DynamoNTS_EndpointParams{
|
|
|
85
85
|
) {
|
|
86
86
|
try {
|
|
87
87
|
this.name = set.name ?? set.endpoint;
|
|
88
|
-
this.security = set.security ??
|
|
88
|
+
this.security = set.security ?? DynamoNTS_globalSettings.defaultRouteSecurity;
|
|
89
89
|
|
|
90
90
|
this.type = set.type;
|
|
91
91
|
this.endpoint = set.endpoint;
|
|
92
92
|
|
|
93
93
|
if (!this.endpoint) {
|
|
94
|
-
throw new
|
|
94
|
+
throw new DynamoFM_Error({
|
|
95
95
|
status: 406,
|
|
96
96
|
errorCode: 'NTS-EP0-C00',
|
|
97
97
|
addECToUserMsg: true,
|
|
@@ -111,14 +111,14 @@ export class DynamoNTS_EndpointParams{
|
|
|
111
111
|
this.preProcessess = set.preProcessess ?? [];
|
|
112
112
|
this.tasks = set.tasks ?? [];
|
|
113
113
|
|
|
114
|
-
this.logRequest = set.logRequest ??
|
|
115
|
-
this.logRequestsParams = set.logRequestsParams ??
|
|
114
|
+
this.logRequest = set.logRequest ?? DynamoNTS_globalSettings.logRequest;
|
|
115
|
+
this.logRequestsParams = set.logRequestsParams ?? DynamoNTS_globalSettings.logRequestsParams;
|
|
116
116
|
this.logRequestsContent =
|
|
117
|
-
set.logRequestsContent ??
|
|
117
|
+
set.logRequestsContent ?? DynamoNTS_globalSettings.logRequestsContent;
|
|
118
118
|
this.logResponseContent =
|
|
119
|
-
set.logResponseContent ??
|
|
119
|
+
set.logResponseContent ?? DynamoNTS_globalSettings.logResponseContent;
|
|
120
120
|
} catch (error) {
|
|
121
|
-
|
|
121
|
+
DynamoFM_Log.error(
|
|
122
122
|
`\nEndpoint params setup failed: name: '${set.name}' ` +
|
|
123
123
|
`(security: ${set.security}) endpoint: ${set.endpoint}` +
|
|
124
124
|
`\nERROR:` +
|
|
@@ -145,9 +145,9 @@ export class DynamoNTS_EndpointParams{
|
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
if (this.logRequestsContent && req.body && 0 < Object.keys(req.body).length) {
|
|
148
|
-
|
|
148
|
+
DynamoFM_Log.info(msg + `\nbody:`, req.body);
|
|
149
149
|
} else {
|
|
150
|
-
|
|
150
|
+
DynamoFM_Log.info(msg);
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
|
|
@@ -171,13 +171,13 @@ export class DynamoNTS_EndpointParams{
|
|
|
171
171
|
await this.preLog(req, res, issuer);
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
await
|
|
174
|
+
await DynamoFM_Array.asyncForEach(this.preProcessess,
|
|
175
175
|
async (preProcess: (req: Request, res: Response) => Promise<void>): Promise<void> => {
|
|
176
176
|
await preProcess(req, res);
|
|
177
177
|
}
|
|
178
178
|
);
|
|
179
179
|
|
|
180
|
-
await
|
|
180
|
+
await DynamoFM_Array.asyncForEach(this.tasks,
|
|
181
181
|
async (
|
|
182
182
|
task: (req: Request, res: Response, issuer?: string) => Promise<void>
|
|
183
183
|
): Promise<void> => {
|
|
@@ -187,10 +187,10 @@ export class DynamoNTS_EndpointParams{
|
|
|
187
187
|
|
|
188
188
|
if (this.logRequest) {
|
|
189
189
|
if (this.logResponseContent) {
|
|
190
|
-
|
|
191
|
-
|
|
190
|
+
DynamoFM_Log.success(` <<<===== ${this.name} result sent.`);
|
|
191
|
+
DynamoFM_Log.warn('sorry, the logResponseContent is not implemented yet.');
|
|
192
192
|
} else {
|
|
193
|
-
|
|
193
|
+
DynamoFM_Log.success(` <<<===== ${this.name} result sent.`);
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
} catch (error) {
|
|
@@ -207,7 +207,7 @@ export class DynamoNTS_EndpointParams{
|
|
|
207
207
|
private async error(
|
|
208
208
|
req: Request,
|
|
209
209
|
res: Response,
|
|
210
|
-
error: Error |
|
|
210
|
+
error: Error | DynamoFM_Error,
|
|
211
211
|
issuer: string
|
|
212
212
|
): Promise<void> {
|
|
213
213
|
try {
|
|
@@ -215,20 +215,20 @@ export class DynamoNTS_EndpointParams{
|
|
|
215
215
|
|
|
216
216
|
msg += this.getPathParamsLogContent(req);
|
|
217
217
|
|
|
218
|
-
|
|
219
|
-
|
|
218
|
+
DynamoFM_Log.error(msg);
|
|
219
|
+
DynamoFM_Log.error(
|
|
220
220
|
'ERROR:',
|
|
221
|
-
(error as
|
|
222
|
-
(error as
|
|
221
|
+
(error as DynamoFM_Error)?.flag?.includes('DYNAMO') ?
|
|
222
|
+
(error as DynamoFM_Error).getErrorSimplified() :
|
|
223
223
|
error,
|
|
224
224
|
'\n'
|
|
225
225
|
);
|
|
226
226
|
|
|
227
|
-
if ((error as
|
|
228
|
-
if (!(error as
|
|
229
|
-
(error as
|
|
227
|
+
if ((error as DynamoFM_Error)?.flag?.includes('DYNAMO')) {
|
|
228
|
+
if (!(error as DynamoFM_Error).additionalContent) {
|
|
229
|
+
(error as DynamoFM_Error).additionalContent = {};
|
|
230
230
|
}
|
|
231
|
-
(error as
|
|
231
|
+
(error as DynamoFM_Error).additionalContent.endpointInfo = msg;
|
|
232
232
|
}
|
|
233
233
|
|
|
234
234
|
await DynamoNTS_GlobalService.globalErrorHandler?.(
|
|
@@ -237,29 +237,29 @@ export class DynamoNTS_EndpointParams{
|
|
|
237
237
|
res,
|
|
238
238
|
issuer
|
|
239
239
|
).catch((err): void => {
|
|
240
|
-
|
|
241
|
-
|
|
240
|
+
DynamoFM_Log.warn('DynamoNTS_GlobalService.globalErrorHandler failed to handle error: ', err);
|
|
241
|
+
DynamoFM_Log.warn('It will proceed as normal.');
|
|
242
242
|
});
|
|
243
243
|
|
|
244
|
-
res.status((error as
|
|
244
|
+
res.status((error as DynamoFM_Error)?.___status ?? 501);
|
|
245
245
|
res.send(error);
|
|
246
246
|
|
|
247
247
|
if (this.logRequest) {
|
|
248
248
|
if (this.logResponseContent) {
|
|
249
|
-
|
|
250
|
-
` <<<===== ${this.name} error sent: ${(error as
|
|
249
|
+
DynamoFM_Log.error(
|
|
250
|
+
` <<<===== ${this.name} error sent: ${(error as DynamoFM_Error)?._message ?? ''}`
|
|
251
251
|
);
|
|
252
|
-
|
|
252
|
+
DynamoFM_Log.error(
|
|
253
253
|
'sorry, the logResponseContent is not implemented yet.'
|
|
254
254
|
);
|
|
255
255
|
} else {
|
|
256
|
-
|
|
257
|
-
` <<<===== ${this.name} error sent: ${(error as
|
|
256
|
+
DynamoFM_Log.error(
|
|
257
|
+
` <<<===== ${this.name} error sent: ${(error as DynamoFM_Error)?._message ?? ''}`
|
|
258
258
|
);
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
261
|
} catch (error) {
|
|
262
|
-
|
|
262
|
+
DynamoFM_Log.H_error(
|
|
263
263
|
`\n\nDYNAMO MULTILEVEL ERROR:DynamoNTS_EndpointParams: error: ` +
|
|
264
264
|
`(${this.name}, ${this.endpoint})` +
|
|
265
265
|
`\n(DYNAMO MULTILEVEL ERROR means, that the ERRORHANDLING is ALSO FAILED, ` +
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import * as BodyParser from 'body-parser';
|
|
3
|
-
export class
|
|
3
|
+
export class DynamoNTS_Http_Settings {
|
|
4
4
|
httpPort?: number;
|
|
5
5
|
httpsPort?: number;
|
|
6
6
|
|
|
@@ -20,7 +20,7 @@ export class DynamoNTS_HttpSettings {
|
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
constructor(
|
|
23
|
-
set?:
|
|
23
|
+
set?: DynamoNTS_Http_Settings
|
|
24
24
|
) {
|
|
25
25
|
if (set) {
|
|
26
26
|
Object.assign(this, set);
|
|
@@ -6,7 +6,7 @@ import { second } from '@futdevpro/fsm-dynamo';
|
|
|
6
6
|
/**
|
|
7
7
|
* socket handling and clarification is under development
|
|
8
8
|
*/
|
|
9
|
-
export class
|
|
9
|
+
export class DynamoNTS_SocketClientService_Params {
|
|
10
10
|
service: string;
|
|
11
11
|
name: string;
|
|
12
12
|
address?: string = 'ws://localhost';
|
|
@@ -16,7 +16,7 @@ export class DynamoNTS_SocketClientServiceParams {
|
|
|
16
16
|
socketOptions?: Partial<SocketIO.ManagerOptions & SocketIO.SocketOptions>;
|
|
17
17
|
|
|
18
18
|
constructor(
|
|
19
|
-
set:
|
|
19
|
+
set: DynamoNTS_SocketClientService_Params
|
|
20
20
|
) {
|
|
21
21
|
Object.assign(this, set);
|
|
22
22
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { DynamoFM_Array, DynamoFM_Log } from '@futdevpro/fsm-dynamo';
|
|
3
|
+
import { DynamoNTS_globalSettings } from '../../_constants/global-settings.const';
|
|
4
4
|
import { DynamoNTS_SocketEventKey } from '../../_enums/http/socket-event-type.enum';
|
|
5
5
|
|
|
6
6
|
|
|
@@ -78,15 +78,15 @@ export class DynamoNTS_SocketEvent<T>{
|
|
|
78
78
|
DynamoNTS_SocketEventKey.disconnect,
|
|
79
79
|
] as string[]).includes(this.eventKey)
|
|
80
80
|
) {
|
|
81
|
-
this.logEvent =
|
|
82
|
-
|
|
81
|
+
this.logEvent = DynamoNTS_globalSettings.logMainSocketEvents ||
|
|
82
|
+
DynamoNTS_globalSettings.logAllSocketEvent;
|
|
83
83
|
} else {
|
|
84
|
-
this.logEvent =
|
|
84
|
+
this.logEvent = DynamoNTS_globalSettings.logAllSocketEvent;
|
|
85
85
|
}
|
|
86
86
|
this.logEventContent = set.logEventContent !== undefined ?
|
|
87
|
-
set.logEventContent :
|
|
87
|
+
set.logEventContent : DynamoNTS_globalSettings.logSocketEventContent;
|
|
88
88
|
} catch (error) {
|
|
89
|
-
|
|
89
|
+
DynamoFM_Log.error(
|
|
90
90
|
`\nSocket Event params setup failed (${this.serviceName}): ${set.eventKey}`,
|
|
91
91
|
error
|
|
92
92
|
);
|
|
@@ -102,15 +102,15 @@ export class DynamoNTS_SocketEvent<T>{
|
|
|
102
102
|
private async getPreLog(content: T, issuer?: string): Promise<void> {
|
|
103
103
|
try {
|
|
104
104
|
if (this.logEventContent && this.eventKey !== DynamoNTS_SocketEventKey.connection) {
|
|
105
|
-
|
|
105
|
+
DynamoFM_Log.log(
|
|
106
106
|
`---> incoming socket(${this.serviceName}) event: ${this.eventKey};
|
|
107
107
|
\ncontent:`, content
|
|
108
108
|
);
|
|
109
109
|
} else {
|
|
110
|
-
|
|
110
|
+
DynamoFM_Log.log(`---> incoming socket(${this.serviceName}) event: ${this.eventKey}...`);
|
|
111
111
|
}
|
|
112
112
|
} catch (error) {
|
|
113
|
-
|
|
113
|
+
DynamoFM_Log.error(`PreLog failed... (socket: ${this.serviceName})`, error);
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
|
|
@@ -124,18 +124,18 @@ export class DynamoNTS_SocketEvent<T>{
|
|
|
124
124
|
await this.getPreLog(content, issuer);
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
await
|
|
127
|
+
await DynamoFM_Array.asyncForEach(
|
|
128
128
|
this.preProcessess,
|
|
129
129
|
async (preProcess: DynamoNTS_SocketEventPreprocessTask<any, any>) => {
|
|
130
130
|
content = await preProcess(content);
|
|
131
131
|
}
|
|
132
132
|
);
|
|
133
133
|
|
|
134
|
-
await
|
|
134
|
+
await DynamoFM_Array.asyncForEach(this.tasks, async (task: DynamoNTS_SocketEventTask<T>) => {
|
|
135
135
|
await task(content, issuer);
|
|
136
136
|
});
|
|
137
137
|
} catch (error) {
|
|
138
|
-
|
|
138
|
+
DynamoFM_Log.error(
|
|
139
139
|
`Socket Event tasks failed to execute on ${this.serviceName}.... (${this.eventKey})`,
|
|
140
140
|
error,
|
|
141
141
|
'content:',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import {
|
|
3
|
-
|
|
3
|
+
DynamoFM_AnyError, DynamoFM_Error, DynamoFM_Error_Settings, DynamoFM_Log
|
|
4
4
|
} from '@futdevpro/fsm-dynamo';
|
|
5
5
|
import * as SocketIO from 'socket.io';
|
|
6
6
|
|
|
@@ -8,6 +8,10 @@ import * as SocketIO from 'socket.io';
|
|
|
8
8
|
* socket handling and clarification is under development
|
|
9
9
|
*/
|
|
10
10
|
export class DynamoNTS_SocketPresence {
|
|
11
|
+
/**
|
|
12
|
+
* this is the presence ID which is used to getand handle the presence
|
|
13
|
+
* usually the service master identifier such as userID
|
|
14
|
+
* */
|
|
11
15
|
issuerId: string;
|
|
12
16
|
serviceName?: string = 'unknown';
|
|
13
17
|
onDestroy?: (issuerId: string) => void = (): void => {};
|
|
@@ -20,6 +24,10 @@ export class DynamoNTS_SocketPresence {
|
|
|
20
24
|
|
|
21
25
|
constructor(
|
|
22
26
|
set: {
|
|
27
|
+
/**
|
|
28
|
+
* this is the presence ID which is used to get and set handle the presence/sockets
|
|
29
|
+
* usually the service master identifier such as userID
|
|
30
|
+
* */
|
|
23
31
|
issuerId: string,
|
|
24
32
|
serviceName?: string,
|
|
25
33
|
onDestroy?: (issuerId: string) => void,
|
|
@@ -27,11 +35,15 @@ export class DynamoNTS_SocketPresence {
|
|
|
27
35
|
defaultErrorUserMsg?: string,
|
|
28
36
|
sockets: SocketIO.Socket[],
|
|
29
37
|
|
|
38
|
+
/**
|
|
39
|
+
* this is the issuer ID which is used to register data changes,
|
|
40
|
+
* usually the main master identifier such as accountID
|
|
41
|
+
*/
|
|
30
42
|
issuer: string,
|
|
31
43
|
}
|
|
32
44
|
) {
|
|
33
45
|
if (!set?.issuerId) {
|
|
34
|
-
throw new
|
|
46
|
+
throw new DynamoFM_Error({
|
|
35
47
|
...this._getDefaultErrorSettings(
|
|
36
48
|
'constructor',
|
|
37
49
|
new Error(
|
|
@@ -60,7 +72,7 @@ export class DynamoNTS_SocketPresence {
|
|
|
60
72
|
}
|
|
61
73
|
|
|
62
74
|
if (!set?.sockets?.length) {
|
|
63
|
-
throw new
|
|
75
|
+
throw new DynamoFM_Error({
|
|
64
76
|
...this._getDefaultErrorSettings(
|
|
65
77
|
'constructor',
|
|
66
78
|
new Error(
|
|
@@ -89,13 +101,13 @@ export class DynamoNTS_SocketPresence {
|
|
|
89
101
|
|
|
90
102
|
this.sockets.forEach((socket: SocketIO.Socket, index: number) => {
|
|
91
103
|
if (!socket.connected) {
|
|
92
|
-
|
|
104
|
+
DynamoFM_Log.warn(
|
|
93
105
|
`Emitting event '${event}' on socket(${this.serviceName})-(${index}) failed!` +
|
|
94
106
|
`\nERROR: socket[${socket.id}] is not connected! (it will be removed...)`
|
|
95
107
|
);
|
|
96
108
|
|
|
97
109
|
/* errors.push(
|
|
98
|
-
new
|
|
110
|
+
new DynamoFM_Error({
|
|
99
111
|
status: 500,
|
|
100
112
|
errorCode: 'NTS-SPC-EE1',
|
|
101
113
|
addECToUserMsg: true,
|
|
@@ -125,7 +137,7 @@ export class DynamoNTS_SocketPresence {
|
|
|
125
137
|
|
|
126
138
|
this.sockets.forEach((socket: SocketIO.Socket, index: number): void => {
|
|
127
139
|
const success: boolean = socket.emit(event, content, (error): void => {
|
|
128
|
-
|
|
140
|
+
DynamoFM_Log.error(
|
|
129
141
|
`Emitting event '${event}' on socket(${this.serviceName})-(${index}) failed!(0)` +
|
|
130
142
|
`\nerror:`, error
|
|
131
143
|
);
|
|
@@ -133,14 +145,14 @@ export class DynamoNTS_SocketPresence {
|
|
|
133
145
|
});
|
|
134
146
|
|
|
135
147
|
if (!success) {
|
|
136
|
-
|
|
148
|
+
DynamoFM_Log.error(
|
|
137
149
|
`Emitting event '${event}' on socket(${this.serviceName})-(${index}) failed!(1)`
|
|
138
150
|
);
|
|
139
151
|
}
|
|
140
152
|
});
|
|
141
153
|
|
|
142
154
|
if (0 < errors.length) {
|
|
143
|
-
throw new
|
|
155
|
+
throw new DynamoFM_Error({
|
|
144
156
|
...this._getDefaultErrorSettings(
|
|
145
157
|
'emitEvent',
|
|
146
158
|
new Error(
|
|
@@ -159,7 +171,7 @@ export class DynamoNTS_SocketPresence {
|
|
|
159
171
|
});
|
|
160
172
|
|
|
161
173
|
} else if (this.sockets.length === 0) {
|
|
162
|
-
throw new
|
|
174
|
+
throw new DynamoFM_Error({
|
|
163
175
|
...this._getDefaultErrorSettings(
|
|
164
176
|
'emitEvent',
|
|
165
177
|
new Error(
|
|
@@ -177,15 +189,15 @@ export class DynamoNTS_SocketPresence {
|
|
|
177
189
|
|
|
178
190
|
private _getDefaultErrorSettings(
|
|
179
191
|
fnName: string,
|
|
180
|
-
error:
|
|
192
|
+
error: DynamoFM_AnyError,
|
|
181
193
|
issuer: string
|
|
182
|
-
):
|
|
194
|
+
): DynamoFM_Error_Settings {
|
|
183
195
|
return {
|
|
184
|
-
status: (error as
|
|
196
|
+
status: (error as DynamoFM_Error)?.___status ?? 406,
|
|
185
197
|
message: (error as Error)?.message ?? `${fnName} was UNSUCCESFUL (NTS; ${this.serviceName})`,
|
|
186
|
-
userMessage: (error as
|
|
198
|
+
userMessage: (error as DynamoFM_Error)?.__userMessage ?? this.defaultErrorUserMsg,
|
|
187
199
|
issuerService: this.serviceName + ` (${this?.constructor?.name}-DynamoNTS_SocketPresence)`,
|
|
188
|
-
addECToUserMsg: !(error as
|
|
200
|
+
addECToUserMsg: !(error as DynamoFM_Error)?.__userMessage,
|
|
189
201
|
issuer: issuer,
|
|
190
202
|
error: error,
|
|
191
203
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { DynamoNTS_globalSettings } from '../../_constants/global-settings.const';
|
|
3
3
|
import { DynamoNTS_SocketSecurity } from '../../_enums/socket-security.enum';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* socket handling and clarification is under development
|
|
7
7
|
*/
|
|
8
|
-
export class
|
|
8
|
+
export class DynamoNTS_SocketServerService_Params<T = any> {
|
|
9
9
|
name: string;
|
|
10
10
|
port: number;
|
|
11
11
|
security?: DynamoNTS_SocketSecurity;
|
|
12
12
|
|
|
13
13
|
constructor(
|
|
14
|
-
set:
|
|
14
|
+
set: DynamoNTS_SocketServerService_Params<T>
|
|
15
15
|
) {
|
|
16
16
|
this.name = set.name;
|
|
17
17
|
this.port = set.port;
|
|
18
|
-
this.security = set.security ? set.security :
|
|
18
|
+
this.security = set.security ? set.security : DynamoNTS_globalSettings.defaultSocketSecurity;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -4,14 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
import { Request, Response } from 'express';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { DynamoFM_DataModel_Params } from '@futdevpro/fsm-dynamo';
|
|
8
8
|
|
|
9
|
-
import {
|
|
9
|
+
import { DynamoNTS_Service_Collection } from '../../_services/core/service-collection.service';
|
|
10
10
|
import { DynamoNTS_EmailService } from '../../_services/core/email.service';
|
|
11
11
|
import { DynamoNTS_AuthService } from '../../_services/core/auth.service';
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
export interface
|
|
14
|
+
export interface DynamoNTS_GlobalService_Settings {
|
|
15
15
|
/**
|
|
16
16
|
* You need to setup your Own Auth Service extending the DynamoNTS_AuthService class
|
|
17
17
|
*/
|
|
@@ -20,12 +20,12 @@ export interface DynamoNTS_GlobalServiceSettings {
|
|
|
20
20
|
/**
|
|
21
21
|
* You can setup your Own Email Service extending the DynamoNTS_EmailServiceCollection class
|
|
22
22
|
*/
|
|
23
|
-
emailServiceCollection?:
|
|
23
|
+
emailServiceCollection?: DynamoNTS_Service_Collection<DynamoNTS_EmailService>,
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
|
-
* you can setup data tables by passing a
|
|
26
|
+
* you can setup data tables by passing a DynamoFM_DataModel_Params list at this point
|
|
27
27
|
*/
|
|
28
|
-
dbModels?:
|
|
28
|
+
dbModels?: DynamoFM_DataModel_Params[],
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* you can setup other services by passing a DynamoNTS_SingletonService list at this point
|
|
@@ -9,7 +9,7 @@ import { DynamoNTS_SocketSecurity } from '../../_enums/socket-security.enum';
|
|
|
9
9
|
* @param logEventContent only will log if the specific socket event is also set to log
|
|
10
10
|
*
|
|
11
11
|
*/
|
|
12
|
-
export interface
|
|
12
|
+
export interface DynamoNTS_Global_Settings {
|
|
13
13
|
/**
|
|
14
14
|
* this will be used as the main baseUrl for the application,
|
|
15
15
|
* this is not required, but we suggest to use at least a '/api' as base route
|
|
@@ -4,7 +4,7 @@ import { DynamoNTS_Controller } from '../../_services';
|
|
|
4
4
|
/**
|
|
5
5
|
* This is a main route point handler, which collects a list of controllers for the API
|
|
6
6
|
*/
|
|
7
|
-
export interface
|
|
7
|
+
export interface DynamoNTS_RoutingModule_Settings {
|
|
8
8
|
/**
|
|
9
9
|
* main route of the module
|
|
10
10
|
*/
|
|
@@ -20,12 +20,15 @@
|
|
|
20
20
|
* //
|
|
21
21
|
* @returns {T} data: T
|
|
22
22
|
*/
|
|
23
|
-
export type DynamoNTS_DBFilter<T> =
|
|
23
|
+
export type DynamoNTS_DBFilter<T> =
|
|
24
|
+
DynamoNTS_DBFilterSimple<T> |
|
|
25
|
+
DynamoNTS_DBFilterOR<T> |
|
|
26
|
+
DynamoNTS_DBFilterNOR<T>;
|
|
24
27
|
|
|
25
28
|
/**
|
|
26
29
|
* A simple filter for a DynamoDB query.
|
|
27
30
|
*/
|
|
28
|
-
|
|
31
|
+
export type DynamoNTS_DBFilterSimple<T> = {
|
|
29
32
|
[K in keyof T]?: T[K] | DynamoNTS_DBFilterExpressions<T[K]>;
|
|
30
33
|
} & {
|
|
31
34
|
[path: string]: any;
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
* $unset: // Removes the specified field from a document. (set: "" to value)
|
|
28
28
|
* //
|
|
29
29
|
*/
|
|
30
|
-
|
|
30
|
+
export type DynamoNTS_DBUpdate<T> = {
|
|
31
31
|
/**
|
|
32
32
|
* Sets the value of a field to current date, either as a Date or a Timestamp.
|
|
33
33
|
*/
|
|
@@ -61,7 +61,8 @@
|
|
|
61
61
|
*/
|
|
62
62
|
$set?: { [K in keyof T]?: string } | any;
|
|
63
63
|
/**
|
|
64
|
-
* Sets the value of a field if an update results in an insert of a document.
|
|
64
|
+
* Sets the value of a field if an update results in an insert of a document.
|
|
65
|
+
* Has no effect on update operations that modify existing documents.
|
|
65
66
|
*/
|
|
66
67
|
$setOnInsert?: { [K in keyof T]?: T[K] };
|
|
67
68
|
/**
|
|
@@ -1,31 +1,33 @@
|
|
|
1
1
|
|
|
2
2
|
import { Request, Response } from 'express';
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import { DynamoFM_customDataModule_settings } from '@futdevpro/fsm-dynamo';
|
|
5
5
|
|
|
6
6
|
import { DynamoNTS_HttpCallType } from '../../_enums/http/http-call-type.enum';
|
|
7
7
|
import { DynamoNTS_Controller } from '../../_services/route/controller.service';
|
|
8
|
-
import {
|
|
8
|
+
import { DynamoFM_CustomData_DataService } from './custom-data.data-service';
|
|
9
9
|
import {
|
|
10
|
-
|
|
10
|
+
DynamoNTS_Endpoint_Params
|
|
11
11
|
} from '../../_models/control-models/endpoint-params.control-model';
|
|
12
12
|
|
|
13
|
-
export class
|
|
13
|
+
export class DynamoNTS_CustomData_Controller extends DynamoNTS_Controller {
|
|
14
14
|
|
|
15
|
-
static getInstance():
|
|
16
|
-
return
|
|
15
|
+
static getInstance(): DynamoNTS_CustomData_Controller {
|
|
16
|
+
return DynamoNTS_CustomData_Controller.getSingletonInstance();
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
setupEndpoints(): void {
|
|
20
20
|
this.endpoints = [
|
|
21
21
|
// CUSTOM DATA
|
|
22
|
-
new
|
|
22
|
+
new DynamoNTS_Endpoint_Params({
|
|
23
23
|
name: 'getCustomData',
|
|
24
24
|
type: DynamoNTS_HttpCallType.get,
|
|
25
|
-
endpoint:
|
|
25
|
+
endpoint: DynamoFM_customDataModule_settings.endPoints.getCustomData,
|
|
26
26
|
tasks: [
|
|
27
27
|
async (req: Request, res: Response): Promise<void> => {
|
|
28
|
-
const customDataService = new
|
|
28
|
+
const customDataService = new DynamoFM_CustomData_DataService({
|
|
29
|
+
_id: req.params.customId,
|
|
30
|
+
});
|
|
29
31
|
|
|
30
32
|
await customDataService.getDataById();
|
|
31
33
|
|
|
@@ -33,19 +35,19 @@ export class CustomDataController extends DynamoNTS_Controller {
|
|
|
33
35
|
url: req.url,
|
|
34
36
|
result: 'get custom call was successful!',
|
|
35
37
|
response: customDataService.data,
|
|
36
|
-
request: `.../custom/get/${req.params.customId}
|
|
38
|
+
request: `.../custom/get/${req.params.customId}`,
|
|
37
39
|
});
|
|
38
|
-
}
|
|
39
|
-
]
|
|
40
|
+
},
|
|
41
|
+
],
|
|
40
42
|
}),
|
|
41
43
|
|
|
42
|
-
new
|
|
44
|
+
new DynamoNTS_Endpoint_Params({
|
|
43
45
|
name: 'modifyCustomData',
|
|
44
46
|
type: DynamoNTS_HttpCallType.post,
|
|
45
|
-
endpoint:
|
|
47
|
+
endpoint: DynamoFM_customDataModule_settings.endPoints.modifyCustomData,
|
|
46
48
|
tasks: [
|
|
47
49
|
async (req: Request, res: Response, issuer: string): Promise<void> => {
|
|
48
|
-
const customDataService = new
|
|
50
|
+
const customDataService = new DynamoFM_CustomData_DataService(req.body, issuer);
|
|
49
51
|
|
|
50
52
|
await customDataService.saveData();
|
|
51
53
|
|
|
@@ -56,10 +58,10 @@ export class CustomDataController extends DynamoNTS_Controller {
|
|
|
56
58
|
warning:
|
|
57
59
|
'keep in mind that this is a playground DB, ' +
|
|
58
60
|
'and it will be cleared out from time to time',
|
|
59
|
-
request: req.body
|
|
61
|
+
request: req.body,
|
|
60
62
|
});
|
|
61
|
-
}
|
|
62
|
-
]
|
|
63
|
+
},
|
|
64
|
+
],
|
|
63
65
|
}),
|
|
64
66
|
];
|
|
65
67
|
}
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
DynamoFM_customDataModel_params, DynamoFM_CustomData
|
|
6
|
+
} from '@futdevpro/fsm-dynamo/custom-data-module';
|
|
5
7
|
import { DynamoNTS_DataService } from '../../_services/base/data.service';
|
|
6
8
|
|
|
7
|
-
export class
|
|
9
|
+
export class DynamoFM_CustomData_DataService extends DynamoNTS_DataService<DynamoFM_CustomData> {
|
|
8
10
|
|
|
9
11
|
constructor(
|
|
10
|
-
customData?:
|
|
11
|
-
issuer?: string
|
|
12
|
+
customData?: DynamoFM_CustomData,
|
|
13
|
+
issuer?: string
|
|
12
14
|
) {
|
|
13
15
|
super(
|
|
14
|
-
new
|
|
15
|
-
|
|
16
|
+
new DynamoFM_CustomData(customData),
|
|
17
|
+
DynamoFM_customDataModel_params,
|
|
16
18
|
issuer
|
|
17
19
|
);
|
|
18
20
|
}
|