@fctc/interface-logic 3.0.9 → 3.1.1
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/hooks.d.mts +6 -5
- package/dist/hooks.d.ts +6 -5
- package/dist/hooks.js +8 -8
- package/dist/hooks.mjs +8 -8
- package/dist/provider.js +8 -8
- package/dist/provider.mjs +8 -8
- package/dist/services.d.mts +1 -1
- package/dist/services.d.ts +1 -1
- package/dist/services.js +2 -2
- package/dist/services.mjs +2 -2
- package/package.json +1 -1
package/dist/hooks.d.mts
CHANGED
|
@@ -42,13 +42,14 @@ declare const useValidateActionToken: () => _tanstack_react_query.UseMutationRes
|
|
|
42
42
|
actionToken: string;
|
|
43
43
|
}, unknown>;
|
|
44
44
|
|
|
45
|
-
declare const useGetCompanyInfo: (
|
|
45
|
+
declare const useGetCompanyInfo: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
46
46
|
service?: string;
|
|
47
|
-
|
|
47
|
+
id: number;
|
|
48
|
+
}, unknown>;
|
|
48
49
|
|
|
49
|
-
declare const useGetCurrentCompany: (
|
|
50
|
+
declare const useGetCurrentCompany: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
50
51
|
service?: string;
|
|
51
|
-
}
|
|
52
|
+
}, unknown>;
|
|
52
53
|
|
|
53
54
|
declare const useGetListCompany: (companyIDs?: number[]) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
54
55
|
|
|
@@ -228,7 +229,7 @@ declare const useSave: () => _tanstack_react_query.UseMutationResult<any, Error,
|
|
|
228
229
|
xNode?: string;
|
|
229
230
|
}, unknown>;
|
|
230
231
|
|
|
231
|
-
declare const useGetProfile: (
|
|
232
|
+
declare const useGetProfile: (service?: string, path?: string) => _tanstack_react_query.UseMutationResult<any, Error, void, unknown>;
|
|
232
233
|
|
|
233
234
|
declare const useGetUser: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
234
235
|
id: any;
|
package/dist/hooks.d.ts
CHANGED
|
@@ -42,13 +42,14 @@ declare const useValidateActionToken: () => _tanstack_react_query.UseMutationRes
|
|
|
42
42
|
actionToken: string;
|
|
43
43
|
}, unknown>;
|
|
44
44
|
|
|
45
|
-
declare const useGetCompanyInfo: (
|
|
45
|
+
declare const useGetCompanyInfo: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
46
46
|
service?: string;
|
|
47
|
-
|
|
47
|
+
id: number;
|
|
48
|
+
}, unknown>;
|
|
48
49
|
|
|
49
|
-
declare const useGetCurrentCompany: (
|
|
50
|
+
declare const useGetCurrentCompany: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
50
51
|
service?: string;
|
|
51
|
-
}
|
|
52
|
+
}, unknown>;
|
|
52
53
|
|
|
53
54
|
declare const useGetListCompany: (companyIDs?: number[]) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
54
55
|
|
|
@@ -228,7 +229,7 @@ declare const useSave: () => _tanstack_react_query.UseMutationResult<any, Error,
|
|
|
228
229
|
xNode?: string;
|
|
229
230
|
}, unknown>;
|
|
230
231
|
|
|
231
|
-
declare const useGetProfile: (
|
|
232
|
+
declare const useGetProfile: (service?: string, path?: string) => _tanstack_react_query.UseMutationResult<any, Error, void, unknown>;
|
|
232
233
|
|
|
233
234
|
declare const useGetUser: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
234
235
|
id: any;
|
package/dist/hooks.js
CHANGED
|
@@ -4268,9 +4268,9 @@ var import_react13 = require("react");
|
|
|
4268
4268
|
function useUserService() {
|
|
4269
4269
|
const { env } = useEnv();
|
|
4270
4270
|
const getProfile = (0, import_react13.useCallback)(
|
|
4271
|
-
async (
|
|
4271
|
+
async (service, path) => {
|
|
4272
4272
|
return env?.requests?.get(
|
|
4273
|
-
path
|
|
4273
|
+
path || "/userinfo" /* PROFILE_PATH */,
|
|
4274
4274
|
{
|
|
4275
4275
|
headers: {
|
|
4276
4276
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
@@ -5486,20 +5486,20 @@ var use_validate_action_token_default = useValidateActionToken;
|
|
|
5486
5486
|
|
|
5487
5487
|
// src/hooks/company/use-get-company-info.ts
|
|
5488
5488
|
var import_react_query15 = require("@tanstack/react-query");
|
|
5489
|
-
var useGetCompanyInfo = (
|
|
5489
|
+
var useGetCompanyInfo = () => {
|
|
5490
5490
|
const { getInfoCompany } = useCompanyService();
|
|
5491
5491
|
return (0, import_react_query15.useMutation)({
|
|
5492
|
-
mutationFn: (id) => getInfoCompany(id, service)
|
|
5492
|
+
mutationFn: ({ service, id }) => getInfoCompany(id, service)
|
|
5493
5493
|
});
|
|
5494
5494
|
};
|
|
5495
5495
|
var use_get_company_info_default = useGetCompanyInfo;
|
|
5496
5496
|
|
|
5497
5497
|
// src/hooks/company/use-get-current-company.ts
|
|
5498
5498
|
var import_react_query16 = require("@tanstack/react-query");
|
|
5499
|
-
var useGetCurrentCompany = (
|
|
5499
|
+
var useGetCurrentCompany = () => {
|
|
5500
5500
|
const { getCurrentCompany } = useCompanyService();
|
|
5501
5501
|
return (0, import_react_query16.useMutation)({
|
|
5502
|
-
mutationFn: () => getCurrentCompany(service)
|
|
5502
|
+
mutationFn: ({ service }) => getCurrentCompany(service)
|
|
5503
5503
|
});
|
|
5504
5504
|
};
|
|
5505
5505
|
var use_get_current_company_default = useGetCurrentCompany;
|
|
@@ -6142,10 +6142,10 @@ var use_save_default = useSave;
|
|
|
6142
6142
|
|
|
6143
6143
|
// src/hooks/user/use-get-profile.ts
|
|
6144
6144
|
var import_react_query42 = require("@tanstack/react-query");
|
|
6145
|
-
var useGetProfile = (
|
|
6145
|
+
var useGetProfile = (service, path) => {
|
|
6146
6146
|
const { getProfile } = useUserService();
|
|
6147
6147
|
return (0, import_react_query42.useMutation)({
|
|
6148
|
-
mutationFn: () => getProfile(
|
|
6148
|
+
mutationFn: () => getProfile(service, path)
|
|
6149
6149
|
});
|
|
6150
6150
|
};
|
|
6151
6151
|
var use_get_profile_default = useGetProfile;
|
package/dist/hooks.mjs
CHANGED
|
@@ -4145,9 +4145,9 @@ import { useCallback as useCallback9 } from "react";
|
|
|
4145
4145
|
function useUserService() {
|
|
4146
4146
|
const { env } = useEnv();
|
|
4147
4147
|
const getProfile = useCallback9(
|
|
4148
|
-
async (
|
|
4148
|
+
async (service, path) => {
|
|
4149
4149
|
return env?.requests?.get(
|
|
4150
|
-
path
|
|
4150
|
+
path || "/userinfo" /* PROFILE_PATH */,
|
|
4151
4151
|
{
|
|
4152
4152
|
headers: {
|
|
4153
4153
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
@@ -5363,20 +5363,20 @@ var use_validate_action_token_default = useValidateActionToken;
|
|
|
5363
5363
|
|
|
5364
5364
|
// src/hooks/company/use-get-company-info.ts
|
|
5365
5365
|
import { useMutation as useMutation13 } from "@tanstack/react-query";
|
|
5366
|
-
var useGetCompanyInfo = (
|
|
5366
|
+
var useGetCompanyInfo = () => {
|
|
5367
5367
|
const { getInfoCompany } = useCompanyService();
|
|
5368
5368
|
return useMutation13({
|
|
5369
|
-
mutationFn: (id) => getInfoCompany(id, service)
|
|
5369
|
+
mutationFn: ({ service, id }) => getInfoCompany(id, service)
|
|
5370
5370
|
});
|
|
5371
5371
|
};
|
|
5372
5372
|
var use_get_company_info_default = useGetCompanyInfo;
|
|
5373
5373
|
|
|
5374
5374
|
// src/hooks/company/use-get-current-company.ts
|
|
5375
5375
|
import { useMutation as useMutation14 } from "@tanstack/react-query";
|
|
5376
|
-
var useGetCurrentCompany = (
|
|
5376
|
+
var useGetCurrentCompany = () => {
|
|
5377
5377
|
const { getCurrentCompany } = useCompanyService();
|
|
5378
5378
|
return useMutation14({
|
|
5379
|
-
mutationFn: () => getCurrentCompany(service)
|
|
5379
|
+
mutationFn: ({ service }) => getCurrentCompany(service)
|
|
5380
5380
|
});
|
|
5381
5381
|
};
|
|
5382
5382
|
var use_get_current_company_default = useGetCurrentCompany;
|
|
@@ -6019,10 +6019,10 @@ var use_save_default = useSave;
|
|
|
6019
6019
|
|
|
6020
6020
|
// src/hooks/user/use-get-profile.ts
|
|
6021
6021
|
import { useMutation as useMutation30 } from "@tanstack/react-query";
|
|
6022
|
-
var useGetProfile = (
|
|
6022
|
+
var useGetProfile = (service, path) => {
|
|
6023
6023
|
const { getProfile } = useUserService();
|
|
6024
6024
|
return useMutation30({
|
|
6025
|
-
mutationFn: () => getProfile(
|
|
6025
|
+
mutationFn: () => getProfile(service, path)
|
|
6026
6026
|
});
|
|
6027
6027
|
};
|
|
6028
6028
|
var use_get_profile_default = useGetProfile;
|
package/dist/provider.js
CHANGED
|
@@ -4274,9 +4274,9 @@ var import_react9 = require("react");
|
|
|
4274
4274
|
function useUserService() {
|
|
4275
4275
|
const { env } = useEnv();
|
|
4276
4276
|
const getProfile = (0, import_react9.useCallback)(
|
|
4277
|
-
async (
|
|
4277
|
+
async (service, path) => {
|
|
4278
4278
|
return env?.requests?.get(
|
|
4279
|
-
path
|
|
4279
|
+
path || "/userinfo" /* PROFILE_PATH */,
|
|
4280
4280
|
{
|
|
4281
4281
|
headers: {
|
|
4282
4282
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
@@ -5873,20 +5873,20 @@ var use_validate_action_token_default = useValidateActionToken;
|
|
|
5873
5873
|
|
|
5874
5874
|
// src/hooks/company/use-get-company-info.ts
|
|
5875
5875
|
var import_react_query15 = require("@tanstack/react-query");
|
|
5876
|
-
var useGetCompanyInfo = (
|
|
5876
|
+
var useGetCompanyInfo = () => {
|
|
5877
5877
|
const { getInfoCompany } = useCompanyService();
|
|
5878
5878
|
return (0, import_react_query15.useMutation)({
|
|
5879
|
-
mutationFn: (id) => getInfoCompany(id, service)
|
|
5879
|
+
mutationFn: ({ service, id }) => getInfoCompany(id, service)
|
|
5880
5880
|
});
|
|
5881
5881
|
};
|
|
5882
5882
|
var use_get_company_info_default = useGetCompanyInfo;
|
|
5883
5883
|
|
|
5884
5884
|
// src/hooks/company/use-get-current-company.ts
|
|
5885
5885
|
var import_react_query16 = require("@tanstack/react-query");
|
|
5886
|
-
var useGetCurrentCompany = (
|
|
5886
|
+
var useGetCurrentCompany = () => {
|
|
5887
5887
|
const { getCurrentCompany } = useCompanyService();
|
|
5888
5888
|
return (0, import_react_query16.useMutation)({
|
|
5889
|
-
mutationFn: () => getCurrentCompany(service)
|
|
5889
|
+
mutationFn: ({ service }) => getCurrentCompany(service)
|
|
5890
5890
|
});
|
|
5891
5891
|
};
|
|
5892
5892
|
var use_get_current_company_default = useGetCurrentCompany;
|
|
@@ -6529,10 +6529,10 @@ var use_save_default = useSave;
|
|
|
6529
6529
|
|
|
6530
6530
|
// src/hooks/user/use-get-profile.ts
|
|
6531
6531
|
var import_react_query42 = require("@tanstack/react-query");
|
|
6532
|
-
var useGetProfile = (
|
|
6532
|
+
var useGetProfile = (service, path) => {
|
|
6533
6533
|
const { getProfile } = useUserService();
|
|
6534
6534
|
return (0, import_react_query42.useMutation)({
|
|
6535
|
-
mutationFn: () => getProfile(
|
|
6535
|
+
mutationFn: () => getProfile(service, path)
|
|
6536
6536
|
});
|
|
6537
6537
|
};
|
|
6538
6538
|
var use_get_profile_default = useGetProfile;
|
package/dist/provider.mjs
CHANGED
|
@@ -4231,9 +4231,9 @@ import { useCallback as useCallback8 } from "react";
|
|
|
4231
4231
|
function useUserService() {
|
|
4232
4232
|
const { env } = useEnv();
|
|
4233
4233
|
const getProfile = useCallback8(
|
|
4234
|
-
async (
|
|
4234
|
+
async (service, path) => {
|
|
4235
4235
|
return env?.requests?.get(
|
|
4236
|
-
path
|
|
4236
|
+
path || "/userinfo" /* PROFILE_PATH */,
|
|
4237
4237
|
{
|
|
4238
4238
|
headers: {
|
|
4239
4239
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
@@ -5830,20 +5830,20 @@ var use_validate_action_token_default = useValidateActionToken;
|
|
|
5830
5830
|
|
|
5831
5831
|
// src/hooks/company/use-get-company-info.ts
|
|
5832
5832
|
import { useMutation as useMutation13 } from "@tanstack/react-query";
|
|
5833
|
-
var useGetCompanyInfo = (
|
|
5833
|
+
var useGetCompanyInfo = () => {
|
|
5834
5834
|
const { getInfoCompany } = useCompanyService();
|
|
5835
5835
|
return useMutation13({
|
|
5836
|
-
mutationFn: (id) => getInfoCompany(id, service)
|
|
5836
|
+
mutationFn: ({ service, id }) => getInfoCompany(id, service)
|
|
5837
5837
|
});
|
|
5838
5838
|
};
|
|
5839
5839
|
var use_get_company_info_default = useGetCompanyInfo;
|
|
5840
5840
|
|
|
5841
5841
|
// src/hooks/company/use-get-current-company.ts
|
|
5842
5842
|
import { useMutation as useMutation14 } from "@tanstack/react-query";
|
|
5843
|
-
var useGetCurrentCompany = (
|
|
5843
|
+
var useGetCurrentCompany = () => {
|
|
5844
5844
|
const { getCurrentCompany } = useCompanyService();
|
|
5845
5845
|
return useMutation14({
|
|
5846
|
-
mutationFn: () => getCurrentCompany(service)
|
|
5846
|
+
mutationFn: ({ service }) => getCurrentCompany(service)
|
|
5847
5847
|
});
|
|
5848
5848
|
};
|
|
5849
5849
|
var use_get_current_company_default = useGetCurrentCompany;
|
|
@@ -6486,10 +6486,10 @@ var use_save_default = useSave;
|
|
|
6486
6486
|
|
|
6487
6487
|
// src/hooks/user/use-get-profile.ts
|
|
6488
6488
|
import { useMutation as useMutation30 } from "@tanstack/react-query";
|
|
6489
|
-
var useGetProfile = (
|
|
6489
|
+
var useGetProfile = (service, path) => {
|
|
6490
6490
|
const { getProfile } = useUserService();
|
|
6491
6491
|
return useMutation30({
|
|
6492
|
-
mutationFn: () => getProfile(
|
|
6492
|
+
mutationFn: () => getProfile(service, path)
|
|
6493
6493
|
});
|
|
6494
6494
|
};
|
|
6495
6495
|
var use_get_profile_default = useGetProfile;
|
package/dist/services.d.mts
CHANGED
|
@@ -223,7 +223,7 @@ declare function useModelService(): {
|
|
|
223
223
|
};
|
|
224
224
|
|
|
225
225
|
declare function useUserService(): {
|
|
226
|
-
getProfile: (
|
|
226
|
+
getProfile: (service?: string, path?: string) => Promise<any>;
|
|
227
227
|
getUser: ({ context, id }: {
|
|
228
228
|
context: any;
|
|
229
229
|
id: any;
|
package/dist/services.d.ts
CHANGED
|
@@ -223,7 +223,7 @@ declare function useModelService(): {
|
|
|
223
223
|
};
|
|
224
224
|
|
|
225
225
|
declare function useUserService(): {
|
|
226
|
-
getProfile: (
|
|
226
|
+
getProfile: (service?: string, path?: string) => Promise<any>;
|
|
227
227
|
getUser: ({ context, id }: {
|
|
228
228
|
context: any;
|
|
229
229
|
id: any;
|
package/dist/services.js
CHANGED
|
@@ -4424,9 +4424,9 @@ var import_react13 = require("react");
|
|
|
4424
4424
|
function useUserService() {
|
|
4425
4425
|
const { env } = useEnv();
|
|
4426
4426
|
const getProfile = (0, import_react13.useCallback)(
|
|
4427
|
-
async (
|
|
4427
|
+
async (service, path) => {
|
|
4428
4428
|
return env?.requests?.get(
|
|
4429
|
-
path
|
|
4429
|
+
path || "/userinfo" /* PROFILE_PATH */,
|
|
4430
4430
|
{
|
|
4431
4431
|
headers: {
|
|
4432
4432
|
"Content-Type": "application/x-www-form-urlencoded"
|
package/dist/services.mjs
CHANGED
|
@@ -4380,9 +4380,9 @@ import { useCallback as useCallback9 } from "react";
|
|
|
4380
4380
|
function useUserService() {
|
|
4381
4381
|
const { env } = useEnv();
|
|
4382
4382
|
const getProfile = useCallback9(
|
|
4383
|
-
async (
|
|
4383
|
+
async (service, path) => {
|
|
4384
4384
|
return env?.requests?.get(
|
|
4385
|
-
path
|
|
4385
|
+
path || "/userinfo" /* PROFILE_PATH */,
|
|
4386
4386
|
{
|
|
4387
4387
|
headers: {
|
|
4388
4388
|
"Content-Type": "application/x-www-form-urlencoded"
|