8000 Regenerate client from commit 56d12e8 of spec repo (#26) · arduino/iot-client-js@9250db5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9250db5

Browse files
github-actions[bot]Fabrizio Mirabito
authored and
Fabrizio Mirabito
committed
Regenerate client from commit 56d12e8 of spec repo (#26)
1 parent 6d02273 commit 9250db5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+896
-104
lines changed

.apigentools-info

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"additional_stamps": [],
3-
"apigentools_version": "0.6.0",
4-
"codegen_version": "4.1.3",
3+
"apigentools_version": "0.8.0",
4+
"codegen_version": "4.2.2",
55
"info_version": "1",
66
"image": null,
7-
"spec_repo_commit": "584212d"
7+
"spec_repo_commit": "56d12e8"
88
}

.openapi-generator/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.1.3
1+
4.2.2

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"name": "@arduino/arduino-iot-client",
3-
"version": "1.0.1",
3+
"version": "1.1.0",
44
"description": "Collection_of_all_public_API_endpoints_",
55
"license": "GPLv3",
66
"main": "dist/index.js",
77
"scripts": {
88
"build": "babel src -d dist",
99
"prepack": "npm run build",
10-
"test": "mocha --compilers js:@babel/register --recursive"
10+
"test": "mocha --require @babel/register --recursive"
1111
},
1212
"browser": {
1313
"fs": false

src/ApiClient.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import querystring from "querystring";
1717

1818
/**
1919
* @module ApiClient
20-
* @version 1.0.1
20+
* @version 1.1.0
2121
*/
2222

2323
/**
@@ -352,7 +352,7 @@ class ApiClient {
352352
* @param {Array.<String>} accepts An array of acceptable response MIME types.
353353
* @param {(String|Array|ObjectFunction)} returnType The required type to return; can be a string for simple types or the
354354
* constructor for a complex type.
355-
* @param {String} apiBasePath base path defined in the operation/path level to override the default one
355+
* @param {String} apiBasePath base path defined in the operation/path level to override the default one
356356
* @returns {Promise} A {@link https://www.promisejs.org/|Promise} object.
357357
*/
358358
callApi(path, httpMethod, pathParams,
@@ -449,8 +449,8 @@ class ApiClient {
449449
err.statusText = response.statusText;
450450
err.body = response.body;
451451
err.response = response;
452-
err.error = error;
453-
}
452+
}
453+
err.error = error;
454454

455455
reject(err);
456456
} else {

src/api/DevicesV2Api.js

Lines changed: 69 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
import ApiClient from "../ApiClient";
1616
import ArduinoDevicev2 from '../model/ArduinoDevicev2';
17+
import ArduinoDevicev2EventProperties from '../model/ArduinoDevicev2EventProperties';
1718
import ArduinoDevicev2properties from '../model/ArduinoDevicev2properties';
1819
import ArduinoDevicev2propertyvalues from '../model/ArduinoDevicev2propertyvalues';
1920
import CreateDevicesV2Payload from '../model/CreateDevicesV2Payload';
@@ -24,7 +25,7 @@ import PropertiesValues from '../model/PropertiesValues';
2425
/**
2526
* DevicesV2 service.
2627
* @module api/DevicesV2Api
27-
* @version 1.0.1
28+
* @version 1.1.0
2829
*/
2930
export default class DevicesV2Api {
3031

@@ -65,7 +66,7 @@ export default class DevicesV2Api {
6566

6667
let authNames = ['oauth2'];
6768
let contentTypes = ['application/json'];
68-
let accepts = ['application/vnd.arduino.devicev2+json', 'application/vnd.goa.error+json'];
69+
let accepts = ['application/json'];
6970
let returnType = ArduinoDevicev2;
7071
return this.apiClient.callApi(
7172
'/v2/devices', 'PUT',
@@ -136,12 +137,69 @@ export default class DevicesV2Api {
136137
}
137138

138139

140+
/**
141+
* getEvents devices_v2
142+
* GET device events
143+
* @param {String} id The id of the device
144+
* @param {Object} opts Optional parameters
145+
* @param {Number} opts.limit The number of events to select
146+
* @param {String} opts.start The time at which to start selecting events
147+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoDevicev2EventProperties} and HTTP response
148+
*/
149+
devicesV2GetEventsWithHttpInfo(id, opts) {
150+
opts = opts || {};
151+
let postBody = null;
152+
// verify the required parameter 'id' is set
153+
if (id === undefined || id === null) {
154+
throw new Error("Missing the required parameter 'id' when calling devicesV2GetEvents");
155+
}
156+
157+
let pathParams = {
158+
'id': id
159+
};
160+
let queryParams = {
161+
'limit': opts['limit'],
162+
'start': opts['start']
163+
};
164+
let headerParams = {
165+
};
166+
let formParams = {
167+
};
168+
169+
let authNames = ['oauth2'];
170+
let contentTypes = [];
171+
let accepts = ['application/json'];
172+
let returnType = ArduinoDevicev2EventProperties;
173+
return this.apiClient.callApi(
174+
'/v2/devices/{id}/events', 'GET',
175+
pathParams, queryParams, headerParams, formParams, postBody,
176+
authNames, contentTypes, accepts, returnType, null
177+
);
178+
}
179+
180+
/**
181+
* getEvents devices_v2
182+
* GET device events
183+
* @param {String} id The id of the device
184+
* @param {Object} opts Optional parameters
185+
* @param {Number} opts.limit The number of events to select
186+
* @param {String} opts.start The time at which to start selecting events
187+
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoDevicev2EventProperties}
188+
*/
189+
devicesV2GetEvents(id, opts) {
190+
return this.devicesV2GetEventsWithHttpInfo(id, opts)
191+
.then(function(response_and_data) {
192+
return response_and_data.data;
193+
});
194+
}
195+
196+
139197
/**
140198
* getProperties devices_v2
141199
* GET device properties
142200
* @param {String} id The id of the device
143201
* @param {Object} opts Optional parameters
144-
* @param {Boolean} opts.showDeleted If true, shows the soft deleted properties (default to false)
202+
* @param {Boolean} opts.showDeleted If true, shows the soft deleted properties
145203
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoDevicev2properties} and HTTP response
146204
*/
147205
devicesV2GetPropertiesWithHttpInfo(id, opts) {
@@ -165,7 +223,7 @@ export default class DevicesV2Api {
165223

166224
let authNames = ['oauth2'];
167225
let contentTypes = [];
168-
let accepts = ['application/vnd.arduino.devicev2properties+json'];
226+
let accepts = ['application/json'];
169227
let returnType = ArduinoDevicev2properties;
170228
return this.apiClient.callApi(
171229
'/v2/devices/{id}/properties', 'GET',
@@ -179,7 +237,7 @@ export default class DevicesV2Api {
179237
* GET device properties
180238
* @param {String} id The id of the device
181239
* @param {Object} opts Optional parameters
182-
* @param {Boolean} opts.showDeleted If true, shows the soft deleted properties (default to false)
240+
* @param {Boolean} opts.showDeleted If true, shows the soft deleted properties
183241
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoDevicev2properties}
184242
*/
185243
devicesV2GetProperties(id, opts) {
@@ -194,7 +252,7 @@ export default class DevicesV2Api {
194252
* list devices_v2
195253
* Returns the list of devices associated to the user
196254
* @param {Object} opts Optional parameters
197-
* @param {Boolean} opts.acrossUserIds If true, returns all the devices (default to false)
255+
* @param {Boolean} opts.acrossUserIds If true, returns all the devices
198256
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/ArduinoDevicev2>} and HTTP response
199257
*/
200258
devicesV2ListWithHttpInfo(opts) {
@@ -213,7 +271,7 @@ export default class DevicesV2Api {
213271

214272
let authNames = ['oauth2'];
215273
let contentTypes = [];
216-
let accepts = ['application/vnd.arduino.devicev2+json; type=collection'];
274+
let accepts = ['application/json'];
217275
let returnType = [ArduinoDevicev2];
218276
return this.apiClient.callApi(
219277
'/v2/devices', 'GET',
@@ -226,7 +284,7 @@ export default class DevicesV2Api {
226284
* list devices_v2
227285
* Returns the list of devices associated to the user
228286
* @param {Object} opts Optional parameters
229-
* @param {Boolean} opts.acrossUserIds If true, returns all the devices (default to false)
287+
* @param {Boolean} opts.acrossUserIds If true, returns all the devices
230288
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/ArduinoDevicev2>}
231289
*/
232290
devicesV2List(opts) {
@@ -262,7 +320,7 @@ export default class DevicesV2Api {
262320

263321
let authNames = ['oauth2'];
264322
let contentTypes = [];
265-
let accepts = ['application/vnd.arduino.devicev2+json'];
323+
let accepts = ['application/json'];
266324
let returnType = ArduinoDevicev2;
267325
return this.apiClient.callApi(
268326
'/v2/devices/{id}', 'GET',
@@ -322,7 +380,7 @@ export default class DevicesV2Api {
322380

323381
let authNames = ['oauth2'];
324382
let contentTypes = [];
325-
let accepts = ['application/vnd.arduino.devicev2propertyvalues+json'];
383+
let accepts = ['application/json'];
326384
let returnType = ArduinoDevicev2propertyvalues;
327385
return this.apiClient.callApi(
328386
'/v2/devices/{id}/properties/{pid}', 'GET',
@@ -379,7 +437,7 @@ export default class DevicesV2Api {
379437

380438
let authNames = ['oauth2'];
381439
let contentTypes = ['application/json'];
382-
let accepts = ['application/vnd.arduino.devicev2+json', 'application/vnd.goa.error+json'];
440+
let accepts = ['application/json'];
383441
let returnType = ArduinoDevicev2;
384442
return this.apiClient.callApi(
385443
'/v2/devices/{id}', 'POST',

src/api/PropertiesV2Api.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import PropertyValue from '../model/PropertyValue';
2121
/**
2222
* PropertiesV2 service.
2323
* @module api/PropertiesV2Api
24-
* @version 1.0.1
24+
* @version 1.1.0
2525
*/
2626
export default class PropertiesV2Api {
2727

@@ -68,7 +68,7 @@ export default class PropertiesV2Api {
6868

6969
let authNames = ['oauth2'];
7070
let contentTypes = ['application/json'];
71-
let accepts = ['application/vnd.arduino.property+json', 'application/vnd.goa.error+json'];
71+
let accepts = ['application/json'];
7272
let returnType = ArduinoProperty;
7373
return this.apiClient.callApi(
7474
'/v2/things/{id}/properties', 'PUT',
@@ -98,7 +98,7 @@ export default class PropertiesV2Api {
9898
* @param {String} id The id of the thing
9999
* @param {String} pid The id of the property
100100
* @param {Object} opts Optional parameters
101-
* @param {Boolean} opts.force If true, hard delete the property (default to false)
101+
* @param {Boolean} opts.force If true, hard delete the property
102102
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
103103
*/
104104
propertiesV2DeleteWithHttpInfo(id, pid, opts) {
@@ -127,7 +127,7 @@ export default class PropertiesV2Api {
127127

128128
let authNames = ['oauth2'];
129129
let contentTypes = [];
130-
let accepts = ['application/vnd.goa.error+json', 'text/plain'];
130+
let accepts = ['application/json'];
131131
let returnType = null;
132132
return this.apiClient.callApi(
133133
'/v2/things/{id}/properties/{pid}', 'DELETE',
@@ -142,7 +142,7 @@ export default class PropertiesV2Api {
142142
* @param {String} id The id of the thing
143143
* @param {String} pid The id of the property
144144
* @param {Object} opts Optional parameters
145-
* @param {Boolean} opts.force If true, hard delete the property (default to false)
145+
* @param {Boolean} opts.force If true, hard delete the property
146146
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
147147
*/
148148
propertiesV2Delete(id, pid, opts) {
@@ -158,7 +158,7 @@ export default class PropertiesV2Api {
158158
* Returns the list of properties associated to the thing
159159
* @param {String} id The id of the thing
160160
* @param {Object} opts Optional parameters
161-
* @param {Boolean} opts.showDeleted If true, shows the soft deleted properties (default to false)
161+
* @param {Boolean} opts.showDeleted If true, shows the soft deleted properties
162162
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/ArduinoProperty>} and HTTP response
163163
*/
164164
propertiesV2ListWithHttpInfo(id, opts) {
@@ -182,7 +182,7 @@ export default class PropertiesV2Api {
182182

183183
let authNames = ['oauth2'];
184184
let contentTypes = [];
185-
let accepts = ['application/vnd.arduino.property+json; type=collection', 'application/vnd.goa.error+json'];
185+
let accepts = ['application/json'];
186186
let returnType = [ArduinoProperty];
187187
return this.apiClient.callApi(
188188
'/v2/things/{id}/properties', 'GET',
@@ -196,7 +196,7 @@ export default class PropertiesV2Api {
196196
* Returns the list of properties associated to the thing
197197
* @param {String} id The id of the thing
198198
* @param {Object} opts Optional parameters
199-
* @param {Boolean} opts.showDeleted If true, shows the soft deleted properties (default to false)
199+
* @param {Boolean} opts.showDeleted If true, shows the soft deleted properties
200200
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/ArduinoProperty>}
201201
*/
202202
propertiesV2List(id, opts) {
@@ -243,7 +243,7 @@ export default class PropertiesV2Api {
243243

244244
let authNames = ['oauth2'];
245245
let contentTypes = ['application/json'];
246-
let accepts = ['application/vnd.goa.error+json', 'text/plain'];
246+
let accepts = ['application/json'];
247247
let returnType = null;
248248
return this.apiClient.callApi(
249249
'/v2/things/{id}/properties/{pid}/publish', 'PUT',
@@ -274,7 +274,7 @@ export default class PropertiesV2Api {
274274
* @param {String} id The id of the thing
275275
* @param {String} pid The id of the property
276276
* @param {Object} opts Optional parameters
277-
* @param {Boolean} opts.showDeleted If true, shows the soft deleted properties (default to false)
277+
* @param {Boolean} opts.showDeleted If true, shows the soft deleted properties
278278
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoProperty} and HTTP response
279279
*/
280280
propertiesV2ShowWithHttpInfo(id, pid, opts) {
@@ -303,7 +303,7 @@ export default class PropertiesV2Api {
303303

304304
let authNames = ['oauth2'];
305305
let contentTypes = [];
306-
let accepts = ['application/vnd.arduino.property+json', 'application/vnd.goa.error+json'];
306+
let accepts = ['application/json'];
307307
let returnType = ArduinoProperty;
308308
return this.apiClient.callApi(
309309
'/v2/things/{id}/properties/{pid}', 'GET',
@@ -318,7 +318,7 @@ export default class PropertiesV2Api {
318318
* @param {String} id The id of the thing
319319
* @param {String} pid The id of the property
320320
* @param {Object} opts Optional parameters
321-
* @param {Boolean} opts.showDeleted If true, shows the soft deleted properties (default to false)
321+
* @param {Boolean} opts.showDeleted If true, shows the soft deleted properties
322322
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoProperty}
323323
*/
324324
propertiesV2Show(id, pid, opts) {
@@ -365,7 +365,7 @@ export default class PropertiesV2Api {
365365

366366
let authNames = ['oauth2'];
367367
let contentTypes = ['application/json'];
368-
let accepts = ['application/vnd.arduino.property+json', 'application/vnd.goa.error+json'];
368+
let accepts = ['application/json'];
369369
let returnType = ArduinoProperty;
370370
return this.apiClient.callApi(
371371
'/v2/things/{id}/properties/{pid}', 'POST',

src/api/SeriesV2Api.js

Lines changed: 4 additions & 4 deletions
5D2D
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import Error from '../model/Error';
2424
/**
2525
* SeriesV2 service.
2626
* @module api/SeriesV2Api
27-
* @version 1.0.1
27+
* @version 1.1.0
2828
*/
2929
export default class SeriesV2Api {
3030

@@ -65,7 +65,7 @@ export default class SeriesV2Api {
6565

6666
let authNames = ['oauth2'];
6767
let contentTypes = ['application/json'];
68-
let accepts = ['application/vnd.arduino.series.batch+json', 'application/vnd.goa.error+json'];
68+
let accepts = ['application/json'];
6969
let returnType = ArduinoSeriesBatch;
7070
return this.apiClient.callApi(
7171
'/v2/series/batch_query', 'POST',
@@ -112,7 +112,7 @@ export default class SeriesV2Api {
112112

113113
let authNames = ['oauth2'];
114114
let contentTypes = ['application/json'];
115-
let accepts = ['application/vnd.arduino.series.raw.batch+json', 'application/vnd.goa.error+json'];
115+
let accepts = ['application/json'];
116116
let returnType = ArduinoSeriesRawBatch;
117117
return this.apiClient.callApi(
118118
'/v2/series/batch_query_raw', 'POST',
@@ -159,7 +159,7 @@ export default class SeriesV2Api {
159159

160160
let authNames = ['oauth2'];
161161
let contentTypes = ['application/json'];
162-
let accepts = ['application/vnd.arduino.series.raw.batch.lastvalue+json', 'application/vnd.goa.error+json'];
162+
let accepts = ['application/json'];
163163
let returnType = ArduinoSeriesRawBatchLastvalue;
164164
return this.apiClient.callApi(
165165
'/v2/series/batch_query_raw/lastvalue', 'POST',

0 commit comments

Comments
 (0)
0