@emilgroup/public-api-sdk 1.3.0 → 1.4.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 +3 -3
- package/dist/base.d.ts +1 -1
- package/dist/base.js +3 -3
- package/dist/models/product-field-class.d.ts +0 -12
- package/models/product-field-class.ts +0 -12
- package/package.json +2 -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/public-api-sdk@1.
|
|
20
|
+
npm install @emilgroup/public-api-sdk@1.4.0 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/public-api-sdk@1.
|
|
24
|
+
yarn add @emilgroup/public-api-sdk@1.4.0
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import `PublicApi`.
|
package/base.ts
CHANGED
|
@@ -129,7 +129,7 @@ export class BaseAPI {
|
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
async
|
|
132
|
+
async refreshTokenInternal(): Promise<string> {
|
|
133
133
|
const { username } = this.configuration;
|
|
134
134
|
|
|
135
135
|
if (!username) {
|
|
@@ -180,7 +180,7 @@ export class BaseAPI {
|
|
|
180
180
|
&& !originalConfig._retry) {
|
|
181
181
|
originalConfig._retry = true;
|
|
182
182
|
try {
|
|
183
|
-
let tokenString = await this.
|
|
183
|
+
let tokenString = await this.refreshTokenInternal();
|
|
184
184
|
const accessToken = `Bearer ${tokenString}`;
|
|
185
185
|
|
|
186
186
|
delete originalConfig.headers['Authorization']
|
|
@@ -206,7 +206,7 @@ export class BaseAPI {
|
|
|
206
206
|
) {
|
|
207
207
|
_retry_count++;
|
|
208
208
|
try {
|
|
209
|
-
let tokenString = await this.
|
|
209
|
+
let tokenString = await this.refreshTokenInternal();
|
|
210
210
|
const accessToken = `Bearer ${tokenString}`;
|
|
211
211
|
|
|
212
212
|
_retry = true;
|
package/dist/base.d.ts
CHANGED
|
@@ -54,7 +54,7 @@ export declare class BaseAPI {
|
|
|
54
54
|
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
|
|
55
55
|
selectEnvironment(env: Environment): void;
|
|
56
56
|
authorize(username: string, password: string): Promise<void>;
|
|
57
|
-
|
|
57
|
+
refreshTokenInternal(): Promise<string>;
|
|
58
58
|
private storeTokenData;
|
|
59
59
|
loadTokenData(): void;
|
|
60
60
|
cleanTokenData(): void;
|
package/dist/base.js
CHANGED
|
@@ -168,7 +168,7 @@ var BaseAPI = /** @class */ (function () {
|
|
|
168
168
|
});
|
|
169
169
|
});
|
|
170
170
|
};
|
|
171
|
-
BaseAPI.prototype.
|
|
171
|
+
BaseAPI.prototype.refreshTokenInternal = function () {
|
|
172
172
|
return __awaiter(this, void 0, void 0, function () {
|
|
173
173
|
var username, options, accessToken;
|
|
174
174
|
return __generator(this, function (_a) {
|
|
@@ -225,7 +225,7 @@ var BaseAPI = /** @class */ (function () {
|
|
|
225
225
|
_a.label = 1;
|
|
226
226
|
case 1:
|
|
227
227
|
_a.trys.push([1, 3, , 4]);
|
|
228
|
-
return [4 /*yield*/, this.
|
|
228
|
+
return [4 /*yield*/, this.refreshTokenInternal()];
|
|
229
229
|
case 2:
|
|
230
230
|
tokenString = _a.sent();
|
|
231
231
|
accessToken = "Bearer ".concat(tokenString);
|
|
@@ -250,7 +250,7 @@ var BaseAPI = /** @class */ (function () {
|
|
|
250
250
|
_a.label = 6;
|
|
251
251
|
case 6:
|
|
252
252
|
_a.trys.push([6, 8, , 9]);
|
|
253
|
-
return [4 /*yield*/, this.
|
|
253
|
+
return [4 /*yield*/, this.refreshTokenInternal()];
|
|
254
254
|
case 7:
|
|
255
255
|
tokenString = _a.sent();
|
|
256
256
|
accessToken = "Bearer ".concat(tokenString);
|
|
@@ -69,18 +69,6 @@ export interface ProductFieldClass {
|
|
|
69
69
|
* @memberof ProductFieldClass
|
|
70
70
|
*/
|
|
71
71
|
'isHidden': boolean;
|
|
72
|
-
/**
|
|
73
|
-
* Is field hidden on the customer portal?
|
|
74
|
-
* @type {boolean}
|
|
75
|
-
* @memberof ProductFieldClass
|
|
76
|
-
*/
|
|
77
|
-
'isHiddenCustomerPortal': boolean;
|
|
78
|
-
/**
|
|
79
|
-
* Is field editable on the customer portal?
|
|
80
|
-
* @type {boolean}
|
|
81
|
-
* @memberof ProductFieldClass
|
|
82
|
-
*/
|
|
83
|
-
'isEditableCustomerPortal': boolean;
|
|
84
72
|
/**
|
|
85
73
|
* Is this a system field? - System fields can neither be deleted nor modified
|
|
86
74
|
* @type {boolean}
|
|
@@ -74,18 +74,6 @@ export interface ProductFieldClass {
|
|
|
74
74
|
* @memberof ProductFieldClass
|
|
75
75
|
*/
|
|
76
76
|
'isHidden': boolean;
|
|
77
|
-
/**
|
|
78
|
-
* Is field hidden on the customer portal?
|
|
79
|
-
* @type {boolean}
|
|
80
|
-
* @memberof ProductFieldClass
|
|
81
|
-
*/
|
|
82
|
-
'isHiddenCustomerPortal': boolean;
|
|
83
|
-
/**
|
|
84
|
-
* Is field editable on the customer portal?
|
|
85
|
-
* @type {boolean}
|
|
86
|
-
* @memberof ProductFieldClass
|
|
87
|
-
*/
|
|
88
|
-
'isEditableCustomerPortal': boolean;
|
|
89
77
|
/**
|
|
90
78
|
* Is this a system field? - System fields can neither be deleted nor modified
|
|
91
79
|
* @type {boolean}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@emilgroup/public-api-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "OpenAPI client for @emilgroup/public-api-sdk",
|
|
5
5
|
"author": "OpenAPI-Generator Contributors",
|
|
6
6
|
"keywords": [
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"axios": "^0.27.2"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
+
|
|
24
25
|
"typescript": "^4.0"
|
|
25
26
|
}
|
|
26
27
|
}
|