@c8y/client 1017.0.338 → 1017.0.343
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/lib/bundles/client.umd.js +13 -2
- package/lib/bundles/client.umd.js.map +1 -1
- package/lib/bundles/client.umd.min.js +1 -1
- package/lib/bundles/client.umd.min.js.map +1 -1
- package/lib/cjs/src/application/ApplicationService.js +13 -2
- package/lib/cjs/src/application/ApplicationService.js.map +1 -1
- package/lib/esm2015/src/application/ApplicationService.js +13 -2
- package/lib/esm2015/src/application/ApplicationService.js.map +1 -1
- package/lib/src/application/ApplicationService.d.ts +8 -1
- package/package.json +1 -1
|
@@ -7997,13 +7997,24 @@
|
|
|
7997
7997
|
return _super.create.call(this, entity);
|
|
7998
7998
|
});
|
|
7999
7999
|
}
|
|
8000
|
-
|
|
8000
|
+
/**
|
|
8001
|
+
* Clones a given application. The application name, key, and context-path will be
|
|
8002
|
+
* prefixed with `clone` and if necessary a number.
|
|
8003
|
+
* @param entity The application to clone.
|
|
8004
|
+
* @param version If a blueprint, you can define which version to clone. If not provided, it will always clone the latest version.
|
|
8005
|
+
* @returns The application entity.
|
|
8006
|
+
*/
|
|
8007
|
+
clone(entity, version) {
|
|
8001
8008
|
return __awaiter$16(this, void 0, void 0, function* () {
|
|
8002
8009
|
const url = `${this.getDetailUrl(entity)}/clone`;
|
|
8003
8010
|
const method = 'POST';
|
|
8004
8011
|
const body = '';
|
|
8005
8012
|
const headers = { 'content-type': 'application/json', accept: 'application/json' };
|
|
8006
|
-
|
|
8013
|
+
let params = undefined;
|
|
8014
|
+
if (version) {
|
|
8015
|
+
params = { version };
|
|
8016
|
+
}
|
|
8017
|
+
const res = yield this.fetch(url, { method, body, headers, params });
|
|
8007
8018
|
const data = yield res.json();
|
|
8008
8019
|
return { res, data };
|
|
8009
8020
|
});
|