fusio-sdk 6.2.1 → 6.4.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/dist/index.cjs +28 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +43 -22
- package/dist/index.d.ts +43 -22
- package/dist/index.js +28 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -839,7 +839,7 @@ var BackendBundleTag = class extends import_sdkgen_client14.TagAbstract {
|
|
|
839
839
|
/**
|
|
840
840
|
* Returns a specific bundle
|
|
841
841
|
*
|
|
842
|
-
* @returns {Promise<
|
|
842
|
+
* @returns {Promise<BackendBundle>}
|
|
843
843
|
* @throws {CommonMessageException}
|
|
844
844
|
* @throws {ClientException}
|
|
845
845
|
*/
|
|
@@ -892,6 +892,33 @@ var BackendBundleTag = class extends import_sdkgen_client14.TagAbstract {
|
|
|
892
892
|
}
|
|
893
893
|
throw new import_sdkgen_client15.UnknownStatusCodeException("The server returned an unknown status code: " + statusCode);
|
|
894
894
|
}
|
|
895
|
+
/**
|
|
896
|
+
* Publish an existing bundle to the marketplace
|
|
897
|
+
*
|
|
898
|
+
* @returns {Promise<CommonMessage>}
|
|
899
|
+
* @throws {CommonMessageException}
|
|
900
|
+
* @throws {ClientException}
|
|
901
|
+
*/
|
|
902
|
+
async publish(bundleId) {
|
|
903
|
+
const url = this.parser.url("/backend/bundle/$bundle_id<[0-9]+|^~>/publish", {
|
|
904
|
+
"bundle_id": bundleId
|
|
905
|
+
});
|
|
906
|
+
let request = {
|
|
907
|
+
url,
|
|
908
|
+
method: "POST",
|
|
909
|
+
headers: {},
|
|
910
|
+
params: this.parser.query({}, [])
|
|
911
|
+
};
|
|
912
|
+
const response = await this.httpClient.request(request);
|
|
913
|
+
if (response.ok) {
|
|
914
|
+
return await response.json();
|
|
915
|
+
}
|
|
916
|
+
const statusCode = response.status;
|
|
917
|
+
if (statusCode >= 0 && statusCode <= 999) {
|
|
918
|
+
throw new CommonMessageException(await response.json());
|
|
919
|
+
}
|
|
920
|
+
throw new import_sdkgen_client15.UnknownStatusCodeException("The server returned an unknown status code: " + statusCode);
|
|
921
|
+
}
|
|
895
922
|
/**
|
|
896
923
|
* Updates an existing bundle
|
|
897
924
|
*
|