@blues-inc/notehub-js 1.0.9 → 1.0.11

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.
Files changed (82) hide show
  1. package/README.md +181 -178
  2. package/dist/ApiClient.js +157 -154
  3. package/dist/api/AuthorizationApi.js +63 -18
  4. package/dist/api/BillingAccountApi.js +15 -15
  5. package/dist/api/DeviceApi.js +159 -159
  6. package/dist/api/DevicesApi.js +58 -58
  7. package/dist/api/EnvironmentVariablesApi.js +110 -110
  8. package/dist/api/EventApi.js +94 -94
  9. package/dist/api/FilesApi.js +42 -42
  10. package/dist/api/FleetApi.js +160 -160
  11. package/dist/api/NotesApi.js +105 -105
  12. package/dist/api/ProductApi.js +29 -29
  13. package/dist/api/ProjectApi.js +139 -139
  14. package/dist/api/RouteApi.js +51 -51
  15. package/dist/index.js +7 -0
  16. package/dist/model/Aws.js +65 -64
  17. package/dist/model/Azure.js +51 -37
  18. package/dist/model/BillingAccount.js +20 -20
  19. package/dist/model/Body.js +4 -4
  20. package/dist/model/Contact.js +21 -21
  21. package/dist/model/CreateFleetRequest.js +6 -6
  22. package/dist/model/CreateProductRequest.js +21 -21
  23. package/dist/model/CreateProjectRequest.js +13 -13
  24. package/dist/model/DFUEnv.js +11 -11
  25. package/dist/model/DFUState.js +64 -64
  26. package/dist/model/DeleteDeviceFleetsRequest.js +7 -7
  27. package/dist/model/Device.js +82 -82
  28. package/dist/model/DeviceSession.js +181 -181
  29. package/dist/model/DeviceTowerInfo.js +13 -13
  30. package/dist/model/DeviceUsage.js +31 -31
  31. package/dist/model/EnvironmentVariables.js +7 -7
  32. package/dist/model/Error.js +30 -30
  33. package/dist/model/Event.js +222 -222
  34. package/dist/model/Fleet.js +20 -20
  35. package/dist/model/GenerateAuthToken200Response.js +114 -0
  36. package/dist/model/GetBillingAccounts200Response.js +8 -9
  37. package/dist/model/GetDeviceEnvironmentVariables200Response.js +11 -11
  38. package/dist/model/GetDeviceHealthLog200Response.js +10 -11
  39. package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +18 -18
  40. package/dist/model/GetDeviceLatest200Response.js +8 -9
  41. package/dist/model/GetDevicePublicKey200Response.js +15 -15
  42. package/dist/model/GetDeviceSessions200Response.js +15 -16
  43. package/dist/model/GetProjectDevicePublicKeys200Response.js +15 -16
  44. package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +11 -11
  45. package/dist/model/GetProjectDevices200Response.js +15 -16
  46. package/dist/model/GetProjectEvents200Response.js +20 -21
  47. package/dist/model/GetProjectEventsByCursor200Response.js +22 -23
  48. package/dist/model/GetProjectFleets200Response.js +10 -11
  49. package/dist/model/GetProjectMembers200Response.js +10 -11
  50. package/dist/model/GetProjectProducts200Response.js +8 -9
  51. package/dist/model/GetProjects200Response.js +8 -9
  52. package/dist/model/Google.js +27 -27
  53. package/dist/model/HandleNoteChanges200Response.js +10 -10
  54. package/dist/model/HandleNoteGet200Response.js +12 -12
  55. package/dist/model/HandleNoteSignal200Response.js +4 -4
  56. package/dist/model/HandleNotefileChanges200Response.js +10 -10
  57. package/dist/model/HandleNotefileChangesPending200Response.js +13 -13
  58. package/dist/model/HandleNotefileDeleteRequest.js +6 -6
  59. package/dist/model/Http.js +34 -34
  60. package/dist/model/HttpFilter.js +18 -18
  61. package/dist/model/HttpTransform.js +19 -19
  62. package/dist/model/Location.js +39 -39
  63. package/dist/model/Login200Response.js +6 -6
  64. package/dist/model/LoginRequest.js +11 -11
  65. package/dist/model/Mqtt.js +70 -71
  66. package/dist/model/Note.js +9 -9
  67. package/dist/model/Product.js +25 -25
  68. package/dist/model/Project.js +33 -33
  69. package/dist/model/ProjectMember.js +21 -21
  70. package/dist/model/Proxy.js +23 -23
  71. package/dist/model/PutDeviceFleetsRequest.js +7 -7
  72. package/dist/model/Radresponder.js +25 -25
  73. package/dist/model/Route.js +35 -35
  74. package/dist/model/RouteSchema.js +53 -43
  75. package/dist/model/Snowflake.js +45 -45
  76. package/dist/model/SnowflakeTransform.js +11 -11
  77. package/dist/model/Thingworx.js +33 -32
  78. package/dist/model/TowerLocation.js +51 -51
  79. package/dist/model/Twilio.js +43 -43
  80. package/dist/model/UpdateFleetRequest.js +16 -16
  81. package/dist/model/UserDbRoute.js +24 -24
  82. package/package.json +3 -3
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
+ var _GenerateAuthToken200Response = _interopRequireDefault(require("../model/GenerateAuthToken200Response"));
8
9
  var _Login200Response = _interopRequireDefault(require("../model/Login200Response"));
9
10
  var _LoginRequest = _interopRequireDefault(require("../model/LoginRequest"));
10
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -15,29 +16,73 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
15
16
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
16
17
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
17
18
  /**
18
- * Authorization service.
19
- * @module api/AuthorizationApi
20
- * @version 1.0.9
21
- */
19
+ * Authorization service.
20
+ * @module api/AuthorizationApi
21
+ * @version 1.0.11
22
+ */
22
23
  var AuthorizationApi = /*#__PURE__*/function () {
23
24
  /**
24
- * Constructs a new AuthorizationApi.
25
- * @alias module:api/AuthorizationApi
26
- * @class
27
- * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
28
- * default to {@link module:ApiClient#instance} if unspecified.
29
- */
25
+ * Constructs a new AuthorizationApi.
26
+ * @alias module:api/AuthorizationApi
27
+ * @class
28
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
29
+ * default to {@link module:ApiClient#instance} if unspecified.
30
+ */
30
31
  function AuthorizationApi(apiClient) {
31
32
  _classCallCheck(this, AuthorizationApi);
32
33
  this.apiClient = apiClient || _ApiClient["default"].instance;
33
34
  }
34
35
 
35
36
  /**
36
- * Gets a session token from the API from a username and password.
37
- * @param {module:model/LoginRequest} loginRequest
38
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Login200Response} and HTTP response
37
+ * Gets an OAuth bearer token that lasts for 30 minutes from the API based on a Notehub user and Notehub project.
38
+ * @param {Object} opts Optional parameters
39
+ * @param {String} opts.grantType
40
+ * @param {String} opts.clientId
41
+ * @param {String} opts.clientSecret
42
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GenerateAuthToken200Response} and HTTP response
39
43
  */
40
44
  _createClass(AuthorizationApi, [{
45
+ key: "generateAuthTokenWithHttpInfo",
46
+ value: function generateAuthTokenWithHttpInfo(opts) {
47
+ opts = opts || {};
48
+ var postBody = null;
49
+ var pathParams = {};
50
+ var queryParams = {};
51
+ var headerParams = {};
52
+ var formParams = {
53
+ grant_type: opts["grantType"],
54
+ client_id: opts["clientId"],
55
+ client_secret: opts["clientSecret"]
56
+ };
57
+ var authNames = [];
58
+ var contentTypes = ["application/x-www-form-urlencoded"];
59
+ var accepts = ["application/json"];
60
+ var returnType = _GenerateAuthToken200Response["default"];
61
+ return this.apiClient.callApi("/oauth2/token", "POST", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
62
+ }
63
+
64
+ /**
65
+ * Gets an OAuth bearer token that lasts for 30 minutes from the API based on a Notehub user and Notehub project.
66
+ * @param {Object} opts Optional parameters
67
+ * @param {String} opts.grantType
68
+ * @param {String} opts.clientId
69
+ * @param {String} opts.clientSecret
70
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GenerateAuthToken200Response}
71
+ */
72
+ }, {
73
+ key: "generateAuthToken",
74
+ value: function generateAuthToken(opts) {
75
+ return this.generateAuthTokenWithHttpInfo(opts).then(function (response_and_data) {
76
+ return response_and_data.data;
77
+ });
78
+ }
79
+
80
+ /**
81
+ * DEPRECATED. Gets a session token from the API from a username and password.
82
+ * @param {module:model/LoginRequest} loginRequest
83
+ * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Login200Response} and HTTP response
84
+ */
85
+ }, {
41
86
  key: "loginWithHttpInfo",
42
87
  value: function loginWithHttpInfo(loginRequest) {
43
88
  var postBody = loginRequest;
@@ -50,15 +95,15 @@ var AuthorizationApi = /*#__PURE__*/function () {
50
95
  var headerParams = {};
51
96
  var formParams = {};
52
97
  var authNames = [];
53
- var contentTypes = ['application/json'];
54
- var accepts = ['application/json'];
98
+ var contentTypes = ["application/json"];
99
+ var accepts = ["application/json"];
55
100
  var returnType = _Login200Response["default"];
56
- return this.apiClient.callApi('/auth/login', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
101
+ return this.apiClient.callApi("/auth/login", "POST", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
57
102
  }
58
103
 
59
104
  /**
60
- * Gets a session token from the API from a username and password.
61
- * @param {module:model/LoginRequest} loginRequest
105
+ * DEPRECATED. Gets a session token from the API from a username and password.
106
+ * @param {module:model/LoginRequest} loginRequest
62
107
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Login200Response}
63
108
  */
64
109
  }, {
@@ -15,25 +15,25 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
15
15
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
16
16
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
17
17
  /**
18
- * BillingAccount service.
19
- * @module api/BillingAccountApi
20
- * @version 1.0.9
21
- */
18
+ * BillingAccount service.
19
+ * @module api/BillingAccountApi
20
+ * @version 1.0.11
21
+ */
22
22
  var BillingAccountApi = /*#__PURE__*/function () {
23
23
  /**
24
- * Constructs a new BillingAccountApi.
25
- * @alias module:api/BillingAccountApi
26
- * @class
27
- * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
28
- * default to {@link module:ApiClient#instance} if unspecified.
29
- */
24
+ * Constructs a new BillingAccountApi.
25
+ * @alias module:api/BillingAccountApi
26
+ * @class
27
+ * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
28
+ * default to {@link module:ApiClient#instance} if unspecified.
29
+ */
30
30
  function BillingAccountApi(apiClient) {
31
31
  _classCallCheck(this, BillingAccountApi);
32
32
  this.apiClient = apiClient || _ApiClient["default"].instance;
33
33
  }
34
34
 
35
35
  /**
36
- * Get Billing Accounts accessible by the api_key
36
+ * Get Billing Accounts accessible by the OAuth access token
37
37
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetBillingAccounts200Response} and HTTP response
38
38
  */
39
39
  _createClass(BillingAccountApi, [{
@@ -44,15 +44,15 @@ var BillingAccountApi = /*#__PURE__*/function () {
44
44
  var queryParams = {};
45
45
  var headerParams = {};
46
46
  var formParams = {};
47
- var authNames = ['api_key'];
47
+ var authNames = ["bearer_access_token"];
48
48
  var contentTypes = [];
49
- var accepts = ['application/json'];
49
+ var accepts = ["application/json"];
50
50
  var returnType = _GetBillingAccounts200Response["default"];
51
- return this.apiClient.callApi('/v1/billing-accounts', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
51
+ return this.apiClient.callApi("/v1/billing-accounts", "GET", pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
52
52
  }
53
53
 
54
54
  /**
55
- * Get Billing Accounts accessible by the api_key
55
+ * Get Billing Accounts accessible by the OAuth access token
56
56
  * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetBillingAccounts200Response}
57
57
  */
58
58
  }, {