@blues-inc/notehub-js 1.0.27-beta.10 → 1.0.27-beta.12
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 +1 -16
- package/dist/ApiClient.js +2 -2
- package/dist/api/AlertApi.js +1 -1
- package/dist/api/AuthorizationApi.js +1 -1
- package/dist/api/BillingAccountApi.js +1 -1
- package/dist/api/DeviceApi.js +1 -1
- package/dist/api/EventApi.js +1 -1
- package/dist/api/MonitorApi.js +1 -1
- package/dist/api/ProjectApi.js +1 -1
- package/dist/api/RouteApi.js +1 -1
- package/dist/index.js +0 -56
- package/dist/model/Alert.js +1 -1
- package/dist/model/AlertDataInner.js +1 -1
- package/dist/model/AlertNotificationsInner.js +1 -1
- package/dist/model/Aws.js +1 -1
- package/dist/model/Azure.js +1 -1
- package/dist/model/BillingAccount.js +1 -1
- package/dist/model/Body.js +1 -1
- package/dist/model/CloneProjectRequest.js +1 -1
- package/dist/model/Contact.js +1 -1
- package/dist/model/CreateFleetRequest.js +1 -1
- package/dist/model/CreateMonitor.js +1 -1
- package/dist/model/CreateProductRequest.js +1 -1
- package/dist/model/CreateProjectRequest.js +1 -1
- package/dist/model/CurrentFirmware.js +1 -1
- package/dist/model/DFUEnv.js +1 -1
- package/dist/model/DFUState.js +1 -1
- package/dist/model/DeleteDeviceFleetsRequest.js +1 -1
- package/dist/model/Device.js +1 -1
- package/dist/model/DeviceDfuHistory.js +1 -1
- package/dist/model/DeviceDfuHistoryPage.js +1 -1
- package/dist/model/DeviceDfuStateMachine.js +1 -1
- package/dist/model/DeviceDfuStateMachineNode.js +1 -1
- package/dist/model/DeviceDfuStatus.js +1 -1
- package/dist/model/DeviceDfuStatusCurrent.js +1 -1
- package/dist/model/DeviceDfuStatusPage.js +1 -1
- package/dist/model/DeviceSession.js +1 -1
- package/dist/model/DeviceTowerInfo.js +1 -1
- package/dist/model/DeviceUsage.js +1 -1
- package/dist/model/DfuActionRequest.js +1 -1
- package/dist/model/EmailNotification.js +1 -1
- package/dist/model/EnvironmentVariables.js +1 -1
- package/dist/model/Error.js +1 -1
- package/dist/model/Event.js +1 -1
- package/dist/model/Firmware.js +1 -1
- package/dist/model/FirmwareInfo.js +1 -1
- package/dist/model/Fleet.js +1 -1
- package/dist/model/GetAlerts200Response.js +1 -1
- package/dist/model/GetBillingAccounts200Response.js +1 -1
- package/dist/model/GetDeviceEnvironmentVariables200Response.js +1 -1
- package/dist/model/GetDeviceHealthLog200Response.js +1 -1
- package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +1 -1
- package/dist/model/GetDeviceLatest200Response.js +1 -1
- package/dist/model/GetDevicePublicKey200Response.js +1 -1
- package/dist/model/GetDeviceSessions200Response.js +1 -1
- package/dist/model/GetProjectDevicePublicKeys200Response.js +1 -1
- package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +1 -1
- package/dist/model/GetProjectDevices200Response.js +1 -1
- package/dist/model/GetProjectEvents200Response.js +1 -1
- package/dist/model/GetProjectEventsByCursor200Response.js +1 -1
- package/dist/model/GetProjectFleets200Response.js +1 -1
- package/dist/model/GetProjectMembers200Response.js +1 -1
- package/dist/model/GetProjectProducts200Response.js +1 -1
- package/dist/model/GetProjects200Response.js +1 -1
- package/dist/model/GetRouteLogsByRoute200ResponseInner.js +1 -1
- package/dist/model/Google.js +1 -1
- package/dist/model/HandleNoteChanges200Response.js +1 -1
- package/dist/model/HandleNoteGet200Response.js +1 -1
- package/dist/model/HandleNoteSignal200Response.js +1 -1
- package/dist/model/HandleNotefileChanges200Response.js +1 -1
- package/dist/model/HandleNotefileChangesPending200Response.js +1 -1
- package/dist/model/HandleNotefileDeleteRequest.js +1 -1
- package/dist/model/Http.js +1 -1
- package/dist/model/HttpFilter.js +1 -1
- package/dist/model/HttpTransform.js +1 -1
- package/dist/model/Location.js +1 -1
- package/dist/model/Login200Response.js +1 -1
- package/dist/model/LoginRequest.js +1 -1
- package/dist/model/Monitor.js +1 -1
- package/dist/model/MonitorAlertRoutesInner.js +1 -1
- package/dist/model/Mqtt.js +1 -1
- package/dist/model/Note.js +1 -1
- package/dist/model/NotehubRoute.js +1 -1
- package/dist/model/NotehubRouteSchema.js +1 -1
- package/dist/model/PostProvisionProjectDeviceRequest.js +1 -1
- package/dist/model/Product.js +1 -1
- package/dist/model/Project.js +1 -1
- package/dist/model/ProjectMember.js +1 -1
- package/dist/model/Proxy.js +1 -1
- package/dist/model/PutDeviceFleetsRequest.js +1 -1
- package/dist/model/Radresponder.js +1 -1
- package/dist/model/Slack.js +1 -1
- package/dist/model/SlackBearerNotification.js +1 -1
- package/dist/model/SlackWebHookNotification.js +1 -1
- package/dist/model/Snowflake.js +1 -1
- package/dist/model/SnowflakeTransform.js +1 -1
- package/dist/model/Thingworx.js +1 -1
- package/dist/model/TowerLocation.js +1 -1
- package/dist/model/Twilio.js +1 -1
- package/dist/model/UpdateFleetRequest.js +1 -1
- package/dist/model/UploadMetadata.js +1 -1
- package/dist/model/UserDbRoute.js +1 -1
- package/dist/model/UserDfuStateMachine.js +1 -1
- package/dist/model/UserDfuStateMachineStatus.js +1 -1
- package/dist/model/UserFirmwareInfo.js +1 -1
- package/package.json +1 -1
- package/dist/api/StorageServiceApi.js +0 -449
- package/dist/model/CreateUpdateDataRepository.js +0 -103
- package/dist/model/DataField.js +0 -92
- package/dist/model/DataRepository.js +0 -116
- package/dist/model/DataSet.js +0 -164
- package/dist/model/DataSetField.js +0 -134
- package/dist/model/QuestionDataResponseLineChart.js +0 -204
- package/dist/model/QuestionDataResponseMap.js +0 -143
|
@@ -1,449 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
-
var _CreateUpdateDataRepository = _interopRequireDefault(require("../model/CreateUpdateDataRepository"));
|
|
9
|
-
var _DataRepository = _interopRequireDefault(require("../model/DataRepository"));
|
|
10
|
-
var _DataSet = _interopRequireDefault(require("../model/DataSet"));
|
|
11
|
-
var _Error = _interopRequireDefault(require("../model/Error"));
|
|
12
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
13
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
14
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
15
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
16
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
17
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
19
|
-
* Notehub API
|
|
20
|
-
* The OpenAPI definition for the Notehub.io API.
|
|
21
|
-
*
|
|
22
|
-
* The version of the OpenAPI document: 1.2.0
|
|
23
|
-
* Contact: engineering@blues.io
|
|
24
|
-
*
|
|
25
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
26
|
-
* https://openapi-generator.tech
|
|
27
|
-
* Do not edit the class manually.
|
|
28
|
-
*
|
|
29
|
-
*/
|
|
30
|
-
/**
|
|
31
|
-
* StorageService service.
|
|
32
|
-
* @module api/StorageServiceApi
|
|
33
|
-
* @version 1.0.27-beta.10
|
|
34
|
-
*/
|
|
35
|
-
var StorageServiceApi = exports["default"] = /*#__PURE__*/function () {
|
|
36
|
-
/**
|
|
37
|
-
* Constructs a new StorageServiceApi.
|
|
38
|
-
* @alias module:api/StorageServiceApi
|
|
39
|
-
* @class
|
|
40
|
-
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
41
|
-
* default to {@link module:ApiClient#instance} if unspecified.
|
|
42
|
-
*/
|
|
43
|
-
function StorageServiceApi(apiClient) {
|
|
44
|
-
_classCallCheck(this, StorageServiceApi);
|
|
45
|
-
this.apiClient = apiClient || _ApiClient["default"].instance;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Create a new analytics dataset using the provided mappings and field selections
|
|
50
|
-
* @param {String} repositoryUID
|
|
51
|
-
* @param {module:model/DataSet} dataSet
|
|
52
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DataSet} and HTTP response
|
|
53
|
-
*/
|
|
54
|
-
return _createClass(StorageServiceApi, [{
|
|
55
|
-
key: "createStorageServiceAnalyticsDatasetWithHttpInfo",
|
|
56
|
-
value: function createStorageServiceAnalyticsDatasetWithHttpInfo(repositoryUID, dataSet) {
|
|
57
|
-
var postBody = dataSet;
|
|
58
|
-
// verify the required parameter 'repositoryUID' is set
|
|
59
|
-
if (repositoryUID === undefined || repositoryUID === null) {
|
|
60
|
-
throw new _Error["default"]("Missing the required parameter 'repositoryUID' when calling createStorageServiceAnalyticsDataset");
|
|
61
|
-
}
|
|
62
|
-
// verify the required parameter 'dataSet' is set
|
|
63
|
-
if (dataSet === undefined || dataSet === null) {
|
|
64
|
-
throw new _Error["default"]("Missing the required parameter 'dataSet' when calling createStorageServiceAnalyticsDataset");
|
|
65
|
-
}
|
|
66
|
-
var pathParams = {
|
|
67
|
-
'repositoryUID': repositoryUID
|
|
68
|
-
};
|
|
69
|
-
var queryParams = {};
|
|
70
|
-
var headerParams = {};
|
|
71
|
-
var formParams = {};
|
|
72
|
-
var authNames = ['api_key'];
|
|
73
|
-
var contentTypes = ['application/json'];
|
|
74
|
-
var accepts = ['application/json'];
|
|
75
|
-
var returnType = _DataSet["default"];
|
|
76
|
-
return this.apiClient.callApi('/v1/repositories/{repositoryUID}/datasets', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Create a new analytics dataset using the provided mappings and field selections
|
|
81
|
-
* @param {String} repositoryUID
|
|
82
|
-
* @param {module:model/DataSet} dataSet
|
|
83
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DataSet}
|
|
84
|
-
*/
|
|
85
|
-
}, {
|
|
86
|
-
key: "createStorageServiceAnalyticsDataset",
|
|
87
|
-
value: function createStorageServiceAnalyticsDataset(repositoryUID, dataSet) {
|
|
88
|
-
return this.createStorageServiceAnalyticsDatasetWithHttpInfo(repositoryUID, dataSet).then(function (response_and_data) {
|
|
89
|
-
return response_and_data.data;
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Create a new analytics dataset using the provided mappings and field selections
|
|
95
|
-
* @param {module:model/CreateUpdateDataRepository} createUpdateDataRepository
|
|
96
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DataRepository} and HTTP response
|
|
97
|
-
*/
|
|
98
|
-
}, {
|
|
99
|
-
key: "createStorageServiceRepositoryWithHttpInfo",
|
|
100
|
-
value: function createStorageServiceRepositoryWithHttpInfo(createUpdateDataRepository) {
|
|
101
|
-
var postBody = createUpdateDataRepository;
|
|
102
|
-
// verify the required parameter 'createUpdateDataRepository' is set
|
|
103
|
-
if (createUpdateDataRepository === undefined || createUpdateDataRepository === null) {
|
|
104
|
-
throw new _Error["default"]("Missing the required parameter 'createUpdateDataRepository' when calling createStorageServiceRepository");
|
|
105
|
-
}
|
|
106
|
-
var pathParams = {};
|
|
107
|
-
var queryParams = {};
|
|
108
|
-
var headerParams = {};
|
|
109
|
-
var formParams = {};
|
|
110
|
-
var authNames = ['api_key'];
|
|
111
|
-
var contentTypes = ['application/json'];
|
|
112
|
-
var accepts = ['application/json'];
|
|
113
|
-
var returnType = _DataRepository["default"];
|
|
114
|
-
return this.apiClient.callApi('/v1/repositories', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Create a new analytics dataset using the provided mappings and field selections
|
|
119
|
-
* @param {module:model/CreateUpdateDataRepository} createUpdateDataRepository
|
|
120
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DataRepository}
|
|
121
|
-
*/
|
|
122
|
-
}, {
|
|
123
|
-
key: "createStorageServiceRepository",
|
|
124
|
-
value: function createStorageServiceRepository(createUpdateDataRepository) {
|
|
125
|
-
return this.createStorageServiceRepositoryWithHttpInfo(createUpdateDataRepository).then(function (response_and_data) {
|
|
126
|
-
return response_and_data.data;
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* Delete an analytics dataset
|
|
132
|
-
* @param {String} repositoryUID
|
|
133
|
-
* @param {String} name The name of the data set
|
|
134
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
135
|
-
*/
|
|
136
|
-
}, {
|
|
137
|
-
key: "deleteStorageServiceAnalyticsDatasetWithHttpInfo",
|
|
138
|
-
value: function deleteStorageServiceAnalyticsDatasetWithHttpInfo(repositoryUID, name) {
|
|
139
|
-
var postBody = null;
|
|
140
|
-
// verify the required parameter 'repositoryUID' is set
|
|
141
|
-
if (repositoryUID === undefined || repositoryUID === null) {
|
|
142
|
-
throw new _Error["default"]("Missing the required parameter 'repositoryUID' when calling deleteStorageServiceAnalyticsDataset");
|
|
143
|
-
}
|
|
144
|
-
// verify the required parameter 'name' is set
|
|
145
|
-
if (name === undefined || name === null) {
|
|
146
|
-
throw new _Error["default"]("Missing the required parameter 'name' when calling deleteStorageServiceAnalyticsDataset");
|
|
147
|
-
}
|
|
148
|
-
var pathParams = {
|
|
149
|
-
'repositoryUID': repositoryUID,
|
|
150
|
-
'name': name
|
|
151
|
-
};
|
|
152
|
-
var queryParams = {};
|
|
153
|
-
var headerParams = {};
|
|
154
|
-
var formParams = {};
|
|
155
|
-
var authNames = ['api_key'];
|
|
156
|
-
var contentTypes = [];
|
|
157
|
-
var accepts = ['application/json'];
|
|
158
|
-
var returnType = null;
|
|
159
|
-
return this.apiClient.callApi('/v1/repositories/{repositoryUID}/datasets/{datasetNameParam}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* Delete an analytics dataset
|
|
164
|
-
* @param {String} repositoryUID
|
|
165
|
-
* @param {String} name The name of the data set
|
|
166
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
167
|
-
*/
|
|
168
|
-
}, {
|
|
169
|
-
key: "deleteStorageServiceAnalyticsDataset",
|
|
170
|
-
value: function deleteStorageServiceAnalyticsDataset(repositoryUID, name) {
|
|
171
|
-
return this.deleteStorageServiceAnalyticsDatasetWithHttpInfo(repositoryUID, name).then(function (response_and_data) {
|
|
172
|
-
return response_and_data.data;
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* Delete an analytics dataset
|
|
178
|
-
* @param {String} repositoryUID
|
|
179
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
180
|
-
*/
|
|
181
|
-
}, {
|
|
182
|
-
key: "deleteStorageServiceRepositoryWithHttpInfo",
|
|
183
|
-
value: function deleteStorageServiceRepositoryWithHttpInfo(repositoryUID) {
|
|
184
|
-
var postBody = null;
|
|
185
|
-
// verify the required parameter 'repositoryUID' is set
|
|
186
|
-
if (repositoryUID === undefined || repositoryUID === null) {
|
|
187
|
-
throw new _Error["default"]("Missing the required parameter 'repositoryUID' when calling deleteStorageServiceRepository");
|
|
188
|
-
}
|
|
189
|
-
var pathParams = {
|
|
190
|
-
'repositoryUID': repositoryUID
|
|
191
|
-
};
|
|
192
|
-
var queryParams = {};
|
|
193
|
-
var headerParams = {};
|
|
194
|
-
var formParams = {};
|
|
195
|
-
var authNames = ['api_key'];
|
|
196
|
-
var contentTypes = [];
|
|
197
|
-
var accepts = ['application/json'];
|
|
198
|
-
var returnType = null;
|
|
199
|
-
return this.apiClient.callApi('/v1/repositories/{repositoryUID}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* Delete an analytics dataset
|
|
204
|
-
* @param {String} repositoryUID
|
|
205
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
206
|
-
*/
|
|
207
|
-
}, {
|
|
208
|
-
key: "deleteStorageServiceRepository",
|
|
209
|
-
value: function deleteStorageServiceRepository(repositoryUID) {
|
|
210
|
-
return this.deleteStorageServiceRepositoryWithHttpInfo(repositoryUID).then(function (response_and_data) {
|
|
211
|
-
return response_and_data.data;
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
/**
|
|
216
|
-
* Get the details of an analytics dataset
|
|
217
|
-
* @param {String} repositoryUID
|
|
218
|
-
* @param {String} name The name of the data set
|
|
219
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DataSet} and HTTP response
|
|
220
|
-
*/
|
|
221
|
-
}, {
|
|
222
|
-
key: "getStorageServiceAnalyticsDatasetWithHttpInfo",
|
|
223
|
-
value: function getStorageServiceAnalyticsDatasetWithHttpInfo(repositoryUID, name) {
|
|
224
|
-
var postBody = null;
|
|
225
|
-
// verify the required parameter 'repositoryUID' is set
|
|
226
|
-
if (repositoryUID === undefined || repositoryUID === null) {
|
|
227
|
-
throw new _Error["default"]("Missing the required parameter 'repositoryUID' when calling getStorageServiceAnalyticsDataset");
|
|
228
|
-
}
|
|
229
|
-
// verify the required parameter 'name' is set
|
|
230
|
-
if (name === undefined || name === null) {
|
|
231
|
-
throw new _Error["default"]("Missing the required parameter 'name' when calling getStorageServiceAnalyticsDataset");
|
|
232
|
-
}
|
|
233
|
-
var pathParams = {
|
|
234
|
-
'repositoryUID': repositoryUID,
|
|
235
|
-
'name': name
|
|
236
|
-
};
|
|
237
|
-
var queryParams = {};
|
|
238
|
-
var headerParams = {};
|
|
239
|
-
var formParams = {};
|
|
240
|
-
var authNames = ['api_key'];
|
|
241
|
-
var contentTypes = [];
|
|
242
|
-
var accepts = ['application/json'];
|
|
243
|
-
var returnType = _DataSet["default"];
|
|
244
|
-
return this.apiClient.callApi('/v1/repositories/{repositoryUID}/datasets/{datasetNameParam}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
/**
|
|
248
|
-
* Get the details of an analytics dataset
|
|
249
|
-
* @param {String} repositoryUID
|
|
250
|
-
* @param {String} name The name of the data set
|
|
251
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DataSet}
|
|
252
|
-
*/
|
|
253
|
-
}, {
|
|
254
|
-
key: "getStorageServiceAnalyticsDataset",
|
|
255
|
-
value: function getStorageServiceAnalyticsDataset(repositoryUID, name) {
|
|
256
|
-
return this.getStorageServiceAnalyticsDatasetWithHttpInfo(repositoryUID, name).then(function (response_and_data) {
|
|
257
|
-
return response_and_data.data;
|
|
258
|
-
});
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
/**
|
|
262
|
-
* Get Raw data for a Storage Service Project
|
|
263
|
-
* @param {String} repositoryUID
|
|
264
|
-
* @param {String} start Start of the time range, as an ISO-8601 date or relative to now (e.g. -1y). Relative dates follow the Postgres INTERVAL format.
|
|
265
|
-
* @param {Object} opts Optional parameters
|
|
266
|
-
* @param {String} opts.end End of the time range, as an ISO-8601 date or relative to now. If omitted, current time is used.
|
|
267
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link File} and HTTP response
|
|
268
|
-
*/
|
|
269
|
-
}, {
|
|
270
|
-
key: "getStorageServiceDataWithHttpInfo",
|
|
271
|
-
value: function getStorageServiceDataWithHttpInfo(repositoryUID, start, opts) {
|
|
272
|
-
opts = opts || {};
|
|
273
|
-
var postBody = null;
|
|
274
|
-
// verify the required parameter 'repositoryUID' is set
|
|
275
|
-
if (repositoryUID === undefined || repositoryUID === null) {
|
|
276
|
-
throw new _Error["default"]("Missing the required parameter 'repositoryUID' when calling getStorageServiceData");
|
|
277
|
-
}
|
|
278
|
-
// verify the required parameter 'start' is set
|
|
279
|
-
if (start === undefined || start === null) {
|
|
280
|
-
throw new _Error["default"]("Missing the required parameter 'start' when calling getStorageServiceData");
|
|
281
|
-
}
|
|
282
|
-
var pathParams = {
|
|
283
|
-
'repositoryUID': repositoryUID
|
|
284
|
-
};
|
|
285
|
-
var queryParams = {
|
|
286
|
-
'start': start,
|
|
287
|
-
'end': opts['end']
|
|
288
|
-
};
|
|
289
|
-
var headerParams = {};
|
|
290
|
-
var formParams = {};
|
|
291
|
-
var authNames = ['api_key'];
|
|
292
|
-
var contentTypes = [];
|
|
293
|
-
var accepts = ['text/csv', 'application/json'];
|
|
294
|
-
var returnType = File;
|
|
295
|
-
return this.apiClient.callApi('/v1/repositories/{repositoryUID}/data', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
/**
|
|
299
|
-
* Get Raw data for a Storage Service Project
|
|
300
|
-
* @param {String} repositoryUID
|
|
301
|
-
* @param {String} start Start of the time range, as an ISO-8601 date or relative to now (e.g. -1y). Relative dates follow the Postgres INTERVAL format.
|
|
302
|
-
* @param {Object} opts Optional parameters
|
|
303
|
-
* @param {String} opts.end End of the time range, as an ISO-8601 date or relative to now. If omitted, current time is used.
|
|
304
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link File}
|
|
305
|
-
*/
|
|
306
|
-
}, {
|
|
307
|
-
key: "getStorageServiceData",
|
|
308
|
-
value: function getStorageServiceData(repositoryUID, start, opts) {
|
|
309
|
-
return this.getStorageServiceDataWithHttpInfo(repositoryUID, start, opts).then(function (response_and_data) {
|
|
310
|
-
return response_and_data.data;
|
|
311
|
-
});
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
* Query an analytics dataset with support for time ranges, field selection, filtering, and location-based queries
|
|
316
|
-
* @param {String} repositoryUID
|
|
317
|
-
* @param {String} name The name of the data set
|
|
318
|
-
* @param {String} start Start of the time range, as an ISO-8601 date or relative to now (e.g. -1y). Relative dates follow the Postgres INTERVAL format.
|
|
319
|
-
* @param {Object} opts Optional parameters
|
|
320
|
-
* @param {String} opts.end End of the time range, as an ISO-8601 date or relative to now. If omitted, current time is used.
|
|
321
|
-
* @param {String} opts.select Comma separated list of fields to include. Supports aggregate functions (avg, sum, min, max, count, most_recent).
|
|
322
|
-
* @param {String} opts.where Additional filters using boolean logic mini-language (e.g. and.(device.eq.dev:123,temp.gt.100))
|
|
323
|
-
* @param {String} opts.aggregateWindow Aggregate results into buckets for a time duration, expressed in Postgres INTERVAL format
|
|
324
|
-
* @param {String} opts.locationNear Latitude and Longitude for location-based filtering, location_near_radius must also be provided
|
|
325
|
-
* @param {Number} opts.locationNearRadius Distance from location_near in meters, location_near must also be provided
|
|
326
|
-
* @param {String} opts.locationState State-based location lookup
|
|
327
|
-
* @param {String} opts.locationInGeom GeoJSON for spatial queries
|
|
328
|
-
* @param {Number} opts.limit Limit the number of results returned
|
|
329
|
-
* @param {String} opts.orderBy Order the results by a field
|
|
330
|
-
* @param {Boolean} opts.distinct Return only distinct results
|
|
331
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link File} and HTTP response
|
|
332
|
-
*/
|
|
333
|
-
}, {
|
|
334
|
-
key: "queryAnalyticsDatasetWithHttpInfo",
|
|
335
|
-
value: function queryAnalyticsDatasetWithHttpInfo(repositoryUID, name, start, opts) {
|
|
336
|
-
opts = opts || {};
|
|
337
|
-
var postBody = null;
|
|
338
|
-
// verify the required parameter 'repositoryUID' is set
|
|
339
|
-
if (repositoryUID === undefined || repositoryUID === null) {
|
|
340
|
-
throw new _Error["default"]("Missing the required parameter 'repositoryUID' when calling queryAnalyticsDataset");
|
|
341
|
-
}
|
|
342
|
-
// verify the required parameter 'name' is set
|
|
343
|
-
if (name === undefined || name === null) {
|
|
344
|
-
throw new _Error["default"]("Missing the required parameter 'name' when calling queryAnalyticsDataset");
|
|
345
|
-
}
|
|
346
|
-
// verify the required parameter 'start' is set
|
|
347
|
-
if (start === undefined || start === null) {
|
|
348
|
-
throw new _Error["default"]("Missing the required parameter 'start' when calling queryAnalyticsDataset");
|
|
349
|
-
}
|
|
350
|
-
var pathParams = {
|
|
351
|
-
'repositoryUID': repositoryUID,
|
|
352
|
-
'name': name
|
|
353
|
-
};
|
|
354
|
-
var queryParams = {
|
|
355
|
-
'start': start,
|
|
356
|
-
'end': opts['end'],
|
|
357
|
-
'select': opts['select'],
|
|
358
|
-
'where': opts['where'],
|
|
359
|
-
'aggregate_window': opts['aggregateWindow'],
|
|
360
|
-
'location_near': opts['locationNear'],
|
|
361
|
-
'location_near_radius': opts['locationNearRadius'],
|
|
362
|
-
'location_state': opts['locationState'],
|
|
363
|
-
'location_in_geom': opts['locationInGeom'],
|
|
364
|
-
'limit': opts['limit'],
|
|
365
|
-
'order_by': opts['orderBy'],
|
|
366
|
-
'distinct': opts['distinct']
|
|
367
|
-
};
|
|
368
|
-
var headerParams = {};
|
|
369
|
-
var formParams = {};
|
|
370
|
-
var authNames = ['api_key'];
|
|
371
|
-
var contentTypes = [];
|
|
372
|
-
var accepts = ['text/csv', 'application/json'];
|
|
373
|
-
var returnType = File;
|
|
374
|
-
return this.apiClient.callApi('/v1/repositories/{repositoryUID}/datasets/{datasetNameParam}/query', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
/**
|
|
378
|
-
* Query an analytics dataset with support for time ranges, field selection, filtering, and location-based queries
|
|
379
|
-
* @param {String} repositoryUID
|
|
380
|
-
* @param {String} name The name of the data set
|
|
381
|
-
* @param {String} start Start of the time range, as an ISO-8601 date or relative to now (e.g. -1y). Relative dates follow the Postgres INTERVAL format.
|
|
382
|
-
* @param {Object} opts Optional parameters
|
|
383
|
-
* @param {String} opts.end End of the time range, as an ISO-8601 date or relative to now. If omitted, current time is used.
|
|
384
|
-
* @param {String} opts.select Comma separated list of fields to include. Supports aggregate functions (avg, sum, min, max, count, most_recent).
|
|
385
|
-
* @param {String} opts.where Additional filters using boolean logic mini-language (e.g. and.(device.eq.dev:123,temp.gt.100))
|
|
386
|
-
* @param {String} opts.aggregateWindow Aggregate results into buckets for a time duration, expressed in Postgres INTERVAL format
|
|
387
|
-
* @param {String} opts.locationNear Latitude and Longitude for location-based filtering, location_near_radius must also be provided
|
|
388
|
-
* @param {Number} opts.locationNearRadius Distance from location_near in meters, location_near must also be provided
|
|
389
|
-
* @param {String} opts.locationState State-based location lookup
|
|
390
|
-
* @param {String} opts.locationInGeom GeoJSON for spatial queries
|
|
391
|
-
* @param {Number} opts.limit Limit the number of results returned
|
|
392
|
-
* @param {String} opts.orderBy Order the results by a field
|
|
393
|
-
* @param {Boolean} opts.distinct Return only distinct results
|
|
394
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link File}
|
|
395
|
-
*/
|
|
396
|
-
}, {
|
|
397
|
-
key: "queryAnalyticsDataset",
|
|
398
|
-
value: function queryAnalyticsDataset(repositoryUID, name, start, opts) {
|
|
399
|
-
return this.queryAnalyticsDatasetWithHttpInfo(repositoryUID, name, start, opts).then(function (response_and_data) {
|
|
400
|
-
return response_and_data.data;
|
|
401
|
-
});
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
/**
|
|
405
|
-
* Update an analytics dataset using the provided mappings and field selections
|
|
406
|
-
* @param {String} repositoryUID
|
|
407
|
-
* @param {module:model/CreateUpdateDataRepository} createUpdateDataRepository
|
|
408
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/DataRepository} and HTTP response
|
|
409
|
-
*/
|
|
410
|
-
}, {
|
|
411
|
-
key: "updateStorageServiceAnalyticsDatasetWithHttpInfo",
|
|
412
|
-
value: function updateStorageServiceAnalyticsDatasetWithHttpInfo(repositoryUID, createUpdateDataRepository) {
|
|
413
|
-
var postBody = createUpdateDataRepository;
|
|
414
|
-
// verify the required parameter 'repositoryUID' is set
|
|
415
|
-
if (repositoryUID === undefined || repositoryUID === null) {
|
|
416
|
-
throw new _Error["default"]("Missing the required parameter 'repositoryUID' when calling updateStorageServiceAnalyticsDataset");
|
|
417
|
-
}
|
|
418
|
-
// verify the required parameter 'createUpdateDataRepository' is set
|
|
419
|
-
if (createUpdateDataRepository === undefined || createUpdateDataRepository === null) {
|
|
420
|
-
throw new _Error["default"]("Missing the required parameter 'createUpdateDataRepository' when calling updateStorageServiceAnalyticsDataset");
|
|
421
|
-
}
|
|
422
|
-
var pathParams = {
|
|
423
|
-
'repositoryUID': repositoryUID
|
|
424
|
-
};
|
|
425
|
-
var queryParams = {};
|
|
426
|
-
var headerParams = {};
|
|
427
|
-
var formParams = {};
|
|
428
|
-
var authNames = ['api_key'];
|
|
429
|
-
var contentTypes = ['application/json'];
|
|
430
|
-
var accepts = ['application/json'];
|
|
431
|
-
var returnType = _DataRepository["default"];
|
|
432
|
-
return this.apiClient.callApi('/v1/repositories/{repositoryUID}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
/**
|
|
436
|
-
* Update an analytics dataset using the provided mappings and field selections
|
|
437
|
-
* @param {String} repositoryUID
|
|
438
|
-
* @param {module:model/CreateUpdateDataRepository} createUpdateDataRepository
|
|
439
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/DataRepository}
|
|
440
|
-
*/
|
|
441
|
-
}, {
|
|
442
|
-
key: "updateStorageServiceAnalyticsDataset",
|
|
443
|
-
value: function updateStorageServiceAnalyticsDataset(repositoryUID, createUpdateDataRepository) {
|
|
444
|
-
return this.updateStorageServiceAnalyticsDatasetWithHttpInfo(repositoryUID, createUpdateDataRepository).then(function (response_and_data) {
|
|
445
|
-
return response_and_data.data;
|
|
446
|
-
});
|
|
447
|
-
}
|
|
448
|
-
}]);
|
|
449
|
-
}();
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
11
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
12
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
13
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
15
|
-
* Notehub API
|
|
16
|
-
* The OpenAPI definition for the Notehub.io API.
|
|
17
|
-
*
|
|
18
|
-
* The version of the OpenAPI document: 1.2.0
|
|
19
|
-
* Contact: engineering@blues.io
|
|
20
|
-
*
|
|
21
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
22
|
-
* https://openapi-generator.tech
|
|
23
|
-
* Do not edit the class manually.
|
|
24
|
-
*
|
|
25
|
-
*/
|
|
26
|
-
/**
|
|
27
|
-
* The CreateUpdateDataRepository model module.
|
|
28
|
-
* @module model/CreateUpdateDataRepository
|
|
29
|
-
* @version 1.0.27-beta.10
|
|
30
|
-
*/
|
|
31
|
-
var CreateUpdateDataRepository = /*#__PURE__*/function () {
|
|
32
|
-
/**
|
|
33
|
-
* Constructs a new <code>CreateUpdateDataRepository</code>.
|
|
34
|
-
* @alias module:model/CreateUpdateDataRepository
|
|
35
|
-
*/
|
|
36
|
-
function CreateUpdateDataRepository() {
|
|
37
|
-
_classCallCheck(this, CreateUpdateDataRepository);
|
|
38
|
-
CreateUpdateDataRepository.initialize(this);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Initializes the fields of this object.
|
|
43
|
-
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
44
|
-
* Only for internal use.
|
|
45
|
-
*/
|
|
46
|
-
return _createClass(CreateUpdateDataRepository, null, [{
|
|
47
|
-
key: "initialize",
|
|
48
|
-
value: function initialize(obj) {}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Constructs a <code>CreateUpdateDataRepository</code> from a plain JavaScript object, optionally creating a new instance.
|
|
52
|
-
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
53
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
54
|
-
* @param {module:model/CreateUpdateDataRepository} obj Optional instance to populate.
|
|
55
|
-
* @return {module:model/CreateUpdateDataRepository} The populated <code>CreateUpdateDataRepository</code> instance.
|
|
56
|
-
*/
|
|
57
|
-
}, {
|
|
58
|
-
key: "constructFromObject",
|
|
59
|
-
value: function constructFromObject(data, obj) {
|
|
60
|
-
if (data) {
|
|
61
|
-
obj = obj || new CreateUpdateDataRepository();
|
|
62
|
-
if (data.hasOwnProperty('fleetUIDs')) {
|
|
63
|
-
obj['fleetUIDs'] = _ApiClient["default"].convertToType(data['fleetUIDs'], ['String']);
|
|
64
|
-
}
|
|
65
|
-
if (data.hasOwnProperty('projectUIDs')) {
|
|
66
|
-
obj['projectUIDs'] = _ApiClient["default"].convertToType(data['projectUIDs'], ['String']);
|
|
67
|
-
}
|
|
68
|
-
} else if (data === null) {
|
|
69
|
-
return null;
|
|
70
|
-
}
|
|
71
|
-
return obj;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Validates the JSON data with respect to <code>CreateUpdateDataRepository</code>.
|
|
76
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
77
|
-
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>CreateUpdateDataRepository</code>.
|
|
78
|
-
*/
|
|
79
|
-
}, {
|
|
80
|
-
key: "validateJSON",
|
|
81
|
-
value: function validateJSON(data) {
|
|
82
|
-
// ensure the json data is an array
|
|
83
|
-
if (!Array.isArray(data['fleetUIDs'])) {
|
|
84
|
-
throw new Error("Expected the field `fleetUIDs` to be an array in the JSON data but got " + data['fleetUIDs']);
|
|
85
|
-
}
|
|
86
|
-
// ensure the json data is an array
|
|
87
|
-
if (!Array.isArray(data['projectUIDs'])) {
|
|
88
|
-
throw new Error("Expected the field `projectUIDs` to be an array in the JSON data but got " + data['projectUIDs']);
|
|
89
|
-
}
|
|
90
|
-
return true;
|
|
91
|
-
}
|
|
92
|
-
}]);
|
|
93
|
-
}();
|
|
94
|
-
/**
|
|
95
|
-
* @member {Array.<String>} fleetUIDs
|
|
96
|
-
*/
|
|
97
|
-
CreateUpdateDataRepository.prototype['fleetUIDs'] = undefined;
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* @member {Array.<String>} projectUIDs
|
|
101
|
-
*/
|
|
102
|
-
CreateUpdateDataRepository.prototype['projectUIDs'] = undefined;
|
|
103
|
-
var _default = exports["default"] = CreateUpdateDataRepository;
|
package/dist/model/DataField.js
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _ApiClient = _interopRequireDefault(require("../ApiClient"));
|
|
8
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
10
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
11
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
12
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
13
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
|
|
15
|
-
* Notehub API
|
|
16
|
-
* The OpenAPI definition for the Notehub.io API.
|
|
17
|
-
*
|
|
18
|
-
* The version of the OpenAPI document: 1.2.0
|
|
19
|
-
* Contact: engineering@blues.io
|
|
20
|
-
*
|
|
21
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
22
|
-
* https://openapi-generator.tech
|
|
23
|
-
* Do not edit the class manually.
|
|
24
|
-
*
|
|
25
|
-
*/
|
|
26
|
-
/**
|
|
27
|
-
* The DataField model module.
|
|
28
|
-
* @module model/DataField
|
|
29
|
-
* @version 1.0.27-beta.10
|
|
30
|
-
*/
|
|
31
|
-
var DataField = /*#__PURE__*/function () {
|
|
32
|
-
/**
|
|
33
|
-
* Constructs a new <code>DataField</code>.
|
|
34
|
-
* @alias module:model/DataField
|
|
35
|
-
*/
|
|
36
|
-
function DataField() {
|
|
37
|
-
_classCallCheck(this, DataField);
|
|
38
|
-
DataField.initialize(this);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Initializes the fields of this object.
|
|
43
|
-
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
44
|
-
* Only for internal use.
|
|
45
|
-
*/
|
|
46
|
-
return _createClass(DataField, null, [{
|
|
47
|
-
key: "initialize",
|
|
48
|
-
value: function initialize(obj) {}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Constructs a <code>DataField</code> from a plain JavaScript object, optionally creating a new instance.
|
|
52
|
-
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
53
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
54
|
-
* @param {module:model/DataField} obj Optional instance to populate.
|
|
55
|
-
* @return {module:model/DataField} The populated <code>DataField</code> instance.
|
|
56
|
-
*/
|
|
57
|
-
}, {
|
|
58
|
-
key: "constructFromObject",
|
|
59
|
-
value: function constructFromObject(data, obj) {
|
|
60
|
-
if (data) {
|
|
61
|
-
obj = obj || new DataField();
|
|
62
|
-
if (data.hasOwnProperty('name')) {
|
|
63
|
-
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
|
|
64
|
-
}
|
|
65
|
-
} else if (data === null) {
|
|
66
|
-
return null;
|
|
67
|
-
}
|
|
68
|
-
return obj;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Validates the JSON data with respect to <code>DataField</code>.
|
|
73
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
74
|
-
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>DataField</code>.
|
|
75
|
-
*/
|
|
76
|
-
}, {
|
|
77
|
-
key: "validateJSON",
|
|
78
|
-
value: function validateJSON(data) {
|
|
79
|
-
// ensure the json data is a string
|
|
80
|
-
if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) {
|
|
81
|
-
throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']);
|
|
82
|
-
}
|
|
83
|
-
return true;
|
|
84
|
-
}
|
|
85
|
-
}]);
|
|
86
|
-
}();
|
|
87
|
-
/**
|
|
88
|
-
* The name of the field
|
|
89
|
-
* @member {String} name
|
|
90
|
-
*/
|
|
91
|
-
DataField.prototype['name'] = undefined;
|
|
92
|
-
var _default = exports["default"] = DataField;
|