@blackcode_sa/metaestetics-api 1.5.40 → 1.5.42

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.js CHANGED
@@ -11831,11 +11831,11 @@ var AppointmentService = class extends BaseService {
11831
11831
  "User must be authenticated to get available booking slots"
11832
11832
  );
11833
11833
  }
11834
+ const functionUrl = `https://europe-west6-metaestetics.cloudfunctions.net/getAvailableBookingSlotsHttp`;
11834
11835
  const idToken = await currentUser.getIdToken();
11835
11836
  console.log(
11836
11837
  `[APPOINTMENT_SERVICE] Got user token, user ID: ${currentUser.uid}`
11837
11838
  );
11838
- const functionUrl = `https://getavailablebookingslotshttp-grqala5m6a-oa.a.run.app`;
11839
11839
  const requestData = {
11840
11840
  clinicId,
11841
11841
  practitionerId,
package/dist/index.mjs CHANGED
@@ -11920,11 +11920,11 @@ var AppointmentService = class extends BaseService {
11920
11920
  "User must be authenticated to get available booking slots"
11921
11921
  );
11922
11922
  }
11923
+ const functionUrl = `https://europe-west6-metaestetics.cloudfunctions.net/getAvailableBookingSlotsHttp`;
11923
11924
  const idToken = await currentUser.getIdToken();
11924
11925
  console.log(
11925
11926
  `[APPOINTMENT_SERVICE] Got user token, user ID: ${currentUser.uid}`
11926
11927
  );
11927
- const functionUrl = `https://getavailablebookingslotshttp-grqala5m6a-oa.a.run.app`;
11928
11928
  const requestData = {
11929
11929
  clinicId,
11930
11930
  practitionerId,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@blackcode_sa/metaestetics-api",
3
3
  "private": false,
4
- "version": "1.5.40",
4
+ "version": "1.5.42",
5
5
  "description": "Firebase authentication service with anonymous upgrade support",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.mjs",
@@ -171,7 +171,12 @@ export class AppointmentService extends BaseService {
171
171
  );
172
172
  }
173
173
 
174
+ // Construct the function URL - using the europe-west6 region
175
+ const functionUrl = `https://europe-west6-metaestetics.cloudfunctions.net/getAvailableBookingSlotsHttp`;
176
+
174
177
  // Get the authenticated user's ID token
178
+ // By default, getIdToken doesn't allow setting audience for web/mobile clients
179
+ // So we need to treat this token specially on the server side
175
180
  const idToken = await currentUser.getIdToken();
176
181
 
177
182
  // Log that we're getting a token
@@ -179,10 +184,8 @@ export class AppointmentService extends BaseService {
179
184
  `[APPOINTMENT_SERVICE] Got user token, user ID: ${currentUser.uid}`
180
185
  );
181
186
 
182
- // Construct the function URL - using the europe-west6 region
183
- const functionUrl = `https://getavailablebookingslotshttp-grqala5m6a-oa.a.run.app`;
184
-
185
- // Alternate URL: europe-west6-metaestetics.cloudfunctions.net/getAvailableBookingSlotsHttp
187
+ // Alternate direct URL (if needed):
188
+ // const functionUrl = `https://getavailablebookingslotshttp-grqala5m6a-oa.a.run.app`;
186
189
 
187
190
  // Request data
188
191
  const requestData = {