@fctc/interface-logic 2.5.6 → 2.5.7
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/constants.d.mts +4 -2
- package/dist/constants.d.ts +4 -2
- package/dist/constants.js +2 -0
- package/dist/constants.mjs +2 -0
- package/dist/hooks.d.mts +31 -356
- package/dist/hooks.d.ts +31 -356
- package/dist/hooks.js +301 -1
- package/dist/hooks.mjs +296 -1
- package/dist/provider.d.mts +8 -7
- package/dist/provider.d.ts +8 -7
- package/dist/provider.js +182 -1
- package/dist/provider.mjs +182 -1
- package/dist/services.d.mts +37 -0
- package/dist/services.d.ts +37 -0
- package/dist/services.js +182 -1
- package/dist/services.mjs +182 -1
- package/dist/use-verify-totp-BLzI9aQL.d.mts +374 -0
- package/dist/use-verify-totp-lH2HZdt4.d.ts +374 -0
- package/package.json +90 -90
package/dist/hooks.js
CHANGED
|
@@ -32,6 +32,7 @@ var hooks_exports = {};
|
|
|
32
32
|
__export(hooks_exports, {
|
|
33
33
|
useButton: () => use_button_default,
|
|
34
34
|
useChangeStatus: () => use_change_status_default,
|
|
35
|
+
useCreateSession: () => use_create_session_default,
|
|
35
36
|
useDelete: () => use_delete_default,
|
|
36
37
|
useDeleteComment: () => use_delete_comment_default,
|
|
37
38
|
useDuplicateRecord: () => use_duplicate_record_default,
|
|
@@ -40,6 +41,7 @@ __export(hooks_exports, {
|
|
|
40
41
|
useForgotPassword: () => use_forgot_password_default,
|
|
41
42
|
useForgotPasswordSSO: () => use_forgotpassword_sso_default,
|
|
42
43
|
useGet2FAMethods: () => uset_get_2FA_method_default,
|
|
44
|
+
useGetASession: () => use_a_session_default,
|
|
43
45
|
useGetAccessByCode: () => use_get_access_by_code_default,
|
|
44
46
|
useGetActionDetail: () => use_get_action_detail_default,
|
|
45
47
|
useGetAll: () => use_get_all_default,
|
|
@@ -69,12 +71,14 @@ __export(hooks_exports, {
|
|
|
69
71
|
useGetUser: () => use_get_user_default,
|
|
70
72
|
useGetView: () => use_get_view_default,
|
|
71
73
|
useGrantAccess: () => use_grant_access_default,
|
|
74
|
+
useHandleClosingSession: () => use_handle_closing_session_default,
|
|
72
75
|
useIsValidToken: () => use_isvalid_token_default,
|
|
73
76
|
useLoadAction: () => use_load_action_default,
|
|
74
77
|
useLoadMessage: () => use_load_message_default,
|
|
75
78
|
useLoginCredential: () => use_login_credential_default,
|
|
76
79
|
useLoginSocial: () => use_login_socical_default,
|
|
77
80
|
useLogout: () => use_logout_default,
|
|
81
|
+
useManageSession: () => use_manage_session_default,
|
|
78
82
|
useModel: () => use_model_default,
|
|
79
83
|
useOdooDataTransform: () => use_odoo_data_transform_default,
|
|
80
84
|
useOnChangeForm: () => use_onchange_form_default,
|
|
@@ -91,6 +95,7 @@ __export(hooks_exports, {
|
|
|
91
95
|
useSettingsWebRead2fa: () => use_settings_web_read_2fa_default,
|
|
92
96
|
useSignInSSO: () => use_signin_sso_default,
|
|
93
97
|
useSwitchLocale: () => use_switch_locale_default,
|
|
98
|
+
useUpdateClosedSession: () => use_update_closed_session_default,
|
|
94
99
|
useUpdatePassword: () => use_update_password_default,
|
|
95
100
|
useUploadFile: () => use_upload_file_default,
|
|
96
101
|
useUploadFileExcel: () => use_upload_file_excel_default,
|
|
@@ -137,6 +142,7 @@ var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
|
137
142
|
UriConstants2["GRANT_ACCESS"] = "/grant-access";
|
|
138
143
|
UriConstants2["TOKEN_BY_CODE"] = "/token";
|
|
139
144
|
UriConstants2["LOGOUT"] = "/logout";
|
|
145
|
+
UriConstants2["CREATE_UPDATE"] = "/create_update";
|
|
140
146
|
return UriConstants2;
|
|
141
147
|
})(UriConstants || {});
|
|
142
148
|
|
|
@@ -4563,6 +4569,166 @@ function useViewService() {
|
|
|
4563
4569
|
},
|
|
4564
4570
|
[env]
|
|
4565
4571
|
);
|
|
4572
|
+
const getASession = (0, import_react14.useCallback)(
|
|
4573
|
+
async ({
|
|
4574
|
+
model,
|
|
4575
|
+
args,
|
|
4576
|
+
domain,
|
|
4577
|
+
service,
|
|
4578
|
+
xNode
|
|
4579
|
+
}) => {
|
|
4580
|
+
const jsonData = {
|
|
4581
|
+
model,
|
|
4582
|
+
method: "web_search_read" /* WEB_SEARCH_READ */,
|
|
4583
|
+
args,
|
|
4584
|
+
kwargs: {
|
|
4585
|
+
domain: [domain],
|
|
4586
|
+
specification: {
|
|
4587
|
+
name: {},
|
|
4588
|
+
user_id: {},
|
|
4589
|
+
config_id: {},
|
|
4590
|
+
start_at: {},
|
|
4591
|
+
stop_at: {},
|
|
4592
|
+
sequence_number: {},
|
|
4593
|
+
login_number: {},
|
|
4594
|
+
payment_method_ids: {},
|
|
4595
|
+
state: {},
|
|
4596
|
+
update_stock_at_closing: {},
|
|
4597
|
+
cash_register_balance_start: {}
|
|
4598
|
+
}
|
|
4599
|
+
}
|
|
4600
|
+
};
|
|
4601
|
+
return env?.requests.post(
|
|
4602
|
+
"/call" /* CALL_PATH */,
|
|
4603
|
+
jsonData,
|
|
4604
|
+
{
|
|
4605
|
+
headers: {
|
|
4606
|
+
"Content-Type": "application/json",
|
|
4607
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
4608
|
+
}
|
|
4609
|
+
},
|
|
4610
|
+
service
|
|
4611
|
+
);
|
|
4612
|
+
},
|
|
4613
|
+
[env]
|
|
4614
|
+
);
|
|
4615
|
+
const updateClosedSession = (0, import_react14.useCallback)(
|
|
4616
|
+
({
|
|
4617
|
+
model,
|
|
4618
|
+
domain,
|
|
4619
|
+
values,
|
|
4620
|
+
service,
|
|
4621
|
+
xNode
|
|
4622
|
+
}) => {
|
|
4623
|
+
const jsonData = {
|
|
4624
|
+
model,
|
|
4625
|
+
domain,
|
|
4626
|
+
values
|
|
4627
|
+
};
|
|
4628
|
+
return env?.requests.post(
|
|
4629
|
+
"/create_update" /* CREATE_UPDATE */,
|
|
4630
|
+
jsonData,
|
|
4631
|
+
{
|
|
4632
|
+
headers: {
|
|
4633
|
+
"Content-Type": "application/json",
|
|
4634
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
4635
|
+
}
|
|
4636
|
+
},
|
|
4637
|
+
service
|
|
4638
|
+
);
|
|
4639
|
+
},
|
|
4640
|
+
[env]
|
|
4641
|
+
);
|
|
4642
|
+
const manageSession = (0, import_react14.useCallback)(
|
|
4643
|
+
({
|
|
4644
|
+
model,
|
|
4645
|
+
method,
|
|
4646
|
+
ids,
|
|
4647
|
+
args,
|
|
4648
|
+
kwargs,
|
|
4649
|
+
xNode,
|
|
4650
|
+
service
|
|
4651
|
+
}) => {
|
|
4652
|
+
const jsonData = {
|
|
4653
|
+
model,
|
|
4654
|
+
method,
|
|
4655
|
+
ids,
|
|
4656
|
+
args,
|
|
4657
|
+
kwargs
|
|
4658
|
+
};
|
|
4659
|
+
return env?.requests.post(
|
|
4660
|
+
"/call" /* CALL_PATH */,
|
|
4661
|
+
jsonData,
|
|
4662
|
+
{
|
|
4663
|
+
headers: {
|
|
4664
|
+
"Content-Type": "application/json",
|
|
4665
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
4666
|
+
}
|
|
4667
|
+
},
|
|
4668
|
+
service
|
|
4669
|
+
);
|
|
4670
|
+
},
|
|
4671
|
+
[env]
|
|
4672
|
+
);
|
|
4673
|
+
const handleClosingSession = (0, import_react14.useCallback)(
|
|
4674
|
+
({
|
|
4675
|
+
model,
|
|
4676
|
+
method,
|
|
4677
|
+
ids,
|
|
4678
|
+
kwargs,
|
|
4679
|
+
xNode,
|
|
4680
|
+
service
|
|
4681
|
+
}) => {
|
|
4682
|
+
const jsonData = {
|
|
4683
|
+
model,
|
|
4684
|
+
method,
|
|
4685
|
+
ids,
|
|
4686
|
+
kwargs
|
|
4687
|
+
};
|
|
4688
|
+
return env?.requests.post(
|
|
4689
|
+
"/call" /* CALL_PATH */,
|
|
4690
|
+
jsonData,
|
|
4691
|
+
{
|
|
4692
|
+
headers: {
|
|
4693
|
+
"Content-Type": "application/json",
|
|
4694
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
4695
|
+
}
|
|
4696
|
+
},
|
|
4697
|
+
service
|
|
4698
|
+
);
|
|
4699
|
+
},
|
|
4700
|
+
[env]
|
|
4701
|
+
);
|
|
4702
|
+
const createSession = (0, import_react14.useCallback)(
|
|
4703
|
+
({
|
|
4704
|
+
model,
|
|
4705
|
+
configId,
|
|
4706
|
+
xNode,
|
|
4707
|
+
service
|
|
4708
|
+
}) => {
|
|
4709
|
+
const jsonData = {
|
|
4710
|
+
model,
|
|
4711
|
+
method: "create" /* CREATE */,
|
|
4712
|
+
args: [
|
|
4713
|
+
{
|
|
4714
|
+
config_id: configId
|
|
4715
|
+
}
|
|
4716
|
+
]
|
|
4717
|
+
};
|
|
4718
|
+
return env?.requests.post(
|
|
4719
|
+
"/call" /* CALL_PATH */,
|
|
4720
|
+
jsonData,
|
|
4721
|
+
{
|
|
4722
|
+
headers: {
|
|
4723
|
+
"Content-Type": "application/json",
|
|
4724
|
+
...xNode ? { "X-Node": xNode } : {}
|
|
4725
|
+
}
|
|
4726
|
+
},
|
|
4727
|
+
service
|
|
4728
|
+
);
|
|
4729
|
+
},
|
|
4730
|
+
[env]
|
|
4731
|
+
);
|
|
4566
4732
|
return {
|
|
4567
4733
|
getView,
|
|
4568
4734
|
getMenu,
|
|
@@ -4578,7 +4744,12 @@ function useViewService() {
|
|
|
4578
4744
|
signInSSO,
|
|
4579
4745
|
verify2FA,
|
|
4580
4746
|
get2FAMethods,
|
|
4581
|
-
verifyTotp
|
|
4747
|
+
verifyTotp,
|
|
4748
|
+
getASession,
|
|
4749
|
+
updateClosedSession,
|
|
4750
|
+
manageSession,
|
|
4751
|
+
handleClosingSession,
|
|
4752
|
+
createSession
|
|
4582
4753
|
};
|
|
4583
4754
|
}
|
|
4584
4755
|
|
|
@@ -5901,10 +6072,135 @@ var useVerifyTotp = () => {
|
|
|
5901
6072
|
});
|
|
5902
6073
|
};
|
|
5903
6074
|
var use_verify_totp_default = useVerifyTotp;
|
|
6075
|
+
|
|
6076
|
+
// src/hooks/view/use-a-session.ts
|
|
6077
|
+
var import_react_query70 = require("@tanstack/react-query");
|
|
6078
|
+
var useGetASession = () => {
|
|
6079
|
+
const { getASession } = useViewService();
|
|
6080
|
+
return (0, import_react_query70.useMutation)({
|
|
6081
|
+
mutationFn: ({
|
|
6082
|
+
model,
|
|
6083
|
+
args,
|
|
6084
|
+
domain,
|
|
6085
|
+
service,
|
|
6086
|
+
xNode
|
|
6087
|
+
}) => {
|
|
6088
|
+
return getASession({
|
|
6089
|
+
model,
|
|
6090
|
+
args,
|
|
6091
|
+
domain,
|
|
6092
|
+
service,
|
|
6093
|
+
xNode
|
|
6094
|
+
});
|
|
6095
|
+
}
|
|
6096
|
+
});
|
|
6097
|
+
};
|
|
6098
|
+
var use_a_session_default = useGetASession;
|
|
6099
|
+
|
|
6100
|
+
// src/hooks/view/use-update-closed-session.ts
|
|
6101
|
+
var import_react_query71 = require("@tanstack/react-query");
|
|
6102
|
+
var useUpdateClosedSession = () => {
|
|
6103
|
+
const { updateClosedSession } = useViewService();
|
|
6104
|
+
return (0, import_react_query71.useMutation)({
|
|
6105
|
+
mutationFn: ({
|
|
6106
|
+
model,
|
|
6107
|
+
domain,
|
|
6108
|
+
values,
|
|
6109
|
+
service,
|
|
6110
|
+
xNode
|
|
6111
|
+
}) => {
|
|
6112
|
+
return updateClosedSession({
|
|
6113
|
+
model,
|
|
6114
|
+
domain,
|
|
6115
|
+
values,
|
|
6116
|
+
service,
|
|
6117
|
+
xNode
|
|
6118
|
+
});
|
|
6119
|
+
}
|
|
6120
|
+
});
|
|
6121
|
+
};
|
|
6122
|
+
var use_update_closed_session_default = useUpdateClosedSession;
|
|
6123
|
+
|
|
6124
|
+
// src/hooks/view/use-manage-session.ts
|
|
6125
|
+
var import_react_query72 = require("@tanstack/react-query");
|
|
6126
|
+
var useManageSession = () => {
|
|
6127
|
+
const { manageSession } = useViewService();
|
|
6128
|
+
return (0, import_react_query72.useMutation)({
|
|
6129
|
+
mutationFn: ({
|
|
6130
|
+
model,
|
|
6131
|
+
ids,
|
|
6132
|
+
args,
|
|
6133
|
+
kwargs,
|
|
6134
|
+
service,
|
|
6135
|
+
xNode,
|
|
6136
|
+
method
|
|
6137
|
+
}) => {
|
|
6138
|
+
return manageSession({
|
|
6139
|
+
model,
|
|
6140
|
+
method,
|
|
6141
|
+
ids,
|
|
6142
|
+
args,
|
|
6143
|
+
kwargs,
|
|
6144
|
+
service,
|
|
6145
|
+
xNode
|
|
6146
|
+
});
|
|
6147
|
+
}
|
|
6148
|
+
});
|
|
6149
|
+
};
|
|
6150
|
+
var use_manage_session_default = useManageSession;
|
|
6151
|
+
|
|
6152
|
+
// src/hooks/view/use-handle-closing-session.ts
|
|
6153
|
+
var import_react_query73 = require("@tanstack/react-query");
|
|
6154
|
+
var useHandleClosingSession = () => {
|
|
6155
|
+
const { handleClosingSession } = useViewService();
|
|
6156
|
+
return (0, import_react_query73.useMutation)({
|
|
6157
|
+
mutationFn: ({
|
|
6158
|
+
model,
|
|
6159
|
+
method,
|
|
6160
|
+
ids,
|
|
6161
|
+
kwargs,
|
|
6162
|
+
xNode,
|
|
6163
|
+
service
|
|
6164
|
+
}) => {
|
|
6165
|
+
return handleClosingSession({
|
|
6166
|
+
model,
|
|
6167
|
+
method,
|
|
6168
|
+
ids,
|
|
6169
|
+
kwargs,
|
|
6170
|
+
service,
|
|
6171
|
+
xNode
|
|
6172
|
+
});
|
|
6173
|
+
}
|
|
6174
|
+
});
|
|
6175
|
+
};
|
|
6176
|
+
var use_handle_closing_session_default = useHandleClosingSession;
|
|
6177
|
+
|
|
6178
|
+
// src/hooks/view/use-create-session.ts
|
|
6179
|
+
var import_react_query74 = require("@tanstack/react-query");
|
|
6180
|
+
var useCreateSession = () => {
|
|
6181
|
+
const { createSession } = useViewService();
|
|
6182
|
+
return (0, import_react_query74.useMutation)({
|
|
6183
|
+
mutationFn: ({
|
|
6184
|
+
model,
|
|
6185
|
+
configId,
|
|
6186
|
+
service,
|
|
6187
|
+
xNode
|
|
6188
|
+
}) => {
|
|
6189
|
+
return createSession({
|
|
6190
|
+
model,
|
|
6191
|
+
configId,
|
|
6192
|
+
service,
|
|
6193
|
+
xNode
|
|
6194
|
+
});
|
|
6195
|
+
}
|
|
6196
|
+
});
|
|
6197
|
+
};
|
|
6198
|
+
var use_create_session_default = useCreateSession;
|
|
5904
6199
|
// Annotate the CommonJS export names for ESM import in node:
|
|
5905
6200
|
0 && (module.exports = {
|
|
5906
6201
|
useButton,
|
|
5907
6202
|
useChangeStatus,
|
|
6203
|
+
useCreateSession,
|
|
5908
6204
|
useDelete,
|
|
5909
6205
|
useDeleteComment,
|
|
5910
6206
|
useDuplicateRecord,
|
|
@@ -5913,6 +6209,7 @@ var use_verify_totp_default = useVerifyTotp;
|
|
|
5913
6209
|
useForgotPassword,
|
|
5914
6210
|
useForgotPasswordSSO,
|
|
5915
6211
|
useGet2FAMethods,
|
|
6212
|
+
useGetASession,
|
|
5916
6213
|
useGetAccessByCode,
|
|
5917
6214
|
useGetActionDetail,
|
|
5918
6215
|
useGetAll,
|
|
@@ -5942,12 +6239,14 @@ var use_verify_totp_default = useVerifyTotp;
|
|
|
5942
6239
|
useGetUser,
|
|
5943
6240
|
useGetView,
|
|
5944
6241
|
useGrantAccess,
|
|
6242
|
+
useHandleClosingSession,
|
|
5945
6243
|
useIsValidToken,
|
|
5946
6244
|
useLoadAction,
|
|
5947
6245
|
useLoadMessage,
|
|
5948
6246
|
useLoginCredential,
|
|
5949
6247
|
useLoginSocial,
|
|
5950
6248
|
useLogout,
|
|
6249
|
+
useManageSession,
|
|
5951
6250
|
useModel,
|
|
5952
6251
|
useOdooDataTransform,
|
|
5953
6252
|
useOnChangeForm,
|
|
@@ -5964,6 +6263,7 @@ var use_verify_totp_default = useVerifyTotp;
|
|
|
5964
6263
|
useSettingsWebRead2fa,
|
|
5965
6264
|
useSignInSSO,
|
|
5966
6265
|
useSwitchLocale,
|
|
6266
|
+
useUpdateClosedSession,
|
|
5967
6267
|
useUpdatePassword,
|
|
5968
6268
|
useUploadFile,
|
|
5969
6269
|
useUploadFileExcel,
|