@emilgroup/webhook-sdk-node 1.0.1-beta.11 → 1.0.1-beta.13
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 +3 -0
- package/README.md +2 -2
- package/api/inbound-webhooks-api.ts +20 -20
- package/api/trigger-inbound-webhooks-api.ts +19 -32
- package/api/webhook-requests-api.ts +250 -0
- package/api.ts +2 -0
- package/dist/api/inbound-webhooks-api.d.ts +20 -20
- package/dist/api/inbound-webhooks-api.js +20 -20
- package/dist/api/trigger-inbound-webhooks-api.d.ts +12 -21
- package/dist/api/trigger-inbound-webhooks-api.js +17 -23
- package/dist/api/webhook-requests-api.d.ts +150 -0
- package/dist/api/webhook-requests-api.js +264 -0
- package/dist/api.d.ts +1 -0
- package/dist/api.js +1 -0
- package/dist/models/index.d.ts +2 -0
- package/dist/models/index.js +2 -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/webhook-request-class.d.ts +145 -0
- package/dist/models/webhook-request-class.js +22 -0
- package/models/index.ts +2 -0
- package/models/list-webhook-requests-response-class.ts +49 -0
- package/models/webhook-request-class.ts +154 -0
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -6,6 +6,7 @@ api.ts
|
|
|
6
6
|
api/health-checks-api.ts
|
|
7
7
|
api/inbound-webhooks-api.ts
|
|
8
8
|
api/trigger-inbound-webhooks-api.ts
|
|
9
|
+
api/webhook-requests-api.ts
|
|
9
10
|
base.ts
|
|
10
11
|
common.ts
|
|
11
12
|
configuration.ts
|
|
@@ -19,8 +20,10 @@ models/index.ts
|
|
|
19
20
|
models/inline-response200.ts
|
|
20
21
|
models/inline-response503.ts
|
|
21
22
|
models/list-inbound-webhook-response-class.ts
|
|
23
|
+
models/list-webhook-requests-response-class.ts
|
|
22
24
|
models/trigger-inbound-webhook-response-class.ts
|
|
23
25
|
models/update-inbound-webhook-request-dto.ts
|
|
24
26
|
models/update-inbound-webhook-response-class.ts
|
|
27
|
+
models/webhook-request-class.ts
|
|
25
28
|
package.json
|
|
26
29
|
tsconfig.json
|
package/README.md
CHANGED
|
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
|
|
|
17
17
|
Navigate to the folder of your consuming project and run one of the following commands:
|
|
18
18
|
|
|
19
19
|
```
|
|
20
|
-
npm install @emilgroup/webhook-sdk-node@1.0.1-beta.
|
|
20
|
+
npm install @emilgroup/webhook-sdk-node@1.0.1-beta.13 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/webhook-sdk-node@1.0.1-beta.
|
|
24
|
+
yarn add @emilgroup/webhook-sdk-node@1.0.1-beta.13
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import ``.
|
|
@@ -43,7 +43,7 @@ const FormData = require('form-data');
|
|
|
43
43
|
export const InboundWebhooksApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
44
44
|
return {
|
|
45
45
|
/**
|
|
46
|
-
* Creates a new inbound webhook configuration **Required Permissions**
|
|
46
|
+
* Creates a new inbound webhook configuration **Required Permissions** \"webhook-management.webhooks.create\"
|
|
47
47
|
* @summary Create the inbound webhook
|
|
48
48
|
* @param {CreateInboundWebhookRequestDto} createInboundWebhookRequestDto
|
|
49
49
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
@@ -90,7 +90,7 @@ export const InboundWebhooksApiAxiosParamCreator = function (configuration?: Con
|
|
|
90
90
|
};
|
|
91
91
|
},
|
|
92
92
|
/**
|
|
93
|
-
* Deletes an inbound webhook by its code **Required Permissions**
|
|
93
|
+
* Deletes an inbound webhook by its code **Required Permissions** \"webhook-management.webhooks.delete\"
|
|
94
94
|
* @summary Delete the inbound webhook
|
|
95
95
|
* @param {string} code Unique identifier code for the inbound webhook
|
|
96
96
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
@@ -135,7 +135,7 @@ export const InboundWebhooksApiAxiosParamCreator = function (configuration?: Con
|
|
|
135
135
|
};
|
|
136
136
|
},
|
|
137
137
|
/**
|
|
138
|
-
* Retrieves an inbound webhook by its code **Required Permissions**
|
|
138
|
+
* Retrieves an inbound webhook by its code **Required Permissions** \"webhook-management.webhooks.view\"
|
|
139
139
|
* @summary Retrieve the inbound webhook
|
|
140
140
|
* @param {string} code Unique identifier code for the inbound webhook
|
|
141
141
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
@@ -180,7 +180,7 @@ export const InboundWebhooksApiAxiosParamCreator = function (configuration?: Con
|
|
|
180
180
|
};
|
|
181
181
|
},
|
|
182
182
|
/**
|
|
183
|
-
* Lists all inbound webhooks with optional filters **Required Permissions**
|
|
183
|
+
* Lists all inbound webhooks with optional filters **Required Permissions** \"webhook-management.webhooks.view\"
|
|
184
184
|
* @summary List inbound webhooks
|
|
185
185
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
186
186
|
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
@@ -256,7 +256,7 @@ export const InboundWebhooksApiAxiosParamCreator = function (configuration?: Con
|
|
|
256
256
|
};
|
|
257
257
|
},
|
|
258
258
|
/**
|
|
259
|
-
* Updates an existing inbound webhook configuration **Required Permissions**
|
|
259
|
+
* Updates an existing inbound webhook configuration **Required Permissions** \"webhook-management.webhooks.update\"
|
|
260
260
|
* @summary Update the inbound webhook
|
|
261
261
|
* @param {string} code Unique identifier code for the inbound webhook
|
|
262
262
|
* @param {UpdateInboundWebhookRequestDto} updateInboundWebhookRequestDto
|
|
@@ -317,7 +317,7 @@ export const InboundWebhooksApiFp = function(configuration?: Configuration) {
|
|
|
317
317
|
const localVarAxiosParamCreator = InboundWebhooksApiAxiosParamCreator(configuration)
|
|
318
318
|
return {
|
|
319
319
|
/**
|
|
320
|
-
* Creates a new inbound webhook configuration **Required Permissions**
|
|
320
|
+
* Creates a new inbound webhook configuration **Required Permissions** \"webhook-management.webhooks.create\"
|
|
321
321
|
* @summary Create the inbound webhook
|
|
322
322
|
* @param {CreateInboundWebhookRequestDto} createInboundWebhookRequestDto
|
|
323
323
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
@@ -329,7 +329,7 @@ export const InboundWebhooksApiFp = function(configuration?: Configuration) {
|
|
|
329
329
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
330
330
|
},
|
|
331
331
|
/**
|
|
332
|
-
* Deletes an inbound webhook by its code **Required Permissions**
|
|
332
|
+
* Deletes an inbound webhook by its code **Required Permissions** \"webhook-management.webhooks.delete\"
|
|
333
333
|
* @summary Delete the inbound webhook
|
|
334
334
|
* @param {string} code Unique identifier code for the inbound webhook
|
|
335
335
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
@@ -341,7 +341,7 @@ export const InboundWebhooksApiFp = function(configuration?: Configuration) {
|
|
|
341
341
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
342
342
|
},
|
|
343
343
|
/**
|
|
344
|
-
* Retrieves an inbound webhook by its code **Required Permissions**
|
|
344
|
+
* Retrieves an inbound webhook by its code **Required Permissions** \"webhook-management.webhooks.view\"
|
|
345
345
|
* @summary Retrieve the inbound webhook
|
|
346
346
|
* @param {string} code Unique identifier code for the inbound webhook
|
|
347
347
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
@@ -353,7 +353,7 @@ export const InboundWebhooksApiFp = function(configuration?: Configuration) {
|
|
|
353
353
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
354
354
|
},
|
|
355
355
|
/**
|
|
356
|
-
* Lists all inbound webhooks with optional filters **Required Permissions**
|
|
356
|
+
* Lists all inbound webhooks with optional filters **Required Permissions** \"webhook-management.webhooks.view\"
|
|
357
357
|
* @summary List inbound webhooks
|
|
358
358
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
359
359
|
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
@@ -371,7 +371,7 @@ export const InboundWebhooksApiFp = function(configuration?: Configuration) {
|
|
|
371
371
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
372
372
|
},
|
|
373
373
|
/**
|
|
374
|
-
* Updates an existing inbound webhook configuration **Required Permissions**
|
|
374
|
+
* Updates an existing inbound webhook configuration **Required Permissions** \"webhook-management.webhooks.update\"
|
|
375
375
|
* @summary Update the inbound webhook
|
|
376
376
|
* @param {string} code Unique identifier code for the inbound webhook
|
|
377
377
|
* @param {UpdateInboundWebhookRequestDto} updateInboundWebhookRequestDto
|
|
@@ -394,7 +394,7 @@ export const InboundWebhooksApiFactory = function (configuration?: Configuration
|
|
|
394
394
|
const localVarFp = InboundWebhooksApiFp(configuration)
|
|
395
395
|
return {
|
|
396
396
|
/**
|
|
397
|
-
* Creates a new inbound webhook configuration **Required Permissions**
|
|
397
|
+
* Creates a new inbound webhook configuration **Required Permissions** \"webhook-management.webhooks.create\"
|
|
398
398
|
* @summary Create the inbound webhook
|
|
399
399
|
* @param {CreateInboundWebhookRequestDto} createInboundWebhookRequestDto
|
|
400
400
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
@@ -405,7 +405,7 @@ export const InboundWebhooksApiFactory = function (configuration?: Configuration
|
|
|
405
405
|
return localVarFp.createInboundWebhook(createInboundWebhookRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
406
406
|
},
|
|
407
407
|
/**
|
|
408
|
-
* Deletes an inbound webhook by its code **Required Permissions**
|
|
408
|
+
* Deletes an inbound webhook by its code **Required Permissions** \"webhook-management.webhooks.delete\"
|
|
409
409
|
* @summary Delete the inbound webhook
|
|
410
410
|
* @param {string} code Unique identifier code for the inbound webhook
|
|
411
411
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
@@ -416,7 +416,7 @@ export const InboundWebhooksApiFactory = function (configuration?: Configuration
|
|
|
416
416
|
return localVarFp.deleteInboundWebhook(code, authorization, options).then((request) => request(axios, basePath));
|
|
417
417
|
},
|
|
418
418
|
/**
|
|
419
|
-
* Retrieves an inbound webhook by its code **Required Permissions**
|
|
419
|
+
* Retrieves an inbound webhook by its code **Required Permissions** \"webhook-management.webhooks.view\"
|
|
420
420
|
* @summary Retrieve the inbound webhook
|
|
421
421
|
* @param {string} code Unique identifier code for the inbound webhook
|
|
422
422
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
@@ -427,7 +427,7 @@ export const InboundWebhooksApiFactory = function (configuration?: Configuration
|
|
|
427
427
|
return localVarFp.getInboundWebhook(code, authorization, options).then((request) => request(axios, basePath));
|
|
428
428
|
},
|
|
429
429
|
/**
|
|
430
|
-
* Lists all inbound webhooks with optional filters **Required Permissions**
|
|
430
|
+
* Lists all inbound webhooks with optional filters **Required Permissions** \"webhook-management.webhooks.view\"
|
|
431
431
|
* @summary List inbound webhooks
|
|
432
432
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
433
433
|
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
@@ -444,7 +444,7 @@ export const InboundWebhooksApiFactory = function (configuration?: Configuration
|
|
|
444
444
|
return localVarFp.listInboundWebhooks(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
|
|
445
445
|
},
|
|
446
446
|
/**
|
|
447
|
-
* Updates an existing inbound webhook configuration **Required Permissions**
|
|
447
|
+
* Updates an existing inbound webhook configuration **Required Permissions** \"webhook-management.webhooks.update\"
|
|
448
448
|
* @summary Update the inbound webhook
|
|
449
449
|
* @param {string} code Unique identifier code for the inbound webhook
|
|
450
450
|
* @param {UpdateInboundWebhookRequestDto} updateInboundWebhookRequestDto
|
|
@@ -620,7 +620,7 @@ export interface InboundWebhooksApiUpdateInboundWebhookRequest {
|
|
|
620
620
|
*/
|
|
621
621
|
export class InboundWebhooksApi extends BaseAPI {
|
|
622
622
|
/**
|
|
623
|
-
* Creates a new inbound webhook configuration **Required Permissions**
|
|
623
|
+
* Creates a new inbound webhook configuration **Required Permissions** \"webhook-management.webhooks.create\"
|
|
624
624
|
* @summary Create the inbound webhook
|
|
625
625
|
* @param {InboundWebhooksApiCreateInboundWebhookRequest} requestParameters Request parameters.
|
|
626
626
|
* @param {*} [options] Override http request option.
|
|
@@ -632,7 +632,7 @@ export class InboundWebhooksApi extends BaseAPI {
|
|
|
632
632
|
}
|
|
633
633
|
|
|
634
634
|
/**
|
|
635
|
-
* Deletes an inbound webhook by its code **Required Permissions**
|
|
635
|
+
* Deletes an inbound webhook by its code **Required Permissions** \"webhook-management.webhooks.delete\"
|
|
636
636
|
* @summary Delete the inbound webhook
|
|
637
637
|
* @param {InboundWebhooksApiDeleteInboundWebhookRequest} requestParameters Request parameters.
|
|
638
638
|
* @param {*} [options] Override http request option.
|
|
@@ -644,7 +644,7 @@ export class InboundWebhooksApi extends BaseAPI {
|
|
|
644
644
|
}
|
|
645
645
|
|
|
646
646
|
/**
|
|
647
|
-
* Retrieves an inbound webhook by its code **Required Permissions**
|
|
647
|
+
* Retrieves an inbound webhook by its code **Required Permissions** \"webhook-management.webhooks.view\"
|
|
648
648
|
* @summary Retrieve the inbound webhook
|
|
649
649
|
* @param {InboundWebhooksApiGetInboundWebhookRequest} requestParameters Request parameters.
|
|
650
650
|
* @param {*} [options] Override http request option.
|
|
@@ -656,7 +656,7 @@ export class InboundWebhooksApi extends BaseAPI {
|
|
|
656
656
|
}
|
|
657
657
|
|
|
658
658
|
/**
|
|
659
|
-
* Lists all inbound webhooks with optional filters **Required Permissions**
|
|
659
|
+
* Lists all inbound webhooks with optional filters **Required Permissions** \"webhook-management.webhooks.view\"
|
|
660
660
|
* @summary List inbound webhooks
|
|
661
661
|
* @param {InboundWebhooksApiListInboundWebhooksRequest} requestParameters Request parameters.
|
|
662
662
|
* @param {*} [options] Override http request option.
|
|
@@ -668,7 +668,7 @@ export class InboundWebhooksApi extends BaseAPI {
|
|
|
668
668
|
}
|
|
669
669
|
|
|
670
670
|
/**
|
|
671
|
-
* Updates an existing inbound webhook configuration **Required Permissions**
|
|
671
|
+
* Updates an existing inbound webhook configuration **Required Permissions** \"webhook-management.webhooks.update\"
|
|
672
672
|
* @summary Update the inbound webhook
|
|
673
673
|
* @param {InboundWebhooksApiUpdateInboundWebhookRequest} requestParameters Request parameters.
|
|
674
674
|
* @param {*} [options] Override http request option.
|
|
@@ -33,22 +33,18 @@ const FormData = require('form-data');
|
|
|
33
33
|
export const TriggerInboundWebhooksApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
34
34
|
return {
|
|
35
35
|
/**
|
|
36
|
-
* Receives and processes incoming webhook requests from external systems **Required Permissions**
|
|
36
|
+
* Receives and processes incoming webhook requests from external systems **Required Permissions** \"webhook-management.webhooks.run\"
|
|
37
37
|
* @summary Execute incoming webhook
|
|
38
|
-
* @param {string}
|
|
39
|
-
* @param {string} slugAndCode The webhook slug and code combined with a hyphen (e.g., claim.deleted-iwh_eN2uxBbOz)
|
|
38
|
+
* @param {string} code The webhook code (e.g., iwh_3g_5yaneKw)
|
|
40
39
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
41
40
|
* @param {*} [options] Override http request option.
|
|
42
41
|
* @throws {RequiredError}
|
|
43
42
|
*/
|
|
44
|
-
triggerIncomingWebhook: async (
|
|
45
|
-
// verify required parameter '
|
|
46
|
-
assertParamExists('triggerIncomingWebhook', '
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
const localVarPath = `/webhookservice/v1/in/{tenantSlug}/{slugAndCode}`
|
|
50
|
-
.replace(`{${"tenantSlug"}}`, encodeURIComponent(String(tenantSlug)))
|
|
51
|
-
.replace(`{${"slugAndCode"}}`, encodeURIComponent(String(slugAndCode)));
|
|
43
|
+
triggerIncomingWebhook: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
44
|
+
// verify required parameter 'code' is not null or undefined
|
|
45
|
+
assertParamExists('triggerIncomingWebhook', 'code', code)
|
|
46
|
+
const localVarPath = `/webhookservice/v1/in/{code}`
|
|
47
|
+
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
52
48
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
53
49
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
54
50
|
let baseOptions;
|
|
@@ -92,16 +88,15 @@ export const TriggerInboundWebhooksApiFp = function(configuration?: Configuratio
|
|
|
92
88
|
const localVarAxiosParamCreator = TriggerInboundWebhooksApiAxiosParamCreator(configuration)
|
|
93
89
|
return {
|
|
94
90
|
/**
|
|
95
|
-
* Receives and processes incoming webhook requests from external systems **Required Permissions**
|
|
91
|
+
* Receives and processes incoming webhook requests from external systems **Required Permissions** \"webhook-management.webhooks.run\"
|
|
96
92
|
* @summary Execute incoming webhook
|
|
97
|
-
* @param {string}
|
|
98
|
-
* @param {string} slugAndCode The webhook slug and code combined with a hyphen (e.g., claim.deleted-iwh_eN2uxBbOz)
|
|
93
|
+
* @param {string} code The webhook code (e.g., iwh_3g_5yaneKw)
|
|
99
94
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
100
95
|
* @param {*} [options] Override http request option.
|
|
101
96
|
* @throws {RequiredError}
|
|
102
97
|
*/
|
|
103
|
-
async triggerIncomingWebhook(
|
|
104
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.triggerIncomingWebhook(
|
|
98
|
+
async triggerIncomingWebhook(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TriggerInboundWebhookResponseClass>> {
|
|
99
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.triggerIncomingWebhook(code, authorization, options);
|
|
105
100
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
106
101
|
},
|
|
107
102
|
}
|
|
@@ -115,16 +110,15 @@ export const TriggerInboundWebhooksApiFactory = function (configuration?: Config
|
|
|
115
110
|
const localVarFp = TriggerInboundWebhooksApiFp(configuration)
|
|
116
111
|
return {
|
|
117
112
|
/**
|
|
118
|
-
* Receives and processes incoming webhook requests from external systems **Required Permissions**
|
|
113
|
+
* Receives and processes incoming webhook requests from external systems **Required Permissions** \"webhook-management.webhooks.run\"
|
|
119
114
|
* @summary Execute incoming webhook
|
|
120
|
-
* @param {string}
|
|
121
|
-
* @param {string} slugAndCode The webhook slug and code combined with a hyphen (e.g., claim.deleted-iwh_eN2uxBbOz)
|
|
115
|
+
* @param {string} code The webhook code (e.g., iwh_3g_5yaneKw)
|
|
122
116
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
123
117
|
* @param {*} [options] Override http request option.
|
|
124
118
|
* @throws {RequiredError}
|
|
125
119
|
*/
|
|
126
|
-
triggerIncomingWebhook(
|
|
127
|
-
return localVarFp.triggerIncomingWebhook(
|
|
120
|
+
triggerIncomingWebhook(code: string, authorization?: string, options?: any): AxiosPromise<TriggerInboundWebhookResponseClass> {
|
|
121
|
+
return localVarFp.triggerIncomingWebhook(code, authorization, options).then((request) => request(axios, basePath));
|
|
128
122
|
},
|
|
129
123
|
};
|
|
130
124
|
};
|
|
@@ -136,18 +130,11 @@ export const TriggerInboundWebhooksApiFactory = function (configuration?: Config
|
|
|
136
130
|
*/
|
|
137
131
|
export interface TriggerInboundWebhooksApiTriggerIncomingWebhookRequest {
|
|
138
132
|
/**
|
|
139
|
-
*
|
|
133
|
+
* The webhook code (e.g., iwh_3g_5yaneKw)
|
|
140
134
|
* @type {string}
|
|
141
135
|
* @memberof TriggerInboundWebhooksApiTriggerIncomingWebhook
|
|
142
136
|
*/
|
|
143
|
-
readonly
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* The webhook slug and code combined with a hyphen (e.g., claim.deleted-iwh_eN2uxBbOz)
|
|
147
|
-
* @type {string}
|
|
148
|
-
* @memberof TriggerInboundWebhooksApiTriggerIncomingWebhook
|
|
149
|
-
*/
|
|
150
|
-
readonly slugAndCode: string
|
|
137
|
+
readonly code: string
|
|
151
138
|
|
|
152
139
|
/**
|
|
153
140
|
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
@@ -165,7 +152,7 @@ export interface TriggerInboundWebhooksApiTriggerIncomingWebhookRequest {
|
|
|
165
152
|
*/
|
|
166
153
|
export class TriggerInboundWebhooksApi extends BaseAPI {
|
|
167
154
|
/**
|
|
168
|
-
* Receives and processes incoming webhook requests from external systems **Required Permissions**
|
|
155
|
+
* Receives and processes incoming webhook requests from external systems **Required Permissions** \"webhook-management.webhooks.run\"
|
|
169
156
|
* @summary Execute incoming webhook
|
|
170
157
|
* @param {TriggerInboundWebhooksApiTriggerIncomingWebhookRequest} requestParameters Request parameters.
|
|
171
158
|
* @param {*} [options] Override http request option.
|
|
@@ -173,6 +160,6 @@ export class TriggerInboundWebhooksApi extends BaseAPI {
|
|
|
173
160
|
* @memberof TriggerInboundWebhooksApi
|
|
174
161
|
*/
|
|
175
162
|
public triggerIncomingWebhook(requestParameters: TriggerInboundWebhooksApiTriggerIncomingWebhookRequest, options?: AxiosRequestConfig) {
|
|
176
|
-
return TriggerInboundWebhooksApiFp(this.configuration).triggerIncomingWebhook(requestParameters.
|
|
163
|
+
return TriggerInboundWebhooksApiFp(this.configuration).triggerIncomingWebhook(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
177
164
|
}
|
|
178
165
|
}
|
|
@@ -0,0 +1,250 @@
|
|
|
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 { ListWebhookRequestsResponseClass } from '../models';
|
|
25
|
+
// URLSearchParams not necessarily used
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
import { URL, URLSearchParams } from 'url';
|
|
28
|
+
const FormData = require('form-data');
|
|
29
|
+
/**
|
|
30
|
+
* WebhookRequestsApi - axios parameter creator
|
|
31
|
+
* @export
|
|
32
|
+
*/
|
|
33
|
+
export const WebhookRequestsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
34
|
+
return {
|
|
35
|
+
/**
|
|
36
|
+
* Lists all webhook requests with optional filters **Required Permissions** \"webhook-management.webhooks.view\"
|
|
37
|
+
* @summary List webhook requests
|
|
38
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
39
|
+
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
40
|
+
* @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.
|
|
41
|
+
* @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, inboundWebhookId, inboundWebhookCode, requestMethod, status, externalRef, workflowInstanceCode, contentType, createdAt, updatedAt, processedAt, createdBy, updatedBy</i>
|
|
42
|
+
* @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
43
|
+
* @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, inboundWebhookCode, requestMethod, status, workflowInstanceCode, createdAt, updatedAt, processedAt</i>
|
|
44
|
+
* @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/>
|
|
45
|
+
* @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, inboundWebhookId, inboundWebhookCode, requestMethod, status, externalRef, workflowInstanceCode, contentType, createdAt, updatedAt, processedAt, createdBy, updatedBy</i>
|
|
46
|
+
* @param {*} [options] Override http request option.
|
|
47
|
+
* @throws {RequiredError}
|
|
48
|
+
*/
|
|
49
|
+
listWebhookRequests: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
50
|
+
const localVarPath = `/webhookservice/v1/webhook-requests`;
|
|
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: 'GET', ...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 (pageSize !== undefined) {
|
|
69
|
+
localVarQueryParameter['pageSize'] = pageSize;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (pageToken !== undefined) {
|
|
73
|
+
localVarQueryParameter['pageToken'] = pageToken;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if (filter !== undefined) {
|
|
77
|
+
localVarQueryParameter['filter'] = filter;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (search !== undefined) {
|
|
81
|
+
localVarQueryParameter['search'] = search;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (order !== undefined) {
|
|
85
|
+
localVarQueryParameter['order'] = order;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if (expand !== undefined) {
|
|
89
|
+
localVarQueryParameter['expand'] = expand;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
if (filters !== undefined) {
|
|
93
|
+
localVarQueryParameter['filters'] = filters;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
97
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
103
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
104
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
105
|
+
|
|
106
|
+
return {
|
|
107
|
+
url: toPathString(localVarUrlObj),
|
|
108
|
+
options: localVarRequestOptions,
|
|
109
|
+
};
|
|
110
|
+
},
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* WebhookRequestsApi - functional programming interface
|
|
116
|
+
* @export
|
|
117
|
+
*/
|
|
118
|
+
export const WebhookRequestsApiFp = function(configuration?: Configuration) {
|
|
119
|
+
const localVarAxiosParamCreator = WebhookRequestsApiAxiosParamCreator(configuration)
|
|
120
|
+
return {
|
|
121
|
+
/**
|
|
122
|
+
* Lists all webhook requests with optional filters **Required Permissions** \"webhook-management.webhooks.view\"
|
|
123
|
+
* @summary List webhook requests
|
|
124
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
125
|
+
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
126
|
+
* @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.
|
|
127
|
+
* @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, inboundWebhookId, inboundWebhookCode, requestMethod, status, externalRef, workflowInstanceCode, contentType, createdAt, updatedAt, processedAt, createdBy, updatedBy</i>
|
|
128
|
+
* @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
129
|
+
* @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, inboundWebhookCode, requestMethod, status, workflowInstanceCode, createdAt, updatedAt, processedAt</i>
|
|
130
|
+
* @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/>
|
|
131
|
+
* @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, inboundWebhookId, inboundWebhookCode, requestMethod, status, externalRef, workflowInstanceCode, contentType, createdAt, updatedAt, processedAt, createdBy, updatedBy</i>
|
|
132
|
+
* @param {*} [options] Override http request option.
|
|
133
|
+
* @throws {RequiredError}
|
|
134
|
+
*/
|
|
135
|
+
async listWebhookRequests(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListWebhookRequestsResponseClass>> {
|
|
136
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listWebhookRequests(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
|
|
137
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
138
|
+
},
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* WebhookRequestsApi - factory interface
|
|
144
|
+
* @export
|
|
145
|
+
*/
|
|
146
|
+
export const WebhookRequestsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
147
|
+
const localVarFp = WebhookRequestsApiFp(configuration)
|
|
148
|
+
return {
|
|
149
|
+
/**
|
|
150
|
+
* Lists all webhook requests with optional filters **Required Permissions** \"webhook-management.webhooks.view\"
|
|
151
|
+
* @summary List webhook requests
|
|
152
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
153
|
+
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
154
|
+
* @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.
|
|
155
|
+
* @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, inboundWebhookId, inboundWebhookCode, requestMethod, status, externalRef, workflowInstanceCode, contentType, createdAt, updatedAt, processedAt, createdBy, updatedBy</i>
|
|
156
|
+
* @param {string} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
157
|
+
* @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, inboundWebhookCode, requestMethod, status, workflowInstanceCode, createdAt, updatedAt, processedAt</i>
|
|
158
|
+
* @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/>
|
|
159
|
+
* @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, inboundWebhookId, inboundWebhookCode, requestMethod, status, externalRef, workflowInstanceCode, contentType, createdAt, updatedAt, processedAt, createdBy, updatedBy</i>
|
|
160
|
+
* @param {*} [options] Override http request option.
|
|
161
|
+
* @throws {RequiredError}
|
|
162
|
+
*/
|
|
163
|
+
listWebhookRequests(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListWebhookRequestsResponseClass> {
|
|
164
|
+
return localVarFp.listWebhookRequests(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
|
|
165
|
+
},
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Request parameters for listWebhookRequests operation in WebhookRequestsApi.
|
|
171
|
+
* @export
|
|
172
|
+
* @interface WebhookRequestsApiListWebhookRequestsRequest
|
|
173
|
+
*/
|
|
174
|
+
export interface WebhookRequestsApiListWebhookRequestsRequest {
|
|
175
|
+
/**
|
|
176
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
177
|
+
* @type {string}
|
|
178
|
+
* @memberof WebhookRequestsApiListWebhookRequests
|
|
179
|
+
*/
|
|
180
|
+
readonly authorization?: string
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
184
|
+
* @type {number}
|
|
185
|
+
* @memberof WebhookRequestsApiListWebhookRequests
|
|
186
|
+
*/
|
|
187
|
+
readonly pageSize?: number
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* 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.
|
|
191
|
+
* @type {string}
|
|
192
|
+
* @memberof WebhookRequestsApiListWebhookRequests
|
|
193
|
+
*/
|
|
194
|
+
readonly pageToken?: string
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* 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, inboundWebhookId, inboundWebhookCode, requestMethod, status, externalRef, workflowInstanceCode, contentType, createdAt, updatedAt, processedAt, createdBy, updatedBy</i>
|
|
198
|
+
* @type {string}
|
|
199
|
+
* @memberof WebhookRequestsApiListWebhookRequests
|
|
200
|
+
*/
|
|
201
|
+
readonly filter?: string
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* To search the list by any field, pass search=xxx to fetch the result.
|
|
205
|
+
* @type {string}
|
|
206
|
+
* @memberof WebhookRequestsApiListWebhookRequests
|
|
207
|
+
*/
|
|
208
|
+
readonly search?: string
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* 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, inboundWebhookCode, requestMethod, status, workflowInstanceCode, createdAt, updatedAt, processedAt</i>
|
|
212
|
+
* @type {string}
|
|
213
|
+
* @memberof WebhookRequestsApiListWebhookRequests
|
|
214
|
+
*/
|
|
215
|
+
readonly order?: string
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* 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/>
|
|
219
|
+
* @type {string}
|
|
220
|
+
* @memberof WebhookRequestsApiListWebhookRequests
|
|
221
|
+
*/
|
|
222
|
+
readonly expand?: string
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* 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, inboundWebhookId, inboundWebhookCode, requestMethod, status, externalRef, workflowInstanceCode, contentType, createdAt, updatedAt, processedAt, createdBy, updatedBy</i>
|
|
226
|
+
* @type {string}
|
|
227
|
+
* @memberof WebhookRequestsApiListWebhookRequests
|
|
228
|
+
*/
|
|
229
|
+
readonly filters?: string
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* WebhookRequestsApi - object-oriented interface
|
|
234
|
+
* @export
|
|
235
|
+
* @class WebhookRequestsApi
|
|
236
|
+
* @extends {BaseAPI}
|
|
237
|
+
*/
|
|
238
|
+
export class WebhookRequestsApi extends BaseAPI {
|
|
239
|
+
/**
|
|
240
|
+
* Lists all webhook requests with optional filters **Required Permissions** \"webhook-management.webhooks.view\"
|
|
241
|
+
* @summary List webhook requests
|
|
242
|
+
* @param {WebhookRequestsApiListWebhookRequestsRequest} requestParameters Request parameters.
|
|
243
|
+
* @param {*} [options] Override http request option.
|
|
244
|
+
* @throws {RequiredError}
|
|
245
|
+
* @memberof WebhookRequestsApi
|
|
246
|
+
*/
|
|
247
|
+
public listWebhookRequests(requestParameters: WebhookRequestsApiListWebhookRequestsRequest = {}, options?: AxiosRequestConfig) {
|
|
248
|
+
return WebhookRequestsApiFp(this.configuration).listWebhookRequests(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
|
|
249
|
+
}
|
|
250
|
+
}
|
package/api.ts
CHANGED
|
@@ -27,9 +27,11 @@ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } fr
|
|
|
27
27
|
import { HealthChecksApi } from './api';
|
|
28
28
|
import { InboundWebhooksApi } from './api';
|
|
29
29
|
import { TriggerInboundWebhooksApi } from './api';
|
|
30
|
+
import { WebhookRequestsApi } from './api';
|
|
30
31
|
|
|
31
32
|
|
|
32
33
|
export * from './api/health-checks-api';
|
|
33
34
|
export * from './api/inbound-webhooks-api';
|
|
34
35
|
export * from './api/trigger-inbound-webhooks-api';
|
|
36
|
+
export * from './api/webhook-requests-api';
|
|
35
37
|
|