@dronedeploy/rocos-js-sdk 3.0.20 → 3.0.22

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.
@@ -2,19 +2,9 @@ export interface IRobotSettings {
2
2
  type: 'settings';
3
3
  items: {
4
4
  id: string;
5
- value: {
6
- /**
7
- * The actual settings object for this specific setting type
8
- */
9
- settings: Record<string, any>;
10
- /**
11
- * The ID of the setting type, usually one of: ops-global-settings, ops-local-settings, flight-app-settings
12
- */
13
- id: 'ops-global-settings' | 'ops-local-settings' | 'flight-app-settings' | string;
14
- enabled: boolean;
15
- };
5
+ value: RobotSettingsItem;
16
6
  }[];
17
- version: number;
7
+ version: string;
18
8
  robotDefinitionId: string;
19
9
  username: string;
20
10
  /**
@@ -26,3 +16,42 @@ export interface IRobotSettings {
26
16
  */
27
17
  updatedAt: string;
28
18
  }
19
+ export type RobotSettingsItem = {
20
+ /**
21
+ * The actual settings object for this specific setting type
22
+ */
23
+ enabled: boolean;
24
+ /**
25
+ * The ID of the setting type, usually one of: ops-global-settings, ops-local-settings, flight-app-settings
26
+ */
27
+ id: 'ops-global-settings' | 'ops-local-settings' | 'flight-app-settings' | string;
28
+ settings: Record<string, unknown>;
29
+ name?: string;
30
+ };
31
+ export type AgentSettingsItem = RobotSettingsItem & {
32
+ id: 'agent-settings';
33
+ };
34
+ export interface AgentSettingsResponse {
35
+ items: {
36
+ id: string;
37
+ value: {
38
+ id: 'agent-settings';
39
+ enabled: boolean;
40
+ settings: RobotSettingsItem[];
41
+ };
42
+ }[];
43
+ version: string;
44
+ type: 'agent-settings';
45
+ robotDefinitionId: string;
46
+ username: string;
47
+ createdAt: string;
48
+ updatedAt: string;
49
+ }
50
+ export interface AgentSettingsRequestItem {
51
+ id: string;
52
+ value: {
53
+ id: 'agent-settings';
54
+ enabled: boolean;
55
+ settings: RobotSettingsItem[];
56
+ };
57
+ }
@@ -4,3 +4,8 @@ export interface RobotProfile {
4
4
  description?: string;
5
5
  tags?: string[];
6
6
  }
7
+ export interface CreateRobotDefinitionRequest {
8
+ name: string;
9
+ description: string;
10
+ tags?: string[];
11
+ }
@@ -1,8 +1,28 @@
1
1
  import { Observation } from '../maps/Panorama';
2
+ export interface AssetMetadata {
3
+ 'asset-id'?: string;
4
+ 'data-uuid'?: string;
5
+ 'dd-media-type'?: string;
6
+ 'dd-plan-name'?: string;
7
+ 'frame-id'?: string;
8
+ lat?: string;
9
+ lon?: string;
10
+ 'modified-time'?: string;
11
+ 'observation-id'?: string;
12
+ qw?: string;
13
+ qx?: string;
14
+ qy?: string;
15
+ qz?: string;
16
+ 'spot-name'?: string;
17
+ 'spot-type'?: string;
18
+ timestamp?: string;
19
+ x?: string;
20
+ y?: string;
21
+ z?: string;
22
+ [key: string]: string | undefined;
23
+ }
2
24
  export interface AssetItemModel {
3
- metadata?: {
4
- [key: string]: string;
5
- };
25
+ metadata?: AssetMetadata;
6
26
  path?: string;
7
27
  contentType?: string;
8
28
  signedURL?: string;
@@ -12,6 +12,10 @@ export interface DeviceCredential {
12
12
  * Device secret or password
13
13
  */
14
14
  key: string;
15
+ /**
16
+ * Access control list for the credentials
17
+ */
18
+ acl?: DeviceCredentialACLItem[];
15
19
  }
16
20
  export interface DeviceCredentialCreate {
17
21
  /**
@@ -1,45 +1,17 @@
1
1
  export * from './asset-storage/AssetItem';
2
2
  export * from './asset-storage/SyncIntegrations';
3
- export * from './schedule/IScheduleInfo';
4
- export * from './schedule/IScheduleAction';
5
- export * from './schedule/IScheduleJob';
6
3
  export * from './caller';
7
4
  export * from './callsigns/CallsignsEnums';
8
5
  export * from './callsigns/CallsignsLookup';
9
6
  export * from './callsigns/CallsignsQuery';
10
7
  export * from './callsigns/CallsignsQueryPredicate';
11
8
  export * from './command';
12
- export * from './file/FileEnums';
13
- export * from './message';
14
- export * from './params/ICallerParams';
15
- export * from './params/ICommandParams';
16
- export * from './params/IControlParams';
17
- export * from './params/IFileAccessorParams';
18
- export * from './params/ISearchParams';
19
- export * from './params/ITelemetryParams';
20
- export * from './params/IWebRTCSignallingParams';
21
- export * from './search/SearchQueryFilter';
22
- export * from './search/SearchStreamQuery';
23
- export * from './stream/IBaseStream';
24
- export * from './stream/ICallerStream';
25
- export * from './stream/ICommandStream';
26
- export * from './stream/IControlStream';
27
- export * from './stream/IFileAccessorStream';
28
- export * from './stream/ISearchStream';
29
- export * from './stream/ITelemetryStream';
30
- export * from './stream/IWebRTCSignallingStream';
31
- export * from './integrations/Overlay';
32
- export * from './integrations/Plan';
33
- export * from './integrations/Location';
34
- export * from './integrations/PaginatedResults';
35
- export * from './maps/Map';
36
- export * from './maps/Panorama';
37
- export * from './projects/ProjectUser';
38
- export * from './projects/ExternalProject';
39
- export * from './projects/NewProjectRequest';
40
- export * from './tag/Tag';
41
- export * from './target/Target';
9
+ export * from './device-credentials/DeviceCredentials';
10
+ export * from './Dashboard';
42
11
  export * from './ExportDataQuery';
12
+ export * from './EventDefinition';
13
+ export * from './file/FileEnums';
14
+ export * from './graph';
43
15
  export * from './HttpError';
44
16
  export * from './IBaseService';
45
17
  export * from './IConfigGroup';
@@ -49,6 +21,10 @@ export * from './IExportDataQuery';
49
21
  export * from './IFunctionConfig';
50
22
  export * from './IInvitation';
51
23
  export * from './IInvitationExists';
24
+ export * from './integrations/Location';
25
+ export * from './integrations/Overlay';
26
+ export * from './integrations/PaginatedResults';
27
+ export * from './integrations/Plan';
52
28
  export * from './IOperation';
53
29
  export * from './IPersonalAccessToken';
54
30
  export * from './IProject';
@@ -61,6 +37,7 @@ export * from './IRobotSettings';
61
37
  export * from './IRobotTemplate';
62
38
  export * from './IRocosSDKConfig';
63
39
  export * from './ISource';
40
+ export * from './ISubscriberStatus';
64
41
  export * from './IStream';
65
42
  export * from './IStreamConfig';
66
43
  export * from './IStreamOptions';
@@ -69,16 +46,45 @@ export * from './ITelemetryStreamConfig';
69
46
  export * from './IToken';
70
47
  export * from './IWidget';
71
48
  export * from './IWidgetLineGroup';
49
+ export * from './maps/Map';
50
+ export * from './maps/Panorama';
51
+ export * from './message';
52
+ export * from './params/ICallerParams';
53
+ export * from './params/ICommandParams';
54
+ export * from './params/IControlParams';
55
+ export * from './params/IFileAccessorParams';
56
+ export * from './params/ISearchParams';
57
+ export * from './params/ITelemetryParams';
58
+ export * from './params/IWebRTCSignallingParams';
59
+ export * from './projects/ExternalProject';
60
+ export * from './projects/NewProjectRequest';
61
+ export * from './projects/ProjectUser';
72
62
  export * from './Robot';
73
63
  export * from './RobotConfig';
74
64
  export * from './RobotPlugin';
65
+ export * from './RobotProfile';
75
66
  export * from './RobotTemplate';
76
67
  export * from './RocosError';
68
+ export * from './schedule/IScheduleAction';
69
+ export * from './schedule/IScheduleInfo';
70
+ export * from './schedule/IScheduleJob';
71
+ export * from './search/SearchQueryFilter';
72
+ export * from './search/SearchStreamQuery';
77
73
  export * from './ServiceEnum';
78
74
  export * from './Stream';
75
+ export * from './stream/IBaseStream';
76
+ export * from './stream/ICallerStream';
77
+ export * from './stream/ICommandStream';
78
+ export * from './stream/IControlStream';
79
+ export * from './stream/IFileAccessorStream';
80
+ export * from './stream/ISearchStream';
81
+ export * from './stream/ITelemetryStream';
82
+ export * from './stream/IWebRTCSignallingStream';
79
83
  export * from './StreamOptions';
80
84
  export * from './StreamSource';
81
85
  export * from './SubscriberStatusEnum';
86
+ export * from './tag/Tag';
87
+ export * from './target/Target';
82
88
  export * from './TelemetryStatus';
83
89
  export * from './Token';
84
90
  export * from './types';
@@ -16,46 +16,18 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./asset-storage/AssetItem"), exports);
18
18
  __exportStar(require("./asset-storage/SyncIntegrations"), exports);
19
- __exportStar(require("./schedule/IScheduleInfo"), exports);
20
- __exportStar(require("./schedule/IScheduleAction"), exports);
21
- __exportStar(require("./schedule/IScheduleJob"), exports);
22
19
  __exportStar(require("./caller"), exports);
23
20
  __exportStar(require("./callsigns/CallsignsEnums"), exports);
24
21
  __exportStar(require("./callsigns/CallsignsLookup"), exports);
25
22
  __exportStar(require("./callsigns/CallsignsQuery"), exports);
26
23
  __exportStar(require("./callsigns/CallsignsQueryPredicate"), exports);
27
24
  __exportStar(require("./command"), exports);
28
- __exportStar(require("./file/FileEnums"), exports);
29
- __exportStar(require("./message"), exports);
30
- __exportStar(require("./params/ICallerParams"), exports);
31
- __exportStar(require("./params/ICommandParams"), exports);
32
- __exportStar(require("./params/IControlParams"), exports);
33
- __exportStar(require("./params/IFileAccessorParams"), exports);
34
- __exportStar(require("./params/ISearchParams"), exports);
35
- __exportStar(require("./params/ITelemetryParams"), exports);
36
- __exportStar(require("./params/IWebRTCSignallingParams"), exports);
37
- __exportStar(require("./search/SearchQueryFilter"), exports);
38
- __exportStar(require("./search/SearchStreamQuery"), exports);
39
- __exportStar(require("./stream/IBaseStream"), exports);
40
- __exportStar(require("./stream/ICallerStream"), exports);
41
- __exportStar(require("./stream/ICommandStream"), exports);
42
- __exportStar(require("./stream/IControlStream"), exports);
43
- __exportStar(require("./stream/IFileAccessorStream"), exports);
44
- __exportStar(require("./stream/ISearchStream"), exports);
45
- __exportStar(require("./stream/ITelemetryStream"), exports);
46
- __exportStar(require("./stream/IWebRTCSignallingStream"), exports);
47
- __exportStar(require("./integrations/Overlay"), exports);
48
- __exportStar(require("./integrations/Plan"), exports);
49
- __exportStar(require("./integrations/Location"), exports);
50
- __exportStar(require("./integrations/PaginatedResults"), exports);
51
- __exportStar(require("./maps/Map"), exports);
52
- __exportStar(require("./maps/Panorama"), exports);
53
- __exportStar(require("./projects/ProjectUser"), exports);
54
- __exportStar(require("./projects/ExternalProject"), exports);
55
- __exportStar(require("./projects/NewProjectRequest"), exports);
56
- __exportStar(require("./tag/Tag"), exports);
57
- __exportStar(require("./target/Target"), exports);
25
+ __exportStar(require("./device-credentials/DeviceCredentials"), exports);
26
+ __exportStar(require("./Dashboard"), exports);
58
27
  __exportStar(require("./ExportDataQuery"), exports);
28
+ __exportStar(require("./EventDefinition"), exports);
29
+ __exportStar(require("./file/FileEnums"), exports);
30
+ __exportStar(require("./graph"), exports);
59
31
  __exportStar(require("./HttpError"), exports);
60
32
  __exportStar(require("./IBaseService"), exports);
61
33
  __exportStar(require("./IConfigGroup"), exports);
@@ -65,6 +37,10 @@ __exportStar(require("./IExportDataQuery"), exports);
65
37
  __exportStar(require("./IFunctionConfig"), exports);
66
38
  __exportStar(require("./IInvitation"), exports);
67
39
  __exportStar(require("./IInvitationExists"), exports);
40
+ __exportStar(require("./integrations/Location"), exports);
41
+ __exportStar(require("./integrations/Overlay"), exports);
42
+ __exportStar(require("./integrations/PaginatedResults"), exports);
43
+ __exportStar(require("./integrations/Plan"), exports);
68
44
  __exportStar(require("./IOperation"), exports);
69
45
  __exportStar(require("./IPersonalAccessToken"), exports);
70
46
  __exportStar(require("./IProject"), exports);
@@ -77,6 +53,7 @@ __exportStar(require("./IRobotSettings"), exports);
77
53
  __exportStar(require("./IRobotTemplate"), exports);
78
54
  __exportStar(require("./IRocosSDKConfig"), exports);
79
55
  __exportStar(require("./ISource"), exports);
56
+ __exportStar(require("./ISubscriberStatus"), exports);
80
57
  __exportStar(require("./IStream"), exports);
81
58
  __exportStar(require("./IStreamConfig"), exports);
82
59
  __exportStar(require("./IStreamOptions"), exports);
@@ -85,16 +62,45 @@ __exportStar(require("./ITelemetryStreamConfig"), exports);
85
62
  __exportStar(require("./IToken"), exports);
86
63
  __exportStar(require("./IWidget"), exports);
87
64
  __exportStar(require("./IWidgetLineGroup"), exports);
65
+ __exportStar(require("./maps/Map"), exports);
66
+ __exportStar(require("./maps/Panorama"), exports);
67
+ __exportStar(require("./message"), exports);
68
+ __exportStar(require("./params/ICallerParams"), exports);
69
+ __exportStar(require("./params/ICommandParams"), exports);
70
+ __exportStar(require("./params/IControlParams"), exports);
71
+ __exportStar(require("./params/IFileAccessorParams"), exports);
72
+ __exportStar(require("./params/ISearchParams"), exports);
73
+ __exportStar(require("./params/ITelemetryParams"), exports);
74
+ __exportStar(require("./params/IWebRTCSignallingParams"), exports);
75
+ __exportStar(require("./projects/ExternalProject"), exports);
76
+ __exportStar(require("./projects/NewProjectRequest"), exports);
77
+ __exportStar(require("./projects/ProjectUser"), exports);
88
78
  __exportStar(require("./Robot"), exports);
89
79
  __exportStar(require("./RobotConfig"), exports);
90
80
  __exportStar(require("./RobotPlugin"), exports);
81
+ __exportStar(require("./RobotProfile"), exports);
91
82
  __exportStar(require("./RobotTemplate"), exports);
92
83
  __exportStar(require("./RocosError"), exports);
84
+ __exportStar(require("./schedule/IScheduleAction"), exports);
85
+ __exportStar(require("./schedule/IScheduleInfo"), exports);
86
+ __exportStar(require("./schedule/IScheduleJob"), exports);
87
+ __exportStar(require("./search/SearchQueryFilter"), exports);
88
+ __exportStar(require("./search/SearchStreamQuery"), exports);
93
89
  __exportStar(require("./ServiceEnum"), exports);
94
90
  __exportStar(require("./Stream"), exports);
91
+ __exportStar(require("./stream/IBaseStream"), exports);
92
+ __exportStar(require("./stream/ICallerStream"), exports);
93
+ __exportStar(require("./stream/ICommandStream"), exports);
94
+ __exportStar(require("./stream/IControlStream"), exports);
95
+ __exportStar(require("./stream/IFileAccessorStream"), exports);
96
+ __exportStar(require("./stream/ISearchStream"), exports);
97
+ __exportStar(require("./stream/ITelemetryStream"), exports);
98
+ __exportStar(require("./stream/IWebRTCSignallingStream"), exports);
95
99
  __exportStar(require("./StreamOptions"), exports);
96
100
  __exportStar(require("./StreamSource"), exports);
97
101
  __exportStar(require("./SubscriberStatusEnum"), exports);
102
+ __exportStar(require("./tag/Tag"), exports);
103
+ __exportStar(require("./target/Target"), exports);
98
104
  __exportStar(require("./TelemetryStatus"), exports);
99
105
  __exportStar(require("./Token"), exports);
100
106
  __exportStar(require("./types"), exports);
@@ -1,9 +1,10 @@
1
+ import { AgentSettingsRequestItem, AgentSettingsResponse } from '../models/IRobotSettings';
2
+ import { CreateRobotDefinitionRequest, RobotProfile } from '../models/RobotProfile';
1
3
  import { RocosError } from '../models/RocosError';
2
4
  import { BaseServiceAbstract } from './BaseServiceAbstract';
3
5
  import { Dashboard } from '../models/Dashboard';
4
6
  import { IBaseService } from '../models/IBaseService';
5
7
  import { IRocosSDKConfig } from '../models/IRocosSDKConfig';
6
- import { RobotProfile } from '../models/RobotProfile';
7
8
  export declare class ProfileService extends BaseServiceAbstract implements IBaseService {
8
9
  constructor(config: IRocosSDKConfig);
9
10
  protected getError(e: Error): RocosError;
@@ -15,7 +16,7 @@ export declare class ProfileService extends BaseServiceAbstract implements IBase
15
16
  * @param model - Payload
16
17
  * @description - Renamed from robotDefsCreate
17
18
  */
18
- create(projectId: string, model: any): Promise<any>;
19
+ create(projectId: string, model: CreateRobotDefinitionRequest): Promise<RobotProfile>;
19
20
  /**
20
21
  * Get robot definitions
21
22
  *
@@ -98,14 +99,6 @@ export declare class ProfileService extends BaseServiceAbstract implements IBase
98
99
  * @description - Renamed from robotDefDashboards
99
100
  */
100
101
  dashboards(projectId: string, profileId: string): Promise<Dashboard[]>;
101
- /**
102
- * Get Dashboard data which stored in Azure Blob.
103
- *
104
- * @param projectId - Project Id
105
- * @param definitionId - Robot Profile Id
106
- * @description - Renamed from robotDefDashboardBlob
107
- */
108
- dashboardBlob(projectId: string, definitionId: string): Promise<any>;
109
102
  /**
110
103
  * Update dashboard for a robot definition
111
104
  *
@@ -139,16 +132,16 @@ export declare class ProfileService extends BaseServiceAbstract implements IBase
139
132
  * @param definitionId - Robot definition Id
140
133
  * @description - Renamed from robotDefGetAgentSettings
141
134
  */
142
- getAgentSettings(projectId: string, definitionId: string): Promise<any>;
135
+ getAgentSettings(projectId: string, definitionId: string): Promise<AgentSettingsResponse>;
143
136
  /**
144
137
  * Update agent settings
145
138
  *
146
139
  * @param projectId - Project Id
147
140
  * @param definitionId - Robot definition Id
148
- * @param model - Payload
141
+ * @param model - Agent settings payload (array of agent setting request items)
149
142
  * @description - Renamed from robotDefUpdateAgentSettings
150
143
  */
151
- updateAgentSettings(projectId: string, definitionId: string, model: any): Promise<any>;
144
+ updateAgentSettings(projectId: string, definitionId: string, model: AgentSettingsRequestItem[]): Promise<void>;
152
145
  /**
153
146
  * Get commands fora robot definition
154
147
  *
@@ -24,9 +24,6 @@ class ProfileService extends BaseServiceAbstract_1.BaseServiceAbstract {
24
24
  * @param model - Payload
25
25
  * @description - Renamed from robotDefsCreate
26
26
  */
27
- // TODO: map the request model
28
- // TODO: map the response object
29
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
30
27
  async create(projectId, model) {
31
28
  return this.callPost((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_PROJECT_DEFINITION_URL, { url: this.config.url, projectId }, this.config.insecure), model, 'Failed to create a robot definition.');
32
29
  }
@@ -148,17 +145,6 @@ class ProfileService extends BaseServiceAbstract_1.BaseServiceAbstract {
148
145
  async dashboards(projectId, profileId) {
149
146
  return this.callGet((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_PROJECT_PROFILE_DASHBOARD_URL, { url: this.config.url, projectId, profileId }, this.config.insecure), 'Failed to get dashboards for a profile.');
150
147
  }
151
- /**
152
- * Get Dashboard data which stored in Azure Blob.
153
- *
154
- * @param projectId - Project Id
155
- * @param definitionId - Robot Profile Id
156
- * @description - Renamed from robotDefDashboardBlob
157
- */
158
- // TODO: map the response object
159
- async dashboardBlob(projectId, definitionId) {
160
- return this.callGet((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_PROJECT_DEFINITION_BLOB_URL, { url: this.config.url, projectId, definitionId }, this.config.insecure), 'Failed to get dashboards from a blob.');
161
- }
162
148
  /**
163
149
  * Update dashboard for a robot definition
164
150
  *
@@ -205,7 +191,6 @@ class ProfileService extends BaseServiceAbstract_1.BaseServiceAbstract {
205
191
  * @param definitionId - Robot definition Id
206
192
  * @description - Renamed from robotDefGetAgentSettings
207
193
  */
208
- // TODO: map the response object
209
194
  async getAgentSettings(projectId, definitionId) {
210
195
  return this.callGet((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_PROJECT_DEFINITION_AGENT_URL, { url: this.config.url, projectId, definitionId }, this.config.insecure), 'Failed to get agent settings.');
211
196
  }
@@ -214,14 +199,11 @@ class ProfileService extends BaseServiceAbstract_1.BaseServiceAbstract {
214
199
  *
215
200
  * @param projectId - Project Id
216
201
  * @param definitionId - Robot definition Id
217
- * @param model - Payload
202
+ * @param model - Agent settings payload (array of agent setting request items)
218
203
  * @description - Renamed from robotDefUpdateAgentSettings
219
204
  */
220
- // TODO: map the request model
221
- // TODO: map the response object
222
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
223
205
  async updateAgentSettings(projectId, definitionId, model) {
224
- return this.callPost((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_PROJECT_DEFINITION_AGENT_URL, { url: this.config.url, projectId, definitionId }, this.config.insecure), model, 'Failed to update agent settings.');
206
+ await this.callPost((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_PROJECT_DEFINITION_AGENT_URL, { url: this.config.url, projectId, definitionId }, this.config.insecure), model, 'Failed to update agent settings.');
225
207
  }
226
208
  /**
227
209
  * Get commands fora robot definition
@@ -1,4 +1,4 @@
1
- import { IBaseService, IConnectedCallsign, IRobot, IRobotListItem, IRobotSettings, IRobotTemplate, IRocosSDKConfig, RocosError } from '../models';
1
+ import { AgentSettingsResponse, IBaseService, IConnectedCallsign, IRobot, IRobotListItem, IRobotSettings, IRobotTemplate, IRocosSDKConfig, RocosError } from '../models';
2
2
  import { BaseServiceAbstract } from './BaseServiceAbstract';
3
3
  export declare class RobotService extends BaseServiceAbstract implements IBaseService {
4
4
  constructor(config: IRocosSDKConfig);
@@ -29,14 +29,14 @@ export declare class RobotService extends BaseServiceAbstract implements IBaseSe
29
29
  * @param projectId Project Id
30
30
  * @param robot - Robot payload {@link IRobot}
31
31
  */
32
- update(projectId: string, robot: IRobot): Promise<any>;
32
+ update(projectId: string, robot: IRobot): Promise<void>;
33
33
  /**
34
34
  * Delete the robots by callsign list
35
35
  *
36
36
  * @param projectId - Project Id
37
37
  * @param callsignIds - Callsign list
38
38
  */
39
- delete(projectId: string, callsignIds: string[]): Promise<any>;
39
+ delete(projectId: string, callsignIds: string[]): Promise<void>;
40
40
  /**
41
41
  * Get robot information by project id and callsign of the robot.
42
42
  *
@@ -197,7 +197,7 @@ export declare class RobotService extends BaseServiceAbstract implements IBaseSe
197
197
  * @param projectId - Project Id
198
198
  * @param callsign - Robot callsign
199
199
  */
200
- getAgentSettings(projectId: string, callsign: string): Promise<any>;
200
+ getAgentSettings(projectId: string, callsign: string): Promise<AgentSettingsResponse>;
201
201
  /**
202
202
  * Update agent settings for a robot
203
203
  *
@@ -52,7 +52,6 @@ class RobotService extends BaseServiceAbstract_1.BaseServiceAbstract {
52
52
  * @param projectId Project Id
53
53
  * @param robot - Robot payload {@link IRobot}
54
54
  */
55
- // TODO: map the response object
56
55
  async update(projectId, robot) {
57
56
  return this.callPut((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_PROJECT_ROBOT_URL, { url: this.config.url, projectId }, this.config.insecure), robot, 'Failed to update robot.');
58
57
  }
@@ -62,7 +61,6 @@ class RobotService extends BaseServiceAbstract_1.BaseServiceAbstract {
62
61
  * @param projectId - Project Id
63
62
  * @param callsignIds - Callsign list
64
63
  */
65
- // TODO: map the response object
66
64
  async delete(projectId, callsignIds) {
67
65
  return this.callDelete((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_PROJECT_ROBOT_URL, { url: this.config.url, projectId }, this.config.insecure), 'Failed to delete robots.', callsignIds);
68
66
  }
@@ -337,7 +335,6 @@ class RobotService extends BaseServiceAbstract_1.BaseServiceAbstract {
337
335
  * @param projectId - Project Id
338
336
  * @param callsign - Robot callsign
339
337
  */
340
- // TODO: map the response object
341
338
  async getAgentSettings(projectId, callsign) {
342
339
  return this.callGet((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_PROJECT_ROBOT_AGENT_URL, { url: this.config.url, projectId, callsign }, this.config.insecure), 'Failed to get agent settings for robot.');
343
340
  }
@@ -2,19 +2,9 @@ export interface IRobotSettings {
2
2
  type: 'settings';
3
3
  items: {
4
4
  id: string;
5
- value: {
6
- /**
7
- * The actual settings object for this specific setting type
8
- */
9
- settings: Record<string, any>;
10
- /**
11
- * The ID of the setting type, usually one of: ops-global-settings, ops-local-settings, flight-app-settings
12
- */
13
- id: 'ops-global-settings' | 'ops-local-settings' | 'flight-app-settings' | string;
14
- enabled: boolean;
15
- };
5
+ value: RobotSettingsItem;
16
6
  }[];
17
- version: number;
7
+ version: string;
18
8
  robotDefinitionId: string;
19
9
  username: string;
20
10
  /**
@@ -26,3 +16,42 @@ export interface IRobotSettings {
26
16
  */
27
17
  updatedAt: string;
28
18
  }
19
+ export type RobotSettingsItem = {
20
+ /**
21
+ * The actual settings object for this specific setting type
22
+ */
23
+ enabled: boolean;
24
+ /**
25
+ * The ID of the setting type, usually one of: ops-global-settings, ops-local-settings, flight-app-settings
26
+ */
27
+ id: 'ops-global-settings' | 'ops-local-settings' | 'flight-app-settings' | string;
28
+ settings: Record<string, unknown>;
29
+ name?: string;
30
+ };
31
+ export type AgentSettingsItem = RobotSettingsItem & {
32
+ id: 'agent-settings';
33
+ };
34
+ export interface AgentSettingsResponse {
35
+ items: {
36
+ id: string;
37
+ value: {
38
+ id: 'agent-settings';
39
+ enabled: boolean;
40
+ settings: RobotSettingsItem[];
41
+ };
42
+ }[];
43
+ version: string;
44
+ type: 'agent-settings';
45
+ robotDefinitionId: string;
46
+ username: string;
47
+ createdAt: string;
48
+ updatedAt: string;
49
+ }
50
+ export interface AgentSettingsRequestItem {
51
+ id: string;
52
+ value: {
53
+ id: 'agent-settings';
54
+ enabled: boolean;
55
+ settings: RobotSettingsItem[];
56
+ };
57
+ }
@@ -4,3 +4,8 @@ export interface RobotProfile {
4
4
  description?: string;
5
5
  tags?: string[];
6
6
  }
7
+ export interface CreateRobotDefinitionRequest {
8
+ name: string;
9
+ description: string;
10
+ tags?: string[];
11
+ }
@@ -1,8 +1,28 @@
1
1
  import { Observation } from '../maps/Panorama';
2
+ export interface AssetMetadata {
3
+ 'asset-id'?: string;
4
+ 'data-uuid'?: string;
5
+ 'dd-media-type'?: string;
6
+ 'dd-plan-name'?: string;
7
+ 'frame-id'?: string;
8
+ lat?: string;
9
+ lon?: string;
10
+ 'modified-time'?: string;
11
+ 'observation-id'?: string;
12
+ qw?: string;
13
+ qx?: string;
14
+ qy?: string;
15
+ qz?: string;
16
+ 'spot-name'?: string;
17
+ 'spot-type'?: string;
18
+ timestamp?: string;
19
+ x?: string;
20
+ y?: string;
21
+ z?: string;
22
+ [key: string]: string | undefined;
23
+ }
2
24
  export interface AssetItemModel {
3
- metadata?: {
4
- [key: string]: string;
5
- };
25
+ metadata?: AssetMetadata;
6
26
  path?: string;
7
27
  contentType?: string;
8
28
  signedURL?: string;
@@ -12,6 +12,10 @@ export interface DeviceCredential {
12
12
  * Device secret or password
13
13
  */
14
14
  key: string;
15
+ /**
16
+ * Access control list for the credentials
17
+ */
18
+ acl?: DeviceCredentialACLItem[];
15
19
  }
16
20
  export interface DeviceCredentialCreate {
17
21
  /**
@@ -1,45 +1,17 @@
1
1
  export * from './asset-storage/AssetItem';
2
2
  export * from './asset-storage/SyncIntegrations';
3
- export * from './schedule/IScheduleInfo';
4
- export * from './schedule/IScheduleAction';
5
- export * from './schedule/IScheduleJob';
6
3
  export * from './caller';
7
4
  export * from './callsigns/CallsignsEnums';
8
5
  export * from './callsigns/CallsignsLookup';
9
6
  export * from './callsigns/CallsignsQuery';
10
7
  export * from './callsigns/CallsignsQueryPredicate';
11
8
  export * from './command';
12
- export * from './file/FileEnums';
13
- export * from './message';
14
- export * from './params/ICallerParams';
15
- export * from './params/ICommandParams';
16
- export * from './params/IControlParams';
17
- export * from './params/IFileAccessorParams';
18
- export * from './params/ISearchParams';
19
- export * from './params/ITelemetryParams';
20
- export * from './params/IWebRTCSignallingParams';
21
- export * from './search/SearchQueryFilter';
22
- export * from './search/SearchStreamQuery';
23
- export * from './stream/IBaseStream';
24
- export * from './stream/ICallerStream';
25
- export * from './stream/ICommandStream';
26
- export * from './stream/IControlStream';
27
- export * from './stream/IFileAccessorStream';
28
- export * from './stream/ISearchStream';
29
- export * from './stream/ITelemetryStream';
30
- export * from './stream/IWebRTCSignallingStream';
31
- export * from './integrations/Overlay';
32
- export * from './integrations/Plan';
33
- export * from './integrations/Location';
34
- export * from './integrations/PaginatedResults';
35
- export * from './maps/Map';
36
- export * from './maps/Panorama';
37
- export * from './projects/ProjectUser';
38
- export * from './projects/ExternalProject';
39
- export * from './projects/NewProjectRequest';
40
- export * from './tag/Tag';
41
- export * from './target/Target';
9
+ export * from './device-credentials/DeviceCredentials';
10
+ export * from './Dashboard';
42
11
  export * from './ExportDataQuery';
12
+ export * from './EventDefinition';
13
+ export * from './file/FileEnums';
14
+ export * from './graph';
43
15
  export * from './HttpError';
44
16
  export * from './IBaseService';
45
17
  export * from './IConfigGroup';
@@ -49,6 +21,10 @@ export * from './IExportDataQuery';
49
21
  export * from './IFunctionConfig';
50
22
  export * from './IInvitation';
51
23
  export * from './IInvitationExists';
24
+ export * from './integrations/Location';
25
+ export * from './integrations/Overlay';
26
+ export * from './integrations/PaginatedResults';
27
+ export * from './integrations/Plan';
52
28
  export * from './IOperation';
53
29
  export * from './IPersonalAccessToken';
54
30
  export * from './IProject';
@@ -61,6 +37,7 @@ export * from './IRobotSettings';
61
37
  export * from './IRobotTemplate';
62
38
  export * from './IRocosSDKConfig';
63
39
  export * from './ISource';
40
+ export * from './ISubscriberStatus';
64
41
  export * from './IStream';
65
42
  export * from './IStreamConfig';
66
43
  export * from './IStreamOptions';
@@ -69,16 +46,45 @@ export * from './ITelemetryStreamConfig';
69
46
  export * from './IToken';
70
47
  export * from './IWidget';
71
48
  export * from './IWidgetLineGroup';
49
+ export * from './maps/Map';
50
+ export * from './maps/Panorama';
51
+ export * from './message';
52
+ export * from './params/ICallerParams';
53
+ export * from './params/ICommandParams';
54
+ export * from './params/IControlParams';
55
+ export * from './params/IFileAccessorParams';
56
+ export * from './params/ISearchParams';
57
+ export * from './params/ITelemetryParams';
58
+ export * from './params/IWebRTCSignallingParams';
59
+ export * from './projects/ExternalProject';
60
+ export * from './projects/NewProjectRequest';
61
+ export * from './projects/ProjectUser';
72
62
  export * from './Robot';
73
63
  export * from './RobotConfig';
74
64
  export * from './RobotPlugin';
65
+ export * from './RobotProfile';
75
66
  export * from './RobotTemplate';
76
67
  export * from './RocosError';
68
+ export * from './schedule/IScheduleAction';
69
+ export * from './schedule/IScheduleInfo';
70
+ export * from './schedule/IScheduleJob';
71
+ export * from './search/SearchQueryFilter';
72
+ export * from './search/SearchStreamQuery';
77
73
  export * from './ServiceEnum';
78
74
  export * from './Stream';
75
+ export * from './stream/IBaseStream';
76
+ export * from './stream/ICallerStream';
77
+ export * from './stream/ICommandStream';
78
+ export * from './stream/IControlStream';
79
+ export * from './stream/IFileAccessorStream';
80
+ export * from './stream/ISearchStream';
81
+ export * from './stream/ITelemetryStream';
82
+ export * from './stream/IWebRTCSignallingStream';
79
83
  export * from './StreamOptions';
80
84
  export * from './StreamSource';
81
85
  export * from './SubscriberStatusEnum';
86
+ export * from './tag/Tag';
87
+ export * from './target/Target';
82
88
  export * from './TelemetryStatus';
83
89
  export * from './Token';
84
90
  export * from './types';
@@ -1,45 +1,17 @@
1
1
  export * from './asset-storage/AssetItem';
2
2
  export * from './asset-storage/SyncIntegrations';
3
- export * from './schedule/IScheduleInfo';
4
- export * from './schedule/IScheduleAction';
5
- export * from './schedule/IScheduleJob';
6
3
  export * from './caller';
7
4
  export * from './callsigns/CallsignsEnums';
8
5
  export * from './callsigns/CallsignsLookup';
9
6
  export * from './callsigns/CallsignsQuery';
10
7
  export * from './callsigns/CallsignsQueryPredicate';
11
8
  export * from './command';
12
- export * from './file/FileEnums';
13
- export * from './message';
14
- export * from './params/ICallerParams';
15
- export * from './params/ICommandParams';
16
- export * from './params/IControlParams';
17
- export * from './params/IFileAccessorParams';
18
- export * from './params/ISearchParams';
19
- export * from './params/ITelemetryParams';
20
- export * from './params/IWebRTCSignallingParams';
21
- export * from './search/SearchQueryFilter';
22
- export * from './search/SearchStreamQuery';
23
- export * from './stream/IBaseStream';
24
- export * from './stream/ICallerStream';
25
- export * from './stream/ICommandStream';
26
- export * from './stream/IControlStream';
27
- export * from './stream/IFileAccessorStream';
28
- export * from './stream/ISearchStream';
29
- export * from './stream/ITelemetryStream';
30
- export * from './stream/IWebRTCSignallingStream';
31
- export * from './integrations/Overlay';
32
- export * from './integrations/Plan';
33
- export * from './integrations/Location';
34
- export * from './integrations/PaginatedResults';
35
- export * from './maps/Map';
36
- export * from './maps/Panorama';
37
- export * from './projects/ProjectUser';
38
- export * from './projects/ExternalProject';
39
- export * from './projects/NewProjectRequest';
40
- export * from './tag/Tag';
41
- export * from './target/Target';
9
+ export * from './device-credentials/DeviceCredentials';
10
+ export * from './Dashboard';
42
11
  export * from './ExportDataQuery';
12
+ export * from './EventDefinition';
13
+ export * from './file/FileEnums';
14
+ export * from './graph';
43
15
  export * from './HttpError';
44
16
  export * from './IBaseService';
45
17
  export * from './IConfigGroup';
@@ -49,6 +21,10 @@ export * from './IExportDataQuery';
49
21
  export * from './IFunctionConfig';
50
22
  export * from './IInvitation';
51
23
  export * from './IInvitationExists';
24
+ export * from './integrations/Location';
25
+ export * from './integrations/Overlay';
26
+ export * from './integrations/PaginatedResults';
27
+ export * from './integrations/Plan';
52
28
  export * from './IOperation';
53
29
  export * from './IPersonalAccessToken';
54
30
  export * from './IProject';
@@ -61,6 +37,7 @@ export * from './IRobotSettings';
61
37
  export * from './IRobotTemplate';
62
38
  export * from './IRocosSDKConfig';
63
39
  export * from './ISource';
40
+ export * from './ISubscriberStatus';
64
41
  export * from './IStream';
65
42
  export * from './IStreamConfig';
66
43
  export * from './IStreamOptions';
@@ -69,16 +46,45 @@ export * from './ITelemetryStreamConfig';
69
46
  export * from './IToken';
70
47
  export * from './IWidget';
71
48
  export * from './IWidgetLineGroup';
49
+ export * from './maps/Map';
50
+ export * from './maps/Panorama';
51
+ export * from './message';
52
+ export * from './params/ICallerParams';
53
+ export * from './params/ICommandParams';
54
+ export * from './params/IControlParams';
55
+ export * from './params/IFileAccessorParams';
56
+ export * from './params/ISearchParams';
57
+ export * from './params/ITelemetryParams';
58
+ export * from './params/IWebRTCSignallingParams';
59
+ export * from './projects/ExternalProject';
60
+ export * from './projects/NewProjectRequest';
61
+ export * from './projects/ProjectUser';
72
62
  export * from './Robot';
73
63
  export * from './RobotConfig';
74
64
  export * from './RobotPlugin';
65
+ export * from './RobotProfile';
75
66
  export * from './RobotTemplate';
76
67
  export * from './RocosError';
68
+ export * from './schedule/IScheduleAction';
69
+ export * from './schedule/IScheduleInfo';
70
+ export * from './schedule/IScheduleJob';
71
+ export * from './search/SearchQueryFilter';
72
+ export * from './search/SearchStreamQuery';
77
73
  export * from './ServiceEnum';
78
74
  export * from './Stream';
75
+ export * from './stream/IBaseStream';
76
+ export * from './stream/ICallerStream';
77
+ export * from './stream/ICommandStream';
78
+ export * from './stream/IControlStream';
79
+ export * from './stream/IFileAccessorStream';
80
+ export * from './stream/ISearchStream';
81
+ export * from './stream/ITelemetryStream';
82
+ export * from './stream/IWebRTCSignallingStream';
79
83
  export * from './StreamOptions';
80
84
  export * from './StreamSource';
81
85
  export * from './SubscriberStatusEnum';
86
+ export * from './tag/Tag';
87
+ export * from './target/Target';
82
88
  export * from './TelemetryStatus';
83
89
  export * from './Token';
84
90
  export * from './types';
@@ -1,9 +1,10 @@
1
+ import { AgentSettingsRequestItem, AgentSettingsResponse } from '../models/IRobotSettings';
2
+ import { CreateRobotDefinitionRequest, RobotProfile } from '../models/RobotProfile';
1
3
  import { RocosError } from '../models/RocosError';
2
4
  import { BaseServiceAbstract } from './BaseServiceAbstract';
3
5
  import { Dashboard } from '../models/Dashboard';
4
6
  import { IBaseService } from '../models/IBaseService';
5
7
  import { IRocosSDKConfig } from '../models/IRocosSDKConfig';
6
- import { RobotProfile } from '../models/RobotProfile';
7
8
  export declare class ProfileService extends BaseServiceAbstract implements IBaseService {
8
9
  constructor(config: IRocosSDKConfig);
9
10
  protected getError(e: Error): RocosError;
@@ -15,7 +16,7 @@ export declare class ProfileService extends BaseServiceAbstract implements IBase
15
16
  * @param model - Payload
16
17
  * @description - Renamed from robotDefsCreate
17
18
  */
18
- create(projectId: string, model: any): Promise<any>;
19
+ create(projectId: string, model: CreateRobotDefinitionRequest): Promise<RobotProfile>;
19
20
  /**
20
21
  * Get robot definitions
21
22
  *
@@ -98,14 +99,6 @@ export declare class ProfileService extends BaseServiceAbstract implements IBase
98
99
  * @description - Renamed from robotDefDashboards
99
100
  */
100
101
  dashboards(projectId: string, profileId: string): Promise<Dashboard[]>;
101
- /**
102
- * Get Dashboard data which stored in Azure Blob.
103
- *
104
- * @param projectId - Project Id
105
- * @param definitionId - Robot Profile Id
106
- * @description - Renamed from robotDefDashboardBlob
107
- */
108
- dashboardBlob(projectId: string, definitionId: string): Promise<any>;
109
102
  /**
110
103
  * Update dashboard for a robot definition
111
104
  *
@@ -139,16 +132,16 @@ export declare class ProfileService extends BaseServiceAbstract implements IBase
139
132
  * @param definitionId - Robot definition Id
140
133
  * @description - Renamed from robotDefGetAgentSettings
141
134
  */
142
- getAgentSettings(projectId: string, definitionId: string): Promise<any>;
135
+ getAgentSettings(projectId: string, definitionId: string): Promise<AgentSettingsResponse>;
143
136
  /**
144
137
  * Update agent settings
145
138
  *
146
139
  * @param projectId - Project Id
147
140
  * @param definitionId - Robot definition Id
148
- * @param model - Payload
141
+ * @param model - Agent settings payload (array of agent setting request items)
149
142
  * @description - Renamed from robotDefUpdateAgentSettings
150
143
  */
151
- updateAgentSettings(projectId: string, definitionId: string, model: any): Promise<any>;
144
+ updateAgentSettings(projectId: string, definitionId: string, model: AgentSettingsRequestItem[]): Promise<void>;
152
145
  /**
153
146
  * Get commands fora robot definition
154
147
  *
@@ -1,4 +1,4 @@
1
- import { API_PROJECT_DEFINITION_ACTION_URL, API_PROJECT_DEFINITION_AGENT_URL, API_PROJECT_DEFINITION_BLOB_URL, API_PROJECT_DEFINITION_BUTTON_URL, API_PROJECT_DEFINITION_COMMAND2_URL, API_PROJECT_DEFINITION_COMMAND_URL, API_PROJECT_DEFINITION_COPY_URL, API_PROJECT_DEFINITION_DASHBOARD_URL, API_PROJECT_DEFINITION_EXPORT, API_PROJECT_DEFINITION_GAMEPAD_URL, API_PROJECT_DEFINITION_ID_URL, API_PROJECT_DEFINITION_IMPORT, API_PROJECT_DEFINITION_IMPORT_LIBRARY, API_PROJECT_DEFINITION_LIBRARY, API_PROJECT_DEFINITION_SETTING_URL, API_PROJECT_DEFINITION_STREAM_URL, API_PROJECT_DEFINITION_TRIGGER_URL, API_PROJECT_DEFINITION_URL, API_PROJECT_PROFILE_DASHBOARD_URL, API_PROJECT_ROBOT_DEFINITION_URL, API_PROJECT_ROBOT_URL, } from '../constants/api';
1
+ import { API_PROJECT_DEFINITION_ACTION_URL, API_PROJECT_DEFINITION_AGENT_URL, API_PROJECT_DEFINITION_BUTTON_URL, API_PROJECT_DEFINITION_COMMAND2_URL, API_PROJECT_DEFINITION_COMMAND_URL, API_PROJECT_DEFINITION_COPY_URL, API_PROJECT_DEFINITION_DASHBOARD_URL, API_PROJECT_DEFINITION_EXPORT, API_PROJECT_DEFINITION_GAMEPAD_URL, API_PROJECT_DEFINITION_ID_URL, API_PROJECT_DEFINITION_IMPORT, API_PROJECT_DEFINITION_IMPORT_LIBRARY, API_PROJECT_DEFINITION_LIBRARY, API_PROJECT_DEFINITION_SETTING_URL, API_PROJECT_DEFINITION_STREAM_URL, API_PROJECT_DEFINITION_TRIGGER_URL, API_PROJECT_DEFINITION_URL, API_PROJECT_PROFILE_DASHBOARD_URL, API_PROJECT_ROBOT_DEFINITION_URL, API_PROJECT_ROBOT_URL, } from '../constants/api';
2
2
  import { RocosError, errorCodes } from '../models/RocosError';
3
3
  import { BaseServiceAbstract } from './BaseServiceAbstract';
4
4
  import { RocosLogger } from '../logger/RocosLogger';
@@ -21,9 +21,6 @@ export class ProfileService extends BaseServiceAbstract {
21
21
  * @param model - Payload
22
22
  * @description - Renamed from robotDefsCreate
23
23
  */
24
- // TODO: map the request model
25
- // TODO: map the response object
26
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
27
24
  async create(projectId, model) {
28
25
  return this.callPost(formatServiceUrl(API_PROJECT_DEFINITION_URL, { url: this.config.url, projectId }, this.config.insecure), model, 'Failed to create a robot definition.');
29
26
  }
@@ -145,17 +142,6 @@ export class ProfileService extends BaseServiceAbstract {
145
142
  async dashboards(projectId, profileId) {
146
143
  return this.callGet(formatServiceUrl(API_PROJECT_PROFILE_DASHBOARD_URL, { url: this.config.url, projectId, profileId }, this.config.insecure), 'Failed to get dashboards for a profile.');
147
144
  }
148
- /**
149
- * Get Dashboard data which stored in Azure Blob.
150
- *
151
- * @param projectId - Project Id
152
- * @param definitionId - Robot Profile Id
153
- * @description - Renamed from robotDefDashboardBlob
154
- */
155
- // TODO: map the response object
156
- async dashboardBlob(projectId, definitionId) {
157
- return this.callGet(formatServiceUrl(API_PROJECT_DEFINITION_BLOB_URL, { url: this.config.url, projectId, definitionId }, this.config.insecure), 'Failed to get dashboards from a blob.');
158
- }
159
145
  /**
160
146
  * Update dashboard for a robot definition
161
147
  *
@@ -202,7 +188,6 @@ export class ProfileService extends BaseServiceAbstract {
202
188
  * @param definitionId - Robot definition Id
203
189
  * @description - Renamed from robotDefGetAgentSettings
204
190
  */
205
- // TODO: map the response object
206
191
  async getAgentSettings(projectId, definitionId) {
207
192
  return this.callGet(formatServiceUrl(API_PROJECT_DEFINITION_AGENT_URL, { url: this.config.url, projectId, definitionId }, this.config.insecure), 'Failed to get agent settings.');
208
193
  }
@@ -211,14 +196,11 @@ export class ProfileService extends BaseServiceAbstract {
211
196
  *
212
197
  * @param projectId - Project Id
213
198
  * @param definitionId - Robot definition Id
214
- * @param model - Payload
199
+ * @param model - Agent settings payload (array of agent setting request items)
215
200
  * @description - Renamed from robotDefUpdateAgentSettings
216
201
  */
217
- // TODO: map the request model
218
- // TODO: map the response object
219
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
220
202
  async updateAgentSettings(projectId, definitionId, model) {
221
- return this.callPost(formatServiceUrl(API_PROJECT_DEFINITION_AGENT_URL, { url: this.config.url, projectId, definitionId }, this.config.insecure), model, 'Failed to update agent settings.');
203
+ await this.callPost(formatServiceUrl(API_PROJECT_DEFINITION_AGENT_URL, { url: this.config.url, projectId, definitionId }, this.config.insecure), model, 'Failed to update agent settings.');
222
204
  }
223
205
  /**
224
206
  * Get commands fora robot definition
@@ -1,4 +1,4 @@
1
- import { IBaseService, IConnectedCallsign, IRobot, IRobotListItem, IRobotSettings, IRobotTemplate, IRocosSDKConfig, RocosError } from '../models';
1
+ import { AgentSettingsResponse, IBaseService, IConnectedCallsign, IRobot, IRobotListItem, IRobotSettings, IRobotTemplate, IRocosSDKConfig, RocosError } from '../models';
2
2
  import { BaseServiceAbstract } from './BaseServiceAbstract';
3
3
  export declare class RobotService extends BaseServiceAbstract implements IBaseService {
4
4
  constructor(config: IRocosSDKConfig);
@@ -29,14 +29,14 @@ export declare class RobotService extends BaseServiceAbstract implements IBaseSe
29
29
  * @param projectId Project Id
30
30
  * @param robot - Robot payload {@link IRobot}
31
31
  */
32
- update(projectId: string, robot: IRobot): Promise<any>;
32
+ update(projectId: string, robot: IRobot): Promise<void>;
33
33
  /**
34
34
  * Delete the robots by callsign list
35
35
  *
36
36
  * @param projectId - Project Id
37
37
  * @param callsignIds - Callsign list
38
38
  */
39
- delete(projectId: string, callsignIds: string[]): Promise<any>;
39
+ delete(projectId: string, callsignIds: string[]): Promise<void>;
40
40
  /**
41
41
  * Get robot information by project id and callsign of the robot.
42
42
  *
@@ -197,7 +197,7 @@ export declare class RobotService extends BaseServiceAbstract implements IBaseSe
197
197
  * @param projectId - Project Id
198
198
  * @param callsign - Robot callsign
199
199
  */
200
- getAgentSettings(projectId: string, callsign: string): Promise<any>;
200
+ getAgentSettings(projectId: string, callsign: string): Promise<AgentSettingsResponse>;
201
201
  /**
202
202
  * Update agent settings for a robot
203
203
  *
@@ -49,7 +49,6 @@ export class RobotService extends BaseServiceAbstract {
49
49
  * @param projectId Project Id
50
50
  * @param robot - Robot payload {@link IRobot}
51
51
  */
52
- // TODO: map the response object
53
52
  async update(projectId, robot) {
54
53
  return this.callPut(formatServiceUrl(API_PROJECT_ROBOT_URL, { url: this.config.url, projectId }, this.config.insecure), robot, 'Failed to update robot.');
55
54
  }
@@ -59,7 +58,6 @@ export class RobotService extends BaseServiceAbstract {
59
58
  * @param projectId - Project Id
60
59
  * @param callsignIds - Callsign list
61
60
  */
62
- // TODO: map the response object
63
61
  async delete(projectId, callsignIds) {
64
62
  return this.callDelete(formatServiceUrl(API_PROJECT_ROBOT_URL, { url: this.config.url, projectId }, this.config.insecure), 'Failed to delete robots.', callsignIds);
65
63
  }
@@ -334,7 +332,6 @@ export class RobotService extends BaseServiceAbstract {
334
332
  * @param projectId - Project Id
335
333
  * @param callsign - Robot callsign
336
334
  */
337
- // TODO: map the response object
338
335
  async getAgentSettings(projectId, callsign) {
339
336
  return this.callGet(formatServiceUrl(API_PROJECT_ROBOT_AGENT_URL, { url: this.config.url, projectId, callsign }, this.config.insecure), 'Failed to get agent settings for robot.');
340
337
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dronedeploy/rocos-js-sdk",
3
- "version": "3.0.20",
3
+ "version": "3.0.22",
4
4
  "description": "Javascript SDK for rocos",
5
5
  "main": "cjs/index.js",
6
6
  "module": "esm/index.js",