@futdevpro/nts-dynamo 1.5.30 → 1.5.31

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 (197) 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 +6 -6
  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-email.service.js +1 -1
  150. package/lib/_services/index.d.ts +13 -13
  151. package/lib/_services/index.d.ts.map +1 -1
  152. package/lib/_services/index.js +13 -13
  153. package/lib/_services/index.js.map +1 -1
  154. package/lib/tsconfig.tsbuildinfo +995 -319
  155. package/package.json +2 -6
  156. package/src/_constants/dynamo-nts-global.settings.ts +12 -0
  157. package/src/_constants/index.ts +1 -1
  158. package/src/_enums/{dynamobe-data-service-function.enum.ts → dynamo-nts-data-service-function.enum.ts} +1 -1
  159. package/src/_enums/{dynamobe-route-security.enum.ts → dynamo-nts-route-security.enum.ts} +1 -1
  160. package/src/_enums/index.ts +2 -2
  161. package/src/_models/dynamo-module-settings.ts +2 -2
  162. package/src/_models/{dynamobe-api-call-params.ts → dynamo-nts-api-call-params.ts} +1 -1
  163. package/src/_models/{dynamobe-app-params.ts → dynamo-nts-app-params.ts} +1 -1
  164. package/src/_models/{dynamobe-endpoint-params.ts → dynamo-nts-endpoint-params.ts} +20 -20
  165. package/src/_models/dynamo-nts-global-settings.ts +13 -0
  166. package/src/_models/index.ts +4 -5
  167. package/src/_modules/api-service.index.ts +3 -3
  168. package/src/_modules/app.index.ts +9 -9
  169. package/src/_modules/auth.index.ts +2 -2
  170. package/src/_modules/controller.index.ts +3 -3
  171. package/src/_modules/data-service.index.ts +4 -4
  172. package/src/_modules/email.index.ts +2 -2
  173. package/src/_modules/test/custom-data.service.ts +2 -2
  174. package/src/_modules/test/get-test-routing-module.ts +5 -5
  175. package/src/_modules/test/test-controller.ts +10 -10
  176. package/src/_modules/usage/get-usage-routing-module.ts +5 -5
  177. package/src/_modules/usage/usage-controller.ts +12 -12
  178. package/src/_modules/usage/usage.service.ts +6 -6
  179. package/src/_services/{dynamobe-api.service.ts → dynamo-nts-api.service.ts} +12 -12
  180. package/src/_services/dynamo-nts-app-extended.ts +124 -0
  181. package/src/_services/{dynamobe-app.ts → dynamo-nts-app.ts} +49 -49
  182. package/src/_services/{dynamobe-auth.service.ts → dynamo-nts-auth.service.ts} +2 -2
  183. package/src/_services/dynamo-nts-controller.service.ts +28 -0
  184. package/src/_services/{dynamobe-data.service.ts → dynamo-nts-data.service.ts} +7 -7
  185. package/src/_services/dynamo-nts-db-service-collection.service.ts +12 -0
  186. package/src/_services/{dynamobe-db.service.ts → dynamo-nts-db.service.ts} +1 -1
  187. package/src/_services/{dynamobe-email-service-collection.service.ts → dynamo-nts-email-service-collection.service.ts} +4 -4
  188. package/src/_services/{dynamobe-email.service.ts → dynamo-nts-email.service.ts} +11 -11
  189. package/src/_services/{dynamobe-global.service.ts → dynamo-nts-global.service.ts} +24 -24
  190. package/src/_services/{dynamobe-routing-module.service.ts → dynamo-nts-routing-module.service.ts} +26 -26
  191. package/src/_services/{dynamobe-shared.service.ts → dynamo-nts-shared.service.ts} +1 -1
  192. package/src/_services/{dynamobe-singleton.service.ts → dynamo-nts-singleton.service.ts} +1 -1
  193. package/src/_services/index.ts +13 -13
  194. package/src/_constants/dynamobe-global.settings.ts +0 -12
  195. package/src/_models/dynamobe-global-settings.ts +0 -13
  196. package/src/_services/dynamobe-controller.service.ts +0 -28
  197. package/src/_services/dynamobe-db-service-collection.service.ts +0 -12
@@ -5,12 +5,12 @@ import * as NodeMailer from 'nodemailer';
5
5
  import { Options as MailOptions, Attachment } from 'nodemailer/lib/mailer';
6
6
  import { DynamoBEError } from '@futdevpro/fsm-dynamo';
7
7
 
8
- import { DBE_Shared } from './dynamobe-shared.service';
8
+ import { DynamoNTS_Shared } from './dynamo-nts-shared.service';
9
9
 
10
10
  /**
11
11
  *
12
12
  */
13
- export class DynamoBEEmailService {
13
+ export class DynamoNTS_EmailService {
14
14
  private nmTransporter: NodeMailer.Transporter;
15
15
  private senderName: string;
16
16
  private senderNEmail: string;
@@ -55,7 +55,7 @@ export class DynamoBEEmailService {
55
55
  this.constructionFinished();
56
56
  }
57
57
  } catch (error) {
58
- DBE_Shared.logError(`\nDynamoBEEmailService ERROR, The emailService construction failed for ${set.email}.`, new Error());
58
+ DynamoNTS_Shared.logError(`\nDynamoBEEmailService ERROR, The emailService construction failed for ${set.email}.`, new Error());
59
59
  }
60
60
  }
61
61
 
@@ -63,7 +63,7 @@ export class DynamoBEEmailService {
63
63
  *
64
64
  */
65
65
  private constructionFinished(): void {
66
- DBE_Shared.logSuccess(`\nEmailService construction (${this.senderName}) Finished!\n`)
66
+ DynamoNTS_Shared.logSuccess(`\nEmailService construction (${this.senderName}) Finished!\n`)
67
67
  }
68
68
 
69
69
  /**
@@ -101,7 +101,7 @@ export class DynamoBEEmailService {
101
101
  this.templatePropertyKeys[set.useTemplate].forEach((key: string, index: number) => {
102
102
  props += `${key}${index != this.templatePropertyKeys[set.useTemplate].length - 1 ? ', ' : ''}`;
103
103
  });
104
- DBE_Shared.logError('\nDynamoBEEmailService ERROR: INVALID sendEmail settings', set);
104
+ DynamoNTS_Shared.logError('\nDynamoBEEmailService ERROR: INVALID sendEmail settings', set);
105
105
  throw new DynamoBEError({
106
106
  message: `templateProperties missing! properties needed: ${props}`,
107
107
  userMessage: `We encountered an uncought BackEnd Email Service Error, please contact the responsible development team. errorcode: 701-114-102`,
@@ -110,7 +110,7 @@ export class DynamoBEEmailService {
110
110
  }
111
111
  this.templatePropertyKeys[set.useTemplate].forEach((propertyKey: string) => {
112
112
  if (!set.templateProperties[propertyKey]) {
113
- DBE_Shared.logError(`templateProperty missing! (${propertyKey})`);
113
+ DynamoNTS_Shared.logError(`templateProperty missing! (${propertyKey})`);
114
114
  }
115
115
  const reg = new RegExp(`{{${propertyKey}}}`, 'g')
116
116
  content = content.replace(reg, set.templateProperties[propertyKey]);
@@ -143,7 +143,7 @@ export class DynamoBEEmailService {
143
143
  });
144
144
  });
145
145
  } catch (error) {
146
- DBE_Shared.logError('\nDynamoBEEmailService ERROR: email sending error', error);
146
+ DynamoNTS_Shared.logError('\nDynamoBEEmailService ERROR: email sending error', error);
147
147
  throw error;
148
148
  }
149
149
  }
@@ -162,7 +162,7 @@ export class DynamoBEEmailService {
162
162
  templatePath = Path.join(rootPath, templatePath);
163
163
  FileSystem.readFile(templatePath, 'utf8' , (err, template) => {
164
164
  if (err) {
165
- DBE_Shared.logError(`\nDynamoBEEmailService readFile ERROR (0), Couldn't load email template; ${templateName} from ${templatePath}\nerror:\n`, err, '\n');
165
+ DynamoNTS_Shared.logError(`\nDynamoBEEmailService readFile ERROR (0), Couldn't load email template; ${templateName} from ${templatePath}\nerror:\n`, err, '\n');
166
166
  reject(err);
167
167
  return;
168
168
  } else {
@@ -178,7 +178,7 @@ export class DynamoBEEmailService {
178
178
  });
179
179
  });
180
180
  } catch (error) {
181
- DBE_Shared.logError(`\nDynamoBEEmailService ERROR (1), Couldn't load email template; ${templateName} from ${templatePath}`, new Error());
181
+ DynamoNTS_Shared.logError(`\nDynamoBEEmailService ERROR (1), Couldn't load email template; ${templateName} from ${templatePath}`, new Error());
182
182
  }
183
183
  }
184
184
 
@@ -194,7 +194,7 @@ export class DynamoBEEmailService {
194
194
  let propertyCloseTagIndex = template.indexOf('}}', propertyOpenTagIndex + 2);
195
195
  while (propertyOpenTagIndex >= 0) {
196
196
  if (propertyCloseTagIndex === -1) {
197
- DBE_Shared.logError(`\nDynamoBEEmailService ERROR, missing closing tag from email template! (${propertyOpenTagIndex} -)`, propertyKeys);
197
+ DynamoNTS_Shared.logError(`\nDynamoBEEmailService ERROR, missing closing tag from email template! (${propertyOpenTagIndex} -)`, propertyKeys);
198
198
  throw new DynamoBEError({
199
199
  message: `ERROR, missing closing tag from email template! (${propertyOpenTagIndex} -)`,
200
200
  userMessage: `We encountered an uncought BackEnd Email Service Error, please contact the responsible development team. errorcode: 701-114-200`,
@@ -211,7 +211,7 @@ export class DynamoBEEmailService {
211
211
  // console.log('\n\n\nTEST propertyKeys: ', propertyKeys);
212
212
  return propertyKeys;
213
213
  } catch (error) {
214
- DBE_Shared.logError(`\nDynamoBEEmailService ERROR, getTemplatePropertyKeys ERROR`, new Error(), '\ntemplate:\n', template);
214
+ DynamoNTS_Shared.logError(`\nDynamoBEEmailService ERROR, getTemplatePropertyKeys ERROR`, new Error(), '\ntemplate:\n', template);
215
215
  }
216
216
  }
217
217
  }
@@ -2,27 +2,27 @@
2
2
 
3
3
  import { Metadata, DynamoBEDataParams } 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,12 +32,12 @@ 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
@@ -48,19 +48,19 @@ export class DBE_Global_S extends DynamoBESingletonService {
48
48
  this.getInstance();
49
49
 
50
50
  try {
51
- this.instance.dbServiceCollection = new DynamoBEDBServiceCollection();
51
+ this.instance.dbServiceCollection = new DynamoNTS_DBServiceCollection();
52
52
  set.dbModels.forEach((dbModel: DynamoBEDataParams) => {
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: DynamoBEDataParams): 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!` +
@@ -2,47 +2,47 @@
2
2
  import { Router } from 'express';
3
3
  import { DynamoBEError } 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,10 +87,10 @@ 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) {
@@ -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,
@@ -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,
@@ -7,7 +7,7 @@ import { GeoIpLocation, D_Shared } from '@futdevpro/fsm-dynamo/shared-service';
7
7
  /**
8
8
  *
9
9
  */
10
- export class DBE_Shared extends D_Shared {
10
+ export class DynamoNTS_Shared extends D_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
- }