@emilgroup/action-sdk 1.8.1-beta.21 → 1.8.1-beta.23

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 ActionClientApiAxiosParamCreator = 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, 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);
@@ -120,13 +121,19 @@ var ActionClientApiAxiosParamCreator = function (configuration) {
120
121
  localVarQueryParameter = {};
121
122
  // authentication bearer required
122
123
  // http bearer authentication required
123
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
124
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
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.
127
+ ];
124
128
  case 1:
125
129
  // authentication bearer required
126
130
  // http bearer authentication required
127
- _a.sent();
128
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
129
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
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) {
136
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
130
137
  }
131
138
  localVarHeaderParameter['Content-Type'] = 'application/json';
132
139
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -152,9 +159,10 @@ var ActionClientApiAxiosParamCreator = function (configuration) {
152
159
  deleteAction: function (code, authorization, options) {
153
160
  if (options === void 0) { options = {}; }
154
161
  return __awaiter(_this, void 0, void 0, function () {
155
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
156
- return __generator(this, function (_a) {
157
- 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) {
158
166
  case 0:
159
167
  // verify required parameter 'code' is not null or undefined
160
168
  (0, common_1.assertParamExists)('deleteAction', 'code', code);
@@ -170,13 +178,19 @@ var ActionClientApiAxiosParamCreator = function (configuration) {
170
178
  localVarQueryParameter = {};
171
179
  // authentication bearer required
172
180
  // http bearer authentication required
173
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
181
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
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.
184
+ ];
174
185
  case 1:
175
186
  // authentication bearer required
176
187
  // http bearer authentication required
177
- _a.sent();
178
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
179
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
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) {
193
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
180
194
  }
181
195
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
182
196
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -200,9 +214,10 @@ var ActionClientApiAxiosParamCreator = function (configuration) {
200
214
  deleteActionVersion: function (versionCode, authorization, options) {
201
215
  if (options === void 0) { options = {}; }
202
216
  return __awaiter(_this, void 0, void 0, function () {
203
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
204
- return __generator(this, function (_a) {
205
- 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) {
206
221
  case 0:
207
222
  // verify required parameter 'versionCode' is not null or undefined
208
223
  (0, common_1.assertParamExists)('deleteActionVersion', 'versionCode', versionCode);
@@ -218,13 +233,19 @@ var ActionClientApiAxiosParamCreator = function (configuration) {
218
233
  localVarQueryParameter = {};
219
234
  // authentication bearer required
220
235
  // http bearer authentication required
221
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
236
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
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.
239
+ ];
222
240
  case 1:
223
241
  // authentication bearer required
224
242
  // http bearer authentication required
225
- _a.sent();
226
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
227
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
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) {
248
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
228
249
  }
229
250
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
230
251
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -249,9 +270,10 @@ var ActionClientApiAxiosParamCreator = function (configuration) {
249
270
  getAction: function (code, authorization, expand, options) {
250
271
  if (options === void 0) { options = {}; }
251
272
  return __awaiter(_this, void 0, void 0, function () {
252
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
253
- return __generator(this, function (_a) {
254
- 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) {
255
277
  case 0:
256
278
  // verify required parameter 'code' is not null or undefined
257
279
  (0, common_1.assertParamExists)('getAction', 'code', code);
@@ -271,12 +293,15 @@ var ActionClientApiAxiosParamCreator = function (configuration) {
271
293
  case 1:
272
294
  // authentication bearer required
273
295
  // http bearer authentication required
274
- _a.sent();
296
+ _b.sent();
275
297
  if (expand !== undefined) {
276
298
  localVarQueryParameter['expand'] = expand;
277
299
  }
278
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
279
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
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) {
304
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
280
305
  }
281
306
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
282
307
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -301,9 +326,10 @@ var ActionClientApiAxiosParamCreator = function (configuration) {
301
326
  getActionExecutionStatus: function (authorization, executionCode, correlationId, options) {
302
327
  if (options === void 0) { options = {}; }
303
328
  return __awaiter(_this, void 0, void 0, function () {
304
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
305
- return __generator(this, function (_a) {
306
- 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) {
307
333
  case 0:
308
334
  localVarPath = "/actionservice/v1/actions/executions/status";
309
335
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -320,15 +346,18 @@ var ActionClientApiAxiosParamCreator = function (configuration) {
320
346
  case 1:
321
347
  // authentication bearer required
322
348
  // http bearer authentication required
323
- _a.sent();
349
+ _b.sent();
324
350
  if (executionCode !== undefined) {
325
351
  localVarQueryParameter['executionCode'] = executionCode;
326
352
  }
327
353
  if (correlationId !== undefined) {
328
354
  localVarQueryParameter['correlationId'] = correlationId;
329
355
  }
330
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
331
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
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) {
360
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
332
361
  }
333
362
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
334
363
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -353,9 +382,10 @@ var ActionClientApiAxiosParamCreator = function (configuration) {
353
382
  getActionVersion: function (versionCode, authorization, expand, options) {
354
383
  if (options === void 0) { options = {}; }
355
384
  return __awaiter(_this, void 0, void 0, function () {
356
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
357
- return __generator(this, function (_a) {
358
- switch (_a.label) {
385
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
386
+ var _a;
387
+ return __generator(this, function (_b) {
388
+ switch (_b.label) {
359
389
  case 0:
360
390
  // verify required parameter 'versionCode' is not null or undefined
361
391
  (0, common_1.assertParamExists)('getActionVersion', 'versionCode', versionCode);
@@ -375,12 +405,15 @@ var ActionClientApiAxiosParamCreator = function (configuration) {
375
405
  case 1:
376
406
  // authentication bearer required
377
407
  // http bearer authentication required
378
- _a.sent();
408
+ _b.sent();
379
409
  if (expand !== undefined) {
380
410
  localVarQueryParameter['expand'] = expand;
381
411
  }
382
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
383
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
412
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
413
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
414
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
415
+ if (authorizationValue || authorizationKeepEmpty) {
416
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
384
417
  }
385
418
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
386
419
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -410,9 +443,10 @@ var ActionClientApiAxiosParamCreator = function (configuration) {
410
443
  listActionExecutions: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
411
444
  if (options === void 0) { options = {}; }
412
445
  return __awaiter(_this, void 0, void 0, function () {
413
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
414
- return __generator(this, function (_a) {
415
- switch (_a.label) {
446
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
447
+ var _a;
448
+ return __generator(this, function (_b) {
449
+ switch (_b.label) {
416
450
  case 0:
417
451
  localVarPath = "/actionservice/v1/actions/executions";
418
452
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -429,7 +463,7 @@ var ActionClientApiAxiosParamCreator = function (configuration) {
429
463
  case 1:
430
464
  // authentication bearer required
431
465
  // http bearer authentication required
432
- _a.sent();
466
+ _b.sent();
433
467
  if (pageSize !== undefined) {
434
468
  localVarQueryParameter['pageSize'] = pageSize;
435
469
  }
@@ -451,8 +485,11 @@ var ActionClientApiAxiosParamCreator = function (configuration) {
451
485
  if (filters !== undefined) {
452
486
  localVarQueryParameter['filters'] = filters;
453
487
  }
454
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
455
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
488
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
489
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
490
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
491
+ if (authorizationValue || authorizationKeepEmpty) {
492
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
456
493
  }
457
494
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
458
495
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -483,9 +520,10 @@ var ActionClientApiAxiosParamCreator = function (configuration) {
483
520
  listActionVersions: function (code, authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
484
521
  if (options === void 0) { options = {}; }
485
522
  return __awaiter(_this, void 0, void 0, function () {
486
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
487
- return __generator(this, function (_a) {
488
- switch (_a.label) {
523
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
524
+ var _a;
525
+ return __generator(this, function (_b) {
526
+ switch (_b.label) {
489
527
  case 0:
490
528
  // verify required parameter 'code' is not null or undefined
491
529
  (0, common_1.assertParamExists)('listActionVersions', 'code', code);
@@ -505,7 +543,7 @@ var ActionClientApiAxiosParamCreator = function (configuration) {
505
543
  case 1:
506
544
  // authentication bearer required
507
545
  // http bearer authentication required
508
- _a.sent();
546
+ _b.sent();
509
547
  if (pageSize !== undefined) {
510
548
  localVarQueryParameter['pageSize'] = pageSize;
511
549
  }
@@ -527,8 +565,11 @@ var ActionClientApiAxiosParamCreator = function (configuration) {
527
565
  if (filters !== undefined) {
528
566
  localVarQueryParameter['filters'] = filters;
529
567
  }
530
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
531
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
568
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
569
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
570
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
571
+ if (authorizationValue || authorizationKeepEmpty) {
572
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
532
573
  }
533
574
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
534
575
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -558,9 +599,10 @@ var ActionClientApiAxiosParamCreator = function (configuration) {
558
599
  listActions: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
559
600
  if (options === void 0) { options = {}; }
560
601
  return __awaiter(_this, void 0, void 0, function () {
561
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
562
- return __generator(this, function (_a) {
563
- switch (_a.label) {
602
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
603
+ var _a;
604
+ return __generator(this, function (_b) {
605
+ switch (_b.label) {
564
606
  case 0:
565
607
  localVarPath = "/actionservice/v1/actions";
566
608
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -577,7 +619,7 @@ var ActionClientApiAxiosParamCreator = function (configuration) {
577
619
  case 1:
578
620
  // authentication bearer required
579
621
  // http bearer authentication required
580
- _a.sent();
622
+ _b.sent();
581
623
  if (pageSize !== undefined) {
582
624
  localVarQueryParameter['pageSize'] = pageSize;
583
625
  }
@@ -599,8 +641,11 @@ var ActionClientApiAxiosParamCreator = function (configuration) {
599
641
  if (filters !== undefined) {
600
642
  localVarQueryParameter['filters'] = filters;
601
643
  }
602
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
603
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
644
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
645
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
646
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
647
+ if (authorizationValue || authorizationKeepEmpty) {
648
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
604
649
  }
605
650
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
606
651
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -630,9 +675,10 @@ var ActionClientApiAxiosParamCreator = function (configuration) {
630
675
  listAllActionVersions: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
631
676
  if (options === void 0) { options = {}; }
632
677
  return __awaiter(_this, void 0, void 0, function () {
633
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
634
- return __generator(this, function (_a) {
635
- switch (_a.label) {
678
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
679
+ var _a;
680
+ return __generator(this, function (_b) {
681
+ switch (_b.label) {
636
682
  case 0:
637
683
  localVarPath = "/actionservice/v1/actions/versions";
638
684
  localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -649,7 +695,7 @@ var ActionClientApiAxiosParamCreator = function (configuration) {
649
695
  case 1:
650
696
  // authentication bearer required
651
697
  // http bearer authentication required
652
- _a.sent();
698
+ _b.sent();
653
699
  if (pageSize !== undefined) {
654
700
  localVarQueryParameter['pageSize'] = pageSize;
655
701
  }
@@ -671,8 +717,11 @@ var ActionClientApiAxiosParamCreator = function (configuration) {
671
717
  if (filters !== undefined) {
672
718
  localVarQueryParameter['filters'] = filters;
673
719
  }
674
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
675
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
720
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
721
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
722
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
723
+ if (authorizationValue || authorizationKeepEmpty) {
724
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
676
725
  }
677
726
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
678
727
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -696,9 +745,10 @@ var ActionClientApiAxiosParamCreator = function (configuration) {
696
745
  triggerAction: function (triggerActionRequestDto, authorization, options) {
697
746
  if (options === void 0) { options = {}; }
698
747
  return __awaiter(_this, void 0, void 0, function () {
699
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
700
- return __generator(this, function (_a) {
701
- switch (_a.label) {
748
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
749
+ var _a;
750
+ return __generator(this, function (_b) {
751
+ switch (_b.label) {
702
752
  case 0:
703
753
  // verify required parameter 'triggerActionRequestDto' is not null or undefined
704
754
  (0, common_1.assertParamExists)('triggerAction', 'triggerActionRequestDto', triggerActionRequestDto);
@@ -713,13 +763,19 @@ var ActionClientApiAxiosParamCreator = function (configuration) {
713
763
  localVarQueryParameter = {};
714
764
  // authentication bearer required
715
765
  // http bearer authentication required
716
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
766
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
767
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
768
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
769
+ ];
717
770
  case 1:
718
771
  // authentication bearer required
719
772
  // http bearer authentication required
720
- _a.sent();
721
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
722
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
773
+ _b.sent();
774
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
775
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
776
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
777
+ if (authorizationValue || authorizationKeepEmpty) {
778
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
723
779
  }
724
780
  localVarHeaderParameter['Content-Type'] = 'application/json';
725
781
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -746,9 +802,10 @@ var ActionClientApiAxiosParamCreator = function (configuration) {
746
802
  updateAction: function (code, updateActionRequestDto, authorization, options) {
747
803
  if (options === void 0) { options = {}; }
748
804
  return __awaiter(_this, void 0, void 0, function () {
749
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
750
- return __generator(this, function (_a) {
751
- switch (_a.label) {
805
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationIsAuth, authorizationValue, authorizationKeepEmpty, headersFromBaseOptions;
806
+ var _a;
807
+ return __generator(this, function (_b) {
808
+ switch (_b.label) {
752
809
  case 0:
753
810
  // verify required parameter 'code' is not null or undefined
754
811
  (0, common_1.assertParamExists)('updateAction', 'code', code);
@@ -766,13 +823,19 @@ var ActionClientApiAxiosParamCreator = function (configuration) {
766
823
  localVarQueryParameter = {};
767
824
  // authentication bearer required
768
825
  // http bearer authentication required
769
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
826
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
827
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
828
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
829
+ ];
770
830
  case 1:
771
831
  // authentication bearer required
772
832
  // http bearer authentication required
773
- _a.sent();
774
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
775
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
833
+ _b.sent();
834
+ authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
835
+ authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
836
+ authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !((_a = baseOptions === null || baseOptions === void 0 ? void 0 : baseOptions.headers) === null || _a === void 0 ? void 0 : _a['X-Emil-Account']);
837
+ if (authorizationValue || authorizationKeepEmpty) {
838
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
776
839
  }
777
840
  localVarHeaderParameter['Content-Type'] = 'application/json';
778
841
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -1273,7 +1336,7 @@ var ActionClientApi = /** @class */ (function (_super) {
1273
1336
  */
1274
1337
  ActionClientApi.prototype.createAction = function (requestParameters, options) {
1275
1338
  var _this = this;
1276
- return (0, exports.ActionClientApiFp)(this.configuration).createAction(requestParameters.createActionRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1339
+ return (0, exports.ActionClientApiFp)(this.configuration).createAction(requestParameters.createActionRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1277
1340
  };
1278
1341
  /**
1279
1342
  * Deletes an action configuration by its code **Required Permissions** \"action-management.actions.delete\"
@@ -1285,7 +1348,7 @@ var ActionClientApi = /** @class */ (function (_super) {
1285
1348
  */
1286
1349
  ActionClientApi.prototype.deleteAction = function (requestParameters, options) {
1287
1350
  var _this = this;
1288
- return (0, exports.ActionClientApiFp)(this.configuration).deleteAction(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1351
+ return (0, exports.ActionClientApiFp)(this.configuration).deleteAction(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1289
1352
  };
1290
1353
  /**
1291
1354
  * Deletes a specific action version by its version code **Required Permissions** \"action-management.actions.delete\"
@@ -1297,7 +1360,7 @@ var ActionClientApi = /** @class */ (function (_super) {
1297
1360
  */
1298
1361
  ActionClientApi.prototype.deleteActionVersion = function (requestParameters, options) {
1299
1362
  var _this = this;
1300
- return (0, exports.ActionClientApiFp)(this.configuration).deleteActionVersion(requestParameters.versionCode, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1363
+ return (0, exports.ActionClientApiFp)(this.configuration).deleteActionVersion(requestParameters.versionCode, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1301
1364
  };
1302
1365
  /**
1303
1366
  * Retrieves an action configuration by its code **Required Permissions** \"action-management.actions.view\"
@@ -1309,7 +1372,7 @@ var ActionClientApi = /** @class */ (function (_super) {
1309
1372
  */
1310
1373
  ActionClientApi.prototype.getAction = function (requestParameters, options) {
1311
1374
  var _this = this;
1312
- return (0, exports.ActionClientApiFp)(this.configuration).getAction(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
1375
+ return (0, exports.ActionClientApiFp)(this.configuration).getAction(requestParameters.code, requestParameters.authorization, requestParameters.expand, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1313
1376
  };
1314
1377
  /**
1315
1378
  * Retrieves the latest action execution status by executionCode or correlationId **Required Permissions** \"action-management.actions.view\"
@@ -1322,7 +1385,7 @@ var ActionClientApi = /** @class */ (function (_super) {
1322
1385
  ActionClientApi.prototype.getActionExecutionStatus = function (requestParameters, options) {
1323
1386
  var _this = this;
1324
1387
  if (requestParameters === void 0) { requestParameters = {}; }
1325
- return (0, exports.ActionClientApiFp)(this.configuration).getActionExecutionStatus(requestParameters.authorization, requestParameters.executionCode, requestParameters.correlationId, options).then(function (request) { return request(_this.axios, _this.basePath); });
1388
+ return (0, exports.ActionClientApiFp)(this.configuration).getActionExecutionStatus(requestParameters.authorization, requestParameters.executionCode, requestParameters.correlationId, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1326
1389
  };
1327
1390
  /**
1328
1391
  * Gets a specific action version by its version code **Required Permissions** \"action-management.actions.view\"
@@ -1334,7 +1397,7 @@ var ActionClientApi = /** @class */ (function (_super) {
1334
1397
  */
1335
1398
  ActionClientApi.prototype.getActionVersion = function (requestParameters, options) {
1336
1399
  var _this = this;
1337
- return (0, exports.ActionClientApiFp)(this.configuration).getActionVersion(requestParameters.versionCode, requestParameters.authorization, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
1400
+ return (0, exports.ActionClientApiFp)(this.configuration).getActionVersion(requestParameters.versionCode, requestParameters.authorization, requestParameters.expand, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1338
1401
  };
1339
1402
  /**
1340
1403
  * Lists action executions (latest status per execution only) with optional filters **Required Permissions** \"action-management.actions.view\"
@@ -1347,7 +1410,7 @@ var ActionClientApi = /** @class */ (function (_super) {
1347
1410
  ActionClientApi.prototype.listActionExecutions = function (requestParameters, options) {
1348
1411
  var _this = this;
1349
1412
  if (requestParameters === void 0) { requestParameters = {}; }
1350
- return (0, exports.ActionClientApiFp)(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); });
1413
+ return (0, exports.ActionClientApiFp)(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); });
1351
1414
  };
1352
1415
  /**
1353
1416
  * Lists all versions for an action by code **Required Permissions** \"action-management.actions.view\"
@@ -1359,7 +1422,7 @@ var ActionClientApi = /** @class */ (function (_super) {
1359
1422
  */
1360
1423
  ActionClientApi.prototype.listActionVersions = function (requestParameters, options) {
1361
1424
  var _this = this;
1362
- return (0, exports.ActionClientApiFp)(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); });
1425
+ return (0, exports.ActionClientApiFp)(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); });
1363
1426
  };
1364
1427
  /**
1365
1428
  * Lists all action configurations with optional filters **Required Permissions** \"action-management.actions.view\"
@@ -1372,7 +1435,7 @@ var ActionClientApi = /** @class */ (function (_super) {
1372
1435
  ActionClientApi.prototype.listActions = function (requestParameters, options) {
1373
1436
  var _this = this;
1374
1437
  if (requestParameters === void 0) { requestParameters = {}; }
1375
- return (0, exports.ActionClientApiFp)(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); });
1438
+ return (0, exports.ActionClientApiFp)(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); });
1376
1439
  };
1377
1440
  /**
1378
1441
  * 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\"
@@ -1385,7 +1448,7 @@ var ActionClientApi = /** @class */ (function (_super) {
1385
1448
  ActionClientApi.prototype.listAllActionVersions = function (requestParameters, options) {
1386
1449
  var _this = this;
1387
1450
  if (requestParameters === void 0) { requestParameters = {}; }
1388
- return (0, exports.ActionClientApiFp)(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); });
1451
+ return (0, exports.ActionClientApiFp)(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); });
1389
1452
  };
1390
1453
  /**
1391
1454
  * 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\"
@@ -1397,7 +1460,7 @@ var ActionClientApi = /** @class */ (function (_super) {
1397
1460
  */
1398
1461
  ActionClientApi.prototype.triggerAction = function (requestParameters, options) {
1399
1462
  var _this = this;
1400
- return (0, exports.ActionClientApiFp)(this.configuration).triggerAction(requestParameters.triggerActionRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1463
+ return (0, exports.ActionClientApiFp)(this.configuration).triggerAction(requestParameters.triggerActionRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1401
1464
  };
1402
1465
  /**
1403
1466
  * Updates an existing action configuration (patch semantics) **Required Permissions** \"action-management.actions.update\"
@@ -1409,7 +1472,7 @@ var ActionClientApi = /** @class */ (function (_super) {
1409
1472
  */
1410
1473
  ActionClientApi.prototype.updateAction = function (requestParameters, options) {
1411
1474
  var _this = this;
1412
- return (0, exports.ActionClientApiFp)(this.configuration).updateAction(requestParameters.code, requestParameters.updateActionRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1475
+ return (0, exports.ActionClientApiFp)(this.configuration).updateAction(requestParameters.code, requestParameters.updateActionRequestDto, requestParameters.authorization, this.withOwner(options)).then(function (request) { return request(_this.axios, _this.basePath); });
1413
1476
  };
1414
1477
  return ActionClientApi;
1415
1478
  }(base_1.BaseAPI));