@dronedeploy/rocos-js-sdk 3.0.30 → 3.0.31-rc1

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.
Files changed (33) hide show
  1. package/cjs/api/streams/telemetry/TelemetryStream.js +1 -0
  2. package/cjs/api/streams/telemetry/TelemetryStreamConnect.d.ts +26 -0
  3. package/cjs/api/streams/telemetry/TelemetryStreamConnect.js +145 -0
  4. package/cjs/constants/api.d.ts +0 -3
  5. package/cjs/constants/api.js +2 -5
  6. package/cjs/grpc/connect/teletubby_pb.d.ts +635 -0
  7. package/cjs/grpc/connect/teletubby_pb.js +196 -0
  8. package/cjs/models/IRocosSDKConfig.d.ts +2 -0
  9. package/cjs/models/IStreamConfig.d.ts +3 -0
  10. package/cjs/models/index.d.ts +0 -1
  11. package/cjs/models/index.js +0 -1
  12. package/cjs/services/MapService.d.ts +6 -58
  13. package/cjs/services/MapService.js +4 -68
  14. package/cjs/services/TelemetryService.js +5 -0
  15. package/esm/api/streams/telemetry/TelemetryStream.js +1 -0
  16. package/esm/api/streams/telemetry/TelemetryStreamConnect.d.ts +26 -0
  17. package/esm/api/streams/telemetry/TelemetryStreamConnect.js +141 -0
  18. package/esm/constants/api.d.ts +0 -3
  19. package/esm/constants/api.js +0 -3
  20. package/esm/grpc/connect/teletubby_pb.d.ts +635 -0
  21. package/esm/grpc/connect/teletubby_pb.js +193 -0
  22. package/esm/models/IRocosSDKConfig.d.ts +2 -0
  23. package/esm/models/IStreamConfig.d.ts +3 -0
  24. package/esm/models/index.d.ts +0 -1
  25. package/esm/models/index.js +0 -1
  26. package/esm/services/MapService.d.ts +6 -58
  27. package/esm/services/MapService.js +5 -69
  28. package/esm/services/TelemetryService.js +5 -0
  29. package/package.json +4 -1
  30. package/cjs/models/maps/MapContent.d.ts +0 -26
  31. package/cjs/models/maps/MapContent.js +0 -2
  32. package/esm/models/maps/MapContent.d.ts +0 -26
  33. package/esm/models/maps/MapContent.js +0 -1
@@ -0,0 +1,193 @@
1
+ // @generated by protoc-gen-es v2.2.5 with parameter "target=ts"
2
+ // @generated from file teletubby.proto (package teletubby.v1, syntax proto3)
3
+ /* eslint-disable */
4
+ import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1";
5
+ /**
6
+ * Describes the file teletubby.proto.
7
+ */
8
+ export const file_teletubby = /*@__PURE__*/ fileDesc("Cg90ZWxldHViYnkucHJvdG8SDHRlbGV0dWJieS52MSLVAQoQVGVsZW1ldHJ5TWVzc2FnZRIOCgZzb3VyY2UYASABKAkSDwoHcGF5bG9hZBgCIAEoDBIQCghjYWxsc2lnbhgDIAEoCRIPCgdjcmVhdGVkGAQgASgDEgsKA3NlcRgFIAEoBBI2CgRtZXRhGAYgAygLMigudGVsZXR1YmJ5LnYxLlRlbGVtZXRyeU1lc3NhZ2UuTWV0YUVudHJ5EgsKA3VpZBgHIAEoCRorCglNZXRhRW50cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgJOgI4ASKCAQoVUmVjZWl2ZXJTdHJlYW1NZXNzYWdlEiwKCWhlYXJ0YmVhdBgBIAEoCzIXLnRlbGV0dWJieS52MS5IZWFydGJlYXRIABIwCgNhY2sYAiABKAsyIS50ZWxldHViYnkudjEuVGVsZW1ldHJ5TWVzc2FnZUFja0gAQgkKB2NvbnRlbnQilwEKFlRlbGVtZXRyeVN0cmVhbU1lc3NhZ2USLAoJaGVhcnRiZWF0GAEgASgLMhcudGVsZXR1YmJ5LnYxLkhlYXJ0YmVhdEgAEjEKB21lc3NhZ2UYAiABKAsyHi50ZWxldHViYnkudjEuVGVsZW1ldHJ5TWVzc2FnZUgAEhEKCWlzQWNrYWJsZRgDIAEoCEIJCgdjb250ZW50ImUKE1RlbGVtZXRyeU1lc3NhZ2VBY2sSCwoDdWlkGAEgASgJEjAKBnN0YXR1cxgCIAEoDjIgLnRlbGV0dWJieS52MS5UZWxlbWV0cnlBY2tTdGF0dXMSDwoHbm9SZXR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5Eh4udGVsZXR1YmJ5LnYxLlRlbGVtZXRyeVJlcXVlc3QaIS50ZWxldHViYnkudjEuVGVsZW1ldHJ5UmVxdWVzdEFjayIAEmEKFVJlcXVlc3RUZWxlbWV0cnlRdWVyeRIjLnRlbGV0dWJieS52MS5UZWxlbWV0cnlRdWVyeVJlcXVlc3QaIS50ZWxldHViYnkudjEuVGVsZW1ldHJ5UmVxdWVzdEFjayIAQgJIAWIGcHJvdG8z");
9
+ /**
10
+ * Describes the message teletubby.v1.TelemetryMessage.
11
+ * Use `create(TelemetryMessageSchema)` to create a new message.
12
+ */
13
+ export const TelemetryMessageSchema = /*@__PURE__*/ messageDesc(file_teletubby, 0);
14
+ /**
15
+ * Describes the message teletubby.v1.ReceiverStreamMessage.
16
+ * Use `create(ReceiverStreamMessageSchema)` to create a new message.
17
+ */
18
+ export const ReceiverStreamMessageSchema = /*@__PURE__*/ messageDesc(file_teletubby, 1);
19
+ /**
20
+ * Describes the message teletubby.v1.TelemetryStreamMessage.
21
+ * Use `create(TelemetryStreamMessageSchema)` to create a new message.
22
+ */
23
+ export const TelemetryStreamMessageSchema = /*@__PURE__*/ messageDesc(file_teletubby, 2);
24
+ /**
25
+ * Describes the message teletubby.v1.TelemetryMessageAck.
26
+ * Use `create(TelemetryMessageAckSchema)` to create a new message.
27
+ */
28
+ export const TelemetryMessageAckSchema = /*@__PURE__*/ messageDesc(file_teletubby, 3);
29
+ /**
30
+ * Describes the message teletubby.v1.TelemetryStreamAck.
31
+ * Use `create(TelemetryStreamAckSchema)` to create a new message.
32
+ */
33
+ export const TelemetryStreamAckSchema = /*@__PURE__*/ messageDesc(file_teletubby, 4);
34
+ /**
35
+ * Describes the message teletubby.v1.ConfigMessage.
36
+ * Use `create(ConfigMessageSchema)` to create a new message.
37
+ */
38
+ export const ConfigMessageSchema = /*@__PURE__*/ messageDesc(file_teletubby, 5);
39
+ /**
40
+ * Describes the message teletubby.v1.ConfigAction.
41
+ * Use `create(ConfigActionSchema)` to create a new message.
42
+ */
43
+ export const ConfigActionSchema = /*@__PURE__*/ messageDesc(file_teletubby, 6);
44
+ /**
45
+ * Describes the message teletubby.v1.TelemetryRequest.
46
+ * Use `create(TelemetryRequestSchema)` to create a new message.
47
+ */
48
+ export const TelemetryRequestSchema = /*@__PURE__*/ messageDesc(file_teletubby, 7);
49
+ /**
50
+ * Describes the message teletubby.v1.TelemetryQueryRequest.
51
+ * Use `create(TelemetryQueryRequestSchema)` to create a new message.
52
+ */
53
+ export const TelemetryQueryRequestSchema = /*@__PURE__*/ messageDesc(file_teletubby, 8);
54
+ /**
55
+ * Describes the message teletubby.v1.TelemetryAction.
56
+ * Use `create(TelemetryActionSchema)` to create a new message.
57
+ */
58
+ export const TelemetryActionSchema = /*@__PURE__*/ messageDesc(file_teletubby, 9);
59
+ /**
60
+ * Describes the message teletubby.v1.SubscribeOperation.
61
+ * Use `create(SubscribeOperationSchema)` to create a new message.
62
+ */
63
+ export const SubscribeOperationSchema = /*@__PURE__*/ messageDesc(file_teletubby, 10);
64
+ /**
65
+ * Describes the message teletubby.v1.UnsubscribeOperation.
66
+ * Use `create(UnsubscribeOperationSchema)` to create a new message.
67
+ */
68
+ export const UnsubscribeOperationSchema = /*@__PURE__*/ messageDesc(file_teletubby, 11);
69
+ /**
70
+ * Describes the message teletubby.v1.SubscribeOption.
71
+ * Use `create(SubscribeOptionSchema)` to create a new message.
72
+ */
73
+ export const SubscribeOptionSchema = /*@__PURE__*/ messageDesc(file_teletubby, 12);
74
+ /**
75
+ * Describes the message teletubby.v1.UnsubscribeOption.
76
+ * Use `create(UnsubscribeOptionSchema)` to create a new message.
77
+ */
78
+ export const UnsubscribeOptionSchema = /*@__PURE__*/ messageDesc(file_teletubby, 13);
79
+ /**
80
+ * Describes the message teletubby.v1.ReceiverGroupSubscribeOption.
81
+ * Use `create(ReceiverGroupSubscribeOptionSchema)` to create a new message.
82
+ */
83
+ export const ReceiverGroupSubscribeOptionSchema = /*@__PURE__*/ messageDesc(file_teletubby, 14);
84
+ /**
85
+ * Describes the message teletubby.v1.ReceiverGroupUnsubscribeOption.
86
+ * Use `create(ReceiverGroupUnsubscribeOptionSchema)` to create a new message.
87
+ */
88
+ export const ReceiverGroupUnsubscribeOptionSchema = /*@__PURE__*/ messageDesc(file_teletubby, 15);
89
+ /**
90
+ * Describes the message teletubby.v1.TelemetryRequestAck.
91
+ * Use `create(TelemetryRequestAckSchema)` to create a new message.
92
+ */
93
+ export const TelemetryRequestAckSchema = /*@__PURE__*/ messageDesc(file_teletubby, 16);
94
+ /**
95
+ * Describes the message teletubby.v1.RegistrationMessage.
96
+ * Use `create(RegistrationMessageSchema)` to create a new message.
97
+ */
98
+ export const RegistrationMessageSchema = /*@__PURE__*/ messageDesc(file_teletubby, 17);
99
+ /**
100
+ * Describes the message teletubby.v1.ServiceStatusRequest.
101
+ * Use `create(ServiceStatusRequestSchema)` to create a new message.
102
+ */
103
+ export const ServiceStatusRequestSchema = /*@__PURE__*/ messageDesc(file_teletubby, 18);
104
+ /**
105
+ * Describes the message teletubby.v1.Query.
106
+ * Use `create(QuerySchema)` to create a new message.
107
+ */
108
+ export const QuerySchema = /*@__PURE__*/ messageDesc(file_teletubby, 19);
109
+ /**
110
+ * Describes the message teletubby.v1.QueryOrPredicate.
111
+ * Use `create(QueryOrPredicateSchema)` to create a new message.
112
+ */
113
+ export const QueryOrPredicateSchema = /*@__PURE__*/ messageDesc(file_teletubby, 20);
114
+ /**
115
+ * Describes the message teletubby.v1.Predicate.
116
+ * Use `create(PredicateSchema)` to create a new message.
117
+ */
118
+ export const PredicateSchema = /*@__PURE__*/ messageDesc(file_teletubby, 21);
119
+ /**
120
+ * Describes the message teletubby.v1.Heartbeat.
121
+ * Use `create(HeartbeatSchema)` to create a new message.
122
+ */
123
+ export const HeartbeatSchema = /*@__PURE__*/ messageDesc(file_teletubby, 22);
124
+ /**
125
+ * @generated from enum teletubby.v1.TelemetryAckStatus
126
+ */
127
+ export var TelemetryAckStatus;
128
+ (function (TelemetryAckStatus) {
129
+ /**
130
+ * @generated from enum value: OK = 0;
131
+ */
132
+ TelemetryAckStatus[TelemetryAckStatus["OK"] = 0] = "OK";
133
+ /**
134
+ * @generated from enum value: REJECT = 1;
135
+ */
136
+ TelemetryAckStatus[TelemetryAckStatus["REJECT"] = 1] = "REJECT";
137
+ })(TelemetryAckStatus || (TelemetryAckStatus = {}));
138
+ /**
139
+ * Describes the enum teletubby.v1.TelemetryAckStatus.
140
+ */
141
+ export const TelemetryAckStatusSchema = /*@__PURE__*/ enumDesc(file_teletubby, 0);
142
+ /**
143
+ * @generated from enum teletubby.v1.LogicalOperation
144
+ */
145
+ export var LogicalOperation;
146
+ (function (LogicalOperation) {
147
+ /**
148
+ * @generated from enum value: OR = 0;
149
+ */
150
+ LogicalOperation[LogicalOperation["OR"] = 0] = "OR";
151
+ })(LogicalOperation || (LogicalOperation = {}));
152
+ /**
153
+ * Describes the enum teletubby.v1.LogicalOperation.
154
+ */
155
+ export const LogicalOperationSchema = /*@__PURE__*/ enumDesc(file_teletubby, 1);
156
+ /**
157
+ * @generated from enum teletubby.v1.ComparisonOperation
158
+ */
159
+ export var ComparisonOperation;
160
+ (function (ComparisonOperation) {
161
+ /**
162
+ * @generated from enum value: EQUAL = 0;
163
+ */
164
+ ComparisonOperation[ComparisonOperation["EQUAL"] = 0] = "EQUAL";
165
+ })(ComparisonOperation || (ComparisonOperation = {}));
166
+ /**
167
+ * Describes the enum teletubby.v1.ComparisonOperation.
168
+ */
169
+ export const ComparisonOperationSchema = /*@__PURE__*/ enumDesc(file_teletubby, 2);
170
+ /**
171
+ * @generated from enum teletubby.v1.PredicateAttribute
172
+ */
173
+ export var PredicateAttribute;
174
+ (function (PredicateAttribute) {
175
+ /**
176
+ * @generated from enum value: TAG = 0;
177
+ */
178
+ PredicateAttribute[PredicateAttribute["TAG"] = 0] = "TAG";
179
+ })(PredicateAttribute || (PredicateAttribute = {}));
180
+ /**
181
+ * Describes the enum teletubby.v1.PredicateAttribute.
182
+ */
183
+ export const PredicateAttributeSchema = /*@__PURE__*/ enumDesc(file_teletubby, 3);
184
+ /**
185
+ * @generated from service teletubby.v1.TelemetryReceiver
186
+ */
187
+ export const TelemetryReceiver = /*@__PURE__*/ serviceDesc(file_teletubby, 0);
188
+ /**
189
+ * Will be deprecated in the future
190
+ *
191
+ * @generated from service teletubby.v1.TelemetryGateway
192
+ */
193
+ export const TelemetryGateway = /*@__PURE__*/ serviceDesc(file_teletubby, 1);
@@ -1,5 +1,6 @@
1
1
  import { IStreamOptions } from './IStreamOptions';
2
2
  import { ServiceEnum } from './ServiceEnum';
3
+ import { TelemetryTransport } from './IStreamConfig';
3
4
  export type IRocosSDKConfig = AuthorisedConfig & {
4
5
  overrides?: Partial<Record<ServiceEnum, Partial<AuthorisedConfig>>>;
5
6
  };
@@ -10,6 +11,7 @@ interface ConfigBase {
10
11
  options?: IStreamOptions;
11
12
  port?: number;
12
13
  insecure?: boolean;
14
+ transport?: TelemetryTransport;
13
15
  hooks?: {
14
16
  http?: {
15
17
  onResponse?: (res: Response) => void;
@@ -1,4 +1,5 @@
1
1
  import { IStreamOptions } from './IStreamOptions';
2
+ export type TelemetryTransport = 'grpc-web' | 'connect';
2
3
  export interface IStreamConfig {
3
4
  url: string;
4
5
  token: string;
@@ -6,4 +7,6 @@ export interface IStreamConfig {
6
7
  options?: IStreamOptions;
7
8
  port?: number;
8
9
  insecure?: boolean;
10
+ transport?: TelemetryTransport;
11
+ grpcWebFormat?: 'text' | 'binary';
9
12
  }
@@ -48,7 +48,6 @@ export * from './IToken';
48
48
  export * from './IWidget';
49
49
  export * from './IWidgetLineGroup';
50
50
  export * from './maps/Map';
51
- export * from './maps/MapContent';
52
51
  export * from './maps/Panorama';
53
52
  export * from './message';
54
53
  export * from './params/ICallerParams';
@@ -48,7 +48,6 @@ export * from './IToken';
48
48
  export * from './IWidget';
49
49
  export * from './IWidgetLineGroup';
50
50
  export * from './maps/Map';
51
- export * from './maps/MapContent';
52
51
  export * from './maps/Panorama';
53
52
  export * from './message';
54
53
  export * from './params/ICallerParams';
@@ -1,4 +1,4 @@
1
- import { Asset, IBaseService, IRocosSDKConfig, Map, MapContent, RocosError } from '../models';
1
+ import { Asset, IBaseService, IRocosSDKConfig, Map, RocosError } from '../models';
2
2
  import { CreateObservation, Observation } from '../models/maps/Panorama';
3
3
  import { BaseServiceAbstract } from './BaseServiceAbstract';
4
4
  /**
@@ -50,14 +50,7 @@ export declare class MapService extends BaseServiceAbstract implements IBaseServ
50
50
  */
51
51
  get(projectId: string, mapId: string): Promise<Map>;
52
52
  /**
53
- * Updates a map's metadata.
54
- *
55
- * @deprecated Hits the legacy `PUT /maps/{mapId}` endpoint that only accepts
56
- * metadata; the giraffe API is migrating that endpoint toward "PUT the full
57
- * resource" semantics (both metadata and content together). Prefer
58
- * {@link updateMetadata} for metadata-only changes and {@link updateContent}
59
- * for graph-content replacement.
60
- *
53
+ * Updates a maps metadata
61
54
  * @param projectId Project ID
62
55
  * @param mapId Map ID
63
56
  * @param options New metadata
@@ -66,30 +59,6 @@ export declare class MapService extends BaseServiceAbstract implements IBaseServ
66
59
  description?: string;
67
60
  callsign?: string;
68
61
  }): Promise<void>;
69
- /**
70
- * Updates a map's metadata via the granular `/metadata` endpoint.
71
- *
72
- * @param projectId Project ID
73
- * @param mapId Map ID
74
- * @param options New metadata fields. `description` is required by the
75
- * backend; sending an empty value returns a 400.
76
- */
77
- updateMetadata(projectId: string, mapId: string, options: {
78
- description: string;
79
- }): Promise<void>;
80
- /**
81
- * Replaces the graph content of an existing cloud map with the supplied
82
- * canonical `{ nodes, edges }` payload.
83
- *
84
- * Server-managed parts (SUMMARY, MAP_INFO identity fields, MAP_INFO
85
- * timestamp, content hash) are preserved or recomputed by the backend; a
86
- * byte-identical content payload is a no-op on the server (idempotent).
87
- *
88
- * @param projectId Project ID
89
- * @param mapId Map ID
90
- * @param content Canonical map content to write
91
- */
92
- updateContent(projectId: string, mapId: string, content: MapContent): Promise<void>;
93
62
  /**
94
63
  * Begins uploading a map from the agent
95
64
  *
@@ -117,36 +86,15 @@ export declare class MapService extends BaseServiceAbstract implements IBaseServ
117
86
  */
118
87
  delete(projectId: string, mapId: string, callsign: string, hash: string): Promise<void>;
119
88
  /**
120
- * Creates a new map with the supplied canonical content.
121
- *
122
- * The server requires at least one node in the content; an empty `{nodes:{},
123
- * edges:{}}` payload is rejected. Server-managed metadata (SUMMARY, MAP_INFO,
124
- * hash, timestamp) is created automatically.
89
+ * Makes a copy of an uploaded map
125
90
  *
126
91
  * @param projectId Project ID
127
- * @param mapId The mapId to create. Must be unique within the project.
128
- * @param content Canonical map content (`{nodes, edges}`).
129
- */
130
- create(projectId: string, mapId: string, content: MapContent): Promise<void>;
131
- /**
132
- * Makes a copy of an existing cloud map under a new mapId.
133
- *
134
- * If `options.name` is omitted, the server picks an available
135
- * `<sourceMapId>-copy[-N]` slot. The resolved mapId is returned so the
136
- * caller knows where to look for the copy. The write is asynchronous on the
137
- * server side - the copy may not be immediately readable via `get()`.
138
- *
139
- * @param projectId Project ID
140
- * @param mapId Source map ID
141
- * @param options Optional `name` (new mapId) and `description` for the copy
142
- * @returns The mapId assigned to the new copy
92
+ * @param mapId Map ID
93
+ * @param options Options to create the new map
143
94
  */
144
95
  copy(projectId: string, mapId: string, options: {
145
- name?: string;
146
96
  description?: string;
147
- }): Promise<{
148
- mapId: string;
149
- }>;
97
+ }): Promise<void>;
150
98
  /** Deploy a map from the cloud to a robot
151
99
  *
152
100
  * @param projectId Project ID
@@ -1,4 +1,4 @@
1
- import { API_GRAPHS_MAPS_COPY_URL, API_GRAPHS_MAPS_DEPLOYED_URL, API_GRAPHS_MAPS_DEPLOY_URL, API_GRAPHS_MAPS_GEOJSON_URL, API_GRAPHS_MAPS_MERGE_URL, API_GRAPHS_MAPS_NEW_URL, API_GRAPHS_MAPS_URL, API_GRAPHS_MAP_CONTENT_URL, API_GRAPHS_MAP_ID_URL, API_GRAPHS_MAP_METADATA_URL, API_GRAPHS_OBSERVATIONS_URL, API_GRAPHS_OBSERVATION_KEYS_URL, API_GRAPHS_PANORAMA, API_GRAPHS_PANORAMA_OBSERVATIONS_URL, } from '../constants/api';
1
+ import { API_GRAPHS_MAPS_COPY_URL, API_GRAPHS_MAPS_DEPLOYED_URL, API_GRAPHS_MAPS_DEPLOY_URL, API_GRAPHS_MAPS_GEOJSON_URL, API_GRAPHS_MAPS_MERGE_URL, API_GRAPHS_MAPS_URL, API_GRAPHS_MAP_ID_URL, API_GRAPHS_OBSERVATIONS_URL, API_GRAPHS_OBSERVATION_KEYS_URL, API_GRAPHS_PANORAMA, API_GRAPHS_PANORAMA_OBSERVATIONS_URL, } from '../constants/api';
2
2
  import { RocosError, errorCodes } from '../models';
3
3
  import { BaseServiceAbstract } from './BaseServiceAbstract';
4
4
  import { RocosLogger } from '../logger/RocosLogger';
@@ -86,14 +86,7 @@ export class MapService extends BaseServiceAbstract {
86
86
  }, this.config.insecure), 'Failed to get map.');
87
87
  }
88
88
  /**
89
- * Updates a map's metadata.
90
- *
91
- * @deprecated Hits the legacy `PUT /maps/{mapId}` endpoint that only accepts
92
- * metadata; the giraffe API is migrating that endpoint toward "PUT the full
93
- * resource" semantics (both metadata and content together). Prefer
94
- * {@link updateMetadata} for metadata-only changes and {@link updateContent}
95
- * for graph-content replacement.
96
- *
89
+ * Updates a maps metadata
97
90
  * @param projectId Project ID
98
91
  * @param mapId Map ID
99
92
  * @param options New metadata
@@ -105,40 +98,6 @@ export class MapService extends BaseServiceAbstract {
105
98
  mapId,
106
99
  }, this.config.insecure), options, 'Failed to update map.');
107
100
  }
108
- /**
109
- * Updates a map's metadata via the granular `/metadata` endpoint.
110
- *
111
- * @param projectId Project ID
112
- * @param mapId Map ID
113
- * @param options New metadata fields. `description` is required by the
114
- * backend; sending an empty value returns a 400.
115
- */
116
- async updateMetadata(projectId, mapId, options) {
117
- return this.callPut(formatServiceUrl(API_GRAPHS_MAP_METADATA_URL, {
118
- url: this.config.url,
119
- projectId,
120
- mapId,
121
- }, this.config.insecure), options, 'Failed to update map metadata.');
122
- }
123
- /**
124
- * Replaces the graph content of an existing cloud map with the supplied
125
- * canonical `{ nodes, edges }` payload.
126
- *
127
- * Server-managed parts (SUMMARY, MAP_INFO identity fields, MAP_INFO
128
- * timestamp, content hash) are preserved or recomputed by the backend; a
129
- * byte-identical content payload is a no-op on the server (idempotent).
130
- *
131
- * @param projectId Project ID
132
- * @param mapId Map ID
133
- * @param content Canonical map content to write
134
- */
135
- async updateContent(projectId, mapId, content) {
136
- return this.callPut(formatServiceUrl(API_GRAPHS_MAP_CONTENT_URL, {
137
- url: this.config.url,
138
- projectId,
139
- mapId,
140
- }, this.config.insecure), content, 'Failed to update map content.');
141
- }
142
101
  /**
143
102
  * Begins uploading a map from the agent
144
103
  *
@@ -162,34 +121,11 @@ export class MapService extends BaseServiceAbstract {
162
121
  }, this.config.insecure), 'Failed to delete map.', callsign ? { callsign, hash } : {});
163
122
  }
164
123
  /**
165
- * Creates a new map with the supplied canonical content.
166
- *
167
- * The server requires at least one node in the content; an empty `{nodes:{},
168
- * edges:{}}` payload is rejected. Server-managed metadata (SUMMARY, MAP_INFO,
169
- * hash, timestamp) is created automatically.
170
- *
171
- * @param projectId Project ID
172
- * @param mapId The mapId to create. Must be unique within the project.
173
- * @param content Canonical map content (`{nodes, edges}`).
174
- */
175
- async create(projectId, mapId, content) {
176
- return this.callPost(formatServiceUrl(API_GRAPHS_MAPS_NEW_URL, {
177
- url: this.config.url,
178
- projectId,
179
- }, this.config.insecure), { mapId, map: content }, 'Failed to create map.');
180
- }
181
- /**
182
- * Makes a copy of an existing cloud map under a new mapId.
183
- *
184
- * If `options.name` is omitted, the server picks an available
185
- * `<sourceMapId>-copy[-N]` slot. The resolved mapId is returned so the
186
- * caller knows where to look for the copy. The write is asynchronous on the
187
- * server side - the copy may not be immediately readable via `get()`.
124
+ * Makes a copy of an uploaded map
188
125
  *
189
126
  * @param projectId Project ID
190
- * @param mapId Source map ID
191
- * @param options Optional `name` (new mapId) and `description` for the copy
192
- * @returns The mapId assigned to the new copy
127
+ * @param mapId Map ID
128
+ * @param options Options to create the new map
193
129
  */
194
130
  async copy(projectId, mapId, options) {
195
131
  return this.callPost(formatServiceUrl(API_GRAPHS_MAPS_COPY_URL, {
@@ -5,6 +5,7 @@ import { BaseStreamService } from './BaseStreamService';
5
5
  import { IDENTIFIER_NAME_TELEMETRY } from '../constants/identifier';
6
6
  import { RocosStore } from '../store/RocosStore';
7
7
  import { TelemetryStream } from '../api/streams/telemetry/TelemetryStream';
8
+ import { TelemetryStreamConnect } from '../api/streams/telemetry/TelemetryStreamConnect';
8
9
  import { arrayUnique } from '../helpers/arrayUnique';
9
10
  import { flattenCallsignsLookup } from '../helpers/flattenCallsignsLookup';
10
11
  import { getUniqueId } from '../helpers/getUniqueId';
@@ -159,6 +160,7 @@ export class TelemetryService extends BaseStreamService {
159
160
  options: this.config.options,
160
161
  port: this.config.port,
161
162
  insecure: this.config.insecure,
163
+ transport: this.config.transport,
162
164
  });
163
165
  if (!newStream.isNew) {
164
166
  newStream.stream.statusStream$.subscribe((msg) => {
@@ -171,6 +173,9 @@ export class TelemetryService extends BaseStreamService {
171
173
  return newStream.stream;
172
174
  }
173
175
  getStream(config) {
176
+ if (config.transport === 'connect') {
177
+ return new TelemetryStreamConnect(config);
178
+ }
174
179
  return new TelemetryStream(config);
175
180
  }
176
181
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dronedeploy/rocos-js-sdk",
3
- "version": "3.0.30",
3
+ "version": "3.0.31-rc1",
4
4
  "description": "Javascript SDK for rocos",
5
5
  "main": "cjs/index.js",
6
6
  "module": "esm/index.js",
@@ -22,6 +22,9 @@
22
22
  "license": "MIT",
23
23
  "devDependencies": {},
24
24
  "dependencies": {
25
+ "@bufbuild/protobuf": "2.2.5",
26
+ "@connectrpc/connect": "2.0.0",
27
+ "@connectrpc/connect-web": "2.0.0",
25
28
  "@grpc/grpc-js": "^1.7.1",
26
29
  "@protobuf-ts/grpcweb-transport": "^2.9.1",
27
30
  "@protobuf-ts/plugin": "^2.9.1",
@@ -1,26 +0,0 @@
1
- /**
2
- * Canonical JSON representation of a robot map's graph content.
3
- *
4
- * This is the body shape returned by `GET /graphs/projects/{projectId}/maps/{mapId}`
5
- * and accepted by `PUT /graphs/projects/{projectId}/maps/{mapId}/content`. Distinct
6
- * from {@link Map} (the listing/metadata model returned by `list()`).
7
- */
8
- export interface MapContent {
9
- nodes: Record<string, MapContentNode>;
10
- edges: Record<string, MapContentEdge>;
11
- }
12
- export interface MapContentNode {
13
- id: string;
14
- type: string;
15
- edges: Record<string, unknown>;
16
- data: Record<string, unknown>;
17
- externalData?: Record<string, unknown>;
18
- }
19
- export interface MapContentEdge {
20
- id: string;
21
- from: string;
22
- to: string;
23
- type: string;
24
- data: Record<string, unknown>;
25
- externalData?: Record<string, unknown>;
26
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,26 +0,0 @@
1
- /**
2
- * Canonical JSON representation of a robot map's graph content.
3
- *
4
- * This is the body shape returned by `GET /graphs/projects/{projectId}/maps/{mapId}`
5
- * and accepted by `PUT /graphs/projects/{projectId}/maps/{mapId}/content`. Distinct
6
- * from {@link Map} (the listing/metadata model returned by `list()`).
7
- */
8
- export interface MapContent {
9
- nodes: Record<string, MapContentNode>;
10
- edges: Record<string, MapContentEdge>;
11
- }
12
- export interface MapContentNode {
13
- id: string;
14
- type: string;
15
- edges: Record<string, unknown>;
16
- data: Record<string, unknown>;
17
- externalData?: Record<string, unknown>;
18
- }
19
- export interface MapContentEdge {
20
- id: string;
21
- from: string;
22
- to: string;
23
- type: string;
24
- data: Record<string, unknown>;
25
- externalData?: Record<string, unknown>;
26
- }
@@ -1 +0,0 @@
1
- export {};