@blackcode_sa/metaestetics-api 1.7.16 → 1.7.18

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.
@@ -188,7 +188,7 @@ interface FilledDocument {
188
188
  createdAt: number;
189
189
  updatedAt: number;
190
190
  values: {
191
- [elementId: string]: any;
191
+ [elementId: string]: any | FilledDocumentFileValue;
192
192
  };
193
193
  status: FilledDocumentStatus;
194
194
  }
@@ -203,6 +203,17 @@ declare enum FilledDocumentStatus {
203
203
  SIGNED = "signed",// Only used for user forms
204
204
  REJECTED = "rejected"
205
205
  }
206
+ /**
207
+ * Interface for file upload results to be stored in filled document values
208
+ */
209
+ interface FilledDocumentFileValue {
210
+ mediaId: string;
211
+ url: string;
212
+ name: string;
213
+ contentType: string;
214
+ size: number;
215
+ uploadedAt: number;
216
+ }
206
217
 
207
218
  /**
208
219
  * Nivoi sertifikacije medicinskog osoblja, poređani od najnižeg do najvišeg
@@ -188,7 +188,7 @@ interface FilledDocument {
188
188
  createdAt: number;
189
189
  updatedAt: number;
190
190
  values: {
191
- [elementId: string]: any;
191
+ [elementId: string]: any | FilledDocumentFileValue;
192
192
  };
193
193
  status: FilledDocumentStatus;
194
194
  }
@@ -203,6 +203,17 @@ declare enum FilledDocumentStatus {
203
203
  SIGNED = "signed",// Only used for user forms
204
204
  REJECTED = "rejected"
205
205
  }
206
+ /**
207
+ * Interface for file upload results to be stored in filled document values
208
+ */
209
+ interface FilledDocumentFileValue {
210
+ mediaId: string;
211
+ url: string;
212
+ name: string;
213
+ contentType: string;
214
+ size: number;
215
+ uploadedAt: number;
216
+ }
206
217
 
207
218
  /**
208
219
  * Nivoi sertifikacije medicinskog osoblja, poređani od najnižeg do najvišeg
@@ -712,9 +712,9 @@ var CategoryService = class extends BaseService {
712
712
  const q = (0, import_firestore.query)(this.categoriesRef, (0, import_firestore.where)("isActive", "==", true));
713
713
  const snapshot = await (0, import_firestore.getDocs)(q);
714
714
  return snapshot.docs.map(
715
- (doc9) => ({
716
- id: doc9.id,
717
- ...doc9.data()
715
+ (doc10) => ({
716
+ id: doc10.id,
717
+ ...doc10.data()
718
718
  })
719
719
  );
720
720
  }
@@ -731,9 +731,9 @@ var CategoryService = class extends BaseService {
731
731
  );
732
732
  const snapshot = await (0, import_firestore.getDocs)(q);
733
733
  return snapshot.docs.map(
734
- (doc9) => ({
735
- id: doc9.id,
736
- ...doc9.data()
734
+ (doc10) => ({
735
+ id: doc10.id,
736
+ ...doc10.data()
737
737
  })
738
738
  );
739
739
  }
@@ -823,9 +823,9 @@ var SubcategoryService = class extends BaseService {
823
823
  );
824
824
  const snapshot = await (0, import_firestore2.getDocs)(q);
825
825
  return snapshot.docs.map(
826
- (doc9) => ({
827
- id: doc9.id,
828
- ...doc9.data()
826
+ (doc10) => ({
827
+ id: doc10.id,
828
+ ...doc10.data()
829
829
  })
830
830
  );
831
831
  }
@@ -915,9 +915,9 @@ var TechnologyService = class extends BaseService {
915
915
  const q = (0, import_firestore3.query)(this.getTechnologiesRef(), (0, import_firestore3.where)("isActive", "==", true));
916
916
  const snapshot = await (0, import_firestore3.getDocs)(q);
917
917
  return snapshot.docs.map(
918
- (doc9) => ({
919
- id: doc9.id,
920
- ...doc9.data()
918
+ (doc10) => ({
919
+ id: doc10.id,
920
+ ...doc10.data()
921
921
  })
922
922
  );
923
923
  }
@@ -934,9 +934,9 @@ var TechnologyService = class extends BaseService {
934
934
  );
935
935
  const snapshot = await (0, import_firestore3.getDocs)(q);
936
936
  return snapshot.docs.map(
937
- (doc9) => ({
938
- id: doc9.id,
939
- ...doc9.data()
937
+ (doc10) => ({
938
+ id: doc10.id,
939
+ ...doc10.data()
940
940
  })
941
941
  );
942
942
  }
@@ -953,9 +953,9 @@ var TechnologyService = class extends BaseService {
953
953
  );
954
954
  const snapshot = await (0, import_firestore3.getDocs)(q);
955
955
  return snapshot.docs.map(
956
- (doc9) => ({
957
- id: doc9.id,
958
- ...doc9.data()
956
+ (doc10) => ({
957
+ id: doc10.id,
958
+ ...doc10.data()
959
959
  })
960
960
  );
961
961
  }
@@ -972,9 +972,9 @@ var TechnologyService = class extends BaseService {
972
972
  );
973
973
  const snapshot = await (0, import_firestore3.getDocs)(q);
974
974
  return snapshot.docs.map(
975
- (doc9) => ({
976
- id: doc9.id,
977
- ...doc9.data()
975
+ (doc10) => ({
976
+ id: doc10.id,
977
+ ...doc10.data()
978
978
  })
979
979
  );
980
980
  }
@@ -1322,9 +1322,9 @@ var RequirementService = class extends BaseService {
1322
1322
  const q = (0, import_firestore4.query)(this.requirementsRef, (0, import_firestore4.where)("isActive", "==", true));
1323
1323
  const snapshot = await (0, import_firestore4.getDocs)(q);
1324
1324
  return snapshot.docs.map(
1325
- (doc9) => ({
1326
- id: doc9.id,
1327
- ...doc9.data()
1325
+ (doc10) => ({
1326
+ id: doc10.id,
1327
+ ...doc10.data()
1328
1328
  })
1329
1329
  );
1330
1330
  }
@@ -1341,9 +1341,9 @@ var RequirementService = class extends BaseService {
1341
1341
  );
1342
1342
  const snapshot = await (0, import_firestore4.getDocs)(q);
1343
1343
  return snapshot.docs.map(
1344
- (doc9) => ({
1345
- id: doc9.id,
1346
- ...doc9.data()
1344
+ (doc10) => ({
1345
+ id: doc10.id,
1346
+ ...doc10.data()
1347
1347
  })
1348
1348
  );
1349
1349
  }
@@ -1415,9 +1415,9 @@ var BrandService = class extends BaseService {
1415
1415
  const q = (0, import_firestore5.query)(this.getBrandsRef(), (0, import_firestore5.where)("isActive", "==", true));
1416
1416
  const snapshot = await (0, import_firestore5.getDocs)(q);
1417
1417
  return snapshot.docs.map(
1418
- (doc9) => ({
1419
- id: doc9.id,
1420
- ...doc9.data()
1418
+ (doc10) => ({
1419
+ id: doc10.id,
1420
+ ...doc10.data()
1421
1421
  })
1422
1422
  );
1423
1423
  }
@@ -1500,9 +1500,9 @@ var ProductService = class extends BaseService {
1500
1500
  );
1501
1501
  const snapshot = await (0, import_firestore6.getDocs)(q);
1502
1502
  return snapshot.docs.map(
1503
- (doc9) => ({
1504
- id: doc9.id,
1505
- ...doc9.data()
1503
+ (doc10) => ({
1504
+ id: doc10.id,
1505
+ ...doc10.data()
1506
1506
  })
1507
1507
  );
1508
1508
  }
@@ -1522,9 +1522,9 @@ var ProductService = class extends BaseService {
1522
1522
  const snapshot = await (0, import_firestore6.getDocs)(q);
1523
1523
  products.push(
1524
1524
  ...snapshot.docs.map(
1525
- (doc9) => ({
1526
- id: doc9.id,
1527
- ...doc9.data()
1525
+ (doc10) => ({
1526
+ id: doc10.id,
1527
+ ...doc10.data()
1528
1528
  })
1529
1529
  )
1530
1530
  );
@@ -1721,8 +1721,8 @@ var DocumentationTemplateService = class extends BaseService {
1721
1721
  const q = (0, import_firestore7.query)(versionsCollectionRef, (0, import_firestore7.orderBy)("version", "desc"));
1722
1722
  const querySnapshot = await (0, import_firestore7.getDocs)(q);
1723
1723
  const versions = [];
1724
- querySnapshot.forEach((doc9) => {
1725
- versions.push(doc9.data());
1724
+ querySnapshot.forEach((doc10) => {
1725
+ versions.push(doc10.data());
1726
1726
  });
1727
1727
  return versions;
1728
1728
  }
@@ -1753,9 +1753,9 @@ var DocumentationTemplateService = class extends BaseService {
1753
1753
  const querySnapshot = await (0, import_firestore7.getDocs)(q);
1754
1754
  const templates = [];
1755
1755
  let lastVisible = null;
1756
- querySnapshot.forEach((doc9) => {
1757
- templates.push(doc9.data());
1758
- lastVisible = doc9;
1756
+ querySnapshot.forEach((doc10) => {
1757
+ templates.push(doc10.data());
1758
+ lastVisible = doc10;
1759
1759
  });
1760
1760
  return {
1761
1761
  templates,
@@ -1783,9 +1783,9 @@ var DocumentationTemplateService = class extends BaseService {
1783
1783
  const querySnapshot = await (0, import_firestore7.getDocs)(q);
1784
1784
  const templates = [];
1785
1785
  let lastVisible = null;
1786
- querySnapshot.forEach((doc9) => {
1787
- templates.push(doc9.data());
1788
- lastVisible = doc9;
1786
+ querySnapshot.forEach((doc10) => {
1787
+ templates.push(doc10.data());
1788
+ lastVisible = doc10;
1789
1789
  });
1790
1790
  return {
1791
1791
  templates,
@@ -1812,9 +1812,9 @@ var DocumentationTemplateService = class extends BaseService {
1812
1812
  const querySnapshot = await (0, import_firestore7.getDocs)(q);
1813
1813
  const templates = [];
1814
1814
  let lastVisible = null;
1815
- querySnapshot.forEach((doc9) => {
1816
- templates.push(doc9.data());
1817
- lastVisible = doc9;
1815
+ querySnapshot.forEach((doc10) => {
1816
+ templates.push(doc10.data());
1817
+ lastVisible = doc10;
1818
1818
  });
1819
1819
  return {
1820
1820
  templates,
@@ -1840,15 +1840,20 @@ var DocumentationTemplateService = class extends BaseService {
1840
1840
  }
1841
1841
  const querySnapshot = await (0, import_firestore7.getDocs)(q);
1842
1842
  const templates = [];
1843
- querySnapshot.forEach((doc9) => {
1844
- templates.push(doc9.data());
1843
+ querySnapshot.forEach((doc10) => {
1844
+ templates.push(doc10.data());
1845
1845
  });
1846
1846
  return templates;
1847
1847
  }
1848
1848
  };
1849
1849
 
1850
1850
  // src/services/documentation-templates/filled-document.service.ts
1851
+ var import_firestore10 = require("firebase/firestore");
1852
+
1853
+ // src/services/media/media.service.ts
1851
1854
  var import_firestore8 = require("firebase/firestore");
1855
+ var import_storage2 = require("firebase/storage");
1856
+ var import_firestore9 = require("firebase/firestore");
1852
1857
 
1853
1858
  // src/backoffice/services/documentation-template.service.ts
1854
1859
  var DocumentationTemplateService2 = class {
@@ -629,9 +629,9 @@ var CategoryService = class extends BaseService {
629
629
  const q = query(this.categoriesRef, where("isActive", "==", true));
630
630
  const snapshot = await getDocs(q);
631
631
  return snapshot.docs.map(
632
- (doc9) => ({
633
- id: doc9.id,
634
- ...doc9.data()
632
+ (doc10) => ({
633
+ id: doc10.id,
634
+ ...doc10.data()
635
635
  })
636
636
  );
637
637
  }
@@ -648,9 +648,9 @@ var CategoryService = class extends BaseService {
648
648
  );
649
649
  const snapshot = await getDocs(q);
650
650
  return snapshot.docs.map(
651
- (doc9) => ({
652
- id: doc9.id,
653
- ...doc9.data()
651
+ (doc10) => ({
652
+ id: doc10.id,
653
+ ...doc10.data()
654
654
  })
655
655
  );
656
656
  }
@@ -749,9 +749,9 @@ var SubcategoryService = class extends BaseService {
749
749
  );
750
750
  const snapshot = await getDocs2(q);
751
751
  return snapshot.docs.map(
752
- (doc9) => ({
753
- id: doc9.id,
754
- ...doc9.data()
752
+ (doc10) => ({
753
+ id: doc10.id,
754
+ ...doc10.data()
755
755
  })
756
756
  );
757
757
  }
@@ -852,9 +852,9 @@ var TechnologyService = class extends BaseService {
852
852
  const q = query3(this.getTechnologiesRef(), where3("isActive", "==", true));
853
853
  const snapshot = await getDocs3(q);
854
854
  return snapshot.docs.map(
855
- (doc9) => ({
856
- id: doc9.id,
857
- ...doc9.data()
855
+ (doc10) => ({
856
+ id: doc10.id,
857
+ ...doc10.data()
858
858
  })
859
859
  );
860
860
  }
@@ -871,9 +871,9 @@ var TechnologyService = class extends BaseService {
871
871
  );
872
872
  const snapshot = await getDocs3(q);
873
873
  return snapshot.docs.map(
874
- (doc9) => ({
875
- id: doc9.id,
876
- ...doc9.data()
874
+ (doc10) => ({
875
+ id: doc10.id,
876
+ ...doc10.data()
877
877
  })
878
878
  );
879
879
  }
@@ -890,9 +890,9 @@ var TechnologyService = class extends BaseService {
890
890
  );
891
891
  const snapshot = await getDocs3(q);
892
892
  return snapshot.docs.map(
893
- (doc9) => ({
894
- id: doc9.id,
895
- ...doc9.data()
893
+ (doc10) => ({
894
+ id: doc10.id,
895
+ ...doc10.data()
896
896
  })
897
897
  );
898
898
  }
@@ -909,9 +909,9 @@ var TechnologyService = class extends BaseService {
909
909
  );
910
910
  const snapshot = await getDocs3(q);
911
911
  return snapshot.docs.map(
912
- (doc9) => ({
913
- id: doc9.id,
914
- ...doc9.data()
912
+ (doc10) => ({
913
+ id: doc10.id,
914
+ ...doc10.data()
915
915
  })
916
916
  );
917
917
  }
@@ -1268,9 +1268,9 @@ var RequirementService = class extends BaseService {
1268
1268
  const q = query4(this.requirementsRef, where4("isActive", "==", true));
1269
1269
  const snapshot = await getDocs4(q);
1270
1270
  return snapshot.docs.map(
1271
- (doc9) => ({
1272
- id: doc9.id,
1273
- ...doc9.data()
1271
+ (doc10) => ({
1272
+ id: doc10.id,
1273
+ ...doc10.data()
1274
1274
  })
1275
1275
  );
1276
1276
  }
@@ -1287,9 +1287,9 @@ var RequirementService = class extends BaseService {
1287
1287
  );
1288
1288
  const snapshot = await getDocs4(q);
1289
1289
  return snapshot.docs.map(
1290
- (doc9) => ({
1291
- id: doc9.id,
1292
- ...doc9.data()
1290
+ (doc10) => ({
1291
+ id: doc10.id,
1292
+ ...doc10.data()
1293
1293
  })
1294
1294
  );
1295
1295
  }
@@ -1370,9 +1370,9 @@ var BrandService = class extends BaseService {
1370
1370
  const q = query5(this.getBrandsRef(), where5("isActive", "==", true));
1371
1371
  const snapshot = await getDocs5(q);
1372
1372
  return snapshot.docs.map(
1373
- (doc9) => ({
1374
- id: doc9.id,
1375
- ...doc9.data()
1373
+ (doc10) => ({
1374
+ id: doc10.id,
1375
+ ...doc10.data()
1376
1376
  })
1377
1377
  );
1378
1378
  }
@@ -1464,9 +1464,9 @@ var ProductService = class extends BaseService {
1464
1464
  );
1465
1465
  const snapshot = await getDocs6(q);
1466
1466
  return snapshot.docs.map(
1467
- (doc9) => ({
1468
- id: doc9.id,
1469
- ...doc9.data()
1467
+ (doc10) => ({
1468
+ id: doc10.id,
1469
+ ...doc10.data()
1470
1470
  })
1471
1471
  );
1472
1472
  }
@@ -1486,9 +1486,9 @@ var ProductService = class extends BaseService {
1486
1486
  const snapshot = await getDocs6(q);
1487
1487
  products.push(
1488
1488
  ...snapshot.docs.map(
1489
- (doc9) => ({
1490
- id: doc9.id,
1491
- ...doc9.data()
1489
+ (doc10) => ({
1490
+ id: doc10.id,
1491
+ ...doc10.data()
1492
1492
  })
1493
1493
  )
1494
1494
  );
@@ -1698,8 +1698,8 @@ var DocumentationTemplateService = class extends BaseService {
1698
1698
  const q = query7(versionsCollectionRef, orderBy("version", "desc"));
1699
1699
  const querySnapshot = await getDocs7(q);
1700
1700
  const versions = [];
1701
- querySnapshot.forEach((doc9) => {
1702
- versions.push(doc9.data());
1701
+ querySnapshot.forEach((doc10) => {
1702
+ versions.push(doc10.data());
1703
1703
  });
1704
1704
  return versions;
1705
1705
  }
@@ -1730,9 +1730,9 @@ var DocumentationTemplateService = class extends BaseService {
1730
1730
  const querySnapshot = await getDocs7(q);
1731
1731
  const templates = [];
1732
1732
  let lastVisible = null;
1733
- querySnapshot.forEach((doc9) => {
1734
- templates.push(doc9.data());
1735
- lastVisible = doc9;
1733
+ querySnapshot.forEach((doc10) => {
1734
+ templates.push(doc10.data());
1735
+ lastVisible = doc10;
1736
1736
  });
1737
1737
  return {
1738
1738
  templates,
@@ -1760,9 +1760,9 @@ var DocumentationTemplateService = class extends BaseService {
1760
1760
  const querySnapshot = await getDocs7(q);
1761
1761
  const templates = [];
1762
1762
  let lastVisible = null;
1763
- querySnapshot.forEach((doc9) => {
1764
- templates.push(doc9.data());
1765
- lastVisible = doc9;
1763
+ querySnapshot.forEach((doc10) => {
1764
+ templates.push(doc10.data());
1765
+ lastVisible = doc10;
1766
1766
  });
1767
1767
  return {
1768
1768
  templates,
@@ -1789,9 +1789,9 @@ var DocumentationTemplateService = class extends BaseService {
1789
1789
  const querySnapshot = await getDocs7(q);
1790
1790
  const templates = [];
1791
1791
  let lastVisible = null;
1792
- querySnapshot.forEach((doc9) => {
1793
- templates.push(doc9.data());
1794
- lastVisible = doc9;
1792
+ querySnapshot.forEach((doc10) => {
1793
+ templates.push(doc10.data());
1794
+ lastVisible = doc10;
1795
1795
  });
1796
1796
  return {
1797
1797
  templates,
@@ -1817,8 +1817,8 @@ var DocumentationTemplateService = class extends BaseService {
1817
1817
  }
1818
1818
  const querySnapshot = await getDocs7(q);
1819
1819
  const templates = [];
1820
- querySnapshot.forEach((doc9) => {
1821
- templates.push(doc9.data());
1820
+ querySnapshot.forEach((doc10) => {
1821
+ templates.push(doc10.data());
1822
1822
  });
1823
1823
  return templates;
1824
1824
  }
@@ -1826,16 +1826,39 @@ var DocumentationTemplateService = class extends BaseService {
1826
1826
 
1827
1827
  // src/services/documentation-templates/filled-document.service.ts
1828
1828
  import {
1829
- collection as collection8,
1829
+ collection as collection9,
1830
+ doc as doc9,
1831
+ getDoc as getDoc9,
1832
+ getDocs as getDocs9,
1833
+ setDoc as setDoc3,
1834
+ updateDoc as updateDoc9,
1835
+ query as query9,
1836
+ orderBy as orderBy3,
1837
+ limit as limit3,
1838
+ startAfter as startAfter2
1839
+ } from "firebase/firestore";
1840
+
1841
+ // src/services/media/media.service.ts
1842
+ import { Timestamp as Timestamp2 } from "firebase/firestore";
1843
+ import {
1844
+ ref,
1845
+ uploadBytes,
1846
+ getDownloadURL,
1847
+ deleteObject,
1848
+ getBytes
1849
+ } from "firebase/storage";
1850
+ import {
1830
1851
  doc as doc8,
1831
1852
  getDoc as getDoc8,
1832
- getDocs as getDocs8,
1833
1853
  setDoc as setDoc2,
1834
1854
  updateDoc as updateDoc8,
1855
+ collection as collection8,
1835
1856
  query as query8,
1836
- orderBy as orderBy2,
1857
+ where as where8,
1837
1858
  limit as limit2,
1838
- startAfter as startAfter2
1859
+ getDocs as getDocs8,
1860
+ deleteDoc as deleteDoc2,
1861
+ orderBy as orderBy2
1839
1862
  } from "firebase/firestore";
1840
1863
 
1841
1864
  // src/backoffice/services/documentation-template.service.ts
package/dist/index.d.mts CHANGED
@@ -2093,7 +2093,7 @@ interface FilledDocument {
2093
2093
  createdAt: number;
2094
2094
  updatedAt: number;
2095
2095
  values: {
2096
- [elementId: string]: any;
2096
+ [elementId: string]: any | FilledDocumentFileValue;
2097
2097
  };
2098
2098
  status: FilledDocumentStatus;
2099
2099
  }
@@ -2108,6 +2108,17 @@ declare enum FilledDocumentStatus {
2108
2108
  SIGNED = "signed",// Only used for user forms
2109
2109
  REJECTED = "rejected"
2110
2110
  }
2111
+ /**
2112
+ * Interface for file upload results to be stored in filled document values
2113
+ */
2114
+ interface FilledDocumentFileValue {
2115
+ mediaId: string;
2116
+ url: string;
2117
+ name: string;
2118
+ contentType: string;
2119
+ size: number;
2120
+ uploadedAt: number;
2121
+ }
2111
2122
 
2112
2123
  /**
2113
2124
  * Brend proizvoda ili opreme
@@ -6675,6 +6686,7 @@ declare class DocumentationTemplateService extends BaseService {
6675
6686
  */
6676
6687
  declare class FilledDocumentService extends BaseService {
6677
6688
  private readonly templateService;
6689
+ private readonly mediaService;
6678
6690
  constructor(...args: ConstructorParameters<typeof BaseService>);
6679
6691
  private getFormSubcollectionPath;
6680
6692
  /**
@@ -6791,6 +6803,47 @@ declare class FilledDocumentService extends BaseService {
6791
6803
  documents: FilledDocument[];
6792
6804
  lastDoc: QueryDocumentSnapshot<FilledDocument> | null;
6793
6805
  }>;
6806
+ /**
6807
+ * Upload a file and associate it with a filled document field.
6808
+ * @param appointmentId - ID of the appointment.
6809
+ * @param formId - ID of the filled document.
6810
+ * @param isUserForm - Boolean indicating if it's a user form or doctor form.
6811
+ * @param file - The file to upload.
6812
+ * @param fieldId - The ID of the field in the document to associate with this file.
6813
+ * @param accessLevel - Access level for the file, defaults to PRIVATE.
6814
+ * @returns The updated filled document with file information.
6815
+ */
6816
+ uploadFileForFilledDocument(appointmentId: string, formId: string, isUserForm: boolean, file: File | Blob, fieldId: string, accessLevel?: MediaAccessLevel): Promise<FilledDocument>;
6817
+ /**
6818
+ * Upload a signature image for a filled document field.
6819
+ * This is a specialized version of uploadFileForFilledDocument specifically for signatures.
6820
+ * @param appointmentId - ID of the appointment.
6821
+ * @param formId - ID of the filled document.
6822
+ * @param isUserForm - Boolean indicating if it's a user form or doctor form.
6823
+ * @param signatureBlob - The signature image as a Blob.
6824
+ * @param fieldId - The ID of the signature field in the document.
6825
+ * @returns The updated filled document with signature information.
6826
+ */
6827
+ uploadSignatureForFilledDocument(appointmentId: string, formId: string, isUserForm: boolean, signatureBlob: Blob, fieldId: string): Promise<FilledDocument>;
6828
+ /**
6829
+ * Remove a file from a filled document field.
6830
+ * This will both update the document and delete the media file.
6831
+ * @param appointmentId - ID of the appointment.
6832
+ * @param formId - ID of the filled document.
6833
+ * @param isUserForm - Boolean indicating if it's a user form or doctor form.
6834
+ * @param fieldId - The ID of the field containing the file.
6835
+ * @returns The updated filled document with the file removed.
6836
+ */
6837
+ removeFileFromFilledDocument(appointmentId: string, formId: string, isUserForm: boolean, fieldId: string): Promise<FilledDocument>;
6838
+ /**
6839
+ * Get the download URL for a file in a filled document.
6840
+ * @param appointmentId - ID of the appointment.
6841
+ * @param formId - ID of the filled document.
6842
+ * @param isUserForm - Boolean indicating if it's a user form or doctor form.
6843
+ * @param fieldId - The ID of the field containing the file.
6844
+ * @returns The download URL for the file, or null if not found.
6845
+ */
6846
+ getFileUrlFromFilledDocument(appointmentId: string, formId: string, isUserForm: boolean, fieldId: string): Promise<string | null>;
6794
6847
  }
6795
6848
 
6796
6849
  /**
@@ -19523,4 +19576,4 @@ declare const createReviewSchema: z.ZodEffects<z.ZodObject<{
19523
19576
  } | undefined;
19524
19577
  }>;
19525
19578
 
19526
- export { APPOINTMENTS_COLLECTION, AUTH_ERRORS, type AddAllergyData, type AddBlockingConditionData, type AddContraindicationData, type AddMedicationData, type AddressData, type AdminInfo, type AdminToken, AdminTokenStatus, type Allergy, type AllergySubtype, AllergyType, type AllergyTypeWithSubtype, type Appointment, type AppointmentReminderNotification, AppointmentService, AppointmentStatus, AuthError, AuthService, type BaseDocumentElement, type BaseNotification, type BinaryChoiceElement, BlockingCondition, type Brand, BrandService, CALENDAR_COLLECTION, CLINICS_COLLECTION, CLINIC_ADMINS_COLLECTION, CLINIC_GROUPS_COLLECTION, type CalendarEvent, CalendarEventStatus, type CalendarEventTime, CalendarEventType, CalendarServiceV2, CalendarSyncStatus, type Category, CategoryService, CertificationLevel, CertificationSpecialty, type Clinic, type ClinicAdmin, ClinicAdminService, type ClinicAdminSignupData, type ClinicBranchSetupData, type ClinicContactInfo, type ClinicGroup, ClinicGroupService, type ClinicGroupSetupData, type ClinicInfo, type ClinicLocation, ClinicPhotoTag, type ClinicReview, type ClinicReviewInfo, ClinicService, ClinicTag, type ClinicTags, type ContactPerson, Contraindication, CosmeticAllergySubtype, type CreateAdminTokenData, type CreateAppointmentData, type CreateAppointmentHttpData, type CreateAppointmentParams, type CreateCalendarEventData, type CreateClinicAdminData, type CreateClinicData, type CreateClinicGroupData, type CreateDefaultClinicGroupData, type CreateDocumentTemplateData, type CreateDraftPractitionerData, type CreatePatientLocationInfoData, type CreatePatientMedicalInfoData, type CreatePatientProfileData, type CreatePatientSensitiveInfoData, type CreatePractitionerData, type CreatePractitionerTokenData, type CreateProcedureData, type CreateSyncedCalendarData, type CreateUserData, Currency, DOCTOR_FORMS_SUBCOLLECTION, DOCUMENTATION_TEMPLATES_COLLECTION, type DatePickerElement, type DateRange, type DigitalSignatureElement, type DoctorInfo, type DocumentElement, DocumentElementType, type DocumentTemplate, DocumentationTemplateService, type DynamicTextElement, DynamicVariable, type EmergencyContact, EnvironmentalAllergySubtype, FILLED_DOCUMENTS_COLLECTION, type FileUploadElement, type FilledDocument, FilledDocumentService, FilledDocumentStatus, FirebaseErrorCode, type FirebaseUser, FoodAllergySubtype, type GamificationInfo, Gender, type HeadingElement, HeadingLevel, Language, type ListElement, ListType, type LocationData, MEDIA_METADATA_COLLECTION, MediaAccessLevel, type MediaMetadata, type MediaResource, MediaService, MedicationAllergySubtype, type MultipleChoiceElement, type Notification, NotificationService, NotificationStatus, NotificationType, PATIENTS_COLLECTION, PATIENT_APPOINTMENTS_COLLECTION, PATIENT_LOCATION_INFO_COLLECTION, PATIENT_MEDICAL_HISTORY_COLLECTION, PATIENT_MEDICAL_INFO_COLLECTION, PATIENT_REQUIREMENTS_SUBCOLLECTION_NAME, PATIENT_SENSITIVE_INFO_COLLECTION, PRACTITIONERS_COLLECTION, PROCEDURES_COLLECTION, type ParagraphElement, type PatientClinic, type PatientDoctor, PatientInstructionStatus, type PatientLocationInfo, type PatientMedicalInfo, type PatientProfile, type PatientProfileComplete, type PatientProfileInfo, type PatientRequirementInstance, type PatientRequirementInstruction, PatientRequirementOverallStatus, PatientRequirementsService, type PatientSensitiveInfo, PatientService, PaymentStatus, type PostRequirementNotification, PracticeType, type Practitioner, type PractitionerBasicInfo, type PractitionerCertification, type PractitionerClinicProcedures, type PractitionerClinicWorkingHours, type PractitionerProfileInfo, type PractitionerReview, type PractitionerReviewInfo, PractitionerService, PractitionerStatus, type PractitionerToken, PractitionerTokenStatus, type PractitionerWorkingHours, type PreRequirementNotification, PricingMeasure, type Procedure, type ProcedureCategorization, ProcedureFamily, type ProcedureInfo, type ProcedureReview, type ProcedureReviewInfo, ProcedureService, type Product, ProductService, REGISTER_TOKENS_COLLECTION, REVIEWS_COLLECTION, type RatingScaleElement, type RequesterInfo, type Requirement, RequirementType, type Review, ReviewService, SYNCED_CALENDARS_COLLECTION, type SearchAppointmentsParams, type SearchCalendarEventsParams, SearchLocationEnum, type SearchPatientsParams, type SignatureElement, type SingleChoiceElement, type Subcategory, SubcategoryService, SubscriptionModel, type SyncedCalendar, type SyncedCalendarEvent, SyncedCalendarProvider, SyncedCalendarsService, type Technology, type TechnologyDocumentationTemplate, TechnologyService, type TextInputElement, type TimeSlot, TimeUnit, TreatmentBenefit, USER_ERRORS, USER_FORMS_SUBCOLLECTION, type UpdateAllergyData, type UpdateAppointmentData, type UpdateAppointmentParams, type UpdateBlockingConditionData, type UpdateCalendarEventData, type UpdateClinicAdminData, type UpdateClinicData, type UpdateClinicGroupData, type UpdateContraindicationData, type UpdateDocumentTemplateData, type UpdateMedicationData, type UpdatePatientLocationInfoData, type UpdatePatientMedicalInfoData, type UpdatePatientProfileData, type UpdatePatientSensitiveInfoData, type UpdatePractitionerData, type UpdateProcedureData, type UpdateSyncedCalendarData, type UpdateVitalStatsData, type User, UserRole, UserService, type ValidationSchema, type VitalStats, type WorkingHours, addAllergySchema, addBlockingConditionSchema, addContraindicationSchema, addMedicationSchema, addressDataSchema, adminInfoSchema, adminTokenSchema, allergySchema, allergySubtypeSchema, appointmentNotificationSchema, appointmentReminderNotificationSchema, baseNotificationSchema, blockingConditionSchema, calendarEventSchema, calendarEventTimeSchema, clinicAdminOptionsSchema, clinicAdminSchema, clinicAdminSignupSchema, clinicBranchSetupSchema, clinicContactInfoSchema, clinicGroupSchema, clinicGroupSetupSchema, clinicLocationSchema, clinicReviewInfoSchema, clinicReviewSchema, clinicSchema, clinicTagsSchema, contactPersonSchema, contraindicationSchema, createAdminTokenSchema, createAppointmentSchema, createCalendarEventSchema, createClinicAdminSchema, createClinicGroupSchema, createClinicReviewSchema, createClinicSchema, createDefaultClinicGroupSchema, createDocumentTemplateSchema, createDraftPractitionerSchema, createFilledDocumentDataSchema, createPatientLocationInfoSchema, createPatientMedicalInfoSchema, createPatientProfileSchema, createPatientSensitiveInfoSchema, createPractitionerReviewSchema, createPractitionerSchema, createPractitionerTokenSchema, createProcedureReviewSchema, createReviewSchema, createUserOptionsSchema, documentElementSchema, documentElementWithoutIdSchema, documentTemplateSchema, emailSchema, emergencyContactSchema, filledDocumentSchema, filledDocumentStatusSchema, gamificationSchema, getFirebaseApp, getFirebaseAuth, getFirebaseDB, getFirebaseInstance, initializeFirebase, locationDataSchema, medicationSchema, notificationSchema, passwordSchema, patientClinicSchema, patientDoctorSchema, patientLocationInfoSchema, patientMedicalInfoSchema, patientProfileInfoSchema, patientProfileSchema, patientSensitiveInfoSchema, postRequirementNotificationSchema, practitionerBasicInfoSchema, practitionerCertificationSchema, practitionerClinicWorkingHoursSchema, practitionerProfileInfoSchema, practitionerReviewInfoSchema, practitionerReviewSchema, practitionerSchema, practitionerSignupSchema, practitionerTokenSchema, practitionerWorkingHoursSchema, preRequirementNotificationSchema, procedureCategorizationSchema, procedureInfoSchema, procedureReviewInfoSchema, procedureReviewSchema, requesterInfoSchema, requirementInstructionDueNotificationSchema, reviewSchema, searchAppointmentsSchema, searchPatientsSchema, syncedCalendarEventSchema, timeSlotSchema, timestampSchema, updateAllergySchema, updateAppointmentSchema, updateBlockingConditionSchema, updateCalendarEventSchema, updateClinicAdminSchema, updateClinicGroupSchema, updateClinicSchema, updateContraindicationSchema, updateDocumentTemplateSchema, updateFilledDocumentDataSchema, updateMedicationSchema, updatePatientMedicalInfoSchema, updateVitalStatsSchema, userRoleSchema, userRolesSchema, userSchema, vitalStatsSchema, workingHoursSchema };
19579
+ export { APPOINTMENTS_COLLECTION, AUTH_ERRORS, type AddAllergyData, type AddBlockingConditionData, type AddContraindicationData, type AddMedicationData, type AddressData, type AdminInfo, type AdminToken, AdminTokenStatus, type Allergy, type AllergySubtype, AllergyType, type AllergyTypeWithSubtype, type Appointment, type AppointmentReminderNotification, AppointmentService, AppointmentStatus, AuthError, AuthService, type BaseDocumentElement, type BaseNotification, type BinaryChoiceElement, BlockingCondition, type Brand, BrandService, CALENDAR_COLLECTION, CLINICS_COLLECTION, CLINIC_ADMINS_COLLECTION, CLINIC_GROUPS_COLLECTION, type CalendarEvent, CalendarEventStatus, type CalendarEventTime, CalendarEventType, CalendarServiceV2, CalendarSyncStatus, type Category, CategoryService, CertificationLevel, CertificationSpecialty, type Clinic, type ClinicAdmin, ClinicAdminService, type ClinicAdminSignupData, type ClinicBranchSetupData, type ClinicContactInfo, type ClinicGroup, ClinicGroupService, type ClinicGroupSetupData, type ClinicInfo, type ClinicLocation, ClinicPhotoTag, type ClinicReview, type ClinicReviewInfo, ClinicService, ClinicTag, type ClinicTags, type ContactPerson, Contraindication, CosmeticAllergySubtype, type CreateAdminTokenData, type CreateAppointmentData, type CreateAppointmentHttpData, type CreateAppointmentParams, type CreateCalendarEventData, type CreateClinicAdminData, type CreateClinicData, type CreateClinicGroupData, type CreateDefaultClinicGroupData, type CreateDocumentTemplateData, type CreateDraftPractitionerData, type CreatePatientLocationInfoData, type CreatePatientMedicalInfoData, type CreatePatientProfileData, type CreatePatientSensitiveInfoData, type CreatePractitionerData, type CreatePractitionerTokenData, type CreateProcedureData, type CreateSyncedCalendarData, type CreateUserData, Currency, DOCTOR_FORMS_SUBCOLLECTION, DOCUMENTATION_TEMPLATES_COLLECTION, type DatePickerElement, type DateRange, type DigitalSignatureElement, type DoctorInfo, type DocumentElement, DocumentElementType, type DocumentTemplate, DocumentationTemplateService, type DynamicTextElement, DynamicVariable, type EmergencyContact, EnvironmentalAllergySubtype, FILLED_DOCUMENTS_COLLECTION, type FileUploadElement, type FilledDocument, type FilledDocumentFileValue, FilledDocumentService, FilledDocumentStatus, FirebaseErrorCode, type FirebaseUser, FoodAllergySubtype, type GamificationInfo, Gender, type HeadingElement, HeadingLevel, Language, type ListElement, ListType, type LocationData, MEDIA_METADATA_COLLECTION, MediaAccessLevel, type MediaMetadata, type MediaResource, MediaService, MedicationAllergySubtype, type MultipleChoiceElement, type Notification, NotificationService, NotificationStatus, NotificationType, PATIENTS_COLLECTION, PATIENT_APPOINTMENTS_COLLECTION, PATIENT_LOCATION_INFO_COLLECTION, PATIENT_MEDICAL_HISTORY_COLLECTION, PATIENT_MEDICAL_INFO_COLLECTION, PATIENT_REQUIREMENTS_SUBCOLLECTION_NAME, PATIENT_SENSITIVE_INFO_COLLECTION, PRACTITIONERS_COLLECTION, PROCEDURES_COLLECTION, type ParagraphElement, type PatientClinic, type PatientDoctor, PatientInstructionStatus, type PatientLocationInfo, type PatientMedicalInfo, type PatientProfile, type PatientProfileComplete, type PatientProfileInfo, type PatientRequirementInstance, type PatientRequirementInstruction, PatientRequirementOverallStatus, PatientRequirementsService, type PatientSensitiveInfo, PatientService, PaymentStatus, type PostRequirementNotification, PracticeType, type Practitioner, type PractitionerBasicInfo, type PractitionerCertification, type PractitionerClinicProcedures, type PractitionerClinicWorkingHours, type PractitionerProfileInfo, type PractitionerReview, type PractitionerReviewInfo, PractitionerService, PractitionerStatus, type PractitionerToken, PractitionerTokenStatus, type PractitionerWorkingHours, type PreRequirementNotification, PricingMeasure, type Procedure, type ProcedureCategorization, ProcedureFamily, type ProcedureInfo, type ProcedureReview, type ProcedureReviewInfo, ProcedureService, type Product, ProductService, REGISTER_TOKENS_COLLECTION, REVIEWS_COLLECTION, type RatingScaleElement, type RequesterInfo, type Requirement, RequirementType, type Review, ReviewService, SYNCED_CALENDARS_COLLECTION, type SearchAppointmentsParams, type SearchCalendarEventsParams, SearchLocationEnum, type SearchPatientsParams, type SignatureElement, type SingleChoiceElement, type Subcategory, SubcategoryService, SubscriptionModel, type SyncedCalendar, type SyncedCalendarEvent, SyncedCalendarProvider, SyncedCalendarsService, type Technology, type TechnologyDocumentationTemplate, TechnologyService, type TextInputElement, type TimeSlot, TimeUnit, TreatmentBenefit, USER_ERRORS, USER_FORMS_SUBCOLLECTION, type UpdateAllergyData, type UpdateAppointmentData, type UpdateAppointmentParams, type UpdateBlockingConditionData, type UpdateCalendarEventData, type UpdateClinicAdminData, type UpdateClinicData, type UpdateClinicGroupData, type UpdateContraindicationData, type UpdateDocumentTemplateData, type UpdateMedicationData, type UpdatePatientLocationInfoData, type UpdatePatientMedicalInfoData, type UpdatePatientProfileData, type UpdatePatientSensitiveInfoData, type UpdatePractitionerData, type UpdateProcedureData, type UpdateSyncedCalendarData, type UpdateVitalStatsData, type User, UserRole, UserService, type ValidationSchema, type VitalStats, type WorkingHours, addAllergySchema, addBlockingConditionSchema, addContraindicationSchema, addMedicationSchema, addressDataSchema, adminInfoSchema, adminTokenSchema, allergySchema, allergySubtypeSchema, appointmentNotificationSchema, appointmentReminderNotificationSchema, baseNotificationSchema, blockingConditionSchema, calendarEventSchema, calendarEventTimeSchema, clinicAdminOptionsSchema, clinicAdminSchema, clinicAdminSignupSchema, clinicBranchSetupSchema, clinicContactInfoSchema, clinicGroupSchema, clinicGroupSetupSchema, clinicLocationSchema, clinicReviewInfoSchema, clinicReviewSchema, clinicSchema, clinicTagsSchema, contactPersonSchema, contraindicationSchema, createAdminTokenSchema, createAppointmentSchema, createCalendarEventSchema, createClinicAdminSchema, createClinicGroupSchema, createClinicReviewSchema, createClinicSchema, createDefaultClinicGroupSchema, createDocumentTemplateSchema, createDraftPractitionerSchema, createFilledDocumentDataSchema, createPatientLocationInfoSchema, createPatientMedicalInfoSchema, createPatientProfileSchema, createPatientSensitiveInfoSchema, createPractitionerReviewSchema, createPractitionerSchema, createPractitionerTokenSchema, createProcedureReviewSchema, createReviewSchema, createUserOptionsSchema, documentElementSchema, documentElementWithoutIdSchema, documentTemplateSchema, emailSchema, emergencyContactSchema, filledDocumentSchema, filledDocumentStatusSchema, gamificationSchema, getFirebaseApp, getFirebaseAuth, getFirebaseDB, getFirebaseInstance, initializeFirebase, locationDataSchema, medicationSchema, notificationSchema, passwordSchema, patientClinicSchema, patientDoctorSchema, patientLocationInfoSchema, patientMedicalInfoSchema, patientProfileInfoSchema, patientProfileSchema, patientSensitiveInfoSchema, postRequirementNotificationSchema, practitionerBasicInfoSchema, practitionerCertificationSchema, practitionerClinicWorkingHoursSchema, practitionerProfileInfoSchema, practitionerReviewInfoSchema, practitionerReviewSchema, practitionerSchema, practitionerSignupSchema, practitionerTokenSchema, practitionerWorkingHoursSchema, preRequirementNotificationSchema, procedureCategorizationSchema, procedureInfoSchema, procedureReviewInfoSchema, procedureReviewSchema, requesterInfoSchema, requirementInstructionDueNotificationSchema, reviewSchema, searchAppointmentsSchema, searchPatientsSchema, syncedCalendarEventSchema, timeSlotSchema, timestampSchema, updateAllergySchema, updateAppointmentSchema, updateBlockingConditionSchema, updateCalendarEventSchema, updateClinicAdminSchema, updateClinicGroupSchema, updateClinicSchema, updateContraindicationSchema, updateDocumentTemplateSchema, updateFilledDocumentDataSchema, updateMedicationSchema, updatePatientMedicalInfoSchema, updateVitalStatsSchema, userRoleSchema, userRolesSchema, userSchema, vitalStatsSchema, workingHoursSchema };