@blackcode_sa/metaestetics-api 1.12.29 → 1.12.30
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.
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -7
- package/dist/index.mjs +4 -7
- package/package.json +2 -2
- package/src/services/clinic/clinic.service.ts +4 -7
- package/src/types/tz-lookup.d.ts +4 -0
package/dist/index.d.mts
CHANGED
|
@@ -5237,7 +5237,7 @@ declare class ClinicService extends BaseService {
|
|
|
5237
5237
|
private functions;
|
|
5238
5238
|
constructor(db: Firestore, auth: Auth, app: FirebaseApp, clinicGroupService: ClinicGroupService, clinicAdminService: ClinicAdminService, mediaService: MediaService);
|
|
5239
5239
|
/**
|
|
5240
|
-
* Get timezone from coordinates using
|
|
5240
|
+
* Get timezone from coordinates using tz-lookup library
|
|
5241
5241
|
* @param lat Latitude
|
|
5242
5242
|
* @param lng Longitude
|
|
5243
5243
|
* @returns IANA timezone string
|
package/dist/index.d.ts
CHANGED
|
@@ -5237,7 +5237,7 @@ declare class ClinicService extends BaseService {
|
|
|
5237
5237
|
private functions;
|
|
5238
5238
|
constructor(db: Firestore, auth: Auth, app: FirebaseApp, clinicGroupService: ClinicGroupService, clinicAdminService: ClinicAdminService, mediaService: MediaService);
|
|
5239
5239
|
/**
|
|
5240
|
-
* Get timezone from coordinates using
|
|
5240
|
+
* Get timezone from coordinates using tz-lookup library
|
|
5241
5241
|
* @param lat Latitude
|
|
5242
5242
|
* @param lng Longitude
|
|
5243
5243
|
* @returns IANA timezone string
|
package/dist/index.js
CHANGED
|
@@ -8577,7 +8577,7 @@ var ClinicGroupService = class extends BaseService {
|
|
|
8577
8577
|
// src/services/clinic/clinic.service.ts
|
|
8578
8578
|
var import_firestore28 = require("firebase/firestore");
|
|
8579
8579
|
var import_functions2 = require("firebase/functions");
|
|
8580
|
-
var
|
|
8580
|
+
var import_tz_lookup = __toESM(require("tz-lookup"));
|
|
8581
8581
|
var import_geofire_common7 = require("geofire-common");
|
|
8582
8582
|
var import_zod20 = require("zod");
|
|
8583
8583
|
|
|
@@ -9333,18 +9333,15 @@ var ClinicService = class extends BaseService {
|
|
|
9333
9333
|
this.functions = (0, import_functions2.getFunctions)(app, "europe-west6");
|
|
9334
9334
|
}
|
|
9335
9335
|
/**
|
|
9336
|
-
* Get timezone from coordinates using
|
|
9336
|
+
* Get timezone from coordinates using tz-lookup library
|
|
9337
9337
|
* @param lat Latitude
|
|
9338
9338
|
* @param lng Longitude
|
|
9339
9339
|
* @returns IANA timezone string
|
|
9340
9340
|
*/
|
|
9341
9341
|
getTimezone(lat, lng) {
|
|
9342
9342
|
try {
|
|
9343
|
-
const
|
|
9344
|
-
|
|
9345
|
-
return timezones[0];
|
|
9346
|
-
}
|
|
9347
|
-
return null;
|
|
9343
|
+
const timezone = (0, import_tz_lookup.default)(lat, lng);
|
|
9344
|
+
return timezone || null;
|
|
9348
9345
|
} catch (error) {
|
|
9349
9346
|
console.error("[CLINIC_SERVICE] Error getting timezone:", error);
|
|
9350
9347
|
return null;
|
package/dist/index.mjs
CHANGED
|
@@ -8646,7 +8646,7 @@ import {
|
|
|
8646
8646
|
arrayUnion as arrayUnion7
|
|
8647
8647
|
} from "firebase/firestore";
|
|
8648
8648
|
import { getFunctions as getFunctions2 } from "firebase/functions";
|
|
8649
|
-
import
|
|
8649
|
+
import tzlookup from "tz-lookup";
|
|
8650
8650
|
import {
|
|
8651
8651
|
geohashForLocation as geohashForLocation4
|
|
8652
8652
|
} from "geofire-common";
|
|
@@ -9433,18 +9433,15 @@ var ClinicService = class extends BaseService {
|
|
|
9433
9433
|
this.functions = getFunctions2(app, "europe-west6");
|
|
9434
9434
|
}
|
|
9435
9435
|
/**
|
|
9436
|
-
* Get timezone from coordinates using
|
|
9436
|
+
* Get timezone from coordinates using tz-lookup library
|
|
9437
9437
|
* @param lat Latitude
|
|
9438
9438
|
* @param lng Longitude
|
|
9439
9439
|
* @returns IANA timezone string
|
|
9440
9440
|
*/
|
|
9441
9441
|
getTimezone(lat, lng) {
|
|
9442
9442
|
try {
|
|
9443
|
-
const
|
|
9444
|
-
|
|
9445
|
-
return timezones[0];
|
|
9446
|
-
}
|
|
9447
|
-
return null;
|
|
9443
|
+
const timezone = tzlookup(lat, lng);
|
|
9444
|
+
return timezone || null;
|
|
9448
9445
|
} catch (error) {
|
|
9449
9446
|
console.error("[CLINIC_SERVICE] Error getting timezone:", error);
|
|
9450
9447
|
return null;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blackcode_sa/metaestetics-api",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.12.
|
|
4
|
+
"version": "1.12.30",
|
|
5
5
|
"description": "Firebase authentication service with anonymous upgrade support",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.mjs",
|
|
@@ -98,9 +98,9 @@
|
|
|
98
98
|
"axios": "^1.8.3",
|
|
99
99
|
"expo-server-sdk": "^3.13.0",
|
|
100
100
|
"firebase-admin": "^13.0.2",
|
|
101
|
-
"geo-tz": "^8.1.4",
|
|
102
101
|
"geofire-common": "^6.0.0",
|
|
103
102
|
"luxon": "^3.7.1",
|
|
103
|
+
"tz-lookup": "^6.1.25",
|
|
104
104
|
"zod": "^3.24.1"
|
|
105
105
|
},
|
|
106
106
|
"optionalDependencies": {
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
arrayRemove,
|
|
19
19
|
} from "firebase/firestore";
|
|
20
20
|
import { getFunctions, httpsCallable } from "firebase/functions";
|
|
21
|
-
import
|
|
21
|
+
import tzlookup from "tz-lookup";
|
|
22
22
|
import { BaseService } from "../base.service";
|
|
23
23
|
import {
|
|
24
24
|
Clinic,
|
|
@@ -83,18 +83,15 @@ export class ClinicService extends BaseService {
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
/**
|
|
86
|
-
* Get timezone from coordinates using
|
|
86
|
+
* Get timezone from coordinates using tz-lookup library
|
|
87
87
|
* @param lat Latitude
|
|
88
88
|
* @param lng Longitude
|
|
89
89
|
* @returns IANA timezone string
|
|
90
90
|
*/
|
|
91
91
|
private getTimezone(lat: number, lng: number): string | null {
|
|
92
92
|
try {
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
return timezones[0];
|
|
96
|
-
}
|
|
97
|
-
return null;
|
|
93
|
+
const timezone = tzlookup(lat, lng);
|
|
94
|
+
return timezone || null;
|
|
98
95
|
} catch (error) {
|
|
99
96
|
console.error("[CLINIC_SERVICE] Error getting timezone:", error);
|
|
100
97
|
return null;
|