@blackcode_sa/metaestetics-api 1.5.42 → 1.5.43
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 +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +20 -1
- package/dist/index.mjs +20 -1
- package/package.json +1 -1
- package/src/services/appointment/appointment.service.ts +23 -2
package/dist/index.d.mts
CHANGED
|
@@ -6576,6 +6576,11 @@ declare class AppointmentService extends BaseService {
|
|
|
6576
6576
|
* @returns The updated appointment
|
|
6577
6577
|
*/
|
|
6578
6578
|
updateInternalNotes(appointmentId: string, notes: string | null): Promise<Appointment>;
|
|
6579
|
+
/**
|
|
6580
|
+
* Debug helper: Get the current user's ID token for testing purposes
|
|
6581
|
+
* Use this token in Postman with Authorization: Bearer TOKEN
|
|
6582
|
+
*/
|
|
6583
|
+
getDebugToken(): Promise<string | null>;
|
|
6579
6584
|
}
|
|
6580
6585
|
|
|
6581
6586
|
declare class AuthError extends Error {
|
package/dist/index.d.ts
CHANGED
|
@@ -6576,6 +6576,11 @@ declare class AppointmentService extends BaseService {
|
|
|
6576
6576
|
* @returns The updated appointment
|
|
6577
6577
|
*/
|
|
6578
6578
|
updateInternalNotes(appointmentId: string, notes: string | null): Promise<Appointment>;
|
|
6579
|
+
/**
|
|
6580
|
+
* Debug helper: Get the current user's ID token for testing purposes
|
|
6581
|
+
* Use this token in Postman with Authorization: Bearer TOKEN
|
|
6582
|
+
*/
|
|
6583
|
+
getDebugToken(): Promise<string | null>;
|
|
6579
6584
|
}
|
|
6580
6585
|
|
|
6581
6586
|
declare class AuthError extends Error {
|
package/dist/index.js
CHANGED
|
@@ -11831,7 +11831,7 @@ 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/
|
|
11834
|
+
const functionUrl = `https://europe-west6-metaestetics.cloudfunctions.net/bookingApi/getAvailableBookingSlots`;
|
|
11835
11835
|
const idToken = await currentUser.getIdToken();
|
|
11836
11836
|
console.log(
|
|
11837
11837
|
`[APPOINTMENT_SERVICE] Got user token, user ID: ${currentUser.uid}`
|
|
@@ -12287,6 +12287,25 @@ var AppointmentService = class extends BaseService {
|
|
|
12287
12287
|
};
|
|
12288
12288
|
return this.updateAppointment(appointmentId, updateData);
|
|
12289
12289
|
}
|
|
12290
|
+
/**
|
|
12291
|
+
* Debug helper: Get the current user's ID token for testing purposes
|
|
12292
|
+
* Use this token in Postman with Authorization: Bearer TOKEN
|
|
12293
|
+
*/
|
|
12294
|
+
async getDebugToken() {
|
|
12295
|
+
try {
|
|
12296
|
+
const currentUser = this.auth.currentUser;
|
|
12297
|
+
if (!currentUser) {
|
|
12298
|
+
console.log("[APPOINTMENT_SERVICE] No user is signed in");
|
|
12299
|
+
return null;
|
|
12300
|
+
}
|
|
12301
|
+
const idToken = await currentUser.getIdToken();
|
|
12302
|
+
console.log("[APPOINTMENT_SERVICE] Debug token:", idToken);
|
|
12303
|
+
return idToken;
|
|
12304
|
+
} catch (error) {
|
|
12305
|
+
console.error("[APPOINTMENT_SERVICE] Error getting debug token:", error);
|
|
12306
|
+
return null;
|
|
12307
|
+
}
|
|
12308
|
+
}
|
|
12290
12309
|
};
|
|
12291
12310
|
|
|
12292
12311
|
// src/backoffice/services/brand.service.ts
|
package/dist/index.mjs
CHANGED
|
@@ -11920,7 +11920,7 @@ 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/
|
|
11923
|
+
const functionUrl = `https://europe-west6-metaestetics.cloudfunctions.net/bookingApi/getAvailableBookingSlots`;
|
|
11924
11924
|
const idToken = await currentUser.getIdToken();
|
|
11925
11925
|
console.log(
|
|
11926
11926
|
`[APPOINTMENT_SERVICE] Got user token, user ID: ${currentUser.uid}`
|
|
@@ -12376,6 +12376,25 @@ var AppointmentService = class extends BaseService {
|
|
|
12376
12376
|
};
|
|
12377
12377
|
return this.updateAppointment(appointmentId, updateData);
|
|
12378
12378
|
}
|
|
12379
|
+
/**
|
|
12380
|
+
* Debug helper: Get the current user's ID token for testing purposes
|
|
12381
|
+
* Use this token in Postman with Authorization: Bearer TOKEN
|
|
12382
|
+
*/
|
|
12383
|
+
async getDebugToken() {
|
|
12384
|
+
try {
|
|
12385
|
+
const currentUser = this.auth.currentUser;
|
|
12386
|
+
if (!currentUser) {
|
|
12387
|
+
console.log("[APPOINTMENT_SERVICE] No user is signed in");
|
|
12388
|
+
return null;
|
|
12389
|
+
}
|
|
12390
|
+
const idToken = await currentUser.getIdToken();
|
|
12391
|
+
console.log("[APPOINTMENT_SERVICE] Debug token:", idToken);
|
|
12392
|
+
return idToken;
|
|
12393
|
+
} catch (error) {
|
|
12394
|
+
console.error("[APPOINTMENT_SERVICE] Error getting debug token:", error);
|
|
12395
|
+
return null;
|
|
12396
|
+
}
|
|
12397
|
+
}
|
|
12379
12398
|
};
|
|
12380
12399
|
|
|
12381
12400
|
// src/backoffice/services/brand.service.ts
|
package/package.json
CHANGED
|
@@ -171,8 +171,8 @@ export class AppointmentService extends BaseService {
|
|
|
171
171
|
);
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
// Construct the function URL
|
|
175
|
-
const functionUrl = `https://europe-west6-metaestetics.cloudfunctions.net/
|
|
174
|
+
// Construct the function URL for the Express app endpoint
|
|
175
|
+
const functionUrl = `https://europe-west6-metaestetics.cloudfunctions.net/bookingApi/getAvailableBookingSlots`;
|
|
176
176
|
|
|
177
177
|
// Get the authenticated user's ID token
|
|
178
178
|
// By default, getIdToken doesn't allow setting audience for web/mobile clients
|
|
@@ -789,4 +789,25 @@ export class AppointmentService extends BaseService {
|
|
|
789
789
|
|
|
790
790
|
return this.updateAppointment(appointmentId, updateData);
|
|
791
791
|
}
|
|
792
|
+
|
|
793
|
+
/**
|
|
794
|
+
* Debug helper: Get the current user's ID token for testing purposes
|
|
795
|
+
* Use this token in Postman with Authorization: Bearer TOKEN
|
|
796
|
+
*/
|
|
797
|
+
async getDebugToken(): Promise<string | null> {
|
|
798
|
+
try {
|
|
799
|
+
const currentUser = this.auth.currentUser;
|
|
800
|
+
if (!currentUser) {
|
|
801
|
+
console.log("[APPOINTMENT_SERVICE] No user is signed in");
|
|
802
|
+
return null;
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
const idToken = await currentUser.getIdToken();
|
|
806
|
+
console.log("[APPOINTMENT_SERVICE] Debug token:", idToken);
|
|
807
|
+
return idToken;
|
|
808
|
+
} catch (error) {
|
|
809
|
+
console.error("[APPOINTMENT_SERVICE] Error getting debug token:", error);
|
|
810
|
+
return null;
|
|
811
|
+
}
|
|
812
|
+
}
|
|
792
813
|
}
|