polfan-server-js-client 0.2.36 → 0.2.38
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/.idea/workspace.xml +25 -3
- package/build/index.cjs.js +9 -4
- package/build/index.cjs.js.map +1 -1
- package/build/index.umd.js +1 -1
- package/build/index.umd.js.map +1 -1
- package/build/types/FilesClient.d.ts +6 -5
- package/package.json +1 -1
- package/src/FilesClient.ts +14 -8
package/.idea/workspace.xml
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<option name="autoReloadType" value="SELECTIVE" />
|
|
5
5
|
</component>
|
|
6
6
|
<component name="ChangeListManager">
|
|
7
|
-
<list default="true" id="831dae43-0da1-47fd-a5f7-33dd5eec2992" name="Changes" comment="
|
|
7
|
+
<list default="true" id="831dae43-0da1-47fd-a5f7-33dd5eec2992" name="Changes" comment="Adapt FilesClient to new files API" />
|
|
8
8
|
<option name="SHOW_DIALOG" value="false" />
|
|
9
9
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
10
10
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
|
@@ -101,6 +101,10 @@
|
|
|
101
101
|
<workItem from="1751159757238" duration="782000" />
|
|
102
102
|
<workItem from="1751539766803" duration="1251000" />
|
|
103
103
|
<workItem from="1751551622570" duration="125000" />
|
|
104
|
+
<workItem from="1751561070286" duration="2044000" />
|
|
105
|
+
<workItem from="1751802125669" duration="1542000" />
|
|
106
|
+
<workItem from="1751811595978" duration="792000" />
|
|
107
|
+
<workItem from="1752705788150" duration="3566000" />
|
|
104
108
|
</task>
|
|
105
109
|
<task id="LOCAL-00001" summary="Emoticons objects">
|
|
106
110
|
<option name="closed" value="true" />
|
|
@@ -406,7 +410,23 @@
|
|
|
406
410
|
<option name="project" value="LOCAL" />
|
|
407
411
|
<updated>1751551734548</updated>
|
|
408
412
|
</task>
|
|
409
|
-
<
|
|
413
|
+
<task id="LOCAL-00039" summary="Fix update the latest message in a room default topic">
|
|
414
|
+
<option name="closed" value="true" />
|
|
415
|
+
<created>1751562062024</created>
|
|
416
|
+
<option name="number" value="00039" />
|
|
417
|
+
<option name="presentableId" value="LOCAL-00039" />
|
|
418
|
+
<option name="project" value="LOCAL" />
|
|
419
|
+
<updated>1751562062024</updated>
|
|
420
|
+
</task>
|
|
421
|
+
<task id="LOCAL-00040" summary="Adapt FilesClient to new files API">
|
|
422
|
+
<option name="closed" value="true" />
|
|
423
|
+
<created>1752752404949</created>
|
|
424
|
+
<option name="number" value="00040" />
|
|
425
|
+
<option name="presentableId" value="LOCAL-00040" />
|
|
426
|
+
<option name="project" value="LOCAL" />
|
|
427
|
+
<updated>1752752404949</updated>
|
|
428
|
+
</task>
|
|
429
|
+
<option name="localTasksCounter" value="41" />
|
|
410
430
|
<servers />
|
|
411
431
|
</component>
|
|
412
432
|
<component name="TypeScriptGeneratedFilesManager">
|
|
@@ -446,6 +466,8 @@
|
|
|
446
466
|
<MESSAGE value="Fix package.json type exports" />
|
|
447
467
|
<MESSAGE value="New message type" />
|
|
448
468
|
<MESSAGE value="Dedicated event for user status change" />
|
|
449
|
-
<
|
|
469
|
+
<MESSAGE value="Fix update the latest message in a room default topic" />
|
|
470
|
+
<MESSAGE value="Adapt FilesClient to new files API" />
|
|
471
|
+
<option name="LAST_COMMIT_MESSAGE" value="Adapt FilesClient to new files API" />
|
|
450
472
|
</component>
|
|
451
473
|
</project>
|
package/build/index.cjs.js
CHANGED
|
@@ -2235,7 +2235,7 @@ function FilesClient_toPrimitive(input, hint) { if (typeof input !== "object" ||
|
|
|
2235
2235
|
class FilesClient extends AbstractRestClient {
|
|
2236
2236
|
constructor(...args) {
|
|
2237
2237
|
super(...args);
|
|
2238
|
-
FilesClient_defineProperty(this, "defaultUrl", 'https://
|
|
2238
|
+
FilesClient_defineProperty(this, "defaultUrl", 'https://files.devana.pl');
|
|
2239
2239
|
}
|
|
2240
2240
|
async uploadFile(file) {
|
|
2241
2241
|
const formData = new FormData();
|
|
@@ -2244,15 +2244,20 @@ class FilesClient extends AbstractRestClient {
|
|
|
2244
2244
|
...this.getAuthHeaders(),
|
|
2245
2245
|
Accept: 'application/json'
|
|
2246
2246
|
};
|
|
2247
|
-
const response = await fetch(this.
|
|
2247
|
+
const response = await fetch(this.getUrl('files'), {
|
|
2248
2248
|
method: 'POST',
|
|
2249
2249
|
body: formData,
|
|
2250
2250
|
headers
|
|
2251
2251
|
});
|
|
2252
2252
|
return this.convertFetchResponse(response);
|
|
2253
2253
|
}
|
|
2254
|
-
async
|
|
2255
|
-
return this.send('GET', '/' + id);
|
|
2254
|
+
async getFileMeta(id) {
|
|
2255
|
+
return this.send('GET', 'files/' + id);
|
|
2256
|
+
}
|
|
2257
|
+
async getFileMetaBulk(ids) {
|
|
2258
|
+
const searchParams = new URLSearchParams();
|
|
2259
|
+
ids.forEach(id => searchParams.append('id[]', id));
|
|
2260
|
+
return this.send('GET', 'files?' + searchParams);
|
|
2256
2261
|
}
|
|
2257
2262
|
}
|
|
2258
2263
|
;// CONCATENATED MODULE: ./src/index.ts
|