@blackcode_sa/metaestetics-api 1.13.10 → 1.13.13

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,6 +843,131 @@ 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
+
846
971
  /**
847
972
  * Enum for all possible clinic tags
848
973
  */
@@ -1141,6 +1266,8 @@ interface DoctorInfo {
1141
1266
  photo: string | null;
1142
1267
  rating: number;
1143
1268
  services: string[];
1269
+ status?: PractitionerStatus;
1270
+ isActive?: boolean;
1144
1271
  }
1145
1272
  /**
1146
1273
  * Interface for clinic
@@ -1174,131 +1301,6 @@ interface Clinic {
1174
1301
  logo?: MediaResource | null;
1175
1302
  }
1176
1303
 
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
-
1302
1304
  declare enum AllergyType {
1303
1305
  MEDICATION = "medication",
1304
1306
  FOOD = "food",
@@ -843,6 +843,131 @@ 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
+
846
971
  /**
847
972
  * Enum for all possible clinic tags
848
973
  */
@@ -1141,6 +1266,8 @@ interface DoctorInfo {
1141
1266
  photo: string | null;
1142
1267
  rating: number;
1143
1268
  services: string[];
1269
+ status?: PractitionerStatus;
1270
+ isActive?: boolean;
1144
1271
  }
1145
1272
  /**
1146
1273
  * Interface for clinic
@@ -1174,131 +1301,6 @@ interface Clinic {
1174
1301
  logo?: MediaResource | null;
1175
1302
  }
1176
1303
 
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
-
1302
1304
  declare enum AllergyType {
1303
1305
  MEDICATION = "medication",
1304
1306
  FOOD = "food",
@@ -1307,29 +1307,6 @@ 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
-
1333
1310
  /**
1334
1311
  * Osnovne informacije o zdravstvenom radniku
1335
1312
  */
@@ -1426,6 +1403,29 @@ interface Practitioner {
1426
1403
  updatedAt: Timestamp;
1427
1404
  }
1428
1405
 
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,29 +1307,6 @@ 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
-
1333
1310
  /**
1334
1311
  * Osnovne informacije o zdravstvenom radniku
1335
1312
  */
@@ -1426,6 +1403,29 @@ interface Practitioner {
1426
1403
  updatedAt: Timestamp;
1427
1404
  }
1428
1405
 
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,6 +5300,8 @@ interface DoctorInfo {
5300
5300
  photo: string | null;
5301
5301
  rating: number;
5302
5302
  services: string[];
5303
+ status?: PractitionerStatus;
5304
+ isActive?: boolean;
5303
5305
  }
5304
5306
  /**
5305
5307
  * Interface for clinic
@@ -6598,12 +6600,14 @@ declare class ClinicService extends BaseService {
6598
6600
  activateClinic(clinicId: string, adminId: string): Promise<void>;
6599
6601
  /**
6600
6602
  * Dohvata kliniku po ID-u
6603
+ * @param excludeDraftPractitioners If true, filters out draft/inactive practitioners. If false (default), returns all practitioners (for admin views)
6601
6604
  */
6602
- getClinic(clinicId: string): Promise<Clinic | null>;
6605
+ getClinic(clinicId: string, excludeDraftPractitioners?: boolean): Promise<Clinic | null>;
6603
6606
  /**
6604
6607
  * Dohvata sve klinike u grupi
6608
+ * @param excludeDraftPractitioners If true, filters out draft/inactive practitioners. If false (default), returns all practitioners (for admin views)
6605
6609
  */
6606
- getClinicsByGroup(groupId: string): Promise<Clinic[]>;
6610
+ getClinicsByGroup(groupId: string, excludeDraftPractitioners?: boolean): Promise<Clinic[]>;
6607
6611
  /**
6608
6612
  * Pretražuje klinike u određenom radijusu
6609
6613
  */
@@ -6630,15 +6634,15 @@ declare class ClinicService extends BaseService {
6630
6634
  * Handles both URL strings and File uploads for media fields.
6631
6635
  */
6632
6636
  createClinicBranch(clinicGroupId: string, setupData: ClinicBranchSetupData, adminId: string): Promise<Clinic>;
6633
- getClinicById(clinicId: string): Promise<Clinic | null>;
6634
- getAllClinics(pagination?: number, lastDoc?: any): Promise<{
6637
+ getClinicById(clinicId: string, excludeDraftPractitioners?: boolean): Promise<Clinic | null>;
6638
+ getAllClinics(pagination?: number, lastDoc?: any, excludeDraftPractitioners?: boolean): Promise<{
6635
6639
  clinics: Clinic[];
6636
6640
  lastDoc: any;
6637
6641
  }>;
6638
6642
  getAllClinicsInRange(center: {
6639
6643
  latitude: number;
6640
6644
  longitude: number;
6641
- }, rangeInKm: number, pagination?: number, lastDoc?: any): Promise<{
6645
+ }, rangeInKm: number, pagination?: number, lastDoc?: any, excludeDraftPractitioners?: boolean): Promise<{
6642
6646
  clinics: (Clinic & {
6643
6647
  distance: number;
6644
6648
  })[];