@futdevpro/nts-dynamo 1.4.8 → 1.4.10

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 (296) hide show
  1. package/lib/_constants/dynamobe-global.settings.d.ts.map +1 -1
  2. package/lib/_constants/dynamobe-global.settings.js.map +1 -1
  3. package/lib/_constants/index.d.ts +0 -2
  4. package/lib/_constants/index.d.ts.map +1 -1
  5. package/lib/_constants/index.js +0 -2
  6. package/lib/_constants/index.js.map +1 -1
  7. package/lib/_models/dynamobe-api-call-params.d.ts +3 -1
  8. package/lib/_models/dynamobe-api-call-params.d.ts.map +1 -1
  9. package/lib/_models/dynamobe-api-call-params.js +7 -6
  10. package/lib/_models/dynamobe-api-call-params.js.map +1 -1
  11. package/lib/_models/dynamobe-data-model-params.d.ts +0 -12
  12. package/lib/_models/dynamobe-data-model-params.d.ts.map +1 -1
  13. package/lib/_models/dynamobe-data-model-params.js +22 -12
  14. package/lib/_models/dynamobe-data-model-params.js.map +1 -1
  15. package/lib/_models/dynamobe-endpoint-params.d.ts.map +1 -1
  16. package/lib/_models/dynamobe-endpoint-params.js.map +1 -1
  17. package/lib/_models/index.d.ts +0 -11
  18. package/lib/_models/index.d.ts.map +1 -1
  19. package/lib/_models/index.js +1 -13
  20. package/lib/_models/index.js.map +1 -1
  21. package/lib/_modules/api-service.index.d.ts +1 -1
  22. package/lib/_modules/api-service.index.d.ts.map +1 -1
  23. package/lib/_modules/api-service.index.js +1 -1
  24. package/lib/_modules/api-service.index.js.map +1 -1
  25. package/lib/_modules/auth.index.d.ts +1 -1
  26. package/lib/_modules/auth.index.d.ts.map +1 -1
  27. package/lib/_modules/auth.index.js +1 -1
  28. package/lib/_modules/auth.index.js.map +1 -1
  29. package/lib/_modules/data-service.index.d.ts +1 -1
  30. package/lib/_modules/data-service.index.d.ts.map +1 -1
  31. package/lib/_modules/data-service.index.js +1 -1
  32. package/lib/_modules/data-service.index.js.map +1 -1
  33. package/lib/_modules/test/custom-data.service.d.ts +1 -1
  34. package/lib/_modules/test/custom-data.service.d.ts.map +1 -1
  35. package/lib/_modules/test/custom-data.service.js +2 -2
  36. package/lib/_modules/test/custom-data.service.js.map +1 -1
  37. package/lib/_modules/test/get-test-routing-module.js +2 -2
  38. package/lib/_modules/test/get-test-routing-module.js.map +1 -1
  39. package/lib/_modules/test/index.d.ts +1 -2
  40. package/lib/_modules/test/index.d.ts.map +1 -1
  41. package/lib/_modules/test/index.js +2 -3
  42. package/lib/_modules/test/index.js.map +1 -1
  43. package/lib/_modules/test/test-controller.js +8 -8
  44. package/lib/_modules/test/test-controller.js.map +1 -1
  45. package/lib/_modules/usage/get-usage-routing-module.js +2 -2
  46. package/lib/_modules/usage/get-usage-routing-module.js.map +1 -1
  47. package/lib/_modules/usage/index.d.ts +1 -2
  48. package/lib/_modules/usage/index.d.ts.map +1 -1
  49. package/lib/_modules/usage/index.js +2 -3
  50. package/lib/_modules/usage/index.js.map +1 -1
  51. package/lib/_modules/usage/usage-controller.d.ts.map +1 -1
  52. package/lib/_modules/usage/usage-controller.js +6 -7
  53. package/lib/_modules/usage/usage-controller.js.map +1 -1
  54. package/lib/_modules/usage/usage.service.d.ts +2 -4
  55. package/lib/_modules/usage/usage.service.d.ts.map +1 -1
  56. package/lib/_modules/usage/usage.service.js +8 -9
  57. package/lib/_modules/usage/usage.service.js.map +1 -1
  58. package/lib/_services/dynamobe-api.service.d.ts +2 -1
  59. package/lib/_services/dynamobe-api.service.d.ts.map +1 -1
  60. package/lib/_services/dynamobe-api.service.js +25 -7
  61. package/lib/_services/dynamobe-api.service.js.map +1 -1
  62. package/lib/_services/dynamobe-auth.service.d.ts.map +1 -1
  63. package/lib/_services/dynamobe-auth.service.js +3 -3
  64. package/lib/_services/dynamobe-auth.service.js.map +1 -1
  65. package/lib/_services/dynamobe-data.service.d.ts +1 -3
  66. package/lib/_services/dynamobe-data.service.d.ts.map +1 -1
  67. package/lib/_services/dynamobe-data.service.js +17 -17
  68. package/lib/_services/dynamobe-data.service.js.map +1 -1
  69. package/lib/_services/dynamobe-db.service.d.ts +1 -2
  70. package/lib/_services/dynamobe-db.service.d.ts.map +1 -1
  71. package/lib/_services/dynamobe-db.service.js +26 -26
  72. package/lib/_services/dynamobe-db.service.js.map +1 -1
  73. package/lib/_services/dynamobe-email.service.d.ts.map +1 -1
  74. package/lib/_services/dynamobe-email.service.js +5 -5
  75. package/lib/_services/dynamobe-email.service.js.map +1 -1
  76. package/lib/_services/dynamobe-global.service.d.ts +1 -2
  77. package/lib/_services/dynamobe-global.service.d.ts.map +1 -1
  78. package/lib/_services/dynamobe-global.service.js.map +1 -1
  79. package/lib/_services/dynamobe-routing-module.service.d.ts.map +1 -1
  80. package/lib/_services/dynamobe-routing-module.service.js +4 -4
  81. package/lib/_services/dynamobe-routing-module.service.js.map +1 -1
  82. package/lib/_services/dynamobe-shared-be.service.d.ts +1 -1
  83. package/lib/_services/dynamobe-shared-be.service.d.ts.map +1 -1
  84. package/lib/_services/dynamobe-shared-be.service.js.map +1 -1
  85. package/lib/_services/dynamobe-shared.service.d.ts +1 -12
  86. package/lib/_services/dynamobe-shared.service.d.ts.map +1 -1
  87. package/lib/_services/dynamobe-shared.service.js +11 -18
  88. package/lib/_services/dynamobe-shared.service.js.map +1 -1
  89. package/lib/index.js +0 -6
  90. package/lib/index.js.map +1 -1
  91. package/lib/tsconfig.tsbuildinfo +1340 -818
  92. package/package.json +3 -2
  93. package/src/_constants/dynamobe-global.settings.ts +1 -0
  94. package/src/_constants/index.ts +0 -2
  95. package/src/_models/dynamobe-api-call-params.ts +9 -6
  96. package/src/_models/dynamobe-data-model-params.ts +3 -2
  97. package/src/_models/dynamobe-endpoint-params.ts +1 -0
  98. package/src/_models/index.ts +1 -13
  99. package/src/_modules/api-service.index.ts +1 -1
  100. package/src/_modules/auth.index.ts +1 -1
  101. package/src/_modules/data-service.index.ts +1 -1
  102. package/src/_modules/test/custom-data.service.ts +1 -1
  103. package/src/_modules/test/get-test-routing-module.ts +1 -1
  104. package/src/_modules/test/index.ts +2 -4
  105. package/src/_modules/test/test-controller.ts +1 -1
  106. package/src/_modules/usage/get-usage-routing-module.ts +1 -1
  107. package/src/_modules/usage/index.ts +2 -3
  108. package/src/_modules/usage/usage-controller.ts +1 -2
  109. package/src/_modules/usage/usage.service.ts +5 -5
  110. package/src/_services/dynamobe-api.service.ts +21 -5
  111. package/src/_services/dynamobe-auth.service.ts +2 -1
  112. package/src/_services/dynamobe-data.service.ts +2 -4
  113. package/src/_services/dynamobe-db.service.ts +1 -4
  114. package/src/_services/dynamobe-email.service.ts +2 -1
  115. package/src/_services/dynamobe-global.service.ts +2 -2
  116. package/src/_services/dynamobe-routing-module.service.ts +2 -1
  117. package/src/_services/dynamobe-shared-be.service.ts +1 -1
  118. package/src/_services/dynamobe-shared.service.ts +2 -15
  119. package/src/index.ts +1 -6
  120. package/lib/_constants/fullstack/module-settings/test-module-settings.d.ts +0 -3
  121. package/lib/_constants/fullstack/module-settings/test-module-settings.d.ts.map +0 -1
  122. package/lib/_constants/fullstack/module-settings/test-module-settings.js +0 -16
  123. package/lib/_constants/fullstack/module-settings/test-module-settings.js.map +0 -1
  124. package/lib/_constants/fullstack/module-settings/usage-module-settings.d.ts +0 -3
  125. package/lib/_constants/fullstack/module-settings/usage-module-settings.d.ts.map +0 -1
  126. package/lib/_constants/fullstack/module-settings/usage-module-settings.js +0 -13
  127. package/lib/_constants/fullstack/module-settings/usage-module-settings.js.map +0 -1
  128. package/lib/_models/dynamobe-endpoint-control.d.ts +0 -30
  129. package/lib/_models/dynamobe-endpoint-control.d.ts.map +0 -1
  130. package/lib/_models/dynamobe-endpoint-control.js +0 -95
  131. package/lib/_models/dynamobe-endpoint-control.js.map +0 -1
  132. package/lib/_models/fullstack/control-models/daily-usage-data.d.ts +0 -18
  133. package/lib/_models/fullstack/control-models/daily-usage-data.d.ts.map +0 -1
  134. package/lib/_models/fullstack/control-models/daily-usage-data.js +0 -22
  135. package/lib/_models/fullstack/control-models/daily-usage-data.js.map +0 -1
  136. package/lib/_models/fullstack/control-models/dynamobe-data-params.d.ts +0 -11
  137. package/lib/_models/fullstack/control-models/dynamobe-data-params.d.ts.map +0 -1
  138. package/lib/_models/fullstack/control-models/dynamobe-data-params.js +0 -12
  139. package/lib/_models/fullstack/control-models/dynamobe-data-params.js.map +0 -1
  140. package/lib/_models/fullstack/control-models/dynamobe-data-property-params.d.ts +0 -28
  141. package/lib/_models/fullstack/control-models/dynamobe-data-property-params.d.ts.map +0 -1
  142. package/lib/_models/fullstack/control-models/dynamobe-data-property-params.js +0 -67
  143. package/lib/_models/fullstack/control-models/dynamobe-data-property-params.js.map +0 -1
  144. package/lib/_models/fullstack/control-models/dynamobe-error.d.ts +0 -18
  145. package/lib/_models/fullstack/control-models/dynamobe-error.d.ts.map +0 -1
  146. package/lib/_models/fullstack/control-models/dynamobe-error.js +0 -188
  147. package/lib/_models/fullstack/control-models/dynamobe-error.js.map +0 -1
  148. package/lib/_models/fullstack/control-models/geo-ip-location.d.ts +0 -26
  149. package/lib/_models/fullstack/control-models/geo-ip-location.d.ts.map +0 -1
  150. package/lib/_models/fullstack/control-models/geo-ip-location.js +0 -3
  151. package/lib/_models/fullstack/control-models/geo-ip-location.js.map +0 -1
  152. package/lib/_models/fullstack/control-models/usage-action.d.ts +0 -9
  153. package/lib/_models/fullstack/control-models/usage-action.d.ts.map +0 -1
  154. package/lib/_models/fullstack/control-models/usage-action.js +0 -13
  155. package/lib/_models/fullstack/control-models/usage-action.js.map +0 -1
  156. package/lib/_models/fullstack/control-models/usage-data.d.ts +0 -14
  157. package/lib/_models/fullstack/control-models/usage-data.d.ts.map +0 -1
  158. package/lib/_models/fullstack/control-models/usage-data.js +0 -16
  159. package/lib/_models/fullstack/control-models/usage-data.js.map +0 -1
  160. package/lib/_models/fullstack/data-models/custom-data.d.ts +0 -16
  161. package/lib/_models/fullstack/data-models/custom-data.d.ts.map +0 -1
  162. package/lib/_models/fullstack/data-models/custom-data.js +0 -28
  163. package/lib/_models/fullstack/data-models/custom-data.js.map +0 -1
  164. package/lib/_models/fullstack/data-models/metadata.d.ts +0 -17
  165. package/lib/_models/fullstack/data-models/metadata.d.ts.map +0 -1
  166. package/lib/_models/fullstack/data-models/metadata.js +0 -17
  167. package/lib/_models/fullstack/data-models/metadata.js.map +0 -1
  168. package/lib/_models/fullstack/data-models/usage-session.d.ts +0 -34
  169. package/lib/_models/fullstack/data-models/usage-session.d.ts.map +0 -1
  170. package/lib/_models/fullstack/data-models/usage-session.js +0 -53
  171. package/lib/_models/fullstack/data-models/usage-session.js.map +0 -1
  172. package/lib/_models/fullstack-models/control-models/daily-usage-data.d.ts +0 -18
  173. package/lib/_models/fullstack-models/control-models/daily-usage-data.d.ts.map +0 -1
  174. package/lib/_models/fullstack-models/control-models/daily-usage-data.js +0 -22
  175. package/lib/_models/fullstack-models/control-models/daily-usage-data.js.map +0 -1
  176. package/lib/_models/fullstack-models/control-models/dynamobe-data-params.d.ts +0 -11
  177. package/lib/_models/fullstack-models/control-models/dynamobe-data-params.d.ts.map +0 -1
  178. package/lib/_models/fullstack-models/control-models/dynamobe-data-params.js +0 -12
  179. package/lib/_models/fullstack-models/control-models/dynamobe-data-params.js.map +0 -1
  180. package/lib/_models/fullstack-models/control-models/dynamobe-data-property-params.d.ts +0 -28
  181. package/lib/_models/fullstack-models/control-models/dynamobe-data-property-params.d.ts.map +0 -1
  182. package/lib/_models/fullstack-models/control-models/dynamobe-data-property-params.js +0 -67
  183. package/lib/_models/fullstack-models/control-models/dynamobe-data-property-params.js.map +0 -1
  184. package/lib/_models/fullstack-models/control-models/dynamobe-error.d.ts +0 -18
  185. package/lib/_models/fullstack-models/control-models/dynamobe-error.d.ts.map +0 -1
  186. package/lib/_models/fullstack-models/control-models/dynamobe-error.js +0 -188
  187. package/lib/_models/fullstack-models/control-models/dynamobe-error.js.map +0 -1
  188. package/lib/_models/fullstack-models/control-models/geo-ip-location.d.ts +0 -26
  189. package/lib/_models/fullstack-models/control-models/geo-ip-location.d.ts.map +0 -1
  190. package/lib/_models/fullstack-models/control-models/geo-ip-location.js +0 -3
  191. package/lib/_models/fullstack-models/control-models/geo-ip-location.js.map +0 -1
  192. package/lib/_models/fullstack-models/control-models/usage-action.d.ts +0 -9
  193. package/lib/_models/fullstack-models/control-models/usage-action.d.ts.map +0 -1
  194. package/lib/_models/fullstack-models/control-models/usage-action.js +0 -13
  195. package/lib/_models/fullstack-models/control-models/usage-action.js.map +0 -1
  196. package/lib/_models/fullstack-models/control-models/usage-data.d.ts +0 -14
  197. package/lib/_models/fullstack-models/control-models/usage-data.d.ts.map +0 -1
  198. package/lib/_models/fullstack-models/control-models/usage-data.js +0 -16
  199. package/lib/_models/fullstack-models/control-models/usage-data.js.map +0 -1
  200. package/lib/_models/fullstack-models/data-models/custom-data.d.ts +0 -16
  201. package/lib/_models/fullstack-models/data-models/custom-data.d.ts.map +0 -1
  202. package/lib/_models/fullstack-models/data-models/custom-data.js +0 -28
  203. package/lib/_models/fullstack-models/data-models/custom-data.js.map +0 -1
  204. package/lib/_models/fullstack-models/data-models/metadata.d.ts +0 -17
  205. package/lib/_models/fullstack-models/data-models/metadata.d.ts.map +0 -1
  206. package/lib/_models/fullstack-models/data-models/metadata.js +0 -17
  207. package/lib/_models/fullstack-models/data-models/metadata.js.map +0 -1
  208. package/lib/_models/fullstack-models/data-models/usage-session.d.ts +0 -34
  209. package/lib/_models/fullstack-models/data-models/usage-session.d.ts.map +0 -1
  210. package/lib/_models/fullstack-models/data-models/usage-session.js +0 -53
  211. package/lib/_models/fullstack-models/data-models/usage-session.js.map +0 -1
  212. package/lib/_modules/index.d.ts +0 -5
  213. package/lib/_modules/index.d.ts.map +0 -1
  214. package/lib/_modules/index.js +0 -9
  215. package/lib/_modules/index.js.map +0 -1
  216. package/lib/_modules/test/test-routing-module-settings.d.ts +0 -3
  217. package/lib/_modules/test/test-routing-module-settings.d.ts.map +0 -1
  218. package/lib/_modules/test/test-routing-module-settings.js +0 -10
  219. package/lib/_modules/test/test-routing-module-settings.js.map +0 -1
  220. package/lib/_modules/test/test-routing-module.d.ts +0 -3
  221. package/lib/_modules/test/test-routing-module.d.ts.map +0 -1
  222. package/lib/_modules/test/test-routing-module.js +0 -10
  223. package/lib/_modules/test/test-routing-module.js.map +0 -1
  224. package/lib/_modules/test-route/custom-data.service.d.ts +0 -6
  225. package/lib/_modules/test-route/custom-data.service.d.ts.map +0 -1
  226. package/lib/_modules/test-route/custom-data.service.js +0 -12
  227. package/lib/_modules/test-route/custom-data.service.js.map +0 -1
  228. package/lib/_modules/test-route/test-controller.d.ts +0 -6
  229. package/lib/_modules/test-route/test-controller.d.ts.map +0 -1
  230. package/lib/_modules/test-route/test-controller.js +0 -126
  231. package/lib/_modules/test-route/test-controller.js.map +0 -1
  232. package/lib/_modules/usage/usage-routing-module-settings.d.ts +0 -3
  233. package/lib/_modules/usage/usage-routing-module-settings.d.ts.map +0 -1
  234. package/lib/_modules/usage/usage-routing-module-settings.js +0 -10
  235. package/lib/_modules/usage/usage-routing-module-settings.js.map +0 -1
  236. package/lib/_modules/usage/usage-routing-module.d.ts +0 -3
  237. package/lib/_modules/usage/usage-routing-module.d.ts.map +0 -1
  238. package/lib/_modules/usage/usage-routing-module.js +0 -10
  239. package/lib/_modules/usage/usage-routing-module.js.map +0 -1
  240. package/lib/_modules/usage-route/usage-controller.d.ts +0 -7
  241. package/lib/_modules/usage-route/usage-controller.d.ts.map +0 -1
  242. package/lib/_modules/usage-route/usage-controller.js +0 -89
  243. package/lib/_modules/usage-route/usage-controller.js.map +0 -1
  244. package/lib/_modules/usage-route/usage.service.d.ts +0 -19
  245. package/lib/_modules/usage-route/usage.service.d.ts.map +0 -1
  246. package/lib/_modules/usage-route/usage.service.js +0 -110
  247. package/lib/_modules/usage-route/usage.service.js.map +0 -1
  248. package/lib/_services/dynamobe-global-collection.service.d.ts +0 -1
  249. package/lib/_services/dynamobe-global-collection.service.d.ts.map +0 -1
  250. package/lib/_services/dynamobe-global-collection.service.js +0 -58
  251. package/lib/_services/dynamobe-global-collection.service.js.map +0 -1
  252. package/lib/_services/dynamobe-server.d.ts +0 -32
  253. package/lib/_services/dynamobe-server.d.ts.map +0 -1
  254. package/lib/_services/dynamobe-server.js +0 -183
  255. package/lib/_services/dynamobe-server.js.map +0 -1
  256. package/lib/api-service.d.ts +0 -6
  257. package/lib/api-service.d.ts.map +0 -1
  258. package/lib/api-service.js +0 -12
  259. package/lib/api-service.js.map +0 -1
  260. package/lib/app.d.ts +0 -10
  261. package/lib/app.d.ts.map +0 -1
  262. package/lib/app.js +0 -17
  263. package/lib/app.js.map +0 -1
  264. package/lib/auth.d.ts +0 -4
  265. package/lib/auth.d.ts.map +0 -1
  266. package/lib/auth.js +0 -9
  267. package/lib/auth.js.map +0 -1
  268. package/lib/controller.d.ts +0 -5
  269. package/lib/controller.d.ts.map +0 -1
  270. package/lib/controller.js +0 -11
  271. package/lib/controller.js.map +0 -1
  272. package/lib/data-models.d.ts +0 -3
  273. package/lib/data-models.d.ts.map +0 -1
  274. package/lib/data-models.js +0 -6
  275. package/lib/data-models.js.map +0 -1
  276. package/lib/data-service.d.ts +0 -6
  277. package/lib/data-service.d.ts.map +0 -1
  278. package/lib/data-service.js +0 -11
  279. package/lib/data-service.js.map +0 -1
  280. package/lib/dynamobe-global.settings.d.ts +0 -3
  281. package/lib/dynamobe-global.settings.d.ts.map +0 -1
  282. package/lib/dynamobe-global.settings.js +0 -13
  283. package/lib/dynamobe-global.settings.js.map +0 -1
  284. package/src/_constants/fullstack/module-settings/test-module-settings.ts +0 -14
  285. package/src/_constants/fullstack/module-settings/usage-module-settings.ts +0 -12
  286. package/src/_models/fullstack/control-models/daily-usage-data.ts +0 -34
  287. package/src/_models/fullstack/control-models/dynamobe-data-params.ts +0 -19
  288. package/src/_models/fullstack/control-models/dynamobe-data-property-params.ts +0 -98
  289. package/src/_models/fullstack/control-models/dynamobe-error.ts +0 -199
  290. package/src/_models/fullstack/control-models/geo-ip-location.ts +0 -26
  291. package/src/_models/fullstack/control-models/usage-action.ts +0 -18
  292. package/src/_models/fullstack/control-models/usage-data.ts +0 -26
  293. package/src/_models/fullstack/data-models/custom-data.ts +0 -41
  294. package/src/_models/fullstack/data-models/metadata.ts +0 -30
  295. package/src/_models/fullstack/data-models/usage-session.ts +0 -85
  296. 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.08",
3
+ "version": "01.04.10",
4
4
  "description": "Dynamic NodeTS (NodeJS-Typescript), MongoDB Backend System Framework by Future Development Ltd.",
5
5
  "scripts": {
6
6
  "build": "npx tsc",
@@ -153,6 +153,7 @@
153
153
  },
154
154
  "homepage": "https:/futdevpro.hu/projects/dynamo",
155
155
  "peerDependencies": {
156
+ "@futdevpro/fsm-dynamo": "~1.0.21",
156
157
  "@types/express": "~4.17.7",
157
158
  "@types/geoip-lite": "~1.4.1",
158
159
  "@types/nodemailer": "~6.4.4",
@@ -164,9 +165,9 @@
164
165
  "rxjs": "~7.4.0"
165
166
  },
166
167
  "dependencies": {
167
- "tslib": "~2.0.1",
168
168
  "@types/node": "~14.0.27",
169
169
  "ts-node": "~8.10.2",
170
+ "tslib": "~2.0.1",
170
171
  "typescript": "~3.9.7"
171
172
  }
172
173
  }
@@ -1,3 +1,4 @@
1
+
1
2
  import { DynamoBERouteSecurity } from '../_enums/dynamobe-route-security.enum';
2
3
  import { DynamoBEGlobalSettings } from '../_models/dynamobe-global-settings';
3
4
 
@@ -1,4 +1,2 @@
1
1
 
2
2
  export * from './dynamobe-global.settings';
3
- export * from './fullstack/module-settings/test-module-settings';
4
- export * from './fullstack/module-settings/usage-module-settings';
@@ -8,22 +8,25 @@ export class DynamoBEApiCallParams {
8
8
  baseUrl: string;
9
9
  endPoint: string;
10
10
 
11
+ getFullResponse: boolean;
11
12
  httpOptions: any;
12
13
 
13
14
  constructor(
14
- settings: {
15
+ set: {
15
16
  name: string,
16
17
  type: HttpCallType,
17
18
  endPoint: string,
18
19
  baseUrl: string,
20
+ getFullResponse?: boolean,
19
21
  httpOptions?: HttpOptions,
20
22
  }
21
23
  ) {
22
- this.name = settings.name;
23
- this.type = settings.type;
24
- this.endPoint = settings.endPoint;
25
- this.baseUrl = settings.baseUrl;
26
- this.httpOptions = settings.httpOptions ? settings.httpOptions : {};
24
+ this.name = set.name;
25
+ this.type = set.type;
26
+ this.endPoint = set.endPoint;
27
+ this.baseUrl = set.baseUrl;
28
+ this.getFullResponse = !!set.getFullResponse;
29
+ this.httpOptions = set.httpOptions ? set.httpOptions : {};
27
30
  }
28
31
  }
29
32
 
@@ -1,6 +1,6 @@
1
-
1
+ /*
2
+ export { DynamoBEDataPropertyParams } from '@futdevpro/fsm-dynamo';
2
3
  import { DataModelType } from '../_enums/data-model-type.enum';
3
- import { DynamoBEDataPropertyParams } from './fullstack/control-models/dynamobe-data-property-params';
4
4
 
5
5
  export class DynamoBEDataModelParams {
6
6
  dataName: string;
@@ -21,3 +21,4 @@ export class DynamoBEDataModelParams {
21
21
  }
22
22
  }
23
23
  }
24
+ */
@@ -1,6 +1,7 @@
1
1
 
2
2
 
3
3
  import { NextFunction, Request, Response } from 'express';
4
+
4
5
  import { HttpCallType } from '../_enums/http/http-call-type.enum';
5
6
  import { DynamoBERouteSecurity as DynamoBERouteSecurity } from '../_enums/dynamobe-route-security.enum';
6
7
  import { DBE_Shared } from '../_services/dynamobe-shared.service';
@@ -3,19 +3,7 @@
3
3
  // MODELS
4
4
  export * from './dynamobe-api-call-params';
5
5
  export * from './dynamobe-app-params';
6
- export * from './dynamobe-data-model-params';
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/usage-action';
15
- export * from './fullstack/control-models/usage-data';
16
- export * from './fullstack/control-models/dynamobe-data-params';
17
- // FULLSTACK - DATA MODELS
18
- export * from './fullstack/data-models/custom-data';
19
- export * from './fullstack/data-models/metadata';
20
- export * from './fullstack/data-models/usage-session';
21
9
 
@@ -5,7 +5,7 @@ export * from '../_services/dynamobe-singleton.service';
5
5
 
6
6
  // MODELS
7
7
  export * from '../_models/dynamobe-api-call-params';
8
- export * from '../_models/fullstack/control-models/dynamobe-error';
8
+ export * from '@futdevpro/fsm-dynamo/error-module';
9
9
 
10
10
  // ENUMS
11
11
  export * from '../_enums/http/http-call-type.enum';
@@ -4,4 +4,4 @@ export * from '../_services/dynamobe-auth.service';
4
4
  export * from '../_services/dynamobe-shared.service';
5
5
 
6
6
  // MODELS
7
- export * from '../_models/fullstack/control-models/dynamobe-error';
7
+ export * from '@futdevpro/fsm-dynamo/error-module';
@@ -6,4 +6,4 @@ export * from '../_services/dynamobe-global.service';
6
6
  export * from '../_services/dynamobe-shared.service';
7
7
 
8
8
  // MODELS
9
- export * from '../_models/fullstack/control-models/dynamobe-error';
9
+ export * from '@futdevpro/fsm-dynamo/error-module';
@@ -1,7 +1,7 @@
1
1
 
2
2
 
3
3
 
4
- import { CustomData, customDataModelParams } from '../../_models/fullstack/data-models/custom-data';
4
+ import { CustomData, customDataModelParams } from '@futdevpro/fsm-dynamo/test-module';
5
5
  import { DynamoBEDataService } from '../../_services/dynamobe-data.service';
6
6
 
7
7
  export class CustomDataService extends DynamoBEDataService<CustomData> {
@@ -1,5 +1,5 @@
1
1
 
2
- import { testModuleSettings } from '../../_constants/fullstack/module-settings/test-module-settings';
2
+ import { testModuleSettings } from '@futdevpro/fsm-dynamo/test-module';
3
3
  import { DynamoBERouteSecurity } from '../../_enums/dynamobe-route-security.enum';
4
4
  import { DynamoBERoutingModule, DynamoBERoutingModuleSettings } from '../../_services/dynamobe-routing-module.service';
5
5
  import { TestController } from './test-controller';
@@ -1,8 +1,6 @@
1
1
 
2
- // MODULES
2
+ // TEST MODULE
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
+ export * from '@futdevpro/fsm-dynamo/test-module';
@@ -1,6 +1,6 @@
1
1
 
2
2
  import { Request, Response } from 'express';
3
- import { testModuleSettings } from '../../_constants/fullstack/module-settings/test-module-settings';
3
+ import { testModuleSettings } from '@futdevpro/fsm-dynamo/test-module';
4
4
  import { HttpCallType } from '../../_enums/http/http-call-type.enum';
5
5
  import { DynamoBEEndpointParams } from '../../_models/dynamobe-endpoint-params';
6
6
  import { DynamoBEController } from '../../_services/dynamobe-controller.service';
@@ -1,5 +1,5 @@
1
1
 
2
- import { usageModuleSettings } from '../../_constants/fullstack/module-settings/usage-module-settings';
2
+ import { usageModuleSettings } from '@futdevpro/fsm-dynamo/usage-module';
3
3
  import { DynamoBERouteSecurity } from '../../_enums/dynamobe-route-security.enum';
4
4
  import { DynamoBERoutingModule, DynamoBERoutingModuleSettings } from '../../_services/dynamobe-routing-module.service';
5
5
  import { UsageController } from './usage-controller';
@@ -1,8 +1,7 @@
1
1
 
2
- // MODULE
2
+ // USAGE MODULE
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';
6
+ export * from '@futdevpro/fsm-dynamo/usage-module';
8
7
 
@@ -1,9 +1,8 @@
1
1
 
2
2
  import { Request, Response } from 'express';
3
- import { usageModuleSettings } from '../../_constants/fullstack/module-settings/usage-module-settings';
3
+ import { usageModuleSettings, DynamoUsageSession } from '@futdevpro/fsm-dynamo/usage-module';
4
4
  import { HttpCallType } from '../../_enums/http/http-call-type.enum';
5
5
  import { DynamoBEEndpointParams } from '../../_models/dynamobe-endpoint-params';
6
- import { DynamoUsageSession } from '../../_models/fullstack/data-models/usage-session';
7
6
  import { DynamoBEAuthService } from '../../_services/dynamobe-auth.service';
8
7
  import { DynamoBEController } from '../../_services/dynamobe-controller.service';
9
8
  import { DBE_Global_S } from '../../_services/dynamobe-global.service';
@@ -1,11 +1,11 @@
1
1
 
2
+ import { Request } from 'express';
3
+ import { DynamoBEError } from '@futdevpro/fsm-dynamo';
4
+ import { DynamoUsageSession, usageSessionModelParams, DynamoUsageData,
5
+ DailyUsageData } from '@futdevpro/fsm-dynamo/usage-module';
6
+
2
7
  import { DynamoBEDataService } from '../../_services/dynamobe-data.service';
3
- import { DynamoBEError } from '../../_models/fullstack/control-models/dynamobe-error';
4
8
  import { DBE_Shared } from '../../_services/dynamobe-shared.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
9
 
10
10
  export class UsageService extends DynamoBEDataService<DynamoUsageSession> {
11
11
  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 {
@@ -17,7 +18,7 @@ export class DynamoBEApiService {
17
18
  /* queryParams?: object, */
18
19
  body?: any
19
20
  }
20
- ): Promise<T> {
21
+ ): Promise<T | Axios.AxiosResponse> {
21
22
  try {
22
23
  let a: any;
23
24
  let url: string = callParams.baseUrl + callParams.endPoint;
@@ -80,7 +81,11 @@ export class DynamoBEApiService {
80
81
  console.log('WARNING you cant send body in get calls');
81
82
  }
82
83
  await privateAxiosInstance.get<T>(url, callParams.httpOptions).then((res: Axios.AxiosResponse ) => {
83
- a = res.data;
84
+ if (callParams.getFullResponse) {
85
+ a = res;
86
+ } else {
87
+ a = res.data;
88
+ }
84
89
  console.log(`${callParams.name} was successful`, res.data);
85
90
  });
86
91
  break;
@@ -89,6 +94,9 @@ export class DynamoBEApiService {
89
94
  console.log('WARNING you cant send body in delete calls');
90
95
  }
91
96
  await privateAxiosInstance.delete<T>(url, callParams.httpOptions).then((res: Axios.AxiosResponse ) => {
97
+ if (callParams.getFullResponse) {
98
+ a = res;
99
+ }
92
100
  console.log(`${callParams.name} was successful`, res.data);
93
101
  });
94
102
  break;
@@ -102,7 +110,11 @@ export class DynamoBEApiService {
102
110
  inputParams.body = {};
103
111
  }
104
112
  await privateAxiosInstance[callParams.type]<T>(url, inputParams.body, callParams.httpOptions).then((res: Axios.AxiosResponse ) => {
105
- a = res.data;
113
+ if (callParams.getFullResponse) {
114
+ a = res;
115
+ } else {
116
+ a = res.data;
117
+ }
106
118
  console.log(`${callParams.name} was successful`, res.data);
107
119
  });
108
120
  break;
@@ -111,7 +123,11 @@ export class DynamoBEApiService {
111
123
  break;
112
124
  }
113
125
 
114
- return a as T;
126
+ if (callParams.getFullResponse) {
127
+ return a as Axios.AxiosResponse;
128
+ } else {
129
+ return a as T;
130
+ }
115
131
  } catch (error) {
116
132
  DBE_Shared.logError('API ERRROR');
117
133
  if (callParams?.httpOptions?.responseType === HttpResponseType.text) {
@@ -1,6 +1,7 @@
1
1
 
2
2
  import { NextFunction, Request, Response } from 'express';
3
- import { DynamoBEError } from '../_models/fullstack/control-models/dynamobe-error';
3
+ import { DynamoBEError } from '@futdevpro/fsm-dynamo';
4
+
4
5
  import { DynamoBESingletonService } from './dynamobe-singleton.service';
5
6
 
6
7
  /**
@@ -1,10 +1,8 @@
1
1
 
2
- import { DynamoBEError } from '../_models/fullstack/control-models/dynamobe-error';
3
- import { Metadata } from '../_models/fullstack/data-models/metadata';
2
+ import { Metadata, DynamoBEDataParams, DynamoBEDataPropertyParams, DynamoBEError } from '@futdevpro/fsm-dynamo';
3
+
4
4
  import { DynamoBEDBService } from './dynamobe-db.service';
5
- import { DynamoBEDataPropertyParams } from '../_models/fullstack/control-models/dynamobe-data-property-params';
6
5
  import { DBE_Global_S } from './dynamobe-global.service';
7
- import { DynamoBEDataParams } from '../_models/fullstack/control-models/dynamobe-data-params';
8
6
 
9
7
  export class DynamoBEDataService<T extends Metadata> {
10
8
  dataDBService: DynamoBEDBService<T>;
@@ -1,10 +1,7 @@
1
1
 
2
2
  import * as mongoose from 'mongoose';
3
3
  import { Schema } from 'mongoose';
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';
4
+ import { Metadata, DynamoBEDataParams, DynamoBEDataPropertyParams, DynamoBEError } from '@futdevpro/fsm-dynamo';
8
5
 
9
6
  export class DynamoBEDBService<T extends Metadata> {
10
7
  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 '../_models/fullstack/control-models/dynamobe-error';
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 '../_models/fullstack/data-models/metadata';
3
+ import { Metadata, DynamoBEDataParams } 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,9 +2,9 @@
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 '@futdevpro/fsm-dynamo';
5
6
 
6
7
  import { DBE_Shared } from './dynamobe-shared.service';
7
- import { GeoIpLocation } from '../_models/fullstack/control-models/geo-ip-location';
8
8
 
9
9
  export class DBE_Shared_BE extends DBE_Shared {
10
10
 
@@ -2,18 +2,10 @@
2
2
  import * as ReadLine from 'readline';
3
3
  import { Request } from 'express';
4
4
  import * as GeoIp from 'geoip-lite';
5
+ import { DynamoBEError, GeoIpLocation, LocationCoordinates,
6
+ year, hour, day, week, month } from '@futdevpro/fsm-dynamo';
5
7
 
6
- import { GeoIpLocation } from '../_models/fullstack/control-models/geo-ip-location';
7
8
  import { LogStyle } from '../_enums/log-style.enum';
8
- import { DynamoBEError } from '../_models/fullstack/control-models/dynamobe-error';
9
-
10
- export const second = 1000;
11
- export const minute = second * 60;
12
- export const hour = minute * 60;
13
- export const day = hour * 24;
14
- export const week = day * 7;
15
- export const month = day * 30.4368499;
16
- export const year = day * 365.242199;
17
9
 
18
10
  export class DBE_Shared {
19
11
 
@@ -321,8 +313,3 @@ export class DBE_Shared {
321
313
  });
322
314
  }
323
315
  }
324
-
325
- export interface LocationCoordinates {
326
- longitude: number;
327
- latitude: number;
328
- }
package/src/index.ts CHANGED
@@ -15,9 +15,4 @@ 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'; */
18
+
@@ -1,3 +0,0 @@
1
- import { DynamoModuleSettings } from '../../../_models/dynamo-module-settings';
2
- export declare const testModuleSettings: DynamoModuleSettings;
3
- //# sourceMappingURL=test-module-settings.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test-module-settings.d.ts","sourceRoot":"","sources":["../../../../src/_constants/fullstack/module-settings/test-module-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAE/E,eAAO,MAAM,kBAAkB,EAAE,oBAWhC,CAAC"}
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.testModuleSettings = void 0;
4
- exports.testModuleSettings = {
5
- mainRoute: '/test',
6
- endPoints: {
7
- testGet: '/test-get',
8
- testPost: '/test-post',
9
- testPut: '/test-put',
10
- testPatch: '/test-patch',
11
- testDelete: '/test-delete',
12
- getCustomData: '/custom/get/:customId',
13
- modifyCustomData: '/custom/post'
14
- }
15
- };
16
- //# sourceMappingURL=test-module-settings.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test-module-settings.js","sourceRoot":"","sources":["../../../../src/_constants/fullstack/module-settings/test-module-settings.ts"],"names":[],"mappings":";;;AAEa,QAAA,kBAAkB,GAAyB;IACtD,SAAS,EAAE,OAAO;IAClB,SAAS,EAAE;QACT,OAAO,EAAE,WAAW;QACpB,QAAQ,EAAE,YAAY;QACtB,OAAO,EAAE,WAAW;QACpB,SAAS,EAAE,aAAa;QACxB,UAAU,EAAE,cAAc;QAC1B,aAAa,EAAE,uBAAuB;QACtC,gBAAgB,EAAE,cAAc;KACjC;CACF,CAAC"}
@@ -1,3 +0,0 @@
1
- import { DynamoModuleSettings } from '../../../_models/dynamo-module-settings';
2
- export declare const usageModuleSettings: DynamoModuleSettings;
3
- //# sourceMappingURL=usage-module-settings.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usage-module-settings.d.ts","sourceRoot":"","sources":["../../../../src/_constants/fullstack/module-settings/usage-module-settings.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAE/E,eAAO,MAAM,mBAAmB,EAAE,oBAQjC,CAAC"}
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.usageModuleSettings = void 0;
4
- exports.usageModuleSettings = {
5
- mainRoute: '/usage',
6
- endPoints: {
7
- newSession: '/new-session',
8
- closeSession: '/close-session/:sessionId',
9
- updateUsage: '/update/:sessionId',
10
- getAllUsageData: '/get/all',
11
- }
12
- };
13
- //# sourceMappingURL=usage-module-settings.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"usage-module-settings.js","sourceRoot":"","sources":["../../../../src/_constants/fullstack/module-settings/usage-module-settings.ts"],"names":[],"mappings":";;;AAGa,QAAA,mBAAmB,GAAyB;IACvD,SAAS,EAAE,QAAQ;IACnB,SAAS,EAAE;QACT,UAAU,EAAE,cAAc;QAC1B,YAAY,EAAE,2BAA2B;QACzC,WAAW,EAAG,oBAAoB;QAClC,eAAe,EAAE,UAAU;KAC5B;CACF,CAAC"}
@@ -1,30 +0,0 @@
1
- import { NextFunction, Request, Response } from 'express';
2
- import { HttpCallType } from '../_enums/http/http-call-type.enum';
3
- import { DynamoBERouteSecurity as DynamoBERouteSecurity } from '../_enums/dynamobe-route-security.enum';
4
- export declare class DynamoBEEndpointParams {
5
- name: string;
6
- security: DynamoBERouteSecurity;
7
- type: HttpCallType;
8
- endpoint: string;
9
- pathParams: string[];
10
- preProcessess: ((req: Request, res: Response, next: NextFunction) => Promise<void>)[];
11
- tasks: ((req: Request, res: Response, issuer?: string) => Promise<void>)[];
12
- logRequest: boolean;
13
- logRequestsContent: boolean;
14
- logResponseContent: boolean;
15
- constructor(set: {
16
- name: string;
17
- security?: DynamoBERouteSecurity;
18
- type: HttpCallType;
19
- endpoint: string;
20
- preProcessess?: ((req: Request, res: Response, next: NextFunction) => Promise<void>)[];
21
- tasks: ((req: Request, res: Response, issuer?: string) => Promise<void>)[];
22
- logRequest?: boolean;
23
- logRequestsContent?: boolean;
24
- logResponseContent?: boolean;
25
- });
26
- getPreLog(): (req: Request, res: Response, next: NextFunction) => Promise<void>;
27
- getTasksExecution(): (req: Request, res: Response) => Promise<void>;
28
- error(res: Response, error: any): void;
29
- }
30
- //# sourceMappingURL=dynamobe-endpoint-control.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dynamobe-endpoint-control.d.ts","sourceRoot":"","sources":["../../src/_models/dynamobe-endpoint-control.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,qBAAqB,IAAI,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAIxG,qBAAa,sBAAsB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,qBAAqB,CAAC;IAEhC,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IAEjB,UAAU,EAAE,MAAM,EAAE,CAAC;IAErB,aAAa,EAAE,CAAC,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAA;IACrF,KAAK,EAAE,CAAC,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;IAE3E,UAAU,EAAE,OAAO,CAAC;IACpB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,kBAAkB,EAAE,OAAO,CAAC;gBAG1B,GAAG,EAAE;QACH,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,CAAC,EAAE,qBAAqB,CAAC;QAEjC,IAAI,EAAE,YAAY,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;QAEjB,aAAa,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;QACvF,KAAK,EAAE,CAAC,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;QAE3E,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B,kBAAkB,CAAC,EAAE,OAAO,CAAC;KAC9B;IAyBH,SAAS,IAAI,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC;IA8B/E,iBAAiB,IAAI,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,KAAK,OAAO,CAAC,IAAI,CAAC;IAwBnE,KAAK,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,KAAA,GAAG,IAAI;CAclC"}
@@ -1,95 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DynamoBEEndpointParams = void 0;
4
- const tslib_1 = require("tslib");
5
- const dynamobe_shared_service_1 = require("../_services/dynamobe-shared.service");
6
- const dynamobe_global_service_1 = require("../_services/dynamobe-global.service");
7
- class DynamoBEEndpointParams {
8
- constructor(set) {
9
- this.name = set.name ? set.name : set.endpoint;
10
- this.security = set.security ? set.security : dynamobe_global_service_1.DBE_Global_S.getGlobalSettings().defaultRouteSecurity;
11
- this.type = set.type;
12
- this.endpoint = set.endpoint;
13
- let pathParts = this.endpoint.split('/');
14
- pathParts = pathParts.filter((part) => part[0] === ':');
15
- pathParts = pathParts.map((part) => part = part.replace(':', ''));
16
- this.pathParams = pathParts;
17
- this.preProcessess = set.preProcessess ? set.preProcessess : [];
18
- this.tasks = set.tasks;
19
- this.logRequest = set.logRequest !== undefined ? set.logRequest : dynamobe_global_service_1.DBE_Global_S.getGlobalSettings().logRequests;
20
- this.logRequestsContent = set.logRequestsContent !== undefined ? set.logRequestsContent : dynamobe_global_service_1.DBE_Global_S.getGlobalSettings().logRequestsContent;
21
- this.logResponseContent = set.logResponseContent !== undefined ? set.logResponseContent : dynamobe_global_service_1.DBE_Global_S.getGlobalSettings().logResponseContent;
22
- if (this.logRequest) {
23
- this.preProcessess.unshift(this.getPreLog());
24
- }
25
- }
26
- getPreLog() {
27
- return (req, res, next) => tslib_1.__awaiter(this, void 0, void 0, function* () {
28
- try {
29
- if (this.logRequest) {
30
- if (this.logRequestsContent) {
31
- let inputs = '';
32
- for (let i = 0; i < this.pathParams.length; i++) {
33
- inputs += ` ${this.pathParams[i]}: ${req.params[this.pathParams[i]]}`;
34
- if (i + 1 < this.pathParams.length || req.body && req.body !== {}) {
35
- inputs += ',';
36
- }
37
- }
38
- if (req.body && 0 < Object.keys(req.body).length) {
39
- console.log(`==> incoming ${this.name} request...${inputs} body:`, req.body);
40
- }
41
- else {
42
- console.log(`==> incoming ${this.name} request...${inputs}`);
43
- }
44
- }
45
- else {
46
- console.log(`==> incoming ${this.name} request...`);
47
- }
48
- }
49
- next();
50
- }
51
- catch (error) {
52
- this.error(res, error);
53
- }
54
- });
55
- }
56
- getTasksExecution() {
57
- return (req, res) => tslib_1.__awaiter(this, void 0, void 0, function* () {
58
- try {
59
- const issuer = dynamobe_global_service_1.DBE_Global_S.getAuthService().getAccountIdFromRequest(req);
60
- console.log(`A ${this.name} ${this.tasks.length}`);
61
- for (let i = 0; i < this.tasks.length; i++) {
62
- yield this.tasks[i](req, res, issuer);
63
- }
64
- if (this.logRequest) {
65
- if (this.logResponseContent) {
66
- dynamobe_shared_service_1.DBE_Shared.logSuccess(` <<<===== ${this.name} result sent.`);
67
- dynamobe_shared_service_1.DBE_Shared.logSuccess('sorry, the logResponseContent is not implemented yet.');
68
- }
69
- else {
70
- dynamobe_shared_service_1.DBE_Shared.logSuccess(` <<<===== ${this.name} result sent.`);
71
- }
72
- }
73
- }
74
- catch (error) {
75
- this.error(res, error);
76
- }
77
- });
78
- }
79
- error(res, error) {
80
- dynamobe_shared_service_1.DBE_Shared.logError(`${this.name} ERROR`, error, '\n');
81
- res.status(error.status ? error.status : 501);
82
- res.send(error);
83
- if (this.logRequest) {
84
- if (this.logResponseContent) {
85
- dynamobe_shared_service_1.DBE_Shared.logError(` <<<===== ${this.name} error sent.`);
86
- dynamobe_shared_service_1.DBE_Shared.logError('sorry, the logResponseContent is not implemented yet.');
87
- }
88
- else {
89
- dynamobe_shared_service_1.DBE_Shared.logError(` <<<===== ${this.name} error sent.`);
90
- }
91
- }
92
- }
93
- }
94
- exports.DynamoBEEndpointParams = DynamoBEEndpointParams;
95
- //# sourceMappingURL=dynamobe-endpoint-control.js.map