@emilgroup/document-sdk 1.40.1-beta.3 → 1.40.1-beta.5

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.
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/document-sdk@1.40.1-beta.3 --save
20
+ npm install @emilgroup/document-sdk@1.40.1-beta.5 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/document-sdk@1.40.1-beta.3
24
+ yarn add @emilgroup/document-sdk@1.40.1-beta.5
25
25
  ```
26
26
 
27
27
  And then you can import `DocumentsApi`.
package/base.ts CHANGED
@@ -97,9 +97,14 @@ export class BaseAPI {
97
97
  this.loadTokenData();
98
98
 
99
99
  if (configuration) {
100
+ const { accessToken } = this.tokenData;
100
101
  this.configuration = configuration;
101
102
  this.basePath = configuration.basePath || this.basePath;
102
- this.configuration.accessToken = this.tokenData.accessToken ? `Bearer ${this.tokenData.accessToken}` : '';
103
+
104
+ // Use config token if provided, otherwise use tokenData token
105
+ const configToken = this.configuration.accessToken;
106
+ const storedToken = accessToken ? `Bearer ${accessToken}` : '';
107
+ this.configuration.accessToken = configToken || storedToken;
103
108
  } else {
104
109
  const { accessToken, username } = this.tokenData;
105
110
 
package/dist/base.js CHANGED
@@ -124,9 +124,13 @@ var BaseAPI = /** @class */ (function () {
124
124
  this.axios = axios;
125
125
  this.loadTokenData();
126
126
  if (configuration) {
127
+ var accessToken = this.tokenData.accessToken;
127
128
  this.configuration = configuration;
128
129
  this.basePath = configuration.basePath || this.basePath;
129
- this.configuration.accessToken = this.tokenData.accessToken ? "Bearer ".concat(this.tokenData.accessToken) : '';
130
+ // Use config token if provided, otherwise use tokenData token
131
+ var configToken = this.configuration.accessToken;
132
+ var storedToken = accessToken ? "Bearer ".concat(accessToken) : '';
133
+ this.configuration.accessToken = configToken || storedToken;
130
134
  }
131
135
  else {
132
136
  var _a = this.tokenData, accessToken = _a.accessToken, username = _a.username;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emilgroup/document-sdk",
3
- "version": "1.40.1-beta.3",
3
+ "version": "1.40.1-beta.5",
4
4
  "description": "OpenAPI client for @emilgroup/document-sdk",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [