@dronedeploy/rocos-js-sdk 3.0.1 → 3.0.3
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/cjs/models/maps/Map.d.ts +1 -0
- package/cjs/services/EnvironmentService.d.ts +6 -0
- package/cjs/services/EnvironmentService.js +8 -0
- package/cjs/services/TargetService.d.ts +1 -0
- package/cjs/services/TargetService.js +8 -0
- package/esm/models/maps/Map.d.ts +1 -0
- package/esm/services/EnvironmentService.d.ts +6 -0
- package/esm/services/EnvironmentService.js +8 -0
- package/esm/services/TargetService.d.ts +1 -0
- package/esm/services/TargetService.js +8 -0
- package/package.json +1 -1
package/cjs/models/maps/Map.d.ts
CHANGED
@@ -13,6 +13,12 @@ export declare class EnvironmentService extends BaseServiceAbstract implements I
|
|
13
13
|
* @param projectId - Project Id
|
14
14
|
*/
|
15
15
|
get(projectId: string): Promise<unknown>;
|
16
|
+
/**
|
17
|
+
* Set Environment
|
18
|
+
*
|
19
|
+
* @param projectId - Project Id
|
20
|
+
*/
|
21
|
+
set(projectId: string, scene: unknown): Promise<void>;
|
16
22
|
/**
|
17
23
|
* Update Environment
|
18
24
|
*
|
@@ -28,6 +28,14 @@ class EnvironmentService extends BaseServiceAbstract_1.BaseServiceAbstract {
|
|
28
28
|
async get(projectId) {
|
29
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
|
+
/**
|
32
|
+
* Set Environment
|
33
|
+
*
|
34
|
+
* @param projectId - Project Id
|
35
|
+
*/
|
36
|
+
async set(projectId, scene) {
|
37
|
+
return this.callPost((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_PROJECT_ENVIRONMENT_URL, { url: this.config.url, projectId }, this.config.insecure), scene, `Failed to set environment for ${projectId}.`);
|
38
|
+
}
|
31
39
|
/**
|
32
40
|
* Update Environment
|
33
41
|
*
|
@@ -12,5 +12,6 @@ export declare class TargetService extends BaseServiceAbstract implements IBaseS
|
|
12
12
|
listTargets(projectId: string, frameID?: string): Promise<Target[]>;
|
13
13
|
createAssets(projectId: string, assets: Asset[]): Promise<void>;
|
14
14
|
listAssets(projectId: string, frameID?: string): Promise<Asset[]>;
|
15
|
+
deleteAssets(projectId: string, assetIds: string[]): Promise<void>;
|
15
16
|
addMedia(projectId: string, targetId: string, media: TargetMedia): Promise<void>;
|
16
17
|
}
|
@@ -47,6 +47,14 @@ class TargetService extends BaseServiceAbstract_1.BaseServiceAbstract {
|
|
47
47
|
}, this.config.insecure), 'Failed to list assets', { frameID });
|
48
48
|
return resp;
|
49
49
|
}
|
50
|
+
async deleteAssets(projectId, assetIds) {
|
51
|
+
await this.callDelete((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_GRAPHS_ASSETS_URL, {
|
52
|
+
url: this.config.url,
|
53
|
+
projectId,
|
54
|
+
}, this.config.insecure), 'Failed to delete assets', {
|
55
|
+
assetIds,
|
56
|
+
});
|
57
|
+
}
|
50
58
|
async addMedia(projectId, targetId, media) {
|
51
59
|
await this.callPost((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_GRAPHS_TARGETS_URL, {
|
52
60
|
url: this.config.url,
|
package/esm/models/maps/Map.d.ts
CHANGED
@@ -13,6 +13,12 @@ export declare class EnvironmentService extends BaseServiceAbstract implements I
|
|
13
13
|
* @param projectId - Project Id
|
14
14
|
*/
|
15
15
|
get(projectId: string): Promise<unknown>;
|
16
|
+
/**
|
17
|
+
* Set Environment
|
18
|
+
*
|
19
|
+
* @param projectId - Project Id
|
20
|
+
*/
|
21
|
+
set(projectId: string, scene: unknown): Promise<void>;
|
16
22
|
/**
|
17
23
|
* Update Environment
|
18
24
|
*
|
@@ -25,6 +25,14 @@ export class EnvironmentService extends BaseServiceAbstract {
|
|
25
25
|
async get(projectId) {
|
26
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
|
+
/**
|
29
|
+
* Set Environment
|
30
|
+
*
|
31
|
+
* @param projectId - Project Id
|
32
|
+
*/
|
33
|
+
async set(projectId, scene) {
|
34
|
+
return this.callPost(formatServiceUrl(API_PROJECT_ENVIRONMENT_URL, { url: this.config.url, projectId }, this.config.insecure), scene, `Failed to set environment for ${projectId}.`);
|
35
|
+
}
|
28
36
|
/**
|
29
37
|
* Update Environment
|
30
38
|
*
|
@@ -12,5 +12,6 @@ export declare class TargetService extends BaseServiceAbstract implements IBaseS
|
|
12
12
|
listTargets(projectId: string, frameID?: string): Promise<Target[]>;
|
13
13
|
createAssets(projectId: string, assets: Asset[]): Promise<void>;
|
14
14
|
listAssets(projectId: string, frameID?: string): Promise<Asset[]>;
|
15
|
+
deleteAssets(projectId: string, assetIds: string[]): Promise<void>;
|
15
16
|
addMedia(projectId: string, targetId: string, media: TargetMedia): Promise<void>;
|
16
17
|
}
|
@@ -44,6 +44,14 @@ export class TargetService extends BaseServiceAbstract {
|
|
44
44
|
}, this.config.insecure), 'Failed to list assets', { frameID });
|
45
45
|
return resp;
|
46
46
|
}
|
47
|
+
async deleteAssets(projectId, assetIds) {
|
48
|
+
await this.callDelete(formatServiceUrl(API_GRAPHS_ASSETS_URL, {
|
49
|
+
url: this.config.url,
|
50
|
+
projectId,
|
51
|
+
}, this.config.insecure), 'Failed to delete assets', {
|
52
|
+
assetIds,
|
53
|
+
});
|
54
|
+
}
|
47
55
|
async addMedia(projectId, targetId, media) {
|
48
56
|
await this.callPost(formatServiceUrl(API_GRAPHS_TARGETS_URL, {
|
49
57
|
url: this.config.url,
|