@knime/hub-features 1.7.4 → 1.8.0
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/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knime/hub-features",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "Vue components & composables for shared hub features",
|
|
5
5
|
"homepage": "https://knime.github.io/webapps-common/",
|
|
6
6
|
"license": "GPL 3 and Additional Permissions according to Sec. 7 (SEE the file LICENSE)",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"lodash-es": "4.17.21",
|
|
32
32
|
"ofetch": "^1.4.1",
|
|
33
33
|
"typescript": "^5.4.5",
|
|
34
|
-
"@knime/styles": "1.4.0",
|
|
35
34
|
"@knime/components": "1.26.0",
|
|
35
|
+
"@knime/styles": "1.4.0",
|
|
36
36
|
"@knime/utils": "1.4.0"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
@@ -89,27 +89,42 @@ export const useVersionsApi = ({
|
|
|
89
89
|
};
|
|
90
90
|
|
|
91
91
|
const deleteVersion = ({
|
|
92
|
-
|
|
92
|
+
itemId,
|
|
93
93
|
version,
|
|
94
94
|
}: {
|
|
95
|
-
|
|
95
|
+
itemId: string;
|
|
96
96
|
version: NamedItemVersion["version"];
|
|
97
97
|
}) => {
|
|
98
|
-
return doHubRequest(`/repository/${
|
|
98
|
+
return doHubRequest(`/repository/${itemId}/versions/${version}`, {
|
|
99
99
|
method: "DELETE",
|
|
100
100
|
});
|
|
101
101
|
};
|
|
102
102
|
|
|
103
|
+
const restoreVersion = ({
|
|
104
|
+
itemId,
|
|
105
|
+
version,
|
|
106
|
+
}: {
|
|
107
|
+
itemId: string;
|
|
108
|
+
version: NamedItemVersion["version"];
|
|
109
|
+
}) => {
|
|
110
|
+
return doHubRequest(
|
|
111
|
+
`/repository/${itemId}/workingArea?fromVersion=${version}`,
|
|
112
|
+
{
|
|
113
|
+
method: "POST",
|
|
114
|
+
},
|
|
115
|
+
);
|
|
116
|
+
};
|
|
117
|
+
|
|
103
118
|
const createVersion = ({
|
|
104
|
-
|
|
119
|
+
itemId,
|
|
105
120
|
title,
|
|
106
121
|
description,
|
|
107
122
|
}: {
|
|
108
|
-
|
|
123
|
+
itemId: string;
|
|
109
124
|
title: string;
|
|
110
125
|
description: string;
|
|
111
126
|
}): Promise<NamedItemVersion> => {
|
|
112
|
-
return doHubRequest(`/repository/${
|
|
127
|
+
return doHubRequest(`/repository/${itemId}/versions`, {
|
|
113
128
|
method: "POST",
|
|
114
129
|
body: JSON.stringify({
|
|
115
130
|
title,
|
|
@@ -202,6 +217,7 @@ export const useVersionsApi = ({
|
|
|
202
217
|
fetchPermissions,
|
|
203
218
|
loadSavepointMetadata,
|
|
204
219
|
deleteVersion,
|
|
220
|
+
restoreVersion,
|
|
205
221
|
createVersion,
|
|
206
222
|
getAvatar,
|
|
207
223
|
};
|