fusio-sdk 6.3.0 → 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 +27 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -699,6 +699,14 @@ declare class BackendBundleTag extends TagAbstract {
|
|
|
699
699
|
* @throws {ClientException}
|
|
700
700
|
*/
|
|
701
701
|
getAll(startIndex?: number, count?: number, search?: string): Promise<BackendBundleCollection>;
|
|
702
|
+
/**
|
|
703
|
+
* Publish an existing bundle to the marketplace
|
|
704
|
+
*
|
|
705
|
+
* @returns {Promise<CommonMessage>}
|
|
706
|
+
* @throws {CommonMessageException}
|
|
707
|
+
* @throws {ClientException}
|
|
708
|
+
*/
|
|
709
|
+
publish(bundleId: string): Promise<CommonMessage>;
|
|
702
710
|
/**
|
|
703
711
|
* Updates an existing bundle
|
|
704
712
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -699,6 +699,14 @@ declare class BackendBundleTag extends TagAbstract {
|
|
|
699
699
|
* @throws {ClientException}
|
|
700
700
|
*/
|
|
701
701
|
getAll(startIndex?: number, count?: number, search?: string): Promise<BackendBundleCollection>;
|
|
702
|
+
/**
|
|
703
|
+
* Publish an existing bundle to the marketplace
|
|
704
|
+
*
|
|
705
|
+
* @returns {Promise<CommonMessage>}
|
|
706
|
+
* @throws {CommonMessageException}
|
|
707
|
+
* @throws {ClientException}
|
|
708
|
+
*/
|
|
709
|
+
publish(bundleId: string): Promise<CommonMessage>;
|
|
702
710
|
/**
|
|
703
711
|
* Updates an existing bundle
|
|
704
712
|
*
|
package/dist/index.js
CHANGED
|
@@ -802,6 +802,33 @@ var BackendBundleTag = class extends TagAbstract7 {
|
|
|
802
802
|
}
|
|
803
803
|
throw new UnknownStatusCodeException7("The server returned an unknown status code: " + statusCode);
|
|
804
804
|
}
|
|
805
|
+
/**
|
|
806
|
+
* Publish an existing bundle to the marketplace
|
|
807
|
+
*
|
|
808
|
+
* @returns {Promise<CommonMessage>}
|
|
809
|
+
* @throws {CommonMessageException}
|
|
810
|
+
* @throws {ClientException}
|
|
811
|
+
*/
|
|
812
|
+
async publish(bundleId) {
|
|
813
|
+
const url = this.parser.url("/backend/bundle/$bundle_id<[0-9]+|^~>/publish", {
|
|
814
|
+
"bundle_id": bundleId
|
|
815
|
+
});
|
|
816
|
+
let request = {
|
|
817
|
+
url,
|
|
818
|
+
method: "POST",
|
|
819
|
+
headers: {},
|
|
820
|
+
params: this.parser.query({}, [])
|
|
821
|
+
};
|
|
822
|
+
const response = await this.httpClient.request(request);
|
|
823
|
+
if (response.ok) {
|
|
824
|
+
return await response.json();
|
|
825
|
+
}
|
|
826
|
+
const statusCode = response.status;
|
|
827
|
+
if (statusCode >= 0 && statusCode <= 999) {
|
|
828
|
+
throw new CommonMessageException(await response.json());
|
|
829
|
+
}
|
|
830
|
+
throw new UnknownStatusCodeException7("The server returned an unknown status code: " + statusCode);
|
|
831
|
+
}
|
|
805
832
|
/**
|
|
806
833
|
* Updates an existing bundle
|
|
807
834
|
*
|