ismx-nexo-node-app 0.4.6 → 0.4.8

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.
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DateUtils = void 0;
4
3
  class DateUtils {
5
4
  static getMonth(date, using = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dec']) {
6
5
  return using[date.getMonth()];
@@ -24,7 +23,6 @@ class DateUtils {
24
23
  return new Date(component === DateUtils.YEARS ? year + value : year, component === DateUtils.MONTHS ? month + value : month, component === DateUtils.DAYS ? day + value : day, component === DateUtils.HOURS ? hours + value : hours, component === DateUtils.MINUTES ? minutes + value : minutes, component === DateUtils.SECONDS ? seconds + value : seconds, component === DateUtils.MILLIS ? milliseconds + value : milliseconds);
25
24
  }
26
25
  }
27
- exports.DateUtils = DateUtils;
28
26
  DateUtils.MILLIS = 1;
29
27
  DateUtils.SECONDS = 1000 * DateUtils.MILLIS;
30
28
  DateUtils.MINUTES = 60 * DateUtils.SECONDS;
@@ -32,3 +30,4 @@ DateUtils.HOURS = 60 * DateUtils.MINUTES;
32
30
  DateUtils.DAYS = 24 * DateUtils.HOURS;
33
31
  DateUtils.MONTHS = 30 * DateUtils.DAYS;
34
32
  DateUtils.YEARS = 365 * DateUtils.DAYS;
33
+ exports.default = DateUtils;
package/dist/js/index.js CHANGED
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.RestUtils = exports.QueryUtils = exports.RepositoryRestFormalTemplate = exports.RepositoryRestFormal = exports.RepositoryRest = exports.RepositoryDatabasePostgres = exports.RepositoryDatabase = exports.Repository = exports.StringUtils = exports.NumberUtils = exports.CryptoUtils = exports.BusinessLogger = exports.FormalError = exports.BusinessErrors = exports.BusinessThread = exports.BusinessServer = exports.BusinessProxy = exports.BusinessState = exports.Business = exports.ColorUtils = exports.ServiceRestFormalTemplate = exports.ServiceRestFormal = exports.ServiceRest = exports.HttpResponse = exports.Service = void 0;
29
+ exports.RestUtils = exports.QueryUtils = exports.RepositoryRestFormalTemplate = exports.RepositoryRestFormal = exports.RepositoryRest = exports.RepositoryDatabasePostgres = exports.RepositoryDatabase = exports.Repository = exports.StringUtils = exports.NumberUtils = exports.CryptoUtils = exports.DateUtils = exports.BusinessLogger = exports.FormalError = exports.BusinessErrors = exports.BusinessThread = exports.BusinessServer = exports.BusinessProxy = exports.BusinessState = exports.Business = exports.ColorUtils = exports.ServiceRestFormalTemplate = exports.ServiceRestFormal = exports.ServiceRest = exports.HttpResponse = exports.Service = void 0;
30
30
  const Service_1 = __importStar(require("./api/Service"));
31
31
  class Service extends Service_1.default {
32
32
  }
@@ -82,6 +82,10 @@ const BusinessLogger_1 = __importDefault(require("./business/BusinessLogger"));
82
82
  class BusinessLogger extends BusinessLogger_1.default {
83
83
  }
84
84
  exports.BusinessLogger = BusinessLogger;
85
+ const DateUtils_1 = __importDefault(require("./business/utils/DateUtils"));
86
+ class DateUtils extends DateUtils_1.default {
87
+ }
88
+ exports.DateUtils = DateUtils;
85
89
  const CryptoUtils_1 = __importDefault(require("./business/utils/CryptoUtils"));
86
90
  class CryptoUtils extends CryptoUtils_1.default {
87
91
  }
@@ -107,8 +107,8 @@ class RepositoryRestFormalTemplate {
107
107
  return (_a = (yield this.repository.callFormal("GET", "/map", request))) !== null && _a !== void 0 ? _a : {};
108
108
  });
109
109
  }
110
- call(method, endpoint, request) {
111
- return __awaiter(this, void 0, void 0, function* () {
110
+ call(method_1, endpoint_1) {
111
+ return __awaiter(this, arguments, void 0, function* (method, endpoint, request = {}) {
112
112
  return this.repository.callFormal(method, endpoint, request);
113
113
  });
114
114
  }
@@ -1,4 +1,4 @@
1
- export declare abstract class DateUtils {
1
+ export default abstract class DateUtils {
2
2
  static readonly MILLIS: number;
3
3
  static readonly SECONDS: number;
4
4
  static readonly MINUTES: number;
@@ -47,6 +47,9 @@ export declare class FormalError extends _FormalError {
47
47
  import BaseBusinessLogger from "./business/BusinessLogger";
48
48
  export declare class BusinessLogger extends BaseBusinessLogger {
49
49
  }
50
+ import _DateUtils from "./business/utils/DateUtils";
51
+ export declare abstract class DateUtils extends _DateUtils {
52
+ }
50
53
  import _CryptoUtils from "./business/utils/CryptoUtils";
51
54
  export declare abstract class CryptoUtils extends _CryptoUtils {
52
55
  }
@@ -20,5 +20,5 @@ export default class RepositoryRestFormalTemplate<Model> {
20
20
  map(request?: HttpRequest): Promise<{
21
21
  [key: string]: Model;
22
22
  }>;
23
- call<B, E>(method: string, endpoint: string, request: HttpRequest<B>): Promise<E | undefined>;
23
+ call<E = {}, B = {}>(method: string, endpoint: string, request?: HttpRequest<B>): Promise<E | undefined>;
24
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ismx-nexo-node-app",
3
- "version": "0.4.6",
3
+ "version": "0.4.8",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "build": "rm -rf ./dist && npx tsc",
@@ -1,4 +1,4 @@
1
- export abstract class DateUtils {
1
+ export default abstract class DateUtils {
2
2
 
3
3
  static readonly MILLIS: number = 1;
4
4
  static readonly SECONDS: number = 1000 * DateUtils.MILLIS;
@@ -42,6 +42,9 @@ export class FormalError extends _FormalError {}
42
42
  import BaseBusinessLogger from "./business/BusinessLogger";
43
43
  export class BusinessLogger extends BaseBusinessLogger {}
44
44
 
45
+ import _DateUtils from "./business/utils/DateUtils";
46
+ export abstract class DateUtils extends _DateUtils {}
47
+
45
48
  import _CryptoUtils from "./business/utils/CryptoUtils";
46
49
  export abstract class CryptoUtils extends _CryptoUtils {}
47
50
 
@@ -78,7 +78,7 @@ export default class RepositoryRestFormalTemplate<Model> {
78
78
  return (await this.repository.callFormal("GET", "/map", request)) ?? {};
79
79
  }
80
80
 
81
- async call<B, E>(method: string, endpoint: string, request: HttpRequest<B>): Promise<E | undefined> {
81
+ async call<E={}, B={}>(method: string, endpoint: string, request: HttpRequest<B>={}): Promise<E | undefined> {
82
82
  return this.repository.callFormal<B, E>(method, endpoint, request);
83
83
  }
84
84
  }