@dronedeploy/rocos-js-sdk 3.0.29 → 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 -2
  5. package/cjs/constants/api.js +2 -4
  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 +2 -33
  13. package/cjs/services/MapService.js +1 -42
  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 -2
  19. package/esm/constants/api.js +0 -2
  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 +2 -33
  27. package/esm/services/MapService.js +2 -43
  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,196 @@
1
+ "use strict";
2
+ // @generated by protoc-gen-es v2.2.5 with parameter "target=ts"
3
+ // @generated from file teletubby.proto (package teletubby.v1, syntax proto3)
4
+ /* eslint-disable */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.TelemetryGateway = exports.TelemetryReceiver = exports.PredicateAttributeSchema = exports.PredicateAttribute = exports.ComparisonOperationSchema = exports.ComparisonOperation = exports.LogicalOperationSchema = exports.LogicalOperation = exports.TelemetryAckStatusSchema = exports.TelemetryAckStatus = exports.HeartbeatSchema = exports.PredicateSchema = exports.QueryOrPredicateSchema = exports.QuerySchema = exports.ServiceStatusRequestSchema = exports.RegistrationMessageSchema = exports.TelemetryRequestAckSchema = exports.ReceiverGroupUnsubscribeOptionSchema = exports.ReceiverGroupSubscribeOptionSchema = exports.UnsubscribeOptionSchema = exports.SubscribeOptionSchema = exports.UnsubscribeOperationSchema = exports.SubscribeOperationSchema = exports.TelemetryActionSchema = exports.TelemetryQueryRequestSchema = exports.TelemetryRequestSchema = exports.ConfigActionSchema = exports.ConfigMessageSchema = exports.TelemetryStreamAckSchema = exports.TelemetryMessageAckSchema = exports.TelemetryStreamMessageSchema = exports.ReceiverStreamMessageSchema = exports.TelemetryMessageSchema = exports.file_teletubby = void 0;
7
+ const codegenv1_1 = require("@bufbuild/protobuf/codegenv1");
8
+ /**
9
+ * Describes the file teletubby.proto.
10
+ */
11
+ exports.file_teletubby = (0, codegenv1_1.fileDesc)("Cg90ZWxldHViYnkucHJvdG8SDHRlbGV0dWJieS52MSLVAQoQVGVsZW1ldHJ5TWVzc2FnZRIOCgZzb3VyY2UYASABKAkSDwoHcGF5bG9hZBgCIAEoDBIQCghjYWxsc2lnbhgDIAEoCRIPCgdjcmVhdGVkGAQgASgDEgsKA3NlcRgFIAEoBBI2CgRtZXRhGAYgAygLMigudGVsZXR1YmJ5LnYxLlRlbGVtZXRyeU1lc3NhZ2UuTWV0YUVudHJ5EgsKA3VpZBgHIAEoCRorCgl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LnYxLlRlbGVtZXRyeVJlcXVlc3RBY2siADKzBAoQVGVsZW1ldHJ5R2F0ZXdheRJUCg5SZWdpc3RlclNlbmRlchIhLnRlbGV0dWJieS52MS5SZWdpc3RyYXRpb25NZXNzYWdlGhsudGVsZXR1YmJ5LnYxLkNvbmZpZ01lc3NhZ2UiADABElkKEFJlZ2lzdGVyUmVjZWl2ZXISIS50ZWxldHViYnkudjEuUmVnaXN0cmF0aW9uTWVzc2FnZRoeLnRlbGV0dWJieS52MS5UZWxlbWV0cnlNZXNzYWdlIgAwARJVCg1TZW5kVGVsZW1ldHJ5Eh4udGVsZXR1YmJ5LnYxLlRlbGVtZXRyeU1lc3NhZ2UaIC50ZWxldHViYnkudjEuVGVsZW1ldHJ5U3RyZWFtQWNrIgAoARJbChRTZW5kVGVsZW1ldHJ5TWVzc2FnZRIeLnRlbGV0dWJieS52MS5UZWxlbWV0cnlNZXNzYWdlGiEudGVsZXR1YmJ5LnYxLlRlbGVtZXRyeU1lc3NhZ2VBY2siABJXChBSZXF1ZXN0VGVsZW1ldHJ5Eh4udGVsZXR1YmJ5LnYxLlRlbGVtZXRyeVJlcXVlc3QaIS50ZWxldHViYnkudjEuVGVsZW1ldHJ5UmVxdWVzdEFjayIAEmEKFVJlcXVlc3RUZWxlbWV0cnlRdWVyeRIjLnRlbGV0dWJieS52MS5UZWxlbWV0cnlRdWVyeVJlcXVlc3QaIS50ZWxldHViYnkudjEuVGVsZW1ldHJ5UmVxdWVzdEFjayIAQgJIAWIGcHJvdG8z");
12
+ /**
13
+ * Describes the message teletubby.v1.TelemetryMessage.
14
+ * Use `create(TelemetryMessageSchema)` to create a new message.
15
+ */
16
+ exports.TelemetryMessageSchema = (0, codegenv1_1.messageDesc)(exports.file_teletubby, 0);
17
+ /**
18
+ * Describes the message teletubby.v1.ReceiverStreamMessage.
19
+ * Use `create(ReceiverStreamMessageSchema)` to create a new message.
20
+ */
21
+ exports.ReceiverStreamMessageSchema = (0, codegenv1_1.messageDesc)(exports.file_teletubby, 1);
22
+ /**
23
+ * Describes the message teletubby.v1.TelemetryStreamMessage.
24
+ * Use `create(TelemetryStreamMessageSchema)` to create a new message.
25
+ */
26
+ exports.TelemetryStreamMessageSchema = (0, codegenv1_1.messageDesc)(exports.file_teletubby, 2);
27
+ /**
28
+ * Describes the message teletubby.v1.TelemetryMessageAck.
29
+ * Use `create(TelemetryMessageAckSchema)` to create a new message.
30
+ */
31
+ exports.TelemetryMessageAckSchema = (0, codegenv1_1.messageDesc)(exports.file_teletubby, 3);
32
+ /**
33
+ * Describes the message teletubby.v1.TelemetryStreamAck.
34
+ * Use `create(TelemetryStreamAckSchema)` to create a new message.
35
+ */
36
+ exports.TelemetryStreamAckSchema = (0, codegenv1_1.messageDesc)(exports.file_teletubby, 4);
37
+ /**
38
+ * Describes the message teletubby.v1.ConfigMessage.
39
+ * Use `create(ConfigMessageSchema)` to create a new message.
40
+ */
41
+ exports.ConfigMessageSchema = (0, codegenv1_1.messageDesc)(exports.file_teletubby, 5);
42
+ /**
43
+ * Describes the message teletubby.v1.ConfigAction.
44
+ * Use `create(ConfigActionSchema)` to create a new message.
45
+ */
46
+ exports.ConfigActionSchema = (0, codegenv1_1.messageDesc)(exports.file_teletubby, 6);
47
+ /**
48
+ * Describes the message teletubby.v1.TelemetryRequest.
49
+ * Use `create(TelemetryRequestSchema)` to create a new message.
50
+ */
51
+ exports.TelemetryRequestSchema = (0, codegenv1_1.messageDesc)(exports.file_teletubby, 7);
52
+ /**
53
+ * Describes the message teletubby.v1.TelemetryQueryRequest.
54
+ * Use `create(TelemetryQueryRequestSchema)` to create a new message.
55
+ */
56
+ exports.TelemetryQueryRequestSchema = (0, codegenv1_1.messageDesc)(exports.file_teletubby, 8);
57
+ /**
58
+ * Describes the message teletubby.v1.TelemetryAction.
59
+ * Use `create(TelemetryActionSchema)` to create a new message.
60
+ */
61
+ exports.TelemetryActionSchema = (0, codegenv1_1.messageDesc)(exports.file_teletubby, 9);
62
+ /**
63
+ * Describes the message teletubby.v1.SubscribeOperation.
64
+ * Use `create(SubscribeOperationSchema)` to create a new message.
65
+ */
66
+ exports.SubscribeOperationSchema = (0, codegenv1_1.messageDesc)(exports.file_teletubby, 10);
67
+ /**
68
+ * Describes the message teletubby.v1.UnsubscribeOperation.
69
+ * Use `create(UnsubscribeOperationSchema)` to create a new message.
70
+ */
71
+ exports.UnsubscribeOperationSchema = (0, codegenv1_1.messageDesc)(exports.file_teletubby, 11);
72
+ /**
73
+ * Describes the message teletubby.v1.SubscribeOption.
74
+ * Use `create(SubscribeOptionSchema)` to create a new message.
75
+ */
76
+ exports.SubscribeOptionSchema = (0, codegenv1_1.messageDesc)(exports.file_teletubby, 12);
77
+ /**
78
+ * Describes the message teletubby.v1.UnsubscribeOption.
79
+ * Use `create(UnsubscribeOptionSchema)` to create a new message.
80
+ */
81
+ exports.UnsubscribeOptionSchema = (0, codegenv1_1.messageDesc)(exports.file_teletubby, 13);
82
+ /**
83
+ * Describes the message teletubby.v1.ReceiverGroupSubscribeOption.
84
+ * Use `create(ReceiverGroupSubscribeOptionSchema)` to create a new message.
85
+ */
86
+ exports.ReceiverGroupSubscribeOptionSchema = (0, codegenv1_1.messageDesc)(exports.file_teletubby, 14);
87
+ /**
88
+ * Describes the message teletubby.v1.ReceiverGroupUnsubscribeOption.
89
+ * Use `create(ReceiverGroupUnsubscribeOptionSchema)` to create a new message.
90
+ */
91
+ exports.ReceiverGroupUnsubscribeOptionSchema = (0, codegenv1_1.messageDesc)(exports.file_teletubby, 15);
92
+ /**
93
+ * Describes the message teletubby.v1.TelemetryRequestAck.
94
+ * Use `create(TelemetryRequestAckSchema)` to create a new message.
95
+ */
96
+ exports.TelemetryRequestAckSchema = (0, codegenv1_1.messageDesc)(exports.file_teletubby, 16);
97
+ /**
98
+ * Describes the message teletubby.v1.RegistrationMessage.
99
+ * Use `create(RegistrationMessageSchema)` to create a new message.
100
+ */
101
+ exports.RegistrationMessageSchema = (0, codegenv1_1.messageDesc)(exports.file_teletubby, 17);
102
+ /**
103
+ * Describes the message teletubby.v1.ServiceStatusRequest.
104
+ * Use `create(ServiceStatusRequestSchema)` to create a new message.
105
+ */
106
+ exports.ServiceStatusRequestSchema = (0, codegenv1_1.messageDesc)(exports.file_teletubby, 18);
107
+ /**
108
+ * Describes the message teletubby.v1.Query.
109
+ * Use `create(QuerySchema)` to create a new message.
110
+ */
111
+ exports.QuerySchema = (0, codegenv1_1.messageDesc)(exports.file_teletubby, 19);
112
+ /**
113
+ * Describes the message teletubby.v1.QueryOrPredicate.
114
+ * Use `create(QueryOrPredicateSchema)` to create a new message.
115
+ */
116
+ exports.QueryOrPredicateSchema = (0, codegenv1_1.messageDesc)(exports.file_teletubby, 20);
117
+ /**
118
+ * Describes the message teletubby.v1.Predicate.
119
+ * Use `create(PredicateSchema)` to create a new message.
120
+ */
121
+ exports.PredicateSchema = (0, codegenv1_1.messageDesc)(exports.file_teletubby, 21);
122
+ /**
123
+ * Describes the message teletubby.v1.Heartbeat.
124
+ * Use `create(HeartbeatSchema)` to create a new message.
125
+ */
126
+ exports.HeartbeatSchema = (0, codegenv1_1.messageDesc)(exports.file_teletubby, 22);
127
+ /**
128
+ * @generated from enum teletubby.v1.TelemetryAckStatus
129
+ */
130
+ var TelemetryAckStatus;
131
+ (function (TelemetryAckStatus) {
132
+ /**
133
+ * @generated from enum value: OK = 0;
134
+ */
135
+ TelemetryAckStatus[TelemetryAckStatus["OK"] = 0] = "OK";
136
+ /**
137
+ * @generated from enum value: REJECT = 1;
138
+ */
139
+ TelemetryAckStatus[TelemetryAckStatus["REJECT"] = 1] = "REJECT";
140
+ })(TelemetryAckStatus || (exports.TelemetryAckStatus = TelemetryAckStatus = {}));
141
+ /**
142
+ * Describes the enum teletubby.v1.TelemetryAckStatus.
143
+ */
144
+ exports.TelemetryAckStatusSchema = (0, codegenv1_1.enumDesc)(exports.file_teletubby, 0);
145
+ /**
146
+ * @generated from enum teletubby.v1.LogicalOperation
147
+ */
148
+ var LogicalOperation;
149
+ (function (LogicalOperation) {
150
+ /**
151
+ * @generated from enum value: OR = 0;
152
+ */
153
+ LogicalOperation[LogicalOperation["OR"] = 0] = "OR";
154
+ })(LogicalOperation || (exports.LogicalOperation = LogicalOperation = {}));
155
+ /**
156
+ * Describes the enum teletubby.v1.LogicalOperation.
157
+ */
158
+ exports.LogicalOperationSchema = (0, codegenv1_1.enumDesc)(exports.file_teletubby, 1);
159
+ /**
160
+ * @generated from enum teletubby.v1.ComparisonOperation
161
+ */
162
+ var ComparisonOperation;
163
+ (function (ComparisonOperation) {
164
+ /**
165
+ * @generated from enum value: EQUAL = 0;
166
+ */
167
+ ComparisonOperation[ComparisonOperation["EQUAL"] = 0] = "EQUAL";
168
+ })(ComparisonOperation || (exports.ComparisonOperation = ComparisonOperation = {}));
169
+ /**
170
+ * Describes the enum teletubby.v1.ComparisonOperation.
171
+ */
172
+ exports.ComparisonOperationSchema = (0, codegenv1_1.enumDesc)(exports.file_teletubby, 2);
173
+ /**
174
+ * @generated from enum teletubby.v1.PredicateAttribute
175
+ */
176
+ var PredicateAttribute;
177
+ (function (PredicateAttribute) {
178
+ /**
179
+ * @generated from enum value: TAG = 0;
180
+ */
181
+ PredicateAttribute[PredicateAttribute["TAG"] = 0] = "TAG";
182
+ })(PredicateAttribute || (exports.PredicateAttribute = PredicateAttribute = {}));
183
+ /**
184
+ * Describes the enum teletubby.v1.PredicateAttribute.
185
+ */
186
+ exports.PredicateAttributeSchema = (0, codegenv1_1.enumDesc)(exports.file_teletubby, 3);
187
+ /**
188
+ * @generated from service teletubby.v1.TelemetryReceiver
189
+ */
190
+ exports.TelemetryReceiver = (0, codegenv1_1.serviceDesc)(exports.file_teletubby, 0);
191
+ /**
192
+ * Will be deprecated in the future
193
+ *
194
+ * @generated from service teletubby.v1.TelemetryGateway
195
+ */
196
+ exports.TelemetryGateway = (0, codegenv1_1.serviceDesc)(exports.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';
@@ -64,7 +64,6 @@ __exportStar(require("./IToken"), exports);
64
64
  __exportStar(require("./IWidget"), exports);
65
65
  __exportStar(require("./IWidgetLineGroup"), exports);
66
66
  __exportStar(require("./maps/Map"), exports);
67
- __exportStar(require("./maps/MapContent"), exports);
68
67
  __exportStar(require("./maps/Panorama"), exports);
69
68
  __exportStar(require("./message"), exports);
70
69
  __exportStar(require("./params/ICallerParams"), exports);
@@ -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
  *
@@ -89,14 +89,7 @@ class MapService extends BaseServiceAbstract_1.BaseServiceAbstract {
89
89
  }, this.config.insecure), 'Failed to get map.');
90
90
  }
91
91
  /**
92
- * Updates a map's metadata.
93
- *
94
- * @deprecated Hits the legacy `PUT /maps/{mapId}` endpoint that only accepts
95
- * metadata; the giraffe API is migrating that endpoint toward "PUT the full
96
- * resource" semantics (both metadata and content together). Prefer
97
- * {@link updateMetadata} for metadata-only changes and {@link updateContent}
98
- * for graph-content replacement.
99
- *
92
+ * Updates a maps metadata
100
93
  * @param projectId Project ID
101
94
  * @param mapId Map ID
102
95
  * @param options New metadata
@@ -108,40 +101,6 @@ class MapService extends BaseServiceAbstract_1.BaseServiceAbstract {
108
101
  mapId,
109
102
  }, this.config.insecure), options, 'Failed to update map.');
110
103
  }
111
- /**
112
- * Updates a map's metadata via the granular `/metadata` endpoint.
113
- *
114
- * @param projectId Project ID
115
- * @param mapId Map ID
116
- * @param options New metadata fields. `description` is required by the
117
- * backend; sending an empty value returns a 400.
118
- */
119
- async updateMetadata(projectId, mapId, options) {
120
- return this.callPut((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_GRAPHS_MAP_METADATA_URL, {
121
- url: this.config.url,
122
- projectId,
123
- mapId,
124
- }, this.config.insecure), options, 'Failed to update map metadata.');
125
- }
126
- /**
127
- * Replaces the graph content of an existing cloud map with the supplied
128
- * canonical `{ nodes, edges }` payload.
129
- *
130
- * Server-managed parts (SUMMARY, MAP_INFO identity fields, MAP_INFO
131
- * timestamp, content hash) are preserved or recomputed by the backend; a
132
- * byte-identical content payload is a no-op on the server (idempotent).
133
- *
134
- * @param projectId Project ID
135
- * @param mapId Map ID
136
- * @param content Canonical map content to write
137
- */
138
- async updateContent(projectId, mapId, content) {
139
- return this.callPut((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_GRAPHS_MAP_CONTENT_URL, {
140
- url: this.config.url,
141
- projectId,
142
- mapId,
143
- }, this.config.insecure), content, 'Failed to update map content.');
144
- }
145
104
  /**
146
105
  * Begins uploading a map from the agent
147
106
  *
@@ -8,6 +8,7 @@ const BaseStreamService_1 = require("./BaseStreamService");
8
8
  const identifier_1 = require("../constants/identifier");
9
9
  const RocosStore_1 = require("../store/RocosStore");
10
10
  const TelemetryStream_1 = require("../api/streams/telemetry/TelemetryStream");
11
+ const TelemetryStreamConnect_1 = require("../api/streams/telemetry/TelemetryStreamConnect");
11
12
  const arrayUnique_1 = require("../helpers/arrayUnique");
12
13
  const flattenCallsignsLookup_1 = require("../helpers/flattenCallsignsLookup");
13
14
  const getUniqueId_1 = require("../helpers/getUniqueId");
@@ -162,6 +163,7 @@ class TelemetryService extends BaseStreamService_1.BaseStreamService {
162
163
  options: this.config.options,
163
164
  port: this.config.port,
164
165
  insecure: this.config.insecure,
166
+ transport: this.config.transport,
165
167
  });
166
168
  if (!newStream.isNew) {
167
169
  newStream.stream.statusStream$.subscribe((msg) => {
@@ -174,6 +176,9 @@ class TelemetryService extends BaseStreamService_1.BaseStreamService {
174
176
  return newStream.stream;
175
177
  }
176
178
  getStream(config) {
179
+ if (config.transport === 'connect') {
180
+ return new TelemetryStreamConnect_1.TelemetryStreamConnect(config);
181
+ }
177
182
  return new TelemetryStream_1.TelemetryStream(config);
178
183
  }
179
184
  }
@@ -12,6 +12,7 @@ export class TelemetryStream extends TelemetryStreamAbstract {
12
12
  const port = config.port ? `:${config.port}` : '';
13
13
  const transport = new GrpcWebFetchTransport({
14
14
  baseUrl: `${protocol}://${this.url}${port}`,
15
+ format: config.grpcWebFormat,
15
16
  });
16
17
  this.client = new TelemetryGatewayClient(transport);
17
18
  }
@@ -0,0 +1,26 @@
1
+ import { ITelemetryStreamConfig } from '../../../models';
2
+ import { TelemetryAckStatus, TelemetryQueryRequest, TelemetryRequest } from '../../../grpc/teletubby_pb';
3
+ import { TelemetryStreamAbstract } from './TelemetryStreamAbstract';
4
+ /**
5
+ * Connect-protocol telemetry receive stream. Mirrors TelemetryStream (grpc-web) but uses
6
+ * @connectrpc/connect. Selected when config.transport === 'connect'.
7
+ *
8
+ * The shared TelemetryStreamAbstract is typed with the protobuf-ts message types, while the
9
+ * Connect client uses @bufbuild/protobuf types. Both serialise to identical protobuf wire
10
+ * bytes, so we bridge across the boundary with toBinary/fromBinary rather than hand-written
11
+ * field mapping. This keeps all reconnect/subscription/heartbeat logic shared and untouched.
12
+ */
13
+ export declare class TelemetryStreamConnect extends TelemetryStreamAbstract {
14
+ private client;
15
+ private abortController?;
16
+ constructor(config: ITelemetryStreamConfig);
17
+ protected stopInternal(): void;
18
+ protected registerReceiver(): () => void;
19
+ private onError;
20
+ private onEnd;
21
+ private getHeaders;
22
+ protected requestTelemetry(req: TelemetryRequest): Promise<void>;
23
+ protected requestTelemetryQuery(req: TelemetryQueryRequest): Promise<void>;
24
+ protected sendAcknowledgmentInternal(uid: string, status: TelemetryAckStatus, noRetry: boolean): boolean;
25
+ protected sendHeartbeat(): void;
26
+ }
@@ -0,0 +1,141 @@
1
+ import { createClient } from '@connectrpc/connect';
2
+ import { SubscriberStatusEnum } from '../../../models';
3
+ import { RegistrationMessageSchema, TelemetryGateway, TelemetryQueryRequestSchema, TelemetryRequestSchema, } from '../../../grpc/connect/teletubby_pb';
4
+ import { TelemetryMessage, TelemetryQueryRequest, TelemetryRequest, } from '../../../grpc/teletubby_pb';
5
+ import { create, fromBinary } from '@bufbuild/protobuf';
6
+ import { RocosLogger } from '../../../logger/RocosLogger';
7
+ import { TelemetryStreamAbstract } from './TelemetryStreamAbstract';
8
+ import { createConnectTransport } from '@connectrpc/connect-web';
9
+ /**
10
+ * Connect-protocol telemetry receive stream. Mirrors TelemetryStream (grpc-web) but uses
11
+ * @connectrpc/connect. Selected when config.transport === 'connect'.
12
+ *
13
+ * The shared TelemetryStreamAbstract is typed with the protobuf-ts message types, while the
14
+ * Connect client uses @bufbuild/protobuf types. Both serialise to identical protobuf wire
15
+ * bytes, so we bridge across the boundary with toBinary/fromBinary rather than hand-written
16
+ * field mapping. This keeps all reconnect/subscription/heartbeat logic shared and untouched.
17
+ */
18
+ export class TelemetryStreamConnect extends TelemetryStreamAbstract {
19
+ constructor(config) {
20
+ super(config);
21
+ this.logger = RocosLogger.getInstance(`TelemetryStreamConnect(${this.identifier})`);
22
+ const protocol = config.insecure ? 'http' : 'https';
23
+ const port = config.port ? `:${config.port}` : '';
24
+ const transport = createConnectTransport({
25
+ baseUrl: `${protocol}://${this.url}${port}`,
26
+ // Binary proto codec. The Connect default is JSON, which fails to decode real telemetry
27
+ // payloads containing control characters (verified against a live robot on dev) and is
28
+ // less efficient. Binary is required for correctness here.
29
+ useBinaryFormat: true,
30
+ });
31
+ this.client = createClient(TelemetryGateway, transport);
32
+ }
33
+ stopInternal() {
34
+ if (this.abortController) {
35
+ this.logger.info('Starting stop stream process');
36
+ this.abortController.abort();
37
+ this.abortController = undefined;
38
+ this.logger.info('Finished stop stream process');
39
+ }
40
+ }
41
+ registerReceiver() {
42
+ this.logger.info('registerReceiver');
43
+ // Reset counter
44
+ this.receivedMessagesCount = 0;
45
+ const abortController = new AbortController();
46
+ this.abortController = abortController;
47
+ void (async () => {
48
+ try {
49
+ const stream = this.client.registerReceiver(create(RegistrationMessageSchema, {}), {
50
+ headers: this.getHeaders(this.projectId),
51
+ signal: abortController.signal,
52
+ });
53
+ for await (const msg of stream) {
54
+ // Bridge connect-es message -> protobuf-ts TelemetryMessage with a direct field map.
55
+ // (Avoids a per-message re-serialize/re-parse; created/seq are int64/uint64 -> string
56
+ // for protobuf-ts's long_type_string config.)
57
+ const ptMsg = TelemetryMessage.create({
58
+ source: msg.source,
59
+ callsign: msg.callsign,
60
+ payload: msg.payload,
61
+ uid: msg.uid,
62
+ created: msg.created.toString(),
63
+ seq: msg.seq.toString(),
64
+ meta: msg.meta,
65
+ });
66
+ this.onData(ptMsg, false);
67
+ }
68
+ this.onEnd(true);
69
+ }
70
+ catch (e) {
71
+ if (abortController.signal.aborted) {
72
+ this.logger.debug('registerReceiver', 'aborted');
73
+ return;
74
+ }
75
+ void this.onError(e);
76
+ this.onEnd(false);
77
+ }
78
+ })();
79
+ this.listenMessagesAndRenew();
80
+ return () => {
81
+ abortController.abort();
82
+ };
83
+ }
84
+ async onError(e) {
85
+ this.logger.error(`Telemetry Stream Error: ${e}, SubscriberId: ${this.subscriberId}`);
86
+ this.subscriberStatus = SubscriberStatusEnum.ERROR;
87
+ this.statusStream$.next(this.subscriberStatus);
88
+ }
89
+ onEnd(ok) {
90
+ this.logger.debug('registerReceiver', 'end');
91
+ if (ok) {
92
+ this.stopInternal();
93
+ this.registerReceiver();
94
+ }
95
+ }
96
+ getHeaders(projectId) {
97
+ const result = {
98
+ // Canary marker: the istio VirtualService routes only requests carrying this header to
99
+ // the Connect-Go handler (:8083), leaving existing grpc-web traffic untouched. Harmless
100
+ // when the backend does a full cutover or is hit directly. Must match the chart's
101
+ // virtualService.routes.connect.matchHeader.
102
+ 'x-tt-connect': '1',
103
+ };
104
+ if (this.token) {
105
+ result.authorization = this.token;
106
+ }
107
+ if (projectId) {
108
+ result['r-p'] = projectId;
109
+ }
110
+ return result;
111
+ }
112
+ async requestTelemetry(req) {
113
+ this.logger.debug('Sending telemetry request');
114
+ try {
115
+ const connectReq = fromBinary(TelemetryRequestSchema, TelemetryRequest.toBinary(req));
116
+ await this.client.requestTelemetry(connectReq, { headers: this.getHeaders(this.projectId) });
117
+ }
118
+ catch (e) {
119
+ this.logger.error('error requestTelemetry ', e);
120
+ throw e;
121
+ }
122
+ }
123
+ async requestTelemetryQuery(req) {
124
+ this.logger.debug('Requesting telemetry with query');
125
+ try {
126
+ const connectReq = fromBinary(TelemetryQueryRequestSchema, TelemetryQueryRequest.toBinary(req));
127
+ await this.client.requestTelemetryQuery(connectReq, { headers: this.getHeaders(this.projectId) });
128
+ }
129
+ catch (e) {
130
+ this.logger.error('error requestTelemetryQuery ', e);
131
+ throw e;
132
+ }
133
+ }
134
+ sendAcknowledgmentInternal(uid, status, noRetry) {
135
+ this.logger.error('Error can not send Acknowledgment on connect client', { uid, status, noRetry });
136
+ return false;
137
+ }
138
+ sendHeartbeat() {
139
+ // Server-streaming Connect has no client->server channel for heartbeats.
140
+ }
141
+ }
@@ -125,8 +125,6 @@ export declare const API_GRAPHS_MAPS_URL = "https://{url}/graphs/projects/{proje
125
125
  export declare const API_GRAPHS_MAPS_DEPLOYED_URL = "https://{url}/graphs/projects/{projectId}/maps/deployed?callsign={callsign}";
126
126
  export declare const API_GRAPHS_MAPS_MERGE_URL = "https://{url}/graphs/projects/{projectId}/maps/merge";
127
127
  export declare const API_GRAPHS_MAP_ID_URL = "https://{url}/graphs/projects/{projectId}/maps/{mapId}";
128
- export declare const API_GRAPHS_MAP_CONTENT_URL = "https://{url}/graphs/projects/{projectId}/maps/{mapId}/content";
129
- export declare const API_GRAPHS_MAP_METADATA_URL = "https://{url}/graphs/projects/{projectId}/maps/{mapId}/metadata";
130
128
  export declare const API_GRAPHS_MAPS_COPY_URL = "https://{url}/graphs/projects/{projectId}/maps/{mapId}/copy";
131
129
  export declare const API_GRAPHS_MAPS_DEPLOY_URL = "https://{url}/graphs/projects/{projectId}/maps/{mapId}/deploy";
132
130
  export declare const API_GRAPHS_MAPS_GEOJSON_URL = "https://{url}/graphs/projects/{projectId}/maps/{mapId}/geojson";
@@ -125,8 +125,6 @@ export const API_GRAPHS_MAPS_URL = 'https://{url}/graphs/projects/{projectId}/ma
125
125
  export const API_GRAPHS_MAPS_DEPLOYED_URL = 'https://{url}/graphs/projects/{projectId}/maps/deployed?callsign={callsign}';
126
126
  export const API_GRAPHS_MAPS_MERGE_URL = 'https://{url}/graphs/projects/{projectId}/maps/merge';
127
127
  export const API_GRAPHS_MAP_ID_URL = 'https://{url}/graphs/projects/{projectId}/maps/{mapId}';
128
- export const API_GRAPHS_MAP_CONTENT_URL = 'https://{url}/graphs/projects/{projectId}/maps/{mapId}/content';
129
- export const API_GRAPHS_MAP_METADATA_URL = 'https://{url}/graphs/projects/{projectId}/maps/{mapId}/metadata';
130
128
  export const API_GRAPHS_MAPS_COPY_URL = 'https://{url}/graphs/projects/{projectId}/maps/{mapId}/copy';
131
129
  export const API_GRAPHS_MAPS_DEPLOY_URL = 'https://{url}/graphs/projects/{projectId}/maps/{mapId}/deploy';
132
130
  export const API_GRAPHS_MAPS_GEOJSON_URL = 'https://{url}/graphs/projects/{projectId}/maps/{mapId}/geojson';