@emilgroup/webhook-sdk-node 1.6.1-beta.14 → 1.6.1-beta.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/api/health-checks-api.ts +3 -8
- package/api/inbound-webhooks-api.ts +15 -40
- package/api/trigger-inbound-webhooks-api.ts +3 -8
- package/api/webhook-requests-api.ts +3 -8
- package/base.ts +0 -4
- package/common.ts +2 -3
- package/dist/api/health-checks-api.d.ts +1 -1
- package/dist/api/health-checks-api.js +8 -15
- package/dist/api/inbound-webhooks-api.d.ts +5 -5
- package/dist/api/inbound-webhooks-api.js +39 -71
- package/dist/api/trigger-inbound-webhooks-api.d.ts +1 -1
- package/dist/api/trigger-inbound-webhooks-api.js +8 -15
- package/dist/api/webhook-requests-api.d.ts +1 -1
- package/dist/api/webhook-requests-api.js +7 -11
- package/dist/base.d.ts +0 -1
- package/dist/base.js +0 -3
- package/dist/common.d.ts +1 -1
- package/dist/common.js +0 -1
- package/package.json +2 -2
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.6.1-beta.
|
|
20
|
+
npm install @emilgroup/webhook-sdk-node@1.6.1-beta.16 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/webhook-sdk-node@1.6.1-beta.
|
|
24
|
+
yarn add @emilgroup/webhook-sdk-node@1.6.1-beta.16
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import ``.
|
package/api/health-checks-api.ts
CHANGED
|
@@ -60,13 +60,8 @@ export const HealthChecksApiAxiosParamCreator = function (configuration?: Config
|
|
|
60
60
|
// http bearer authentication required
|
|
61
61
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
66
|
-
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
67
|
-
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
68
|
-
if (authorizationValue || authorizationKeepEmpty) {
|
|
69
|
-
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
63
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
64
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
70
65
|
}
|
|
71
66
|
|
|
72
67
|
|
|
@@ -154,6 +149,6 @@ export class HealthChecksApi extends BaseAPI {
|
|
|
154
149
|
* @memberof HealthChecksApi
|
|
155
150
|
*/
|
|
156
151
|
public check(requestParameters: HealthChecksApiCheckRequest = {}, options?: AxiosRequestConfig) {
|
|
157
|
-
return HealthChecksApiFp(this.configuration).check(requestParameters.authorization,
|
|
152
|
+
return HealthChecksApiFp(this.configuration).check(requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
158
153
|
}
|
|
159
154
|
}
|
|
@@ -71,13 +71,8 @@ export const InboundWebhooksApiAxiosParamCreator = function (configuration?: Con
|
|
|
71
71
|
// http bearer authentication required
|
|
72
72
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
77
|
-
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
78
|
-
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
79
|
-
if (authorizationValue || authorizationKeepEmpty) {
|
|
80
|
-
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
74
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
75
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
81
76
|
}
|
|
82
77
|
|
|
83
78
|
|
|
@@ -124,13 +119,8 @@ export const InboundWebhooksApiAxiosParamCreator = function (configuration?: Con
|
|
|
124
119
|
// http bearer authentication required
|
|
125
120
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
126
121
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
130
|
-
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
131
|
-
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
132
|
-
if (authorizationValue || authorizationKeepEmpty) {
|
|
133
|
-
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
122
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
123
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
134
124
|
}
|
|
135
125
|
|
|
136
126
|
|
|
@@ -174,13 +164,8 @@ export const InboundWebhooksApiAxiosParamCreator = function (configuration?: Con
|
|
|
174
164
|
// http bearer authentication required
|
|
175
165
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
176
166
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
180
|
-
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
181
|
-
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
182
|
-
if (authorizationValue || authorizationKeepEmpty) {
|
|
183
|
-
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
167
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
168
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
184
169
|
}
|
|
185
170
|
|
|
186
171
|
|
|
@@ -255,13 +240,8 @@ export const InboundWebhooksApiAxiosParamCreator = function (configuration?: Con
|
|
|
255
240
|
localVarQueryParameter['filters'] = filters;
|
|
256
241
|
}
|
|
257
242
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
261
|
-
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
262
|
-
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
263
|
-
if (authorizationValue || authorizationKeepEmpty) {
|
|
264
|
-
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
243
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
244
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
265
245
|
}
|
|
266
246
|
|
|
267
247
|
|
|
@@ -308,13 +288,8 @@ export const InboundWebhooksApiAxiosParamCreator = function (configuration?: Con
|
|
|
308
288
|
// http bearer authentication required
|
|
309
289
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
310
290
|
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
314
|
-
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
315
|
-
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
316
|
-
if (authorizationValue || authorizationKeepEmpty) {
|
|
317
|
-
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
291
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
292
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
318
293
|
}
|
|
319
294
|
|
|
320
295
|
|
|
@@ -653,7 +628,7 @@ export class InboundWebhooksApi extends BaseAPI {
|
|
|
653
628
|
* @memberof InboundWebhooksApi
|
|
654
629
|
*/
|
|
655
630
|
public createInboundWebhook(requestParameters: InboundWebhooksApiCreateInboundWebhookRequest, options?: AxiosRequestConfig) {
|
|
656
|
-
return InboundWebhooksApiFp(this.configuration).createInboundWebhook(requestParameters.createInboundWebhookRequestDto, requestParameters.authorization,
|
|
631
|
+
return InboundWebhooksApiFp(this.configuration).createInboundWebhook(requestParameters.createInboundWebhookRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
657
632
|
}
|
|
658
633
|
|
|
659
634
|
/**
|
|
@@ -665,7 +640,7 @@ export class InboundWebhooksApi extends BaseAPI {
|
|
|
665
640
|
* @memberof InboundWebhooksApi
|
|
666
641
|
*/
|
|
667
642
|
public deleteInboundWebhook(requestParameters: InboundWebhooksApiDeleteInboundWebhookRequest, options?: AxiosRequestConfig) {
|
|
668
|
-
return InboundWebhooksApiFp(this.configuration).deleteInboundWebhook(requestParameters.code, requestParameters.authorization,
|
|
643
|
+
return InboundWebhooksApiFp(this.configuration).deleteInboundWebhook(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
669
644
|
}
|
|
670
645
|
|
|
671
646
|
/**
|
|
@@ -677,7 +652,7 @@ export class InboundWebhooksApi extends BaseAPI {
|
|
|
677
652
|
* @memberof InboundWebhooksApi
|
|
678
653
|
*/
|
|
679
654
|
public getInboundWebhook(requestParameters: InboundWebhooksApiGetInboundWebhookRequest, options?: AxiosRequestConfig) {
|
|
680
|
-
return InboundWebhooksApiFp(this.configuration).getInboundWebhook(requestParameters.code, requestParameters.authorization,
|
|
655
|
+
return InboundWebhooksApiFp(this.configuration).getInboundWebhook(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
681
656
|
}
|
|
682
657
|
|
|
683
658
|
/**
|
|
@@ -689,7 +664,7 @@ export class InboundWebhooksApi extends BaseAPI {
|
|
|
689
664
|
* @memberof InboundWebhooksApi
|
|
690
665
|
*/
|
|
691
666
|
public listInboundWebhooks(requestParameters: InboundWebhooksApiListInboundWebhooksRequest = {}, options?: AxiosRequestConfig) {
|
|
692
|
-
return InboundWebhooksApiFp(this.configuration).listInboundWebhooks(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters,
|
|
667
|
+
return InboundWebhooksApiFp(this.configuration).listInboundWebhooks(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
|
|
693
668
|
}
|
|
694
669
|
|
|
695
670
|
/**
|
|
@@ -701,6 +676,6 @@ export class InboundWebhooksApi extends BaseAPI {
|
|
|
701
676
|
* @memberof InboundWebhooksApi
|
|
702
677
|
*/
|
|
703
678
|
public updateInboundWebhook(requestParameters: InboundWebhooksApiUpdateInboundWebhookRequest, options?: AxiosRequestConfig) {
|
|
704
|
-
return InboundWebhooksApiFp(this.configuration).updateInboundWebhook(requestParameters.code, requestParameters.updateInboundWebhookRequestDto, requestParameters.authorization,
|
|
679
|
+
return InboundWebhooksApiFp(this.configuration).updateInboundWebhook(requestParameters.code, requestParameters.updateInboundWebhookRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
705
680
|
}
|
|
706
681
|
}
|
|
@@ -64,13 +64,8 @@ export const TriggerInboundWebhooksApiAxiosParamCreator = function (configuratio
|
|
|
64
64
|
// http bearer authentication required
|
|
65
65
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
66
66
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
70
|
-
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
71
|
-
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
72
|
-
if (authorizationValue || authorizationKeepEmpty) {
|
|
73
|
-
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
67
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
68
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
74
69
|
}
|
|
75
70
|
|
|
76
71
|
|
|
@@ -167,6 +162,6 @@ export class TriggerInboundWebhooksApi extends BaseAPI {
|
|
|
167
162
|
* @memberof TriggerInboundWebhooksApi
|
|
168
163
|
*/
|
|
169
164
|
public triggerIncomingWebhook(requestParameters: TriggerInboundWebhooksApiTriggerIncomingWebhookRequest, options?: AxiosRequestConfig) {
|
|
170
|
-
return TriggerInboundWebhooksApiFp(this.configuration).triggerIncomingWebhook(requestParameters.code, requestParameters.authorization,
|
|
165
|
+
return TriggerInboundWebhooksApiFp(this.configuration).triggerIncomingWebhook(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
171
166
|
}
|
|
172
167
|
}
|
|
@@ -93,13 +93,8 @@ export const WebhookRequestsApiAxiosParamCreator = function (configuration?: Con
|
|
|
93
93
|
localVarQueryParameter['filters'] = filters;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
|
|
99
|
-
const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
|
|
100
|
-
const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
|
|
101
|
-
if (authorizationValue || authorizationKeepEmpty) {
|
|
102
|
-
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
96
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
97
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
103
98
|
}
|
|
104
99
|
|
|
105
100
|
|
|
@@ -250,6 +245,6 @@ export class WebhookRequestsApi extends BaseAPI {
|
|
|
250
245
|
* @memberof WebhookRequestsApi
|
|
251
246
|
*/
|
|
252
247
|
public listWebhookRequests(requestParameters: WebhookRequestsApiListWebhookRequestsRequest = {}, options?: AxiosRequestConfig) {
|
|
253
|
-
return WebhookRequestsApiFp(this.configuration).listWebhookRequests(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters,
|
|
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));
|
|
254
249
|
}
|
|
255
250
|
}
|
package/base.ts
CHANGED
|
@@ -92,10 +92,6 @@ export class BaseAPI {
|
|
|
92
92
|
private username?: string;
|
|
93
93
|
private password?: string;
|
|
94
94
|
|
|
95
|
-
protected withOwner(options?: AxiosRequestConfig): AxiosRequestConfig {
|
|
96
|
-
return { ...options };
|
|
97
|
-
}
|
|
98
|
-
|
|
99
95
|
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
|
|
100
96
|
if (configuration) {
|
|
101
97
|
this.configuration = configuration;
|
package/common.ts
CHANGED
|
@@ -131,10 +131,9 @@ export const toPathString = function (url: URL) {
|
|
|
131
131
|
* @export
|
|
132
132
|
*/
|
|
133
133
|
export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {
|
|
134
|
-
|
|
135
|
-
return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH): Promise<R> => {
|
|
134
|
+
return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
136
135
|
const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url};
|
|
137
|
-
return axios.request<T, R>(axiosRequestArgs)
|
|
136
|
+
return axios.request<T, R>(axiosRequestArgs);
|
|
138
137
|
};
|
|
139
138
|
}
|
|
140
139
|
|
|
@@ -83,5 +83,5 @@ export declare class HealthChecksApi extends BaseAPI {
|
|
|
83
83
|
* @throws {RequiredError}
|
|
84
84
|
* @memberof HealthChecksApi
|
|
85
85
|
*/
|
|
86
|
-
check(requestParameters?: HealthChecksApiCheckRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<InlineResponse200, any, {}
|
|
86
|
+
check(requestParameters?: HealthChecksApiCheckRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<InlineResponse200, any, {}>>;
|
|
87
87
|
}
|
|
@@ -106,10 +106,9 @@ var HealthChecksApiAxiosParamCreator = function (configuration) {
|
|
|
106
106
|
check: function (authorization, options) {
|
|
107
107
|
if (options === void 0) { options = {}; }
|
|
108
108
|
return __awaiter(_this, void 0, void 0, function () {
|
|
109
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
switch (_b.label) {
|
|
109
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
110
|
+
return __generator(this, function (_a) {
|
|
111
|
+
switch (_a.label) {
|
|
113
112
|
case 0:
|
|
114
113
|
localVarPath = "/webhookservice/health";
|
|
115
114
|
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -122,19 +121,13 @@ var HealthChecksApiAxiosParamCreator = function (configuration) {
|
|
|
122
121
|
localVarQueryParameter = {};
|
|
123
122
|
// authentication bearer required
|
|
124
123
|
// http bearer authentication required
|
|
125
|
-
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
126
|
-
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
127
|
-
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
128
|
-
];
|
|
124
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
129
125
|
case 1:
|
|
130
126
|
// authentication bearer required
|
|
131
127
|
// http bearer authentication required
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
136
|
-
if (authorizationValue || authorizationKeepEmpty) {
|
|
137
|
-
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
128
|
+
_a.sent();
|
|
129
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
130
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
138
131
|
}
|
|
139
132
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
140
133
|
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
@@ -222,7 +215,7 @@ var HealthChecksApi = /** @class */ (function (_super) {
|
|
|
222
215
|
HealthChecksApi.prototype.check = function (requestParameters, options) {
|
|
223
216
|
var _this = this;
|
|
224
217
|
if (requestParameters === void 0) { requestParameters = {}; }
|
|
225
|
-
return (0, exports.HealthChecksApiFp)(this.configuration).check(requestParameters.authorization,
|
|
218
|
+
return (0, exports.HealthChecksApiFp)(this.configuration).check(requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
226
219
|
};
|
|
227
220
|
return HealthChecksApi;
|
|
228
221
|
}(base_1.BaseAPI));
|
|
@@ -344,7 +344,7 @@ export declare class InboundWebhooksApi extends BaseAPI {
|
|
|
344
344
|
* @throws {RequiredError}
|
|
345
345
|
* @memberof InboundWebhooksApi
|
|
346
346
|
*/
|
|
347
|
-
createInboundWebhook(requestParameters: InboundWebhooksApiCreateInboundWebhookRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateInboundWebhookResponseClass, any, {}
|
|
347
|
+
createInboundWebhook(requestParameters: InboundWebhooksApiCreateInboundWebhookRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreateInboundWebhookResponseClass, any, {}>>;
|
|
348
348
|
/**
|
|
349
349
|
* Deletes an inbound webhook by its code **Required Permissions** \"webhook-management.webhooks.delete\"
|
|
350
350
|
* @summary Delete the inbound webhook
|
|
@@ -353,7 +353,7 @@ export declare class InboundWebhooksApi extends BaseAPI {
|
|
|
353
353
|
* @throws {RequiredError}
|
|
354
354
|
* @memberof InboundWebhooksApi
|
|
355
355
|
*/
|
|
356
|
-
deleteInboundWebhook(requestParameters: InboundWebhooksApiDeleteInboundWebhookRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}
|
|
356
|
+
deleteInboundWebhook(requestParameters: InboundWebhooksApiDeleteInboundWebhookRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
|
|
357
357
|
/**
|
|
358
358
|
* Retrieves an inbound webhook by its code **Required Permissions** \"webhook-management.webhooks.view\"
|
|
359
359
|
* @summary Retrieve the inbound webhook
|
|
@@ -362,7 +362,7 @@ export declare class InboundWebhooksApi extends BaseAPI {
|
|
|
362
362
|
* @throws {RequiredError}
|
|
363
363
|
* @memberof InboundWebhooksApi
|
|
364
364
|
*/
|
|
365
|
-
getInboundWebhook(requestParameters: InboundWebhooksApiGetInboundWebhookRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetInboundWebhookResponseClass, any, {}
|
|
365
|
+
getInboundWebhook(requestParameters: InboundWebhooksApiGetInboundWebhookRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetInboundWebhookResponseClass, any, {}>>;
|
|
366
366
|
/**
|
|
367
367
|
* Lists all inbound webhooks with optional filters **Required Permissions** \"webhook-management.webhooks.view\"
|
|
368
368
|
* @summary List inbound webhooks
|
|
@@ -371,7 +371,7 @@ export declare class InboundWebhooksApi extends BaseAPI {
|
|
|
371
371
|
* @throws {RequiredError}
|
|
372
372
|
* @memberof InboundWebhooksApi
|
|
373
373
|
*/
|
|
374
|
-
listInboundWebhooks(requestParameters?: InboundWebhooksApiListInboundWebhooksRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListInboundWebhookResponseClass, any, {}
|
|
374
|
+
listInboundWebhooks(requestParameters?: InboundWebhooksApiListInboundWebhooksRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListInboundWebhookResponseClass, any, {}>>;
|
|
375
375
|
/**
|
|
376
376
|
* Updates an existing inbound webhook configuration **Required Permissions** \"webhook-management.webhooks.update\"
|
|
377
377
|
* @summary Update the inbound webhook
|
|
@@ -380,5 +380,5 @@ export declare class InboundWebhooksApi extends BaseAPI {
|
|
|
380
380
|
* @throws {RequiredError}
|
|
381
381
|
* @memberof InboundWebhooksApi
|
|
382
382
|
*/
|
|
383
|
-
updateInboundWebhook(requestParameters: InboundWebhooksApiUpdateInboundWebhookRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UpdateInboundWebhookResponseClass, any, {}
|
|
383
|
+
updateInboundWebhook(requestParameters: InboundWebhooksApiUpdateInboundWebhookRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<UpdateInboundWebhookResponseClass, any, {}>>;
|
|
384
384
|
}
|
|
@@ -107,10 +107,9 @@ var InboundWebhooksApiAxiosParamCreator = function (configuration) {
|
|
|
107
107
|
createInboundWebhook: function (createInboundWebhookRequestDto, authorization, options) {
|
|
108
108
|
if (options === void 0) { options = {}; }
|
|
109
109
|
return __awaiter(_this, void 0, void 0, function () {
|
|
110
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter,
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
switch (_b.label) {
|
|
110
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
111
|
+
return __generator(this, function (_a) {
|
|
112
|
+
switch (_a.label) {
|
|
114
113
|
case 0:
|
|
115
114
|
// verify required parameter 'createInboundWebhookRequestDto' is not null or undefined
|
|
116
115
|
(0, common_1.assertParamExists)('createInboundWebhook', 'createInboundWebhookRequestDto', createInboundWebhookRequestDto);
|
|
@@ -125,19 +124,13 @@ var InboundWebhooksApiAxiosParamCreator = function (configuration) {
|
|
|
125
124
|
localVarQueryParameter = {};
|
|
126
125
|
// authentication bearer required
|
|
127
126
|
// http bearer authentication required
|
|
128
|
-
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
129
|
-
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
130
|
-
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
131
|
-
];
|
|
127
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
132
128
|
case 1:
|
|
133
129
|
// authentication bearer required
|
|
134
130
|
// http bearer authentication required
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
139
|
-
if (authorizationValue || authorizationKeepEmpty) {
|
|
140
|
-
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
131
|
+
_a.sent();
|
|
132
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
133
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
141
134
|
}
|
|
142
135
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
143
136
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
@@ -163,10 +156,9 @@ var InboundWebhooksApiAxiosParamCreator = function (configuration) {
|
|
|
163
156
|
deleteInboundWebhook: function (code, authorization, options) {
|
|
164
157
|
if (options === void 0) { options = {}; }
|
|
165
158
|
return __awaiter(_this, void 0, void 0, function () {
|
|
166
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter,
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
switch (_b.label) {
|
|
159
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
160
|
+
return __generator(this, function (_a) {
|
|
161
|
+
switch (_a.label) {
|
|
170
162
|
case 0:
|
|
171
163
|
// verify required parameter 'code' is not null or undefined
|
|
172
164
|
(0, common_1.assertParamExists)('deleteInboundWebhook', 'code', code);
|
|
@@ -182,19 +174,13 @@ var InboundWebhooksApiAxiosParamCreator = function (configuration) {
|
|
|
182
174
|
localVarQueryParameter = {};
|
|
183
175
|
// authentication bearer required
|
|
184
176
|
// http bearer authentication required
|
|
185
|
-
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
186
|
-
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
187
|
-
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
188
|
-
];
|
|
177
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
189
178
|
case 1:
|
|
190
179
|
// authentication bearer required
|
|
191
180
|
// http bearer authentication required
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
196
|
-
if (authorizationValue || authorizationKeepEmpty) {
|
|
197
|
-
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
181
|
+
_a.sent();
|
|
182
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
183
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
198
184
|
}
|
|
199
185
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
200
186
|
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
@@ -218,10 +204,9 @@ var InboundWebhooksApiAxiosParamCreator = function (configuration) {
|
|
|
218
204
|
getInboundWebhook: function (code, authorization, options) {
|
|
219
205
|
if (options === void 0) { options = {}; }
|
|
220
206
|
return __awaiter(_this, void 0, void 0, function () {
|
|
221
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter,
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
switch (_b.label) {
|
|
207
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
208
|
+
return __generator(this, function (_a) {
|
|
209
|
+
switch (_a.label) {
|
|
225
210
|
case 0:
|
|
226
211
|
// verify required parameter 'code' is not null or undefined
|
|
227
212
|
(0, common_1.assertParamExists)('getInboundWebhook', 'code', code);
|
|
@@ -237,19 +222,13 @@ var InboundWebhooksApiAxiosParamCreator = function (configuration) {
|
|
|
237
222
|
localVarQueryParameter = {};
|
|
238
223
|
// authentication bearer required
|
|
239
224
|
// http bearer authentication required
|
|
240
|
-
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
241
|
-
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
242
|
-
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
243
|
-
];
|
|
225
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
244
226
|
case 1:
|
|
245
227
|
// authentication bearer required
|
|
246
228
|
// http bearer authentication required
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
251
|
-
if (authorizationValue || authorizationKeepEmpty) {
|
|
252
|
-
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
229
|
+
_a.sent();
|
|
230
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
231
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
253
232
|
}
|
|
254
233
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
255
234
|
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
@@ -279,10 +258,9 @@ var InboundWebhooksApiAxiosParamCreator = function (configuration) {
|
|
|
279
258
|
listInboundWebhooks: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
280
259
|
if (options === void 0) { options = {}; }
|
|
281
260
|
return __awaiter(_this, void 0, void 0, function () {
|
|
282
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter,
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
switch (_b.label) {
|
|
261
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
262
|
+
return __generator(this, function (_a) {
|
|
263
|
+
switch (_a.label) {
|
|
286
264
|
case 0:
|
|
287
265
|
localVarPath = "/webhookservice/v1/inbound-webhooks";
|
|
288
266
|
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -299,7 +277,7 @@ var InboundWebhooksApiAxiosParamCreator = function (configuration) {
|
|
|
299
277
|
case 1:
|
|
300
278
|
// authentication bearer required
|
|
301
279
|
// http bearer authentication required
|
|
302
|
-
|
|
280
|
+
_a.sent();
|
|
303
281
|
if (pageSize !== undefined) {
|
|
304
282
|
localVarQueryParameter['pageSize'] = pageSize;
|
|
305
283
|
}
|
|
@@ -321,11 +299,8 @@ var InboundWebhooksApiAxiosParamCreator = function (configuration) {
|
|
|
321
299
|
if (filters !== undefined) {
|
|
322
300
|
localVarQueryParameter['filters'] = filters;
|
|
323
301
|
}
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
327
|
-
if (authorizationValue || authorizationKeepEmpty) {
|
|
328
|
-
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
302
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
303
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
329
304
|
}
|
|
330
305
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
331
306
|
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
@@ -350,10 +325,9 @@ var InboundWebhooksApiAxiosParamCreator = function (configuration) {
|
|
|
350
325
|
updateInboundWebhook: function (code, updateInboundWebhookRequestDto, authorization, options) {
|
|
351
326
|
if (options === void 0) { options = {}; }
|
|
352
327
|
return __awaiter(_this, void 0, void 0, function () {
|
|
353
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter,
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
switch (_b.label) {
|
|
328
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
329
|
+
return __generator(this, function (_a) {
|
|
330
|
+
switch (_a.label) {
|
|
357
331
|
case 0:
|
|
358
332
|
// verify required parameter 'code' is not null or undefined
|
|
359
333
|
(0, common_1.assertParamExists)('updateInboundWebhook', 'code', code);
|
|
@@ -371,19 +345,13 @@ var InboundWebhooksApiAxiosParamCreator = function (configuration) {
|
|
|
371
345
|
localVarQueryParameter = {};
|
|
372
346
|
// authentication bearer required
|
|
373
347
|
// http bearer authentication required
|
|
374
|
-
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
375
|
-
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
376
|
-
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
377
|
-
];
|
|
348
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
378
349
|
case 1:
|
|
379
350
|
// authentication bearer required
|
|
380
351
|
// http bearer authentication required
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
385
|
-
if (authorizationValue || authorizationKeepEmpty) {
|
|
386
|
-
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
352
|
+
_a.sent();
|
|
353
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
354
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
387
355
|
}
|
|
388
356
|
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
389
357
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
@@ -616,7 +584,7 @@ var InboundWebhooksApi = /** @class */ (function (_super) {
|
|
|
616
584
|
*/
|
|
617
585
|
InboundWebhooksApi.prototype.createInboundWebhook = function (requestParameters, options) {
|
|
618
586
|
var _this = this;
|
|
619
|
-
return (0, exports.InboundWebhooksApiFp)(this.configuration).createInboundWebhook(requestParameters.createInboundWebhookRequestDto, requestParameters.authorization,
|
|
587
|
+
return (0, exports.InboundWebhooksApiFp)(this.configuration).createInboundWebhook(requestParameters.createInboundWebhookRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
620
588
|
};
|
|
621
589
|
/**
|
|
622
590
|
* Deletes an inbound webhook by its code **Required Permissions** \"webhook-management.webhooks.delete\"
|
|
@@ -628,7 +596,7 @@ var InboundWebhooksApi = /** @class */ (function (_super) {
|
|
|
628
596
|
*/
|
|
629
597
|
InboundWebhooksApi.prototype.deleteInboundWebhook = function (requestParameters, options) {
|
|
630
598
|
var _this = this;
|
|
631
|
-
return (0, exports.InboundWebhooksApiFp)(this.configuration).deleteInboundWebhook(requestParameters.code, requestParameters.authorization,
|
|
599
|
+
return (0, exports.InboundWebhooksApiFp)(this.configuration).deleteInboundWebhook(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
632
600
|
};
|
|
633
601
|
/**
|
|
634
602
|
* Retrieves an inbound webhook by its code **Required Permissions** \"webhook-management.webhooks.view\"
|
|
@@ -640,7 +608,7 @@ var InboundWebhooksApi = /** @class */ (function (_super) {
|
|
|
640
608
|
*/
|
|
641
609
|
InboundWebhooksApi.prototype.getInboundWebhook = function (requestParameters, options) {
|
|
642
610
|
var _this = this;
|
|
643
|
-
return (0, exports.InboundWebhooksApiFp)(this.configuration).getInboundWebhook(requestParameters.code, requestParameters.authorization,
|
|
611
|
+
return (0, exports.InboundWebhooksApiFp)(this.configuration).getInboundWebhook(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
644
612
|
};
|
|
645
613
|
/**
|
|
646
614
|
* Lists all inbound webhooks with optional filters **Required Permissions** \"webhook-management.webhooks.view\"
|
|
@@ -653,7 +621,7 @@ var InboundWebhooksApi = /** @class */ (function (_super) {
|
|
|
653
621
|
InboundWebhooksApi.prototype.listInboundWebhooks = function (requestParameters, options) {
|
|
654
622
|
var _this = this;
|
|
655
623
|
if (requestParameters === void 0) { requestParameters = {}; }
|
|
656
|
-
return (0, exports.InboundWebhooksApiFp)(this.configuration).listInboundWebhooks(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters,
|
|
624
|
+
return (0, exports.InboundWebhooksApiFp)(this.configuration).listInboundWebhooks(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
657
625
|
};
|
|
658
626
|
/**
|
|
659
627
|
* Updates an existing inbound webhook configuration **Required Permissions** \"webhook-management.webhooks.update\"
|
|
@@ -665,7 +633,7 @@ var InboundWebhooksApi = /** @class */ (function (_super) {
|
|
|
665
633
|
*/
|
|
666
634
|
InboundWebhooksApi.prototype.updateInboundWebhook = function (requestParameters, options) {
|
|
667
635
|
var _this = this;
|
|
668
|
-
return (0, exports.InboundWebhooksApiFp)(this.configuration).updateInboundWebhook(requestParameters.code, requestParameters.updateInboundWebhookRequestDto, requestParameters.authorization,
|
|
636
|
+
return (0, exports.InboundWebhooksApiFp)(this.configuration).updateInboundWebhook(requestParameters.code, requestParameters.updateInboundWebhookRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
669
637
|
};
|
|
670
638
|
return InboundWebhooksApi;
|
|
671
639
|
}(base_1.BaseAPI));
|
|
@@ -92,5 +92,5 @@ export declare class TriggerInboundWebhooksApi extends BaseAPI {
|
|
|
92
92
|
* @throws {RequiredError}
|
|
93
93
|
* @memberof TriggerInboundWebhooksApi
|
|
94
94
|
*/
|
|
95
|
-
triggerIncomingWebhook(requestParameters: TriggerInboundWebhooksApiTriggerIncomingWebhookRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<TriggerInboundWebhookAcceptedResponseClass, any, {}
|
|
95
|
+
triggerIncomingWebhook(requestParameters: TriggerInboundWebhooksApiTriggerIncomingWebhookRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<TriggerInboundWebhookAcceptedResponseClass, any, {}>>;
|
|
96
96
|
}
|
|
@@ -107,10 +107,9 @@ var TriggerInboundWebhooksApiAxiosParamCreator = function (configuration) {
|
|
|
107
107
|
triggerIncomingWebhook: function (code, authorization, options) {
|
|
108
108
|
if (options === void 0) { options = {}; }
|
|
109
109
|
return __awaiter(_this, void 0, void 0, function () {
|
|
110
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter,
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
switch (_b.label) {
|
|
110
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
111
|
+
return __generator(this, function (_a) {
|
|
112
|
+
switch (_a.label) {
|
|
114
113
|
case 0:
|
|
115
114
|
// verify required parameter 'code' is not null or undefined
|
|
116
115
|
(0, common_1.assertParamExists)('triggerIncomingWebhook', 'code', code);
|
|
@@ -126,19 +125,13 @@ var TriggerInboundWebhooksApiAxiosParamCreator = function (configuration) {
|
|
|
126
125
|
localVarQueryParameter = {};
|
|
127
126
|
// authentication bearer required
|
|
128
127
|
// http bearer authentication required
|
|
129
|
-
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
|
|
130
|
-
// Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
|
|
131
|
-
// no token is stored, so a refused call still refreshes; a session call (account header) sends none.
|
|
132
|
-
];
|
|
128
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
133
129
|
case 1:
|
|
134
130
|
// authentication bearer required
|
|
135
131
|
// http bearer authentication required
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
140
|
-
if (authorizationValue || authorizationKeepEmpty) {
|
|
141
|
-
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
132
|
+
_a.sent();
|
|
133
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
134
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
142
135
|
}
|
|
143
136
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
144
137
|
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
@@ -227,7 +220,7 @@ var TriggerInboundWebhooksApi = /** @class */ (function (_super) {
|
|
|
227
220
|
*/
|
|
228
221
|
TriggerInboundWebhooksApi.prototype.triggerIncomingWebhook = function (requestParameters, options) {
|
|
229
222
|
var _this = this;
|
|
230
|
-
return (0, exports.TriggerInboundWebhooksApiFp)(this.configuration).triggerIncomingWebhook(requestParameters.code, requestParameters.authorization,
|
|
223
|
+
return (0, exports.TriggerInboundWebhooksApiFp)(this.configuration).triggerIncomingWebhook(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
231
224
|
};
|
|
232
225
|
return TriggerInboundWebhooksApi;
|
|
233
226
|
}(base_1.BaseAPI));
|
|
@@ -146,5 +146,5 @@ export declare class WebhookRequestsApi extends BaseAPI {
|
|
|
146
146
|
* @throws {RequiredError}
|
|
147
147
|
* @memberof WebhookRequestsApi
|
|
148
148
|
*/
|
|
149
|
-
listWebhookRequests(requestParameters?: WebhookRequestsApiListWebhookRequestsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListWebhookRequestsResponseClass, any, {}
|
|
149
|
+
listWebhookRequests(requestParameters?: WebhookRequestsApiListWebhookRequestsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListWebhookRequestsResponseClass, any, {}>>;
|
|
150
150
|
}
|
|
@@ -113,10 +113,9 @@ var WebhookRequestsApiAxiosParamCreator = function (configuration) {
|
|
|
113
113
|
listWebhookRequests: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
|
|
114
114
|
if (options === void 0) { options = {}; }
|
|
115
115
|
return __awaiter(_this, void 0, void 0, function () {
|
|
116
|
-
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter,
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
switch (_b.label) {
|
|
116
|
+
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
117
|
+
return __generator(this, function (_a) {
|
|
118
|
+
switch (_a.label) {
|
|
120
119
|
case 0:
|
|
121
120
|
localVarPath = "/webhookservice/v1/webhook-requests";
|
|
122
121
|
localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -133,7 +132,7 @@ var WebhookRequestsApiAxiosParamCreator = function (configuration) {
|
|
|
133
132
|
case 1:
|
|
134
133
|
// authentication bearer required
|
|
135
134
|
// http bearer authentication required
|
|
136
|
-
|
|
135
|
+
_a.sent();
|
|
137
136
|
if (pageSize !== undefined) {
|
|
138
137
|
localVarQueryParameter['pageSize'] = pageSize;
|
|
139
138
|
}
|
|
@@ -155,11 +154,8 @@ var WebhookRequestsApiAxiosParamCreator = function (configuration) {
|
|
|
155
154
|
if (filters !== undefined) {
|
|
156
155
|
localVarQueryParameter['filters'] = filters;
|
|
157
156
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
|
|
161
|
-
if (authorizationValue || authorizationKeepEmpty) {
|
|
162
|
-
localVarHeaderParameter['Authorization'] = String(authorizationValue);
|
|
157
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
158
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
163
159
|
}
|
|
164
160
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
165
161
|
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
@@ -261,7 +257,7 @@ var WebhookRequestsApi = /** @class */ (function (_super) {
|
|
|
261
257
|
WebhookRequestsApi.prototype.listWebhookRequests = function (requestParameters, options) {
|
|
262
258
|
var _this = this;
|
|
263
259
|
if (requestParameters === void 0) { requestParameters = {}; }
|
|
264
|
-
return (0, exports.WebhookRequestsApiFp)(this.configuration).listWebhookRequests(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters,
|
|
260
|
+
return (0, exports.WebhookRequestsApiFp)(this.configuration).listWebhookRequests(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
265
261
|
};
|
|
266
262
|
return WebhookRequestsApi;
|
|
267
263
|
}(base_1.BaseAPI));
|
package/dist/base.d.ts
CHANGED
|
@@ -63,7 +63,6 @@ export declare class BaseAPI {
|
|
|
63
63
|
protected configuration: Configuration;
|
|
64
64
|
private username?;
|
|
65
65
|
private password?;
|
|
66
|
-
protected withOwner(options?: AxiosRequestConfig): AxiosRequestConfig;
|
|
67
66
|
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
|
|
68
67
|
initialize(env?: Environment, targetWorkspace?: string): Promise<void>;
|
|
69
68
|
private loadCredentials;
|
package/dist/base.js
CHANGED
|
@@ -163,9 +163,6 @@ var BaseAPI = /** @class */ (function () {
|
|
|
163
163
|
}
|
|
164
164
|
this.attachInterceptor(axios);
|
|
165
165
|
}
|
|
166
|
-
BaseAPI.prototype.withOwner = function (options) {
|
|
167
|
-
return __assign({}, options);
|
|
168
|
-
};
|
|
169
166
|
BaseAPI.prototype.initialize = function (env, targetWorkspace) {
|
|
170
167
|
if (env === void 0) { env = Environment.Production; }
|
|
171
168
|
return __awaiter(this, void 0, void 0, function () {
|
package/dist/common.d.ts
CHANGED
|
@@ -63,7 +63,7 @@ export declare const toPathString: (url: URL) => string;
|
|
|
63
63
|
*
|
|
64
64
|
* @export
|
|
65
65
|
*/
|
|
66
|
-
export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T, any, {}
|
|
66
|
+
export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T, any, {}>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
|
|
67
67
|
/**
|
|
68
68
|
* EMIL Webhookservice
|
|
69
69
|
* The EMIL Webhookservice API description
|
package/dist/common.js
CHANGED
|
@@ -234,7 +234,6 @@ exports.toPathString = toPathString;
|
|
|
234
234
|
* @export
|
|
235
235
|
*/
|
|
236
236
|
var createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
|
|
237
|
-
// Typed by hand: since axios 1.20, request() returns an internal axios type that SDK declarations cannot name.
|
|
238
237
|
return function (axios, basePath) {
|
|
239
238
|
if (axios === void 0) { axios = globalAxios; }
|
|
240
239
|
if (basePath === void 0) { basePath = BASE_PATH; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@emilgroup/webhook-sdk-node",
|
|
3
|
-
"version": "1.6.1-beta.
|
|
3
|
+
"version": "1.6.1-beta.16",
|
|
4
4
|
"description": "OpenAPI client for @emilgroup/webhook-sdk-node",
|
|
5
5
|
"author": "OpenAPI-Generator Contributors",
|
|
6
6
|
"keywords": [
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"prepare": "npm run build"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"axios": "1.
|
|
21
|
+
"axios": "1.18.0",
|
|
22
22
|
"form-data": "^4.0.0",
|
|
23
23
|
"url": "^0.11.0"
|
|
24
24
|
},
|