@uniformdev/files 20.74.6-alpha.2 → 20.74.6-alpha.5

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
  */
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
  */
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
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/files",
3
- "version": "20.74.6-alpha.2+d9426e9b81",
3
+ "version": "20.74.6-alpha.5+aaa8f352b2",
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.6-alpha.2+d9426e9b81"
38
+ "@uniformdev/context": "20.74.6-alpha.5+aaa8f352b2"
39
39
  },
40
- "gitHead": "d9426e9b81a6943318d903c723f23f3c0cbb17ad"
40
+ "gitHead": "aaa8f352b2378d4ef9f062e364ebf7336145d95d"
41
41
  }