@fctc/interface-logic 1.3.3 → 1.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/hooks.d.mts CHANGED
@@ -1,6 +1,5 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { L as LoginCredentialBody, d as SocialTokenBody, F as ForgotPasswordBody, u as updatePasswordBody, V as ViewData, C as ContextApi, c as GetSelectionType } from './api-type-DOC6jjy_.mjs';
3
- import { a as BaseModelInit, B as BaseModel } from './index-C_nK1Mii.mjs';
2
+ import { L as LoginCredentialBody, d as SocialTokenBody, F as ForgotPasswordBody, u as updatePasswordBody, V as ViewData, C as ContextApi, c as GetSelectionType, f as GetViewParams } from './view-type-BGJfDe73.mjs';
4
3
 
5
4
  declare const useForgotPassword: () => _tanstack_react_query.UseMutationResult<any, Error, string, unknown>;
6
5
 
@@ -161,6 +160,25 @@ declare const useGetListMyBankAccount: ({ domain, spectification, model, }: {
161
160
  model: string;
162
161
  }) => _tanstack_react_query.UseQueryResult<any, Error>;
163
162
 
163
+ interface BaseModelInit {
164
+ name: string;
165
+ view: Record<string, any>;
166
+ actContext?: Record<string, any>;
167
+ fields?: any;
168
+ }
169
+
170
+ declare class BaseModel {
171
+ name: string;
172
+ view: Record<string, any>;
173
+ actContext?: Record<string, any>;
174
+ fields?: any;
175
+ constructor(init: BaseModelInit);
176
+ private getSpecificationByFields;
177
+ getTreeProps(): Record<string, any>;
178
+ getTreeFields(): Record<string, any>[];
179
+ getSpecification(): Record<string, any>;
180
+ }
181
+
164
182
  declare const useModel: () => {
165
183
  initModel: (modelData: BaseModelInit) => BaseModel;
166
184
  };
@@ -253,19 +271,6 @@ declare const useGetSelection: ({ data, queryKey, enabled, }: {
253
271
  enabled?: boolean;
254
272
  }) => _tanstack_react_query.UseQueryResult<any, Error>;
255
273
 
256
- type View = [number | boolean, string];
257
- type Option = {
258
- action_id?: number;
259
- load_filters?: boolean;
260
- toolbar?: boolean;
261
- };
262
- interface GetViewParams {
263
- model?: string;
264
- views?: View[];
265
- context?: Record<string, any>;
266
- options?: Option;
267
- aid?: number | string | null | boolean;
268
- }
269
274
  declare const useGetView: (viewParams: GetViewParams, actData?: any) => _tanstack_react_query.UseQueryResult<any, Error>;
270
275
 
271
276
  declare const useLoadAction: () => _tanstack_react_query.UseMutationResult<any, Error, {
package/dist/hooks.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { L as LoginCredentialBody, d as SocialTokenBody, F as ForgotPasswordBody, u as updatePasswordBody, V as ViewData, C as ContextApi, c as GetSelectionType } from './api-type-DOC6jjy_.js';
3
- import { a as BaseModelInit, B as BaseModel } from './index-C_nK1Mii.js';
2
+ import { L as LoginCredentialBody, d as SocialTokenBody, F as ForgotPasswordBody, u as updatePasswordBody, V as ViewData, C as ContextApi, c as GetSelectionType, f as GetViewParams } from './view-type-BGJfDe73.js';
4
3
 
5
4
  declare const useForgotPassword: () => _tanstack_react_query.UseMutationResult<any, Error, string, unknown>;
6
5
 
@@ -161,6 +160,25 @@ declare const useGetListMyBankAccount: ({ domain, spectification, model, }: {
161
160
  model: string;
162
161
  }) => _tanstack_react_query.UseQueryResult<any, Error>;
163
162
 
163
+ interface BaseModelInit {
164
+ name: string;
165
+ view: Record<string, any>;
166
+ actContext?: Record<string, any>;
167
+ fields?: any;
168
+ }
169
+
170
+ declare class BaseModel {
171
+ name: string;
172
+ view: Record<string, any>;
173
+ actContext?: Record<string, any>;
174
+ fields?: any;
175
+ constructor(init: BaseModelInit);
176
+ private getSpecificationByFields;
177
+ getTreeProps(): Record<string, any>;
178
+ getTreeFields(): Record<string, any>[];
179
+ getSpecification(): Record<string, any>;
180
+ }
181
+
164
182
  declare const useModel: () => {
165
183
  initModel: (modelData: BaseModelInit) => BaseModel;
166
184
  };
@@ -253,19 +271,6 @@ declare const useGetSelection: ({ data, queryKey, enabled, }: {
253
271
  enabled?: boolean;
254
272
  }) => _tanstack_react_query.UseQueryResult<any, Error>;
255
273
 
256
- type View = [number | boolean, string];
257
- type Option = {
258
- action_id?: number;
259
- load_filters?: boolean;
260
- toolbar?: boolean;
261
- };
262
- interface GetViewParams {
263
- model?: string;
264
- views?: View[];
265
- context?: Record<string, any>;
266
- options?: Option;
267
- aid?: number | string | null | boolean;
268
- }
269
274
  declare const useGetView: (viewParams: GetViewParams, actData?: any) => _tanstack_react_query.UseQueryResult<any, Error>;
270
275
 
271
276
  declare const useLoadAction: () => _tanstack_react_query.UseMutationResult<any, Error, {
@@ -1,4 +1,4 @@
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, c as GetSelectionType } from './api-type-DOC6jjy_.mjs';
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
3
  declare const ActionService: {
4
4
  loadAction({ idAction, context, }: {
@@ -187,19 +187,6 @@ declare const UserService: {
187
187
  switchUserLocale: ({ id, values }: any) => Promise<any>;
188
188
  };
189
189
 
190
- type View = [number | boolean, string];
191
- type Option = {
192
- action_id?: number;
193
- load_filters?: boolean;
194
- toolbar?: boolean;
195
- };
196
- interface GetViewParams {
197
- model?: string;
198
- views?: View[];
199
- context?: Record<string, any>;
200
- options?: Option;
201
- aid?: number | string | null | boolean;
202
- }
203
190
  declare const ViewService: {
204
191
  getView({ model, views, context, options, aid, }: GetViewParams): Promise<any>;
205
192
  getMenu(context: any): Promise<any>;
@@ -1,4 +1,4 @@
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, c as GetSelectionType } from './api-type-DOC6jjy_.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';
2
2
 
3
3
  declare const ActionService: {
4
4
  loadAction({ idAction, context, }: {
@@ -187,19 +187,6 @@ declare const UserService: {
187
187
  switchUserLocale: ({ id, values }: any) => Promise<any>;
188
188
  };
189
189
 
190
- type View = [number | boolean, string];
191
- type Option = {
192
- action_id?: number;
193
- load_filters?: boolean;
194
- toolbar?: boolean;
195
- };
196
- interface GetViewParams {
197
- model?: string;
198
- views?: View[];
199
- context?: Record<string, any>;
200
- options?: Option;
201
- aid?: number | string | null | boolean;
202
- }
203
190
  declare const ViewService: {
204
191
  getView({ model, views, context, options, aid, }: GetViewParams): Promise<any>;
205
192
  getMenu(context: any): Promise<any>;
package/dist/types.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- export { C as ContextApi, D as DeleteParams, F as ForgotPasswordBody, G as GetAllParams, a as GetDetailParams, b as GetListParams, c as GetSelectionType, L as LoginCredentialBody, O as OnChangeParams, R as ResetPasswordRequest, S as SaveParams, d as SocialTokenBody, e as Specification, U as UpdatePasswordRequest, V as ViewData, u as updatePasswordBody } from './api-type-DOC6jjy_.mjs';
1
+ export { C as ContextApi, D as DeleteParams, F as ForgotPasswordBody, G as GetAllParams, a as GetDetailParams, b as GetListParams, c as GetSelectionType, f as GetViewParams, L as LoginCredentialBody, O as OnChangeParams, R as ResetPasswordRequest, S as SaveParams, d as SocialTokenBody, e as Specification, U as UpdatePasswordRequest, g as View, V as ViewData, u as updatePasswordBody } from './view-type-BGJfDe73.mjs';
2
2
 
3
3
  interface Config {
4
4
  baseUrl: string;
@@ -7,4 +7,11 @@ interface Config {
7
7
  clientSecret: string;
8
8
  }
9
9
 
10
- export type { Config };
10
+ interface Context {
11
+ uid: number;
12
+ lang: string;
13
+ allowCompanys: number[];
14
+ [key: string]: any;
15
+ }
16
+
17
+ export type { Config, Context };
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { C as ContextApi, D as DeleteParams, F as ForgotPasswordBody, G as GetAllParams, a as GetDetailParams, b as GetListParams, c as GetSelectionType, L as LoginCredentialBody, O as OnChangeParams, R as ResetPasswordRequest, S as SaveParams, d as SocialTokenBody, e as Specification, U as UpdatePasswordRequest, V as ViewData, u as updatePasswordBody } from './api-type-DOC6jjy_.js';
1
+ export { C as ContextApi, D as DeleteParams, F as ForgotPasswordBody, G as GetAllParams, a as GetDetailParams, b as GetListParams, c as GetSelectionType, f as GetViewParams, L as LoginCredentialBody, O as OnChangeParams, R as ResetPasswordRequest, S as SaveParams, d as SocialTokenBody, e as Specification, U as UpdatePasswordRequest, g as View, V as ViewData, u as updatePasswordBody } from './view-type-BGJfDe73.js';
2
2
 
3
3
  interface Config {
4
4
  baseUrl: string;
@@ -7,4 +7,11 @@ interface Config {
7
7
  clientSecret: string;
8
8
  }
9
9
 
10
- export type { Config };
10
+ interface Context {
11
+ uid: number;
12
+ lang: string;
13
+ allowCompanys: number[];
14
+ [key: string]: any;
15
+ }
16
+
17
+ export type { Config, Context };
@@ -96,4 +96,18 @@ type GetSelectionType = {
96
96
  specification?: any;
97
97
  };
98
98
 
99
- export type { ContextApi as C, DeleteParams as D, ForgotPasswordBody as F, GetAllParams as G, LoginCredentialBody as L, OnChangeParams as O, ResetPasswordRequest as R, SaveParams as S, UpdatePasswordRequest as U, ViewData as V, GetDetailParams as a, GetListParams as b, GetSelectionType as c, SocialTokenBody as d, Specification as e, updatePasswordBody as u };
99
+ type View = [number | boolean, string];
100
+ type Option = {
101
+ action_id?: number;
102
+ load_filters?: boolean;
103
+ toolbar?: boolean;
104
+ };
105
+ interface GetViewParams {
106
+ model?: string;
107
+ views?: View[];
108
+ context?: Record<string, any>;
109
+ options?: Option;
110
+ aid?: number | string | null | boolean;
111
+ }
112
+
113
+ export type { ContextApi as C, DeleteParams as D, ForgotPasswordBody as F, GetAllParams as G, LoginCredentialBody as L, OnChangeParams as O, ResetPasswordRequest as R, SaveParams as S, UpdatePasswordRequest as U, ViewData as V, GetDetailParams as a, GetListParams as b, GetSelectionType as c, SocialTokenBody as d, Specification as e, GetViewParams as f, View as g, updatePasswordBody as u };
@@ -96,4 +96,18 @@ type GetSelectionType = {
96
96
  specification?: any;
97
97
  };
98
98
 
99
- export type { ContextApi as C, DeleteParams as D, ForgotPasswordBody as F, GetAllParams as G, LoginCredentialBody as L, OnChangeParams as O, ResetPasswordRequest as R, SaveParams as S, UpdatePasswordRequest as U, ViewData as V, GetDetailParams as a, GetListParams as b, GetSelectionType as c, SocialTokenBody as d, Specification as e, updatePasswordBody as u };
99
+ type View = [number | boolean, string];
100
+ type Option = {
101
+ action_id?: number;
102
+ load_filters?: boolean;
103
+ toolbar?: boolean;
104
+ };
105
+ interface GetViewParams {
106
+ model?: string;
107
+ views?: View[];
108
+ context?: Record<string, any>;
109
+ options?: Option;
110
+ aid?: number | string | null | boolean;
111
+ }
112
+
113
+ export type { ContextApi as C, DeleteParams as D, ForgotPasswordBody as F, GetAllParams as G, LoginCredentialBody as L, OnChangeParams as O, ResetPasswordRequest as R, SaveParams as S, UpdatePasswordRequest as U, ViewData as V, GetDetailParams as a, GetListParams as b, GetSelectionType as c, SocialTokenBody as d, Specification as e, GetViewParams as f, View as g, updatePasswordBody as u };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fctc/interface-logic",
3
- "version": "1.3.3",
3
+ "version": "1.3.4",
4
4
  "types": "dist/index.d.ts",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",
@@ -54,11 +54,6 @@
54
54
  "types": "./dist/types.d.ts",
55
55
  "import": "./dist/types.mjs",
56
56
  "require": "./dist/types.cjs"
57
- },
58
- "./models": {
59
- "types": "./dist/models.d.ts",
60
- "import": "./dist/models.mjs",
61
- "require": "./dist/models.cjs"
62
57
  }
63
58
  },
64
59
  "files": [
@@ -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 };
@@ -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/models.d.mts DELETED
@@ -1,34 +0,0 @@
1
- import { B as BaseModel, a as BaseModelInit } from './index-C_nK1Mii.mjs';
2
-
3
- interface CompanyData {
4
- id?: number;
5
- name?: string;
6
- [key: string]: any;
7
- }
8
- interface CompanyResponse {
9
- data: CompanyData;
10
- status: number;
11
- [key: string]: any;
12
- }
13
- declare class CompanyModel extends BaseModel {
14
- constructor(init: BaseModelInit);
15
- getCurrentCompany(): Promise<CompanyResponse>;
16
- getUserCompany(id: number): Promise<CompanyResponse>;
17
- }
18
-
19
- interface UserData {
20
- id?: number;
21
- name?: string;
22
- [key: string]: any;
23
- }
24
- interface UserResponse {
25
- data: UserData;
26
- status: number;
27
- [key: string]: any;
28
- }
29
- declare class UserModel extends BaseModel {
30
- constructor(init: BaseModelInit);
31
- getProfile(): Promise<UserResponse>;
32
- }
33
-
34
- export { BaseModel, BaseModelInit, CompanyModel, UserModel };
package/dist/models.d.ts DELETED
@@ -1,34 +0,0 @@
1
- import { B as BaseModel, a as BaseModelInit } from './index-C_nK1Mii.js';
2
-
3
- interface CompanyData {
4
- id?: number;
5
- name?: string;
6
- [key: string]: any;
7
- }
8
- interface CompanyResponse {
9
- data: CompanyData;
10
- status: number;
11
- [key: string]: any;
12
- }
13
- declare class CompanyModel extends BaseModel {
14
- constructor(init: BaseModelInit);
15
- getCurrentCompany(): Promise<CompanyResponse>;
16
- getUserCompany(id: number): Promise<CompanyResponse>;
17
- }
18
-
19
- interface UserData {
20
- id?: number;
21
- name?: string;
22
- [key: string]: any;
23
- }
24
- interface UserResponse {
25
- data: UserData;
26
- status: number;
27
- [key: string]: any;
28
- }
29
- declare class UserModel extends BaseModel {
30
- constructor(init: BaseModelInit);
31
- getProfile(): Promise<UserResponse>;
32
- }
33
-
34
- export { BaseModel, BaseModelInit, CompanyModel, UserModel };