@futdevpro/nts-dynamo 1.4.4 → 1.4.6
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/dynamobe-global.settings.d.ts +3 -0
- package/lib/_constants/dynamobe-global.settings.d.ts.map +1 -0
- package/lib/_constants/dynamobe-global.settings.js +13 -0
- package/lib/_constants/dynamobe-global.settings.js.map +1 -0
- package/lib/_constants/index.d.ts +2 -0
- package/lib/_constants/index.d.ts.map +1 -0
- package/lib/_constants/index.js +5 -0
- package/lib/_constants/index.js.map +1 -0
- package/lib/_enums/data-model-type.enum.d.ts +6 -0
- package/lib/_enums/data-model-type.enum.d.ts.map +1 -0
- package/lib/_enums/data-model-type.enum.js +10 -0
- package/lib/_enums/data-model-type.enum.js.map +1 -0
- package/lib/_enums/dynamobe-data-service-function.enum.d.ts +8 -0
- package/lib/_enums/dynamobe-data-service-function.enum.d.ts.map +1 -0
- package/lib/_enums/dynamobe-data-service-function.enum.js +15 -0
- package/lib/_enums/dynamobe-data-service-function.enum.js.map +1 -0
- package/lib/_enums/dynamobe-route-security.enum.d.ts +6 -0
- package/lib/_enums/dynamobe-route-security.enum.d.ts.map +1 -0
- package/lib/_enums/dynamobe-route-security.enum.js +10 -0
- package/lib/_enums/dynamobe-route-security.enum.js.map +1 -0
- package/lib/_enums/http/http-call-type.enum.d.ts +8 -0
- package/lib/_enums/http/http-call-type.enum.d.ts.map +1 -0
- package/lib/_enums/http/http-call-type.enum.js +12 -0
- package/lib/_enums/http/http-call-type.enum.js.map +1 -0
- package/lib/_enums/http/http-response-type.enum.d.ts +7 -0
- package/lib/_enums/http/http-response-type.enum.d.ts.map +1 -0
- package/lib/_enums/http/http-response-type.enum.js +11 -0
- package/lib/_enums/http/http-response-type.enum.js.map +1 -0
- package/lib/_enums/index.d.ts +8 -0
- package/lib/_enums/index.d.ts.map +1 -0
- package/lib/_enums/index.js +39 -0
- package/lib/_enums/index.js.map +1 -0
- package/lib/_enums/log-style.enum.d.ts +26 -0
- package/lib/_enums/log-style.enum.d.ts.map +1 -0
- package/lib/_enums/log-style.enum.js +30 -0
- package/lib/_enums/log-style.enum.js.map +1 -0
- package/lib/_enums/predefined-data-types.enum.d.ts +8 -0
- package/lib/_enums/predefined-data-types.enum.d.ts.map +1 -0
- package/lib/_enums/predefined-data-types.enum.js +12 -0
- package/lib/_enums/predefined-data-types.enum.js.map +1 -0
- package/lib/_models/dynamo-module-settings.d.ts +7 -0
- package/lib/_models/dynamo-module-settings.d.ts.map +1 -0
- package/lib/_models/dynamo-module-settings.js +3 -0
- package/lib/_models/dynamo-module-settings.js.map +1 -0
- package/lib/_models/dynamobe-api-call-params.d.ts +35 -0
- package/lib/_models/dynamobe-api-call-params.d.ts.map +1 -0
- package/lib/_models/dynamobe-api-call-params.js +24 -0
- package/lib/_models/dynamobe-api-call-params.js.map +1 -0
- package/lib/_models/dynamobe-app-params.d.ts +15 -0
- package/lib/_models/dynamobe-app-params.d.ts.map +1 -0
- package/lib/_models/dynamobe-app-params.js +14 -0
- package/lib/_models/dynamobe-app-params.js.map +1 -0
- package/lib/_models/dynamobe-data-model-params.d.ts +13 -0
- package/lib/_models/dynamobe-data-model-params.d.ts.map +1 -0
- package/lib/_models/dynamobe-data-model-params.js +15 -0
- package/lib/_models/dynamobe-data-model-params.js.map +1 -0
- package/lib/_models/dynamobe-endpoint-params.d.ts +30 -0
- package/lib/_models/dynamobe-endpoint-params.d.ts.map +1 -0
- package/lib/_models/dynamobe-endpoint-params.js +101 -0
- package/lib/_models/dynamobe-endpoint-params.js.map +1 -0
- package/lib/_models/dynamobe-global-settings.d.ts +10 -0
- package/lib/_models/dynamobe-global-settings.d.ts.map +1 -0
- package/lib/_models/dynamobe-global-settings.js +3 -0
- package/lib/_models/dynamobe-global-settings.js.map +1 -0
- package/lib/_models/index.d.ts +6 -0
- package/lib/_models/index.d.ts.map +1 -0
- package/lib/_models/index.js +10 -0
- package/lib/_models/index.js.map +1 -0
- package/lib/_modules/api-service.index.d.ts +5 -0
- package/lib/_modules/api-service.index.d.ts.map +1 -0
- package/lib/_modules/api-service.index.js +11 -0
- package/lib/_modules/api-service.index.js.map +1 -0
- package/lib/_modules/app.index.d.ts +10 -0
- package/lib/_modules/app.index.d.ts.map +1 -0
- package/lib/_modules/app.index.js +17 -0
- package/lib/_modules/app.index.js.map +1 -0
- package/lib/_modules/auth.index.d.ts +3 -0
- package/lib/_modules/auth.index.d.ts.map +1 -0
- package/lib/_modules/auth.index.js +7 -0
- package/lib/_modules/auth.index.js.map +1 -0
- package/lib/_modules/controller.index.d.ts +5 -0
- package/lib/_modules/controller.index.d.ts.map +1 -0
- package/lib/_modules/controller.index.js +11 -0
- package/lib/_modules/controller.index.js.map +1 -0
- package/lib/_modules/data-service.index.d.ts +5 -0
- package/lib/_modules/data-service.index.d.ts.map +1 -0
- package/lib/_modules/data-service.index.js +9 -0
- package/lib/_modules/data-service.index.js.map +1 -0
- package/lib/_modules/test/custom-data.service.d.ts +6 -0
- package/lib/_modules/test/custom-data.service.d.ts.map +1 -0
- package/lib/_modules/test/custom-data.service.js +12 -0
- package/lib/_modules/test/custom-data.service.js.map +1 -0
- package/lib/_modules/test/get-test-routing-module.d.ts +4 -0
- package/lib/_modules/test/get-test-routing-module.d.ts.map +1 -0
- package/lib/_modules/test/get-test-routing-module.js +18 -0
- package/lib/_modules/test/get-test-routing-module.js.map +1 -0
- package/lib/_modules/test/index.d.ts +4 -0
- package/lib/_modules/test/index.d.ts.map +1 -0
- package/lib/_modules/test/index.js +8 -0
- package/lib/_modules/test/index.js.map +1 -0
- package/lib/_modules/test/test-controller.d.ts +6 -0
- package/lib/_modules/test/test-controller.d.ts.map +1 -0
- package/lib/_modules/test/test-controller.js +127 -0
- package/lib/_modules/test/test-controller.js.map +1 -0
- package/lib/_modules/usage/get-usage-routing-module.d.ts +4 -0
- package/lib/_modules/usage/get-usage-routing-module.d.ts.map +1 -0
- package/lib/_modules/usage/get-usage-routing-module.js +18 -0
- package/lib/_modules/usage/get-usage-routing-module.js.map +1 -0
- package/lib/_modules/usage/index.d.ts +4 -0
- package/lib/_modules/usage/index.d.ts.map +1 -0
- package/lib/_modules/usage/index.js +8 -0
- package/lib/_modules/usage/index.js.map +1 -0
- package/lib/_modules/usage/usage-controller.d.ts +7 -0
- package/lib/_modules/usage/usage-controller.d.ts.map +1 -0
- package/lib/_modules/usage/usage-controller.js +89 -0
- package/lib/_modules/usage/usage-controller.js.map +1 -0
- package/lib/_modules/usage/usage.service.d.ts +17 -0
- package/lib/_modules/usage/usage.service.d.ts.map +1 -0
- package/lib/_modules/usage/usage.service.js +108 -0
- package/lib/_modules/usage/usage.service.js.map +1 -0
- package/lib/_services/dynamobe-api.service.d.ts +10 -0
- package/lib/_services/dynamobe-api.service.d.ts.map +1 -0
- package/lib/_services/dynamobe-api.service.js +131 -0
- package/lib/_services/dynamobe-api.service.js.map +1 -0
- package/lib/_services/dynamobe-app.d.ts +105 -0
- package/lib/_services/dynamobe-app.d.ts.map +1 -0
- package/lib/_services/dynamobe-app.js +212 -0
- package/lib/_services/dynamobe-app.js.map +1 -0
- package/lib/_services/dynamobe-auth.service.d.ts +41 -0
- package/lib/_services/dynamobe-auth.service.d.ts.map +1 -0
- package/lib/_services/dynamobe-auth.service.js +40 -0
- package/lib/_services/dynamobe-auth.service.js.map +1 -0
- package/lib/_services/dynamobe-controller.service.d.ts +11 -0
- package/lib/_services/dynamobe-controller.service.d.ts.map +1 -0
- package/lib/_services/dynamobe-controller.service.js +18 -0
- package/lib/_services/dynamobe-controller.service.js.map +1 -0
- package/lib/_services/dynamobe-data.service.d.ts +50 -0
- package/lib/_services/dynamobe-data.service.d.ts.map +1 -0
- package/lib/_services/dynamobe-data.service.js +222 -0
- package/lib/_services/dynamobe-data.service.js.map +1 -0
- package/lib/_services/dynamobe-db-service-collection.service.d.ts +6 -0
- package/lib/_services/dynamobe-db-service-collection.service.d.ts.map +1 -0
- package/lib/_services/dynamobe-db-service-collection.service.js +8 -0
- package/lib/_services/dynamobe-db-service-collection.service.js.map +1 -0
- package/lib/_services/dynamobe-db.service.d.ts +149 -0
- package/lib/_services/dynamobe-db.service.d.ts.map +1 -0
- package/lib/_services/dynamobe-db.service.js +577 -0
- package/lib/_services/dynamobe-db.service.js.map +1 -0
- package/lib/_services/dynamobe-email-service-collection.service.d.ts +19 -0
- package/lib/_services/dynamobe-email-service-collection.service.d.ts.map +1 -0
- package/lib/_services/dynamobe-email-service-collection.service.js +21 -0
- package/lib/_services/dynamobe-email-service-collection.service.js.map +1 -0
- package/lib/_services/dynamobe-email.service.d.ts +34 -0
- package/lib/_services/dynamobe-email.service.d.ts.map +1 -0
- package/lib/_services/dynamobe-email.service.js +144 -0
- package/lib/_services/dynamobe-email.service.js.map +1 -0
- package/lib/_services/dynamobe-global.service.d.ts +40 -0
- package/lib/_services/dynamobe-global.service.d.ts.map +1 -0
- package/lib/_services/dynamobe-global.service.js +74 -0
- package/lib/_services/dynamobe-global.service.js.map +1 -0
- package/lib/_services/dynamobe-routing-module.service.d.ts +27 -0
- package/lib/_services/dynamobe-routing-module.service.d.ts.map +1 -0
- package/lib/_services/dynamobe-routing-module.service.js +119 -0
- package/lib/_services/dynamobe-routing-module.service.js.map +1 -0
- package/lib/_services/dynamobe-shared-be.service.d.ts +9 -0
- package/lib/_services/dynamobe-shared-be.service.d.ts.map +1 -0
- package/lib/_services/dynamobe-shared-be.service.js +45 -0
- package/lib/_services/dynamobe-shared-be.service.js.map +1 -0
- package/lib/_services/dynamobe-shared.service.d.ts +86 -0
- package/lib/_services/dynamobe-shared.service.d.ts.map +1 -0
- package/lib/_services/dynamobe-shared.service.js +251 -0
- package/lib/_services/dynamobe-shared.service.js.map +1 -0
- package/lib/_services/dynamobe-singleton.service.d.ts +6 -0
- package/lib/_services/dynamobe-singleton.service.d.ts.map +1 -0
- package/lib/_services/dynamobe-singleton.service.js +16 -0
- package/lib/_services/dynamobe-singleton.service.js.map +1 -0
- package/lib/_services/index.d.ts +15 -0
- package/lib/_services/index.d.ts.map +1 -0
- package/lib/_services/index.js +19 -0
- package/lib/_services/index.js.map +1 -0
- package/lib/index.d.ts +7 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +15 -0
- package/lib/index.js.map +1 -0
- package/lib/tsconfig.tsbuildinfo +4257 -0
- package/package.json +4 -15
- package/src/_constants/index.ts +0 -3
- package/src/_models/dynamobe-data-model-params.ts +2 -1
- package/src/_models/index.ts +0 -13
- package/src/_modules/api-service.index.ts +0 -1
- package/src/_modules/auth.index.ts +0 -3
- package/src/_modules/data-service.index.ts +0 -3
- package/src/_modules/test/custom-data.service.ts +2 -1
- package/src/_modules/test/get-test-routing-module.ts +2 -1
- package/src/_modules/test/index.ts +0 -2
- package/src/_modules/test/test-controller.ts +2 -1
- package/src/_modules/usage/get-usage-routing-module.ts +2 -1
- package/src/_modules/usage/index.ts +0 -2
- package/src/_modules/usage/usage-controller.ts +2 -2
- package/src/_modules/usage/usage.service.ts +4 -5
- package/src/_services/dynamobe-api.service.ts +2 -1
- package/src/_services/dynamobe-auth.service.ts +2 -1
- package/src/_services/dynamobe-data.service.ts +3 -4
- package/src/_services/dynamobe-db.service.ts +2 -4
- package/src/_services/dynamobe-email.service.ts +2 -1
- package/src/_services/dynamobe-global.service.ts +2 -2
- package/src/_services/dynamobe-routing-module.service.ts +2 -1
- package/src/_services/dynamobe-shared-be.service.ts +2 -1
- package/src/_services/dynamobe-shared.service.ts +2 -3
- package/src/index.ts +0 -6
- package/src/_constants/fullstack/module-settings/test-module-settings.ts +0 -14
- package/src/_constants/fullstack/module-settings/usage-module-settings.ts +0 -12
- package/src/_constants/fullstack/times.ts +0 -8
- package/src/_models/fullstack/control-models/daily-usage-data.ts +0 -34
- package/src/_models/fullstack/control-models/dynamobe-data-params.ts +0 -19
- package/src/_models/fullstack/control-models/dynamobe-data-property-params.ts +0 -98
- package/src/_models/fullstack/control-models/dynamobe-error.ts +0 -199
- package/src/_models/fullstack/control-models/geo-ip-location.ts +0 -26
- package/src/_models/fullstack/control-models/location-coordinates.ts +0 -5
- package/src/_models/fullstack/control-models/usage-action.ts +0 -18
- package/src/_models/fullstack/control-models/usage-data.ts +0 -26
- package/src/_models/fullstack/data-models/custom-data.ts +0 -41
- package/src/_models/fullstack/data-models/metadata.ts +0 -30
- package/src/_models/fullstack/data-models/usage-session.ts +0 -85
- package/src/_modules/data-models.index.ts +0 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@futdevpro/nts-dynamo",
|
|
3
|
-
"version": "01.04.
|
|
3
|
+
"version": "01.04.06",
|
|
4
4
|
"description": "Dynamic NodeTS (NodeJS-Typescript), MongoDB Backend System Framework by Future Development Ltd.",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib/index.js",
|
|
@@ -37,7 +37,6 @@
|
|
|
37
37
|
"types": "./lib/_services/index.d.ts",
|
|
38
38
|
"typings": "./lib/_services/index.d.ts"
|
|
39
39
|
},
|
|
40
|
-
|
|
41
40
|
"./test-module": {
|
|
42
41
|
"default": "./lib/_modules/test/index.js",
|
|
43
42
|
"module": "./lib/_modules/test/index.js",
|
|
@@ -50,7 +49,6 @@
|
|
|
50
49
|
"types": "./lib/_modules/usage/index.d.ts",
|
|
51
50
|
"typings": "./lib/_modules/usage/index.d.ts"
|
|
52
51
|
},
|
|
53
|
-
|
|
54
52
|
"./app": {
|
|
55
53
|
"default": "./lib/_modules/app.index.js",
|
|
56
54
|
"module": "./lib/_modules/app.index.js",
|
|
@@ -75,12 +73,6 @@
|
|
|
75
73
|
"types": "./lib/_modules/controller.index.d.ts",
|
|
76
74
|
"typings": "./lib/_modules/controller.index.d.ts"
|
|
77
75
|
},
|
|
78
|
-
"./data-models": {
|
|
79
|
-
"default": "./lib/_modules/data-models.index.js",
|
|
80
|
-
"module": "./lib/_modules/data-models.index.js",
|
|
81
|
-
"types": "./lib/_modules/data-models.index.d.ts",
|
|
82
|
-
"typings": "./lib/_modules/data-models.index.d.ts"
|
|
83
|
-
},
|
|
84
76
|
"./data-service": {
|
|
85
77
|
"default": "./lib/_modules/data-service.index.js",
|
|
86
78
|
"module": "./lib/_modules/data-service.index.js",
|
|
@@ -102,14 +94,12 @@
|
|
|
102
94
|
"services": [
|
|
103
95
|
"lib/_services/index.d.ts"
|
|
104
96
|
],
|
|
105
|
-
|
|
106
97
|
"test-module": [
|
|
107
98
|
"lib/_modules/test/index.d.ts"
|
|
108
99
|
],
|
|
109
100
|
"usage-module": [
|
|
110
101
|
"lib/_modules/usage/index.d.ts"
|
|
111
102
|
],
|
|
112
|
-
|
|
113
103
|
"app": [
|
|
114
104
|
"lib/_modules/app.index.d.ts"
|
|
115
105
|
],
|
|
@@ -122,9 +112,6 @@
|
|
|
122
112
|
"controller": [
|
|
123
113
|
"lib/_modules/controller.index.d.ts"
|
|
124
114
|
],
|
|
125
|
-
"data-models": [
|
|
126
|
-
"lib/_modules/data-models.index.d.ts"
|
|
127
|
-
],
|
|
128
115
|
"data-service": [
|
|
129
116
|
"lib/_modules/data-service.index.d.ts"
|
|
130
117
|
]
|
|
@@ -143,6 +130,7 @@
|
|
|
143
130
|
"nodets"
|
|
144
131
|
],
|
|
145
132
|
"scripts": {
|
|
133
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
146
134
|
"build": "npx tsc",
|
|
147
135
|
"postbuild": "npm publish"
|
|
148
136
|
},
|
|
@@ -153,6 +141,7 @@
|
|
|
153
141
|
},
|
|
154
142
|
"homepage": "https:/futdevpro.hu/projects/dynamo",
|
|
155
143
|
"peerDependencies": {
|
|
144
|
+
"@futdevpro/fsm-dynamo": "~1.0.2",
|
|
156
145
|
"@types/express": "~4.17.7",
|
|
157
146
|
"@types/geoip-lite": "~1.4.1",
|
|
158
147
|
"@types/nodemailer": "~6.4.4",
|
|
@@ -164,9 +153,9 @@
|
|
|
164
153
|
"rxjs": "~7.4.0"
|
|
165
154
|
},
|
|
166
155
|
"dependencies": {
|
|
167
|
-
"tslib": "~2.0.1",
|
|
168
156
|
"@types/node": "~14.0.27",
|
|
169
157
|
"ts-node": "~8.10.2",
|
|
158
|
+
"tslib": "~2.0.1",
|
|
170
159
|
"typescript": "~3.9.7"
|
|
171
160
|
}
|
|
172
161
|
}
|
package/src/_constants/index.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
|
|
2
|
+
import { DynamoBEDataPropertyParams } from '@futdevpro/fsm-dynamo';
|
|
3
|
+
|
|
2
4
|
import { DataModelType } from '../_enums/data-model-type.enum';
|
|
3
|
-
import { DynamoBEDataPropertyParams } from './fullstack/control-models/dynamobe-data-property-params';
|
|
4
5
|
|
|
5
6
|
export class DynamoBEDataModelParams {
|
|
6
7
|
dataName: string;
|
package/src/_models/index.ts
CHANGED
|
@@ -6,17 +6,4 @@ export * from './dynamobe-app-params';
|
|
|
6
6
|
export * from './dynamobe-data-model-params';
|
|
7
7
|
export * from './dynamobe-endpoint-params';
|
|
8
8
|
export * from './dynamobe-global-settings';
|
|
9
|
-
// FULLSTACK - CONTROL MODELS
|
|
10
|
-
export * from './fullstack/control-models/daily-usage-data';
|
|
11
|
-
export * from './fullstack/control-models/dynamobe-data-property-params';
|
|
12
|
-
export * from './fullstack/control-models/dynamobe-error';
|
|
13
|
-
export * from './fullstack/control-models/geo-ip-location';
|
|
14
|
-
export * from './fullstack/control-models/location-coordinates';
|
|
15
|
-
export * from './fullstack/control-models/usage-action';
|
|
16
|
-
export * from './fullstack/control-models/usage-data';
|
|
17
|
-
export * from './fullstack/control-models/dynamobe-data-params';
|
|
18
|
-
// FULLSTACK - DATA MODELS
|
|
19
|
-
export * from './fullstack/data-models/custom-data';
|
|
20
|
-
export * from './fullstack/data-models/metadata';
|
|
21
|
-
export * from './fullstack/data-models/usage-session';
|
|
22
9
|
|
|
@@ -4,6 +4,3 @@ export * from '../_services/dynamobe-data.service';
|
|
|
4
4
|
export * from '../_services/dynamobe-db.service';
|
|
5
5
|
export * from '../_services/dynamobe-global.service';
|
|
6
6
|
export * from '../_services/dynamobe-shared.service';
|
|
7
|
-
|
|
8
|
-
// MODELS
|
|
9
|
-
export * from '../_models/fullstack/control-models/dynamobe-error';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
import { CustomData, customDataModelParams } from '
|
|
4
|
+
import { CustomData, customDataModelParams } from '@futdevpro/fsm-dynamo';
|
|
5
|
+
|
|
5
6
|
import { DynamoBEDataService } from '../../_services/dynamobe-data.service';
|
|
6
7
|
|
|
7
8
|
export class CustomDataService extends DynamoBEDataService<CustomData> {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { testModuleSettings } from '
|
|
2
|
+
import { testModuleSettings } from '@futdevpro/fsm-dynamo';
|
|
3
|
+
|
|
3
4
|
import { DynamoBERouteSecurity } from '../../_enums/dynamobe-route-security.enum';
|
|
4
5
|
import { DynamoBERoutingModule, DynamoBERoutingModuleSettings } from '../../_services/dynamobe-routing-module.service';
|
|
5
6
|
import { TestController } from './test-controller';
|
|
@@ -3,6 +3,4 @@
|
|
|
3
3
|
export * from './test-controller';
|
|
4
4
|
export * from './custom-data.service';
|
|
5
5
|
export * from './get-test-routing-module';
|
|
6
|
-
export * from '../../_models/fullstack/data-models/custom-data';
|
|
7
|
-
/* export * from '../../_constants/fullstack/module-settings/test-module-settings'; */
|
|
8
6
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { Request, Response } from 'express';
|
|
3
|
-
import { testModuleSettings } from '
|
|
3
|
+
import { testModuleSettings } from '@futdevpro/fsm-dynamo';
|
|
4
|
+
|
|
4
5
|
import { HttpCallType } from '../../_enums/http/http-call-type.enum';
|
|
5
6
|
import { DynamoBEEndpointParams } from '../../_models/dynamobe-endpoint-params';
|
|
6
7
|
import { DynamoBEController } from '../../_services/dynamobe-controller.service';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { usageModuleSettings } from '
|
|
2
|
+
import { usageModuleSettings } from '@futdevpro/fsm-dynamo';
|
|
3
|
+
|
|
3
4
|
import { DynamoBERouteSecurity } from '../../_enums/dynamobe-route-security.enum';
|
|
4
5
|
import { DynamoBERoutingModule, DynamoBERoutingModuleSettings } from '../../_services/dynamobe-routing-module.service';
|
|
5
6
|
import { UsageController } from './usage-controller';
|
|
@@ -3,6 +3,4 @@
|
|
|
3
3
|
export * from './usage-controller';
|
|
4
4
|
export * from './usage.service';
|
|
5
5
|
export * from './get-usage-routing-module';
|
|
6
|
-
export * from '../../_models/fullstack/data-models/usage-session';
|
|
7
|
-
/* export * from '../../_constants/fullstack/module-settings/usage-module-settings'; */
|
|
8
6
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
2
|
import { Request, Response } from 'express';
|
|
3
|
-
import { usageModuleSettings } from '
|
|
3
|
+
import { usageModuleSettings, DynamoUsageSession } from '@futdevpro/fsm-dynamo';
|
|
4
|
+
|
|
4
5
|
import { HttpCallType } from '../../_enums/http/http-call-type.enum';
|
|
5
6
|
import { DynamoBEEndpointParams } from '../../_models/dynamobe-endpoint-params';
|
|
6
|
-
import { DynamoUsageSession } from '../../_models/fullstack/data-models/usage-session';
|
|
7
7
|
import { DynamoBEAuthService } from '../../_services/dynamobe-auth.service';
|
|
8
8
|
import { DynamoBEController } from '../../_services/dynamobe-controller.service';
|
|
9
9
|
import { DBE_Global_S } from '../../_services/dynamobe-global.service';
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
|
|
2
|
+
import { Request } from 'express';
|
|
3
|
+
import { DynamoUsageSession, DynamoUsageData, DailyUsageData,
|
|
4
|
+
usageSessionModelParams, DynamoBEError } from '@futdevpro/fsm-dynamo';
|
|
5
|
+
|
|
2
6
|
import { DynamoBEDataService } from '../../_services/dynamobe-data.service';
|
|
3
|
-
import { DynamoBEError } from '../../_models/fullstack/control-models/dynamobe-error';
|
|
4
7
|
import { DBE_Shared_BE } from '../../_services/dynamobe-shared-be.service';
|
|
5
|
-
import { Request } from 'express';
|
|
6
|
-
import { DynamoUsageData } from '../../_models/fullstack/control-models/usage-data';
|
|
7
|
-
import { DailyUsageData } from '../../_models/fullstack/control-models/daily-usage-data';
|
|
8
|
-
import { DynamoUsageSession, usageSessionModelParams } from '../../_models/fullstack/data-models/usage-session';
|
|
9
8
|
|
|
10
9
|
export class UsageService extends DynamoBEDataService<DynamoUsageSession> {
|
|
11
10
|
usageData: DynamoUsageData[] = [];
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
|
|
2
2
|
import * as Axios from 'axios';
|
|
3
|
+
import { DynamoBEError } from '@futdevpro/fsm-dynamo';
|
|
4
|
+
|
|
3
5
|
import { HttpCallType } from '../_enums/http/http-call-type.enum';
|
|
4
6
|
import { HttpResponseType } from '../_enums/http/http-response-type.enum';
|
|
5
7
|
import { DynamoBEApiCallParams } from '../_models/dynamobe-api-call-params';
|
|
6
|
-
import { DynamoBEError } from '../_models/fullstack/control-models/dynamobe-error';
|
|
7
8
|
import { DBE_Shared } from './dynamobe-shared.service';
|
|
8
9
|
|
|
9
10
|
export class DynamoBEApiService {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { NextFunction, Request, Response } from 'express';
|
|
3
|
-
import { DynamoBEError } from '
|
|
3
|
+
import { DynamoBEError } from '@futdevpro/fsm-dynamo';
|
|
4
|
+
|
|
4
5
|
import { DynamoBESingletonService } from './dynamobe-singleton.service';
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { Metadata, DynamoBEDataPropertyParams, DynamoBEDataParams,
|
|
3
|
+
DynamoBEError } from '@futdevpro/fsm-dynamo';
|
|
4
|
+
|
|
4
5
|
import { DynamoBEDBService } from './dynamobe-db.service';
|
|
5
|
-
import { DynamoBEDataPropertyParams } from '../_models/fullstack/control-models/dynamobe-data-property-params';
|
|
6
6
|
import { DBE_Global_S } from './dynamobe-global.service';
|
|
7
|
-
import { DynamoBEDataParams } from '../_models/fullstack/control-models/dynamobe-data-params';
|
|
8
7
|
|
|
9
8
|
export class DynamoBEDataService<T extends Metadata> {
|
|
10
9
|
dataDBService: DynamoBEDBService<T>;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
import * as mongoose from 'mongoose';
|
|
3
3
|
import { Schema } from 'mongoose';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
import { DynamoBEDataPropertyParams } from '../_models/fullstack/control-models/dynamobe-data-property-params';
|
|
7
|
-
import { DynamoBEDataParams } from '../_models/fullstack/control-models/dynamobe-data-params';
|
|
4
|
+
import { Metadata, DynamoBEDataParams, DynamoBEError,
|
|
5
|
+
DynamoBEDataPropertyParams } from '@futdevpro/fsm-dynamo';
|
|
8
6
|
|
|
9
7
|
export class DynamoBEDBService<T extends Metadata> {
|
|
10
8
|
dataModel = mongoose.model(this.dataParams.dbName, this.getSchema());
|
|
@@ -3,7 +3,8 @@ import * as FileSystem from 'fs';
|
|
|
3
3
|
import * as Path from 'path';
|
|
4
4
|
import * as NodeMailer from 'nodemailer';
|
|
5
5
|
import { Options as MailOptions, Attachment } from 'nodemailer/lib/mailer';
|
|
6
|
-
import { DynamoBEError } from '
|
|
6
|
+
import { DynamoBEError } from '@futdevpro/fsm-dynamo';
|
|
7
|
+
|
|
7
8
|
import { DBE_Shared } from './dynamobe-shared.service';
|
|
8
9
|
|
|
9
10
|
export class DynamoBEEmailService {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
import { Metadata } from '
|
|
3
|
+
import { DynamoBEDataParams, Metadata } from '@futdevpro/fsm-dynamo';
|
|
4
|
+
|
|
4
5
|
import { DynamoBEAuthService } from './dynamobe-auth.service';
|
|
5
6
|
import { DynamoBEDBServiceCollection } from './dynamobe-db-service-collection.service';
|
|
6
7
|
import { DynamoBEDBService } from './dynamobe-db.service';
|
|
7
8
|
import { DynamoBEEmailServiceCollection } from './dynamobe-email-service-collection.service';
|
|
8
9
|
import { DynamoBESingletonService } from './dynamobe-singleton.service';
|
|
9
|
-
import { DynamoBEDataParams } from '../_models/fullstack/control-models/dynamobe-data-params';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* This is the main Global/Core Service Collection used by DynamoBE,
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
|
|
2
2
|
import { Router } from 'express';
|
|
3
|
+
import { DynamoBEError } from '@futdevpro/fsm-dynamo';
|
|
4
|
+
|
|
3
5
|
import { dynamoBEGlobalSettings } from '../_constants/dynamobe-global.settings';
|
|
4
6
|
import { DynamoBERouteSecurity } from '../_enums/dynamobe-route-security.enum';
|
|
5
7
|
import { HttpCallType } from '../_enums/http/http-call-type.enum';
|
|
6
8
|
import { DynamoBEEndpointParams } from '../_models/dynamobe-endpoint-params';
|
|
7
|
-
import { DynamoBEError } from '../_models/fullstack/control-models/dynamobe-error';
|
|
8
9
|
import { DynamoBEController } from './dynamobe-controller.service';
|
|
9
10
|
import { DBE_Shared } from './dynamobe-shared.service';
|
|
10
11
|
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
import * as ReadLine from 'readline';
|
|
3
3
|
import { Request } from 'express';
|
|
4
4
|
import * as GeoIp from 'geoip-lite';
|
|
5
|
-
import { GeoIpLocation } from '
|
|
5
|
+
import { GeoIpLocation } from '@futdevpro/fsm-dynamo';
|
|
6
|
+
|
|
6
7
|
import { DBE_Shared } from './dynamobe-shared.service';
|
|
7
8
|
|
|
8
9
|
export class DBE_Shared_BE extends DBE_Shared {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
2
|
+
import { LocationCoordinates, DynamoBEError,
|
|
3
|
+
year, hour, day, week, month } from '@futdevpro/fsm-dynamo';
|
|
3
4
|
import { LogStyle } from '../_enums/log-style.enum';
|
|
4
|
-
import { DynamoBEError } from '../_models/fullstack/control-models/dynamobe-error';
|
|
5
|
-
import { LocationCoordinates } from '../_models/fullstack/control-models/location-coordinates';
|
|
6
5
|
|
|
7
6
|
export class DBE_Shared {
|
|
8
7
|
|
package/src/index.ts
CHANGED
|
@@ -15,9 +15,3 @@ export * from './_services';
|
|
|
15
15
|
export * from './_modules/test/index';
|
|
16
16
|
export * from './_modules/usage/index';
|
|
17
17
|
|
|
18
|
-
/* export * from './_modules/app.index';
|
|
19
|
-
export * from './_modules/api-service.index';
|
|
20
|
-
export * from './_modules/auth.index';
|
|
21
|
-
export * from './_modules/controller.index';
|
|
22
|
-
export * from './_modules/data-models.index';
|
|
23
|
-
export * from './_modules/data-service.index'; */
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { DynamoModuleSettings } from '../../../_models/dynamo-module-settings';
|
|
2
|
-
|
|
3
|
-
export const testModuleSettings: DynamoModuleSettings = {
|
|
4
|
-
mainRoute: '/test',
|
|
5
|
-
endPoints: {
|
|
6
|
-
testGet: '/test-get',
|
|
7
|
-
testPost: '/test-post',
|
|
8
|
-
testPut: '/test-put',
|
|
9
|
-
testPatch: '/test-patch',
|
|
10
|
-
testDelete: '/test-delete',
|
|
11
|
-
getCustomData: '/custom/get/:customId',
|
|
12
|
-
modifyCustomData: '/custom/post'
|
|
13
|
-
}
|
|
14
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { DynamoModuleSettings } from '../../../_models/dynamo-module-settings';
|
|
3
|
-
|
|
4
|
-
export const usageModuleSettings: DynamoModuleSettings = {
|
|
5
|
-
mainRoute: '/usage',
|
|
6
|
-
endPoints: {
|
|
7
|
-
newSession: '/new-session',
|
|
8
|
-
closeSession: '/close-session/:sessionId',
|
|
9
|
-
updateUsage: '/update/:sessionId',
|
|
10
|
-
getAllUsageData: '/get/all',
|
|
11
|
-
}
|
|
12
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { DynamoUsageSession } from "../data-models/usage-session";
|
|
3
|
-
|
|
4
|
-
export class DailyUsageData {
|
|
5
|
-
date?: string;
|
|
6
|
-
totalVisitTime?: number = 0;
|
|
7
|
-
averageVisitTime?: number = 0;
|
|
8
|
-
visitorsHun?: number = 0;
|
|
9
|
-
visitorsElse?: number = 0;
|
|
10
|
-
|
|
11
|
-
visitations?: DynamoUsageSession[] = [];
|
|
12
|
-
|
|
13
|
-
constructor(
|
|
14
|
-
set?: {
|
|
15
|
-
date?: string,
|
|
16
|
-
totalVisitTime?: number,
|
|
17
|
-
averageVisitTime?: number,
|
|
18
|
-
visitorsHun?: number,
|
|
19
|
-
visitorsElse?: number,
|
|
20
|
-
|
|
21
|
-
visitations?: DynamoUsageSession[],
|
|
22
|
-
}
|
|
23
|
-
) {
|
|
24
|
-
if (set) {
|
|
25
|
-
this.date = set.date;
|
|
26
|
-
this.totalVisitTime = set.totalVisitTime ? set.totalVisitTime : 0;
|
|
27
|
-
this.averageVisitTime = set.averageVisitTime ? set.averageVisitTime : 0;
|
|
28
|
-
this.visitorsHun = set.visitorsHun ? set.visitorsHun : 0;
|
|
29
|
-
this.visitorsElse = set.visitorsElse ? set.visitorsElse : 0;
|
|
30
|
-
|
|
31
|
-
this.visitations = set.visitations ? set.visitations : [];
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { DynamoBEDataPropertyParams } from './dynamobe-data-property-params';
|
|
3
|
-
|
|
4
|
-
export class DynamoBEDataParams {
|
|
5
|
-
dataName: string;
|
|
6
|
-
dbName: string;
|
|
7
|
-
modelParams: DynamoBEDataPropertyParams[];
|
|
8
|
-
|
|
9
|
-
constructor(
|
|
10
|
-
set: {
|
|
11
|
-
dataName: string,
|
|
12
|
-
modelParams: DynamoBEDataPropertyParams[],
|
|
13
|
-
}
|
|
14
|
-
) {
|
|
15
|
-
this.dataName = set.dataName;
|
|
16
|
-
this.dbName = set.dataName.charAt(0).toUpperCase() + set.dataName.slice(1);
|
|
17
|
-
this.modelParams = set.modelParams ? set.modelParams : [];
|
|
18
|
-
}
|
|
19
|
-
}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { DynamoBEError } from './dynamobe-error';
|
|
3
|
-
|
|
4
|
-
export class DynamoBEDataPropertyParams {
|
|
5
|
-
key: string;
|
|
6
|
-
type: 'string' | 'number' | 'boolean' | 'Date' | 'object' | string;
|
|
7
|
-
|
|
8
|
-
unique?: boolean;
|
|
9
|
-
required?: boolean;
|
|
10
|
-
index?: boolean;
|
|
11
|
-
|
|
12
|
-
isDependencyHook?: boolean;
|
|
13
|
-
dependencyName?: string;
|
|
14
|
-
|
|
15
|
-
minlength?: number;
|
|
16
|
-
maxlength?: number;
|
|
17
|
-
|
|
18
|
-
subObjectParams?: DynamoBEDataPropertyParams[] = [];
|
|
19
|
-
|
|
20
|
-
additionalValidators?: ((data) => void)[];
|
|
21
|
-
|
|
22
|
-
constructor(
|
|
23
|
-
set: {
|
|
24
|
-
key: string,
|
|
25
|
-
type: 'string' | 'number' | 'boolean' | 'Date' | 'object' | string,
|
|
26
|
-
|
|
27
|
-
unique?: boolean,
|
|
28
|
-
required?: boolean,
|
|
29
|
-
index?: boolean,
|
|
30
|
-
|
|
31
|
-
isDependencyHook?: boolean,
|
|
32
|
-
dependencyDBServiceName?: string,
|
|
33
|
-
|
|
34
|
-
minlength?: number,
|
|
35
|
-
maxlength?: number,
|
|
36
|
-
|
|
37
|
-
subObjectParams?: DynamoBEDataPropertyParams[],
|
|
38
|
-
|
|
39
|
-
additionalValidators?: ((data) => void)[],
|
|
40
|
-
}
|
|
41
|
-
) {
|
|
42
|
-
|
|
43
|
-
if (set) {
|
|
44
|
-
this.key = set.key;
|
|
45
|
-
this.type = set.type;
|
|
46
|
-
|
|
47
|
-
if (this.getBEType() === Object) {
|
|
48
|
-
if (set?.subObjectParams) {
|
|
49
|
-
this.subObjectParams = set.subObjectParams;
|
|
50
|
-
} else {
|
|
51
|
-
console.log('DYNAMO ERROR: \n subObjectParams missing', '\n\n', new Error());
|
|
52
|
-
throw new DynamoBEError({ message: 'subObjectParams missing' });
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
if (set.isDependencyHook) {
|
|
57
|
-
if (set.dependencyDBServiceName) {
|
|
58
|
-
this.isDependencyHook = set.isDependencyHook;
|
|
59
|
-
this.dependencyName = set.dependencyDBServiceName;
|
|
60
|
-
} else {
|
|
61
|
-
this.isDependencyHook = set.isDependencyHook;
|
|
62
|
-
console.log('DYNAMO ERROR: \n dependencyDBServiceName missing for dependencyHook', '\n\n', new Error());
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
this.unique = set.unique;
|
|
66
|
-
this.required = set.required;
|
|
67
|
-
this.index = set.index;
|
|
68
|
-
this.minlength = set.minlength;
|
|
69
|
-
this.maxlength = set.maxlength;
|
|
70
|
-
this.additionalValidators = set.additionalValidators;
|
|
71
|
-
} else {
|
|
72
|
-
console.log('DYNAMO ERROR: \nMISSING DynamoBEDataPropertyParams constructor input', '\n\n', new Error());
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// tslint:disable-next-line: ban-types
|
|
77
|
-
getBEType?(): String | Number | Boolean | Object | Function | Array<any> | Date {
|
|
78
|
-
switch (this.type) {
|
|
79
|
-
case 'string':
|
|
80
|
-
return String;
|
|
81
|
-
case 'number':
|
|
82
|
-
return Number;
|
|
83
|
-
case 'boolean':
|
|
84
|
-
return Boolean;
|
|
85
|
-
case 'Date':
|
|
86
|
-
return Date;
|
|
87
|
-
case 'object':
|
|
88
|
-
default:
|
|
89
|
-
if (this.type.includes('[]')) {
|
|
90
|
-
return Array;
|
|
91
|
-
} else if (this.type.includes('=>') || this.type.includes('function')) {
|
|
92
|
-
return Function;
|
|
93
|
-
} else {
|
|
94
|
-
return Object;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|