@uniformdev/files 20.72.3-alpha.5 → 20.72.3-alpha.52

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/index.d.mts CHANGED
@@ -310,6 +310,10 @@ declare class FileClient extends ApiClient {
310
310
  uploadUrl: string;
311
311
  method: "POST" | "PUT";
312
312
  }>;
313
+ remove(options: WithoutProjectId<FileDeleteRequest>): Promise<{
314
+ id: string;
315
+ }>;
316
+ /** @deprecated Use {@link remove} instead. */
313
317
  delete(options: FileDeleteRequest): Promise<{
314
318
  id: string;
315
319
  }>;
@@ -329,6 +333,7 @@ declare class FileClient extends ApiClient {
329
333
  deletedReplacementFileId?: string;
330
334
  }>;
331
335
  }
336
+ /** @deprecated Pass `bypassCache: true` to {@link FileClient} instead. */
332
337
  declare class UncachedFileClient extends FileClient {
333
338
  constructor(options: Omit<ClientOptions & {
334
339
  projectId: NonNullable<ClientOptions['projectId']>;
package/dist/index.d.ts CHANGED
@@ -310,6 +310,10 @@ declare class FileClient extends ApiClient {
310
310
  uploadUrl: string;
311
311
  method: "POST" | "PUT";
312
312
  }>;
313
+ remove(options: WithoutProjectId<FileDeleteRequest>): Promise<{
314
+ id: string;
315
+ }>;
316
+ /** @deprecated Use {@link remove} instead. */
313
317
  delete(options: FileDeleteRequest): Promise<{
314
318
  id: string;
315
319
  }>;
@@ -329,6 +333,7 @@ declare class FileClient extends ApiClient {
329
333
  deletedReplacementFileId?: string;
330
334
  }>;
331
335
  }
336
+ /** @deprecated Pass `bypassCache: true` to {@link FileClient} instead. */
332
337
  declare class UncachedFileClient extends FileClient {
333
338
  constructor(options: Omit<ClientOptions & {
334
339
  projectId: NonNullable<ClientOptions['projectId']>;
package/dist/index.esm.js CHANGED
@@ -21,7 +21,7 @@ var FileClient = class extends ApiClient {
21
21
  body: JSON.stringify({ ...options, projectId })
22
22
  });
23
23
  }
24
- async delete(options) {
24
+ async remove(options) {
25
25
  const { projectId } = this.options;
26
26
  const fetchUri = this.createUrl(FILE_BASE_PATH);
27
27
  return this.apiClient(fetchUri, {
@@ -29,6 +29,10 @@ var FileClient = class extends ApiClient {
29
29
  body: JSON.stringify({ ...options, projectId })
30
30
  });
31
31
  }
32
+ /** @deprecated Use {@link remove} instead. */
33
+ async delete(options) {
34
+ return this.remove(options);
35
+ }
32
36
  /**
33
37
  * Replaces the contents behind an existing file while preserving its URL.
34
38
  */
@@ -91,9 +95,32 @@ var FILE_TYPES_VIDEO = [".mp4", ".webm", ".ogg"];
91
95
  var FILE_MIME_TYPES_VIDEO = ["video/mp4", "video/webm", "video/ogg"];
92
96
  var FILE_TYPES_AUDIO = [".mp3", ".wav", ".ogg", ".flac"];
93
97
  var FILE_MIME_TYPES_AUDIO = ["audio/mpeg", "audio/mp4", "audio/wav", "audio/ogg", "audio/flac"];
94
- var FILE_TYPES_OTHER = [".pdf", ".txt", ".md", ".json", ".zip", ".lottie", ".srt", ".vtt"];
98
+ var FILE_TYPES_OTHER = [
99
+ ".pdf",
100
+ ".doc",
101
+ ".docx",
102
+ ".xls",
103
+ ".xlsx",
104
+ ".ppt",
105
+ ".pptx",
106
+ ".csv",
107
+ ".txt",
108
+ ".md",
109
+ ".json",
110
+ ".zip",
111
+ ".lottie",
112
+ ".srt",
113
+ ".vtt"
114
+ ];
95
115
  var FILE_MIME_TYPES_OTHER = [
96
116
  "application/pdf",
117
+ "application/msword",
118
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
119
+ "application/vnd.ms-excel",
120
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
121
+ "application/vnd.ms-powerpoint",
122
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation",
123
+ "text/csv",
97
124
  "text/plain",
98
125
  "text/markdown",
99
126
  "application/json",
package/dist/index.js CHANGED
@@ -62,7 +62,7 @@ var FileClient = class extends import_api.ApiClient {
62
62
  body: JSON.stringify({ ...options, projectId })
63
63
  });
64
64
  }
65
- async delete(options) {
65
+ async remove(options) {
66
66
  const { projectId } = this.options;
67
67
  const fetchUri = this.createUrl(FILE_BASE_PATH);
68
68
  return this.apiClient(fetchUri, {
@@ -70,6 +70,10 @@ var FileClient = class extends import_api.ApiClient {
70
70
  body: JSON.stringify({ ...options, projectId })
71
71
  });
72
72
  }
73
+ /** @deprecated Use {@link remove} instead. */
74
+ async delete(options) {
75
+ return this.remove(options);
76
+ }
73
77
  /**
74
78
  * Replaces the contents behind an existing file while preserving its URL.
75
79
  */
@@ -132,9 +136,32 @@ var FILE_TYPES_VIDEO = [".mp4", ".webm", ".ogg"];
132
136
  var FILE_MIME_TYPES_VIDEO = ["video/mp4", "video/webm", "video/ogg"];
133
137
  var FILE_TYPES_AUDIO = [".mp3", ".wav", ".ogg", ".flac"];
134
138
  var FILE_MIME_TYPES_AUDIO = ["audio/mpeg", "audio/mp4", "audio/wav", "audio/ogg", "audio/flac"];
135
- var FILE_TYPES_OTHER = [".pdf", ".txt", ".md", ".json", ".zip", ".lottie", ".srt", ".vtt"];
139
+ var FILE_TYPES_OTHER = [
140
+ ".pdf",
141
+ ".doc",
142
+ ".docx",
143
+ ".xls",
144
+ ".xlsx",
145
+ ".ppt",
146
+ ".pptx",
147
+ ".csv",
148
+ ".txt",
149
+ ".md",
150
+ ".json",
151
+ ".zip",
152
+ ".lottie",
153
+ ".srt",
154
+ ".vtt"
155
+ ];
136
156
  var FILE_MIME_TYPES_OTHER = [
137
157
  "application/pdf",
158
+ "application/msword",
159
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
160
+ "application/vnd.ms-excel",
161
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
162
+ "application/vnd.ms-powerpoint",
163
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation",
164
+ "text/csv",
138
165
  "text/plain",
139
166
  "text/markdown",
140
167
  "application/json",
package/dist/index.mjs CHANGED
@@ -21,7 +21,7 @@ var FileClient = class extends ApiClient {
21
21
  body: JSON.stringify({ ...options, projectId })
22
22
  });
23
23
  }
24
- async delete(options) {
24
+ async remove(options) {
25
25
  const { projectId } = this.options;
26
26
  const fetchUri = this.createUrl(FILE_BASE_PATH);
27
27
  return this.apiClient(fetchUri, {
@@ -29,6 +29,10 @@ var FileClient = class extends ApiClient {
29
29
  body: JSON.stringify({ ...options, projectId })
30
30
  });
31
31
  }
32
+ /** @deprecated Use {@link remove} instead. */
33
+ async delete(options) {
34
+ return this.remove(options);
35
+ }
32
36
  /**
33
37
  * Replaces the contents behind an existing file while preserving its URL.
34
38
  */
@@ -91,9 +95,32 @@ var FILE_TYPES_VIDEO = [".mp4", ".webm", ".ogg"];
91
95
  var FILE_MIME_TYPES_VIDEO = ["video/mp4", "video/webm", "video/ogg"];
92
96
  var FILE_TYPES_AUDIO = [".mp3", ".wav", ".ogg", ".flac"];
93
97
  var FILE_MIME_TYPES_AUDIO = ["audio/mpeg", "audio/mp4", "audio/wav", "audio/ogg", "audio/flac"];
94
- var FILE_TYPES_OTHER = [".pdf", ".txt", ".md", ".json", ".zip", ".lottie", ".srt", ".vtt"];
98
+ var FILE_TYPES_OTHER = [
99
+ ".pdf",
100
+ ".doc",
101
+ ".docx",
102
+ ".xls",
103
+ ".xlsx",
104
+ ".ppt",
105
+ ".pptx",
106
+ ".csv",
107
+ ".txt",
108
+ ".md",
109
+ ".json",
110
+ ".zip",
111
+ ".lottie",
112
+ ".srt",
113
+ ".vtt"
114
+ ];
95
115
  var FILE_MIME_TYPES_OTHER = [
96
116
  "application/pdf",
117
+ "application/msword",
118
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
119
+ "application/vnd.ms-excel",
120
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
121
+ "application/vnd.ms-powerpoint",
122
+ "application/vnd.openxmlformats-officedocument.presentationml.presentation",
123
+ "text/csv",
97
124
  "text/plain",
98
125
  "text/markdown",
99
126
  "application/json",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/files",
3
- "version": "20.72.3-alpha.5+87cd60cb2e",
3
+ "version": "20.72.3-alpha.52+f01685e1ef",
4
4
  "description": "Uniform Files helpers",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -35,7 +35,7 @@
35
35
  "access": "public"
36
36
  },
37
37
  "dependencies": {
38
- "@uniformdev/context": "20.72.3-alpha.5+87cd60cb2e"
38
+ "@uniformdev/context": "20.72.3-alpha.52+f01685e1ef"
39
39
  },
40
- "gitHead": "87cd60cb2eae75aac26c8c51566e66281c3921f9"
40
+ "gitHead": "f01685e1ef0aeb05dc200ccdcdd5aba6f6cfc437"
41
41
  }