@emilgroup/webhook-sdk-node 1.0.1-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +21 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +84 -0
- package/api/health-api.ts +128 -0
- package/api/inbound-webhooks-api.ts +272 -0
- package/api.ts +33 -0
- package/base.ts +327 -0
- package/common.ts +199 -0
- package/configuration.ts +118 -0
- package/dist/api/health-api.d.ts +70 -0
- package/dist/api/health-api.js +204 -0
- package/dist/api/inbound-webhooks-api.d.ts +153 -0
- package/dist/api/inbound-webhooks-api.js +320 -0
- package/dist/api.d.ts +13 -0
- package/dist/api.js +31 -0
- package/dist/base.d.ts +88 -0
- package/dist/base.js +434 -0
- package/dist/common.d.ts +92 -0
- package/dist/common.js +277 -0
- package/dist/configuration.d.ts +96 -0
- package/dist/configuration.js +52 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +36 -0
- package/dist/models/create-inbound-webhook-request-dto.d.ts +66 -0
- package/dist/models/create-inbound-webhook-request-dto.js +21 -0
- package/dist/models/create-inbound-webhook-response-class.d.ts +25 -0
- package/dist/models/create-inbound-webhook-response-class.js +15 -0
- package/dist/models/get-inbound-webhook-response-class.d.ts +25 -0
- package/dist/models/get-inbound-webhook-response-class.js +15 -0
- package/dist/models/inbound-webhook-class.d.ts +102 -0
- package/dist/models/inbound-webhook-class.js +21 -0
- package/dist/models/index.d.ts +6 -0
- package/dist/models/index.js +22 -0
- package/dist/models/inline-response200.d.ts +54 -0
- package/dist/models/inline-response200.js +15 -0
- package/dist/models/inline-response503.d.ts +54 -0
- package/dist/models/inline-response503.js +15 -0
- package/git_push.sh +57 -0
- package/index.ts +19 -0
- package/models/create-inbound-webhook-request-dto.ts +75 -0
- package/models/create-inbound-webhook-response-class.ts +31 -0
- package/models/get-inbound-webhook-response-class.ts +31 -0
- package/models/inbound-webhook-class.ts +111 -0
- package/models/index.ts +6 -0
- package/models/inline-response200.ts +48 -0
- package/models/inline-response503.ts +48 -0
- package/package.json +29 -0
- package/tsconfig.json +23 -0
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* EMIL Webhookservice
|
|
6
|
+
* The EMIL Webhookservice API description
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0
|
|
9
|
+
* Contact: kontakt@emil.de
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __extends = (this && this.__extends) || (function () {
|
|
16
|
+
var extendStatics = function (d, b) {
|
|
17
|
+
extendStatics = Object.setPrototypeOf ||
|
|
18
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
19
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
20
|
+
return extendStatics(d, b);
|
|
21
|
+
};
|
|
22
|
+
return function (d, b) {
|
|
23
|
+
if (typeof b !== "function" && b !== null)
|
|
24
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
25
|
+
extendStatics(d, b);
|
|
26
|
+
function __() { this.constructor = d; }
|
|
27
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
+
};
|
|
29
|
+
})();
|
|
30
|
+
var __assign = (this && this.__assign) || function () {
|
|
31
|
+
__assign = Object.assign || function(t) {
|
|
32
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
33
|
+
s = arguments[i];
|
|
34
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
35
|
+
t[p] = s[p];
|
|
36
|
+
}
|
|
37
|
+
return t;
|
|
38
|
+
};
|
|
39
|
+
return __assign.apply(this, arguments);
|
|
40
|
+
};
|
|
41
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
42
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
43
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
44
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
45
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
46
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
47
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
51
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
52
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
53
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
54
|
+
function step(op) {
|
|
55
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
56
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
57
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
58
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
59
|
+
switch (op[0]) {
|
|
60
|
+
case 0: case 1: t = op; break;
|
|
61
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
62
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
63
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
64
|
+
default:
|
|
65
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
66
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
67
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
68
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
69
|
+
if (t[2]) _.ops.pop();
|
|
70
|
+
_.trys.pop(); continue;
|
|
71
|
+
}
|
|
72
|
+
op = body.call(thisArg, _);
|
|
73
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
74
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
78
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
79
|
+
};
|
|
80
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
81
|
+
exports.InboundWebhooksApi = exports.InboundWebhooksApiFactory = exports.InboundWebhooksApiFp = exports.InboundWebhooksApiAxiosParamCreator = void 0;
|
|
82
|
+
var axios_1 = __importDefault(require("axios"));
|
|
83
|
+
// Some imports not used depending on template conditions
|
|
84
|
+
// @ts-ignore
|
|
85
|
+
var common_1 = require("../common");
|
|
86
|
+
// @ts-ignore
|
|
87
|
+
var base_1 = require("../base");
|
|
88
|
+
// URLSearchParams not necessarily used
|
|
89
|
+
// @ts-ignore
|
|
90
|
+
var url_1 = require("url");
|
|
91
|
+
var FormData = require('form-data');
|
|
92
|
+
/**
|
|
93
|
+
* InboundWebhooksApi - axios parameter creator
|
|
94
|
+
* @export
|
|
95
|
+
*/
|
|
96
|
+
var InboundWebhooksApiAxiosParamCreator = function (configuration) {
|
|
97
|
+
var _this = this;
|
|
98
|
+
return {
|
|
99
|
+
/**
|
|
100
|
+
* Creates a new inbound webhook configuration **Required Permissions** none
|
|
101
|
+
* @summary Create the inbound webhook
|
|
102
|
+
* @param {CreateInboundWebhookRequestDto} createInboundWebhookRequestDto
|
|
103
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
104
|
+
* @param {*} [options] Override http request option.
|
|
105
|
+
* @throws {RequiredError}
|
|
106
|
+
*/
|
|
107
|
+
createInboundWebhook: function (createInboundWebhookRequestDto, authorization, options) {
|
|
108
|
+
if (options === void 0) { options = {}; }
|
|
109
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
110
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
111
|
+
return __generator(this, function (_a) {
|
|
112
|
+
switch (_a.label) {
|
|
113
|
+
case 0:
|
|
114
|
+
// verify required parameter 'createInboundWebhookRequestDto' is not null or undefined
|
|
115
|
+
(0, common_1.assertParamExists)('createInboundWebhook', 'createInboundWebhookRequestDto', createInboundWebhookRequestDto);
|
|
116
|
+
localVarPath = "/webhookservice/v1/inbound-webhooks";
|
|
117
|
+
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
118
|
+
if (configuration) {
|
|
119
|
+
baseOptions = configuration.baseOptions;
|
|
120
|
+
baseAccessToken = configuration.accessToken;
|
|
121
|
+
}
|
|
122
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
123
|
+
localVarHeaderParameter = {};
|
|
124
|
+
localVarQueryParameter = {};
|
|
125
|
+
// authentication bearer required
|
|
126
|
+
// http bearer authentication required
|
|
127
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
128
|
+
case 1:
|
|
129
|
+
// authentication bearer required
|
|
130
|
+
// http bearer authentication required
|
|
131
|
+
_a.sent();
|
|
132
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
133
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
134
|
+
}
|
|
135
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
136
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
137
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
138
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
139
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createInboundWebhookRequestDto, localVarRequestOptions, configuration);
|
|
140
|
+
return [2 /*return*/, {
|
|
141
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
142
|
+
options: localVarRequestOptions,
|
|
143
|
+
}];
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
},
|
|
148
|
+
/**
|
|
149
|
+
* Retrieves an inbound webhook by its code **Required Permissions** none
|
|
150
|
+
* @summary Retrieve 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
|
+
getInboundWebhook: 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)('getInboundWebhook', '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: 'GET' }, 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
|
+
};
|
|
198
|
+
exports.InboundWebhooksApiAxiosParamCreator = InboundWebhooksApiAxiosParamCreator;
|
|
199
|
+
/**
|
|
200
|
+
* InboundWebhooksApi - functional programming interface
|
|
201
|
+
* @export
|
|
202
|
+
*/
|
|
203
|
+
var InboundWebhooksApiFp = function (configuration) {
|
|
204
|
+
var localVarAxiosParamCreator = (0, exports.InboundWebhooksApiAxiosParamCreator)(configuration);
|
|
205
|
+
return {
|
|
206
|
+
/**
|
|
207
|
+
* Creates a new inbound webhook configuration **Required Permissions** none
|
|
208
|
+
* @summary Create the inbound webhook
|
|
209
|
+
* @param {CreateInboundWebhookRequestDto} createInboundWebhookRequestDto
|
|
210
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
211
|
+
* @param {*} [options] Override http request option.
|
|
212
|
+
* @throws {RequiredError}
|
|
213
|
+
*/
|
|
214
|
+
createInboundWebhook: function (createInboundWebhookRequestDto, authorization, options) {
|
|
215
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
216
|
+
var localVarAxiosArgs;
|
|
217
|
+
return __generator(this, function (_a) {
|
|
218
|
+
switch (_a.label) {
|
|
219
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.createInboundWebhook(createInboundWebhookRequestDto, authorization, options)];
|
|
220
|
+
case 1:
|
|
221
|
+
localVarAxiosArgs = _a.sent();
|
|
222
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
223
|
+
}
|
|
224
|
+
});
|
|
225
|
+
});
|
|
226
|
+
},
|
|
227
|
+
/**
|
|
228
|
+
* Retrieves an inbound webhook by its code **Required Permissions** none
|
|
229
|
+
* @summary Retrieve the inbound webhook
|
|
230
|
+
* @param {string} code Unique identifier code for the inbound webhook
|
|
231
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
232
|
+
* @param {*} [options] Override http request option.
|
|
233
|
+
* @throws {RequiredError}
|
|
234
|
+
*/
|
|
235
|
+
getInboundWebhook: function (code, authorization, options) {
|
|
236
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
237
|
+
var localVarAxiosArgs;
|
|
238
|
+
return __generator(this, function (_a) {
|
|
239
|
+
switch (_a.label) {
|
|
240
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getInboundWebhook(code, authorization, options)];
|
|
241
|
+
case 1:
|
|
242
|
+
localVarAxiosArgs = _a.sent();
|
|
243
|
+
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
});
|
|
247
|
+
},
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
exports.InboundWebhooksApiFp = InboundWebhooksApiFp;
|
|
251
|
+
/**
|
|
252
|
+
* InboundWebhooksApi - factory interface
|
|
253
|
+
* @export
|
|
254
|
+
*/
|
|
255
|
+
var InboundWebhooksApiFactory = function (configuration, basePath, axios) {
|
|
256
|
+
var localVarFp = (0, exports.InboundWebhooksApiFp)(configuration);
|
|
257
|
+
return {
|
|
258
|
+
/**
|
|
259
|
+
* Creates a new inbound webhook configuration **Required Permissions** none
|
|
260
|
+
* @summary Create the inbound webhook
|
|
261
|
+
* @param {CreateInboundWebhookRequestDto} createInboundWebhookRequestDto
|
|
262
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
263
|
+
* @param {*} [options] Override http request option.
|
|
264
|
+
* @throws {RequiredError}
|
|
265
|
+
*/
|
|
266
|
+
createInboundWebhook: function (createInboundWebhookRequestDto, authorization, options) {
|
|
267
|
+
return localVarFp.createInboundWebhook(createInboundWebhookRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
268
|
+
},
|
|
269
|
+
/**
|
|
270
|
+
* Retrieves an inbound webhook by its code **Required Permissions** none
|
|
271
|
+
* @summary Retrieve the inbound webhook
|
|
272
|
+
* @param {string} code Unique identifier code for the inbound webhook
|
|
273
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
274
|
+
* @param {*} [options] Override http request option.
|
|
275
|
+
* @throws {RequiredError}
|
|
276
|
+
*/
|
|
277
|
+
getInboundWebhook: function (code, authorization, options) {
|
|
278
|
+
return localVarFp.getInboundWebhook(code, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
279
|
+
},
|
|
280
|
+
};
|
|
281
|
+
};
|
|
282
|
+
exports.InboundWebhooksApiFactory = InboundWebhooksApiFactory;
|
|
283
|
+
/**
|
|
284
|
+
* InboundWebhooksApi - object-oriented interface
|
|
285
|
+
* @export
|
|
286
|
+
* @class InboundWebhooksApi
|
|
287
|
+
* @extends {BaseAPI}
|
|
288
|
+
*/
|
|
289
|
+
var InboundWebhooksApi = /** @class */ (function (_super) {
|
|
290
|
+
__extends(InboundWebhooksApi, _super);
|
|
291
|
+
function InboundWebhooksApi() {
|
|
292
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Creates a new inbound webhook configuration **Required Permissions** none
|
|
296
|
+
* @summary Create the inbound webhook
|
|
297
|
+
* @param {InboundWebhooksApiCreateInboundWebhookRequest} requestParameters Request parameters.
|
|
298
|
+
* @param {*} [options] Override http request option.
|
|
299
|
+
* @throws {RequiredError}
|
|
300
|
+
* @memberof InboundWebhooksApi
|
|
301
|
+
*/
|
|
302
|
+
InboundWebhooksApi.prototype.createInboundWebhook = function (requestParameters, options) {
|
|
303
|
+
var _this = this;
|
|
304
|
+
return (0, exports.InboundWebhooksApiFp)(this.configuration).createInboundWebhook(requestParameters.createInboundWebhookRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
305
|
+
};
|
|
306
|
+
/**
|
|
307
|
+
* Retrieves an inbound webhook by its code **Required Permissions** none
|
|
308
|
+
* @summary Retrieve the inbound webhook
|
|
309
|
+
* @param {InboundWebhooksApiGetInboundWebhookRequest} requestParameters Request parameters.
|
|
310
|
+
* @param {*} [options] Override http request option.
|
|
311
|
+
* @throws {RequiredError}
|
|
312
|
+
* @memberof InboundWebhooksApi
|
|
313
|
+
*/
|
|
314
|
+
InboundWebhooksApi.prototype.getInboundWebhook = function (requestParameters, options) {
|
|
315
|
+
var _this = this;
|
|
316
|
+
return (0, exports.InboundWebhooksApiFp)(this.configuration).getInboundWebhook(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
317
|
+
};
|
|
318
|
+
return InboundWebhooksApi;
|
|
319
|
+
}(base_1.BaseAPI));
|
|
320
|
+
exports.InboundWebhooksApi = InboundWebhooksApi;
|
package/dist/api.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
export * from './api/health-api';
|
|
13
|
+
export * from './api/inbound-webhooks-api';
|
package/dist/api.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* EMIL Webhookservice
|
|
6
|
+
* The EMIL Webhookservice API description
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0
|
|
9
|
+
* Contact: kontakt@emil.de
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(o, k2, desc);
|
|
22
|
+
}) : (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
o[k2] = m[k];
|
|
25
|
+
}));
|
|
26
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
27
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
28
|
+
};
|
|
29
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
+
__exportStar(require("./api/health-api"), exports);
|
|
31
|
+
__exportStar(require("./api/inbound-webhooks-api"), exports);
|
package/dist/base.d.ts
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
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 { Configuration } from "./configuration";
|
|
13
|
+
import { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
14
|
+
export declare const BASE_PATH: string;
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
*/
|
|
19
|
+
export declare const COLLECTION_FORMATS: {
|
|
20
|
+
csv: string;
|
|
21
|
+
ssv: string;
|
|
22
|
+
tsv: string;
|
|
23
|
+
pipes: string;
|
|
24
|
+
};
|
|
25
|
+
export interface LoginClass {
|
|
26
|
+
accessToken: string;
|
|
27
|
+
permissions: string;
|
|
28
|
+
}
|
|
29
|
+
export interface SwitchWorkspaceRequest {
|
|
30
|
+
username: string;
|
|
31
|
+
targetWorkspace: string;
|
|
32
|
+
}
|
|
33
|
+
export interface SwitchWorkspaceResponseClass {
|
|
34
|
+
accessToken: string;
|
|
35
|
+
permissions: string;
|
|
36
|
+
}
|
|
37
|
+
export declare enum Environment {
|
|
38
|
+
Production = "https://apiv2.emil.de",
|
|
39
|
+
Test = "https://apiv2-test.emil.de",
|
|
40
|
+
Staging = "https://apiv2-staging.emil.de",
|
|
41
|
+
Development = "https://apiv2-dev.emil.de",
|
|
42
|
+
ProductionZurich = "https://eu-central-2.apiv2.emil.de"
|
|
43
|
+
}
|
|
44
|
+
export declare function resetRetry(): void;
|
|
45
|
+
/**
|
|
46
|
+
*
|
|
47
|
+
* @export
|
|
48
|
+
* @interface RequestArgs
|
|
49
|
+
*/
|
|
50
|
+
export interface RequestArgs {
|
|
51
|
+
url: string;
|
|
52
|
+
options: AxiosRequestConfig;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @export
|
|
57
|
+
* @class BaseAPI
|
|
58
|
+
*/
|
|
59
|
+
export declare class BaseAPI {
|
|
60
|
+
protected basePath: string;
|
|
61
|
+
protected axios: AxiosInstance;
|
|
62
|
+
protected configuration: Configuration;
|
|
63
|
+
private username?;
|
|
64
|
+
private password?;
|
|
65
|
+
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
|
|
66
|
+
initialize(env?: Environment, targetWorkspace?: string): Promise<void>;
|
|
67
|
+
private loadCredentials;
|
|
68
|
+
private readConfigFile;
|
|
69
|
+
private readEnvVariables;
|
|
70
|
+
selectEnvironment(env: Environment): void;
|
|
71
|
+
authorize(username: string, password: string, targetWorkspace?: string): Promise<void>;
|
|
72
|
+
switchWorkspace(targetWorkspace: string): Promise<void>;
|
|
73
|
+
refreshTokenInternal(): Promise<string>;
|
|
74
|
+
private extractRefreshToken;
|
|
75
|
+
getConfiguration(): Configuration;
|
|
76
|
+
private attachInterceptor;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
* @export
|
|
81
|
+
* @class RequiredError
|
|
82
|
+
* @extends {Error}
|
|
83
|
+
*/
|
|
84
|
+
export declare class RequiredError extends Error {
|
|
85
|
+
field: string;
|
|
86
|
+
name: "RequiredError";
|
|
87
|
+
constructor(field: string, msg?: string);
|
|
88
|
+
}
|