@fctc/interface-logic 2.5.8 → 2.6.0
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 +387 -5
- package/dist/hooks.d.ts +387 -5
- package/dist/hooks.js +109 -4
- package/dist/hooks.mjs +107 -4
- package/dist/provider.d.mts +11 -1
- package/dist/provider.d.ts +11 -1
- package/dist/provider.js +284 -3
- package/dist/provider.mjs +284 -3
- 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/use-verify-totp-lA66gl-D.d.mts +0 -374
- package/dist/use-verify-totp-wSSlNI9w.d.ts +0 -374
package/dist/hooks.d.ts
CHANGED
|
@@ -1,8 +1,375 @@
|
|
|
1
|
-
export { R as useButton, w as useChangeStatus, D as useDelete, x as useDeleteComment, S as useDuplicateRecord, o as useExecuteImport, p as useExportExcel, u as useForgotPassword, a as useForgotPasswordSSO, T as useGet2FAMethods, j as useGetAccessByCode, U as useGetActionDetail, E as useGetAll, V as useGetCalendar, y as useGetComment, l as useGetCompanyInfo, F as useGetConversionRate, G as useGetCurrency, m as useGetCurrentCompany, H as useGetDetail, q as useGetFieldExport, I as useGetFieldOnChange, r as useGetFileExcel, z as useGetFormView, W as useGetGroups, A as useGetImage, n as useGetListCompany, X as useGetListData, J as useGetListMyBankAccount, Y as useGetMenu, Z as useGetPrintReport, _ as useGetProGressBar, O as useGetProfile, b as useGetProvider, $ as useGetResequence, a0 as useGetSelection, P as useGetUser, a1 as useGetView, a9 as useGrantAccess, c as useIsValidToken, a2 as useLoadAction, a3 as useLoadMessage, d as useLoginCredential, e as useLoginSocial, i as useLogout, K as useModel, L as useOdooDataTransform, M as useOnChangeForm, s as useParsePreview, a4 as usePrint, a5 as useRemoveRow, aa as useRemoveTotpSetup, ab as useRequestSetupTotp, f as useResetPassword, g as useResetPasswordSSO, a6 as useRunAction, N as useSave, B as useSendComment, ac as useSettingsWebRead2fa, a7 as useSignInSSO, Q as useSwitchLocale, h as useUpdatePassword, ae as useUploadFile, t as useUploadFileExcel, v as useUploadIdFile, C as useUploadImage, k as useValidateActionToken, a8 as useVerify2FA, ad as useVerifyTotp } from './use-verify-totp-wSSlNI9w.js';
|
|
2
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
3
|
-
import './view-type-xxw9OeSR.js';
|
|
4
|
-
import './base-model-type-DD8uZnDP.js';
|
|
5
|
-
import './models.js';
|
|
2
|
+
import { L as LoginCredentialBody, d as SocialTokenBody, F as ForgotPasswordBody, u as updatePasswordBody, V as ViewData, C as ContextApi, c as GetSelectionType, f as GetViewParams } from './view-type-xxw9OeSR.js';
|
|
3
|
+
import { B as BaseModelInit } from './base-model-type-DD8uZnDP.js';
|
|
4
|
+
import { BaseModel } from './models.js';
|
|
5
|
+
|
|
6
|
+
declare const useForgotPassword: () => _tanstack_react_query.UseMutationResult<any, Error, string, unknown>;
|
|
7
|
+
|
|
8
|
+
declare const useForgotPasswordSSO: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
9
|
+
email: string;
|
|
10
|
+
with_context: any;
|
|
11
|
+
method: string;
|
|
12
|
+
}, unknown>;
|
|
13
|
+
|
|
14
|
+
type ProviderPropsType = {
|
|
15
|
+
db: string;
|
|
16
|
+
};
|
|
17
|
+
declare const useGetProvider: () => _tanstack_react_query.UseMutationResult<any, Error, ProviderPropsType, unknown>;
|
|
18
|
+
|
|
19
|
+
declare const useIsValidToken: () => _tanstack_react_query.UseMutationResult<any, Error, string, unknown>;
|
|
20
|
+
|
|
21
|
+
declare const useLoginCredential: () => _tanstack_react_query.UseMutationResult<any, Error, LoginCredentialBody, unknown>;
|
|
22
|
+
|
|
23
|
+
declare const useLoginSocial: () => _tanstack_react_query.UseMutationResult<any, Error, SocialTokenBody, unknown>;
|
|
24
|
+
|
|
25
|
+
declare const useResetPassword: () => _tanstack_react_query.UseMutationResult<any, Error, ForgotPasswordBody, unknown>;
|
|
26
|
+
|
|
27
|
+
declare const useResetPasswordSSO: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
28
|
+
method: any;
|
|
29
|
+
password: string;
|
|
30
|
+
with_context: any;
|
|
31
|
+
}, unknown>;
|
|
32
|
+
|
|
33
|
+
declare const useUpdatePassword: () => _tanstack_react_query.UseMutationResult<any, Error, updatePasswordBody, unknown>;
|
|
34
|
+
|
|
35
|
+
declare const useLogout: () => _tanstack_react_query.UseMutationResult<any, Error, string | undefined, unknown>;
|
|
36
|
+
|
|
37
|
+
declare const useGetAccessByCode: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
38
|
+
code: string;
|
|
39
|
+
}, unknown>;
|
|
40
|
+
|
|
41
|
+
declare const useValidateActionToken: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
42
|
+
actionToken: string;
|
|
43
|
+
}, unknown>;
|
|
44
|
+
|
|
45
|
+
declare const useGetCompanyInfo: () => _tanstack_react_query.UseMutationResult<any, Error, number, unknown>;
|
|
46
|
+
|
|
47
|
+
declare const useGetCurrentCompany: () => _tanstack_react_query.UseMutationResult<any, Error, void, unknown>;
|
|
48
|
+
|
|
49
|
+
declare const useGetListCompany: (companyIDs?: number[]) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
50
|
+
|
|
51
|
+
declare const useExportExcel: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
52
|
+
model: string;
|
|
53
|
+
domain: any;
|
|
54
|
+
ids: any;
|
|
55
|
+
fields: any;
|
|
56
|
+
type: any;
|
|
57
|
+
importCompat: any;
|
|
58
|
+
context: any;
|
|
59
|
+
groupby: any;
|
|
60
|
+
}, unknown>;
|
|
61
|
+
|
|
62
|
+
declare const useGetFieldExport: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
63
|
+
ids: any;
|
|
64
|
+
model: string;
|
|
65
|
+
isShow?: boolean;
|
|
66
|
+
parentField?: any;
|
|
67
|
+
fieldType?: any;
|
|
68
|
+
parentName?: any;
|
|
69
|
+
prefix?: any;
|
|
70
|
+
name?: any;
|
|
71
|
+
context: any;
|
|
72
|
+
importCompat?: any;
|
|
73
|
+
}, unknown>;
|
|
74
|
+
|
|
75
|
+
declare const useGetFileExcel: ({ model }: {
|
|
76
|
+
model: string;
|
|
77
|
+
}) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
78
|
+
|
|
79
|
+
declare const useParsePreview: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
80
|
+
id: any;
|
|
81
|
+
selectedSheet: any;
|
|
82
|
+
isHeader: boolean;
|
|
83
|
+
context: any;
|
|
84
|
+
}, unknown>;
|
|
85
|
+
|
|
86
|
+
declare const useUploadFileExcel: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
87
|
+
formData: any;
|
|
88
|
+
}, unknown>;
|
|
89
|
+
|
|
90
|
+
declare const useUploadIdFile: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
91
|
+
formData: any;
|
|
92
|
+
}, unknown>;
|
|
93
|
+
|
|
94
|
+
declare const useExecuteImport: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
95
|
+
fields: any;
|
|
96
|
+
columns: any;
|
|
97
|
+
idFile: any;
|
|
98
|
+
options: any;
|
|
99
|
+
dryrun: any;
|
|
100
|
+
context: any;
|
|
101
|
+
}, unknown>;
|
|
102
|
+
|
|
103
|
+
declare const useChangeStatus: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
104
|
+
data: any;
|
|
105
|
+
}, unknown>;
|
|
106
|
+
|
|
107
|
+
declare const useDeleteComment: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
108
|
+
data: any;
|
|
109
|
+
}, unknown>;
|
|
110
|
+
|
|
111
|
+
declare const useGetComment: ({ data, queryKey }: {
|
|
112
|
+
data: any;
|
|
113
|
+
queryKey: any;
|
|
114
|
+
}) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
115
|
+
|
|
116
|
+
type TFormView = {
|
|
117
|
+
model: string;
|
|
118
|
+
id?: number | null;
|
|
119
|
+
context?: any;
|
|
120
|
+
};
|
|
121
|
+
declare const useGetFormView: ({ data, queryKey, enabled, }: {
|
|
122
|
+
data: TFormView;
|
|
123
|
+
queryKey?: any;
|
|
124
|
+
enabled?: any;
|
|
125
|
+
}) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
126
|
+
|
|
127
|
+
declare const useGetImage: ({ data, queryKey, src, }: {
|
|
128
|
+
data: any;
|
|
129
|
+
queryKey: any;
|
|
130
|
+
src: any;
|
|
131
|
+
}) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
132
|
+
|
|
133
|
+
declare const useSendComment: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
134
|
+
data: any;
|
|
135
|
+
}, unknown>;
|
|
136
|
+
|
|
137
|
+
declare const useUploadImage: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
138
|
+
formData: any;
|
|
139
|
+
}, unknown>;
|
|
140
|
+
|
|
141
|
+
declare const useUploadFile: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
142
|
+
formData: any;
|
|
143
|
+
}, unknown>;
|
|
144
|
+
|
|
145
|
+
declare const useDelete: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
146
|
+
ids: any;
|
|
147
|
+
model: string;
|
|
148
|
+
service?: string;
|
|
149
|
+
}, unknown>;
|
|
150
|
+
|
|
151
|
+
declare const useGetAll: ({ data, queryKey, viewResponse }: any) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
152
|
+
|
|
153
|
+
declare const useGetConversionRate: () => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
154
|
+
|
|
155
|
+
declare const useGetCurrency: () => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
156
|
+
|
|
157
|
+
declare const useGetDetail: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
158
|
+
model?: string;
|
|
159
|
+
ids: any;
|
|
160
|
+
specification?: any;
|
|
161
|
+
context?: any;
|
|
162
|
+
service?: string;
|
|
163
|
+
xNode?: string;
|
|
164
|
+
}, unknown>;
|
|
165
|
+
|
|
166
|
+
declare const useGetFieldOnChange: ({ model, service, xNode, }: {
|
|
167
|
+
model: string;
|
|
168
|
+
service?: string;
|
|
169
|
+
xNode?: string;
|
|
170
|
+
}) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
171
|
+
|
|
172
|
+
declare const useGetListMyBankAccount: ({ domain, spectification, model, }: {
|
|
173
|
+
domain: any;
|
|
174
|
+
spectification: any;
|
|
175
|
+
model: string;
|
|
176
|
+
}) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
177
|
+
|
|
178
|
+
declare const useModel: () => {
|
|
179
|
+
initModel: (modelData: BaseModelInit) => BaseModel;
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
declare const useOdooDataTransform: () => {
|
|
183
|
+
toDataJS: (data: Record<string, any>, viewData?: ViewData, model?: string) => {
|
|
184
|
+
[x: string]: any;
|
|
185
|
+
};
|
|
186
|
+
parseORM: (data: Record<string, any>) => {
|
|
187
|
+
[x: string]: any;
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
declare const useOnChangeForm: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
192
|
+
ids: any;
|
|
193
|
+
model: string;
|
|
194
|
+
specification: any;
|
|
195
|
+
context: any;
|
|
196
|
+
object: any;
|
|
197
|
+
fieldChange?: any;
|
|
198
|
+
service?: string;
|
|
199
|
+
xNode?: string;
|
|
200
|
+
}, unknown>;
|
|
201
|
+
|
|
202
|
+
declare const useSave: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
203
|
+
ids: any;
|
|
204
|
+
model: string;
|
|
205
|
+
data: any;
|
|
206
|
+
specification?: any;
|
|
207
|
+
context: any;
|
|
208
|
+
path?: string;
|
|
209
|
+
service?: string;
|
|
210
|
+
xNode?: string;
|
|
211
|
+
}, unknown>;
|
|
212
|
+
|
|
213
|
+
declare const useGetProfile: (path?: string) => _tanstack_react_query.UseMutationResult<any, Error, void, unknown>;
|
|
214
|
+
|
|
215
|
+
declare const useGetUser: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
216
|
+
id: any;
|
|
217
|
+
context: ContextApi;
|
|
218
|
+
}, unknown>;
|
|
219
|
+
|
|
220
|
+
type SwitchUserLocaleParams = {
|
|
221
|
+
data: {
|
|
222
|
+
id: number;
|
|
223
|
+
values: any;
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
declare const useSwitchLocale: () => _tanstack_react_query.UseMutationResult<any, Error, SwitchUserLocaleParams, unknown>;
|
|
227
|
+
|
|
228
|
+
declare const useButton: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
229
|
+
model: string;
|
|
230
|
+
ids: Record<string, any>[] | any;
|
|
231
|
+
context: ContextApi;
|
|
232
|
+
method: any;
|
|
233
|
+
service?: string;
|
|
234
|
+
xNode?: string;
|
|
235
|
+
}, unknown>;
|
|
236
|
+
|
|
237
|
+
declare const useDuplicateRecord: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
238
|
+
id: any;
|
|
239
|
+
model: string;
|
|
240
|
+
context: ContextApi;
|
|
241
|
+
service?: string;
|
|
242
|
+
xNode?: string;
|
|
243
|
+
}, unknown>;
|
|
244
|
+
|
|
245
|
+
declare const useGetActionDetail: ({ aid, context, enabled, id, model, queryKey, }: {
|
|
246
|
+
aid: number;
|
|
247
|
+
context: any;
|
|
248
|
+
enabled: boolean;
|
|
249
|
+
id?: number;
|
|
250
|
+
model?: string;
|
|
251
|
+
queryKey?: any;
|
|
252
|
+
}) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
253
|
+
|
|
254
|
+
declare const useGetCalendar: (listDataProps: any, queryKey?: any, enabled?: any) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
255
|
+
|
|
256
|
+
declare const useGetGroups: ({ model, width_context, }: {
|
|
257
|
+
model: string;
|
|
258
|
+
width_context: any;
|
|
259
|
+
}) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
260
|
+
|
|
261
|
+
declare const useGetListData: (listDataProps: any, queryKey?: any, enabled?: any, service?: string, xNode?: string) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
262
|
+
|
|
263
|
+
declare const useGetMenu: (context: any, specification: any, enabled?: boolean, domain?: any) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
264
|
+
|
|
265
|
+
declare const useGetPrintReport: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
266
|
+
id: number;
|
|
267
|
+
}, unknown>;
|
|
268
|
+
|
|
269
|
+
declare const useGetProGressBar: ({ field, color, model, width_context, }: {
|
|
270
|
+
field: any;
|
|
271
|
+
color: any;
|
|
272
|
+
model: string;
|
|
273
|
+
width_context: string;
|
|
274
|
+
}) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
275
|
+
|
|
276
|
+
declare const useGetSelection: ({ data, queryKey, enabled, service, xNode, }: {
|
|
277
|
+
data: GetSelectionType;
|
|
278
|
+
queryKey: any[];
|
|
279
|
+
enabled?: boolean;
|
|
280
|
+
service?: string;
|
|
281
|
+
xNode?: string;
|
|
282
|
+
}) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
283
|
+
|
|
284
|
+
type UseGetViewProps = {
|
|
285
|
+
viewParams: GetViewParams;
|
|
286
|
+
enabled?: boolean;
|
|
287
|
+
};
|
|
288
|
+
declare const useGetView: ({ viewParams, enabled }: UseGetViewProps) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
289
|
+
|
|
290
|
+
declare const useLoadAction: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
291
|
+
idAction: any;
|
|
292
|
+
context: ContextApi;
|
|
293
|
+
service?: string;
|
|
294
|
+
xNode?: string;
|
|
295
|
+
}, unknown>;
|
|
296
|
+
|
|
297
|
+
declare const useLoadMessage: () => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
298
|
+
|
|
299
|
+
declare const usePrint: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
300
|
+
id: number;
|
|
301
|
+
report: any;
|
|
302
|
+
db: any;
|
|
303
|
+
}, unknown>;
|
|
304
|
+
|
|
305
|
+
declare const useRemoveRow: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
306
|
+
model: string;
|
|
307
|
+
ids: Record<string, any>[] | any;
|
|
308
|
+
context: ContextApi;
|
|
309
|
+
service?: string;
|
|
310
|
+
xNode?: string;
|
|
311
|
+
}, unknown>;
|
|
312
|
+
|
|
313
|
+
declare const useGetResequence: (model: string, resIds: any, context: any, offset: any) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
314
|
+
|
|
315
|
+
declare const useRunAction: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
316
|
+
idAction: any;
|
|
317
|
+
context: ContextApi;
|
|
318
|
+
service?: string;
|
|
319
|
+
xNode?: string;
|
|
320
|
+
}, unknown>;
|
|
321
|
+
|
|
322
|
+
declare const useSignInSSO: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
323
|
+
redirect_uri: string;
|
|
324
|
+
state: string;
|
|
325
|
+
client_id: string;
|
|
326
|
+
response_type: string;
|
|
327
|
+
path: string;
|
|
328
|
+
scope: string;
|
|
329
|
+
}, unknown>;
|
|
330
|
+
|
|
331
|
+
declare const useVerify2FA: () => _tanstack_react_query.UseMutationResult<unknown, Error, {
|
|
332
|
+
method: string;
|
|
333
|
+
with_context: any;
|
|
334
|
+
code: string;
|
|
335
|
+
device: string;
|
|
336
|
+
location: string;
|
|
337
|
+
}, unknown>;
|
|
338
|
+
|
|
339
|
+
declare const useGet2FAMethods: () => _tanstack_react_query.UseMutationResult<unknown, Error, {
|
|
340
|
+
method: string;
|
|
341
|
+
with_context: any;
|
|
342
|
+
}, unknown>;
|
|
343
|
+
|
|
344
|
+
declare const useGrantAccess: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
345
|
+
redirect_uri: string;
|
|
346
|
+
state: string;
|
|
347
|
+
client_id: string;
|
|
348
|
+
scopes: string[];
|
|
349
|
+
}, unknown>;
|
|
350
|
+
|
|
351
|
+
declare const useRemoveTotpSetup: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
352
|
+
method: string;
|
|
353
|
+
token: string;
|
|
354
|
+
}, unknown>;
|
|
355
|
+
|
|
356
|
+
declare const useRequestSetupTotp: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
357
|
+
method: string;
|
|
358
|
+
token: string;
|
|
359
|
+
}, unknown>;
|
|
360
|
+
|
|
361
|
+
declare const useSettingsWebRead2fa: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
362
|
+
method: string;
|
|
363
|
+
model: string;
|
|
364
|
+
kwargs: any;
|
|
365
|
+
token: string;
|
|
366
|
+
}, unknown>;
|
|
367
|
+
|
|
368
|
+
declare const useVerifyTotp: () => _tanstack_react_query.UseMutationResult<unknown, Error, {
|
|
369
|
+
method: string;
|
|
370
|
+
action_token: string;
|
|
371
|
+
code: string;
|
|
372
|
+
}, unknown>;
|
|
6
373
|
|
|
7
374
|
declare const useGetASession: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
8
375
|
model: string;
|
|
@@ -69,4 +436,19 @@ declare const useGetList: () => _tanstack_react_query.UseMutationResult<unknown,
|
|
|
69
436
|
specification: any;
|
|
70
437
|
}, unknown>;
|
|
71
438
|
|
|
72
|
-
|
|
439
|
+
declare const useUpdateEntity: () => _tanstack_react_query.UseMutationResult<unknown, Error, {
|
|
440
|
+
model: string;
|
|
441
|
+
domain: [];
|
|
442
|
+
values: {};
|
|
443
|
+
service: string;
|
|
444
|
+
xNode: string;
|
|
445
|
+
}, unknown>;
|
|
446
|
+
|
|
447
|
+
declare const useDeleteEntity: () => _tanstack_react_query.UseMutationResult<unknown, Error, {
|
|
448
|
+
model: string;
|
|
449
|
+
ids: [];
|
|
450
|
+
service: string;
|
|
451
|
+
xNode: string;
|
|
452
|
+
}, unknown>;
|
|
453
|
+
|
|
454
|
+
export { useButton, useChangeStatus, useCreateEntity, useCreateSession, useDelete, useDeleteComment, useDeleteEntity, useDuplicateRecord, useExecuteImport, useExportExcel, useForgotPassword, useForgotPasswordSSO, useGet2FAMethods, useGetASession, useGetAccessByCode, useGetActionDetail, useGetAll, useGetCalendar, useGetComment, useGetCompanyInfo, useGetConversionRate, useGetCurrency, useGetCurrentCompany, useGetDetail, useGetFieldExport, useGetFieldOnChange, useGetFileExcel, useGetFormView, useGetGroups, useGetImage, useGetList, useGetListCompany, useGetListData, useGetListMyBankAccount, useGetMenu, useGetPos, useGetPrintReport, useGetProGressBar, useGetProfile, useGetProvider, useGetResequence, useGetSelection, useGetUser, useGetView, useGrantAccess, useHandleClosingSession, useIsValidToken, useLoadAction, useLoadMessage, useLoginCredential, useLoginSocial, useLogout, useManageSession, useModel, useOdooDataTransform, useOnChangeForm, useParsePreview, usePrint, useRemoveRow, useRemoveTotpSetup, useRequestSetupTotp, useResetPassword, useResetPasswordSSO, useRunAction, useSave, useSendComment, useSettingsWebRead2fa, useSignInSSO, useSwitchLocale, useUpdateClosedSession, useUpdateEntity, useUpdatePassword, useUploadFile, useUploadFileExcel, useUploadIdFile, useUploadImage, useValidateActionToken, useVerify2FA, useVerifyTotp };
|
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,
|