@blackcode_sa/metaestetics-api 1.13.16 → 1.13.17
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
CHANGED
|
@@ -7609,6 +7609,15 @@ declare class AppointmentService extends BaseService {
|
|
|
7609
7609
|
* @returns The updated appointment
|
|
7610
7610
|
*/
|
|
7611
7611
|
addAfterPhotoToEntry(appointmentId: string, zoneId: string, photoIndex: number, afterPhotoUrl: MediaResource, afterNote?: string): Promise<Appointment>;
|
|
7612
|
+
/**
|
|
7613
|
+
* Removes an after photo from an existing entry (keeps the before photo)
|
|
7614
|
+
*
|
|
7615
|
+
* @param appointmentId ID of the appointment
|
|
7616
|
+
* @param zoneId ID of the zone
|
|
7617
|
+
* @param photoIndex Index of the entry to remove after photo from
|
|
7618
|
+
* @returns The updated appointment
|
|
7619
|
+
*/
|
|
7620
|
+
removeAfterPhotoFromEntry(appointmentId: string, zoneId: string, photoIndex: number): Promise<Appointment>;
|
|
7612
7621
|
/**
|
|
7613
7622
|
* Updates notes for a photo entry
|
|
7614
7623
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -7609,6 +7609,15 @@ declare class AppointmentService extends BaseService {
|
|
|
7609
7609
|
* @returns The updated appointment
|
|
7610
7610
|
*/
|
|
7611
7611
|
addAfterPhotoToEntry(appointmentId: string, zoneId: string, photoIndex: number, afterPhotoUrl: MediaResource, afterNote?: string): Promise<Appointment>;
|
|
7612
|
+
/**
|
|
7613
|
+
* Removes an after photo from an existing entry (keeps the before photo)
|
|
7614
|
+
*
|
|
7615
|
+
* @param appointmentId ID of the appointment
|
|
7616
|
+
* @param zoneId ID of the zone
|
|
7617
|
+
* @param photoIndex Index of the entry to remove after photo from
|
|
7618
|
+
* @returns The updated appointment
|
|
7619
|
+
*/
|
|
7620
|
+
removeAfterPhotoFromEntry(appointmentId: string, zoneId: string, photoIndex: number): Promise<Appointment>;
|
|
7612
7621
|
/**
|
|
7613
7622
|
* Updates notes for a photo entry
|
|
7614
7623
|
*
|
package/dist/index.js
CHANGED
|
@@ -5328,6 +5328,12 @@ async function updateZonePhotoNotesUtil(db, appointmentId, zoneId, photoIndex, b
|
|
|
5328
5328
|
}
|
|
5329
5329
|
return updateZonePhotoEntryUtil(db, appointmentId, zoneId, photoIndex, updates);
|
|
5330
5330
|
}
|
|
5331
|
+
async function removeAfterPhotoFromEntryUtil(db, appointmentId, zoneId, photoIndex) {
|
|
5332
|
+
return updateZonePhotoEntryUtil(db, appointmentId, zoneId, photoIndex, {
|
|
5333
|
+
after: null,
|
|
5334
|
+
afterNote: null
|
|
5335
|
+
});
|
|
5336
|
+
}
|
|
5331
5337
|
async function getZonePhotoEntryUtil(db, appointmentId, zoneId, photoIndex) {
|
|
5332
5338
|
var _a;
|
|
5333
5339
|
const appointment = await getAppointmentOrThrow(db, appointmentId);
|
|
@@ -6767,6 +6773,30 @@ var AppointmentService = class extends BaseService {
|
|
|
6767
6773
|
throw error;
|
|
6768
6774
|
}
|
|
6769
6775
|
}
|
|
6776
|
+
/**
|
|
6777
|
+
* Removes an after photo from an existing entry (keeps the before photo)
|
|
6778
|
+
*
|
|
6779
|
+
* @param appointmentId ID of the appointment
|
|
6780
|
+
* @param zoneId ID of the zone
|
|
6781
|
+
* @param photoIndex Index of the entry to remove after photo from
|
|
6782
|
+
* @returns The updated appointment
|
|
6783
|
+
*/
|
|
6784
|
+
async removeAfterPhotoFromEntry(appointmentId, zoneId, photoIndex) {
|
|
6785
|
+
try {
|
|
6786
|
+
console.log(
|
|
6787
|
+
`[APPOINTMENT_SERVICE] Removing after photo from entry at index ${photoIndex} for zone ${zoneId}`
|
|
6788
|
+
);
|
|
6789
|
+
return await removeAfterPhotoFromEntryUtil(
|
|
6790
|
+
this.db,
|
|
6791
|
+
appointmentId,
|
|
6792
|
+
zoneId,
|
|
6793
|
+
photoIndex
|
|
6794
|
+
);
|
|
6795
|
+
} catch (error) {
|
|
6796
|
+
console.error(`[APPOINTMENT_SERVICE] Error removing after photo from entry:`, error);
|
|
6797
|
+
throw error;
|
|
6798
|
+
}
|
|
6799
|
+
}
|
|
6770
6800
|
/**
|
|
6771
6801
|
* Updates notes for a photo entry
|
|
6772
6802
|
*
|
package/dist/index.mjs
CHANGED
|
@@ -5215,6 +5215,12 @@ async function updateZonePhotoNotesUtil(db, appointmentId, zoneId, photoIndex, b
|
|
|
5215
5215
|
}
|
|
5216
5216
|
return updateZonePhotoEntryUtil(db, appointmentId, zoneId, photoIndex, updates);
|
|
5217
5217
|
}
|
|
5218
|
+
async function removeAfterPhotoFromEntryUtil(db, appointmentId, zoneId, photoIndex) {
|
|
5219
|
+
return updateZonePhotoEntryUtil(db, appointmentId, zoneId, photoIndex, {
|
|
5220
|
+
after: null,
|
|
5221
|
+
afterNote: null
|
|
5222
|
+
});
|
|
5223
|
+
}
|
|
5218
5224
|
async function getZonePhotoEntryUtil(db, appointmentId, zoneId, photoIndex) {
|
|
5219
5225
|
var _a;
|
|
5220
5226
|
const appointment = await getAppointmentOrThrow(db, appointmentId);
|
|
@@ -6654,6 +6660,30 @@ var AppointmentService = class extends BaseService {
|
|
|
6654
6660
|
throw error;
|
|
6655
6661
|
}
|
|
6656
6662
|
}
|
|
6663
|
+
/**
|
|
6664
|
+
* Removes an after photo from an existing entry (keeps the before photo)
|
|
6665
|
+
*
|
|
6666
|
+
* @param appointmentId ID of the appointment
|
|
6667
|
+
* @param zoneId ID of the zone
|
|
6668
|
+
* @param photoIndex Index of the entry to remove after photo from
|
|
6669
|
+
* @returns The updated appointment
|
|
6670
|
+
*/
|
|
6671
|
+
async removeAfterPhotoFromEntry(appointmentId, zoneId, photoIndex) {
|
|
6672
|
+
try {
|
|
6673
|
+
console.log(
|
|
6674
|
+
`[APPOINTMENT_SERVICE] Removing after photo from entry at index ${photoIndex} for zone ${zoneId}`
|
|
6675
|
+
);
|
|
6676
|
+
return await removeAfterPhotoFromEntryUtil(
|
|
6677
|
+
this.db,
|
|
6678
|
+
appointmentId,
|
|
6679
|
+
zoneId,
|
|
6680
|
+
photoIndex
|
|
6681
|
+
);
|
|
6682
|
+
} catch (error) {
|
|
6683
|
+
console.error(`[APPOINTMENT_SERVICE] Error removing after photo from entry:`, error);
|
|
6684
|
+
throw error;
|
|
6685
|
+
}
|
|
6686
|
+
}
|
|
6657
6687
|
/**
|
|
6658
6688
|
* Updates notes for a photo entry
|
|
6659
6689
|
*
|
package/package.json
CHANGED
|
@@ -89,6 +89,7 @@ import {
|
|
|
89
89
|
import {
|
|
90
90
|
updateZonePhotoEntryUtil,
|
|
91
91
|
addAfterPhotoToEntryUtil,
|
|
92
|
+
removeAfterPhotoFromEntryUtil,
|
|
92
93
|
updateZonePhotoNotesUtil,
|
|
93
94
|
getZonePhotoEntryUtil,
|
|
94
95
|
} from './utils/zone-photo.utils';
|
|
@@ -2034,6 +2035,35 @@ export class AppointmentService extends BaseService {
|
|
|
2034
2035
|
}
|
|
2035
2036
|
}
|
|
2036
2037
|
|
|
2038
|
+
/**
|
|
2039
|
+
* Removes an after photo from an existing entry (keeps the before photo)
|
|
2040
|
+
*
|
|
2041
|
+
* @param appointmentId ID of the appointment
|
|
2042
|
+
* @param zoneId ID of the zone
|
|
2043
|
+
* @param photoIndex Index of the entry to remove after photo from
|
|
2044
|
+
* @returns The updated appointment
|
|
2045
|
+
*/
|
|
2046
|
+
async removeAfterPhotoFromEntry(
|
|
2047
|
+
appointmentId: string,
|
|
2048
|
+
zoneId: string,
|
|
2049
|
+
photoIndex: number,
|
|
2050
|
+
): Promise<Appointment> {
|
|
2051
|
+
try {
|
|
2052
|
+
console.log(
|
|
2053
|
+
`[APPOINTMENT_SERVICE] Removing after photo from entry at index ${photoIndex} for zone ${zoneId}`,
|
|
2054
|
+
);
|
|
2055
|
+
return await removeAfterPhotoFromEntryUtil(
|
|
2056
|
+
this.db,
|
|
2057
|
+
appointmentId,
|
|
2058
|
+
zoneId,
|
|
2059
|
+
photoIndex,
|
|
2060
|
+
);
|
|
2061
|
+
} catch (error) {
|
|
2062
|
+
console.error(`[APPOINTMENT_SERVICE] Error removing after photo from entry:`, error);
|
|
2063
|
+
throw error;
|
|
2064
|
+
}
|
|
2065
|
+
}
|
|
2066
|
+
|
|
2037
2067
|
/**
|
|
2038
2068
|
* Updates notes for a photo entry
|
|
2039
2069
|
*
|
|
@@ -116,6 +116,27 @@ export async function updateZonePhotoNotesUtil(
|
|
|
116
116
|
return updateZonePhotoEntryUtil(db, appointmentId, zoneId, photoIndex, updates);
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
+
/**
|
|
120
|
+
* Removes an after photo from an existing entry (keeps the before photo)
|
|
121
|
+
*
|
|
122
|
+
* @param db Firestore instance
|
|
123
|
+
* @param appointmentId Appointment ID
|
|
124
|
+
* @param zoneId Zone ID
|
|
125
|
+
* @param photoIndex Index of the entry to remove after photo from
|
|
126
|
+
* @returns Updated appointment
|
|
127
|
+
*/
|
|
128
|
+
export async function removeAfterPhotoFromEntryUtil(
|
|
129
|
+
db: Firestore,
|
|
130
|
+
appointmentId: string,
|
|
131
|
+
zoneId: string,
|
|
132
|
+
photoIndex: number
|
|
133
|
+
): Promise<Appointment> {
|
|
134
|
+
return updateZonePhotoEntryUtil(db, appointmentId, zoneId, photoIndex, {
|
|
135
|
+
after: null,
|
|
136
|
+
afterNote: null,
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
|
|
119
140
|
/**
|
|
120
141
|
* Gets a specific photo entry from a zone
|
|
121
142
|
*
|