@emilgroup/public-api-sdk 1.40.1-beta.28 → 1.40.1-beta.29

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.
Files changed (47) hide show
  1. package/README.md +2 -2
  2. package/api/address-completions-validations-api.ts +16 -6
  3. package/api/booking-funnels-api.ts +8 -3
  4. package/api/documents-api.ts +56 -21
  5. package/api/health-api.ts +1 -1
  6. package/api/ibanvalidator-api.ts +8 -3
  7. package/api/leads-api.ts +64 -24
  8. package/api/named-ranges-api.ts +8 -3
  9. package/api/notifications-api.ts +24 -9
  10. package/api/partners-api.ts +8 -3
  11. package/api/payments-setup-api.ts +60 -20
  12. package/api/product-versions-api.ts +32 -12
  13. package/api/products-api.ts +72 -27
  14. package/base.ts +239 -43
  15. package/common.ts +3 -2
  16. package/configuration.ts +20 -0
  17. package/dist/api/address-completions-validations-api.d.ts +2 -2
  18. package/dist/api/address-completions-validations-api.js +22 -14
  19. package/dist/api/booking-funnels-api.d.ts +1 -1
  20. package/dist/api/booking-funnels-api.js +11 -7
  21. package/dist/api/documents-api.d.ts +7 -7
  22. package/dist/api/documents-api.js +93 -53
  23. package/dist/api/health-api.d.ts +1 -1
  24. package/dist/api/health-api.js +1 -1
  25. package/dist/api/ibanvalidator-api.d.ts +1 -1
  26. package/dist/api/ibanvalidator-api.js +15 -8
  27. package/dist/api/leads-api.d.ts +8 -8
  28. package/dist/api/leads-api.js +120 -64
  29. package/dist/api/named-ranges-api.d.ts +1 -1
  30. package/dist/api/named-ranges-api.js +11 -7
  31. package/dist/api/notifications-api.d.ts +3 -3
  32. package/dist/api/notifications-api.js +45 -24
  33. package/dist/api/partners-api.d.ts +1 -1
  34. package/dist/api/partners-api.js +15 -8
  35. package/dist/api/payments-setup-api.d.ts +4 -4
  36. package/dist/api/payments-setup-api.js +80 -40
  37. package/dist/api/product-versions-api.d.ts +4 -4
  38. package/dist/api/product-versions-api.js +56 -31
  39. package/dist/api/products-api.d.ts +9 -9
  40. package/dist/api/products-api.js +119 -68
  41. package/dist/base.d.ts +26 -0
  42. package/dist/base.js +243 -60
  43. package/dist/common.d.ts +1 -1
  44. package/dist/common.js +1 -0
  45. package/dist/configuration.d.ts +17 -0
  46. package/dist/configuration.js +2 -0
  47. 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/public-api-sdk@1.40.1-beta.28 --save
20
+ npm install @emilgroup/public-api-sdk@1.40.1-beta.29 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/public-api-sdk@1.40.1-beta.28
24
+ yarn add @emilgroup/public-api-sdk@1.40.1-beta.29
25
25
  ```
26
26
 
27
27
  And then you can import `PublicApi`.
@@ -73,8 +73,13 @@ export const AddressCompletionsValidationsApiAxiosParamCreator = function (confi
73
73
  localVarQueryParameter['limit'] = limit;
74
74
  }
75
75
 
76
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
77
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
76
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
77
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
78
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
79
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
80
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
81
+ if (authorizationValue || authorizationKeepEmpty) {
82
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
78
83
  }
79
84
 
80
85
 
@@ -159,8 +164,13 @@ export const AddressCompletionsValidationsApiAxiosParamCreator = function (confi
159
164
  localVarQueryParameter['limit'] = limit;
160
165
  }
161
166
 
162
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
163
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
167
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
168
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
169
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
170
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
171
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
172
+ if (authorizationValue || authorizationKeepEmpty) {
173
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
164
174
  }
165
175
 
166
176
 
@@ -373,7 +383,7 @@ export class AddressCompletionsValidationsApi extends BaseAPI {
373
383
  * @memberof AddressCompletionsValidationsApi
374
384
  */
375
385
  public listAddressCompletions(requestParameters: AddressCompletionsValidationsApiListAddressCompletionsRequest, options?: AxiosRequestConfig) {
376
- return AddressCompletionsValidationsApiFp(this.configuration).listAddressCompletions(requestParameters.partialAddress, requestParameters.authorization, requestParameters.country, requestParameters.limit, options).then((request) => request(this.axios, this.basePath));
386
+ return AddressCompletionsValidationsApiFp(this.configuration).listAddressCompletions(requestParameters.partialAddress, requestParameters.authorization, requestParameters.country, requestParameters.limit, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
377
387
  }
378
388
 
379
389
  /**
@@ -385,6 +395,6 @@ export class AddressCompletionsValidationsApi extends BaseAPI {
385
395
  * @memberof AddressCompletionsValidationsApi
386
396
  */
387
397
  public validateAddress(requestParameters: AddressCompletionsValidationsApiValidateAddressRequest, options?: AxiosRequestConfig) {
388
- return AddressCompletionsValidationsApiFp(this.configuration).validateAddress(requestParameters.city, requestParameters.country, requestParameters.postalCode, requestParameters.street, requestParameters.houseNumber, requestParameters.authorization, requestParameters.completeAddress, requestParameters.limit, options).then((request) => request(this.axios, this.basePath));
398
+ return AddressCompletionsValidationsApiFp(this.configuration).validateAddress(requestParameters.city, requestParameters.country, requestParameters.postalCode, requestParameters.street, requestParameters.houseNumber, requestParameters.authorization, requestParameters.completeAddress, requestParameters.limit, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
389
399
  }
390
400
  }
@@ -63,8 +63,13 @@ export const BookingFunnelsApiAxiosParamCreator = function (configuration?: Conf
63
63
  localVarQueryParameter['language'] = language;
64
64
  }
65
65
 
66
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
67
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
66
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
67
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
68
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
69
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
70
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
71
+ if (authorizationValue || authorizationKeepEmpty) {
72
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
68
73
  }
69
74
 
70
75
 
@@ -170,6 +175,6 @@ export class BookingFunnelsApi extends BaseAPI {
170
175
  * @memberof BookingFunnelsApi
171
176
  */
172
177
  public getBookingFunnel(requestParameters: BookingFunnelsApiGetBookingFunnelRequest, options?: AxiosRequestConfig) {
173
- return BookingFunnelsApiFp(this.configuration).getBookingFunnel(requestParameters.code, requestParameters.authorization, requestParameters.language, options).then((request) => request(this.axios, this.basePath));
178
+ return BookingFunnelsApiFp(this.configuration).getBookingFunnel(requestParameters.code, requestParameters.authorization, requestParameters.language, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
174
179
  }
175
180
  }
@@ -69,8 +69,13 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
69
69
  // http bearer authentication required
70
70
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
71
71
 
72
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
73
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
72
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
73
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
74
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
75
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
76
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
77
+ if (authorizationValue || authorizationKeepEmpty) {
78
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
74
79
  }
75
80
 
76
81
 
@@ -121,8 +126,13 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
121
126
  // http bearer authentication required
122
127
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
123
128
 
124
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
125
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
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
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
132
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
133
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
134
+ if (authorizationValue || authorizationKeepEmpty) {
135
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
126
136
  }
127
137
 
128
138
 
@@ -166,8 +176,13 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
166
176
  // http bearer authentication required
167
177
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
168
178
 
169
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
170
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
179
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
180
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
181
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
182
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
183
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
184
+ if (authorizationValue || authorizationKeepEmpty) {
185
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
171
186
  }
172
187
 
173
188
 
@@ -220,8 +235,13 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
220
235
  localVarQueryParameter['contentDisposition'] = contentDisposition;
221
236
  }
222
237
 
223
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
224
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
238
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
239
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
240
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
241
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
242
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
243
+ if (authorizationValue || authorizationKeepEmpty) {
244
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
225
245
  }
226
246
 
227
247
 
@@ -288,8 +308,13 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
288
308
  localVarQueryParameter['expand'] = expand;
289
309
  }
290
310
 
291
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
292
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
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
 
@@ -368,8 +393,13 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
368
393
  localVarQueryParameter['filters'] = filters;
369
394
  }
370
395
 
371
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
372
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
396
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
397
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
398
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
399
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
400
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
401
+ if (authorizationValue || authorizationKeepEmpty) {
402
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
373
403
  }
374
404
 
375
405
 
@@ -412,8 +442,13 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
412
442
  // http bearer authentication required
413
443
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
414
444
 
415
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
416
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
445
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
446
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
447
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
448
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
449
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
450
+ if (authorizationValue || authorizationKeepEmpty) {
451
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
417
452
  }
418
453
 
419
454
 
@@ -903,7 +938,7 @@ export class DocumentsApi extends BaseAPI {
903
938
  * @memberof DocumentsApi
904
939
  */
905
940
  public createTemporaryDocument(requestParameters: DocumentsApiCreateTemporaryDocumentRequest, options?: AxiosRequestConfig) {
906
- return DocumentsApiFp(this.configuration).createTemporaryDocument(requestParameters.createDocumentRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
941
+ return DocumentsApiFp(this.configuration).createTemporaryDocument(requestParameters.createDocumentRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
907
942
  }
908
943
 
909
944
  /**
@@ -915,7 +950,7 @@ export class DocumentsApi extends BaseAPI {
915
950
  * @memberof DocumentsApi
916
951
  */
917
952
  public deleteDocuments(requestParameters: DocumentsApiDeleteDocumentsRequest, options?: AxiosRequestConfig) {
918
- return DocumentsApiFp(this.configuration).deleteDocuments(requestParameters.leadCode, requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
953
+ return DocumentsApiFp(this.configuration).deleteDocuments(requestParameters.leadCode, requestParameters.code, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
919
954
  }
920
955
 
921
956
  /**
@@ -927,7 +962,7 @@ export class DocumentsApi extends BaseAPI {
927
962
  * @memberof DocumentsApi
928
963
  */
929
964
  public downloadDocument(requestParameters: DocumentsApiDownloadDocumentRequest, options?: AxiosRequestConfig) {
930
- return DocumentsApiFp(this.configuration).downloadDocument(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
965
+ return DocumentsApiFp(this.configuration).downloadDocument(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
931
966
  }
932
967
 
933
968
  /**
@@ -939,7 +974,7 @@ export class DocumentsApi extends BaseAPI {
939
974
  * @memberof DocumentsApi
940
975
  */
941
976
  public downloadProductDocumentUrl(requestParameters: DocumentsApiDownloadProductDocumentUrlRequest, options?: AxiosRequestConfig) {
942
- return DocumentsApiFp(this.configuration).downloadProductDocumentUrl(requestParameters.productCode, requestParameters.code, requestParameters.authorization, requestParameters.contentDisposition, options).then((request) => request(this.axios, this.basePath));
977
+ return DocumentsApiFp(this.configuration).downloadProductDocumentUrl(requestParameters.productCode, requestParameters.code, requestParameters.authorization, requestParameters.contentDisposition, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
943
978
  }
944
979
 
945
980
  /**
@@ -951,7 +986,7 @@ export class DocumentsApi extends BaseAPI {
951
986
  * @memberof DocumentsApi
952
987
  */
953
988
  public listDocuments(requestParameters: DocumentsApiListDocumentsRequest, options?: AxiosRequestConfig) {
954
- return DocumentsApiFp(this.configuration).listDocuments(requestParameters.filter, requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.order, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
989
+ return DocumentsApiFp(this.configuration).listDocuments(requestParameters.filter, requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.order, requestParameters.expand, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
955
990
  }
956
991
 
957
992
  /**
@@ -963,7 +998,7 @@ export class DocumentsApi extends BaseAPI {
963
998
  * @memberof DocumentsApi
964
999
  */
965
1000
  public listProductDocuments(requestParameters: DocumentsApiListProductDocumentsRequest, options?: AxiosRequestConfig) {
966
- return DocumentsApiFp(this.configuration).listProductDocuments(requestParameters.productCode, requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
1001
+ return DocumentsApiFp(this.configuration).listProductDocuments(requestParameters.productCode, 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));
967
1002
  }
968
1003
 
969
1004
  /**
@@ -975,6 +1010,6 @@ export class DocumentsApi extends BaseAPI {
975
1010
  * @memberof DocumentsApi
976
1011
  */
977
1012
  public preSignedPost(requestParameters: DocumentsApiPreSignedPostRequest, options?: AxiosRequestConfig) {
978
- return DocumentsApiFp(this.configuration).preSignedPost(requestParameters.createPresignedPostRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1013
+ return DocumentsApiFp(this.configuration).preSignedPost(requestParameters.createPresignedPostRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
979
1014
  }
980
1015
  }
package/api/health-api.ts CHANGED
@@ -115,6 +115,6 @@ export class HealthApi extends BaseAPI {
115
115
  * @memberof HealthApi
116
116
  */
117
117
  public check(options?: AxiosRequestConfig) {
118
- return HealthApiFp(this.configuration).check(options).then((request) => request(this.axios, this.basePath));
118
+ return HealthApiFp(this.configuration).check(this.withOwner(options)).then((request) => request(this.axios, this.basePath));
119
119
  }
120
120
  }
@@ -59,8 +59,13 @@ export const IBANValidatorApiAxiosParamCreator = function (configuration?: Confi
59
59
  // http bearer authentication required
60
60
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
61
61
 
62
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
63
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
62
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
63
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
64
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
65
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
66
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
67
+ if (authorizationValue || authorizationKeepEmpty) {
68
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
64
69
  }
65
70
 
66
71
 
@@ -160,6 +165,6 @@ export class IBANValidatorApi extends BaseAPI {
160
165
  * @memberof IBANValidatorApi
161
166
  */
162
167
  public validateIban(requestParameters: IBANValidatorApiValidateIbanRequest, options?: AxiosRequestConfig) {
163
- return IBANValidatorApiFp(this.configuration).validateIban(requestParameters.validateIbanRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
168
+ return IBANValidatorApiFp(this.configuration).validateIban(requestParameters.validateIbanRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
164
169
  }
165
170
  }
package/api/leads-api.ts CHANGED
@@ -69,8 +69,13 @@ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration
69
69
  // http bearer authentication required
70
70
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
71
71
 
72
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
73
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
72
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
73
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
74
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
75
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
76
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
77
+ if (authorizationValue || authorizationKeepEmpty) {
78
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
74
79
  }
75
80
 
76
81
 
@@ -116,8 +121,13 @@ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration
116
121
  // http bearer authentication required
117
122
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
118
123
 
119
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
120
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
124
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
125
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
126
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
127
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
128
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
129
+ if (authorizationValue || authorizationKeepEmpty) {
130
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
121
131
  }
122
132
 
123
133
 
@@ -163,8 +173,13 @@ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration
163
173
  // http bearer authentication required
164
174
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
165
175
 
166
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
167
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
176
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
177
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
178
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
179
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
180
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
181
+ if (authorizationValue || authorizationKeepEmpty) {
182
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
168
183
  }
169
184
 
170
185
 
@@ -211,8 +226,13 @@ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration
211
226
  // http bearer authentication required
212
227
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
213
228
 
214
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
215
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
229
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
230
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
231
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
232
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
233
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
234
+ if (authorizationValue || authorizationKeepEmpty) {
235
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
216
236
  }
217
237
 
218
238
 
@@ -252,8 +272,13 @@ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration
252
272
  // http bearer authentication required
253
273
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
254
274
 
255
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
256
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
275
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
276
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
277
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
278
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
279
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
280
+ if (authorizationValue || authorizationKeepEmpty) {
281
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
257
282
  }
258
283
 
259
284
 
@@ -297,8 +322,13 @@ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration
297
322
  // http bearer authentication required
298
323
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
299
324
 
300
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
301
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
325
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
326
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
327
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
328
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
329
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
330
+ if (authorizationValue || authorizationKeepEmpty) {
331
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
302
332
  }
303
333
 
304
334
 
@@ -345,8 +375,13 @@ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration
345
375
  // http bearer authentication required
346
376
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
347
377
 
348
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
349
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
378
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
379
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
380
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
381
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
382
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
383
+ if (authorizationValue || authorizationKeepEmpty) {
384
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
350
385
  }
351
386
 
352
387
 
@@ -396,8 +431,13 @@ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration
396
431
  // http bearer authentication required
397
432
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
398
433
 
399
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
400
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
434
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
435
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
436
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
437
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
438
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
439
+ if (authorizationValue || authorizationKeepEmpty) {
440
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
401
441
  }
402
442
 
403
443
 
@@ -814,7 +854,7 @@ export class LeadsApi extends BaseAPI {
814
854
  * @memberof LeadsApi
815
855
  */
816
856
  public createLead(requestParameters: LeadsApiCreateLeadRequest, options?: AxiosRequestConfig) {
817
- return LeadsApiFp(this.configuration).createLead(requestParameters.createLeadRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
857
+ return LeadsApiFp(this.configuration).createLead(requestParameters.createLeadRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
818
858
  }
819
859
 
820
860
  /**
@@ -826,7 +866,7 @@ export class LeadsApi extends BaseAPI {
826
866
  * @memberof LeadsApi
827
867
  */
828
868
  public createLeadAsync(requestParameters: LeadsApiCreateLeadAsyncRequest, options?: AxiosRequestConfig) {
829
- return LeadsApiFp(this.configuration).createLeadAsync(requestParameters.createLeadRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
869
+ return LeadsApiFp(this.configuration).createLeadAsync(requestParameters.createLeadRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
830
870
  }
831
871
 
832
872
  /**
@@ -838,7 +878,7 @@ export class LeadsApi extends BaseAPI {
838
878
  * @memberof LeadsApi
839
879
  */
840
880
  public createLeadSync(requestParameters: LeadsApiCreateLeadSyncRequest, options?: AxiosRequestConfig) {
841
- return LeadsApiFp(this.configuration).createLeadSync(requestParameters.createLeadRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
881
+ return LeadsApiFp(this.configuration).createLeadSync(requestParameters.createLeadRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
842
882
  }
843
883
 
844
884
  /**
@@ -850,7 +890,7 @@ export class LeadsApi extends BaseAPI {
850
890
  * @memberof LeadsApi
851
891
  */
852
892
  public getLead(requestParameters: LeadsApiGetLeadRequest, options?: AxiosRequestConfig) {
853
- return LeadsApiFp(this.configuration).getLead(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
893
+ return LeadsApiFp(this.configuration).getLead(requestParameters.code, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
854
894
  }
855
895
 
856
896
  /**
@@ -862,7 +902,7 @@ export class LeadsApi extends BaseAPI {
862
902
  * @memberof LeadsApi
863
903
  */
864
904
  public initiateLead(requestParameters: LeadsApiInitiateLeadRequest = {}, options?: AxiosRequestConfig) {
865
- return LeadsApiFp(this.configuration).initiateLead(requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
905
+ return LeadsApiFp(this.configuration).initiateLead(requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
866
906
  }
867
907
 
868
908
  /**
@@ -874,7 +914,7 @@ export class LeadsApi extends BaseAPI {
874
914
  * @memberof LeadsApi
875
915
  */
876
916
  public initiateLeadWithProduct(requestParameters: LeadsApiInitiateLeadWithProductRequest, options?: AxiosRequestConfig) {
877
- return LeadsApiFp(this.configuration).initiateLeadWithProduct(requestParameters.productSlug, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
917
+ return LeadsApiFp(this.configuration).initiateLeadWithProduct(requestParameters.productSlug, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
878
918
  }
879
919
 
880
920
  /**
@@ -886,7 +926,7 @@ export class LeadsApi extends BaseAPI {
886
926
  * @memberof LeadsApi
887
927
  */
888
928
  public updateLead(requestParameters: LeadsApiUpdateLeadRequest, options?: AxiosRequestConfig) {
889
- return LeadsApiFp(this.configuration).updateLead(requestParameters.code, requestParameters.updateLeadRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
929
+ return LeadsApiFp(this.configuration).updateLead(requestParameters.code, requestParameters.updateLeadRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
890
930
  }
891
931
 
892
932
  /**
@@ -898,6 +938,6 @@ export class LeadsApi extends BaseAPI {
898
938
  * @memberof LeadsApi
899
939
  */
900
940
  public updateLeadSync(requestParameters: LeadsApiUpdateLeadSyncRequest, options?: AxiosRequestConfig) {
901
- return LeadsApiFp(this.configuration).updateLeadSync(requestParameters.code, requestParameters.updateLeadRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
941
+ return LeadsApiFp(this.configuration).updateLeadSync(requestParameters.code, requestParameters.updateLeadRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
902
942
  }
903
943
  }
@@ -98,8 +98,13 @@ export const NamedRangesApiAxiosParamCreator = function (configuration?: Configu
98
98
  localVarQueryParameter['order'] = order;
99
99
  }
100
100
 
101
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
102
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
101
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
102
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
103
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
104
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
105
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
106
+ if (authorizationValue || authorizationKeepEmpty) {
107
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
103
108
  }
104
109
 
105
110
 
@@ -259,6 +264,6 @@ export class NamedRangesApi extends BaseAPI {
259
264
  * @memberof NamedRangesApi
260
265
  */
261
266
  public filterNamedRange(requestParameters: NamedRangesApiFilterNamedRangeRequest, options?: AxiosRequestConfig) {
262
- return NamedRangesApiFp(this.configuration).filterNamedRange(requestParameters.productSlug, requestParameters.name, requestParameters.authorization, requestParameters.productVersionId, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filters, requestParameters.search, requestParameters.order, options).then((request) => request(this.axios, this.basePath));
267
+ return NamedRangesApiFp(this.configuration).filterNamedRange(requestParameters.productSlug, requestParameters.name, requestParameters.authorization, requestParameters.productVersionId, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filters, requestParameters.search, requestParameters.order, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
263
268
  }
264
269
  }
@@ -67,8 +67,13 @@ export const NotificationsApiAxiosParamCreator = function (configuration?: Confi
67
67
  // http bearer authentication required
68
68
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
69
69
 
70
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
71
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
70
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
71
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
72
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
73
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
74
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
75
+ if (authorizationValue || authorizationKeepEmpty) {
76
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
72
77
  }
73
78
 
74
79
 
@@ -114,8 +119,13 @@ export const NotificationsApiAxiosParamCreator = function (configuration?: Confi
114
119
  // http bearer authentication required
115
120
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
116
121
 
117
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
118
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
122
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
123
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
124
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
125
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
126
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
127
+ if (authorizationValue || authorizationKeepEmpty) {
128
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
119
129
  }
120
130
 
121
131
 
@@ -161,8 +171,13 @@ export const NotificationsApiAxiosParamCreator = function (configuration?: Confi
161
171
  // http bearer authentication required
162
172
  await setBearerAuthToObject(localVarHeaderParameter, configuration)
163
173
 
164
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
165
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
174
+ // Only Authorization falls back to the configured token. Without a session it is sent as before, empty when
175
+ // no token is stored, so a refused call still refreshes; a session call (account header) sends none.
176
+ const authorizationIsAuth = 'Authorization'.toLowerCase() === 'authorization';
177
+ const authorizationValue = authorizationIsAuth ? (authorization || baseAccessToken) : authorization;
178
+ const authorizationKeepEmpty = authorizationIsAuth && authorizationValue === '' && !baseOptions?.headers?.['X-Emil-Account'];
179
+ if (authorizationValue || authorizationKeepEmpty) {
180
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
166
181
  }
167
182
 
168
183
 
@@ -350,7 +365,7 @@ export class NotificationsApi extends BaseAPI {
350
365
  * @memberof NotificationsApi
351
366
  */
352
367
  public completeEmailVerification(requestParameters: NotificationsApiCompleteEmailVerificationRequest, options?: AxiosRequestConfig) {
353
- return NotificationsApiFp(this.configuration).completeEmailVerification(requestParameters.completeEmailVerificationDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
368
+ return NotificationsApiFp(this.configuration).completeEmailVerification(requestParameters.completeEmailVerificationDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
354
369
  }
355
370
 
356
371
  /**
@@ -362,7 +377,7 @@ export class NotificationsApi extends BaseAPI {
362
377
  * @memberof NotificationsApi
363
378
  */
364
379
  public initiateEmailVerification(requestParameters: NotificationsApiInitiateEmailVerificationRequest, options?: AxiosRequestConfig) {
365
- return NotificationsApiFp(this.configuration).initiateEmailVerification(requestParameters.initiateEmailVerificationDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
380
+ return NotificationsApiFp(this.configuration).initiateEmailVerification(requestParameters.initiateEmailVerificationDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
366
381
  }
367
382
 
368
383
  /**
@@ -374,6 +389,6 @@ export class NotificationsApi extends BaseAPI {
374
389
  * @memberof NotificationsApi
375
390
  */
376
391
  public sendNotification(requestParameters: NotificationsApiSendNotificationRequest, options?: AxiosRequestConfig) {
377
- return NotificationsApiFp(this.configuration).sendNotification(requestParameters.sendNotificationRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
392
+ return NotificationsApiFp(this.configuration).sendNotification(requestParameters.sendNotificationRequestDto, requestParameters.authorization, this.withOwner(options)).then((request) => request(this.axios, this.basePath));
378
393
  }
379
394
  }