@aurigma/axios-design-atoms-api-client 2.31.8 → 2.33.1

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.
@@ -33,10 +33,19 @@ class ApiClientBase {
33
33
  else {
34
34
  options.headers = { ...options.headers, 'X-API-Key': this.configuration.apiKey };
35
35
  }
36
- options = { ...options, transformResponse: (res) => res, responseType: 'json' };
36
+ options = { ...options, transformResponse: (res) => res };
37
+ if (!options.responseType) {
38
+ options.responseType = 'json';
39
+ }
40
+ if (options.responseType == 'blob') {
41
+ options.responseType = 'arraybuffer';
42
+ }
37
43
  return options;
38
44
  }
39
45
  getBaseUrl(defultUrl) {
46
+ if (this.configuration.apiUrl.endsWith('/')) {
47
+ return this.configuration.apiUrl.slice(0, -1);
48
+ }
40
49
  return this.configuration.apiUrl;
41
50
  }
42
51
  transformResult(url, res, cb) {
@@ -50,7 +59,7 @@ class BuildInfoApiClient extends ApiClientBase {
50
59
  jsonParseReviver = undefined;
51
60
  constructor(configuration, baseUrl, instance) {
52
61
  super(configuration);
53
- this.instance = instance ? instance : axios_1.default.create();
62
+ this.instance = instance ? instance : axios_1.create();
54
63
  this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
55
64
  }
56
65
  /**
@@ -172,7 +181,7 @@ class DesignAtomsCompatibilityApiClient extends ApiClientBase {
172
181
  jsonParseReviver = undefined;
173
182
  constructor(configuration, baseUrl, instance) {
174
183
  super(configuration);
175
- this.instance = instance ? instance : axios_1.default.create();
184
+ this.instance = instance ? instance : axios_1.create();
176
185
  this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
177
186
  }
178
187
  /**
@@ -1754,7 +1763,7 @@ class DesignAtomsImagesApiClient extends ApiClientBase {
1754
1763
  jsonParseReviver = undefined;
1755
1764
  constructor(configuration, baseUrl, instance) {
1756
1765
  super(configuration);
1757
- this.instance = instance ? instance : axios_1.default.create();
1766
+ this.instance = instance ? instance : axios_1.create();
1758
1767
  this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
1759
1768
  }
1760
1769
  /**
@@ -1844,7 +1853,7 @@ class DesignAtomsServiceApiClient extends ApiClientBase {
1844
1853
  jsonParseReviver = undefined;
1845
1854
  constructor(configuration, baseUrl, instance) {
1846
1855
  super(configuration);
1847
- this.instance = instance ? instance : axios_1.default.create();
1856
+ this.instance = instance ? instance : axios_1.create();
1848
1857
  this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
1849
1858
  }
1850
1859
  /**
@@ -3496,7 +3505,7 @@ class DesignAtomsViewerApiClient extends ApiClientBase {
3496
3505
  jsonParseReviver = undefined;
3497
3506
  constructor(configuration, baseUrl, instance) {
3498
3507
  super(configuration);
3499
- this.instance = instance ? instance : axios_1.default.create();
3508
+ this.instance = instance ? instance : axios_1.create();
3500
3509
  this.baseUrl = baseUrl !== undefined && baseUrl !== null ? baseUrl : this.getBaseUrl("");
3501
3510
  }
3502
3511
  /**