@dronedeploy/rocos-js-sdk 4.1.1 → 4.2.1

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.
@@ -56,8 +56,10 @@ export declare const API_PROJECT_ROBOT_COMMAND2_URL = "https://{url}/projects/{p
56
56
  export declare const API_PROJECT_ROBOT_BUTTON_URL = "https://{url}/projects/{projectId}/robots/{callsign}/buttons";
57
57
  export declare const API_PROJECT_ROBOT_TRIGGER_URL = "https://{url}/projects/{projectId}/robots/{callsign}/triggers";
58
58
  export declare const API_PROJECT_ROBOT_GAMEPAD_URL = "https://{url}/projects/{projectId}/robots/{callsign}/gamepads";
59
- export declare const API_PROJECT_ROBOT_CONFIGS_CONNECTIONS_URL = "https://{url}/robot-configs/connections/projects/{projectId}";
60
- export declare const API_PROJECT_ROBOT_CONFIGS_CONNECTION_URL = "https://{url}/robot-configs/connections/projects/{projectId}/callsigns/{callsign}";
59
+ export declare const API_SERVICE_CONNECTIONS_URL = "https://{url}/{service}/connections/projects/{projectId}";
60
+ export declare const API_SERVICE_CONNECTION_URL = "https://{url}/{service}/connections/projects/{projectId}/callsigns/{callsign}";
61
+ export declare const API_PROJECT_ROBOT_CONFIGS_CONNECTIONS_URL: string;
62
+ export declare const API_PROJECT_ROBOT_CONFIGS_CONNECTION_URL: string;
61
63
  export declare const API_PROJECT_OPERATION_URL = "https://{url}/projects/{projectId}/operations";
62
64
  export declare const API_PROJECT_OPERATION_ID_URL = "https://{url}/projects/{projectId}/operations/{operationId}";
63
65
  export declare const API_PROJECT_DASHBOARD_URL = "https://{url}/projects/{projectId}/dashboards";
@@ -134,6 +136,10 @@ export declare const API_GRAPHS_MAP_NODE_URL = "https://{url}/graphs/projects/{p
134
136
  export declare const API_GRAPHS_MAP_EDGES_ADD_URL = "https://{url}/graphs/projects/{projectId}/maps/{mapId}/edges/add";
135
137
  export declare const API_GRAPHS_MAP_EDGES_ADD_TRANSFORM_URL = "https://{url}/graphs/projects/{projectId}/maps/{mapId}/edges/add/transform";
136
138
  export declare const API_GRAPHS_MAP_EDGE_URL = "https://{url}/graphs/projects/{projectId}/maps/{mapId}/edges/{edgeId}";
139
+ export declare const API_GRAPHS_MAP_PATHS_URL = "https://{url}/graphs/projects/{projectId}/maps/{mapId}/paths";
140
+ export declare const API_GRAPHS_MAP_PATH_URL = "https://{url}/graphs/projects/{projectId}/maps/{mapId}/paths/{pathId}";
141
+ export declare const API_GRAPHS_MAP_PATH_APPEND_URL = "https://{url}/graphs/projects/{projectId}/maps/{mapId}/paths/{pathId}/append";
142
+ export declare const API_GRAPHS_MAP_PATH_APPEND_TRANSFORMABLE_URL = "https://{url}/graphs/projects/{projectId}/maps/{mapId}/paths/{pathId}/append/transformable";
137
143
  export declare const API_GRAPHS_MAPS_COPY_URL = "https://{url}/graphs/projects/{projectId}/maps/{mapId}/copy";
138
144
  export declare const API_GRAPHS_MAPS_DEPLOY_URL = "https://{url}/graphs/projects/{projectId}/maps/{mapId}/deploy";
139
145
  export declare const API_GRAPHS_MAPS_GEOJSON_URL = "https://{url}/graphs/projects/{projectId}/maps/{mapId}/geojson";
@@ -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.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_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_PANORAMAS_URL = exports.API_GRAPHS_MAPS_GEOJSON_URL = exports.API_GRAPHS_MAPS_DEPLOY_URL = exports.API_GRAPHS_MAPS_COPY_URL = exports.API_GRAPHS_MAP_EDGE_URL = exports.API_GRAPHS_MAP_EDGES_ADD_TRANSFORM_URL = exports.API_GRAPHS_MAP_EDGES_ADD_URL = exports.API_GRAPHS_MAP_NODE_URL = exports.API_GRAPHS_MAP_NODES_ADD_TRANSFORMABLE_URL = exports.API_GRAPHS_MAP_NODES_ADD_URL = exports.API_GRAPHS_MAP_METADATA_URL = exports.API_GRAPHS_MAP_CONTENT_URL = exports.API_GRAPHS_MAP_ID_URL = exports.API_GRAPHS_MAPS_MERGE_URL = exports.API_GRAPHS_MAPS_DEPLOYED_URL = exports.API_GRAPHS_MAPS_NEW_URL = exports.API_GRAPHS_MAPS_URL = exports.API_DD_INTEGRATION_LEVELS_URL = exports.API_DD_INTEGRATION_LOCATIONS_URL = exports.API_DD_INTEGRATION_ISSUES_URL = exports.API_DD_INTEGRATION_OVERLAYS_URL = exports.API_DD_INTEGRATION_PLAN_BY_ID_URL = exports.API_DD_INTEGRATION_PLANS_URL = exports.API_SPOTTY_URL = exports.API_PROJECT_SCHEDULES_URL = exports.API_SOURCE_ID_URL = exports.API_SOURCE_URL = exports.API_SOURCE_SCHEMA_URL = exports.API_TEMPLATE_EXPORTER_URL = exports.API_TEMPLATE_PROVISION_ID_URL = exports.API_TEMPLATE_PROVISION_URL = exports.API_TEMPLATE_DEPLOY_URL = exports.API_PROJECT_PROFILE_DASHBOARD_CUSTOM_WIDGET_URL = exports.API_PROJECT_PROFILE_DASHBOARD_ID_URL = exports.API_PROJECT_PROFILE_DASHBOARD_URL = exports.API_PROJECT_CALLSIGN_STREAM_URL = exports.API_PROJECT_ROBOT_DASHBOARD_CUSTOM_WIDGET_URL = exports.API_PROJECT_ROBOT_DASHBOARD_ID_URL = exports.API_PROJECT_ROBOT_DASHBOARD_URL = exports.API_PROJECT_STREAM_CALLSIGN_URL = void 0;
6
- exports.API_PROJECT_ROBOT_TAG_URL = exports.API_PROJECT_PROFILE_TAG_URL = exports.API_PROJECT_PROFILE_TAGS_URL = exports.API_PROJECT_TAG_ROBOTS_URL = exports.API_PROJECT_ROBOT_TAGS_URL = exports.API_DEVICE_CREDENTIALS_AUTH_URL = exports.API_DEVICE_CREDENTIALS_URL = exports.API_LINKED_PROJECT_URL = 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 = void 0;
4
+ 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_SERVICE_CONNECTION_URL = exports.API_SERVICE_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_GRAPHS_OBSERVATION_KEYS_URL = exports.API_GRAPHS_OBSERVATIONS_URL = exports.API_GRAPHS_PANORAMA_OBSERVATIONS_URL = exports.API_GRAPHS_PANORAMA = exports.API_GRAPHS_PANORAMAS_URL = exports.API_GRAPHS_MAPS_GEOJSON_URL = exports.API_GRAPHS_MAPS_DEPLOY_URL = exports.API_GRAPHS_MAPS_COPY_URL = exports.API_GRAPHS_MAP_PATH_APPEND_TRANSFORMABLE_URL = exports.API_GRAPHS_MAP_PATH_APPEND_URL = exports.API_GRAPHS_MAP_PATH_URL = exports.API_GRAPHS_MAP_PATHS_URL = exports.API_GRAPHS_MAP_EDGE_URL = exports.API_GRAPHS_MAP_EDGES_ADD_TRANSFORM_URL = exports.API_GRAPHS_MAP_EDGES_ADD_URL = exports.API_GRAPHS_MAP_NODE_URL = exports.API_GRAPHS_MAP_NODES_ADD_TRANSFORMABLE_URL = exports.API_GRAPHS_MAP_NODES_ADD_URL = exports.API_GRAPHS_MAP_METADATA_URL = exports.API_GRAPHS_MAP_CONTENT_URL = exports.API_GRAPHS_MAP_ID_URL = exports.API_GRAPHS_MAPS_MERGE_URL = exports.API_GRAPHS_MAPS_DEPLOYED_URL = exports.API_GRAPHS_MAPS_NEW_URL = exports.API_GRAPHS_MAPS_URL = exports.API_DD_INTEGRATION_LEVELS_URL = exports.API_DD_INTEGRATION_LOCATIONS_URL = exports.API_DD_INTEGRATION_ISSUES_URL = exports.API_DD_INTEGRATION_OVERLAYS_URL = exports.API_DD_INTEGRATION_PLAN_BY_ID_URL = exports.API_DD_INTEGRATION_PLANS_URL = exports.API_SPOTTY_URL = exports.API_PROJECT_SCHEDULES_URL = exports.API_SOURCE_ID_URL = exports.API_SOURCE_URL = exports.API_SOURCE_SCHEMA_URL = exports.API_TEMPLATE_EXPORTER_URL = exports.API_TEMPLATE_PROVISION_ID_URL = exports.API_TEMPLATE_PROVISION_URL = exports.API_TEMPLATE_DEPLOY_URL = exports.API_PROJECT_PROFILE_DASHBOARD_CUSTOM_WIDGET_URL = exports.API_PROJECT_PROFILE_DASHBOARD_ID_URL = exports.API_PROJECT_PROFILE_DASHBOARD_URL = exports.API_PROJECT_CALLSIGN_STREAM_URL = exports.API_PROJECT_ROBOT_DASHBOARD_CUSTOM_WIDGET_URL = exports.API_PROJECT_ROBOT_DASHBOARD_ID_URL = exports.API_PROJECT_ROBOT_DASHBOARD_URL = exports.API_PROJECT_STREAM_CALLSIGN_URL = exports.API_PROJECT_STREAM_DATA_URL = exports.API_PROJECT_STREAM_ID_URL = void 0;
6
+ exports.API_PROJECT_ROBOT_TAG_URL = exports.API_PROJECT_PROFILE_TAG_URL = exports.API_PROJECT_PROFILE_TAGS_URL = exports.API_PROJECT_TAG_ROBOTS_URL = exports.API_PROJECT_ROBOT_TAGS_URL = exports.API_DEVICE_CREDENTIALS_AUTH_URL = exports.API_DEVICE_CREDENTIALS_URL = exports.API_LINKED_PROJECT_URL = 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 = 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';
@@ -62,8 +62,12 @@ exports.API_PROJECT_ROBOT_COMMAND2_URL = 'https://{url}/projects/{projectId}/rob
62
62
  exports.API_PROJECT_ROBOT_BUTTON_URL = 'https://{url}/projects/{projectId}/robots/{callsign}/buttons';
63
63
  exports.API_PROJECT_ROBOT_TRIGGER_URL = 'https://{url}/projects/{projectId}/robots/{callsign}/triggers';
64
64
  exports.API_PROJECT_ROBOT_GAMEPAD_URL = 'https://{url}/projects/{projectId}/robots/{callsign}/gamepads';
65
- exports.API_PROJECT_ROBOT_CONFIGS_CONNECTIONS_URL = 'https://{url}/robot-configs/connections/projects/{projectId}';
66
- exports.API_PROJECT_ROBOT_CONFIGS_CONNECTION_URL = 'https://{url}/robot-configs/connections/projects/{projectId}/callsigns/{callsign}';
65
+ // Generic connections endpoint templates. `{service}` is the service's public path prefix
66
+ // (e.g. robot-configs, robot-services); the per-service specialisations below derive from these.
67
+ exports.API_SERVICE_CONNECTIONS_URL = 'https://{url}/{service}/connections/projects/{projectId}';
68
+ exports.API_SERVICE_CONNECTION_URL = 'https://{url}/{service}/connections/projects/{projectId}/callsigns/{callsign}';
69
+ exports.API_PROJECT_ROBOT_CONFIGS_CONNECTIONS_URL = exports.API_SERVICE_CONNECTIONS_URL.replace('{service}', 'robot-configs');
70
+ exports.API_PROJECT_ROBOT_CONFIGS_CONNECTION_URL = exports.API_SERVICE_CONNECTION_URL.replace('{service}', 'robot-configs');
67
71
  exports.API_PROJECT_OPERATION_URL = 'https://{url}/projects/{projectId}/operations';
68
72
  exports.API_PROJECT_OPERATION_ID_URL = 'https://{url}/projects/{projectId}/operations/{operationId}';
69
73
  exports.API_PROJECT_DASHBOARD_URL = 'https://{url}/projects/{projectId}/dashboards';
@@ -140,6 +144,10 @@ exports.API_GRAPHS_MAP_NODE_URL = 'https://{url}/graphs/projects/{projectId}/map
140
144
  exports.API_GRAPHS_MAP_EDGES_ADD_URL = 'https://{url}/graphs/projects/{projectId}/maps/{mapId}/edges/add';
141
145
  exports.API_GRAPHS_MAP_EDGES_ADD_TRANSFORM_URL = 'https://{url}/graphs/projects/{projectId}/maps/{mapId}/edges/add/transform';
142
146
  exports.API_GRAPHS_MAP_EDGE_URL = 'https://{url}/graphs/projects/{projectId}/maps/{mapId}/edges/{edgeId}';
147
+ exports.API_GRAPHS_MAP_PATHS_URL = 'https://{url}/graphs/projects/{projectId}/maps/{mapId}/paths';
148
+ exports.API_GRAPHS_MAP_PATH_URL = 'https://{url}/graphs/projects/{projectId}/maps/{mapId}/paths/{pathId}';
149
+ exports.API_GRAPHS_MAP_PATH_APPEND_URL = 'https://{url}/graphs/projects/{projectId}/maps/{mapId}/paths/{pathId}/append';
150
+ exports.API_GRAPHS_MAP_PATH_APPEND_TRANSFORMABLE_URL = 'https://{url}/graphs/projects/{projectId}/maps/{mapId}/paths/{pathId}/append/transformable';
143
151
  exports.API_GRAPHS_MAPS_COPY_URL = 'https://{url}/graphs/projects/{projectId}/maps/{mapId}/copy';
144
152
  exports.API_GRAPHS_MAPS_DEPLOY_URL = 'https://{url}/graphs/projects/{projectId}/maps/{mapId}/deploy';
145
153
  exports.API_GRAPHS_MAPS_GEOJSON_URL = 'https://{url}/graphs/projects/{projectId}/maps/{mapId}/geojson';
@@ -51,6 +51,7 @@ export * from './maps/Map';
51
51
  export * from './maps/MapContent';
52
52
  export * from './maps/MapEdge';
53
53
  export * from './maps/MapNode';
54
+ export * from './maps/MapPath';
54
55
  export * from './maps/Panorama';
55
56
  export * from './message';
56
57
  export * from './params/ICallerParams';
@@ -67,6 +67,7 @@ __exportStar(require("./maps/Map"), exports);
67
67
  __exportStar(require("./maps/MapContent"), exports);
68
68
  __exportStar(require("./maps/MapEdge"), exports);
69
69
  __exportStar(require("./maps/MapNode"), exports);
70
+ __exportStar(require("./maps/MapPath"), exports);
70
71
  __exportStar(require("./maps/Panorama"), exports);
71
72
  __exportStar(require("./message"), exports);
72
73
  __exportStar(require("./params/ICallerParams"), exports);
@@ -0,0 +1,143 @@
1
+ import { Quaternion, Vector3 } from '../graph';
2
+ import { MapContentNode } from './MapContent';
3
+ /**
4
+ * A path (polyline or polygon) in a robot map, as returned by
5
+ * `GET /graphs/projects/{projectId}/maps/{mapId}/paths/{pathId}` — the same shape the
6
+ * rocos-agent map component's `paths/get` service reports.
7
+ *
8
+ * A path is stored as a sub-graph following the `go-common/graph/paths` convention: a parent
9
+ * node (type `path.parent.v1`, or any existing node acting as anchor) plus one member node
10
+ * per vertex, wired by `path.start.v1` / `path.belongs.v1` / `path.edge.v1` edges. The path
11
+ * id IS the parent node id.
12
+ */
13
+ export interface MapPath {
14
+ /** The path id (= parent node id). */
15
+ id: string;
16
+ /** Whether the path is a closed polygon (true) or an open polyline (false). */
17
+ closed: boolean;
18
+ /** The full parent node. */
19
+ parent: MapContentNode;
20
+ /** Ordered member (vertex) node ids, walked start → end. */
21
+ members: string[];
22
+ }
23
+ /** Filters for `MapService.listPaths`. */
24
+ export interface ListPathsFilter {
25
+ /** Only include paths with this closed flag (omit for both). */
26
+ closed?: boolean;
27
+ /**
28
+ * Only include paths whose parent node type is in this list (omit for all).
29
+ *
30
+ * Wire-format caveat: the server takes this as a single comma-separated query parameter
31
+ * (`?types=a,b`), so a node type that itself contains a comma cannot be expressed — it
32
+ * would be split into two wrong filter terms and silently match nothing. Node types are
33
+ * free-form text server-side, so this is conceivable if unlikely; avoid commas in type
34
+ * names, or filter client-side over `listPaths` + `getPath` results if you must.
35
+ */
36
+ types?: string[];
37
+ }
38
+ /**
39
+ * Body of `POST /graphs/projects/{projectId}/maps/{mapId}/paths/{pathId}/append`. Appends
40
+ * already-existing member nodes to a path, creating the path (and its `path.parent.v1`
41
+ * parent node) when absent — an existing node of any client-writable type is reused as the
42
+ * anchor instead.
43
+ *
44
+ * Members must already exist in the map (400 otherwise). `closed` is only applied while the
45
+ * path is empty; supplying a value that conflicts with a non-empty path's stored flag is
46
+ * rejected with 409 (use {@link MapService.replacePath} to change closed-ness). `data` keys
47
+ * are merged onto the parent node.
48
+ */
49
+ export interface AppendToPathRequest {
50
+ closed?: boolean;
51
+ data?: Record<string, unknown>;
52
+ members: string[];
53
+ }
54
+ /**
55
+ * A rigid-body transform positioning one path vertex relative to the frame named in the
56
+ * enclosing request. `rot` is optional and defaults to identity — path vertices are
57
+ * typically plain positions. Field naming matches {@link AffineTransform} (`pos`/`rot`);
58
+ * the service marshals onto the server's `translation`/`rotation` wire shape.
59
+ */
60
+ export interface PathPointTransform {
61
+ rot?: Quaternion;
62
+ pos: Vector3;
63
+ }
64
+ /**
65
+ * One vertex in a path payload. `id` is optional; when blank the server mints a UUID.
66
+ *
67
+ * `transform` is required by the append endpoint (which only creates vertices). In a path
68
+ * replace its presence carries the intent: supplied means the position is declarative (the
69
+ * vertex is created or — when the path exclusively owns the node — recreated at that
70
+ * position, which is how vertices are moved), while omitted means "reuse the existing node
71
+ * in place, position untouched".
72
+ */
73
+ export interface PathPoint {
74
+ id?: string;
75
+ data?: Record<string, unknown>;
76
+ transform?: PathPointTransform;
77
+ }
78
+ /**
79
+ * A {@link PathPoint} whose transform is mandatory, for the append/transformable body —
80
+ * that endpoint only creates vertices, so every point needs a position. Requiring it at the
81
+ * type level moves the server's 400 for a transform-less point to compile time.
82
+ */
83
+ export interface TransformablePathPoint extends PathPoint {
84
+ transform: PathPointTransform;
85
+ }
86
+ /**
87
+ * Body of `POST /graphs/projects/{projectId}/maps/{mapId}/paths/{pathId}/append/transformable`.
88
+ * For each point it creates a node (`nodeType`, default `FRAME`) positioned by a `TRANSFORM`
89
+ * edge from the existing `frame` node, and appends them all to the path in one transaction —
90
+ * the cloud analog of the rocos-agent's `paths/append/currentPosition`, with the caller
91
+ * supplying positions instead of the robot's live pose.
92
+ *
93
+ * Every point must carry a `transform` (enforced by {@link TransformablePathPoint}; the
94
+ * server also rejects a transform-less point with 400 — append only creates vertices; use
95
+ * {@link MapService.appendToPath} to append existing nodes). Node creation is create-only: a
96
+ * point id that already exists in the map is rejected with 409 and the whole append rolls
97
+ * back. `closed` and `data` behave as in {@link AppendToPathRequest}.
98
+ */
99
+ export interface AppendTransformablePointsRequest {
100
+ closed?: boolean;
101
+ data?: Record<string, unknown>;
102
+ frame: string;
103
+ nodeType?: string;
104
+ points: TransformablePathPoint[];
105
+ }
106
+ /** Response of the append/transformable endpoint: the created vertex ids, in path order. */
107
+ export interface AppendPathPointsResponse {
108
+ ids: string[];
109
+ }
110
+ /**
111
+ * Body of `PUT /graphs/projects/{projectId}/maps/{mapId}/paths/{pathId}` — the editor
112
+ * primitive. Declares the path's entire desired state; vertex move/insert/delete/reorder
113
+ * and closed-flag changes all reach the server as one idempotent call.
114
+ *
115
+ * The existing structure is torn down (old vertices exclusively owned by the path are
116
+ * deleted; shared members are detached, never moved or deleted; the parent node always
117
+ * survives) and rebuilt from `points`. Each point's `transform` carries its intent:
118
+ *
119
+ * - **With a transform** the position is declarative: the vertex is created (as `nodeType`,
120
+ * default `FRAME`, positioned by a `TRANSFORM` edge from `frame`), and for the path's own
121
+ * vertices same id + new transform = a move. A transform on a node the path doesn't
122
+ * exclusively own is rejected with 409.
123
+ * - **Without a transform** the point reuses an existing node in place, position untouched
124
+ * (400 if it doesn't exist) — how shared waypoints stay in the path.
125
+ *
126
+ * `parentType` applies when the parent node is created (default `path.parent.v1`); against
127
+ * an existing parent it must match (409) or be omitted (reused as-is, the anchored-path
128
+ * model). Replacing can also repair a structurally malformed path (which `getPath` reports
129
+ * as 422). Repeated identical PUTs are hash-stable: the server skips the map-timestamp bump
130
+ * and SUMMARY rewrite when the result matches what is stored.
131
+ *
132
+ * Access rules match {@link MapService.deletePath} (replace deletes vertices): the
133
+ * environment map is off-limits, the dronedeploy map is admin-only, normal maps are open to
134
+ * any caller with project access.
135
+ */
136
+ export interface ReplacePathRequest {
137
+ closed: boolean;
138
+ parentType?: string;
139
+ nodeType?: string;
140
+ data?: Record<string, unknown>;
141
+ frame?: string;
142
+ points: PathPoint[];
143
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -45,7 +45,7 @@ export declare enum ServiceConnection {
45
45
  * expected services.
46
46
  */
47
47
  export declare enum RobotConnectivity {
48
- /** Every expected service reports connected. */
48
+ /** At least one expected service is connected and none is disconnected. */
49
49
  ONLINE = "online",
50
50
  /** Some, but not all, expected services report connected. */
51
51
  DEGRADED = "degraded",
@@ -52,7 +52,7 @@ var ServiceConnection;
52
52
  */
53
53
  var RobotConnectivity;
54
54
  (function (RobotConnectivity) {
55
- /** Every expected service reports connected. */
55
+ /** At least one expected service is connected and none is disconnected. */
56
56
  RobotConnectivity["ONLINE"] = "online";
57
57
  /** Some, but not all, expected services report connected. */
58
58
  RobotConnectivity["DEGRADED"] = "degraded";
@@ -1,6 +1,7 @@
1
1
  import { AddEdgeRequest, AddEdgeResponse, AddTransformEdgeRequest } from '../models/maps/MapEdge';
2
2
  import { AddNodeRequest, AddNodeResponse, AddTransformableNodeRequest } from '../models/maps/MapNode';
3
3
  import { AddPanoramaRequest, AddPanoramaResponse, CreateObservation, Observation } from '../models/maps/Panorama';
4
+ import { AppendPathPointsResponse, AppendToPathRequest, AppendTransformablePointsRequest, ListPathsFilter, MapPath, ReplacePathRequest } from '../models/maps/MapPath';
4
5
  import { Asset, IBaseService, IRocosSDKConfig, Map, MapContent, RocosError } from '../models';
5
6
  import { BaseServiceAbstract } from './BaseServiceAbstract';
6
7
  /**
@@ -334,4 +335,104 @@ export declare class MapService extends BaseServiceAbstract implements IBaseServ
334
335
  * @param edgeId The ID of the edge to delete.
335
336
  */
336
337
  deleteEdge(projectId: string, mapId: string, edgeId: string): Promise<void>;
338
+ /**
339
+ * List the paths (polylines/polygons) in a map. A path is a sub-graph following the
340
+ * `go-common/graph/paths` convention shared with the rocos-agent's map component; this
341
+ * mirrors the agent's `paths/list` service, returning the parent node ids of every path
342
+ * that survives the filters.
343
+ *
344
+ * @param projectId The ID of the project the map belongs to.
345
+ * @param mapId The ID of the map to list paths from.
346
+ * @param filter Optional closed-flag and parent-node-type filters. The type filter goes
347
+ * over the wire as one comma-separated query parameter, so types containing a comma
348
+ * cannot be expressed (see {@link ListPathsFilter.types}).
349
+ * @returns The path ids (= parent node ids), sorted.
350
+ */
351
+ listPaths(projectId: string, mapId: string, filter?: ListPathsFilter): Promise<string[]>;
352
+ /**
353
+ * Get one path: its closed flag, full parent node, and ordered member node ids — the same
354
+ * shape as the agent's `paths/get` response. An existing node with no path structure is
355
+ * reported as an empty open path; a missing node is 404; stored structure violating the
356
+ * path convention (e.g. multiple start edges) is 422 (repair it with {@link replacePath}).
357
+ *
358
+ * @param projectId The ID of the project the map belongs to.
359
+ * @param mapId The ID of the map the path lives in.
360
+ * @param pathId The path id (= parent node id).
361
+ */
362
+ getPath(projectId: string, mapId: string, pathId: string): Promise<MapPath>;
363
+ /**
364
+ * Append already-existing member nodes to a path, creating the path when absent —
365
+ * mirroring the agent's `paths/append`. Members must already exist (400 otherwise);
366
+ * `path.index` numbering continues from the existing member count. A `closed` value
367
+ * conflicting with a non-empty path's stored flag is rejected with 409 (unlike the agent,
368
+ * which silently ignores it) — change closed-ness with {@link replacePath}.
369
+ *
370
+ * @param projectId The ID of the project the map belongs to.
371
+ * @param mapId The ID of the map the path lives in.
372
+ * @param pathId The path id (= parent node id).
373
+ * @param body The members to append, plus optional closed flag and parent data.
374
+ */
375
+ appendToPath(projectId: string, mapId: string, pathId: string, body: AppendToPathRequest): Promise<void>;
376
+ /**
377
+ * Create one positioned vertex node per point and append them all to a path in one
378
+ * transaction — the cloud analog of the agent's `paths/append/currentPosition`, with the
379
+ * caller supplying positions instead of the robot's live pose. Every point must carry a
380
+ * transform (append only creates; use {@link appendToPath} for existing nodes); a point id
381
+ * that already exists is a 409 and the whole append rolls back.
382
+ *
383
+ * Wire-shape note: the server receives each point's transform as
384
+ * `{ rotation, translation }`. This method marshals the caller-facing `rot`/`pos`
385
+ * (matching the node/panorama transform naming) onto that shape before POSTing.
386
+ *
387
+ * @param projectId The ID of the project the map belongs to.
388
+ * @param mapId The ID of the map the path lives in.
389
+ * @param pathId The path id (= parent node id).
390
+ * @param body The frame, points, and optional node type / closed flag / parent data.
391
+ * @returns The created vertex node ids, in path order (server-minted UUIDs for blank ids).
392
+ */
393
+ appendTransformablePointsToPath(projectId: string, mapId: string, pathId: string, body: AppendTransformablePointsRequest): Promise<AppendPathPointsResponse>;
394
+ /**
395
+ * Replace a path's entire structure in one idempotent call — the editor primitive for
396
+ * vertex move/insert/delete/reorder and closed-flag changes. See {@link ReplacePathRequest}
397
+ * for the full semantics; the essentials:
398
+ *
399
+ * - A point WITH a transform declares its position; for the path's own vertices, same id +
400
+ * new transform = a move. A transform on a node the path doesn't exclusively own is 409.
401
+ * - A point WITHOUT a transform reuses an existing node in place (400 if missing).
402
+ * - Old vertices exclusively owned by the path and not re-referenced are deleted; shared
403
+ * members are detached, never moved or deleted.
404
+ * - `parentType` must match an existing parent (409) or be omitted; it applies on create.
405
+ *
406
+ * @param projectId The ID of the project the map belongs to.
407
+ * @param mapId The ID of the map the path lives in.
408
+ * @param pathId The path id (= parent node id).
409
+ * @param body The path's desired state.
410
+ */
411
+ replacePath(projectId: string, mapId: string, pathId: string, body: ReplacePathRequest): Promise<void>;
412
+ /**
413
+ * Delete a path's structure, mirroring the agent's `paths/delete`: idempotent (a missing
414
+ * path still returns success), member nodes preserved by default, and the parent node
415
+ * itself deleted only when it is a pure `path.parent.v1` (an anchored path keeps its
416
+ * anchor node, minus the path edges).
417
+ *
418
+ * With `deleteMembers`, member nodes exclusively owned by the path (no remaining edges
419
+ * beyond their positioning `TRANSFORM`) are also removed; anything referenced elsewhere
420
+ * survives. Access rules match {@link deleteNode}: environment off-limits, dronedeploy
421
+ * admin-only, normal maps open to any caller with project access.
422
+ *
423
+ * @param projectId The ID of the project the map belongs to.
424
+ * @param mapId The ID of the map the path lives in.
425
+ * @param pathId The path id (= parent node id).
426
+ * @param opts Set `deleteMembers` to also remove exclusively-owned vertex nodes.
427
+ */
428
+ deletePath(projectId: string, mapId: string, pathId: string, opts?: {
429
+ deleteMembers?: boolean;
430
+ }): Promise<void>;
431
+ /**
432
+ * Marshal a caller-facing {@link PathPoint} onto the server's wire shape: `rot`/`pos`
433
+ * become `rotation`/`translation`, and an absent transform stays absent (its presence
434
+ * carries intent in a replace). A missing `rot` is left for the server to default to
435
+ * identity.
436
+ */
437
+ private pathPointToWire;
337
438
  }
@@ -454,5 +454,145 @@ class MapService extends BaseServiceAbstract_1.BaseServiceAbstract {
454
454
  deleteEdge(projectId, mapId, edgeId) {
455
455
  return this.callDelete((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_GRAPHS_MAP_EDGE_URL, { url: this.config.url, projectId, mapId, edgeId }, this.config.insecure), 'Failed to delete edge.');
456
456
  }
457
+ /**
458
+ * List the paths (polylines/polygons) in a map. A path is a sub-graph following the
459
+ * `go-common/graph/paths` convention shared with the rocos-agent's map component; this
460
+ * mirrors the agent's `paths/list` service, returning the parent node ids of every path
461
+ * that survives the filters.
462
+ *
463
+ * @param projectId The ID of the project the map belongs to.
464
+ * @param mapId The ID of the map to list paths from.
465
+ * @param filter Optional closed-flag and parent-node-type filters. The type filter goes
466
+ * over the wire as one comma-separated query parameter, so types containing a comma
467
+ * cannot be expressed (see {@link ListPathsFilter.types}).
468
+ * @returns The path ids (= parent node ids), sorted.
469
+ */
470
+ async listPaths(projectId, mapId, filter) {
471
+ const queryParams = {};
472
+ if (filter?.closed !== undefined)
473
+ queryParams.closed = filter.closed.toString();
474
+ if (filter?.types?.length)
475
+ queryParams.types = filter.types.join(',');
476
+ const resp = await this.callGet((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_GRAPHS_MAP_PATHS_URL, { url: this.config.url, projectId, mapId }, this.config.insecure), 'Failed to list paths.', queryParams);
477
+ return resp.paths;
478
+ }
479
+ /**
480
+ * Get one path: its closed flag, full parent node, and ordered member node ids — the same
481
+ * shape as the agent's `paths/get` response. An existing node with no path structure is
482
+ * reported as an empty open path; a missing node is 404; stored structure violating the
483
+ * path convention (e.g. multiple start edges) is 422 (repair it with {@link replacePath}).
484
+ *
485
+ * @param projectId The ID of the project the map belongs to.
486
+ * @param mapId The ID of the map the path lives in.
487
+ * @param pathId The path id (= parent node id).
488
+ */
489
+ getPath(projectId, mapId, pathId) {
490
+ return this.callGet((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_GRAPHS_MAP_PATH_URL, { url: this.config.url, projectId, mapId, pathId }, this.config.insecure), 'Failed to get path.');
491
+ }
492
+ /**
493
+ * Append already-existing member nodes to a path, creating the path when absent —
494
+ * mirroring the agent's `paths/append`. Members must already exist (400 otherwise);
495
+ * `path.index` numbering continues from the existing member count. A `closed` value
496
+ * conflicting with a non-empty path's stored flag is rejected with 409 (unlike the agent,
497
+ * which silently ignores it) — change closed-ness with {@link replacePath}.
498
+ *
499
+ * @param projectId The ID of the project the map belongs to.
500
+ * @param mapId The ID of the map the path lives in.
501
+ * @param pathId The path id (= parent node id).
502
+ * @param body The members to append, plus optional closed flag and parent data.
503
+ */
504
+ async appendToPath(projectId, mapId, pathId, body) {
505
+ await this.callPost((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_GRAPHS_MAP_PATH_APPEND_URL, { url: this.config.url, projectId, mapId, pathId }, this.config.insecure), body, 'Failed to append to path.');
506
+ }
507
+ /**
508
+ * Create one positioned vertex node per point and append them all to a path in one
509
+ * transaction — the cloud analog of the agent's `paths/append/currentPosition`, with the
510
+ * caller supplying positions instead of the robot's live pose. Every point must carry a
511
+ * transform (append only creates; use {@link appendToPath} for existing nodes); a point id
512
+ * that already exists is a 409 and the whole append rolls back.
513
+ *
514
+ * Wire-shape note: the server receives each point's transform as
515
+ * `{ rotation, translation }`. This method marshals the caller-facing `rot`/`pos`
516
+ * (matching the node/panorama transform naming) onto that shape before POSTing.
517
+ *
518
+ * @param projectId The ID of the project the map belongs to.
519
+ * @param mapId The ID of the map the path lives in.
520
+ * @param pathId The path id (= parent node id).
521
+ * @param body The frame, points, and optional node type / closed flag / parent data.
522
+ * @returns The created vertex node ids, in path order (server-minted UUIDs for blank ids).
523
+ */
524
+ appendTransformablePointsToPath(projectId, mapId, pathId, body) {
525
+ const wireBody = {
526
+ closed: body.closed,
527
+ data: body.data,
528
+ frame: body.frame,
529
+ nodeType: body.nodeType,
530
+ points: body.points.map((p) => this.pathPointToWire(p)),
531
+ };
532
+ return this.callPost((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_GRAPHS_MAP_PATH_APPEND_TRANSFORMABLE_URL, { url: this.config.url, projectId, mapId, pathId }, this.config.insecure), wireBody, 'Failed to append points to path.');
533
+ }
534
+ /**
535
+ * Replace a path's entire structure in one idempotent call — the editor primitive for
536
+ * vertex move/insert/delete/reorder and closed-flag changes. See {@link ReplacePathRequest}
537
+ * for the full semantics; the essentials:
538
+ *
539
+ * - A point WITH a transform declares its position; for the path's own vertices, same id +
540
+ * new transform = a move. A transform on a node the path doesn't exclusively own is 409.
541
+ * - A point WITHOUT a transform reuses an existing node in place (400 if missing).
542
+ * - Old vertices exclusively owned by the path and not re-referenced are deleted; shared
543
+ * members are detached, never moved or deleted.
544
+ * - `parentType` must match an existing parent (409) or be omitted; it applies on create.
545
+ *
546
+ * @param projectId The ID of the project the map belongs to.
547
+ * @param mapId The ID of the map the path lives in.
548
+ * @param pathId The path id (= parent node id).
549
+ * @param body The path's desired state.
550
+ */
551
+ async replacePath(projectId, mapId, pathId, body) {
552
+ const wireBody = {
553
+ closed: body.closed,
554
+ parentType: body.parentType,
555
+ nodeType: body.nodeType,
556
+ data: body.data,
557
+ frame: body.frame,
558
+ points: body.points.map((p) => this.pathPointToWire(p)),
559
+ };
560
+ await this.callPut((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_GRAPHS_MAP_PATH_URL, { url: this.config.url, projectId, mapId, pathId }, this.config.insecure), wireBody, 'Failed to replace path.');
561
+ }
562
+ /**
563
+ * Delete a path's structure, mirroring the agent's `paths/delete`: idempotent (a missing
564
+ * path still returns success), member nodes preserved by default, and the parent node
565
+ * itself deleted only when it is a pure `path.parent.v1` (an anchored path keeps its
566
+ * anchor node, minus the path edges).
567
+ *
568
+ * With `deleteMembers`, member nodes exclusively owned by the path (no remaining edges
569
+ * beyond their positioning `TRANSFORM`) are also removed; anything referenced elsewhere
570
+ * survives. Access rules match {@link deleteNode}: environment off-limits, dronedeploy
571
+ * admin-only, normal maps open to any caller with project access.
572
+ *
573
+ * @param projectId The ID of the project the map belongs to.
574
+ * @param mapId The ID of the map the path lives in.
575
+ * @param pathId The path id (= parent node id).
576
+ * @param opts Set `deleteMembers` to also remove exclusively-owned vertex nodes.
577
+ */
578
+ deletePath(projectId, mapId, pathId, opts) {
579
+ let url = (0, formatServiceUrl_1.formatServiceUrl)(api_1.API_GRAPHS_MAP_PATH_URL, { url: this.config.url, projectId, mapId, pathId }, this.config.insecure);
580
+ if (opts?.deleteMembers)
581
+ url += '?deleteMembers=true';
582
+ return this.callDelete(url, 'Failed to delete path.');
583
+ }
584
+ /**
585
+ * Marshal a caller-facing {@link PathPoint} onto the server's wire shape: `rot`/`pos`
586
+ * become `rotation`/`translation`, and an absent transform stays absent (its presence
587
+ * carries intent in a replace). A missing `rot` is left for the server to default to
588
+ * identity.
589
+ */
590
+ pathPointToWire(p) {
591
+ return {
592
+ id: p.id,
593
+ data: p.data,
594
+ transform: p.transform ? { rotation: p.transform.rot, translation: p.transform.pos } : undefined,
595
+ };
596
+ }
457
597
  }
458
598
  exports.MapService = MapService;
@@ -0,0 +1,65 @@
1
+ import { IConnectedCallsign, RobotConnectivity, RobotConnectivityStatus, ServiceConnection } from '../../models';
2
+ import { Observable } from 'rxjs';
3
+ /**
4
+ * Service id → public path prefix, for services that expose the standard
5
+ * `connections` endpoint. New services adopting the convention are added here.
6
+ * The `telemetry` (Teletubby) endpoint joins this once built — see EAI-718/719.
7
+ */
8
+ export declare const CONNECTION_SERVICE_PREFIXES: Record<string, string>;
9
+ /**
10
+ * The telemetry-liveness signal is derived from heartbeat freshness rather than
11
+ * an HTTP endpoint, so it is handled specially (its observable is supplied by
12
+ * the caller). See `getTelemetryLiveness`.
13
+ */
14
+ export declare const TELEMETRY_LIVENESS_SERVICE = "telemetry-liveness";
15
+ /**
16
+ * The services evaluated by default. The `telemetry` connections endpoint joins
17
+ * this list once Teletubby exposes it (follow-up).
18
+ */
19
+ export declare const DEFAULT_EXPECTED_SERVICES: string[];
20
+ /** Authenticated GET used to poll a service's `connections` endpoint. */
21
+ export type ConnectionsHttpGet = (url: string) => Promise<IConnectedCallsign>;
22
+ /**
23
+ * Builds the `connections` endpoint URL for a service — per-callsign when a
24
+ * callsign is given, otherwise the bulk per-project variant.
25
+ */
26
+ export declare const buildConnectionsUrl: (serviceId: string, baseUrl: string, projectId: string, callsign?: string, insecure?: boolean) => string;
27
+ /** Maps a `connections` endpoint response onto a {@link ServiceConnection}. */
28
+ export declare const mapConnectionStatus: (connection?: IConnectedCallsign | null) => ServiceConnection;
29
+ /**
30
+ * Aggregates per-service connection states into an overall verdict:
31
+ * - `ONLINE` — at least one service connected and none disconnected.
32
+ * - `DEGRADED` — a genuine mix: some connected, some disconnected.
33
+ * - `OFFLINE` — nothing connected.
34
+ *
35
+ * `UNKNOWN` services (e.g. not yet polled) never force `DEGRADED`, so startup
36
+ * settles on `OFFLINE` (gray) rather than a spurious flashing-red degraded state.
37
+ *
38
+ * Note: this optimism also means a service held `UNKNOWN` indefinitely (e.g. an
39
+ * endpoint whose polls keep failing) does not by itself pull the aggregate below
40
+ * `ONLINE` — a deliberate v1 tradeoff to keep transient errors from flapping the
41
+ * indicator. Surfacing a long-lived failure distinctly (likely via health rather
42
+ * than connectivity) is left as a future refinement.
43
+ */
44
+ export declare const aggregateConnectivity: (services: Record<string, ServiceConnection>) => RobotConnectivity;
45
+ /**
46
+ * Polls a single service's `connections` endpoint on an interval, emitting its
47
+ * {@link ServiceConnection} (change-only). A failed/timed-out poll yields
48
+ * `UNKNOWN` (held transitional) rather than `DISCONNECTED`, to avoid a spurious
49
+ * degraded flash on a transient error.
50
+ */
51
+ export declare const getServiceConnectionChanges: (httpGet: ConnectionsHttpGet, url: string, pollMs?: number) => Observable<ServiceConnection>;
52
+ export interface ConnectivityDeps {
53
+ httpGet: ConnectionsHttpGet;
54
+ baseUrl: string;
55
+ insecure?: boolean;
56
+ /** The telemetry-liveness signal (from `getTelemetryLiveness`), folded in as one service. */
57
+ telemetryLiveness$: Observable<ServiceConnection>;
58
+ }
59
+ /**
60
+ * Emits the robot's {@link RobotConnectivityStatus} — the per-service breakdown
61
+ * plus the aggregate verdict — for the configured `expectedServices`. HTTP
62
+ * services are polled; `telemetry-liveness` uses the supplied observable; any
63
+ * unrecognised service id resolves to `UNKNOWN`.
64
+ */
65
+ export declare const getConnectivityChanges: (deps: ConnectivityDeps, projectId: string, callsign: string, expectedServices?: string[], pollMs?: number) => Observable<RobotConnectivityStatus>;