@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.
@@ -15,7 +15,7 @@ export type FilesFunctionsInput = {
15
15
  'uploadRawFiles': {
16
16
  auth: string;
17
17
  boardId: string;
18
- files: File[];
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 RawFileUploadInput = {
32
- boardId: string;
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
  };
@@ -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('files', file);
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
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.1.19",
2
+ "version": "1.1.20",
3
3
  "name": "@excali-boards/boards-api-client",
4
4
  "description": "A simple API client for the Boards API.",
5
5
  "repository": "https://github.com/Excali-Boards/boards-api-client",