@futdevpro/nts-dynamo 1.5.50 → 1.5.52

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 (167) hide show
  1. package/lib/_models/dynamo-nts-endpoint-params.js +3 -2
  2. package/lib/_models/dynamo-nts-endpoint-params.js.map +1 -1
  3. package/lib/_services/dynamo-nts-api.service.d.ts +1 -0
  4. package/lib/_services/dynamo-nts-api.service.d.ts.map +1 -1
  5. package/lib/_services/dynamo-nts-api.service.js +6 -5
  6. package/lib/_services/dynamo-nts-api.service.js.map +1 -1
  7. package/lib/_services/dynamo-nts-app-extended.d.ts +87 -7
  8. package/lib/_services/dynamo-nts-app-extended.d.ts.map +1 -1
  9. package/lib/_services/dynamo-nts-app-extended.js +87 -7
  10. package/lib/_services/dynamo-nts-app-extended.js.map +1 -1
  11. package/lib/_services/dynamo-nts-app.d.ts +131 -22
  12. package/lib/_services/dynamo-nts-app.d.ts.map +1 -1
  13. package/lib/_services/dynamo-nts-app.js +104 -1
  14. package/lib/_services/dynamo-nts-app.js.map +1 -1
  15. package/lib/_services/dynamo-nts-auth.service.d.ts +79 -5
  16. package/lib/_services/dynamo-nts-auth.service.d.ts.map +1 -1
  17. package/lib/_services/dynamo-nts-auth.service.js +3 -2
  18. package/lib/_services/dynamo-nts-auth.service.js.map +1 -1
  19. package/lib/_services/dynamo-nts-data.service.d.ts +25 -1
  20. package/lib/_services/dynamo-nts-data.service.d.ts.map +1 -1
  21. package/lib/_services/dynamo-nts-data.service.js +98 -70
  22. package/lib/_services/dynamo-nts-data.service.js.map +1 -1
  23. package/lib/_services/dynamo-nts-db.service.d.ts +165 -119
  24. package/lib/_services/dynamo-nts-db.service.d.ts.map +1 -1
  25. package/lib/_services/dynamo-nts-db.service.js +348 -293
  26. package/lib/_services/dynamo-nts-db.service.js.map +1 -1
  27. package/lib/_services/dynamo-nts-email.service.d.ts +1 -0
  28. package/lib/_services/dynamo-nts-email.service.d.ts.map +1 -1
  29. package/lib/_services/dynamo-nts-email.service.js +5 -4
  30. package/lib/_services/dynamo-nts-email.service.js.map +1 -1
  31. package/lib/_services/dynamo-nts-routing-module.service.d.ts +40 -0
  32. package/lib/_services/dynamo-nts-routing-module.service.d.ts.map +1 -1
  33. package/lib/_services/dynamo-nts-routing-module.service.js +43 -3
  34. package/lib/_services/dynamo-nts-routing-module.service.js.map +1 -1
  35. package/lib/_services/dynamo-nts-socket.service.d.ts +1 -0
  36. package/lib/_services/dynamo-nts-socket.service.d.ts.map +1 -1
  37. package/lib/_services/dynamo-nts-socket.service.js +6 -2
  38. package/lib/_services/dynamo-nts-socket.service.js.map +1 -1
  39. package/lib/tsconfig.tsbuildinfo +1 -1
  40. package/package.json +16 -12
  41. package/src/_models/dynamo-nts-endpoint-params.ts +2 -2
  42. package/src/_services/dynamo-nts-api.service.ts +7 -5
  43. package/src/_services/dynamo-nts-app-extended.ts +87 -7
  44. package/src/_services/dynamo-nts-app.ts +131 -22
  45. package/src/_services/dynamo-nts-auth.service.ts +83 -7
  46. package/src/_services/dynamo-nts-data.service.ts +100 -71
  47. package/src/_services/dynamo-nts-db.service.ts +377 -297
  48. package/src/_services/dynamo-nts-email.service.ts +6 -4
  49. package/src/_services/dynamo-nts-routing-module.service.ts +44 -3
  50. package/src/_services/dynamo-nts-socket.service.ts +13 -7
  51. package/futdevpro-nts-dynamo-01.05.40.tgz +0 -0
  52. package/futdevpro-nts-dynamo-01.05.41.tgz +0 -0
  53. package/futdevpro-nts-dynamo-01.05.42.tgz +0 -0
  54. package/futdevpro-nts-dynamo-01.05.43.tgz +0 -0
  55. package/futdevpro-nts-dynamo-01.05.44.tgz +0 -0
  56. package/futdevpro-nts-dynamo-01.05.45.tgz +0 -0
  57. package/futdevpro-nts-dynamo-01.05.47.tgz +0 -0
  58. package/futdevpro-nts-dynamo-01.05.49.tgz +0 -0
  59. package/futdevpro-nts-dynamo-01.05.50.tgz +0 -0
  60. package/lib/_constants/dynamo-nts-global.settings.d.ts +0 -3
  61. package/lib/_constants/dynamo-nts-global.settings.d.ts.map +0 -1
  62. package/lib/_constants/dynamo-nts-global.settings.js +0 -18
  63. package/lib/_constants/dynamo-nts-global.settings.js.map +0 -1
  64. package/lib/_constants/dynamobe-global.settings.d.ts +0 -3
  65. package/lib/_constants/dynamobe-global.settings.d.ts.map +0 -1
  66. package/lib/_constants/dynamobe-global.settings.js +0 -13
  67. package/lib/_constants/dynamobe-global.settings.js.map +0 -1
  68. package/lib/_enums/dynamobe-data-service-function.enum.d.ts +0 -8
  69. package/lib/_enums/dynamobe-data-service-function.enum.d.ts.map +0 -1
  70. package/lib/_enums/dynamobe-data-service-function.enum.js +0 -15
  71. package/lib/_enums/dynamobe-data-service-function.enum.js.map +0 -1
  72. package/lib/_enums/dynamobe-route-security.enum.d.ts +0 -6
  73. package/lib/_enums/dynamobe-route-security.enum.d.ts.map +0 -1
  74. package/lib/_enums/dynamobe-route-security.enum.js +0 -10
  75. package/lib/_enums/dynamobe-route-security.enum.js.map +0 -1
  76. package/lib/_enums/log-style.enum.d.ts +0 -26
  77. package/lib/_enums/log-style.enum.d.ts.map +0 -1
  78. package/lib/_enums/log-style.enum.js +0 -30
  79. package/lib/_enums/log-style.enum.js.map +0 -1
  80. package/lib/_models/dynamo-module-settings.d.ts +0 -4
  81. package/lib/_models/dynamo-module-settings.d.ts.map +0 -1
  82. package/lib/_models/dynamo-module-settings.js +0 -10
  83. package/lib/_models/dynamo-module-settings.js.map +0 -1
  84. package/lib/_models/dynamo-nts-socket-module-settings.d.ts +0 -19
  85. package/lib/_models/dynamo-nts-socket-module-settings.d.ts.map +0 -1
  86. package/lib/_models/dynamo-nts-socket-module-settings.js +0 -27
  87. package/lib/_models/dynamo-nts-socket-module-settings.js.map +0 -1
  88. package/lib/_models/dynamobe-api-call-params.d.ts +0 -37
  89. package/lib/_models/dynamobe-api-call-params.d.ts.map +0 -1
  90. package/lib/_models/dynamobe-api-call-params.js +0 -29
  91. package/lib/_models/dynamobe-api-call-params.js.map +0 -1
  92. package/lib/_models/dynamobe-app-params.d.ts +0 -18
  93. package/lib/_models/dynamobe-app-params.d.ts.map +0 -1
  94. package/lib/_models/dynamobe-app-params.js +0 -17
  95. package/lib/_models/dynamobe-app-params.js.map +0 -1
  96. package/lib/_models/dynamobe-data-model-params.d.ts +0 -1
  97. package/lib/_models/dynamobe-data-model-params.d.ts.map +0 -1
  98. package/lib/_models/dynamobe-data-model-params.js +0 -25
  99. package/lib/_models/dynamobe-data-model-params.js.map +0 -1
  100. package/lib/_models/dynamobe-endpoint-params.d.ts +0 -46
  101. package/lib/_models/dynamobe-endpoint-params.d.ts.map +0 -1
  102. package/lib/_models/dynamobe-endpoint-params.js +0 -117
  103. package/lib/_models/dynamobe-endpoint-params.js.map +0 -1
  104. package/lib/_models/dynamobe-global-settings.d.ts +0 -13
  105. package/lib/_models/dynamobe-global-settings.d.ts.map +0 -1
  106. package/lib/_models/dynamobe-global-settings.js +0 -3
  107. package/lib/_models/dynamobe-global-settings.js.map +0 -1
  108. package/lib/_modules/data-models.index.d.ts +0 -3
  109. package/lib/_modules/data-models.index.d.ts.map +0 -1
  110. package/lib/_modules/data-models.index.js +0 -6
  111. package/lib/_modules/data-models.index.js.map +0 -1
  112. package/lib/_services/dynamobe-api.service.d.ts +0 -19
  113. package/lib/_services/dynamobe-api.service.d.ts.map +0 -1
  114. package/lib/_services/dynamobe-api.service.js +0 -167
  115. package/lib/_services/dynamobe-api.service.js.map +0 -1
  116. package/lib/_services/dynamobe-app.d.ts +0 -129
  117. package/lib/_services/dynamobe-app.d.ts.map +0 -1
  118. package/lib/_services/dynamobe-app.js +0 -238
  119. package/lib/_services/dynamobe-app.js.map +0 -1
  120. package/lib/_services/dynamobe-auth.service.d.ts +0 -54
  121. package/lib/_services/dynamobe-auth.service.d.ts.map +0 -1
  122. package/lib/_services/dynamobe-auth.service.js +0 -46
  123. package/lib/_services/dynamobe-auth.service.js.map +0 -1
  124. package/lib/_services/dynamobe-controller.service.d.ts +0 -14
  125. package/lib/_services/dynamobe-controller.service.d.ts.map +0 -1
  126. package/lib/_services/dynamobe-controller.service.js +0 -21
  127. package/lib/_services/dynamobe-controller.service.js.map +0 -1
  128. package/lib/_services/dynamobe-data.service.d.ts +0 -54
  129. package/lib/_services/dynamobe-data.service.d.ts.map +0 -1
  130. package/lib/_services/dynamobe-data.service.js +0 -301
  131. package/lib/_services/dynamobe-data.service.js.map +0 -1
  132. package/lib/_services/dynamobe-db-service-collection.service.d.ts +0 -9
  133. package/lib/_services/dynamobe-db-service-collection.service.d.ts.map +0 -1
  134. package/lib/_services/dynamobe-db-service-collection.service.js +0 -11
  135. package/lib/_services/dynamobe-db-service-collection.service.js.map +0 -1
  136. package/lib/_services/dynamobe-db.service.d.ts +0 -244
  137. package/lib/_services/dynamobe-db.service.d.ts.map +0 -1
  138. package/lib/_services/dynamobe-db.service.js +0 -759
  139. package/lib/_services/dynamobe-db.service.js.map +0 -1
  140. package/lib/_services/dynamobe-email-service-collection.service.d.ts +0 -19
  141. package/lib/_services/dynamobe-email-service-collection.service.d.ts.map +0 -1
  142. package/lib/_services/dynamobe-email-service-collection.service.js +0 -21
  143. package/lib/_services/dynamobe-email-service-collection.service.js.map +0 -1
  144. package/lib/_services/dynamobe-email.service.d.ts +0 -56
  145. package/lib/_services/dynamobe-email.service.d.ts.map +0 -1
  146. package/lib/_services/dynamobe-email.service.js +0 -194
  147. package/lib/_services/dynamobe-email.service.js.map +0 -1
  148. package/lib/_services/dynamobe-global.service.d.ts +0 -62
  149. package/lib/_services/dynamobe-global.service.d.ts.map +0 -1
  150. package/lib/_services/dynamobe-global.service.js +0 -107
  151. package/lib/_services/dynamobe-global.service.js.map +0 -1
  152. package/lib/_services/dynamobe-routing-module.service.d.ts +0 -42
  153. package/lib/_services/dynamobe-routing-module.service.d.ts.map +0 -1
  154. package/lib/_services/dynamobe-routing-module.service.js +0 -146
  155. package/lib/_services/dynamobe-routing-module.service.js.map +0 -1
  156. package/lib/_services/dynamobe-shared-be.service.d.ts +0 -8
  157. package/lib/_services/dynamobe-shared-be.service.d.ts.map +0 -1
  158. package/lib/_services/dynamobe-shared-be.service.js +0 -45
  159. package/lib/_services/dynamobe-shared-be.service.js.map +0 -1
  160. package/lib/_services/dynamobe-shared.service.d.ts +0 -26
  161. package/lib/_services/dynamobe-shared.service.d.ts.map +0 -1
  162. package/lib/_services/dynamobe-shared.service.js +0 -63
  163. package/lib/_services/dynamobe-shared.service.js.map +0 -1
  164. package/lib/_services/dynamobe-singleton.service.d.ts +0 -9
  165. package/lib/_services/dynamobe-singleton.service.d.ts.map +0 -1
  166. package/lib/_services/dynamobe-singleton.service.js +0 -19
  167. package/lib/_services/dynamobe-singleton.service.js.map +0 -1
@@ -1,46 +0,0 @@
1
- import { NextFunction, Request, Response } from 'express';
2
- import { HttpCallType } from '../_enums/http/http-call-type.enum';
3
- import { DynamoBERouteSecurity } from '../_enums/dynamobe-route-security.enum';
4
- /**
5
- *
6
- */
7
- export declare class DynamoBEEndpointParams {
8
- name: string;
9
- security: DynamoBERouteSecurity;
10
- type: HttpCallType;
11
- endpoint: string;
12
- pathParams: string[];
13
- preProcessess: ((req: Request, res: Response, next: NextFunction) => Promise<void>)[];
14
- tasks: ((req: Request, res: Response, issuer?: string) => Promise<void>)[];
15
- logRequest: boolean;
16
- logRequestsContent: boolean;
17
- logResponseContent: boolean;
18
- constructor(set: {
19
- name: string;
20
- security?: DynamoBERouteSecurity;
21
- type: HttpCallType;
22
- endpoint: string;
23
- preProcessess?: ((req: Request, res: Response, next: NextFunction) => Promise<void>)[];
24
- tasks: ((req: Request, res: Response, issuer?: string) => Promise<void>)[];
25
- logRequest?: boolean;
26
- logRequestsContent?: boolean;
27
- logResponseContent?: boolean;
28
- });
29
- /**
30
- *
31
- * @returns
32
- */
33
- getPreLog(): (req: Request, res: Response, next: NextFunction) => Promise<void>;
34
- /**
35
- *
36
- * @returns
37
- */
38
- getTasksExecution(): (req: Request, res: Response) => Promise<void>;
39
- /**
40
- *
41
- * @param res
42
- * @param error
43
- */
44
- error(res: Response, error: any): void;
45
- }
46
- //# sourceMappingURL=dynamobe-endpoint-params.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dynamobe-endpoint-params.d.ts","sourceRoot":"","sources":["../../src/_models/dynamobe-endpoint-params.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAK/E;;GAEG;AACH,qBAAa,sBAAsB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,qBAAqB,CAAC;IAEhC,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IAEjB,UAAU,EAAE,MAAM,EAAE,CAAC;IAErB,aAAa,EAAE,CAAC,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAA;IACrF,KAAK,EAAE,CAAC,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;IAE3E,UAAU,EAAE,OAAO,CAAC;IACpB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,kBAAkB,EAAE,OAAO,CAAC;gBAG1B,GAAG,EAAE;QACH,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,CAAC,EAAE,qBAAqB,CAAC;QAEjC,IAAI,EAAE,YAAY,CAAC;QACnB,QAAQ,EAAE,MAAM,CAAC;QAEjB,aAAa,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;QACvF,KAAK,EAAE,CAAC,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;QAE3E,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B,kBAAkB,CAAC,EAAE,OAAO,CAAC;KAC9B;IA+BH;;;OAGG;IACH,SAAS,IAAI,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC;IA8B/E;;;OAGG;IACH,iBAAiB,IAAI,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,KAAK,OAAO,CAAC,IAAI,CAAC;IAuBnE;;;;OAIG;IACH,KAAK,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,KAAA,GAAG,IAAI;CAclC"}
@@ -1,117 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DynamoBEEndpointParams = void 0;
4
- const tslib_1 = require("tslib");
5
- const dynamobe_shared_service_1 = require("../_services/dynamobe-shared.service");
6
- const dynamobe_global_service_1 = require("../_services/dynamobe-global.service");
7
- const _constants_1 = require("../_constants");
8
- /**
9
- *
10
- */
11
- class DynamoBEEndpointParams {
12
- constructor(set) {
13
- try {
14
- this.name = set.name ? set.name : set.endpoint;
15
- this.security = set.security ? set.security : _constants_1.dynamoBEGlobalSettings.defaultRouteSecurity;
16
- this.type = set.type;
17
- this.endpoint = set.endpoint;
18
- let pathParts = this.endpoint.split('/');
19
- pathParts = pathParts.filter((part) => part[0] === ':');
20
- pathParts = pathParts.map((part) => part = part.replace(':', ''));
21
- this.pathParams = pathParts;
22
- this.preProcessess = set.preProcessess ? set.preProcessess : [];
23
- this.tasks = set.tasks;
24
- this.logRequest = set.logRequest !== undefined ? set.logRequest : _constants_1.dynamoBEGlobalSettings.logRequests;
25
- this.logRequestsContent = set.logRequestsContent !== undefined ? set.logRequestsContent : _constants_1.dynamoBEGlobalSettings.logRequestsContent;
26
- this.logResponseContent = set.logResponseContent !== undefined ? set.logResponseContent : _constants_1.dynamoBEGlobalSettings.logResponseContent;
27
- if (this.logRequest) {
28
- this.preProcessess.unshift(this.getPreLog());
29
- }
30
- }
31
- catch (error) {
32
- dynamobe_shared_service_1.DBE_Shared.logError(`\nEndpoint params setup failed: ${set.name} (${set.security}): ${set.endpoint}`, error);
33
- throw error;
34
- }
35
- }
36
- /**
37
- *
38
- * @returns
39
- */
40
- getPreLog() {
41
- return (req, res, next) => tslib_1.__awaiter(this, void 0, void 0, function* () {
42
- try {
43
- if (this.logRequest) {
44
- if (this.logRequestsContent) {
45
- let inputs = '';
46
- for (let i = 0; i < this.pathParams.length; i++) {
47
- inputs += ` ${this.pathParams[i]}: ${req.params[this.pathParams[i]]}`;
48
- if (i + 1 < this.pathParams.length || req.body && req.body !== {}) {
49
- inputs += ',';
50
- }
51
- }
52
- if (req.body && 0 < Object.keys(req.body).length) {
53
- console.log(`==> incoming ${this.name} request...${inputs} body:`, req.body);
54
- }
55
- else {
56
- console.log(`==> incoming ${this.name} request...${inputs}`);
57
- }
58
- }
59
- else {
60
- console.log(`==> incoming ${this.name} request...`);
61
- }
62
- }
63
- next();
64
- }
65
- catch (error) {
66
- this.error(res, error);
67
- }
68
- });
69
- }
70
- /**
71
- *
72
- * @returns
73
- */
74
- getTasksExecution() {
75
- return (req, res) => tslib_1.__awaiter(this, void 0, void 0, function* () {
76
- try {
77
- const issuer = dynamobe_global_service_1.DBE_Global_S.getAuthService().getAccountIdFromRequest(req);
78
- for (let i = 0; i < this.tasks.length; i++) {
79
- yield this.tasks[i](req, res, issuer);
80
- }
81
- if (this.logRequest) {
82
- if (this.logResponseContent) {
83
- dynamobe_shared_service_1.DBE_Shared.logSuccess(` <<<===== ${this.name} result sent.`);
84
- dynamobe_shared_service_1.DBE_Shared.logSuccess('sorry, the logResponseContent is not implemented yet.');
85
- }
86
- else {
87
- dynamobe_shared_service_1.DBE_Shared.logSuccess(` <<<===== ${this.name} result sent.`);
88
- }
89
- }
90
- }
91
- catch (error) {
92
- this.error(res, error);
93
- }
94
- });
95
- }
96
- /**
97
- *
98
- * @param res
99
- * @param error
100
- */
101
- error(res, error) {
102
- dynamobe_shared_service_1.DBE_Shared.logError(`${this.name} ERROR`, error, '\n');
103
- res.status(error.status ? error.status : 501);
104
- res.send(error);
105
- if (this.logRequest) {
106
- if (this.logResponseContent) {
107
- dynamobe_shared_service_1.DBE_Shared.logError(` <<<===== ${this.name} error sent.`);
108
- dynamobe_shared_service_1.DBE_Shared.logError('sorry, the logResponseContent is not implemented yet.');
109
- }
110
- else {
111
- dynamobe_shared_service_1.DBE_Shared.logError(` <<<===== ${this.name} error sent.`);
112
- }
113
- }
114
- }
115
- }
116
- exports.DynamoBEEndpointParams = DynamoBEEndpointParams;
117
- //# sourceMappingURL=dynamobe-endpoint-params.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dynamobe-endpoint-params.js","sourceRoot":"","sources":["../../src/_models/dynamobe-endpoint-params.ts"],"names":[],"mappings":";;;;AAMA,kFAAkE;AAClE,kFAAoE;AACpE,8CAAuD;AAEvD;;GAEG;AACH,MAAa,sBAAsB;IAgBjC,YACE,GAaC;QAED,IAAI;YACF,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC;YAC/C,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,mCAAsB,CAAC,oBAAoB,CAAC;YAE1F,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;YACrB,IAAI,CA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AAG,CAAC,CAAC;QAC9C,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAEhB,IAAI,IAAI,CAAC,UAAU,EAAE;YACnB,IAAI,IAAI,CAAC,kBAAkB,EAAE;gBAC3B,oCAAU,CAAC,QAAQ,CAAC,gBAAgB,IAAI,CAAC,IAAI,cAAc,CAAC,CAAC;gBAC7D,oCAAU,CAAC,QAAQ,CAAC,uDAAuD,CAAC,CAAC;aAC9E;iBAAM;gBACL,oCAAU,CAAC,QAAQ,CAAC,gBAAgB,IAAI,CAAC,IAAI,cAAc,CAAC,CAAC;aAC9D;SACF;IACH,CAAC;CACF;AA7ID,wDA6IC"}
@@ -1,13 +0,0 @@
1
- import { DynamoBERouteSecurity } from '../_enums/dynamobe-route-security.enum';
2
- /**
3
- *
4
- */
5
- export interface DynamoBEGlobalSettings {
6
- baseUrl: string;
7
- defaultRouteSecurity: DynamoBERouteSecurity;
8
- logSetup?: boolean;
9
- logRequests?: boolean;
10
- logRequestsContent?: boolean;
11
- logResponseContent?: boolean;
12
- }
13
- //# sourceMappingURL=dynamobe-global-settings.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dynamobe-global-settings.d.ts","sourceRoot":"","sources":["../../src/_models/dynamobe-global-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAE/E;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,oBAAoB,EAAE,qBAAqB,CAAC;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=dynamobe-global-settings.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dynamobe-global-settings.js","sourceRoot":"","sources":["../../src/_models/dynamobe-global-settings.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- export * from '../_models/fullstack/data-models/metadata';
2
- export * from '../_models/fullstack/control-models/dynamobe-data-params';
3
- //# sourceMappingURL=data-models.index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"data-models.index.d.ts","sourceRoot":"","sources":["../../src/_modules/data-models.index.ts"],"names":[],"mappings":"AACA,cAAc,2CAA2C,CAAC;AAC1D,cAAc,0DAA0D,CAAC"}
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("../_models/fullstack/data-models/metadata"), exports);
5
- tslib_1.__exportStar(require("../_models/fullstack/control-models/dynamobe-data-params"), exports);
6
- //# sourceMappingURL=data-models.index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"data-models.index.js","sourceRoot":"","sources":["../../src/_modules/data-models.index.ts"],"names":[],"mappings":";;;AACA,oFAA0D;AAC1D,mGAAyE"}
@@ -1,19 +0,0 @@
1
- import { DynamoBEApiCallParams } from '../_models/dynamobe-api-call-params';
2
- /**
3
- *
4
- */
5
- export declare class DynamoBEApiService {
6
- /**
7
- *
8
- * @param callParams
9
- * @param inputParams
10
- * @returns
11
- */
12
- static startApiCall<T>(callParams: DynamoBEApiCallParams, inputParams?: {
13
- pathParams?: {
14
- [param: string]: string;
15
- };
16
- body?: any;
17
- }): Promise<any>;
18
- }
19
- //# sourceMappingURL=dynamobe-api.service.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dynamobe-api.service.d.ts","sourceRoot":"","sources":["../../src/_services/dynamobe-api.service.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAG5E;;GAEG;AACH,qBAAa,kBAAkB;IAE3B;;;;;OAKG;WACe,YAAY,CAAC,CAAC,EAChC,UAAU,EAAE,qBAAqB,EACjC,WAAW,CAAC,EAAE;QACZ,UAAU,CAAC,EAAE;YACX,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;SACxB,CAAC;QAEF,IAAI,CAAC,EAAE,GAAG,CAAA;KACX,GACA,OAAO,CAAC,GAAG,CAAC;CA0IhB"}
@@ -1,167 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DynamoBEApiService = void 0;
4
- const tslib_1 = require("tslib");
5
- const Axios = tslib_1.__importStar(require("axios"));
6
- const fsm_dynamo_1 = require("@futdevpro/fsm-dynamo");
7
- const http_call_type_enum_1 = require("../_enums/http/http-call-type.enum");
8
- const http_response_type_enum_1 = require("../_enums/http/http-response-type.enum");
9
- const dynamobe_shared_service_1 = require("./dynamobe-shared.service");
10
- /**
11
- *
12
- */
13
- class DynamoBEApiService {
14
- /**
15
- *
16
- * @param callParams
17
- * @param inputParams
18
- * @returns
19
- */
20
- static startApiCall(callParams, inputParams) {
21
- var _a, _b, _c, _d;
22
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
23
- try {
24
- let a;
25
- let url = callParams.baseUrl + callParams.endPoint;
26
- const privateAxiosInstance = Axios.default.create();
27
- if ((_a = callParams === null || callParams === void 0 ? void 0 : callParams.httpOptions) === null || _a === void 0 ? void 0 : _a.headers) {
28
- for (const headerKey in callParams.httpOptions.headers) {
29
- if (callParams.httpOptions.headers[headerKey]) {
30
- privateAxiosInstance.defaults.headers.common[headerKey] = callParams.httpOptions.headers[headerKey];
31
- }
32
- else {
33
- dynamobe_shared_service_1.DBE_Shared.logError('DYNAMOBE ERROR: \n missing header:', headerKey, '\n\n', new Error());
34
- }
35
- }
36
- }
37
- if (inputParams === null || inputParams === void 0 ? void 0 : inputParams.pathParams) {
38
- for (const pathParamKey in inputParams.pathParams) {
39
- if (inputParams.pathParams[pathParamKey]) {
40
- const paramType = typeof inputParams.pathParams[pathParamKey];
41
- switch (paramType) {
42
- case 'number':
43
- url = url.replace(`:${pathParamKey}`, inputParams.pathParams[pathParamKey].toString());
44
- break;
45
- case 'string':
46
- url = url.replace(`:${pathParamKey}`, inputParams.pathParams[pathParamKey]);
47
- break;
48
- default:
49
- dynamobe_shared_service_1.DBE_Shared.logError(`DYNAMOBE ERROR: \n wrong path param type: (${pathParamKey}): ${paramType} \n${inputParams.pathParams[pathParamKey]}\nMUST BE string or number\n\n`, new Error());
50
- break;
51
- }
52
- }
53
- else {
54
- dynamobe_shared_service_1.DBE_Shared.logError('DYNAMOBE ERROR: \n missing pathParam:', pathParamKey, '\n\n', new Error());
55
- }
56
- }
57
- }
58
- /* if (inputParams?.queryParams) {
59
- const httpParams = new HttpParams();
60
- for (const queryParamKey in inputParams.queryParams) {
61
- if (inputParams.queryParams[queryParamKey]) {
62
- switch (typeof inputParams.queryParams[queryParamKey]) {
63
- case 'number':
64
- httpParams.set(queryParamKey, inputParams.queryParams[queryParamKey].toString());
65
- break;
66
- case 'string':
67
- httpParams.set(queryParamKey, inputParams.queryParams[queryParamKey]);
68
- break;
69
- default:
70
- console.error('DYNAMOBE ERROR: \n wrong query param type', '\n\n', new Error());
71
- break;
72
- }
73
- }
74
- }
75
- callParams.httpOptions.params = httpParams;
76
- } */
77
- switch (callParams.type) {
78
- case http_call_type_enum_1.HttpCallType.get:
79
- if (inputParams === null || inputParams === void 0 ? void 0 : inputParams.body) {
80
- console.log('WARNING you cant send body in get calls');
81
- }
82
- yield privateAxiosInstance.get(url, callParams.httpOptions).then((res) => {
83
- if (callParams.getFullResponse) {
84
- a = res;
85
- }
86
- else {
87
- a = res.data;
88
- }
89
- console.log(`${callParams.name} was successful`, res.data);
90
- });
91
- break;
92
- case http_call_type_enum_1.HttpCallType.delete:
93
- if (inputParams === null || inputParams === void 0 ? void 0 : inputParams.body) {
94
- console.log('WARNING you cant send body in delete calls');
95
- }
96
- yield privateAxiosInstance.delete(url, callParams.httpOptions).then((res) => {
97
- if (callParams.getFullResponse) {
98
- a = res;
99
- }
100
- console.log(`${callParams.name} was successful`, res.data);
101
- });
102
- break;
103
- case http_call_type_enum_1.HttpCallType.post:
104
- case http_call_type_enum_1.HttpCallType.put:
105
- case http_call_type_enum_1.HttpCallType.patch:
106
- if (!(inputParams === null || inputParams === void 0 ? void 0 : inputParams.body)) {
107
- if (!inputParams) {
108
- inputParams = {};
109
- }
110
- inputParams.body = {};
111
- }
112
- yield privateAxiosInstance[callParams.type](url, inputParams.body, callParams.httpOptions).then((res) => {
113
- if (callParams.getFullResponse) {
114
- a = res;
115
- }
116
- else {
117
- a = res.data;
118
- }
119
- console.log(`${callParams.name} api call was successful`, res.data);
120
- });
121
- break;
122
- default:
123
- dynamobe_shared_service_1.DBE_Shared.logError('DYNAMOBE ERROR: \n wrong api call type', '\n\n', new Error());
124
- break;
125
- }
126
- if (callParams.getFullResponse) {
127
- return a;
128
- }
129
- else {
130
- return a;
131
- }
132
- }
133
- catch (error) {
134
- dynamobe_shared_service_1.DBE_Shared.logError(`\nAPI ERRROR: ${callParams === null || callParams === void 0 ? void 0 : callParams.name} failed...` +
135
- `\n${callParams === null || callParams === void 0 ? void 0 : callParams.baseUrl}${callParams === null || callParams === void 0 ? void 0 : callParams.endPoint}`);
136
- if (((_b = callParams === null || callParams === void 0 ? void 0 : callParams.httpOptions) === null || _b === void 0 ? void 0 : _b.responseType) === http_response_type_enum_1.HttpResponseType.text) {
137
- error.error = JSON.parse(error.error);
138
- }
139
- if (((_d = (_c = error === null || error === void 0 ? void 0 : error.response) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.flag) === 'DYNAMO-BE ERROR OBJECT') {
140
- dynamobe_shared_service_1.DBE_Shared.logError(`\n${callParams.name} was UNSUCCESSFUL\n\n`, new Error());
141
- throw new fsm_dynamo_1.DynamoBEError(error.response.data);
142
- }
143
- else if (error.code === 'ENOTFOUND') {
144
- dynamobe_shared_service_1.DBE_Shared.logError(`\n${callParams.name} was UNSUCCESSFUL\n\n`, new Error());
145
- throw new fsm_dynamo_1.DynamoBEError({
146
- status: 404, message: 'DNS error; address cannot be resolved!',
147
- userMessage: `We encountered a BackEnd API Error, please contact the responsible development team. \nerrorCode: 965-453-300`,
148
- error: error
149
- });
150
- }
151
- else if (error.config && error.message) {
152
- throw new fsm_dynamo_1.DynamoBEError({
153
- status: +error.message.substring(error.message.length - 4, 3),
154
- userMessage: `We encountered a BackEnd API Error, please contact the responsible development team. \nerrorCode: 965-453-303`,
155
- error: error
156
- });
157
- }
158
- else {
159
- dynamobe_shared_service_1.DBE_Shared.logError(`\n${callParams.name} was UNSUCCESSFUL`, error, '\n\n', new Error());
160
- throw error;
161
- }
162
- }
163
- });
164
- }
165
- }
166
- exports.DynamoBEApiService = DynamoBEApiService;
167
- //# sourceMappingURL=dynamobe-api.service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dynamobe-api.service.js","sourceRoot":"","sources":["../../src/_services/dynamobe-api.service.ts"],"names":[],"mappings":";;;;AACA,qDAA+B;AAC/B,sDAAsD;AAEtD,4EAAkE;AAClE,oFAA0E;AAE1E,uEAAuD;AAEvD;;GAEG;AACH,MAAa,kBAAkB;IAE3B;;;;;OAKG;IACE,MAAM,CAAO,YAAY,CAC9B,UAAiC,EACjC,WAMC;;;YAED,IAAI;gBACA,IAAI,CAAM,CAAC;gBACX,IAAI,GAAG,GAAW,UAAU,CAAC,OAAO,GAAG,UAAU,CAAC,QAAQ,CAAC;gBAC3D,MAAM,oBAAoB,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC;gBAEpD,UAAI,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,WAAW,0CAAE,OAAO,EAAE;oBAClC,KAAK,MAAM,SAAS,IAAI,UAAU,CAAC,WAAW,CAAC,OAAO,EAAE;wBACpD,IAAI,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;4BAC3C,oBAAoB,CAAC,QAAQ,CAAC,OAAO,CAAC,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AAI,0CAAE,IAAI,MAAK,wBAAwB,EAAE;oBAC1D,oCAAU,CAAC,QAAQ,CAAC,KAAK,UAAU,CAAC,IAAI,uBAAuB,EAAE,IAAI,KAAK,EAAE,CAAC,CAAC;oBAC9E,MAAM,IAAI,0BAAa,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;iBAChD;qBAAM,IAAI,KAAK,CAAC,IAAI,KAAK,WAAW,EAAE;oBACnC,oCAAU,CAAC,QAAQ,CAAC,KAAK,UAAU,CAAC,IAAI,uBAAuB,EAAE,IAAI,KAAK,EAAE,CAAC,CAAC;oBAC9E,MAAM,IAAI,0BAAa,CAAC;wBACpB,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,wCAAwC;wBAC9D,WAAW,EAAE,6GAA6G;wBAC1H,KAAK,EAAE,KAAK;qBACf,CAAC,CAAC;iBACN;qBAAM,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,OAAO,EAAE;oBACtC,MAAM,IAAI,0BAAa,CAAC;wBACpB,MAAM,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,CAAC;wBAC7D,WAAW,EAAE,6GAA6G;wBAC1H,KAAK,EAAE,KAAK;qBACf,CAAC,CAAC;iBACN;qBAAM;oBACH,oCAAU,CAAC,QAAQ,CAAC,KAAK,UAAU,CAAC,IAAI,mBAAmB,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,KAAK,EAAE,CAAC,CAAC;oBACzF,MAAM,KAAK,CAAC;iBACf;aACJ;;KACF;CACF;AA3JD,gDA2JC"}
@@ -1,129 +0,0 @@
1
- /// <reference types="node" />
2
- import { DynamoBEAppParams } from '../_models/dynamobe-app-params';
3
- import Mongoose = require("mongoose");
4
- import * as FileSystem from 'fs';
5
- import { DynamoBESingletonService } from './dynamobe-singleton.service';
6
- import { DynamoBERouteSecurity } from '../_enums/dynamobe-route-security.enum';
7
- import { DynamoBERoutingModule } from './dynamobe-routing-module.service';
8
- /**
9
- * This will be the main service of our server project,
10
- * follow the types and type instructions while setting up your project
11
- *
12
- * In this service, there are abstract functions that you will need to implement,
13
- * where you need to set up the main params for your application.
14
- */
15
- export declare abstract class DynamoBEApp extends DynamoBESingletonService {
16
- protected params: DynamoBEAppParams;
17
- protected mongoose: typeof Mongoose;
18
- protected security: DynamoBERouteSecurity;
19
- protected httpPort?: number;
20
- protected httpsPort?: number;
21
- protected cert?: {
22
- keyPath: FileSystem.PathLike;
23
- certPath: FileSystem.PathLike;
24
- };
25
- private secureExpress;
26
- private httpsServer;
27
- private openExpress;
28
- protected routingModules: DynamoBERoutingModule[];
29
- protected log: boolean;
30
- constructor();
31
- /**
32
- *
33
- */
34
- private startDB;
35
- /**
36
- *
37
- */
38
- private initExpresses;
39
- /**
40
- *
41
- */
42
- private initOpenExpress;
43
- /**
44
- *
45
- */
46
- private initSecureExpress;
47
- /**
48
- *
49
- */
50
- private startExpresses;
51
- /**
52
- *
53
- */
54
- private mountSecureRoutes;
55
- /**
56
- *
57
- */
58
- private mountOpenRoutes;
59
- /**
60
- *
61
- */
62
- private setSecurity;
63
- /**
64
- * You must setup app params in this function like this:
65
- *
66
- * @example
67
- * this.params = new DynamoBEAppParams({
68
- * name: 'Sample Server',
69
- * title: 'A BIG nice header that will be logged on start',
70
- * version: version,
71
- * dbName: 'sampleapp',
72
- * });
73
- */
74
- abstract setupAppParams(): void;
75
- /**
76
- * You must setup globalServiceCollection and dbServices in this function
77
- *
78
- * @example
79
- * DBE_Global_S.setServices({
80
- * authService: AuthService.getInstance(),
81
- * emailServiceCollection: EmailServiceCollectionService.getInstance(),
82
- * dbModels: [
83
- * accountModelParams,
84
- * projectModelParams,
85
- * ...
86
- * ]
87
- * });
88
- *
89
- * DBE_Global_S.setGlobalSettings({
90
- * defaultRouteSecurity: DynamoBERouteSecurity.secure,
91
- * logSetup: true,
92
- * });
93
- *
94
- */
95
- abstract setGlobalServiceCollection(): void;
96
- /**
97
- * You must setup endpoints and required services in this function
98
- *
99
- * @example
100
- * this.httpPort = env.httpPort;
101
- * this.httpsPort = env.httpsPort;
102
-
103
- * this.cert = {
104
- * keyPath: Path.join(__dirname, './_assets/cert/ucc.key'),
105
- * certPath: Path.join(__dirname, './_assets/cert/ucc.crt'),
106
- * };
107
-
108
- * this.routingModules = [
109
- * new DynamoBERountingModule({
110
- * route: '/api/account',
111
- * controllers: [
112
- * AccountController.getInstance(),
113
- * PersonalInformationController.getInstance(),
114
- * ...
115
- * ]
116
- * }),
117
- * new DynamoBERountingModule({
118
- * route: '/api/project',
119
- * controllers: [
120
- * ProjectController.getInstance(),
121
- * ProjectExtensionController.getInstance(),
122
- * ]
123
- * }),
124
- * ...
125
- * ];
126
- */
127
- abstract setupRoutingModules(): void;
128
- }
129
- //# sourceMappingURL=dynamobe-app.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dynamobe-app.d.ts","sourceRoot":"","sources":["../../src/_services/dynamobe-app.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,QAAQ,GAAG,QAAQ,UAAU,CAAC,CAAC;AAGtC,OAAO,KAAK,UAAU,MAAM,IAAI,CAAC;AAIjC,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAI1E;;;;;;GAMG;AACH,8BAAsB,WAAY,SAAQ,wBAAwB;IAEhE,SAAS,CAAC,MAAM,EAAE,iBAAiB,CAAC;IAEpC,SAAS,CAAC,QAAQ,kBAAY;IAE9B,SAAS,CAAC,QAAQ,EAAE,qBAAqB,CAAC;IAE1C,SAAS,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,SAAS,CAAC,EAAE,MAAM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