@emilgroup/webhook-sdk-node 1.0.1-beta.1 → 1.0.1-beta.12
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/.openapi-generator/FILES +9 -1
- package/README.md +2 -2
- package/api/{health-api.ts → health-checks-api.ts} +45 -19
- package/api/inbound-webhooks-api.ts +417 -8
- package/api/trigger-inbound-webhooks-api.ts +178 -0
- package/api/webhook-requests-api.ts +250 -0
- package/api.ts +6 -2
- package/dist/api/{health-api.d.ts → health-checks-api.d.ts} +31 -14
- package/dist/api/{health-api.js → health-checks-api.js} +60 -42
- package/dist/api/inbound-webhooks-api.d.ts +239 -8
- package/dist/api/inbound-webhooks-api.js +328 -8
- package/dist/api/trigger-inbound-webhooks-api.d.ts +105 -0
- package/dist/api/trigger-inbound-webhooks-api.js +233 -0
- package/dist/api/webhook-requests-api.d.ts +150 -0
- package/dist/api/webhook-requests-api.js +264 -0
- package/dist/api.d.ts +3 -1
- package/dist/api.js +3 -1
- package/dist/models/create-inbound-webhook-request-dto.d.ts +0 -6
- package/dist/models/inbound-webhook-class.d.ts +6 -6
- package/dist/models/index.d.ts +6 -0
- package/dist/models/index.js +6 -0
- package/dist/models/list-inbound-webhook-response-class.d.ts +43 -0
- package/dist/models/list-inbound-webhook-response-class.js +15 -0
- package/dist/models/list-webhook-requests-response-class.d.ts +43 -0
- package/dist/models/list-webhook-requests-response-class.js +15 -0
- package/dist/models/trigger-inbound-webhook-response-class.d.ts +42 -0
- package/dist/models/trigger-inbound-webhook-response-class.js +15 -0
- package/dist/models/update-inbound-webhook-request-dto.d.ts +54 -0
- package/dist/models/update-inbound-webhook-request-dto.js +21 -0
- package/dist/models/update-inbound-webhook-response-class.d.ts +25 -0
- package/dist/models/update-inbound-webhook-response-class.js +15 -0
- package/dist/models/webhook-request-class.d.ts +139 -0
- package/dist/models/webhook-request-class.js +22 -0
- package/models/create-inbound-webhook-request-dto.ts +0 -6
- package/models/inbound-webhook-class.ts +6 -6
- package/models/index.ts +6 -0
- package/models/list-inbound-webhook-response-class.ts +49 -0
- package/models/list-webhook-requests-response-class.ts +49 -0
- package/models/trigger-inbound-webhook-response-class.ts +48 -0
- package/models/update-inbound-webhook-request-dto.ts +63 -0
- package/models/update-inbound-webhook-response-class.ts +31 -0
- package/models/webhook-request-class.ts +148 -0
- package/package.json +2 -2
|
@@ -97,7 +97,7 @@ var InboundWebhooksApiAxiosParamCreator = function (configuration) {
|
|
|
97
97
|
var _this = this;
|
|
98
98
|
return {
|
|
99
99
|
/**
|
|
100
|
-
* Creates a new inbound webhook configuration **Required Permissions**
|
|
100
|
+
* Creates a new inbound webhook configuration **Required Permissions** \"webhook-management.webhooks.create\"
|
|
101
101
|
* @summary Create the inbound webhook
|
|
102
102
|
* @param {CreateInboundWebhookRequestDto} createInboundWebhookRequestDto
|
|
103
103
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
@@ -146,7 +146,55 @@ var InboundWebhooksApiAxiosParamCreator = function (configuration) {
|
|
|
146
146
|
});
|
|
147
147
|
},
|
|
148
148
|
/**
|
|
149
|
-
*
|
|
149
|
+
* Deletes an inbound webhook by its code **Required Permissions** \"webhook-management.webhooks.delete\"
|
|
150
|
+
* @summary Delete the inbound webhook
|
|
151
|
+
* @param {string} code Unique identifier code for the inbound webhook
|
|
152
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
153
|
+
* @param {*} [options] Override http request option.
|
|
154
|
+
* @throws {RequiredError}
|
|
155
|
+
*/
|
|
156
|
+
deleteInboundWebhook: function (code, authorization, options) {
|
|
157
|
+
if (options === void 0) { options = {}; }
|
|
158
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
159
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
160
|
+
return __generator(this, function (_a) {
|
|
161
|
+
switch (_a.label) {
|
|
162
|
+
case 0:
|
|
163
|
+
// verify required parameter 'code' is not null or undefined
|
|
164
|
+
(0, common_1.assertParamExists)('deleteInboundWebhook', 'code', code);
|
|
165
|
+
localVarPath = "/webhookservice/v1/inbound-webhooks/{code}"
|
|
166
|
+
.replace("{".concat("code", "}"), encodeURIComponent(String(code)));
|
|
167
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
168
|
+
if (configuration) {
|
|
169
|
+
baseOptions = configuration.baseOptions;
|
|
170
|
+
baseAccessToken = configuration.accessToken;
|
|
171
|
+
}
|
|
172
|
+
localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
|
|
173
|
+
localVarHeaderParameter = {};
|
|
174
|
+
localVarQueryParameter = {};
|
|
175
|
+
// authentication bearer required
|
|
176
|
+
// http bearer authentication required
|
|
177
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
178
|
+
case 1:
|
|
179
|
+
// authentication bearer required
|
|
180
|
+
// http bearer authentication required
|
|
181
|
+
_a.sent();
|
|
182
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
183
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
184
|
+
}
|
|
185
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
186
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
187
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
188
|
+
return [2 /*return*/, {
|
|
189
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
190
|
+
options: localVarRequestOptions,
|
|
191
|
+
}];
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
});
|
|
195
|
+
},
|
|
196
|
+
/**
|
|
197
|
+
* Retrieves an inbound webhook by its code **Required Permissions** \"webhook-management.webhooks.view\"
|
|
150
198
|
* @summary Retrieve the inbound webhook
|
|
151
199
|
* @param {string} code Unique identifier code for the inbound webhook
|
|
152
200
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
@@ -193,6 +241,131 @@ var InboundWebhooksApiAxiosParamCreator = function (configuration) {
|
|
|
193
241
|
});
|
|
194
242
|
});
|
|
195
243
|
},
|
|
244
|
+
/**
|
|
245
|
+
* Lists all inbound webhooks with optional filters **Required Permissions** \"webhook-management.webhooks.view\"
|
|
246
|
+
* @summary List inbound webhooks
|
|
247
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
248
|
+
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
249
|
+
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
250
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, name, slug, isEnabled, externalRefLocation, workflowCode, createdAt, updatedAt, createdBy, updatedBy</i>
|
|
251
|
+
* @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
252
|
+
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, code, name, slug, isEnabled, workflowCode, createdAt, updatedAt</i>
|
|
253
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
254
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, name, slug, isEnabled, externalRefLocation, workflowCode, createdAt, updatedAt, createdBy, updatedBy</i>
|
|
255
|
+
* @param {*} [options] Override http request option.
|
|
256
|
+
* @throws {RequiredError}
|
|
257
|
+
*/
|
|
258
|
+
listInboundWebhooks: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
259
|
+
if (options === void 0) { options = {}; }
|
|
260
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
261
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
262
|
+
return __generator(this, function (_a) {
|
|
263
|
+
switch (_a.label) {
|
|
264
|
+
case 0:
|
|
265
|
+
localVarPath = "/webhookservice/v1/inbound-webhooks";
|
|
266
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
267
|
+
if (configuration) {
|
|
268
|
+
baseOptions = configuration.baseOptions;
|
|
269
|
+
baseAccessToken = configuration.accessToken;
|
|
270
|
+
}
|
|
271
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
272
|
+
localVarHeaderParameter = {};
|
|
273
|
+
localVarQueryParameter = {};
|
|
274
|
+
// authentication bearer required
|
|
275
|
+
// http bearer authentication required
|
|
276
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
277
|
+
case 1:
|
|
278
|
+
// authentication bearer required
|
|
279
|
+
// http bearer authentication required
|
|
280
|
+
_a.sent();
|
|
281
|
+
if (pageSize !== undefined) {
|
|
282
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
283
|
+
}
|
|
284
|
+
if (pageToken !== undefined) {
|
|
285
|
+
localVarQueryParameter['pageToken'] = pageToken;
|
|
286
|
+
}
|
|
287
|
+
if (filter !== undefined) {
|
|
288
|
+
localVarQueryParameter['filter'] = filter;
|
|
289
|
+
}
|
|
290
|
+
if (search !== undefined) {
|
|
291
|
+
localVarQueryParameter['search'] = search;
|
|
292
|
+
}
|
|
293
|
+
if (order !== undefined) {
|
|
294
|
+
localVarQueryParameter['order'] = order;
|
|
295
|
+
}
|
|
296
|
+
if (expand !== undefined) {
|
|
297
|
+
localVarQueryParameter['expand'] = expand;
|
|
298
|
+
}
|
|
299
|
+
if (filters !== undefined) {
|
|
300
|
+
localVarQueryParameter['filters'] = filters;
|
|
301
|
+
}
|
|
302
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
303
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
304
|
+
}
|
|
305
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
306
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
307
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
308
|
+
return [2 /*return*/, {
|
|
309
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
310
|
+
options: localVarRequestOptions,
|
|
311
|
+
}];
|
|
312
|
+
}
|
|
313
|
+
});
|
|
314
|
+
});
|
|
315
|
+
},
|
|
316
|
+
/**
|
|
317
|
+
* Updates an existing inbound webhook configuration **Required Permissions** \"webhook-management.webhooks.update\"
|
|
318
|
+
* @summary Update the inbound webhook
|
|
319
|
+
* @param {string} code Unique identifier code for the inbound webhook
|
|
320
|
+
* @param {UpdateInboundWebhookRequestDto} updateInboundWebhookRequestDto
|
|
321
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
322
|
+
* @param {*} [options] Override http request option.
|
|
323
|
+
* @throws {RequiredError}
|
|
324
|
+
*/
|
|
325
|
+
updateInboundWebhook: function (code, updateInboundWebhookRequestDto, authorization, options) {
|
|
326
|
+
if (options === void 0) { options = {}; }
|
|
327
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
328
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
329
|
+
return __generator(this, function (_a) {
|
|
330
|
+
switch (_a.label) {
|
|
331
|
+
case 0:
|
|
332
|
+
// verify required parameter 'code' is not null or undefined
|
|
333
|
+
(0, common_1.assertParamExists)('updateInboundWebhook', 'code', code);
|
|
334
|
+
// verify required parameter 'updateInboundWebhookRequestDto' is not null or undefined
|
|
335
|
+
(0, common_1.assertParamExists)('updateInboundWebhook', 'updateInboundWebhookRequestDto', updateInboundWebhookRequestDto);
|
|
336
|
+
localVarPath = "/webhookservice/v1/inbound-webhooks/{code}"
|
|
337
|
+
.replace("{".concat("code", "}"), encodeURIComponent(String(code)));
|
|
338
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
339
|
+
if (configuration) {
|
|
340
|
+
baseOptions = configuration.baseOptions;
|
|
341
|
+
baseAccessToken = configuration.accessToken;
|
|
342
|
+
}
|
|
343
|
+
localVarRequestOptions = __assign(__assign({ method: 'PATCH' }, baseOptions), options);
|
|
344
|
+
localVarHeaderParameter = {};
|
|
345
|
+
localVarQueryParameter = {};
|
|
346
|
+
// authentication bearer required
|
|
347
|
+
// http bearer authentication required
|
|
348
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
349
|
+
case 1:
|
|
350
|
+
// authentication bearer required
|
|
351
|
+
// http bearer authentication required
|
|
352
|
+
_a.sent();
|
|
353
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
354
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
355
|
+
}
|
|
356
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
357
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
358
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
359
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
360
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateInboundWebhookRequestDto, localVarRequestOptions, configuration);
|
|
361
|
+
return [2 /*return*/, {
|
|
362
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
363
|
+
options: localVarRequestOptions,
|
|
364
|
+
}];
|
|
365
|
+
}
|
|
366
|
+
});
|
|
367
|
+
});
|
|
368
|
+
},
|
|
196
369
|
};
|
|
197
370
|
};
|
|
198
371
|
exports.InboundWebhooksApiAxiosParamCreator = InboundWebhooksApiAxiosParamCreator;
|
|
@@ -204,7 +377,7 @@ var InboundWebhooksApiFp = function (configuration) {
|
|
|
204
377
|
var localVarAxiosParamCreator = (0, exports.InboundWebhooksApiAxiosParamCreator)(configuration);
|
|
205
378
|
return {
|
|
206
379
|
/**
|
|
207
|
-
* Creates a new inbound webhook configuration **Required Permissions**
|
|
380
|
+
* Creates a new inbound webhook configuration **Required Permissions** \"webhook-management.webhooks.create\"
|
|
208
381
|
* @summary Create the inbound webhook
|
|
209
382
|
* @param {CreateInboundWebhookRequestDto} createInboundWebhookRequestDto
|
|
210
383
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
@@ -225,7 +398,28 @@ var InboundWebhooksApiFp = function (configuration) {
|
|
|
225
398
|
});
|
|
226
399
|
},
|
|
227
400
|
/**
|
|
228
|
-
*
|
|
401
|
+
* Deletes an inbound webhook by its code **Required Permissions** \"webhook-management.webhooks.delete\"
|
|
402
|
+
* @summary Delete the inbound webhook
|
|
403
|
+
* @param {string} code Unique identifier code for the inbound webhook
|
|
404
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
405
|
+
* @param {*} [options] Override http request option.
|
|
406
|
+
* @throws {RequiredError}
|
|
407
|
+
*/
|
|
408
|
+
deleteInboundWebhook: function (code, authorization, options) {
|
|
409
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
410
|
+
var localVarAxiosArgs;
|
|
411
|
+
return __generator(this, function (_a) {
|
|
412
|
+
switch (_a.label) {
|
|
413
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteInboundWebhook(code, authorization, options)];
|
|
414
|
+
case 1:
|
|
415
|
+
localVarAxiosArgs = _a.sent();
|
|
416
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
417
|
+
}
|
|
418
|
+
});
|
|
419
|
+
});
|
|
420
|
+
},
|
|
421
|
+
/**
|
|
422
|
+
* Retrieves an inbound webhook by its code **Required Permissions** \"webhook-management.webhooks.view\"
|
|
229
423
|
* @summary Retrieve the inbound webhook
|
|
230
424
|
* @param {string} code Unique identifier code for the inbound webhook
|
|
231
425
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
@@ -245,6 +439,55 @@ var InboundWebhooksApiFp = function (configuration) {
|
|
|
245
439
|
});
|
|
246
440
|
});
|
|
247
441
|
},
|
|
442
|
+
/**
|
|
443
|
+
* Lists all inbound webhooks with optional filters **Required Permissions** \"webhook-management.webhooks.view\"
|
|
444
|
+
* @summary List inbound webhooks
|
|
445
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
446
|
+
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
447
|
+
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
448
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, name, slug, isEnabled, externalRefLocation, workflowCode, createdAt, updatedAt, createdBy, updatedBy</i>
|
|
449
|
+
* @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
450
|
+
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, code, name, slug, isEnabled, workflowCode, createdAt, updatedAt</i>
|
|
451
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
452
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, name, slug, isEnabled, externalRefLocation, workflowCode, createdAt, updatedAt, createdBy, updatedBy</i>
|
|
453
|
+
* @param {*} [options] Override http request option.
|
|
454
|
+
* @throws {RequiredError}
|
|
455
|
+
*/
|
|
456
|
+
listInboundWebhooks: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
457
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
458
|
+
var localVarAxiosArgs;
|
|
459
|
+
return __generator(this, function (_a) {
|
|
460
|
+
switch (_a.label) {
|
|
461
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.listInboundWebhooks(authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
|
|
462
|
+
case 1:
|
|
463
|
+
localVarAxiosArgs = _a.sent();
|
|
464
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
465
|
+
}
|
|
466
|
+
});
|
|
467
|
+
});
|
|
468
|
+
},
|
|
469
|
+
/**
|
|
470
|
+
* Updates an existing inbound webhook configuration **Required Permissions** \"webhook-management.webhooks.update\"
|
|
471
|
+
* @summary Update the inbound webhook
|
|
472
|
+
* @param {string} code Unique identifier code for the inbound webhook
|
|
473
|
+
* @param {UpdateInboundWebhookRequestDto} updateInboundWebhookRequestDto
|
|
474
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
475
|
+
* @param {*} [options] Override http request option.
|
|
476
|
+
* @throws {RequiredError}
|
|
477
|
+
*/
|
|
478
|
+
updateInboundWebhook: function (code, updateInboundWebhookRequestDto, authorization, options) {
|
|
479
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
480
|
+
var localVarAxiosArgs;
|
|
481
|
+
return __generator(this, function (_a) {
|
|
482
|
+
switch (_a.label) {
|
|
483
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateInboundWebhook(code, updateInboundWebhookRequestDto, authorization, options)];
|
|
484
|
+
case 1:
|
|
485
|
+
localVarAxiosArgs = _a.sent();
|
|
486
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
487
|
+
}
|
|
488
|
+
});
|
|
489
|
+
});
|
|
490
|
+
},
|
|
248
491
|
};
|
|
249
492
|
};
|
|
250
493
|
exports.InboundWebhooksApiFp = InboundWebhooksApiFp;
|
|
@@ -256,7 +499,7 @@ var InboundWebhooksApiFactory = function (configuration, basePath, axios) {
|
|
|
256
499
|
var localVarFp = (0, exports.InboundWebhooksApiFp)(configuration);
|
|
257
500
|
return {
|
|
258
501
|
/**
|
|
259
|
-
* Creates a new inbound webhook configuration **Required Permissions**
|
|
502
|
+
* Creates a new inbound webhook configuration **Required Permissions** \"webhook-management.webhooks.create\"
|
|
260
503
|
* @summary Create the inbound webhook
|
|
261
504
|
* @param {CreateInboundWebhookRequestDto} createInboundWebhookRequestDto
|
|
262
505
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
@@ -267,7 +510,18 @@ var InboundWebhooksApiFactory = function (configuration, basePath, axios) {
|
|
|
267
510
|
return localVarFp.createInboundWebhook(createInboundWebhookRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
268
511
|
},
|
|
269
512
|
/**
|
|
270
|
-
*
|
|
513
|
+
* Deletes an inbound webhook by its code **Required Permissions** \"webhook-management.webhooks.delete\"
|
|
514
|
+
* @summary Delete the inbound webhook
|
|
515
|
+
* @param {string} code Unique identifier code for the inbound webhook
|
|
516
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
517
|
+
* @param {*} [options] Override http request option.
|
|
518
|
+
* @throws {RequiredError}
|
|
519
|
+
*/
|
|
520
|
+
deleteInboundWebhook: function (code, authorization, options) {
|
|
521
|
+
return localVarFp.deleteInboundWebhook(code, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
522
|
+
},
|
|
523
|
+
/**
|
|
524
|
+
* Retrieves an inbound webhook by its code **Required Permissions** \"webhook-management.webhooks.view\"
|
|
271
525
|
* @summary Retrieve the inbound webhook
|
|
272
526
|
* @param {string} code Unique identifier code for the inbound webhook
|
|
273
527
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
@@ -277,6 +531,35 @@ var InboundWebhooksApiFactory = function (configuration, basePath, axios) {
|
|
|
277
531
|
getInboundWebhook: function (code, authorization, options) {
|
|
278
532
|
return localVarFp.getInboundWebhook(code, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
279
533
|
},
|
|
534
|
+
/**
|
|
535
|
+
* Lists all inbound webhooks with optional filters **Required Permissions** \"webhook-management.webhooks.view\"
|
|
536
|
+
* @summary List inbound webhooks
|
|
537
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
538
|
+
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
539
|
+
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
540
|
+
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, name, slug, isEnabled, externalRefLocation, workflowCode, createdAt, updatedAt, createdBy, updatedBy</i>
|
|
541
|
+
* @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
542
|
+
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, code, name, slug, isEnabled, workflowCode, createdAt, updatedAt</i>
|
|
543
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
544
|
+
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, name, slug, isEnabled, externalRefLocation, workflowCode, createdAt, updatedAt, createdBy, updatedBy</i>
|
|
545
|
+
* @param {*} [options] Override http request option.
|
|
546
|
+
* @throws {RequiredError}
|
|
547
|
+
*/
|
|
548
|
+
listInboundWebhooks: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
549
|
+
return localVarFp.listInboundWebhooks(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
|
|
550
|
+
},
|
|
551
|
+
/**
|
|
552
|
+
* Updates an existing inbound webhook configuration **Required Permissions** \"webhook-management.webhooks.update\"
|
|
553
|
+
* @summary Update the inbound webhook
|
|
554
|
+
* @param {string} code Unique identifier code for the inbound webhook
|
|
555
|
+
* @param {UpdateInboundWebhookRequestDto} updateInboundWebhookRequestDto
|
|
556
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
557
|
+
* @param {*} [options] Override http request option.
|
|
558
|
+
* @throws {RequiredError}
|
|
559
|
+
*/
|
|
560
|
+
updateInboundWebhook: function (code, updateInboundWebhookRequestDto, authorization, options) {
|
|
561
|
+
return localVarFp.updateInboundWebhook(code, updateInboundWebhookRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
562
|
+
},
|
|
280
563
|
};
|
|
281
564
|
};
|
|
282
565
|
exports.InboundWebhooksApiFactory = InboundWebhooksApiFactory;
|
|
@@ -292,7 +575,7 @@ var InboundWebhooksApi = /** @class */ (function (_super) {
|
|
|
292
575
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
293
576
|
}
|
|
294
577
|
/**
|
|
295
|
-
* Creates a new inbound webhook configuration **Required Permissions**
|
|
578
|
+
* Creates a new inbound webhook configuration **Required Permissions** \"webhook-management.webhooks.create\"
|
|
296
579
|
* @summary Create the inbound webhook
|
|
297
580
|
* @param {InboundWebhooksApiCreateInboundWebhookRequest} requestParameters Request parameters.
|
|
298
581
|
* @param {*} [options] Override http request option.
|
|
@@ -304,7 +587,19 @@ var InboundWebhooksApi = /** @class */ (function (_super) {
|
|
|
304
587
|
return (0, exports.InboundWebhooksApiFp)(this.configuration).createInboundWebhook(requestParameters.createInboundWebhookRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
305
588
|
};
|
|
306
589
|
/**
|
|
307
|
-
*
|
|
590
|
+
* Deletes an inbound webhook by its code **Required Permissions** \"webhook-management.webhooks.delete\"
|
|
591
|
+
* @summary Delete the inbound webhook
|
|
592
|
+
* @param {InboundWebhooksApiDeleteInboundWebhookRequest} requestParameters Request parameters.
|
|
593
|
+
* @param {*} [options] Override http request option.
|
|
594
|
+
* @throws {RequiredError}
|
|
595
|
+
* @memberof InboundWebhooksApi
|
|
596
|
+
*/
|
|
597
|
+
InboundWebhooksApi.prototype.deleteInboundWebhook = function (requestParameters, options) {
|
|
598
|
+
var _this = this;
|
|
599
|
+
return (0, exports.InboundWebhooksApiFp)(this.configuration).deleteInboundWebhook(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
600
|
+
};
|
|
601
|
+
/**
|
|
602
|
+
* Retrieves an inbound webhook by its code **Required Permissions** \"webhook-management.webhooks.view\"
|
|
308
603
|
* @summary Retrieve the inbound webhook
|
|
309
604
|
* @param {InboundWebhooksApiGetInboundWebhookRequest} requestParameters Request parameters.
|
|
310
605
|
* @param {*} [options] Override http request option.
|
|
@@ -315,6 +610,31 @@ var InboundWebhooksApi = /** @class */ (function (_super) {
|
|
|
315
610
|
var _this = this;
|
|
316
611
|
return (0, exports.InboundWebhooksApiFp)(this.configuration).getInboundWebhook(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
317
612
|
};
|
|
613
|
+
/**
|
|
614
|
+
* Lists all inbound webhooks with optional filters **Required Permissions** \"webhook-management.webhooks.view\"
|
|
615
|
+
* @summary List inbound webhooks
|
|
616
|
+
* @param {InboundWebhooksApiListInboundWebhooksRequest} requestParameters Request parameters.
|
|
617
|
+
* @param {*} [options] Override http request option.
|
|
618
|
+
* @throws {RequiredError}
|
|
619
|
+
* @memberof InboundWebhooksApi
|
|
620
|
+
*/
|
|
621
|
+
InboundWebhooksApi.prototype.listInboundWebhooks = function (requestParameters, options) {
|
|
622
|
+
var _this = this;
|
|
623
|
+
if (requestParameters === void 0) { requestParameters = {}; }
|
|
624
|
+
return (0, exports.InboundWebhooksApiFp)(this.configuration).listInboundWebhooks(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
625
|
+
};
|
|
626
|
+
/**
|
|
627
|
+
* Updates an existing inbound webhook configuration **Required Permissions** \"webhook-management.webhooks.update\"
|
|
628
|
+
* @summary Update the inbound webhook
|
|
629
|
+
* @param {InboundWebhooksApiUpdateInboundWebhookRequest} requestParameters Request parameters.
|
|
630
|
+
* @param {*} [options] Override http request option.
|
|
631
|
+
* @throws {RequiredError}
|
|
632
|
+
* @memberof InboundWebhooksApi
|
|
633
|
+
*/
|
|
634
|
+
InboundWebhooksApi.prototype.updateInboundWebhook = function (requestParameters, options) {
|
|
635
|
+
var _this = this;
|
|
636
|
+
return (0, exports.InboundWebhooksApiFp)(this.configuration).updateInboundWebhook(requestParameters.code, requestParameters.updateInboundWebhookRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
637
|
+
};
|
|
318
638
|
return InboundWebhooksApi;
|
|
319
639
|
}(base_1.BaseAPI));
|
|
320
640
|
exports.InboundWebhooksApi = InboundWebhooksApi;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EMIL Webhookservice
|
|
3
|
+
* The EMIL Webhookservice API description
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0
|
|
6
|
+
* Contact: kontakt@emil.de
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
13
|
+
import { Configuration } from '../configuration';
|
|
14
|
+
import { RequestArgs, BaseAPI } from '../base';
|
|
15
|
+
import { TriggerInboundWebhookResponseClass } from '../models';
|
|
16
|
+
/**
|
|
17
|
+
* TriggerInboundWebhooksApi - axios parameter creator
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export declare const TriggerInboundWebhooksApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
21
|
+
/**
|
|
22
|
+
* Receives and processes incoming webhook requests from external systems **Required Permissions** \"webhook-management.webhooks.run\"
|
|
23
|
+
* @summary Execute incoming webhook
|
|
24
|
+
* @param {string} tenantSlug
|
|
25
|
+
* @param {string} slugAndCode The webhook slug and code combined with a hyphen (e.g., claim.deleted-iwh_eN2uxBbOz)
|
|
26
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
27
|
+
* @param {*} [options] Override http request option.
|
|
28
|
+
* @throws {RequiredError}
|
|
29
|
+
*/
|
|
30
|
+
triggerIncomingWebhook: (tenantSlug: string, slugAndCode: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* TriggerInboundWebhooksApi - functional programming interface
|
|
34
|
+
* @export
|
|
35
|
+
*/
|
|
36
|
+
export declare const TriggerInboundWebhooksApiFp: (configuration?: Configuration) => {
|
|
37
|
+
/**
|
|
38
|
+
* Receives and processes incoming webhook requests from external systems **Required Permissions** \"webhook-management.webhooks.run\"
|
|
39
|
+
* @summary Execute incoming webhook
|
|
40
|
+
* @param {string} tenantSlug
|
|
41
|
+
* @param {string} slugAndCode The webhook slug and code combined with a hyphen (e.g., claim.deleted-iwh_eN2uxBbOz)
|
|
42
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
43
|
+
* @param {*} [options] Override http request option.
|
|
44
|
+
* @throws {RequiredError}
|
|
45
|
+
*/
|
|
46
|
+
triggerIncomingWebhook(tenantSlug: string, slugAndCode: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TriggerInboundWebhookResponseClass>>;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* TriggerInboundWebhooksApi - factory interface
|
|
50
|
+
* @export
|
|
51
|
+
*/
|
|
52
|
+
export declare const TriggerInboundWebhooksApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
53
|
+
/**
|
|
54
|
+
* Receives and processes incoming webhook requests from external systems **Required Permissions** \"webhook-management.webhooks.run\"
|
|
55
|
+
* @summary Execute incoming webhook
|
|
56
|
+
* @param {string} tenantSlug
|
|
57
|
+
* @param {string} slugAndCode The webhook slug and code combined with a hyphen (e.g., claim.deleted-iwh_eN2uxBbOz)
|
|
58
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
59
|
+
* @param {*} [options] Override http request option.
|
|
60
|
+
* @throws {RequiredError}
|
|
61
|
+
*/
|
|
62
|
+
triggerIncomingWebhook(tenantSlug: string, slugAndCode: string, authorization?: string, options?: any): AxiosPromise<TriggerInboundWebhookResponseClass>;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Request parameters for triggerIncomingWebhook operation in TriggerInboundWebhooksApi.
|
|
66
|
+
* @export
|
|
67
|
+
* @interface TriggerInboundWebhooksApiTriggerIncomingWebhookRequest
|
|
68
|
+
*/
|
|
69
|
+
export interface TriggerInboundWebhooksApiTriggerIncomingWebhookRequest {
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {string}
|
|
73
|
+
* @memberof TriggerInboundWebhooksApiTriggerIncomingWebhook
|
|
74
|
+
*/
|
|
75
|
+
readonly tenantSlug: string;
|
|
76
|
+
/**
|
|
77
|
+
* The webhook slug and code combined with a hyphen (e.g., claim.deleted-iwh_eN2uxBbOz)
|
|
78
|
+
* @type {string}
|
|
79
|
+
* @memberof TriggerInboundWebhooksApiTriggerIncomingWebhook
|
|
80
|
+
*/
|
|
81
|
+
readonly slugAndCode: string;
|
|
82
|
+
/**
|
|
83
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
84
|
+
* @type {string}
|
|
85
|
+
* @memberof TriggerInboundWebhooksApiTriggerIncomingWebhook
|
|
86
|
+
*/
|
|
87
|
+
readonly authorization?: string;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* TriggerInboundWebhooksApi - object-oriented interface
|
|
91
|
+
* @export
|
|
92
|
+
* @class TriggerInboundWebhooksApi
|
|
93
|
+
* @extends {BaseAPI}
|
|
94
|
+
*/
|
|
95
|
+
export declare class TriggerInboundWebhooksApi extends BaseAPI {
|
|
96
|
+
/**
|
|
97
|
+
* Receives and processes incoming webhook requests from external systems **Required Permissions** \"webhook-management.webhooks.run\"
|
|
98
|
+
* @summary Execute incoming webhook
|
|
99
|
+
* @param {TriggerInboundWebhooksApiTriggerIncomingWebhookRequest} requestParameters Request parameters.
|
|
100
|
+
* @param {*} [options] Override http request option.
|
|
101
|
+
* @throws {RequiredError}
|
|
102
|
+
* @memberof TriggerInboundWebhooksApi
|
|
103
|
+
*/
|
|
104
|
+
triggerIncomingWebhook(requestParameters: TriggerInboundWebhooksApiTriggerIncomingWebhookRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<TriggerInboundWebhookResponseClass, any, {}>>;
|
|
105
|
+
}
|