@fctc/interface-logic 1.3.9 → 1.3.10
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/{view-type-BGJfDe73.d.mts → api-type-38YDuhk_.d.mts} +1 -27
- package/dist/{view-type-BGJfDe73.d.ts → api-type-38YDuhk_.d.ts} +1 -27
- package/dist/configs.js +12 -9
- package/dist/configs.mjs +12 -9
- package/dist/environment.d.mts +2 -1
- package/dist/environment.d.ts +2 -1
- package/dist/environment.js +14 -10
- package/dist/environment.mjs +14 -10
- package/dist/hooks.d.mts +15 -8
- package/dist/hooks.d.ts +15 -8
- package/dist/hooks.js +123 -150
- package/dist/hooks.mjs +83 -109
- package/dist/provider.js +13 -10
- package/dist/provider.mjs +13 -10
- package/dist/services.d.mts +14 -2
- package/dist/services.d.ts +14 -2
- package/dist/services.js +13 -24
- package/dist/services.mjs +13 -24
- package/package.json +76 -81
- package/dist/types.d.mts +0 -17
- package/dist/types.d.ts +0 -17
- package/dist/types.js +0 -18
- package/dist/types.mjs +0 -0
package/dist/services.mjs
CHANGED
|
@@ -2228,16 +2228,19 @@ var axiosClient = {
|
|
|
2228
2228
|
timeout: 5e4,
|
|
2229
2229
|
paramsSerializer: (params) => new URLSearchParams(params).toString()
|
|
2230
2230
|
});
|
|
2231
|
-
instance.interceptors.request.use(
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2231
|
+
instance.interceptors.request.use(
|
|
2232
|
+
async (config2) => {
|
|
2233
|
+
const useRefreshToken = config2.useRefreshToken;
|
|
2234
|
+
const token = useRefreshToken ? await localStorage2.getRefreshToken() : await localStorage2.getAccessToken();
|
|
2235
|
+
if (token) {
|
|
2236
|
+
config2.headers["Authorization"] = "Bearer " + token;
|
|
2237
|
+
}
|
|
2238
|
+
return config2;
|
|
2239
|
+
},
|
|
2240
|
+
(error) => {
|
|
2241
|
+
Promise.reject(error);
|
|
2242
|
+
}
|
|
2243
|
+
);
|
|
2241
2244
|
instance.interceptors.response.use(
|
|
2242
2245
|
(response) => {
|
|
2243
2246
|
return handleResponse(response);
|
|
@@ -3334,20 +3337,6 @@ var AuthService = {
|
|
|
3334
3337
|
}
|
|
3335
3338
|
});
|
|
3336
3339
|
},
|
|
3337
|
-
async isValidActionToken(actionToken, path) {
|
|
3338
|
-
const env2 = getEnv();
|
|
3339
|
-
return env2?.requests?.post(
|
|
3340
|
-
path,
|
|
3341
|
-
{},
|
|
3342
|
-
{
|
|
3343
|
-
headers: {
|
|
3344
|
-
"Content-Type": "application/json"
|
|
3345
|
-
},
|
|
3346
|
-
useActionToken: true,
|
|
3347
|
-
actionToken
|
|
3348
|
-
}
|
|
3349
|
-
);
|
|
3350
|
-
},
|
|
3351
3340
|
async loginSocial({
|
|
3352
3341
|
db,
|
|
3353
3342
|
state,
|
package/package.json
CHANGED
|
@@ -1,81 +1,76 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@fctc/interface-logic",
|
|
3
|
-
"version": "1.3.
|
|
4
|
-
"types": "dist/index.d.ts",
|
|
5
|
-
"main": "dist/index.cjs",
|
|
6
|
-
"module": "dist/index.mjs",
|
|
7
|
-
"exports": {
|
|
8
|
-
".": {
|
|
9
|
-
"types": "./dist/index.d.ts",
|
|
10
|
-
"import": "./dist/index.mjs",
|
|
11
|
-
"require": "./dist/index.cjs"
|
|
12
|
-
},
|
|
13
|
-
"./configs": {
|
|
14
|
-
"types": "./dist/configs.d.ts",
|
|
15
|
-
"import": "./dist/configs.mjs",
|
|
16
|
-
"require": "./dist/configs.cjs"
|
|
17
|
-
},
|
|
18
|
-
"./constants": {
|
|
19
|
-
"types": "./dist/constants.d.ts",
|
|
20
|
-
"import": "./dist/constants.mjs",
|
|
21
|
-
"require": "./dist/constants.cjs"
|
|
22
|
-
},
|
|
23
|
-
"./environment": {
|
|
24
|
-
"types": "./dist/environment.d.ts",
|
|
25
|
-
"import": "./dist/environment.mjs",
|
|
26
|
-
"require": "./dist/environment.cjs"
|
|
27
|
-
},
|
|
28
|
-
"./hooks": {
|
|
29
|
-
"types": "./dist/hooks.d.ts",
|
|
30
|
-
"import": "./dist/hooks.mjs",
|
|
31
|
-
"require": "./dist/hooks.cjs"
|
|
32
|
-
},
|
|
33
|
-
"./provider": {
|
|
34
|
-
"types": "./dist/provider.d.ts",
|
|
35
|
-
"import": "./dist/provider.mjs",
|
|
36
|
-
"require": "./dist/provider.cjs"
|
|
37
|
-
},
|
|
38
|
-
"./services": {
|
|
39
|
-
"types": "./dist/services.d.ts",
|
|
40
|
-
"import": "./dist/services.mjs",
|
|
41
|
-
"require": "./dist/services.cjs"
|
|
42
|
-
},
|
|
43
|
-
"./store": {
|
|
44
|
-
"types": "./dist/store.d.ts",
|
|
45
|
-
"import": "./dist/store.mjs",
|
|
46
|
-
"require": "./dist/store.cjs"
|
|
47
|
-
},
|
|
48
|
-
"./utils": {
|
|
49
|
-
"types": "./dist/utils.d.ts",
|
|
50
|
-
"import": "./dist/utils.mjs",
|
|
51
|
-
"require": "./dist/utils.cjs"
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
"tsup": "^8.0.0",
|
|
78
|
-
"typescript": "^5.8.2"
|
|
79
|
-
},
|
|
80
|
-
"packageManager": "yarn@1.22.0"
|
|
81
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@fctc/interface-logic",
|
|
3
|
+
"version": "1.3.10",
|
|
4
|
+
"types": "dist/index.d.ts",
|
|
5
|
+
"main": "dist/index.cjs",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.mjs",
|
|
11
|
+
"require": "./dist/index.cjs"
|
|
12
|
+
},
|
|
13
|
+
"./configs": {
|
|
14
|
+
"types": "./dist/configs.d.ts",
|
|
15
|
+
"import": "./dist/configs.mjs",
|
|
16
|
+
"require": "./dist/configs.cjs"
|
|
17
|
+
},
|
|
18
|
+
"./constants": {
|
|
19
|
+
"types": "./dist/constants.d.ts",
|
|
20
|
+
"import": "./dist/constants.mjs",
|
|
21
|
+
"require": "./dist/constants.cjs"
|
|
22
|
+
},
|
|
23
|
+
"./environment": {
|
|
24
|
+
"types": "./dist/environment.d.ts",
|
|
25
|
+
"import": "./dist/environment.mjs",
|
|
26
|
+
"require": "./dist/environment.cjs"
|
|
27
|
+
},
|
|
28
|
+
"./hooks": {
|
|
29
|
+
"types": "./dist/hooks.d.ts",
|
|
30
|
+
"import": "./dist/hooks.mjs",
|
|
31
|
+
"require": "./dist/hooks.cjs"
|
|
32
|
+
},
|
|
33
|
+
"./provider": {
|
|
34
|
+
"types": "./dist/provider.d.ts",
|
|
35
|
+
"import": "./dist/provider.mjs",
|
|
36
|
+
"require": "./dist/provider.cjs"
|
|
37
|
+
},
|
|
38
|
+
"./services": {
|
|
39
|
+
"types": "./dist/services.d.ts",
|
|
40
|
+
"import": "./dist/services.mjs",
|
|
41
|
+
"require": "./dist/services.cjs"
|
|
42
|
+
},
|
|
43
|
+
"./store": {
|
|
44
|
+
"types": "./dist/store.d.ts",
|
|
45
|
+
"import": "./dist/store.mjs",
|
|
46
|
+
"require": "./dist/store.cjs"
|
|
47
|
+
},
|
|
48
|
+
"./utils": {
|
|
49
|
+
"types": "./dist/utils.d.ts",
|
|
50
|
+
"import": "./dist/utils.mjs",
|
|
51
|
+
"require": "./dist/utils.cjs"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"files": [
|
|
55
|
+
"dist"
|
|
56
|
+
],
|
|
57
|
+
"scripts": {
|
|
58
|
+
"build": "tsup",
|
|
59
|
+
"test": "jest"
|
|
60
|
+
},
|
|
61
|
+
"dependencies": {
|
|
62
|
+
"@reduxjs/toolkit": "^2.8.2",
|
|
63
|
+
"@tanstack/react-query": "^5.83.0",
|
|
64
|
+
"axios": "^1.11.0",
|
|
65
|
+
"moment": "^2.30.1",
|
|
66
|
+
"react-redux": "^9.2.0"
|
|
67
|
+
},
|
|
68
|
+
"devDependencies": {
|
|
69
|
+
"@types/react": "^18.3.1",
|
|
70
|
+
"react": "18.0.0",
|
|
71
|
+
"jest": "^29.7.0",
|
|
72
|
+
"tsup": "^8.0.0",
|
|
73
|
+
"typescript": "^5.8.2"
|
|
74
|
+
},
|
|
75
|
+
"packageManager": "yarn@1.22.0"
|
|
76
|
+
}
|
package/dist/types.d.mts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export { C as ContextApi, D as DeleteParams, F as ForgotPasswordBody, G as GetAllParams, a as GetDetailParams, b as GetListParams, c as GetSelectionType, f as GetViewParams, L as LoginCredentialBody, O as OnChangeParams, R as ResetPasswordRequest, S as SaveParams, d as SocialTokenBody, e as Specification, U as UpdatePasswordRequest, g as View, V as ViewData, u as updatePasswordBody } from './view-type-BGJfDe73.mjs';
|
|
2
|
-
|
|
3
|
-
interface Config {
|
|
4
|
-
baseUrl: string;
|
|
5
|
-
grantType: string;
|
|
6
|
-
clientId: string;
|
|
7
|
-
clientSecret: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
interface Context {
|
|
11
|
-
uid: number;
|
|
12
|
-
lang: string;
|
|
13
|
-
allowCompanys: number[];
|
|
14
|
-
[key: string]: any;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export type { Config, Context };
|
package/dist/types.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export { C as ContextApi, D as DeleteParams, F as ForgotPasswordBody, G as GetAllParams, a as GetDetailParams, b as GetListParams, c as GetSelectionType, f as GetViewParams, L as LoginCredentialBody, O as OnChangeParams, R as ResetPasswordRequest, S as SaveParams, d as SocialTokenBody, e as Specification, U as UpdatePasswordRequest, g as View, V as ViewData, u as updatePasswordBody } from './view-type-BGJfDe73.js';
|
|
2
|
-
|
|
3
|
-
interface Config {
|
|
4
|
-
baseUrl: string;
|
|
5
|
-
grantType: string;
|
|
6
|
-
clientId: string;
|
|
7
|
-
clientSecret: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
interface Context {
|
|
11
|
-
uid: number;
|
|
12
|
-
lang: string;
|
|
13
|
-
allowCompanys: number[];
|
|
14
|
-
[key: string]: any;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export type { Config, Context };
|
package/dist/types.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
-
}
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
|
|
16
|
-
// src/types.ts
|
|
17
|
-
var types_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(types_exports);
|
package/dist/types.mjs
DELETED
|
File without changes
|