@futdevpro/nts-dynamo 1.7.28 → 1.8.5

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 (222) hide show
  1. package/lib/_constants/global-settings.const.d.ts +2 -2
  2. package/lib/_constants/global-settings.const.d.ts.map +1 -1
  3. package/lib/_constants/global-settings.const.js +2 -2
  4. package/lib/_constants/global-settings.const.js.map +1 -1
  5. package/lib/_constants/mocks/app-extended-server.mock.d.ts +12 -12
  6. package/lib/_constants/mocks/app-extended-server.mock.d.ts.map +1 -1
  7. package/lib/_constants/mocks/app-extended-server.mock.js +16 -16
  8. package/lib/_constants/mocks/app-extended-server.mock.js.map +1 -1
  9. package/lib/_constants/mocks/app-params.mock.d.ts +2 -2
  10. package/lib/_constants/mocks/app-params.mock.d.ts.map +1 -1
  11. package/lib/_constants/mocks/app-params.mock.js +1 -1
  12. package/lib/_constants/mocks/app-params.mock.js.map +1 -1
  13. package/lib/_constants/mocks/app-server.mock.d.ts +15 -15
  14. package/lib/_constants/mocks/app-server.mock.d.ts.map +1 -1
  15. package/lib/_constants/mocks/app-server.mock.js +10 -10
  16. package/lib/_constants/mocks/app-server.mock.js.map +1 -1
  17. package/lib/_constants/mocks/data-model.mock.d.ts +3 -3
  18. package/lib/_constants/mocks/data-model.mock.d.ts.map +1 -1
  19. package/lib/_constants/mocks/data-model.mock.js +22 -22
  20. package/lib/_constants/mocks/data-model.mock.js.map +1 -1
  21. package/lib/_constants/mocks/email-service-collection.mock.d.ts +2 -2
  22. package/lib/_constants/mocks/email-service-collection.mock.d.ts.map +1 -1
  23. package/lib/_constants/mocks/email-service-collection.mock.js +1 -1
  24. package/lib/_constants/mocks/email-service-collection.mock.js.map +1 -1
  25. package/lib/_constants/mocks/endpoint.mock.d.ts +8 -8
  26. package/lib/_constants/mocks/endpoint.mock.d.ts.map +1 -1
  27. package/lib/_constants/mocks/endpoint.mock.js +18 -18
  28. package/lib/_constants/mocks/endpoint.mock.js.map +1 -1
  29. package/lib/_constants/mocks/socket-client.mock.d.ts +2 -2
  30. package/lib/_constants/mocks/socket-client.mock.d.ts.map +1 -1
  31. package/lib/_constants/mocks/socket-client.mock.js +1 -1
  32. package/lib/_constants/mocks/socket-client.mock.js.map +1 -1
  33. package/lib/_constants/mocks/socket-server.mock.d.ts +2 -2
  34. package/lib/_constants/mocks/socket-server.mock.d.ts.map +1 -1
  35. package/lib/_constants/mocks/socket-server.mock.js +1 -1
  36. package/lib/_constants/mocks/socket-server.mock.js.map +1 -1
  37. package/lib/_enums/data-model-type.enum.d.ts +1 -0
  38. package/lib/_enums/data-model-type.enum.d.ts.map +1 -1
  39. package/lib/_enums/data-model-type.enum.js +1 -0
  40. package/lib/_enums/data-model-type.enum.js.map +1 -1
  41. package/lib/_models/control-models/api-call-params.control-model.d.ts +3 -3
  42. package/lib/_models/control-models/api-call-params.control-model.d.ts.map +1 -1
  43. package/lib/_models/control-models/api-call-params.control-model.js +5 -5
  44. package/lib/_models/control-models/api-call-params.control-model.js.map +1 -1
  45. package/lib/_models/control-models/{app-system-controls.control-model copy.d.ts → app-ext-system-controls.control-model.d.ts} +1 -1
  46. package/lib/_models/control-models/app-ext-system-controls.control-model.d.ts.map +1 -0
  47. package/lib/_models/control-models/{app-system-controls.control-model copy.js → app-ext-system-controls.control-model.js} +1 -1
  48. package/lib/_models/control-models/app-ext-system-controls.control-model.js.map +1 -0
  49. package/lib/_models/control-models/app-params.control-model.d.ts +2 -2
  50. package/lib/_models/control-models/app-params.control-model.d.ts.map +1 -1
  51. package/lib/_models/control-models/app-params.control-model.js +3 -3
  52. package/lib/_models/control-models/app-params.control-model.js.map +1 -1
  53. package/lib/_models/control-models/endpoint-params.control-model.d.ts +1 -1
  54. package/lib/_models/control-models/endpoint-params.control-model.d.ts.map +1 -1
  55. package/lib/_models/control-models/endpoint-params.control-model.js +8 -8
  56. package/lib/_models/control-models/endpoint-params.control-model.js.map +1 -1
  57. package/lib/_models/control-models/http-settings.control-model.d.ts +2 -2
  58. package/lib/_models/control-models/http-settings.control-model.d.ts.map +1 -1
  59. package/lib/_models/control-models/http-settings.control-model.js +3 -3
  60. package/lib/_models/control-models/http-settings.control-model.js.map +1 -1
  61. package/lib/_models/control-models/socket-client-service-params.control-model.d.ts +2 -2
  62. package/lib/_models/control-models/socket-client-service-params.control-model.d.ts.map +1 -1
  63. package/lib/_models/control-models/socket-client-service-params.control-model.js +3 -3
  64. package/lib/_models/control-models/socket-client-service-params.control-model.js.map +1 -1
  65. package/lib/_models/control-models/socket-event.control-model.js +4 -4
  66. package/lib/_models/control-models/socket-presence.control-model.d.ts +12 -0
  67. package/lib/_models/control-models/socket-presence.control-model.d.ts.map +1 -1
  68. package/lib/_models/control-models/socket-presence.control-model.js +4 -0
  69. package/lib/_models/control-models/socket-presence.control-model.js.map +1 -1
  70. package/lib/_models/control-models/socket-server-service-params.control-model.d.ts +2 -2
  71. package/lib/_models/control-models/socket-server-service-params.control-model.d.ts.map +1 -1
  72. package/lib/_models/control-models/socket-server-service-params.control-model.js +4 -4
  73. package/lib/_models/control-models/socket-server-service-params.control-model.js.map +1 -1
  74. package/lib/_models/interfaces/certification-settings.interface.d.ts +1 -1
  75. package/lib/_models/interfaces/certification-settings.interface.d.ts.map +1 -1
  76. package/lib/_models/interfaces/global-service-settings.interface.d.ts +6 -6
  77. package/lib/_models/interfaces/global-service-settings.interface.d.ts.map +1 -1
  78. package/lib/_models/interfaces/global-settings.interface.d.ts +1 -1
  79. package/lib/_models/interfaces/global-settings.interface.d.ts.map +1 -1
  80. package/lib/_models/interfaces/routing-module-settings.interface.d.ts +1 -1
  81. package/lib/_models/interfaces/routing-module-settings.interface.d.ts.map +1 -1
  82. package/lib/_models/types/db-filter.type.d.ts.map +1 -1
  83. package/lib/_models/types/db-update.type.d.ts +2 -1
  84. package/lib/_models/types/db-update.type.d.ts.map +1 -1
  85. package/lib/_modules/custom-data/custom-data.controller.d.ts +2 -2
  86. package/lib/_modules/custom-data/custom-data.controller.d.ts.map +1 -1
  87. package/lib/_modules/custom-data/custom-data.controller.js +18 -16
  88. package/lib/_modules/custom-data/custom-data.controller.js.map +1 -1
  89. package/lib/_modules/custom-data/custom-data.data-service.d.ts +1 -1
  90. package/lib/_modules/custom-data/custom-data.data-service.d.ts.map +1 -1
  91. package/lib/_modules/custom-data/custom-data.data-service.js +4 -4
  92. package/lib/_modules/custom-data/custom-data.data-service.js.map +1 -1
  93. package/lib/_modules/custom-data/get-custom-data-routing-module.util.d.ts +1 -1
  94. package/lib/_modules/custom-data/get-custom-data-routing-module.util.d.ts.map +1 -1
  95. package/lib/_modules/custom-data/get-custom-data-routing-module.util.js +5 -5
  96. package/lib/_modules/custom-data/get-custom-data-routing-module.util.js.map +1 -1
  97. package/lib/_modules/test/get-test-routing-module.util.d.ts +1 -1
  98. package/lib/_modules/test/get-test-routing-module.util.d.ts.map +1 -1
  99. package/lib/_modules/test/get-test-routing-module.util.js +5 -5
  100. package/lib/_modules/test/get-test-routing-module.util.js.map +1 -1
  101. package/lib/_modules/test/test.controller.d.ts +2 -2
  102. package/lib/_modules/test/test.controller.d.ts.map +1 -1
  103. package/lib/_modules/test/test.controller.js +33 -33
  104. package/lib/_modules/test/test.controller.js.map +1 -1
  105. package/lib/_modules/usage/get-usage-routing-module.util.d.ts +1 -1
  106. package/lib/_modules/usage/get-usage-routing-module.util.d.ts.map +1 -1
  107. package/lib/_modules/usage/get-usage-routing-module.util.js +5 -5
  108. package/lib/_modules/usage/get-usage-routing-module.util.js.map +1 -1
  109. package/lib/_modules/usage/usage.controller.d.ts +2 -2
  110. package/lib/_modules/usage/usage.controller.d.ts.map +1 -1
  111. package/lib/_modules/usage/usage.controller.js +16 -16
  112. package/lib/_modules/usage/usage.controller.js.map +1 -1
  113. package/lib/_modules/usage/usage.data-service.d.ts +1 -1
  114. package/lib/_modules/usage/usage.data-service.d.ts.map +1 -1
  115. package/lib/_modules/usage/usage.data-service.js +4 -4
  116. package/lib/_modules/usage/usage.data-service.js.map +1 -1
  117. package/lib/_services/base/data.service.d.ts +3 -3
  118. package/lib/_services/base/data.service.d.ts.map +1 -1
  119. package/lib/_services/base/data.service.js +15 -15
  120. package/lib/_services/base/data.service.js.map +1 -1
  121. package/lib/_services/base/db.service.d.ts +3 -3
  122. package/lib/_services/base/db.service.d.ts.map +1 -1
  123. package/lib/_services/base/db.service.js +10 -6
  124. package/lib/_services/base/db.service.js.map +1 -1
  125. package/lib/_services/core/api.service.d.ts +4 -4
  126. package/lib/_services/core/api.service.d.ts.map +1 -1
  127. package/lib/_services/core/api.service.js +9 -9
  128. package/lib/_services/core/api.service.js.map +1 -1
  129. package/lib/_services/core/email.service.d.ts +4 -4
  130. package/lib/_services/core/email.service.d.ts.map +1 -1
  131. package/lib/_services/core/email.service.js.map +1 -1
  132. package/lib/_services/core/global.service.d.ts +12 -12
  133. package/lib/_services/core/global.service.d.ts.map +1 -1
  134. package/lib/_services/core/global.service.js +14 -1
  135. package/lib/_services/core/global.service.js.map +1 -1
  136. package/lib/_services/core/service-collection.service.d.ts +1 -1
  137. package/lib/_services/core/service-collection.service.d.ts.map +1 -1
  138. package/lib/_services/core/service-collection.service.js +3 -3
  139. package/lib/_services/core/service-collection.service.js.map +1 -1
  140. package/lib/_services/route/controller.service.d.ts +2 -2
  141. package/lib/_services/route/controller.service.d.ts.map +1 -1
  142. package/lib/_services/route/controller.service.js.map +1 -1
  143. package/lib/_services/route/routing-module.service.d.ts +4 -4
  144. package/lib/_services/route/routing-module.service.d.ts.map +1 -1
  145. package/lib/_services/route/routing-module.service.js +2 -2
  146. package/lib/_services/route/routing-module.service.js.map +1 -1
  147. package/lib/_services/server/app-extended.server.d.ts +2 -2
  148. package/lib/_services/server/app-extended.server.js +5 -5
  149. package/lib/_services/server/app-extended.server.js.map +1 -1
  150. package/lib/_services/server/app-extended.server.spec.js +3 -3
  151. package/lib/_services/server/app-extended.server.spec.js.map +1 -1
  152. package/lib/_services/server/app.server.d.ts +14 -14
  153. package/lib/_services/server/app.server.d.ts.map +1 -1
  154. package/lib/_services/server/app.server.js +8 -8
  155. package/lib/_services/server/app.server.js.map +1 -1
  156. package/lib/_services/server/app.server.spec.js +3 -3
  157. package/lib/_services/server/app.server.spec.js.map +1 -1
  158. package/lib/_services/shared.static-service.d.ts +3 -3
  159. package/lib/_services/shared.static-service.d.ts.map +1 -1
  160. package/lib/_services/shared.static-service.js +1 -1
  161. package/lib/_services/shared.static-service.js.map +1 -1
  162. package/lib/_services/socket/socket-client.service.d.ts +3 -3
  163. package/lib/_services/socket/socket-client.service.d.ts.map +1 -1
  164. package/lib/_services/socket/socket-client.service.js +24 -18
  165. package/lib/_services/socket/socket-client.service.js.map +1 -1
  166. package/lib/_services/socket/socket-server.service.d.ts +3 -3
  167. package/lib/_services/socket/socket-server.service.d.ts.map +1 -1
  168. package/lib/_services/socket/socket-server.service.js +5 -5
  169. package/lib/_services/socket/socket-server.service.js.map +1 -1
  170. package/lib/tsconfig.tsbuildinfo +1 -1
  171. package/package.json +2 -2
  172. package/src/_constants/global-settings.const.ts +2 -2
  173. package/src/_constants/mocks/app-extended-server.mock.ts +34 -35
  174. package/src/_constants/mocks/app-params.mock.ts +2 -2
  175. package/src/_constants/mocks/app-server.mock.ts +30 -30
  176. package/src/_constants/mocks/data-model.mock.ts +23 -23
  177. package/src/_constants/mocks/email-service-collection.mock.ts +2 -2
  178. package/src/_constants/mocks/endpoint.mock.ts +22 -22
  179. package/src/_constants/mocks/socket-client.mock.ts +3 -3
  180. package/src/_constants/mocks/socket-server.mock.ts +3 -3
  181. package/src/_enums/data-model-type.enum.ts +1 -0
  182. package/src/_models/control-models/api-call-params.control-model.ts +3 -3
  183. package/src/_models/control-models/app-params.control-model.ts +2 -2
  184. package/src/_models/control-models/endpoint-params.control-model.ts +7 -7
  185. package/src/_models/control-models/http-settings.control-model.ts +2 -2
  186. package/src/_models/control-models/socket-client-service-params.control-model.ts +2 -2
  187. package/src/_models/control-models/socket-event.control-model.ts +5 -5
  188. package/src/_models/control-models/socket-presence.control-model.ts +12 -0
  189. package/src/_models/control-models/socket-server-service-params.control-model.ts +4 -4
  190. package/src/_models/interfaces/certification-settings.interface.ts +1 -1
  191. package/src/_models/interfaces/global-service-settings.interface.ts +6 -6
  192. package/src/_models/interfaces/global-settings.interface.ts +1 -1
  193. package/src/_models/interfaces/routing-module-settings.interface.ts +1 -1
  194. package/src/_models/types/db-filter.type.ts +5 -2
  195. package/src/_models/types/db-update.type.ts +3 -2
  196. package/src/_modules/custom-data/custom-data.controller.ts +20 -18
  197. package/src/_modules/custom-data/custom-data.data-service.ts +6 -4
  198. package/src/_modules/custom-data/get-custom-data-routing-module.util.ts +7 -7
  199. package/src/_modules/test/get-test-routing-module.util.ts +7 -7
  200. package/src/_modules/test/test.controller.ts +34 -34
  201. package/src/_modules/usage/get-usage-routing-module.util.ts +7 -7
  202. package/src/_modules/usage/usage.controller.ts +18 -19
  203. package/src/_modules/usage/usage.data-service.ts +3 -3
  204. package/src/_services/base/data.service.ts +21 -20
  205. package/src/_services/base/db.service.ts +15 -12
  206. package/src/_services/core/api.service.ts +22 -22
  207. package/src/_services/core/email.service.ts +4 -4
  208. package/src/_services/core/global.service.ts +29 -15
  209. package/src/_services/core/service-collection.service.ts +1 -1
  210. package/src/_services/route/controller.service.ts +2 -2
  211. package/src/_services/route/routing-module.service.ts +12 -12
  212. package/src/_services/server/app-extended.server.spec.ts +4 -4
  213. package/src/_services/server/app-extended.server.ts +5 -5
  214. package/src/_services/server/app.server.spec.ts +4 -4
  215. package/src/_services/server/app.server.ts +27 -27
  216. package/src/_services/shared.static-service.ts +7 -4
  217. package/src/_services/socket/socket-client.service.ts +69 -37
  218. package/src/_services/socket/socket-server.service.ts +9 -9
  219. package/tsconfig.json +1 -0
  220. package/lib/_models/control-models/app-system-controls.control-model copy.d.ts.map +0 -1
  221. package/lib/_models/control-models/app-system-controls.control-model copy.js.map +0 -1
  222. /package/src/_models/control-models/{app-system-controls.control-model copy.ts → app-ext-system-controls.control-model.ts} +0 -0
@@ -5,7 +5,7 @@ import { Request, Response } from 'express';
5
5
  import { Dynamo_Array, Dynamo_Error, Dynamo_Log } from '@futdevpro/fsm-dynamo';
6
6
  import { DynamoNTS_RouteSecurity } from '../../_enums/route-security.enum';
7
7
  import { DynamoNTS_HttpCallType } from '../../_enums/http/http-call-type.enum';
8
- import { dynamoNTS_globalSettings } from '../../_constants/global-settings.const';
8
+ import { DynamoNTS_globalSettings } from '../../_constants/global-settings.const';
9
9
  import { DynamoNTS_GlobalService } from '../../_services/core/global.service';
10
10
 
11
11
  /**
@@ -13,7 +13,7 @@ import { DynamoNTS_GlobalService } from '../../_services/core/global.service';
13
13
  * used for specific events such as saving or getting data,
14
14
  * triggering events, logging in or out, and much more
15
15
  */
16
- export class DynamoNTS_EndpointParams{
16
+ export class DynamoNTS_Endpoint_Params {
17
17
  name: string;
18
18
  security: DynamoNTS_RouteSecurity;
19
19
 
@@ -85,7 +85,7 @@ export class DynamoNTS_EndpointParams{
85
85
  ) {
86
86
  try {
87
87
  this.name = set.name ?? set.endpoint;
88
- this.security = set.security ?? dynamoNTS_globalSettings.defaultRouteSecurity;
88
+ this.security = set.security ?? DynamoNTS_globalSettings.defaultRouteSecurity;
89
89
 
90
90
  this.type = set.type;
91
91
  this.endpoint = set.endpoint;
@@ -111,12 +111,12 @@ export class DynamoNTS_EndpointParams{
111
111
  this.preProcessess = set.preProcessess ?? [];
112
112
  this.tasks = set.tasks ?? [];
113
113
 
114
- this.logRequest = set.logRequest ?? dynamoNTS_globalSettings.logRequest;
115
- this.logRequestsParams = set.logRequestsParams ?? dynamoNTS_globalSettings.logRequestsParams;
114
+ this.logRequest = set.logRequest ?? DynamoNTS_globalSettings.logRequest;
115
+ this.logRequestsParams = set.logRequestsParams ?? DynamoNTS_globalSettings.logRequestsParams;
116
116
  this.logRequestsContent =
117
- set.logRequestsContent ?? dynamoNTS_globalSettings.logRequestsContent;
117
+ set.logRequestsContent ?? DynamoNTS_globalSettings.logRequestsContent;
118
118
  this.logResponseContent =
119
- set.logResponseContent ?? dynamoNTS_globalSettings.logResponseContent;
119
+ set.logResponseContent ?? DynamoNTS_globalSettings.logResponseContent;
120
120
  } catch (error) {
121
121
  Dynamo_Log.error(
122
122
  `\nEndpoint params setup failed: name: '${set.name}' ` +
@@ -1,6 +1,6 @@
1
1
 
2
2
  import * as BodyParser from 'body-parser';
3
- export class DynamoNTS_HttpSettings {
3
+ export class DynamoNTS_Http_Settings {
4
4
  httpPort?: number;
5
5
  httpsPort?: number;
6
6
 
@@ -20,7 +20,7 @@ export class DynamoNTS_HttpSettings {
20
20
  };
21
21
 
22
22
  constructor(
23
- set?: DynamoNTS_HttpSettings
23
+ set?: DynamoNTS_Http_Settings
24
24
  ) {
25
25
  if (set) {
26
26
  Object.assign(this, set);
@@ -6,7 +6,7 @@ import { second } from '@futdevpro/fsm-dynamo';
6
6
  /**
7
7
  * socket handling and clarification is under development
8
8
  */
9
- export class DynamoNTS_SocketClientServiceParams {
9
+ export class DynamoNTS_SocketClientService_Params {
10
10
  service: string;
11
11
  name: string;
12
12
  address?: string = 'ws://localhost';
@@ -16,7 +16,7 @@ export class DynamoNTS_SocketClientServiceParams {
16
16
  socketOptions?: Partial<SocketIO.ManagerOptions & SocketIO.SocketOptions>;
17
17
 
18
18
  constructor(
19
- set: DynamoNTS_SocketClientServiceParams
19
+ set: DynamoNTS_SocketClientService_Params
20
20
  ) {
21
21
  Object.assign(this, set);
22
22
 
@@ -1,6 +1,6 @@
1
1
 
2
2
  import { Dynamo_Array, Dynamo_Log } from '@futdevpro/fsm-dynamo';
3
- import { dynamoNTS_globalSettings } from '../../_constants/global-settings.const';
3
+ import { DynamoNTS_globalSettings } from '../../_constants/global-settings.const';
4
4
  import { DynamoNTS_SocketEventKey } from '../../_enums/http/socket-event-type.enum';
5
5
 
6
6
 
@@ -78,13 +78,13 @@ export class DynamoNTS_SocketEvent<T>{
78
78
  DynamoNTS_SocketEventKey.disconnect,
79
79
  ] as string[]).includes(this.eventKey)
80
80
  ) {
81
- this.logEvent = dynamoNTS_globalSettings.logMainSocketEvents ||
82
- dynamoNTS_globalSettings.logAllSocketEvent;
81
+ this.logEvent = DynamoNTS_globalSettings.logMainSocketEvents ||
82
+ DynamoNTS_globalSettings.logAllSocketEvent;
83
83
  } else {
84
- this.logEvent = dynamoNTS_globalSettings.logAllSocketEvent;
84
+ this.logEvent = DynamoNTS_globalSettings.logAllSocketEvent;
85
85
  }
86
86
  this.logEventContent = set.logEventContent !== undefined ?
87
- set.logEventContent : dynamoNTS_globalSettings.logSocketEventContent;
87
+ set.logEventContent : DynamoNTS_globalSettings.logSocketEventContent;
88
88
  } catch (error) {
89
89
  Dynamo_Log.error(
90
90
  `\nSocket Event params setup failed (${this.serviceName}): ${set.eventKey}`,
@@ -8,6 +8,10 @@ import * as SocketIO from 'socket.io';
8
8
  * socket handling and clarification is under development
9
9
  */
10
10
  export class DynamoNTS_SocketPresence {
11
+ /**
12
+ * this is the presence ID which is used to getand handle the presence
13
+ * usually the service master identifier such as userID
14
+ * */
11
15
  issuerId: string;
12
16
  serviceName?: string = 'unknown';
13
17
  onDestroy?: (issuerId: string) => void = (): void => {};
@@ -20,6 +24,10 @@ export class DynamoNTS_SocketPresence {
20
24
 
21
25
  constructor(
22
26
  set: {
27
+ /**
28
+ * this is the presence ID which is used to get and set handle the presence/sockets
29
+ * usually the service master identifier such as userID
30
+ * */
23
31
  issuerId: string,
24
32
  serviceName?: string,
25
33
  onDestroy?: (issuerId: string) => void,
@@ -27,6 +35,10 @@ export class DynamoNTS_SocketPresence {
27
35
  defaultErrorUserMsg?: string,
28
36
  sockets: SocketIO.Socket[],
29
37
 
38
+ /**
39
+ * this is the issuer ID which is used to register data changes,
40
+ * usually the main master identifier such as accountID
41
+ */
30
42
  issuer: string,
31
43
  }
32
44
  ) {
@@ -1,20 +1,20 @@
1
1
 
2
- import { dynamoNTS_globalSettings } from '../../_constants/global-settings.const';
2
+ import { DynamoNTS_globalSettings } from '../../_constants/global-settings.const';
3
3
  import { DynamoNTS_SocketSecurity } from '../../_enums/socket-security.enum';
4
4
 
5
5
  /**
6
6
  * socket handling and clarification is under development
7
7
  */
8
- export class DynamoNTS_SocketServerServiceParams<T = any> {
8
+ export class DynamoNTS_SocketServerService_Params<T = any> {
9
9
  name: string;
10
10
  port: number;
11
11
  security?: DynamoNTS_SocketSecurity;
12
12
 
13
13
  constructor(
14
- set: DynamoNTS_SocketServerServiceParams<T>
14
+ set: DynamoNTS_SocketServerService_Params<T>
15
15
  ) {
16
16
  this.name = set.name;
17
17
  this.port = set.port;
18
- this.security = set.security ? set.security : dynamoNTS_globalSettings.defaultSocketSecurity;
18
+ this.security = set.security ? set.security : DynamoNTS_globalSettings.defaultSocketSecurity;
19
19
  }
20
20
  }
@@ -1,7 +1,7 @@
1
1
 
2
2
  import * as FileSystem from 'fs';
3
3
 
4
- export interface DynamoNTS_CertificationSettings {
4
+ export interface DynamoNTS_Certification_Settings {
5
5
  keyPath: FileSystem.PathLike,
6
6
  certPath: FileSystem.PathLike,
7
7
  }
@@ -4,14 +4,14 @@
4
4
 
5
5
  import { Request, Response } from 'express';
6
6
 
7
- import { Dynamo_DataParams } from '@futdevpro/fsm-dynamo';
7
+ import { Dynamo_DataModel_Params } from '@futdevpro/fsm-dynamo';
8
8
 
9
- import { DynamoNTS_ServiceCollection } from '../../_services/core/service-collection.service';
9
+ import { DynamoNTS_Service_Collection } from '../../_services/core/service-collection.service';
10
10
  import { DynamoNTS_EmailService } from '../../_services/core/email.service';
11
11
  import { DynamoNTS_AuthService } from '../../_services/core/auth.service';
12
12
 
13
13
 
14
- export interface DynamoNTS_GlobalServiceSettings {
14
+ export interface DynamoNTS_GlobalService_Settings {
15
15
  /**
16
16
  * You need to setup your Own Auth Service extending the DynamoNTS_AuthService class
17
17
  */
@@ -20,12 +20,12 @@ export interface DynamoNTS_GlobalServiceSettings {
20
20
  /**
21
21
  * You can setup your Own Email Service extending the DynamoNTS_EmailServiceCollection class
22
22
  */
23
- emailServiceCollection?: DynamoNTS_ServiceCollection<DynamoNTS_EmailService>,
23
+ emailServiceCollection?: DynamoNTS_Service_Collection<DynamoNTS_EmailService>,
24
24
 
25
25
  /**
26
- * you can setup data tables by passing a Dynamo_DataParams list at this point
26
+ * you can setup data tables by passing a Dynamo_DataModel_Params list at this point
27
27
  */
28
- dbModels?: Dynamo_DataParams[],
28
+ dbModels?: Dynamo_DataModel_Params[],
29
29
 
30
30
  /**
31
31
  * you can setup other services by passing a DynamoNTS_SingletonService list at this point
@@ -9,7 +9,7 @@ import { DynamoNTS_SocketSecurity } from '../../_enums/socket-security.enum';
9
9
  * @param logEventContent only will log if the specific socket event is also set to log
10
10
  *
11
11
  */
12
- export interface DynamoNTS_GlobalSettings {
12
+ export interface DynamoNTS_Global_Settings {
13
13
  /**
14
14
  * this will be used as the main baseUrl for the application,
15
15
  * this is not required, but we suggest to use at least a '/api' as base route
@@ -4,7 +4,7 @@ import { DynamoNTS_Controller } from '../../_services';
4
4
  /**
5
5
  * This is a main route point handler, which collects a list of controllers for the API
6
6
  */
7
- export interface DynamoNTS_RoutingModuleSettings {
7
+ export interface DynamoNTS_RoutingModule_Settings {
8
8
  /**
9
9
  * main route of the module
10
10
  */
@@ -20,12 +20,15 @@
20
20
  * //
21
21
  * @returns {T} data: T
22
22
  */
23
- export type DynamoNTS_DBFilter<T> = DynamoNTS_DBFilterSimple<T> | DynamoNTS_DBFilterOR<T> |DynamoNTS_DBFilterNOR<T>;
23
+ export type DynamoNTS_DBFilter<T> =
24
+ DynamoNTS_DBFilterSimple<T> |
25
+ DynamoNTS_DBFilterOR<T> |
26
+ DynamoNTS_DBFilterNOR<T>;
24
27
 
25
28
  /**
26
29
  * A simple filter for a DynamoDB query.
27
30
  */
28
- export type DynamoNTS_DBFilterSimple<T> = {
31
+ export type DynamoNTS_DBFilterSimple<T> = {
29
32
  [K in keyof T]?: T[K] | DynamoNTS_DBFilterExpressions<T[K]>;
30
33
  } & {
31
34
  [path: string]: any;
@@ -27,7 +27,7 @@
27
27
  * $unset: // Removes the specified field from a document. (set: "" to value)
28
28
  * //
29
29
  */
30
- export type DynamoNTS_DBUpdate<T> = {
30
+ export type DynamoNTS_DBUpdate<T> = {
31
31
  /**
32
32
  * Sets the value of a field to current date, either as a Date or a Timestamp.
33
33
  */
@@ -61,7 +61,8 @@
61
61
  */
62
62
  $set?: { [K in keyof T]?: string } | any;
63
63
  /**
64
- * Sets the value of a field if an update results in an insert of a document. Has no effect on update operations that modify existing documents.
64
+ * Sets the value of a field if an update results in an insert of a document.
65
+ * Has no effect on update operations that modify existing documents.
65
66
  */
66
67
  $setOnInsert?: { [K in keyof T]?: T[K] };
67
68
  /**
@@ -1,31 +1,33 @@
1
1
 
2
2
  import { Request, Response } from 'express';
3
3
 
4
- import { customDataModuleSettings } from '@futdevpro/fsm-dynamo';
4
+ import { Dynamo_customDataModule_settings } from '@futdevpro/fsm-dynamo';
5
5
 
6
6
  import { DynamoNTS_HttpCallType } from '../../_enums/http/http-call-type.enum';
7
7
  import { DynamoNTS_Controller } from '../../_services/route/controller.service';
8
- import { Dynamo_CustomDataService } from './custom-data.data-service';
8
+ import { Dynamo_CustomData_DataService } from './custom-data.data-service';
9
9
  import {
10
- DynamoNTS_EndpointParams
10
+ DynamoNTS_Endpoint_Params
11
11
  } from '../../_models/control-models/endpoint-params.control-model';
12
12
 
13
- export class CustomDataController extends DynamoNTS_Controller {
13
+ export class DynamoNTS_CustomData_Controller extends DynamoNTS_Controller {
14
14
 
15
- static getInstance(): CustomDataController {
16
- return CustomDataController.getSingletonInstance();
15
+ static getInstance(): DynamoNTS_CustomData_Controller {
16
+ return DynamoNTS_CustomData_Controller.getSingletonInstance();
17
17
  }
18
18
 
19
19
  setupEndpoints(): void {
20
20
  this.endpoints = [
21
21
  // CUSTOM DATA
22
- new DynamoNTS_EndpointParams({
22
+ new DynamoNTS_Endpoint_Params({
23
23
  name: 'getCustomData',
24
24
  type: DynamoNTS_HttpCallType.get,
25
- endpoint: customDataModuleSettings.endPoints.getCustomData,
25
+ endpoint: Dynamo_customDataModule_settings.endPoints.getCustomData,
26
26
  tasks: [
27
27
  async (req: Request, res: Response): Promise<void> => {
28
- const customDataService = new Dynamo_CustomDataService({ _id: req.params.customId });
28
+ const customDataService = new Dynamo_CustomData_DataService({
29
+ _id: req.params.customId,
30
+ });
29
31
 
30
32
  await customDataService.getDataById();
31
33
 
@@ -33,19 +35,19 @@ export class CustomDataController extends DynamoNTS_Controller {
33
35
  url: req.url,
34
36
  result: 'get custom call was successful!',
35
37
  response: customDataService.data,
36
- request: `.../custom/get/${req.params.customId}`
38
+ request: `.../custom/get/${req.params.customId}`,
37
39
  });
38
- }
39
- ]
40
+ },
41
+ ],
40
42
  }),
41
43
 
42
- new DynamoNTS_EndpointParams({
44
+ new DynamoNTS_Endpoint_Params({
43
45
  name: 'modifyCustomData',
44
46
  type: DynamoNTS_HttpCallType.post,
45
- endpoint: customDataModuleSettings.endPoints.modifyCustomData,
47
+ endpoint: Dynamo_customDataModule_settings.endPoints.modifyCustomData,
46
48
  tasks: [
47
49
  async (req: Request, res: Response, issuer: string): Promise<void> => {
48
- const customDataService = new Dynamo_CustomDataService(req.body, issuer);
50
+ const customDataService = new Dynamo_CustomData_DataService(req.body, issuer);
49
51
 
50
52
  await customDataService.saveData();
51
53
 
@@ -56,10 +58,10 @@ export class CustomDataController extends DynamoNTS_Controller {
56
58
  warning:
57
59
  'keep in mind that this is a playground DB, ' +
58
60
  'and it will be cleared out from time to time',
59
- request: req.body
61
+ request: req.body,
60
62
  });
61
- }
62
- ]
63
+ },
64
+ ],
63
65
  }),
64
66
  ];
65
67
  }
@@ -1,18 +1,20 @@
1
1
 
2
2
 
3
3
 
4
- import { customDataModelParams, Dynamo_CustomData } from '@futdevpro/fsm-dynamo/custom-data-module';
4
+ import {
5
+ Dynamo_customDataModel_params, Dynamo_CustomData
6
+ } from '@futdevpro/fsm-dynamo/custom-data-module';
5
7
  import { DynamoNTS_DataService } from '../../_services/base/data.service';
6
8
 
7
- export class Dynamo_CustomDataService extends DynamoNTS_DataService<Dynamo_CustomData> {
9
+ export class Dynamo_CustomData_DataService extends DynamoNTS_DataService<Dynamo_CustomData> {
8
10
 
9
11
  constructor(
10
12
  customData?: Dynamo_CustomData,
11
- issuer?: string,
13
+ issuer?: string
12
14
  ) {
13
15
  super(
14
16
  new Dynamo_CustomData(customData),
15
- customDataModelParams,
17
+ Dynamo_customDataModel_params,
16
18
  issuer
17
19
  );
18
20
  }
@@ -1,18 +1,18 @@
1
1
 
2
- import { customDataModuleSettings } from '@futdevpro/fsm-dynamo';
2
+ import { Dynamo_customDataModule_settings } from '@futdevpro/fsm-dynamo';
3
3
  import { DynamoNTS_RouteSecurity } from '../../_enums/route-security.enum';
4
4
  import {
5
- DynamoNTS_RoutingModuleSettings
5
+ DynamoNTS_RoutingModule_Settings
6
6
  } from '../../_models/interfaces/routing-module-settings.interface';
7
7
  import { DynamoNTS_RoutingModule } from '../../_services/route/routing-module.service';
8
- import { CustomDataController } from './custom-data.controller';
8
+ import { DynamoNTS_CustomData_Controller } from './custom-data.controller';
9
9
 
10
- export function getCustomDataRoutingModule(
10
+ export function DynamoNTS_getCustomDataRoutingModule(
11
11
  securityOverride?: DynamoNTS_RouteSecurity
12
12
  ): DynamoNTS_RoutingModule {
13
- const set: DynamoNTS_RoutingModuleSettings = {
14
- route: customDataModuleSettings.mainRoute,
15
- controllers: [ CustomDataController.getInstance() ]
13
+ const set: DynamoNTS_RoutingModule_Settings = {
14
+ route: Dynamo_customDataModule_settings.mainRoute,
15
+ controllers: [ DynamoNTS_CustomData_Controller.getInstance() ],
16
16
  };
17
17
 
18
18
  if (securityOverride) {
@@ -1,18 +1,18 @@
1
1
 
2
- import { testModuleSettings } from '@futdevpro/fsm-dynamo/test-module';
2
+ import { Dynamo_testModule_settings } from '@futdevpro/fsm-dynamo/test-module';
3
3
  import { DynamoNTS_RouteSecurity } from '../../_enums/route-security.enum';
4
4
  import {
5
- DynamoNTS_RoutingModuleSettings
5
+ DynamoNTS_RoutingModule_Settings
6
6
  } from '../../_models/interfaces/routing-module-settings.interface';
7
7
  import { DynamoNTS_RoutingModule } from '../../_services/route/routing-module.service';
8
- import { TestController } from './test.controller';
8
+ import { DynamoNTS_Test_Controller } from './test.controller';
9
9
 
10
- export function getTestRoutingModule(
10
+ export function DynamoNTS_getTestRoutingModule(
11
11
  securityOverride?: DynamoNTS_RouteSecurity
12
12
  ): DynamoNTS_RoutingModule {
13
- const set: DynamoNTS_RoutingModuleSettings = {
14
- route: testModuleSettings.mainRoute,
15
- controllers: [ TestController.getInstance() ]
13
+ const set: DynamoNTS_RoutingModule_Settings = {
14
+ route: Dynamo_testModule_settings.mainRoute,
15
+ controllers: [ DynamoNTS_Test_Controller.getInstance() ],
16
16
  };
17
17
 
18
18
  if (securityOverride) {
@@ -1,103 +1,103 @@
1
1
 
2
2
  import { Request, Response } from 'express';
3
3
 
4
- import { testModuleSettings } from '@futdevpro/fsm-dynamo/test-module';
4
+ import { Dynamo_testModule_settings } from '@futdevpro/fsm-dynamo/test-module';
5
5
 
6
6
  import { DynamoNTS_HttpCallType } from '../../_enums/http/http-call-type.enum';
7
7
  import { DynamoNTS_Controller } from '../../_services/route/controller.service';
8
8
  import {
9
- DynamoNTS_EndpointParams
9
+ DynamoNTS_Endpoint_Params
10
10
  } from '../../_models/control-models/endpoint-params.control-model';
11
11
  import { DynamoNTS_GlobalService } from '../../_services/core/global.service';
12
12
 
13
- export class TestController extends DynamoNTS_Controller {
13
+ export class DynamoNTS_Test_Controller extends DynamoNTS_Controller {
14
14
 
15
- static getInstance(): TestController {
16
- return TestController.getSingletonInstance();
15
+ static getInstance(): DynamoNTS_Test_Controller {
16
+ return DynamoNTS_Test_Controller.getSingletonInstance();
17
17
  }
18
18
 
19
19
  setupEndpoints(): void {
20
20
  this.endpoints = [
21
21
  // TESTS
22
- new DynamoNTS_EndpointParams({
22
+ new DynamoNTS_Endpoint_Params({
23
23
  name: 'testGet',
24
24
  type: DynamoNTS_HttpCallType.get,
25
- endpoint: testModuleSettings.endPoints.testGet,
25
+ endpoint: Dynamo_testModule_settings.endPoints.testGet,
26
26
  tasks: [
27
27
  async (req: Request, res: Response): Promise<void> => {
28
28
  res.send({
29
29
  url: req.url,
30
30
  result: 'test-get call was successful!',
31
- request: req.body
31
+ request: req.body,
32
32
  });
33
- }
34
- ]
33
+ },
34
+ ],
35
35
  }),
36
36
 
37
- new DynamoNTS_EndpointParams({
37
+ new DynamoNTS_Endpoint_Params({
38
38
  name: 'testPost',
39
39
  type: DynamoNTS_HttpCallType.post,
40
- endpoint: testModuleSettings.endPoints.testPost,
40
+ endpoint: Dynamo_testModule_settings.endPoints.testPost,
41
41
  tasks: [
42
42
  async (req: Request, res: Response): Promise<void> => {
43
43
  res.send({
44
44
  url: req.url,
45
45
  result: 'test-post call was successful!',
46
- request: req.body
46
+ request: req.body,
47
47
  });
48
- }
49
- ]
48
+ },
49
+ ],
50
50
  }),
51
51
 
52
- new DynamoNTS_EndpointParams({
52
+ new DynamoNTS_Endpoint_Params({
53
53
  name: 'testPut',
54
54
  type: DynamoNTS_HttpCallType.put,
55
- endpoint: testModuleSettings.endPoints.testPut,
55
+ endpoint: Dynamo_testModule_settings.endPoints.testPut,
56
56
  tasks: [
57
57
  async (req: Request, res: Response): Promise<void> => {
58
58
  res.send({
59
59
  url: req.url,
60
60
  result: 'test-put call was successful!',
61
- request: req.body
61
+ request: req.body,
62
62
  });
63
- }
64
- ]
63
+ },
64
+ ],
65
65
  }),
66
66
 
67
- new DynamoNTS_EndpointParams({
67
+ new DynamoNTS_Endpoint_Params({
68
68
  name: 'testPatch',
69
69
  type: DynamoNTS_HttpCallType.patch,
70
- endpoint: testModuleSettings.endPoints.testPatch,
70
+ endpoint: Dynamo_testModule_settings.endPoints.testPatch,
71
71
  tasks: [
72
72
  async (req: Request, res: Response): Promise<void> => {
73
73
  res.send({
74
74
  url: req.url,
75
75
  result: 'test-patch call was successful!',
76
- request: req.body
76
+ request: req.body,
77
77
  });
78
- }
79
- ]
78
+ },
79
+ ],
80
80
  }),
81
81
 
82
- new DynamoNTS_EndpointParams({
82
+ new DynamoNTS_Endpoint_Params({
83
83
  name: 'testDelete',
84
84
  type: DynamoNTS_HttpCallType.delete,
85
- endpoint: testModuleSettings.endPoints.testDelete,
85
+ endpoint: Dynamo_testModule_settings.endPoints.testDelete,
86
86
  tasks: [
87
87
  async (req: Request, res: Response): Promise<void> => {
88
88
  res.send({
89
89
  url: req.url,
90
90
  result: 'test-delete call was successful!',
91
- request: req.body
91
+ request: req.body,
92
92
  });
93
- }
94
- ]
93
+ },
94
+ ],
95
95
  }),
96
96
 
97
- new DynamoNTS_EndpointParams({
97
+ new DynamoNTS_Endpoint_Params({
98
98
  name: 'getServerStatus',
99
99
  type: DynamoNTS_HttpCallType.get,
100
- endpoint: testModuleSettings.endPoints.getServerStatus,
100
+ endpoint: Dynamo_testModule_settings.endPoints.getServerStatus,
101
101
  tasks: [
102
102
  async (req: Request, res: Response): Promise<void> => {
103
103
 
@@ -106,8 +106,8 @@ export class TestController extends DynamoNTS_Controller {
106
106
  version: DynamoNTS_GlobalService.params.version,
107
107
  upTime: DynamoNTS_GlobalService.upTime,
108
108
  });
109
- }
110
- ]
109
+ },
110
+ ],
111
111
  }),
112
112
  ];
113
113
  }
@@ -1,18 +1,18 @@
1
1
 
2
- import { usageModuleSettings } from '@futdevpro/fsm-dynamo/usage-module';
2
+ import { Dynamo_usageModule_settings } from '@futdevpro/fsm-dynamo/usage-module';
3
3
  import { DynamoNTS_RouteSecurity } from '../../_enums/route-security.enum';
4
4
  import {
5
- DynamoNTS_RoutingModuleSettings
5
+ DynamoNTS_RoutingModule_Settings
6
6
  } from '../../_models/interfaces/routing-module-settings.interface';
7
7
  import { DynamoNTS_RoutingModule } from '../../_services/route/routing-module.service';
8
- import { UsageController } from './usage.controller';
8
+ import { DynamoNTS_Usage_Controller } from './usage.controller';
9
9
 
10
- export function getUsageRoutingModule(
10
+ export function DynamoNTS_getUsageRoutingModule(
11
11
  securityOverride?: DynamoNTS_RouteSecurity
12
12
  ): DynamoNTS_RoutingModule {
13
- const set: DynamoNTS_RoutingModuleSettings = {
14
- route: usageModuleSettings.mainRoute,
15
- controllers: [ UsageController.getInstance() ],
13
+ const set: DynamoNTS_RoutingModule_Settings = {
14
+ route: Dynamo_usageModule_settings.mainRoute,
15
+ controllers: [ DynamoNTS_Usage_Controller.getInstance() ],
16
16
  };
17
17
 
18
18
  if (securityOverride) {