@excali-boards/boards-api-client 1.1.19 → 1.1.20
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/classes/files.d.ts +10 -3
- package/dist/classes/files.js +1 -1
- package/package.json +1 -1
package/dist/classes/files.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export type FilesFunctionsInput = {
|
|
|
15
15
|
'uploadRawFiles': {
|
|
16
16
|
auth: string;
|
|
17
17
|
boardId: string;
|
|
18
|
-
files:
|
|
18
|
+
files: RawFileInput[];
|
|
19
19
|
};
|
|
20
20
|
'deleteFiles': {
|
|
21
21
|
auth: string;
|
|
@@ -28,10 +28,17 @@ export type Base64FileInput = {
|
|
|
28
28
|
data: string;
|
|
29
29
|
mimeType: string;
|
|
30
30
|
}[];
|
|
31
|
-
export type
|
|
32
|
-
|
|
31
|
+
export type RawFileInput = {
|
|
32
|
+
file: File;
|
|
33
|
+
clientId: string;
|
|
33
34
|
};
|
|
34
35
|
export type FileUploadResponse = {
|
|
35
36
|
success: number;
|
|
36
37
|
failed: number;
|
|
38
|
+
files: FileUrlMapping[];
|
|
39
|
+
};
|
|
40
|
+
export type FileUrlMapping = {
|
|
41
|
+
clientId: string;
|
|
42
|
+
serverId: string;
|
|
43
|
+
url: string;
|
|
37
44
|
};
|
package/dist/classes/files.js
CHANGED
|
@@ -16,7 +16,7 @@ class APIFiles {
|
|
|
16
16
|
async uploadRawFiles({ auth, boardId, files }) {
|
|
17
17
|
const formData = new FormData();
|
|
18
18
|
for (const file of files) {
|
|
19
|
-
formData.append(
|
|
19
|
+
formData.append(`file-${file.clientId}`, file.file);
|
|
20
20
|
}
|
|
21
21
|
return await this.web.request({
|
|
22
22
|
method: 'POST', auth,
|
package/package.json
CHANGED