@emilgroup/action-sdk 1.8.1-beta.14 → 1.8.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.
@@ -103,9 +103,10 @@ var ActionsApiAxiosParamCreator = function (configuration) {
103
103
  createAction: function (createActionRequestDto, authorization, options) {
104
104
  if (options === void 0) { options = {}; }
105
105
  return __awaiter(_this, void 0, void 0, function () {
106
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
107
- return __generator(this, function (_a) {
108
- switch (_a.label) {
106
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
107
+ var _a;
108
+ return __generator(this, function (_b) {
109
+ switch (_b.label) {
109
110
  case 0:
110
111
  // verify required parameter 'createActionRequestDto' is not null or undefined
111
112
  (0, common_1.assertParamExists)('createAction', 'createActionRequestDto', createActionRequestDto);
@@ -121,14 +122,17 @@ var ActionsApiAxiosParamCreator = function (configuration) {
121
122
  // authentication bearer required
122
123
  // http bearer authentication required
123
124
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
124
- // Only Authorization falls back to the configured token; an empty value is never sent.
125
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
126
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
125
127
  ];
126
128
  case 1:
127
129
  // authentication bearer required
128
130
  // http bearer authentication required
129
- _a.sent();
130
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
131
- if (authorizationValue) {
131
+ _b.sent();
132
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
133
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
134
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
135
+ if (authorizationValue || authorizationKeepEmpty) {
132
136
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
133
137
  }
134
138
  localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -155,9 +159,10 @@ var ActionsApiAxiosParamCreator = function (configuration) {
155
159
  deleteAction: function (code, authorization, options) {
156
160
  if (options === void 0) { options = {}; }
157
161
  return __awaiter(_this, void 0, void 0, function () {
158
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
159
- return __generator(this, function (_a) {
160
- switch (_a.label) {
162
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
163
+ var _a;
164
+ return __generator(this, function (_b) {
165
+ switch (_b.label) {
161
166
  case 0:
162
167
  // verify required parameter 'code' is not null or undefined
163
168
  (0, common_1.assertParamExists)('deleteAction', 'code', code);
@@ -174,14 +179,17 @@ var ActionsApiAxiosParamCreator = function (configuration) {
174
179
  // authentication bearer required
175
180
  // http bearer authentication required
176
181
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
177
- // Only Authorization falls back to the configured token; an empty value is never sent.
182
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
183
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
178
184
  ];
179
185
  case 1:
180
186
  // authentication bearer required
181
187
  // http bearer authentication required
182
- _a.sent();
183
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
184
- if (authorizationValue) {
188
+ _b.sent();
189
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
190
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
191
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
192
+ if (authorizationValue || authorizationKeepEmpty) {
185
193
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
186
194
  }
187
195
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -206,9 +214,10 @@ var ActionsApiAxiosParamCreator = function (configuration) {
206
214
  deleteActionVersion: function (versionCode, authorization, options) {
207
215
  if (options === void 0) { options = {}; }
208
216
  return __awaiter(_this, void 0, void 0, function () {
209
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
210
- return __generator(this, function (_a) {
211
- switch (_a.label) {
217
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
218
+ var _a;
219
+ return __generator(this, function (_b) {
220
+ switch (_b.label) {
212
221
  case 0:
213
222
  // verify required parameter 'versionCode' is not null or undefined
214
223
  (0, common_1.assertParamExists)('deleteActionVersion', 'versionCode', versionCode);
@@ -225,14 +234,17 @@ var ActionsApiAxiosParamCreator = function (configuration) {
225
234
  // authentication bearer required
226
235
  // http bearer authentication required
227
236
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
228
- // Only Authorization falls back to the configured token; an empty value is never sent.
237
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
238
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
229
239
  ];
230
240
  case 1:
231
241
  // authentication bearer required
232
242
  // http bearer authentication required
233
- _a.sent();
234
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
235
- if (authorizationValue) {
243
+ _b.sent();
244
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
245
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
246
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
247
+ if (authorizationValue || authorizationKeepEmpty) {
236
248
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
237
249
  }
238
250
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -258,9 +270,10 @@ var ActionsApiAxiosParamCreator = function (configuration) {
258
270
  getAction: function (code, authorization, expand, options) {
259
271
  if (options === void 0) { options = {}; }
260
272
  return __awaiter(_this, void 0, void 0, function () {
261
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
262
- return __generator(this, function (_a) {
263
- switch (_a.label) {
273
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
274
+ var _a;
275
+ return __generator(this, function (_b) {
276
+ switch (_b.label) {
264
277
  case 0:
265
278
  // verify required parameter 'code' is not null or undefined
266
279
  (0, common_1.assertParamExists)('getAction', 'code', code);
@@ -280,12 +293,14 @@ var ActionsApiAxiosParamCreator = function (configuration) {
280
293
  case 1:
281
294
  // authentication bearer required
282
295
  // http bearer authentication required
283
- _a.sent();
296
+ _b.sent();
284
297
  if (expand !== undefined) {
285
298
  localVarQueryParameter['expand'] = expand;
286
299
  }
287
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
288
- if (authorizationValue) {
300
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
301
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
302
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
303
+ if (authorizationValue || authorizationKeepEmpty) {
289
304
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
290
305
  }
291
306
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -311,9 +326,10 @@ var ActionsApiAxiosParamCreator = function (configuration) {
311
326
  getActionVersion: function (versionCode, authorization, expand, options) {
312
327
  if (options === void 0) { options = {}; }
313
328
  return __awaiter(_this, void 0, void 0, function () {
314
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
315
- return __generator(this, function (_a) {
316
- switch (_a.label) {
329
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
330
+ var _a;
331
+ return __generator(this, function (_b) {
332
+ switch (_b.label) {
317
333
  case 0:
318
334
  // verify required parameter 'versionCode' is not null or undefined
319
335
  (0, common_1.assertParamExists)('getActionVersion', 'versionCode', versionCode);
@@ -333,12 +349,14 @@ var ActionsApiAxiosParamCreator = function (configuration) {
333
349
  case 1:
334
350
  // authentication bearer required
335
351
  // http bearer authentication required
336
- _a.sent();
352
+ _b.sent();
337
353
  if (expand !== undefined) {
338
354
  localVarQueryParameter['expand'] = expand;
339
355
  }
340
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
341
- if (authorizationValue) {
356
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
357
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
358
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
359
+ if (authorizationValue || authorizationKeepEmpty) {
342
360
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
343
361
  }
344
362
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -370,9 +388,10 @@ var ActionsApiAxiosParamCreator = function (configuration) {
370
388
  listActionVersions: function (code, authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
371
389
  if (options === void 0) { options = {}; }
372
390
  return __awaiter(_this, void 0, void 0, function () {
373
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
374
- return __generator(this, function (_a) {
375
- switch (_a.label) {
391
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
392
+ var _a;
393
+ return __generator(this, function (_b) {
394
+ switch (_b.label) {
376
395
  case 0:
377
396
  // verify required parameter 'code' is not null or undefined
378
397
  (0, common_1.assertParamExists)('listActionVersions', 'code', code);
@@ -392,7 +411,7 @@ var ActionsApiAxiosParamCreator = function (configuration) {
392
411
  case 1:
393
412
  // authentication bearer required
394
413
  // http bearer authentication required
395
- _a.sent();
414
+ _b.sent();
396
415
  if (pageSize !== undefined) {
397
416
  localVarQueryParameter['pageSize'] = pageSize;
398
417
  }
@@ -414,8 +433,10 @@ var ActionsApiAxiosParamCreator = function (configuration) {
414
433
  if (filters !== undefined) {
415
434
  localVarQueryParameter['filters'] = filters;
416
435
  }
417
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
418
- if (authorizationValue) {
436
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
437
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
438
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
439
+ if (authorizationValue || authorizationKeepEmpty) {
419
440
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
420
441
  }
421
442
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -446,9 +467,10 @@ var ActionsApiAxiosParamCreator = function (configuration) {
446
467
  listActions: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
447
468
  if (options === void 0) { options = {}; }
448
469
  return __awaiter(_this, void 0, void 0, function () {
449
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
450
- return __generator(this, function (_a) {
451
- switch (_a.label) {
470
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
471
+ var _a;
472
+ return __generator(this, function (_b) {
473
+ switch (_b.label) {
452
474
  case 0:
453
475
  localVarPath = "/actionservice/v1/actions";
454
476
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -465,7 +487,7 @@ var ActionsApiAxiosParamCreator = function (configuration) {
465
487
  case 1:
466
488
  // authentication bearer required
467
489
  // http bearer authentication required
468
- _a.sent();
490
+ _b.sent();
469
491
  if (pageSize !== undefined) {
470
492
  localVarQueryParameter['pageSize'] = pageSize;
471
493
  }
@@ -487,8 +509,10 @@ var ActionsApiAxiosParamCreator = function (configuration) {
487
509
  if (filters !== undefined) {
488
510
  localVarQueryParameter['filters'] = filters;
489
511
  }
490
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
491
- if (authorizationValue) {
512
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
513
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
514
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
515
+ if (authorizationValue || authorizationKeepEmpty) {
492
516
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
493
517
  }
494
518
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -519,9 +543,10 @@ var ActionsApiAxiosParamCreator = function (configuration) {
519
543
  listAllActionVersions: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
520
544
  if (options === void 0) { options = {}; }
521
545
  return __awaiter(_this, void 0, void 0, function () {
522
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
523
- return __generator(this, function (_a) {
524
- switch (_a.label) {
546
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
547
+ var _a;
548
+ return __generator(this, function (_b) {
549
+ switch (_b.label) {
525
550
  case 0:
526
551
  localVarPath = "/actionservice/v1/actions/versions";
527
552
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -538,7 +563,7 @@ var ActionsApiAxiosParamCreator = function (configuration) {
538
563
  case 1:
539
564
  // authentication bearer required
540
565
  // http bearer authentication required
541
- _a.sent();
566
+ _b.sent();
542
567
  if (pageSize !== undefined) {
543
568
  localVarQueryParameter['pageSize'] = pageSize;
544
569
  }
@@ -560,8 +585,10 @@ var ActionsApiAxiosParamCreator = function (configuration) {
560
585
  if (filters !== undefined) {
561
586
  localVarQueryParameter['filters'] = filters;
562
587
  }
563
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
564
- if (authorizationValue) {
588
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
589
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
590
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
591
+ if (authorizationValue || authorizationKeepEmpty) {
565
592
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
566
593
  }
567
594
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -587,9 +614,10 @@ var ActionsApiAxiosParamCreator = function (configuration) {
587
614
  updateAction: function (code, updateActionRequestDto, authorization, options) {
588
615
  if (options === void 0) { options = {}; }
589
616
  return __awaiter(_this, void 0, void 0, function () {
590
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
591
- return __generator(this, function (_a) {
592
- switch (_a.label) {
617
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
618
+ var _a;
619
+ return __generator(this, function (_b) {
620
+ switch (_b.label) {
593
621
  case 0:
594
622
  // verify required parameter 'code' is not null or undefined
595
623
  (0, common_1.assertParamExists)('updateAction', 'code', code);
@@ -608,14 +636,17 @@ var ActionsApiAxiosParamCreator = function (configuration) {
608
636
  // authentication bearer required
609
637
  // http bearer authentication required
610
638
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
611
- // Only Authorization falls back to the configured token; an empty value is never sent.
639
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
640
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
612
641
  ];
613
642
  case 1:
614
643
  // authentication bearer required
615
644
  // http bearer authentication required
616
- _a.sent();
617
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
618
- if (authorizationValue) {
645
+ _b.sent();
646
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
647
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
648
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
649
+ if (authorizationValue || authorizationKeepEmpty) {
619
650
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
620
651
  }
621
652
  localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -1007,7 +1038,7 @@ var ActionsApi = /** @class */ (function (_super) {
1007
1038
  */
1008
1039
  ActionsApi.prototype.createAction = function (requestParameters, options) {
1009
1040
  var _this = this;
1010
- return (0, exports.ActionsApiFp)(this.configuration).createAction(requestParameters.createActionRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1041
+ return (0, exports.ActionsApiFp)(this.configuration).createAction(requestParameters.createActionRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1011
1042
  };
1012
1043
  /**
1013
1044
  * Deletes an action configuration by its code **Required Permissions** \"action-management.actions.delete\"
@@ -1019,7 +1050,7 @@ var ActionsApi = /** @class */ (function (_super) {
1019
1050
  */
1020
1051
  ActionsApi.prototype.deleteAction = function (requestParameters, options) {
1021
1052
  var _this = this;
1022
- return (0, exports.ActionsApiFp)(this.configuration).deleteAction(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1053
+ return (0, exports.ActionsApiFp)(this.configuration).deleteAction(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1023
1054
  };
1024
1055
  /**
1025
1056
  * Deletes a specific action version by its version code **Required Permissions** \"action-management.actions.delete\"
@@ -1031,7 +1062,7 @@ var ActionsApi = /** @class */ (function (_super) {
1031
1062
  */
1032
1063
  ActionsApi.prototype.deleteActionVersion = function (requestParameters, options) {
1033
1064
  var _this = this;
1034
- return (0, exports.ActionsApiFp)(this.configuration).deleteActionVersion(requestParameters.versionCode, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1065
+ return (0, exports.ActionsApiFp)(this.configuration).deleteActionVersion(requestParameters.versionCode, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1035
1066
  };
1036
1067
  /**
1037
1068
  * Retrieves an action configuration by its code **Required Permissions** \"action-management.actions.view\"
@@ -1043,7 +1074,7 @@ var ActionsApi = /** @class */ (function (_super) {
1043
1074
  */
1044
1075
  ActionsApi.prototype.getAction = function (requestParameters, options) {
1045
1076
  var _this = this;
1046
- return (0, exports.ActionsApiFp)(this.configuration).getAction(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
1077
+ return (0, exports.ActionsApiFp)(this.configuration).getAction(requestParameters.code, requestParameters.authorization, requestParameters.expand, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1047
1078
  };
1048
1079
  /**
1049
1080
  * Gets a specific action version by its version code **Required Permissions** \"action-management.actions.view\"
@@ -1055,7 +1086,7 @@ var ActionsApi = /** @class */ (function (_super) {
1055
1086
  */
1056
1087
  ActionsApi.prototype.getActionVersion = function (requestParameters, options) {
1057
1088
  var _this = this;
1058
- return (0, exports.ActionsApiFp)(this.configuration).getActionVersion(requestParameters.versionCode, requestParameters.authorization, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
1089
+ return (0, exports.ActionsApiFp)(this.configuration).getActionVersion(requestParameters.versionCode, requestParameters.authorization, requestParameters.expand, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1059
1090
  };
1060
1091
  /**
1061
1092
  * Lists all versions for an action by code **Required Permissions** \"action-management.actions.view\"
@@ -1067,7 +1098,7 @@ var ActionsApi = /** @class */ (function (_super) {
1067
1098
  */
1068
1099
  ActionsApi.prototype.listActionVersions = function (requestParameters, options) {
1069
1100
  var _this = this;
1070
- return (0, exports.ActionsApiFp)(this.configuration).listActionVersions(requestParameters.code, 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); });
1101
+ return (0, exports.ActionsApiFp)(this.configuration).listActionVersions(requestParameters.code, 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); });
1071
1102
  };
1072
1103
  /**
1073
1104
  * Lists all action configurations with optional filters **Required Permissions** \"action-management.actions.view\"
@@ -1080,7 +1111,7 @@ var ActionsApi = /** @class */ (function (_super) {
1080
1111
  ActionsApi.prototype.listActions = function (requestParameters, options) {
1081
1112
  var _this = this;
1082
1113
  if (requestParameters === void 0) { requestParameters = {}; }
1083
- return (0, exports.ActionsApiFp)(this.configuration).listActions(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); });
1114
+ return (0, exports.ActionsApiFp)(this.configuration).listActions(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); });
1084
1115
  };
1085
1116
  /**
1086
1117
  * Lists all action versions. Use filters e.g. isActive==true, entityType==LEAD, name, slug. No parent action code required. **Required Permissions** \"action-management.actions.view\"
@@ -1093,7 +1124,7 @@ var ActionsApi = /** @class */ (function (_super) {
1093
1124
  ActionsApi.prototype.listAllActionVersions = function (requestParameters, options) {
1094
1125
  var _this = this;
1095
1126
  if (requestParameters === void 0) { requestParameters = {}; }
1096
- return (0, exports.ActionsApiFp)(this.configuration).listAllActionVersions(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); });
1127
+ return (0, exports.ActionsApiFp)(this.configuration).listAllActionVersions(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); });
1097
1128
  };
1098
1129
  /**
1099
1130
  * Updates an existing action configuration (patch semantics) **Required Permissions** \"action-management.actions.update\"
@@ -1105,7 +1136,7 @@ var ActionsApi = /** @class */ (function (_super) {
1105
1136
  */
1106
1137
  ActionsApi.prototype.updateAction = function (requestParameters, options) {
1107
1138
  var _this = this;
1108
- return (0, exports.ActionsApiFp)(this.configuration).updateAction(requestParameters.code, requestParameters.updateActionRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1139
+ return (0, exports.ActionsApiFp)(this.configuration).updateAction(requestParameters.code, requestParameters.updateActionRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1109
1140
  };
1110
1141
  return ActionsApi;
1111
1142
  }(base_1.BaseAPI));
@@ -104,9 +104,10 @@ var ExecutionsApiAxiosParamCreator = function (configuration) {
104
104
  getActionExecutionStatus: function (authorization, executionCode, correlationId, options) {
105
105
  if (options === void 0) { options = {}; }
106
106
  return __awaiter(_this, void 0, void 0, function () {
107
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
108
- return __generator(this, function (_a) {
109
- switch (_a.label) {
107
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
108
+ var _a;
109
+ return __generator(this, function (_b) {
110
+ switch (_b.label) {
110
111
  case 0:
111
112
  localVarPath = "/actionservice/v1/actions/executions/status";
112
113
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -123,15 +124,17 @@ var ExecutionsApiAxiosParamCreator = function (configuration) {
123
124
  case 1:
124
125
  // authentication bearer required
125
126
  // http bearer authentication required
126
- _a.sent();
127
+ _b.sent();
127
128
  if (executionCode !== undefined) {
128
129
  localVarQueryParameter['executionCode'] = executionCode;
129
130
  }
130
131
  if (correlationId !== undefined) {
131
132
  localVarQueryParameter['correlationId'] = correlationId;
132
133
  }
133
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
134
- if (authorizationValue) {
134
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
135
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
136
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
137
+ if (authorizationValue || authorizationKeepEmpty) {
135
138
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
136
139
  }
137
140
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -162,9 +165,10 @@ var ExecutionsApiAxiosParamCreator = function (configuration) {
162
165
  listActionExecutions: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
163
166
  if (options === void 0) { options = {}; }
164
167
  return __awaiter(_this, void 0, void 0, function () {
165
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
166
- return __generator(this, function (_a) {
167
- switch (_a.label) {
168
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
169
+ var _a;
170
+ return __generator(this, function (_b) {
171
+ switch (_b.label) {
168
172
  case 0:
169
173
  localVarPath = "/actionservice/v1/actions/executions";
170
174
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -181,7 +185,7 @@ var ExecutionsApiAxiosParamCreator = function (configuration) {
181
185
  case 1:
182
186
  // authentication bearer required
183
187
  // http bearer authentication required
184
- _a.sent();
188
+ _b.sent();
185
189
  if (pageSize !== undefined) {
186
190
  localVarQueryParameter['pageSize'] = pageSize;
187
191
  }
@@ -203,8 +207,10 @@ var ExecutionsApiAxiosParamCreator = function (configuration) {
203
207
  if (filters !== undefined) {
204
208
  localVarQueryParameter['filters'] = filters;
205
209
  }
206
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
207
- if (authorizationValue) {
210
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
211
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
212
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
213
+ if (authorizationValue || authorizationKeepEmpty) {
208
214
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
209
215
  }
210
216
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -229,9 +235,10 @@ var ExecutionsApiAxiosParamCreator = function (configuration) {
229
235
  triggerAction: function (triggerActionRequestDto, authorization, options) {
230
236
  if (options === void 0) { options = {}; }
231
237
  return __awaiter(_this, void 0, void 0, function () {
232
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
233
- return __generator(this, function (_a) {
234
- switch (_a.label) {
238
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
239
+ var _a;
240
+ return __generator(this, function (_b) {
241
+ switch (_b.label) {
235
242
  case 0:
236
243
  // verify required parameter 'triggerActionRequestDto' is not null or undefined
237
244
  (0, common_1.assertParamExists)('triggerAction', 'triggerActionRequestDto', triggerActionRequestDto);
@@ -247,14 +254,17 @@ var ExecutionsApiAxiosParamCreator = function (configuration) {
247
254
  // authentication bearer required
248
255
  // http bearer authentication required
249
256
  return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
250
- // Only Authorization falls back to the configured token; an empty value is never sent.
257
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
258
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
251
259
  ];
252
260
  case 1:
253
261
  // authentication bearer required
254
262
  // http bearer authentication required
255
- _a.sent();
256
- authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
257
- if (authorizationValue) {
263
+ _b.sent();
264
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
265
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
266
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
267
+ if (authorizationValue || authorizationKeepEmpty) {
258
268
  localVarHeaderParameter['Authorization'] = String(authorizationValue);
259
269
  }
260
270
  localVarHeaderParameter['Content-Type'] = 'application/json';
@@ -425,7 +435,7 @@ var ExecutionsApi = /** @class */ (function (_super) {
425
435
  ExecutionsApi.prototype.getActionExecutionStatus = function (requestParameters, options) {
426
436
  var _this = this;
427
437
  if (requestParameters === void 0) { requestParameters = {}; }
428
- return (0, exports.ExecutionsApiFp)(this.configuration).getActionExecutionStatus(requestParameters.authorization, requestParameters.executionCode, requestParameters.correlationId, options).then(function (request) { return request(_this.axios, _this.basePath); });
438
+ return (0, exports.ExecutionsApiFp)(this.configuration).getActionExecutionStatus(requestParameters.authorization, requestParameters.executionCode, requestParameters.correlationId, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
429
439
  };
430
440
  /**
431
441
  * Lists action executions (latest status per execution only) with optional filters **Required Permissions** \"action-management.actions.view\"
@@ -438,7 +448,7 @@ var ExecutionsApi = /** @class */ (function (_super) {
438
448
  ExecutionsApi.prototype.listActionExecutions = function (requestParameters, options) {
439
449
  var _this = this;
440
450
  if (requestParameters === void 0) { requestParameters = {}; }
441
- return (0, exports.ExecutionsApiFp)(this.configuration).listActionExecutions(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); });
451
+ return (0, exports.ExecutionsApiFp)(this.configuration).listActionExecutions(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); });
442
452
  };
443
453
  /**
444
454
  * Triggers an action execution. When the action has an input_validation_schema, the input payload is validated against it; invalid payloads return HTTP 400 with a body containing message and errors (JSON Schema validation errors). **Required Permissions** \"action-management.actions.run\"
@@ -450,7 +460,7 @@ var ExecutionsApi = /** @class */ (function (_super) {
450
460
  */
451
461
  ExecutionsApi.prototype.triggerAction = function (requestParameters, options) {
452
462
  var _this = this;
453
- return (0, exports.ExecutionsApiFp)(this.configuration).triggerAction(requestParameters.triggerActionRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
463
+ return (0, exports.ExecutionsApiFp)(this.configuration).triggerAction(requestParameters.triggerActionRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
454
464
  };
455
465
  return ExecutionsApi;
456
466
  }(base_1.BaseAPI));
@@ -193,7 +193,7 @@ var HealthApi = /** @class */ (function (_super) {
193
193
  */
194
194
  HealthApi.prototype.check = function (options) {
195
195
  var _this = this;
196
- return (0, exports.HealthApiFp)(this.configuration).check(options).then(function (request) { return request(_this.axios, _this.basePath); });
196
+ return (0, exports.HealthApiFp)(this.configuration).check(this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
197
197
  };
198
198
  return HealthApi;
199
199
  }(base_1.BaseAPI));
package/dist/base.d.ts CHANGED
@@ -96,6 +96,8 @@ export declare class BaseAPI {
96
96
  private storeTokenData;
97
97
  loadTokenData(): void;
98
98
  cleanTokenData(): void;
99
+ private ownAccount;
100
+ protected withOwner(options?: AxiosRequestConfig): AxiosRequestConfig;
99
101
  private attachInterceptor;
100
102
  }
101
103
  /**