@emilgroup/claim-sdk 1.16.0 → 1.17.2-beta.0
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 +2 -2
- package/base.ts +1 -0
- package/configuration.ts +1 -1
- package/dist/base.js +1 -0
- package/dist/configuration.js +0 -7
- package/package.json +1 -1
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/claim-sdk@1.
|
|
20
|
+
npm install @emilgroup/claim-sdk@1.17.2-beta.0 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/claim-sdk@1.
|
|
24
|
+
yarn add @emilgroup/claim-sdk@1.17.2-beta.0
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import `ClaimsApi`.
|
package/base.ts
CHANGED
|
@@ -87,6 +87,7 @@ export class BaseAPI {
|
|
|
87
87
|
if (configuration) {
|
|
88
88
|
this.configuration = configuration;
|
|
89
89
|
this.basePath = configuration.basePath || this.basePath;
|
|
90
|
+
this.configuration.accessToken = this.tokenData.accessToken ? `Bearer ${this.tokenData.accessToken}` : '';
|
|
90
91
|
} else {
|
|
91
92
|
const { accessToken, username } = this.tokenData;
|
|
92
93
|
|
package/configuration.ts
CHANGED
|
@@ -50,7 +50,7 @@ export class Configuration {
|
|
|
50
50
|
* @param scopes oauth2 scope
|
|
51
51
|
* @memberof Configuration
|
|
52
52
|
*/
|
|
53
|
-
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>)
|
|
53
|
+
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
54
54
|
/**
|
|
55
55
|
* override base path
|
|
56
56
|
*
|
package/dist/base.js
CHANGED
|
@@ -125,6 +125,7 @@ var BaseAPI = /** @class */ (function () {
|
|
|
125
125
|
if (configuration) {
|
|
126
126
|
this.configuration = configuration;
|
|
127
127
|
this.basePath = configuration.basePath || this.basePath;
|
|
128
|
+
this.configuration.accessToken = this.tokenData.accessToken ? "Bearer ".concat(this.tokenData.accessToken) : '';
|
|
128
129
|
}
|
|
129
130
|
else {
|
|
130
131
|
var _a = this.tokenData, accessToken = _a.accessToken, username = _a.username;
|
package/dist/configuration.js
CHANGED
|
@@ -17,13 +17,6 @@ exports.Configuration = void 0;
|
|
|
17
17
|
var Configuration = /** @class */ (function () {
|
|
18
18
|
function Configuration(param) {
|
|
19
19
|
if (param === void 0) { param = {}; }
|
|
20
|
-
/**
|
|
21
|
-
* parameter for oauth2 security
|
|
22
|
-
* @param name security name
|
|
23
|
-
* @param scopes oauth2 scope
|
|
24
|
-
* @memberof Configuration
|
|
25
|
-
*/
|
|
26
|
-
this.accessToken = '';
|
|
27
20
|
this.apiKey = param.apiKey;
|
|
28
21
|
this.username = param.username;
|
|
29
22
|
this.password = param.password;
|