@dronedeploy/rocos-js-sdk 3.0.19 → 3.0.21
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.
- package/cjs/constants/api.d.ts +2 -0
- package/cjs/constants/api.js +5 -3
- package/cjs/models/IRobotSettings.d.ts +37 -12
- package/cjs/models/RobotProfile.d.ts +5 -0
- package/cjs/models/asset-storage/AssetItem.d.ts +23 -3
- package/cjs/models/index.d.ts +39 -33
- package/cjs/models/index.js +39 -33
- package/cjs/services/ProfileService.d.ts +12 -13
- package/cjs/services/ProfileService.js +12 -20
- package/cjs/services/RobotService.d.ts +2 -2
- package/cjs/services/RobotService.js +0 -2
- package/esm/constants/api.d.ts +2 -0
- package/esm/constants/api.js +2 -0
- package/esm/models/IRobotSettings.d.ts +37 -12
- package/esm/models/RobotProfile.d.ts +5 -0
- package/esm/models/asset-storage/AssetItem.d.ts +23 -3
- package/esm/models/index.d.ts +39 -33
- package/esm/models/index.js +39 -33
- package/esm/services/ProfileService.d.ts +12 -13
- package/esm/services/ProfileService.js +13 -21
- package/esm/services/RobotService.d.ts +2 -2
- package/esm/services/RobotService.js +0 -2
- package/package.json +1 -1
package/cjs/constants/api.d.ts
CHANGED
|
@@ -85,6 +85,8 @@ export declare const API_PROJECT_DEFINITION_TRIGGER_URL = "https://{url}/project
|
|
|
85
85
|
export declare const API_PROJECT_DEFINITION_GAMEPAD_URL = "https://{url}/projects/{projectId}/robot-definitions/{definitionId}/gamepads";
|
|
86
86
|
export declare const API_PROJECT_DEFINITION_EXPORT = "https://{url}/import-export/projects/{projectId}/robot-definitions/{definitionId}/export";
|
|
87
87
|
export declare const API_PROJECT_DEFINITION_IMPORT = "https://{url}/import-export/projects/{projectId}/robot-definitions/import";
|
|
88
|
+
export declare const API_PROJECT_DEFINITION_IMPORT_LIBRARY = "https://{url}/import-export/projects/{projectId}/robot-definitions/import/{profileId}";
|
|
89
|
+
export declare const API_PROJECT_DEFINITION_LIBRARY = "https://{url}/import-export/library";
|
|
88
90
|
export declare const API_PROJECT_ENVIRONMENT_URL = "https://{url}/graphs/projects/{projectId}/environments";
|
|
89
91
|
export declare const API_PROJECT_GROUP_TYPE_URL = "https://{url}/projects/{projectId}/config-groups/{type}";
|
|
90
92
|
export declare const API_PROJECT_GROUP_TYPE_ID_URL = "https://{url}/projects/{projectId}/config-groups/{type}/{configGroupId}";
|
package/cjs/constants/api.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
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
|
-
exports.
|
|
5
|
-
exports.
|
|
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 = void 0;
|
|
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;
|
|
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';
|
|
@@ -91,6 +91,8 @@ exports.API_PROJECT_DEFINITION_TRIGGER_URL = 'https://{url}/projects/{projectId}
|
|
|
91
91
|
exports.API_PROJECT_DEFINITION_GAMEPAD_URL = 'https://{url}/projects/{projectId}/robot-definitions/{definitionId}/gamepads';
|
|
92
92
|
exports.API_PROJECT_DEFINITION_EXPORT = 'https://{url}/import-export/projects/{projectId}/robot-definitions/{definitionId}/export';
|
|
93
93
|
exports.API_PROJECT_DEFINITION_IMPORT = 'https://{url}/import-export/projects/{projectId}/robot-definitions/import';
|
|
94
|
+
exports.API_PROJECT_DEFINITION_IMPORT_LIBRARY = 'https://{url}/import-export/projects/{projectId}/robot-definitions/import/{profileId}';
|
|
95
|
+
exports.API_PROJECT_DEFINITION_LIBRARY = 'https://{url}/import-export/library';
|
|
94
96
|
exports.API_PROJECT_ENVIRONMENT_URL = 'https://{url}/graphs/projects/{projectId}/environments';
|
|
95
97
|
exports.API_PROJECT_GROUP_TYPE_URL = 'https://{url}/projects/{projectId}/config-groups/{type}';
|
|
96
98
|
exports.API_PROJECT_GROUP_TYPE_ID_URL = 'https://{url}/projects/{projectId}/config-groups/{type}/{configGroupId}';
|
|
@@ -2,18 +2,8 @@ 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
|
-
};
|
|
16
|
-
}[];
|
|
5
|
+
value: RobotSettingsItem[];
|
|
6
|
+
};
|
|
17
7
|
version: number;
|
|
18
8
|
robotDefinitionId: string;
|
|
19
9
|
username: string;
|
|
@@ -26,3 +16,38 @@ 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: Array<{
|
|
36
|
+
id: string;
|
|
37
|
+
value: {
|
|
38
|
+
id: 'agent-settings';
|
|
39
|
+
enabled: boolean;
|
|
40
|
+
settings: AgentSettingsItem[];
|
|
41
|
+
};
|
|
42
|
+
}>;
|
|
43
|
+
version: string;
|
|
44
|
+
type: 'agent-settings';
|
|
45
|
+
}
|
|
46
|
+
export interface AgentSettingsRequestItem {
|
|
47
|
+
id: string;
|
|
48
|
+
value: {
|
|
49
|
+
id: 'agent-settings';
|
|
50
|
+
enabled: boolean;
|
|
51
|
+
settings: AgentSettingsItem[];
|
|
52
|
+
};
|
|
53
|
+
}
|
|
@@ -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;
|
package/cjs/models/index.d.ts
CHANGED
|
@@ -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 './
|
|
13
|
-
export * from './
|
|
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';
|
package/cjs/models/index.js
CHANGED
|
@@ -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("./
|
|
29
|
-
__exportStar(require("./
|
|
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:
|
|
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<
|
|
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 -
|
|
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:
|
|
144
|
+
updateAgentSettings(projectId: string, definitionId: string, model: AgentSettingsRequestItem[]): Promise<void>;
|
|
152
145
|
/**
|
|
153
146
|
* Get commands fora robot definition
|
|
154
147
|
*
|
|
@@ -258,6 +251,12 @@ export declare class ProfileService extends BaseServiceAbstract implements IBase
|
|
|
258
251
|
import(projectId: string, profileData: Blob | File, newName?: string, newDescription?: string): Promise<{
|
|
259
252
|
profileId: string;
|
|
260
253
|
}>;
|
|
254
|
+
getLibraryProfiles(): Promise<(RobotProfile & {
|
|
255
|
+
last_modified: Date;
|
|
256
|
+
})[]>;
|
|
257
|
+
importFromLibrary(projectId: string, profileId: string, name?: string, description?: string): Promise<{
|
|
258
|
+
profileId: string;
|
|
259
|
+
}>;
|
|
261
260
|
/**
|
|
262
261
|
* Update gamepads for a robot definition
|
|
263
262
|
*
|
|
@@ -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 -
|
|
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
|
-
|
|
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
|
|
@@ -380,6 +362,16 @@ class ProfileService extends BaseServiceAbstract_1.BaseServiceAbstract {
|
|
|
380
362
|
formData.append('file', profileData);
|
|
381
363
|
return this.callPost((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_PROJECT_DEFINITION_IMPORT, { url: this.config.url, projectId }, this.config.insecure), formData, `Failed to import robot definition for ${projectId}.`);
|
|
382
364
|
}
|
|
365
|
+
async getLibraryProfiles() {
|
|
366
|
+
const profiles = await this.callGet((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_PROJECT_DEFINITION_LIBRARY, { url: this.config.url }, this.config.insecure), 'Failed to get library profiles.');
|
|
367
|
+
return profiles.map((profile) => ({
|
|
368
|
+
...profile,
|
|
369
|
+
last_modified: new Date(profile.last_modified),
|
|
370
|
+
}));
|
|
371
|
+
}
|
|
372
|
+
async importFromLibrary(projectId, profileId, name, description) {
|
|
373
|
+
return this.callPost((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_PROJECT_DEFINITION_IMPORT_LIBRARY, { url: this.config.url, projectId, profileId }, this.config.insecure), { name, description }, `Failed to import library profile ${profileId} into project ${projectId}.`);
|
|
374
|
+
}
|
|
383
375
|
/**
|
|
384
376
|
* Update gamepads for a robot definition
|
|
385
377
|
*
|
|
@@ -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<
|
|
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<
|
|
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
|
*
|
|
@@ -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
|
}
|
package/esm/constants/api.d.ts
CHANGED
|
@@ -85,6 +85,8 @@ export declare const API_PROJECT_DEFINITION_TRIGGER_URL = "https://{url}/project
|
|
|
85
85
|
export declare const API_PROJECT_DEFINITION_GAMEPAD_URL = "https://{url}/projects/{projectId}/robot-definitions/{definitionId}/gamepads";
|
|
86
86
|
export declare const API_PROJECT_DEFINITION_EXPORT = "https://{url}/import-export/projects/{projectId}/robot-definitions/{definitionId}/export";
|
|
87
87
|
export declare const API_PROJECT_DEFINITION_IMPORT = "https://{url}/import-export/projects/{projectId}/robot-definitions/import";
|
|
88
|
+
export declare const API_PROJECT_DEFINITION_IMPORT_LIBRARY = "https://{url}/import-export/projects/{projectId}/robot-definitions/import/{profileId}";
|
|
89
|
+
export declare const API_PROJECT_DEFINITION_LIBRARY = "https://{url}/import-export/library";
|
|
88
90
|
export declare const API_PROJECT_ENVIRONMENT_URL = "https://{url}/graphs/projects/{projectId}/environments";
|
|
89
91
|
export declare const API_PROJECT_GROUP_TYPE_URL = "https://{url}/projects/{projectId}/config-groups/{type}";
|
|
90
92
|
export declare const API_PROJECT_GROUP_TYPE_ID_URL = "https://{url}/projects/{projectId}/config-groups/{type}/{configGroupId}";
|
package/esm/constants/api.js
CHANGED
|
@@ -85,6 +85,8 @@ export const API_PROJECT_DEFINITION_TRIGGER_URL = 'https://{url}/projects/{proje
|
|
|
85
85
|
export const API_PROJECT_DEFINITION_GAMEPAD_URL = 'https://{url}/projects/{projectId}/robot-definitions/{definitionId}/gamepads';
|
|
86
86
|
export const API_PROJECT_DEFINITION_EXPORT = 'https://{url}/import-export/projects/{projectId}/robot-definitions/{definitionId}/export';
|
|
87
87
|
export const API_PROJECT_DEFINITION_IMPORT = 'https://{url}/import-export/projects/{projectId}/robot-definitions/import';
|
|
88
|
+
export const API_PROJECT_DEFINITION_IMPORT_LIBRARY = 'https://{url}/import-export/projects/{projectId}/robot-definitions/import/{profileId}';
|
|
89
|
+
export const API_PROJECT_DEFINITION_LIBRARY = 'https://{url}/import-export/library';
|
|
88
90
|
export const API_PROJECT_ENVIRONMENT_URL = 'https://{url}/graphs/projects/{projectId}/environments';
|
|
89
91
|
export const API_PROJECT_GROUP_TYPE_URL = 'https://{url}/projects/{projectId}/config-groups/{type}';
|
|
90
92
|
export const API_PROJECT_GROUP_TYPE_ID_URL = 'https://{url}/projects/{projectId}/config-groups/{type}/{configGroupId}';
|
|
@@ -2,18 +2,8 @@ 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
|
-
};
|
|
16
|
-
}[];
|
|
5
|
+
value: RobotSettingsItem[];
|
|
6
|
+
};
|
|
17
7
|
version: number;
|
|
18
8
|
robotDefinitionId: string;
|
|
19
9
|
username: string;
|
|
@@ -26,3 +16,38 @@ 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: Array<{
|
|
36
|
+
id: string;
|
|
37
|
+
value: {
|
|
38
|
+
id: 'agent-settings';
|
|
39
|
+
enabled: boolean;
|
|
40
|
+
settings: AgentSettingsItem[];
|
|
41
|
+
};
|
|
42
|
+
}>;
|
|
43
|
+
version: string;
|
|
44
|
+
type: 'agent-settings';
|
|
45
|
+
}
|
|
46
|
+
export interface AgentSettingsRequestItem {
|
|
47
|
+
id: string;
|
|
48
|
+
value: {
|
|
49
|
+
id: 'agent-settings';
|
|
50
|
+
enabled: boolean;
|
|
51
|
+
settings: AgentSettingsItem[];
|
|
52
|
+
};
|
|
53
|
+
}
|
|
@@ -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;
|
package/esm/models/index.d.ts
CHANGED
|
@@ -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 './
|
|
13
|
-
export * from './
|
|
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';
|
package/esm/models/index.js
CHANGED
|
@@ -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 './
|
|
13
|
-
export * from './
|
|
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:
|
|
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<
|
|
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 -
|
|
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:
|
|
144
|
+
updateAgentSettings(projectId: string, definitionId: string, model: AgentSettingsRequestItem[]): Promise<void>;
|
|
152
145
|
/**
|
|
153
146
|
* Get commands fora robot definition
|
|
154
147
|
*
|
|
@@ -258,6 +251,12 @@ export declare class ProfileService extends BaseServiceAbstract implements IBase
|
|
|
258
251
|
import(projectId: string, profileData: Blob | File, newName?: string, newDescription?: string): Promise<{
|
|
259
252
|
profileId: string;
|
|
260
253
|
}>;
|
|
254
|
+
getLibraryProfiles(): Promise<(RobotProfile & {
|
|
255
|
+
last_modified: Date;
|
|
256
|
+
})[]>;
|
|
257
|
+
importFromLibrary(projectId: string, profileId: string, name?: string, description?: string): Promise<{
|
|
258
|
+
profileId: string;
|
|
259
|
+
}>;
|
|
261
260
|
/**
|
|
262
261
|
* Update gamepads for a robot definition
|
|
263
262
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { API_PROJECT_DEFINITION_ACTION_URL, API_PROJECT_DEFINITION_AGENT_URL,
|
|
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 -
|
|
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
|
-
|
|
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
|
|
@@ -377,6 +359,16 @@ export class ProfileService extends BaseServiceAbstract {
|
|
|
377
359
|
formData.append('file', profileData);
|
|
378
360
|
return this.callPost(formatServiceUrl(API_PROJECT_DEFINITION_IMPORT, { url: this.config.url, projectId }, this.config.insecure), formData, `Failed to import robot definition for ${projectId}.`);
|
|
379
361
|
}
|
|
362
|
+
async getLibraryProfiles() {
|
|
363
|
+
const profiles = await this.callGet(formatServiceUrl(API_PROJECT_DEFINITION_LIBRARY, { url: this.config.url }, this.config.insecure), 'Failed to get library profiles.');
|
|
364
|
+
return profiles.map((profile) => ({
|
|
365
|
+
...profile,
|
|
366
|
+
last_modified: new Date(profile.last_modified),
|
|
367
|
+
}));
|
|
368
|
+
}
|
|
369
|
+
async importFromLibrary(projectId, profileId, name, description) {
|
|
370
|
+
return this.callPost(formatServiceUrl(API_PROJECT_DEFINITION_IMPORT_LIBRARY, { url: this.config.url, projectId, profileId }, this.config.insecure), { name, description }, `Failed to import library profile ${profileId} into project ${projectId}.`);
|
|
371
|
+
}
|
|
380
372
|
/**
|
|
381
373
|
* Update gamepads for a robot definition
|
|
382
374
|
*
|
|
@@ -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<
|
|
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<
|
|
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
|
*
|
|
@@ -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
|
}
|