polfan-server-js-client 0.2.38 → 0.2.40

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.
@@ -4,7 +4,15 @@
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="Adapt FilesClient to new files API" />
7
+ <list default="true" id="831dae43-0da1-47fd-a5f7-33dd5eec2992" name="Changes" comment="Adapt FilesClient to new files API">
8
+ <change beforePath="$PROJECT_DIR$/build/index.cjs.js" beforeDir="false" afterPath="$PROJECT_DIR$/build/index.cjs.js" afterDir="false" />
9
+ <change beforePath="$PROJECT_DIR$/build/index.cjs.js.map" beforeDir="false" afterPath="$PROJECT_DIR$/build/index.cjs.js.map" afterDir="false" />
10
+ <change beforePath="$PROJECT_DIR$/build/index.umd.js" beforeDir="false" afterPath="$PROJECT_DIR$/build/index.umd.js" afterDir="false" />
11
+ <change beforePath="$PROJECT_DIR$/build/index.umd.js.map" beforeDir="false" afterPath="$PROJECT_DIR$/build/index.umd.js.map" afterDir="false" />
12
+ <change beforePath="$PROJECT_DIR$/build/types/FilesClient.d.ts" beforeDir="false" afterPath="$PROJECT_DIR$/build/types/FilesClient.d.ts" afterDir="false" />
13
+ <change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
14
+ <change beforePath="$PROJECT_DIR$/src/FilesClient.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/FilesClient.ts" afterDir="false" />
15
+ </list>
8
16
  <option name="SHOW_DIALOG" value="false" />
9
17
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
10
18
  <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@@ -25,6 +33,18 @@
25
33
  <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
26
34
  <option name="ROOT_SYNC" value="DONT_SYNC" />
27
35
  </component>
36
+ <component name="GitHubPullRequestSearchHistory">{
37
+ &quot;lastFilter&quot;: {
38
+ &quot;state&quot;: &quot;OPEN&quot;,
39
+ &quot;assignee&quot;: &quot;szado&quot;
40
+ }
41
+ }</component>
42
+ <component name="GithubPullRequestsUISettings">{
43
+ &quot;selectedUrlAndAccountId&quot;: {
44
+ &quot;url&quot;: &quot;https://github.com/szado/pserv-ts-types&quot;,
45
+ &quot;accountId&quot;: &quot;3584fcfe-fe67-4c7c-94f9-c35acfe7b7c6&quot;
46
+ }
47
+ }</component>
28
48
  <component name="PhpWorkspaceProjectConfiguration" interpreter_name="C:\php\php.exe" />
29
49
  <component name="ProjectColorInfo">{
30
50
  &quot;associatedIndex&quot;: 5
@@ -105,6 +125,8 @@
105
125
  <workItem from="1751802125669" duration="1542000" />
106
126
  <workItem from="1751811595978" duration="792000" />
107
127
  <workItem from="1752705788150" duration="3566000" />
128
+ <workItem from="1752756543261" duration="1956000" />
129
+ <workItem from="1752834023436" duration="2416000" />
108
130
  </task>
109
131
  <task id="LOCAL-00001" summary="Emoticons objects">
110
132
  <option name="closed" value="true" />
@@ -426,7 +448,15 @@
426
448
  <option name="project" value="LOCAL" />
427
449
  <updated>1752752404949</updated>
428
450
  </task>
429
- <option name="localTasksCounter" value="41" />
451
+ <task id="LOCAL-00041" summary="Adapt FilesClient to new files API">
452
+ <option name="closed" value="true" />
453
+ <created>1752756683365</created>
454
+ <option name="number" value="00041" />
455
+ <option name="presentableId" value="LOCAL-00041" />
456
+ <option name="project" value="LOCAL" />
457
+ <updated>1752756683365</updated>
458
+ </task>
459
+ <option name="localTasksCounter" value="42" />
430
460
  <servers />
431
461
  </component>
432
462
  <component name="TypeScriptGeneratedFilesManager">
@@ -2238,15 +2238,16 @@ class FilesClient extends AbstractRestClient {
2238
2238
  FilesClient_defineProperty(this, "defaultUrl", 'https://files.devana.pl');
2239
2239
  }
2240
2240
  async uploadFile(file) {
2241
- const formData = new FormData();
2242
- formData.append('file', file);
2241
+ const name = encodeURIComponent(file.name ?? '');
2243
2242
  let headers = {
2244
2243
  ...this.getAuthHeaders(),
2245
- Accept: 'application/json'
2244
+ Accept: 'application/json',
2245
+ 'Content-Disposition': `attachment; filename="${name}"`,
2246
+ 'Content-Length': file.size
2246
2247
  };
2247
2248
  const response = await fetch(this.getUrl('files'), {
2248
2249
  method: 'POST',
2249
- body: formData,
2250
+ body: file,
2250
2251
  headers
2251
2252
  });
2252
2253
  return this.convertFetchResponse(response);