@blackcode_sa/metaestetics-api 1.13.14 → 1.13.15

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.
@@ -843,131 +843,6 @@ interface ProcedureSummaryInfo {
843
843
  practitionerName: string;
844
844
  }
845
845
 
846
- /**
847
- * Osnovne informacije o zdravstvenom radniku
848
- */
849
- interface PractitionerBasicInfo {
850
- firstName: string;
851
- lastName: string;
852
- title: string;
853
- email: string;
854
- phoneNumber: string | null;
855
- dateOfBirth: Timestamp | Date | null;
856
- gender: "male" | "female" | "other";
857
- profileImageUrl?: MediaResource | null;
858
- bio?: string;
859
- languages: string[];
860
- }
861
- /**
862
- * Sertifikacija zdravstvenog radnika
863
- */
864
- interface PractitionerCertification {
865
- level: CertificationLevel;
866
- specialties: CertificationSpecialty[];
867
- licenseNumber: string;
868
- issuingAuthority: string;
869
- issueDate: Timestamp | Date;
870
- expiryDate?: Timestamp | Date | null;
871
- verificationStatus: "pending" | "verified" | "rejected";
872
- }
873
- /**
874
- * Interfejs za radno vreme zdravstvenog radnika u klinici
875
- */
876
- interface PractitionerClinicWorkingHours {
877
- clinicId: string;
878
- workingHours: {
879
- monday: {
880
- start: string;
881
- end: string;
882
- } | null;
883
- tuesday: {
884
- start: string;
885
- end: string;
886
- } | null;
887
- wednesday: {
888
- start: string;
889
- end: string;
890
- } | null;
891
- thursday: {
892
- start: string;
893
- end: string;
894
- } | null;
895
- friday: {
896
- start: string;
897
- end: string;
898
- } | null;
899
- saturday: {
900
- start: string;
901
- end: string;
902
- } | null;
903
- sunday: {
904
- start: string;
905
- end: string;
906
- } | null;
907
- };
908
- isActive: boolean;
909
- createdAt: Timestamp | Date;
910
- updatedAt: Timestamp | Date;
911
- }
912
- /**
913
- * Status of practitioner profile
914
- */
915
- declare enum PractitionerStatus {
916
- DRAFT = "draft",
917
- ACTIVE = "active"
918
- }
919
- /**
920
- * Token status for practitioner invitations
921
- */
922
- declare enum PractitionerTokenStatus {
923
- ACTIVE = "active",
924
- USED = "used",
925
- EXPIRED = "expired",
926
- REVOKED = "revoked"
927
- }
928
- /**
929
- * Interfejs za zdravstvenog radnika
930
- */
931
- interface Practitioner {
932
- id: string;
933
- userRef: string;
934
- basicInfo: PractitionerBasicInfo;
935
- fullNameLower: string;
936
- certification: PractitionerCertification;
937
- clinics: string[];
938
- clinicWorkingHours: PractitionerClinicWorkingHours[];
939
- clinicsInfo: ClinicInfo[];
940
- procedures: string[];
941
- freeConsultations?: Record<string, string> | null;
942
- proceduresInfo: ProcedureSummaryInfo[];
943
- reviewInfo: PractitionerReviewInfo;
944
- isActive: boolean;
945
- isVerified: boolean;
946
- status: PractitionerStatus;
947
- createdAt: Timestamp;
948
- updatedAt: Timestamp;
949
- }
950
- /**
951
- * Token za pozivanje zdravstvenog radnika
952
- */
953
- interface PractitionerToken {
954
- id: string;
955
- token: string;
956
- practitionerId: string;
957
- email: string;
958
- clinicId: string;
959
- status: PractitionerTokenStatus;
960
- createdBy: string;
961
- createdAt: Timestamp;
962
- expiresAt: Timestamp;
963
- usedBy?: string;
964
- usedAt?: Timestamp;
965
- emailSent?: boolean;
966
- emailSentAt?: Timestamp;
967
- emailError?: string;
968
- emailErrorAt?: Timestamp;
969
- }
970
-
971
846
  /**
972
847
  * Enum for all possible clinic tags
973
848
  */
@@ -1266,8 +1141,6 @@ interface DoctorInfo {
1266
1141
  photo: string | null;
1267
1142
  rating: number;
1268
1143
  services: string[];
1269
- status?: PractitionerStatus;
1270
- isActive?: boolean;
1271
1144
  }
1272
1145
  /**
1273
1146
  * Interface for clinic
@@ -1301,6 +1174,131 @@ interface Clinic {
1301
1174
  logo?: MediaResource | null;
1302
1175
  }
1303
1176
 
1177
+ /**
1178
+ * Osnovne informacije o zdravstvenom radniku
1179
+ */
1180
+ interface PractitionerBasicInfo {
1181
+ firstName: string;
1182
+ lastName: string;
1183
+ title: string;
1184
+ email: string;
1185
+ phoneNumber: string | null;
1186
+ dateOfBirth: Timestamp | Date | null;
1187
+ gender: "male" | "female" | "other";
1188
+ profileImageUrl?: MediaResource | null;
1189
+ bio?: string;
1190
+ languages: string[];
1191
+ }
1192
+ /**
1193
+ * Sertifikacija zdravstvenog radnika
1194
+ */
1195
+ interface PractitionerCertification {
1196
+ level: CertificationLevel;
1197
+ specialties: CertificationSpecialty[];
1198
+ licenseNumber: string;
1199
+ issuingAuthority: string;
1200
+ issueDate: Timestamp | Date;
1201
+ expiryDate?: Timestamp | Date | null;
1202
+ verificationStatus: "pending" | "verified" | "rejected";
1203
+ }
1204
+ /**
1205
+ * Interfejs za radno vreme zdravstvenog radnika u klinici
1206
+ */
1207
+ interface PractitionerClinicWorkingHours {
1208
+ clinicId: string;
1209
+ workingHours: {
1210
+ monday: {
1211
+ start: string;
1212
+ end: string;
1213
+ } | null;
1214
+ tuesday: {
1215
+ start: string;
1216
+ end: string;
1217
+ } | null;
1218
+ wednesday: {
1219
+ start: string;
1220
+ end: string;
1221
+ } | null;
1222
+ thursday: {
1223
+ start: string;
1224
+ end: string;
1225
+ } | null;
1226
+ friday: {
1227
+ start: string;
1228
+ end: string;
1229
+ } | null;
1230
+ saturday: {
1231
+ start: string;
1232
+ end: string;
1233
+ } | null;
1234
+ sunday: {
1235
+ start: string;
1236
+ end: string;
1237
+ } | null;
1238
+ };
1239
+ isActive: boolean;
1240
+ createdAt: Timestamp | Date;
1241
+ updatedAt: Timestamp | Date;
1242
+ }
1243
+ /**
1244
+ * Status of practitioner profile
1245
+ */
1246
+ declare enum PractitionerStatus {
1247
+ DRAFT = "draft",
1248
+ ACTIVE = "active"
1249
+ }
1250
+ /**
1251
+ * Token status for practitioner invitations
1252
+ */
1253
+ declare enum PractitionerTokenStatus {
1254
+ ACTIVE = "active",
1255
+ USED = "used",
1256
+ EXPIRED = "expired",
1257
+ REVOKED = "revoked"
1258
+ }
1259
+ /**
1260
+ * Interfejs za zdravstvenog radnika
1261
+ */
1262
+ interface Practitioner {
1263
+ id: string;
1264
+ userRef: string;
1265
+ basicInfo: PractitionerBasicInfo;
1266
+ fullNameLower: string;
1267
+ certification: PractitionerCertification;
1268
+ clinics: string[];
1269
+ clinicWorkingHours: PractitionerClinicWorkingHours[];
1270
+ clinicsInfo: ClinicInfo[];
1271
+ procedures: string[];
1272
+ freeConsultations?: Record<string, string> | null;
1273
+ proceduresInfo: ProcedureSummaryInfo[];
1274
+ reviewInfo: PractitionerReviewInfo;
1275
+ isActive: boolean;
1276
+ isVerified: boolean;
1277
+ status: PractitionerStatus;
1278
+ createdAt: Timestamp;
1279
+ updatedAt: Timestamp;
1280
+ }
1281
+ /**
1282
+ * Token za pozivanje zdravstvenog radnika
1283
+ */
1284
+ interface PractitionerToken {
1285
+ id: string;
1286
+ token: string;
1287
+ practitionerId: string;
1288
+ email: string;
1289
+ clinicId: string;
1290
+ status: PractitionerTokenStatus;
1291
+ createdBy: string;
1292
+ createdAt: Timestamp;
1293
+ expiresAt: Timestamp;
1294
+ usedBy?: string;
1295
+ usedAt?: Timestamp;
1296
+ emailSent?: boolean;
1297
+ emailSentAt?: Timestamp;
1298
+ emailError?: string;
1299
+ emailErrorAt?: Timestamp;
1300
+ }
1301
+
1304
1302
  declare enum AllergyType {
1305
1303
  MEDICATION = "medication",
1306
1304
  FOOD = "food",
@@ -843,131 +843,6 @@ interface ProcedureSummaryInfo {
843
843
  practitionerName: string;
844
844
  }
845
845
 
846
- /**
847
- * Osnovne informacije o zdravstvenom radniku
848
- */
849
- interface PractitionerBasicInfo {
850
- firstName: string;
851
- lastName: string;
852
- title: string;
853
- email: string;
854
- phoneNumber: string | null;
855
- dateOfBirth: Timestamp | Date | null;
856
- gender: "male" | "female" | "other";
857
- profileImageUrl?: MediaResource | null;
858
- bio?: string;
859
- languages: string[];
860
- }
861
- /**
862
- * Sertifikacija zdravstvenog radnika
863
- */
864
- interface PractitionerCertification {
865
- level: CertificationLevel;
866
- specialties: CertificationSpecialty[];
867
- licenseNumber: string;
868
- issuingAuthority: string;
869
- issueDate: Timestamp | Date;
870
- expiryDate?: Timestamp | Date | null;
871
- verificationStatus: "pending" | "verified" | "rejected";
872
- }
873
- /**
874
- * Interfejs za radno vreme zdravstvenog radnika u klinici
875
- */
876
- interface PractitionerClinicWorkingHours {
877
- clinicId: string;
878
- workingHours: {
879
- monday: {
880
- start: string;
881
- end: string;
882
- } | null;
883
- tuesday: {
884
- start: string;
885
- end: string;
886
- } | null;
887
- wednesday: {
888
- start: string;
889
- end: string;
890
- } | null;
891
- thursday: {
892
- start: string;
893
- end: string;
894
- } | null;
895
- friday: {
896
- start: string;
897
- end: string;
898
- } | null;
899
- saturday: {
900
- start: string;
901
- end: string;
902
- } | null;
903
- sunday: {
904
- start: string;
905
- end: string;
906
- } | null;
907
- };
908
- isActive: boolean;
909
- createdAt: Timestamp | Date;
910
- updatedAt: Timestamp | Date;
911
- }
912
- /**
913
- * Status of practitioner profile
914
- */
915
- declare enum PractitionerStatus {
916
- DRAFT = "draft",
917
- ACTIVE = "active"
918
- }
919
- /**
920
- * Token status for practitioner invitations
921
- */
922
- declare enum PractitionerTokenStatus {
923
- ACTIVE = "active",
924
- USED = "used",
925
- EXPIRED = "expired",
926
- REVOKED = "revoked"
927
- }
928
- /**
929
- * Interfejs za zdravstvenog radnika
930
- */
931
- interface Practitioner {
932
- id: string;
933
- userRef: string;
934
- basicInfo: PractitionerBasicInfo;
935
- fullNameLower: string;
936
- certification: PractitionerCertification;
937
- clinics: string[];
938
- clinicWorkingHours: PractitionerClinicWorkingHours[];
939
- clinicsInfo: ClinicInfo[];
940
- procedures: string[];
941
- freeConsultations?: Record<string, string> | null;
942
- proceduresInfo: ProcedureSummaryInfo[];
943
- reviewInfo: PractitionerReviewInfo;
944
- isActive: boolean;
945
- isVerified: boolean;
946
- status: PractitionerStatus;
947
- createdAt: Timestamp;
948
- updatedAt: Timestamp;
949
- }
950
- /**
951
- * Token za pozivanje zdravstvenog radnika
952
- */
953
- interface PractitionerToken {
954
- id: string;
955
- token: string;
956
- practitionerId: string;
957
- email: string;
958
- clinicId: string;
959
- status: PractitionerTokenStatus;
960
- createdBy: string;
961
- createdAt: Timestamp;
962
- expiresAt: Timestamp;
963
- usedBy?: string;
964
- usedAt?: Timestamp;
965
- emailSent?: boolean;
966
- emailSentAt?: Timestamp;
967
- emailError?: string;
968
- emailErrorAt?: Timestamp;
969
- }
970
-
971
846
  /**
972
847
  * Enum for all possible clinic tags
973
848
  */
@@ -1266,8 +1141,6 @@ interface DoctorInfo {
1266
1141
  photo: string | null;
1267
1142
  rating: number;
1268
1143
  services: string[];
1269
- status?: PractitionerStatus;
1270
- isActive?: boolean;
1271
1144
  }
1272
1145
  /**
1273
1146
  * Interface for clinic
@@ -1301,6 +1174,131 @@ interface Clinic {
1301
1174
  logo?: MediaResource | null;
1302
1175
  }
1303
1176
 
1177
+ /**
1178
+ * Osnovne informacije o zdravstvenom radniku
1179
+ */
1180
+ interface PractitionerBasicInfo {
1181
+ firstName: string;
1182
+ lastName: string;
1183
+ title: string;
1184
+ email: string;
1185
+ phoneNumber: string | null;
1186
+ dateOfBirth: Timestamp | Date | null;
1187
+ gender: "male" | "female" | "other";
1188
+ profileImageUrl?: MediaResource | null;
1189
+ bio?: string;
1190
+ languages: string[];
1191
+ }
1192
+ /**
1193
+ * Sertifikacija zdravstvenog radnika
1194
+ */
1195
+ interface PractitionerCertification {
1196
+ level: CertificationLevel;
1197
+ specialties: CertificationSpecialty[];
1198
+ licenseNumber: string;
1199
+ issuingAuthority: string;
1200
+ issueDate: Timestamp | Date;
1201
+ expiryDate?: Timestamp | Date | null;
1202
+ verificationStatus: "pending" | "verified" | "rejected";
1203
+ }
1204
+ /**
1205
+ * Interfejs za radno vreme zdravstvenog radnika u klinici
1206
+ */
1207
+ interface PractitionerClinicWorkingHours {
1208
+ clinicId: string;
1209
+ workingHours: {
1210
+ monday: {
1211
+ start: string;
1212
+ end: string;
1213
+ } | null;
1214
+ tuesday: {
1215
+ start: string;
1216
+ end: string;
1217
+ } | null;
1218
+ wednesday: {
1219
+ start: string;
1220
+ end: string;
1221
+ } | null;
1222
+ thursday: {
1223
+ start: string;
1224
+ end: string;
1225
+ } | null;
1226
+ friday: {
1227
+ start: string;
1228
+ end: string;
1229
+ } | null;
1230
+ saturday: {
1231
+ start: string;
1232
+ end: string;
1233
+ } | null;
1234
+ sunday: {
1235
+ start: string;
1236
+ end: string;
1237
+ } | null;
1238
+ };
1239
+ isActive: boolean;
1240
+ createdAt: Timestamp | Date;
1241
+ updatedAt: Timestamp | Date;
1242
+ }
1243
+ /**
1244
+ * Status of practitioner profile
1245
+ */
1246
+ declare enum PractitionerStatus {
1247
+ DRAFT = "draft",
1248
+ ACTIVE = "active"
1249
+ }
1250
+ /**
1251
+ * Token status for practitioner invitations
1252
+ */
1253
+ declare enum PractitionerTokenStatus {
1254
+ ACTIVE = "active",
1255
+ USED = "used",
1256
+ EXPIRED = "expired",
1257
+ REVOKED = "revoked"
1258
+ }
1259
+ /**
1260
+ * Interfejs za zdravstvenog radnika
1261
+ */
1262
+ interface Practitioner {
1263
+ id: string;
1264
+ userRef: string;
1265
+ basicInfo: PractitionerBasicInfo;
1266
+ fullNameLower: string;
1267
+ certification: PractitionerCertification;
1268
+ clinics: string[];
1269
+ clinicWorkingHours: PractitionerClinicWorkingHours[];
1270
+ clinicsInfo: ClinicInfo[];
1271
+ procedures: string[];
1272
+ freeConsultations?: Record<string, string> | null;
1273
+ proceduresInfo: ProcedureSummaryInfo[];
1274
+ reviewInfo: PractitionerReviewInfo;
1275
+ isActive: boolean;
1276
+ isVerified: boolean;
1277
+ status: PractitionerStatus;
1278
+ createdAt: Timestamp;
1279
+ updatedAt: Timestamp;
1280
+ }
1281
+ /**
1282
+ * Token za pozivanje zdravstvenog radnika
1283
+ */
1284
+ interface PractitionerToken {
1285
+ id: string;
1286
+ token: string;
1287
+ practitionerId: string;
1288
+ email: string;
1289
+ clinicId: string;
1290
+ status: PractitionerTokenStatus;
1291
+ createdBy: string;
1292
+ createdAt: Timestamp;
1293
+ expiresAt: Timestamp;
1294
+ usedBy?: string;
1295
+ usedAt?: Timestamp;
1296
+ emailSent?: boolean;
1297
+ emailSentAt?: Timestamp;
1298
+ emailError?: string;
1299
+ emailErrorAt?: Timestamp;
1300
+ }
1301
+
1304
1302
  declare enum AllergyType {
1305
1303
  MEDICATION = "medication",
1306
1304
  FOOD = "food",
@@ -1307,6 +1307,29 @@ interface ProcedureSummaryInfo {
1307
1307
  practitionerName: string;
1308
1308
  }
1309
1309
 
1310
+ /**
1311
+ * Interface for clinic contact information
1312
+ */
1313
+ interface ClinicContactInfo {
1314
+ email: string;
1315
+ phoneNumber: string;
1316
+ alternativePhoneNumber?: string | null;
1317
+ website?: string | null;
1318
+ }
1319
+ /**
1320
+ * Interface for clinic location
1321
+ */
1322
+ interface ClinicLocation {
1323
+ address: string;
1324
+ city: string;
1325
+ country: string;
1326
+ postalCode: string;
1327
+ latitude: number;
1328
+ longitude: number;
1329
+ geohash?: string | null;
1330
+ tz?: string | null;
1331
+ }
1332
+
1310
1333
  /**
1311
1334
  * Osnovne informacije o zdravstvenom radniku
1312
1335
  */
@@ -1403,29 +1426,6 @@ interface Practitioner {
1403
1426
  updatedAt: Timestamp;
1404
1427
  }
1405
1428
 
1406
- /**
1407
- * Interface for clinic contact information
1408
- */
1409
- interface ClinicContactInfo {
1410
- email: string;
1411
- phoneNumber: string;
1412
- alternativePhoneNumber?: string | null;
1413
- website?: string | null;
1414
- }
1415
- /**
1416
- * Interface for clinic location
1417
- */
1418
- interface ClinicLocation {
1419
- address: string;
1420
- city: string;
1421
- country: string;
1422
- postalCode: string;
1423
- latitude: number;
1424
- longitude: number;
1425
- geohash?: string | null;
1426
- tz?: string | null;
1427
- }
1428
-
1429
1429
  /**
1430
1430
  * Interface for clinic profile information
1431
1431
  */
@@ -1307,6 +1307,29 @@ interface ProcedureSummaryInfo {
1307
1307
  practitionerName: string;
1308
1308
  }
1309
1309
 
1310
+ /**
1311
+ * Interface for clinic contact information
1312
+ */
1313
+ interface ClinicContactInfo {
1314
+ email: string;
1315
+ phoneNumber: string;
1316
+ alternativePhoneNumber?: string | null;
1317
+ website?: string | null;
1318
+ }
1319
+ /**
1320
+ * Interface for clinic location
1321
+ */
1322
+ interface ClinicLocation {
1323
+ address: string;
1324
+ city: string;
1325
+ country: string;
1326
+ postalCode: string;
1327
+ latitude: number;
1328
+ longitude: number;
1329
+ geohash?: string | null;
1330
+ tz?: string | null;
1331
+ }
1332
+
1310
1333
  /**
1311
1334
  * Osnovne informacije o zdravstvenom radniku
1312
1335
  */
@@ -1403,29 +1426,6 @@ interface Practitioner {
1403
1426
  updatedAt: Timestamp;
1404
1427
  }
1405
1428
 
1406
- /**
1407
- * Interface for clinic contact information
1408
- */
1409
- interface ClinicContactInfo {
1410
- email: string;
1411
- phoneNumber: string;
1412
- alternativePhoneNumber?: string | null;
1413
- website?: string | null;
1414
- }
1415
- /**
1416
- * Interface for clinic location
1417
- */
1418
- interface ClinicLocation {
1419
- address: string;
1420
- city: string;
1421
- country: string;
1422
- postalCode: string;
1423
- latitude: number;
1424
- longitude: number;
1425
- geohash?: string | null;
1426
- tz?: string | null;
1427
- }
1428
-
1429
1429
  /**
1430
1430
  * Interface for clinic profile information
1431
1431
  */
package/dist/index.d.mts CHANGED
@@ -5300,8 +5300,6 @@ interface DoctorInfo {
5300
5300
  photo: string | null;
5301
5301
  rating: number;
5302
5302
  services: string[];
5303
- status?: PractitionerStatus;
5304
- isActive?: boolean;
5305
5303
  }
5306
5304
  /**
5307
5305
  * Interface for clinic
package/dist/index.d.ts CHANGED
@@ -5300,8 +5300,6 @@ interface DoctorInfo {
5300
5300
  photo: string | null;
5301
5301
  rating: number;
5302
5302
  services: string[];
5303
- status?: PractitionerStatus;
5304
- isActive?: boolean;
5305
5303
  }
5306
5304
  /**
5307
5305
  * Interface for clinic
package/dist/index.js CHANGED
@@ -13532,19 +13532,9 @@ var import_geofire_common4 = require("geofire-common");
13532
13532
  var import_zod20 = require("zod");
13533
13533
  function filterDoctorsInfo(doctorsInfo) {
13534
13534
  if (!doctorsInfo || doctorsInfo.length === 0) {
13535
- return [];
13535
+ return doctorsInfo || [];
13536
13536
  }
13537
- return doctorsInfo.filter((doctor) => {
13538
- if (doctor.status === "draft" /* DRAFT */) {
13539
- console.log(`[CLINIC_UTILS] Filtering out draft practitioner ${doctor.id} from doctorsInfo`);
13540
- return false;
13541
- }
13542
- if (doctor.isActive === false) {
13543
- console.log(`[CLINIC_UTILS] Filtering out inactive practitioner ${doctor.id} from doctorsInfo`);
13544
- return false;
13545
- }
13546
- return true;
13547
- });
13537
+ return doctorsInfo;
13548
13538
  }
13549
13539
  function filterClinicEmbeddedArrays(clinic, excludeDraftPractitioners = false) {
13550
13540
  if (!clinic) {
@@ -20331,11 +20321,7 @@ var ProcedureService = class extends BaseService {
20331
20321
  photo: typeof practitioner.basicInfo.profileImageUrl === "string" ? practitioner.basicInfo.profileImageUrl : "",
20332
20322
  // Default to empty string if not a processed URL
20333
20323
  rating: ((_a = practitioner.reviewInfo) == null ? void 0 : _a.averageRating) || 0,
20334
- services: practitioner.procedures || [],
20335
- status: practitioner.status,
20336
- // Include practitioner status for client-side filtering
20337
- isActive: practitioner.isActive
20338
- // Include isActive flag for client-side filtering
20324
+ services: practitioner.procedures || []
20339
20325
  };
20340
20326
  const { productsMetadata: _, productId: __, photos: ___, ...validatedDataWithoutProductsMetadata } = validatedData;
20341
20327
  const newProcedure = {
@@ -20494,9 +20480,7 @@ var ProcedureService = class extends BaseService {
20494
20480
  description: practitioner.basicInfo.bio || "",
20495
20481
  photo: typeof practitioner.basicInfo.profileImageUrl === "string" ? practitioner.basicInfo.profileImageUrl : "",
20496
20482
  rating: ((_c = practitioner.reviewInfo) == null ? void 0 : _c.averageRating) || 0,
20497
- services: practitioner.procedures || [],
20498
- status: practitioner.status,
20499
- isActive: practitioner.isActive
20483
+ services: practitioner.procedures || []
20500
20484
  };
20501
20485
  const newProcedure = {
20502
20486
  ...sourceProcedure,
@@ -20993,9 +20977,7 @@ var ProcedureService = class extends BaseService {
20993
20977
  photo: typeof newPractitioner.basicInfo.profileImageUrl === "string" ? newPractitioner.basicInfo.profileImageUrl : "",
20994
20978
  // Default to empty string if not a processed URL
20995
20979
  rating: ((_b = newPractitioner.reviewInfo) == null ? void 0 : _b.averageRating) || 0,
20996
- services: newPractitioner.procedures || [],
20997
- status: newPractitioner.status,
20998
- isActive: newPractitioner.isActive
20980
+ services: newPractitioner.procedures || []
20999
20981
  };
21000
20982
  }
21001
20983
  if (validatedData.clinicBranchId && validatedData.clinicBranchId !== oldClinicId) {
@@ -21285,7 +21267,7 @@ var ProcedureService = class extends BaseService {
21285
21267
  }
21286
21268
  const lastDoc = querySnapshot.docs.length > 0 ? querySnapshot.docs[querySnapshot.docs.length - 1] : null;
21287
21269
  console.log(`[PROCEDURE_SERVICE] Strategy 1 success: ${procedures.length} procedures`);
21288
- if (procedures.length < (filters.pagination || 10)) {
21270
+ if (querySnapshot.docs.length < (filters.pagination || 10)) {
21289
21271
  return { procedures, lastDoc: null };
21290
21272
  }
21291
21273
  return { procedures, lastDoc };
package/dist/index.mjs CHANGED
@@ -13606,19 +13606,9 @@ import {
13606
13606
  import { z as z20 } from "zod";
13607
13607
  function filterDoctorsInfo(doctorsInfo) {
13608
13608
  if (!doctorsInfo || doctorsInfo.length === 0) {
13609
- return [];
13609
+ return doctorsInfo || [];
13610
13610
  }
13611
- return doctorsInfo.filter((doctor) => {
13612
- if (doctor.status === "draft" /* DRAFT */) {
13613
- console.log(`[CLINIC_UTILS] Filtering out draft practitioner ${doctor.id} from doctorsInfo`);
13614
- return false;
13615
- }
13616
- if (doctor.isActive === false) {
13617
- console.log(`[CLINIC_UTILS] Filtering out inactive practitioner ${doctor.id} from doctorsInfo`);
13618
- return false;
13619
- }
13620
- return true;
13621
- });
13611
+ return doctorsInfo;
13622
13612
  }
13623
13613
  function filterClinicEmbeddedArrays(clinic, excludeDraftPractitioners = false) {
13624
13614
  if (!clinic) {
@@ -20567,11 +20557,7 @@ var ProcedureService = class extends BaseService {
20567
20557
  photo: typeof practitioner.basicInfo.profileImageUrl === "string" ? practitioner.basicInfo.profileImageUrl : "",
20568
20558
  // Default to empty string if not a processed URL
20569
20559
  rating: ((_a = practitioner.reviewInfo) == null ? void 0 : _a.averageRating) || 0,
20570
- services: practitioner.procedures || [],
20571
- status: practitioner.status,
20572
- // Include practitioner status for client-side filtering
20573
- isActive: practitioner.isActive
20574
- // Include isActive flag for client-side filtering
20560
+ services: practitioner.procedures || []
20575
20561
  };
20576
20562
  const { productsMetadata: _, productId: __, photos: ___, ...validatedDataWithoutProductsMetadata } = validatedData;
20577
20563
  const newProcedure = {
@@ -20730,9 +20716,7 @@ var ProcedureService = class extends BaseService {
20730
20716
  description: practitioner.basicInfo.bio || "",
20731
20717
  photo: typeof practitioner.basicInfo.profileImageUrl === "string" ? practitioner.basicInfo.profileImageUrl : "",
20732
20718
  rating: ((_c = practitioner.reviewInfo) == null ? void 0 : _c.averageRating) || 0,
20733
- services: practitioner.procedures || [],
20734
- status: practitioner.status,
20735
- isActive: practitioner.isActive
20719
+ services: practitioner.procedures || []
20736
20720
  };
20737
20721
  const newProcedure = {
20738
20722
  ...sourceProcedure,
@@ -21229,9 +21213,7 @@ var ProcedureService = class extends BaseService {
21229
21213
  photo: typeof newPractitioner.basicInfo.profileImageUrl === "string" ? newPractitioner.basicInfo.profileImageUrl : "",
21230
21214
  // Default to empty string if not a processed URL
21231
21215
  rating: ((_b = newPractitioner.reviewInfo) == null ? void 0 : _b.averageRating) || 0,
21232
- services: newPractitioner.procedures || [],
21233
- status: newPractitioner.status,
21234
- isActive: newPractitioner.isActive
21216
+ services: newPractitioner.procedures || []
21235
21217
  };
21236
21218
  }
21237
21219
  if (validatedData.clinicBranchId && validatedData.clinicBranchId !== oldClinicId) {
@@ -21521,7 +21503,7 @@ var ProcedureService = class extends BaseService {
21521
21503
  }
21522
21504
  const lastDoc = querySnapshot.docs.length > 0 ? querySnapshot.docs[querySnapshot.docs.length - 1] : null;
21523
21505
  console.log(`[PROCEDURE_SERVICE] Strategy 1 success: ${procedures.length} procedures`);
21524
- if (procedures.length < (filters.pagination || 10)) {
21506
+ if (querySnapshot.docs.length < (filters.pagination || 10)) {
21525
21507
  return { procedures, lastDoc: null };
21526
21508
  }
21527
21509
  return { procedures, lastDoc };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@blackcode_sa/metaestetics-api",
3
3
  "private": false,
4
- "version": "1.13.14",
4
+ "version": "1.13.15",
5
5
  "description": "Firebase authentication service with anonymous upgrade support",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.mjs",
@@ -26,7 +26,6 @@ import {
26
26
  ClinicLocation,
27
27
  DoctorInfo,
28
28
  } from "../../../types/clinic";
29
- import { PractitionerStatus } from "../../../types/practitioner";
30
29
  import {
31
30
  geohashForLocation,
32
31
  distanceBetween,
@@ -388,30 +387,19 @@ export async function createClinic(
388
387
  */
389
388
  /**
390
389
  * Filters out draft/inactive practitioners from doctorsInfo array
390
+ * Note: Since doctorInfo no longer contains status/isActive fields,
391
+ * filtering is handled at the procedure level by ProcedureService.
392
+ * This function now returns all doctors as-is.
391
393
  * @param doctorsInfo Array of doctor info objects
392
- * @returns Filtered array excluding draft or inactive practitioners
394
+ * @returns Array of doctor info objects (no filtering applied)
393
395
  */
394
396
  function filterDoctorsInfo(doctorsInfo: DoctorInfo[]): DoctorInfo[] {
395
397
  if (!doctorsInfo || doctorsInfo.length === 0) {
396
- return [];
398
+ return doctorsInfo || [];
397
399
  }
398
400
 
399
- return doctorsInfo.filter((doctor) => {
400
- // Filter out if status is DRAFT
401
- if (doctor.status === PractitionerStatus.DRAFT) {
402
- console.log(`[CLINIC_UTILS] Filtering out draft practitioner ${doctor.id} from doctorsInfo`);
403
- return false;
404
- }
405
-
406
- // Filter out if isActive is explicitly false
407
- if (doctor.isActive === false) {
408
- console.log(`[CLINIC_UTILS] Filtering out inactive practitioner ${doctor.id} from doctorsInfo`);
409
- return false;
410
- }
411
-
412
- // Include if status is ACTIVE or undefined (backward compatibility) and isActive is true or undefined
413
- return true;
414
- });
401
+ // Return all doctors - filtering is handled at procedure level
402
+ return doctorsInfo;
415
403
  }
416
404
 
417
405
  /**
@@ -443,8 +443,6 @@ export class ProcedureService extends BaseService {
443
443
  : '', // Default to empty string if not a processed URL
444
444
  rating: practitioner.reviewInfo?.averageRating || 0,
445
445
  services: practitioner.procedures || [],
446
- status: practitioner.status, // Include practitioner status for client-side filtering
447
- isActive: practitioner.isActive, // Include isActive flag for client-side filtering
448
446
  };
449
447
 
450
448
  // Create the procedure object
@@ -634,8 +632,6 @@ export class ProcedureService extends BaseService {
634
632
  : '',
635
633
  rating: practitioner.reviewInfo?.averageRating || 0,
636
634
  services: practitioner.procedures || [],
637
- status: practitioner.status,
638
- isActive: practitioner.isActive,
639
635
  };
640
636
 
641
637
  // Construct the new procedure object
@@ -1273,8 +1269,6 @@ export class ProcedureService extends BaseService {
1273
1269
  : '', // Default to empty string if not a processed URL
1274
1270
  rating: newPractitioner.reviewInfo?.averageRating || 0,
1275
1271
  services: newPractitioner.procedures || [],
1276
- status: newPractitioner.status,
1277
- isActive: newPractitioner.isActive,
1278
1272
  };
1279
1273
  }
1280
1274
 
@@ -1671,7 +1665,7 @@ export class ProcedureService extends BaseService {
1671
1665
  console.log(`[PROCEDURE_SERVICE] Strategy 1 success: ${procedures.length} procedures`);
1672
1666
 
1673
1667
  // Fix Load More - ako je broj rezultata manji od pagination, nema više
1674
- if (procedures.length < (filters.pagination || 10)) {
1668
+ if (querySnapshot.docs.length < (filters.pagination || 10)) {
1675
1669
  return { procedures, lastDoc: null };
1676
1670
  }
1677
1671
  return { procedures, lastDoc };
@@ -3,7 +3,6 @@ import { Timestamp, FieldValue } from 'firebase/firestore';
3
3
  import type { ClinicInfo } from '../profile';
4
4
  import { ClinicReviewInfo } from '../reviews';
5
5
  import { ProcedureSummaryInfo } from '../procedure';
6
- import { PractitionerStatus } from '../practitioner';
7
6
 
8
7
  export const CLINIC_GROUPS_COLLECTION = 'clinic_groups';
9
8
  export const CLINIC_ADMINS_COLLECTION = 'clinic_admins';
@@ -352,8 +351,6 @@ export interface DoctorInfo {
352
351
  photo: string | null;
353
352
  rating: number;
354
353
  services: string[]; // Used for search and filtering
355
- status?: PractitionerStatus; // Practitioner status (DRAFT, ACTIVE, etc.)
356
- isActive?: boolean; // Whether practitioner is active
357
354
  // TODO: Add aggregated fields, like rating, reviews, services this doctor provides in this clinic and similar
358
355
  }
359
356