exodus-framework 2.0.953 → 2.0.955

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 (114) hide show
  1. package/lib/app/settings.d.ts.map +1 -1
  2. package/lib/contracts/settings.d.ts +1 -2
  3. package/lib/contracts/settings.d.ts.map +1 -1
  4. package/lib/services/database.d.ts +2 -0
  5. package/lib/services/database.d.ts.map +1 -1
  6. package/lib/services/sequelize.d.ts +0 -1
  7. package/lib/services/sequelize.d.ts.map +1 -1
  8. package/lib/utils/database.d.ts +1 -2
  9. package/lib/utils/database.d.ts.map +1 -1
  10. package/package.json +1 -1
  11. package/lib/app/classes/broadcast.js +0 -79
  12. package/lib/app/classes/cache.js +0 -94
  13. package/lib/app/classes/communication.js +0 -99
  14. package/lib/app/classes/communicationcontext.js +0 -1
  15. package/lib/app/classes/event.js +0 -94
  16. package/lib/app/classes/index.js +0 -105
  17. package/lib/app/classes/managed.js +0 -145
  18. package/lib/app/classes/service.js +0 -232
  19. package/lib/app/classes/servicemodel.js +0 -22
  20. package/lib/app/classes/singleton.js +0 -26
  21. package/lib/app/classes/socket/clienthandler.js +0 -54
  22. package/lib/app/classes/socket/eventhandler.js +0 -51
  23. package/lib/app/classes/socket/index.js +0 -20
  24. package/lib/app/classes/system.js +0 -49
  25. package/lib/app/controller.js +0 -97
  26. package/lib/app/core.js +0 -47
  27. package/lib/app/error.js +0 -66
  28. package/lib/app/exodus.js +0 -97
  29. package/lib/app/index.js +0 -68
  30. package/lib/app/settings.js +0 -162
  31. package/lib/certificates/private_key.pem +0 -27
  32. package/lib/certificates/public_key.pem +0 -9
  33. package/lib/contracts/communication/communication.js +0 -39
  34. package/lib/contracts/communication/index.js +0 -27
  35. package/lib/contracts/communication/operation.js +0 -5
  36. package/lib/contracts/console.js +0 -5
  37. package/lib/contracts/contansts.js +0 -13
  38. package/lib/contracts/core.js +0 -12
  39. package/lib/contracts/entity.js +0 -5
  40. package/lib/contracts/http.js +0 -52
  41. package/lib/contracts/index.js +0 -104
  42. package/lib/contracts/messaging.js +0 -50
  43. package/lib/contracts/security.js +0 -5
  44. package/lib/contracts/service.js +0 -11
  45. package/lib/contracts/session.js +0 -5
  46. package/lib/contracts/settings.js +0 -5
  47. package/lib/contracts/singleton.js +0 -5
  48. package/lib/contracts/socket.js +0 -11
  49. package/lib/contracts/tasks.js +0 -1
  50. package/lib/controllers/api/file.js +0 -24
  51. package/lib/controllers/api/index.js +0 -13
  52. package/lib/controllers/api/log.js +0 -55
  53. package/lib/controllers/api/report.js +0 -55
  54. package/lib/controllers/index.js +0 -16
  55. package/lib/controllers/messaging/application.js +0 -75
  56. package/lib/controllers/messaging/database.js +0 -64
  57. package/lib/controllers/messaging/environment.js +0 -111
  58. package/lib/express.d.js +0 -5
  59. package/lib/index.js +0 -104
  60. package/lib/middlewares/access.js +0 -114
  61. package/lib/middlewares/authentication.js +0 -104
  62. package/lib/middlewares/file.js +0 -41
  63. package/lib/middlewares/index.js +0 -36
  64. package/lib/models/Application.js +0 -65
  65. package/lib/models/DatabaseHost.js +0 -62
  66. package/lib/models/EnvConnection.js +0 -41
  67. package/lib/models/Log.js +0 -67
  68. package/lib/models/Report.js +0 -65
  69. package/lib/models/System.js +0 -54
  70. package/lib/models/index.js +0 -82
  71. package/lib/routes/api/index.js +0 -16
  72. package/lib/routes/api/v1/index.js +0 -38
  73. package/lib/routes/api/v1/logs.js +0 -19
  74. package/lib/routes/api/v1/report.js +0 -19
  75. package/lib/routes/api/v1/sse.js +0 -36
  76. package/lib/routes/index.js +0 -27
  77. package/lib/routes/messaging/index.js +0 -34
  78. package/lib/services/database.js +0 -115
  79. package/lib/services/ecosystem.js +0 -46
  80. package/lib/services/express.js +0 -162
  81. package/lib/services/file.js +0 -65
  82. package/lib/services/file_new.js +0 -136
  83. package/lib/services/index.js +0 -108
  84. package/lib/services/log.js +0 -26
  85. package/lib/services/rabitmq.js +0 -187
  86. package/lib/services/redis.js +0 -84
  87. package/lib/services/security.js +0 -231
  88. package/lib/services/sequelize.js +0 -323
  89. package/lib/services/socket.js +0 -123
  90. package/lib/services/task/TaskServiceBase.js +0 -17
  91. package/lib/services/task/index.js +0 -40
  92. package/lib/services/task/queue/QueueService.js +0 -48
  93. package/lib/services/task/queue/QueueTask.js +0 -134
  94. package/lib/services/task/queue/SingleQueue.js +0 -68
  95. package/lib/services/task/queue/index.js +0 -27
  96. package/lib/services/task/scheduler/SchedulerService.js +0 -31
  97. package/lib/services/task/scheduler/SchedulerTask.js +0 -211
  98. package/lib/services/task/scheduler/index.js +0 -20
  99. package/lib/services/test.js +0 -27
  100. package/lib/socket.d.js +0 -3
  101. package/lib/tasks/index.js +0 -27
  102. package/lib/tasks/queue/application.js +0 -44
  103. package/lib/tasks/queue/environment.js +0 -92
  104. package/lib/tasks/queue/index.js +0 -20
  105. package/lib/tasks/queue/teste.js +0 -21
  106. package/lib/tasks/schedule/index.js +0 -13
  107. package/lib/tasks/schedule/restart.js +0 -19
  108. package/lib/tasks/schedule/teste.js +0 -61
  109. package/lib/utils/api.js +0 -65
  110. package/lib/utils/database.js +0 -155
  111. package/lib/utils/date.js +0 -28
  112. package/lib/utils/index.js +0 -60
  113. package/lib/utils/logger.js +0 -51
  114. package/lib/utils/session.js +0 -23
package/lib/app/core.js DELETED
@@ -1,47 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var fs = _interopRequireWildcard(require("fs"));
8
- var _path = _interopRequireDefault(require("path"));
9
- var _settings = _interopRequireDefault(require("./settings"));
10
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
12
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
13
- /**
14
- * Class base responsável pelo gerênciamento RUNTIME da aplicação
15
- * controle de cache, uso de memoria e gerênciamento de dados locais
16
- *
17
- * Todas as classes devem herdar esta classe para um gerênciamento completo
18
- *
19
- * @abstract
20
- * @class Core
21
- */
22
- class Core {
23
- static settings = new _settings.default();
24
-
25
- //# System info
26
- static getVersion() {
27
- try {
28
- const packageJson = fs.readFileSync(_path.default.resolve(__dirname, '../../package.json'), 'utf8');
29
- const packageData = JSON.parse(packageJson);
30
- return packageData.version;
31
- } catch (error) {
32
- console.error('Error reading package.json:', error);
33
- return undefined;
34
- }
35
- }
36
-
37
- //#Setters
38
- static setSettings(settings) {
39
- this.settings = settings;
40
- }
41
-
42
- //#Getters
43
- static getSettings() {
44
- return this.settings;
45
- }
46
- }
47
- var _default = exports.default = Core;
package/lib/app/error.js DELETED
@@ -1,66 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.HttpError = exports.ErrorHandler = void 0;
7
- var _contracts = require("../contracts");
8
- var _utils = require("../utils");
9
- var _managed = _interopRequireDefault(require("./classes/managed"));
10
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
- class ErrorHandler extends _managed.default {
12
- message;
13
- error;
14
- caller;
15
- constructor(message, error) {
16
- super();
17
- this.message = message;
18
- this.error = error;
19
- this.caller = this.getCallerClassName();
20
- this.handle();
21
- }
22
- handle() {
23
- this.register();
24
- }
25
- register() {
26
- const message = this.caller && this.caller != 'L' ? `[${this.caller}]->${this.message}` : this.message;
27
- this.log(`${message}`, 'danger');
28
- (0, _utils.logger)().error(this.error);
29
- }
30
- getCallerClassName() {
31
- const err = new Error();
32
- const stackLines = err.stack?.split('\n') || [];
33
- if (stackLines.length >= 4) {
34
- const callerLine = stackLines[3].trim();
35
- // Extraindo o nome da função/classe
36
- const match = callerLine.match(/at (\w+)/);
37
- if (match && match[1]) {
38
- return match[1];
39
- }
40
- }
41
- return null;
42
- }
43
- }
44
- exports.ErrorHandler = ErrorHandler;
45
- class HttpError extends _managed.default {
46
- message;
47
- statusCode;
48
- level;
49
- data;
50
- error;
51
- constructor(data) {
52
- super();
53
- this.message = data.message;
54
- this.statusCode = data.statusCode || _contracts.EHttpResponseCode.iternalErro;
55
- this.level = data.level || 'error';
56
- this.data = data.data;
57
- this.error = data.error;
58
- this.handle();
59
- }
60
- handle() {
61
- (0, _utils.logger)().warn(this.message, this.statusCode);
62
- (0, _utils.logger)().warn(this.data);
63
- this.error && (0, _utils.logger)().error(this.error);
64
- }
65
- }
66
- exports.HttpError = HttpError;
package/lib/app/exodus.js DELETED
@@ -1,97 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _cluster = _interopRequireDefault(require("cluster"));
8
- var _ = require(".");
9
- var _managed = _interopRequireDefault(require("./classes/managed"));
10
- var _core = _interopRequireDefault(require("./core"));
11
- var _event = _interopRequireDefault(require("./classes/event"));
12
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
- /**
14
- * Classe da aplicação principal
15
- * Responsável por inicializar todos os recursos usados por este micro-serviço
16
- *
17
- * @class Exodus
18
- * @extends {Core}
19
- */
20
- class Exodus extends _managed.default {
21
- services;
22
- constructor(settings) {
23
- super();
24
- _core.default.setSettings(settings);
25
- this.services = [];
26
- }
27
- async start() {
28
- _event.default.Start();
29
- if (this.isMaster()) {
30
- this.log(`Iniciando em Master ${process.pid}`);
31
- if (await this.initServices()) {
32
- await Promise.all(this.services.map(async s => {
33
- !s.isStartFailed() && (await s.onExodusStarted());
34
- }));
35
- this.createClusters();
36
- }
37
- }
38
- if (this.isCluster()) {
39
- this.log(`Iniciando em Cluster ${this.getWorkId()}`);
40
- if (await this.initServices()) {
41
- this.services.forEach(s => s.onExodusStarted());
42
- }
43
- }
44
- }
45
-
46
- //# Cluster Management
47
- createClusters() {
48
- for (let i = 0; i < _core.default.settings.getAppication().clusters; i++) {
49
- _cluster.default.fork();
50
- }
51
- _event.default.registerClusterExitHandle((_code, worker) => {
52
- this.log(`Cluster ${worker.process.pid} foi encerrado`, 'warning');
53
- if (_core.default.settings.getAppication().clustersRestarts) {
54
- this.log(`Reiniciando cluster`, 'warning');
55
- _cluster.default.fork();
56
- }
57
- });
58
- }
59
-
60
- //# Service Management
61
- register(service) {
62
- this.services.push(service.getService());
63
- }
64
- async initServices() {
65
- for (const service of this.services) {
66
- try {
67
- await this.startService(service);
68
- } catch (error) {
69
- new _.ErrorHandler(`Erro on starting service: ${service.constructor.name} | reason: ${error.message || 'unknow'}`, error);
70
- this.log('Não foi possível iniciar os serviços', 'warning');
71
- return false;
72
- }
73
- }
74
- this.log('Serviços iniciados');
75
- return true;
76
- }
77
- async startService(service) {
78
- let starting = true;
79
- await service.onServiceInit();
80
- while (starting) {
81
- if (service.isStartFailed()) {
82
- await service.onStartFail();
83
- starting = false;
84
- break;
85
- }
86
- if (await service.onStart()) {
87
- starting = false;
88
- await service.onStartSuccessfully();
89
- break;
90
- } else {
91
- await service.onStartAttempt();
92
- }
93
- await new Promise(resolve => setTimeout(() => resolve(true), service.getAttemptDelay()));
94
- }
95
- }
96
- }
97
- var _default = exports.default = Exodus;
package/lib/app/index.js DELETED
@@ -1,68 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _exportNames = {
7
- Exodus: true,
8
- Core: true,
9
- CoreSettings: true
10
- };
11
- Object.defineProperty(exports, "Core", {
12
- enumerable: true,
13
- get: function () {
14
- return _core.default;
15
- }
16
- });
17
- Object.defineProperty(exports, "CoreSettings", {
18
- enumerable: true,
19
- get: function () {
20
- return _settings.default;
21
- }
22
- });
23
- Object.defineProperty(exports, "Exodus", {
24
- enumerable: true,
25
- get: function () {
26
- return _exodus.default;
27
- }
28
- });
29
- var _exodus = _interopRequireDefault(require("./exodus"));
30
- var _controller = require("./controller");
31
- Object.keys(_controller).forEach(function (key) {
32
- if (key === "default" || key === "__esModule") return;
33
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
34
- if (key in exports && exports[key] === _controller[key]) return;
35
- Object.defineProperty(exports, key, {
36
- enumerable: true,
37
- get: function () {
38
- return _controller[key];
39
- }
40
- });
41
- });
42
- var _error = require("./error");
43
- Object.keys(_error).forEach(function (key) {
44
- if (key === "default" || key === "__esModule") return;
45
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
46
- if (key in exports && exports[key] === _error[key]) return;
47
- Object.defineProperty(exports, key, {
48
- enumerable: true,
49
- get: function () {
50
- return _error[key];
51
- }
52
- });
53
- });
54
- var _classes = require("./classes");
55
- Object.keys(_classes).forEach(function (key) {
56
- if (key === "default" || key === "__esModule") return;
57
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
58
- if (key in exports && exports[key] === _classes[key]) return;
59
- Object.defineProperty(exports, key, {
60
- enumerable: true,
61
- get: function () {
62
- return _classes[key];
63
- }
64
- });
65
- });
66
- var _core = _interopRequireDefault(require("./core"));
67
- var _settings = _interopRequireDefault(require("./settings"));
68
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -1,162 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- require("dotenv/config");
8
- var _os = _interopRequireDefault(require("os"));
9
- var _lodash = _interopRequireDefault(require("lodash"));
10
- var _path = _interopRequireDefault(require("path"));
11
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
- class CoreSettings {
13
- application = {};
14
- authentication = {};
15
- cache = {};
16
- database = {};
17
- http = {};
18
- logger = {};
19
- messaging = {};
20
- defaults = {
21
- application: {
22
- appId: process.env.APP_ID,
23
- port: Number(process.env.APP_PORT),
24
- host: process.env.APP_URL || 'http://localhost',
25
- description: process.env.APP_DESCRIPTION || '',
26
- clusters: Number(process.env.APP_CLUESTERS) || _os.default.cpus().length,
27
- clustersRestarts: true,
28
- /* File */
29
- filePaths: {
30
- temporary: _path.default.resolve(__dirname, '..', '..', 'public', 'tmp'),
31
- image: _path.default.resolve(__dirname, '..', '..', 'public', 'images'),
32
- audio: _path.default.resolve(__dirname, '..', '..', 'public', 'audios'),
33
- document: _path.default.resolve(__dirname, '..', '..', 'public', 'documents'),
34
- video: _path.default.resolve(__dirname, '..', '..', 'public', 'videos')
35
- }
36
- },
37
- authentication: {
38
- host: process.env.APP_SESSION_URL,
39
- issuer: `${process.env.APP_ID}/${process.env.SECURITY_JWT_ISSUER}`,
40
- serviceIssuer: `exodus.session.hub:4000/${process.env.SECURITY_JWT_ISSUER}`,
41
- servicePublicKeyPath: _path.default.resolve(__dirname, '../certificates/service_key.pem'),
42
- certPath: _path.default.resolve(__dirname, '../certificates'),
43
- algorithm: 'aes-256-cbc',
44
- initialVector: 16,
45
- signExpirationSecs: 60 * 60 * 4 //4hours
46
- },
47
- cache: {
48
- host: process.env.CACHE_HOST || 'localhost',
49
- port: Number(process.env.CACHE_PORT) || 6379,
50
- password: process.env.CACHE_USER || 'eYVX7EwVmmxKPCDmwMtyKVge8oLd2t81'
51
- },
52
- database: {
53
- master: {
54
- database: process.env.MASTER_DB_NAME || 'common',
55
- dialect: process.env.MASTER_DB_DIALECT || 'mariadb',
56
- username: process.env.MASTER_DB_USER || 'root',
57
- password: process.env.MASTER_DB_PASS || '',
58
- log: (_sql, _timing) => {
59
- return;
60
- },
61
- pool: {
62
- max: 100,
63
- // Número máximo de conexões no pool
64
- min: 5,
65
- // Número mínimo de conexões no pool
66
- acquire: 30000,
67
- // Tempo máximo (em ms) para adquirir uma conexão do pool
68
- idle: 10000 // Tempo máximo (em ms) que uma conexão pode ficar inativa
69
- }
70
- },
71
- service: {
72
- database: process.env.SERVICE_DB_NAME || 'unknow',
73
- log: (_sql, _timing) => {
74
- return;
75
- },
76
- pool: {
77
- max: 100,
78
- // Número máximo de conexões no pool
79
- min: 5,
80
- // Número mínimo de conexões no pool
81
- acquire: 30000,
82
- // Tempo máximo (em ms) para adquirir uma conexão do pool
83
- idle: 10000 // Tempo máximo (em ms) que uma conexão pode ficar inativa
84
- }
85
- }
86
- },
87
- http: {
88
- publicPath: _path.default.resolve(__dirname, '..', '..', 'public'),
89
- formulation: process.env.RESPONSE_FORMULATION_TYPE || 'standart'
90
- },
91
- logger: {
92
- /**
93
- * Diretório pardrão de logs
94
- * @date 24/03/2023 - 20:19:18
95
- *
96
- */
97
- path: _path.default.resolve(__dirname, '../../logs'),
98
- /**
99
- * Formato de saída dos arquivos de logs
100
- * @date 24/03/2023 - 20:19:18
101
- *
102
- */
103
- fileformat: '.json',
104
- /**
105
- * Nível do logger
106
- */
107
- level: process.env.LOGGER_LEVEL || 'info',
108
- /**
109
- * Transportar logs para o console do prompt
110
- * @date 24/03/2023 - 20:19:18
111
- *
112
- */
113
- console: !!parseInt(process.env.LOGGER_CONSOLE) || false
114
- },
115
- messaging: {
116
- user: process.env.MSG_USER || 'guest',
117
- pass: process.env.MSG_PASS || 'guest',
118
- host: process.env.MSG_HOST || 'localhost',
119
- exchanges: {
120
- main: 'exodus.messaging.events.exchange'
121
- }
122
- }
123
- };
124
- settings;
125
- constructor() {
126
- this.mergeSettings();
127
- }
128
- mergeSettings() {
129
- this.settings = _lodash.default.merge({}, this.defaults, {
130
- application: this.application,
131
- authentication: this.authentication,
132
- cache: this.cache,
133
- database: this.database,
134
- http: this.http,
135
- logger: this.logger,
136
- messaging: this.messaging
137
- });
138
- // console.log(this.settings);
139
- }
140
- getAppication() {
141
- return this.settings.application;
142
- }
143
- getAuthentication() {
144
- return this.settings.authentication;
145
- }
146
- getCache() {
147
- return this.settings.cache;
148
- }
149
- getDatabase() {
150
- return this.settings.database;
151
- }
152
- getHttp() {
153
- return this.settings.http;
154
- }
155
- getLogger() {
156
- return this.settings.logger;
157
- }
158
- getMessaging() {
159
- return this.settings.messaging;
160
- }
161
- }
162
- var _default = exports.default = CoreSettings;
@@ -1,27 +0,0 @@
1
- -----BEGIN RSA PRIVATE KEY-----
2
- MIIEogIBAAKCAQEAxINXETYzypGXPKCCECqCqf8dAceAfQV5TIas9T3Pgo00cw3c
3
- rcaeV+mAbOUrlQy5pnBQGM0od3zJESkkyI6z4DMUhmK260iQsPE2v7Mi5/nc6zKB
4
- 9lYodWB2+DLc4fFjSA7t5OK4bwiaQ3k2ZtAbYrPIZ2iBv/p0ptIoMWYJUy1XkGWF
5
- pb0ktDLSdxgJCo0lTNE8Nqh9vM4k/xFmbHfPSMyTV3s0zQO0CAS1rafQtgP4ZqQ2
6
- 0B6MnidiJVi/Uyne24pCQMBZkG3mGMvXHqZOPVxC3ZvT0+bczR1qAsnARbAszTVp
7
- AXhFysh7r5GYfuZEc/fAbpu7hOG3VIvOb/yMCQIDAQABAoIBAETWMTChSQEjgNPG
8
- 8eiRy5Wa/OE7rkGdIkFxR7LchQ0ZQ48uAuiIk7z92XPLzzl17K5l11jovM0mVBSD
9
- 0hPDETVvDziH6cV/dNfWlzQNnyOdfgqRdb8BrUh4kxQcVQ18jieWuzSbSrnyTH9o
10
- PWtEaONpUMEQdar3I9ev9E5hjNCqiiTDwC2ay2bU+G9nWmbb5l1EzNQLxm73eKbI
11
- +MDNA8FPMjmjyJ1zktt7bNtJa81/Ub+7RpMchlpREUhiVAckASd6y/B2Znm4R/Po
12
- 9Blb05A0oN/XC7PaqnxbBXXNxe5iwbRbxqd1q+om2qH25f17Wm5qtgBsUjcikPpo
13
- 1BFpV7UCgYEA/O5OR5jZUABUWLb49gd9EOj4BzVFOZN25EhwKbjyloqefsd0A+Wu
14
- k87IrskecustdrDl40Gve3uqdZ28V3B2O5QSYfdA890ebNnyrNox1y/3A6sCH95H
15
- PfZgnCowOTle01qRAKWaInHJwIiWGXMpHAqRWrsQ8at0r6XW111ZnTMCgYEAxuXH
16
- vtrX40U18XpFqO1tC5+M9Bhz+gfX66jibsMLqp290HxhImpegCsojZHp5BDa/3Ze
17
- 1aSXINlAuP6fLYlslvZ3RO+JVXDGARaat8M2YCWxJxsMvqS9OSweAwonRkHkWxMa
18
- k+EzMiW5WaXBYy+Ktd5JQRnw1oA9iRIwjKoiGdMCgYB4hiH9EgOzkISgxYe6zPS2
19
- oxzVanfzKKbFvxLbfsryG1nNNcO9u6vFuQp9505AGnrOjRrugLVbFSGz7Bb8X5Wn
20
- bDaaQhTMX7iIzA5Meai4Tp3ZPJrFjsjJ6OY+ZAgYrJLYCdcAxOi+sxQdT7iepfaX
21
- 6x06a9t2HWp77H2EoHH8awKBgGnbYbPyRXRwIYWjze9abe8Bu8MuQIuSIRkLiXfp
22
- 1wu3aI7No+TtN95/GdY/EnyPe/76wP5z2vtgpVHQMmfJ/EFca54E3tLacoehwDaN
23
- byM87Ewj2WSdyRfkoxR7EuwRpbfTMxIBiX3nFf7geUyQwQKKi/JaHBQNrLKHO8+h
24
- vQSBAoGAe+wjhUmrzYWoFtTHDLZyxiBA2ps5oXvjojk9GQPVVwAxxfIfXiiQ2rYE
25
- oL1ZQuRHn2aZXwEpc+Tr0LeMMiWSzSsYSrnhlez4WX0/TPuervB7xZ7g1dj4kK2E
26
- j+P9Z1wIWVy6h+N5OTM68GEe5GajaB/jpWbrmuLGDNaYJhwmw/Q=
27
- -----END RSA PRIVATE KEY-----
@@ -1,9 +0,0 @@
1
- -----BEGIN PUBLIC KEY-----
2
- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxINXETYzypGXPKCCECqC
3
- qf8dAceAfQV5TIas9T3Pgo00cw3crcaeV+mAbOUrlQy5pnBQGM0od3zJESkkyI6z
4
- 4DMUhmK260iQsPE2v7Mi5/nc6zKB9lYodWB2+DLc4fFjSA7t5OK4bwiaQ3k2ZtAb
5
- YrPIZ2iBv/p0ptIoMWYJUy1XkGWFpb0ktDLSdxgJCo0lTNE8Nqh9vM4k/xFmbHfP
6
- SMyTV3s0zQO0CAS1rafQtgP4ZqQ20B6MnidiJVi/Uyne24pCQMBZkG3mGMvXHqZO
7
- PVxC3ZvT0+bczR1qAsnARbAszTVpAXhFysh7r5GYfuZEc/fAbpu7hOG3VIvOb/yM
8
- CQIDAQAB
9
- -----END PUBLIC KEY-----
@@ -1,39 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.eMessageType = exports.eMessageStateType = exports.eConversationPresence = exports.eConversationChannel = void 0;
7
- let eMessageStateType = exports.eMessageStateType = /*#__PURE__*/function (eMessageStateType) {
8
- eMessageStateType["SENT"] = "SENT";
9
- eMessageStateType["RECEIVED"] = "RECEIVED";
10
- eMessageStateType["READ"] = "READ";
11
- eMessageStateType["ERROR"] = "ERROR";
12
- eMessageStateType["PENDING"] = "PENDING";
13
- return eMessageStateType;
14
- }({});
15
- let eMessageType = exports.eMessageType = /*#__PURE__*/function (eMessageType) {
16
- eMessageType["TEXT"] = "TEXT";
17
- eMessageType["AUDIO"] = "AUDIO";
18
- eMessageType["VIDEO"] = "VIDEO";
19
- eMessageType["IMAGE"] = "IMAGE";
20
- eMessageType["FILE"] = "FILE";
21
- eMessageType["STICKER"] = "STICKER";
22
- eMessageType["LOCATION"] = "LOCATION";
23
- eMessageType["CONTACT"] = "CONTACT";
24
- return eMessageType;
25
- }({});
26
- let eConversationChannel = exports.eConversationChannel = /*#__PURE__*/function (eConversationChannel) {
27
- eConversationChannel["FACEBOOK"] = "facebook";
28
- eConversationChannel["WHATSAPP"] = "whatsapp";
29
- eConversationChannel["TELEGRAM"] = "telegram";
30
- return eConversationChannel;
31
- }({});
32
- let eConversationPresence = exports.eConversationPresence = /*#__PURE__*/function (eConversationPresence) {
33
- eConversationPresence[eConversationPresence["ONLINE"] = 0] = "ONLINE";
34
- eConversationPresence[eConversationPresence["OFFLINE"] = 1] = "OFFLINE";
35
- eConversationPresence[eConversationPresence["COMPOSING"] = 2] = "COMPOSING";
36
- eConversationPresence[eConversationPresence["RECORDING"] = 3] = "RECORDING";
37
- eConversationPresence[eConversationPresence["PAUSED"] = 4] = "PAUSED";
38
- return eConversationPresence;
39
- }({});
@@ -1,27 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _communication = require("./communication");
7
- Object.keys(_communication).forEach(function (key) {
8
- if (key === "default" || key === "__esModule") return;
9
- if (key in exports && exports[key] === _communication[key]) return;
10
- Object.defineProperty(exports, key, {
11
- enumerable: true,
12
- get: function () {
13
- return _communication[key];
14
- }
15
- });
16
- });
17
- var _operation = require("./operation");
18
- Object.keys(_operation).forEach(function (key) {
19
- if (key === "default" || key === "__esModule") return;
20
- if (key in exports && exports[key] === _operation[key]) return;
21
- Object.defineProperty(exports, key, {
22
- enumerable: true,
23
- get: function () {
24
- return _operation[key];
25
- }
26
- });
27
- });
@@ -1,5 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
@@ -1,5 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
@@ -1,13 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.eScheduleTaskInterval = void 0;
7
- let eScheduleTaskInterval = exports.eScheduleTaskInterval = /*#__PURE__*/function (eScheduleTaskInterval) {
8
- eScheduleTaskInterval["CRITICAL"] = "*/1 * * * * *";
9
- eScheduleTaskInterval["DEFAULT"] = "*/3 * * * * *";
10
- eScheduleTaskInterval["REPORT"] = "*/10 * * * * *";
11
- eScheduleTaskInterval["SYNC"] = "*/60 * * * * *";
12
- return eScheduleTaskInterval;
13
- }({});
@@ -1,12 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.eExecutionSide = void 0;
7
- let eExecutionSide = exports.eExecutionSide = /*#__PURE__*/function (eExecutionSide) {
8
- eExecutionSide[eExecutionSide["MASTER"] = 0] = "MASTER";
9
- eExecutionSide[eExecutionSide["CLUSTER"] = 1] = "CLUSTER";
10
- eExecutionSide[eExecutionSide["ANY"] = 2] = "ANY";
11
- return eExecutionSide;
12
- }({});
@@ -1,5 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
@@ -1,52 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.EHttpResponseCode = exports.EApiRequestMethod = void 0;
7
- /**
8
- * Tipo de respostas
9
- * @date 26/03/2023 - 21:45:23
10
- *
11
- */
12
- /**
13
- * Objeto de response padronizado
14
- * @date 26/03/2023 - 21:45:23
15
- *
16
- */
17
- /**
18
- * Tipos de Status-Code para responses do Express
19
- *
20
- * @export
21
- * @enum {number}
22
- */
23
- let EHttpResponseCode = exports.EHttpResponseCode = /*#__PURE__*/function (EHttpResponseCode) {
24
- EHttpResponseCode[EHttpResponseCode["continue"] = 100] = "continue";
25
- EHttpResponseCode[EHttpResponseCode["accepted"] = 202] = "accepted";
26
- EHttpResponseCode[EHttpResponseCode["created"] = 201] = "created";
27
- EHttpResponseCode[EHttpResponseCode["successfullyProcessedInformation"] = 200] = "successfullyProcessedInformation";
28
- EHttpResponseCode[EHttpResponseCode["partiallyCompletedProcess"] = 206] = "partiallyCompletedProcess";
29
- EHttpResponseCode[EHttpResponseCode["redirectingForResponse"] = 303] = "redirectingForResponse";
30
- EHttpResponseCode[EHttpResponseCode["incompleteRequest"] = 400] = "incompleteRequest";
31
- EHttpResponseCode[EHttpResponseCode["informationNotFound"] = 404] = "informationNotFound";
32
- EHttpResponseCode[EHttpResponseCode["informationAlreadyExists"] = 409] = "informationAlreadyExists";
33
- EHttpResponseCode[EHttpResponseCode["preconditionRequired"] = 428] = "preconditionRequired";
34
- EHttpResponseCode[EHttpResponseCode["unprocessableEntity"] = 422] = "unprocessableEntity";
35
- EHttpResponseCode[EHttpResponseCode["iternalErro"] = 500] = "iternalErro";
36
- EHttpResponseCode[EHttpResponseCode["serviceUnavailable"] = 503] = "serviceUnavailable";
37
- EHttpResponseCode[EHttpResponseCode["methodNotAllowed"] = 405] = "methodNotAllowed";
38
- EHttpResponseCode[EHttpResponseCode["informationNotTrue"] = 406] = "informationNotTrue";
39
- EHttpResponseCode[EHttpResponseCode["preProcessNotInitialized"] = 424] = "preProcessNotInitialized";
40
- EHttpResponseCode[EHttpResponseCode["requestTimeOut"] = 408] = "requestTimeOut";
41
- EHttpResponseCode[EHttpResponseCode["informationUnauthorized"] = 401] = "informationUnauthorized";
42
- EHttpResponseCode[EHttpResponseCode["informationBlocked"] = 403] = "informationBlocked";
43
- return EHttpResponseCode;
44
- }({});
45
- let EApiRequestMethod = exports.EApiRequestMethod = /*#__PURE__*/function (EApiRequestMethod) {
46
- EApiRequestMethod["POST"] = "post";
47
- EApiRequestMethod["GET"] = "get";
48
- EApiRequestMethod["PUT"] = "put";
49
- EApiRequestMethod["DELETE"] = "delete";
50
- EApiRequestMethod["PATCH"] = "patch";
51
- return EApiRequestMethod;
52
- }({});