@dronedeploy/rocos-js-sdk 3.0.13 → 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.
- package/cjs/helpers/index.d.ts +1 -0
- package/cjs/helpers/index.js +1 -0
- package/cjs/services/ProfileService.d.ts +1 -1
- package/cjs/services/ProfileService.js +1 -1
- package/cjs/services/TelemetryService.js +1 -1
- package/esm/helpers/index.d.ts +1 -0
- package/esm/helpers/index.js +1 -0
- package/esm/services/ProfileService.d.ts +1 -1
- package/esm/services/ProfileService.js +1 -1
- package/esm/services/TelemetryService.js +1 -1
- package/package.json +1 -1
package/cjs/helpers/index.d.ts
CHANGED
package/cjs/helpers/index.js
CHANGED
@@ -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<
|
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
|
}
|
package/esm/helpers/index.d.ts
CHANGED
package/esm/helpers/index.js
CHANGED
@@ -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<
|
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
|
}
|