@futdevpro/nts-dynamo 1.3.68 → 1.3.69

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.
Files changed (186) hide show
  1. package/lib/_constants/fullstack/module-settings/test-module-settings.d.ts +3 -0
  2. package/lib/_constants/fullstack/module-settings/test-module-settings.d.ts.map +1 -0
  3. package/lib/_constants/fullstack/module-settings/test-module-settings.js +16 -0
  4. package/lib/_constants/fullstack/module-settings/test-module-settings.js.map +1 -0
  5. package/lib/_constants/fullstack/module-settings/usage-module-settings.d.ts +3 -0
  6. package/lib/_constants/fullstack/module-settings/usage-module-settings.d.ts.map +1 -0
  7. package/lib/_constants/fullstack/module-settings/usage-module-settings.js +13 -0
  8. package/lib/_constants/fullstack/module-settings/usage-module-settings.js.map +1 -0
  9. package/lib/_models/dynamo-module-settings.d.ts +7 -0
  10. package/lib/_models/dynamo-module-settings.d.ts.map +1 -0
  11. package/lib/_models/dynamo-module-settings.js +3 -0
  12. package/lib/_models/dynamo-module-settings.js.map +1 -0
  13. package/lib/_models/dynamobe-data-model-params.d.ts +1 -1
  14. package/lib/_models/dynamobe-data-model-params.d.ts.map +1 -1
  15. package/lib/_models/dynamobe-endpoint-params.d.ts +30 -0
  16. package/lib/_models/dynamobe-endpoint-params.d.ts.map +1 -0
  17. package/lib/_models/dynamobe-endpoint-params.js +95 -0
  18. package/lib/_models/dynamobe-endpoint-params.js.map +1 -0
  19. package/lib/_models/fullstack-models/control-models/daily-usage-data.d.ts.map +1 -1
  20. package/lib/_models/fullstack-models/control-models/daily-usage-data.js.map +1 -1
  21. package/lib/_models/fullstack-models/control-models/dynamobe-data-params.d.ts.map +1 -1
  22. package/lib/_models/fullstack-models/control-models/dynamobe-data-params.js.map +1 -1
  23. package/lib/_models/fullstack-models/control-models/dynamobe-data-property-params.d.ts.map +1 -1
  24. package/lib/_models/fullstack-models/control-models/dynamobe-data-property-params.js.map +1 -1
  25. package/lib/_models/fullstack-models/control-models/dynamobe-error.d.ts.map +1 -1
  26. package/lib/_models/fullstack-models/control-models/dynamobe-error.js.map +1 -1
  27. package/lib/_models/fullstack-models/control-models/geo-ip-location.d.ts.map +1 -1
  28. package/lib/_models/fullstack-models/control-models/geo-ip-location.js.map +1 -1
  29. package/lib/_models/fullstack-models/control-models/usage-action.d.ts.map +1 -1
  30. package/lib/_models/fullstack-models/control-models/usage-action.js.map +1 -1
  31. package/lib/_models/fullstack-models/control-models/usage-data.d.ts.map +1 -1
  32. package/lib/_models/fullstack-models/control-models/usage-data.js.map +1 -1
  33. package/lib/_models/fullstack-models/data-models/custom-data.d.ts.map +1 -1
  34. package/lib/_models/fullstack-models/data-models/custom-data.js.map +1 -1
  35. package/lib/_models/fullstack-models/data-models/metadata.d.ts.map +1 -1
  36. package/lib/_models/fullstack-models/data-models/metadata.js.map +1 -1
  37. package/lib/_models/fullstack-models/data-models/usage-session.d.ts.map +1 -1
  38. package/lib/_models/fullstack-models/data-models/usage-session.js.map +1 -1
  39. package/lib/_models/index.d.ts +11 -11
  40. package/lib/_models/index.d.ts.map +1 -1
  41. package/lib/_models/index.js +12 -23
  42. package/lib/_models/index.js.map +1 -1
  43. package/lib/_modules/test/custom-data.service.d.ts +6 -0
  44. package/lib/_modules/test/custom-data.service.d.ts.map +1 -0
  45. package/lib/_modules/test/custom-data.service.js +12 -0
  46. package/lib/_modules/test/custom-data.service.js.map +1 -0
  47. package/lib/_modules/test/index.d.ts +4 -0
  48. package/lib/_modules/test/index.d.ts.map +1 -0
  49. package/lib/_modules/test/index.js +8 -0
  50. package/lib/_modules/test/index.js.map +1 -0
  51. package/lib/_modules/test/test-controller.d.ts +6 -0
  52. package/lib/_modules/test/test-controller.d.ts.map +1 -0
  53. package/lib/_modules/test/test-controller.js +127 -0
  54. package/lib/_modules/test/test-controller.js.map +1 -0
  55. package/lib/_modules/test/test-routing-module.d.ts +3 -0
  56. package/lib/_modules/test/test-routing-module.d.ts.map +1 -0
  57. package/lib/_modules/test/test-routing-module.js +10 -0
  58. package/lib/_modules/test/test-routing-module.js.map +1 -0
  59. package/lib/_modules/test-route/custom-data.service.d.ts +1 -1
  60. package/lib/_modules/test-route/custom-data.service.js +1 -1
  61. package/lib/_modules/usage/index.d.ts +4 -0
  62. package/lib/_modules/usage/index.d.ts.map +1 -0
  63. package/lib/_modules/usage/index.js +8 -0
  64. package/lib/_modules/usage/index.js.map +1 -0
  65. package/lib/_modules/usage/usage-controller.d.ts +7 -0
  66. package/lib/_modules/usage/usage-controller.d.ts.map +1 -0
  67. package/lib/_modules/usage/usage-controller.js +90 -0
  68. package/lib/_modules/usage/usage-controller.js.map +1 -0
  69. package/lib/_modules/usage/usage-routing-module.d.ts +3 -0
  70. package/lib/_modules/usage/usage-routing-module.d.ts.map +1 -0
  71. package/lib/_modules/usage/usage-routing-module.js +10 -0
  72. package/lib/_modules/usage/usage-routing-module.js.map +1 -0
  73. package/lib/_modules/usage/usage.service.d.ts +19 -0
  74. package/lib/_modules/usage/usage.service.d.ts.map +1 -0
  75. package/lib/_modules/usage/usage.service.js +110 -0
  76. package/lib/_modules/usage/usage.service.js.map +1 -0
  77. package/lib/_modules/usage-route/usage-controller.js +1 -1
  78. package/lib/_modules/usage-route/usage.service.d.ts +3 -3
  79. package/lib/_modules/usage-route/usage.service.js +3 -3
  80. package/lib/_services/dynamobe-api.service.js +1 -1
  81. package/lib/_services/dynamobe-api.service.js.map +1 -1
  82. package/lib/_services/dynamobe-app.d.ts.map +1 -1
  83. package/lib/_services/dynamobe-app.js +11 -9
  84. package/lib/_services/dynamobe-app.js.map +1 -1
  85. package/lib/_services/dynamobe-auth.service.js +1 -1
  86. package/lib/_services/dynamobe-auth.service.js.map +1 -1
  87. package/lib/_services/dynamobe-controller.service.d.ts +1 -1
  88. package/lib/_services/dynamobe-controller.service.d.ts.map +1 -1
  89. package/lib/_services/dynamobe-data.service.d.ts +3 -3
  90. package/lib/_services/dynamobe-data.service.d.ts.map +1 -1
  91. package/lib/_services/dynamobe-data.service.js +1 -1
  92. package/lib/_services/dynamobe-data.service.js.map +1 -1
  93. package/lib/_services/dynamobe-db.service.d.ts +2 -2
  94. package/lib/_services/dynamobe-db.service.d.ts.map +1 -1
  95. package/lib/_services/dynamobe-db.service.js +1 -1
  96. package/lib/_services/dynamobe-db.service.js.map +1 -1
  97. package/lib/_services/dynamobe-email.service.d.ts.map +1 -1
  98. package/lib/_services/dynamobe-email.service.js +1 -2
  99. package/lib/_services/dynamobe-email.service.js.map +1 -1
  100. package/lib/_services/dynamobe-global.service.d.ts +2 -2
  101. package/lib/_services/dynamobe-global.service.d.ts.map +1 -1
  102. package/lib/_services/dynamobe-routing-module.service.d.ts +1 -1
  103. package/lib/_services/dynamobe-routing-module.service.d.ts.map +1 -1
  104. package/lib/_services/dynamobe-routing-module.service.js +1 -1
  105. package/lib/_services/dynamobe-routing-module.service.js.map +1 -1
  106. package/lib/_services/dynamobe-shared.service.d.ts +2 -2
  107. package/lib/_services/dynamobe-shared.service.d.ts.map +1 -1
  108. package/lib/_services/dynamobe-shared.service.js +22 -13
  109. package/lib/_services/dynamobe-shared.service.js.map +1 -1
  110. package/lib/_services/index.d.ts +0 -1
  111. package/lib/_services/index.d.ts.map +1 -1
  112. package/lib/_services/index.js +0 -1
  113. package/lib/_services/index.js.map +1 -1
  114. package/lib/api-service.d.ts +6 -0
  115. package/lib/api-service.d.ts.map +1 -0
  116. package/lib/api-service.js +12 -0
  117. package/lib/api-service.js.map +1 -0
  118. package/lib/app.d.ts +11 -0
  119. package/lib/app.d.ts.map +1 -0
  120. package/lib/app.js +17 -0
  121. package/lib/app.js.map +1 -0
  122. package/lib/controller.d.ts +5 -0
  123. package/lib/controller.d.ts.map +1 -0
  124. package/lib/controller.js +11 -0
  125. package/lib/controller.js.map +1 -0
  126. package/lib/data-models.d.ts +3 -0
  127. package/lib/data-models.d.ts.map +1 -0
  128. package/lib/data-models.js +6 -0
  129. package/lib/data-models.js.map +1 -0
  130. package/lib/data-service.d.ts +6 -0
  131. package/lib/data-service.d.ts.map +1 -0
  132. package/lib/data-service.js +11 -0
  133. package/lib/data-service.js.map +1 -0
  134. package/lib/index.d.ts +1 -1
  135. package/lib/index.d.ts.map +1 -1
  136. package/lib/index.js +1 -1
  137. package/lib/index.js.map +1 -1
  138. package/lib/tsconfig.tsbuildinfo +427 -287
  139. package/package.json +87 -31
  140. package/src/_constants/fullstack/module-settings/test-module-settings.ts +14 -0
  141. package/src/_constants/fullstack/module-settings/usage-module-settings.ts +12 -0
  142. package/src/_models/dynamo-module-settings.ts +8 -0
  143. package/src/_models/dynamobe-data-model-params.ts +1 -1
  144. package/src/_models/index.ts +12 -24
  145. package/src/_modules/{test-route → test}/custom-data.service.ts +1 -1
  146. package/src/_modules/test/index.ts +6 -0
  147. package/src/_modules/{test-route → test}/test-controller.ts +8 -7
  148. package/src/_modules/test/test-routing-module.ts +7 -0
  149. package/src/_modules/usage/index.ts +6 -0
  150. package/src/_modules/{usage-route → usage}/usage-controller.ts +5 -4
  151. package/src/_modules/usage/usage-routing-module.ts +7 -0
  152. package/src/_modules/{usage-route → usage}/usage.service.ts +4 -4
  153. package/src/_services/dynamobe-api.service.ts +1 -1
  154. package/src/_services/dynamobe-app.ts +12 -10
  155. package/src/_services/dynamobe-auth.service.ts +1 -1
  156. package/src/_services/dynamobe-controller.service.ts +1 -1
  157. package/src/_services/dynamobe-data.service.ts +4 -4
  158. package/src/_services/dynamobe-db.service.ts +4 -4
  159. package/src/_services/dynamobe-email.service.ts +2 -4
  160. package/src/_services/dynamobe-global.service.ts +2 -2
  161. package/src/_services/dynamobe-routing-module.service.ts +2 -2
  162. package/src/_services/dynamobe-shared.service.ts +23 -15
  163. package/src/_services/index.ts +0 -1
  164. package/src/api-service.ts +11 -0
  165. package/src/app.ts +16 -0
  166. package/src/controller.ts +10 -0
  167. package/src/data-models.ts +3 -0
  168. package/src/data-service.ts +9 -0
  169. package/src/index.ts +1 -1
  170. package/src/sync.ffs_db +0 -0
  171. package/src/version.json +1 -1
  172. package/tsconfig.json +6 -4
  173. package/src/_modules/index.ts +0 -7
  174. package/src/_services/dynamobe-global-collection.service.ts +0 -57
  175. package/src/_services/dynamobe-server.ts +0 -226
  176. /package/src/_models/{dynamobe-endpoint-control.ts → dynamobe-endpoint-params.ts} +0 -0
  177. /package/src/_models/{fullstack-models → fullstack}/control-models/daily-usage-data.ts +0 -0
  178. /package/src/_models/{fullstack-models → fullstack}/control-models/dynamobe-data-params.ts +0 -0
  179. /package/src/_models/{fullstack-models → fullstack}/control-models/dynamobe-data-property-params.ts +0 -0
  180. /package/src/_models/{fullstack-models → fullstack}/control-models/dynamobe-error.ts +0 -0
  181. /package/src/_models/{fullstack-models → fullstack}/control-models/geo-ip-location.ts +0 -0
  182. /package/src/_models/{fullstack-models → fullstack}/control-models/usage-action.ts +0 -0
  183. /package/src/_models/{fullstack-models → fullstack}/control-models/usage-data.ts +0 -0
  184. /package/src/_models/{fullstack-models → fullstack}/data-models/custom-data.ts +0 -0
  185. /package/src/_models/{fullstack-models → fullstack}/data-models/metadata.ts +0 -0
  186. /package/src/_models/{fullstack-models → fullstack}/data-models/usage-session.ts +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@futdevpro/nts-dynamo",
3
- "version": "01.03.68",
3
+ "version": "01.03.69",
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",
@@ -25,17 +25,53 @@
25
25
  "types": "./lib/_models/index.d.ts",
26
26
  "typings": "./lib/_models/index.d.ts"
27
27
  },
28
- "./modules": {
29
- "default": "./lib/_modules/index.js",
30
- "module": "./lib/_modules/index.js",
31
- "types": "./lib/_modules/index.d.ts",
32
- "typings": "./lib/_modules/index.d.ts"
28
+ "./modules/test": {
29
+ "default": "./lib/_modules/test/index.js",
30
+ "module": "./lib/_modules/test/index.js",
31
+ "types": "./lib/_modules/test/index.d.ts",
32
+ "typings": "./lib/_modules/test/index.d.ts"
33
+ },
34
+ "./modules/usage": {
35
+ "default": "./lib/_modules/usage/index.js",
36
+ "module": "./lib/_modules/usage/index.js",
37
+ "types": "./lib/_modules/usage/index.d.ts",
38
+ "typings": "./lib/_modules/usage/index.d.ts"
33
39
  },
34
40
  "./services": {
35
41
  "default": "./lib/_services/index.js",
36
42
  "module": "./lib/_services/index.js",
37
43
  "types": "./lib/_services/index.d.ts",
38
44
  "typings": "./lib/_services/index.d.ts"
45
+ },
46
+ "./app": {
47
+ "default": "./lib/app.js",
48
+ "module": "./lib/app.js",
49
+ "types": "./lib/app.d.ts",
50
+ "typings": "./lib/app.d.ts"
51
+ },
52
+ "./api-service": {
53
+ "default": "./lib/api-service.js",
54
+ "module": "./lib/api-service.js",
55
+ "types": "./lib/api-service.d.ts",
56
+ "typings": "./lib/api-service.d.ts"
57
+ },
58
+ "./controller": {
59
+ "default": "./lib/controller.js",
60
+ "module": "./lib/controller.js",
61
+ "types": "./lib/controller.d.ts",
62
+ "typings": "./lib/controller.d.ts"
63
+ },
64
+ "./data-models": {
65
+ "default": "./lib/data-models.js",
66
+ "module": "./lib/data-models.js",
67
+ "types": "./lib/data-models.d.ts",
68
+ "typings": "./lib/data-models.d.ts"
69
+ },
70
+ "./data-service": {
71
+ "default": "./lib/data-service.js",
72
+ "module": "./lib/data-service.js",
73
+ "types": "./lib/data-service.d.ts",
74
+ "typings": "./lib/data-service.d.ts"
39
75
  }
40
76
  },
41
77
  "typesVersions": {
@@ -46,11 +82,29 @@
46
82
  "models": [
47
83
  "lib/_models/index.d.ts"
48
84
  ],
49
- "modules": [
50
- "lib/_modules/index.d.ts"
85
+ "modules/test": [
86
+ "lib/_modules/test/index.d.ts"
87
+ ],
88
+ "modules/usage": [
89
+ "lib/_modules/usage/index.d.ts"
51
90
  ],
52
91
  "services": [
53
92
  "lib/_services/index.d.ts"
93
+ ],
94
+ "app": [
95
+ "lib/app.d.ts"
96
+ ],
97
+ "api-service": [
98
+ "lib/api-service.d.ts"
99
+ ],
100
+ "controller": [
101
+ "lib/controller.d.ts"
102
+ ],
103
+ "data-models": [
104
+ "lib/data-models.d.ts"
105
+ ],
106
+ "data-service": [
107
+ "lib/data-service.d.ts"
54
108
  ]
55
109
  }
56
110
  },
@@ -72,29 +126,31 @@
72
126
  "url": "https://gitlab.com/futdevpro/dynamo-be/issues"
73
127
  },
74
128
  "homepage": "https:/futdevpro.hu/projects/dynamo",
129
+ "peerDependencies": {
130
+ "@types/express": "~4.17.7",
131
+ "@types/mongoose": "~5.7.34",
132
+ "@types/node": "~14.0.27",
133
+ "@types/axios": "~0.14.0",
134
+ "@types/geoip-lite": "~1.4.1",
135
+ "@types/nodemailer": "~6.4.4",
136
+ "axios": "~0.21.4",
137
+ "geoip-lite": "~1.4.5",
138
+ "express": "~4.17.1",
139
+ "mongoose": "~5.9.27",
140
+ "nodemailer": "~6.4.11",
141
+ "rimraf": "~3.0.2",
142
+ "typescript": "~3.9.7",
143
+ "rxjs": "~7.4.0"
144
+ },
75
145
  "dependencies": {
76
- "@types/express": "^4.17.7",
77
- "@types/mongoose": "^5.7.34",
78
- "@types/node": "^14.0.27",
79
- "@types/oauth2orize": "^1.8.8",
80
- "@types/passport": "^1.0.4",
81
- "@types/axios": "^0.14.0",
82
- "@types/geoip-lite": "^1.4.1",
83
- "@types/jsonwebtoken": "^8.5.0",
84
- "@types/nodemailer": "^6.4.4",
85
- "axios": "^0.21.4",
86
- "crypto-js": "^4.1.1",
87
- "geoip-lite": "^1.4.5",
88
- "express": "^4.17.1",
89
- "mongoose": "^5.9.27",
90
- "nodemon": "^2.0.4",
91
- "passport": "^0.4.1",
92
- "nodemailer": "^6.4.11",
93
- "rimraf": "^3.0.2",
94
- "ts-node": "^8.10.2",
95
- "typescript": "^3.9.7",
96
- "rxjs": "^7.4.0",
97
- "jsonwebtoken": "^8.5.1",
98
- "tslib": "^2.0.1"
146
+ "@types/oauth2orize": "~1.8.8",
147
+ "@types/passport": "~1.0.4",
148
+ "@types/jsonwebtoken": "~8.5.0",
149
+ "crypto-js": "~4.1.1",
150
+ "nodemon": "~2.0.4",
151
+ "passport": "~0.4.1",
152
+ "ts-node": "~8.10.2",
153
+ "jsonwebtoken": "~8.5.1",
154
+ "tslib": "~2.0.1"
99
155
  }
100
156
  }
@@ -0,0 +1,14 @@
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
+ };
@@ -0,0 +1,12 @@
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
+ getUsageData: '/get/all',
11
+ }
12
+ };
@@ -0,0 +1,8 @@
1
+
2
+
3
+ export interface DynamoModuleSettings {
4
+ mainRoute: string;
5
+ endPoints: {
6
+ [endpointName: string]: string
7
+ }
8
+ }
@@ -1,6 +1,6 @@
1
1
 
2
2
  import { DataModelType } from '../_enums/data-model-type.enum';
3
- import { DynamoBEDataPropertyParams } from './fullstack-models/control-models/dynamobe-data-property-params';
3
+ import { DynamoBEDataPropertyParams } from './fullstack/control-models/dynamobe-data-property-params';
4
4
 
5
5
  export class DynamoBEDataModelParams {
6
6
  dataName: string;
@@ -1,33 +1,21 @@
1
1
 
2
2
 
3
- // MODULES
3
+ // MODELS
4
4
  export * from './dynamobe-api-call-params';
5
5
  export * from './dynamobe-app-params';
6
6
  export * from './dynamobe-data-model-params';
7
- export * from './dynamobe-endpoint-control';
7
+ export * from './dynamobe-endpoint-params';
8
8
  export * from './dynamobe-global-settings';
9
9
  // FULLSTACK - CONTROL MODELS
10
- export * from './fullstack-models/control-models/daily-usage-data';
11
- export * from './fullstack-models/control-models/dynamobe-data-property-params';
12
- export * from './fullstack-models/control-models/dynamobe-error';
13
- export * from './fullstack-models/control-models/geo-ip-location';
14
- export * from './fullstack-models/control-models/usage-action';
15
- export * from './fullstack-models/control-models/usage-data';
16
- export * from './fullstack-models/control-models/dynamobe-data-params';
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/usage-action';
15
+ export * from './fullstack/control-models/usage-data';
16
+ export * from './fullstack/control-models/dynamobe-data-params';
17
17
  // FULLSTACK - DATA MODELS
18
- export * from './fullstack-models/data-models/custom-data';
19
- export * from './fullstack-models/data-models/metadata';
20
- export * from './fullstack-models/data-models/usage-session';
18
+ export * from './fullstack/data-models/custom-data';
19
+ export * from './fullstack/data-models/metadata';
20
+ export * from './fullstack/data-models/usage-session';
21
21
 
22
-
23
- /*
24
- import { DynamoBEDataModelParams } from './dynamobe-data-model-params';
25
- import { Metadata } from './fullstack-models/data-models/metadata';
26
- */
27
- /*
28
- module.exports = {
29
- Metadata, DynamoBEDataModelParams
30
- } */
31
- /* declare module Models {
32
- Metadata, DynamoBEDataModelParams
33
- } */
@@ -1,7 +1,7 @@
1
1
 
2
2
 
3
3
 
4
- import { CustomData, customDataModelParams } from '../../_models/fullstack-models/data-models/custom-data';
4
+ import { CustomData, customDataModelParams } from '../../_models/fullstack/data-models/custom-data';
5
5
  import { DynamoBEDataService } from '../../_services/dynamobe-data.service';
6
6
 
7
7
  export class CustomDataService extends DynamoBEDataService<CustomData> {
@@ -0,0 +1,6 @@
1
+
2
+ // MODULES
3
+ export * from './test-controller';
4
+ export * from './custom-data.service';
5
+ export * from './test-routing-module';
6
+
@@ -1,7 +1,8 @@
1
1
 
2
2
  import { Request, Response } from 'express';
3
+ import { testModuleSettings } from '../../_constants/fullstack/module-settings/test-module-settings';
3
4
  import { HttpCallType } from '../../_enums/http/http-call-type.enum';
4
- import { DynamoBEEndpointParams } from '../../_models/dynamobe-endpoint-control';
5
+ import { DynamoBEEndpointParams } from '../../_models/dynamobe-endpoint-params';
5
6
  import { DynamoBEController } from '../../_services/dynamobe-controller.service';
6
7
  import { CustomDataService } from './custom-data.service';
7
8
 
@@ -17,7 +18,7 @@ export class TestController extends DynamoBEController {
17
18
  new DynamoBEEndpointParams({
18
19
  name: 'testGet',
19
20
  type: HttpCallType.get,
20
- endpoint: '/test-get',
21
+ endpoint: testModuleSettings.endPoints.testGet,
21
22
  tasks: [
22
23
  async (req: Request, res: Response) => {
23
24
  res.send({
@@ -32,7 +33,7 @@ export class TestController extends DynamoBEController {
32
33
  new DynamoBEEndpointParams({
33
34
  name: 'testPost',
34
35
  type: HttpCallType.post,
35
- endpoint: '/test-post',
36
+ endpoint: testModuleSettings.endPoints.testPost,
36
37
  tasks: [
37
38
  async (req: Request, res: Response) => {
38
39
  res.send({
@@ -47,7 +48,7 @@ export class TestController extends DynamoBEController {
47
48
  new DynamoBEEndpointParams({
48
49
  name: 'testPut',
49
50
  type: HttpCallType.put,
50
- endpoint: '/test-put',
51
+ endpoint: testModuleSettings.endPoints.testPut,
51
52
  tasks: [
52
53
  async (req: Request, res: Response) => {
53
54
  res.send({
@@ -62,7 +63,7 @@ export class TestController extends DynamoBEController {
62
63
  new DynamoBEEndpointParams({
63
64
  name: 'testPatch',
64
65
  type: HttpCallType.patch,
65
- endpoint: '/test-patch',
66
+ endpoint: testModuleSettings.endPoints.testPatch,
66
67
  tasks: [
67
68
  async (req: Request, res: Response) => {
68
69
  res.send({
@@ -77,7 +78,7 @@ export class TestController extends DynamoBEController {
77
78
  new DynamoBEEndpointParams({
78
79
  name: 'testDelete',
79
80
  type: HttpCallType.delete,
80
- endpoint: '/test-delete',
81
+ endpoint: testModuleSettings.endPoints.testDelete,
81
82
  tasks: [
82
83
  async (req: Request, res: Response) => {
83
84
  res.send({
@@ -113,7 +114,7 @@ export class TestController extends DynamoBEController {
113
114
  new DynamoBEEndpointParams({
114
115
  name: 'modifyCustomData',
115
116
  type: HttpCallType.post,
116
- endpoint: '/custom/post',
117
+ endpoint: testModuleSettings.endPoints.modifyCustomData,
117
118
  tasks: [
118
119
  async (req: Request, res: Response, issuer: string) => {
119
120
  const customDataService = new CustomDataService(req.body, issuer);
@@ -0,0 +1,7 @@
1
+ import { DynamoBERountingModule } from '../../_services/dynamobe-routing-module.service';
2
+ import { TestController } from './test-controller';
3
+
4
+ export const usageRoutingModule = new DynamoBERountingModule({
5
+ route: '/api/test',
6
+ controllers: [ TestController.getInstance() ]
7
+ });
@@ -0,0 +1,6 @@
1
+
2
+ // MODULE
3
+ export * from './usage-controller';
4
+ export * from './usage.service';
5
+ export * from './usage-routing-module';
6
+
@@ -1,8 +1,9 @@
1
1
 
2
2
  import { Request, Response } from 'express';
3
+ import { usageModuleSettings } from '../../_constants/fullstack/module-settings/usage-module-settings';
3
4
  import { HttpCallType } from '../../_enums/http/http-call-type.enum';
4
- import { DynamoBEEndpointParams } from '../../_models/dynamobe-endpoint-control';
5
- import { DynamoUsageSession } from '../../_models/fullstack-models/data-models/usage-session';
5
+ import { DynamoBEEndpointParams } from '../../_models/dynamobe-endpoint-params';
6
+ import { DynamoUsageSession } from '../../_models/fullstack/data-models/usage-session';
6
7
  import { DynamoBEAuthService } from '../../_services/dynamobe-auth.service';
7
8
  import { DynamoBEController } from '../../_services/dynamobe-controller.service';
8
9
  import { DBE_Global_S } from '../../_services/dynamobe-global.service';
@@ -24,7 +25,7 @@ export class UsageController extends DynamoBEController {
24
25
  new DynamoBEEndpointParams({
25
26
  name: 'newSession',
26
27
  type: HttpCallType.get,
27
- endpoint: '/new-session',
28
+ endpoint: usageModuleSettings.endPoints.newSession,
28
29
  tasks: [
29
30
  async (req: Request, res: Response, issuer: string) => {
30
31
  const authService = DBE_Global_S.getAuthService();
@@ -93,7 +94,7 @@ export class UsageController extends DynamoBEController {
93
94
  new DynamoBEEndpointParams({
94
95
  name: 'getAllUsageData',
95
96
  type: HttpCallType.get,
96
- endpoint: '/get/all',
97
+ endpoint: usageModuleSettings.endPoints.getAllUsageData,
97
98
  preProcessess: [ this.authService.authTokenPermAccUsageData ],
98
99
  tasks: [
99
100
  async (req: Request, res: Response) => {
@@ -0,0 +1,7 @@
1
+ import { DynamoBERountingModule } from '../../_services/dynamobe-routing-module.service';
2
+ import { UsageController } from './usage-controller';
3
+
4
+ export const usageRoutingModule = new DynamoBERountingModule({
5
+ route: '/api/usage',
6
+ controllers: [ UsageController.getInstance() ]
7
+ });
@@ -1,11 +1,11 @@
1
1
 
2
2
  import { DynamoBEDataService } from '../../_services/dynamobe-data.service';
3
- import { DynamoBEError } from '../../_models/fullstack-models/control-models/dynamobe-error';
3
+ import { DynamoBEError } from '../../_models/fullstack/control-models/dynamobe-error';
4
4
  import { DBE_Shared } from '../../_services/dynamobe-shared.service';
5
5
  import { Request } from 'express';
6
- import { DynamoUsageData } from '../../_models/fullstack-models/control-models/usage-data';
7
- import { DailyUsageData } from '../../_models/fullstack-models/control-models/daily-usage-data';
8
- import { DynamoUsageSession, usageSessionModelParams } from '../../_models/fullstack-models/data-models/usage-session';
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
9
 
10
10
  export class UsageService extends DynamoBEDataService<DynamoUsageSession> {
11
11
  usageData: DynamoUsageData[] = [];
@@ -3,7 +3,7 @@ import * as Axios from 'axios';
3
3
  import { HttpCallType } from '../_enums/http/http-call-type.enum';
4
4
  import { HttpResponseType } from '../_enums/http/http-response-type.enum';
5
5
  import { DynamoBEApiCallParams } from '../_models/dynamobe-api-call-params';
6
- import { DynamoBEError } from '../_models/fullstack-models/control-models/dynamobe-error';
6
+ import { DynamoBEError } from '../_models/fullstack/control-models/dynamobe-error';
7
7
  import { DBE_Shared } from './dynamobe-shared.service';
8
8
 
9
9
  export class DynamoBEApiService {
@@ -13,7 +13,7 @@ import { DynamoBESingletonService } from './dynamobe-singleton.service';
13
13
  import { DynamoBERouteSecurity } from '../_enums/dynamobe-route-security.enum';
14
14
  import { DynamoBERountingModule } from './dynamobe-routing-module.service';
15
15
  import { DBE_Global_S } from './dynamobe-global.service';
16
- import { DynamoBEEndpointParams } from '../_models/dynamobe-endpoint-control';
16
+ import { DynamoBEEndpointParams } from '../_models/dynamobe-endpoint-params';
17
17
 
18
18
  /**
19
19
  * This will be the main service of our server project,
@@ -62,17 +62,19 @@ export abstract class DynamoBEApp extends DynamoBESingletonService {
62
62
  this.setupRoutingModules();
63
63
  this.setSecurity();
64
64
 
65
- this.initExpresses();
66
- this.startExpresses();
65
+ if (0 < this.routingModules.length) {
66
+ this.initExpresses();
67
+ this.startExpresses();
67
68
 
68
- if (this.security !== DynamoBERouteSecurity.secure) {
69
- this.mountOpenRoutes();
70
- }
71
- if (this.security !== DynamoBERouteSecurity.open && this.cert) {
72
- this.mountSecureRoutes();
73
- }
69
+ if (this.security !== DynamoBERouteSecurity.secure) {
70
+ this.mountOpenRoutes();
71
+ }
72
+ if (this.security !== DynamoBERouteSecurity.open && this.cert) {
73
+ this.mountSecureRoutes();
74
+ }
74
75
 
75
- if (this.log) console.log(`\nRoutes mounted.... server using security: ${this.security}`);
76
+ if (this.log) console.log(`\nRoutes mounted.... server using security: ${this.security}`);
77
+ }
76
78
  } catch (error) {
77
79
  DBE_Shared.logError('\nApplication start failed.\n', error);
78
80
  }
@@ -1,6 +1,6 @@
1
1
 
2
2
  import { NextFunction, Request, Response } from 'express';
3
- import { DynamoBEError } from '../_models/fullstack-models/control-models/dynamobe-error';
3
+ import { DynamoBEError } from '../_models/fullstack/control-models/dynamobe-error';
4
4
  import { DynamoBESingletonService } from './dynamobe-singleton.service';
5
5
 
6
6
  /**
@@ -1,6 +1,6 @@
1
1
 
2
2
 
3
- import { DynamoBEEndpointParams } from '../_models/dynamobe-endpoint-control';
3
+ import { DynamoBEEndpointParams } from '../_models/dynamobe-endpoint-params';
4
4
  import { DBE_Shared } from './dynamobe-shared.service';
5
5
  import { DynamoBESingletonService } from './dynamobe-singleton.service';
6
6
 
@@ -1,10 +1,10 @@
1
1
 
2
- import { DynamoBEError } from '../_models/fullstack-models/control-models/dynamobe-error';
3
- import { Metadata } from '../_models/fullstack-models/data-models/metadata';
2
+ import { DynamoBEError } from '../_models/fullstack/control-models/dynamobe-error';
3
+ import { Metadata } from '../_models/fullstack/data-models/metadata';
4
4
  import { DynamoBEDBService } from './dynamobe-db.service';
5
- import { DynamoBEDataPropertyParams } from '../_models/fullstack-models/control-models/dynamobe-data-property-params';
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-models/control-models/dynamobe-data-params';
7
+ import { DynamoBEDataParams } from '../_models/fullstack/control-models/dynamobe-data-params';
8
8
 
9
9
  export class DynamoBEDataService<T extends Metadata> {
10
10
  dataDBService: DynamoBEDBService<T>;
@@ -1,10 +1,10 @@
1
1
 
2
2
  import * as mongoose from 'mongoose';
3
3
  import { Schema } from 'mongoose';
4
- import { DynamoBEError } from '../_models/fullstack-models/control-models/dynamobe-error';
5
- import { Metadata } from '../_models/fullstack-models/data-models/metadata';
6
- import { DynamoBEDataPropertyParams } from '../_models/fullstack-models/control-models/dynamobe-data-property-params';
7
- import { DynamoBEDataParams } from '../_models/fullstack-models/control-models/dynamobe-data-params';
4
+ import { DynamoBEError } from '../_models/fullstack/control-models/dynamobe-error';
5
+ import { Metadata } from '../_models/fullstack/data-models/metadata';
6
+ import { DynamoBEDataPropertyParams } from '../_models/fullstack/control-models/dynamobe-data-property-params';
7
+ import { DynamoBEDataParams } from '../_models/fullstack/control-models/dynamobe-data-params';
8
8
 
9
9
  export class DynamoBEDBService<T extends Metadata> {
10
10
  dataModel = mongoose.model(this.dataParams.dbName, this.getSchema());
@@ -3,7 +3,7 @@ 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 '../_models/fullstack-models/control-models/dynamobe-error';
6
+ import { DynamoBEError } from '../_models/fullstack/control-models/dynamobe-error';
7
7
  import { DBE_Shared } from './dynamobe-shared.service';
8
8
 
9
9
  export class DynamoBEEmailService {
@@ -25,7 +25,6 @@ export class DynamoBEEmailService {
25
25
  email: string,
26
26
  pass: string,
27
27
  senderName: string,
28
- /* constructionFinishedCallback: () => void, */
29
28
  rootPath: string,
30
29
  templatePaths: {
31
30
  [templateName: string]: string
@@ -44,9 +43,8 @@ export class DynamoBEEmailService {
44
43
  pass: set.pass
45
44
  }
46
45
  });
47
- /* this.constructionFinishedCallback = set.constructionFinishedCallback; */
48
46
  if (set.templatePaths) {
49
- for(let key in set.templatePaths) {
47
+ for (let key in set.templatePaths) {
50
48
  this.loadTemplate(key, set.rootPath, set.templatePaths[key]);
51
49
  }
52
50
  } else {
@@ -1,14 +1,14 @@
1
1
 
2
2
 
3
3
  import { DynamoBERouteSecurity } from '../_enums/dynamobe-route-security.enum';
4
- import { Metadata } from '../_models/fullstack-models/data-models/metadata';
4
+ import { Metadata } from '../_models/fullstack/data-models/metadata';
5
5
  import { DynamoBEGlobalSettings } from '../_models/dynamobe-global-settings';
6
6
  import { DynamoBEAuthService } from './dynamobe-auth.service';
7
7
  import { DynamoBEDBServiceCollection } from './dynamobe-db-service-collection.service';
8
8
  import { DynamoBEDBService } from './dynamobe-db.service';
9
9
  import { DynamoBEEmailServiceCollection } from './dynamobe-email-service-collection.service';
10
10
  import { DynamoBESingletonService } from './dynamobe-singleton.service';
11
- import { DynamoBEDataParams } from '../_models/fullstack-models/control-models/dynamobe-data-params';
11
+ import { DynamoBEDataParams } from '../_models/fullstack/control-models/dynamobe-data-params';
12
12
 
13
13
  /**
14
14
  * This is the main Global/Core Service Collection used by DynamoBE,
@@ -2,8 +2,8 @@
2
2
  import { Router } from 'express';
3
3
  import { DynamoBERouteSecurity } from '../_enums/dynamobe-route-security.enum';
4
4
  import { HttpCallType } from '../_enums/http/http-call-type.enum';
5
- import { DynamoBEEndpointParams } from '../_models/dynamobe-endpoint-control';
6
- import { DynamoBEError } from '../_models/fullstack-models/control-models/dynamobe-error';
5
+ import { DynamoBEEndpointParams } from '../_models/dynamobe-endpoint-params';
6
+ import { DynamoBEError } from '../_models/fullstack/control-models/dynamobe-error';
7
7
  import { DynamoBEController } from './dynamobe-controller.service';
8
8
  import { DBE_Global_S } from './dynamobe-global.service';
9
9
  import { DBE_Shared } from './dynamobe-shared.service';
@@ -1,8 +1,11 @@
1
+
2
+ import * as ReadLine from 'readline';
1
3
  import { Request } from 'express';
2
4
  import * as GeoIp from 'geoip-lite';
3
- import { GeoIpLocation } from '../_models/fullstack-models/control-models/geo-ip-location';
5
+
6
+ import { GeoIpLocation } from '../_models/fullstack/control-models/geo-ip-location';
4
7
  import { LogStyle } from '../_enums/log-style.enum';
5
- import { DynamoBEError } from '../_models/fullstack-models/control-models/dynamobe-error';
8
+ import { DynamoBEError } from '../_models/fullstack/control-models/dynamobe-error';
6
9
 
7
10
  export const second = 1000;
8
11
  export const minute = second * 60;
@@ -299,22 +302,27 @@ export class DBE_Shared {
299
302
  console.warn(`${LogStyle.yellow}${LogStyle.bright}${message}${LogStyle.reset}`);
300
303
  }
301
304
  }
305
+
306
+ static async prompt(question: string): Promise<string> {
307
+ const readLine = ReadLine.createInterface({
308
+ input: process.stdin,
309
+ output: process.stdout
310
+ });
311
+
312
+ return new Promise((resolve, reject) => {
313
+ try {
314
+ readLine.question(question, (result: string) => {
315
+ resolve(result);
316
+ readLine.close();
317
+ });
318
+ } catch (error) {
319
+ reject(error);
320
+ }
321
+ });
322
+ }
302
323
  }
303
324
 
304
325
  export interface LocationCoordinates {
305
326
  longitude: number;
306
327
  latitude: number;
307
328
  }
308
-
309
- export const dynamoTitleLog =
310
- `\x1b[32m \x1b[1m
311
-
312
- ||||||VVV VVV /// |||V ||| //VV |||V /||| /|||||V
313
- ||| VVV VVV /// |||VV ||| ///VVV |||VV //||| /// VVV
314
- ||| ||| VVV /// |||VVV ||| /// VVV |||VVV///||| ||| |||
315
- ||| ||| V|||/ ||| VVV ||| ||| ||| ||| VV// ||| ||| |||
316
- ||| ||| ||| ||| VVV||| |||||||||| ||| ||| ||| |||
317
- ||| /// ||| ||| VV||| ||| ||| ||| ||| VVV ///
318
- ||||||/// ||| ||| V||| ||| ||| ||| ||| V|||||/
319
-
320
- By Future Development Program Kft.\x1b[0m`.replace(/V/g, '\\');
@@ -13,7 +13,6 @@ export * from './dynamobe-email-service-collection.service';
13
13
  export * from './dynamobe-email.service';
14
14
  export * from './dynamobe-global.service';
15
15
  export * from './dynamobe-routing-module.service';
16
- export * from './dynamobe-server';
17
16
  export * from './dynamobe-shared.service';
18
17
  export * from './dynamobe-singleton.service';
19
18
 
@@ -0,0 +1,11 @@
1
+
2
+ // SERVICES
3
+ export * from './_services/dynamobe-api.service';
4
+ export * from './_services/dynamobe-singleton.service';
5
+
6
+ // MODELS
7
+ export * from './_models/dynamobe-api-call-params';
8
+ export * from './_models/fullstack/control-models/dynamobe-error';
9
+
10
+ // ENUMS
11
+ export * from './_enums/http/http-call-type.enum';