@dronedeploy/rocos-js-sdk 3.0.22 → 3.0.25-rc.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.
@@ -120,6 +120,7 @@ export declare const API_DD_INTEGRATION_PLAN_BY_ID_URL = "https://{url}/projects
120
120
  export declare const API_DD_INTEGRATION_OVERLAYS_URL = "https://{url}/projects/{projectId}/dd/overlays";
121
121
  export declare const API_DD_INTEGRATION_ISSUES_URL = "https://{url}/projects/{projectId}/dd/issues";
122
122
  export declare const API_DD_INTEGRATION_LOCATIONS_URL = "https://{url}/projects/{projectId}/dd/locations";
123
+ export declare const API_DD_INTEGRATION_LEVELS_URL = "https://{url}/projects/{projectId}/dd/levels";
123
124
  export declare const API_GRAPHS_MAPS_URL = "https://{url}/graphs/projects/{projectId}/maps";
124
125
  export declare const API_GRAPHS_MAPS_DEPLOYED_URL = "https://{url}/graphs/projects/{projectId}/maps/deployed?callsign={callsign}";
125
126
  export declare const API_GRAPHS_MAPS_MERGE_URL = "https://{url}/graphs/projects/{projectId}/maps/merge";
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.API_PROJECT_ROBOT_EVENT_URL = exports.API_PROJECT_ROBOT_REGISTER_URL = exports.API_PROJECT_ROBOT_DEFINITION_URL = exports.API_PROJECT_ROBOT_ATTRIBUTES_URL = exports.API_PROJECT_ROBOT_ID_URL = exports.API_ACCOUNT_ROBOT_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_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_OTP_AUTH_URL = exports.API_OTP_URL = exports.API_USER_TOKEN_URL = exports.API_USER_URL = exports.API_ADMIN_USER_INVITATION_URL = exports.API_APPLICATION_AUTH_URL = void 0;
4
4
  exports.API_PROJECT_STREAM_DATA_URL = exports.API_PROJECT_STREAM_ID_URL = exports.API_PROJECT_STREAM_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_ENVIRONMENT_URL = exports.API_PROJECT_DEFINITION_LIBRARY = exports.API_PROJECT_DEFINITION_IMPORT_LIBRARY = 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 = void 0;
5
- exports.API_LINKED_PROJECT_URL = exports.API_PROJECT_WORKFLOW_IMPORT_URL = exports.API_PROJECT_WORKFLOW_EXPORT_URL = exports.API_PROJECT_WORKFLOW_AFFECTED_URL = exports.API_PROJECT_ROBOT_DEPLOYED_WORKFLOW_URL = exports.API_PROJECT_PROFILE_DEPLOYED_WORKFLOW_URL = exports.API_PROJECT_ROBOT_NO_PROFILE_DEPLOYMENTS_URL = exports.API_PROJECT_PROFILE_DEPLOYMENTS_URL = exports.API_PROJECT_ROBOT_DEPLOYMENTS_URL = exports.API_PROJECT_WORKFLOW_ASSET_ID_URL = exports.API_PROJECT_WORKFLOW_ASSET_URL = exports.API_PROJECT_WORKFLOW_ID_URL = exports.API_PROJECT_WORKFLOW_URL = exports.API_GRAPHS_ASSETS_URL = exports.API_GRAPHS_ASSETS_UPLOAD_URL = exports.API_GRAPHS_TARGETS_URL = exports.API_GRAPHS_TARGET_UPLOAD_URL = exports.API_GRAPHS_OBSERVATION_KEYS_URL = exports.API_GRAPHS_OBSERVATIONS_URL = exports.API_GRAPHS_PANORAMA_OBSERVATIONS_URL = exports.API_GRAPHS_PANORAMA = exports.API_GRAPHS_MAPS_GEOJSON_URL = exports.API_GRAPHS_MAPS_DEPLOY_URL = exports.API_GRAPHS_MAPS_COPY_URL = exports.API_GRAPHS_MAP_ID_URL = exports.API_GRAPHS_MAPS_MERGE_URL = exports.API_GRAPHS_MAPS_DEPLOYED_URL = exports.API_GRAPHS_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 = void 0;
6
- exports.API_PROJECT_ROBOT_TAG_URL = exports.API_PROJECT_PROFILE_TAG_URL = exports.API_PROJECT_PROFILE_TAGS_URL = exports.API_PROJECT_TAG_ROBOTS_URL = exports.API_PROJECT_ROBOT_TAGS_URL = exports.API_DEVICE_CREDENTIALS_AUTH_URL = exports.API_DEVICE_CREDENTIALS_URL = void 0;
5
+ exports.API_PROJECT_WORKFLOW_IMPORT_URL = exports.API_PROJECT_WORKFLOW_EXPORT_URL = exports.API_PROJECT_WORKFLOW_AFFECTED_URL = exports.API_PROJECT_ROBOT_DEPLOYED_WORKFLOW_URL = exports.API_PROJECT_PROFILE_DEPLOYED_WORKFLOW_URL = exports.API_PROJECT_ROBOT_NO_PROFILE_DEPLOYMENTS_URL = exports.API_PROJECT_PROFILE_DEPLOYMENTS_URL = exports.API_PROJECT_ROBOT_DEPLOYMENTS_URL = exports.API_PROJECT_WORKFLOW_ASSET_ID_URL = exports.API_PROJECT_WORKFLOW_ASSET_URL = exports.API_PROJECT_WORKFLOW_ID_URL = exports.API_PROJECT_WORKFLOW_URL = exports.API_GRAPHS_ASSETS_URL = exports.API_GRAPHS_ASSETS_UPLOAD_URL = exports.API_GRAPHS_TARGETS_URL = exports.API_GRAPHS_TARGET_UPLOAD_URL = exports.API_GRAPHS_OBSERVATION_KEYS_URL = exports.API_GRAPHS_OBSERVATIONS_URL = exports.API_GRAPHS_PANORAMA_OBSERVATIONS_URL = exports.API_GRAPHS_PANORAMA = exports.API_GRAPHS_MAPS_GEOJSON_URL = exports.API_GRAPHS_MAPS_DEPLOY_URL = exports.API_GRAPHS_MAPS_COPY_URL = exports.API_GRAPHS_MAP_ID_URL = exports.API_GRAPHS_MAPS_MERGE_URL = exports.API_GRAPHS_MAPS_DEPLOYED_URL = exports.API_GRAPHS_MAPS_URL = exports.API_DD_INTEGRATION_LEVELS_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 = void 0;
6
+ exports.API_PROJECT_ROBOT_TAG_URL = exports.API_PROJECT_PROFILE_TAG_URL = exports.API_PROJECT_PROFILE_TAGS_URL = exports.API_PROJECT_TAG_ROBOTS_URL = exports.API_PROJECT_ROBOT_TAGS_URL = exports.API_DEVICE_CREDENTIALS_AUTH_URL = exports.API_DEVICE_CREDENTIALS_URL = exports.API_LINKED_PROJECT_URL = void 0;
7
7
  exports.API_APPLICATION_AUTH_URL = 'https://{url}/applications/auth';
8
8
  exports.API_ADMIN_USER_INVITATION_URL = 'https://{url}/admin/users/invitations';
9
9
  exports.API_USER_URL = 'https://{url}/users';
@@ -126,6 +126,7 @@ exports.API_DD_INTEGRATION_PLAN_BY_ID_URL = 'https://{url}/projects/{projectId}/
126
126
  exports.API_DD_INTEGRATION_OVERLAYS_URL = 'https://{url}/projects/{projectId}/dd/overlays';
127
127
  exports.API_DD_INTEGRATION_ISSUES_URL = 'https://{url}/projects/{projectId}/dd/issues';
128
128
  exports.API_DD_INTEGRATION_LOCATIONS_URL = 'https://{url}/projects/{projectId}/dd/locations';
129
+ exports.API_DD_INTEGRATION_LEVELS_URL = 'https://{url}/projects/{projectId}/dd/levels';
129
130
  exports.API_GRAPHS_MAPS_URL = 'https://{url}/graphs/projects/{projectId}/maps';
130
131
  exports.API_GRAPHS_MAPS_DEPLOYED_URL = 'https://{url}/graphs/projects/{projectId}/maps/deployed?callsign={callsign}';
131
132
  exports.API_GRAPHS_MAPS_MERGE_URL = 'https://{url}/graphs/projects/{projectId}/maps/merge';
@@ -16,6 +16,10 @@ export interface DeviceCredential {
16
16
  * Access control list for the credentials
17
17
  */
18
18
  acl?: DeviceCredentialACLItem[];
19
+ /**
20
+ * Optional metadata for the credentials, can be used by the agent component for a specific implementation.
21
+ */
22
+ meta?: Record<string, string>;
19
23
  }
20
24
  export interface DeviceCredentialCreate {
21
25
  /**
@@ -38,6 +42,10 @@ export interface DeviceCredentialCreate {
38
42
  * Access control list for the credentials
39
43
  */
40
44
  acl?: DeviceCredentialACLItem[];
45
+ /**
46
+ * Optional metadata for the credentials, can be used by the agent component for a specific implementation.
47
+ */
48
+ meta?: Record<string, string>;
41
49
  }
42
50
  export interface DeviceCredentialACLItem {
43
51
  /**
@@ -21,6 +21,7 @@ export * from './IExportDataQuery';
21
21
  export * from './IFunctionConfig';
22
22
  export * from './IInvitation';
23
23
  export * from './IInvitationExists';
24
+ export * from './integrations/Level';
24
25
  export * from './integrations/Location';
25
26
  export * from './integrations/Overlay';
26
27
  export * from './integrations/PaginatedResults';
@@ -37,6 +37,7 @@ __exportStar(require("./IExportDataQuery"), exports);
37
37
  __exportStar(require("./IFunctionConfig"), exports);
38
38
  __exportStar(require("./IInvitation"), exports);
39
39
  __exportStar(require("./IInvitationExists"), exports);
40
+ __exportStar(require("./integrations/Level"), exports);
40
41
  __exportStar(require("./integrations/Location"), exports);
41
42
  __exportStar(require("./integrations/Overlay"), exports);
42
43
  __exportStar(require("./integrations/PaginatedResults"), exports);
@@ -0,0 +1,7 @@
1
+ export interface Level {
2
+ id: string;
3
+ name: string;
4
+ }
5
+ export interface Levels {
6
+ levels: Level[];
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,4 @@
1
- import { IBaseService, IRocosSDKConfig, Location, Overlay, PaginatedResults, Plan, RocosError } from '../models';
1
+ import { IBaseService, IRocosSDKConfig, Levels, 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
@@ -51,4 +51,10 @@ export declare class IntegrationService extends BaseServiceAbstract implements I
51
51
  * @returns Plans list (limited to 50)
52
52
  */
53
53
  getLocations(projectId: string, pageStart?: string): Promise<PaginatedResults<Location>>;
54
+ /**
55
+ * Gets levels for the provided project ID
56
+ * @param projectId Project ID
57
+ * @returns List of levels in the project
58
+ */
59
+ getLevels(projectId: string): Promise<Levels>;
54
60
  }
@@ -80,5 +80,13 @@ class IntegrationService extends BaseServiceAbstract_1.BaseServiceAbstract {
80
80
  async getLocations(projectId, pageStart) {
81
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
82
  }
83
+ /**
84
+ * Gets levels for the provided project ID
85
+ * @param projectId Project ID
86
+ * @returns List of levels in the project
87
+ */
88
+ async getLevels(projectId) {
89
+ return this.callGet((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_DD_INTEGRATION_LEVELS_URL, { url: this.config.url, projectId }, this.config.insecure), 'Failed to get overlays.');
90
+ }
83
91
  }
84
92
  exports.IntegrationService = IntegrationService;
@@ -120,6 +120,7 @@ export declare const API_DD_INTEGRATION_PLAN_BY_ID_URL = "https://{url}/projects
120
120
  export declare const API_DD_INTEGRATION_OVERLAYS_URL = "https://{url}/projects/{projectId}/dd/overlays";
121
121
  export declare const API_DD_INTEGRATION_ISSUES_URL = "https://{url}/projects/{projectId}/dd/issues";
122
122
  export declare const API_DD_INTEGRATION_LOCATIONS_URL = "https://{url}/projects/{projectId}/dd/locations";
123
+ export declare const API_DD_INTEGRATION_LEVELS_URL = "https://{url}/projects/{projectId}/dd/levels";
123
124
  export declare const API_GRAPHS_MAPS_URL = "https://{url}/graphs/projects/{projectId}/maps";
124
125
  export declare const API_GRAPHS_MAPS_DEPLOYED_URL = "https://{url}/graphs/projects/{projectId}/maps/deployed?callsign={callsign}";
125
126
  export declare const API_GRAPHS_MAPS_MERGE_URL = "https://{url}/graphs/projects/{projectId}/maps/merge";
@@ -120,6 +120,7 @@ export const API_DD_INTEGRATION_PLAN_BY_ID_URL = 'https://{url}/projects/{projec
120
120
  export const API_DD_INTEGRATION_OVERLAYS_URL = 'https://{url}/projects/{projectId}/dd/overlays';
121
121
  export const API_DD_INTEGRATION_ISSUES_URL = 'https://{url}/projects/{projectId}/dd/issues';
122
122
  export const API_DD_INTEGRATION_LOCATIONS_URL = 'https://{url}/projects/{projectId}/dd/locations';
123
+ export const API_DD_INTEGRATION_LEVELS_URL = 'https://{url}/projects/{projectId}/dd/levels';
123
124
  export const API_GRAPHS_MAPS_URL = 'https://{url}/graphs/projects/{projectId}/maps';
124
125
  export const API_GRAPHS_MAPS_DEPLOYED_URL = 'https://{url}/graphs/projects/{projectId}/maps/deployed?callsign={callsign}';
125
126
  export const API_GRAPHS_MAPS_MERGE_URL = 'https://{url}/graphs/projects/{projectId}/maps/merge';
@@ -16,6 +16,10 @@ export interface DeviceCredential {
16
16
  * Access control list for the credentials
17
17
  */
18
18
  acl?: DeviceCredentialACLItem[];
19
+ /**
20
+ * Optional metadata for the credentials, can be used by the agent component for a specific implementation.
21
+ */
22
+ meta?: Record<string, string>;
19
23
  }
20
24
  export interface DeviceCredentialCreate {
21
25
  /**
@@ -38,6 +42,10 @@ export interface DeviceCredentialCreate {
38
42
  * Access control list for the credentials
39
43
  */
40
44
  acl?: DeviceCredentialACLItem[];
45
+ /**
46
+ * Optional metadata for the credentials, can be used by the agent component for a specific implementation.
47
+ */
48
+ meta?: Record<string, string>;
41
49
  }
42
50
  export interface DeviceCredentialACLItem {
43
51
  /**
@@ -21,6 +21,7 @@ export * from './IExportDataQuery';
21
21
  export * from './IFunctionConfig';
22
22
  export * from './IInvitation';
23
23
  export * from './IInvitationExists';
24
+ export * from './integrations/Level';
24
25
  export * from './integrations/Location';
25
26
  export * from './integrations/Overlay';
26
27
  export * from './integrations/PaginatedResults';
@@ -21,6 +21,7 @@ export * from './IExportDataQuery';
21
21
  export * from './IFunctionConfig';
22
22
  export * from './IInvitation';
23
23
  export * from './IInvitationExists';
24
+ export * from './integrations/Level';
24
25
  export * from './integrations/Location';
25
26
  export * from './integrations/Overlay';
26
27
  export * from './integrations/PaginatedResults';
@@ -0,0 +1,7 @@
1
+ export interface Level {
2
+ id: string;
3
+ name: string;
4
+ }
5
+ export interface Levels {
6
+ levels: Level[];
7
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,4 @@
1
- import { IBaseService, IRocosSDKConfig, Location, Overlay, PaginatedResults, Plan, RocosError } from '../models';
1
+ import { IBaseService, IRocosSDKConfig, Levels, 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
@@ -51,4 +51,10 @@ export declare class IntegrationService extends BaseServiceAbstract implements I
51
51
  * @returns Plans list (limited to 50)
52
52
  */
53
53
  getLocations(projectId: string, pageStart?: string): Promise<PaginatedResults<Location>>;
54
+ /**
55
+ * Gets levels for the provided project ID
56
+ * @param projectId Project ID
57
+ * @returns List of levels in the project
58
+ */
59
+ getLevels(projectId: string): Promise<Levels>;
54
60
  }
@@ -1,4 +1,4 @@
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';
1
+ import { API_DD_INTEGRATION_ISSUES_URL, API_DD_INTEGRATION_LEVELS_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
2
  import { RocosError, errorCodes, } from '../models';
3
3
  import { BaseServiceAbstract } from './BaseServiceAbstract';
4
4
  import { RocosLogger } from '../logger/RocosLogger';
@@ -77,4 +77,12 @@ export class IntegrationService extends BaseServiceAbstract {
77
77
  async getLocations(projectId, pageStart) {
78
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
79
  }
80
+ /**
81
+ * Gets levels for the provided project ID
82
+ * @param projectId Project ID
83
+ * @returns List of levels in the project
84
+ */
85
+ async getLevels(projectId) {
86
+ return this.callGet(formatServiceUrl(API_DD_INTEGRATION_LEVELS_URL, { url: this.config.url, projectId }, this.config.insecure), 'Failed to get overlays.');
87
+ }
80
88
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dronedeploy/rocos-js-sdk",
3
- "version": "3.0.22",
3
+ "version": "3.0.25-rc.3",
4
4
  "description": "Javascript SDK for rocos",
5
5
  "main": "cjs/index.js",
6
6
  "module": "esm/index.js",