hcloud-sdk 22.51.0 → 22.52.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
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
## [22.
|
|
1
|
+
## [22.52.0](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/compare/v22.51.1...v22.52.0) (2026-10-08)
|
|
2
2
|
|
|
3
3
|
### Features
|
|
4
4
|
|
|
5
|
-
* add
|
|
5
|
+
* add cosmo patch storage of space endpoint ([6a792f5](https://github.com/moovit-sp-gmbh/hcloud-sdk-js/commit/6a792f5a96d2f84d30be2374810a7016a049d354))
|
|
@@ -16,10 +16,12 @@ export declare class CosmoSpace extends Base {
|
|
|
16
16
|
* @remarks
|
|
17
17
|
* ** Under development, breaking changes possible**
|
|
18
18
|
* @param orgName Name of the Organization
|
|
19
|
+
* @param spaceName Name of the Space to create
|
|
20
|
+
* @param storageId ID of the Storage to associate with the Space
|
|
19
21
|
* @param noAvatar Optional flag to create the Space without an avatar
|
|
20
22
|
* @returns The created Space
|
|
21
23
|
*/
|
|
22
|
-
createSpace<R extends boolean = false>(orgName: string, spaceName: string, noAvatar?: boolean, raw?: {
|
|
24
|
+
createSpace<R extends boolean = false>(orgName: string, spaceName: string, noAvatar?: boolean, storageId?: string, raw?: {
|
|
23
25
|
raw: R;
|
|
24
26
|
}): Promise<MaybeRaw<R, ICosmoSpace>>;
|
|
25
27
|
/**
|
|
@@ -132,4 +134,16 @@ export declare class CosmoSpace extends Base {
|
|
|
132
134
|
updateTrashbinPolicy<R extends boolean = false>(orgName: string, spaceName: string, policy: TrashPolicy, raw?: {
|
|
133
135
|
raw: R;
|
|
134
136
|
}): Promise<MaybeRaw<R, ICosmoSpace>>;
|
|
137
|
+
/**
|
|
138
|
+
* Change the Storage of a Space. Only possible as long as the Space contains no media assets.
|
|
139
|
+
* @remarks
|
|
140
|
+
* ** Under development, breaking changes possible**
|
|
141
|
+
* @param orgName Name of the Organization
|
|
142
|
+
* @param spaceName Name of the Space
|
|
143
|
+
* @param storageId ID of the Storage to use for the Space, or "default" for the default Storage
|
|
144
|
+
* @returns The updated Space
|
|
145
|
+
*/
|
|
146
|
+
updateStorage<R extends boolean = false>(orgName: string, spaceName: string, storageId: string, raw?: {
|
|
147
|
+
raw: R;
|
|
148
|
+
}): Promise<MaybeRaw<R, ICosmoSpace>>;
|
|
135
149
|
}
|
|
@@ -32,13 +32,16 @@ class CosmoSpace extends Base_1.default {
|
|
|
32
32
|
* @remarks
|
|
33
33
|
* ** Under development, breaking changes possible**
|
|
34
34
|
* @param orgName Name of the Organization
|
|
35
|
+
* @param spaceName Name of the Space to create
|
|
36
|
+
* @param storageId ID of the Storage to associate with the Space
|
|
35
37
|
* @param noAvatar Optional flag to create the Space without an avatar
|
|
36
38
|
* @returns The created Space
|
|
37
39
|
*/
|
|
38
|
-
createSpace(orgName, spaceName, noAvatar, raw) {
|
|
40
|
+
createSpace(orgName, spaceName, noAvatar, storageId, raw) {
|
|
39
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
42
|
const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces?noAvatar=${noAvatar ? "true" : "false"}`), {
|
|
41
43
|
name: spaceName,
|
|
44
|
+
storageId,
|
|
42
45
|
});
|
|
43
46
|
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
44
47
|
});
|
|
@@ -188,5 +191,20 @@ class CosmoSpace extends Base_1.default {
|
|
|
188
191
|
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
189
192
|
});
|
|
190
193
|
}
|
|
194
|
+
/**
|
|
195
|
+
* Change the Storage of a Space. Only possible as long as the Space contains no media assets.
|
|
196
|
+
* @remarks
|
|
197
|
+
* ** Under development, breaking changes possible**
|
|
198
|
+
* @param orgName Name of the Organization
|
|
199
|
+
* @param spaceName Name of the Space
|
|
200
|
+
* @param storageId ID of the Storage to use for the Space, or "default" for the default Storage
|
|
201
|
+
* @returns The updated Space
|
|
202
|
+
*/
|
|
203
|
+
updateStorage(orgName, spaceName, storageId, raw) {
|
|
204
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
205
|
+
const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/storage/${storageId}`));
|
|
206
|
+
return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
|
|
207
|
+
});
|
|
208
|
+
}
|
|
191
209
|
}
|
|
192
210
|
exports.CosmoSpace = CosmoSpace;
|