1- import type { AxiosInstance , AxiosResponse , AxiosRequestConfig } from 'axios' ;
1+ import type { AxiosInstance , AxiosResponse } from 'axios' ;
22import type { LoginService } from '@administration/src/core/service/login.service' ;
33import type { ApiResponse } from '@administration/src/core/service/api.service' ;
44import type {
@@ -61,16 +61,10 @@ export type LogLevelCounts = {
6161 * @sw -package fundamentals@after-sales
6262 */
6363export default class MigrationApiService extends ApiService {
64- private readonly basicConfig : AxiosRequestConfig & { version : string } ;
65-
6664 constructor ( httpClient : AxiosInstance , loginService : LoginService , apiEndpoint = 'migration' ) {
6765 super ( httpClient , loginService , apiEndpoint ) ;
6866 // @ts -ignore
6967 this . name = MIGRATION_API_SERVICE ;
70- this . basicConfig = {
71- timeout : 30000 ,
72- version : Shopware . Context . api . apiVersion ,
73- } ;
7468 }
7569
7670 async createNewConnection (
@@ -97,7 +91,6 @@ export default class MigrationApiService extends ApiService {
9791 credentialFields,
9892 } ,
9993 {
100- ...this . basicConfig ,
10194 headers,
10295 } ,
10396 )
@@ -124,7 +117,6 @@ export default class MigrationApiService extends ApiService {
124117 credentialFields,
125118 } ,
126119 {
127- ...this . basicConfig ,
128120 headers,
129121 } ,
130122 )
@@ -154,7 +146,6 @@ export default class MigrationApiService extends ApiService {
154146 `_action/${ this . getApiBasePath ( ) } /check-connection` ,
155147 payload ,
156148 {
157- ...this . basicConfig ,
158149 headers,
159150 } ,
160151 )
@@ -175,7 +166,6 @@ export default class MigrationApiService extends ApiService {
175166 this . httpClient
176167 // @ts -ignore
177168 . get ( `_action/${ this . getApiBasePath ( ) } /data-selection` , {
178- ...this . basicConfig ,
179169 params : {
180170 connectionId,
181171 } ,
@@ -198,7 +188,6 @@ export default class MigrationApiService extends ApiService {
198188 `_action/${ this . getApiBasePath ( ) } /generate-premapping` ,
199189 { dataSelectionIds } ,
200190 {
201- ...this . basicConfig ,
202191 headers,
203192 } ,
204193 )
@@ -218,7 +207,6 @@ export default class MigrationApiService extends ApiService {
218207 `_action/${ this . getApiBasePath ( ) } /write-premapping` ,
219208 { premapping } ,
220209 {
221- ...this . basicConfig ,
222210 headers,
223211 } ,
224212 )
@@ -240,7 +228,6 @@ export default class MigrationApiService extends ApiService {
240228 dataSelectionNames,
241229 } ,
242230 {
243- ...this . basicConfig ,
244231 headers,
245232 } ,
246233 )
@@ -258,7 +245,6 @@ export default class MigrationApiService extends ApiService {
258245 this . httpClient
259246 // @ts -ignore
260247 . get ( `_action/${ this . getApiBasePath ( ) } /get-state` , {
261- ...this . basicConfig ,
262248 headers,
263249 } )
264250 . then ( ( response : AxiosResponse ) => {
@@ -278,7 +264,6 @@ export default class MigrationApiService extends ApiService {
278264 `_action/${ this . getApiBasePath ( ) } /approve-finished` ,
279265 { } ,
280266 {
281- ...this . basicConfig ,
282267 headers,
283268 } ,
284269 )
@@ -298,7 +283,6 @@ export default class MigrationApiService extends ApiService {
298283 `_action/${ this . getApiBasePath ( ) } /abort-migration` ,
299284 { } ,
300285 {
301- ...this . basicConfig ,
302286 headers,
303287 } ,
304288 )
@@ -318,7 +302,6 @@ export default class MigrationApiService extends ApiService {
318302 `_action/${ this . getApiBasePath ( ) } /resume-after-fixes` ,
319303 { } ,
320304 {
321- ...this . basicConfig ,
322305 headers,
323306 } ,
324307 )
@@ -336,7 +319,6 @@ export default class MigrationApiService extends ApiService {
336319 this . httpClient
337320 // @ts -ignore
338321 . get ( `_action/${ this . getApiBasePath ( ) } /get-profiles` , {
339- ...this . basicConfig ,
340322 headers,
341323 } )
342324 . then ( ( response : AxiosResponse ) => {
@@ -354,7 +336,6 @@ export default class MigrationApiService extends ApiService {
354336 this . httpClient
355337 // @ts -ignore
356338 . get ( `_action/${ this . getApiBasePath ( ) } /get-gateways` , {
357- ...this . basicConfig ,
358339 params : {
359340 profileName,
360341 } ,
@@ -375,7 +356,6 @@ export default class MigrationApiService extends ApiService {
375356 this . httpClient
376357 // @ts -ignore
377358 . get ( `_action/${ this . getApiBasePath ( ) } /get-profile-information` , {
378- ...this . basicConfig ,
379359 params : {
380360 profileName,
381361 gatewayName,
@@ -401,7 +381,6 @@ export default class MigrationApiService extends ApiService {
401381 this . httpClient
402382 // @ts -ignore
403383 . get ( `_action/${ this . getApiBasePath ( ) } /get-grouped-logs-of-run` , {
404- ...this . basicConfig ,
405384 params : {
406385 runUuid,
407386 } ,
@@ -426,7 +405,6 @@ export default class MigrationApiService extends ApiService {
426405 connectionId,
427406 } ,
428407 {
429- ...this . basicConfig ,
430408 headers,
431409 } ,
432410 )
@@ -445,7 +423,6 @@ export default class MigrationApiService extends ApiService {
445423 `_action/${ this . getApiBasePath ( ) } /cleanup-migration-data` ,
446424 { } ,
447425 {
448- ...this . basicConfig ,
449426 headers,
450427 } ,
451428 ) ;
@@ -462,7 +439,6 @@ export default class MigrationApiService extends ApiService {
462439 `_action/${ this . getApiBasePath ( ) } /download-logs-of-run` ,
463440 { runUuid } ,
464441 {
465- ...this . basicConfig ,
466442 headers,
467443 responseType : 'blob' ,
468444 } ,
@@ -524,7 +500,6 @@ export default class MigrationApiService extends ApiService {
524500 this . httpClient
525501 // @ts -ignore
526502 . get ( `_action/${ this . getApiBasePath ( ) } /get-log-groups` , {
527- ...this . basicConfig ,
528503 params,
529504 headers,
530505 } )
@@ -543,7 +518,6 @@ export default class MigrationApiService extends ApiService {
543518 this . httpClient
544519 // @ts -ignore
545520 . get ( `_action/${ this . getApiBasePath ( ) } /is-resetting-checksums` , {
546- ...this . basicConfig ,
547521 headers,
548522 } )
549523 . then ( ( response : AxiosResponse ) => {
@@ -561,7 +535,6 @@ export default class MigrationApiService extends ApiService {
561535 this . httpClient
562536 // @ts -ignore
563537 . get ( `_action/${ this . getApiBasePath ( ) } /is-truncating-migration-data` , {
564- ...this . basicConfig ,
565538 headers,
566539 } )
567540 . then ( ( response : AxiosResponse ) => {
@@ -594,7 +567,6 @@ export default class MigrationApiService extends ApiService {
594567 connectionId,
595568 } ,
596569 {
597- ...this . basicConfig ,
598570 headers,
599571 } ,
600572 )
@@ -629,7 +601,6 @@ export default class MigrationApiService extends ApiService {
629601 connectionId,
630602 } ,
631603 {
632- ...this . basicConfig ,
633604 headers,
634605 } ,
635606 )
@@ -658,7 +629,6 @@ export default class MigrationApiService extends ApiService {
658629 fieldValue,
659630 } ,
660631 {
661- ...this . basicConfig ,
662632 headers,
663633 } ,
664634 )
@@ -685,7 +655,6 @@ export default class MigrationApiService extends ApiService {
685655 fieldName,
686656 } ,
687657 {
688- ...this . basicConfig ,
689658 headers,
690659 } ,
691660 )
0 commit comments