@dronedeploy/rocos-js-sdk 3.0.1-alpha.31 → 3.0.1-alpha.32
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/constants/api.d.ts +1 -0
- package/cjs/constants/api.js +2 -1
- package/cjs/models/maps/Panorama.d.ts +1 -0
- package/cjs/models/target/Target.d.ts +4 -0
- package/cjs/services/TargetService.d.ts +4 -2
- package/cjs/services/TargetService.js +9 -1
- package/esm/constants/api.d.ts +1 -0
- package/esm/constants/api.js +1 -0
- package/esm/models/maps/Panorama.d.ts +1 -0
- package/esm/models/target/Target.d.ts +4 -0
- package/esm/services/TargetService.d.ts +4 -2
- package/esm/services/TargetService.js +10 -2
- package/package.json +1 -1
package/cjs/constants/api.d.ts
CHANGED
@@ -140,3 +140,4 @@ export declare const API_DEVICE_CREDENTIALS_URL = "https://{url}/projects/{proje
|
|
140
140
|
export declare const API_DEVICE_CREDENTIALS_AUTH_URL = "https://{url}/device-credentials/auth";
|
141
141
|
export declare const API_TARGETS_URL = "https://{url}/projects/{projectId}/targets";
|
142
142
|
export declare const API_TARGETs_MEDIA_URL = "https://{url}/projects/{projectId}/targets/{targetId}/media";
|
143
|
+
export declare const API_ASSETS_URL = "https://{url}/projects/{projectId}/assets";
|
package/cjs/constants/api.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.API_PROJECT_ROBOT_ATTRIBUTES_URL = exports.API_PROJECT_ROBOT_ID_URL = exports.API_PROJECT_ROBOT_URL = exports.API_PROJECT_MAPPED_ASSET_PATH_URL = exports.API_PROJECT_MAPPED_ASSETS_PATH_URL = exports.API_PROJECT_MISSION_ASSET_PATH_URL = exports.API_PROJECT_MISSION_ASSETS_PATH_URL = exports.API_PROJECT_FLOW_ASSET_PATH_URL = exports.API_PROJECT_ROBOT_ASSET_PATH_URL = exports.API_PROJECT_ASSET_INTEGRATION_PATH_URL = exports.API_PROJECT_ASSET_INTEGRATIONS_PATH_URL = exports.API_PROJECT_ASSET_INTEGRATION_PROVIDERS_PATH_URL = exports.API_PROJECT_ASSET_PROFILES_SYNC_DEFINITION_PATH_URL = exports.API_PROJECT_ASSET_ROBOTS_SYNC_DEFINITION_PATH_URL = exports.API_PROJECT_ASSET_PATH_URL = exports.API_PROJECT_ASSET_URL = exports.API_PROJECT_USERS_URL = exports.API_PROJECT_ID_URL = exports.API_PROJECT_URL = exports.API_ACCOUNT_EXTERNAL_PROJECTS_URL = exports.API_ACCOUNT_PROJECT_APPLICATION_ID_URL = exports.API_ACCOUNT_PROJECT_APPLICATION_URL = exports.API_ACCOUNT_PROJECT_USER_ID_URL = exports.API_ACCOUNT_PROJECT_USER_URL = exports.API_ACCOUNT_PROJECT_ID_URL = exports.API_ACCOUNT_PROJECT_URL = exports.API_SERVER_TIME_URL = exports.API_ACCOUNT_INTEGRATION_TYPE_URL = exports.API_ACCOUNT_INTEGRATION_URL = exports.API_ACCOUNT_SETTINGS_URL = exports.API_AUTH_USER_ACCOUNT_USER_ID_URL = exports.API_AUTH_USER_ACCOUNT_USER_URL = exports.API_ACCOUNT_ACTIVATE_URL = exports.API_ACCOUNT_ID_URL = exports.API_ACCOUNT_URL = exports.API_USER_PAT_TOKEN_URL = exports.API_USER_PAT_URL = exports.API_USER_VERIFY_EMAIL_URL = exports.API_USER_INVITATION_CHECK_URL = exports.API_USER_INVITATION_ACCEPT_URL = exports.API_USER_INVITATION_URL = exports.API_USER_PASSWORD_FORGOT_URL = exports.API_USER_PASSWORD_RESET_URL = exports.API_OTP_AUTH_URL = exports.API_OTP_URL = exports.API_USER_TOKEN_URL = exports.API_USER_AUTH_URL = exports.API_USER_URL = exports.API_ADMIN_USER_INVITATION_URL = exports.API_APPLICATION_AUTH_URL = void 0;
|
4
4
|
exports.API_PROJECT_STREAM_ID_URL = exports.API_PROJECT_STREAM_URL = exports.API_PROJECT_EXPORT_URL = exports.API_PROJECT_GROUP_TYPE_OWNER_OVERRIDE_URL = exports.API_PROJECT_GROUP_TYPE_OWNER_ID_URL = exports.API_PROJECT_GROUP_TYPE_VERSION_URL = exports.API_PROJECT_GROUP_TYPE_CONFIG_URL = exports.API_PROJECT_GROUP_TYPE_PUBLISH_URL = exports.API_PROJECT_GROUP_TYPE_ID_URL = exports.API_PROJECT_GROUP_TYPE_URL = exports.API_PROJECT_DEFINITION_IMPORT = exports.API_PROJECT_DEFINITION_EXPORT = exports.API_PROJECT_DEFINITION_GAMEPAD_URL = exports.API_PROJECT_DEFINITION_TRIGGER_URL = exports.API_PROJECT_DEFINITION_BUTTON_URL = exports.API_PROJECT_DEFINITION_ACTION_URL = exports.API_PROJECT_DEFINITION_EVENT_URL = exports.API_PROJECT_DEFINITION_COMMAND2_URL = exports.API_PROJECT_DEFINITION_COMMAND_URL = exports.API_PROJECT_DEFINITION_AGENT_URL = exports.API_PROJECT_DEFINITION_SETTING_URL = exports.API_PROJECT_DEFINITION_BLOB_URL = exports.API_PROJECT_DEFINITION_DASHBOARD_URL = exports.API_PROJECT_DEFINITION_COPY_URL = exports.API_PROJECT_DEFINITION_STREAM_URL = exports.API_PROJECT_DEFINITION_ID_URL = exports.API_PROJECT_DEFINITION_URL = exports.API_PROJECT_VROBOT_DEPLOY_URL = exports.API_PROJECT_VROBOT_DETAILS_URL = exports.API_PROJECT_COLLECTION_DOCS_URL = exports.API_PROJECT_COLLECTION_ID_URL = exports.API_PROJECT_DASHBOARD_CUSTOM_WIDGET_URL = exports.API_PROJECT_DASHBOARD_WIDGET_URL = exports.API_PROJECT_DASHBOARD_ID_URL = exports.API_PROJECT_DASHBOARD_URL = exports.API_PROJECT_OPERATION_ID_URL = exports.API_PROJECT_OPERATION_URL = exports.API_PROJECT_ROBOT_CONFIGS_CONNECTION_URL = exports.API_PROJECT_ROBOT_CONFIGS_CONNECTIONS_URL = exports.API_PROJECT_ROBOT_GAMEPAD_URL = exports.API_PROJECT_ROBOT_TRIGGER_URL = exports.API_PROJECT_ROBOT_BUTTON_URL = exports.API_PROJECT_ROBOT_COMMAND2_URL = exports.API_PROJECT_ROBOT_COMMAND_URL = exports.API_PROJECT_ROBOT_AGENT_URL = exports.API_PROJECT_ROBOT_SETTING_URL = exports.API_PROJECT_ROBOT_EVENT_HISTORY_URL = exports.API_PROJECT_ROBOT_EVENT_URL = exports.API_PROJECT_ROBOT_REGISTER_URL = exports.API_PROJECT_ROBOT_DEFINITION_URL = void 0;
|
5
|
-
exports.API_TARGETs_MEDIA_URL = exports.API_TARGETS_URL = exports.API_DEVICE_CREDENTIALS_AUTH_URL = exports.API_DEVICE_CREDENTIALS_URL = exports.API_LINKED_PROJECT_URL = exports.API_PROJECT_DEPLOYED_WORKFLOW_URL = exports.API_PROJECT_WORKFLOW_ASSET_URL = exports.API_PROJECT_WORKFLOW_ID_URL = exports.API_PROJECT_WORKFLOW_URL = exports.API_OBSERVATION_KEYS_URL = exports.API_OBSERVATIONS_URL = exports.API_MAPS_PANORAMA_OBSERVATIONS_URL = exports.API_MAPS_GEOJSON_URL = exports.API_MAPS_DEPLOY_URL = exports.API_MAPS_COPY_URL = exports.API_MAP_ID_URL = exports.API_MAPS_MERGE_URL = exports.API_MAPS_DEPLOYED_URL = exports.API_MAPS_URL = exports.API_DD_INTEGRATION_LOCATIONS_URL = exports.API_DD_INTEGRATION_ISSUES_URL = exports.API_DD_INTEGRATION_OVERLAYS_URL = exports.API_DD_INTEGRATION_PLAN_BY_ID_URL = exports.API_DD_INTEGRATION_PLANS_URL = exports.API_SPOTTY_URL = exports.API_PROJECT_SCHEDULES_URL = exports.API_SOURCE_ID_URL = exports.API_SOURCE_URL = exports.API_SOURCE_SCHEMA_URL = exports.API_TEMPLATE_EXPORTER_URL = exports.API_TEMPLATE_PROVISION_ID_URL = exports.API_TEMPLATE_PROVISION_URL = exports.API_TEMPLATE_DEPLOY_URL = exports.API_PROJECT_PROFILE_DASHBOARD_CUSTOM_WIDGET_URL = exports.API_PROJECT_PROFILE_DASHBOARD_ID_URL = exports.API_PROJECT_PROFILE_DASHBOARD_URL = exports.API_PROJECT_CALLSIGN_STREAM_URL = exports.API_PROJECT_ROBOT_DASHBOARD_CUSTOM_WIDGET_URL = exports.API_PROJECT_ROBOT_DASHBOARD_ID_URL = exports.API_PROJECT_ROBOT_DASHBOARD_URL = exports.API_PROJECT_STREAM_CALLSIGN_URL = exports.API_PROJECT_STREAM_DATA_URL = void 0;
|
5
|
+
exports.API_ASSETS_URL = exports.API_TARGETs_MEDIA_URL = exports.API_TARGETS_URL = exports.API_DEVICE_CREDENTIALS_AUTH_URL = exports.API_DEVICE_CREDENTIALS_URL = exports.API_LINKED_PROJECT_URL = exports.API_PROJECT_DEPLOYED_WORKFLOW_URL = exports.API_PROJECT_WORKFLOW_ASSET_URL = exports.API_PROJECT_WORKFLOW_ID_URL = exports.API_PROJECT_WORKFLOW_URL = exports.API_OBSERVATION_KEYS_URL = exports.API_OBSERVATIONS_URL = exports.API_MAPS_PANORAMA_OBSERVATIONS_URL = exports.API_MAPS_GEOJSON_URL = exports.API_MAPS_DEPLOY_URL = exports.API_MAPS_COPY_URL = exports.API_MAP_ID_URL = exports.API_MAPS_MERGE_URL = exports.API_MAPS_DEPLOYED_URL = exports.API_MAPS_URL = exports.API_DD_INTEGRATION_LOCATIONS_URL = exports.API_DD_INTEGRATION_ISSUES_URL = exports.API_DD_INTEGRATION_OVERLAYS_URL = exports.API_DD_INTEGRATION_PLAN_BY_ID_URL = exports.API_DD_INTEGRATION_PLANS_URL = exports.API_SPOTTY_URL = exports.API_PROJECT_SCHEDULES_URL = exports.API_SOURCE_ID_URL = exports.API_SOURCE_URL = exports.API_SOURCE_SCHEMA_URL = exports.API_TEMPLATE_EXPORTER_URL = exports.API_TEMPLATE_PROVISION_ID_URL = exports.API_TEMPLATE_PROVISION_URL = exports.API_TEMPLATE_DEPLOY_URL = exports.API_PROJECT_PROFILE_DASHBOARD_CUSTOM_WIDGET_URL = exports.API_PROJECT_PROFILE_DASHBOARD_ID_URL = exports.API_PROJECT_PROFILE_DASHBOARD_URL = exports.API_PROJECT_CALLSIGN_STREAM_URL = exports.API_PROJECT_ROBOT_DASHBOARD_CUSTOM_WIDGET_URL = exports.API_PROJECT_ROBOT_DASHBOARD_ID_URL = exports.API_PROJECT_ROBOT_DASHBOARD_URL = exports.API_PROJECT_STREAM_CALLSIGN_URL = exports.API_PROJECT_STREAM_DATA_URL = void 0;
|
6
6
|
exports.API_APPLICATION_AUTH_URL = 'https://{url}/applications/auth';
|
7
7
|
exports.API_ADMIN_USER_INVITATION_URL = 'https://{url}/admin/users/invitations';
|
8
8
|
exports.API_USER_URL = 'https://{url}/users';
|
@@ -145,3 +145,4 @@ exports.API_DEVICE_CREDENTIALS_URL = 'https://{url}/projects/{projectId}/callsig
|
|
145
145
|
exports.API_DEVICE_CREDENTIALS_AUTH_URL = 'https://{url}/device-credentials/auth';
|
146
146
|
exports.API_TARGETS_URL = 'https://{url}/projects/{projectId}/targets';
|
147
147
|
exports.API_TARGETs_MEDIA_URL = 'https://{url}/projects/{projectId}/targets/{targetId}/media';
|
148
|
+
exports.API_ASSETS_URL = 'https://{url}/projects/{projectId}/assets';
|
@@ -1,13 +1,15 @@
|
|
1
|
-
import { IBaseService, IRocosSDKConfig, RocosError, Target, TargetMedia } from '../models';
|
1
|
+
import { Asset, IBaseService, IRocosSDKConfig, RocosError, Target, TargetMedia } from '../models';
|
2
2
|
import { BaseServiceAbstract } from './BaseServiceAbstract';
|
3
3
|
/**
|
4
4
|
* Service for managing targets (such as assets, PoI's, or FLOCS) on DroneDeploy
|
5
5
|
*/
|
6
6
|
export declare class TargetService extends BaseServiceAbstract implements IBaseService {
|
7
|
+
list: (projectId: string, frameID?: string) => Promise<Target[]>;
|
7
8
|
constructor(config: IRocosSDKConfig);
|
8
9
|
getStatus(): boolean;
|
9
10
|
protected getError(e: Error): RocosError;
|
10
|
-
|
11
|
+
listTargets(projectId: string, frameID?: string): Promise<Target[]>;
|
12
|
+
listAssets(projectId: string, frameID?: string): Promise<Asset[]>;
|
11
13
|
getMedia(projectId: string, targetId: string): Promise<Target>;
|
12
14
|
addMedia(projectId: string, targetId: string, media: TargetMedia): Promise<void>;
|
13
15
|
}
|
@@ -13,6 +13,7 @@ class TargetService extends BaseServiceAbstract_1.BaseServiceAbstract {
|
|
13
13
|
constructor(config) {
|
14
14
|
super(config);
|
15
15
|
this.logger = RocosLogger_1.RocosLogger.getInstance(`TargetService(${this.config.url})`);
|
16
|
+
this.list = this.listTargets;
|
16
17
|
}
|
17
18
|
getStatus() {
|
18
19
|
return true;
|
@@ -20,13 +21,20 @@ class TargetService extends BaseServiceAbstract_1.BaseServiceAbstract {
|
|
20
21
|
getError(e) {
|
21
22
|
return new models_1.RocosError(e, models_1.errorCodes.TARGET_SERVICE_ERROR);
|
22
23
|
}
|
23
|
-
async
|
24
|
+
async listTargets(projectId, frameID = 'seed') {
|
24
25
|
const resp = await this.callGet((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_TARGETS_URL, {
|
25
26
|
url: this.config.url,
|
26
27
|
projectId,
|
27
28
|
}, this.config.insecure), 'Failed to list targets', { frameID });
|
28
29
|
return resp;
|
29
30
|
}
|
31
|
+
async listAssets(projectId, frameID = 'seed') {
|
32
|
+
const resp = await this.callGet((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_ASSETS_URL, {
|
33
|
+
url: this.config.url,
|
34
|
+
projectId,
|
35
|
+
}, this.config.insecure), 'Failed to list assets', { frameID });
|
36
|
+
return resp;
|
37
|
+
}
|
30
38
|
async getMedia(projectId, targetId) {
|
31
39
|
const resp = await this.callGet((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_TARGETs_MEDIA_URL, {
|
32
40
|
url: this.config.url,
|
package/esm/constants/api.d.ts
CHANGED
@@ -140,3 +140,4 @@ export declare const API_DEVICE_CREDENTIALS_URL = "https://{url}/projects/{proje
|
|
140
140
|
export declare const API_DEVICE_CREDENTIALS_AUTH_URL = "https://{url}/device-credentials/auth";
|
141
141
|
export declare const API_TARGETS_URL = "https://{url}/projects/{projectId}/targets";
|
142
142
|
export declare const API_TARGETs_MEDIA_URL = "https://{url}/projects/{projectId}/targets/{targetId}/media";
|
143
|
+
export declare const API_ASSETS_URL = "https://{url}/projects/{projectId}/assets";
|
package/esm/constants/api.js
CHANGED
@@ -140,3 +140,4 @@ export const API_DEVICE_CREDENTIALS_URL = 'https://{url}/projects/{projectId}/ca
|
|
140
140
|
export const API_DEVICE_CREDENTIALS_AUTH_URL = 'https://{url}/device-credentials/auth';
|
141
141
|
export const API_TARGETS_URL = 'https://{url}/projects/{projectId}/targets';
|
142
142
|
export const API_TARGETs_MEDIA_URL = 'https://{url}/projects/{projectId}/targets/{targetId}/media';
|
143
|
+
export const API_ASSETS_URL = 'https://{url}/projects/{projectId}/assets';
|
@@ -1,13 +1,15 @@
|
|
1
|
-
import { IBaseService, IRocosSDKConfig, RocosError, Target, TargetMedia } from '../models';
|
1
|
+
import { Asset, IBaseService, IRocosSDKConfig, RocosError, Target, TargetMedia } from '../models';
|
2
2
|
import { BaseServiceAbstract } from './BaseServiceAbstract';
|
3
3
|
/**
|
4
4
|
* Service for managing targets (such as assets, PoI's, or FLOCS) on DroneDeploy
|
5
5
|
*/
|
6
6
|
export declare class TargetService extends BaseServiceAbstract implements IBaseService {
|
7
|
+
list: (projectId: string, frameID?: string) => Promise<Target[]>;
|
7
8
|
constructor(config: IRocosSDKConfig);
|
8
9
|
getStatus(): boolean;
|
9
10
|
protected getError(e: Error): RocosError;
|
10
|
-
|
11
|
+
listTargets(projectId: string, frameID?: string): Promise<Target[]>;
|
12
|
+
listAssets(projectId: string, frameID?: string): Promise<Asset[]>;
|
11
13
|
getMedia(projectId: string, targetId: string): Promise<Target>;
|
12
14
|
addMedia(projectId: string, targetId: string, media: TargetMedia): Promise<void>;
|
13
15
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { API_TARGETS_URL, API_TARGETs_MEDIA_URL } from '../constants/api';
|
1
|
+
import { API_ASSETS_URL, API_TARGETS_URL, API_TARGETs_MEDIA_URL } from '../constants/api';
|
2
2
|
import { RocosError, errorCodes } from '../models';
|
3
3
|
import { BaseServiceAbstract } from './BaseServiceAbstract';
|
4
4
|
import { RocosLogger } from '../logger/RocosLogger';
|
@@ -10,6 +10,7 @@ export class TargetService extends BaseServiceAbstract {
|
|
10
10
|
constructor(config) {
|
11
11
|
super(config);
|
12
12
|
this.logger = RocosLogger.getInstance(`TargetService(${this.config.url})`);
|
13
|
+
this.list = this.listTargets;
|
13
14
|
}
|
14
15
|
getStatus() {
|
15
16
|
return true;
|
@@ -17,13 +18,20 @@ export class TargetService extends BaseServiceAbstract {
|
|
17
18
|
getError(e) {
|
18
19
|
return new RocosError(e, errorCodes.TARGET_SERVICE_ERROR);
|
19
20
|
}
|
20
|
-
async
|
21
|
+
async listTargets(projectId, frameID = 'seed') {
|
21
22
|
const resp = await this.callGet(formatServiceUrl(API_TARGETS_URL, {
|
22
23
|
url: this.config.url,
|
23
24
|
projectId,
|
24
25
|
}, this.config.insecure), 'Failed to list targets', { frameID });
|
25
26
|
return resp;
|
26
27
|
}
|
28
|
+
async listAssets(projectId, frameID = 'seed') {
|
29
|
+
const resp = await this.callGet(formatServiceUrl(API_ASSETS_URL, {
|
30
|
+
url: this.config.url,
|
31
|
+
projectId,
|
32
|
+
}, this.config.insecure), 'Failed to list assets', { frameID });
|
33
|
+
return resp;
|
34
|
+
}
|
27
35
|
async getMedia(projectId, targetId) {
|
28
36
|
const resp = await this.callGet(formatServiceUrl(API_TARGETs_MEDIA_URL, {
|
29
37
|
url: this.config.url,
|