@fctc/interface-logic 2.0.0 → 2.0.2
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 +4 -0
- package/dist/configs.mjs +4 -0
- package/dist/environment.d.mts +1 -0
- package/dist/environment.d.ts +1 -0
- package/dist/environment.js +4 -0
- package/dist/environment.mjs +4 -0
- package/dist/hooks.d.mts +1 -0
- package/dist/hooks.d.ts +1 -0
- package/dist/hooks.js +21 -11
- package/dist/hooks.mjs +21 -11
- package/dist/provider.d.mts +7 -6
- package/dist/provider.d.ts +7 -6
- package/dist/provider.js +25 -11
- package/dist/provider.mjs +25 -11
- package/dist/services.d.mts +3 -1
- package/dist/services.d.ts +3 -1
- package/dist/services.js +16 -9
- package/dist/services.mjs +16 -9
- package/package.json +85 -85
package/dist/configs.js
CHANGED
|
@@ -2211,6 +2211,7 @@ var axiosClient = {
|
|
|
2211
2211
|
const localStorage2 = config?.localStorageUtils ?? localStorageUtils();
|
|
2212
2212
|
const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils();
|
|
2213
2213
|
const db = config?.db;
|
|
2214
|
+
const database = config?.database;
|
|
2214
2215
|
let isRefreshing = false;
|
|
2215
2216
|
let failedQueue = [];
|
|
2216
2217
|
const processQueue = (error, token = null) => {
|
|
@@ -2234,6 +2235,9 @@ var axiosClient = {
|
|
|
2234
2235
|
if (useActionToken && actionToken) {
|
|
2235
2236
|
config2.headers["Action-Token"] = actionToken;
|
|
2236
2237
|
}
|
|
2238
|
+
if (database) {
|
|
2239
|
+
config2.headers["DATABASE"] = config2.DATABASE;
|
|
2240
|
+
}
|
|
2237
2241
|
const getToken = useRefreshToken ? localStorage2.getRefreshToken : localStorage2.getAccessToken;
|
|
2238
2242
|
const token = await getToken?.();
|
|
2239
2243
|
if (token) config2.headers["Authorization"] = `Bearer ${token}`;
|
package/dist/configs.mjs
CHANGED
|
@@ -2175,6 +2175,7 @@ var axiosClient = {
|
|
|
2175
2175
|
const localStorage2 = config?.localStorageUtils ?? localStorageUtils();
|
|
2176
2176
|
const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils();
|
|
2177
2177
|
const db = config?.db;
|
|
2178
|
+
const database = config?.database;
|
|
2178
2179
|
let isRefreshing = false;
|
|
2179
2180
|
let failedQueue = [];
|
|
2180
2181
|
const processQueue = (error, token = null) => {
|
|
@@ -2198,6 +2199,9 @@ var axiosClient = {
|
|
|
2198
2199
|
if (useActionToken && actionToken) {
|
|
2199
2200
|
config2.headers["Action-Token"] = actionToken;
|
|
2200
2201
|
}
|
|
2202
|
+
if (database) {
|
|
2203
|
+
config2.headers["DATABASE"] = config2.DATABASE;
|
|
2204
|
+
}
|
|
2201
2205
|
const getToken = useRefreshToken ? localStorage2.getRefreshToken : localStorage2.getAccessToken;
|
|
2202
2206
|
const token = await getToken?.();
|
|
2203
2207
|
if (token) config2.headers["Authorization"] = `Bearer ${token}`;
|
package/dist/environment.d.mts
CHANGED
package/dist/environment.d.ts
CHANGED
package/dist/environment.js
CHANGED
|
@@ -2213,6 +2213,7 @@ var axiosClient = {
|
|
|
2213
2213
|
const localStorage2 = config?.localStorageUtils ?? localStorageUtils();
|
|
2214
2214
|
const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils();
|
|
2215
2215
|
const db = config?.db;
|
|
2216
|
+
const database = config?.database;
|
|
2216
2217
|
let isRefreshing = false;
|
|
2217
2218
|
let failedQueue = [];
|
|
2218
2219
|
const processQueue = (error, token = null) => {
|
|
@@ -2236,6 +2237,9 @@ var axiosClient = {
|
|
|
2236
2237
|
if (useActionToken && actionToken) {
|
|
2237
2238
|
config2.headers["Action-Token"] = actionToken;
|
|
2238
2239
|
}
|
|
2240
|
+
if (database) {
|
|
2241
|
+
config2.headers["DATABASE"] = config2.DATABASE;
|
|
2242
|
+
}
|
|
2239
2243
|
const getToken = useRefreshToken ? localStorage2.getRefreshToken : localStorage2.getAccessToken;
|
|
2240
2244
|
const token = await getToken?.();
|
|
2241
2245
|
if (token) config2.headers["Authorization"] = `Bearer ${token}`;
|
package/dist/environment.mjs
CHANGED
|
@@ -2175,6 +2175,7 @@ var axiosClient = {
|
|
|
2175
2175
|
const localStorage2 = config?.localStorageUtils ?? localStorageUtils();
|
|
2176
2176
|
const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils();
|
|
2177
2177
|
const db = config?.db;
|
|
2178
|
+
const database = config?.database;
|
|
2178
2179
|
let isRefreshing = false;
|
|
2179
2180
|
let failedQueue = [];
|
|
2180
2181
|
const processQueue = (error, token = null) => {
|
|
@@ -2198,6 +2199,9 @@ var axiosClient = {
|
|
|
2198
2199
|
if (useActionToken && actionToken) {
|
|
2199
2200
|
config2.headers["Action-Token"] = actionToken;
|
|
2200
2201
|
}
|
|
2202
|
+
if (database) {
|
|
2203
|
+
config2.headers["DATABASE"] = config2.DATABASE;
|
|
2204
|
+
}
|
|
2201
2205
|
const getToken = useRefreshToken ? localStorage2.getRefreshToken : localStorage2.getAccessToken;
|
|
2202
2206
|
const token = await getToken?.();
|
|
2203
2207
|
if (token) config2.headers["Authorization"] = `Bearer ${token}`;
|
package/dist/hooks.d.mts
CHANGED
|
@@ -314,6 +314,7 @@ declare const useSignInSSO: () => _tanstack_react_query.UseMutationResult<any, E
|
|
|
314
314
|
client_id: string;
|
|
315
315
|
response_type: string;
|
|
316
316
|
path: string;
|
|
317
|
+
scope: string;
|
|
317
318
|
}, unknown>;
|
|
318
319
|
|
|
319
320
|
declare const useVerify2FA: () => _tanstack_react_query.UseMutationResult<unknown, Error, {
|
package/dist/hooks.d.ts
CHANGED
|
@@ -314,6 +314,7 @@ declare const useSignInSSO: () => _tanstack_react_query.UseMutationResult<any, E
|
|
|
314
314
|
client_id: string;
|
|
315
315
|
response_type: string;
|
|
316
316
|
path: string;
|
|
317
|
+
scope: string;
|
|
317
318
|
}, unknown>;
|
|
318
319
|
|
|
319
320
|
declare const useVerify2FA: () => _tanstack_react_query.UseMutationResult<unknown, Error, {
|
package/dist/hooks.js
CHANGED
|
@@ -4449,18 +4449,25 @@ function useViewService() {
|
|
|
4449
4449
|
redirect_uri,
|
|
4450
4450
|
state,
|
|
4451
4451
|
client_id,
|
|
4452
|
-
response_type
|
|
4452
|
+
response_type,
|
|
4453
|
+
path,
|
|
4454
|
+
scope
|
|
4453
4455
|
}) => {
|
|
4454
|
-
const
|
|
4455
|
-
|
|
4456
|
-
state,
|
|
4456
|
+
const params = new URLSearchParams({
|
|
4457
|
+
response_type,
|
|
4457
4458
|
client_id,
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4459
|
+
redirect_uri,
|
|
4460
|
+
state
|
|
4461
|
+
});
|
|
4462
|
+
const queryString = `${params.toString()}&scope=${encodeURIComponent(
|
|
4463
|
+
scope
|
|
4464
|
+
)}`;
|
|
4465
|
+
const url = `${path}?${queryString}`;
|
|
4466
|
+
return env?.requests.get(url, {
|
|
4461
4467
|
headers: {
|
|
4462
|
-
|
|
4463
|
-
}
|
|
4468
|
+
"Content-Type": "application/json"
|
|
4469
|
+
},
|
|
4470
|
+
withCredentials: true
|
|
4464
4471
|
});
|
|
4465
4472
|
},
|
|
4466
4473
|
[env]
|
|
@@ -5677,13 +5684,16 @@ var useSignInSSO = () => {
|
|
|
5677
5684
|
state,
|
|
5678
5685
|
client_id,
|
|
5679
5686
|
response_type,
|
|
5680
|
-
path
|
|
5687
|
+
path,
|
|
5688
|
+
scope
|
|
5681
5689
|
}) => {
|
|
5682
5690
|
return signInSSO({
|
|
5683
5691
|
redirect_uri,
|
|
5684
5692
|
state,
|
|
5685
5693
|
client_id,
|
|
5686
|
-
response_type
|
|
5694
|
+
response_type,
|
|
5695
|
+
path,
|
|
5696
|
+
scope
|
|
5687
5697
|
});
|
|
5688
5698
|
}
|
|
5689
5699
|
});
|
package/dist/hooks.mjs
CHANGED
|
@@ -4346,18 +4346,25 @@ function useViewService() {
|
|
|
4346
4346
|
redirect_uri,
|
|
4347
4347
|
state,
|
|
4348
4348
|
client_id,
|
|
4349
|
-
response_type
|
|
4349
|
+
response_type,
|
|
4350
|
+
path,
|
|
4351
|
+
scope
|
|
4350
4352
|
}) => {
|
|
4351
|
-
const
|
|
4352
|
-
|
|
4353
|
-
state,
|
|
4353
|
+
const params = new URLSearchParams({
|
|
4354
|
+
response_type,
|
|
4354
4355
|
client_id,
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4356
|
+
redirect_uri,
|
|
4357
|
+
state
|
|
4358
|
+
});
|
|
4359
|
+
const queryString = `${params.toString()}&scope=${encodeURIComponent(
|
|
4360
|
+
scope
|
|
4361
|
+
)}`;
|
|
4362
|
+
const url = `${path}?${queryString}`;
|
|
4363
|
+
return env?.requests.get(url, {
|
|
4358
4364
|
headers: {
|
|
4359
|
-
|
|
4360
|
-
}
|
|
4365
|
+
"Content-Type": "application/json"
|
|
4366
|
+
},
|
|
4367
|
+
withCredentials: true
|
|
4361
4368
|
});
|
|
4362
4369
|
},
|
|
4363
4370
|
[env]
|
|
@@ -5574,13 +5581,16 @@ var useSignInSSO = () => {
|
|
|
5574
5581
|
state,
|
|
5575
5582
|
client_id,
|
|
5576
5583
|
response_type,
|
|
5577
|
-
path
|
|
5584
|
+
path,
|
|
5585
|
+
scope
|
|
5578
5586
|
}) => {
|
|
5579
5587
|
return signInSSO({
|
|
5580
5588
|
redirect_uri,
|
|
5581
5589
|
state,
|
|
5582
5590
|
client_id,
|
|
5583
|
-
response_type
|
|
5591
|
+
response_type,
|
|
5592
|
+
path,
|
|
5593
|
+
scope
|
|
5584
5594
|
});
|
|
5585
5595
|
}
|
|
5586
5596
|
});
|
package/dist/provider.d.mts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
1
2
|
import { ReactNode } from 'react';
|
|
2
3
|
import { L as LocalStorageUtilsType, S as SessionStorageUtilsType } from './session-storage-ARp_lhTD.mjs';
|
|
3
4
|
import { useForgotPassword, useForgotPasswordSSO, useGetProvider, useIsValidToken, useLoginCredential, useLoginSocial, useResetPassword, useResetPasswordSSO, useUpdatePassword, useLogout, useGetAccessByCode, useValidateActionToken, useGetCompanyInfo, useGetCurrentCompany, useGetListCompany, useExecuteImport, useExportExcel, useGetFieldExport, useGetFileExcel, useParsePreview, useUploadFile, useUploadIdFile, useChangeStatus, useDeleteComment, useGetComment, useGetFormView, useGetImage, useSendComment, useUploadImage, useDelete, useGetAll, useGetConversionRate, useGetCurrency, useGetDetail, useGetFieldOnChange, useGetListMyBankAccount, useModel, useOdooDataTransform, useOnChangeForm, useSave, useGetProfile, useGetUser, useSwitchLocale, useButton, useDuplicateRecord, useGet2FAMethods, useGetActionDetail, useGetCalendar, useGetGroups, useGetListData, useGetMenu, useGetPrintReport, useGetProGressBar, useGetResequence, useGetSelection, useGetView, useLoadAction, useLoadMessage, usePrint, useRemoveRow, useRunAction, useSignInSSO, useVerify2FA, useGrantAccess, useRemoveTotpSetup, useRequestSetupTotp, useSettingsWebRead2fa, useVerifyTotp } from './hooks.mjs';
|
|
@@ -6,15 +7,15 @@ import './view-type-BGJfDe73.mjs';
|
|
|
6
7
|
|
|
7
8
|
declare const MainProvider: ({ children }: {
|
|
8
9
|
children: ReactNode;
|
|
9
|
-
}) => JSX.Element;
|
|
10
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
10
11
|
|
|
11
12
|
declare const ReactQueryProvider: ({ children }: {
|
|
12
13
|
children: ReactNode;
|
|
13
|
-
}) => JSX.Element;
|
|
14
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
14
15
|
|
|
15
16
|
declare const VersionGate: ({ children }: {
|
|
16
17
|
children: ReactNode;
|
|
17
|
-
}) => JSX.Element | null;
|
|
18
|
+
}) => react_jsx_runtime.JSX.Element | null;
|
|
18
19
|
|
|
19
20
|
interface EnvConfig {
|
|
20
21
|
env?: any;
|
|
@@ -45,7 +46,7 @@ declare function EnvProvider({ children, localStorageUtils: localStorageUtil, se
|
|
|
45
46
|
children: React.ReactNode;
|
|
46
47
|
localStorageUtils?: LocalStorageUtilsType;
|
|
47
48
|
sessionStorageUtils?: SessionStorageUtilsType;
|
|
48
|
-
}): JSX.Element;
|
|
49
|
+
}): react_jsx_runtime.JSX.Element;
|
|
49
50
|
declare function useEnv(): {
|
|
50
51
|
env: EnvConfig;
|
|
51
52
|
setupEnv: (envConfig: Partial<EnvConfig>) => EnvConfig;
|
|
@@ -131,12 +132,12 @@ interface ServiceContextType {
|
|
|
131
132
|
}
|
|
132
133
|
declare const ServiceProvider: ({ children, }: {
|
|
133
134
|
children: React.ReactNode;
|
|
134
|
-
}) => JSX.Element;
|
|
135
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
135
136
|
declare const useService: () => ServiceContextType;
|
|
136
137
|
|
|
137
138
|
type MetaProviderProps = {
|
|
138
139
|
children: ReactNode;
|
|
139
140
|
};
|
|
140
|
-
declare const MetaProvider: ({ children }: MetaProviderProps) => JSX.Element;
|
|
141
|
+
declare const MetaProvider: ({ children }: MetaProviderProps) => react_jsx_runtime.JSX.Element;
|
|
141
142
|
|
|
142
143
|
export { EnvProvider, MainProvider, MetaProvider, ReactQueryProvider, ServiceProvider, VersionGate, useEnv, useService };
|
package/dist/provider.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
1
2
|
import { ReactNode } from 'react';
|
|
2
3
|
import { L as LocalStorageUtilsType, S as SessionStorageUtilsType } from './session-storage-ARp_lhTD.js';
|
|
3
4
|
import { useForgotPassword, useForgotPasswordSSO, useGetProvider, useIsValidToken, useLoginCredential, useLoginSocial, useResetPassword, useResetPasswordSSO, useUpdatePassword, useLogout, useGetAccessByCode, useValidateActionToken, useGetCompanyInfo, useGetCurrentCompany, useGetListCompany, useExecuteImport, useExportExcel, useGetFieldExport, useGetFileExcel, useParsePreview, useUploadFile, useUploadIdFile, useChangeStatus, useDeleteComment, useGetComment, useGetFormView, useGetImage, useSendComment, useUploadImage, useDelete, useGetAll, useGetConversionRate, useGetCurrency, useGetDetail, useGetFieldOnChange, useGetListMyBankAccount, useModel, useOdooDataTransform, useOnChangeForm, useSave, useGetProfile, useGetUser, useSwitchLocale, useButton, useDuplicateRecord, useGet2FAMethods, useGetActionDetail, useGetCalendar, useGetGroups, useGetListData, useGetMenu, useGetPrintReport, useGetProGressBar, useGetResequence, useGetSelection, useGetView, useLoadAction, useLoadMessage, usePrint, useRemoveRow, useRunAction, useSignInSSO, useVerify2FA, useGrantAccess, useRemoveTotpSetup, useRequestSetupTotp, useSettingsWebRead2fa, useVerifyTotp } from './hooks.js';
|
|
@@ -6,15 +7,15 @@ import './view-type-BGJfDe73.js';
|
|
|
6
7
|
|
|
7
8
|
declare const MainProvider: ({ children }: {
|
|
8
9
|
children: ReactNode;
|
|
9
|
-
}) => JSX.Element;
|
|
10
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
10
11
|
|
|
11
12
|
declare const ReactQueryProvider: ({ children }: {
|
|
12
13
|
children: ReactNode;
|
|
13
|
-
}) => JSX.Element;
|
|
14
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
14
15
|
|
|
15
16
|
declare const VersionGate: ({ children }: {
|
|
16
17
|
children: ReactNode;
|
|
17
|
-
}) => JSX.Element | null;
|
|
18
|
+
}) => react_jsx_runtime.JSX.Element | null;
|
|
18
19
|
|
|
19
20
|
interface EnvConfig {
|
|
20
21
|
env?: any;
|
|
@@ -45,7 +46,7 @@ declare function EnvProvider({ children, localStorageUtils: localStorageUtil, se
|
|
|
45
46
|
children: React.ReactNode;
|
|
46
47
|
localStorageUtils?: LocalStorageUtilsType;
|
|
47
48
|
sessionStorageUtils?: SessionStorageUtilsType;
|
|
48
|
-
}): JSX.Element;
|
|
49
|
+
}): react_jsx_runtime.JSX.Element;
|
|
49
50
|
declare function useEnv(): {
|
|
50
51
|
env: EnvConfig;
|
|
51
52
|
setupEnv: (envConfig: Partial<EnvConfig>) => EnvConfig;
|
|
@@ -131,12 +132,12 @@ interface ServiceContextType {
|
|
|
131
132
|
}
|
|
132
133
|
declare const ServiceProvider: ({ children, }: {
|
|
133
134
|
children: React.ReactNode;
|
|
134
|
-
}) => JSX.Element;
|
|
135
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
135
136
|
declare const useService: () => ServiceContextType;
|
|
136
137
|
|
|
137
138
|
type MetaProviderProps = {
|
|
138
139
|
children: ReactNode;
|
|
139
140
|
};
|
|
140
|
-
declare const MetaProvider: ({ children }: MetaProviderProps) => JSX.Element;
|
|
141
|
+
declare const MetaProvider: ({ children }: MetaProviderProps) => react_jsx_runtime.JSX.Element;
|
|
141
142
|
|
|
142
143
|
export { EnvProvider, MainProvider, MetaProvider, ReactQueryProvider, ServiceProvider, VersionGate, useEnv, useService };
|
package/dist/provider.js
CHANGED
|
@@ -4398,18 +4398,25 @@ function useViewService() {
|
|
|
4398
4398
|
redirect_uri,
|
|
4399
4399
|
state,
|
|
4400
4400
|
client_id,
|
|
4401
|
-
response_type
|
|
4401
|
+
response_type,
|
|
4402
|
+
path,
|
|
4403
|
+
scope
|
|
4402
4404
|
}) => {
|
|
4403
|
-
const
|
|
4404
|
-
|
|
4405
|
-
state,
|
|
4405
|
+
const params = new URLSearchParams({
|
|
4406
|
+
response_type,
|
|
4406
4407
|
client_id,
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4408
|
+
redirect_uri,
|
|
4409
|
+
state
|
|
4410
|
+
});
|
|
4411
|
+
const queryString = `${params.toString()}&scope=${encodeURIComponent(
|
|
4412
|
+
scope
|
|
4413
|
+
)}`;
|
|
4414
|
+
const url = `${path}?${queryString}`;
|
|
4415
|
+
return env?.requests.get(url, {
|
|
4410
4416
|
headers: {
|
|
4411
|
-
|
|
4412
|
-
}
|
|
4417
|
+
"Content-Type": "application/json"
|
|
4418
|
+
},
|
|
4419
|
+
withCredentials: true
|
|
4413
4420
|
});
|
|
4414
4421
|
},
|
|
4415
4422
|
[env]
|
|
@@ -4585,6 +4592,7 @@ var axiosClient = {
|
|
|
4585
4592
|
const localStorage2 = config?.localStorageUtils ?? localStorageUtils();
|
|
4586
4593
|
const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils();
|
|
4587
4594
|
const db = config?.db;
|
|
4595
|
+
const database = config?.database;
|
|
4588
4596
|
let isRefreshing = false;
|
|
4589
4597
|
let failedQueue = [];
|
|
4590
4598
|
const processQueue = (error, token = null) => {
|
|
@@ -4608,6 +4616,9 @@ var axiosClient = {
|
|
|
4608
4616
|
if (useActionToken && actionToken) {
|
|
4609
4617
|
config2.headers["Action-Token"] = actionToken;
|
|
4610
4618
|
}
|
|
4619
|
+
if (database) {
|
|
4620
|
+
config2.headers["DATABASE"] = config2.DATABASE;
|
|
4621
|
+
}
|
|
4611
4622
|
const getToken = useRefreshToken ? localStorage2.getRefreshToken : localStorage2.getAccessToken;
|
|
4612
4623
|
const token = await getToken?.();
|
|
4613
4624
|
if (token) config2.headers["Authorization"] = `Bearer ${token}`;
|
|
@@ -6008,13 +6019,16 @@ var useSignInSSO = () => {
|
|
|
6008
6019
|
state,
|
|
6009
6020
|
client_id,
|
|
6010
6021
|
response_type,
|
|
6011
|
-
path
|
|
6022
|
+
path,
|
|
6023
|
+
scope
|
|
6012
6024
|
}) => {
|
|
6013
6025
|
return signInSSO({
|
|
6014
6026
|
redirect_uri,
|
|
6015
6027
|
state,
|
|
6016
6028
|
client_id,
|
|
6017
|
-
response_type
|
|
6029
|
+
response_type,
|
|
6030
|
+
path,
|
|
6031
|
+
scope
|
|
6018
6032
|
});
|
|
6019
6033
|
}
|
|
6020
6034
|
});
|
package/dist/provider.mjs
CHANGED
|
@@ -4355,18 +4355,25 @@ function useViewService() {
|
|
|
4355
4355
|
redirect_uri,
|
|
4356
4356
|
state,
|
|
4357
4357
|
client_id,
|
|
4358
|
-
response_type
|
|
4358
|
+
response_type,
|
|
4359
|
+
path,
|
|
4360
|
+
scope
|
|
4359
4361
|
}) => {
|
|
4360
|
-
const
|
|
4361
|
-
|
|
4362
|
-
state,
|
|
4362
|
+
const params = new URLSearchParams({
|
|
4363
|
+
response_type,
|
|
4363
4364
|
client_id,
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4365
|
+
redirect_uri,
|
|
4366
|
+
state
|
|
4367
|
+
});
|
|
4368
|
+
const queryString = `${params.toString()}&scope=${encodeURIComponent(
|
|
4369
|
+
scope
|
|
4370
|
+
)}`;
|
|
4371
|
+
const url = `${path}?${queryString}`;
|
|
4372
|
+
return env?.requests.get(url, {
|
|
4367
4373
|
headers: {
|
|
4368
|
-
|
|
4369
|
-
}
|
|
4374
|
+
"Content-Type": "application/json"
|
|
4375
|
+
},
|
|
4376
|
+
withCredentials: true
|
|
4370
4377
|
});
|
|
4371
4378
|
},
|
|
4372
4379
|
[env]
|
|
@@ -4542,6 +4549,7 @@ var axiosClient = {
|
|
|
4542
4549
|
const localStorage2 = config?.localStorageUtils ?? localStorageUtils();
|
|
4543
4550
|
const sessionStorage2 = config?.sessionStorageUtils ?? sessionStorageUtils();
|
|
4544
4551
|
const db = config?.db;
|
|
4552
|
+
const database = config?.database;
|
|
4545
4553
|
let isRefreshing = false;
|
|
4546
4554
|
let failedQueue = [];
|
|
4547
4555
|
const processQueue = (error, token = null) => {
|
|
@@ -4565,6 +4573,9 @@ var axiosClient = {
|
|
|
4565
4573
|
if (useActionToken && actionToken) {
|
|
4566
4574
|
config2.headers["Action-Token"] = actionToken;
|
|
4567
4575
|
}
|
|
4576
|
+
if (database) {
|
|
4577
|
+
config2.headers["DATABASE"] = config2.DATABASE;
|
|
4578
|
+
}
|
|
4568
4579
|
const getToken = useRefreshToken ? localStorage2.getRefreshToken : localStorage2.getAccessToken;
|
|
4569
4580
|
const token = await getToken?.();
|
|
4570
4581
|
if (token) config2.headers["Authorization"] = `Bearer ${token}`;
|
|
@@ -5965,13 +5976,16 @@ var useSignInSSO = () => {
|
|
|
5965
5976
|
state,
|
|
5966
5977
|
client_id,
|
|
5967
5978
|
response_type,
|
|
5968
|
-
path
|
|
5979
|
+
path,
|
|
5980
|
+
scope
|
|
5969
5981
|
}) => {
|
|
5970
5982
|
return signInSSO({
|
|
5971
5983
|
redirect_uri,
|
|
5972
5984
|
state,
|
|
5973
5985
|
client_id,
|
|
5974
|
-
response_type
|
|
5986
|
+
response_type,
|
|
5987
|
+
path,
|
|
5988
|
+
scope
|
|
5975
5989
|
});
|
|
5976
5990
|
}
|
|
5977
5991
|
});
|
package/dist/services.d.mts
CHANGED
|
@@ -229,11 +229,13 @@ declare function useViewService(): {
|
|
|
229
229
|
kwargs: any;
|
|
230
230
|
model: string;
|
|
231
231
|
}) => Promise<any>;
|
|
232
|
-
signInSSO: ({ redirect_uri, state, client_id, response_type, }: {
|
|
232
|
+
signInSSO: ({ redirect_uri, state, client_id, response_type, path, scope, }: {
|
|
233
233
|
redirect_uri: string;
|
|
234
234
|
state: string;
|
|
235
235
|
client_id: string;
|
|
236
236
|
response_type: string;
|
|
237
|
+
path: string;
|
|
238
|
+
scope: string;
|
|
237
239
|
}) => Promise<any>;
|
|
238
240
|
verify2FA: ({ method, with_context, code, device, location, }: {
|
|
239
241
|
method: string;
|
package/dist/services.d.ts
CHANGED
|
@@ -229,11 +229,13 @@ declare function useViewService(): {
|
|
|
229
229
|
kwargs: any;
|
|
230
230
|
model: string;
|
|
231
231
|
}) => Promise<any>;
|
|
232
|
-
signInSSO: ({ redirect_uri, state, client_id, response_type, }: {
|
|
232
|
+
signInSSO: ({ redirect_uri, state, client_id, response_type, path, scope, }: {
|
|
233
233
|
redirect_uri: string;
|
|
234
234
|
state: string;
|
|
235
235
|
client_id: string;
|
|
236
236
|
response_type: string;
|
|
237
|
+
path: string;
|
|
238
|
+
scope: string;
|
|
237
239
|
}) => Promise<any>;
|
|
238
240
|
verify2FA: ({ method, with_context, code, device, location, }: {
|
|
239
241
|
method: string;
|
package/dist/services.js
CHANGED
|
@@ -4565,18 +4565,25 @@ function useViewService() {
|
|
|
4565
4565
|
redirect_uri,
|
|
4566
4566
|
state,
|
|
4567
4567
|
client_id,
|
|
4568
|
-
response_type
|
|
4568
|
+
response_type,
|
|
4569
|
+
path,
|
|
4570
|
+
scope
|
|
4569
4571
|
}) => {
|
|
4570
|
-
const
|
|
4571
|
-
|
|
4572
|
-
state,
|
|
4572
|
+
const params = new URLSearchParams({
|
|
4573
|
+
response_type,
|
|
4573
4574
|
client_id,
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4575
|
+
redirect_uri,
|
|
4576
|
+
state
|
|
4577
|
+
});
|
|
4578
|
+
const queryString = `${params.toString()}&scope=${encodeURIComponent(
|
|
4579
|
+
scope
|
|
4580
|
+
)}`;
|
|
4581
|
+
const url = `${path}?${queryString}`;
|
|
4582
|
+
return env?.requests.get(url, {
|
|
4577
4583
|
headers: {
|
|
4578
|
-
|
|
4579
|
-
}
|
|
4584
|
+
"Content-Type": "application/json"
|
|
4585
|
+
},
|
|
4586
|
+
withCredentials: true
|
|
4580
4587
|
});
|
|
4581
4588
|
},
|
|
4582
4589
|
[env]
|
package/dist/services.mjs
CHANGED
|
@@ -4521,18 +4521,25 @@ function useViewService() {
|
|
|
4521
4521
|
redirect_uri,
|
|
4522
4522
|
state,
|
|
4523
4523
|
client_id,
|
|
4524
|
-
response_type
|
|
4524
|
+
response_type,
|
|
4525
|
+
path,
|
|
4526
|
+
scope
|
|
4525
4527
|
}) => {
|
|
4526
|
-
const
|
|
4527
|
-
|
|
4528
|
-
state,
|
|
4528
|
+
const params = new URLSearchParams({
|
|
4529
|
+
response_type,
|
|
4529
4530
|
client_id,
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
4531
|
+
redirect_uri,
|
|
4532
|
+
state
|
|
4533
|
+
});
|
|
4534
|
+
const queryString = `${params.toString()}&scope=${encodeURIComponent(
|
|
4535
|
+
scope
|
|
4536
|
+
)}`;
|
|
4537
|
+
const url = `${path}?${queryString}`;
|
|
4538
|
+
return env?.requests.get(url, {
|
|
4533
4539
|
headers: {
|
|
4534
|
-
|
|
4535
|
-
}
|
|
4540
|
+
"Content-Type": "application/json"
|
|
4541
|
+
},
|
|
4542
|
+
withCredentials: true
|
|
4536
4543
|
});
|
|
4537
4544
|
},
|
|
4538
4545
|
[env]
|
package/package.json
CHANGED
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@fctc/interface-logic",
|
|
3
|
-
"version": "2.0.
|
|
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
|
-
"./types": {
|
|
54
|
-
"types": "./dist/types.d.ts",
|
|
55
|
-
"import": "./dist/types.mjs",
|
|
56
|
-
"require": "./dist/types.cjs"
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
"files": [
|
|
60
|
-
"dist"
|
|
61
|
-
],
|
|
62
|
-
"scripts": {
|
|
63
|
-
"build": "tsup",
|
|
64
|
-
"test": "jest"
|
|
65
|
-
},
|
|
66
|
-
"peerDependencies": {
|
|
67
|
-
"react": "18.0.0",
|
|
68
|
-
"@tanstack/react-query": "^5.83.0"
|
|
69
|
-
},
|
|
70
|
-
"dependencies": {
|
|
71
|
-
"@reduxjs/toolkit": "^2.8.2",
|
|
72
|
-
"@tanstack/react-query": "^5.83.0",
|
|
73
|
-
"axios": "^1.11.0",
|
|
74
|
-
"moment": "^2.30.1",
|
|
75
|
-
"react-redux": "^9.2.0"
|
|
76
|
-
},
|
|
77
|
-
"devDependencies": {
|
|
78
|
-
"@types/react": "^18.3.1",
|
|
79
|
-
"react": "18.0.0",
|
|
80
|
-
"jest": "^29.7.0",
|
|
81
|
-
"tsup": "^8.0.0",
|
|
82
|
-
"typescript": "^5.8.2"
|
|
83
|
-
},
|
|
84
|
-
"packageManager": "yarn@1.22.0"
|
|
85
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@fctc/interface-logic",
|
|
3
|
+
"version": "2.0.2",
|
|
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
|
+
"./types": {
|
|
54
|
+
"types": "./dist/types.d.ts",
|
|
55
|
+
"import": "./dist/types.mjs",
|
|
56
|
+
"require": "./dist/types.cjs"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"files": [
|
|
60
|
+
"dist"
|
|
61
|
+
],
|
|
62
|
+
"scripts": {
|
|
63
|
+
"build": "tsup",
|
|
64
|
+
"test": "jest"
|
|
65
|
+
},
|
|
66
|
+
"peerDependencies": {
|
|
67
|
+
"react": "18.0.0",
|
|
68
|
+
"@tanstack/react-query": "^5.83.0"
|
|
69
|
+
},
|
|
70
|
+
"dependencies": {
|
|
71
|
+
"@reduxjs/toolkit": "^2.8.2",
|
|
72
|
+
"@tanstack/react-query": "^5.83.0",
|
|
73
|
+
"axios": "^1.11.0",
|
|
74
|
+
"moment": "^2.30.1",
|
|
75
|
+
"react-redux": "^9.2.0"
|
|
76
|
+
},
|
|
77
|
+
"devDependencies": {
|
|
78
|
+
"@types/react": "^18.3.1",
|
|
79
|
+
"react": "18.0.0",
|
|
80
|
+
"jest": "^29.7.0",
|
|
81
|
+
"tsup": "^8.0.0",
|
|
82
|
+
"typescript": "^5.8.2"
|
|
83
|
+
},
|
|
84
|
+
"packageManager": "yarn@1.22.0"
|
|
85
|
+
}
|