sim-node-lib 0.4.15 → 0.4.17

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.
@@ -5,7 +5,7 @@ export declare enum ExceptionsMessagesEnum {
5
5
  invalidAuthUid = "Dados enviados s\u00E3o inv\u00E1lidos!",
6
6
  oneSessionOnly = "Essa empresa j\u00E1 possui um token ativo.",
7
7
  routeNotFound = "N\u00E3o foi encontrada nenhuma rota como essa.",
8
- rowNotFound = "N\u00E3o foi encontrado nenhum registro.",
8
+ rowNotFound = "Nao foi encontrado nenhum registro.",
9
9
  tooManyRequests = "Muitas requisi\u00E7\u00F5es foram feitas no tempo limite.",
10
10
  unauthorized = "N\u00E3o foi poss\u00EDvel autorizar ou autenticar essa requisi\u00E7\u00E3o.",
11
11
  validationFailed = "Os dados enviados s\u00E3o inv\u00E1lidos!"
@@ -9,7 +9,7 @@ var ExceptionsMessagesEnum;
9
9
  ExceptionsMessagesEnum["invalidAuthUid"] = "Dados enviados s\u00E3o inv\u00E1lidos!";
10
10
  ExceptionsMessagesEnum["oneSessionOnly"] = "Essa empresa j\u00E1 possui um token ativo.";
11
11
  ExceptionsMessagesEnum["routeNotFound"] = "N\u00E3o foi encontrada nenhuma rota como essa.";
12
- ExceptionsMessagesEnum["rowNotFound"] = "N\u00E3o foi encontrado nenhum registro.";
12
+ ExceptionsMessagesEnum["rowNotFound"] = "Nao foi encontrado nenhum registro.";
13
13
  ExceptionsMessagesEnum["tooManyRequests"] = "Muitas requisi\u00E7\u00F5es foram feitas no tempo limite.";
14
14
  ExceptionsMessagesEnum["unauthorized"] = "N\u00E3o foi poss\u00EDvel autorizar ou autenticar essa requisi\u00E7\u00E3o.";
15
15
  ExceptionsMessagesEnum["validationFailed"] = "Os dados enviados s\u00E3o inv\u00E1lidos!";
@@ -1,3 +1,3 @@
1
1
  export default class ExceptionHelper {
2
- static findMessage(obj: any): any;
2
+ static findMessage(obj: any, errorMessage?: string): any;
3
3
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  class ExceptionHelper {
4
- static findMessage(obj) {
4
+ static findMessage(obj, errorMessage) {
5
5
  for (const key in obj) {
6
6
  if (obj.hasOwnProperty(key)) {
7
7
  if (key === 'message') {
@@ -15,7 +15,7 @@ class ExceptionHelper {
15
15
  }
16
16
  }
17
17
  }
18
- return 'Não foi encontrada uma mensagem nesse objeto.';
18
+ return errorMessage !== null && errorMessage !== void 0 ? errorMessage : 'Não foi encontrada uma mensagem nesse objeto.';
19
19
  }
20
20
  }
21
21
  exports.default = ExceptionHelper;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sim-node-lib",
3
- "version": "0.4.15",
3
+ "version": "0.4.17",
4
4
  "description": "Library from SIMLabs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",