@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.
Files changed (49) hide show
  1. package/.openapi-generator/FILES +21 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +84 -0
  5. package/api/health-api.ts +128 -0
  6. package/api/inbound-webhooks-api.ts +272 -0
  7. package/api.ts +33 -0
  8. package/base.ts +327 -0
  9. package/common.ts +199 -0
  10. package/configuration.ts +118 -0
  11. package/dist/api/health-api.d.ts +70 -0
  12. package/dist/api/health-api.js +204 -0
  13. package/dist/api/inbound-webhooks-api.d.ts +153 -0
  14. package/dist/api/inbound-webhooks-api.js +320 -0
  15. package/dist/api.d.ts +13 -0
  16. package/dist/api.js +31 -0
  17. package/dist/base.d.ts +88 -0
  18. package/dist/base.js +434 -0
  19. package/dist/common.d.ts +92 -0
  20. package/dist/common.js +277 -0
  21. package/dist/configuration.d.ts +96 -0
  22. package/dist/configuration.js +52 -0
  23. package/dist/index.d.ts +15 -0
  24. package/dist/index.js +36 -0
  25. package/dist/models/create-inbound-webhook-request-dto.d.ts +66 -0
  26. package/dist/models/create-inbound-webhook-request-dto.js +21 -0
  27. package/dist/models/create-inbound-webhook-response-class.d.ts +25 -0
  28. package/dist/models/create-inbound-webhook-response-class.js +15 -0
  29. package/dist/models/get-inbound-webhook-response-class.d.ts +25 -0
  30. package/dist/models/get-inbound-webhook-response-class.js +15 -0
  31. package/dist/models/inbound-webhook-class.d.ts +102 -0
  32. package/dist/models/inbound-webhook-class.js +21 -0
  33. package/dist/models/index.d.ts +6 -0
  34. package/dist/models/index.js +22 -0
  35. package/dist/models/inline-response200.d.ts +54 -0
  36. package/dist/models/inline-response200.js +15 -0
  37. package/dist/models/inline-response503.d.ts +54 -0
  38. package/dist/models/inline-response503.js +15 -0
  39. package/git_push.sh +57 -0
  40. package/index.ts +19 -0
  41. package/models/create-inbound-webhook-request-dto.ts +75 -0
  42. package/models/create-inbound-webhook-response-class.ts +31 -0
  43. package/models/get-inbound-webhook-response-class.ts +31 -0
  44. package/models/inbound-webhook-class.ts +111 -0
  45. package/models/index.ts +6 -0
  46. package/models/inline-response200.ts +48 -0
  47. package/models/inline-response503.ts +48 -0
  48. package/package.json +29 -0
  49. package/tsconfig.json +23 -0
@@ -0,0 +1,21 @@
1
+ .gitignore
2
+ .npmignore
3
+ .openapi-generator-ignore
4
+ README.md
5
+ api.ts
6
+ api/health-api.ts
7
+ api/inbound-webhooks-api.ts
8
+ base.ts
9
+ common.ts
10
+ configuration.ts
11
+ git_push.sh
12
+ index.ts
13
+ models/create-inbound-webhook-request-dto.ts
14
+ models/create-inbound-webhook-response-class.ts
15
+ models/get-inbound-webhook-response-class.ts
16
+ models/inbound-webhook-class.ts
17
+ models/index.ts
18
+ models/inline-response200.ts
19
+ models/inline-response503.ts
20
+ package.json
21
+ tsconfig.json
@@ -0,0 +1 @@
1
+ 5.4.0
@@ -0,0 +1,23 @@
1
+ # OpenAPI Generator Ignore
2
+ # Generated by openapi-generator https://github.com/openapitools/openapi-generator
3
+
4
+ # Use this file to prevent files from being overwritten by the generator.
5
+ # The patterns follow closely to .gitignore or .dockerignore.
6
+
7
+ # As an example, the C# client generator defines ApiClient.cs.
8
+ # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
9
+ #ApiClient.cs
10
+
11
+ # You can match any string of characters against a directory, file or extension with a single asterisk (*):
12
+ #foo/*/qux
13
+ # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
14
+
15
+ # You can recursively match patterns against a directory, file or extension with a double asterisk (**):
16
+ #foo/**/qux
17
+ # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
18
+
19
+ # You can also negate patterns with an exclamation (!).
20
+ # For example, you can ignore all files in a docs folder with the file extension .md:
21
+ #docs/*.md
22
+ # Then explicitly reverse the ignore rule for a single file:
23
+ #!docs/README.md
package/README.md ADDED
@@ -0,0 +1,84 @@
1
+ # Emil Webhook SDK for Nodejs
2
+
3
+ This TypeScript/JavaScript client utilizes [axios](https://github.com/axios/axios). The generated Node module can be used with Nodejs based applications.
4
+
5
+ Language level
6
+ * ES5 - you must have a Promises/A+ library installed
7
+ * ES6
8
+
9
+ Module system
10
+ * CommonJS
11
+ * ES6 module system
12
+
13
+ Although this package can be used in both TypeScript and JavaScript, it is intended to be used with TypeScript. The definition should be automatically resolved via `package.json`. ([Reference](http://www.typescriptlang.org/docs/handbook/typings-for-npm-packages.html)). For more information, you can go to [Emil Api documentation](https://emil.stoplight.io/docs/emil-api/).
14
+
15
+ ## Consuming
16
+
17
+ Navigate to the folder of your consuming project and run one of the following commands:
18
+
19
+ ```
20
+ npm install @emilgroup/webhook-sdk-node@1.0.1-beta.1 --save
21
+ ```
22
+ or
23
+ ```
24
+ yarn add @emilgroup/webhook-sdk-node@1.0.1-beta.1
25
+ ```
26
+
27
+ And then you can import ``.
28
+
29
+ ```ts
30
+ import { } from '@emilgroup/webhook-sdk-node'
31
+
32
+ const = new ();
33
+ ```
34
+ ## Credentials
35
+
36
+ To use authentication protected endpoints, you have to first authorize. To do so, the easiest way is to provide a configuration file under `~/.emil/credentials` with the following content:
37
+
38
+ ```shell
39
+ emil_username=XXXXX@XXXX.XXX
40
+ emil_password=XXXXXXXXXXXXXX
41
+ ```
42
+
43
+ It is also possible to provide environment variables instead:
44
+
45
+ ```shell
46
+ export EMIL_USERNAME=XXXXX@XXXX.XXX
47
+ export EMIL_PASSWORD=XXXXXXXXXXXXXX
48
+ ```
49
+
50
+ ## Base path
51
+
52
+ To select the basic path for using the API, we can use two approaches. The first is to use one of the predefined environments, and the second is to specify the domain as a string.
53
+
54
+ ```ts
55
+ import { , Environment } from '@emilgroup/webhook-sdk-node'
56
+
57
+ const = new ();
58
+
59
+ // Allows you to simply choose environment. It will usually be Environment.Production.
60
+ .selectEnvironment(Environment.Production);
61
+
62
+ // For advanced users, use the custom baseUrl of the website you need to connect to.
63
+ .selectBasePath('https://my-custom-domain.com');
64
+ ```
65
+
66
+ ## Example
67
+
68
+ Here is a basic functionning example:
69
+
70
+ ```ts
71
+ async function (): Promise<Void> {
72
+ try {
73
+ const = new ();
74
+
75
+ await .initialize(); // should be called only once per Api.
76
+
77
+ const { data: { items } } = await .();
78
+
79
+ console.log(items);
80
+ } catch(error) {
81
+ // process error
82
+ }
83
+ }
84
+ ```
@@ -0,0 +1,128 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL Webhookservice
5
+ * The EMIL Webhookservice API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ * Contact: kontakt@emil.de
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
17
+ import { Configuration } from '../configuration';
18
+ // Some imports not used depending on template conditions
19
+ // @ts-ignore
20
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
21
+ // @ts-ignore
22
+ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
+ // @ts-ignore
24
+ import { InlineResponse200 } from '../models';
25
+ // @ts-ignore
26
+ import { InlineResponse503 } from '../models';
27
+ // URLSearchParams not necessarily used
28
+ // @ts-ignore
29
+ import { URL, URLSearchParams } from 'url';
30
+ const FormData = require('form-data');
31
+ /**
32
+ * HealthApi - axios parameter creator
33
+ * @export
34
+ */
35
+ export const HealthApiAxiosParamCreator = function (configuration?: Configuration) {
36
+ return {
37
+ /**
38
+ * Returns the health status of the webhook service. This endpoint is used to monitor the operational status of the webhook service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
39
+ * @summary Health Check
40
+ * @param {*} [options] Override http request option.
41
+ * @throws {RequiredError}
42
+ */
43
+ check: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
44
+ const localVarPath = `/webhookservice/health`;
45
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
46
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
47
+ let baseOptions;
48
+ let baseAccessToken;
49
+ if (configuration) {
50
+ baseOptions = configuration.baseOptions;
51
+ baseAccessToken = configuration.accessToken;
52
+ }
53
+
54
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
55
+ const localVarHeaderParameter = {} as any;
56
+ const localVarQueryParameter = {} as any;
57
+
58
+
59
+
60
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
61
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
62
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
63
+
64
+ return {
65
+ url: toPathString(localVarUrlObj),
66
+ options: localVarRequestOptions,
67
+ };
68
+ },
69
+ }
70
+ };
71
+
72
+ /**
73
+ * HealthApi - functional programming interface
74
+ * @export
75
+ */
76
+ export const HealthApiFp = function(configuration?: Configuration) {
77
+ const localVarAxiosParamCreator = HealthApiAxiosParamCreator(configuration)
78
+ return {
79
+ /**
80
+ * Returns the health status of the webhook service. This endpoint is used to monitor the operational status of the webhook service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
81
+ * @summary Health Check
82
+ * @param {*} [options] Override http request option.
83
+ * @throws {RequiredError}
84
+ */
85
+ async check(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InlineResponse200>> {
86
+ const localVarAxiosArgs = await localVarAxiosParamCreator.check(options);
87
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
88
+ },
89
+ }
90
+ };
91
+
92
+ /**
93
+ * HealthApi - factory interface
94
+ * @export
95
+ */
96
+ export const HealthApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
97
+ const localVarFp = HealthApiFp(configuration)
98
+ return {
99
+ /**
100
+ * Returns the health status of the webhook service. This endpoint is used to monitor the operational status of the webhook service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
101
+ * @summary Health Check
102
+ * @param {*} [options] Override http request option.
103
+ * @throws {RequiredError}
104
+ */
105
+ check(options?: any): AxiosPromise<InlineResponse200> {
106
+ return localVarFp.check(options).then((request) => request(axios, basePath));
107
+ },
108
+ };
109
+ };
110
+
111
+ /**
112
+ * HealthApi - object-oriented interface
113
+ * @export
114
+ * @class HealthApi
115
+ * @extends {BaseAPI}
116
+ */
117
+ export class HealthApi extends BaseAPI {
118
+ /**
119
+ * Returns the health status of the webhook service. This endpoint is used to monitor the operational status of the webhook service. It typically returns a simple status indicator, such as \'UP\' or \'OK\', confirming that the service is operational and available.
120
+ * @summary Health Check
121
+ * @param {*} [options] Override http request option.
122
+ * @throws {RequiredError}
123
+ * @memberof HealthApi
124
+ */
125
+ public check(options?: AxiosRequestConfig) {
126
+ return HealthApiFp(this.configuration).check(options).then((request) => request(this.axios, this.basePath));
127
+ }
128
+ }
@@ -0,0 +1,272 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL Webhookservice
5
+ * The EMIL Webhookservice API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ * Contact: kontakt@emil.de
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
17
+ import { Configuration } from '../configuration';
18
+ // Some imports not used depending on template conditions
19
+ // @ts-ignore
20
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
21
+ // @ts-ignore
22
+ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
+ // @ts-ignore
24
+ import { CreateInboundWebhookRequestDto } from '../models';
25
+ // @ts-ignore
26
+ import { CreateInboundWebhookResponseClass } from '../models';
27
+ // @ts-ignore
28
+ import { GetInboundWebhookResponseClass } from '../models';
29
+ // URLSearchParams not necessarily used
30
+ // @ts-ignore
31
+ import { URL, URLSearchParams } from 'url';
32
+ const FormData = require('form-data');
33
+ /**
34
+ * InboundWebhooksApi - axios parameter creator
35
+ * @export
36
+ */
37
+ export const InboundWebhooksApiAxiosParamCreator = function (configuration?: Configuration) {
38
+ return {
39
+ /**
40
+ * Creates a new inbound webhook configuration **Required Permissions** none
41
+ * @summary Create the inbound webhook
42
+ * @param {CreateInboundWebhookRequestDto} createInboundWebhookRequestDto
43
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
44
+ * @param {*} [options] Override http request option.
45
+ * @throws {RequiredError}
46
+ */
47
+ createInboundWebhook: async (createInboundWebhookRequestDto: CreateInboundWebhookRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
48
+ // verify required parameter 'createInboundWebhookRequestDto' is not null or undefined
49
+ assertParamExists('createInboundWebhook', 'createInboundWebhookRequestDto', createInboundWebhookRequestDto)
50
+ const localVarPath = `/webhookservice/v1/inbound-webhooks`;
51
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
52
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
53
+ let baseOptions;
54
+ let baseAccessToken;
55
+ if (configuration) {
56
+ baseOptions = configuration.baseOptions;
57
+ baseAccessToken = configuration.accessToken;
58
+ }
59
+
60
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
61
+ const localVarHeaderParameter = {} as any;
62
+ const localVarQueryParameter = {} as any;
63
+
64
+ // authentication bearer required
65
+ // http bearer authentication required
66
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
67
+
68
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
69
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
70
+ }
71
+
72
+
73
+
74
+ localVarHeaderParameter['Content-Type'] = 'application/json';
75
+
76
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
77
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
78
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
79
+ localVarRequestOptions.data = serializeDataIfNeeded(createInboundWebhookRequestDto, localVarRequestOptions, configuration)
80
+
81
+ return {
82
+ url: toPathString(localVarUrlObj),
83
+ options: localVarRequestOptions,
84
+ };
85
+ },
86
+ /**
87
+ * Retrieves an inbound webhook by its code **Required Permissions** none
88
+ * @summary Retrieve the inbound webhook
89
+ * @param {string} code Unique identifier code for the inbound webhook
90
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
91
+ * @param {*} [options] Override http request option.
92
+ * @throws {RequiredError}
93
+ */
94
+ getInboundWebhook: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
95
+ // verify required parameter 'code' is not null or undefined
96
+ assertParamExists('getInboundWebhook', 'code', code)
97
+ const localVarPath = `/webhookservice/v1/inbound-webhooks/{code}`
98
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
99
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
100
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
101
+ let baseOptions;
102
+ let baseAccessToken;
103
+ if (configuration) {
104
+ baseOptions = configuration.baseOptions;
105
+ baseAccessToken = configuration.accessToken;
106
+ }
107
+
108
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
109
+ const localVarHeaderParameter = {} as any;
110
+ const localVarQueryParameter = {} as any;
111
+
112
+ // authentication bearer required
113
+ // http bearer authentication required
114
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
115
+
116
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
117
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
118
+ }
119
+
120
+
121
+
122
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
123
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
124
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
125
+
126
+ return {
127
+ url: toPathString(localVarUrlObj),
128
+ options: localVarRequestOptions,
129
+ };
130
+ },
131
+ }
132
+ };
133
+
134
+ /**
135
+ * InboundWebhooksApi - functional programming interface
136
+ * @export
137
+ */
138
+ export const InboundWebhooksApiFp = function(configuration?: Configuration) {
139
+ const localVarAxiosParamCreator = InboundWebhooksApiAxiosParamCreator(configuration)
140
+ return {
141
+ /**
142
+ * Creates a new inbound webhook configuration **Required Permissions** none
143
+ * @summary Create the inbound webhook
144
+ * @param {CreateInboundWebhookRequestDto} createInboundWebhookRequestDto
145
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
146
+ * @param {*} [options] Override http request option.
147
+ * @throws {RequiredError}
148
+ */
149
+ async createInboundWebhook(createInboundWebhookRequestDto: CreateInboundWebhookRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateInboundWebhookResponseClass>> {
150
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createInboundWebhook(createInboundWebhookRequestDto, authorization, options);
151
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
152
+ },
153
+ /**
154
+ * Retrieves an inbound webhook by its code **Required Permissions** none
155
+ * @summary Retrieve the inbound webhook
156
+ * @param {string} code Unique identifier code for the inbound webhook
157
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
158
+ * @param {*} [options] Override http request option.
159
+ * @throws {RequiredError}
160
+ */
161
+ async getInboundWebhook(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetInboundWebhookResponseClass>> {
162
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getInboundWebhook(code, authorization, options);
163
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
164
+ },
165
+ }
166
+ };
167
+
168
+ /**
169
+ * InboundWebhooksApi - factory interface
170
+ * @export
171
+ */
172
+ export const InboundWebhooksApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
173
+ const localVarFp = InboundWebhooksApiFp(configuration)
174
+ return {
175
+ /**
176
+ * Creates a new inbound webhook configuration **Required Permissions** none
177
+ * @summary Create the inbound webhook
178
+ * @param {CreateInboundWebhookRequestDto} createInboundWebhookRequestDto
179
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
180
+ * @param {*} [options] Override http request option.
181
+ * @throws {RequiredError}
182
+ */
183
+ createInboundWebhook(createInboundWebhookRequestDto: CreateInboundWebhookRequestDto, authorization?: string, options?: any): AxiosPromise<CreateInboundWebhookResponseClass> {
184
+ return localVarFp.createInboundWebhook(createInboundWebhookRequestDto, authorization, options).then((request) => request(axios, basePath));
185
+ },
186
+ /**
187
+ * Retrieves an inbound webhook by its code **Required Permissions** none
188
+ * @summary Retrieve the inbound webhook
189
+ * @param {string} code Unique identifier code for the inbound webhook
190
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
191
+ * @param {*} [options] Override http request option.
192
+ * @throws {RequiredError}
193
+ */
194
+ getInboundWebhook(code: string, authorization?: string, options?: any): AxiosPromise<GetInboundWebhookResponseClass> {
195
+ return localVarFp.getInboundWebhook(code, authorization, options).then((request) => request(axios, basePath));
196
+ },
197
+ };
198
+ };
199
+
200
+ /**
201
+ * Request parameters for createInboundWebhook operation in InboundWebhooksApi.
202
+ * @export
203
+ * @interface InboundWebhooksApiCreateInboundWebhookRequest
204
+ */
205
+ export interface InboundWebhooksApiCreateInboundWebhookRequest {
206
+ /**
207
+ *
208
+ * @type {CreateInboundWebhookRequestDto}
209
+ * @memberof InboundWebhooksApiCreateInboundWebhook
210
+ */
211
+ readonly createInboundWebhookRequestDto: CreateInboundWebhookRequestDto
212
+
213
+ /**
214
+ * Bearer Token: provided by the login endpoint under the name accessToken.
215
+ * @type {string}
216
+ * @memberof InboundWebhooksApiCreateInboundWebhook
217
+ */
218
+ readonly authorization?: string
219
+ }
220
+
221
+ /**
222
+ * Request parameters for getInboundWebhook operation in InboundWebhooksApi.
223
+ * @export
224
+ * @interface InboundWebhooksApiGetInboundWebhookRequest
225
+ */
226
+ export interface InboundWebhooksApiGetInboundWebhookRequest {
227
+ /**
228
+ * Unique identifier code for the inbound webhook
229
+ * @type {string}
230
+ * @memberof InboundWebhooksApiGetInboundWebhook
231
+ */
232
+ readonly code: string
233
+
234
+ /**
235
+ * Bearer Token: provided by the login endpoint under the name accessToken.
236
+ * @type {string}
237
+ * @memberof InboundWebhooksApiGetInboundWebhook
238
+ */
239
+ readonly authorization?: string
240
+ }
241
+
242
+ /**
243
+ * InboundWebhooksApi - object-oriented interface
244
+ * @export
245
+ * @class InboundWebhooksApi
246
+ * @extends {BaseAPI}
247
+ */
248
+ export class InboundWebhooksApi extends BaseAPI {
249
+ /**
250
+ * Creates a new inbound webhook configuration **Required Permissions** none
251
+ * @summary Create the inbound webhook
252
+ * @param {InboundWebhooksApiCreateInboundWebhookRequest} requestParameters Request parameters.
253
+ * @param {*} [options] Override http request option.
254
+ * @throws {RequiredError}
255
+ * @memberof InboundWebhooksApi
256
+ */
257
+ public createInboundWebhook(requestParameters: InboundWebhooksApiCreateInboundWebhookRequest, options?: AxiosRequestConfig) {
258
+ return InboundWebhooksApiFp(this.configuration).createInboundWebhook(requestParameters.createInboundWebhookRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
259
+ }
260
+
261
+ /**
262
+ * Retrieves an inbound webhook by its code **Required Permissions** none
263
+ * @summary Retrieve the inbound webhook
264
+ * @param {InboundWebhooksApiGetInboundWebhookRequest} requestParameters Request parameters.
265
+ * @param {*} [options] Override http request option.
266
+ * @throws {RequiredError}
267
+ * @memberof InboundWebhooksApi
268
+ */
269
+ public getInboundWebhook(requestParameters: InboundWebhooksApiGetInboundWebhookRequest, options?: AxiosRequestConfig) {
270
+ return InboundWebhooksApiFp(this.configuration).getInboundWebhook(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
271
+ }
272
+ }
package/api.ts ADDED
@@ -0,0 +1,33 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL Webhookservice
5
+ * The EMIL Webhookservice API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ * Contact: kontakt@emil.de
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import { Configuration } from './configuration';
17
+ import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';
18
+ // URLSearchParams not necessarily used
19
+ // @ts-ignore
20
+ import { URL, URLSearchParams } from 'url';
21
+ import FormData from 'form-data'
22
+ // Some imports not used depending on template conditions
23
+ // @ts-ignore
24
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
25
+ // @ts-ignore
26
+ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base';
27
+ import { HealthApi } from './api';
28
+ import { InboundWebhooksApi } from './api';
29
+
30
+
31
+ export * from './api/health-api';
32
+ export * from './api/inbound-webhooks-api';
33
+