@blues-inc/notehub-js 1.0.32-beta.8 → 1.0.33
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.
- package/README.md +212 -231
- package/dist/ApiClient.js +156 -156
- package/dist/api/AlertApi.js +22 -22
- package/dist/api/AuthorizationApi.js +16 -16
- package/dist/api/BillingAccountApi.js +14 -14
- package/dist/api/DeviceApi.js +351 -351
- package/dist/api/EventApi.js +118 -118
- package/dist/api/MonitorApi.js +52 -52
- package/dist/api/ProjectApi.js +353 -353
- package/dist/api/RepositoryApi.js +103 -103
- package/dist/api/RouteApi.js +74 -74
- package/dist/index.js +0 -28
- package/dist/model/Alert.js +74 -76
- package/dist/model/AlertDataInner.js +35 -35
- package/dist/model/AlertNotificationsInner.js +18 -18
- package/dist/model/Aws.js +65 -65
- package/dist/model/Azure.js +43 -43
- package/dist/model/BillingAccount.js +21 -21
- package/dist/model/BillingAccountRole.js +9 -9
- package/dist/model/Body.js +5 -5
- package/dist/model/CloneProjectRequest.js +20 -20
- package/dist/model/Contact.js +22 -22
- package/dist/model/CreateFleetRequest.js +12 -12
- package/dist/model/CreateMonitor.js +125 -126
- package/dist/model/CreateProductRequest.js +22 -22
- package/dist/model/CreateProjectRequest.js +16 -16
- package/dist/model/CreateUpdateRepository.js +17 -17
- package/dist/model/CurrentFirmware.js +12 -12
- package/dist/model/DFUEnv.js +12 -12
- package/dist/model/DFUState.js +65 -65
- package/dist/model/DataField.js +7 -7
- package/dist/model/DataSet.js +29 -30
- package/dist/model/DataSetField.js +19 -19
- package/dist/model/DeleteDeviceFleetsRequest.js +8 -8
- package/dist/model/Device.js +101 -102
- package/dist/model/DeviceDfuHistory.js +19 -20
- package/dist/model/DeviceDfuHistoryPage.js +12 -13
- package/dist/model/DeviceDfuStateMachine.js +24 -25
- package/dist/model/DeviceDfuStateMachineNode.js +22 -22
- package/dist/model/DeviceDfuStatus.js +20 -20
- package/dist/model/DeviceDfuStatusCurrent.js +32 -32
- package/dist/model/DeviceDfuStatusPage.js +12 -13
- package/dist/model/DeviceSession.js +185 -296
- package/dist/model/DeviceTowerInfo.js +14 -14
- package/dist/model/DeviceUsage.js +33 -35
- package/dist/model/DfuActionRequest.js +7 -7
- package/dist/model/EmailNotification.js +7 -7
- package/dist/model/EnvironmentVariables.js +8 -8
- package/dist/model/Error.js +31 -31
- package/dist/model/Event.js +243 -256
- package/dist/model/Firmware.js +49 -49
- package/dist/model/FirmwareInfo.js +60 -60
- package/dist/model/Fleet.js +27 -27
- package/dist/model/GetAlerts200Response.js +14 -15
- package/dist/model/GetBillingAccounts200Response.js +9 -10
- package/dist/model/GetDeviceEnvironmentVariables200Response.js +16 -16
- package/dist/model/GetDeviceHealthLog200Response.js +11 -12
- package/dist/model/GetDeviceHealthLog200ResponseHealthLogInner.js +19 -19
- package/dist/model/GetDeviceLatest200Response.js +9 -10
- package/dist/model/GetDevicePublicKey200Response.js +16 -16
- package/dist/model/GetDeviceSessions200Response.js +16 -17
- package/dist/model/GetProjectDevicePublicKeys200Response.js +16 -17
- package/dist/model/GetProjectDevicePublicKeys200ResponseDevicePublicKeysInner.js +12 -12
- package/dist/model/GetProjectDevices200Response.js +16 -17
- package/dist/model/GetProjectEvents200Response.js +20 -21
- package/dist/model/GetProjectEventsByCursor200Response.js +23 -24
- package/dist/model/GetProjectFleets200Response.js +11 -12
- package/dist/model/GetProjectMembers200Response.js +11 -12
- package/dist/model/GetProjectProducts200Response.js +9 -10
- package/dist/model/GetProjects200Response.js +9 -10
- package/dist/model/GetRouteLogsByRoute200ResponseInner.js +35 -35
- package/dist/model/Google.js +33 -33
- package/dist/model/HandleNoteChanges200Response.js +11 -11
- package/dist/model/HandleNoteGet200Response.js +13 -13
- package/dist/model/HandleNoteSignal200Response.js +5 -5
- package/dist/model/HandleNotefileChanges200Response.js +11 -11
- package/dist/model/HandleNotefileChangesPending200Response.js +14 -14
- package/dist/model/HandleNotefileDeleteRequest.js +7 -7
- package/dist/model/Http.js +35 -35
- package/dist/model/HttpFilter.js +19 -19
- package/dist/model/HttpTransform.js +20 -20
- package/dist/model/Location.js +40 -40
- package/dist/model/Login200Response.js +7 -7
- package/dist/model/LoginRequest.js +12 -12
- package/dist/model/Monitor.js +99 -100
- package/dist/model/MonitorAlertRoutesInner.js +10 -9
- package/dist/model/Mqtt.js +66 -66
- package/dist/model/Note.js +10 -10
- package/dist/model/NotefileSchema.js +18 -19
- package/dist/model/NotehubRoute.js +36 -36
- package/dist/model/NotehubRouteSchema.js +46 -45
- package/dist/model/PostProvisionProjectDeviceRequest.js +18 -18
- package/dist/model/Product.js +26 -26
- package/dist/model/Project.js +34 -34
- package/dist/model/ProjectMember.js +22 -22
- package/dist/model/Proxy.js +24 -24
- package/dist/model/PutDeviceFleetsRequest.js +8 -8
- package/dist/model/QuestionDataResponseLineChart.js +39 -39
- package/dist/model/QuestionDataResponseMap.js +16 -16
- package/dist/model/Radresponder.js +25 -25
- package/dist/model/Repository.js +22 -22
- package/dist/model/Role.js +9 -9
- package/dist/model/SchemaProperty.js +38 -40
- package/dist/model/SimUsage.js +19 -19
- package/dist/model/Slack.js +53 -53
- package/dist/model/SlackBearerNotification.js +25 -25
- package/dist/model/SlackWebHookNotification.js +20 -20
- package/dist/model/Snowflake.js +45 -45
- package/dist/model/SnowflakeTransform.js +12 -12
- package/dist/model/Thingworx.js +33 -33
- package/dist/model/TowerLocation.js +58 -70
- package/dist/model/Twilio.js +43 -43
- package/dist/model/UpdateFleetRequest.js +22 -22
- package/dist/model/UploadMetadata.js +59 -59
- package/dist/model/UserDbRoute.js +25 -25
- package/dist/model/UserDfuStateMachine.js +20 -20
- package/dist/model/UserDfuStateMachineStatus.js +20 -20
- package/dist/model/UserFirmwareInfo.js +12 -12
- package/package.json +3 -3
- package/dist/api/ExternalDevicesApi.js +0 -203
- package/dist/api/WebhookApi.js +0 -282
- package/dist/model/GetWebhooks200Response.js +0 -112
- package/dist/model/WebhookSettings.js +0 -114
package/dist/api/WebhookApi.js
DELETED
|
@@ -1,282 +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 _Error = _interopRequireDefault(require("../model/Error"));
|
|
9
|
-
var _GetWebhooks200Response = _interopRequireDefault(require("../model/GetWebhooks200Response"));
|
|
10
|
-
var _WebhookSettings = _interopRequireDefault(require("../model/WebhookSettings"));
|
|
11
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
12
|
-
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); }
|
|
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
|
-
* Webhook service.
|
|
31
|
-
* @module api/WebhookApi
|
|
32
|
-
* @version 1.0.32-beta.8
|
|
33
|
-
*/
|
|
34
|
-
var WebhookApi = exports["default"] = /*#__PURE__*/function () {
|
|
35
|
-
/**
|
|
36
|
-
* Constructs a new WebhookApi.
|
|
37
|
-
* @alias module:api/WebhookApi
|
|
38
|
-
* @class
|
|
39
|
-
* @param {module:ApiClient} [apiClient] Optional API client implementation to use,
|
|
40
|
-
* default to {@link module:ApiClient#instance} if unspecified.
|
|
41
|
-
*/
|
|
42
|
-
function WebhookApi(apiClient) {
|
|
43
|
-
_classCallCheck(this, WebhookApi);
|
|
44
|
-
this.apiClient = apiClient || _ApiClient["default"].instance;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Creates a webhook for the specified product with the given name. The name | must be unique within the project.
|
|
49
|
-
* @param {String} productUID
|
|
50
|
-
* @param {String} webhookUID Webhook UID
|
|
51
|
-
* @param {module:model/WebhookSettings} webhookSettings
|
|
52
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
53
|
-
*/
|
|
54
|
-
return _createClass(WebhookApi, [{
|
|
55
|
-
key: "createWebhookWithHttpInfo",
|
|
56
|
-
value: function createWebhookWithHttpInfo(productUID, webhookUID, webhookSettings) {
|
|
57
|
-
var postBody = webhookSettings;
|
|
58
|
-
// verify the required parameter 'productUID' is set
|
|
59
|
-
if (productUID === undefined || productUID === null) {
|
|
60
|
-
throw new _Error["default"]("Missing the required parameter 'productUID' when calling createWebhook");
|
|
61
|
-
}
|
|
62
|
-
// verify the required parameter 'webhookUID' is set
|
|
63
|
-
if (webhookUID === undefined || webhookUID === null) {
|
|
64
|
-
throw new _Error["default"]("Missing the required parameter 'webhookUID' when calling createWebhook");
|
|
65
|
-
}
|
|
66
|
-
// verify the required parameter 'webhookSettings' is set
|
|
67
|
-
if (webhookSettings === undefined || webhookSettings === null) {
|
|
68
|
-
throw new _Error["default"]("Missing the required parameter 'webhookSettings' when calling createWebhook");
|
|
69
|
-
}
|
|
70
|
-
var pathParams = {
|
|
71
|
-
'productUID': productUID,
|
|
72
|
-
'webhookUID': webhookUID
|
|
73
|
-
};
|
|
74
|
-
var queryParams = {};
|
|
75
|
-
var headerParams = {};
|
|
76
|
-
var formParams = {};
|
|
77
|
-
var authNames = ['api_key'];
|
|
78
|
-
var contentTypes = ['application/json'];
|
|
79
|
-
var accepts = ['application/json'];
|
|
80
|
-
var returnType = null;
|
|
81
|
-
return this.apiClient.callApi('/v1/products/{productUID}/webhooks/{webhookUID}', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Creates a webhook for the specified product with the given name. The name | must be unique within the project.
|
|
86
|
-
* @param {String} productUID
|
|
87
|
-
* @param {String} webhookUID Webhook UID
|
|
88
|
-
* @param {module:model/WebhookSettings} webhookSettings
|
|
89
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
90
|
-
*/
|
|
91
|
-
}, {
|
|
92
|
-
key: "createWebhook",
|
|
93
|
-
value: function createWebhook(productUID, webhookUID, webhookSettings) {
|
|
94
|
-
return this.createWebhookWithHttpInfo(productUID, webhookUID, webhookSettings).then(function (response_and_data) {
|
|
95
|
-
return response_and_data.data;
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Deletes the specified webhook
|
|
101
|
-
* @param {String} productUID
|
|
102
|
-
* @param {String} webhookUID Webhook UID
|
|
103
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
104
|
-
*/
|
|
105
|
-
}, {
|
|
106
|
-
key: "deleteWebhookWithHttpInfo",
|
|
107
|
-
value: function deleteWebhookWithHttpInfo(productUID, webhookUID) {
|
|
108
|
-
var postBody = null;
|
|
109
|
-
// verify the required parameter 'productUID' is set
|
|
110
|
-
if (productUID === undefined || productUID === null) {
|
|
111
|
-
throw new _Error["default"]("Missing the required parameter 'productUID' when calling deleteWebhook");
|
|
112
|
-
}
|
|
113
|
-
// verify the required parameter 'webhookUID' is set
|
|
114
|
-
if (webhookUID === undefined || webhookUID === null) {
|
|
115
|
-
throw new _Error["default"]("Missing the required parameter 'webhookUID' when calling deleteWebhook");
|
|
116
|
-
}
|
|
117
|
-
var pathParams = {
|
|
118
|
-
'productUID': productUID,
|
|
119
|
-
'webhookUID': webhookUID
|
|
120
|
-
};
|
|
121
|
-
var queryParams = {};
|
|
122
|
-
var headerParams = {};
|
|
123
|
-
var formParams = {};
|
|
124
|
-
var authNames = ['api_key'];
|
|
125
|
-
var contentTypes = [];
|
|
126
|
-
var accepts = ['application/json'];
|
|
127
|
-
var returnType = null;
|
|
128
|
-
return this.apiClient.callApi('/v1/products/{productUID}/webhooks/{webhookUID}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Deletes the specified webhook
|
|
133
|
-
* @param {String} productUID
|
|
134
|
-
* @param {String} webhookUID Webhook UID
|
|
135
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
136
|
-
*/
|
|
137
|
-
}, {
|
|
138
|
-
key: "deleteWebhook",
|
|
139
|
-
value: function deleteWebhook(productUID, webhookUID) {
|
|
140
|
-
return this.deleteWebhookWithHttpInfo(productUID, webhookUID).then(function (response_and_data) {
|
|
141
|
-
return response_and_data.data;
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* Retrieves the configuration settings for the specified webhook
|
|
147
|
-
* @param {String} productUID
|
|
148
|
-
* @param {String} webhookUID Webhook UID
|
|
149
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/WebhookSettings} and HTTP response
|
|
150
|
-
*/
|
|
151
|
-
}, {
|
|
152
|
-
key: "getWebhookWithHttpInfo",
|
|
153
|
-
value: function getWebhookWithHttpInfo(productUID, webhookUID) {
|
|
154
|
-
var postBody = null;
|
|
155
|
-
// verify the required parameter 'productUID' is set
|
|
156
|
-
if (productUID === undefined || productUID === null) {
|
|
157
|
-
throw new _Error["default"]("Missing the required parameter 'productUID' when calling getWebhook");
|
|
158
|
-
}
|
|
159
|
-
// verify the required parameter 'webhookUID' is set
|
|
160
|
-
if (webhookUID === undefined || webhookUID === null) {
|
|
161
|
-
throw new _Error["default"]("Missing the required parameter 'webhookUID' when calling getWebhook");
|
|
162
|
-
}
|
|
163
|
-
var pathParams = {
|
|
164
|
-
'productUID': productUID,
|
|
165
|
-
'webhookUID': webhookUID
|
|
166
|
-
};
|
|
167
|
-
var queryParams = {};
|
|
168
|
-
var headerParams = {};
|
|
169
|
-
var formParams = {};
|
|
170
|
-
var authNames = ['api_key'];
|
|
171
|
-
var contentTypes = [];
|
|
172
|
-
var accepts = ['application/json'];
|
|
173
|
-
var returnType = _WebhookSettings["default"];
|
|
174
|
-
return this.apiClient.callApi('/v1/products/{productUID}/webhooks/{webhookUID}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* Retrieves the configuration settings for the specified webhook
|
|
179
|
-
* @param {String} productUID
|
|
180
|
-
* @param {String} webhookUID Webhook UID
|
|
181
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/WebhookSettings}
|
|
182
|
-
*/
|
|
183
|
-
}, {
|
|
184
|
-
key: "getWebhook",
|
|
185
|
-
value: function getWebhook(productUID, webhookUID) {
|
|
186
|
-
return this.getWebhookWithHttpInfo(productUID, webhookUID).then(function (response_and_data) {
|
|
187
|
-
return response_and_data.data;
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
/**
|
|
192
|
-
* Retrieves all webhooks for the specified project
|
|
193
|
-
* @param {String} productUID
|
|
194
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/GetWebhooks200Response} and HTTP response
|
|
195
|
-
*/
|
|
196
|
-
}, {
|
|
197
|
-
key: "getWebhooksWithHttpInfo",
|
|
198
|
-
value: function getWebhooksWithHttpInfo(productUID) {
|
|
199
|
-
var postBody = null;
|
|
200
|
-
// verify the required parameter 'productUID' is set
|
|
201
|
-
if (productUID === undefined || productUID === null) {
|
|
202
|
-
throw new _Error["default"]("Missing the required parameter 'productUID' when calling getWebhooks");
|
|
203
|
-
}
|
|
204
|
-
var pathParams = {
|
|
205
|
-
'productUID': productUID
|
|
206
|
-
};
|
|
207
|
-
var queryParams = {};
|
|
208
|
-
var headerParams = {};
|
|
209
|
-
var formParams = {};
|
|
210
|
-
var authNames = ['api_key'];
|
|
211
|
-
var contentTypes = [];
|
|
212
|
-
var accepts = ['application/json'];
|
|
213
|
-
var returnType = _GetWebhooks200Response["default"];
|
|
214
|
-
return this.apiClient.callApi('/v1/products/{productUID}/webhooks', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* Retrieves all webhooks for the specified project
|
|
219
|
-
* @param {String} productUID
|
|
220
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/GetWebhooks200Response}
|
|
221
|
-
*/
|
|
222
|
-
}, {
|
|
223
|
-
key: "getWebhooks",
|
|
224
|
-
value: function getWebhooks(productUID) {
|
|
225
|
-
return this.getWebhooksWithHttpInfo(productUID).then(function (response_and_data) {
|
|
226
|
-
return response_and_data.data;
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
/**
|
|
231
|
-
* 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.
|
|
232
|
-
* @param {String} productUID
|
|
233
|
-
* @param {String} webhookUID Webhook UID
|
|
234
|
-
* @param {module:model/WebhookSettings} webhookSettings
|
|
235
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
|
236
|
-
*/
|
|
237
|
-
}, {
|
|
238
|
-
key: "updateWebhookWithHttpInfo",
|
|
239
|
-
value: function updateWebhookWithHttpInfo(productUID, webhookUID, webhookSettings) {
|
|
240
|
-
var postBody = webhookSettings;
|
|
241
|
-
// verify the required parameter 'productUID' is set
|
|
242
|
-
if (productUID === undefined || productUID === null) {
|
|
243
|
-
throw new _Error["default"]("Missing the required parameter 'productUID' when calling updateWebhook");
|
|
244
|
-
}
|
|
245
|
-
// verify the required parameter 'webhookUID' is set
|
|
246
|
-
if (webhookUID === undefined || webhookUID === null) {
|
|
247
|
-
throw new _Error["default"]("Missing the required parameter 'webhookUID' when calling updateWebhook");
|
|
248
|
-
}
|
|
249
|
-
// verify the required parameter 'webhookSettings' is set
|
|
250
|
-
if (webhookSettings === undefined || webhookSettings === null) {
|
|
251
|
-
throw new _Error["default"]("Missing the required parameter 'webhookSettings' when calling updateWebhook");
|
|
252
|
-
}
|
|
253
|
-
var pathParams = {
|
|
254
|
-
'productUID': productUID,
|
|
255
|
-
'webhookUID': webhookUID
|
|
256
|
-
};
|
|
257
|
-
var queryParams = {};
|
|
258
|
-
var headerParams = {};
|
|
259
|
-
var formParams = {};
|
|
260
|
-
var authNames = ['api_key'];
|
|
261
|
-
var contentTypes = ['application/json'];
|
|
262
|
-
var accepts = ['application/json'];
|
|
263
|
-
var returnType = null;
|
|
264
|
-
return this.apiClient.callApi('/v1/products/{productUID}/webhooks/{webhookUID}', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, null);
|
|
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} productUID
|
|
270
|
-
* @param {String} webhookUID Webhook UID
|
|
271
|
-
* @param {module:model/WebhookSettings} webhookSettings
|
|
272
|
-
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
|
273
|
-
*/
|
|
274
|
-
}, {
|
|
275
|
-
key: "updateWebhook",
|
|
276
|
-
value: function updateWebhook(productUID, webhookUID, webhookSettings) {
|
|
277
|
-
return this.updateWebhookWithHttpInfo(productUID, webhookUID, webhookSettings).then(function (response_and_data) {
|
|
278
|
-
return response_and_data.data;
|
|
279
|
-
});
|
|
280
|
-
}
|
|
281
|
-
}]);
|
|
282
|
-
}();
|
|
@@ -1,112 +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 _WebhookSettings = _interopRequireDefault(require("./WebhookSettings"));
|
|
9
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
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
|
-
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; } } }; }
|
|
12
|
-
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; } }
|
|
13
|
-
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; }
|
|
14
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
15
|
-
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); } }
|
|
16
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
17
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
18
|
-
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); } /**
|
|
19
|
-
* Notehub API
|
|
20
|
-
* The OpenAPI definition for the Notehub.io API.
|
|
21
|
-
*
|
|
22
|
-
* The version of the OpenAPI document: 1.2.0
|
|
23
|
-
* Contact: engineering@blues.io
|
|
24
|
-
*
|
|
25
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
26
|
-
* https://openapi-generator.tech
|
|
27
|
-
* Do not edit the class manually.
|
|
28
|
-
*
|
|
29
|
-
*/
|
|
30
|
-
/**
|
|
31
|
-
* The GetWebhooks200Response model module.
|
|
32
|
-
* @module model/GetWebhooks200Response
|
|
33
|
-
* @version 1.0.32-beta.8
|
|
34
|
-
*/
|
|
35
|
-
var GetWebhooks200Response = /*#__PURE__*/function () {
|
|
36
|
-
/**
|
|
37
|
-
* Constructs a new <code>GetWebhooks200Response</code>.
|
|
38
|
-
* @alias module:model/GetWebhooks200Response
|
|
39
|
-
*/
|
|
40
|
-
function GetWebhooks200Response() {
|
|
41
|
-
_classCallCheck(this, GetWebhooks200Response);
|
|
42
|
-
GetWebhooks200Response.initialize(this);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Initializes the fields of this object.
|
|
47
|
-
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
48
|
-
* Only for internal use.
|
|
49
|
-
*/
|
|
50
|
-
return _createClass(GetWebhooks200Response, null, [{
|
|
51
|
-
key: "initialize",
|
|
52
|
-
value: function initialize(obj) {}
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Constructs a <code>GetWebhooks200Response</code> from a plain JavaScript object, optionally creating a new instance.
|
|
56
|
-
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
57
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
58
|
-
* @param {module:model/GetWebhooks200Response} obj Optional instance to populate.
|
|
59
|
-
* @return {module:model/GetWebhooks200Response} The populated <code>GetWebhooks200Response</code> instance.
|
|
60
|
-
*/
|
|
61
|
-
}, {
|
|
62
|
-
key: "constructFromObject",
|
|
63
|
-
value: function constructFromObject(data, obj) {
|
|
64
|
-
if (data) {
|
|
65
|
-
obj = obj || new GetWebhooks200Response();
|
|
66
|
-
if (data.hasOwnProperty('webhooks')) {
|
|
67
|
-
obj['webhooks'] = _ApiClient["default"].convertToType(data['webhooks'], [_WebhookSettings["default"]]);
|
|
68
|
-
}
|
|
69
|
-
} else if (data === null) {
|
|
70
|
-
return null;
|
|
71
|
-
}
|
|
72
|
-
return obj;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Validates the JSON data with respect to <code>GetWebhooks200Response</code>.
|
|
77
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
78
|
-
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>GetWebhooks200Response</code>.
|
|
79
|
-
*/
|
|
80
|
-
}, {
|
|
81
|
-
key: "validateJSON",
|
|
82
|
-
value: function validateJSON(data) {
|
|
83
|
-
if (data['webhooks']) {
|
|
84
|
-
// data not null
|
|
85
|
-
// ensure the json data is an array
|
|
86
|
-
if (!Array.isArray(data['webhooks'])) {
|
|
87
|
-
throw new Error("Expected the field `webhooks` to be an array in the JSON data but got " + data['webhooks']);
|
|
88
|
-
}
|
|
89
|
-
// validate the optional field `webhooks` (array)
|
|
90
|
-
var _iterator = _createForOfIteratorHelper(data['webhooks']),
|
|
91
|
-
_step;
|
|
92
|
-
try {
|
|
93
|
-
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
94
|
-
var item = _step.value;
|
|
95
|
-
_WebhookSettings["default"].validateJsonObject(item);
|
|
96
|
-
}
|
|
97
|
-
} catch (err) {
|
|
98
|
-
_iterator.e(err);
|
|
99
|
-
} finally {
|
|
100
|
-
_iterator.f();
|
|
101
|
-
}
|
|
102
|
-
;
|
|
103
|
-
}
|
|
104
|
-
return true;
|
|
105
|
-
}
|
|
106
|
-
}]);
|
|
107
|
-
}();
|
|
108
|
-
/**
|
|
109
|
-
* @member {Array.<module:model/WebhookSettings>} webhooks
|
|
110
|
-
*/
|
|
111
|
-
GetWebhooks200Response.prototype['webhooks'] = undefined;
|
|
112
|
-
var _default = exports["default"] = GetWebhooks200Response;
|
|
@@ -1,114 +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
|
-
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 _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
11
|
-
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); } }
|
|
12
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
13
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
|
-
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); } /**
|
|
15
|
-
* Notehub API
|
|
16
|
-
* The OpenAPI definition for the Notehub.io API.
|
|
17
|
-
*
|
|
18
|
-
* The version of the OpenAPI document: 1.2.0
|
|
19
|
-
* Contact: engineering@blues.io
|
|
20
|
-
*
|
|
21
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
22
|
-
* https://openapi-generator.tech
|
|
23
|
-
* Do not edit the class manually.
|
|
24
|
-
*
|
|
25
|
-
*/
|
|
26
|
-
/**
|
|
27
|
-
* The WebhookSettings model module.
|
|
28
|
-
* @module model/WebhookSettings
|
|
29
|
-
* @version 1.0.32-beta.8
|
|
30
|
-
*/
|
|
31
|
-
var WebhookSettings = /*#__PURE__*/function () {
|
|
32
|
-
/**
|
|
33
|
-
* Constructs a new <code>WebhookSettings</code>.
|
|
34
|
-
* @alias module:model/WebhookSettings
|
|
35
|
-
*/
|
|
36
|
-
function WebhookSettings() {
|
|
37
|
-
_classCallCheck(this, WebhookSettings);
|
|
38
|
-
WebhookSettings.initialize(this);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Initializes the fields of this object.
|
|
43
|
-
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
|
44
|
-
* Only for internal use.
|
|
45
|
-
*/
|
|
46
|
-
return _createClass(WebhookSettings, null, [{
|
|
47
|
-
key: "initialize",
|
|
48
|
-
value: function initialize(obj) {}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Constructs a <code>WebhookSettings</code> from a plain JavaScript object, optionally creating a new instance.
|
|
52
|
-
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
|
53
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
54
|
-
* @param {module:model/WebhookSettings} obj Optional instance to populate.
|
|
55
|
-
* @return {module:model/WebhookSettings} The populated <code>WebhookSettings</code> instance.
|
|
56
|
-
*/
|
|
57
|
-
}, {
|
|
58
|
-
key: "constructFromObject",
|
|
59
|
-
value: function constructFromObject(data, obj) {
|
|
60
|
-
if (data) {
|
|
61
|
-
obj = obj || new WebhookSettings();
|
|
62
|
-
if (data.hasOwnProperty('disabled')) {
|
|
63
|
-
obj['disabled'] = _ApiClient["default"].convertToType(data['disabled'], 'Boolean');
|
|
64
|
-
}
|
|
65
|
-
if (data.hasOwnProperty('id')) {
|
|
66
|
-
obj['id'] = _ApiClient["default"].convertToType(data['id'], 'String');
|
|
67
|
-
}
|
|
68
|
-
if (data.hasOwnProperty('transform')) {
|
|
69
|
-
obj['transform'] = _ApiClient["default"].convertToType(data['transform'], 'String');
|
|
70
|
-
}
|
|
71
|
-
} else if (data === null) {
|
|
72
|
-
return null;
|
|
73
|
-
}
|
|
74
|
-
return obj;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Validates the JSON data with respect to <code>WebhookSettings</code>.
|
|
79
|
-
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
|
80
|
-
* @return {boolean} to indicate whether the JSON data is valid with respect to <code>WebhookSettings</code>.
|
|
81
|
-
*/
|
|
82
|
-
}, {
|
|
83
|
-
key: "validateJSON",
|
|
84
|
-
value: function validateJSON(data) {
|
|
85
|
-
// ensure the json data is a string
|
|
86
|
-
if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) {
|
|
87
|
-
throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']);
|
|
88
|
-
}
|
|
89
|
-
// ensure the json data is a string
|
|
90
|
-
if (data['transform'] && !(typeof data['transform'] === 'string' || data['transform'] instanceof String)) {
|
|
91
|
-
throw new Error("Expected the field `transform` to be a primitive type in the JSON string but got " + data['transform']);
|
|
92
|
-
}
|
|
93
|
-
return true;
|
|
94
|
-
}
|
|
95
|
-
}]);
|
|
96
|
-
}();
|
|
97
|
-
/**
|
|
98
|
-
* Flag indicating if the webhook is disabled
|
|
99
|
-
* @member {Boolean} disabled
|
|
100
|
-
*/
|
|
101
|
-
WebhookSettings.prototype['disabled'] = undefined;
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Webhook ID
|
|
105
|
-
* @member {String} id
|
|
106
|
-
*/
|
|
107
|
-
WebhookSettings.prototype['id'] = undefined;
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* Transformation to be applied to the event
|
|
111
|
-
* @member {String} transform
|
|
112
|
-
*/
|
|
113
|
-
WebhookSettings.prototype['transform'] = undefined;
|
|
114
|
-
var _default = exports["default"] = WebhookSettings;
|