@fctc/interface-logic 1.10.7 → 1.10.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.
@@ -1,98 +1,97 @@
1
- import { C as ContextApi, L as LoginCredentialBody, R as ResetPasswordRequest, U as UpdatePasswordRequest, a as GetListParams, b as GetDetailParams, c as SaveParams, D as DeleteParams, O as OnChangeParams, V as ViewData, G as GetSelectionType } from './api-type-DfAFCfCw.js';
2
- import { G as GetViewParams } from './view-type-C6Eej-Ij.js';
1
+ import { C as ContextApi, L as LoginCredentialBody, R as ResetPasswordRequest, U as UpdatePasswordRequest, b as GetListParams, a as GetDetailParams, S as SaveParams, D as DeleteParams, O as OnChangeParams, V as ViewData, f as GetViewParams, c as GetSelectionType } from './view-type-BGJfDe73.js';
3
2
 
4
- declare const ActionService: {
5
- loadAction({ idAction, context, }: {
3
+ declare function useActionService(): {
4
+ loadAction: ({ idAction, context, }: {
6
5
  idAction: number;
7
6
  context: ContextApi;
8
- }): Promise<any>;
9
- callButton({ model, ids, context, method, }: {
7
+ }) => Promise<any>;
8
+ callButton: ({ model, ids, context, method, }: {
10
9
  model: string;
11
10
  ids: Record<string, any>[] | any;
12
11
  context: ContextApi;
13
12
  method: any;
14
- }): Promise<any>;
15
- removeRows({ model, ids, context, }: {
13
+ }) => Promise<any>;
14
+ removeRows: ({ model, ids, context, }: {
16
15
  model: string;
17
16
  ids: Record<string, any>[] | any;
18
17
  context: ContextApi;
19
- }): Promise<any>;
20
- duplicateRecord({ model, id, context, }: {
18
+ }) => Promise<any>;
19
+ duplicateRecord: ({ model, id, context, }: {
21
20
  model: string;
22
21
  id: any;
23
22
  context: ContextApi;
24
- }): Promise<any>;
25
- getPrintReportName({ id }: {
23
+ }) => Promise<any>;
24
+ getPrintReportName: ({ id }: {
26
25
  id: number;
27
- }): Promise<any>;
28
- print({ id, report, db }: {
26
+ }) => Promise<any>;
27
+ print: ({ id, report, db }: {
29
28
  id: number;
30
29
  report: any;
31
30
  db: any;
32
- }): Promise<any>;
33
- runAction({ idAction, context, }: {
31
+ }) => Promise<any>;
32
+ runAction: ({ idAction, context, }: {
34
33
  idAction: number;
35
34
  context: ContextApi;
36
- }): Promise<any>;
35
+ }) => Promise<any>;
37
36
  };
38
37
 
39
- declare const AuthService: {
40
- login(body: LoginCredentialBody): Promise<any>;
41
- forgotPassword(email: string): Promise<any>;
42
- forgotPasswordSSO({ email, with_context, method, }: {
38
+ declare function useAuthService(): {
39
+ login: (body: LoginCredentialBody) => Promise<any>;
40
+ forgotPassword: (email: string) => Promise<any>;
41
+ forgotPasswordSSO: ({ email, with_context, method, }: {
43
42
  email: string;
44
43
  with_context: any;
45
44
  method: string;
46
- }): Promise<any>;
47
- resetPassword(data: ResetPasswordRequest, token: string | null): Promise<any>;
48
- resetPasswordSSO({ method, password, with_context, }: {
45
+ }) => Promise<any>;
46
+ resetPassword: (data: ResetPasswordRequest, token: string | null) => Promise<any>;
47
+ resetPasswordSSO: ({ method, password, with_context, }: {
49
48
  method: any;
50
49
  password: string;
51
50
  with_context: any;
52
- }): Promise<any>;
53
- updatePassword(data: UpdatePasswordRequest, token: string | null): Promise<any>;
54
- isValidToken(token: string | null): Promise<any>;
55
- isValidActionToken(actionToken: string | null, path: string): Promise<any>;
56
- loginSocial({ db, state, access_token, }: {
51
+ }) => Promise<any>;
52
+ updatePassword: (data: UpdatePasswordRequest, token: string | null) => Promise<any>;
53
+ isValidToken: (token: string | null) => Promise<any>;
54
+ isValidActionToken: (actionToken: string | null, path: string) => Promise<any>;
55
+ loginSocial: ({ db, state, access_token, }: {
57
56
  db: string;
58
57
  state: object;
59
58
  access_token: string;
60
- }): Promise<any>;
61
- getProviders(db?: string): Promise<any>;
62
- getAccessByCode(code: string): Promise<any>;
63
- logout(data: string): Promise<any>;
59
+ }) => Promise<any>;
60
+ getProviders: (db?: string) => Promise<any>;
61
+ getAccessByCode: (code: string) => Promise<any>;
62
+ logout: (data: string) => Promise<any>;
64
63
  };
65
64
 
66
- declare const CompanyService: {
67
- getCurrentCompany(): Promise<any>;
68
- getInfoCompany(id: number): Promise<any>;
65
+ declare function useCompanyService(): {
66
+ getCurrentCompany: () => Promise<any>;
67
+ getInfoCompany: (id: number) => Promise<any>;
69
68
  };
70
69
 
71
- declare const ExcelService: {
72
- uploadFile({ formData }: {
70
+ declare function useExcelService(): {
71
+ uploadFile: ({ formData }: {
73
72
  formData: any;
74
- }): Promise<any>;
75
- uploadIdFile({ formData }: {
73
+ }) => Promise<any>;
74
+ uploadIdFile: ({ formData }: {
76
75
  formData: any;
77
- }): Promise<any>;
78
- parsePreview({ id, selectedSheet, isHeader, context, }: {
76
+ }) => Promise<any>;
77
+ parsePreview: ({ id, selectedSheet, isHeader, context, }: {
79
78
  id: any;
80
79
  selectedSheet: any;
81
80
  isHeader: boolean;
82
81
  context: any;
83
- }): Promise<any>;
84
- executeImport({ columns, fields, idFile, options, dryrun, context, }: {
82
+ }) => Promise<any>;
83
+ executeImport: ({ columns, fields, idFile, options, dryrun, context, }: {
85
84
  columns: any;
86
85
  fields: any;
87
86
  idFile: any;
88
87
  options: any;
89
88
  dryrun: any;
90
89
  context: any;
91
- }): Promise<any>;
92
- getFileExcel({ model }: {
90
+ }) => Promise<any>;
91
+ getFileExcel: ({ model }: {
93
92
  model: string;
94
- }): Promise<any>;
95
- getFieldExport({ ids, model, isShow, parentField, fieldType, parentName, prefix, name, context, importCompat, }: {
93
+ }) => Promise<any>;
94
+ getFieldExport: ({ ids, model, isShow, parentField, fieldType, parentName, prefix, name, context, importCompat, }: {
96
95
  ids: any;
97
96
  model: string;
98
97
  isShow?: boolean;
@@ -103,8 +102,8 @@ declare const ExcelService: {
103
102
  name?: any;
104
103
  context: any;
105
104
  importCompat?: any;
106
- }): Promise<any>;
107
- exportExcel({ model, domain, ids, fields, type, importCompat, context, groupby, }: {
105
+ }) => Promise<any>;
106
+ exportExcel: ({ model, domain, ids, fields, type, importCompat, context, groupby, }: {
108
107
  model: string;
109
108
  domain: any;
110
109
  ids: any;
@@ -113,7 +112,7 @@ declare const ExcelService: {
113
112
  importCompat: any;
114
113
  context: any;
115
114
  groupby: any;
116
- }): Promise<any>;
115
+ }) => Promise<any>;
117
116
  };
118
117
 
119
118
  type TFormView = {
@@ -121,137 +120,137 @@ type TFormView = {
121
120
  id?: number | null;
122
121
  context?: any;
123
122
  };
124
- declare const FormService: {
125
- getComment({ data }: {
123
+ declare function useFormService(): {
124
+ getComment: ({ data }: {
126
125
  data: any;
127
- }): Promise<any>;
128
- sentComment({ data }: any): Promise<any>;
129
- deleteComment({ data }: {
126
+ }) => Promise<any>;
127
+ sentComment: ({ data }: any) => Promise<any>;
128
+ deleteComment: ({ data }: {
130
129
  data: any;
131
- }): Promise<any>;
132
- getImage({ data }: {
130
+ }) => Promise<any>;
131
+ getImage: ({ data }: {
133
132
  data: any;
134
- }): Promise<any>;
135
- uploadImage({ data }: {
133
+ }) => Promise<any>;
134
+ uploadImage: ({ data }: {
136
135
  data: any;
137
- }): Promise<any>;
138
- getFormView({ data }: {
136
+ }) => Promise<any>;
137
+ getFormView: ({ data }: {
139
138
  data: TFormView;
140
- }): Promise<any>;
141
- changeStatus({ data }: any): Promise<any>;
139
+ }) => Promise<any>;
140
+ changeStatus: ({ data }: any) => Promise<any>;
142
141
  };
143
142
 
144
- declare const KanbanServices: {
145
- getGroups({ model, width_context, }: {
146
- model: string;
147
- width_context: any;
148
- }): Promise<any>;
149
- getProgressBar({ field, color, model, width_context, }: {
150
- field: any;
151
- color: any;
152
- model: string;
153
- width_context: string;
154
- }): Promise<any>;
143
+ type TGetGroupsParams = {
144
+ model: string;
145
+ width_context: any;
146
+ };
147
+ type TGetProgressBarParams = {
148
+ field: any;
149
+ color: any;
150
+ model: string;
151
+ width_context: any;
152
+ };
153
+ declare function useKanbanService(): {
154
+ getGroups: ({ model, width_context }: TGetGroupsParams) => Promise<any>;
155
+ getProgressBar: ({ field, color, model, width_context }: TGetProgressBarParams) => Promise<any>;
155
156
  };
156
157
 
157
- declare const ModelService: {
158
- getListMyBankAccount({ domain, spectification, model, }: {
158
+ declare function useModelService(): {
159
+ getListMyBankAccount: ({ domain, spectification, model, }: {
159
160
  domain: any;
160
161
  spectification: any;
161
162
  model: string;
162
- }): Promise<any>;
163
- getCurrency(): Promise<any>;
164
- getConversionRate(): Promise<any>;
165
- getAll({ data }: {
163
+ }) => Promise<any>;
164
+ getCurrency: () => Promise<any>;
165
+ getConversionRate: () => Promise<any>;
166
+ getAll: ({ data }: {
166
167
  data: any;
167
- }): Promise<any>;
168
- getListCalendar({ data }: {
168
+ }) => Promise<any>;
169
+ getListCalendar: ({ data }: {
169
170
  data: any;
170
- }): Promise<any>;
171
- getList({ model, ids, specification, domain, offset, order, context, limit, }: GetListParams): Promise<any>;
172
- getDetail({ ids, model, specification, context, }: GetDetailParams): Promise<any>;
173
- save({ model, ids, data, specification, context, path, }: SaveParams): Promise<any>;
174
- delete({ ids, model }: DeleteParams): Promise<any>;
175
- onChange({ ids, model, object, specification, context, fieldChange, }: OnChangeParams): Promise<any>;
176
- getListFieldsOnchange({ model }: {
171
+ }) => Promise<any>;
172
+ getList: ({ model, ids, specification, domain, offset, order, context, limit, }: GetListParams) => Promise<any>;
173
+ getDetail: ({ ids, model, specification, context }: GetDetailParams) => Promise<any>;
174
+ save: ({ model, ids, data, specification, context, path, }: SaveParams) => Promise<any>;
175
+ deleteApi: ({ ids, model }: DeleteParams) => Promise<any>;
176
+ onChange: ({ ids, model, object, specification, context, fieldChange, }: OnChangeParams) => Promise<any>;
177
+ getListFieldsOnchange: ({ model }: {
177
178
  model: string;
178
- }): Promise<any>;
179
- parseORMOdoo(data: Record<string, any>): Record<string, any>;
180
- toDataJS(data: Record<string, any>, viewData?: ViewData, model?: string): Record<string, any>;
179
+ }) => Promise<any>;
180
+ parseORMOdoo: (data: Record<string, any>) => {
181
+ [x: string]: any;
182
+ };
183
+ toDataJS: (data: Record<string, any>, viewData?: ViewData, model?: string) => {
184
+ [x: string]: any;
185
+ };
181
186
  };
182
187
 
183
- declare const UserService: {
184
- getProfile(path?: string): Promise<any>;
185
- getUser({ context, id }: {
188
+ declare function useUserService(): {
189
+ getProfile: (path?: string) => Promise<any>;
190
+ getUser: ({ context, id }: {
186
191
  context: any;
187
192
  id: any;
188
- }): Promise<any>;
193
+ }) => Promise<any>;
189
194
  switchUserLocale: ({ id, values }: any) => Promise<any>;
190
195
  };
191
196
 
192
- declare const ViewService: {
193
- getView({ model, views, context, options, aid, }: GetViewParams): Promise<any>;
194
- getMenu(context: any): Promise<any>;
195
- getActionDetail(aid: number, context: any): Promise<any>;
196
- getResequence({ model, ids, context, offset, }: {
197
+ declare function useViewService(): {
198
+ getView: ({ model, views, context, options, aid, }: GetViewParams) => Promise<any>;
199
+ getMenu: (context: any) => Promise<any>;
200
+ getActionDetail: (aid: number, context: any) => Promise<any>;
201
+ getResequence: ({ model, ids, context, offset, }: {
197
202
  model: string;
198
203
  ids: any;
199
204
  context: any;
200
205
  offset: any;
201
- }): Promise<any>;
202
- getSelectionItem({ data }: {
206
+ }) => Promise<any>;
207
+ getSelectionItem: ({ data }: {
203
208
  data: GetSelectionType;
204
- }): Promise<any>;
205
- loadMessages(): Promise<any>;
206
- getVersion(): Promise<any>;
207
- get2FAMethods({ method, with_context, }: {
208
- method: string;
209
- with_context: any;
210
- }): Promise<any>;
211
- verify2FA({ method, with_context, code, device, location, }: {
212
- method: string;
213
- with_context: any;
214
- code: string;
215
- device: string;
216
- location: string;
217
- }): Promise<any>;
218
- signInSSO({ redirect_uri, state, client_id, response_type, path, }: {
219
- redirect_uri: string;
220
- state: string;
221
- client_id: string;
222
- response_type: string;
223
- path: string;
224
- }): Promise<any>;
225
- grantAccess({ redirect_uri, state, client_id, scopes, }: {
209
+ }) => Promise<any>;
210
+ loadMessages: () => Promise<any>;
211
+ getVersion: () => Promise<any>;
212
+ grantAccess: ({ redirect_uri, state, client_id, scopes, }: {
226
213
  redirect_uri: string;
227
214
  state: string;
228
215
  client_id: string;
229
216
  scopes: string[];
230
- }): Promise<any>;
231
- getFieldsViewSecurity({ method, token, views, }: {
217
+ }) => Promise<any>;
218
+ removeTotpSetUp: ({ method, token }: {
219
+ method: string;
220
+ token: string;
221
+ }) => Promise<any>;
222
+ requestSetupTotp: ({ method, token }: {
232
223
  method: string;
233
224
  token: string;
234
- views: any;
235
- }): Promise<any>;
236
- settingsWebRead2fa({ method, model, kwargs, token, }: {
225
+ }) => Promise<any>;
226
+ settingsWebRead2fa: ({ method, model, kwargs, token, }: {
237
227
  method: string;
238
228
  token: string;
239
229
  kwargs: any;
240
230
  model: string;
241
- }): Promise<any>;
242
- requestSetupTotp({ method, token }: {
231
+ }) => Promise<any>;
232
+ signInSSO: ({ redirect_uri, state, client_id, response_type, }: {
233
+ redirect_uri: string;
234
+ state: string;
235
+ client_id: string;
236
+ response_type: string;
237
+ }) => Promise<any>;
238
+ verify2FA: ({ method, with_context, code, device, location, }: {
243
239
  method: string;
244
- token: string;
245
- }): Promise<any>;
246
- verifyTotp({ method, action_token, code, }: {
240
+ with_context: any;
241
+ code: string;
242
+ device: string;
243
+ location: string;
244
+ }) => any;
245
+ get2FAMethods: ({ method, with_context }: {
246
+ method: string;
247
+ with_context: any;
248
+ }) => any;
249
+ verifyTotp: ({ method, action_token, code, }: {
247
250
  method: string;
248
251
  action_token: string;
249
252
  code: string;
250
- }): Promise<any>;
251
- removeTotpSetUp({ method, token }: {
252
- method: string;
253
- token: string;
254
- }): Promise<any>;
253
+ }) => any;
255
254
  };
256
255
 
257
- export { ActionService, AuthService, CompanyService, ExcelService, FormService, KanbanServices as KanbanService, ModelService, UserService, ViewService };
256
+ export { useActionService, useAuthService, useCompanyService, useExcelService, useFormService, useKanbanService, useModelService, useUserService, useViewService };