@uniformdev/files 20.50.2-alpha.146 → 20.50.2-alpha.167
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 +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.esm.js +5 -1
- package/dist/index.js +8 -4
- package/dist/index.mjs +5 -1
- package/package.json +3 -3
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
|
|
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
|
@@ -18,8 +18,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
20
|
// src/index.ts
|
|
21
|
-
var
|
|
22
|
-
__export(
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
23
|
FILE_IN_PROGRESS_STATE: () => FILE_IN_PROGRESS_STATE,
|
|
24
24
|
FILE_MAX_SIZE: () => FILE_MAX_SIZE,
|
|
25
25
|
FILE_MIME_TYPES_ALL: () => FILE_MIME_TYPES_ALL,
|
|
@@ -37,7 +37,7 @@ __export(src_exports, {
|
|
|
37
37
|
UncachedFileClient: () => UncachedFileClient,
|
|
38
38
|
getFileNameFromUrl: () => getFileNameFromUrl
|
|
39
39
|
});
|
|
40
|
-
module.exports = __toCommonJS(
|
|
40
|
+
module.exports = __toCommonJS(index_exports);
|
|
41
41
|
|
|
42
42
|
// src/FileClient.ts
|
|
43
43
|
var import_api = require("@uniformdev/context/api");
|
|
@@ -62,7 +62,7 @@ var FileClient = class extends import_api.ApiClient {
|
|
|
62
62
|
body: JSON.stringify({ ...options, projectId })
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
|
-
async
|
|
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
|
|
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.50.2-alpha.
|
|
3
|
+
"version": "20.50.2-alpha.167+74e60d5bb7",
|
|
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.50.2-alpha.
|
|
38
|
+
"@uniformdev/context": "20.50.2-alpha.167+74e60d5bb7"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "74e60d5bb79fe1c4d446e4d3e6edf9f08850be4f"
|
|
41
41
|
}
|