@dronedeploy/rocos-js-sdk 3.0.21 → 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,9 +2,9 @@ export interface IRobotSettings {
2
2
  type: 'settings';
3
3
  items: {
4
4
  id: string;
5
- value: RobotSettingsItem[];
6
- };
7
- version: number;
5
+ value: RobotSettingsItem;
6
+ }[];
7
+ version: string;
8
8
  robotDefinitionId: string;
9
9
  username: string;
10
10
  /**
@@ -32,22 +32,26 @@ export type AgentSettingsItem = RobotSettingsItem & {
32
32
  id: 'agent-settings';
33
33
  };
34
34
  export interface AgentSettingsResponse {
35
- items: Array<{
35
+ items: {
36
36
  id: string;
37
37
  value: {
38
38
  id: 'agent-settings';
39
39
  enabled: boolean;
40
- settings: AgentSettingsItem[];
40
+ settings: RobotSettingsItem[];
41
41
  };
42
- }>;
42
+ }[];
43
43
  version: string;
44
44
  type: 'agent-settings';
45
+ robotDefinitionId: string;
46
+ username: string;
47
+ createdAt: string;
48
+ updatedAt: string;
45
49
  }
46
50
  export interface AgentSettingsRequestItem {
47
51
  id: string;
48
52
  value: {
49
53
  id: 'agent-settings';
50
54
  enabled: boolean;
51
- settings: AgentSettingsItem[];
55
+ settings: RobotSettingsItem[];
52
56
  };
53
57
  }
@@ -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,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);
@@ -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
  *
@@ -335,7 +335,6 @@ class RobotService extends BaseServiceAbstract_1.BaseServiceAbstract {
335
335
  * @param projectId - Project Id
336
336
  * @param callsign - Robot callsign
337
337
  */
338
- // TODO: map the response object
339
338
  async getAgentSettings(projectId, callsign) {
340
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.');
341
340
  }
@@ -2,9 +2,9 @@ export interface IRobotSettings {
2
2
  type: 'settings';
3
3
  items: {
4
4
  id: string;
5
- value: RobotSettingsItem[];
6
- };
7
- version: number;
5
+ value: RobotSettingsItem;
6
+ }[];
7
+ version: string;
8
8
  robotDefinitionId: string;
9
9
  username: string;
10
10
  /**
@@ -32,22 +32,26 @@ export type AgentSettingsItem = RobotSettingsItem & {
32
32
  id: 'agent-settings';
33
33
  };
34
34
  export interface AgentSettingsResponse {
35
- items: Array<{
35
+ items: {
36
36
  id: string;
37
37
  value: {
38
38
  id: 'agent-settings';
39
39
  enabled: boolean;
40
- settings: AgentSettingsItem[];
40
+ settings: RobotSettingsItem[];
41
41
  };
42
- }>;
42
+ }[];
43
43
  version: string;
44
44
  type: 'agent-settings';
45
+ robotDefinitionId: string;
46
+ username: string;
47
+ createdAt: string;
48
+ updatedAt: string;
45
49
  }
46
50
  export interface AgentSettingsRequestItem {
47
51
  id: string;
48
52
  value: {
49
53
  id: 'agent-settings';
50
54
  enabled: boolean;
51
- settings: AgentSettingsItem[];
55
+ settings: RobotSettingsItem[];
52
56
  };
53
57
  }
@@ -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,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);
@@ -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
  *
@@ -332,7 +332,6 @@ export class RobotService extends BaseServiceAbstract {
332
332
  * @param projectId - Project Id
333
333
  * @param callsign - Robot callsign
334
334
  */
335
- // TODO: map the response object
336
335
  async getAgentSettings(projectId, callsign) {
337
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.');
338
337
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dronedeploy/rocos-js-sdk",
3
- "version": "3.0.21",
3
+ "version": "3.0.22",
4
4
  "description": "Javascript SDK for rocos",
5
5
  "main": "cjs/index.js",
6
6
  "module": "esm/index.js",