diff --git a/config.json b/config.json index acdcdfc3..3a95ed26 100644 --- a/config.json +++ b/config.json @@ -3,7 +3,7 @@ "licenseName": "MIT", "moduleName": "NotehubJs", "npmRepository": "https://registry.npmjs.org", - "projectVersion": "1.0.17", + "projectVersion": "1.0.18", "sourceFolder": "src", "usePromises": true } diff --git a/openapi.yaml b/openapi.yaml index 8d214317..754e8d2b 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -751,6 +751,43 @@ paths: default: $ref: '#/components/responses/ErrorResponse' + /v1/projects/{projectUID}/devices/{deviceUID}/provision: + post: + tags: ["project", "devices"] + operationId: postProvisionProjectDevice + description: Provision Device for a Project + security: + - api_key: [] + parameters: + - $ref: '#/components/parameters/projectUIDParam' + - $ref: '#/components/parameters/deviceUIDParam' + requestBody: + description: Provision a device to a specific ProductUID + required: true + content: + application/json: + schema: + type: object + properties: + product_uid: + type: string + description: The ProductUID that the device should use. + device_sn: + type: string + description: The serial number to assign to the device. + required: + - product_uid + responses: + "200": + description: Successful operation + content: + application/json: + schema: + type: object + default: {} + default: + $ref: '#/components/responses/ErrorResponse' + /v1/projects/{projectUID}/fleets/{fleetUID}/devices: get: tags: ["project", "fleet", "devices"] diff --git a/src/.openapi-generator/FILES b/src/.openapi-generator/FILES index 6e801eb1..ac57c665 100644 --- a/src/.openapi-generator/FILES +++ b/src/.openapi-generator/FILES @@ -64,6 +64,7 @@ docs/LoginRequest.md docs/Mqtt.md docs/Note.md docs/NotesApi.md +docs/PostProvisionProjectDeviceRequest.md docs/Product.md docs/ProductApi.md docs/Project.md @@ -156,6 +157,7 @@ src/model/Login200Response.js src/model/LoginRequest.js src/model/Mqtt.js src/model/Note.js +src/model/PostProvisionProjectDeviceRequest.js src/model/Product.js src/model/Project.js src/model/ProjectMember.js diff --git a/src/README.md b/src/README.md index fdd56082..362a9ebc 100644 --- a/src/README.md +++ b/src/README.md @@ -6,7 +6,7 @@ The OpenAPI definition for the Notehub.io API. This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: 1.0.0 -- Package version: 1.0.17 +- Package version: 1.0.18 - Build package: org.openapitools.codegen.languages.JavascriptClientCodegen For more information, please visit [https://dev.blues.io/support/](https://dev.blues.io/support/) @@ -146,6 +146,7 @@ All URIs are relative to *https://api.notefile.net* | _NotehubJs.DevicesApi_ | [**getProjectDevicePublicKeys**](docs/DevicesApi.md#getProjectDevicePublicKeys) | **GET** /v1/projects/{projectUID}/devices/public-keys | | _NotehubJs.DevicesApi_ | [**getProjectDevices**](docs/DevicesApi.md#getProjectDevices) | **GET** /v1/projects/{projectUID}/devices | | _NotehubJs.DevicesApi_ | [**getProjectFleetDevices**](docs/DevicesApi.md#getProjectFleetDevices) | **GET** /v1/projects/{projectUID}/fleets/{fleetUID}/devices | +| _NotehubJs.DevicesApi_ | [**postProvisionProjectDevice**](docs/DevicesApi.md#postProvisionProjectDevice) | **POST** /v1/projects/{projectUID}/devices/{deviceUID}/provision | | _NotehubJs.EnvironmentVariablesApi_ | [**deleteDeviceEnvironmentVariable**](docs/EnvironmentVariablesApi.md#deleteDeviceEnvironmentVariable) | **DELETE** /v1/projects/{projectUID}/devices/{deviceUID}/environment_variables/{key} | | _NotehubJs.EnvironmentVariablesApi_ | [**deleteFleetEnvironmentVariable**](docs/EnvironmentVariablesApi.md#deleteFleetEnvironmentVariable) | **DELETE** /v1/projects/{projectUID}/fleets/{fleetUID}/environment_variables/{key} | | _NotehubJs.EnvironmentVariablesApi_ | [**deleteProjectEnvironmentVariable**](docs/EnvironmentVariablesApi.md#deleteProjectEnvironmentVariable) | **DELETE** /v1/projects/{projectUID}/environment_variables/{key} | @@ -203,6 +204,7 @@ All URIs are relative to *https://api.notefile.net* | _NotehubJs.ProjectApi_ | [**getProjectMembers**](docs/ProjectApi.md#getProjectMembers) | **GET** /v1/projects/{projectUID}/members | | _NotehubJs.ProjectApi_ | [**getProjectProducts**](docs/ProjectApi.md#getProjectProducts) | **GET** /v1/projects/{projectUID}/products | | _NotehubJs.ProjectApi_ | [**getProjects**](docs/ProjectApi.md#getProjects) | **GET** /v1/projects | +| _NotehubJs.ProjectApi_ | [**postProvisionProjectDevice**](docs/ProjectApi.md#postProvisionProjectDevice) | **POST** /v1/projects/{projectUID}/devices/{deviceUID}/provision | | _NotehubJs.ProjectApi_ | [**putProjectEnvironmentVariables**](docs/ProjectApi.md#putProjectEnvironmentVariables) | **PUT** /v1/projects/{projectUID}/environment_variables | | _NotehubJs.ProjectApi_ | [**setGlobalTransformation**](docs/ProjectApi.md#setGlobalTransformation) | **POST** /v1/projects/{projectUID}/global-transformation | | _NotehubJs.RouteApi_ | [**createRoute**](docs/RouteApi.md#createRoute) | **POST** /v1/projects/{projectUID}/routes | @@ -268,6 +270,7 @@ All URIs are relative to *https://api.notefile.net* - [NotehubJs.LoginRequest](docs/LoginRequest.md) - [NotehubJs.Mqtt](docs/Mqtt.md) - [NotehubJs.Note](docs/Note.md) +- [NotehubJs.PostProvisionProjectDeviceRequest](docs/PostProvisionProjectDeviceRequest.md) - [NotehubJs.Product](docs/Product.md) - [NotehubJs.Project](docs/Project.md) - [NotehubJs.ProjectMember](docs/ProjectMember.md) diff --git a/src/docs/DevicesApi.md b/src/docs/DevicesApi.md index 2c062b4d..ba464012 100644 --- a/src/docs/DevicesApi.md +++ b/src/docs/DevicesApi.md @@ -2,13 +2,14 @@ All URIs are relative to *https://api.notefile.net* -| Method | HTTP request | Description | -| -------------------------------------------------------------------------- | ----------------------------------------------------------- | ----------- | -| [**deleteProjectDevice**](DevicesApi.md#deleteProjectDevice) | **DELETE** /v1/projects/{projectUID}/devices/{deviceUID} | -| [**getDevice**](DevicesApi.md#getDevice) | **GET** /v1/projects/{projectUID}/devices/{deviceUID} | -| [**getProjectDevicePublicKeys**](DevicesApi.md#getProjectDevicePublicKeys) | **GET** /v1/projects/{projectUID}/devices/public-keys | -| [**getProjectDevices**](DevicesApi.md#getProjectDevices) | **GET** /v1/projects/{projectUID}/devices | -| [**getProjectFleetDevices**](DevicesApi.md#getProjectFleetDevices) | **GET** /v1/projects/{projectUID}/fleets/{fleetUID}/devices | +| Method | HTTP request | Description | +| -------------------------------------------------------------------------- | ---------------------------------------------------------------- | ----------- | +| [**deleteProjectDevice**](DevicesApi.md#deleteProjectDevice) | **DELETE** /v1/projects/{projectUID}/devices/{deviceUID} | +| [**getDevice**](DevicesApi.md#getDevice) | **GET** /v1/projects/{projectUID}/devices/{deviceUID} | +| [**getProjectDevicePublicKeys**](DevicesApi.md#getProjectDevicePublicKeys) | **GET** /v1/projects/{projectUID}/devices/public-keys | +| [**getProjectDevices**](DevicesApi.md#getProjectDevices) | **GET** /v1/projects/{projectUID}/devices | +| [**getProjectFleetDevices**](DevicesApi.md#getProjectFleetDevices) | **GET** /v1/projects/{projectUID}/fleets/{fleetUID}/devices | +| [**postProvisionProjectDevice**](DevicesApi.md#postProvisionProjectDevice) | **POST** /v1/projects/{projectUID}/devices/{deviceUID}/provision | ## deleteProjectDevice @@ -255,3 +256,51 @@ apiInstance.getProjectFleetDevices(projectUID, fleetUID, opts).then((data) => { - **Content-Type**: Not defined - **Accept**: application/json + +## postProvisionProjectDevice + +> Object postProvisionProjectDevice(projectUID, deviceUID, postProvisionProjectDeviceRequest) + +Provision Device for a Project + +### Example + +```javascript +import * as NotehubJs from '@blues-inc/notehub-js'; +let defaultClient = NotehubJs.ApiClient.instance; +// Configure API key authorization: api_key +let api_key = defaultClient.authentications['api_key']; +api_key.apiKey = 'YOUR API KEY'; + +let apiInstance = new NotehubJs.DevicesApi(); +let projectUID = app:2606f411-dea6-44a0-9743-1130f57d77d8; // String | +let deviceUID = "deviceUID_example"; // String | +let postProvisionProjectDeviceRequest = new NotehubJs.PostProvisionProjectDeviceRequest(); // PostProvisionProjectDeviceRequest | Provision a device to a specific ProductUID +apiInstance.postProvisionProjectDevice(projectUID, deviceUID, postProvisionProjectDeviceRequest).then((data) => { + console.log('API called successfully. Returned data: ' + JSON.stringify(data)); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------------------------------- | ----------------------------------------------------------------------------- | ------------------------------------------- | ----- | +| **projectUID** | **String** | | +| **deviceUID** | **String** | | +| **postProvisionProjectDeviceRequest** | [**PostProvisionProjectDeviceRequest**](PostProvisionProjectDeviceRequest.md) | Provision a device to a specific ProductUID | + +### Return type + +**Object** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json diff --git a/src/docs/PostProvisionProjectDeviceRequest.md b/src/docs/PostProvisionProjectDeviceRequest.md new file mode 100644 index 00000000..0c452d5c --- /dev/null +++ b/src/docs/PostProvisionProjectDeviceRequest.md @@ -0,0 +1,8 @@ +# NotehubJs.PostProvisionProjectDeviceRequest + +## Properties + +| Name | Type | Description | Notes | +| -------------- | ---------- | ------------------------------------------ | ---------- | +| **productUid** | **String** | The ProductUID that the device should use. | +| **deviceSn** | **String** | The serial number to assign to the device. | [optional] | diff --git a/src/docs/ProjectApi.md b/src/docs/ProjectApi.md index 58fa42ca..d81c495b 100644 --- a/src/docs/ProjectApi.md +++ b/src/docs/ProjectApi.md @@ -21,6 +21,7 @@ All URIs are relative to *https://api.notefile.net* | [**getProjectMembers**](ProjectApi.md#getProjectMembers) | **GET** /v1/projects/{projectUID}/members | | [**getProjectProducts**](ProjectApi.md#getProjectProducts) | **GET** /v1/projects/{projectUID}/products | | [**getProjects**](ProjectApi.md#getProjects) | **GET** /v1/projects | +| [**postProvisionProjectDevice**](ProjectApi.md#postProvisionProjectDevice) | **POST** /v1/projects/{projectUID}/devices/{deviceUID}/provision | | [**putProjectEnvironmentVariables**](ProjectApi.md#putProjectEnvironmentVariables) | **PUT** /v1/projects/{projectUID}/environment_variables | | [**setGlobalTransformation**](ProjectApi.md#setGlobalTransformation) | **POST** /v1/projects/{projectUID}/global-transformation | @@ -849,6 +850,54 @@ This endpoint does not need any parameter. - **Content-Type**: Not defined - **Accept**: application/json +## postProvisionProjectDevice + +> Object postProvisionProjectDevice(projectUID, deviceUID, postProvisionProjectDeviceRequest) + +Provision Device for a Project + +### Example + +```javascript +import * as NotehubJs from '@blues-inc/notehub-js'; +let defaultClient = NotehubJs.ApiClient.instance; +// Configure API key authorization: api_key +let api_key = defaultClient.authentications['api_key']; +api_key.apiKey = 'YOUR API KEY'; + +let apiInstance = new NotehubJs.ProjectApi(); +let projectUID = app:2606f411-dea6-44a0-9743-1130f57d77d8; // String | +let deviceUID = "deviceUID_example"; // String | +let postProvisionProjectDeviceRequest = new NotehubJs.PostProvisionProjectDeviceRequest(); // PostProvisionProjectDeviceRequest | Provision a device to a specific ProductUID +apiInstance.postProvisionProjectDevice(projectUID, deviceUID, postProvisionProjectDeviceRequest).then((data) => { + console.log('API called successfully. Returned data: ' + JSON.stringify(data)); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + +| Name | Type | Description | Notes | +| ------------------------------------- | ----------------------------------------------------------------------------- | ------------------------------------------- | ----- | +| **projectUID** | **String** | | +| **deviceUID** | **String** | | +| **postProvisionProjectDeviceRequest** | [**PostProvisionProjectDeviceRequest**](PostProvisionProjectDeviceRequest.md) | Provision a device to a specific ProductUID | + +### Return type + +**Object** + +### Authorization + +[api_key](../README.md#api_key) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + ## putProjectEnvironmentVariables > EnvironmentVariables putProjectEnvironmentVariables(projectUID, opts) diff --git a/src/package.json b/src/package.json index 849e577e..53a14aa1 100644 --- a/src/package.json +++ b/src/package.json @@ -1,6 +1,6 @@ { "name": "@blues-inc/notehub-js", - "version": "1.0.17", + "version": "1.0.18", "description": "The OpenAPI definition for the Notehub.io API. ", "license": "MIT", "main": "dist/index.js", diff --git a/src/src/ApiClient.js b/src/src/ApiClient.js index 4c2754eb..1a234a0d 100644 --- a/src/src/ApiClient.js +++ b/src/src/ApiClient.js @@ -16,7 +16,7 @@ import querystring from "querystring"; /** * @module ApiClient - * @version 1.0.17 + * @version 1.0.18 */ /** @@ -55,7 +55,7 @@ class ApiClient { * @default {} */ this.defaultHeaders = { - "User-Agent": "OpenAPI-Generator/1.0.17/Javascript", + "User-Agent": "OpenAPI-Generator/1.0.18/Javascript", }; /** diff --git a/src/src/api/AuthorizationApi.js b/src/src/api/AuthorizationApi.js index 9480ef15..98e310e9 100644 --- a/src/src/api/AuthorizationApi.js +++ b/src/src/api/AuthorizationApi.js @@ -18,7 +18,7 @@ import LoginRequest from "../model/LoginRequest"; /** * Authorization service. * @module api/AuthorizationApi - * @version 1.0.17 + * @version 1.0.18 */ export default class AuthorizationApi { /** diff --git a/src/src/api/BillingAccountApi.js b/src/src/api/BillingAccountApi.js index 2b8be8cb..01b333b1 100644 --- a/src/src/api/BillingAccountApi.js +++ b/src/src/api/BillingAccountApi.js @@ -18,7 +18,7 @@ import GetBillingAccounts200Response from "../model/GetBillingAccounts200Respons /** * BillingAccount service. * @module api/BillingAccountApi - * @version 1.0.17 + * @version 1.0.18 */ export default class BillingAccountApi { /** diff --git a/src/src/api/DeviceApi.js b/src/src/api/DeviceApi.js index 120f0735..95168778 100644 --- a/src/src/api/DeviceApi.js +++ b/src/src/api/DeviceApi.js @@ -28,7 +28,7 @@ import PutDeviceFleetsRequest from "../model/PutDeviceFleetsRequest"; /** * Device service. * @module api/DeviceApi - * @version 1.0.17 + * @version 1.0.18 */ export default class DeviceApi { /** diff --git a/src/src/api/DevicesApi.js b/src/src/api/DevicesApi.js index a87c9333..908faa69 100644 --- a/src/src/api/DevicesApi.js +++ b/src/src/api/DevicesApi.js @@ -16,11 +16,12 @@ import Device from "../model/Device"; import Error from "../model/Error"; import GetProjectDevicePublicKeys200Response from "../model/GetProjectDevicePublicKeys200Response"; import GetProjectDevices200Response from "../model/GetProjectDevices200Response"; +import PostProvisionProjectDeviceRequest from "../model/PostProvisionProjectDeviceRequest"; /** * Devices service. * @module api/DevicesApi - * @version 1.0.17 + * @version 1.0.18 */ export default class DevicesApi { /** @@ -374,4 +375,88 @@ export default class DevicesApi { return response_and_data.data; }); } + + /** + * Provision Device for a Project + * @param {String} projectUID + * @param {String} deviceUID + * @param {module:model/PostProvisionProjectDeviceRequest} postProvisionProjectDeviceRequest Provision a device to a specific ProductUID + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response + */ + postProvisionProjectDeviceWithHttpInfo( + projectUID, + deviceUID, + postProvisionProjectDeviceRequest + ) { + let postBody = postProvisionProjectDeviceRequest; + // verify the required parameter 'projectUID' is set + if (projectUID === undefined || projectUID === null) { + throw new Error( + "Missing the required parameter 'projectUID' when calling postProvisionProjectDevice" + ); + } + // verify the required parameter 'deviceUID' is set + if (deviceUID === undefined || deviceUID === null) { + throw new Error( + "Missing the required parameter 'deviceUID' when calling postProvisionProjectDevice" + ); + } + // verify the required parameter 'postProvisionProjectDeviceRequest' is set + if ( + postProvisionProjectDeviceRequest === undefined || + postProvisionProjectDeviceRequest === null + ) { + throw new Error( + "Missing the required parameter 'postProvisionProjectDeviceRequest' when calling postProvisionProjectDevice" + ); + } + + let pathParams = { + projectUID: projectUID, + deviceUID: deviceUID, + }; + let queryParams = {}; + let headerParams = {}; + let formParams = {}; + + let authNames = ["api_key"]; + let contentTypes = ["application/json"]; + let accepts = ["application/json"]; + let returnType = Object; + return this.apiClient.callApi( + "/v1/projects/{projectUID}/devices/{deviceUID}/provision", + "POST", + pathParams, + queryParams, + headerParams, + formParams, + postBody, + authNames, + contentTypes, + accepts, + returnType, + null + ); + } + + /** + * Provision Device for a Project + * @param {String} projectUID + * @param {String} deviceUID + * @param {module:model/PostProvisionProjectDeviceRequest} postProvisionProjectDeviceRequest Provision a device to a specific ProductUID + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object} + */ + postProvisionProjectDevice( + projectUID, + deviceUID, + postProvisionProjectDeviceRequest + ) { + return this.postProvisionProjectDeviceWithHttpInfo( + projectUID, + deviceUID, + postProvisionProjectDeviceRequest + ).then(function (response_and_data) { + return response_and_data.data; + }); + } } diff --git a/src/src/api/EnvironmentVariablesApi.js b/src/src/api/EnvironmentVariablesApi.js index c10bdb84..37175bf9 100644 --- a/src/src/api/EnvironmentVariablesApi.js +++ b/src/src/api/EnvironmentVariablesApi.js @@ -19,7 +19,7 @@ import GetDeviceEnvironmentVariables200Response from "../model/GetDeviceEnvironm /** * EnvironmentVariables service. * @module api/EnvironmentVariablesApi - * @version 1.0.17 + * @version 1.0.18 */ export default class EnvironmentVariablesApi { /** diff --git a/src/src/api/EventApi.js b/src/src/api/EventApi.js index cb5495d2..22a61ed5 100644 --- a/src/src/api/EventApi.js +++ b/src/src/api/EventApi.js @@ -19,7 +19,7 @@ import GetProjectEventsByCursor200Response from "../model/GetProjectEventsByCurs /** * Event service. * @module api/EventApi - * @version 1.0.17 + * @version 1.0.18 */ export default class EventApi { /** diff --git a/src/src/api/FilesApi.js b/src/src/api/FilesApi.js index 15d7f90c..cfaf60fe 100644 --- a/src/src/api/FilesApi.js +++ b/src/src/api/FilesApi.js @@ -20,7 +20,7 @@ import HandleNotefileDeleteRequest from "../model/HandleNotefileDeleteRequest"; /** * Files service. * @module api/FilesApi - * @version 1.0.17 + * @version 1.0.18 */ export default class FilesApi { /** diff --git a/src/src/api/FleetApi.js b/src/src/api/FleetApi.js index 8a25fe8f..3a4fd7e4 100644 --- a/src/src/api/FleetApi.js +++ b/src/src/api/FleetApi.js @@ -27,7 +27,7 @@ import UpdateFleetRequest from "../model/UpdateFleetRequest"; /** * Fleet service. * @module api/FleetApi - * @version 1.0.17 + * @version 1.0.18 */ export default class FleetApi { /** diff --git a/src/src/api/NotesApi.js b/src/src/api/NotesApi.js index 5f99d990..d9ef7016 100644 --- a/src/src/api/NotesApi.js +++ b/src/src/api/NotesApi.js @@ -20,7 +20,7 @@ import Note from "../model/Note"; /** * Notes service. * @module api/NotesApi - * @version 1.0.17 + * @version 1.0.18 */ export default class NotesApi { /** diff --git a/src/src/api/ProductApi.js b/src/src/api/ProductApi.js index 8e3329fb..81ba9c6d 100644 --- a/src/src/api/ProductApi.js +++ b/src/src/api/ProductApi.js @@ -21,7 +21,7 @@ import Project from "../model/Project"; /** * Product service. * @module api/ProductApi - * @version 1.0.17 + * @version 1.0.18 */ export default class ProductApi { /** diff --git a/src/src/api/ProjectApi.js b/src/src/api/ProjectApi.js index 192ef9bf..c8372352 100644 --- a/src/src/api/ProjectApi.js +++ b/src/src/api/ProjectApi.js @@ -24,13 +24,14 @@ import GetProjectEventsByCursor200Response from "../model/GetProjectEventsByCurs import GetProjectMembers200Response from "../model/GetProjectMembers200Response"; import GetProjectProducts200Response from "../model/GetProjectProducts200Response"; import GetProjects200Response from "../model/GetProjects200Response"; +import PostProvisionProjectDeviceRequest from "../model/PostProvisionProjectDeviceRequest"; import Product from "../model/Product"; import Project from "../model/Project"; /** * Project service. * @module api/ProjectApi - * @version 1.0.17 + * @version 1.0.18 */ export default class ProjectApi { /** @@ -1075,6 +1076,90 @@ export default class ProjectApi { }); } + /** + * Provision Device for a Project + * @param {String} projectUID + * @param {String} deviceUID + * @param {module:model/PostProvisionProjectDeviceRequest} postProvisionProjectDeviceRequest Provision a device to a specific ProductUID + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Object} and HTTP response + */ + postProvisionProjectDeviceWithHttpInfo( + projectUID, + deviceUID, + postProvisionProjectDeviceRequest + ) { + let postBody = postProvisionProjectDeviceRequest; + // verify the required parameter 'projectUID' is set + if (projectUID === undefined || projectUID === null) { + throw new Error( + "Missing the required parameter 'projectUID' when calling postProvisionProjectDevice" + ); + } + // verify the required parameter 'deviceUID' is set + if (deviceUID === undefined || deviceUID === null) { + throw new Error( + "Missing the required parameter 'deviceUID' when calling postProvisionProjectDevice" + ); + } + // verify the required parameter 'postProvisionProjectDeviceRequest' is set + if ( + postProvisionProjectDeviceRequest === undefined || + postProvisionProjectDeviceRequest === null + ) { + throw new Error( + "Missing the required parameter 'postProvisionProjectDeviceRequest' when calling postProvisionProjectDevice" + ); + } + + let pathParams = { + projectUID: projectUID, + deviceUID: deviceUID, + }; + let queryParams = {}; + let headerParams = {}; + let formParams = {}; + + let authNames = ["api_key"]; + let contentTypes = ["application/json"]; + let accepts = ["application/json"]; + let returnType = Object; + return this.apiClient.callApi( + "/v1/projects/{projectUID}/devices/{deviceUID}/provision", + "POST", + pathParams, + queryParams, + headerParams, + formParams, + postBody, + authNames, + contentTypes, + accepts, + returnType, + null + ); + } + + /** + * Provision Device for a Project + * @param {String} projectUID + * @param {String} deviceUID + * @param {module:model/PostProvisionProjectDeviceRequest} postProvisionProjectDeviceRequest Provision a device to a specific ProductUID + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Object} + */ + postProvisionProjectDevice( + projectUID, + deviceUID, + postProvisionProjectDeviceRequest + ) { + return this.postProvisionProjectDeviceWithHttpInfo( + projectUID, + deviceUID, + postProvisionProjectDeviceRequest + ).then(function (response_and_data) { + return response_and_data.data; + }); + } + /** * Put environment variables of a project * @param {String} projectUID diff --git a/src/src/api/RouteApi.js b/src/src/api/RouteApi.js index 41037dfe..6b2ecaed 100644 --- a/src/src/api/RouteApi.js +++ b/src/src/api/RouteApi.js @@ -19,7 +19,7 @@ import UserDbRoute from "../model/UserDbRoute"; /** * Route service. * @module api/RouteApi - * @version 1.0.17 + * @version 1.0.18 */ export default class RouteApi { /** diff --git a/src/src/api/RouteLogsApi.js b/src/src/api/RouteLogsApi.js index be518dcf..35d80512 100644 --- a/src/src/api/RouteLogsApi.js +++ b/src/src/api/RouteLogsApi.js @@ -18,7 +18,7 @@ import GetRouteLogsByRoute200ResponseInner from "../model/GetRouteLogsByRoute200 /** * RouteLogs service. * @module api/RouteLogsApi - * @version 1.0.17 + * @version 1.0.18 */ export default class RouteLogsApi { /** diff --git a/src/src/index.js b/src/src/index.js index 7c9e656c..17041a7e 100644 --- a/src/src/index.js +++ b/src/src/index.js @@ -65,6 +65,7 @@ import Login200Response from "./model/Login200Response"; import LoginRequest from "./model/LoginRequest"; import Mqtt from "./model/Mqtt"; import Note from "./model/Note"; +import PostProvisionProjectDeviceRequest from "./model/PostProvisionProjectDeviceRequest"; import Product from "./model/Product"; import Project from "./model/Project"; import ProjectMember from "./model/ProjectMember"; @@ -125,7 +126,7 @@ import RouteLogsApi from "./api/RouteLogsApi"; * *
* @module index - * @version 1.0.17 + * @version 1.0.18 */ export { /** @@ -452,6 +453,12 @@ export { */ Note, + /** + * The PostProvisionProjectDeviceRequest model constructor. + * @property {module:model/PostProvisionProjectDeviceRequest} + */ + PostProvisionProjectDeviceRequest, + /** * The Product model constructor. * @property {module:model/Product} diff --git a/src/src/model/Aws.js b/src/src/model/Aws.js index d157b79b..d3d63b35 100644 --- a/src/src/model/Aws.js +++ b/src/src/model/Aws.js @@ -18,7 +18,7 @@ import HttpTransform from "./HttpTransform"; /** * The Aws model module. * @module model/Aws - * @version 1.0.17 + * @version 1.0.18 */ class Aws { /** diff --git a/src/src/model/Azure.js b/src/src/model/Azure.js index d70e115c..cebd7bbe 100644 --- a/src/src/model/Azure.js +++ b/src/src/model/Azure.js @@ -18,7 +18,7 @@ import HttpTransform from "./HttpTransform"; /** * The Azure model module. * @module model/Azure - * @version 1.0.17 + * @version 1.0.18 */ class Azure { /** diff --git a/src/src/model/BillingAccount.js b/src/src/model/BillingAccount.js index e375e8d3..52a93d1b 100644 --- a/src/src/model/BillingAccount.js +++ b/src/src/model/BillingAccount.js @@ -17,7 +17,7 @@ import BillingAccountRole from "./BillingAccountRole"; /** * The BillingAccount model module. * @module model/BillingAccount - * @version 1.0.17 + * @version 1.0.18 */ class BillingAccount { /** diff --git a/src/src/model/Body.js b/src/src/model/Body.js index 53b34a44..f7ac1115 100644 --- a/src/src/model/Body.js +++ b/src/src/model/Body.js @@ -16,7 +16,7 @@ import ApiClient from "../ApiClient"; /** * The Body model module. * @module model/Body - * @version 1.0.17 + * @version 1.0.18 */ class Body { /** diff --git a/src/src/model/CloneProjectRequest.js b/src/src/model/CloneProjectRequest.js index b319cc73..1dae6967 100644 --- a/src/src/model/CloneProjectRequest.js +++ b/src/src/model/CloneProjectRequest.js @@ -16,7 +16,7 @@ import ApiClient from "../ApiClient"; /** * The CloneProjectRequest model module. * @module model/CloneProjectRequest - * @version 1.0.17 + * @version 1.0.18 */ class CloneProjectRequest { /** diff --git a/src/src/model/Contact.js b/src/src/model/Contact.js index 6785970f..1f49db75 100644 --- a/src/src/model/Contact.js +++ b/src/src/model/Contact.js @@ -16,7 +16,7 @@ import ApiClient from "../ApiClient"; /** * The Contact model module. * @module model/Contact - * @version 1.0.17 + * @version 1.0.18 */ class Contact { /** diff --git a/src/src/model/CreateFleetRequest.js b/src/src/model/CreateFleetRequest.js index d399bfbf..795d265e 100644 --- a/src/src/model/CreateFleetRequest.js +++ b/src/src/model/CreateFleetRequest.js @@ -16,7 +16,7 @@ import ApiClient from "../ApiClient"; /** * The CreateFleetRequest model module. * @module model/CreateFleetRequest - * @version 1.0.17 + * @version 1.0.18 */ class CreateFleetRequest { /** diff --git a/src/src/model/CreateProductRequest.js b/src/src/model/CreateProductRequest.js index 9dc9f14d..35f456e3 100644 --- a/src/src/model/CreateProductRequest.js +++ b/src/src/model/CreateProductRequest.js @@ -16,7 +16,7 @@ import ApiClient from "../ApiClient"; /** * The CreateProductRequest model module. * @module model/CreateProductRequest - * @version 1.0.17 + * @version 1.0.18 */ class CreateProductRequest { /** diff --git a/src/src/model/CreateProjectRequest.js b/src/src/model/CreateProjectRequest.js index 95d83fb8..10c1f357 100644 --- a/src/src/model/CreateProjectRequest.js +++ b/src/src/model/CreateProjectRequest.js @@ -16,7 +16,7 @@ import ApiClient from "../ApiClient"; /** * The CreateProjectRequest model module. * @module model/CreateProjectRequest - * @version 1.0.17 + * @version 1.0.18 */ class CreateProjectRequest { /** diff --git a/src/src/model/DFUEnv.js b/src/src/model/DFUEnv.js index c1dcdcc5..7b810799 100644 --- a/src/src/model/DFUEnv.js +++ b/src/src/model/DFUEnv.js @@ -17,7 +17,7 @@ import DFUState from "./DFUState"; /** * The DFUEnv model module. * @module model/DFUEnv - * @version 1.0.17 + * @version 1.0.18 */ class DFUEnv { /** diff --git a/src/src/model/DFUState.js b/src/src/model/DFUState.js index f434f729..39bfb2b1 100644 --- a/src/src/model/DFUState.js +++ b/src/src/model/DFUState.js @@ -16,7 +16,7 @@ import ApiClient from "../ApiClient"; /** * The DFUState model module. * @module model/DFUState - * @version 1.0.17 + * @version 1.0.18 */ class DFUState { /** diff --git a/src/src/model/DeleteDeviceFleetsRequest.js b/src/src/model/DeleteDeviceFleetsRequest.js index 15cd92f5..b26c43ce 100644 --- a/src/src/model/DeleteDeviceFleetsRequest.js +++ b/src/src/model/DeleteDeviceFleetsRequest.js @@ -16,7 +16,7 @@ import ApiClient from "../ApiClient"; /** * The DeleteDeviceFleetsRequest model module. * @module model/DeleteDeviceFleetsRequest - * @version 1.0.17 + * @version 1.0.18 */ class DeleteDeviceFleetsRequest { /** diff --git a/src/src/model/Device.js b/src/src/model/Device.js index 9709b777..300db5e7 100644 --- a/src/src/model/Device.js +++ b/src/src/model/Device.js @@ -20,7 +20,7 @@ import Location from "./Location"; /** * The Device model module. * @module model/Device - * @version 1.0.17 + * @version 1.0.18 */ class Device { /** diff --git a/src/src/model/DeviceSession.js b/src/src/model/DeviceSession.js index aa8a123c..04741150 100644 --- a/src/src/model/DeviceSession.js +++ b/src/src/model/DeviceSession.js @@ -18,7 +18,7 @@ import TowerLocation from "./TowerLocation"; /** * The DeviceSession model module. * @module model/DeviceSession - * @version 1.0.17 + * @version 1.0.18 */ class DeviceSession { /** diff --git a/src/src/model/DeviceTowerInfo.js b/src/src/model/DeviceTowerInfo.js index 8eff6c62..d90784ce 100644 --- a/src/src/model/DeviceTowerInfo.js +++ b/src/src/model/DeviceTowerInfo.js @@ -16,7 +16,7 @@ import ApiClient from "../ApiClient"; /** * The DeviceTowerInfo model module. * @module model/DeviceTowerInfo - * @version 1.0.17 + * @version 1.0.18 */ class DeviceTowerInfo { /** diff --git a/src/src/model/DeviceUsage.js b/src/src/model/DeviceUsage.js index 2df2b401..0b7e3634 100644 --- a/src/src/model/DeviceUsage.js +++ b/src/src/model/DeviceUsage.js @@ -16,7 +16,7 @@ import ApiClient from "../ApiClient"; /** * The DeviceUsage model module. * @module model/DeviceUsage - * @version 1.0.17 + * @version 1.0.18 */ class DeviceUsage { /** diff --git a/src/src/model/EnvironmentVariables.js b/src/src/model/EnvironmentVariables.js index c167c0db..32529d72 100644 --- a/src/src/model/EnvironmentVariables.js +++ b/src/src/model/EnvironmentVariables.js @@ -16,7 +16,7 @@ import ApiClient from "../ApiClient"; /** * The EnvironmentVariables model module. * @module model/EnvironmentVariables - * @version 1.0.17 + * @version 1.0.18 */ class EnvironmentVariables { /** diff --git a/src/src/model/Error.js b/src/src/model/Error.js index af71d0c6..3e0e5df3 100644 --- a/src/src/model/Error.js +++ b/src/src/model/Error.js @@ -16,7 +16,7 @@ import ApiClient from "../ApiClient"; /** * The Error model module. * @module model/Error - * @version 1.0.17 + * @version 1.0.18 */ class Error { /** diff --git a/src/src/model/Event.js b/src/src/model/Event.js index 12f37222..8b333fe1 100644 --- a/src/src/model/Event.js +++ b/src/src/model/Event.js @@ -16,7 +16,7 @@ import ApiClient from "../ApiClient"; /** * The Event model module. * @module model/Event - * @version 1.0.17 + * @version 1.0.18 */ class Event { /** diff --git a/src/src/model/Fleet.js b/src/src/model/Fleet.js index c565e0f4..b786e834 100644 --- a/src/src/model/Fleet.js +++ b/src/src/model/Fleet.js @@ -16,7 +16,7 @@ import ApiClient from "../ApiClient"; /** * The Fleet model module. * @module model/Fleet - * @version 1.0.17 + * @version 1.0.18 */ class Fleet { /** diff --git a/src/src/model/GetBillingAccounts200Response.js b/src/src/model/GetBillingAccounts200Response.js index 00e51417..112b6fea 100644 --- a/src/src/model/GetBillingAccounts200Response.js +++ b/src/src/model/GetBillingAccounts200Response.js @@ -17,7 +17,7 @@ import BillingAccount from "./BillingAccount"; /** * The GetBillingAccounts200Response model module. * @module model/GetBillingAccounts200Response - * @version 1.0.17 + * @version 1.0.18 */ class GetBillingAccounts200Response { /** diff --git a/src/src/model/GetDeviceEnvironmentVariables200Response.js b/src/src/model/GetDeviceEnvironmentVariables200Response.js index 9656d719..9d6d7b05 100644 --- a/src/src/model/GetDeviceEnvironmentVariables200Response.js +++ b/src/src/model/GetDeviceEnvironmentVariables200Response.js @@ -16,7 +16,7 @@ import ApiClient from "../ApiClient"; /** * The GetDeviceEnvironmentVariables200Response model module. * @module model/GetDeviceEnvironmentVariables200Response - * @version 1.0.17 + * @version 1.0.18 */ class GetDeviceEnvironmentVariables200Response { /** diff --git a/src/src/model/GetDeviceHealthLog200Response.js b/src/src/model/GetDeviceHealthLog200Response.js index 0a0edbe0..c15be672 100644 --- a/src/src/model/GetDeviceHealthLog200Response.js +++ b/src/src/model/GetDeviceHealthLog200Response.js @@ -17,7 +17,7 @@ import GetDeviceHealthLog200ResponseHealthLogInner from "./GetDeviceHealthLog200 /** * The GetDeviceHealthLog200Response model module. * @module model/GetDeviceHealthLog200Response - * @version 1.0.17 + * @version 1.0.18 */ class GetDeviceHealthLog200Response { /** diff --git a/src/src/model/GetDeviceHealthLog200ResponseHealthLogInner.js b/src/src/model/GetDeviceHealthLog200ResponseHealthLogInner.js index c61947d7..19b4b0b9 100644 --- a/src/src/model/GetDeviceHealthLog200ResponseHealthLogInner.js +++ b/src/src/model/GetDeviceHealthLog200ResponseHealthLogInner.js @@ -16,7 +16,7 @@ import ApiClient from "../ApiClient"; /** * The GetDeviceHealthLog200ResponseHealthLogInner model module. * @module model/GetDeviceHealthLog200ResponseHealthLogInner - * @version 1.0.17 + * @version 1.0.18 */ class GetDeviceHealthLog200ResponseHealthLogInner { /** diff --git a/src/src/model/GetDeviceLatest200Response.js b/src/src/model/GetDeviceLatest200Response.js index 2953e548..72f779fd 100644 --- a/src/src/model/GetDeviceLatest200Response.js +++ b/src/src/model/GetDeviceLatest200Response.js @@ -17,7 +17,7 @@ import Event from "./Event"; /** * The GetDeviceLatest200Response model module. * @module model/GetDeviceLatest200Response - * @version 1.0.17 + * @version 1.0.18 */ class GetDeviceLatest200Response { /** diff --git a/src/src/model/GetDevicePublicKey200Response.js b/src/src/model/GetDevicePublicKey200Response.js index 480f6000..6b8acf17 100644 --- a/src/src/model/GetDevicePublicKey200Response.js +++ b/src/src/model/GetDevicePublicKey200Response.js @@ -16,7 +16,7 @@ import ApiClient from "../ApiClient"; /** * The GetDevicePublicKey200Response model module. * @module model/GetDevicePublicKey200Response - * @version 1.0.17 + * @version 1.0.18 */ class GetDevicePublicKey200Response { /** diff --git a/src/src/model/GetDeviceSessions200Response.js b/src/src/model/GetDeviceSessions200Response.js index 9e226495..e463c519 100644 --- a/src/src/model/GetDeviceSessions200Response.js +++ b/src/src/model/GetDeviceSessions200Response.js @@ -17,7 +17,7 @@ import DeviceSession from "./DeviceSession"; /** * The GetDeviceSessions200Response model module. * @module model/GetDeviceSessions200Response - * @version 1.0.17 + * @version 1.0.18 */ class GetDeviceSessions200Response { /** diff --git a/src/src/model/GetProjectDevicePublicKeys200Response.js b/src/src/model/GetProjectDevicePublicKeys200Response.js index 8801f654..6d9eb77e 100644 --- a/src/src/model/GetProjectDevicePublicKeys200Response.js +++ b/src/src/model/GetProjectDevicePublicKeys200Response.js @@ -17,7 +17,7 @@ import GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner from "./GetPro /** * The GetProjectDevicePublicKeys200Response model module. * @module model/GetProjectDevicePublicKeys200Response - * @version 1.0.17 + * @version 1.0.18 */ class GetProjectDevicePublicKeys200Response { /** diff --git a/src/src/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js b/src/src/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js index 9da82d1e..14026f00 100644 --- a/src/src/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +++ b/src/src/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js @@ -16,7 +16,7 @@ import ApiClient from "../ApiClient"; /** * The GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner model module. * @module model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner - * @version 1.0.17 + * @version 1.0.18 */ class GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner { /** diff --git a/src/src/model/GetProjectDevices200Response.js b/src/src/model/GetProjectDevices200Response.js index c7dc4b8e..7e607fab 100644 --- a/src/src/model/GetProjectDevices200Response.js +++ b/src/src/model/GetProjectDevices200Response.js @@ -17,7 +17,7 @@ import Device from "./Device"; /** * The GetProjectDevices200Response model module. * @module model/GetProjectDevices200Response - * @version 1.0.17 + * @version 1.0.18 */ class GetProjectDevices200Response { /** diff --git a/src/src/model/GetProjectEvents200Response.js b/src/src/model/GetProjectEvents200Response.js index e0f64c05..d79a9133 100644 --- a/src/src/model/GetProjectEvents200Response.js +++ b/src/src/model/GetProjectEvents200Response.js @@ -17,7 +17,7 @@ import Event from "./Event"; /** * The GetProjectEvents200Response model module. * @module model/GetProjectEvents200Response - * @version 1.0.17 + * @version 1.0.18 */ class GetProjectEvents200Response { /** diff --git a/src/src/model/GetProjectEventsByCursor200Response.js b/src/src/model/GetProjectEventsByCursor200Response.js index 05c6fe53..776a7a9e 100644 --- a/src/src/model/GetProjectEventsByCursor200Response.js +++ b/src/src/model/GetProjectEventsByCursor200Response.js @@ -17,7 +17,7 @@ import Event from "./Event"; /** * The GetProjectEventsByCursor200Response model module. * @module model/GetProjectEventsByCursor200Response - * @version 1.0.17 + * @version 1.0.18 */ class GetProjectEventsByCursor200Response { /** diff --git a/src/src/model/GetProjectFleets200Response.js b/src/src/model/GetProjectFleets200Response.js index 50f6310d..248ce654 100644 --- a/src/src/model/GetProjectFleets200Response.js +++ b/src/src/model/GetProjectFleets200Response.js @@ -17,7 +17,7 @@ import Fleet from "./Fleet"; /** * The GetProjectFleets200Response model module. * @module model/GetProjectFleets200Response - * @version 1.0.17 + * @version 1.0.18 */ class GetProjectFleets200Response { /** diff --git a/src/src/model/GetProjectMembers200Response.js b/src/src/model/GetProjectMembers200Response.js index 10a0a8d7..880c5a18 100644 --- a/src/src/model/GetProjectMembers200Response.js +++ b/src/src/model/GetProjectMembers200Response.js @@ -17,7 +17,7 @@ import ProjectMember from "./ProjectMember"; /** * The GetProjectMembers200Response model module. * @module model/GetProjectMembers200Response - * @version 1.0.17 + * @version 1.0.18 */ class GetProjectMembers200Response { /** diff --git a/src/src/model/GetProjectProducts200Response.js b/src/src/model/GetProjectProducts200Response.js index 290b6ccc..7e0bc827 100644 --- a/src/src/model/GetProjectProducts200Response.js +++ b/src/src/model/GetProjectProducts200Response.js @@ -17,7 +17,7 @@ import Product from "./Product"; /** * The GetProjectProducts200Response model module. * @module model/GetProjectProducts200Response - * @version 1.0.17 + * @version 1.0.18 */ class GetProjectProducts200Response { /** diff --git a/src/src/model/GetProjects200Response.js b/src/src/model/GetProjects200Response.js index 92bf13df..8e526548 100644 --- a/src/src/model/GetProjects200Response.js +++ b/src/src/model/GetProjects200Response.js @@ -17,7 +17,7 @@ import Project from "./Project"; /** * The GetProjects200Response model module. * @module model/GetProjects200Response - * @version 1.0.17 + * @version 1.0.18 */ class GetProjects200Response { /** diff --git a/src/src/model/GetRouteLogsByRoute200ResponseInner.js b/src/src/model/GetRouteLogsByRoute200ResponseInner.js index f0c328fe..f6bf211e 100644 --- a/src/src/model/GetRouteLogsByRoute200ResponseInner.js +++ b/src/src/model/GetRouteLogsByRoute200ResponseInner.js @@ -16,7 +16,7 @@ import ApiClient from "../ApiClient"; /** * The GetRouteLogsByRoute200ResponseInner model module. * @module model/GetRouteLogsByRoute200ResponseInner - * @version 1.0.17 + * @version 1.0.18 */ class GetRouteLogsByRoute200ResponseInner { /** diff --git a/src/src/model/Google.js b/src/src/model/Google.js index 269bd0aa..98cef3c2 100644 --- a/src/src/model/Google.js +++ b/src/src/model/Google.js @@ -18,7 +18,7 @@ import HttpTransform from "./HttpTransform"; /** * The Google model module. * @module model/Google - * @version 1.0.17 + * @version 1.0.18 */ class Google { /** diff --git a/src/src/model/HandleNoteChanges200Response.js b/src/src/model/HandleNoteChanges200Response.js index d170a857..b5fbdfa1 100644 --- a/src/src/model/HandleNoteChanges200Response.js +++ b/src/src/model/HandleNoteChanges200Response.js @@ -16,7 +16,7 @@ import ApiClient from "../ApiClient"; /** * The HandleNoteChanges200Response model module. * @module model/HandleNoteChanges200Response - * @version 1.0.17 + * @version 1.0.18 */ class HandleNoteChanges200Response { /** diff --git a/src/src/model/HandleNoteGet200Response.js b/src/src/model/HandleNoteGet200Response.js index b9ae7122..04c2e5bb 100644 --- a/src/src/model/HandleNoteGet200Response.js +++ b/src/src/model/HandleNoteGet200Response.js @@ -16,7 +16,7 @@ import ApiClient from "../ApiClient"; /** * The HandleNoteGet200Response model module. * @module model/HandleNoteGet200Response - * @version 1.0.17 + * @version 1.0.18 */ class HandleNoteGet200Response { /** diff --git a/src/src/model/HandleNoteSignal200Response.js b/src/src/model/HandleNoteSignal200Response.js index 92ebef48..a774c449 100644 --- a/src/src/model/HandleNoteSignal200Response.js +++ b/src/src/model/HandleNoteSignal200Response.js @@ -16,7 +16,7 @@ import ApiClient from "../ApiClient"; /** * The HandleNoteSignal200Response model module. * @module model/HandleNoteSignal200Response - * @version 1.0.17 + * @version 1.0.18 */ class HandleNoteSignal200Response { /** diff --git a/src/src/model/HandleNotefileChanges200Response.js b/src/src/model/HandleNotefileChanges200Response.js index 686022aa..ab515ab0 100644 --- a/src/src/model/HandleNotefileChanges200Response.js +++ b/src/src/model/HandleNotefileChanges200Response.js @@ -16,7 +16,7 @@ import ApiClient from "../ApiClient"; /** * The HandleNotefileChanges200Response model module. * @module model/HandleNotefileChanges200Response - * @version 1.0.17 + * @version 1.0.18 */ class HandleNotefileChanges200Response { /** diff --git a/src/src/model/HandleNotefileChangesPending200Response.js b/src/src/model/HandleNotefileChangesPending200Response.js index 5a7aa128..9f5f0904 100644 --- a/src/src/model/HandleNotefileChangesPending200Response.js +++ b/src/src/model/HandleNotefileChangesPending200Response.js @@ -16,7 +16,7 @@ import ApiClient from "../ApiClient"; /** * The HandleNotefileChangesPending200Response model module. * @module model/HandleNotefileChangesPending200Response - * @version 1.0.17 + * @version 1.0.18 */ class HandleNotefileChangesPending200Response { /** diff --git a/src/src/model/HandleNotefileDeleteRequest.js b/src/src/model/HandleNotefileDeleteRequest.js index c128777e..88b7792e 100644 --- a/src/src/model/HandleNotefileDeleteRequest.js +++ b/src/src/model/HandleNotefileDeleteRequest.js @@ -16,7 +16,7 @@ import ApiClient from "../ApiClient"; /** * The HandleNotefileDeleteRequest model module. * @module model/HandleNotefileDeleteRequest - * @version 1.0.17 + * @version 1.0.18 */ class HandleNotefileDeleteRequest { /** diff --git a/src/src/model/Http.js b/src/src/model/Http.js index 586b1925..f0ad2afd 100644 --- a/src/src/model/Http.js +++ b/src/src/model/Http.js @@ -18,7 +18,7 @@ import HttpTransform from "./HttpTransform"; /** * The Http model module. * @module model/Http - * @version 1.0.17 + * @version 1.0.18 */ class Http { /** diff --git a/src/src/model/HttpFilter.js b/src/src/model/HttpFilter.js index 6b99f4fc..0f54f02b 100644 --- a/src/src/model/HttpFilter.js +++ b/src/src/model/HttpFilter.js @@ -16,7 +16,7 @@ import ApiClient from "../ApiClient"; /** * The HttpFilter model module. * @module model/HttpFilter - * @version 1.0.17 + * @version 1.0.18 */ class HttpFilter { /** diff --git a/src/src/model/HttpTransform.js b/src/src/model/HttpTransform.js index a52b3a1a..0d820b39 100644 --- a/src/src/model/HttpTransform.js +++ b/src/src/model/HttpTransform.js @@ -16,7 +16,7 @@ import ApiClient from "../ApiClient"; /** * The HttpTransform model module. * @module model/HttpTransform - * @version 1.0.17 + * @version 1.0.18 */ class HttpTransform { /** diff --git a/src/src/model/Location.js b/src/src/model/Location.js index 345bfcfb..0b72b04d 100644 --- a/src/src/model/Location.js +++ b/src/src/model/Location.js @@ -16,7 +16,7 @@ import ApiClient from "../ApiClient"; /** * The Location model module. * @module model/Location - * @version 1.0.17 + * @version 1.0.18 */ class Location { /** diff --git a/src/src/model/Login200Response.js b/src/src/model/Login200Response.js index 164c1678..d90aa172 100644 --- a/src/src/model/Login200Response.js +++ b/src/src/model/Login200Response.js @@ -16,7 +16,7 @@ import ApiClient from "../ApiClient"; /** * The Login200Response model module. * @module model/Login200Response - * @version 1.0.17 + * @version 1.0.18 */ class Login200Response { /** diff --git a/src/src/model/LoginRequest.js b/src/src/model/LoginRequest.js index 1cb541b8..a374dcaf 100644 --- a/src/src/model/LoginRequest.js +++ b/src/src/model/LoginRequest.js @@ -16,7 +16,7 @@ import ApiClient from "../ApiClient"; /** * The LoginRequest model module. * @module model/LoginRequest - * @version 1.0.17 + * @version 1.0.18 */ class LoginRequest { /** diff --git a/src/src/model/Mqtt.js b/src/src/model/Mqtt.js index 10c287ee..49a63ddc 100644 --- a/src/src/model/Mqtt.js +++ b/src/src/model/Mqtt.js @@ -18,7 +18,7 @@ import HttpTransform from "./HttpTransform"; /** * The Mqtt model module. * @module model/Mqtt - * @version 1.0.17 + * @version 1.0.18 */ class Mqtt { /** diff --git a/src/src/model/Note.js b/src/src/model/Note.js index 8a74d70c..80b2463f 100644 --- a/src/src/model/Note.js +++ b/src/src/model/Note.js @@ -16,7 +16,7 @@ import ApiClient from "../ApiClient"; /** * The Note model module. * @module model/Note - * @version 1.0.17 + * @version 1.0.18 */ class Note { /** diff --git a/src/src/model/PostProvisionProjectDeviceRequest.js b/src/src/model/PostProvisionProjectDeviceRequest.js new file mode 100644 index 00000000..88d3c20e --- /dev/null +++ b/src/src/model/PostProvisionProjectDeviceRequest.js @@ -0,0 +1,128 @@ +/** + * Notehub API + * The OpenAPI definition for the Notehub.io API. + * + * The version of the OpenAPI document: 1.0.0 + * Contact: engineering@blues.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from "../ApiClient"; + +/** + * The PostProvisionProjectDeviceRequest model module. + * @module model/PostProvisionProjectDeviceRequest + * @version 1.0.18 + */ +class PostProvisionProjectDeviceRequest { + /** + * Constructs a newPostProvisionProjectDeviceRequest
.
+ * @alias module:model/PostProvisionProjectDeviceRequest
+ * @param productUid {String} The ProductUID that the device should use.
+ */
+ constructor(productUid) {
+ PostProvisionProjectDeviceRequest.initialize(this, productUid);
+ }
+
+ /**
+ * Initializes the fields of this object.
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
+ * Only for internal use.
+ */
+ static initialize(obj, productUid) {
+ obj["product_uid"] = productUid;
+ }
+
+ /**
+ * Constructs a PostProvisionProjectDeviceRequest
from a plain JavaScript object, optionally creating a new instance.
+ * Copies all relevant properties from data
to obj
if supplied or a new instance if not.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @param {module:model/PostProvisionProjectDeviceRequest} obj Optional instance to populate.
+ * @return {module:model/PostProvisionProjectDeviceRequest} The populated PostProvisionProjectDeviceRequest
instance.
+ */
+ static constructFromObject(data, obj) {
+ if (data) {
+ obj = obj || new PostProvisionProjectDeviceRequest();
+
+ if (data.hasOwnProperty("product_uid")) {
+ obj["product_uid"] = ApiClient.convertToType(
+ data["product_uid"],
+ "String"
+ );
+ }
+ if (data.hasOwnProperty("device_sn")) {
+ obj["device_sn"] = ApiClient.convertToType(data["device_sn"], "String");
+ }
+ } else if (data === null) {
+ return null;
+ }
+ return obj;
+ }
+
+ /**
+ * Validates the JSON data with respect to PostProvisionProjectDeviceRequest
.
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
+ * @return {boolean} to indicate whether the JSON data is valid with respect to PostProvisionProjectDeviceRequest
.
+ */
+ static validateJSON(data) {
+ // check to make sure all required properties are present in the JSON string
+ for (const property of PostProvisionProjectDeviceRequest.RequiredProperties) {
+ if (!data[property]) {
+ throw new Error(
+ "The required field `" +
+ property +
+ "` is not found in the JSON data: " +
+ JSON.stringify(data)
+ );
+ }
+ }
+ // ensure the json data is a string
+ if (
+ data["product_uid"] &&
+ !(
+ typeof data["product_uid"] === "string" ||
+ data["product_uid"] instanceof String
+ )
+ ) {
+ throw new Error(
+ "Expected the field `product_uid` to be a primitive type in the JSON string but got " +
+ data["product_uid"]
+ );
+ }
+ // ensure the json data is a string
+ if (
+ data["device_sn"] &&
+ !(
+ typeof data["device_sn"] === "string" ||
+ data["device_sn"] instanceof String
+ )
+ ) {
+ throw new Error(
+ "Expected the field `device_sn` to be a primitive type in the JSON string but got " +
+ data["device_sn"]
+ );
+ }
+
+ return true;
+ }
+}
+
+PostProvisionProjectDeviceRequest.RequiredProperties = ["product_uid"];
+
+/**
+ * The ProductUID that the device should use.
+ * @member {String} product_uid
+ */
+PostProvisionProjectDeviceRequest.prototype["product_uid"] = undefined;
+
+/**
+ * The serial number to assign to the device.
+ * @member {String} device_sn
+ */
+PostProvisionProjectDeviceRequest.prototype["device_sn"] = undefined;
+
+export default PostProvisionProjectDeviceRequest;
diff --git a/src/src/model/Product.js b/src/src/model/Product.js
index 5ed912a2..c3d0d36e 100644
--- a/src/src/model/Product.js
+++ b/src/src/model/Product.js
@@ -16,7 +16,7 @@ import ApiClient from "../ApiClient";
/**
* The Product model module.
* @module model/Product
- * @version 1.0.17
+ * @version 1.0.18
*/
class Product {
/**
diff --git a/src/src/model/Project.js b/src/src/model/Project.js
index 3faa46a1..45a859af 100644
--- a/src/src/model/Project.js
+++ b/src/src/model/Project.js
@@ -18,7 +18,7 @@ import Role from "./Role";
/**
* The Project model module.
* @module model/Project
- * @version 1.0.17
+ * @version 1.0.18
*/
class Project {
/**
diff --git a/src/src/model/ProjectMember.js b/src/src/model/ProjectMember.js
index bab4fc04..1b95465d 100644
--- a/src/src/model/ProjectMember.js
+++ b/src/src/model/ProjectMember.js
@@ -17,7 +17,7 @@ import Role from "./Role";
/**
* The ProjectMember model module.
* @module model/ProjectMember
- * @version 1.0.17
+ * @version 1.0.18
*/
class ProjectMember {
/**
diff --git a/src/src/model/Proxy.js b/src/src/model/Proxy.js
index 387bdcd9..8164445e 100644
--- a/src/src/model/Proxy.js
+++ b/src/src/model/Proxy.js
@@ -16,7 +16,7 @@ import ApiClient from "../ApiClient";
/**
* The Proxy model module.
* @module model/Proxy
- * @version 1.0.17
+ * @version 1.0.18
*/
class Proxy {
/**
diff --git a/src/src/model/PutDeviceFleetsRequest.js b/src/src/model/PutDeviceFleetsRequest.js
index 253443c4..71f7f039 100644
--- a/src/src/model/PutDeviceFleetsRequest.js
+++ b/src/src/model/PutDeviceFleetsRequest.js
@@ -16,7 +16,7 @@ import ApiClient from "../ApiClient";
/**
* The PutDeviceFleetsRequest model module.
* @module model/PutDeviceFleetsRequest
- * @version 1.0.17
+ * @version 1.0.18
*/
class PutDeviceFleetsRequest {
/**
diff --git a/src/src/model/Radresponder.js b/src/src/model/Radresponder.js
index f950fcda..12ed919b 100644
--- a/src/src/model/Radresponder.js
+++ b/src/src/model/Radresponder.js
@@ -16,7 +16,7 @@ import ApiClient from "../ApiClient";
/**
* The Radresponder model module.
* @module model/Radresponder
- * @version 1.0.17
+ * @version 1.0.18
*/
class Radresponder {
/**
diff --git a/src/src/model/Route.js b/src/src/model/Route.js
index 39888270..e81a65d9 100644
--- a/src/src/model/Route.js
+++ b/src/src/model/Route.js
@@ -17,7 +17,7 @@ import RouteSchema from "./RouteSchema";
/**
* The Route model module.
* @module model/Route
- * @version 1.0.17
+ * @version 1.0.18
*/
class Route {
/**
diff --git a/src/src/model/RouteSchema.js b/src/src/model/RouteSchema.js
index 0d5d4e29..d2251149 100644
--- a/src/src/model/RouteSchema.js
+++ b/src/src/model/RouteSchema.js
@@ -28,7 +28,7 @@ import Thingworx from "./Thingworx";
/**
* The RouteSchema model module.
* @module model/RouteSchema
- * @version 1.0.17
+ * @version 1.0.18
*/
class RouteSchema {
/**
diff --git a/src/src/model/Slack.js b/src/src/model/Slack.js
index dc473763..aed3844f 100644
--- a/src/src/model/Slack.js
+++ b/src/src/model/Slack.js
@@ -18,7 +18,7 @@ import SnowflakeTransform from "./SnowflakeTransform";
/**
* The Slack model module.
* @module model/Slack
- * @version 1.0.17
+ * @version 1.0.18
*/
class Slack {
/**
diff --git a/src/src/model/Snowflake.js b/src/src/model/Snowflake.js
index cbc2a79e..36ceeeb3 100644
--- a/src/src/model/Snowflake.js
+++ b/src/src/model/Snowflake.js
@@ -18,7 +18,7 @@ import SnowflakeTransform from "./SnowflakeTransform";
/**
* The Snowflake model module.
* @module model/Snowflake
- * @version 1.0.17
+ * @version 1.0.18
*/
class Snowflake {
/**
diff --git a/src/src/model/SnowflakeTransform.js b/src/src/model/SnowflakeTransform.js
index 2f84e7b3..a43c945d 100644
--- a/src/src/model/SnowflakeTransform.js
+++ b/src/src/model/SnowflakeTransform.js
@@ -16,7 +16,7 @@ import ApiClient from "../ApiClient";
/**
* The SnowflakeTransform model module.
* @module model/SnowflakeTransform
- * @version 1.0.17
+ * @version 1.0.18
*/
class SnowflakeTransform {
/**
diff --git a/src/src/model/Thingworx.js b/src/src/model/Thingworx.js
index 5ee7b0c8..aac5ef35 100644
--- a/src/src/model/Thingworx.js
+++ b/src/src/model/Thingworx.js
@@ -18,7 +18,7 @@ import HttpTransform from "./HttpTransform";
/**
* The Thingworx model module.
* @module model/Thingworx
- * @version 1.0.17
+ * @version 1.0.18
*/
class Thingworx {
/**
diff --git a/src/src/model/TowerLocation.js b/src/src/model/TowerLocation.js
index 757f16e9..d7bd5d67 100644
--- a/src/src/model/TowerLocation.js
+++ b/src/src/model/TowerLocation.js
@@ -16,7 +16,7 @@ import ApiClient from "../ApiClient";
/**
* The TowerLocation model module.
* @module model/TowerLocation
- * @version 1.0.17
+ * @version 1.0.18
*/
class TowerLocation {
/**
diff --git a/src/src/model/Twilio.js b/src/src/model/Twilio.js
index 0a31ad05..0184487e 100644
--- a/src/src/model/Twilio.js
+++ b/src/src/model/Twilio.js
@@ -17,7 +17,7 @@ import HttpFilter from "./HttpFilter";
/**
* The Twilio model module.
* @module model/Twilio
- * @version 1.0.17
+ * @version 1.0.18
*/
class Twilio {
/**
diff --git a/src/src/model/UpdateFleetRequest.js b/src/src/model/UpdateFleetRequest.js
index 8c628856..8ade55e1 100644
--- a/src/src/model/UpdateFleetRequest.js
+++ b/src/src/model/UpdateFleetRequest.js
@@ -16,7 +16,7 @@ import ApiClient from "../ApiClient";
/**
* The UpdateFleetRequest model module.
* @module model/UpdateFleetRequest
- * @version 1.0.17
+ * @version 1.0.18
*/
class UpdateFleetRequest {
/**
diff --git a/src/src/model/UserDbRoute.js b/src/src/model/UserDbRoute.js
index 9bab64f0..e22875a5 100644
--- a/src/src/model/UserDbRoute.js
+++ b/src/src/model/UserDbRoute.js
@@ -16,7 +16,7 @@ import ApiClient from "../ApiClient";
/**
* The UserDbRoute model module.
* @module model/UserDbRoute
- * @version 1.0.17
+ * @version 1.0.18
*/
class UserDbRoute {
/**
diff --git a/src/test/model/PostProvisionProjectDeviceRequest.spec.js b/src/test/model/PostProvisionProjectDeviceRequest.spec.js
new file mode 100644
index 00000000..8177032f
--- /dev/null
+++ b/src/test/model/PostProvisionProjectDeviceRequest.spec.js
@@ -0,0 +1,65 @@
+/**
+ * Notehub API
+ * The OpenAPI definition for the Notehub.io API.
+ *
+ * The version of the OpenAPI document: 1.0.0
+ * Contact: engineering@blues.io
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ *
+ */
+
+(function (root, factory) {
+ if (typeof define === "function" && define.amd) {
+ // AMD.
+ define(["expect.js", process.cwd() + "/src/index"], factory);
+ } else if (typeof module === "object" && module.exports) {
+ // CommonJS-like environments that support module.exports, like Node.
+ factory(require("expect.js"), require(process.cwd() + "/src/index"));
+ } else {
+ // Browser globals (root is window)
+ factory(root.expect, root.NotehubJs);
+ }
+})(this, function (expect, NotehubJs) {
+ "use strict";
+
+ var instance;
+
+ beforeEach(function () {
+ instance = new NotehubJs.PostProvisionProjectDeviceRequest();
+ });
+
+ var getProperty = function (object, getter, property) {
+ // Use getter method if present; otherwise, get the property directly.
+ if (typeof object[getter] === "function") return object[getter]();
+ else return object[property];
+ };
+
+ var setProperty = function (object, setter, property, value) {
+ // Use setter method if present; otherwise, set the property directly.
+ if (typeof object[setter] === "function") object[setter](value);
+ else object[property] = value;
+ };
+
+ describe("PostProvisionProjectDeviceRequest", function () {
+ it("should create an instance of PostProvisionProjectDeviceRequest", function () {
+ // uncomment below and update the code to test PostProvisionProjectDeviceRequest
+ //var instance = new NotehubJs.PostProvisionProjectDeviceRequest();
+ //expect(instance).to.be.a(NotehubJs.PostProvisionProjectDeviceRequest);
+ });
+
+ it('should have the property productUid (base name: "product_uid")', function () {
+ // uncomment below and update the code to test the property productUid
+ //var instance = new NotehubJs.PostProvisionProjectDeviceRequest();
+ //expect(instance).to.be();
+ });
+
+ it('should have the property deviceSn (base name: "device_sn")', function () {
+ // uncomment below and update the code to test the property deviceSn
+ //var instance = new NotehubJs.PostProvisionProjectDeviceRequest();
+ //expect(instance).to.be();
+ });
+ });
+});