@fctc/interface-logic 1.2.8 → 1.2.10

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,19 +0,0 @@
1
- interface BaseModelInit {
2
- name: string;
3
- view: Record<string, any>;
4
- actContext?: Record<string, any>;
5
- fields?: any;
6
- }
7
- declare class BaseModel {
8
- name: string;
9
- view: Record<string, any>;
10
- actContext?: Record<string, any>;
11
- fields?: any;
12
- constructor(init: BaseModelInit);
13
- private getSpecificationByFields;
14
- getTreeProps(): Record<string, any>;
15
- getTreeFields(): Record<string, any>[];
16
- getSpecification(): Record<string, any>;
17
- }
18
-
19
- export { BaseModel as B, type BaseModelInit as a };
package/dist/model.d.mts DELETED
@@ -1,35 +0,0 @@
1
- import { B as BaseModel } from './index-C_nK1Mii.mjs';
2
- import { B as BaseModelInit } from './base-model-type-DvO53Lwi.mjs';
3
-
4
- interface CompanyData {
5
- id?: number;
6
- name?: string;
7
- [key: string]: any;
8
- }
9
- interface CompanyResponse {
10
- data: CompanyData;
11
- status: number;
12
- [key: string]: any;
13
- }
14
- declare class CompanyModel extends BaseModel {
15
- constructor(init: BaseModelInit);
16
- getCurrentCompany(): Promise<CompanyResponse>;
17
- getUserCompany(id: number): Promise<CompanyResponse>;
18
- }
19
-
20
- interface UserData {
21
- id?: number;
22
- name?: string;
23
- [key: string]: any;
24
- }
25
- interface UserResponse {
26
- data: UserData;
27
- status: number;
28
- [key: string]: any;
29
- }
30
- declare class UserModel extends BaseModel {
31
- constructor(init: BaseModelInit);
32
- getProfile(): Promise<UserResponse>;
33
- }
34
-
35
- export { BaseModel, CompanyModel, UserModel };
package/dist/model.d.ts DELETED
@@ -1,35 +0,0 @@
1
- import { B as BaseModel } from './index-C_nK1Mii.js';
2
- import { B as BaseModelInit } from './base-model-type-DvO53Lwi.js';
3
-
4
- interface CompanyData {
5
- id?: number;
6
- name?: string;
7
- [key: string]: any;
8
- }
9
- interface CompanyResponse {
10
- data: CompanyData;
11
- status: number;
12
- [key: string]: any;
13
- }
14
- declare class CompanyModel extends BaseModel {
15
- constructor(init: BaseModelInit);
16
- getCurrentCompany(): Promise<CompanyResponse>;
17
- getUserCompany(id: number): Promise<CompanyResponse>;
18
- }
19
-
20
- interface UserData {
21
- id?: number;
22
- name?: string;
23
- [key: string]: any;
24
- }
25
- interface UserResponse {
26
- data: UserData;
27
- status: number;
28
- [key: string]: any;
29
- }
30
- declare class UserModel extends BaseModel {
31
- constructor(init: BaseModelInit);
32
- getProfile(): Promise<UserResponse>;
33
- }
34
-
35
- export { BaseModel, CompanyModel, UserModel };
@@ -1,15 +0,0 @@
1
- import { ReactNode } from 'react';
2
-
3
- declare const MainProvider: ({ children }: {
4
- children: ReactNode;
5
- }) => JSX.Element;
6
-
7
- declare const ReactQueryProvider: ({ children }: {
8
- children: ReactNode;
9
- }) => JSX.Element;
10
-
11
- declare const VersionGate: ({ children }: {
12
- children: ReactNode;
13
- }) => JSX.Element | null;
14
-
15
- export { MainProvider, ReactQueryProvider, VersionGate };
@@ -1,15 +0,0 @@
1
- import { ReactNode } from 'react';
2
-
3
- declare const MainProvider: ({ children }: {
4
- children: ReactNode;
5
- }) => JSX.Element;
6
-
7
- declare const ReactQueryProvider: ({ children }: {
8
- children: ReactNode;
9
- }) => JSX.Element;
10
-
11
- declare const VersionGate: ({ children }: {
12
- children: ReactNode;
13
- }) => JSX.Element | null;
14
-
15
- export { MainProvider, ReactQueryProvider, VersionGate };
@@ -1,258 +0,0 @@
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, f as ViewData, c as GetViewParams } from './view-type-y6vtF3wg.mjs';
2
- import { G as GetSelectionType } from './use-get-selection-QZu1jKqa.mjs';
3
- import { C as Context } from './context-type-D5XefoL-.mjs';
4
- import '@tanstack/react-query';
5
-
6
- declare const ActionService: {
7
- loadAction({ idAction, context, }: {
8
- idAction: number;
9
- context: ContextApi;
10
- }): Promise<any>;
11
- callButton({ model, ids, context, method, }: {
12
- model: string;
13
- ids: Record<string, any>[] | any;
14
- context: ContextApi;
15
- method: any;
16
- }): Promise<any>;
17
- removeRows({ model, ids, context, }: {
18
- model: string;
19
- ids: Record<string, any>[] | any;
20
- context: ContextApi;
21
- }): Promise<any>;
22
- duplicateRecord({ model, id, context, }: {
23
- model: string;
24
- id: any;
25
- context: ContextApi;
26
- }): Promise<any>;
27
- getPrintReportName({ id }: {
28
- id: number;
29
- }): Promise<any>;
30
- print({ id, report, db }: {
31
- id: number;
32
- report: any;
33
- db: any;
34
- }): Promise<any>;
35
- runAction({ idAction, context, }: {
36
- idAction: number;
37
- context: ContextApi;
38
- }): Promise<any>;
39
- };
40
-
41
- declare const AuthService: {
42
- login(body: LoginCredentialBody): Promise<any>;
43
- forgotPassword(email: string): Promise<any>;
44
- forgotPasswordSSO({ email, with_context, method, }: {
45
- email: string;
46
- with_context: any;
47
- method: string;
48
- }): Promise<any>;
49
- resetPassword(data: ResetPasswordRequest, token: string | null): Promise<any>;
50
- resetPasswordSSO({ method, password, with_context, }: {
51
- method: any;
52
- password: string;
53
- with_context: any;
54
- }): Promise<any>;
55
- updatePassword(data: UpdatePasswordRequest, token: string | null): Promise<any>;
56
- isValidToken(token: string | null): Promise<any>;
57
- loginSocial({ db, state, access_token, }: {
58
- db: string;
59
- state: object;
60
- access_token: string;
61
- }): Promise<any>;
62
- getProviders(db?: string): Promise<any>;
63
- getAccessByCode(code: string): Promise<any>;
64
- logout(data: string): Promise<any>;
65
- };
66
-
67
- declare const CompanyService: {
68
- getCurrentCompany(): Promise<any>;
69
- getInfoCompany(id: number): Promise<any>;
70
- };
71
-
72
- declare const ExcelService: {
73
- uploadFile({ formData }: {
74
- formData: any;
75
- }): Promise<any>;
76
- uploadIdFile({ formData }: {
77
- formData: any;
78
- }): Promise<any>;
79
- parsePreview({ id, selectedSheet, isHeader, context, }: {
80
- id: any;
81
- selectedSheet: any;
82
- isHeader: boolean;
83
- context: any;
84
- }): Promise<any>;
85
- executeImport({ columns, fields, idFile, options, dryrun, context, }: {
86
- columns: any;
87
- fields: any;
88
- idFile: any;
89
- options: any;
90
- dryrun: any;
91
- context: any;
92
- }): Promise<any>;
93
- getFileExcel({ model }: {
94
- model: string;
95
- }): Promise<any>;
96
- getFieldExport({ ids, model, isShow, parentField, fieldType, parentName, prefix, name, context, importCompat, }: {
97
- ids: any;
98
- model: string;
99
- isShow?: boolean;
100
- parentField?: any;
101
- fieldType?: any;
102
- parentName?: any;
103
- prefix?: any;
104
- name?: any;
105
- context: any;
106
- importCompat?: any;
107
- }): Promise<any>;
108
- exportExcel({ model, domain, ids, fields, type, importCompat, context, groupby, }: {
109
- model: string;
110
- domain: any;
111
- ids: any;
112
- fields: any;
113
- type: any;
114
- importCompat: any;
115
- context: any;
116
- groupby: any;
117
- }): Promise<any>;
118
- };
119
-
120
- type TFormView = {
121
- model: string;
122
- id?: number | null;
123
- context?: any;
124
- };
125
- declare const FormService: {
126
- getComment({ data }: {
127
- data: any;
128
- }): Promise<any>;
129
- sentComment({ data }: any): Promise<any>;
130
- deleteComment({ data }: {
131
- data: any;
132
- }): Promise<any>;
133
- getImage({ data }: {
134
- data: any;
135
- }): Promise<any>;
136
- uploadImage({ data }: {
137
- data: any;
138
- }): Promise<any>;
139
- getFormView({ data }: {
140
- data: TFormView;
141
- }): Promise<any>;
142
- changeStatus({ data }: any): Promise<any>;
143
- };
144
-
145
- declare const KanbanServices: {
146
- getGroups({ model, width_context, }: {
147
- model: string;
148
- width_context: any;
149
- }): Promise<any>;
150
- getProgressBar({ field, color, model, width_context, }: {
151
- field: any;
152
- color: any;
153
- model: string;
154
- width_context: string;
155
- }): Promise<any>;
156
- };
157
-
158
- declare const ModelService: {
159
- getListMyBankAccount({ domain, spectification, model, }: {
160
- domain: any;
161
- spectification: any;
162
- model: string;
163
- }): Promise<any>;
164
- getCurrency(): Promise<any>;
165
- getConversionRate(): Promise<any>;
166
- getAll({ data }: {
167
- data: any;
168
- }): Promise<any>;
169
- getListCalendar({ data }: {
170
- data: any;
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, }: SaveParams): Promise<any>;
175
- delete({ ids, model }: DeleteParams): Promise<any>;
176
- onChange({ ids, model, object, specification, context, fieldChange, }: OnChangeParams): Promise<any>;
177
- getListFieldsOnchange({ model }: {
178
- model: string;
179
- }): Promise<any>;
180
- parseORMOdoo(data: Record<string, any>): Record<string, any>;
181
- toDataJS(data: Record<string, any>, viewData?: ViewData, model?: string): Record<string, any>;
182
- };
183
-
184
- declare const UserService: {
185
- getProfile(): Promise<any>;
186
- getUser({ context, id }: {
187
- context: any;
188
- id: any;
189
- }): Promise<any>;
190
- switchUserLocale: ({ id, values }: any) => Promise<any>;
191
- };
192
-
193
- declare const ViewService: {
194
- getView({ model, views, context, options, aid, }: GetViewParams): Promise<any>;
195
- getMenu(context: Context): Promise<any>;
196
- getActionDetail(aid: number, context: Context): Promise<any>;
197
- getResequence({ model, ids, context, offset, }: {
198
- model: string;
199
- ids: any;
200
- context: Context;
201
- offset: any;
202
- }): Promise<any>;
203
- getSelectionItem({ data }: {
204
- data: GetSelectionType;
205
- }): Promise<any>;
206
- loadMessages(): Promise<any>;
207
- getVersion(): Promise<any>;
208
- get2FAMethods({ method, with_context, }: {
209
- method: string;
210
- with_context: any;
211
- }): Promise<any>;
212
- verify2FA({ method, with_context, code, device, location, }: {
213
- method: string;
214
- with_context: any;
215
- code: string;
216
- device: string;
217
- location: string;
218
- }): Promise<any>;
219
- signInSSO({ redirect_uri, state, client_id, response_type, path, }: {
220
- redirect_uri: string;
221
- state: string;
222
- client_id: string;
223
- response_type: string;
224
- path: string;
225
- }): Promise<any>;
226
- grantAccess({ redirect_uri, state, client_id, scopes, }: {
227
- redirect_uri: string;
228
- state: string;
229
- client_id: string;
230
- scopes: string[];
231
- }): Promise<any>;
232
- getFieldsViewSecurity({ method, token, views, }: {
233
- method: string;
234
- token: string;
235
- views: any;
236
- }): Promise<any>;
237
- settingsWebRead2fa({ method, model, kwargs, token, }: {
238
- method: string;
239
- token: string;
240
- kwargs: any;
241
- model: string;
242
- }): Promise<any>;
243
- requestSetupTotp({ method, token }: {
244
- method: string;
245
- token: string;
246
- }): Promise<any>;
247
- verifyTotp({ method, action_token, code, }: {
248
- method: string;
249
- action_token: string;
250
- code: string;
251
- }): Promise<any>;
252
- removeTotpSetUp({ method, token }: {
253
- method: string;
254
- token: string;
255
- }): Promise<any>;
256
- };
257
-
258
- export { ActionService, AuthService, CompanyService, ExcelService, FormService, KanbanServices as KanbanService, ModelService, UserService, ViewService };
@@ -1,258 +0,0 @@
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, f as ViewData, c as GetViewParams } from './view-type-y6vtF3wg.js';
2
- import { G as GetSelectionType } from './use-get-selection-QZu1jKqa.js';
3
- import { C as Context } from './context-type-D5XefoL-.js';
4
- import '@tanstack/react-query';
5
-
6
- declare const ActionService: {
7
- loadAction({ idAction, context, }: {
8
- idAction: number;
9
- context: ContextApi;
10
- }): Promise<any>;
11
- callButton({ model, ids, context, method, }: {
12
- model: string;
13
- ids: Record<string, any>[] | any;
14
- context: ContextApi;
15
- method: any;
16
- }): Promise<any>;
17
- removeRows({ model, ids, context, }: {
18
- model: string;
19
- ids: Record<string, any>[] | any;
20
- context: ContextApi;
21
- }): Promise<any>;
22
- duplicateRecord({ model, id, context, }: {
23
- model: string;
24
- id: any;
25
- context: ContextApi;
26
- }): Promise<any>;
27
- getPrintReportName({ id }: {
28
- id: number;
29
- }): Promise<any>;
30
- print({ id, report, db }: {
31
- id: number;
32
- report: any;
33
- db: any;
34
- }): Promise<any>;
35
- runAction({ idAction, context, }: {
36
- idAction: number;
37
- context: ContextApi;
38
- }): Promise<any>;
39
- };
40
-
41
- declare const AuthService: {
42
- login(body: LoginCredentialBody): Promise<any>;
43
- forgotPassword(email: string): Promise<any>;
44
- forgotPasswordSSO({ email, with_context, method, }: {
45
- email: string;
46
- with_context: any;
47
- method: string;
48
- }): Promise<any>;
49
- resetPassword(data: ResetPasswordRequest, token: string | null): Promise<any>;
50
- resetPasswordSSO({ method, password, with_context, }: {
51
- method: any;
52
- password: string;
53
- with_context: any;
54
- }): Promise<any>;
55
- updatePassword(data: UpdatePasswordRequest, token: string | null): Promise<any>;
56
- isValidToken(token: string | null): Promise<any>;
57
- loginSocial({ db, state, access_token, }: {
58
- db: string;
59
- state: object;
60
- access_token: string;
61
- }): Promise<any>;
62
- getProviders(db?: string): Promise<any>;
63
- getAccessByCode(code: string): Promise<any>;
64
- logout(data: string): Promise<any>;
65
- };
66
-
67
- declare const CompanyService: {
68
- getCurrentCompany(): Promise<any>;
69
- getInfoCompany(id: number): Promise<any>;
70
- };
71
-
72
- declare const ExcelService: {
73
- uploadFile({ formData }: {
74
- formData: any;
75
- }): Promise<any>;
76
- uploadIdFile({ formData }: {
77
- formData: any;
78
- }): Promise<any>;
79
- parsePreview({ id, selectedSheet, isHeader, context, }: {
80
- id: any;
81
- selectedSheet: any;
82
- isHeader: boolean;
83
- context: any;
84
- }): Promise<any>;
85
- executeImport({ columns, fields, idFile, options, dryrun, context, }: {
86
- columns: any;
87
- fields: any;
88
- idFile: any;
89
- options: any;
90
- dryrun: any;
91
- context: any;
92
- }): Promise<any>;
93
- getFileExcel({ model }: {
94
- model: string;
95
- }): Promise<any>;
96
- getFieldExport({ ids, model, isShow, parentField, fieldType, parentName, prefix, name, context, importCompat, }: {
97
- ids: any;
98
- model: string;
99
- isShow?: boolean;
100
- parentField?: any;
101
- fieldType?: any;
102
- parentName?: any;
103
- prefix?: any;
104
- name?: any;
105
- context: any;
106
- importCompat?: any;
107
- }): Promise<any>;
108
- exportExcel({ model, domain, ids, fields, type, importCompat, context, groupby, }: {
109
- model: string;
110
- domain: any;
111
- ids: any;
112
- fields: any;
113
- type: any;
114
- importCompat: any;
115
- context: any;
116
- groupby: any;
117
- }): Promise<any>;
118
- };
119
-
120
- type TFormView = {
121
- model: string;
122
- id?: number | null;
123
- context?: any;
124
- };
125
- declare const FormService: {
126
- getComment({ data }: {
127
- data: any;
128
- }): Promise<any>;
129
- sentComment({ data }: any): Promise<any>;
130
- deleteComment({ data }: {
131
- data: any;
132
- }): Promise<any>;
133
- getImage({ data }: {
134
- data: any;
135
- }): Promise<any>;
136
- uploadImage({ data }: {
137
- data: any;
138
- }): Promise<any>;
139
- getFormView({ data }: {
140
- data: TFormView;
141
- }): Promise<any>;
142
- changeStatus({ data }: any): Promise<any>;
143
- };
144
-
145
- declare const KanbanServices: {
146
- getGroups({ model, width_context, }: {
147
- model: string;
148
- width_context: any;
149
- }): Promise<any>;
150
- getProgressBar({ field, color, model, width_context, }: {
151
- field: any;
152
- color: any;
153
- model: string;
154
- width_context: string;
155
- }): Promise<any>;
156
- };
157
-
158
- declare const ModelService: {
159
- getListMyBankAccount({ domain, spectification, model, }: {
160
- domain: any;
161
- spectification: any;
162
- model: string;
163
- }): Promise<any>;
164
- getCurrency(): Promise<any>;
165
- getConversionRate(): Promise<any>;
166
- getAll({ data }: {
167
- data: any;
168
- }): Promise<any>;
169
- getListCalendar({ data }: {
170
- data: any;
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, }: SaveParams): Promise<any>;
175
- delete({ ids, model }: DeleteParams): Promise<any>;
176
- onChange({ ids, model, object, specification, context, fieldChange, }: OnChangeParams): Promise<any>;
177
- getListFieldsOnchange({ model }: {
178
- model: string;
179
- }): Promise<any>;
180
- parseORMOdoo(data: Record<string, any>): Record<string, any>;
181
- toDataJS(data: Record<string, any>, viewData?: ViewData, model?: string): Record<string, any>;
182
- };
183
-
184
- declare const UserService: {
185
- getProfile(): Promise<any>;
186
- getUser({ context, id }: {
187
- context: any;
188
- id: any;
189
- }): Promise<any>;
190
- switchUserLocale: ({ id, values }: any) => Promise<any>;
191
- };
192
-
193
- declare const ViewService: {
194
- getView({ model, views, context, options, aid, }: GetViewParams): Promise<any>;
195
- getMenu(context: Context): Promise<any>;
196
- getActionDetail(aid: number, context: Context): Promise<any>;
197
- getResequence({ model, ids, context, offset, }: {
198
- model: string;
199
- ids: any;
200
- context: Context;
201
- offset: any;
202
- }): Promise<any>;
203
- getSelectionItem({ data }: {
204
- data: GetSelectionType;
205
- }): Promise<any>;
206
- loadMessages(): Promise<any>;
207
- getVersion(): Promise<any>;
208
- get2FAMethods({ method, with_context, }: {
209
- method: string;
210
- with_context: any;
211
- }): Promise<any>;
212
- verify2FA({ method, with_context, code, device, location, }: {
213
- method: string;
214
- with_context: any;
215
- code: string;
216
- device: string;
217
- location: string;
218
- }): Promise<any>;
219
- signInSSO({ redirect_uri, state, client_id, response_type, path, }: {
220
- redirect_uri: string;
221
- state: string;
222
- client_id: string;
223
- response_type: string;
224
- path: string;
225
- }): Promise<any>;
226
- grantAccess({ redirect_uri, state, client_id, scopes, }: {
227
- redirect_uri: string;
228
- state: string;
229
- client_id: string;
230
- scopes: string[];
231
- }): Promise<any>;
232
- getFieldsViewSecurity({ method, token, views, }: {
233
- method: string;
234
- token: string;
235
- views: any;
236
- }): Promise<any>;
237
- settingsWebRead2fa({ method, model, kwargs, token, }: {
238
- method: string;
239
- token: string;
240
- kwargs: any;
241
- model: string;
242
- }): Promise<any>;
243
- requestSetupTotp({ method, token }: {
244
- method: string;
245
- token: string;
246
- }): Promise<any>;
247
- verifyTotp({ method, action_token, code, }: {
248
- method: string;
249
- action_token: string;
250
- code: string;
251
- }): Promise<any>;
252
- removeTotpSetUp({ method, token }: {
253
- method: string;
254
- token: string;
255
- }): Promise<any>;
256
- };
257
-
258
- export { ActionService, AuthService, CompanyService, ExcelService, FormService, KanbanServices as KanbanService, ModelService, UserService, ViewService };
@@ -1,15 +0,0 @@
1
- declare const localStorageUtils: () => {
2
- setToken: (access_token: string) => Promise<void>;
3
- setRefreshToken: (refresh_token: string) => Promise<void>;
4
- getAccessToken: () => Promise<string | null>;
5
- getRefreshToken: () => Promise<string | null>;
6
- clearToken: () => Promise<void>;
7
- };
8
- type LocalStorageUtilsType = ReturnType<typeof localStorageUtils>;
9
-
10
- declare const sessionStorageUtils: () => {
11
- getBrowserSession: () => Promise<string | null>;
12
- };
13
- type SessionStorageUtilsType = ReturnType<typeof sessionStorageUtils>;
14
-
15
- export { type LocalStorageUtilsType as L, type SessionStorageUtilsType as S, localStorageUtils as l, sessionStorageUtils as s };
@@ -1,15 +0,0 @@
1
- declare const localStorageUtils: () => {
2
- setToken: (access_token: string) => Promise<void>;
3
- setRefreshToken: (refresh_token: string) => Promise<void>;
4
- getAccessToken: () => Promise<string | null>;
5
- getRefreshToken: () => Promise<string | null>;
6
- clearToken: () => Promise<void>;
7
- };
8
- type LocalStorageUtilsType = ReturnType<typeof localStorageUtils>;
9
-
10
- declare const sessionStorageUtils: () => {
11
- getBrowserSession: () => Promise<string | null>;
12
- };
13
- type SessionStorageUtilsType = ReturnType<typeof sessionStorageUtils>;
14
-
15
- export { type LocalStorageUtilsType as L, type SessionStorageUtilsType as S, localStorageUtils as l, sessionStorageUtils as s };