@uniformdev/files 20.74.1 → 20.74.2-alpha.26

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
@@ -222,6 +222,13 @@ interface paths {
222
222
  };
223
223
  content?: never;
224
224
  };
225
+ /** @description Conflict: the replacement file is already attached to another asset. Use an unattached file (for example a temporary upload) as the replacement. */
226
+ 409: {
227
+ headers: {
228
+ [name: string]: unknown;
229
+ };
230
+ content?: never;
231
+ };
225
232
  429: components["responses"]["RateLimitError"];
226
233
  500: components["responses"]["InternalServerError"];
227
234
  };
@@ -310,6 +317,10 @@ declare class FileClient extends ApiClient {
310
317
  uploadUrl: string;
311
318
  method: "POST" | "PUT";
312
319
  }>;
320
+ remove(options: WithoutProjectId<FileDeleteRequest>): Promise<{
321
+ id: string;
322
+ }>;
323
+ /** @deprecated Use {@link remove} instead. */
313
324
  delete(options: FileDeleteRequest): Promise<{
314
325
  id: string;
315
326
  }>;
@@ -329,6 +340,7 @@ declare class FileClient extends ApiClient {
329
340
  deletedReplacementFileId?: string;
330
341
  }>;
331
342
  }
343
+ /** @deprecated Pass `bypassCache: true` to {@link FileClient} instead. */
332
344
  declare class UncachedFileClient extends FileClient {
333
345
  constructor(options: Omit<ClientOptions & {
334
346
  projectId: NonNullable<ClientOptions['projectId']>;
package/dist/index.d.ts CHANGED
@@ -222,6 +222,13 @@ interface paths {
222
222
  };
223
223
  content?: never;
224
224
  };
225
+ /** @description Conflict: the replacement file is already attached to another asset. Use an unattached file (for example a temporary upload) as the replacement. */
226
+ 409: {
227
+ headers: {
228
+ [name: string]: unknown;
229
+ };
230
+ content?: never;
231
+ };
225
232
  429: components["responses"]["RateLimitError"];
226
233
  500: components["responses"]["InternalServerError"];
227
234
  };
@@ -310,6 +317,10 @@ declare class FileClient extends ApiClient {
310
317
  uploadUrl: string;
311
318
  method: "POST" | "PUT";
312
319
  }>;
320
+ remove(options: WithoutProjectId<FileDeleteRequest>): Promise<{
321
+ id: string;
322
+ }>;
323
+ /** @deprecated Use {@link remove} instead. */
313
324
  delete(options: FileDeleteRequest): Promise<{
314
325
  id: string;
315
326
  }>;
@@ -329,6 +340,7 @@ declare class FileClient extends ApiClient {
329
340
  deletedReplacementFileId?: string;
330
341
  }>;
331
342
  }
343
+ /** @deprecated Pass `bypassCache: true` to {@link FileClient} instead. */
332
344
  declare class UncachedFileClient extends FileClient {
333
345
  constructor(options: Omit<ClientOptions & {
334
346
  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.74.1",
3
+ "version": "20.74.2-alpha.26+464c3f6dc2",
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.74.1"
38
+ "@uniformdev/context": "20.74.2-alpha.26+464c3f6dc2"
39
39
  },
40
- "gitHead": "92f9b8945a45169eaa57d41dbb7ba8d3a32564cd"
40
+ "gitHead": "464c3f6dc27746f5e89e2f61542ed2c458c35cc5"
41
41
  }