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