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