@dronedeploy/rocos-js-sdk 3.0.14 → 3.0.15-hotifix.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.
@@ -241,7 +241,7 @@ export declare class ProfileService extends BaseServiceAbstract implements IBase
241
241
  *
242
242
  * @see import
243
243
  */
244
- export(projectId: string, definitionId: string): Promise<Record<string, unknown>>;
244
+ export(projectId: string, definitionId: string): Promise<Blob>;
245
245
  /** Import robot definition from JSON format
246
246
  *
247
247
  * Accepts a previously exported robot definition
@@ -358,7 +358,7 @@ class ProfileService extends BaseServiceAbstract_1.BaseServiceAbstract {
358
358
  * @see import
359
359
  */
360
360
  async export(projectId, definitionId) {
361
- return this.callPost((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_PROJECT_DEFINITION_EXPORT, { url: this.config.url, projectId, definitionId }, this.config.insecure), undefined, `Failed to export robot definition for ${projectId}, definitionId ${definitionId}.`);
361
+ return this.callPost((0, formatServiceUrl_1.formatServiceUrl)(api_1.API_PROJECT_DEFINITION_EXPORT, { url: this.config.url, projectId, definitionId }, this.config.insecure), undefined, `Failed to export robot definition for ${projectId}, definitionId ${definitionId}.`, { responseType: 'blob' });
362
362
  }
363
363
  /** Import robot definition from JSON format
364
364
  *
@@ -38,7 +38,7 @@ class TelemetryService extends BaseStreamService_1.BaseStreamService {
38
38
  */
39
39
  subscribe(params) {
40
40
  const sources = (0, arrayUnique_1.arrayUnique)(params.sources).map((item) => item.trim()) ?? [];
41
- if (!params?.callsigns && params?.query) {
41
+ if (!params?.callsigns && !params?.query) {
42
42
  this.logger.error('Error: params need to contain either callsigns or query', params);
43
43
  throw new models_1.RocosError('Params need to contain either callsigns or query.', models_1.errorCodes.TELEMETRY_SERVICE_ERROR);
44
44
  }
@@ -241,7 +241,7 @@ export declare class ProfileService extends BaseServiceAbstract implements IBase
241
241
  *
242
242
  * @see import
243
243
  */
244
- export(projectId: string, definitionId: string): Promise<Record<string, unknown>>;
244
+ export(projectId: string, definitionId: string): Promise<Blob>;
245
245
  /** Import robot definition from JSON format
246
246
  *
247
247
  * Accepts a previously exported robot definition
@@ -355,7 +355,7 @@ export class ProfileService extends BaseServiceAbstract {
355
355
  * @see import
356
356
  */
357
357
  async export(projectId, definitionId) {
358
- return this.callPost(formatServiceUrl(API_PROJECT_DEFINITION_EXPORT, { url: this.config.url, projectId, definitionId }, this.config.insecure), undefined, `Failed to export robot definition for ${projectId}, definitionId ${definitionId}.`);
358
+ return this.callPost(formatServiceUrl(API_PROJECT_DEFINITION_EXPORT, { url: this.config.url, projectId, definitionId }, this.config.insecure), undefined, `Failed to export robot definition for ${projectId}, definitionId ${definitionId}.`, { responseType: 'blob' });
359
359
  }
360
360
  /** Import robot definition from JSON format
361
361
  *
@@ -35,7 +35,7 @@ export class TelemetryService extends BaseStreamService {
35
35
  */
36
36
  subscribe(params) {
37
37
  const sources = arrayUnique(params.sources).map((item) => item.trim()) ?? [];
38
- if (!params?.callsigns && params?.query) {
38
+ if (!params?.callsigns && !params?.query) {
39
39
  this.logger.error('Error: params need to contain either callsigns or query', params);
40
40
  throw new RocosError('Params need to contain either callsigns or query.', errorCodes.TELEMETRY_SERVICE_ERROR);
41
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dronedeploy/rocos-js-sdk",
3
- "version": "3.0.14",
3
+ "version": "3.0.15-hotifix.1",
4
4
  "description": "Javascript SDK for rocos",
5
5
  "main": "cjs/index.js",
6
6
  "module": "esm/index.js",