@fctc/interface-logic 1.4.3 → 1.4.5
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/index.d.mts +1212 -0
- package/dist/index.d.ts +1212 -0
- package/dist/{hooks.js → index.js} +1012 -10
- package/dist/{hooks.mjs → index.mjs} +947 -5
- package/package.json +1 -1
- package/dist/configs.d.mts +0 -15
- package/dist/configs.d.ts +0 -15
- package/dist/configs.js +0 -2386
- package/dist/configs.mjs +0 -2349
- package/dist/constants.d.mts +0 -131
- package/dist/constants.d.ts +0 -131
- package/dist/constants.js +0 -205
- package/dist/constants.mjs +0 -166
- package/dist/environment.d.mts +0 -55
- package/dist/environment.d.ts +0 -55
- package/dist/environment.js +0 -3094
- package/dist/environment.mjs +0 -3054
- package/dist/hooks.d.mts +0 -359
- package/dist/hooks.d.ts +0 -359
- package/dist/provider.d.mts +0 -15
- package/dist/provider.d.ts +0 -15
- package/dist/provider.js +0 -3603
- package/dist/provider.mjs +0 -3564
- package/dist/services.d.mts +0 -255
- package/dist/services.d.ts +0 -255
- package/dist/services.js +0 -4662
- package/dist/services.mjs +0 -4617
- package/dist/store.d.mts +0 -643
- package/dist/store.d.ts +0 -643
- package/dist/store.js +0 -814
- package/dist/store.mjs +0 -709
- package/dist/types.d.mts +0 -17
- package/dist/types.d.ts +0 -17
- package/dist/types.js +0 -18
- package/dist/types.mjs +0 -0
- package/dist/utils.d.mts +0 -93
- package/dist/utils.d.ts +0 -93
- package/dist/utils.js +0 -2962
- package/dist/utils.mjs +0 -2896
- package/dist/view-type-BGJfDe73.d.mts +0 -113
- package/dist/view-type-BGJfDe73.d.ts +0 -113
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,1212 @@
|
|
|
1
|
+
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
2
|
+
import { EnhancedStore } from '@reduxjs/toolkit';
|
|
3
|
+
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
4
|
+
import { ReactNode } from 'react';
|
|
5
|
+
import { TypedUseSelectorHook } from 'react-redux';
|
|
6
|
+
import * as redux_thunk from 'redux-thunk';
|
|
7
|
+
import * as redux from 'redux';
|
|
8
|
+
|
|
9
|
+
declare global {
|
|
10
|
+
interface Global {
|
|
11
|
+
envStore?: EnvStore;
|
|
12
|
+
}
|
|
13
|
+
interface Window {
|
|
14
|
+
envStore?: EnvStore;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
declare class EnvStore {
|
|
18
|
+
envStore: EnhancedStore | any;
|
|
19
|
+
baseUrl?: string;
|
|
20
|
+
requests?: any;
|
|
21
|
+
context?: any;
|
|
22
|
+
defaultCompany?: any;
|
|
23
|
+
config?: any;
|
|
24
|
+
companies?: any[];
|
|
25
|
+
user?: any;
|
|
26
|
+
db?: string;
|
|
27
|
+
localStorageUtils?: any;
|
|
28
|
+
sessionStorageUtils?: any;
|
|
29
|
+
refreshTokenEndpoint?: string;
|
|
30
|
+
constructor(envStore: EnhancedStore, localStorageUtils?: any, sessionStorageUtils?: any);
|
|
31
|
+
setup(): void;
|
|
32
|
+
setupEnv(envConfig: EnvStore): void;
|
|
33
|
+
setUid(uid: number): void;
|
|
34
|
+
setLang(lang: string): void;
|
|
35
|
+
setAllowCompanies(allowCompanies: number[]): void;
|
|
36
|
+
setCompanies(companies: any[]): void;
|
|
37
|
+
setDefaultCompany(company: any): void;
|
|
38
|
+
setUserInfo(userInfo: any): void;
|
|
39
|
+
}
|
|
40
|
+
declare function getEnv(): EnvStore;
|
|
41
|
+
|
|
42
|
+
declare const axiosClient: {
|
|
43
|
+
init(config: EnvStore): {
|
|
44
|
+
get: (url: string, headers: any) => Promise<any>;
|
|
45
|
+
post: (url: string, body: any, headers: any) => Promise<any>;
|
|
46
|
+
post_excel: (url: string, body: any, headers: any) => Promise<any>;
|
|
47
|
+
put: (url: string, body: any, headers: any) => Promise<any>;
|
|
48
|
+
patch: (url: string, body: any) => Promise<any>;
|
|
49
|
+
delete: (url: string, body: any) => Promise<any>;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
declare enum KeyConstants {
|
|
54
|
+
PROFILE = "userinfo",
|
|
55
|
+
CURRENT_COMPANY = "current_company",
|
|
56
|
+
LIST_COMPANY = "list_company",
|
|
57
|
+
COMPANY_INFO = "company_info",
|
|
58
|
+
MENU = "menus",
|
|
59
|
+
GET_VIEW_BY_ACTION = "get_view_by_action",
|
|
60
|
+
ACTION_DETAIL = "action_detail",
|
|
61
|
+
GET_DATA_SELECTION = "get_data_select",
|
|
62
|
+
WEB_SAVE = "web_save",
|
|
63
|
+
WEB_READ = "web_read",
|
|
64
|
+
GET_PROVIDER = "get_provider"
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
declare enum MethodConstants {
|
|
68
|
+
WEB_SEARCH_READ = "web_search_read",
|
|
69
|
+
WEB_READ_GROUP = "web_read_group",
|
|
70
|
+
WEB_READ = "web_read",
|
|
71
|
+
WEB_SAVE = "web_save",
|
|
72
|
+
UNLINK = "unlink",
|
|
73
|
+
ONCHANGE = "onchange",
|
|
74
|
+
GET_ONCHANGE_FIELDS = "get_fields_onchange",
|
|
75
|
+
GET_FIELD_VIEW = "get_fields_view_v2"
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
declare enum UriConstants {
|
|
79
|
+
AUTH_TOKEN_PATH = "/authentication/oauth2/token",
|
|
80
|
+
GENTOKEN_SOCIAL = "/token/generate",
|
|
81
|
+
CALL_PATH = "/call",
|
|
82
|
+
COMPANY_PATH = "/company",
|
|
83
|
+
PROFILE_PATH = "/userinfo",
|
|
84
|
+
RESET_PASSWORD_PATH = "/reset_password",
|
|
85
|
+
CHANGE_PASSWORD_PATH = "/change_password",
|
|
86
|
+
UPDATE_PASSWORD_PATH = "/change_password_parent",
|
|
87
|
+
LOAD_ACTION = "/load_action",
|
|
88
|
+
REPORT_PATH = "/report",
|
|
89
|
+
RUN_ACTION_PATH = "/run_action",
|
|
90
|
+
UPLOAD_FILE_PATH = "/upload/file",
|
|
91
|
+
GET_MESSAGE = "/chatter/thread/messages",
|
|
92
|
+
SENT_MESSAGE = "/chatter/message/post",
|
|
93
|
+
UPLOAD_IMAGE = "/mail/attachment/upload",
|
|
94
|
+
DELETE_MESSAGE = "/chatter/message/update_content",
|
|
95
|
+
IMAGE_PATH = "/web/image",
|
|
96
|
+
LOAD_MESSAGE = "/load_message_failures",
|
|
97
|
+
TOKEN = "/check_token",
|
|
98
|
+
CREATE_UPDATE_PATH = "/create_update",
|
|
99
|
+
TWOFA_METHOD_PATH = "/id/api/v2/call",
|
|
100
|
+
SIGNIN_SSO = "/signin-sso/oauth",
|
|
101
|
+
GRANT_ACCESS = "/grant-access",
|
|
102
|
+
TOKEN_BY_CODE = "/token",
|
|
103
|
+
LOGOUT = "/logout"
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
declare enum FieldTypeConstants {
|
|
107
|
+
CHAR = "char",
|
|
108
|
+
TEXT = "text",
|
|
109
|
+
INTEGER = "integer",
|
|
110
|
+
FLOAT = "float",
|
|
111
|
+
BOOLEAN = "boolean",
|
|
112
|
+
DATE = "date",
|
|
113
|
+
DATETIME = "datetime",
|
|
114
|
+
BINARY = "binary",
|
|
115
|
+
SELECTION = "selection",
|
|
116
|
+
HTML = "html",
|
|
117
|
+
MANY2ONE = "many2one",
|
|
118
|
+
ONE2MANY = "one2many",
|
|
119
|
+
MANY2MANY = "many2many",
|
|
120
|
+
MONETARY = "monetary",
|
|
121
|
+
REFERENCE = "reference",
|
|
122
|
+
FUNCTION = "function",
|
|
123
|
+
PROPERTY = "property"
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
declare enum MethodType {
|
|
127
|
+
CREATE = 0,
|
|
128
|
+
UPDATE = 1,
|
|
129
|
+
DELETE = 2,
|
|
130
|
+
UNLINK = 3,
|
|
131
|
+
NO_CHANGE = 4
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
declare enum ModelConstants {
|
|
135
|
+
MENU = "ir.ui.menu",
|
|
136
|
+
USER = "res.users",
|
|
137
|
+
COMPANY = "res.company",
|
|
138
|
+
WINDOW_ACTION = "ir.actions.act_window",
|
|
139
|
+
BASE_IMPORT = "base_import.import",
|
|
140
|
+
GET_IMPORT = "get_import_templates"
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
declare enum ComponentType {
|
|
144
|
+
GROUP = "group",
|
|
145
|
+
FIELD = "field",
|
|
146
|
+
TREE = "tree",
|
|
147
|
+
DIV = "div",
|
|
148
|
+
LIST = "list",
|
|
149
|
+
FORM = "form",
|
|
150
|
+
SETTINGS = "setting",
|
|
151
|
+
SPAN = "span",
|
|
152
|
+
KANBAN = "kanban",
|
|
153
|
+
CALENDAR = "calendar",
|
|
154
|
+
TYPE = "view-type"
|
|
155
|
+
}
|
|
156
|
+
declare const SearchType: {
|
|
157
|
+
FILTER: string;
|
|
158
|
+
SEARCH: string;
|
|
159
|
+
GROUP: string;
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
declare enum WIDGETAVATAR {
|
|
163
|
+
many2one_avatar_user = "many2one_avatar_user",
|
|
164
|
+
many2many_avatar_user = "many2many_avatar_user"
|
|
165
|
+
}
|
|
166
|
+
declare enum WIDGETCURRENCY {
|
|
167
|
+
many2one_avatar_user = "many2one_avatar_user",
|
|
168
|
+
many2many_avatar_user = "many2many_avatar_user"
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
declare enum WIDGETCOLOR {
|
|
172
|
+
many2many_tags = "many2many_tags",
|
|
173
|
+
helpdesk_sla_many2many_tags = "helpdesk_sla_many2many_tags"
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
declare enum WIDGETSTATUS {
|
|
177
|
+
sla_status_ids = "sla_status_ids"
|
|
178
|
+
}
|
|
179
|
+
declare enum WIDGETNOSTRING {
|
|
180
|
+
sla_status_ids = "sla_status_ids"
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
declare const useForgotPassword: () => _tanstack_react_query.UseMutationResult<any, Error, string, unknown>;
|
|
184
|
+
|
|
185
|
+
declare const useForgotPasswordSSO: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
186
|
+
email: string;
|
|
187
|
+
with_context: any;
|
|
188
|
+
method: string;
|
|
189
|
+
}, unknown>;
|
|
190
|
+
|
|
191
|
+
type ProviderPropsType = {
|
|
192
|
+
db: string;
|
|
193
|
+
};
|
|
194
|
+
declare const useGetProvider: () => _tanstack_react_query.UseMutationResult<any, Error, ProviderPropsType, unknown>;
|
|
195
|
+
|
|
196
|
+
declare const useIsValidToken: () => _tanstack_react_query.UseMutationResult<any, Error, string, unknown>;
|
|
197
|
+
|
|
198
|
+
interface LoginCredentialBody {
|
|
199
|
+
email: string;
|
|
200
|
+
password: string;
|
|
201
|
+
path?: string;
|
|
202
|
+
}
|
|
203
|
+
interface ResetPasswordRequest {
|
|
204
|
+
password: string;
|
|
205
|
+
confirmPassword: string;
|
|
206
|
+
}
|
|
207
|
+
interface UpdatePasswordRequest {
|
|
208
|
+
newPassword: string;
|
|
209
|
+
oldPassword: string;
|
|
210
|
+
}
|
|
211
|
+
interface ForgotPasswordBody {
|
|
212
|
+
data: ResetPasswordRequest;
|
|
213
|
+
token: string | null;
|
|
214
|
+
}
|
|
215
|
+
interface updatePasswordBody {
|
|
216
|
+
data: UpdatePasswordRequest;
|
|
217
|
+
token: string | null;
|
|
218
|
+
}
|
|
219
|
+
interface SocialTokenBody {
|
|
220
|
+
state: object;
|
|
221
|
+
access_token: string;
|
|
222
|
+
db: string;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
declare const useLoginCredential: () => _tanstack_react_query.UseMutationResult<any, Error, LoginCredentialBody, unknown>;
|
|
226
|
+
|
|
227
|
+
declare const useLoginSocial: () => _tanstack_react_query.UseMutationResult<any, Error, SocialTokenBody, unknown>;
|
|
228
|
+
|
|
229
|
+
declare const useResetPassword: () => _tanstack_react_query.UseMutationResult<any, Error, ForgotPasswordBody, unknown>;
|
|
230
|
+
|
|
231
|
+
declare const useResetPasswordSSO: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
232
|
+
method: any;
|
|
233
|
+
password: string;
|
|
234
|
+
with_context: any;
|
|
235
|
+
}, unknown>;
|
|
236
|
+
|
|
237
|
+
declare const useUpdatePassword: () => _tanstack_react_query.UseMutationResult<any, Error, updatePasswordBody, unknown>;
|
|
238
|
+
|
|
239
|
+
declare const useLogout: () => _tanstack_react_query.UseMutationResult<any, Error, string, unknown>;
|
|
240
|
+
|
|
241
|
+
declare const useGetAccessByCode: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
242
|
+
code: string;
|
|
243
|
+
}, unknown>;
|
|
244
|
+
|
|
245
|
+
declare const useGetCompanyInfo: () => _tanstack_react_query.UseMutationResult<any, Error, number, unknown>;
|
|
246
|
+
|
|
247
|
+
declare const useGetCurrentCompany: () => _tanstack_react_query.UseMutationResult<any, Error, void, unknown>;
|
|
248
|
+
|
|
249
|
+
declare const useGetListCompany: (companyIDs?: number[]) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
250
|
+
|
|
251
|
+
declare const useExportExcel: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
252
|
+
model: string;
|
|
253
|
+
domain: any;
|
|
254
|
+
ids: any;
|
|
255
|
+
fields: any;
|
|
256
|
+
type: any;
|
|
257
|
+
importCompat: any;
|
|
258
|
+
context: any;
|
|
259
|
+
groupby: any;
|
|
260
|
+
}, unknown>;
|
|
261
|
+
|
|
262
|
+
declare const useGetFieldExport: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
263
|
+
ids: any;
|
|
264
|
+
model: string;
|
|
265
|
+
isShow?: boolean;
|
|
266
|
+
parentField?: any;
|
|
267
|
+
fieldType?: any;
|
|
268
|
+
parentName?: any;
|
|
269
|
+
prefix?: any;
|
|
270
|
+
name?: any;
|
|
271
|
+
context: any;
|
|
272
|
+
importCompat?: any;
|
|
273
|
+
}, unknown>;
|
|
274
|
+
|
|
275
|
+
declare const useGetFileExcel: ({ model }: {
|
|
276
|
+
model: string;
|
|
277
|
+
}) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
278
|
+
|
|
279
|
+
declare const useParsePreview: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
280
|
+
id: any;
|
|
281
|
+
selectedSheet: any;
|
|
282
|
+
isHeader: boolean;
|
|
283
|
+
context: any;
|
|
284
|
+
}, unknown>;
|
|
285
|
+
|
|
286
|
+
declare const useUploadFile: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
287
|
+
formData: any;
|
|
288
|
+
}, unknown>;
|
|
289
|
+
|
|
290
|
+
declare const useUploadIdFile: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
291
|
+
formData: any;
|
|
292
|
+
}, unknown>;
|
|
293
|
+
|
|
294
|
+
declare const useExecuteImport: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
295
|
+
fields: any;
|
|
296
|
+
columns: any;
|
|
297
|
+
idFile: any;
|
|
298
|
+
options: any;
|
|
299
|
+
dryrun: any;
|
|
300
|
+
context: any;
|
|
301
|
+
}, unknown>;
|
|
302
|
+
|
|
303
|
+
declare const useChangeStatus: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
304
|
+
data: any;
|
|
305
|
+
}, unknown>;
|
|
306
|
+
|
|
307
|
+
declare const useDeleteComment: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
308
|
+
data: any;
|
|
309
|
+
}, unknown>;
|
|
310
|
+
|
|
311
|
+
declare const useGetComment: ({ data, queryKey }: {
|
|
312
|
+
data: any;
|
|
313
|
+
queryKey: any;
|
|
314
|
+
}) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
315
|
+
|
|
316
|
+
type TFormView$1 = {
|
|
317
|
+
model: string;
|
|
318
|
+
id?: number | null;
|
|
319
|
+
context?: any;
|
|
320
|
+
};
|
|
321
|
+
declare const useGetFormView: ({ data, queryKey, enabled, }: {
|
|
322
|
+
data: TFormView$1;
|
|
323
|
+
queryKey?: any;
|
|
324
|
+
enabled?: any;
|
|
325
|
+
}) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
326
|
+
|
|
327
|
+
declare const useGetImage: ({ data, queryKey, src, }: {
|
|
328
|
+
data: any;
|
|
329
|
+
queryKey: any;
|
|
330
|
+
src: any;
|
|
331
|
+
}) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
332
|
+
|
|
333
|
+
declare const useSendComment: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
334
|
+
data: any;
|
|
335
|
+
}, unknown>;
|
|
336
|
+
|
|
337
|
+
declare const useUploadImage: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
338
|
+
data: any;
|
|
339
|
+
}, unknown>;
|
|
340
|
+
|
|
341
|
+
declare const useDelete: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
342
|
+
ids: any;
|
|
343
|
+
model: string;
|
|
344
|
+
}, unknown>;
|
|
345
|
+
|
|
346
|
+
declare const useGetAll: ({ data, queryKey, viewResponse }: any) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
347
|
+
|
|
348
|
+
declare const useGetConversionRate: () => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
349
|
+
|
|
350
|
+
declare const useGetCurrency: () => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
351
|
+
|
|
352
|
+
declare const useGetDetail: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
353
|
+
model?: string;
|
|
354
|
+
ids: any;
|
|
355
|
+
specification?: any;
|
|
356
|
+
context?: any;
|
|
357
|
+
}, unknown>;
|
|
358
|
+
|
|
359
|
+
declare const useGetFieldOnChange: ({ model }: {
|
|
360
|
+
model: string;
|
|
361
|
+
}) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
362
|
+
|
|
363
|
+
declare const useGetListMyBankAccount: ({ domain, spectification, model, }: {
|
|
364
|
+
domain: any;
|
|
365
|
+
spectification: any;
|
|
366
|
+
model: string;
|
|
367
|
+
}) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
368
|
+
|
|
369
|
+
interface BaseModelInit {
|
|
370
|
+
name: string;
|
|
371
|
+
view: Record<string, any>;
|
|
372
|
+
actContext?: Record<string, any>;
|
|
373
|
+
fields?: any;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
declare class BaseModel {
|
|
377
|
+
name: string;
|
|
378
|
+
view: Record<string, any>;
|
|
379
|
+
actContext?: Record<string, any>;
|
|
380
|
+
fields?: any;
|
|
381
|
+
constructor(init: BaseModelInit);
|
|
382
|
+
private getSpecificationByFields;
|
|
383
|
+
getTreeProps(): Record<string, any>;
|
|
384
|
+
getTreeFields(): Record<string, any>[];
|
|
385
|
+
getSpecification(): Record<string, any>;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
declare const useModel: () => {
|
|
389
|
+
initModel: (modelData: BaseModelInit) => BaseModel;
|
|
390
|
+
};
|
|
391
|
+
|
|
392
|
+
declare const useOdooDataTransform: () => {
|
|
393
|
+
toDataJS: (data: Record<string, any>, viewData?: ViewData, model?: string) => Record<string, any>;
|
|
394
|
+
parseORM: (data: Record<string, any>) => Record<string, any>;
|
|
395
|
+
};
|
|
396
|
+
|
|
397
|
+
declare const useOnChangeForm: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
398
|
+
ids: any;
|
|
399
|
+
model: string;
|
|
400
|
+
specification: any;
|
|
401
|
+
context: any;
|
|
402
|
+
object: any;
|
|
403
|
+
fieldChange?: any;
|
|
404
|
+
}, unknown>;
|
|
405
|
+
|
|
406
|
+
declare const useSave: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
407
|
+
ids: any;
|
|
408
|
+
model: string;
|
|
409
|
+
data: any;
|
|
410
|
+
specification?: any;
|
|
411
|
+
context: any;
|
|
412
|
+
path?: string;
|
|
413
|
+
}, unknown>;
|
|
414
|
+
|
|
415
|
+
declare const useGetProfile: (path?: string) => _tanstack_react_query.UseMutationResult<any, Error, void, unknown>;
|
|
416
|
+
|
|
417
|
+
interface Specification {
|
|
418
|
+
[key: string]: any;
|
|
419
|
+
}
|
|
420
|
+
interface ContextApi {
|
|
421
|
+
[key: string]: any;
|
|
422
|
+
}
|
|
423
|
+
interface GetAllParams {
|
|
424
|
+
model?: string;
|
|
425
|
+
ids?: number[];
|
|
426
|
+
specification: Specification;
|
|
427
|
+
domain?: any[];
|
|
428
|
+
offset?: number;
|
|
429
|
+
sort: any;
|
|
430
|
+
fields: any;
|
|
431
|
+
groupby: any;
|
|
432
|
+
context?: ContextApi;
|
|
433
|
+
limit?: number;
|
|
434
|
+
}
|
|
435
|
+
interface GetListParams {
|
|
436
|
+
model: string;
|
|
437
|
+
ids?: number[];
|
|
438
|
+
specification?: Specification;
|
|
439
|
+
domain?: any[];
|
|
440
|
+
offset?: number;
|
|
441
|
+
order?: string;
|
|
442
|
+
context?: ContextApi;
|
|
443
|
+
limit?: number;
|
|
444
|
+
}
|
|
445
|
+
interface GetDetailParams {
|
|
446
|
+
ids?: number[];
|
|
447
|
+
model?: string;
|
|
448
|
+
specification?: Specification;
|
|
449
|
+
context?: ContextApi;
|
|
450
|
+
}
|
|
451
|
+
interface SaveParams {
|
|
452
|
+
model: string;
|
|
453
|
+
ids?: number[] | [];
|
|
454
|
+
data?: Record<string, any>;
|
|
455
|
+
specification?: Specification;
|
|
456
|
+
context?: ContextApi;
|
|
457
|
+
path?: string;
|
|
458
|
+
}
|
|
459
|
+
interface DeleteParams {
|
|
460
|
+
ids?: number[];
|
|
461
|
+
model: string;
|
|
462
|
+
}
|
|
463
|
+
interface OnChangeParams {
|
|
464
|
+
ids?: number[];
|
|
465
|
+
model: string;
|
|
466
|
+
object?: Record<string, any>;
|
|
467
|
+
specification: Specification;
|
|
468
|
+
context?: ContextApi;
|
|
469
|
+
fieldChange?: string[];
|
|
470
|
+
}
|
|
471
|
+
interface ViewData {
|
|
472
|
+
models?: {
|
|
473
|
+
[key: string]: {
|
|
474
|
+
[key: string]: {
|
|
475
|
+
type: string;
|
|
476
|
+
relation?: string;
|
|
477
|
+
};
|
|
478
|
+
};
|
|
479
|
+
};
|
|
480
|
+
}
|
|
481
|
+
type GetSelectionType = {
|
|
482
|
+
domain: any;
|
|
483
|
+
context: any;
|
|
484
|
+
model: string;
|
|
485
|
+
specification?: any;
|
|
486
|
+
};
|
|
487
|
+
|
|
488
|
+
declare const useGetUser: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
489
|
+
id: any;
|
|
490
|
+
context: ContextApi;
|
|
491
|
+
}, unknown>;
|
|
492
|
+
|
|
493
|
+
type SwitchUserLocaleParams = {
|
|
494
|
+
data: {
|
|
495
|
+
id: number;
|
|
496
|
+
values: any;
|
|
497
|
+
};
|
|
498
|
+
};
|
|
499
|
+
declare const useSwitchLocale: () => _tanstack_react_query.UseMutationResult<any, Error, SwitchUserLocaleParams, unknown>;
|
|
500
|
+
|
|
501
|
+
declare const useButton: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
502
|
+
model: string;
|
|
503
|
+
ids: Record<string, any>[] | any;
|
|
504
|
+
context: ContextApi;
|
|
505
|
+
method: any;
|
|
506
|
+
}, unknown>;
|
|
507
|
+
|
|
508
|
+
declare const useDuplicateRecord: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
509
|
+
id: any;
|
|
510
|
+
model: string;
|
|
511
|
+
context: ContextApi;
|
|
512
|
+
}, unknown>;
|
|
513
|
+
|
|
514
|
+
declare const useGetActionDetail: ({ aid, context, enabled, id, model, queryKey, }: {
|
|
515
|
+
aid: number;
|
|
516
|
+
context: any;
|
|
517
|
+
enabled: boolean;
|
|
518
|
+
id?: number;
|
|
519
|
+
model?: string;
|
|
520
|
+
queryKey?: any;
|
|
521
|
+
}) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
522
|
+
|
|
523
|
+
declare const useGetCalendar: (listDataProps: any, queryKey?: any, enabled?: any) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
524
|
+
|
|
525
|
+
declare const useGetGroups: ({ model, width_context, }: {
|
|
526
|
+
model: string;
|
|
527
|
+
width_context: any;
|
|
528
|
+
}) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
529
|
+
|
|
530
|
+
declare const useGetListData: (listDataProps: any, queryKey?: any, enabled?: any) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
531
|
+
|
|
532
|
+
declare const useGetMenu: (context: any, enabled?: boolean) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
533
|
+
|
|
534
|
+
declare const useGetPrintReport: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
535
|
+
id: number;
|
|
536
|
+
}, unknown>;
|
|
537
|
+
|
|
538
|
+
declare const useGetProGressBar: ({ field, color, model, width_context, }: {
|
|
539
|
+
field: any;
|
|
540
|
+
color: any;
|
|
541
|
+
model: string;
|
|
542
|
+
width_context: string;
|
|
543
|
+
}) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
544
|
+
|
|
545
|
+
declare const useGetSelection: ({ data, queryKey, enabled, }: {
|
|
546
|
+
data: GetSelectionType;
|
|
547
|
+
queryKey: any[];
|
|
548
|
+
enabled?: boolean;
|
|
549
|
+
}) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
550
|
+
|
|
551
|
+
type View = [number | boolean, string];
|
|
552
|
+
type Option = {
|
|
553
|
+
action_id?: number;
|
|
554
|
+
load_filters?: boolean;
|
|
555
|
+
toolbar?: boolean;
|
|
556
|
+
};
|
|
557
|
+
interface GetViewParams {
|
|
558
|
+
model?: string;
|
|
559
|
+
views?: View[];
|
|
560
|
+
context?: Record<string, any>;
|
|
561
|
+
options?: Option;
|
|
562
|
+
aid?: number | string | null | boolean;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
declare const useGetView: (viewParams: GetViewParams, actData?: any) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
566
|
+
|
|
567
|
+
declare const useLoadAction: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
568
|
+
idAction: any;
|
|
569
|
+
context: ContextApi;
|
|
570
|
+
}, unknown>;
|
|
571
|
+
|
|
572
|
+
declare const useLoadMessage: () => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
573
|
+
|
|
574
|
+
declare const usePrint: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
575
|
+
id: number;
|
|
576
|
+
report: any;
|
|
577
|
+
db: any;
|
|
578
|
+
}, unknown>;
|
|
579
|
+
|
|
580
|
+
declare const useRemoveRow: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
581
|
+
model: string;
|
|
582
|
+
ids: Record<string, any>[] | any;
|
|
583
|
+
context: ContextApi;
|
|
584
|
+
}, unknown>;
|
|
585
|
+
|
|
586
|
+
declare const useGetResequence: (model: string, resIds: any, context: any, offset: any) => _tanstack_react_query.UseQueryResult<any, Error>;
|
|
587
|
+
|
|
588
|
+
declare const useRunAction: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
589
|
+
idAction: any;
|
|
590
|
+
context: ContextApi;
|
|
591
|
+
}, unknown>;
|
|
592
|
+
|
|
593
|
+
declare const useSignInSSO: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
594
|
+
redirect_uri: string;
|
|
595
|
+
state: string;
|
|
596
|
+
client_id: string;
|
|
597
|
+
response_type: string;
|
|
598
|
+
path: string;
|
|
599
|
+
}, unknown>;
|
|
600
|
+
|
|
601
|
+
declare const useVerify2FA: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
602
|
+
method: string;
|
|
603
|
+
with_context: any;
|
|
604
|
+
code: string;
|
|
605
|
+
device: string;
|
|
606
|
+
location: string;
|
|
607
|
+
}, unknown>;
|
|
608
|
+
|
|
609
|
+
declare const useGet2FAMethods: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
610
|
+
method: string;
|
|
611
|
+
with_context: any;
|
|
612
|
+
}, unknown>;
|
|
613
|
+
|
|
614
|
+
declare const useGetFieldsViewSecurity: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
615
|
+
method: string;
|
|
616
|
+
token: string;
|
|
617
|
+
views: any;
|
|
618
|
+
}, unknown>;
|
|
619
|
+
|
|
620
|
+
declare const useGrantAccess: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
621
|
+
redirect_uri: string;
|
|
622
|
+
state: string;
|
|
623
|
+
client_id: string;
|
|
624
|
+
scopes: string[];
|
|
625
|
+
}, unknown>;
|
|
626
|
+
|
|
627
|
+
declare const useRemoveTotpSetup: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
628
|
+
method: string;
|
|
629
|
+
token: string;
|
|
630
|
+
}, unknown>;
|
|
631
|
+
|
|
632
|
+
declare const useRequestSetupTotp: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
633
|
+
method: string;
|
|
634
|
+
token: string;
|
|
635
|
+
}, unknown>;
|
|
636
|
+
|
|
637
|
+
declare const useSettingsWebRead2fa: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
638
|
+
method: string;
|
|
639
|
+
model: string;
|
|
640
|
+
kwargs: any;
|
|
641
|
+
token: string;
|
|
642
|
+
}, unknown>;
|
|
643
|
+
|
|
644
|
+
declare const useVerifyTotp: () => _tanstack_react_query.UseMutationResult<any, Error, {
|
|
645
|
+
method: string;
|
|
646
|
+
action_token: string;
|
|
647
|
+
code: string;
|
|
648
|
+
}, unknown>;
|
|
649
|
+
|
|
650
|
+
declare const VersionGate: ({ children }: {
|
|
651
|
+
children: ReactNode;
|
|
652
|
+
}) => JSX.Element | null;
|
|
653
|
+
|
|
654
|
+
declare const ActionService: {
|
|
655
|
+
loadAction({ idAction, context, }: {
|
|
656
|
+
idAction: number;
|
|
657
|
+
context: ContextApi;
|
|
658
|
+
}): Promise<any>;
|
|
659
|
+
callButton({ model, ids, context, method, }: {
|
|
660
|
+
model: string;
|
|
661
|
+
ids: Record<string, any>[] | any;
|
|
662
|
+
context: ContextApi;
|
|
663
|
+
method: any;
|
|
664
|
+
}): Promise<any>;
|
|
665
|
+
removeRows({ model, ids, context, }: {
|
|
666
|
+
model: string;
|
|
667
|
+
ids: Record<string, any>[] | any;
|
|
668
|
+
context: ContextApi;
|
|
669
|
+
}): Promise<any>;
|
|
670
|
+
duplicateRecord({ model, id, context, }: {
|
|
671
|
+
model: string;
|
|
672
|
+
id: any;
|
|
673
|
+
context: ContextApi;
|
|
674
|
+
}): Promise<any>;
|
|
675
|
+
getPrintReportName({ id }: {
|
|
676
|
+
id: number;
|
|
677
|
+
}): Promise<any>;
|
|
678
|
+
print({ id, report, db }: {
|
|
679
|
+
id: number;
|
|
680
|
+
report: any;
|
|
681
|
+
db: any;
|
|
682
|
+
}): Promise<any>;
|
|
683
|
+
runAction({ idAction, context, }: {
|
|
684
|
+
idAction: number;
|
|
685
|
+
context: ContextApi;
|
|
686
|
+
}): Promise<any>;
|
|
687
|
+
};
|
|
688
|
+
|
|
689
|
+
declare const AuthService: {
|
|
690
|
+
login(body: LoginCredentialBody): Promise<any>;
|
|
691
|
+
forgotPassword(email: string): Promise<any>;
|
|
692
|
+
forgotPasswordSSO({ email, with_context, method, }: {
|
|
693
|
+
email: string;
|
|
694
|
+
with_context: any;
|
|
695
|
+
method: string;
|
|
696
|
+
}): Promise<any>;
|
|
697
|
+
resetPassword(data: ResetPasswordRequest, token: string | null): Promise<any>;
|
|
698
|
+
resetPasswordSSO({ method, password, with_context, }: {
|
|
699
|
+
method: any;
|
|
700
|
+
password: string;
|
|
701
|
+
with_context: any;
|
|
702
|
+
}): Promise<any>;
|
|
703
|
+
updatePassword(data: UpdatePasswordRequest, token: string | null): Promise<any>;
|
|
704
|
+
isValidToken(token: string | null): Promise<any>;
|
|
705
|
+
loginSocial({ db, state, access_token, }: {
|
|
706
|
+
db: string;
|
|
707
|
+
state: object;
|
|
708
|
+
access_token: string;
|
|
709
|
+
}): Promise<any>;
|
|
710
|
+
getProviders(db?: string): Promise<any>;
|
|
711
|
+
getAccessByCode(code: string): Promise<any>;
|
|
712
|
+
logout(data: string): Promise<any>;
|
|
713
|
+
};
|
|
714
|
+
|
|
715
|
+
declare const CompanyService: {
|
|
716
|
+
getCurrentCompany(): Promise<any>;
|
|
717
|
+
getInfoCompany(id: number): Promise<any>;
|
|
718
|
+
};
|
|
719
|
+
|
|
720
|
+
declare const ExcelService: {
|
|
721
|
+
uploadFile({ formData }: {
|
|
722
|
+
formData: any;
|
|
723
|
+
}): Promise<any>;
|
|
724
|
+
uploadIdFile({ formData }: {
|
|
725
|
+
formData: any;
|
|
726
|
+
}): Promise<any>;
|
|
727
|
+
parsePreview({ id, selectedSheet, isHeader, context, }: {
|
|
728
|
+
id: any;
|
|
729
|
+
selectedSheet: any;
|
|
730
|
+
isHeader: boolean;
|
|
731
|
+
context: any;
|
|
732
|
+
}): Promise<any>;
|
|
733
|
+
executeImport({ columns, fields, idFile, options, dryrun, context, }: {
|
|
734
|
+
columns: any;
|
|
735
|
+
fields: any;
|
|
736
|
+
idFile: any;
|
|
737
|
+
options: any;
|
|
738
|
+
dryrun: any;
|
|
739
|
+
context: any;
|
|
740
|
+
}): Promise<any>;
|
|
741
|
+
getFileExcel({ model }: {
|
|
742
|
+
model: string;
|
|
743
|
+
}): Promise<any>;
|
|
744
|
+
getFieldExport({ ids, model, isShow, parentField, fieldType, parentName, prefix, name, context, importCompat, }: {
|
|
745
|
+
ids: any;
|
|
746
|
+
model: string;
|
|
747
|
+
isShow?: boolean;
|
|
748
|
+
parentField?: any;
|
|
749
|
+
fieldType?: any;
|
|
750
|
+
parentName?: any;
|
|
751
|
+
prefix?: any;
|
|
752
|
+
name?: any;
|
|
753
|
+
context: any;
|
|
754
|
+
importCompat?: any;
|
|
755
|
+
}): Promise<any>;
|
|
756
|
+
exportExcel({ model, domain, ids, fields, type, importCompat, context, groupby, }: {
|
|
757
|
+
model: string;
|
|
758
|
+
domain: any;
|
|
759
|
+
ids: any;
|
|
760
|
+
fields: any;
|
|
761
|
+
type: any;
|
|
762
|
+
importCompat: any;
|
|
763
|
+
context: any;
|
|
764
|
+
groupby: any;
|
|
765
|
+
}): Promise<any>;
|
|
766
|
+
};
|
|
767
|
+
|
|
768
|
+
type TFormView = {
|
|
769
|
+
model: string;
|
|
770
|
+
id?: number | null;
|
|
771
|
+
context?: any;
|
|
772
|
+
};
|
|
773
|
+
declare const FormService: {
|
|
774
|
+
getComment({ data }: {
|
|
775
|
+
data: any;
|
|
776
|
+
}): Promise<any>;
|
|
777
|
+
sentComment({ data }: any): Promise<any>;
|
|
778
|
+
deleteComment({ data }: {
|
|
779
|
+
data: any;
|
|
780
|
+
}): Promise<any>;
|
|
781
|
+
getImage({ data }: {
|
|
782
|
+
data: any;
|
|
783
|
+
}): Promise<any>;
|
|
784
|
+
uploadImage({ data }: {
|
|
785
|
+
data: any;
|
|
786
|
+
}): Promise<any>;
|
|
787
|
+
getFormView({ data }: {
|
|
788
|
+
data: TFormView;
|
|
789
|
+
}): Promise<any>;
|
|
790
|
+
changeStatus({ data }: any): Promise<any>;
|
|
791
|
+
};
|
|
792
|
+
|
|
793
|
+
declare const KanbanServices: {
|
|
794
|
+
getGroups({ model, width_context, }: {
|
|
795
|
+
model: string;
|
|
796
|
+
width_context: any;
|
|
797
|
+
}): Promise<any>;
|
|
798
|
+
getProgressBar({ field, color, model, width_context, }: {
|
|
799
|
+
field: any;
|
|
800
|
+
color: any;
|
|
801
|
+
model: string;
|
|
802
|
+
width_context: string;
|
|
803
|
+
}): Promise<any>;
|
|
804
|
+
};
|
|
805
|
+
|
|
806
|
+
declare const ModelService: {
|
|
807
|
+
getListMyBankAccount({ domain, spectification, model, }: {
|
|
808
|
+
domain: any;
|
|
809
|
+
spectification: any;
|
|
810
|
+
model: string;
|
|
811
|
+
}): Promise<any>;
|
|
812
|
+
getCurrency(): Promise<any>;
|
|
813
|
+
getConversionRate(): Promise<any>;
|
|
814
|
+
getAll({ data }: {
|
|
815
|
+
data: any;
|
|
816
|
+
}): Promise<any>;
|
|
817
|
+
getListCalendar({ data }: {
|
|
818
|
+
data: any;
|
|
819
|
+
}): Promise<any>;
|
|
820
|
+
getList({ model, ids, specification, domain, offset, order, context, limit, }: GetListParams): Promise<any>;
|
|
821
|
+
getDetail({ ids, model, specification, context, }: GetDetailParams): Promise<any>;
|
|
822
|
+
save({ model, ids, data, specification, context, path, }: SaveParams): Promise<any>;
|
|
823
|
+
delete({ ids, model }: DeleteParams): Promise<any>;
|
|
824
|
+
onChange({ ids, model, object, specification, context, fieldChange, }: OnChangeParams): Promise<any>;
|
|
825
|
+
getListFieldsOnchange({ model }: {
|
|
826
|
+
model: string;
|
|
827
|
+
}): Promise<any>;
|
|
828
|
+
parseORMOdoo(data: Record<string, any>): Record<string, any>;
|
|
829
|
+
toDataJS(data: Record<string, any>, viewData?: ViewData, model?: string): Record<string, any>;
|
|
830
|
+
};
|
|
831
|
+
|
|
832
|
+
declare const UserService: {
|
|
833
|
+
getProfile(path?: string): Promise<any>;
|
|
834
|
+
getUser({ context, id }: {
|
|
835
|
+
context: any;
|
|
836
|
+
id: any;
|
|
837
|
+
}): Promise<any>;
|
|
838
|
+
switchUserLocale: ({ id, values }: any) => Promise<any>;
|
|
839
|
+
};
|
|
840
|
+
|
|
841
|
+
declare const ViewService: {
|
|
842
|
+
getView({ model, views, context, options, aid, }: GetViewParams): Promise<any>;
|
|
843
|
+
getMenu(context: any): Promise<any>;
|
|
844
|
+
getActionDetail(aid: number, context: any): Promise<any>;
|
|
845
|
+
getResequence({ model, ids, context, offset, }: {
|
|
846
|
+
model: string;
|
|
847
|
+
ids: any;
|
|
848
|
+
context: any;
|
|
849
|
+
offset: any;
|
|
850
|
+
}): Promise<any>;
|
|
851
|
+
getSelectionItem({ data }: {
|
|
852
|
+
data: GetSelectionType;
|
|
853
|
+
}): Promise<any>;
|
|
854
|
+
loadMessages(): Promise<any>;
|
|
855
|
+
getVersion(): Promise<any>;
|
|
856
|
+
get2FAMethods({ method, with_context, }: {
|
|
857
|
+
method: string;
|
|
858
|
+
with_context: any;
|
|
859
|
+
}): Promise<any>;
|
|
860
|
+
verify2FA({ method, with_context, code, device, location, }: {
|
|
861
|
+
method: string;
|
|
862
|
+
with_context: any;
|
|
863
|
+
code: string;
|
|
864
|
+
device: string;
|
|
865
|
+
location: string;
|
|
866
|
+
}): Promise<any>;
|
|
867
|
+
signInSSO({ redirect_uri, state, client_id, response_type, path, }: {
|
|
868
|
+
redirect_uri: string;
|
|
869
|
+
state: string;
|
|
870
|
+
client_id: string;
|
|
871
|
+
response_type: string;
|
|
872
|
+
path: string;
|
|
873
|
+
}): Promise<any>;
|
|
874
|
+
grantAccess({ redirect_uri, state, client_id, scopes, }: {
|
|
875
|
+
redirect_uri: string;
|
|
876
|
+
state: string;
|
|
877
|
+
client_id: string;
|
|
878
|
+
scopes: string[];
|
|
879
|
+
}): Promise<any>;
|
|
880
|
+
getFieldsViewSecurity({ method, token, views, }: {
|
|
881
|
+
method: string;
|
|
882
|
+
token: string;
|
|
883
|
+
views: any;
|
|
884
|
+
}): Promise<any>;
|
|
885
|
+
settingsWebRead2fa({ method, model, kwargs, token, }: {
|
|
886
|
+
method: string;
|
|
887
|
+
token: string;
|
|
888
|
+
kwargs: any;
|
|
889
|
+
model: string;
|
|
890
|
+
}): Promise<any>;
|
|
891
|
+
requestSetupTotp({ method, token }: {
|
|
892
|
+
method: string;
|
|
893
|
+
token: string;
|
|
894
|
+
}): Promise<any>;
|
|
895
|
+
verifyTotp({ method, action_token, code, }: {
|
|
896
|
+
method: string;
|
|
897
|
+
action_token: string;
|
|
898
|
+
code: string;
|
|
899
|
+
}): Promise<any>;
|
|
900
|
+
removeTotpSetUp({ method, token }: {
|
|
901
|
+
method: string;
|
|
902
|
+
token: string;
|
|
903
|
+
}): Promise<any>;
|
|
904
|
+
};
|
|
905
|
+
|
|
906
|
+
interface UserInfor {
|
|
907
|
+
address?: {
|
|
908
|
+
country?: boolean;
|
|
909
|
+
formatted?: string;
|
|
910
|
+
locality?: boolean;
|
|
911
|
+
postal_code?: boolean;
|
|
912
|
+
region?: boolean;
|
|
913
|
+
street_address?: boolean;
|
|
914
|
+
};
|
|
915
|
+
email?: string;
|
|
916
|
+
locale?: string;
|
|
917
|
+
name?: string;
|
|
918
|
+
partner_id?: {
|
|
919
|
+
id?: number;
|
|
920
|
+
stud_id?: boolean;
|
|
921
|
+
};
|
|
922
|
+
phone_number?: boolean;
|
|
923
|
+
sub?: number;
|
|
924
|
+
updated_at?: string;
|
|
925
|
+
username?: string;
|
|
926
|
+
website?: boolean;
|
|
927
|
+
zoneinfo?: string;
|
|
928
|
+
image?: string;
|
|
929
|
+
}
|
|
930
|
+
interface ProfileStateType {
|
|
931
|
+
profile: UserInfor;
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
interface ExcelState {
|
|
935
|
+
dataParse: any | null;
|
|
936
|
+
idFile: any | null;
|
|
937
|
+
isFileLoaded: boolean;
|
|
938
|
+
loadingImport: any;
|
|
939
|
+
selectedFile: any;
|
|
940
|
+
errorData: any;
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
interface LoginStateType {
|
|
944
|
+
db: string;
|
|
945
|
+
redirectTo: string;
|
|
946
|
+
forgotPasswordUrl: string;
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
interface Breadcrumb {
|
|
950
|
+
title?: string;
|
|
951
|
+
path?: string;
|
|
952
|
+
view: 'list' | 'detail' | 'edit' | 'tree';
|
|
953
|
+
aid: string | number;
|
|
954
|
+
model: string;
|
|
955
|
+
id: string | number;
|
|
956
|
+
}
|
|
957
|
+
interface BreadcrumbsState {
|
|
958
|
+
breadCrumbs: Breadcrumb[];
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
interface ViewDataStore {
|
|
962
|
+
[key: string]: any;
|
|
963
|
+
}
|
|
964
|
+
interface FormState {
|
|
965
|
+
viewDataStore: ViewDataStore;
|
|
966
|
+
isShowingModalDetail: boolean;
|
|
967
|
+
isShowModalTranslate: boolean;
|
|
968
|
+
formSubmitComponent: Record<string, React.ReactNode>;
|
|
969
|
+
fieldTranslation: any;
|
|
970
|
+
listSubject: any;
|
|
971
|
+
dataUser: any;
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
interface SearchState {
|
|
975
|
+
groupByDomain: any;
|
|
976
|
+
searchBy: any;
|
|
977
|
+
searchString: string;
|
|
978
|
+
hoveredIndexSearchList: any;
|
|
979
|
+
selectedTags: [];
|
|
980
|
+
firstDomain: any;
|
|
981
|
+
searchMap: Record<string, any[]>;
|
|
982
|
+
filterBy: any;
|
|
983
|
+
groupBy: any;
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
interface ListState {
|
|
987
|
+
pageLimit: number;
|
|
988
|
+
fields: Record<string, any>;
|
|
989
|
+
order: string | null;
|
|
990
|
+
selectedRowKeys: number[];
|
|
991
|
+
selectedRadioKey: any;
|
|
992
|
+
indexRowTableModal: number;
|
|
993
|
+
isUpdateTableModal: boolean;
|
|
994
|
+
footerGroupTable: Record<string, any>;
|
|
995
|
+
page: number;
|
|
996
|
+
transferDetail?: any;
|
|
997
|
+
domainTable?: any;
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
interface NavbarStateType {
|
|
1001
|
+
menuFocus: any;
|
|
1002
|
+
menuAction: any;
|
|
1003
|
+
navbarWidth: number;
|
|
1004
|
+
menuList: any;
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
declare const envStore: _reduxjs_toolkit.EnhancedStore<{
|
|
1008
|
+
env: {
|
|
1009
|
+
baseUrl: string;
|
|
1010
|
+
requests: null;
|
|
1011
|
+
companies: never[];
|
|
1012
|
+
user: {};
|
|
1013
|
+
config: null;
|
|
1014
|
+
envFile: null;
|
|
1015
|
+
defaultCompany: {
|
|
1016
|
+
id: null;
|
|
1017
|
+
logo: string;
|
|
1018
|
+
secondary_color: string;
|
|
1019
|
+
primary_color: string;
|
|
1020
|
+
};
|
|
1021
|
+
context: {
|
|
1022
|
+
uid: null;
|
|
1023
|
+
allowed_company_ids: never[];
|
|
1024
|
+
lang: string;
|
|
1025
|
+
tz: string;
|
|
1026
|
+
};
|
|
1027
|
+
};
|
|
1028
|
+
header: {
|
|
1029
|
+
value: {
|
|
1030
|
+
allowedCompanyIds: never[];
|
|
1031
|
+
};
|
|
1032
|
+
};
|
|
1033
|
+
navbar: NavbarStateType;
|
|
1034
|
+
list: ListState;
|
|
1035
|
+
search: SearchState;
|
|
1036
|
+
form: FormState;
|
|
1037
|
+
breadcrumbs: BreadcrumbsState;
|
|
1038
|
+
login: LoginStateType;
|
|
1039
|
+
excel: ExcelState;
|
|
1040
|
+
profile: ProfileStateType;
|
|
1041
|
+
}, redux.UnknownAction, _reduxjs_toolkit.Tuple<[redux.StoreEnhancer<{
|
|
1042
|
+
dispatch: redux_thunk.ThunkDispatch<{
|
|
1043
|
+
env: {
|
|
1044
|
+
baseUrl: string;
|
|
1045
|
+
requests: null;
|
|
1046
|
+
companies: never[];
|
|
1047
|
+
user: {};
|
|
1048
|
+
config: null;
|
|
1049
|
+
envFile: null;
|
|
1050
|
+
defaultCompany: {
|
|
1051
|
+
id: null;
|
|
1052
|
+
logo: string;
|
|
1053
|
+
secondary_color: string;
|
|
1054
|
+
primary_color: string;
|
|
1055
|
+
};
|
|
1056
|
+
context: {
|
|
1057
|
+
uid: null;
|
|
1058
|
+
allowed_company_ids: never[];
|
|
1059
|
+
lang: string;
|
|
1060
|
+
tz: string;
|
|
1061
|
+
};
|
|
1062
|
+
};
|
|
1063
|
+
header: {
|
|
1064
|
+
value: {
|
|
1065
|
+
allowedCompanyIds: never[];
|
|
1066
|
+
};
|
|
1067
|
+
};
|
|
1068
|
+
navbar: NavbarStateType;
|
|
1069
|
+
list: ListState;
|
|
1070
|
+
search: SearchState;
|
|
1071
|
+
form: FormState;
|
|
1072
|
+
breadcrumbs: BreadcrumbsState;
|
|
1073
|
+
login: LoginStateType;
|
|
1074
|
+
excel: ExcelState;
|
|
1075
|
+
profile: ProfileStateType;
|
|
1076
|
+
}, undefined, redux.UnknownAction>;
|
|
1077
|
+
}>, redux.StoreEnhancer]>>;
|
|
1078
|
+
|
|
1079
|
+
declare const setEnvFile: _reduxjs_toolkit.ActionCreatorWithPayload<any, "env/setEnvFile">;
|
|
1080
|
+
declare const selectEnv: (state: RootState) => {
|
|
1081
|
+
baseUrl: string;
|
|
1082
|
+
requests: null;
|
|
1083
|
+
companies: never[];
|
|
1084
|
+
user: {};
|
|
1085
|
+
config: null;
|
|
1086
|
+
envFile: null;
|
|
1087
|
+
defaultCompany: {
|
|
1088
|
+
id: null;
|
|
1089
|
+
logo: string;
|
|
1090
|
+
secondary_color: string;
|
|
1091
|
+
primary_color: string;
|
|
1092
|
+
};
|
|
1093
|
+
context: {
|
|
1094
|
+
uid: null;
|
|
1095
|
+
allowed_company_ids: never[];
|
|
1096
|
+
lang: string;
|
|
1097
|
+
tz: string;
|
|
1098
|
+
};
|
|
1099
|
+
};
|
|
1100
|
+
|
|
1101
|
+
type RootState = ReturnType<typeof envStore.getState>;
|
|
1102
|
+
type AppDispatch = typeof envStore.dispatch;
|
|
1103
|
+
declare const useAppDispatch: () => AppDispatch;
|
|
1104
|
+
declare const useAppSelector: TypedUseSelectorHook<RootState>;
|
|
1105
|
+
|
|
1106
|
+
declare class WesapError extends Error {
|
|
1107
|
+
code: number;
|
|
1108
|
+
constructor(message: string, code: number);
|
|
1109
|
+
}
|
|
1110
|
+
declare function handleError(error: Error, env: {
|
|
1111
|
+
services: {
|
|
1112
|
+
notification: {
|
|
1113
|
+
error: (message: string) => void;
|
|
1114
|
+
};
|
|
1115
|
+
};
|
|
1116
|
+
}): void;
|
|
1117
|
+
|
|
1118
|
+
declare const formatCurrency: (amount: number, currency?: string) => string;
|
|
1119
|
+
declare const formatDate: (date: string | Date, locale?: string) => string;
|
|
1120
|
+
declare const validateAndParseDate: (input: string, isDateTime?: boolean) => string | null;
|
|
1121
|
+
|
|
1122
|
+
type AST = {
|
|
1123
|
+
type: number;
|
|
1124
|
+
value: any;
|
|
1125
|
+
};
|
|
1126
|
+
type Condition = [string | 0 | 1, string, any];
|
|
1127
|
+
type DomainListRepr = ('&' | '|' | '!' | Condition)[];
|
|
1128
|
+
type DomainRepr = DomainListRepr | string | Domain;
|
|
1129
|
+
declare class Domain {
|
|
1130
|
+
ast: AST;
|
|
1131
|
+
static TRUE: Domain;
|
|
1132
|
+
static FALSE: Domain;
|
|
1133
|
+
static combine(domains: DomainRepr[], operator: 'AND' | 'OR'): Domain;
|
|
1134
|
+
static and(domains: DomainRepr[]): Domain;
|
|
1135
|
+
static or(domains: DomainRepr[]): Domain;
|
|
1136
|
+
static not(domain: DomainRepr): Domain;
|
|
1137
|
+
static removeDomainLeaves(domain: DomainRepr, keysToRemove: string[]): Domain;
|
|
1138
|
+
constructor(descr?: DomainRepr);
|
|
1139
|
+
contains(record: any): boolean;
|
|
1140
|
+
toString(): string;
|
|
1141
|
+
toList(context: Record<string, any>): DomainListRepr;
|
|
1142
|
+
toJson(): DomainListRepr | string;
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
declare const evalJSONContext: (_context: any, context?: {}) => any;
|
|
1146
|
+
declare const evalJSONDomain: (domain: any, context: any) => any;
|
|
1147
|
+
declare const formatSortingString: (input: string | null | undefined) => string | null;
|
|
1148
|
+
declare const domainHelper: {
|
|
1149
|
+
checkDomain: (context: any, domain: any) => boolean;
|
|
1150
|
+
matchDomains: (context: any, domains: any) => boolean;
|
|
1151
|
+
Domain: typeof Domain;
|
|
1152
|
+
};
|
|
1153
|
+
declare const toQueryString: (params: Record<string, string | number | boolean>) => string;
|
|
1154
|
+
declare const convertFloatToTime: (floatValue: number) => string;
|
|
1155
|
+
declare const convertTimeToFloat: (timeString: string) => number;
|
|
1156
|
+
declare const stringToColor: (name: string, id: number) => string;
|
|
1157
|
+
declare const getFieldsOnChange: (fields: any) => any;
|
|
1158
|
+
declare const filterFieldDirty: ({ id, viewData, formValues, dirtyFields, model, defaultData, }: {
|
|
1159
|
+
id?: any;
|
|
1160
|
+
viewData?: any;
|
|
1161
|
+
formValues?: any;
|
|
1162
|
+
dirtyFields?: any;
|
|
1163
|
+
model?: any;
|
|
1164
|
+
defaultData?: any;
|
|
1165
|
+
}) => any;
|
|
1166
|
+
type MergeableObject = {
|
|
1167
|
+
[key: string]: any;
|
|
1168
|
+
} | null | undefined;
|
|
1169
|
+
declare const mergeObjects: <T extends MergeableObject, U extends MergeableObject>(object1: T, object2: U) => (T & U) | undefined;
|
|
1170
|
+
declare const formatUrlPath: ({ viewType, aid, model, id, actionPath, }: {
|
|
1171
|
+
viewType: "list" | "form" | "kanban" | any;
|
|
1172
|
+
actionPath: string;
|
|
1173
|
+
aid: string | number;
|
|
1174
|
+
model: string;
|
|
1175
|
+
id?: string | number;
|
|
1176
|
+
}) => string;
|
|
1177
|
+
declare const removeUndefinedFields: <T extends Record<string, any>>(obj: T) => Partial<T>;
|
|
1178
|
+
declare const useTabModel: (viewData: any, onchangeData: any) => any;
|
|
1179
|
+
declare const isBase64File: (str: any) => boolean;
|
|
1180
|
+
declare const isBase64Image: (str: any) => boolean;
|
|
1181
|
+
declare const checkIsImageLink: (url: any) => boolean;
|
|
1182
|
+
declare const formatFileSize: (size: any) => string;
|
|
1183
|
+
declare const getSubdomain: (url?: string) => string | null;
|
|
1184
|
+
declare const resequence: (arr: any, start: any, end: any) => any;
|
|
1185
|
+
declare const getOffSet: (arr: any, start: any, end: any) => any;
|
|
1186
|
+
declare const copyTextToClipboard: (text: string) => Promise<void>;
|
|
1187
|
+
declare const updateTokenParamInOriginalRequest: (originalRequest: {
|
|
1188
|
+
data?: any;
|
|
1189
|
+
}, newAccessToken: string) => any;
|
|
1190
|
+
declare const isObjectEmpty: (obj: object) => boolean;
|
|
1191
|
+
declare const useField: (props: any) => {
|
|
1192
|
+
invisible: boolean;
|
|
1193
|
+
required: boolean;
|
|
1194
|
+
readonly: boolean;
|
|
1195
|
+
nameField: string | null;
|
|
1196
|
+
};
|
|
1197
|
+
|
|
1198
|
+
interface Config {
|
|
1199
|
+
baseUrl: string;
|
|
1200
|
+
grantType: string;
|
|
1201
|
+
clientId: string;
|
|
1202
|
+
clientSecret: string;
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
interface Context {
|
|
1206
|
+
uid: number;
|
|
1207
|
+
lang: string;
|
|
1208
|
+
allowCompanys: number[];
|
|
1209
|
+
[key: string]: any;
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
export { ActionService, type AppDispatch, AuthService, CompanyService, ComponentType, type Config, type Context, type ContextApi, type DeleteParams, EnvStore, ExcelService, FieldTypeConstants, type ForgotPasswordBody, FormService, type GetAllParams, type GetDetailParams, type GetListParams, type GetSelectionType, type GetViewParams, KanbanServices as KanbanService, KeyConstants, type LoginCredentialBody, MethodConstants, MethodType, ModelConstants, ModelService, type OnChangeParams, type ResetPasswordRequest, type SaveParams, SearchType, type SocialTokenBody, type Specification, type UpdatePasswordRequest, UriConstants, UserService, VersionGate, type View, type ViewData, ViewService, WIDGETAVATAR, WIDGETCOLOR, WIDGETCURRENCY, WIDGETNOSTRING, WIDGETSTATUS, WesapError, axiosClient, checkIsImageLink, convertFloatToTime, convertTimeToFloat, copyTextToClipboard, domainHelper, evalJSONContext, evalJSONDomain, filterFieldDirty, formatCurrency, formatDate, formatFileSize, formatSortingString, formatUrlPath, getEnv, getFieldsOnChange, getOffSet, getSubdomain, handleError, isBase64File, isBase64Image, isObjectEmpty, mergeObjects, removeUndefinedFields, resequence, selectEnv, setEnvFile, stringToColor, toQueryString, type updatePasswordBody, updateTokenParamInOriginalRequest, useAppDispatch, useAppSelector, useButton, useChangeStatus, useDelete, useDeleteComment, useDuplicateRecord, useExecuteImport, useExportExcel, useField, useForgotPassword, useForgotPasswordSSO, useGet2FAMethods, useGetAccessByCode, useGetActionDetail, useGetAll, useGetCalendar, useGetComment, useGetCompanyInfo, useGetConversionRate, useGetCurrency, useGetCurrentCompany, useGetDetail, useGetFieldExport, useGetFieldOnChange, useGetFieldsViewSecurity, useGetFileExcel, useGetFormView, useGetGroups, useGetImage, useGetListCompany, useGetListData, useGetListMyBankAccount, useGetMenu, useGetPrintReport, useGetProGressBar, useGetProfile, useGetProvider, useGetResequence, useGetSelection, useGetUser, useGetView, useGrantAccess, useIsValidToken, useLoadAction, useLoadMessage, useLoginCredential, useLoginSocial, useLogout, useModel, useOdooDataTransform, useOnChangeForm, useParsePreview, usePrint, useRemoveRow, useRemoveTotpSetup, useRequestSetupTotp, useResetPassword, useResetPasswordSSO, useRunAction, useSave, useSendComment, useSettingsWebRead2fa, useSignInSSO, useSwitchLocale, useTabModel, useUpdatePassword, useUploadFile, useUploadIdFile, useUploadImage, useVerify2FA, useVerifyTotp, validateAndParseDate };
|