-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathextensions.js
77 lines (76 loc) · 1.9 KB
/
extensions.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import {
clearApiCache,
invokeFetch
} from "./chunks/WQYEWU54.js";
import "./chunks/2B7YWDQC.js";
import "./chunks/2ZQ3ZX7F.js";
// src/public/rest/extensions.ts
var getExtensions = async (options) => invokeFetch("extensions", {
method: "get",
pathTemplate: "/api/v1/extensions",
options
});
var uploadExtension = async (body, options) => invokeFetch("extensions", {
method: "post",
pathTemplate: "/api/v1/extensions",
body,
contentType: "multipart/form-data",
options
});
var deleteExtension = async (id, options) => invokeFetch("extensions", {
method: "delete",
pathTemplate: "/api/v1/extensions/{id}",
pathVariables: { id },
options
});
var getExtension = async (id, options) => invokeFetch("extensions", {
method: "get",
pathTemplate: "/api/v1/extensions/{id}",
pathVariables: { id },
options
});
var patchExtension = async (id, body, options) => invokeFetch("extensions", {
method: "patch",
pathTemplate: "/api/v1/extensions/{id}",
pathVariables: { id },
body,
contentType: "multipart/form-data",
options
});
var downloadExtension = async (id, options) => invokeFetch("extensions", {
method: "get",
pathTemplate: "/api/v1/extensions/{id}/file",
pathVariables: { id },
options
});
var downloadFileFromExtension = async (id, filepath, options) => invokeFetch("extensions", {
method: "get",
pathTemplate: "/api/v1/extensions/{id}/file/{filepath}",
pathVariables: { id, filepath },
options
});
function clearCache() {
return clearApiCache("extensions");
}
var extensionsExport = {
getExtensions,
uploadExtension,
deleteExtension,
getExtension,
patchExtension,
downloadExtension,
downloadFileFromExtension,
clearCache
};
var extensions_default = extensionsExport;
export {
clearCache,
extensions_default as default,
deleteExtension,
downloadExtension,
downloadFileFromExtension,
getExtension,
getExtensions,
patchExtension,
uploadExtension
};