@blues-inc/notehub-js 1.0.37-beta.9 → 1.0.38-beta.1

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 (133) hide show
  1. package/README.md +17 -15
  2. package/dist/ApiClient.js +4 -6
  3. package/dist/api/AlertApi.js +2 -2
  4. package/dist/api/AuthorizationApi.js +1 -1
  5. package/dist/api/BillingAccountApi.js +2 -2
  6. package/dist/api/DeviceApi.js +29 -29
  7. package/dist/api/EventApi.js +6 -6
  8. package/dist/api/ExternalDevicesApi.js +4 -4
  9. package/dist/api/MonitorApi.js +6 -6
  10. package/dist/api/ProjectApi.js +36 -36
  11. package/dist/api/RouteApi.js +7 -7
  12. package/dist/api/UsageApi.js +285 -0
  13. package/dist/api/WebhookApi.js +6 -6
  14. package/dist/index.js +56 -42
  15. package/dist/model/Alert.js +1 -1
  16. package/dist/model/AlertDataInner.js +1 -1
  17. package/dist/model/AlertNotificationsInner.js +1 -1
  18. package/dist/model/Aws.js +1 -1
  19. package/dist/model/AwsFilter.js +1 -1
  20. package/dist/model/AwsTransform.js +1 -1
  21. package/dist/model/Azure.js +1 -1
  22. package/dist/model/BillingAccount.js +1 -1
  23. package/dist/model/Body.js +1 -1
  24. package/dist/model/CloneProjectRequest.js +1 -1
  25. package/dist/model/Contact.js +1 -1
  26. package/dist/model/CreateFleetRequest.js +1 -1
  27. package/dist/model/CreateMonitor.js +1 -1
  28. package/dist/model/CreateProductRequest.js +1 -1
  29. package/dist/model/CreateProjectRequest.js +1 -1
  30. package/dist/model/CreateUpdateRepository.js +1 -1
  31. package/dist/model/CurrentFirmware.js +1 -1
  32. package/dist/model/DFUEnv.js +1 -1
  33. package/dist/model/DFUState.js +1 -1
  34. package/dist/model/DataField.js +1 -1
  35. package/dist/model/DataSetField.js +1 -1
  36. package/dist/model/DeleteDeviceFleetsRequest.js +1 -1
  37. package/dist/model/Device.js +1 -1
  38. package/dist/model/DeviceDfuHistory.js +1 -1
  39. package/dist/model/DeviceDfuHistoryCurrent.js +1 -1
  40. package/dist/model/DeviceDfuHistoryPage.js +1 -1
  41. package/dist/model/DeviceDfuStateMachine.js +1 -1
  42. package/dist/model/DeviceDfuStateMachineNode.js +1 -1
  43. package/dist/model/DeviceDfuStatus.js +1 -1
  44. package/dist/model/DeviceDfuStatusPage.js +1 -1
  45. package/dist/model/DeviceSession.js +1 -1
  46. package/dist/model/DeviceTowerInfo.js +1 -1
  47. package/dist/model/DeviceUsage.js +1 -1
  48. package/dist/model/DfuActionRequest.js +1 -1
  49. package/dist/model/EmailNotification.js +1 -1
  50. package/dist/model/EnvTreeJsonNode.js +1 -1
  51. package/dist/model/EnvVar.js +1 -1
  52. package/dist/model/EnvironmentVariables.js +1 -1
  53. package/dist/model/Error.js +1 -1
  54. package/dist/model/Event.js +1 -1
  55. package/dist/model/Firmware.js +1 -1
  56. package/dist/model/FirmwareInfo.js +1 -1
  57. package/dist/model/Fleet.js +1 -1
  58. package/dist/model/GetAlerts200Response.js +1 -1
  59. package/dist/model/GetBillingAccounts200Response.js +1 -1
  60. package/dist/model/GetDeviceEnvironmentVariablesByPin200Response.js +1 -1
  61. package/dist/model/GetDeviceFleets200Response.js +1 -1
  62. package/dist/model/GetDeviceHealthLog200Response.js +1 -1
  63. package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +1 -1
  64. package/dist/model/GetDeviceLatest200Response.js +1 -1
  65. package/dist/model/GetDevicePublicKey200Response.js +1 -1
  66. package/dist/model/GetDeviceSessions200Response.js +1 -1
  67. package/dist/model/GetProjectDevicePublicKeys200Response.js +1 -1
  68. package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +1 -1
  69. package/dist/model/GetProjectDevices200Response.js +1 -1
  70. package/dist/model/GetProjectEvents200Response.js +1 -1
  71. package/dist/model/GetProjectEventsByCursor200Response.js +1 -1
  72. package/dist/model/GetProjectMembers200Response.js +1 -1
  73. package/dist/model/GetProjectProducts200Response.js +1 -1
  74. package/dist/model/GetProjects200Response.js +1 -1
  75. package/dist/model/GetWebhooks200Response.js +1 -1
  76. package/dist/model/Google.js +1 -1
  77. package/dist/model/HandleNoteChanges200Response.js +1 -1
  78. package/dist/model/HandleNoteGet200Response.js +1 -1
  79. package/dist/model/HandleNoteSignal200Response.js +1 -1
  80. package/dist/model/HandleNotefileChanges200Response.js +1 -1
  81. package/dist/model/HandleNotefileChangesPending200Response.js +1 -1
  82. package/dist/model/HandleNotefileDeleteRequest.js +1 -1
  83. package/dist/model/Http.js +1 -1
  84. package/dist/model/Location.js +1 -1
  85. package/dist/model/Login200Response.js +1 -1
  86. package/dist/model/LoginRequest.js +1 -1
  87. package/dist/model/Monitor.js +1 -1
  88. package/dist/model/MonitorAlertRoutesInner.js +1 -1
  89. package/dist/model/Mqtt.js +1 -1
  90. package/dist/model/Note.js +1 -1
  91. package/dist/model/NotefileSchema.js +1 -1
  92. package/dist/model/NotehubRoute.js +1 -1
  93. package/dist/model/NotehubRouteSchema.js +1 -1
  94. package/dist/model/OAuth2Error.js +1 -1
  95. package/dist/model/OAuth2TokenResponse.js +1 -1
  96. package/dist/model/PersonalAccessToken.js +1 -1
  97. package/dist/model/PersonalAccessTokenCreatedBy.js +1 -1
  98. package/dist/model/PersonalAccessTokenInfo.js +1 -1
  99. package/dist/model/PersonalAccessTokenSecret.js +1 -1
  100. package/dist/model/PostProvisionProjectDeviceRequest.js +1 -1
  101. package/dist/model/Product.js +1 -1
  102. package/dist/model/Project.js +1 -1
  103. package/dist/model/ProjectMember.js +1 -1
  104. package/dist/model/Proxy.js +1 -1
  105. package/dist/model/PutDeviceFleetsRequest.js +1 -1
  106. package/dist/model/Radresponder.js +1 -1
  107. package/dist/model/Repository.js +1 -1
  108. package/dist/model/RouteLog.js +1 -1
  109. package/dist/model/SchemaProperty.js +1 -1
  110. package/dist/model/SimUsage.js +1 -1
  111. package/dist/model/Slack.js +1 -1
  112. package/dist/model/SlackBearerNotification.js +1 -1
  113. package/dist/model/SlackTransform.js +1 -1
  114. package/dist/model/SlackWebHookNotification.js +1 -1
  115. package/dist/model/Snowflake.js +1 -1
  116. package/dist/model/Thingworx.js +1 -1
  117. package/dist/model/TowerLocation.js +1 -1
  118. package/dist/model/Twilio.js +1 -1
  119. package/dist/model/UpdateFleetRequest.js +1 -1
  120. package/dist/model/UploadMetadata.js +1 -1
  121. package/dist/model/{AnalyticsEventsData.js → UsageData.js} +39 -33
  122. package/dist/model/UsageEventsData.js +144 -0
  123. package/dist/model/{AnalyticsEventsResponse.js → UsageEventsResponse.js} +25 -25
  124. package/dist/model/{AnalyticsRouteLogsData.js → UsageRouteLogsData.js} +38 -24
  125. package/dist/model/{AnalyticsSessionsResponse.js → UsageRouteLogsResponse.js} +25 -25
  126. package/dist/model/{AnalyticsSessionsData.js → UsageSessionsData.js} +37 -33
  127. package/dist/model/{AnalyticsRouteLogsResponse.js → UsageSessionsResponse.js} +25 -25
  128. package/dist/model/UserDbRoute.js +1 -1
  129. package/dist/model/UserDfuStateMachine.js +1 -1
  130. package/dist/model/UserDfuStateMachineStatus.js +1 -1
  131. package/dist/model/UserFirmwareInfo.js +1 -1
  132. package/dist/model/WebhookSettings.js +1 -1
  133. package/package.json +26 -26
@@ -27,21 +27,20 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
27
27
  *
28
28
  */
29
29
  /**
30
- * The AnalyticsEventsData model module.
31
- * @module model/AnalyticsEventsData
32
- * @version 1.0.37-beta.9
30
+ * The UsageData model module.
31
+ * @module model/UsageData
32
+ * @version 1.0.38-beta.1
33
33
  */
34
- var AnalyticsEventsData = /*#__PURE__*/function () {
34
+ var UsageData = /*#__PURE__*/function () {
35
35
  /**
36
- * Constructs a new <code>AnalyticsEventsData</code>.
37
- * @alias module:model/AnalyticsEventsData
38
- * @param events {Number}
36
+ * Constructs a new <code>UsageData</code>.
37
+ * @alias module:model/UsageData
39
38
  * @param period {Date}
40
- * @param platformEvents {Number}
39
+ * @param totalBytes {Number}
41
40
  */
42
- function AnalyticsEventsData(events, period, platformEvents) {
43
- _classCallCheck(this, AnalyticsEventsData);
44
- AnalyticsEventsData.initialize(this, events, period, platformEvents);
41
+ function UsageData(period, totalBytes) {
42
+ _classCallCheck(this, UsageData);
43
+ UsageData.initialize(this, period, totalBytes);
45
44
  }
46
45
 
47
46
  /**
@@ -49,34 +48,36 @@ var AnalyticsEventsData = /*#__PURE__*/function () {
49
48
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
50
49
  * Only for internal use.
51
50
  */
52
- return _createClass(AnalyticsEventsData, null, [{
51
+ return _createClass(UsageData, null, [{
53
52
  key: "initialize",
54
- value: function initialize(obj, events, period, platformEvents) {
55
- obj['events'] = events;
53
+ value: function initialize(obj, period, totalBytes) {
56
54
  obj['period'] = period;
57
- obj['platform_events'] = platformEvents;
55
+ obj['total_bytes'] = totalBytes;
58
56
  }
59
57
 
60
58
  /**
61
- * Constructs a <code>AnalyticsEventsData</code> from a plain JavaScript object, optionally creating a new instance.
59
+ * Constructs a <code>UsageData</code> from a plain JavaScript object, optionally creating a new instance.
62
60
  * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
63
61
  * @param {Object} data The plain JavaScript object bearing properties of interest.
64
- * @param {module:model/AnalyticsEventsData} obj Optional instance to populate.
65
- * @return {module:model/AnalyticsEventsData} The populated <code>AnalyticsEventsData</code> instance.
62
+ * @param {module:model/UsageData} obj Optional instance to populate.
63
+ * @return {module:model/UsageData} The populated <code>UsageData</code> instance.
66
64
  */
67
65
  }, {
68
66
  key: "constructFromObject",
69
67
  value: function constructFromObject(data, obj) {
70
68
  if (data) {
71
- obj = obj || new AnalyticsEventsData();
72
- if (data.hasOwnProperty('events')) {
73
- obj['events'] = _ApiClient["default"].convertToType(data['events'], 'Number');
69
+ obj = obj || new UsageData();
70
+ if (data.hasOwnProperty('bytes_received')) {
71
+ obj['bytes_received'] = _ApiClient["default"].convertToType(data['bytes_received'], 'Number');
72
+ }
73
+ if (data.hasOwnProperty('bytes_sent')) {
74
+ obj['bytes_sent'] = _ApiClient["default"].convertToType(data['bytes_sent'], 'Number');
74
75
  }
75
76
  if (data.hasOwnProperty('period')) {
76
77
  obj['period'] = _ApiClient["default"].convertToType(data['period'], 'Date');
77
78
  }
78
- if (data.hasOwnProperty('platform_events')) {
79
- obj['platform_events'] = _ApiClient["default"].convertToType(data['platform_events'], 'Number');
79
+ if (data.hasOwnProperty('total_bytes')) {
80
+ obj['total_bytes'] = _ApiClient["default"].convertToType(data['total_bytes'], 'Number');
80
81
  }
81
82
  } else if (data === null) {
82
83
  return null;
@@ -85,15 +86,15 @@ var AnalyticsEventsData = /*#__PURE__*/function () {
85
86
  }
86
87
 
87
88
  /**
88
- * Validates the JSON data with respect to <code>AnalyticsEventsData</code>.
89
+ * Validates the JSON data with respect to <code>UsageData</code>.
89
90
  * @param {Object} data The plain JavaScript object bearing properties of interest.
90
- * @return {boolean} to indicate whether the JSON data is valid with respect to <code>AnalyticsEventsData</code>.
91
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>UsageData</code>.
91
92
  */
92
93
  }, {
93
94
  key: "validateJSON",
94
95
  value: function validateJSON(data) {
95
96
  // check to make sure all required properties are present in the JSON string
96
- var _iterator = _createForOfIteratorHelper(AnalyticsEventsData.RequiredProperties),
97
+ var _iterator = _createForOfIteratorHelper(UsageData.RequiredProperties),
97
98
  _step;
98
99
  try {
99
100
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -111,20 +112,25 @@ var AnalyticsEventsData = /*#__PURE__*/function () {
111
112
  }
112
113
  }]);
113
114
  }();
114
- AnalyticsEventsData.RequiredProperties = ["events", "period", "platform_events"];
115
+ UsageData.RequiredProperties = ["period", "total_bytes"];
116
+
117
+ /**
118
+ * @member {Number} bytes_received
119
+ */
120
+ UsageData.prototype['bytes_received'] = undefined;
115
121
 
116
122
  /**
117
- * @member {Number} events
123
+ * @member {Number} bytes_sent
118
124
  */
119
- AnalyticsEventsData.prototype['events'] = undefined;
125
+ UsageData.prototype['bytes_sent'] = undefined;
120
126
 
121
127
  /**
122
128
  * @member {Date} period
123
129
  */
124
- AnalyticsEventsData.prototype['period'] = undefined;
130
+ UsageData.prototype['period'] = undefined;
125
131
 
126
132
  /**
127
- * @member {Number} platform_events
133
+ * @member {Number} total_bytes
128
134
  */
129
- AnalyticsEventsData.prototype['platform_events'] = undefined;
130
- var _default = exports["default"] = AnalyticsEventsData;
135
+ UsageData.prototype['total_bytes'] = undefined;
136
+ var _default = exports["default"] = UsageData;
@@ -0,0 +1,144 @@
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 _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
11
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
12
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
13
+ function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
14
+ 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); } }
15
+ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
16
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
17
+ 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); } /**
18
+ * Notehub API
19
+ * The OpenAPI definition for the Notehub.io API.
20
+ *
21
+ * The version of the OpenAPI document: 1.2.0
22
+ * Contact: engineering@blues.io
23
+ *
24
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
25
+ * https://openapi-generator.tech
26
+ * Do not edit the class manually.
27
+ *
28
+ */
29
+ /**
30
+ * The UsageEventsData model module.
31
+ * @module model/UsageEventsData
32
+ * @version 1.0.38-beta.1
33
+ */
34
+ var UsageEventsData = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>UsageEventsData</code>.
37
+ * @alias module:model/UsageEventsData
38
+ * @param device {String}
39
+ * @param period {Date}
40
+ * @param platformEvents {Number}
41
+ * @param totalEvents {Number}
42
+ */
43
+ function UsageEventsData(device, period, platformEvents, totalEvents) {
44
+ _classCallCheck(this, UsageEventsData);
45
+ UsageEventsData.initialize(this, device, period, platformEvents, totalEvents);
46
+ }
47
+
48
+ /**
49
+ * Initializes the fields of this object.
50
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
51
+ * Only for internal use.
52
+ */
53
+ return _createClass(UsageEventsData, null, [{
54
+ key: "initialize",
55
+ value: function initialize(obj, device, period, platformEvents, totalEvents) {
56
+ obj['device'] = device;
57
+ obj['period'] = period;
58
+ obj['platform_events'] = platformEvents;
59
+ obj['total_events'] = totalEvents;
60
+ }
61
+
62
+ /**
63
+ * Constructs a <code>UsageEventsData</code> from a plain JavaScript object, optionally creating a new instance.
64
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
65
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
66
+ * @param {module:model/UsageEventsData} obj Optional instance to populate.
67
+ * @return {module:model/UsageEventsData} The populated <code>UsageEventsData</code> instance.
68
+ */
69
+ }, {
70
+ key: "constructFromObject",
71
+ value: function constructFromObject(data, obj) {
72
+ if (data) {
73
+ obj = obj || new UsageEventsData();
74
+ if (data.hasOwnProperty('device')) {
75
+ obj['device'] = _ApiClient["default"].convertToType(data['device'], 'String');
76
+ }
77
+ if (data.hasOwnProperty('period')) {
78
+ obj['period'] = _ApiClient["default"].convertToType(data['period'], 'Date');
79
+ }
80
+ if (data.hasOwnProperty('platform_events')) {
81
+ obj['platform_events'] = _ApiClient["default"].convertToType(data['platform_events'], 'Number');
82
+ }
83
+ if (data.hasOwnProperty('total_events')) {
84
+ obj['total_events'] = _ApiClient["default"].convertToType(data['total_events'], 'Number');
85
+ }
86
+ } else if (data === null) {
87
+ return null;
88
+ }
89
+ return obj;
90
+ }
91
+
92
+ /**
93
+ * Validates the JSON data with respect to <code>UsageEventsData</code>.
94
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
95
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>UsageEventsData</code>.
96
+ */
97
+ }, {
98
+ key: "validateJSON",
99
+ value: function validateJSON(data) {
100
+ // check to make sure all required properties are present in the JSON string
101
+ var _iterator = _createForOfIteratorHelper(UsageEventsData.RequiredProperties),
102
+ _step;
103
+ try {
104
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
105
+ var property = _step.value;
106
+ if (!data[property]) {
107
+ throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
108
+ }
109
+ }
110
+ // ensure the json data is a string
111
+ } catch (err) {
112
+ _iterator.e(err);
113
+ } finally {
114
+ _iterator.f();
115
+ }
116
+ if (data['device'] && !(typeof data['device'] === 'string' || data['device'] instanceof String)) {
117
+ throw new Error("Expected the field `device` to be a primitive type in the JSON string but got " + data['device']);
118
+ }
119
+ return true;
120
+ }
121
+ }]);
122
+ }();
123
+ UsageEventsData.RequiredProperties = ["device", "period", "platform_events", "total_events"];
124
+
125
+ /**
126
+ * @member {String} device
127
+ */
128
+ UsageEventsData.prototype['device'] = undefined;
129
+
130
+ /**
131
+ * @member {Date} period
132
+ */
133
+ UsageEventsData.prototype['period'] = undefined;
134
+
135
+ /**
136
+ * @member {Number} platform_events
137
+ */
138
+ UsageEventsData.prototype['platform_events'] = undefined;
139
+
140
+ /**
141
+ * @member {Number} total_events
142
+ */
143
+ UsageEventsData.prototype['total_events'] = undefined;
144
+ var _default = exports["default"] = UsageEventsData;
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
- var _AnalyticsEventsData = _interopRequireDefault(require("./AnalyticsEventsData"));
8
+ var _UsageEventsData = _interopRequireDefault(require("./UsageEventsData"));
9
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
10
  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); }
11
11
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
@@ -28,19 +28,19 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
28
28
  *
29
29
  */
30
30
  /**
31
- * The AnalyticsEventsResponse model module.
32
- * @module model/AnalyticsEventsResponse
33
- * @version 1.0.37-beta.9
31
+ * The UsageEventsResponse model module.
32
+ * @module model/UsageEventsResponse
33
+ * @version 1.0.38-beta.1
34
34
  */
35
- var AnalyticsEventsResponse = /*#__PURE__*/function () {
35
+ var UsageEventsResponse = /*#__PURE__*/function () {
36
36
  /**
37
- * Constructs a new <code>AnalyticsEventsResponse</code>.
38
- * @alias module:model/AnalyticsEventsResponse
39
- * @param data {Array.<module:model/AnalyticsEventsData>}
37
+ * Constructs a new <code>UsageEventsResponse</code>.
38
+ * @alias module:model/UsageEventsResponse
39
+ * @param data {Array.<module:model/UsageEventsData>}
40
40
  */
41
- function AnalyticsEventsResponse(data) {
42
- _classCallCheck(this, AnalyticsEventsResponse);
43
- AnalyticsEventsResponse.initialize(this, data);
41
+ function UsageEventsResponse(data) {
42
+ _classCallCheck(this, UsageEventsResponse);
43
+ UsageEventsResponse.initialize(this, data);
44
44
  }
45
45
 
46
46
  /**
@@ -48,26 +48,26 @@ var AnalyticsEventsResponse = /*#__PURE__*/function () {
48
48
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
49
49
  * Only for internal use.
50
50
  */
51
- return _createClass(AnalyticsEventsResponse, null, [{
51
+ return _createClass(UsageEventsResponse, null, [{
52
52
  key: "initialize",
53
53
  value: function initialize(obj, data) {
54
54
  obj['data'] = data;
55
55
  }
56
56
 
57
57
  /**
58
- * Constructs a <code>AnalyticsEventsResponse</code> from a plain JavaScript object, optionally creating a new instance.
58
+ * Constructs a <code>UsageEventsResponse</code> from a plain JavaScript object, optionally creating a new instance.
59
59
  * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
60
60
  * @param {Object} data The plain JavaScript object bearing properties of interest.
61
- * @param {module:model/AnalyticsEventsResponse} obj Optional instance to populate.
62
- * @return {module:model/AnalyticsEventsResponse} The populated <code>AnalyticsEventsResponse</code> instance.
61
+ * @param {module:model/UsageEventsResponse} obj Optional instance to populate.
62
+ * @return {module:model/UsageEventsResponse} The populated <code>UsageEventsResponse</code> instance.
63
63
  */
64
64
  }, {
65
65
  key: "constructFromObject",
66
66
  value: function constructFromObject(data, obj) {
67
67
  if (data) {
68
- obj = obj || new AnalyticsEventsResponse();
68
+ obj = obj || new UsageEventsResponse();
69
69
  if (data.hasOwnProperty('data')) {
70
- obj['data'] = _ApiClient["default"].convertToType(data['data'], [_AnalyticsEventsData["default"]]);
70
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], [_UsageEventsData["default"]]);
71
71
  }
72
72
  } else if (data === null) {
73
73
  return null;
@@ -76,15 +76,15 @@ var AnalyticsEventsResponse = /*#__PURE__*/function () {
76
76
  }
77
77
 
78
78
  /**
79
- * Validates the JSON data with respect to <code>AnalyticsEventsResponse</code>.
79
+ * Validates the JSON data with respect to <code>UsageEventsResponse</code>.
80
80
  * @param {Object} data The plain JavaScript object bearing properties of interest.
81
- * @return {boolean} to indicate whether the JSON data is valid with respect to <code>AnalyticsEventsResponse</code>.
81
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>UsageEventsResponse</code>.
82
82
  */
83
83
  }, {
84
84
  key: "validateJSON",
85
85
  value: function validateJSON(data) {
86
86
  // check to make sure all required properties are present in the JSON string
87
- var _iterator = _createForOfIteratorHelper(AnalyticsEventsResponse.RequiredProperties),
87
+ var _iterator = _createForOfIteratorHelper(UsageEventsResponse.RequiredProperties),
88
88
  _step;
89
89
  try {
90
90
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -110,7 +110,7 @@ var AnalyticsEventsResponse = /*#__PURE__*/function () {
110
110
  try {
111
111
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
112
112
  var item = _step2.value;
113
- _AnalyticsEventsData["default"].validateJsonObject(item);
113
+ _UsageEventsData["default"].validateJsonObject(item);
114
114
  }
115
115
  } catch (err) {
116
116
  _iterator2.e(err);
@@ -123,10 +123,10 @@ var AnalyticsEventsResponse = /*#__PURE__*/function () {
123
123
  }
124
124
  }]);
125
125
  }();
126
- AnalyticsEventsResponse.RequiredProperties = ["data"];
126
+ UsageEventsResponse.RequiredProperties = ["data"];
127
127
 
128
128
  /**
129
- * @member {Array.<module:model/AnalyticsEventsData>} data
129
+ * @member {Array.<module:model/UsageEventsData>} data
130
130
  */
131
- AnalyticsEventsResponse.prototype['data'] = undefined;
132
- var _default = exports["default"] = AnalyticsEventsResponse;
131
+ UsageEventsResponse.prototype['data'] = undefined;
132
+ var _default = exports["default"] = UsageEventsResponse;
@@ -27,22 +27,23 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
27
27
  *
28
28
  */
29
29
  /**
30
- * The AnalyticsRouteLogsData model module.
31
- * @module model/AnalyticsRouteLogsData
32
- * @version 1.0.37-beta.9
30
+ * The UsageRouteLogsData model module.
31
+ * @module model/UsageRouteLogsData
32
+ * @version 1.0.38-beta.1
33
33
  */
34
- var AnalyticsRouteLogsData = /*#__PURE__*/function () {
34
+ var UsageRouteLogsData = /*#__PURE__*/function () {
35
35
  /**
36
- * Constructs a new <code>AnalyticsRouteLogsData</code>.
37
- * @alias module:model/AnalyticsRouteLogsData
36
+ * Constructs a new <code>UsageRouteLogsData</code>.
37
+ * @alias module:model/UsageRouteLogsData
38
+ * @param device {String}
38
39
  * @param failedRoutes {Number}
39
40
  * @param period {Date}
40
41
  * @param successfulRoutes {Number}
41
42
  * @param totalRoutes {Number}
42
43
  */
43
- function AnalyticsRouteLogsData(failedRoutes, period, successfulRoutes, totalRoutes) {
44
- _classCallCheck(this, AnalyticsRouteLogsData);
45
- AnalyticsRouteLogsData.initialize(this, failedRoutes, period, successfulRoutes, totalRoutes);
44
+ function UsageRouteLogsData(device, failedRoutes, period, successfulRoutes, totalRoutes) {
45
+ _classCallCheck(this, UsageRouteLogsData);
46
+ UsageRouteLogsData.initialize(this, device, failedRoutes, period, successfulRoutes, totalRoutes);
46
47
  }
47
48
 
48
49
  /**
@@ -50,9 +51,10 @@ var AnalyticsRouteLogsData = /*#__PURE__*/function () {
50
51
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
51
52
  * Only for internal use.
52
53
  */
53
- return _createClass(AnalyticsRouteLogsData, null, [{
54
+ return _createClass(UsageRouteLogsData, null, [{
54
55
  key: "initialize",
55
- value: function initialize(obj, failedRoutes, period, successfulRoutes, totalRoutes) {
56
+ value: function initialize(obj, device, failedRoutes, period, successfulRoutes, totalRoutes) {
57
+ obj['device'] = device;
56
58
  obj['failed_routes'] = failedRoutes;
57
59
  obj['period'] = period;
58
60
  obj['successful_routes'] = successfulRoutes;
@@ -60,17 +62,20 @@ var AnalyticsRouteLogsData = /*#__PURE__*/function () {
60
62
  }
61
63
 
62
64
  /**
63
- * Constructs a <code>AnalyticsRouteLogsData</code> from a plain JavaScript object, optionally creating a new instance.
65
+ * Constructs a <code>UsageRouteLogsData</code> from a plain JavaScript object, optionally creating a new instance.
64
66
  * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
65
67
  * @param {Object} data The plain JavaScript object bearing properties of interest.
66
- * @param {module:model/AnalyticsRouteLogsData} obj Optional instance to populate.
67
- * @return {module:model/AnalyticsRouteLogsData} The populated <code>AnalyticsRouteLogsData</code> instance.
68
+ * @param {module:model/UsageRouteLogsData} obj Optional instance to populate.
69
+ * @return {module:model/UsageRouteLogsData} The populated <code>UsageRouteLogsData</code> instance.
68
70
  */
69
71
  }, {
70
72
  key: "constructFromObject",
71
73
  value: function constructFromObject(data, obj) {
72
74
  if (data) {
73
- obj = obj || new AnalyticsRouteLogsData();
75
+ obj = obj || new UsageRouteLogsData();
76
+ if (data.hasOwnProperty('device')) {
77
+ obj['device'] = _ApiClient["default"].convertToType(data['device'], 'String');
78
+ }
74
79
  if (data.hasOwnProperty('failed_routes')) {
75
80
  obj['failed_routes'] = _ApiClient["default"].convertToType(data['failed_routes'], 'Number');
76
81
  }
@@ -90,15 +95,15 @@ var AnalyticsRouteLogsData = /*#__PURE__*/function () {
90
95
  }
91
96
 
92
97
  /**
93
- * Validates the JSON data with respect to <code>AnalyticsRouteLogsData</code>.
98
+ * Validates the JSON data with respect to <code>UsageRouteLogsData</code>.
94
99
  * @param {Object} data The plain JavaScript object bearing properties of interest.
95
- * @return {boolean} to indicate whether the JSON data is valid with respect to <code>AnalyticsRouteLogsData</code>.
100
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>UsageRouteLogsData</code>.
96
101
  */
97
102
  }, {
98
103
  key: "validateJSON",
99
104
  value: function validateJSON(data) {
100
105
  // check to make sure all required properties are present in the JSON string
101
- var _iterator = _createForOfIteratorHelper(AnalyticsRouteLogsData.RequiredProperties),
106
+ var _iterator = _createForOfIteratorHelper(UsageRouteLogsData.RequiredProperties),
102
107
  _step;
103
108
  try {
104
109
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -107,34 +112,43 @@ var AnalyticsRouteLogsData = /*#__PURE__*/function () {
107
112
  throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data));
108
113
  }
109
114
  }
115
+ // ensure the json data is a string
110
116
  } catch (err) {
111
117
  _iterator.e(err);
112
118
  } finally {
113
119
  _iterator.f();
114
120
  }
121
+ if (data['device'] && !(typeof data['device'] === 'string' || data['device'] instanceof String)) {
122
+ throw new Error("Expected the field `device` to be a primitive type in the JSON string but got " + data['device']);
123
+ }
115
124
  return true;
116
125
  }
117
126
  }]);
118
127
  }();
119
- AnalyticsRouteLogsData.RequiredProperties = ["failed_routes", "period", "successful_routes", "total_routes"];
128
+ UsageRouteLogsData.RequiredProperties = ["device", "failed_routes", "period", "successful_routes", "total_routes"];
129
+
130
+ /**
131
+ * @member {String} device
132
+ */
133
+ UsageRouteLogsData.prototype['device'] = undefined;
120
134
 
121
135
  /**
122
136
  * @member {Number} failed_routes
123
137
  */
124
- AnalyticsRouteLogsData.prototype['failed_routes'] = undefined;
138
+ UsageRouteLogsData.prototype['failed_routes'] = undefined;
125
139
 
126
140
  /**
127
141
  * @member {Date} period
128
142
  */
129
- AnalyticsRouteLogsData.prototype['period'] = undefined;
143
+ UsageRouteLogsData.prototype['period'] = undefined;
130
144
 
131
145
  /**
132
146
  * @member {Number} successful_routes
133
147
  */
134
- AnalyticsRouteLogsData.prototype['successful_routes'] = undefined;
148
+ UsageRouteLogsData.prototype['successful_routes'] = undefined;
135
149
 
136
150
  /**
137
151
  * @member {Number} total_routes
138
152
  */
139
- AnalyticsRouteLogsData.prototype['total_routes'] = undefined;
140
- var _default = exports["default"] = AnalyticsRouteLogsData;
153
+ UsageRouteLogsData.prototype['total_routes'] = undefined;
154
+ var _default = exports["default"] = UsageRouteLogsData;
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
- var _AnalyticsSessionsData = _interopRequireDefault(require("./AnalyticsSessionsData"));
8
+ var _UsageRouteLogsData = _interopRequireDefault(require("./UsageRouteLogsData"));
9
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
10
10
  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); }
11
11
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
@@ -28,19 +28,19 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
28
28
  *
29
29
  */
30
30
  /**
31
- * The AnalyticsSessionsResponse model module.
32
- * @module model/AnalyticsSessionsResponse
33
- * @version 1.0.37-beta.9
31
+ * The UsageRouteLogsResponse model module.
32
+ * @module model/UsageRouteLogsResponse
33
+ * @version 1.0.38-beta.1
34
34
  */
35
- var AnalyticsSessionsResponse = /*#__PURE__*/function () {
35
+ var UsageRouteLogsResponse = /*#__PURE__*/function () {
36
36
  /**
37
- * Constructs a new <code>AnalyticsSessionsResponse</code>.
38
- * @alias module:model/AnalyticsSessionsResponse
39
- * @param data {Array.<module:model/AnalyticsSessionsData>}
37
+ * Constructs a new <code>UsageRouteLogsResponse</code>.
38
+ * @alias module:model/UsageRouteLogsResponse
39
+ * @param data {Array.<module:model/UsageRouteLogsData>}
40
40
  */
41
- function AnalyticsSessionsResponse(data) {
42
- _classCallCheck(this, AnalyticsSessionsResponse);
43
- AnalyticsSessionsResponse.initialize(this, data);
41
+ function UsageRouteLogsResponse(data) {
42
+ _classCallCheck(this, UsageRouteLogsResponse);
43
+ UsageRouteLogsResponse.initialize(this, data);
44
44
  }
45
45
 
46
46
  /**
@@ -48,26 +48,26 @@ var AnalyticsSessionsResponse = /*#__PURE__*/function () {
48
48
  * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
49
49
  * Only for internal use.
50
50
  */
51
- return _createClass(AnalyticsSessionsResponse, null, [{
51
+ return _createClass(UsageRouteLogsResponse, null, [{
52
52
  key: "initialize",
53
53
  value: function initialize(obj, data) {
54
54
  obj['data'] = data;
55
55
  }
56
56
 
57
57
  /**
58
- * Constructs a <code>AnalyticsSessionsResponse</code> from a plain JavaScript object, optionally creating a new instance.
58
+ * Constructs a <code>UsageRouteLogsResponse</code> from a plain JavaScript object, optionally creating a new instance.
59
59
  * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
60
60
  * @param {Object} data The plain JavaScript object bearing properties of interest.
61
- * @param {module:model/AnalyticsSessionsResponse} obj Optional instance to populate.
62
- * @return {module:model/AnalyticsSessionsResponse} The populated <code>AnalyticsSessionsResponse</code> instance.
61
+ * @param {module:model/UsageRouteLogsResponse} obj Optional instance to populate.
62
+ * @return {module:model/UsageRouteLogsResponse} The populated <code>UsageRouteLogsResponse</code> instance.
63
63
  */
64
64
  }, {
65
65
  key: "constructFromObject",
66
66
  value: function constructFromObject(data, obj) {
67
67
  if (data) {
68
- obj = obj || new AnalyticsSessionsResponse();
68
+ obj = obj || new UsageRouteLogsResponse();
69
69
  if (data.hasOwnProperty('data')) {
70
- obj['data'] = _ApiClient["default"].convertToType(data['data'], [_AnalyticsSessionsData["default"]]);
70
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], [_UsageRouteLogsData["default"]]);
71
71
  }
72
72
  } else if (data === null) {
73
73
  return null;
@@ -76,15 +76,15 @@ var AnalyticsSessionsResponse = /*#__PURE__*/function () {
76
76
  }
77
77
 
78
78
  /**
79
- * Validates the JSON data with respect to <code>AnalyticsSessionsResponse</code>.
79
+ * Validates the JSON data with respect to <code>UsageRouteLogsResponse</code>.
80
80
  * @param {Object} data The plain JavaScript object bearing properties of interest.
81
- * @return {boolean} to indicate whether the JSON data is valid with respect to <code>AnalyticsSessionsResponse</code>.
81
+ * @return {boolean} to indicate whether the JSON data is valid with respect to <code>UsageRouteLogsResponse</code>.
82
82
  */
83
83
  }, {
84
84
  key: "validateJSON",
85
85
  value: function validateJSON(data) {
86
86
  // check to make sure all required properties are present in the JSON string
87
- var _iterator = _createForOfIteratorHelper(AnalyticsSessionsResponse.RequiredProperties),
87
+ var _iterator = _createForOfIteratorHelper(UsageRouteLogsResponse.RequiredProperties),
88
88
  _step;
89
89
  try {
90
90
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
@@ -110,7 +110,7 @@ var AnalyticsSessionsResponse = /*#__PURE__*/function () {
110
110
  try {
111
111
  for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
112
112
  var item = _step2.value;
113
- _AnalyticsSessionsData["default"].validateJsonObject(item);
113
+ _UsageRouteLogsData["default"].validateJsonObject(item);
114
114
  }
115
115
  } catch (err) {
116
116
  _iterator2.e(err);
@@ -123,10 +123,10 @@ var AnalyticsSessionsResponse = /*#__PURE__*/function () {
123
123
  }
124
124
  }]);
125
125
  }();
126
- AnalyticsSessionsResponse.RequiredProperties = ["data"];
126
+ UsageRouteLogsResponse.RequiredProperties = ["data"];
127
127
 
128
128
  /**
129
- * @member {Array.<module:model/AnalyticsSessionsData>} data
129
+ * @member {Array.<module:model/UsageRouteLogsData>} data
130
130
  */
131
- AnalyticsSessionsResponse.prototype['data'] = undefined;
132
- var _default = exports["default"] = AnalyticsSessionsResponse;
131
+ UsageRouteLogsResponse.prototype['data'] = undefined;
132
+ var _default = exports["default"] = UsageRouteLogsResponse;