@futdevpro/nts-dynamo 1.5.30 → 1.5.32

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 (198) hide show
  1. package/lib/_constants/dynamo-nts-global.settings.d.ts +3 -0
  2. package/lib/_constants/dynamo-nts-global.settings.d.ts.map +1 -0
  3. package/lib/_constants/dynamo-nts-global.settings.js +13 -0
  4. package/lib/_constants/dynamo-nts-global.settings.js.map +1 -0
  5. package/lib/_constants/index.d.ts +1 -1
  6. package/lib/_constants/index.d.ts.map +1 -1
  7. package/lib/_constants/index.js +1 -1
  8. package/lib/_constants/index.js.map +1 -1
  9. package/lib/_enums/dynamo-nts-data-service-function.enum.d.ts +8 -0
  10. package/lib/_enums/dynamo-nts-data-service-function.enum.d.ts.map +1 -0
  11. package/lib/_enums/dynamo-nts-data-service-function.enum.js +15 -0
  12. package/lib/_enums/dynamo-nts-data-service-function.enum.js.map +1 -0
  13. package/lib/_enums/dynamo-nts-route-security.enum.d.ts +6 -0
  14. package/lib/_enums/dynamo-nts-route-security.enum.d.ts.map +1 -0
  15. package/lib/_enums/dynamo-nts-route-security.enum.js +10 -0
  16. package/lib/_enums/dynamo-nts-route-security.enum.js.map +1 -0
  17. package/lib/_enums/index.d.ts +2 -2
  18. package/lib/_enums/index.d.ts.map +1 -1
  19. package/lib/_enums/index.js +2 -2
  20. package/lib/_enums/index.js.map +1 -1
  21. package/lib/_models/dynamo-module-settings.d.ts +0 -6
  22. package/lib/_models/dynamo-module-settings.d.ts.map +1 -1
  23. package/lib/_models/dynamo-module-settings.js +9 -2
  24. package/lib/_models/dynamo-module-settings.js.map +1 -1
  25. package/lib/_models/dynamo-nts-api-call-params.d.ts +37 -0
  26. package/lib/_models/dynamo-nts-api-call-params.d.ts.map +1 -0
  27. package/lib/_models/dynamo-nts-api-call-params.js +29 -0
  28. package/lib/_models/dynamo-nts-api-call-params.js.map +1 -0
  29. package/lib/_models/dynamo-nts-app-params.d.ts +18 -0
  30. package/lib/_models/dynamo-nts-app-params.d.ts.map +1 -0
  31. package/lib/_models/dynamo-nts-app-params.js +17 -0
  32. package/lib/_models/dynamo-nts-app-params.js.map +1 -0
  33. package/lib/_models/dynamo-nts-endpoint-params.d.ts +46 -0
  34. package/lib/_models/dynamo-nts-endpoint-params.d.ts.map +1 -0
  35. package/lib/_models/dynamo-nts-endpoint-params.js +117 -0
  36. package/lib/_models/dynamo-nts-endpoint-params.js.map +1 -0
  37. package/lib/_models/dynamo-nts-global-settings.d.ts +13 -0
  38. package/lib/_models/dynamo-nts-global-settings.d.ts.map +1 -0
  39. package/lib/_models/dynamo-nts-global-settings.js +3 -0
  40. package/lib/_models/dynamo-nts-global-settings.js.map +1 -0
  41. package/lib/_models/index.d.ts +4 -4
  42. package/lib/_models/index.d.ts.map +1 -1
  43. package/lib/_models/index.js +4 -5
  44. package/lib/_models/index.js.map +1 -1
  45. package/lib/_modules/api-service.index.d.ts +3 -3
  46. package/lib/_modules/api-service.index.d.ts.map +1 -1
  47. package/lib/_modules/api-service.index.js +3 -3
  48. package/lib/_modules/api-service.index.js.map +1 -1
  49. package/lib/_modules/app.index.d.ts +9 -9
  50. package/lib/_modules/app.index.d.ts.map +1 -1
  51. package/lib/_modules/app.index.js +9 -9
  52. package/lib/_modules/app.index.js.map +1 -1
  53. package/lib/_modules/auth.index.d.ts +2 -2
  54. package/lib/_modules/auth.index.d.ts.map +1 -1
  55. package/lib/_modules/auth.index.js +2 -2
  56. package/lib/_modules/auth.index.js.map +1 -1
  57. package/lib/_modules/controller.index.d.ts +3 -3
  58. package/lib/_modules/controller.index.d.ts.map +1 -1
  59. package/lib/_modules/controller.index.js +3 -3
  60. package/lib/_modules/controller.index.js.map +1 -1
  61. package/lib/_modules/data-service.index.d.ts +4 -4
  62. package/lib/_modules/data-service.index.d.ts.map +1 -1
  63. package/lib/_modules/data-service.index.js +4 -4
  64. package/lib/_modules/data-service.index.js.map +1 -1
  65. package/lib/_modules/email.index.d.ts +2 -2
  66. package/lib/_modules/email.index.d.ts.map +1 -1
  67. package/lib/_modules/email.index.js +2 -2
  68. package/lib/_modules/email.index.js.map +1 -1
  69. package/lib/_modules/test/custom-data.service.d.ts +2 -2
  70. package/lib/_modules/test/custom-data.service.d.ts.map +1 -1
  71. package/lib/_modules/test/custom-data.service.js +2 -2
  72. package/lib/_modules/test/custom-data.service.js.map +1 -1
  73. package/lib/_modules/test/get-test-routing-module.d.ts +3 -3
  74. package/lib/_modules/test/get-test-routing-module.d.ts.map +1 -1
  75. package/lib/_modules/test/get-test-routing-module.js +2 -2
  76. package/lib/_modules/test/get-test-routing-module.js.map +1 -1
  77. package/lib/_modules/test/test-controller.d.ts +2 -2
  78. package/lib/_modules/test/test-controller.d.ts.map +1 -1
  79. package/lib/_modules/test/test-controller.js +10 -10
  80. package/lib/_modules/test/test-controller.js.map +1 -1
  81. package/lib/_modules/usage/get-usage-routing-module.d.ts +3 -3
  82. package/lib/_modules/usage/get-usage-routing-module.d.ts.map +1 -1
  83. package/lib/_modules/usage/get-usage-routing-module.js +2 -2
  84. package/lib/_modules/usage/get-usage-routing-module.js.map +1 -1
  85. package/lib/_modules/usage/usage-controller.d.ts +2 -2
  86. package/lib/_modules/usage/usage-controller.d.ts.map +1 -1
  87. package/lib/_modules/usage/usage-controller.js +10 -10
  88. package/lib/_modules/usage/usage-controller.js.map +1 -1
  89. package/lib/_modules/usage/usage.service.d.ts +2 -2
  90. package/lib/_modules/usage/usage.service.d.ts.map +1 -1
  91. package/lib/_modules/usage/usage.service.js +10 -10
  92. package/lib/_modules/usage/usage.service.js.map +1 -1
  93. package/lib/_services/dynamo-nts-api.service.d.ts +19 -0
  94. package/lib/_services/dynamo-nts-api.service.d.ts.map +1 -0
  95. package/lib/_services/dynamo-nts-api.service.js +167 -0
  96. package/lib/_services/dynamo-nts-api.service.js.map +1 -0
  97. package/lib/_services/dynamo-nts-app-extended.d.ts +23 -0
  98. package/lib/_services/dynamo-nts-app-extended.d.ts.map +1 -0
  99. package/lib/_services/dynamo-nts-app-extended.js +92 -0
  100. package/lib/_services/dynamo-nts-app-extended.js.map +1 -0
  101. package/lib/_services/dynamo-nts-app.d.ts +130 -0
  102. package/lib/_services/dynamo-nts-app.d.ts.map +1 -0
  103. package/lib/_services/dynamo-nts-app.js +238 -0
  104. package/lib/_services/dynamo-nts-app.js.map +1 -0
  105. package/lib/_services/dynamo-nts-auth.service.d.ts +54 -0
  106. package/lib/_services/dynamo-nts-auth.service.d.ts.map +1 -0
  107. package/lib/_services/dynamo-nts-auth.service.js +46 -0
  108. package/lib/_services/dynamo-nts-auth.service.js.map +1 -0
  109. package/lib/_services/dynamo-nts-controller.service.d.ts +14 -0
  110. package/lib/_services/dynamo-nts-controller.service.d.ts.map +1 -0
  111. package/lib/_services/dynamo-nts-controller.service.js +21 -0
  112. package/lib/_services/dynamo-nts-controller.service.js.map +1 -0
  113. package/lib/_services/dynamo-nts-data.service.d.ts +54 -0
  114. package/lib/_services/dynamo-nts-data.service.d.ts.map +1 -0
  115. package/lib/_services/dynamo-nts-data.service.js +301 -0
  116. package/lib/_services/dynamo-nts-data.service.js.map +1 -0
  117. package/lib/_services/dynamo-nts-db-service-collection.service.d.ts +9 -0
  118. package/lib/_services/dynamo-nts-db-service-collection.service.d.ts.map +1 -0
  119. package/lib/_services/dynamo-nts-db-service-collection.service.js +11 -0
  120. package/lib/_services/dynamo-nts-db-service-collection.service.js.map +1 -0
  121. package/lib/_services/dynamo-nts-db.service.d.ts +244 -0
  122. package/lib/_services/dynamo-nts-db.service.d.ts.map +1 -0
  123. package/lib/_services/dynamo-nts-db.service.js +759 -0
  124. package/lib/_services/dynamo-nts-db.service.js.map +1 -0
  125. package/lib/_services/dynamo-nts-email-service-collection.service.d.ts +19 -0
  126. package/lib/_services/dynamo-nts-email-service-collection.service.d.ts.map +1 -0
  127. package/lib/_services/dynamo-nts-email-service-collection.service.js +21 -0
  128. package/lib/_services/dynamo-nts-email-service-collection.service.js.map +1 -0
  129. package/lib/_services/dynamo-nts-email.service.d.ts +56 -0
  130. package/lib/_services/dynamo-nts-email.service.d.ts.map +1 -0
  131. package/lib/_services/dynamo-nts-email.service.js +194 -0
  132. package/lib/_services/dynamo-nts-email.service.js.map +1 -0
  133. package/lib/_services/dynamo-nts-global.service.d.ts +62 -0
  134. package/lib/_services/dynamo-nts-global.service.d.ts.map +1 -0
  135. package/lib/_services/dynamo-nts-global.service.js +107 -0
  136. package/lib/_services/dynamo-nts-global.service.js.map +1 -0
  137. package/lib/_services/dynamo-nts-routing-module.service.d.ts +42 -0
  138. package/lib/_services/dynamo-nts-routing-module.service.d.ts.map +1 -0
  139. package/lib/_services/dynamo-nts-routing-module.service.js +146 -0
  140. package/lib/_services/dynamo-nts-routing-module.service.js.map +1 -0
  141. package/lib/_services/dynamo-nts-shared.service.d.ts +26 -0
  142. package/lib/_services/dynamo-nts-shared.service.d.ts.map +1 -0
  143. package/lib/_services/dynamo-nts-shared.service.js +63 -0
  144. package/lib/_services/dynamo-nts-shared.service.js.map +1 -0
  145. package/lib/_services/dynamo-nts-singleton.service.d.ts +9 -0
  146. package/lib/_services/dynamo-nts-singleton.service.d.ts.map +1 -0
  147. package/lib/_services/dynamo-nts-singleton.service.js +19 -0
  148. package/lib/_services/dynamo-nts-singleton.service.js.map +1 -0
  149. package/lib/_services/dynamobe-db.service.js +1 -1
  150. package/lib/_services/dynamobe-email.service.js +1 -1
  151. package/lib/_services/index.d.ts +13 -13
  152. package/lib/_services/index.d.ts.map +1 -1
  153. package/lib/_services/index.js +13 -13
  154. package/lib/_services/index.js.map +1 -1
  155. package/lib/tsconfig.tsbuildinfo +1041 -365
  156. package/package.json +4 -7
  157. package/src/_constants/dynamo-nts-global.settings.ts +12 -0
  158. package/src/_constants/index.ts +1 -1
  159. package/src/_enums/{dynamobe-data-service-function.enum.ts → dynamo-nts-data-service-function.enum.ts} +1 -1
  160. package/src/_enums/{dynamobe-route-security.enum.ts → dynamo-nts-route-security.enum.ts} +1 -1
  161. package/src/_enums/index.ts +2 -2
  162. package/src/_models/dynamo-module-settings.ts +2 -2
  163. package/src/_models/{dynamobe-api-call-params.ts → dynamo-nts-api-call-params.ts} +1 -1
  164. package/src/_models/{dynamobe-app-params.ts → dynamo-nts-app-params.ts} +1 -1
  165. package/src/_models/{dynamobe-endpoint-params.ts → dynamo-nts-endpoint-params.ts} +20 -20
  166. package/src/_models/dynamo-nts-global-settings.ts +13 -0
  167. package/src/_models/index.ts +4 -5
  168. package/src/_modules/api-service.index.ts +3 -3
  169. package/src/_modules/app.index.ts +9 -9
  170. package/src/_modules/auth.index.ts +2 -2
  171. package/src/_modules/controller.index.ts +3 -3
  172. package/src/_modules/data-service.index.ts +4 -4
  173. package/src/_modules/email.index.ts +2 -2
  174. package/src/_modules/test/custom-data.service.ts +2 -2
  175. package/src/_modules/test/get-test-routing-module.ts +5 -5
  176. package/src/_modules/test/test-controller.ts +10 -10
  177. package/src/_modules/usage/get-usage-routing-module.ts +5 -5
  178. package/src/_modules/usage/usage-controller.ts +12 -12
  179. package/src/_modules/usage/usage.service.ts +11 -11
  180. package/src/_services/{dynamobe-api.service.ts → dynamo-nts-api.service.ts} +16 -16
  181. package/src/_services/dynamo-nts-app-extended.ts +124 -0
  182. package/src/_services/{dynamobe-app.ts → dynamo-nts-app.ts} +49 -49
  183. package/src/_services/{dynamobe-auth.service.ts → dynamo-nts-auth.service.ts} +5 -5
  184. package/src/_services/dynamo-nts-controller.service.ts +28 -0
  185. package/src/_services/{dynamobe-data.service.ts → dynamo-nts-data.service.ts} +29 -29
  186. package/src/_services/dynamo-nts-db-service-collection.service.ts +12 -0
  187. package/src/_services/{dynamobe-db.service.ts → dynamo-nts-db.service.ts} +33 -33
  188. package/src/_services/{dynamobe-email-service-collection.service.ts → dynamo-nts-email-service-collection.service.ts} +4 -4
  189. package/src/_services/{dynamobe-email.service.ts → dynamo-nts-email.service.ts} +16 -16
  190. package/src/_services/{dynamobe-global.service.ts → dynamo-nts-global.service.ts} +27 -27
  191. package/src/_services/{dynamobe-routing-module.service.ts → dynamo-nts-routing-module.service.ts} +30 -30
  192. package/src/_services/{dynamobe-shared.service.ts → dynamo-nts-shared.service.ts} +2 -2
  193. package/src/_services/{dynamobe-singleton.service.ts → dynamo-nts-singleton.service.ts} +1 -1
  194. package/src/_services/index.ts +13 -13
  195. package/src/_constants/dynamobe-global.settings.ts +0 -12
  196. package/src/_models/dynamobe-global-settings.ts +0 -13
  197. package/src/_services/dynamobe-controller.service.ts +0 -28
  198. package/src/_services/dynamobe-db-service-collection.service.ts +0 -12
@@ -1,28 +1,28 @@
1
1
 
2
2
 
3
- import { Metadata, DynamoBEDataParams } from '@futdevpro/fsm-dynamo';
3
+ import { Metadata, DynamoNTS_DataParams } from '@futdevpro/fsm-dynamo';
4
4
 
5
- import { DynamoBEAuthService } from './dynamobe-auth.service';
6
- import { DynamoBEDBServiceCollection } from './dynamobe-db-service-collection.service';
7
- import { DynamoBEDBService } from './dynamobe-db.service';
8
- import { DynamoBEEmailServiceCollection } from './dynamobe-email-service-collection.service';
9
- import { DBE_Shared } from './dynamobe-shared.service';
10
- import { DynamoBESingletonService } from './dynamobe-singleton.service';
5
+ import { DynamoNTS_AuthService } from './dynamo-nts-auth.service';
6
+ import { DynamoNTS_DBServiceCollection } from './dynamo-nts-db-service-collection.service';
7
+ import { DynamoNTS_DBService } from './dynamo-nts-db.service';
8
+ import { DynamoNTS_EmailServiceCollection } from './dynamo-nts-email-service-collection.service';
9
+ import { DynamoNTS_Shared } from './dynamo-nts-shared.service';
10
+ import { DynamoNTS_SingletonService } from './dynamo-nts-singleton.service';
11
11
 
12
12
  /**
13
13
  * This is the main Global/Core Service Collection used by DynamoBE,
14
14
  * you also can use this to access main services as
15
15
  * dbServices, emailServices, or authService
16
16
  */
17
- export class DBE_Global_S extends DynamoBESingletonService {
17
+ export class DynamoNTS_GlobalService extends DynamoNTS_SingletonService {
18
18
 
19
- static getInstance(): DBE_Global_S {
20
- return DBE_Global_S.getSingletonInstance();
19
+ static getInstance(): DynamoNTS_GlobalService {
20
+ return DynamoNTS_GlobalService.getSingletonInstance();
21
21
  }
22
22
 
23
- authService: DynamoBEAuthService;
24
- dbServiceCollection: DynamoBEDBServiceCollection;
25
- emailServiceCollection: DynamoBEEmailServiceCollection;
23
+ authService: DynamoNTS_AuthService;
24
+ dbServiceCollection: DynamoNTS_DBServiceCollection;
25
+ emailServiceCollection: DynamoNTS_EmailServiceCollection;
26
26
 
27
27
  /**
28
28
  * You need to setup global Services through this function
@@ -32,35 +32,35 @@ export class DBE_Global_S extends DynamoBESingletonService {
32
32
  /**
33
33
  * You need to setup your Own Auth Service extending the DynamoBEAuthService class
34
34
  */
35
- authService: DynamoBEAuthService,
35
+ authService: DynamoNTS_AuthService,
36
36
 
37
37
  /**
38
38
  * You can setup your Own Email Service extending the DynamoBEEmailServiceCollection class
39
39
  */
40
- emailServiceCollection?: DynamoBEEmailServiceCollection,
40
+ emailServiceCollection?: DynamoNTS_EmailServiceCollection,
41
41
 
42
42
  /**
43
43
  * you can setup data tables by passing a DynamoBEDataParams list at this point
44
44
  */
45
- dbModels: DynamoBEDataParams[],
45
+ dbModels: DynamoNTS_DataParams[],
46
46
  }
47
47
  ): void {
48
48
  this.getInstance();
49
49
 
50
50
  try {
51
- this.instance.dbServiceCollection = new DynamoBEDBServiceCollection();
52
- set.dbModels.forEach((dbModel: DynamoBEDataParams) => {
51
+ this.instance.dbServiceCollection = new DynamoNTS_DBServiceCollection();
52
+ set.dbModels.forEach((dbModel: DynamoNTS_DataParams) => {
53
53
  try {
54
- this.instance.dbServiceCollection[dbModel.dataName] = new DynamoBEDBService(dbModel);
54
+ this.instance.dbServiceCollection[dbModel.dataName] = new DynamoNTS_DBService(dbModel);
55
55
  } catch (error) {
56
- DBE_Shared.logError(`\nFailed to create DynamoBEDBService (${dbModel.dataName}).\n`, dbModel, `\n`, error);
56
+ DynamoNTS_Shared.logError(`\nFailed to create DynamoBEDBService (${dbModel.dataName}).\n`, dbModel, `\n`, error);
57
57
  }
58
58
  });
59
59
 
60
60
  this.instance.authService = set.authService;
61
61
  this.instance.emailServiceCollection = set.emailServiceCollection;
62
62
  } catch (error) {
63
- DBE_Shared.logError('\nsetServices failed on DBE_Global_S.\n', error);
63
+ DynamoNTS_Shared.logError('\nsetServices failed on DBE_Global_S.\n', error);
64
64
  }
65
65
  }
66
66
 
@@ -68,7 +68,7 @@ export class DBE_Global_S extends DynamoBESingletonService {
68
68
  *
69
69
  * @returns
70
70
  */
71
- static getAuthService(): DynamoBEAuthService {
71
+ static getAuthService(): DynamoNTS_AuthService {
72
72
  if (!this.instance?.authService?.authenticateToken) {
73
73
  throw new Error(
74
74
  `\nUnique Authentication Service missing!` +
@@ -82,7 +82,7 @@ export class DBE_Global_S extends DynamoBESingletonService {
82
82
  *
83
83
  * @returns
84
84
  */
85
- static getDBServiceCollection(): DynamoBEDBServiceCollection {
85
+ static getDBServiceCollection(): DynamoNTS_DBServiceCollection {
86
86
  if (!this.instance?.dbServiceCollection) {
87
87
  throw new Error(
88
88
  `\nUnique DataBase Service Collection missing!` +
@@ -97,7 +97,7 @@ export class DBE_Global_S extends DynamoBESingletonService {
97
97
  * @param dataParams
98
98
  * @returns
99
99
  */
100
- static getDBService<T extends Metadata>(dataParams: DynamoBEDataParams): DynamoBEDBService<T> {
100
+ static getDBService<T extends Metadata>(dataParams: DynamoNTS_DataParams): DynamoNTS_DBService<T> {
101
101
  return this.getDBServiceByKey<T>(dataParams.dataName);
102
102
  }
103
103
 
@@ -106,10 +106,10 @@ export class DBE_Global_S extends DynamoBESingletonService {
106
106
  * @param key
107
107
  * @returns
108
108
  */
109
- static getDBServiceByKey<T extends Metadata>(key: string): DynamoBEDBService<T> {
109
+ static getDBServiceByKey<T extends Metadata>(key: string): DynamoNTS_DBService<T> {
110
110
  const collection = this.getDBServiceCollection();
111
111
  if (collection[key]) {
112
- return collection[key] as DynamoBEDBService<T>;
112
+ return collection[key] as DynamoNTS_DBService<T>;
113
113
  } else {
114
114
  let keys: string = `${Object.keys(collection)}`;
115
115
  keys = keys.replace(/,/g, '\n ');
@@ -125,7 +125,7 @@ export class DBE_Global_S extends DynamoBESingletonService {
125
125
  *
126
126
  * @returns
127
127
  */
128
- static getEmailServiceCollection(): DynamoBEEmailServiceCollection {
128
+ static getEmailServiceCollection(): DynamoNTS_EmailServiceCollection {
129
129
  if (!this.instance?.emailServiceCollection) {
130
130
  throw new Error(
131
131
  `Unique Email Service Collection missing!` +
@@ -1,48 +1,48 @@
1
1
 
2
2
  import { Router } from 'express';
3
- import { DynamoBEError } from '@futdevpro/fsm-dynamo';
3
+ import { DynamoNTS_Error } from '@futdevpro/fsm-dynamo';
4
4
 
5
- import { dynamoBEGlobalSettings } from '../_constants/dynamobe-global.settings';
6
- import { DynamoBERouteSecurity } from '../_enums/dynamobe-route-security.enum';
5
+ import { dynamoNTS_GlobalSettings } from '../_constants/dynamo-nts-global.settings';
6
+ import { DynamoNTS_RouteSecurity } from '../_enums/dynamo-nts-route-security.enum';
7
7
  import { HttpCallType } from '../_enums/http/http-call-type.enum';
8
- import { DynamoBEEndpointParams } from '../_models/dynamobe-endpoint-params';
9
- import { DynamoBEController } from './dynamobe-controller.service';
10
- import { DBE_Shared } from './dynamobe-shared.service';
8
+ import { DynamoNTS_EndpointParams } from '../_models/dynamo-nts-endpoint-params';
9
+ import { DynamoNTS_Controller } from './dynamo-nts-controller.service';
10
+ import { DynamoNTS_Shared } from './dynamo-nts-shared.service';
11
11
 
12
- export interface DynamoBERoutingModuleSettings {
12
+ export interface DynamoNTS_RoutingModuleSettings {
13
13
  route: string;
14
- controllers: DynamoBEController[];
15
- securityOverride?: DynamoBERouteSecurity;
14
+ controllers: DynamoNTS_Controller[];
15
+ securityOverride?: DynamoNTS_RouteSecurity;
16
16
  }
17
17
 
18
18
  /**
19
19
  *
20
20
  */
21
- export class DynamoBERoutingModule {
21
+ export class DynamoNTS_RoutingModule {
22
22
 
23
- security: DynamoBERouteSecurity;
23
+ security: DynamoNTS_RouteSecurity;
24
24
  route: string;
25
25
 
26
- private controllers: DynamoBEController[];
27
- endpoints: DynamoBEEndpointParams[] = [];
26
+ private controllers: DynamoNTS_Controller[];
27
+ endpoints: DynamoNTS_EndpointParams[] = [];
28
28
 
29
29
  openRouter: Router = Router();
30
30
  secureRouter: Router = Router();
31
31
 
32
- protected log: boolean = dynamoBEGlobalSettings.logSetup;
32
+ protected log: boolean = dynamoNTS_GlobalSettings.logSetup;
33
33
 
34
34
  constructor(
35
- set: DynamoBERoutingModuleSettings
35
+ set: DynamoNTS_RoutingModuleSettings
36
36
  ){
37
37
  try {
38
- this.route = dynamoBEGlobalSettings.baseUrl + set.route;
38
+ this.route = dynamoNTS_GlobalSettings.baseUrl + set.route;
39
39
  this.controllers = set.controllers;
40
40
  this.setupRoutes();
41
41
  this.mountRoutes(set.securityOverride);
42
42
 
43
43
  if (this.log) console.log(`routing module setup done: ${this.route} serurity: ${this.security}\n`);
44
44
  } catch (error) {
45
- DBE_Shared.logError(`Routing module setup failed (${this.route})`, error);
45
+ DynamoNTS_Shared.logError(`Routing module setup failed (${this.route})`, error);
46
46
  }
47
47
  }
48
48
 
@@ -50,7 +50,7 @@ export class DynamoBERoutingModule {
50
50
  * You must setup endpoints and required services in this function
51
51
  */
52
52
  private setupRoutes(): void {
53
- this.controllers.forEach((controller: DynamoBEController) => {
53
+ this.controllers.forEach((controller: DynamoNTS_Controller) => {
54
54
  this.endpoints.push(...controller.endpoints);
55
55
  });
56
56
  }
@@ -59,24 +59,24 @@ export class DynamoBERoutingModule {
59
59
  *
60
60
  * @param securityOverride
61
61
  */
62
- private mountRoutes(securityOverride?: DynamoBERouteSecurity): void {
62
+ private mountRoutes(securityOverride?: DynamoNTS_RouteSecurity): void {
63
63
  if (securityOverride) {
64
64
  this.security = securityOverride;
65
65
  }
66
- this.endpoints.forEach((endpoint: DynamoBEEndpointParams) => {
66
+ this.endpoints.forEach((endpoint: DynamoNTS_EndpointParams) => {
67
67
  if (securityOverride) {
68
68
  endpoint.security = securityOverride;
69
69
  } else {
70
70
  if (!this.security) {
71
71
  this.security = endpoint.security;
72
72
  } else if (this.security !== endpoint.security) {
73
- this.security = DynamoBERouteSecurity.both;
73
+ this.security = DynamoNTS_RouteSecurity.both;
74
74
  }
75
75
  }
76
76
 
77
77
  if (this.log) console.log(`endpoint mount (${endpoint.security}): ${this.route}${endpoint.endpoint}`);
78
- const existingEndPoints: DynamoBEEndpointParams[] = this.endpoints.filter(
79
- (ep: DynamoBEEndpointParams) => ep.endpoint === endpoint.endpoint);
78
+ const existingEndPoints: DynamoNTS_EndpointParams[] = this.endpoints.filter(
79
+ (ep: DynamoNTS_EndpointParams) => ep.endpoint === endpoint.endpoint);
80
80
  if (1 < existingEndPoints.length) {
81
81
  let error = new Error(`ENDPOINT DUPLICATION: ${endpoint.endpoint}`);
82
82
  let errorStack: string[] = error.stack.split('\n');
@@ -87,14 +87,14 @@ export class DynamoBERoutingModule {
87
87
  }
88
88
 
89
89
  try {
90
- if (endpoint.security !== DynamoBERouteSecurity.secure) {
90
+ if (endpoint.security !== DynamoNTS_RouteSecurity.secure) {
91
91
  this.mountOpenRoute(endpoint);
92
92
  }
93
- if (endpoint.security !== DynamoBERouteSecurity.open) {
93
+ if (endpoint.security !== DynamoNTS_RouteSecurity.open) {
94
94
  this.mountSecureRoute(endpoint);
95
95
  }
96
96
  } catch (error) {
97
- throw new DynamoBEError({
97
+ throw new DynamoNTS_Error({
98
98
  message: `DYNAMOBEERROR: Failed to mount routes.`,
99
99
  userMessage: `We encountered an uncought BackEnd Build Error, please contact the responsible development team. errorcode: 900-456-100`,
100
100
  error
@@ -107,7 +107,7 @@ export class DynamoBERoutingModule {
107
107
  *
108
108
  * @param endpointParams
109
109
  */
110
- private mountOpenRoute(endpointParams: DynamoBEEndpointParams): void {
110
+ private mountOpenRoute(endpointParams: DynamoNTS_EndpointParams): void {
111
111
  switch(endpointParams.type) {
112
112
  case HttpCallType.get:
113
113
  this.openRouter.get(endpointParams.endpoint,
@@ -130,7 +130,7 @@ export class DynamoBERoutingModule {
130
130
  endpointParams.preProcessess, endpointParams.getTasksExecution());
131
131
  break;
132
132
  default:
133
- throw new DynamoBEError({
133
+ throw new DynamoNTS_Error({
134
134
  message: `DYNAMOBEERROR: INVALID route type: ${endpointParams.type} - ${endpointParams.name}` ,
135
135
  userMessage: `We encountered an uncought BackEnd Build Error, please contact the responsible development team. errorcode: 900-456-200`,
136
136
  error: new Error()
@@ -142,7 +142,7 @@ export class DynamoBERoutingModule {
142
142
  *
143
143
  * @param endpointParams
144
144
  */
145
- private mountSecureRoute(endpointParams: DynamoBEEndpointParams): void {
145
+ private mountSecureRoute(endpointParams: DynamoNTS_EndpointParams): void {
146
146
  switch(endpointParams.type) {
147
147
  case HttpCallType.get:
148
148
  this.secureRouter.get(endpointParams.endpoint,
@@ -165,7 +165,7 @@ export class DynamoBERoutingModule {
165
165
  endpointParams.preProcessess, endpointParams.getTasksExecution());
166
166
  break;
167
167
  default:
168
- throw new DynamoBEError({
168
+ throw new DynamoNTS_Error({
169
169
  message: `DYNAMOBEERROR: INVALID route type: ${endpointParams.type} - ${endpointParams.name}`,
170
170
  userMessage: `We encountered an uncought BackEnd Build Error, please contact the responsible development team. errorcode: 900-456-300`,
171
171
  error: new Error()
@@ -2,12 +2,12 @@
2
2
  import * as ReadLine from 'readline';
3
3
  import { Request } from 'express';
4
4
  import * as GeoIp from 'geoip-lite';
5
- import { GeoIpLocation, D_Shared } from '@futdevpro/fsm-dynamo/shared-service';
5
+ import { GeoIpLocation, Dynamo_Shared } from '@futdevpro/fsm-dynamo/shared-service';
6
6
 
7
7
  /**
8
8
  *
9
9
  */
10
- export class DBE_Shared extends D_Shared {
10
+ export class DynamoNTS_Shared extends Dynamo_Shared {
11
11
 
12
12
  /**
13
13
  *
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  *
4
4
  */
5
- export class DynamoBESingletonService {
5
+ export class DynamoNTS_SingletonService {
6
6
  /// --- --- --- SINGLETON --- --- --- \\\
7
7
  protected static instance;
8
8
 
@@ -2,17 +2,17 @@
2
2
 
3
3
 
4
4
  // SERVICES
5
- export * from './dynamobe-api.service';
6
- export * from './dynamobe-app';
7
- export * from './dynamobe-auth.service';
8
- export * from './dynamobe-controller.service';
9
- export * from './dynamobe-data.service';
10
- export * from './dynamobe-db-service-collection.service';
11
- export * from './dynamobe-db.service';
12
- export * from './dynamobe-email-service-collection.service';
13
- export * from './dynamobe-email.service';
14
- export * from './dynamobe-global.service';
15
- export * from './dynamobe-routing-module.service';
16
- export * from './dynamobe-shared.service';
17
- export * from './dynamobe-singleton.service';
5
+ export * from './dynamo-nts-api.service';
6
+ export * from './dynamo-nts-app';
7
+ export * from './dynamo-nts-auth.service';
8
+ export * from './dynamo-nts-controller.service';
9
+ export * from './dynamo-nts-data.service';
10
+ export * from './dynamo-nts-db-service-collection.service';
11
+ export * from './dynamo-nts-db.service';
12
+ export * from './dynamo-nts-email-service-collection.service';
13
+ export * from './dynamo-nts-email.service';
14
+ export * from './dynamo-nts-global.service';
15
+ export * from './dynamo-nts-routing-module.service';
16
+ export * from './dynamo-nts-shared.service';
17
+ export * from './dynamo-nts-singleton.service';
18
18
 
@@ -1,12 +0,0 @@
1
-
2
- import { DynamoBERouteSecurity } from '../_enums/dynamobe-route-security.enum';
3
- import { DynamoBEGlobalSettings } from '../_models/dynamobe-global-settings';
4
-
5
- export const dynamoBEGlobalSettings: DynamoBEGlobalSettings = {
6
- baseUrl: '/api',
7
- defaultRouteSecurity: DynamoBERouteSecurity.open,
8
- logSetup: false,
9
- logRequests: true,
10
- logRequestsContent: true,
11
- logResponseContent: false,
12
- };
@@ -1,13 +0,0 @@
1
- import { DynamoBERouteSecurity } from '../_enums/dynamobe-route-security.enum';
2
-
3
- /**
4
- *
5
- */
6
- export interface DynamoBEGlobalSettings {
7
- baseUrl: string;
8
- defaultRouteSecurity: DynamoBERouteSecurity;
9
- logSetup?: boolean;
10
- logRequests?: boolean;
11
- logRequestsContent?: boolean;
12
- logResponseContent?: boolean;
13
- }
@@ -1,28 +0,0 @@
1
-
2
-
3
- import { DynamoBEEndpointParams } from '../_models/dynamobe-endpoint-params';
4
- import { DBE_Shared } from './dynamobe-shared.service';
5
- import { DynamoBESingletonService } from './dynamobe-singleton.service';
6
-
7
- /**
8
- *
9
- */
10
- export abstract class DynamoBEController extends DynamoBESingletonService {
11
-
12
- endpoints: DynamoBEEndpointParams[];
13
-
14
- protected constructor(){
15
- super();
16
-
17
- try {
18
- this.setupEndpoints();
19
- } catch (error) {
20
- DBE_Shared.logError(`DynamoBEController ERROR setup failed:`, error);
21
- }
22
- }
23
-
24
- /**
25
- * You must setup endpoints and required services in this function
26
- */
27
- abstract setupEndpoints(): void
28
- }
@@ -1,12 +0,0 @@
1
-
2
- import { DynamoBEDBService } from './dynamobe-db.service';
3
- import { DynamoBESingletonService } from './dynamobe-singleton.service';
4
-
5
- /**
6
- *
7
- */
8
- export class DynamoBEDBServiceCollection extends DynamoBESingletonService {
9
-
10
- [service: string]: DynamoBEDBService<any>;
11
-
12
- }