@blues-inc/notehub-js 1.0.29-beta.5 → 1.0.29-beta.6

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 (120) hide show
  1. package/README.md +4 -12
  2. package/dist/ApiClient.js +2 -2
  3. package/dist/api/AlertApi.js +1 -1
  4. package/dist/api/AuthorizationApi.js +1 -1
  5. package/dist/api/BillingAccountApi.js +1 -1
  6. package/dist/api/DeviceApi.js +1 -1
  7. package/dist/api/EventApi.js +1 -1
  8. package/dist/api/MonitorApi.js +1 -1
  9. package/dist/api/ProjectApi.js +41 -1
  10. package/dist/api/RepositoryApi.js +1 -1
  11. package/dist/api/RouteApi.js +1 -1
  12. package/dist/index.js +14 -28
  13. package/dist/model/Alert.js +1 -1
  14. package/dist/model/AlertDataInner.js +1 -1
  15. package/dist/model/AlertNotificationsInner.js +1 -1
  16. package/dist/model/Aws.js +1 -1
  17. package/dist/model/Azure.js +1 -1
  18. package/dist/model/BillingAccount.js +1 -1
  19. package/dist/model/Body.js +1 -1
  20. package/dist/model/CloneProjectRequest.js +1 -1
  21. package/dist/model/Contact.js +1 -1
  22. package/dist/model/CreateFleetRequest.js +1 -1
  23. package/dist/model/CreateMonitor.js +1 -1
  24. package/dist/model/CreateProductRequest.js +1 -1
  25. package/dist/model/CreateProjectRequest.js +1 -1
  26. package/dist/model/CreateUpdateRepository.js +1 -1
  27. package/dist/model/CurrentFirmware.js +1 -1
  28. package/dist/model/DFUEnv.js +1 -1
  29. package/dist/model/DFUState.js +1 -1
  30. package/dist/model/DataField.js +1 -1
  31. package/dist/model/DataSet.js +1 -1
  32. package/dist/model/DataSetField.js +1 -1
  33. package/dist/model/DeleteDeviceFleetsRequest.js +1 -1
  34. package/dist/model/Device.js +1 -1
  35. package/dist/model/DeviceDfuHistory.js +1 -1
  36. package/dist/model/DeviceDfuHistoryPage.js +1 -1
  37. package/dist/model/DeviceDfuStateMachine.js +1 -1
  38. package/dist/model/DeviceDfuStateMachineNode.js +1 -1
  39. package/dist/model/DeviceDfuStatus.js +1 -1
  40. package/dist/model/DeviceDfuStatusCurrent.js +1 -1
  41. package/dist/model/DeviceDfuStatusPage.js +1 -1
  42. package/dist/model/DeviceSession.js +1 -1
  43. package/dist/model/DeviceTowerInfo.js +1 -1
  44. package/dist/model/DeviceUsage.js +1 -1
  45. package/dist/model/DfuActionRequest.js +1 -1
  46. package/dist/model/EmailNotification.js +1 -1
  47. package/dist/model/EnvironmentVariables.js +1 -1
  48. package/dist/model/Error.js +1 -1
  49. package/dist/model/Event.js +1 -1
  50. package/dist/model/Firmware.js +1 -1
  51. package/dist/model/FirmwareInfo.js +1 -1
  52. package/dist/model/Fleet.js +1 -1
  53. package/dist/model/GetAlerts200Response.js +1 -1
  54. package/dist/model/GetBillingAccounts200Response.js +1 -1
  55. package/dist/model/GetDeviceEnvironmentVariables200Response.js +1 -1
  56. package/dist/model/GetDeviceHealthLog200Response.js +1 -1
  57. package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +1 -1
  58. package/dist/model/GetDeviceLatest200Response.js +1 -1
  59. package/dist/model/GetDevicePublicKey200Response.js +1 -1
  60. package/dist/model/GetDeviceSessions200Response.js +1 -1
  61. package/dist/model/GetProjectDevicePublicKeys200Response.js +1 -1
  62. package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +1 -1
  63. package/dist/model/GetProjectDevices200Response.js +1 -1
  64. package/dist/model/GetProjectEvents200Response.js +1 -1
  65. package/dist/model/GetProjectEventsByCursor200Response.js +1 -1
  66. package/dist/model/GetProjectFleets200Response.js +1 -1
  67. package/dist/model/GetProjectMembers200Response.js +1 -1
  68. package/dist/model/GetProjectProducts200Response.js +1 -1
  69. package/dist/model/GetProjects200Response.js +1 -1
  70. package/dist/model/GetRouteLogsByRoute200ResponseInner.js +1 -1
  71. package/dist/model/Google.js +1 -1
  72. package/dist/model/HandleNoteChanges200Response.js +1 -1
  73. package/dist/model/HandleNoteGet200Response.js +1 -1
  74. package/dist/model/HandleNoteSignal200Response.js +1 -1
  75. package/dist/model/HandleNotefileChanges200Response.js +1 -1
  76. package/dist/model/HandleNotefileChangesPending200Response.js +1 -1
  77. package/dist/model/HandleNotefileDeleteRequest.js +1 -1
  78. package/dist/model/Http.js +1 -1
  79. package/dist/model/HttpFilter.js +1 -1
  80. package/dist/model/HttpTransform.js +1 -1
  81. package/dist/model/Location.js +1 -1
  82. package/dist/model/Login200Response.js +1 -1
  83. package/dist/model/LoginRequest.js +1 -1
  84. package/dist/model/Monitor.js +1 -1
  85. package/dist/model/MonitorAlertRoutesInner.js +1 -1
  86. package/dist/model/Mqtt.js +1 -1
  87. package/dist/model/Note.js +1 -1
  88. package/dist/model/NotefileSchema.js +146 -0
  89. package/dist/model/NotehubRoute.js +1 -1
  90. package/dist/model/NotehubRouteSchema.js +1 -1
  91. package/dist/model/PostProvisionProjectDeviceRequest.js +1 -1
  92. package/dist/model/Product.js +1 -1
  93. package/dist/model/Project.js +1 -1
  94. package/dist/model/ProjectMember.js +1 -1
  95. package/dist/model/Proxy.js +1 -1
  96. package/dist/model/PutDeviceFleetsRequest.js +1 -1
  97. package/dist/model/QuestionDataResponseLineChart.js +1 -1
  98. package/dist/model/QuestionDataResponseMap.js +1 -1
  99. package/dist/model/Radresponder.js +1 -1
  100. package/dist/model/Repository.js +1 -1
  101. package/dist/model/SchemaProperty.js +230 -0
  102. package/dist/model/Slack.js +1 -1
  103. package/dist/model/SlackBearerNotification.js +1 -1
  104. package/dist/model/SlackWebHookNotification.js +1 -1
  105. package/dist/model/Snowflake.js +1 -1
  106. package/dist/model/SnowflakeTransform.js +1 -1
  107. package/dist/model/Thingworx.js +1 -1
  108. package/dist/model/TowerLocation.js +2 -10
  109. package/dist/model/Twilio.js +1 -1
  110. package/dist/model/UpdateFleetRequest.js +1 -1
  111. package/dist/model/UploadMetadata.js +1 -1
  112. package/dist/model/UserDbRoute.js +1 -1
  113. package/dist/model/UserDfuStateMachine.js +1 -1
  114. package/dist/model/UserDfuStateMachineStatus.js +1 -1
  115. package/dist/model/UserFirmwareInfo.js +1 -1
  116. package/package.json +1 -1
  117. package/dist/api/ExternalDevicesApi.js +0 -202
  118. package/dist/api/WebhookApi.js +0 -312
  119. package/dist/model/ExtDeviceSession.js +0 -617
  120. package/dist/model/WebhookSettings.js +0 -127
@@ -1,202 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
- var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
- var _Event = _interopRequireDefault(require("../model/Event"));
9
- var _ExtDeviceSession = _interopRequireDefault(require("../model/ExtDeviceSession"));
10
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
- 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); }
12
- function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
13
- 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); } }
14
- function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
15
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
16
- 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); } /**
17
- * Notehub API
18
- * The OpenAPI definition for the Notehub.io API.
19
- *
20
- * The version of the OpenAPI document: 1.2.0
21
- * Contact: engineering@blues.io
22
- *
23
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
24
- * https://openapi-generator.tech
25
- * Do not edit the class manually.
26
- *
27
- */
28
- /**
29
- * ExternalDevices service.
30
- * @module api/ExternalDevicesApi
31
- * @version 1.0.29-beta.5
32
- */
33
- var ExternalDevicesApi = exports["default"] = /*#__PURE__*/function () {
34
- /**
35
- * Constructs a new ExternalDevicesApi.
36
- * @alias module:api/ExternalDevicesApi
37
- * @class
38
- * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
39
- * default to {@link module:ApiClient#instance} if unspecified.
40
- */
41
- function ExternalDevicesApi(apiClient) {
42
- _classCallCheck(this, ExternalDevicesApi);
43
- this.apiClient = apiClient || _ApiClient["default"].instance;
44
- }
45
-
46
- /**
47
- * Closes the session for the specified device if open
48
- * @param {String} productUID
49
- * @param {String} deviceUID
50
- * @param {module:model/ExtDeviceSession} extDeviceSession Session Object
51
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
52
- */
53
- return _createClass(ExternalDevicesApi, [{
54
- key: "closeSessionWithHttpInfo",
55
- value: function closeSessionWithHttpInfo(productUID, deviceUID, extDeviceSession) {
56
- var postBody = extDeviceSession;
57
- // verify the required parameter 'productUID' is set
58
- if (productUID === undefined || productUID === null) {
59
- throw new Error("Missing the required parameter 'productUID' when calling closeSession");
60
- }
61
- // verify the required parameter 'deviceUID' is set
62
- if (deviceUID === undefined || deviceUID === null) {
63
- throw new Error("Missing the required parameter 'deviceUID' when calling closeSession");
64
- }
65
- // verify the required parameter 'extDeviceSession' is set
66
- if (extDeviceSession === undefined || extDeviceSession === null) {
67
- throw new Error("Missing the required parameter 'extDeviceSession' when calling closeSession");
68
- }
69
- var pathParams = {
70
- 'productUID': productUID,
71
- 'deviceUID': deviceUID
72
- };
73
- var queryParams = {};
74
- var headerParams = {};
75
- var formParams = {};
76
- var authNames = ['api_key'];
77
- var contentTypes = ['application/json'];
78
- var accepts = [];
79
- var returnType = null;
80
- return this.apiClient.callApi('/v1/products/{productUID}/ext-devices/{deviceUID}/session/close', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
81
- }
82
-
83
- /**
84
- * Closes the session for the specified device if open
85
- * @param {String} productUID
86
- * @param {String} deviceUID
87
- * @param {module:model/ExtDeviceSession} extDeviceSession Session Object
88
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}
89
- */
90
- }, {
91
- key: "closeSession",
92
- value: function closeSession(productUID, deviceUID, extDeviceSession) {
93
- return this.closeSessionWithHttpInfo(productUID, deviceUID, extDeviceSession).then(function (response_and_data) {
94
- return response_and_data.data;
95
- });
96
- }
97
-
98
- /**
99
- * Creates an event using specified webhook
100
- * @param {String} productUID
101
- * @param {String} deviceUID
102
- * @param {module:model/Event} event Event Object
103
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
104
- */
105
- }, {
106
- key: "createEventExtDeviceWithHttpInfo",
107
- value: function createEventExtDeviceWithHttpInfo(productUID, deviceUID, event) {
108
- var postBody = event;
109
- // verify the required parameter 'productUID' is set
110
- if (productUID === undefined || productUID === null) {
111
- throw new Error("Missing the required parameter 'productUID' when calling createEventExtDevice");
112
- }
113
- // verify the required parameter 'deviceUID' is set
114
- if (deviceUID === undefined || deviceUID === null) {
115
- throw new Error("Missing the required parameter 'deviceUID' when calling createEventExtDevice");
116
- }
117
- // verify the required parameter 'event' is set
118
- if (event === undefined || event === null) {
119
- throw new Error("Missing the required parameter 'event' when calling createEventExtDevice");
120
- }
121
- var pathParams = {
122
- 'productUID': productUID,
123
- 'deviceUID': deviceUID
124
- };
125
- var queryParams = {};
126
- var headerParams = {};
127
- var formParams = {};
128
- var authNames = ['api_key'];
129
- var contentTypes = ['application/json'];
130
- var accepts = [];
131
- var returnType = null;
132
- return this.apiClient.callApi('/v1/products/{productUID}/ext-devices/{deviceUID}/event', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
133
- }
134
-
135
- /**
136
- * Creates an event using specified webhook
137
- * @param {String} productUID
138
- * @param {String} deviceUID
139
- * @param {module:model/Event} event Event Object
140
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}
141
- */
142
- }, {
143
- key: "createEventExtDevice",
144
- value: function createEventExtDevice(productUID, deviceUID, event) {
145
- return this.createEventExtDeviceWithHttpInfo(productUID, deviceUID, event).then(function (response_and_data) {
146
- return response_and_data.data;
147
- });
148
- }
149
-
150
- /**
151
- * Create a Session for the specified device. | If a session is currently open it will be closed and a new one opened.
152
- * @param {String} productUID
153
- * @param {String} deviceUID
154
- * @param {module:model/ExtDeviceSession} extDeviceSession Session Object
155
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
156
- */
157
- }, {
158
- key: "webhookSessionWithHttpInfo",
159
- value: function webhookSessionWithHttpInfo(productUID, deviceUID, extDeviceSession) {
160
- var postBody = extDeviceSession;
161
- // verify the required parameter 'productUID' is set
162
- if (productUID === undefined || productUID === null) {
163
- throw new Error("Missing the required parameter 'productUID' when calling webhookSession");
164
- }
165
- // verify the required parameter 'deviceUID' is set
166
- if (deviceUID === undefined || deviceUID === null) {
167
- throw new Error("Missing the required parameter 'deviceUID' when calling webhookSession");
168
- }
169
- // verify the required parameter 'extDeviceSession' is set
170
- if (extDeviceSession === undefined || extDeviceSession === null) {
171
- throw new Error("Missing the required parameter 'extDeviceSession' when calling webhookSession");
172
- }
173
- var pathParams = {
174
- 'productUID': productUID,
175
- 'deviceUID': deviceUID
176
- };
177
- var queryParams = {};
178
- var headerParams = {};
179
- var formParams = {};
180
- var authNames = ['api_key'];
181
- var contentTypes = ['application/json'];
182
- var accepts = [];
183
- var returnType = null;
184
- return this.apiClient.callApi('/v1/products/{productUID}/ext-devices/{deviceUID}/session/open', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
185
- }
186
-
187
- /**
188
- * Create a Session for the specified device. | If a session is currently open it will be closed and a new one opened.
189
- * @param {String} productUID
190
- * @param {String} deviceUID
191
- * @param {module:model/ExtDeviceSession} extDeviceSession Session Object
192
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}
193
- */
194
- }, {
195
- key: "webhookSession",
196
- value: function webhookSession(productUID, deviceUID, extDeviceSession) {
197
- return this.webhookSessionWithHttpInfo(productUID, deviceUID, extDeviceSession).then(function (response_and_data) {
198
- return response_and_data.data;
199
- });
200
- }
201
- }]);
202
- }();
@@ -1,312 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
- var _ApiClient = _interopRequireDefault(require("../ApiClient"));
8
- var _Event = _interopRequireDefault(require("../model/Event"));
9
- var _WebhookSettings = _interopRequireDefault(require("../model/WebhookSettings"));
10
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
- 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); }
12
- function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
13
- 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); } }
14
- function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
15
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
16
- 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); } /**
17
- * Notehub API
18
- * The OpenAPI definition for the Notehub.io API.
19
- *
20
- * The version of the OpenAPI document: 1.2.0
21
- * Contact: engineering@blues.io
22
- *
23
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
24
- * https://openapi-generator.tech
25
- * Do not edit the class manually.
26
- *
27
- */
28
- /**
29
- * Webhook service.
30
- * @module api/WebhookApi
31
- * @version 1.0.29-beta.5
32
- */
33
- var WebhookApi = exports["default"] = /*#__PURE__*/function () {
34
- /**
35
- * Constructs a new WebhookApi.
36
- * @alias module:api/WebhookApi
37
- * @class
38
- * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
39
- * default to {@link module:ApiClient#instance} if unspecified.
40
- */
41
- function WebhookApi(apiClient) {
42
- _classCallCheck(this, WebhookApi);
43
- this.apiClient = apiClient || _ApiClient["default"].instance;
44
- }
45
-
46
- /**
47
- * Creates an event using specified webhook
48
- * @param {String} productUID
49
- * @param {String} deviceUID
50
- * @param {String} webhookUID Webhook UID
51
- * @param {module:model/Event} event Event Object
52
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
53
- */
54
- return _createClass(WebhookApi, [{
55
- key: "createEventWithHttpInfo",
56
- value: function createEventWithHttpInfo(productUID, deviceUID, webhookUID, event) {
57
- var postBody = event;
58
- // verify the required parameter 'productUID' is set
59
- if (productUID === undefined || productUID === null) {
60
- throw new Error("Missing the required parameter 'productUID' when calling createEvent");
61
- }
62
- // verify the required parameter 'deviceUID' is set
63
- if (deviceUID === undefined || deviceUID === null) {
64
- throw new Error("Missing the required parameter 'deviceUID' when calling createEvent");
65
- }
66
- // verify the required parameter 'webhookUID' is set
67
- if (webhookUID === undefined || webhookUID === null) {
68
- throw new Error("Missing the required parameter 'webhookUID' when calling createEvent");
69
- }
70
- // verify the required parameter 'event' is set
71
- if (event === undefined || event === null) {
72
- throw new Error("Missing the required parameter 'event' when calling createEvent");
73
- }
74
- var pathParams = {
75
- 'productUID': productUID,
76
- 'deviceUID': deviceUID,
77
- 'webhookUID': webhookUID
78
- };
79
- var queryParams = {};
80
- var headerParams = {};
81
- var formParams = {};
82
- var authNames = ['api_key'];
83
- var contentTypes = ['application/json'];
84
- var accepts = [];
85
- var returnType = null;
86
- return this.apiClient.callApi('/v1/products/{productUID}/webhooks/{webhookUID}/event', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
87
- }
88
-
89
- /**
90
- * Creates an event using specified webhook
91
- * @param {String} productUID
92
- * @param {String} deviceUID
93
- * @param {String} webhookUID Webhook UID
94
- * @param {module:model/Event} event Event Object
95
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}
96
- */
97
- }, {
98
- key: "createEvent",
99
- value: function createEvent(productUID, deviceUID, webhookUID, event) {
100
- return this.createEventWithHttpInfo(productUID, deviceUID, webhookUID, event).then(function (response_and_data) {
101
- return response_and_data.data;
102
- });
103
- }
104
-
105
- /**
106
- * Creates a webhook for the specified product with the given name. The name | must be unique within the project.
107
- * @param {String} webhookUID Webhook UID
108
- * @param {module:model/WebhookSettings} webhookSettings
109
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
110
- */
111
- }, {
112
- key: "createWebhookWithHttpInfo",
113
- value: function createWebhookWithHttpInfo(webhookUID, webhookSettings) {
114
- var postBody = webhookSettings;
115
- // verify the required parameter 'webhookUID' is set
116
- if (webhookUID === undefined || webhookUID === null) {
117
- throw new Error("Missing the required parameter 'webhookUID' when calling createWebhook");
118
- }
119
- // verify the required parameter 'webhookSettings' is set
120
- if (webhookSettings === undefined || webhookSettings === null) {
121
- throw new Error("Missing the required parameter 'webhookSettings' when calling createWebhook");
122
- }
123
- var pathParams = {
124
- 'webhookUID': webhookUID
125
- };
126
- var queryParams = {};
127
- var headerParams = {};
128
- var formParams = {};
129
- var authNames = ['api_key'];
130
- var contentTypes = ['application/json'];
131
- var accepts = [];
132
- var returnType = null;
133
- return this.apiClient.callApi('/v1/products/{productUID}/webhooks/{webhookUID}', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
134
- }
135
-
136
- /**
137
- * Creates a webhook for the specified product with the given name. The name | must be unique within the project.
138
- * @param {String} webhookUID Webhook UID
139
- * @param {module:model/WebhookSettings} webhookSettings
140
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}
141
- */
142
- }, {
143
- key: "createWebhook",
144
- value: function createWebhook(webhookUID, webhookSettings) {
145
- return this.createWebhookWithHttpInfo(webhookUID, webhookSettings).then(function (response_and_data) {
146
- return response_and_data.data;
147
- });
148
- }
149
-
150
- /**
151
- * Deletes the specified webhook
152
- * @param {String} webhookUID Webhook UID
153
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
154
- */
155
- }, {
156
- key: "deleteWebhookWithHttpInfo",
157
- value: function deleteWebhookWithHttpInfo(webhookUID) {
158
- var postBody = null;
159
- // verify the required parameter 'webhookUID' is set
160
- if (webhookUID === undefined || webhookUID === null) {
161
- throw new Error("Missing the required parameter 'webhookUID' when calling deleteWebhook");
162
- }
163
- var pathParams = {
164
- 'webhookUID': webhookUID
165
- };
166
- var queryParams = {};
167
- var headerParams = {};
168
- var formParams = {};
169
- var authNames = ['api_key'];
170
- var contentTypes = [];
171
- var accepts = [];
172
- var returnType = null;
173
- return this.apiClient.callApi('/v1/products/{productUID}/webhooks/{webhookUID}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
174
- }
175
-
176
- /**
177
- * Deletes the specified webhook
178
- * @param {String} webhookUID Webhook UID
179
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}
180
- */
181
- }, {
182
- key: "deleteWebhook",
183
- value: function deleteWebhook(webhookUID) {
184
- return this.deleteWebhookWithHttpInfo(webhookUID).then(function (response_and_data) {
185
- return response_and_data.data;
186
- });
187
- }
188
-
189
- /**
190
- * Retrieves the configuration settings for the specified webhook
191
- * @param {String} webhookUID Webhook UID
192
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/WebhookSettings} and HTTP response
193
- */
194
- }, {
195
- key: "getWebhookSettingsWithHttpInfo",
196
- value: function getWebhookSettingsWithHttpInfo(webhookUID) {
197
- var postBody = null;
198
- // verify the required parameter 'webhookUID' is set
199
- if (webhookUID === undefined || webhookUID === null) {
200
- throw new Error("Missing the required parameter 'webhookUID' when calling getWebhookSettings");
201
- }
202
- var pathParams = {
203
- 'webhookUID': webhookUID
204
- };
205
- var queryParams = {};
206
- var headerParams = {};
207
- var formParams = {};
208
- var authNames = ['api_key'];
209
- var contentTypes = [];
210
- var accepts = ['application/json'];
211
- var returnType = _WebhookSettings["default"];
212
- return this.apiClient.callApi('/v1/products/{productUID}/webhooks/{webhookUID}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
213
- }
214
-
215
- /**
216
- * Retrieves the configuration settings for the specified webhook
217
- * @param {String} webhookUID Webhook UID
218
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/WebhookSettings}
219
- */
220
- }, {
221
- key: "getWebhookSettings",
222
- value: function getWebhookSettings(webhookUID) {
223
- return this.getWebhookSettingsWithHttpInfo(webhookUID).then(function (response_and_data) {
224
- return response_and_data.data;
225
- });
226
- }
227
-
228
- /**
229
- * Retrieves all webhooks for the specified project
230
- * @param {String} productUID
231
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/WebhookSettings>} and HTTP response
232
- */
233
- }, {
234
- key: "getWebhooksWithHttpInfo",
235
- value: function getWebhooksWithHttpInfo(productUID) {
236
- var postBody = null;
237
- // verify the required parameter 'productUID' is set
238
- if (productUID === undefined || productUID === null) {
239
- throw new Error("Missing the required parameter 'productUID' when calling getWebhooks");
240
- }
241
- var pathParams = {
242
- 'productUID': productUID
243
- };
244
- var queryParams = {};
245
- var headerParams = {};
246
- var formParams = {};
247
- var authNames = ['api_key'];
248
- var contentTypes = [];
249
- var accepts = ['application/json'];
250
- var returnType = [_WebhookSettings["default"]];
251
- return this.apiClient.callApi('/v1/products/{productUID}/webhooks', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
252
- }
253
-
254
- /**
255
- * Retrieves all webhooks for the specified project
256
- * @param {String} productUID
257
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/WebhookSettings>}
258
- */
259
- }, {
260
- key: "getWebhooks",
261
- value: function getWebhooks(productUID) {
262
- return this.getWebhooksWithHttpInfo(productUID).then(function (response_and_data) {
263
- return response_and_data.data;
264
- });
265
- }
266
-
267
- /**
268
- * Updates the configuration settings for the specified webhook. | Webhook will be created if it does not exist. Update body will completely replace the existing settings.
269
- * @param {String} webhookUID Webhook UID
270
- * @param {module:model/WebhookSettings} webhookSettings
271
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
272
- */
273
- }, {
274
- key: "updateWebhookWithHttpInfo",
275
- value: function updateWebhookWithHttpInfo(webhookUID, webhookSettings) {
276
- var postBody = webhookSettings;
277
- // verify the required parameter 'webhookUID' is set
278
- if (webhookUID === undefined || webhookUID === null) {
279
- throw new Error("Missing the required parameter 'webhookUID' when calling updateWebhook");
280
- }
281
- // verify the required parameter 'webhookSettings' is set
282
- if (webhookSettings === undefined || webhookSettings === null) {
283
- throw new Error("Missing the required parameter 'webhookSettings' when calling updateWebhook");
284
- }
285
- var pathParams = {
286
- 'webhookUID': webhookUID
287
- };
288
- var queryParams = {};
289
- var headerParams = {};
290
- var formParams = {};
291
- var authNames = ['api_key'];
292
- var contentTypes = ['application/json'];
293
- var accepts = [];
294
- var returnType = null;
295
- return this.apiClient.callApi('/v1/products/{productUID}/webhooks/{webhookUID}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
296
- }
297
-
298
- /**
299
- * Updates the configuration settings for the specified webhook. | Webhook will be created if it does not exist. Update body will completely replace the existing settings.
300
- * @param {String} webhookUID Webhook UID
301
- * @param {module:model/WebhookSettings} webhookSettings
302
- * @return {Promise} a {@link https://www.promisejs.org/|Promise}
303
- */
304
- }, {
305
- key: "updateWebhook",
306
- value: function updateWebhook(webhookUID, webhookSettings) {
307
- return this.updateWebhookWithHttpInfo(webhookUID, webhookSettings).then(function (response_and_data) {
308
- return response_and_data.data;
309
- });
310
- }
311
- }]);
312
- }();