@openmrs/esm-api 5.3.3-pre.1470 → 5.3.3-pre.1476

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-api",
3
- "version": "5.3.3-pre.1470",
3
+ "version": "5.3.3-pre.1476",
4
4
  "license": "MPL-2.0",
5
5
  "description": "The javascript module for interacting with the OpenMRS API",
6
6
  "browser": "dist/openmrs-esm-api.js",
@@ -48,10 +48,10 @@
48
48
  "@openmrs/esm-offline": "5.x"
49
49
  },
50
50
  "devDependencies": {
51
- "@openmrs/esm-config": "5.3.3-pre.1470",
52
- "@openmrs/esm-error-handling": "5.3.3-pre.1470",
53
- "@openmrs/esm-navigation": "5.3.3-pre.1470",
54
- "@openmrs/esm-state": "5.3.3-pre.1470",
51
+ "@openmrs/esm-config": "5.3.3-pre.1476",
52
+ "@openmrs/esm-error-handling": "5.3.3-pre.1476",
53
+ "@openmrs/esm-navigation": "5.3.3-pre.1476",
54
+ "@openmrs/esm-state": "5.3.3-pre.1476",
55
55
  "rxjs": "^6.5.3",
56
56
  "webpack": "^5.88.0"
57
57
  },
@@ -19,7 +19,7 @@ export function getAttachments(patientUuid: string, includeEncounterless: boolea
19
19
  export async function createAttachment(patientUuid: string, fileToUpload: UploadedFile) {
20
20
  const formData = new FormData();
21
21
 
22
- formData.append('fileCaption', fileToUpload.fileName);
22
+ formData.append('fileCaption', fileToUpload.fileDescription);
23
23
  formData.append('patient', patientUuid);
24
24
 
25
25
  if (fileToUpload.file) {
@@ -28,6 +28,7 @@ export async function createAttachment(patientUuid: string, fileToUpload: Upload
28
28
  formData.append('file', new File([''], fileToUpload.fileName), fileToUpload.fileName);
29
29
  formData.append('base64Content', fileToUpload.base64Content);
30
30
  }
31
+
31
32
  return openmrsFetch(`${attachmentUrl}`, {
32
33
  method: 'POST',
33
34
  body: formData,
@@ -10,16 +10,19 @@ export interface UploadedFile {
10
10
  export interface Attachment {
11
11
  id: string;
12
12
  src: string;
13
- title: string;
14
- description: string;
13
+ filename: string;
14
+ comment: string;
15
15
  dateTime: string;
16
16
  bytesMimeType: string;
17
17
  bytesContentFamily: string;
18
+ description?: string;
18
19
  }
20
+
19
21
  export interface AttachmentResponse {
20
22
  bytesContentFamily: string;
21
23
  bytesMimeType: string;
22
24
  comment: string;
23
25
  dateTime: string;
24
26
  uuid: string;
27
+ filename?: string;
25
28
  }