@dronedeploy/rocos-js-sdk 3.0.1-alpha.22 → 3.0.1-alpha.23
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 +4 -3
- package/cjs/models/target/Target.d.ts +11 -0
- package/cjs/services/AssetStorageService.d.ts +7 -0
- package/cjs/services/AssetStorageService.js +9 -0
- package/esm/constants/api.d.ts +1 -0
- package/esm/constants/api.js +1 -0
- package/esm/models/target/Target.d.ts +11 -0
- package/esm/services/AssetStorageService.d.ts +7 -0
- package/esm/services/AssetStorageService.js +10 -1
- package/package.json +1 -1
package/cjs/constants/api.d.ts
CHANGED
@@ -43,6 +43,7 @@ export declare const API_PROJECT_FLOW_ASSET_PATH_URL = "https://{url}/projects/{
|
|
43
43
|
export declare const API_PROJECT_MISSION_ASSETS_PATH_URL = "https://{url}/projects/{projectId}/missionassets";
|
44
44
|
export declare const API_PROJECT_MISSION_ASSET_PATH_URL = "https://{url}/projects/{projectId}/missionassets/{assetId}";
|
45
45
|
export declare const API_PROJECT_MAPPED_ASSETS_PATH_URL = "https://{url}/projects/{projectId}/mappedassets";
|
46
|
+
export declare const API_PROJECT_MAPPED_ASSET_PATH_URL = "https://{url}/projects/{projectId}/mappedassets/{assetId}";
|
46
47
|
export declare const API_PROJECT_ROBOT_URL = "https://{url}/projects/{projectId}/robots";
|
47
48
|
export declare const API_PROJECT_ROBOT_ID_URL = "https://{url}/projects/{projectId}/robots/{callsign}";
|
48
49
|
export declare const API_PROJECT_ROBOT_ATTRIBUTES_URL = "https://{url}/projects/{projectId}/robots/{callsign}/attributes";
|
package/cjs/constants/api.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
4
|
-
exports.
|
5
|
-
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_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 = void 0;
|
3
|
+
exports.API_PROJECT_ROBOT_DEFINITION_URL = 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_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
|
+
exports.API_PROJECT_ROBOT_DASHBOARD_URL = exports.API_PROJECT_STREAM_CALLSIGN_URL = exports.API_PROJECT_STREAM_DATA_URL = 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_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 = void 0;
|
5
|
+
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_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 = 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';
|
@@ -48,6 +48,7 @@ exports.API_PROJECT_FLOW_ASSET_PATH_URL = 'https://{url}/projects/{projectId}/fl
|
|
48
48
|
exports.API_PROJECT_MISSION_ASSETS_PATH_URL = 'https://{url}/projects/{projectId}/missionassets';
|
49
49
|
exports.API_PROJECT_MISSION_ASSET_PATH_URL = 'https://{url}/projects/{projectId}/missionassets/{assetId}';
|
50
50
|
exports.API_PROJECT_MAPPED_ASSETS_PATH_URL = 'https://{url}/projects/{projectId}/mappedassets';
|
51
|
+
exports.API_PROJECT_MAPPED_ASSET_PATH_URL = 'https://{url}/projects/{projectId}/mappedassets/{assetId}';
|
51
52
|
exports.API_PROJECT_ROBOT_URL = 'https://{url}/projects/{projectId}/robots';
|
52
53
|
exports.API_PROJECT_ROBOT_ID_URL = 'https://{url}/projects/{projectId}/robots/{callsign}';
|
53
54
|
exports.API_PROJECT_ROBOT_ATTRIBUTES_URL = 'https://{url}/projects/{projectId}/robots/{callsign}/attributes';
|
@@ -25,3 +25,14 @@ export interface Target {
|
|
25
25
|
*/
|
26
26
|
rotation: Quaternion;
|
27
27
|
}
|
28
|
+
type TargetMediaItem = {
|
29
|
+
id: string;
|
30
|
+
data: Record<string, string>;
|
31
|
+
};
|
32
|
+
export interface TargetWithMedia extends Target {
|
33
|
+
/**
|
34
|
+
* Media associated with the target (images)
|
35
|
+
*/
|
36
|
+
media: TargetMediaItem[];
|
37
|
+
}
|
38
|
+
export {};
|
@@ -78,6 +78,13 @@ export declare class AssetStorageService extends BaseServiceAbstract implements
|
|
78
78
|
* @param includeObservations If observations should be included in the response (optional)
|
79
79
|
*/
|
80
80
|
listMappedAssets(projectId: string, start?: Date, end?: Date, includeObservations?: boolean): Promise<AssetItemWithObservationsModel[]>;
|
81
|
+
/**
|
82
|
+
* Get mapped asset
|
83
|
+
*
|
84
|
+
* @param projectId
|
85
|
+
* @param id
|
86
|
+
*/
|
87
|
+
getMappedAsset(projectId: string, id: string): Promise<AssetItemWithObservationsModel>;
|
81
88
|
/**
|
82
89
|
* Set Robot Sync Definitions
|
83
90
|
* @param projectId
|
@@ -136,6 +136,15 @@ class AssetStorageService extends BaseServiceAbstract_1.BaseServiceAbstract {
|
|
136
136
|
includeObservations: includeObservations ? 'true' : 'false',
|
137
137
|
});
|
138
138
|
}
|
139
|
+
/**
|
140
|
+
* Get mapped asset
|
141
|
+
*
|
142
|
+
* @param projectId
|
143
|
+
* @param id
|
144
|
+
*/
|
145
|
+
async getMappedAsset(projectId, id) {
|
146
|
+
return this.callGet((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_PROJECT_MAPPED_ASSET_PATH_URL, { url: this.config.url, projectId, id }, this.config.insecure), `Failed to get mapped asset for ${projectId} and id: ${id}.`);
|
147
|
+
}
|
139
148
|
/**
|
140
149
|
* Set Robot Sync Definitions
|
141
150
|
* @param projectId
|
package/esm/constants/api.d.ts
CHANGED
@@ -43,6 +43,7 @@ export declare const API_PROJECT_FLOW_ASSET_PATH_URL = "https://{url}/projects/{
|
|
43
43
|
export declare const API_PROJECT_MISSION_ASSETS_PATH_URL = "https://{url}/projects/{projectId}/missionassets";
|
44
44
|
export declare const API_PROJECT_MISSION_ASSET_PATH_URL = "https://{url}/projects/{projectId}/missionassets/{assetId}";
|
45
45
|
export declare const API_PROJECT_MAPPED_ASSETS_PATH_URL = "https://{url}/projects/{projectId}/mappedassets";
|
46
|
+
export declare const API_PROJECT_MAPPED_ASSET_PATH_URL = "https://{url}/projects/{projectId}/mappedassets/{assetId}";
|
46
47
|
export declare const API_PROJECT_ROBOT_URL = "https://{url}/projects/{projectId}/robots";
|
47
48
|
export declare const API_PROJECT_ROBOT_ID_URL = "https://{url}/projects/{projectId}/robots/{callsign}";
|
48
49
|
export declare const API_PROJECT_ROBOT_ATTRIBUTES_URL = "https://{url}/projects/{projectId}/robots/{callsign}/attributes";
|
package/esm/constants/api.js
CHANGED
@@ -43,6 +43,7 @@ export const API_PROJECT_FLOW_ASSET_PATH_URL = 'https://{url}/projects/{projectI
|
|
43
43
|
export const API_PROJECT_MISSION_ASSETS_PATH_URL = 'https://{url}/projects/{projectId}/missionassets';
|
44
44
|
export const API_PROJECT_MISSION_ASSET_PATH_URL = 'https://{url}/projects/{projectId}/missionassets/{assetId}';
|
45
45
|
export const API_PROJECT_MAPPED_ASSETS_PATH_URL = 'https://{url}/projects/{projectId}/mappedassets';
|
46
|
+
export const API_PROJECT_MAPPED_ASSET_PATH_URL = 'https://{url}/projects/{projectId}/mappedassets/{assetId}';
|
46
47
|
export const API_PROJECT_ROBOT_URL = 'https://{url}/projects/{projectId}/robots';
|
47
48
|
export const API_PROJECT_ROBOT_ID_URL = 'https://{url}/projects/{projectId}/robots/{callsign}';
|
48
49
|
export const API_PROJECT_ROBOT_ATTRIBUTES_URL = 'https://{url}/projects/{projectId}/robots/{callsign}/attributes';
|
@@ -25,3 +25,14 @@ export interface Target {
|
|
25
25
|
*/
|
26
26
|
rotation: Quaternion;
|
27
27
|
}
|
28
|
+
type TargetMediaItem = {
|
29
|
+
id: string;
|
30
|
+
data: Record<string, string>;
|
31
|
+
};
|
32
|
+
export interface TargetWithMedia extends Target {
|
33
|
+
/**
|
34
|
+
* Media associated with the target (images)
|
35
|
+
*/
|
36
|
+
media: TargetMediaItem[];
|
37
|
+
}
|
38
|
+
export {};
|
@@ -78,6 +78,13 @@ export declare class AssetStorageService extends BaseServiceAbstract implements
|
|
78
78
|
* @param includeObservations If observations should be included in the response (optional)
|
79
79
|
*/
|
80
80
|
listMappedAssets(projectId: string, start?: Date, end?: Date, includeObservations?: boolean): Promise<AssetItemWithObservationsModel[]>;
|
81
|
+
/**
|
82
|
+
* Get mapped asset
|
83
|
+
*
|
84
|
+
* @param projectId
|
85
|
+
* @param id
|
86
|
+
*/
|
87
|
+
getMappedAsset(projectId: string, id: string): Promise<AssetItemWithObservationsModel>;
|
81
88
|
/**
|
82
89
|
* Set Robot Sync Definitions
|
83
90
|
* @param projectId
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { API_PROJECT_ASSET_INTEGRATIONS_PATH_URL, API_PROJECT_ASSET_INTEGRATION_PATH_URL, API_PROJECT_ASSET_INTEGRATION_PROVIDERS_PATH_URL, API_PROJECT_ASSET_PATH_URL, API_PROJECT_ASSET_PROFILES_SYNC_DEFINITION_PATH_URL, API_PROJECT_ASSET_ROBOTS_SYNC_DEFINITION_PATH_URL, API_PROJECT_ASSET_URL, API_PROJECT_FLOW_ASSET_PATH_URL, API_PROJECT_MAPPED_ASSETS_PATH_URL, API_PROJECT_MISSION_ASSETS_PATH_URL, API_PROJECT_MISSION_ASSET_PATH_URL, API_PROJECT_ROBOT_ASSET_PATH_URL, } from '../constants/api';
|
1
|
+
import { API_PROJECT_ASSET_INTEGRATIONS_PATH_URL, API_PROJECT_ASSET_INTEGRATION_PATH_URL, API_PROJECT_ASSET_INTEGRATION_PROVIDERS_PATH_URL, API_PROJECT_ASSET_PATH_URL, API_PROJECT_ASSET_PROFILES_SYNC_DEFINITION_PATH_URL, API_PROJECT_ASSET_ROBOTS_SYNC_DEFINITION_PATH_URL, API_PROJECT_ASSET_URL, API_PROJECT_FLOW_ASSET_PATH_URL, API_PROJECT_MAPPED_ASSETS_PATH_URL, API_PROJECT_MAPPED_ASSET_PATH_URL, API_PROJECT_MISSION_ASSETS_PATH_URL, API_PROJECT_MISSION_ASSET_PATH_URL, API_PROJECT_ROBOT_ASSET_PATH_URL, } from '../constants/api';
|
2
2
|
import { RocosError, errorCodes, } from '../models';
|
3
3
|
import { BaseServiceAbstract } from './BaseServiceAbstract';
|
4
4
|
import { RocosLogger } from '../logger/RocosLogger';
|
@@ -133,6 +133,15 @@ export class AssetStorageService extends BaseServiceAbstract {
|
|
133
133
|
includeObservations: includeObservations ? 'true' : 'false',
|
134
134
|
});
|
135
135
|
}
|
136
|
+
/**
|
137
|
+
* Get mapped asset
|
138
|
+
*
|
139
|
+
* @param projectId
|
140
|
+
* @param id
|
141
|
+
*/
|
142
|
+
async getMappedAsset(projectId, id) {
|
143
|
+
return this.callGet(formatServiceUrl(API_PROJECT_MAPPED_ASSET_PATH_URL, { url: this.config.url, projectId, id }, this.config.insecure), `Failed to get mapped asset for ${projectId} and id: ${id}.`);
|
144
|
+
}
|
136
145
|
/**
|
137
146
|
* Set Robot Sync Definitions
|
138
147
|
* @param projectId
|