@edgeiq/edgeiq-api-js 1.5.2 → 1.5.4

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.
@@ -19,6 +19,7 @@ export declare const ResponseErrorsNames: {
19
19
  unEditableIntegration: string;
20
20
  integrationMissinValues: string;
21
21
  createError: string;
22
+ validationError: string;
22
23
  unexpected: string;
23
24
  deviceLocationMissingValues: string;
24
25
  };
package/dist/constants.js CHANGED
@@ -22,6 +22,7 @@ exports.ResponseErrorsNames = {
22
22
  unEditableIntegration: 'Uneditable Integration type',
23
23
  integrationMissinValues: 'Integration missing required values',
24
24
  createError: 'Unable to create resource',
25
+ validationError: 'Unable to validate resource',
25
26
  unexpected: 'Unexpected error',
26
27
  deviceLocationMissingValues: 'Device location observation missing required values',
27
28
  };
@@ -88,6 +88,9 @@ var handleOtherErrors = function (error) {
88
88
  error.response.data = error.response.data.messages.join('\n');
89
89
  return Promise.reject(createError(error.response.data, constants_1.ResponseErrorsNames.deviceConfig));
90
90
  }
91
+ else if (error.response.data.error === constants_1.ResponseErrorsNames.validationError) {
92
+ return Promise.reject(createError(error.response.data.messages.join('\n'), constants_1.ResponseErrorsNames.validationError));
93
+ }
91
94
  action = constants_1.MethodsActions.put;
92
95
  break;
93
96
  case 'post':
@@ -16,6 +16,8 @@ export interface ScheduledJobInput {
16
16
  company_id: string;
17
17
  }
18
18
  export interface ScheduledJob extends ScheduledJobInput, Base {
19
+ next_run_time: string;
20
+ last_run_time: string;
19
21
  }
20
22
  export interface ScheduledJobsFilters extends Filters {
21
23
  name?: Filter;
@@ -356,4 +356,4 @@ exports.TestScheduledJob = {
356
356
  command_id: '648a07c58fc32100018b1d34',
357
357
  company_id: parentCompanyId,
358
358
  };
359
- exports.EmptyScheduledJob = __assign(__assign({}, exports.TestScheduledJob), baseModel);
359
+ exports.EmptyScheduledJob = __assign(__assign(__assign({}, exports.TestScheduledJob), baseModel), { last_run_time: '', next_run_time: '' });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edgeiq/edgeiq-api-js",
3
- "version": "1.5.2",
3
+ "version": "1.5.4",
4
4
  "author": "EdgeIQ",
5
5
  "license": "ISC",
6
6
  "description": "This project presents EdgeIQ API SDK.",