@fctc/interface-logic 3.6.6 → 3.6.8
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/dist/configs.js +8 -4
- package/dist/configs.mjs +8 -4
- package/dist/environment.js +8 -4
- package/dist/environment.mjs +8 -4
- package/dist/hooks.js +7 -7
- package/dist/hooks.mjs +7 -7
- package/dist/provider.js +15 -11
- package/dist/provider.mjs +15 -11
- package/dist/services.js +7 -7
- package/dist/services.mjs +7 -7
- package/package.json +1 -1
package/dist/configs.js
CHANGED
|
@@ -2277,7 +2277,11 @@ var axiosClient = {
|
|
|
2277
2277
|
paramsSerializer: (params) => new URLSearchParams(params).toString()
|
|
2278
2278
|
});
|
|
2279
2279
|
instance.interceptors.request.use(async (config2) => {
|
|
2280
|
-
const
|
|
2280
|
+
const useRefreshToken = config2.headers["X-Use-Refresh-Token"] === "true";
|
|
2281
|
+
const useActionToken = config2.headers["X-Use-Action-Token"] === "true";
|
|
2282
|
+
const actionToken = config2.headers["X-Action-Token"];
|
|
2283
|
+
console.log("config", config2);
|
|
2284
|
+
console.log("useRefreshToken", useRefreshToken);
|
|
2281
2285
|
let token = null;
|
|
2282
2286
|
if (useActionToken && actionToken) {
|
|
2283
2287
|
token = actionToken;
|
|
@@ -2374,9 +2378,9 @@ var axiosClient = {
|
|
|
2374
2378
|
if (err && err.response) {
|
|
2375
2379
|
console.log("err response code: ", err);
|
|
2376
2380
|
console.log("err response: ", err.response);
|
|
2377
|
-
const { error_code
|
|
2378
|
-
const {
|
|
2379
|
-
if (error_code === "AUTHEN_FAIL" || code === "ERR_2FA_006"
|
|
2381
|
+
const { error_code } = err.response?.data || {};
|
|
2382
|
+
const { code } = err;
|
|
2383
|
+
if (error_code === "AUTHEN_FAIL" || code === "ERR_2FA_006") {
|
|
2380
2384
|
await clearAuthToken();
|
|
2381
2385
|
}
|
|
2382
2386
|
}
|
package/dist/configs.mjs
CHANGED
|
@@ -2241,7 +2241,11 @@ var axiosClient = {
|
|
|
2241
2241
|
paramsSerializer: (params) => new URLSearchParams(params).toString()
|
|
2242
2242
|
});
|
|
2243
2243
|
instance.interceptors.request.use(async (config2) => {
|
|
2244
|
-
const
|
|
2244
|
+
const useRefreshToken = config2.headers["X-Use-Refresh-Token"] === "true";
|
|
2245
|
+
const useActionToken = config2.headers["X-Use-Action-Token"] === "true";
|
|
2246
|
+
const actionToken = config2.headers["X-Action-Token"];
|
|
2247
|
+
console.log("config", config2);
|
|
2248
|
+
console.log("useRefreshToken", useRefreshToken);
|
|
2245
2249
|
let token = null;
|
|
2246
2250
|
if (useActionToken && actionToken) {
|
|
2247
2251
|
token = actionToken;
|
|
@@ -2338,9 +2342,9 @@ var axiosClient = {
|
|
|
2338
2342
|
if (err && err.response) {
|
|
2339
2343
|
console.log("err response code: ", err);
|
|
2340
2344
|
console.log("err response: ", err.response);
|
|
2341
|
-
const { error_code
|
|
2342
|
-
const {
|
|
2343
|
-
if (error_code === "AUTHEN_FAIL" || code === "ERR_2FA_006"
|
|
2345
|
+
const { error_code } = err.response?.data || {};
|
|
2346
|
+
const { code } = err;
|
|
2347
|
+
if (error_code === "AUTHEN_FAIL" || code === "ERR_2FA_006") {
|
|
2344
2348
|
await clearAuthToken();
|
|
2345
2349
|
}
|
|
2346
2350
|
}
|
package/dist/environment.js
CHANGED
|
@@ -2279,7 +2279,11 @@ var axiosClient = {
|
|
|
2279
2279
|
paramsSerializer: (params) => new URLSearchParams(params).toString()
|
|
2280
2280
|
});
|
|
2281
2281
|
instance.interceptors.request.use(async (config2) => {
|
|
2282
|
-
const
|
|
2282
|
+
const useRefreshToken = config2.headers["X-Use-Refresh-Token"] === "true";
|
|
2283
|
+
const useActionToken = config2.headers["X-Use-Action-Token"] === "true";
|
|
2284
|
+
const actionToken = config2.headers["X-Action-Token"];
|
|
2285
|
+
console.log("config", config2);
|
|
2286
|
+
console.log("useRefreshToken", useRefreshToken);
|
|
2283
2287
|
let token = null;
|
|
2284
2288
|
if (useActionToken && actionToken) {
|
|
2285
2289
|
token = actionToken;
|
|
@@ -2376,9 +2380,9 @@ var axiosClient = {
|
|
|
2376
2380
|
if (err && err.response) {
|
|
2377
2381
|
console.log("err response code: ", err);
|
|
2378
2382
|
console.log("err response: ", err.response);
|
|
2379
|
-
const { error_code
|
|
2380
|
-
const {
|
|
2381
|
-
if (error_code === "AUTHEN_FAIL" || code === "ERR_2FA_006"
|
|
2383
|
+
const { error_code } = err.response?.data || {};
|
|
2384
|
+
const { code } = err;
|
|
2385
|
+
if (error_code === "AUTHEN_FAIL" || code === "ERR_2FA_006") {
|
|
2382
2386
|
await clearAuthToken();
|
|
2383
2387
|
}
|
|
2384
2388
|
}
|
package/dist/environment.mjs
CHANGED
|
@@ -2241,7 +2241,11 @@ var axiosClient = {
|
|
|
2241
2241
|
paramsSerializer: (params) => new URLSearchParams(params).toString()
|
|
2242
2242
|
});
|
|
2243
2243
|
instance.interceptors.request.use(async (config2) => {
|
|
2244
|
-
const
|
|
2244
|
+
const useRefreshToken = config2.headers["X-Use-Refresh-Token"] === "true";
|
|
2245
|
+
const useActionToken = config2.headers["X-Use-Action-Token"] === "true";
|
|
2246
|
+
const actionToken = config2.headers["X-Action-Token"];
|
|
2247
|
+
console.log("config", config2);
|
|
2248
|
+
console.log("useRefreshToken", useRefreshToken);
|
|
2245
2249
|
let token = null;
|
|
2246
2250
|
if (useActionToken && actionToken) {
|
|
2247
2251
|
token = actionToken;
|
|
@@ -2338,9 +2342,9 @@ var axiosClient = {
|
|
|
2338
2342
|
if (err && err.response) {
|
|
2339
2343
|
console.log("err response code: ", err);
|
|
2340
2344
|
console.log("err response: ", err.response);
|
|
2341
|
-
const { error_code
|
|
2342
|
-
const {
|
|
2343
|
-
if (error_code === "AUTHEN_FAIL" || code === "ERR_2FA_006"
|
|
2345
|
+
const { error_code } = err.response?.data || {};
|
|
2346
|
+
const { code } = err;
|
|
2347
|
+
if (error_code === "AUTHEN_FAIL" || code === "ERR_2FA_006") {
|
|
2344
2348
|
await clearAuthToken();
|
|
2345
2349
|
}
|
|
2346
2350
|
}
|
package/dist/hooks.js
CHANGED
|
@@ -3334,10 +3334,10 @@ function useAuthService() {
|
|
|
3334
3334
|
const bodyData = {};
|
|
3335
3335
|
return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
|
|
3336
3336
|
headers: {
|
|
3337
|
-
"Content-Type": "application/json"
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3337
|
+
"Content-Type": "application/json",
|
|
3338
|
+
"X-Use-Action-Token": "true",
|
|
3339
|
+
"X-Action-Token": actionToken
|
|
3340
|
+
}
|
|
3341
3341
|
});
|
|
3342
3342
|
},
|
|
3343
3343
|
[env]
|
|
@@ -3393,10 +3393,10 @@ function useAuthService() {
|
|
|
3393
3393
|
{},
|
|
3394
3394
|
{
|
|
3395
3395
|
headers: {
|
|
3396
|
-
"Content-Type": "application/json"
|
|
3396
|
+
"Content-Type": "application/json",
|
|
3397
|
+
"X-Use-Refresh-Token": "true"
|
|
3397
3398
|
},
|
|
3398
|
-
withCredentials: true
|
|
3399
|
-
useRefreshToken: true
|
|
3399
|
+
withCredentials: true
|
|
3400
3400
|
},
|
|
3401
3401
|
service
|
|
3402
3402
|
);
|
package/dist/hooks.mjs
CHANGED
|
@@ -3195,10 +3195,10 @@ function useAuthService() {
|
|
|
3195
3195
|
const bodyData = {};
|
|
3196
3196
|
return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
|
|
3197
3197
|
headers: {
|
|
3198
|
-
"Content-Type": "application/json"
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3198
|
+
"Content-Type": "application/json",
|
|
3199
|
+
"X-Use-Action-Token": "true",
|
|
3200
|
+
"X-Action-Token": actionToken
|
|
3201
|
+
}
|
|
3202
3202
|
});
|
|
3203
3203
|
},
|
|
3204
3204
|
[env]
|
|
@@ -3254,10 +3254,10 @@ function useAuthService() {
|
|
|
3254
3254
|
{},
|
|
3255
3255
|
{
|
|
3256
3256
|
headers: {
|
|
3257
|
-
"Content-Type": "application/json"
|
|
3257
|
+
"Content-Type": "application/json",
|
|
3258
|
+
"X-Use-Refresh-Token": "true"
|
|
3258
3259
|
},
|
|
3259
|
-
withCredentials: true
|
|
3260
|
-
useRefreshToken: true
|
|
3260
|
+
withCredentials: true
|
|
3261
3261
|
},
|
|
3262
3262
|
service
|
|
3263
3263
|
);
|
package/dist/provider.js
CHANGED
|
@@ -3324,10 +3324,10 @@ function useAuthService() {
|
|
|
3324
3324
|
const bodyData = {};
|
|
3325
3325
|
return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
|
|
3326
3326
|
headers: {
|
|
3327
|
-
"Content-Type": "application/json"
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3327
|
+
"Content-Type": "application/json",
|
|
3328
|
+
"X-Use-Action-Token": "true",
|
|
3329
|
+
"X-Action-Token": actionToken
|
|
3330
|
+
}
|
|
3331
3331
|
});
|
|
3332
3332
|
},
|
|
3333
3333
|
[env]
|
|
@@ -3383,10 +3383,10 @@ function useAuthService() {
|
|
|
3383
3383
|
{},
|
|
3384
3384
|
{
|
|
3385
3385
|
headers: {
|
|
3386
|
-
"Content-Type": "application/json"
|
|
3386
|
+
"Content-Type": "application/json",
|
|
3387
|
+
"X-Use-Refresh-Token": "true"
|
|
3387
3388
|
},
|
|
3388
|
-
withCredentials: true
|
|
3389
|
-
useRefreshToken: true
|
|
3389
|
+
withCredentials: true
|
|
3390
3390
|
},
|
|
3391
3391
|
service
|
|
3392
3392
|
);
|
|
@@ -5869,7 +5869,11 @@ var axiosClient = {
|
|
|
5869
5869
|
paramsSerializer: (params) => new URLSearchParams(params).toString()
|
|
5870
5870
|
});
|
|
5871
5871
|
instance.interceptors.request.use(async (config2) => {
|
|
5872
|
-
const
|
|
5872
|
+
const useRefreshToken = config2.headers["X-Use-Refresh-Token"] === "true";
|
|
5873
|
+
const useActionToken = config2.headers["X-Use-Action-Token"] === "true";
|
|
5874
|
+
const actionToken = config2.headers["X-Action-Token"];
|
|
5875
|
+
console.log("config", config2);
|
|
5876
|
+
console.log("useRefreshToken", useRefreshToken);
|
|
5873
5877
|
let token = null;
|
|
5874
5878
|
if (useActionToken && actionToken) {
|
|
5875
5879
|
token = actionToken;
|
|
@@ -5966,9 +5970,9 @@ var axiosClient = {
|
|
|
5966
5970
|
if (err && err.response) {
|
|
5967
5971
|
console.log("err response code: ", err);
|
|
5968
5972
|
console.log("err response: ", err.response);
|
|
5969
|
-
const { error_code
|
|
5970
|
-
const {
|
|
5971
|
-
if (error_code === "AUTHEN_FAIL" || code === "ERR_2FA_006"
|
|
5973
|
+
const { error_code } = err.response?.data || {};
|
|
5974
|
+
const { code } = err;
|
|
5975
|
+
if (error_code === "AUTHEN_FAIL" || code === "ERR_2FA_006") {
|
|
5972
5976
|
await clearAuthToken();
|
|
5973
5977
|
}
|
|
5974
5978
|
}
|
package/dist/provider.mjs
CHANGED
|
@@ -3281,10 +3281,10 @@ function useAuthService() {
|
|
|
3281
3281
|
const bodyData = {};
|
|
3282
3282
|
return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
|
|
3283
3283
|
headers: {
|
|
3284
|
-
"Content-Type": "application/json"
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3284
|
+
"Content-Type": "application/json",
|
|
3285
|
+
"X-Use-Action-Token": "true",
|
|
3286
|
+
"X-Action-Token": actionToken
|
|
3287
|
+
}
|
|
3288
3288
|
});
|
|
3289
3289
|
},
|
|
3290
3290
|
[env]
|
|
@@ -3340,10 +3340,10 @@ function useAuthService() {
|
|
|
3340
3340
|
{},
|
|
3341
3341
|
{
|
|
3342
3342
|
headers: {
|
|
3343
|
-
"Content-Type": "application/json"
|
|
3343
|
+
"Content-Type": "application/json",
|
|
3344
|
+
"X-Use-Refresh-Token": "true"
|
|
3344
3345
|
},
|
|
3345
|
-
withCredentials: true
|
|
3346
|
-
useRefreshToken: true
|
|
3346
|
+
withCredentials: true
|
|
3347
3347
|
},
|
|
3348
3348
|
service
|
|
3349
3349
|
);
|
|
@@ -5826,7 +5826,11 @@ var axiosClient = {
|
|
|
5826
5826
|
paramsSerializer: (params) => new URLSearchParams(params).toString()
|
|
5827
5827
|
});
|
|
5828
5828
|
instance.interceptors.request.use(async (config2) => {
|
|
5829
|
-
const
|
|
5829
|
+
const useRefreshToken = config2.headers["X-Use-Refresh-Token"] === "true";
|
|
5830
|
+
const useActionToken = config2.headers["X-Use-Action-Token"] === "true";
|
|
5831
|
+
const actionToken = config2.headers["X-Action-Token"];
|
|
5832
|
+
console.log("config", config2);
|
|
5833
|
+
console.log("useRefreshToken", useRefreshToken);
|
|
5830
5834
|
let token = null;
|
|
5831
5835
|
if (useActionToken && actionToken) {
|
|
5832
5836
|
token = actionToken;
|
|
@@ -5923,9 +5927,9 @@ var axiosClient = {
|
|
|
5923
5927
|
if (err && err.response) {
|
|
5924
5928
|
console.log("err response code: ", err);
|
|
5925
5929
|
console.log("err response: ", err.response);
|
|
5926
|
-
const { error_code
|
|
5927
|
-
const {
|
|
5928
|
-
if (error_code === "AUTHEN_FAIL" || code === "ERR_2FA_006"
|
|
5930
|
+
const { error_code } = err.response?.data || {};
|
|
5931
|
+
const { code } = err;
|
|
5932
|
+
if (error_code === "AUTHEN_FAIL" || code === "ERR_2FA_006") {
|
|
5929
5933
|
await clearAuthToken();
|
|
5930
5934
|
}
|
|
5931
5935
|
}
|
package/dist/services.js
CHANGED
|
@@ -3523,10 +3523,10 @@ function useAuthService() {
|
|
|
3523
3523
|
const bodyData = {};
|
|
3524
3524
|
return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
|
|
3525
3525
|
headers: {
|
|
3526
|
-
"Content-Type": "application/json"
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3526
|
+
"Content-Type": "application/json",
|
|
3527
|
+
"X-Use-Action-Token": "true",
|
|
3528
|
+
"X-Action-Token": actionToken
|
|
3529
|
+
}
|
|
3530
3530
|
});
|
|
3531
3531
|
},
|
|
3532
3532
|
[env]
|
|
@@ -3582,10 +3582,10 @@ function useAuthService() {
|
|
|
3582
3582
|
{},
|
|
3583
3583
|
{
|
|
3584
3584
|
headers: {
|
|
3585
|
-
"Content-Type": "application/json"
|
|
3585
|
+
"Content-Type": "application/json",
|
|
3586
|
+
"X-Use-Refresh-Token": "true"
|
|
3586
3587
|
},
|
|
3587
|
-
withCredentials: true
|
|
3588
|
-
useRefreshToken: true
|
|
3588
|
+
withCredentials: true
|
|
3589
3589
|
},
|
|
3590
3590
|
service
|
|
3591
3591
|
);
|
package/dist/services.mjs
CHANGED
|
@@ -3478,10 +3478,10 @@ function useAuthService() {
|
|
|
3478
3478
|
const bodyData = {};
|
|
3479
3479
|
return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
|
|
3480
3480
|
headers: {
|
|
3481
|
-
"Content-Type": "application/json"
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3481
|
+
"Content-Type": "application/json",
|
|
3482
|
+
"X-Use-Action-Token": "true",
|
|
3483
|
+
"X-Action-Token": actionToken
|
|
3484
|
+
}
|
|
3485
3485
|
});
|
|
3486
3486
|
},
|
|
3487
3487
|
[env]
|
|
@@ -3537,10 +3537,10 @@ function useAuthService() {
|
|
|
3537
3537
|
{},
|
|
3538
3538
|
{
|
|
3539
3539
|
headers: {
|
|
3540
|
-
"Content-Type": "application/json"
|
|
3540
|
+
"Content-Type": "application/json",
|
|
3541
|
+
"X-Use-Refresh-Token": "true"
|
|
3541
3542
|
},
|
|
3542
|
-
withCredentials: true
|
|
3543
|
-
useRefreshToken: true
|
|
3543
|
+
withCredentials: true
|
|
3544
3544
|
},
|
|
3545
3545
|
service
|
|
3546
3546
|
);
|