@dronedeploy/rocos-js-sdk 3.0.1-alpha.24 → 3.0.1-alpha.26
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/helpers/cleanObject.js +4 -1
- package/cjs/models/index.d.ts +2 -0
- package/cjs/models/index.js +2 -0
- package/cjs/models/integrations/Location.d.ts +24 -0
- package/cjs/models/integrations/Location.js +2 -0
- package/cjs/models/integrations/PaginatedResults.d.ts +4 -0
- package/cjs/models/integrations/PaginatedResults.js +2 -0
- package/cjs/services/IntegrationService.d.ts +7 -1
- package/cjs/services/IntegrationService.js +8 -0
- package/esm/constants/api.d.ts +1 -0
- package/esm/constants/api.js +1 -0
- package/esm/helpers/cleanObject.js +4 -1
- package/esm/models/index.d.ts +2 -0
- package/esm/models/index.js +2 -0
- package/esm/models/integrations/Location.d.ts +24 -0
- package/esm/models/integrations/Location.js +1 -0
- package/esm/models/integrations/PaginatedResults.d.ts +4 -0
- package/esm/models/integrations/PaginatedResults.js +1 -0
- package/esm/services/IntegrationService.d.ts +7 -1
- package/esm/services/IntegrationService.js +10 -2
- package/package.json +1 -1
package/cjs/constants/api.d.ts
CHANGED
@@ -117,6 +117,7 @@ export declare const API_DD_INTEGRATION_PLANS_URL = "https://{url}/projects/{pro
|
|
117
117
|
export declare const API_DD_INTEGRATION_PLAN_BY_ID_URL = "https://{url}/projects/{projectId}/dd/plan/{planId}";
|
118
118
|
export declare const API_DD_INTEGRATION_OVERLAYS_URL = "https://{url}/projects/{projectId}/dd/overlays";
|
119
119
|
export declare const API_DD_INTEGRATION_ISSUES_URL = "https://{url}/projects/{projectId}/dd/issues";
|
120
|
+
export declare const API_DD_INTEGRATION_LOCATIONS_URL = "https://{url}/projects/{projectId}/dd/locations";
|
120
121
|
export declare const API_MAPS_URL = "https://{url}/projects/{projectId}/maps";
|
121
122
|
export declare const API_MAPS_DEPLOYED_URL = "https://{url}/projects/{projectId}/maps/deployed?callsign={callsign}";
|
122
123
|
export declare const API_MAPS_MERGE_URL = "https://{url}/projects/{projectId}/maps/merge";
|
package/cjs/constants/api.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
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
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;
|
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_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 = 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';
|
@@ -122,6 +122,7 @@ exports.API_DD_INTEGRATION_PLANS_URL = 'https://{url}/projects/{projectId}/dd/pl
|
|
122
122
|
exports.API_DD_INTEGRATION_PLAN_BY_ID_URL = 'https://{url}/projects/{projectId}/dd/plan/{planId}';
|
123
123
|
exports.API_DD_INTEGRATION_OVERLAYS_URL = 'https://{url}/projects/{projectId}/dd/overlays';
|
124
124
|
exports.API_DD_INTEGRATION_ISSUES_URL = 'https://{url}/projects/{projectId}/dd/issues';
|
125
|
+
exports.API_DD_INTEGRATION_LOCATIONS_URL = 'https://{url}/projects/{projectId}/dd/locations';
|
125
126
|
exports.API_MAPS_URL = 'https://{url}/projects/{projectId}/maps';
|
126
127
|
exports.API_MAPS_DEPLOYED_URL = 'https://{url}/projects/{projectId}/maps/deployed?callsign={callsign}';
|
127
128
|
exports.API_MAPS_MERGE_URL = 'https://{url}/projects/{projectId}/maps/merge';
|
@@ -5,7 +5,10 @@ const cleanObject = (object) => {
|
|
5
5
|
return {
|
6
6
|
...(function _flatten(o) {
|
7
7
|
return [...Object.entries(o)].reduce((obj, [key, val]) => {
|
8
|
-
if (
|
8
|
+
if (val === null) {
|
9
|
+
obj[key] = val;
|
10
|
+
}
|
11
|
+
else if (typeof val === 'object') {
|
9
12
|
obj[key] = _flatten(val);
|
10
13
|
}
|
11
14
|
else if (typeof val === 'function') {
|
package/cjs/models/index.d.ts
CHANGED
@@ -30,6 +30,8 @@ export * from './stream/ITelemetryStream';
|
|
30
30
|
export * from './stream/IWebRTCSignallingStream';
|
31
31
|
export * from './integrations/Overlay';
|
32
32
|
export * from './integrations/Plan';
|
33
|
+
export * from './integrations/Location';
|
34
|
+
export * from './integrations/PaginatedResults';
|
33
35
|
export * from './maps/Map';
|
34
36
|
export * from './maps/Panorama';
|
35
37
|
export * from './projects/ProjectUser';
|
package/cjs/models/index.js
CHANGED
@@ -46,6 +46,8 @@ __exportStar(require("./stream/ITelemetryStream"), exports);
|
|
46
46
|
__exportStar(require("./stream/IWebRTCSignallingStream"), exports);
|
47
47
|
__exportStar(require("./integrations/Overlay"), exports);
|
48
48
|
__exportStar(require("./integrations/Plan"), exports);
|
49
|
+
__exportStar(require("./integrations/Location"), exports);
|
50
|
+
__exportStar(require("./integrations/PaginatedResults"), exports);
|
49
51
|
__exportStar(require("./maps/Map"), exports);
|
50
52
|
__exportStar(require("./maps/Panorama"), exports);
|
51
53
|
__exportStar(require("./projects/ProjectUser"), exports);
|
@@ -0,0 +1,24 @@
|
|
1
|
+
export interface Location {
|
2
|
+
id: string;
|
3
|
+
name: string;
|
4
|
+
level?: {
|
5
|
+
id: string;
|
6
|
+
};
|
7
|
+
locationType?: {
|
8
|
+
id: string;
|
9
|
+
name: string;
|
10
|
+
};
|
11
|
+
shape: {
|
12
|
+
coordinates: Array<{
|
13
|
+
lat: number;
|
14
|
+
lng: number;
|
15
|
+
}>;
|
16
|
+
radiusMeters?: number;
|
17
|
+
shapeType: string;
|
18
|
+
};
|
19
|
+
shapeStyle: {
|
20
|
+
fillColor: string;
|
21
|
+
strokeColor: string;
|
22
|
+
fillOpacity: number;
|
23
|
+
};
|
24
|
+
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { IBaseService, IRocosSDKConfig, Overlay, Plan, RocosError } from '../models';
|
1
|
+
import { IBaseService, IRocosSDKConfig, Location, Overlay, PaginatedResults, Plan, RocosError } from '../models';
|
2
2
|
import { BaseServiceAbstract } from './BaseServiceAbstract';
|
3
3
|
/**
|
4
4
|
* Integrations to retrieve data from the linked project in DroneDeploy
|
@@ -45,4 +45,10 @@ export declare class IntegrationService extends BaseServiceAbstract implements I
|
|
45
45
|
lat: number;
|
46
46
|
lng: number;
|
47
47
|
}): Promise<void>;
|
48
|
+
/**
|
49
|
+
* Gets locations for the provided project ID
|
50
|
+
* @param projectId Project ID
|
51
|
+
* @returns Plans list (limited to 50)
|
52
|
+
*/
|
53
|
+
getLocations(projectId: string, pageStart?: string): Promise<PaginatedResults<Location>>;
|
48
54
|
}
|
@@ -72,5 +72,13 @@ class IntegrationService extends BaseServiceAbstract_1.BaseServiceAbstract {
|
|
72
72
|
lng: location.lng,
|
73
73
|
}, 'Failed to create issue.');
|
74
74
|
}
|
75
|
+
/**
|
76
|
+
* Gets locations for the provided project ID
|
77
|
+
* @param projectId Project ID
|
78
|
+
* @returns Plans list (limited to 50)
|
79
|
+
*/
|
80
|
+
async getLocations(projectId, pageStart) {
|
81
|
+
return this.callGet((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_DD_INTEGRATION_LOCATIONS_URL, { url: this.config.url, projectId }, this.config.insecure), 'Failed to get locations.', pageStart ? { page_start: pageStart } : undefined);
|
82
|
+
}
|
75
83
|
}
|
76
84
|
exports.IntegrationService = IntegrationService;
|
package/esm/constants/api.d.ts
CHANGED
@@ -117,6 +117,7 @@ export declare const API_DD_INTEGRATION_PLANS_URL = "https://{url}/projects/{pro
|
|
117
117
|
export declare const API_DD_INTEGRATION_PLAN_BY_ID_URL = "https://{url}/projects/{projectId}/dd/plan/{planId}";
|
118
118
|
export declare const API_DD_INTEGRATION_OVERLAYS_URL = "https://{url}/projects/{projectId}/dd/overlays";
|
119
119
|
export declare const API_DD_INTEGRATION_ISSUES_URL = "https://{url}/projects/{projectId}/dd/issues";
|
120
|
+
export declare const API_DD_INTEGRATION_LOCATIONS_URL = "https://{url}/projects/{projectId}/dd/locations";
|
120
121
|
export declare const API_MAPS_URL = "https://{url}/projects/{projectId}/maps";
|
121
122
|
export declare const API_MAPS_DEPLOYED_URL = "https://{url}/projects/{projectId}/maps/deployed?callsign={callsign}";
|
122
123
|
export declare const API_MAPS_MERGE_URL = "https://{url}/projects/{projectId}/maps/merge";
|
package/esm/constants/api.js
CHANGED
@@ -117,6 +117,7 @@ export const API_DD_INTEGRATION_PLANS_URL = 'https://{url}/projects/{projectId}/
|
|
117
117
|
export const API_DD_INTEGRATION_PLAN_BY_ID_URL = 'https://{url}/projects/{projectId}/dd/plan/{planId}';
|
118
118
|
export const API_DD_INTEGRATION_OVERLAYS_URL = 'https://{url}/projects/{projectId}/dd/overlays';
|
119
119
|
export const API_DD_INTEGRATION_ISSUES_URL = 'https://{url}/projects/{projectId}/dd/issues';
|
120
|
+
export const API_DD_INTEGRATION_LOCATIONS_URL = 'https://{url}/projects/{projectId}/dd/locations';
|
120
121
|
export const API_MAPS_URL = 'https://{url}/projects/{projectId}/maps';
|
121
122
|
export const API_MAPS_DEPLOYED_URL = 'https://{url}/projects/{projectId}/maps/deployed?callsign={callsign}';
|
122
123
|
export const API_MAPS_MERGE_URL = 'https://{url}/projects/{projectId}/maps/merge';
|
@@ -2,7 +2,10 @@ export const cleanObject = (object) => {
|
|
2
2
|
return {
|
3
3
|
...(function _flatten(o) {
|
4
4
|
return [...Object.entries(o)].reduce((obj, [key, val]) => {
|
5
|
-
if (
|
5
|
+
if (val === null) {
|
6
|
+
obj[key] = val;
|
7
|
+
}
|
8
|
+
else if (typeof val === 'object') {
|
6
9
|
obj[key] = _flatten(val);
|
7
10
|
}
|
8
11
|
else if (typeof val === 'function') {
|
package/esm/models/index.d.ts
CHANGED
@@ -30,6 +30,8 @@ export * from './stream/ITelemetryStream';
|
|
30
30
|
export * from './stream/IWebRTCSignallingStream';
|
31
31
|
export * from './integrations/Overlay';
|
32
32
|
export * from './integrations/Plan';
|
33
|
+
export * from './integrations/Location';
|
34
|
+
export * from './integrations/PaginatedResults';
|
33
35
|
export * from './maps/Map';
|
34
36
|
export * from './maps/Panorama';
|
35
37
|
export * from './projects/ProjectUser';
|
package/esm/models/index.js
CHANGED
@@ -30,6 +30,8 @@ export * from './stream/ITelemetryStream';
|
|
30
30
|
export * from './stream/IWebRTCSignallingStream';
|
31
31
|
export * from './integrations/Overlay';
|
32
32
|
export * from './integrations/Plan';
|
33
|
+
export * from './integrations/Location';
|
34
|
+
export * from './integrations/PaginatedResults';
|
33
35
|
export * from './maps/Map';
|
34
36
|
export * from './maps/Panorama';
|
35
37
|
export * from './projects/ProjectUser';
|
@@ -0,0 +1,24 @@
|
|
1
|
+
export interface Location {
|
2
|
+
id: string;
|
3
|
+
name: string;
|
4
|
+
level?: {
|
5
|
+
id: string;
|
6
|
+
};
|
7
|
+
locationType?: {
|
8
|
+
id: string;
|
9
|
+
name: string;
|
10
|
+
};
|
11
|
+
shape: {
|
12
|
+
coordinates: Array<{
|
13
|
+
lat: number;
|
14
|
+
lng: number;
|
15
|
+
}>;
|
16
|
+
radiusMeters?: number;
|
17
|
+
shapeType: string;
|
18
|
+
};
|
19
|
+
shapeStyle: {
|
20
|
+
fillColor: string;
|
21
|
+
strokeColor: string;
|
22
|
+
fillOpacity: number;
|
23
|
+
};
|
24
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { IBaseService, IRocosSDKConfig, Overlay, Plan, RocosError } from '../models';
|
1
|
+
import { IBaseService, IRocosSDKConfig, Location, Overlay, PaginatedResults, Plan, RocosError } from '../models';
|
2
2
|
import { BaseServiceAbstract } from './BaseServiceAbstract';
|
3
3
|
/**
|
4
4
|
* Integrations to retrieve data from the linked project in DroneDeploy
|
@@ -45,4 +45,10 @@ export declare class IntegrationService extends BaseServiceAbstract implements I
|
|
45
45
|
lat: number;
|
46
46
|
lng: number;
|
47
47
|
}): Promise<void>;
|
48
|
+
/**
|
49
|
+
* Gets locations for the provided project ID
|
50
|
+
* @param projectId Project ID
|
51
|
+
* @returns Plans list (limited to 50)
|
52
|
+
*/
|
53
|
+
getLocations(projectId: string, pageStart?: string): Promise<PaginatedResults<Location>>;
|
48
54
|
}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { API_DD_INTEGRATION_ISSUES_URL, API_DD_INTEGRATION_OVERLAYS_URL, API_DD_INTEGRATION_PLANS_URL, API_DD_INTEGRATION_PLAN_BY_ID_URL, } from '../constants/api';
|
2
|
-
import { RocosError, errorCodes } from '../models';
|
1
|
+
import { API_DD_INTEGRATION_ISSUES_URL, API_DD_INTEGRATION_LOCATIONS_URL, API_DD_INTEGRATION_OVERLAYS_URL, API_DD_INTEGRATION_PLANS_URL, API_DD_INTEGRATION_PLAN_BY_ID_URL, } from '../constants/api';
|
2
|
+
import { RocosError, errorCodes, } from '../models';
|
3
3
|
import { BaseServiceAbstract } from './BaseServiceAbstract';
|
4
4
|
import { RocosLogger } from '../logger/RocosLogger';
|
5
5
|
import { formatServiceUrl } from '../helpers/formatServiceUrl';
|
@@ -69,4 +69,12 @@ export class IntegrationService extends BaseServiceAbstract {
|
|
69
69
|
lng: location.lng,
|
70
70
|
}, 'Failed to create issue.');
|
71
71
|
}
|
72
|
+
/**
|
73
|
+
* Gets locations for the provided project ID
|
74
|
+
* @param projectId Project ID
|
75
|
+
* @returns Plans list (limited to 50)
|
76
|
+
*/
|
77
|
+
async getLocations(projectId, pageStart) {
|
78
|
+
return this.callGet(formatServiceUrl(API_DD_INTEGRATION_LOCATIONS_URL, { url: this.config.url, projectId }, this.config.insecure), 'Failed to get locations.', pageStart ? { page_start: pageStart } : undefined);
|
79
|
+
}
|
72
80
|
}
|