@blackcode_sa/metaestetics-api 1.5.36 → 1.5.37

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
@@ -11794,6 +11794,12 @@ var AppointmentService = class extends BaseService {
11794
11794
  if (endDate <= startDate) {
11795
11795
  throw new Error("End date must be after start date");
11796
11796
  }
11797
+ const currentUser = this.auth.currentUser;
11798
+ if (!currentUser) {
11799
+ throw new Error(
11800
+ "User must be authenticated to get available booking slots"
11801
+ );
11802
+ }
11797
11803
  const getAvailableBookingSlotsFunction = (0, import_functions.httpsCallable)(
11798
11804
  this.functions,
11799
11805
  "getAvailableBookingSlots"
package/dist/index.mjs CHANGED
@@ -11883,6 +11883,12 @@ var AppointmentService = class extends BaseService {
11883
11883
  if (endDate <= startDate) {
11884
11884
  throw new Error("End date must be after start date");
11885
11885
  }
11886
+ const currentUser = this.auth.currentUser;
11887
+ if (!currentUser) {
11888
+ throw new Error(
11889
+ "User must be authenticated to get available booking slots"
11890
+ );
11891
+ }
11886
11892
  const getAvailableBookingSlotsFunction = httpsCallable(
11887
11893
  this.functions,
11888
11894
  "getAvailableBookingSlots"
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.36",
4
+ "version": "1.5.37",
5
5
  "description": "Firebase authentication service with anonymous upgrade support",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.mjs",
@@ -123,6 +123,14 @@ export class AppointmentService extends BaseService {
123
123
  throw new Error("End date must be after start date");
124
124
  }
125
125
 
126
+ // Check if user is authenticated
127
+ const currentUser = this.auth.currentUser;
128
+ if (!currentUser) {
129
+ throw new Error(
130
+ "User must be authenticated to get available booking slots"
131
+ );
132
+ }
133
+
126
134
  // Create a callable function reference
127
135
  const getAvailableBookingSlotsFunction = httpsCallable(
128
136
  this.functions,