opengate-js 16.1.0 → 16.1.2
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/README.md +2 -1
- package/dist/{opengate-api-bower-16.1.0.js → opengate-api-bower-16.1.2.js} +15812 -15867
- package/dist/opengate-api-bower-16.1.2.js.map +6 -0
- package/dist/opengate-api-bower-16.1.2.min.js +116 -0
- package/dist/opengate-api-bower-16.1.2.min.js.map +6 -0
- package/dist/opengate-api-npm.mjs +45 -49
- package/dist/opengate-api-npm.mjs.map +2 -2
- package/dist/src/iot/catalog/Datastream.js.map +1 -1
- package/dist/src/operations/Operations.js +2 -2
- package/dist/src/operations/Operations.js.map +2 -2
- package/dist/src/operations/catalog/BaseOperationBuilder.js +2 -2
- package/dist/src/operations/catalog/BaseOperationBuilder.js.map +2 -2
- package/dist/src/operations/catalog/period/ExecuteEachBuilder.js +2 -2
- package/dist/src/operations/catalog/period/ExecuteEachBuilder.js.map +2 -2
- package/dist/src/operations/catalog/period/PeriodicityUpdateBuilder.js +3 -3
- package/dist/src/operations/catalog/period/PeriodicityUpdateBuilder.js.map +2 -2
- package/dist/src/operations/catalog/period/pattern/ByGeneric.js +2 -2
- package/dist/src/operations/catalog/period/pattern/ByGeneric.js.map +2 -2
- package/dist/src/searching/Search.js +2 -3
- package/dist/src/searching/Search.js.map +2 -2
- package/dist/src/searching/SearchWithoutLimit.js +2 -3
- package/dist/src/searching/SearchWithoutLimit.js.map +2 -2
- package/dist/src/searching/WPSearch.js +2 -3
- package/dist/src/searching/WPSearch.js.map +2 -2
- package/dist/src/searching/builder/DatapointsSearchBuilder.js +2 -2
- package/dist/src/searching/builder/DatapointsSearchBuilder.js.map +2 -2
- package/dist/src/searching/builder/SoftwaresSearchBuilder.js +2 -2
- package/dist/src/searching/builder/SoftwaresSearchBuilder.js.map +2 -2
- package/dist/src/util/NorthAmpliaREST.js +1 -2
- package/dist/src/util/NorthAmpliaREST.js.map +2 -2
- package/package.json +4 -6
- package/src/iot/catalog/Datastream.js +0 -1
- package/src/operations/Operations.js +2 -2
- package/src/operations/catalog/BaseOperationBuilder.js +2 -2
- package/src/operations/catalog/period/ExecuteEachBuilder.js +2 -2
- package/src/operations/catalog/period/PeriodicityUpdateBuilder.js +3 -3
- package/src/operations/catalog/period/pattern/ByGeneric.js +2 -2
- package/src/searching/Search.js +2 -3
- package/src/searching/SearchWithoutLimit.js +2 -3
- package/src/searching/WPSearch.js +2 -3
- package/src/searching/builder/DatapointsSearchBuilder.js +2 -2
- package/src/searching/builder/SoftwaresSearchBuilder.js +2 -2
- package/src/util/NorthAmpliaREST.js +1 -2
- package/types/src/users/Users.d.ts +1 -1
- package/dist/opengate-api-bower-16.1.0.js.map +0 -6
- package/dist/opengate-api-bower-16.1.0.min.js +0 -123
- package/dist/opengate-api-bower-16.1.0.min.js.map +0 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import _ from 'lodash';
|
|
4
4
|
import moment from 'moment';
|
|
5
5
|
|
|
6
6
|
import Operation from '../Operation';
|
|
@@ -16,7 +16,7 @@ export default class PeriodicityUpdateBuilder {
|
|
|
16
16
|
this._task = taskObj;
|
|
17
17
|
this.task_id = taskId;
|
|
18
18
|
this._resource = '/tasks/' + this.task_id;
|
|
19
|
-
this._build =
|
|
19
|
+
this._build = _.cloneDeep(this._task.job.request);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
/**
|
|
@@ -75,7 +75,7 @@ export default class PeriodicityUpdateBuilder {
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
build() {
|
|
78
|
-
let _build =
|
|
78
|
+
let _build = _.cloneDeep(this._build);
|
|
79
79
|
let postObj;
|
|
80
80
|
let errors = [];
|
|
81
81
|
if (typeof this._build.task !== 'undefined') {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import moment from 'moment';
|
|
2
|
-
import
|
|
2
|
+
import _ from 'lodash';
|
|
3
3
|
import { TIME_FORMAT } from './../../../../util/DATE_FORMAT';
|
|
4
4
|
|
|
5
5
|
/* Generic class that will be extends on ByYear, ByWeek, ByMonth*/
|
|
@@ -45,7 +45,7 @@ export default class ByGeneric {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
_create() {
|
|
48
|
-
return
|
|
48
|
+
return _.cloneDeep(this._skeleton);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
_build() {
|
package/src/searching/Search.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
import BaseSearch from './BaseSearch';
|
|
4
|
-
import merge from 'merge';
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* This class extends BaseSearch and allows requests to be made to any available resource in the OpenGate North
|
|
@@ -21,9 +20,9 @@ export default class Search extends BaseSearch {
|
|
|
21
20
|
constructor(ogapi, url, filter, limit = { limit: {} }, sort, group, select, timeout, urlParams) {
|
|
22
21
|
super(ogapi, 'search' + url, timeout);
|
|
23
22
|
this._setUrlParameters(urlParams);
|
|
24
|
-
this._postObj =
|
|
23
|
+
this._postObj = Object.assign({}, filter, limit, group, select);
|
|
25
24
|
if (typeof sort === 'object') {
|
|
26
|
-
this._postObj =
|
|
25
|
+
this._postObj = Object.assign({}, this._postObj, sort);
|
|
27
26
|
}
|
|
28
27
|
}
|
|
29
28
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
import BaseSearch from './BaseSearch';
|
|
4
|
-
import merge from 'merge';
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* This class extends BaseSearch and allows requests to be made to any available resource in the OpenGate North
|
|
@@ -21,9 +20,9 @@ export default class SearchWithoutLimit extends BaseSearch {
|
|
|
21
20
|
constructor(ogapi, url, filter, sort, group, select, timeout, urlParams) {
|
|
22
21
|
super(ogapi, 'search' + url, timeout);
|
|
23
22
|
this._setUrlParameters(urlParams);
|
|
24
|
-
this._postObj =
|
|
23
|
+
this._postObj = Object.assign({}, filter, group, select);
|
|
25
24
|
if (typeof sort === 'object') {
|
|
26
|
-
this._postObj =
|
|
25
|
+
this._postObj = Object.assign({}, this._postObj, sort);
|
|
27
26
|
}
|
|
28
27
|
}
|
|
29
28
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
import BaseSearch from './BaseSearch';
|
|
4
|
-
import merge from 'merge';
|
|
5
4
|
import q from 'q';
|
|
6
5
|
import logger from '../util/logger';
|
|
7
6
|
|
|
@@ -23,9 +22,9 @@ export default class WPSearch extends BaseSearch {
|
|
|
23
22
|
constructor(ogapi, url, filter, limit = { limit: {} }, sort, group, select, timeout, urlParams) {
|
|
24
23
|
super(ogapi, url, timeout);
|
|
25
24
|
this._setUrlParameters(urlParams);
|
|
26
|
-
this._postObj =
|
|
25
|
+
this._postObj = Object.assign({}, filter, limit, group, select);
|
|
27
26
|
if (typeof sort === 'object') {
|
|
28
|
-
this._postObj =
|
|
27
|
+
this._postObj = Object.assign({}, this._postObj, sort);
|
|
29
28
|
}
|
|
30
29
|
}
|
|
31
30
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
import SearchBuilder from './SearchBuilder';
|
|
4
|
-
import
|
|
4
|
+
import _ from 'lodash';
|
|
5
5
|
import moment from 'moment';
|
|
6
6
|
import FieldFinder from '../../util/searchingFields/FieldFinder';
|
|
7
7
|
import { DATE_FORMAT } from '../../util/DATE_FORMAT';
|
|
@@ -137,7 +137,7 @@ export default class DatapointsSearchBuilder extends SearchBuilder {
|
|
|
137
137
|
_buildFilter() {
|
|
138
138
|
let filter = { filter: {} };
|
|
139
139
|
|
|
140
|
-
let _fluentFilter =
|
|
140
|
+
let _fluentFilter = _.cloneDeep(this.fluentFilter);
|
|
141
141
|
let _customFilter = this._builderParams.filter;
|
|
142
142
|
|
|
143
143
|
//if (this.tagsFilter.length > 0){
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
import SearchWithSummaryBuilder from './SearchWithSummaryBuilder';
|
|
4
|
-
import
|
|
4
|
+
import _ from 'lodash';
|
|
5
5
|
import FieldFinder from '../../util/searchingFields/FieldFinder';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -183,7 +183,7 @@ export default class SoftwaresSearchBuilder extends SearchWithSummaryBuilder {
|
|
|
183
183
|
_buildFilter() {
|
|
184
184
|
let filter = { filter: {} };
|
|
185
185
|
|
|
186
|
-
let _fluentFilter =
|
|
186
|
+
let _fluentFilter = _.cloneDeep(this.fluentFilter);
|
|
187
187
|
let _customFilter = this._builderParams.filter;
|
|
188
188
|
|
|
189
189
|
//if (this.tagsFilter.length > 0){
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
import merge from 'merge';
|
|
4
3
|
import urlencode from 'urlencode';
|
|
5
4
|
import q from 'q';
|
|
6
5
|
import _ from 'lodash';
|
|
@@ -38,7 +37,7 @@ export default class NorthAmpliaREST {
|
|
|
38
37
|
* @param {function} backend - this is a backend selected to manage a request to Opengate North API.
|
|
39
38
|
*/
|
|
40
39
|
constructor(_options, headers) {
|
|
41
|
-
this._options = merge
|
|
40
|
+
this._options = _.merge({}, this.default(), _options);
|
|
42
41
|
this._headers = headers;
|
|
43
42
|
if (!_.isEmpty(_options.mocks)) {
|
|
44
43
|
this._applyMocks(_options.mocks);
|
|
@@ -195,6 +195,6 @@ export default class User extends BaseProvision {
|
|
|
195
195
|
*/
|
|
196
196
|
login(email: string, password: string, twoFaCode: string): Promise<any>;
|
|
197
197
|
_twoFaCode: string;
|
|
198
|
-
generateApiKey():
|
|
198
|
+
generateApiKey(): string;
|
|
199
199
|
}
|
|
200
200
|
import BaseProvision from '../provision/BaseProvision';
|