@futdevpro/nts-dynamo 1.5.88 → 1.5.92
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/_constants/dynamo-nts-global-settings.const.d.ts +3 -0
- package/lib/_constants/dynamo-nts-global-settings.const.d.ts.map +1 -0
- package/lib/_constants/dynamo-nts-global-settings.const.js +18 -0
- package/lib/_constants/dynamo-nts-global-settings.const.js.map +1 -0
- package/lib/_constants/index.d.ts +1 -1
- package/lib/_constants/index.d.ts.map +1 -1
- package/lib/_constants/index.js +1 -1
- package/lib/_constants/index.js.map +1 -1
- package/lib/_enums/http/dynamo-nts-socket-event-type.enum.d.ts +10 -0
- package/lib/_enums/http/dynamo-nts-socket-event-type.enum.d.ts.map +1 -0
- package/lib/_enums/http/dynamo-nts-socket-event-type.enum.js +14 -0
- package/lib/_enums/http/dynamo-nts-socket-event-type.enum.js.map +1 -0
- package/lib/_enums/index.d.ts +1 -1
- package/lib/_enums/index.d.ts.map +1 -1
- package/lib/_enums/index.js +1 -1
- package/lib/_enums/index.js.map +1 -1
- package/lib/_interfaces/dynamo-nts-global-service-settings.interface.d.ts +0 -10
- package/lib/_interfaces/dynamo-nts-global-service-settings.interface.d.ts.map +1 -1
- package/lib/_models/control-models/dynamo-nts-api-call-params.model.d.ts +96 -0
- package/lib/_models/control-models/dynamo-nts-api-call-params.model.d.ts.map +1 -0
- package/lib/_models/control-models/dynamo-nts-api-call-params.model.js +48 -0
- package/lib/_models/control-models/dynamo-nts-api-call-params.model.js.map +1 -0
- package/lib/_models/control-models/dynamo-nts-app-params.model.d.ts +50 -0
- package/lib/_models/control-models/dynamo-nts-app-params.model.d.ts.map +1 -0
- package/lib/_models/control-models/dynamo-nts-app-params.model.js +18 -0
- package/lib/_models/control-models/dynamo-nts-app-params.model.js.map +1 -0
- package/lib/_models/control-models/dynamo-nts-endpoint-params.model.d.ts +81 -0
- package/lib/_models/control-models/dynamo-nts-endpoint-params.model.d.ts.map +1 -0
- package/lib/_models/control-models/dynamo-nts-endpoint-params.model.js +140 -0
- package/lib/_models/control-models/dynamo-nts-endpoint-params.model.js.map +1 -0
- package/lib/_models/control-models/dynamo-nts-socket-client-service-params.model.d.ts +11 -0
- package/lib/_models/control-models/dynamo-nts-socket-client-service-params.model.d.ts.map +1 -0
- package/lib/_models/control-models/dynamo-nts-socket-client-service-params.model.js +14 -0
- package/lib/_models/control-models/dynamo-nts-socket-client-service-params.model.js.map +1 -0
- package/lib/_models/control-models/dynamo-nts-socket-event-params.model.d.ts +33 -0
- package/lib/_models/control-models/dynamo-nts-socket-event-params.model.d.ts.map +1 -0
- package/lib/_models/control-models/dynamo-nts-socket-event-params.model.js +81 -0
- package/lib/_models/control-models/dynamo-nts-socket-event-params.model.js.map +1 -0
- package/lib/_models/control-models/dynamo-nts-socket-event.model.d.ts +33 -0
- package/lib/_models/control-models/dynamo-nts-socket-event.model.d.ts.map +1 -0
- package/lib/_models/control-models/dynamo-nts-socket-event.model.js +81 -0
- package/lib/_models/control-models/dynamo-nts-socket-event.model.js.map +1 -0
- package/lib/_models/control-models/dynamo-nts-socket-presence.model.d.ts +21 -0
- package/lib/_models/control-models/dynamo-nts-socket-presence.model.d.ts.map +1 -0
- package/lib/_models/control-models/dynamo-nts-socket-presence.model.js +45 -0
- package/lib/_models/control-models/dynamo-nts-socket-presence.model.js.map +1 -0
- package/lib/_models/control-models/dynamo-nts-socket-server-service-params.model.d.ts +19 -0
- package/lib/_models/control-models/dynamo-nts-socket-server-service-params.model.d.ts.map +1 -0
- package/lib/_models/control-models/dynamo-nts-socket-server-service-params.model.js +27 -0
- package/lib/_models/control-models/dynamo-nts-socket-server-service-params.model.js.map +1 -0
- package/lib/_models/control-models/index.d.ts +8 -0
- package/lib/_models/control-models/index.d.ts.map +1 -0
- package/lib/_models/control-models/index.js +12 -0
- package/lib/_models/control-models/index.js.map +1 -0
- package/lib/_models/index.d.ts +2 -7
- package/lib/_models/index.d.ts.map +1 -1
- package/lib/_models/index.js +4 -9
- package/lib/_models/index.js.map +1 -1
- package/lib/_models/interfaces/dynamo-nts-certification-settings.interface.d.ts +7 -0
- package/lib/_models/interfaces/dynamo-nts-certification-settings.interface.d.ts.map +1 -0
- package/lib/_models/interfaces/dynamo-nts-certification-settings.interface.js +3 -0
- package/lib/_models/interfaces/dynamo-nts-certification-settings.interface.js.map +1 -0
- package/lib/_models/interfaces/dynamo-nts-global-service-settings.interface.d.ts +18 -0
- package/lib/_models/interfaces/dynamo-nts-global-service-settings.interface.d.ts.map +1 -0
- package/lib/_models/interfaces/dynamo-nts-global-service-settings.interface.js +3 -0
- package/lib/_models/interfaces/dynamo-nts-global-service-settings.interface.js.map +1 -0
- package/lib/_models/interfaces/dynamo-nts-global-settings.interface.d.ts +54 -0
- package/lib/_models/interfaces/dynamo-nts-global-settings.interface.d.ts.map +1 -0
- package/lib/_models/interfaces/dynamo-nts-global-settings.interface.js +3 -0
- package/lib/_models/interfaces/dynamo-nts-global-settings.interface.js.map +1 -0
- package/lib/_models/interfaces/dynamo-nts-port-settings.interface.d.ts +5 -0
- package/lib/_models/interfaces/dynamo-nts-port-settings.interface.d.ts.map +1 -0
- package/lib/_models/interfaces/dynamo-nts-port-settings.interface.js +3 -0
- package/lib/_models/interfaces/dynamo-nts-port-settings.interface.js.map +1 -0
- package/lib/_models/interfaces/dynamo-nts-routing-module-settings.interface.d.ts +20 -0
- package/lib/_models/interfaces/dynamo-nts-routing-module-settings.interface.d.ts.map +1 -0
- package/lib/_models/interfaces/dynamo-nts-routing-module-settings.interface.js +3 -0
- package/lib/_models/interfaces/dynamo-nts-routing-module-settings.interface.js.map +1 -0
- package/lib/_models/interfaces/index.d.ts +6 -0
- package/lib/_models/interfaces/index.d.ts.map +1 -0
- package/lib/_models/interfaces/index.js +10 -0
- package/lib/_models/interfaces/index.js.map +1 -0
- package/lib/_modules/api-service.index.d.ts +1 -1
- package/lib/_modules/api-service.index.d.ts.map +1 -1
- package/lib/_modules/api-service.index.js +1 -1
- package/lib/_modules/api-service.index.js.map +1 -1
- package/lib/_modules/app-extended.index.d.ts +10 -10
- package/lib/_modules/app-extended.index.d.ts.map +1 -1
- package/lib/_modules/app-extended.index.js +11 -11
- package/lib/_modules/app-extended.index.js.map +1 -1
- package/lib/_modules/app.index.d.ts +8 -8
- package/lib/_modules/app.index.d.ts.map +1 -1
- package/lib/_modules/app.index.js +9 -9
- package/lib/_modules/app.index.js.map +1 -1
- package/lib/_modules/controller.index.d.ts +1 -1
- package/lib/_modules/controller.index.d.ts.map +1 -1
- package/lib/_modules/controller.index.js +2 -2
- package/lib/_modules/controller.index.js.map +1 -1
- package/lib/_modules/custom-data/custom-data.controller.d.ts.map +1 -1
- package/lib/_modules/custom-data/custom-data.controller.js +3 -3
- package/lib/_modules/custom-data/custom-data.controller.js.map +1 -1
- package/lib/_modules/test/test.controller.d.ts.map +1 -1
- package/lib/_modules/test/test.controller.js +10 -10
- package/lib/_modules/test/test.controller.js.map +1 -1
- package/lib/_modules/usage/usage-controller.d.ts.map +1 -1
- package/lib/_modules/usage/usage-controller.js +5 -5
- package/lib/_modules/usage/usage-controller.js.map +1 -1
- package/lib/_services/dynamo-nts-api.service.d.ts +1 -1
- package/lib/_services/dynamo-nts-api.service.d.ts.map +1 -1
- package/lib/_services/dynamo-nts-app-extended.d.ts +3 -3
- package/lib/_services/dynamo-nts-app-extended.d.ts.map +1 -1
- package/lib/_services/dynamo-nts-app-extended.js.map +1 -1
- package/lib/_services/dynamo-nts-app.d.ts +9 -5
- package/lib/_services/dynamo-nts-app.d.ts.map +1 -1
- package/lib/_services/dynamo-nts-app.js +4 -4
- package/lib/_services/dynamo-nts-app.js.map +1 -1
- package/lib/_services/dynamo-nts-controller-service-collection.service.d.ts +8 -0
- package/lib/_services/dynamo-nts-controller-service-collection.service.d.ts.map +1 -0
- package/lib/_services/dynamo-nts-controller-service-collection.service.js +11 -0
- package/lib/_services/dynamo-nts-controller-service-collection.service.js.map +1 -0
- package/lib/_services/dynamo-nts-controller.service.d.ts +1 -1
- package/lib/_services/dynamo-nts-controller.service.d.ts.map +1 -1
- package/lib/_services/dynamo-nts-controller.service.js.map +1 -1
- package/lib/_services/dynamo-nts-global.service.d.ts +2 -19
- package/lib/_services/dynamo-nts-global.service.d.ts.map +1 -1
- package/lib/_services/dynamo-nts-global.service.js +0 -49
- package/lib/_services/dynamo-nts-global.service.js.map +1 -1
- package/lib/_services/dynamo-nts-routing-module.service.d.ts +2 -2
- package/lib/_services/dynamo-nts-routing-module.service.d.ts.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.spec.d.ts +0 -1
- package/lib/_services/dynamo-nts-shared.service.spec.js +6 -8
- package/lib/_services/dynamo-nts-shared.service.spec.js.map +1 -1
- package/lib/_services/dynamo-nts-socket-client.service.d.ts +22 -0
- package/lib/_services/dynamo-nts-socket-client.service.d.ts.map +1 -0
- package/lib/_services/dynamo-nts-socket-client.service.js +43 -0
- package/lib/_services/dynamo-nts-socket-client.service.js.map +1 -0
- package/lib/_services/dynamo-nts-socket-server-service-collection.service.d.ts +5 -0
- package/lib/_services/dynamo-nts-socket-server-service-collection.service.d.ts.map +1 -0
- package/lib/_services/dynamo-nts-socket-server-service-collection.service.js +15 -0
- package/lib/_services/dynamo-nts-socket-server-service-collection.service.js.map +1 -0
- package/lib/_services/dynamo-nts-socket-server.service.d.ts +56 -0
- package/lib/_services/dynamo-nts-socket-server.service.d.ts.map +1 -0
- package/lib/_services/dynamo-nts-socket-server.service.js +188 -0
- package/lib/_services/dynamo-nts-socket-server.service.js.map +1 -0
- package/lib/_services/dynamo-nts-socket-service-collection.service.d.ts +1 -6
- package/lib/_services/dynamo-nts-socket-service-collection.service.d.ts.map +1 -1
- package/lib/_services/dynamo-nts-socket-service-collection.service.js +9 -8
- package/lib/_services/dynamo-nts-socket-service-collection.service.js.map +1 -1
- package/lib/_services/dynamo-nts-socket.service.d.ts +0 -1
- package/lib/_services/dynamo-nts-socket.service.d.ts.map +1 -1
- package/lib/_services/dynamo-nts-socket.service.js +4 -5
- package/lib/_services/dynamo-nts-socket.service.js.map +1 -1
- package/lib/_services/index.d.ts +2 -2
- package/lib/_services/index.d.ts.map +1 -1
- package/lib/_services/index.js +2 -2
- package/lib/_services/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -17
- package/src/_constants/{dynamo-nts-global-settings.ts → dynamo-nts-global-settings.const.ts} +1 -1
- package/src/_constants/index.ts +1 -1
- package/src/_enums/http/{dynamo-nts-socket-event.enum.ts → dynamo-nts-socket-event-type.enum.ts} +1 -1
- package/src/_enums/index.ts +1 -1
- package/src/_models/{dynamo-nts-api-call-params.ts → control-models/dynamo-nts-api-call-params.model.ts} +2 -2
- package/src/_models/{dynamo-nts-endpoint-params.ts → control-models/dynamo-nts-endpoint-params.model.ts} +4 -4
- package/src/_models/control-models/dynamo-nts-socket-client-service-params.model.ts +17 -0
- package/src/_models/{dynamo-nts-socket-event-params.ts → control-models/dynamo-nts-socket-event.model.ts} +6 -6
- package/src/_models/{dynamo-nts-socket-service-params.ts → control-models/dynamo-nts-socket-server-service-params.model.ts} +3 -3
- package/src/_models/control-models/index.ts +11 -0
- package/src/_models/index.ts +4 -10
- package/src/{_interfaces → _models/interfaces}/dynamo-nts-global-service-settings.interface.ts +4 -6
- package/src/_models/{dynamo-nts-global-settings.ts → interfaces/dynamo-nts-global-settings.interface.ts} +2 -2
- package/src/_models/{dynamo-nts-routing-module-settings.ts → interfaces/dynamo-nts-routing-module-settings.interface.ts} +2 -2
- package/src/_models/interfaces/index.ts +7 -0
- package/src/_modules/api-service.index.ts +1 -1
- package/src/_modules/app-extended.index.ts +11 -11
- package/src/_modules/app.index.ts +9 -9
- package/src/_modules/controller.index.ts +2 -2
- package/src/_modules/custom-data/custom-data.controller.ts +3 -2
- package/src/_modules/custom-data/get-custom-data-routing-module.ts +1 -1
- package/src/_modules/test/get-test-routing-module.ts +1 -1
- package/src/_modules/test/test.controller.ts +4 -2
- package/src/_modules/usage/get-usage-routing-module.ts +1 -1
- package/src/_modules/usage/usage-controller.ts +3 -1
- package/src/_services/dynamo-nts-api.service.ts +1 -1
- package/src/_services/dynamo-nts-app-extended.ts +8 -8
- package/src/_services/dynamo-nts-app.ts +16 -7
- package/src/_services/dynamo-nts-controller.service.ts +1 -1
- package/src/_services/dynamo-nts-global.service.ts +8 -15
- package/src/_services/dynamo-nts-routing-module.service.ts +3 -3
- package/src/_services/dynamo-nts-shared.service.spec.ts +4 -4
- package/src/_services/dynamo-nts-socket-client.service.ts +63 -0
- package/src/_services/{dynamo-nts-socket-service-collection.service.ts → dynamo-nts-socket-server-service-collection.service.ts} +3 -3
- package/src/_services/{dynamo-nts-socket.service.ts → dynamo-nts-socket-server.service.ts} +32 -34
- package/src/_services/index.ts +2 -2
- package/src/_interfaces/index.ts +0 -5
- /package/src/_models/{dynamo-nts-app-params.ts → control-models/dynamo-nts-app-params.model.ts} +0 -0
- /package/src/_models/{dynamo-nts-socket-presence.ts → control-models/dynamo-nts-socket-presence.model.ts} +0 -0
- /package/src/{_interfaces → _models/interfaces}/dynamo-nts-certification-settings.interface.ts +0 -0
- /package/src/{_interfaces → _models/interfaces}/dynamo-nts-port-settings.interface.ts +0 -0
- /package/src/_services/{dynamo-nts-simple-service-collection.service.ts → dynamo-nts-controller-service-collection.service.ts} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { Dynamo_Log } from '@futdevpro/fsm-dynamo';
|
|
3
|
-
import { DynamoNTS_HttpCallType } from "
|
|
4
|
-
import { DynamoNTS_HttpResponseType } from "
|
|
3
|
+
import { DynamoNTS_HttpCallType } from "../../_enums/http/dynamo-nts-http-call-type.enum";
|
|
4
|
+
import { DynamoNTS_HttpResponseType } from "../../_enums/http/dynamo-nts-http-response-type.enum";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* API call params,
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
import { NextFunction, Request, Response } from 'express';
|
|
4
4
|
|
|
5
|
-
import { DynamoNTS_HttpCallType } from '../_enums/http/dynamo-nts-http-call-type.enum';
|
|
6
|
-
import { DynamoNTS_RouteSecurity } from '../_enums/dynamo-nts-route-security.enum';
|
|
7
|
-
import { DynamoNTS_GlobalService } from '../_services/dynamo-nts-global.service';
|
|
8
|
-
import { dynamoNTS_GlobalSettings } from '../_constants';
|
|
9
5
|
import { Dynamo_Error, Dynamo_Log } from '@futdevpro/fsm-dynamo';
|
|
6
|
+
import { DynamoNTS_RouteSecurity } from '../../_enums/dynamo-nts-route-security.enum';
|
|
7
|
+
import { DynamoNTS_HttpCallType } from '../../_enums/http/dynamo-nts-http-call-type.enum';
|
|
8
|
+
import { dynamoNTS_GlobalSettings } from '../../_constants/dynamo-nts-global-settings.const';
|
|
9
|
+
import { DynamoNTS_GlobalService } from '../../_services/dynamo-nts-global.service';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* High level endpoint for API
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* socket handling and clarification is under development
|
|
5
|
+
*/
|
|
6
|
+
export class DynamoNTS_SocketClientServiceParams {
|
|
7
|
+
service: string;
|
|
8
|
+
name: string;
|
|
9
|
+
address: string = 'http://localhost:';
|
|
10
|
+
port: number;
|
|
11
|
+
|
|
12
|
+
constructor(
|
|
13
|
+
set: DynamoNTS_SocketClientServiceParams
|
|
14
|
+
) {
|
|
15
|
+
Object.assign(this, set);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
import { dynamoNTS_GlobalSettings } from '../_constants';
|
|
4
|
-
import { DynamoNTS_SocketEvent } from '../_enums/http/dynamo-nts-socket-event.enum';
|
|
5
3
|
import { Dynamo_Log } from '@futdevpro/fsm-dynamo';
|
|
4
|
+
import { dynamoNTS_GlobalSettings } from '../../_constants/dynamo-nts-global-settings.const';
|
|
5
|
+
import { DynamoNTS_SocketEventType } from '../../_enums/http/dynamo-nts-socket-event-type.enum';
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
export type DynamoNTS_SocketEventPreprocessTask<T_EventContent> = (content?: any, issuer?: string) => Promise<T_EventContent>;
|
|
@@ -11,9 +11,9 @@ export type DynamoNTS_SocketEventTask = (content?: any, issuer?: string) => Prom
|
|
|
11
11
|
/**
|
|
12
12
|
* socket handling and clarification is under development
|
|
13
13
|
*/
|
|
14
|
-
export class
|
|
14
|
+
export class DynamoNTS_SocketEvent<T_EventContent>{
|
|
15
15
|
socketName?: string;
|
|
16
|
-
event:
|
|
16
|
+
event: DynamoNTS_SocketEventType | string;
|
|
17
17
|
|
|
18
18
|
preProcessess?: DynamoNTS_SocketEventPreprocessTask<T_EventContent>[];
|
|
19
19
|
tasks: DynamoNTS_SocketEventTask[];
|
|
@@ -24,7 +24,7 @@ export class DynamoNTS_SocketEventParams<T_EventContent>{
|
|
|
24
24
|
constructor(
|
|
25
25
|
set: {
|
|
26
26
|
socketName?: string,
|
|
27
|
-
event:
|
|
27
|
+
event: DynamoNTS_SocketEventType | string,
|
|
28
28
|
|
|
29
29
|
preProcessess?: DynamoNTS_SocketEventPreprocessTask<T_EventContent>[],
|
|
30
30
|
tasks?: DynamoNTS_SocketEventTask[],
|
|
@@ -42,7 +42,7 @@ export class DynamoNTS_SocketEventParams<T_EventContent>{
|
|
|
42
42
|
|
|
43
43
|
if (set.logEvent !== undefined) {
|
|
44
44
|
this.logEvent = set.logEvent;
|
|
45
|
-
} else if (this.event ===
|
|
45
|
+
} else if (this.event === DynamoNTS_SocketEventType.connection || this.event === DynamoNTS_SocketEventType.disconnect) {
|
|
46
46
|
this.logEvent = dynamoNTS_GlobalSettings.logMainSocketEvent;
|
|
47
47
|
} else {
|
|
48
48
|
this.logEvent = dynamoNTS_GlobalSettings.logAllSocketEvent;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
2
|
import { Dynamo_Log } from '@futdevpro/fsm-dynamo';
|
|
3
|
-
import { dynamoNTS_GlobalSettings } from '
|
|
4
|
-
import { DynamoNTS_SocketSecurity } from '
|
|
3
|
+
import { dynamoNTS_GlobalSettings } from '../../_constants/dynamo-nts-global-settings.const';
|
|
4
|
+
import { DynamoNTS_SocketSecurity } from '../../_enums/dynamo-nts-socket-security.enum';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* socket handling and clarification is under development
|
|
8
8
|
*/
|
|
9
|
-
export class
|
|
9
|
+
export class DynamoNTS_SocketServerServiceParams {
|
|
10
10
|
name: string;
|
|
11
11
|
port: number;
|
|
12
12
|
security?: DynamoNTS_SocketSecurity;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
// MODELS
|
|
4
|
+
export * from './dynamo-nts-api-call-params.model';
|
|
5
|
+
export * from './dynamo-nts-app-params.model';
|
|
6
|
+
export * from './dynamo-nts-endpoint-params.model';
|
|
7
|
+
export * from './dynamo-nts-socket-client-service-params.model';
|
|
8
|
+
export * from './dynamo-nts-socket-event.model';
|
|
9
|
+
export * from './dynamo-nts-socket-presence.model';
|
|
10
|
+
export * from './dynamo-nts-socket-server-service-params.model';
|
|
11
|
+
|
package/src/_models/index.ts
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
|
|
2
|
+
// INTERFACES
|
|
3
|
+
export * from './interfaces';
|
|
2
4
|
|
|
3
|
-
// MODELS
|
|
4
|
-
export * from './
|
|
5
|
-
//export * from './dynamo-nts-app-params';
|
|
6
|
-
export * from './dynamo-nts-endpoint-params';
|
|
7
|
-
export * from './dynamo-nts-global-settings';
|
|
8
|
-
export * from './dynamo-nts-routing-module-settings';
|
|
9
|
-
export * from './dynamo-nts-socket-event-params';
|
|
10
|
-
export * from './dynamo-nts-socket-service-params';
|
|
11
|
-
export * from './dynamo-nts-socket-presence';
|
|
12
|
-
|
|
5
|
+
// CONTROL MODELS
|
|
6
|
+
export * from './control-models';
|
package/src/{_interfaces → _models/interfaces}/dynamo-nts-global-service-settings.interface.ts
RENAMED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
import { Dynamo_DataParams } from '@futdevpro/fsm-dynamo';
|
|
3
|
-
import { DynamoNTS_SocketServiceCollection } from '../_services';
|
|
4
3
|
|
|
5
|
-
import { DynamoNTS_AuthService } from '
|
|
6
|
-
import { DynamoNTS_EmailServiceCollection } from '
|
|
7
|
-
import { DynamoNTS_SimpleServiceCollection } from '../_services/dynamo-nts-simple-service-collection.service';
|
|
4
|
+
import { DynamoNTS_AuthService } from '../../_services/dynamo-nts-auth.service';
|
|
5
|
+
import { DynamoNTS_EmailServiceCollection } from '../../_services/dynamo-nts-email-service-collection.service';
|
|
8
6
|
|
|
9
7
|
export interface DynamoNTS_GlobalServiceSettings {
|
|
10
8
|
/**
|
|
@@ -25,11 +23,11 @@ export interface DynamoNTS_GlobalServiceSettings {
|
|
|
25
23
|
/**
|
|
26
24
|
* you can setup other services by passing a DynamoNTS_SingletonService list at this point
|
|
27
25
|
*/
|
|
28
|
-
simpleServicesCollection?: DynamoNTS_SimpleServiceCollection,
|
|
26
|
+
/* simpleServicesCollection?: DynamoNTS_SimpleServiceCollection, */
|
|
29
27
|
|
|
30
28
|
/**
|
|
31
29
|
* you can setup socket services by passing a DynamoNTS_SocketServiceCollection list at this point
|
|
32
30
|
*/
|
|
33
|
-
socketServiceCollection?: DynamoNTS_SocketServiceCollection,
|
|
31
|
+
/* socketServiceCollection?: DynamoNTS_SocketServiceCollection, */
|
|
34
32
|
}
|
|
35
33
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DynamoNTS_RouteSecurity } from '
|
|
2
|
-
import { DynamoNTS_SocketSecurity } from '
|
|
1
|
+
import { DynamoNTS_RouteSecurity } from '../../_enums/dynamo-nts-route-security.enum';
|
|
2
|
+
import { DynamoNTS_SocketSecurity } from '../../_enums/dynamo-nts-socket-security.enum';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DynamoNTS_RouteSecurity } from '
|
|
2
|
-
import { DynamoNTS_Controller } from '
|
|
1
|
+
import { DynamoNTS_RouteSecurity } from '../../_enums';
|
|
2
|
+
import { DynamoNTS_Controller } from '../../_services';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* This is a main route point handler, which collects a list of controllers for the API
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
|
|
2
|
+
// INTERFACES
|
|
3
|
+
export * from './dynamo-nts-global-service-settings.interface';
|
|
4
|
+
export * from './dynamo-nts-port-settings.interface';
|
|
5
|
+
export * from './dynamo-nts-certification-settings.interface';
|
|
6
|
+
export * from './dynamo-nts-global-settings.interface';
|
|
7
|
+
export * from './dynamo-nts-routing-module-settings.interface';
|
|
@@ -4,7 +4,7 @@ export * from '../_services/dynamo-nts-api.service';
|
|
|
4
4
|
export * from '../_services/dynamo-nts-singleton.service';
|
|
5
5
|
|
|
6
6
|
// MODELS
|
|
7
|
-
export * from '../_models/dynamo-nts-api-call-params';
|
|
7
|
+
export * from '../_models/control-models/dynamo-nts-api-call-params.model';
|
|
8
8
|
export * from '@futdevpro/fsm-dynamo/error-module';
|
|
9
9
|
|
|
10
10
|
// ENUMS
|
|
@@ -4,23 +4,23 @@ export * from '../_services/dynamo-nts-app-extended';
|
|
|
4
4
|
export * from '../_services/dynamo-nts-global.service';
|
|
5
5
|
export * from '../_services/dynamo-nts-routing-module.service';
|
|
6
6
|
export * from '../_services/dynamo-nts-shared.service';
|
|
7
|
-
export * from '../_services/dynamo-nts-socket.service';
|
|
7
|
+
export * from '../_services/dynamo-nts-socket-server.service';
|
|
8
8
|
|
|
9
9
|
// INTERFACES
|
|
10
|
-
export * from '../
|
|
11
|
-
export * from '../
|
|
12
|
-
export * from '../
|
|
10
|
+
export * from '../_models/interfaces/dynamo-nts-global-service-settings.interface';
|
|
11
|
+
export * from '../_models/interfaces/dynamo-nts-port-settings.interface';
|
|
12
|
+
export * from '../_models/interfaces/dynamo-nts-certification-settings.interface';
|
|
13
|
+
export * from '../_models/interfaces/dynamo-nts-global-settings.interface';
|
|
14
|
+
export * from '../_models/interfaces/dynamo-nts-routing-module-settings.interface';
|
|
13
15
|
|
|
14
|
-
// MODELS
|
|
15
|
-
export * from '../_models/dynamo-nts-app-params';
|
|
16
|
-
export * from '../_models/dynamo-nts-endpoint-params';
|
|
17
|
-
export * from '../_models/dynamo-nts-
|
|
18
|
-
export * from '../_models/dynamo-nts-routing-module-settings';
|
|
19
|
-
export * from '../_models/dynamo-nts-socket-presence';
|
|
16
|
+
// CONTROL MODELS
|
|
17
|
+
export * from '../_models/control-models/dynamo-nts-app-params.model';
|
|
18
|
+
export * from '../_models/control-models/dynamo-nts-endpoint-params.model';
|
|
19
|
+
export * from '../_models/control-models/dynamo-nts-socket-presence.model';
|
|
20
20
|
|
|
21
21
|
// ENUMS
|
|
22
22
|
export * from '../_enums/dynamo-nts-route-security.enum';
|
|
23
23
|
|
|
24
24
|
// CONSTANTS
|
|
25
|
-
export * from '../_constants/dynamo-nts-global-settings';
|
|
25
|
+
export * from '../_constants/dynamo-nts-global-settings.const';
|
|
26
26
|
|
|
@@ -6,19 +6,19 @@ export * from '../_services/dynamo-nts-routing-module.service';
|
|
|
6
6
|
export * from '../_services/dynamo-nts-shared.service';
|
|
7
7
|
|
|
8
8
|
// INTERFACES
|
|
9
|
-
export * from '../
|
|
10
|
-
export * from '../
|
|
11
|
-
export * from '../
|
|
9
|
+
export * from '../_models/interfaces/dynamo-nts-global-service-settings.interface';
|
|
10
|
+
export * from '../_models/interfaces/dynamo-nts-port-settings.interface';
|
|
11
|
+
export * from '../_models/interfaces/dynamo-nts-certification-settings.interface';
|
|
12
|
+
export * from '../_models/interfaces/dynamo-nts-global-settings.interface';
|
|
13
|
+
export * from '../_models/interfaces/dynamo-nts-routing-module-settings.interface';
|
|
12
14
|
|
|
13
|
-
// MODELS
|
|
14
|
-
export * from '../_models/dynamo-nts-app-params';
|
|
15
|
-
export * from '../_models/dynamo-nts-endpoint-params';
|
|
16
|
-
export * from '../_models/dynamo-nts-global-settings';
|
|
17
|
-
export * from '../_models/dynamo-nts-routing-module-settings';
|
|
15
|
+
// CONTROL MODELS
|
|
16
|
+
export * from '../_models/control-models/dynamo-nts-app-params.model';
|
|
17
|
+
export * from '../_models/control-models/dynamo-nts-endpoint-params.model';
|
|
18
18
|
|
|
19
19
|
// ENUMS
|
|
20
20
|
export * from '../_enums/dynamo-nts-route-security.enum';
|
|
21
21
|
|
|
22
22
|
// CONSTANTS
|
|
23
|
-
export * from '../_constants/dynamo-nts-global-settings';
|
|
23
|
+
export * from '../_constants/dynamo-nts-global-settings.const';
|
|
24
24
|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// SERVICES
|
|
3
3
|
export * from '../_services/dynamo-nts-controller.service';
|
|
4
4
|
|
|
5
|
-
// MODELS
|
|
6
|
-
export * from '../_models/dynamo-nts-endpoint-params';
|
|
5
|
+
// CONTROL MODELS
|
|
6
|
+
export * from '../_models/control-models/dynamo-nts-endpoint-params.model';
|
|
7
7
|
|
|
8
8
|
// ENUMS
|
|
9
9
|
export * from '../_enums/dynamo-nts-route-security.enum';
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
|
|
2
|
+
import { Request, Response } from 'express';
|
|
2
3
|
|
|
3
4
|
import { customDataModuleSettings } from '@futdevpro/fsm-dynamo';
|
|
4
|
-
|
|
5
|
+
|
|
5
6
|
import { DynamoNTS_HttpCallType } from '../../_enums/http/dynamo-nts-http-call-type.enum';
|
|
6
|
-
import { DynamoNTS_EndpointParams } from '../../_models/dynamo-nts-endpoint-params';
|
|
7
7
|
import { DynamoNTS_Controller } from '../../_services/dynamo-nts-controller.service';
|
|
8
8
|
import { Dynamo_CustomDataService } from '../custom-data/custom-data.service';
|
|
9
|
+
import { DynamoNTS_EndpointParams } from '../../_models/control-models/dynamo-nts-endpoint-params.model';
|
|
9
10
|
|
|
10
11
|
export class CustomDataController extends DynamoNTS_Controller {
|
|
11
12
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { customDataModuleSettings } from '@futdevpro/fsm-dynamo';
|
|
3
3
|
import { DynamoNTS_RouteSecurity } from '../../_enums/dynamo-nts-route-security.enum';
|
|
4
|
-
import { DynamoNTS_RoutingModuleSettings } from '../../_models/dynamo-nts-routing-module-settings';
|
|
4
|
+
import { DynamoNTS_RoutingModuleSettings } from '../../_models/interfaces/dynamo-nts-routing-module-settings.interface';
|
|
5
5
|
import { DynamoNTS_RoutingModule } from '../../_services/dynamo-nts-routing-module.service';
|
|
6
6
|
import { CustomDataController } from './custom-data.controller';
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { testModuleSettings } from '@futdevpro/fsm-dynamo/test-module';
|
|
3
3
|
import { DynamoNTS_RouteSecurity } from '../../_enums/dynamo-nts-route-security.enum';
|
|
4
|
-
import { DynamoNTS_RoutingModuleSettings } from '../../_models/dynamo-nts-routing-module-settings';
|
|
4
|
+
import { DynamoNTS_RoutingModuleSettings } from '../../_models/interfaces/dynamo-nts-routing-module-settings.interface';
|
|
5
5
|
import { DynamoNTS_RoutingModule } from '../../_services/dynamo-nts-routing-module.service';
|
|
6
6
|
import { TestController } from './test.controller';
|
|
7
7
|
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
|
|
2
2
|
import { Request, Response } from 'express';
|
|
3
|
+
|
|
3
4
|
import { testModuleSettings } from '@futdevpro/fsm-dynamo/test-module';
|
|
5
|
+
|
|
4
6
|
import { DynamoNTS_HttpCallType } from '../../_enums/http/dynamo-nts-http-call-type.enum';
|
|
5
|
-
import { DynamoNTS_EndpointParams } from '../../_models/dynamo-nts-endpoint-params';
|
|
6
7
|
import { DynamoNTS_Controller } from '../../_services/dynamo-nts-controller.service';
|
|
7
|
-
import {
|
|
8
|
+
import { DynamoNTS_EndpointParams } from '../../_models/control-models/dynamo-nts-endpoint-params.model';
|
|
9
|
+
import { DynamoNTS_GlobalService } from '../../_services/dynamo-nts-global.service';
|
|
8
10
|
|
|
9
11
|
export class TestController extends DynamoNTS_Controller {
|
|
10
12
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { usageModuleSettings } from '@futdevpro/fsm-dynamo/usage-module';
|
|
3
3
|
import { DynamoNTS_RouteSecurity } from '../../_enums/dynamo-nts-route-security.enum';
|
|
4
|
-
import { DynamoNTS_RoutingModuleSettings } from '../../_models/dynamo-nts-routing-module-settings';
|
|
4
|
+
import { DynamoNTS_RoutingModuleSettings } from '../../_models/interfaces/dynamo-nts-routing-module-settings.interface';
|
|
5
5
|
import { DynamoNTS_RoutingModule } from '../../_services/dynamo-nts-routing-module.service';
|
|
6
6
|
import { UsageController } from './usage-controller';
|
|
7
7
|
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
|
|
2
2
|
import { Request, Response } from 'express';
|
|
3
|
+
|
|
3
4
|
import { usageModuleSettings, Dynamo_UsageSession } from '@futdevpro/fsm-dynamo/usage-module';
|
|
5
|
+
|
|
4
6
|
import { DynamoNTS_HttpCallType } from '../../_enums/http/dynamo-nts-http-call-type.enum';
|
|
5
|
-
import { DynamoNTS_EndpointParams } from '../../_models/dynamo-nts-endpoint-params';
|
|
6
7
|
import { DynamoNTS_AuthService } from '../../_services/dynamo-nts-auth.service';
|
|
7
8
|
import { DynamoNTS_Controller } from '../../_services/dynamo-nts-controller.service';
|
|
8
9
|
import { DynamoNTS_GlobalService } from '../../_services/dynamo-nts-global.service';
|
|
10
|
+
import { DynamoNTS_EndpointParams } from '../../_models/control-models/dynamo-nts-endpoint-params.model';
|
|
9
11
|
import { UsageService } from './usage.service';
|
|
10
12
|
|
|
11
13
|
export class UsageController extends DynamoNTS_Controller {
|
|
@@ -4,7 +4,7 @@ import { Dynamo_Error, Dynamo_Log } from '@futdevpro/fsm-dynamo';
|
|
|
4
4
|
|
|
5
5
|
import { DynamoNTS_HttpCallType } from '../_enums/http/dynamo-nts-http-call-type.enum';
|
|
6
6
|
import { DynamoNTS_HttpResponseType } from '../_enums/http/dynamo-nts-http-response-type.enum';
|
|
7
|
-
import { DynamoNTS_ApiCallParams } from '../_models/dynamo-nts-api-call-params';
|
|
7
|
+
import { DynamoNTS_ApiCallParams } from '../_models/control-models/dynamo-nts-api-call-params.model';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* This predefined Api service contains the basic API call function which can be used in various ways
|
|
@@ -6,7 +6,7 @@ import { Dynamo_Log } from '@futdevpro/fsm-dynamo';
|
|
|
6
6
|
|
|
7
7
|
import { DynamoNTS_App } from './dynamo-nts-app';
|
|
8
8
|
import { DynamoNTS_RouteSecurity } from '../_enums/dynamo-nts-route-security.enum';
|
|
9
|
-
import {
|
|
9
|
+
import { DynamoNTS_SocketServerService } from './dynamo-nts-socket-server.service';
|
|
10
10
|
import { DynamoNTS_SocketSecurity } from '../_enums/dynamo-nts-socket-security.enum';
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -122,7 +122,7 @@ export abstract class DynamoNTS_AppExtended extends DynamoNTS_App {
|
|
|
122
122
|
* ...
|
|
123
123
|
* ];
|
|
124
124
|
*/
|
|
125
|
-
protected socketServices:
|
|
125
|
+
protected socketServices: DynamoNTS_SocketServerService<any>[];
|
|
126
126
|
|
|
127
127
|
constructor(){
|
|
128
128
|
super();
|
|
@@ -151,7 +151,7 @@ export abstract class DynamoNTS_AppExtended extends DynamoNTS_App {
|
|
|
151
151
|
*
|
|
152
152
|
*/
|
|
153
153
|
private setSocketSecurity(): void {
|
|
154
|
-
this.socketServices.forEach((service:
|
|
154
|
+
this.socketServices.forEach((service: DynamoNTS_SocketServerService<any>) => {
|
|
155
155
|
if (!this.socketSecurity) {
|
|
156
156
|
this.socketSecurity = DynamoNTS_RouteSecurity[service.security];
|
|
157
157
|
} else if (this.socketSecurity !== DynamoNTS_RouteSecurity.both && this.socketSecurity !== DynamoNTS_RouteSecurity[service.security]) {
|
|
@@ -187,7 +187,7 @@ export abstract class DynamoNTS_AppExtended extends DynamoNTS_App {
|
|
|
187
187
|
`\nin DynamoBEServer - setupRoutingModules() to enable secure routes.`;
|
|
188
188
|
|
|
189
189
|
errorMsg += '\n\nThe socket services setted to use secure server:';
|
|
190
|
-
this.socketServices.forEach((service:
|
|
190
|
+
this.socketServices.forEach((service: DynamoNTS_SocketServerService<any>) => {
|
|
191
191
|
if (service.security != DynamoNTS_SocketSecurity.open) {
|
|
192
192
|
errorMsg += `\n ${service.name} (port: ${service.port})`;
|
|
193
193
|
}
|
|
@@ -204,9 +204,9 @@ export abstract class DynamoNTS_AppExtended extends DynamoNTS_App {
|
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
206
|
|
|
207
|
-
this.socketServices.forEach((service:
|
|
208
|
-
const existingPorts:
|
|
209
|
-
(mod:
|
|
207
|
+
this.socketServices.forEach((service: DynamoNTS_SocketServerService<any>) => {
|
|
208
|
+
const existingPorts: DynamoNTS_SocketServerService<any>[] = this.socketServices.filter(
|
|
209
|
+
(mod: DynamoNTS_SocketServerService<any>) => mod.port === service.port
|
|
210
210
|
);
|
|
211
211
|
|
|
212
212
|
if (1 < existingPorts.length || this.ports.httpPort === service.port || this.ports.httpsPort === service.port) {
|
|
@@ -240,5 +240,5 @@ export abstract class DynamoNTS_AppExtended extends DynamoNTS_App {
|
|
|
240
240
|
/**
|
|
241
241
|
* MISSING Description (TODO)
|
|
242
242
|
*/
|
|
243
|
-
abstract getSocketServices():
|
|
243
|
+
abstract getSocketServices(): DynamoNTS_SocketServerService<any>[];
|
|
244
244
|
}
|
|
@@ -7,16 +7,16 @@ import * as BodyParser from 'body-parser';
|
|
|
7
7
|
|
|
8
8
|
import { Dynamo_Log } from '@futdevpro/fsm-dynamo';
|
|
9
9
|
|
|
10
|
-
import { DynamoNTS_AppParams } from '../_models/dynamo-nts-app-params';
|
|
11
10
|
import { DynamoNTS_SingletonService } from './dynamo-nts-singleton.service';
|
|
12
11
|
import { DynamoNTS_RouteSecurity } from '../_enums/dynamo-nts-route-security.enum';
|
|
13
12
|
import { DynamoNTS_RoutingModule } from './dynamo-nts-routing-module.service';
|
|
14
|
-
import { DynamoNTS_EndpointParams } from '../_models/dynamo-nts-endpoint-params';
|
|
15
13
|
import { DynamoNTS_GlobalService } from './dynamo-nts-global.service';
|
|
16
|
-
import { DynamoNTS_PortSettings } from '../
|
|
17
|
-
import { DynamoNTS_CertificationSettings } from '../
|
|
18
|
-
import { DynamoNTS_GlobalServiceSettings } from '../
|
|
19
|
-
import { dynamoNTS_GlobalSettings } from '../_constants/dynamo-nts-global-settings';
|
|
14
|
+
import { DynamoNTS_PortSettings } from '../_models/interfaces/dynamo-nts-port-settings.interface';
|
|
15
|
+
import { DynamoNTS_CertificationSettings } from '../_models/interfaces/dynamo-nts-certification-settings.interface';
|
|
16
|
+
import { DynamoNTS_GlobalServiceSettings } from '../_models/interfaces/dynamo-nts-global-service-settings.interface';
|
|
17
|
+
import { dynamoNTS_GlobalSettings } from '../_constants/dynamo-nts-global-settings.const';
|
|
18
|
+
import { DynamoNTS_AppParams } from '../_models/control-models/dynamo-nts-app-params.model';
|
|
19
|
+
import { DynamoNTS_EndpointParams } from '../_models/control-models/dynamo-nts-endpoint-params.model';
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* This will be the MAIN service of our server project,
|
|
@@ -149,7 +149,9 @@ export abstract class DynamoNTS_App extends DynamoNTS_SingletonService {
|
|
|
149
149
|
protected httpsServer: Https.Server;
|
|
150
150
|
|
|
151
151
|
private _routingModules: DynamoNTS_RoutingModule[];
|
|
152
|
-
protected get routingModules(): DynamoNTS_RoutingModule[] { return this._routingModules; }
|
|
152
|
+
/* protected get routingModules(): DynamoNTS_RoutingModule[] { return this._routingModules; } */
|
|
153
|
+
|
|
154
|
+
private _rootServices: DynamoNTS_SingletonService[];
|
|
153
155
|
|
|
154
156
|
/**
|
|
155
157
|
* setting this value to true, enables this service debug logs
|
|
@@ -208,6 +210,8 @@ export abstract class DynamoNTS_App extends DynamoNTS_SingletonService {
|
|
|
208
210
|
console.log(`\nRoutes mounted.... server using security: ${this._security}`);
|
|
209
211
|
}
|
|
210
212
|
}
|
|
213
|
+
|
|
214
|
+
this._rootServices = this.getRootServices() ?? [];
|
|
211
215
|
|
|
212
216
|
if (this.postProcess) {
|
|
213
217
|
this.postProcess();
|
|
@@ -525,6 +529,11 @@ export abstract class DynamoNTS_App extends DynamoNTS_SingletonService {
|
|
|
525
529
|
* }
|
|
526
530
|
*/
|
|
527
531
|
abstract getRoutingModules(): DynamoNTS_RoutingModule[];
|
|
532
|
+
|
|
533
|
+
/**
|
|
534
|
+
* MISSING Description (TODO)
|
|
535
|
+
*/
|
|
536
|
+
getRootServices?(): DynamoNTS_SingletonService[];
|
|
528
537
|
|
|
529
538
|
/**
|
|
530
539
|
* MISSING Description (TODO)
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
3
|
import { Dynamo_Log } from '@futdevpro/fsm-dynamo';
|
|
4
|
+
import { DynamoNTS_EndpointParams } from '../_models/control-models/dynamo-nts-endpoint-params.model';
|
|
4
5
|
|
|
5
6
|
import { DynamoNTS_SingletonService } from './dynamo-nts-singleton.service';
|
|
6
|
-
import { DynamoNTS_EndpointParams } from '../_models/dynamo-nts-endpoint-params';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Basic controller for endpoint handlings
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
3
|
import { Dynamo_Metadata, Dynamo_DataParams, Dynamo_Log } from '@futdevpro/fsm-dynamo';
|
|
4
|
+
import { DynamoNTS_AppParams } from '../_models/control-models/dynamo-nts-app-params.model';
|
|
4
5
|
|
|
5
|
-
import { DynamoNTS_GlobalServiceSettings } from '../
|
|
6
|
-
import { DynamoNTS_AppParams } from '../_models/dynamo-nts-app-params';
|
|
6
|
+
import { DynamoNTS_GlobalServiceSettings } from '../_models/interfaces/dynamo-nts-global-service-settings.interface';
|
|
7
7
|
|
|
8
8
|
import { DynamoNTS_AuthService } from './dynamo-nts-auth.service';
|
|
9
9
|
import { DynamoNTS_DBServiceCollection } from './dynamo-nts-db-service-collection.service';
|
|
10
10
|
import { DynamoNTS_DBService } from './dynamo-nts-db.service';
|
|
11
11
|
import { DynamoNTS_EmailServiceCollection } from './dynamo-nts-email-service-collection.service';
|
|
12
|
-
import { DynamoNTS_SimpleServiceCollection } from './dynamo-nts-simple-service-collection.service';
|
|
13
12
|
import { DynamoNTS_SingletonService } from './dynamo-nts-singleton.service';
|
|
14
|
-
import { DynamoNTS_SocketServiceCollection } from './dynamo-nts-socket-service-collection.service';
|
|
15
|
-
import { DynamoNTS_SocketService } from './dynamo-nts-socket.service';
|
|
16
13
|
|
|
17
14
|
/**
|
|
18
15
|
* This is the main Global/Core Service Collection used by DynamoBE,
|
|
@@ -35,8 +32,6 @@ export class DynamoNTS_GlobalService extends DynamoNTS_SingletonService {
|
|
|
35
32
|
authService: DynamoNTS_AuthService;
|
|
36
33
|
dbServiceCollection: DynamoNTS_DBServiceCollection;
|
|
37
34
|
emailServiceCollection: DynamoNTS_EmailServiceCollection;
|
|
38
|
-
socketServiceCollection: DynamoNTS_SocketServiceCollection;
|
|
39
|
-
simpleServicesCollection: DynamoNTS_SimpleServiceCollection;
|
|
40
35
|
|
|
41
36
|
/**
|
|
42
37
|
* You need to setup global Services through this function
|
|
@@ -56,8 +51,6 @@ export class DynamoNTS_GlobalService extends DynamoNTS_SingletonService {
|
|
|
56
51
|
|
|
57
52
|
this.instance.authService = set.authService;
|
|
58
53
|
this.instance.emailServiceCollection = set.emailServiceCollection;
|
|
59
|
-
this.instance.socketServiceCollection = set.socketServiceCollection;
|
|
60
|
-
this.instance.simpleServicesCollection = set.simpleServicesCollection;
|
|
61
54
|
} catch (error) {
|
|
62
55
|
Dynamo_Log.error('\nsetServices failed on DBE_Global_S.\n', error);
|
|
63
56
|
}
|
|
@@ -146,7 +139,7 @@ export class DynamoNTS_GlobalService extends DynamoNTS_SingletonService {
|
|
|
146
139
|
*
|
|
147
140
|
* @returns
|
|
148
141
|
*/
|
|
149
|
-
static getSocketServiceCollection(): DynamoNTS_SocketServiceCollection {
|
|
142
|
+
/* static getSocketServiceCollection(): DynamoNTS_SocketServiceCollection {
|
|
150
143
|
if (!this.instance?.socketServiceCollection) {
|
|
151
144
|
throw new Error(
|
|
152
145
|
`\nUnique Socket Service Collection missing!` +
|
|
@@ -156,15 +149,15 @@ export class DynamoNTS_GlobalService extends DynamoNTS_SingletonService {
|
|
|
156
149
|
}
|
|
157
150
|
|
|
158
151
|
return this.instance.socketServiceCollection;
|
|
159
|
-
}
|
|
152
|
+
} */
|
|
160
153
|
|
|
161
154
|
/**
|
|
162
155
|
*
|
|
163
156
|
* @param name
|
|
164
157
|
* @returns
|
|
165
158
|
*/
|
|
166
|
-
static getSocketServiceByName(name: string): DynamoNTS_SocketService<any> {
|
|
167
|
-
const collection = this.getSocketServiceCollection();
|
|
159
|
+
/* static getSocketServiceByName(name: string): DynamoNTS_SocketService<any> {
|
|
160
|
+
const collection: DynamoNTS_SocketServiceCollection = this.getSocketServiceCollection();
|
|
168
161
|
if (collection[name]) {
|
|
169
162
|
return collection[name];
|
|
170
163
|
} else {
|
|
@@ -180,7 +173,7 @@ export class DynamoNTS_GlobalService extends DynamoNTS_SingletonService {
|
|
|
180
173
|
}
|
|
181
174
|
|
|
182
175
|
static attachNewSocketService(service: DynamoNTS_SocketService<any>): void {
|
|
183
|
-
const collection = this.getSocketServiceCollection();
|
|
176
|
+
const collection: DynamoNTS_SocketServiceCollection = this.getSocketServiceCollection();
|
|
184
177
|
if (!collection[service.name]) {
|
|
185
178
|
collection[service.name] = service;
|
|
186
179
|
} else {
|
|
@@ -193,5 +186,5 @@ export class DynamoNTS_GlobalService extends DynamoNTS_SingletonService {
|
|
|
193
186
|
The available socketServices on collection:
|
|
194
187
|
${names}\n`);
|
|
195
188
|
}
|
|
196
|
-
}
|
|
189
|
+
} */
|
|
197
190
|
}
|
|
@@ -3,12 +3,12 @@ import { Router } from 'express';
|
|
|
3
3
|
|
|
4
4
|
import { Dynamo_Error, Dynamo_Log } from '@futdevpro/fsm-dynamo';
|
|
5
5
|
|
|
6
|
-
import { dynamoNTS_GlobalSettings } from '../_constants/dynamo-nts-global-settings';
|
|
6
|
+
import { dynamoNTS_GlobalSettings } from '../_constants/dynamo-nts-global-settings.const';
|
|
7
7
|
import { DynamoNTS_RouteSecurity } from '../_enums/dynamo-nts-route-security.enum';
|
|
8
8
|
import { DynamoNTS_HttpCallType } from '../_enums/http/dynamo-nts-http-call-type.enum';
|
|
9
|
-
import { DynamoNTS_EndpointParams } from '../_models/dynamo-nts-endpoint-params';
|
|
10
9
|
import { DynamoNTS_Controller } from './dynamo-nts-controller.service';
|
|
11
|
-
import { DynamoNTS_RoutingModuleSettings } from '../_models/dynamo-nts-routing-module-settings';
|
|
10
|
+
import { DynamoNTS_RoutingModuleSettings } from '../_models/interfaces/dynamo-nts-routing-module-settings.interface';
|
|
11
|
+
import { DynamoNTS_EndpointParams } from '../_models/control-models/dynamo-nts-endpoint-params.model';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Routing Module
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { DynamoNTS_Shared } from './dynamo-nts-shared.service';
|
|
1
|
+
/* import { DynamoNTS_Shared } from './dynamo-nts-shared.service'; */
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
xdescribe('DynamoNTS_Shared', () => {
|
|
4
4
|
it('fns should be accessible', () => {
|
|
5
|
-
expect(DynamoNTS_Shared.getIpFromRequest).toBeTruthy();
|
|
5
|
+
/* expect(DynamoNTS_Shared.getIpFromRequest).toBeTruthy();
|
|
6
6
|
expect(DynamoNTS_Shared.getLocationDataByRequest).toBeTruthy();
|
|
7
7
|
expect(DynamoNTS_Shared.getLocationByIp).toBeTruthy();
|
|
8
|
-
expect(DynamoNTS_Shared.prompt).toBeTruthy();
|
|
8
|
+
expect(DynamoNTS_Shared.prompt).toBeTruthy(); */
|
|
9
9
|
});
|
|
10
10
|
});
|