@dronedeploy/rocos-js-sdk 3.0.1-alpha.42 → 3.0.1-alpha.43

Sign up to get free protection for your applications and to get access to all the features.
@@ -19,4 +19,10 @@ export declare class EnvironmentService extends BaseServiceAbstract implements I
19
19
  * @param projectId - Project Id
20
20
  */
21
21
  update(projectId: string, scene: unknown): Promise<void>;
22
+ /**
23
+ * Delete Environment
24
+ *
25
+ * @param projectId - Project Id
26
+ */
27
+ delete(projectId: string): Promise<void>;
22
28
  }
@@ -26,7 +26,7 @@ class EnvironmentService extends BaseServiceAbstract_1.BaseServiceAbstract {
26
26
  * @param projectId - Project Id
27
27
  */
28
28
  async get(projectId) {
29
- return this.callGet((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_PROJECT_ENVIRONMENT_URL, { url: this.config.url, projectId }, this.config.insecure), `Failed to get environment for ${projectId}.`, undefined);
29
+ return this.callGet((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_PROJECT_ENVIRONMENT_URL, { url: this.config.url, projectId }, this.config.insecure), `Failed to get environment for ${projectId}.`);
30
30
  }
31
31
  /**
32
32
  * Update Environment
@@ -36,5 +36,13 @@ class EnvironmentService extends BaseServiceAbstract_1.BaseServiceAbstract {
36
36
  async update(projectId, scene) {
37
37
  return this.callPut((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_PROJECT_ENVIRONMENT_URL, { url: this.config.url, projectId }, this.config.insecure), scene, `Failed to update environment for ${projectId}.`);
38
38
  }
39
+ /**
40
+ * Delete Environment
41
+ *
42
+ * @param projectId - Project Id
43
+ */
44
+ async delete(projectId) {
45
+ return this.callDelete((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_PROJECT_ENVIRONMENT_URL, { url: this.config.url, projectId }, this.config.insecure), `Failed to update environment for ${projectId}.`);
46
+ }
39
47
  }
40
48
  exports.EnvironmentService = EnvironmentService;
@@ -19,4 +19,10 @@ export declare class EnvironmentService extends BaseServiceAbstract implements I
19
19
  * @param projectId - Project Id
20
20
  */
21
21
  update(projectId: string, scene: unknown): Promise<void>;
22
+ /**
23
+ * Delete Environment
24
+ *
25
+ * @param projectId - Project Id
26
+ */
27
+ delete(projectId: string): Promise<void>;
22
28
  }
@@ -23,7 +23,7 @@ export class EnvironmentService extends BaseServiceAbstract {
23
23
  * @param projectId - Project Id
24
24
  */
25
25
  async get(projectId) {
26
- return this.callGet(formatServiceUrl(API_PROJECT_ENVIRONMENT_URL, { url: this.config.url, projectId }, this.config.insecure), `Failed to get environment for ${projectId}.`, undefined);
26
+ return this.callGet(formatServiceUrl(API_PROJECT_ENVIRONMENT_URL, { url: this.config.url, projectId }, this.config.insecure), `Failed to get environment for ${projectId}.`);
27
27
  }
28
28
  /**
29
29
  * Update Environment
@@ -33,4 +33,12 @@ export class EnvironmentService extends BaseServiceAbstract {
33
33
  async update(projectId, scene) {
34
34
  return this.callPut(formatServiceUrl(API_PROJECT_ENVIRONMENT_URL, { url: this.config.url, projectId }, this.config.insecure), scene, `Failed to update environment for ${projectId}.`);
35
35
  }
36
+ /**
37
+ * Delete Environment
38
+ *
39
+ * @param projectId - Project Id
40
+ */
41
+ async delete(projectId) {
42
+ return this.callDelete(formatServiceUrl(API_PROJECT_ENVIRONMENT_URL, { url: this.config.url, projectId }, this.config.insecure), `Failed to update environment for ${projectId}.`);
43
+ }
36
44
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dronedeploy/rocos-js-sdk",
3
- "version": "3.0.1-alpha.42",
3
+ "version": "3.0.1-alpha.43",
4
4
  "description": "Javascript SDK for rocos",
5
5
  "main": "cjs/index.js",
6
6
  "module": "esm/index.js",