@riocrypto/common 1.0.1188 → 1.0.1190

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,11 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Listener = void 0;
4
+ const get_current_cdmx_date_1 = require("../helpers/get-current-cdmx-date");
4
5
  class Listener {
5
6
  constructor(client) {
6
7
  this.ackWait = 5 * 1000;
7
8
  this.client = client;
8
- this.listenerStartTime = new Date(); // Record the start time of the listener
9
+ this.listenerStartTime = (0, get_current_cdmx_date_1.getCurrentMexicoCityDate)(); // Record the start time of the listener
9
10
  }
10
11
  subscriptionOptions() {
11
12
  return this.client
@@ -0,0 +1 @@
1
+ export declare const getCurrentMexicoCityDate: () => Date;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getCurrentMexicoCityDate = void 0;
4
+ const getCurrentMexicoCityDate = () => {
5
+ const mexicoCityTimeZone = "America/Mexico_City";
6
+ const mexicoCityTime = (0, exports.getCurrentMexicoCityDate)().toLocaleString("en-US", {
7
+ timeZone: mexicoCityTimeZone,
8
+ });
9
+ const mexicoCityDate = new Date(mexicoCityTime);
10
+ return mexicoCityDate;
11
+ };
12
+ exports.getCurrentMexicoCityDate = getCurrentMexicoCityDate;
package/build/index.d.ts CHANGED
@@ -223,6 +223,7 @@ export * from "./helpers/round-to-decimals";
223
223
  export * from "./helpers/number-with-commas";
224
224
  export * from "./helpers/alpha-2-to-alpha-3";
225
225
  export * from "./helpers/get-user-name";
226
+ export * from "./helpers/get-current-cdmx-date";
226
227
  export * from "./clients/rio-client";
227
228
  export * from "./clients/rio-admin-client";
228
229
  export * from "./constants/mexico-fiscal-regimens";
package/build/index.js CHANGED
@@ -239,6 +239,7 @@ __exportStar(require("./helpers/round-to-decimals"), exports);
239
239
  __exportStar(require("./helpers/number-with-commas"), exports);
240
240
  __exportStar(require("./helpers/alpha-2-to-alpha-3"), exports);
241
241
  __exportStar(require("./helpers/get-user-name"), exports);
242
+ __exportStar(require("./helpers/get-current-cdmx-date"), exports);
242
243
  __exportStar(require("./clients/rio-client"), exports);
243
244
  __exportStar(require("./clients/rio-admin-client"), exports);
244
245
  __exportStar(require("./constants/mexico-fiscal-regimens"), exports);
@@ -9,4 +9,8 @@ export interface Auth {
9
9
  previousPasswords?: string[];
10
10
  apiKeys?: APIKey[];
11
11
  isDisabled?: boolean;
12
+ telegram: {
13
+ username?: string;
14
+ lastVerified?: Date;
15
+ };
12
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.1188",
3
+ "version": "1.0.1190",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",