@fctc/interface-logic 2.5.8 → 2.5.9
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 +16 -1
- package/dist/hooks.d.ts +16 -1
- package/dist/hooks.js +109 -4
- package/dist/hooks.mjs +107 -4
- package/dist/provider.js +63 -2
- package/dist/provider.mjs +63 -2
- package/dist/services.d.mts +13 -0
- package/dist/services.d.ts +13 -0
- package/dist/services.js +63 -2
- package/dist/services.mjs +63 -2
- package/package.json +1 -1
package/dist/hooks.d.mts
CHANGED
|
@@ -69,4 +69,19 @@ declare const useGetList: () => _tanstack_react_query.UseMutationResult<unknown,
|
|
|
69
69
|
specification: any;
|
|
70
70
|
}, unknown>;
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
declare const useUpdateEntity: () => _tanstack_react_query.UseMutationResult<unknown, Error, {
|
|
73
|
+
model: string;
|
|
74
|
+
domain: [];
|
|
75
|
+
values: {};
|
|
76
|
+
service: string;
|
|
77
|
+
xNode: string;
|
|
78
|
+
}, unknown>;
|
|
79
|
+
|
|
80
|
+
declare const useDeleteEntity: () => _tanstack_react_query.UseMutationResult<unknown, Error, {
|
|
81
|
+
model: string;
|
|
82
|
+
ids: [];
|
|
83
|
+
service: string;
|
|
84
|
+
xNode: string;
|
|
85
|
+
}, unknown>;
|
|
86
|
+
|
|
87
|
+
export { useCreateEntity, useCreateSession, useDeleteEntity, useGetASession, useGetList, useGetPos, useHandleClosingSession, useManageSession, useUpdateClosedSession, useUpdateEntity };
|
package/dist/hooks.d.ts
CHANGED
|
@@ -69,4 +69,19 @@ declare const useGetList: () => _tanstack_react_query.UseMutationResult<unknown,
|
|
|
69
69
|
specification: any;
|
|
70
70
|
}, unknown>;
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
declare const useUpdateEntity: () => _tanstack_react_query.UseMutationResult<unknown, Error, {
|
|
73
|
+
model: string;
|
|
74
|
+
domain: [];
|
|
75
|
+
values: {};
|
|
76
|
+
service: string;
|
|
77
|
+
xNode: string;
|
|
78
|
+
}, unknown>;
|
|
79
|
+
|
|
80
|
+
declare const useDeleteEntity: () => _tanstack_react_query.UseMutationResult<unknown, Error, {
|
|
81
|
+
model: string;
|
|
82
|
+
ids: [];
|
|
83
|
+
service: string;
|
|
84
|
+
xNode: string;
|
|
85
|
+
}, unknown>;
|
|
86
|
+
|
|
87
|
+
export { useCreateEntity, useCreateSession, useDeleteEntity, useGetASession, useGetList, useGetPos, useHandleClosingSession, useManageSession, useUpdateClosedSession, useUpdateEntity };
|
package/dist/hooks.js
CHANGED
|
@@ -36,13 +36,14 @@ __export(hooks_exports, {
|
|
|
36
36
|
useCreateSession: () => use_create_session_default,
|
|
37
37
|
useDelete: () => use_delete_default,
|
|
38
38
|
useDeleteComment: () => use_delete_comment_default,
|
|
39
|
+
useDeleteEntity: () => use_delete_entity_default,
|
|
39
40
|
useDuplicateRecord: () => use_duplicate_record_default,
|
|
40
41
|
useExecuteImport: () => uss_execute_import_default,
|
|
41
42
|
useExportExcel: () => use_export_excel_default,
|
|
42
43
|
useForgotPassword: () => use_forgot_password_default,
|
|
43
44
|
useForgotPasswordSSO: () => use_forgotpassword_sso_default,
|
|
44
45
|
useGet2FAMethods: () => uset_get_2FA_method_default,
|
|
45
|
-
useGetASession: () =>
|
|
46
|
+
useGetASession: () => use_get_a_session_default,
|
|
46
47
|
useGetAccessByCode: () => use_get_access_by_code_default,
|
|
47
48
|
useGetActionDetail: () => use_get_action_detail_default,
|
|
48
49
|
useGetAll: () => use_get_all_default,
|
|
@@ -99,6 +100,7 @@ __export(hooks_exports, {
|
|
|
99
100
|
useSignInSSO: () => use_signin_sso_default,
|
|
100
101
|
useSwitchLocale: () => use_switch_locale_default,
|
|
101
102
|
useUpdateClosedSession: () => use_update_closed_session_default,
|
|
103
|
+
useUpdateEntity: () => use_update_entity_default,
|
|
102
104
|
useUpdatePassword: () => use_update_password_default,
|
|
103
105
|
useUploadFile: () => use_upload_file_default,
|
|
104
106
|
useUploadFileExcel: () => use_upload_file_excel_default,
|
|
@@ -4846,6 +4848,59 @@ function useViewService() {
|
|
|
4846
4848
|
},
|
|
4847
4849
|
[env]
|
|
4848
4850
|
);
|
|
4851
|
+
const updateEntity = (0, import_react14.useCallback)(
|
|
4852
|
+
({
|
|
4853
|
+
model,
|
|
4854
|
+
domain,
|
|
4855
|
+
values,
|
|
4856
|
+
xNode,
|
|
4857
|
+
service
|
|
4858
|
+
}) => {
|
|
4859
|
+
const jsonData = {
|
|
4860
|
+
model,
|
|
4861
|
+
domain,
|
|
4862
|
+
values
|
|
4863
|
+
};
|
|
4864
|
+
return env?.requests.post(
|
|
4865
|
+
"/create_update" /* CREATE_UPDATE */,
|
|
4866
|
+
jsonData,
|
|
4867
|
+
{
|
|
4868
|
+
headers: {
|
|
4869
|
+
"Content-Type": "application/json",
|
|
4870
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
4871
|
+
}
|
|
4872
|
+
},
|
|
4873
|
+
service
|
|
4874
|
+
);
|
|
4875
|
+
},
|
|
4876
|
+
[env]
|
|
4877
|
+
);
|
|
4878
|
+
const deleteEntity = (0, import_react14.useCallback)(
|
|
4879
|
+
({
|
|
4880
|
+
model,
|
|
4881
|
+
ids,
|
|
4882
|
+
xNode,
|
|
4883
|
+
service
|
|
4884
|
+
}) => {
|
|
4885
|
+
const jsonData = {
|
|
4886
|
+
model,
|
|
4887
|
+
ids,
|
|
4888
|
+
method: "unlink" /* UNLINK */
|
|
4889
|
+
};
|
|
4890
|
+
return env?.requests.post(
|
|
4891
|
+
"/call" /* CALL_PATH */,
|
|
4892
|
+
jsonData,
|
|
4893
|
+
{
|
|
4894
|
+
headers: {
|
|
4895
|
+
"Content-Type": "application/json",
|
|
4896
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
4897
|
+
}
|
|
4898
|
+
},
|
|
4899
|
+
service
|
|
4900
|
+
);
|
|
4901
|
+
},
|
|
4902
|
+
[env]
|
|
4903
|
+
);
|
|
4849
4904
|
return {
|
|
4850
4905
|
getView,
|
|
4851
4906
|
getMenu,
|
|
@@ -4869,7 +4924,9 @@ function useViewService() {
|
|
|
4869
4924
|
createSession,
|
|
4870
4925
|
getPOS,
|
|
4871
4926
|
createEntity,
|
|
4872
|
-
getList
|
|
4927
|
+
getList,
|
|
4928
|
+
updateEntity,
|
|
4929
|
+
deleteEntity
|
|
4873
4930
|
};
|
|
4874
4931
|
}
|
|
4875
4932
|
|
|
@@ -6193,7 +6250,7 @@ var useVerifyTotp = () => {
|
|
|
6193
6250
|
};
|
|
6194
6251
|
var use_verify_totp_default = useVerifyTotp;
|
|
6195
6252
|
|
|
6196
|
-
// src/hooks/view/use-a-session.ts
|
|
6253
|
+
// src/hooks/view/use-get-a-session.ts
|
|
6197
6254
|
var import_react_query70 = require("@tanstack/react-query");
|
|
6198
6255
|
var useGetASession = () => {
|
|
6199
6256
|
const { getASession } = useViewService();
|
|
@@ -6215,7 +6272,7 @@ var useGetASession = () => {
|
|
|
6215
6272
|
}
|
|
6216
6273
|
});
|
|
6217
6274
|
};
|
|
6218
|
-
var
|
|
6275
|
+
var use_get_a_session_default = useGetASession;
|
|
6219
6276
|
|
|
6220
6277
|
// src/hooks/view/use-update-closed-session.ts
|
|
6221
6278
|
var import_react_query71 = require("@tanstack/react-query");
|
|
@@ -6386,6 +6443,52 @@ var useGetList = () => {
|
|
|
6386
6443
|
});
|
|
6387
6444
|
};
|
|
6388
6445
|
var use_get_list_default = useGetList;
|
|
6446
|
+
|
|
6447
|
+
// src/hooks/view/use-update-entity.ts
|
|
6448
|
+
var import_react_query78 = require("@tanstack/react-query");
|
|
6449
|
+
var useUpdateEntity = () => {
|
|
6450
|
+
const { updateEntity } = useViewService();
|
|
6451
|
+
return (0, import_react_query78.useMutation)({
|
|
6452
|
+
mutationFn: ({
|
|
6453
|
+
model,
|
|
6454
|
+
domain,
|
|
6455
|
+
values,
|
|
6456
|
+
xNode,
|
|
6457
|
+
service
|
|
6458
|
+
}) => {
|
|
6459
|
+
return updateEntity({
|
|
6460
|
+
model,
|
|
6461
|
+
domain,
|
|
6462
|
+
values,
|
|
6463
|
+
xNode,
|
|
6464
|
+
service
|
|
6465
|
+
});
|
|
6466
|
+
}
|
|
6467
|
+
});
|
|
6468
|
+
};
|
|
6469
|
+
var use_update_entity_default = useUpdateEntity;
|
|
6470
|
+
|
|
6471
|
+
// src/hooks/view/use-delete-entity.ts
|
|
6472
|
+
var import_react_query79 = require("@tanstack/react-query");
|
|
6473
|
+
var useDeleteEntity = () => {
|
|
6474
|
+
const { deleteEntity } = useViewService();
|
|
6475
|
+
return (0, import_react_query79.useMutation)({
|
|
6476
|
+
mutationFn: ({
|
|
6477
|
+
model,
|
|
6478
|
+
ids,
|
|
6479
|
+
xNode,
|
|
6480
|
+
service
|
|
6481
|
+
}) => {
|
|
6482
|
+
return deleteEntity({
|
|
6483
|
+
model,
|
|
6484
|
+
ids,
|
|
6485
|
+
xNode,
|
|
6486
|
+
service
|
|
6487
|
+
});
|
|
6488
|
+
}
|
|
6489
|
+
});
|
|
6490
|
+
};
|
|
6491
|
+
var use_delete_entity_default = useDeleteEntity;
|
|
6389
6492
|
// Annotate the CommonJS export names for ESM import in node:
|
|
6390
6493
|
0 && (module.exports = {
|
|
6391
6494
|
useButton,
|
|
@@ -6394,6 +6497,7 @@ var use_get_list_default = useGetList;
|
|
|
6394
6497
|
useCreateSession,
|
|
6395
6498
|
useDelete,
|
|
6396
6499
|
useDeleteComment,
|
|
6500
|
+
useDeleteEntity,
|
|
6397
6501
|
useDuplicateRecord,
|
|
6398
6502
|
useExecuteImport,
|
|
6399
6503
|
useExportExcel,
|
|
@@ -6457,6 +6561,7 @@ var use_get_list_default = useGetList;
|
|
|
6457
6561
|
useSignInSSO,
|
|
6458
6562
|
useSwitchLocale,
|
|
6459
6563
|
useUpdateClosedSession,
|
|
6564
|
+
useUpdateEntity,
|
|
6460
6565
|
useUpdatePassword,
|
|
6461
6566
|
useUploadFile,
|
|
6462
6567
|
useUploadFileExcel,
|
package/dist/hooks.mjs
CHANGED
|
@@ -4734,6 +4734,59 @@ function useViewService() {
|
|
|
4734
4734
|
},
|
|
4735
4735
|
[env]
|
|
4736
4736
|
);
|
|
4737
|
+
const updateEntity = useCallback10(
|
|
4738
|
+
({
|
|
4739
|
+
model,
|
|
4740
|
+
domain,
|
|
4741
|
+
values,
|
|
4742
|
+
xNode,
|
|
4743
|
+
service
|
|
4744
|
+
}) => {
|
|
4745
|
+
const jsonData = {
|
|
4746
|
+
model,
|
|
4747
|
+
domain,
|
|
4748
|
+
values
|
|
4749
|
+
};
|
|
4750
|
+
return env?.requests.post(
|
|
4751
|
+
"/create_update" /* CREATE_UPDATE */,
|
|
4752
|
+
jsonData,
|
|
4753
|
+
{
|
|
4754
|
+
headers: {
|
|
4755
|
+
"Content-Type": "application/json",
|
|
4756
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
4757
|
+
}
|
|
4758
|
+
},
|
|
4759
|
+
service
|
|
4760
|
+
);
|
|
4761
|
+
},
|
|
4762
|
+
[env]
|
|
4763
|
+
);
|
|
4764
|
+
const deleteEntity = useCallback10(
|
|
4765
|
+
({
|
|
4766
|
+
model,
|
|
4767
|
+
ids,
|
|
4768
|
+
xNode,
|
|
4769
|
+
service
|
|
4770
|
+
}) => {
|
|
4771
|
+
const jsonData = {
|
|
4772
|
+
model,
|
|
4773
|
+
ids,
|
|
4774
|
+
method: "unlink" /* UNLINK */
|
|
4775
|
+
};
|
|
4776
|
+
return env?.requests.post(
|
|
4777
|
+
"/call" /* CALL_PATH */,
|
|
4778
|
+
jsonData,
|
|
4779
|
+
{
|
|
4780
|
+
headers: {
|
|
4781
|
+
"Content-Type": "application/json",
|
|
4782
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
4783
|
+
}
|
|
4784
|
+
},
|
|
4785
|
+
service
|
|
4786
|
+
);
|
|
4787
|
+
},
|
|
4788
|
+
[env]
|
|
4789
|
+
);
|
|
4737
4790
|
return {
|
|
4738
4791
|
getView,
|
|
4739
4792
|
getMenu,
|
|
@@ -4757,7 +4810,9 @@ function useViewService() {
|
|
|
4757
4810
|
createSession,
|
|
4758
4811
|
getPOS,
|
|
4759
4812
|
createEntity,
|
|
4760
|
-
getList
|
|
4813
|
+
getList,
|
|
4814
|
+
updateEntity,
|
|
4815
|
+
deleteEntity
|
|
4761
4816
|
};
|
|
4762
4817
|
}
|
|
4763
4818
|
|
|
@@ -6081,7 +6136,7 @@ var useVerifyTotp = () => {
|
|
|
6081
6136
|
};
|
|
6082
6137
|
var use_verify_totp_default = useVerifyTotp;
|
|
6083
6138
|
|
|
6084
|
-
// src/hooks/view/use-a-session.ts
|
|
6139
|
+
// src/hooks/view/use-get-a-session.ts
|
|
6085
6140
|
import { useMutation as useMutation48 } from "@tanstack/react-query";
|
|
6086
6141
|
var useGetASession = () => {
|
|
6087
6142
|
const { getASession } = useViewService();
|
|
@@ -6103,7 +6158,7 @@ var useGetASession = () => {
|
|
|
6103
6158
|
}
|
|
6104
6159
|
});
|
|
6105
6160
|
};
|
|
6106
|
-
var
|
|
6161
|
+
var use_get_a_session_default = useGetASession;
|
|
6107
6162
|
|
|
6108
6163
|
// src/hooks/view/use-update-closed-session.ts
|
|
6109
6164
|
import { useMutation as useMutation49 } from "@tanstack/react-query";
|
|
@@ -6274,6 +6329,52 @@ var useGetList = () => {
|
|
|
6274
6329
|
});
|
|
6275
6330
|
};
|
|
6276
6331
|
var use_get_list_default = useGetList;
|
|
6332
|
+
|
|
6333
|
+
// src/hooks/view/use-update-entity.ts
|
|
6334
|
+
import { useMutation as useMutation56 } from "@tanstack/react-query";
|
|
6335
|
+
var useUpdateEntity = () => {
|
|
6336
|
+
const { updateEntity } = useViewService();
|
|
6337
|
+
return useMutation56({
|
|
6338
|
+
mutationFn: ({
|
|
6339
|
+
model,
|
|
6340
|
+
domain,
|
|
6341
|
+
values,
|
|
6342
|
+
xNode,
|
|
6343
|
+
service
|
|
6344
|
+
}) => {
|
|
6345
|
+
return updateEntity({
|
|
6346
|
+
model,
|
|
6347
|
+
domain,
|
|
6348
|
+
values,
|
|
6349
|
+
xNode,
|
|
6350
|
+
service
|
|
6351
|
+
});
|
|
6352
|
+
}
|
|
6353
|
+
});
|
|
6354
|
+
};
|
|
6355
|
+
var use_update_entity_default = useUpdateEntity;
|
|
6356
|
+
|
|
6357
|
+
// src/hooks/view/use-delete-entity.ts
|
|
6358
|
+
import { useMutation as useMutation57 } from "@tanstack/react-query";
|
|
6359
|
+
var useDeleteEntity = () => {
|
|
6360
|
+
const { deleteEntity } = useViewService();
|
|
6361
|
+
return useMutation57({
|
|
6362
|
+
mutationFn: ({
|
|
6363
|
+
model,
|
|
6364
|
+
ids,
|
|
6365
|
+
xNode,
|
|
6366
|
+
service
|
|
6367
|
+
}) => {
|
|
6368
|
+
return deleteEntity({
|
|
6369
|
+
model,
|
|
6370
|
+
ids,
|
|
6371
|
+
xNode,
|
|
6372
|
+
service
|
|
6373
|
+
});
|
|
6374
|
+
}
|
|
6375
|
+
});
|
|
6376
|
+
};
|
|
6377
|
+
var use_delete_entity_default = useDeleteEntity;
|
|
6277
6378
|
export {
|
|
6278
6379
|
use_button_default as useButton,
|
|
6279
6380
|
use_change_status_default as useChangeStatus,
|
|
@@ -6281,13 +6382,14 @@ export {
|
|
|
6281
6382
|
use_create_session_default as useCreateSession,
|
|
6282
6383
|
use_delete_default as useDelete,
|
|
6283
6384
|
use_delete_comment_default as useDeleteComment,
|
|
6385
|
+
use_delete_entity_default as useDeleteEntity,
|
|
6284
6386
|
use_duplicate_record_default as useDuplicateRecord,
|
|
6285
6387
|
uss_execute_import_default as useExecuteImport,
|
|
6286
6388
|
use_export_excel_default as useExportExcel,
|
|
6287
6389
|
use_forgot_password_default as useForgotPassword,
|
|
6288
6390
|
use_forgotpassword_sso_default as useForgotPasswordSSO,
|
|
6289
6391
|
uset_get_2FA_method_default as useGet2FAMethods,
|
|
6290
|
-
|
|
6392
|
+
use_get_a_session_default as useGetASession,
|
|
6291
6393
|
use_get_access_by_code_default as useGetAccessByCode,
|
|
6292
6394
|
use_get_action_detail_default as useGetActionDetail,
|
|
6293
6395
|
use_get_all_default as useGetAll,
|
|
@@ -6344,6 +6446,7 @@ export {
|
|
|
6344
6446
|
use_signin_sso_default as useSignInSSO,
|
|
6345
6447
|
use_switch_locale_default as useSwitchLocale,
|
|
6346
6448
|
use_update_closed_session_default as useUpdateClosedSession,
|
|
6449
|
+
use_update_entity_default as useUpdateEntity,
|
|
6347
6450
|
use_update_password_default as useUpdatePassword,
|
|
6348
6451
|
use_upload_file_default as useUploadFile,
|
|
6349
6452
|
use_upload_file_excel_default as useUploadFileExcel,
|
package/dist/provider.js
CHANGED
|
@@ -4786,6 +4786,59 @@ function useViewService() {
|
|
|
4786
4786
|
},
|
|
4787
4787
|
[env]
|
|
4788
4788
|
);
|
|
4789
|
+
const updateEntity = (0, import_react10.useCallback)(
|
|
4790
|
+
({
|
|
4791
|
+
model,
|
|
4792
|
+
domain,
|
|
4793
|
+
values,
|
|
4794
|
+
xNode,
|
|
4795
|
+
service
|
|
4796
|
+
}) => {
|
|
4797
|
+
const jsonData = {
|
|
4798
|
+
model,
|
|
4799
|
+
domain,
|
|
4800
|
+
values
|
|
4801
|
+
};
|
|
4802
|
+
return env?.requests.post(
|
|
4803
|
+
"/create_update" /* CREATE_UPDATE */,
|
|
4804
|
+
jsonData,
|
|
4805
|
+
{
|
|
4806
|
+
headers: {
|
|
4807
|
+
"Content-Type": "application/json",
|
|
4808
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
4809
|
+
}
|
|
4810
|
+
},
|
|
4811
|
+
service
|
|
4812
|
+
);
|
|
4813
|
+
},
|
|
4814
|
+
[env]
|
|
4815
|
+
);
|
|
4816
|
+
const deleteEntity = (0, import_react10.useCallback)(
|
|
4817
|
+
({
|
|
4818
|
+
model,
|
|
4819
|
+
ids,
|
|
4820
|
+
xNode,
|
|
4821
|
+
service
|
|
4822
|
+
}) => {
|
|
4823
|
+
const jsonData = {
|
|
4824
|
+
model,
|
|
4825
|
+
ids,
|
|
4826
|
+
method: "unlink" /* UNLINK */
|
|
4827
|
+
};
|
|
4828
|
+
return env?.requests.post(
|
|
4829
|
+
"/call" /* CALL_PATH */,
|
|
4830
|
+
jsonData,
|
|
4831
|
+
{
|
|
4832
|
+
headers: {
|
|
4833
|
+
"Content-Type": "application/json",
|
|
4834
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
4835
|
+
}
|
|
4836
|
+
},
|
|
4837
|
+
service
|
|
4838
|
+
);
|
|
4839
|
+
},
|
|
4840
|
+
[env]
|
|
4841
|
+
);
|
|
4789
4842
|
return {
|
|
4790
4843
|
getView,
|
|
4791
4844
|
getMenu,
|
|
@@ -4809,7 +4862,9 @@ function useViewService() {
|
|
|
4809
4862
|
createSession,
|
|
4810
4863
|
getPOS,
|
|
4811
4864
|
createEntity,
|
|
4812
|
-
getList
|
|
4865
|
+
getList,
|
|
4866
|
+
updateEntity,
|
|
4867
|
+
deleteEntity
|
|
4813
4868
|
};
|
|
4814
4869
|
}
|
|
4815
4870
|
|
|
@@ -6551,7 +6606,7 @@ var useVerifyTotp = () => {
|
|
|
6551
6606
|
};
|
|
6552
6607
|
var use_verify_totp_default = useVerifyTotp;
|
|
6553
6608
|
|
|
6554
|
-
// src/hooks/view/use-a-session.ts
|
|
6609
|
+
// src/hooks/view/use-get-a-session.ts
|
|
6555
6610
|
var import_react_query70 = require("@tanstack/react-query");
|
|
6556
6611
|
|
|
6557
6612
|
// src/hooks/view/use-update-closed-session.ts
|
|
@@ -6575,6 +6630,12 @@ var import_react_query76 = require("@tanstack/react-query");
|
|
|
6575
6630
|
// src/hooks/view/use-get-list.ts
|
|
6576
6631
|
var import_react_query77 = require("@tanstack/react-query");
|
|
6577
6632
|
|
|
6633
|
+
// src/hooks/view/use-update-entity.ts
|
|
6634
|
+
var import_react_query78 = require("@tanstack/react-query");
|
|
6635
|
+
|
|
6636
|
+
// src/hooks/view/use-delete-entity.ts
|
|
6637
|
+
var import_react_query79 = require("@tanstack/react-query");
|
|
6638
|
+
|
|
6578
6639
|
// src/provider/service-provider.tsx
|
|
6579
6640
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
6580
6641
|
var ServiceContext = (0, import_react13.createContext)(null);
|
package/dist/provider.mjs
CHANGED
|
@@ -4743,6 +4743,59 @@ function useViewService() {
|
|
|
4743
4743
|
},
|
|
4744
4744
|
[env]
|
|
4745
4745
|
);
|
|
4746
|
+
const updateEntity = useCallback9(
|
|
4747
|
+
({
|
|
4748
|
+
model,
|
|
4749
|
+
domain,
|
|
4750
|
+
values,
|
|
4751
|
+
xNode,
|
|
4752
|
+
service
|
|
4753
|
+
}) => {
|
|
4754
|
+
const jsonData = {
|
|
4755
|
+
model,
|
|
4756
|
+
domain,
|
|
4757
|
+
values
|
|
4758
|
+
};
|
|
4759
|
+
return env?.requests.post(
|
|
4760
|
+
"/create_update" /* CREATE_UPDATE */,
|
|
4761
|
+
jsonData,
|
|
4762
|
+
{
|
|
4763
|
+
headers: {
|
|
4764
|
+
"Content-Type": "application/json",
|
|
4765
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
4766
|
+
}
|
|
4767
|
+
},
|
|
4768
|
+
service
|
|
4769
|
+
);
|
|
4770
|
+
},
|
|
4771
|
+
[env]
|
|
4772
|
+
);
|
|
4773
|
+
const deleteEntity = useCallback9(
|
|
4774
|
+
({
|
|
4775
|
+
model,
|
|
4776
|
+
ids,
|
|
4777
|
+
xNode,
|
|
4778
|
+
service
|
|
4779
|
+
}) => {
|
|
4780
|
+
const jsonData = {
|
|
4781
|
+
model,
|
|
4782
|
+
ids,
|
|
4783
|
+
method: "unlink" /* UNLINK */
|
|
4784
|
+
};
|
|
4785
|
+
return env?.requests.post(
|
|
4786
|
+
"/call" /* CALL_PATH */,
|
|
4787
|
+
jsonData,
|
|
4788
|
+
{
|
|
4789
|
+
headers: {
|
|
4790
|
+
"Content-Type": "application/json",
|
|
4791
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
4792
|
+
}
|
|
4793
|
+
},
|
|
4794
|
+
service
|
|
4795
|
+
);
|
|
4796
|
+
},
|
|
4797
|
+
[env]
|
|
4798
|
+
);
|
|
4746
4799
|
return {
|
|
4747
4800
|
getView,
|
|
4748
4801
|
getMenu,
|
|
@@ -4766,7 +4819,9 @@ function useViewService() {
|
|
|
4766
4819
|
createSession,
|
|
4767
4820
|
getPOS,
|
|
4768
4821
|
createEntity,
|
|
4769
|
-
getList
|
|
4822
|
+
getList,
|
|
4823
|
+
updateEntity,
|
|
4824
|
+
deleteEntity
|
|
4770
4825
|
};
|
|
4771
4826
|
}
|
|
4772
4827
|
|
|
@@ -6508,7 +6563,7 @@ var useVerifyTotp = () => {
|
|
|
6508
6563
|
};
|
|
6509
6564
|
var use_verify_totp_default = useVerifyTotp;
|
|
6510
6565
|
|
|
6511
|
-
// src/hooks/view/use-a-session.ts
|
|
6566
|
+
// src/hooks/view/use-get-a-session.ts
|
|
6512
6567
|
import { useMutation as useMutation48 } from "@tanstack/react-query";
|
|
6513
6568
|
|
|
6514
6569
|
// src/hooks/view/use-update-closed-session.ts
|
|
@@ -6532,6 +6587,12 @@ import { useMutation as useMutation54 } from "@tanstack/react-query";
|
|
|
6532
6587
|
// src/hooks/view/use-get-list.ts
|
|
6533
6588
|
import { useMutation as useMutation55 } from "@tanstack/react-query";
|
|
6534
6589
|
|
|
6590
|
+
// src/hooks/view/use-update-entity.ts
|
|
6591
|
+
import { useMutation as useMutation56 } from "@tanstack/react-query";
|
|
6592
|
+
|
|
6593
|
+
// src/hooks/view/use-delete-entity.ts
|
|
6594
|
+
import { useMutation as useMutation57 } from "@tanstack/react-query";
|
|
6595
|
+
|
|
6535
6596
|
// src/provider/service-provider.tsx
|
|
6536
6597
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
6537
6598
|
var ServiceContext = createContext2(null);
|
package/dist/services.d.mts
CHANGED
|
@@ -329,6 +329,19 @@ declare function useViewService(): {
|
|
|
329
329
|
xNode: string;
|
|
330
330
|
specification: any;
|
|
331
331
|
}) => any;
|
|
332
|
+
updateEntity: ({ model, domain, values, xNode, service, }: {
|
|
333
|
+
model: string;
|
|
334
|
+
domain: [];
|
|
335
|
+
values: {};
|
|
336
|
+
service: string;
|
|
337
|
+
xNode: string;
|
|
338
|
+
}) => any;
|
|
339
|
+
deleteEntity: ({ model, ids, xNode, service, }: {
|
|
340
|
+
model: string;
|
|
341
|
+
ids: [];
|
|
342
|
+
service: string;
|
|
343
|
+
xNode: string;
|
|
344
|
+
}) => any;
|
|
332
345
|
};
|
|
333
346
|
|
|
334
347
|
export { useActionService, useAuthService, useCompanyService, useExcelService, useFormService, useKanbanService, useModelService, useUserService, useViewService };
|
package/dist/services.d.ts
CHANGED
|
@@ -329,6 +329,19 @@ declare function useViewService(): {
|
|
|
329
329
|
xNode: string;
|
|
330
330
|
specification: any;
|
|
331
331
|
}) => any;
|
|
332
|
+
updateEntity: ({ model, domain, values, xNode, service, }: {
|
|
333
|
+
model: string;
|
|
334
|
+
domain: [];
|
|
335
|
+
values: {};
|
|
336
|
+
service: string;
|
|
337
|
+
xNode: string;
|
|
338
|
+
}) => any;
|
|
339
|
+
deleteEntity: ({ model, ids, xNode, service, }: {
|
|
340
|
+
model: string;
|
|
341
|
+
ids: [];
|
|
342
|
+
service: string;
|
|
343
|
+
xNode: string;
|
|
344
|
+
}) => any;
|
|
332
345
|
};
|
|
333
346
|
|
|
334
347
|
export { useActionService, useAuthService, useCompanyService, useExcelService, useFormService, useKanbanService, useModelService, useUserService, useViewService };
|
package/dist/services.js
CHANGED
|
@@ -3050,7 +3050,7 @@ var import_react_query68 = require("@tanstack/react-query");
|
|
|
3050
3050
|
// src/hooks/view/use-verify-totp.ts
|
|
3051
3051
|
var import_react_query69 = require("@tanstack/react-query");
|
|
3052
3052
|
|
|
3053
|
-
// src/hooks/view/use-a-session.ts
|
|
3053
|
+
// src/hooks/view/use-get-a-session.ts
|
|
3054
3054
|
var import_react_query70 = require("@tanstack/react-query");
|
|
3055
3055
|
|
|
3056
3056
|
// src/hooks/view/use-update-closed-session.ts
|
|
@@ -3074,6 +3074,12 @@ var import_react_query76 = require("@tanstack/react-query");
|
|
|
3074
3074
|
// src/hooks/view/use-get-list.ts
|
|
3075
3075
|
var import_react_query77 = require("@tanstack/react-query");
|
|
3076
3076
|
|
|
3077
|
+
// src/hooks/view/use-update-entity.ts
|
|
3078
|
+
var import_react_query78 = require("@tanstack/react-query");
|
|
3079
|
+
|
|
3080
|
+
// src/hooks/view/use-delete-entity.ts
|
|
3081
|
+
var import_react_query79 = require("@tanstack/react-query");
|
|
3082
|
+
|
|
3077
3083
|
// src/provider/service-provider.tsx
|
|
3078
3084
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
3079
3085
|
var ServiceContext = (0, import_react4.createContext)(null);
|
|
@@ -4980,6 +4986,59 @@ function useViewService() {
|
|
|
4980
4986
|
},
|
|
4981
4987
|
[env]
|
|
4982
4988
|
);
|
|
4989
|
+
const updateEntity = (0, import_react14.useCallback)(
|
|
4990
|
+
({
|
|
4991
|
+
model,
|
|
4992
|
+
domain,
|
|
4993
|
+
values,
|
|
4994
|
+
xNode,
|
|
4995
|
+
service
|
|
4996
|
+
}) => {
|
|
4997
|
+
const jsonData = {
|
|
4998
|
+
model,
|
|
4999
|
+
domain,
|
|
5000
|
+
values
|
|
5001
|
+
};
|
|
5002
|
+
return env?.requests.post(
|
|
5003
|
+
"/create_update" /* CREATE_UPDATE */,
|
|
5004
|
+
jsonData,
|
|
5005
|
+
{
|
|
5006
|
+
headers: {
|
|
5007
|
+
"Content-Type": "application/json",
|
|
5008
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
5009
|
+
}
|
|
5010
|
+
},
|
|
5011
|
+
service
|
|
5012
|
+
);
|
|
5013
|
+
},
|
|
5014
|
+
[env]
|
|
5015
|
+
);
|
|
5016
|
+
const deleteEntity = (0, import_react14.useCallback)(
|
|
5017
|
+
({
|
|
5018
|
+
model,
|
|
5019
|
+
ids,
|
|
5020
|
+
xNode,
|
|
5021
|
+
service
|
|
5022
|
+
}) => {
|
|
5023
|
+
const jsonData = {
|
|
5024
|
+
model,
|
|
5025
|
+
ids,
|
|
5026
|
+
method: "unlink" /* UNLINK */
|
|
5027
|
+
};
|
|
5028
|
+
return env?.requests.post(
|
|
5029
|
+
"/call" /* CALL_PATH */,
|
|
5030
|
+
jsonData,
|
|
5031
|
+
{
|
|
5032
|
+
headers: {
|
|
5033
|
+
"Content-Type": "application/json",
|
|
5034
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
5035
|
+
}
|
|
5036
|
+
},
|
|
5037
|
+
service
|
|
5038
|
+
);
|
|
5039
|
+
},
|
|
5040
|
+
[env]
|
|
5041
|
+
);
|
|
4983
5042
|
return {
|
|
4984
5043
|
getView,
|
|
4985
5044
|
getMenu,
|
|
@@ -5003,7 +5062,9 @@ function useViewService() {
|
|
|
5003
5062
|
createSession,
|
|
5004
5063
|
getPOS,
|
|
5005
5064
|
createEntity,
|
|
5006
|
-
getList
|
|
5065
|
+
getList,
|
|
5066
|
+
updateEntity,
|
|
5067
|
+
deleteEntity
|
|
5007
5068
|
};
|
|
5008
5069
|
}
|
|
5009
5070
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/services.mjs
CHANGED
|
@@ -3006,7 +3006,7 @@ import { useMutation as useMutation46 } from "@tanstack/react-query";
|
|
|
3006
3006
|
// src/hooks/view/use-verify-totp.ts
|
|
3007
3007
|
import { useMutation as useMutation47 } from "@tanstack/react-query";
|
|
3008
3008
|
|
|
3009
|
-
// src/hooks/view/use-a-session.ts
|
|
3009
|
+
// src/hooks/view/use-get-a-session.ts
|
|
3010
3010
|
import { useMutation as useMutation48 } from "@tanstack/react-query";
|
|
3011
3011
|
|
|
3012
3012
|
// src/hooks/view/use-update-closed-session.ts
|
|
@@ -3030,6 +3030,12 @@ import { useMutation as useMutation54 } from "@tanstack/react-query";
|
|
|
3030
3030
|
// src/hooks/view/use-get-list.ts
|
|
3031
3031
|
import { useMutation as useMutation55 } from "@tanstack/react-query";
|
|
3032
3032
|
|
|
3033
|
+
// src/hooks/view/use-update-entity.ts
|
|
3034
|
+
import { useMutation as useMutation56 } from "@tanstack/react-query";
|
|
3035
|
+
|
|
3036
|
+
// src/hooks/view/use-delete-entity.ts
|
|
3037
|
+
import { useMutation as useMutation57 } from "@tanstack/react-query";
|
|
3038
|
+
|
|
3033
3039
|
// src/provider/service-provider.tsx
|
|
3034
3040
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
3035
3041
|
var ServiceContext = createContext2(null);
|
|
@@ -4936,6 +4942,59 @@ function useViewService() {
|
|
|
4936
4942
|
},
|
|
4937
4943
|
[env]
|
|
4938
4944
|
);
|
|
4945
|
+
const updateEntity = useCallback10(
|
|
4946
|
+
({
|
|
4947
|
+
model,
|
|
4948
|
+
domain,
|
|
4949
|
+
values,
|
|
4950
|
+
xNode,
|
|
4951
|
+
service
|
|
4952
|
+
}) => {
|
|
4953
|
+
const jsonData = {
|
|
4954
|
+
model,
|
|
4955
|
+
domain,
|
|
4956
|
+
values
|
|
4957
|
+
};
|
|
4958
|
+
return env?.requests.post(
|
|
4959
|
+
"/create_update" /* CREATE_UPDATE */,
|
|
4960
|
+
jsonData,
|
|
4961
|
+
{
|
|
4962
|
+
headers: {
|
|
4963
|
+
"Content-Type": "application/json",
|
|
4964
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
4965
|
+
}
|
|
4966
|
+
},
|
|
4967
|
+
service
|
|
4968
|
+
);
|
|
4969
|
+
},
|
|
4970
|
+
[env]
|
|
4971
|
+
);
|
|
4972
|
+
const deleteEntity = useCallback10(
|
|
4973
|
+
({
|
|
4974
|
+
model,
|
|
4975
|
+
ids,
|
|
4976
|
+
xNode,
|
|
4977
|
+
service
|
|
4978
|
+
}) => {
|
|
4979
|
+
const jsonData = {
|
|
4980
|
+
model,
|
|
4981
|
+
ids,
|
|
4982
|
+
method: "unlink" /* UNLINK */
|
|
4983
|
+
};
|
|
4984
|
+
return env?.requests.post(
|
|
4985
|
+
"/call" /* CALL_PATH */,
|
|
4986
|
+
jsonData,
|
|
4987
|
+
{
|
|
4988
|
+
headers: {
|
|
4989
|
+
"Content-Type": "application/json",
|
|
4990
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
4991
|
+
}
|
|
4992
|
+
},
|
|
4993
|
+
service
|
|
4994
|
+
);
|
|
4995
|
+
},
|
|
4996
|
+
[env]
|
|
4997
|
+
);
|
|
4939
4998
|
return {
|
|
4940
4999
|
getView,
|
|
4941
5000
|
getMenu,
|
|
@@ -4959,7 +5018,9 @@ function useViewService() {
|
|
|
4959
5018
|
createSession,
|
|
4960
5019
|
getPOS,
|
|
4961
5020
|
createEntity,
|
|
4962
|
-
getList
|
|
5021
|
+
getList,
|
|
5022
|
+
updateEntity,
|
|
5023
|
+
deleteEntity
|
|
4963
5024
|
};
|
|
4964
5025
|
}
|
|
4965
5026
|
export {
|