@fctc/interface-logic 4.6.5 → 4.6.7

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/types.d.ts DELETED
@@ -1,19 +0,0 @@
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-CfcWWR0w.js';
2
- export { B as BaseModelInit } from './base-model-type-DD8uZnDP.js';
3
-
4
- interface Config {
5
- baseUrl: string;
6
- grantType: string;
7
- clientId: string;
8
- clientSecret: string;
9
- database: string;
10
- }
11
-
12
- interface Context {
13
- uid: number;
14
- lang: string;
15
- allowCompanys: number[];
16
- [key: string]: any;
17
- }
18
-
19
- export type { Config, Context };
package/dist/utils.cjs DELETED
@@ -1 +0,0 @@
1
- 'use strict';var chunkQV6QYYJF_cjs=require('./chunk-QV6QYYJF.cjs');Object.defineProperty(exports,"Domain",{enumerable:true,get:function(){return chunkQV6QYYJF_cjs.f}});Object.defineProperty(exports,"InvalidDomainError",{enumerable:true,get:function(){return chunkQV6QYYJF_cjs.e}});Object.defineProperty(exports,"checkDomain",{enumerable:true,get:function(){return chunkQV6QYYJF_cjs.h}});Object.defineProperty(exports,"cleanObject",{enumerable:true,get:function(){return chunkQV6QYYJF_cjs.o}});Object.defineProperty(exports,"domainHelper",{enumerable:true,get:function(){return chunkQV6QYYJF_cjs.j}});Object.defineProperty(exports,"evalDomain",{enumerable:true,get:function(){return chunkQV6QYYJF_cjs.g}});Object.defineProperty(exports,"evalJSONContext",{enumerable:true,get:function(){return chunkQV6QYYJF_cjs.k}});Object.defineProperty(exports,"evalJSONDomain",{enumerable:true,get:function(){return chunkQV6QYYJF_cjs.l}});Object.defineProperty(exports,"evalPartialContext",{enumerable:true,get:function(){return chunkQV6QYYJF_cjs.d}});Object.defineProperty(exports,"formatSortingString",{enumerable:true,get:function(){return chunkQV6QYYJF_cjs.m}});Object.defineProperty(exports,"localStorageUtils",{enumerable:true,get:function(){return chunkQV6QYYJF_cjs.a}});Object.defineProperty(exports,"makeContext",{enumerable:true,get:function(){return chunkQV6QYYJF_cjs.c}});Object.defineProperty(exports,"matchDomains",{enumerable:true,get:function(){return chunkQV6QYYJF_cjs.i}});Object.defineProperty(exports,"sessionStorageUtils",{enumerable:true,get:function(){return chunkQV6QYYJF_cjs.b}});Object.defineProperty(exports,"toQueryString",{enumerable:true,get:function(){return chunkQV6QYYJF_cjs.n}});Object.defineProperty(exports,"updateTokenParamInOriginalRequest",{enumerable:true,get:function(){return chunkQV6QYYJF_cjs.p}});
package/dist/utils.d.ts DELETED
@@ -1,84 +0,0 @@
1
- export { L as LocalStorageUtilsType, l as localStorageUtils } from './local-storage-AbiOQTLK.js';
2
-
3
- declare const sessionStorageUtils: {
4
- getMenuFocus: () => IMenu;
5
- setMenuFocus: (menuTree: IMenu) => void;
6
- setActionData: (actData: any) => void;
7
- getActionData: () => any | null;
8
- getViewData: () => any | null;
9
- setViewData: (viewData: any) => void;
10
- getBrowserSession: () => string | null;
11
- getXNode: () => any | null;
12
- setXNode: (xNode: any) => void;
13
- };
14
- interface IMenu {
15
- id: number | undefined;
16
- service: string;
17
- }
18
-
19
- interface Context {
20
- [key: string]: any;
21
- }
22
- type ContextDescription = Context | string | undefined;
23
- /**
24
- * Create an evaluated context from an arbitrary list of context representations.
25
- * The evaluated context in construction is used along the way to evaluate further parts.
26
- *
27
- * @param contexts - Danh sách các context representations
28
- * @param initialEvaluationContext - Context ban đầu để bắt đầu đánh giá (tùy chọn)
29
- * @returns Context đã được đánh giá
30
- */
31
- declare function makeContext(contexts: ContextDescription[], initialEvaluationContext?: Context): Context;
32
- /**
33
- * Allow to evaluate a context with an incomplete evaluation context. The evaluated context only
34
- * contains keys whose values are static or can be evaluated with the given evaluation context.
35
- *
36
- * @param context - Chuỗi context cần đánh giá
37
- * @param evaluationContext - Context dùng để đánh giá (mặc định là rỗng)
38
- * @returns Context đã được đánh giá một phần
39
- */
40
- declare function evalPartialContext(_context: string, evaluationContext?: Context): Context;
41
-
42
- type AST = {
43
- type: number;
44
- value: any;
45
- };
46
- type Condition = [string | 0 | 1, string, any];
47
- type DomainListRepr = ('&' | '|' | '!' | Condition)[];
48
- type DomainRepr = DomainListRepr | string | Domain;
49
- declare class InvalidDomainError extends Error {
50
- }
51
- declare class Domain {
52
- ast: AST;
53
- static TRUE: Domain;
54
- static FALSE: Domain;
55
- static combine(domains: DomainRepr[], operator: 'AND' | 'OR'): Domain;
56
- static and(domains: DomainRepr[]): Domain;
57
- static or(domains: DomainRepr[]): Domain;
58
- static not(domain: DomainRepr): Domain;
59
- static removeDomainLeaves(domain: DomainRepr, keysToRemove: string[]): Domain;
60
- constructor(descr?: DomainRepr);
61
- contains(record: any): boolean;
62
- toString(): string;
63
- toList(context: Record<string, any>): DomainListRepr;
64
- toJson(): DomainListRepr | string;
65
- }
66
- declare function evalDomain(modifier: any[] | boolean, evalContext: Record<string, any>): boolean;
67
- declare const checkDomain: (context: any, domain: any) => boolean;
68
- declare const matchDomains: (context: any, domains: any) => boolean;
69
-
70
- declare const domainHelper: {
71
- checkDomain: (context: any, domain: any) => boolean;
72
- matchDomains: (context: any, domains: any) => boolean;
73
- Domain: typeof Domain;
74
- };
75
- declare const evalJSONContext: (_context: any, context?: {}) => any;
76
- declare const evalJSONDomain: (domain: any, context: any) => any;
77
- declare const formatSortingString: (input: string | null | undefined) => string | null;
78
- declare const toQueryString: (params: Record<string, string | number | boolean>) => string;
79
- declare function cleanObject<T extends Record<string, any>>(obj: T): Partial<T>;
80
- declare const updateTokenParamInOriginalRequest: (originalRequest: {
81
- data?: any;
82
- }, newAccessToken: string) => any;
83
-
84
- export { Domain, InvalidDomainError, checkDomain, cleanObject, domainHelper, evalDomain, evalJSONContext, evalJSONDomain, evalPartialContext, formatSortingString, makeContext, matchDomains, sessionStorageUtils, toQueryString, updateTokenParamInOriginalRequest };
@@ -1,137 +0,0 @@
1
- interface LoginCredentialBody {
2
- email: string;
3
- password: string;
4
- path?: string;
5
- service?: string;
6
- }
7
- interface ResetPasswordRequest {
8
- password: string;
9
- confirmPassword: string;
10
- }
11
- interface UpdatePasswordRequest {
12
- newPassword: string;
13
- oldPassword: string;
14
- }
15
- interface ForgotPasswordBody {
16
- data: ResetPasswordRequest;
17
- token: string | null;
18
- }
19
- interface updatePasswordBody {
20
- data: UpdatePasswordRequest;
21
- token: string | null;
22
- }
23
- interface SocialTokenBody {
24
- state: object;
25
- access_token: string;
26
- db: string;
27
- }
28
-
29
- interface Specification {
30
- [key: string]: any;
31
- }
32
- interface ContextApi {
33
- [key: string]: any;
34
- }
35
- interface GetAllParams {
36
- model?: string;
37
- ids?: number[];
38
- specification: Specification;
39
- domain?: any[];
40
- offset?: number;
41
- sort: any;
42
- fields: any;
43
- groupby: any;
44
- context?: ContextApi;
45
- limit?: number;
46
- }
47
- interface GetListParams {
48
- model: string;
49
- ids?: number[];
50
- specification?: Specification;
51
- domain?: any[];
52
- offset?: number;
53
- order?: string;
54
- context?: ContextApi;
55
- limit?: number;
56
- }
57
- interface GetDetailParams {
58
- ids?: number[];
59
- model?: string;
60
- specification?: Specification;
61
- context?: ContextApi;
62
- service?: string;
63
- xNode?: string;
64
- }
65
- interface SaveParams {
66
- model: string;
67
- ids?: number[] | [];
68
- data?: Record<string, any>;
69
- specification?: Specification;
70
- context?: ContextApi;
71
- path?: string;
72
- service?: string;
73
- xNode?: string;
74
- }
75
- interface DeleteParams {
76
- ids?: number[];
77
- model: string;
78
- service?: string;
79
- }
80
- interface OnChangeParams {
81
- ids?: number[];
82
- model: string;
83
- object?: Record<string, any>;
84
- specification: Specification;
85
- context?: ContextApi;
86
- fieldChange?: string[];
87
- service?: string;
88
- xNode?: string;
89
- }
90
- interface ViewData {
91
- models?: {
92
- [key: string]: {
93
- [key: string]: {
94
- type: string;
95
- relation?: string;
96
- };
97
- };
98
- };
99
- }
100
- type GetSelectionType = {
101
- domain: any;
102
- context: any;
103
- model: string;
104
- specification?: any;
105
- };
106
- interface TThreadData {
107
- thread_id?: number;
108
- thread_model?: string;
109
- limit?: number;
110
- request_list?: string[];
111
- with_context?: Record<string, any>;
112
- }
113
- interface GetExternalTab {
114
- method?: string;
115
- context?: ContextApi;
116
- service?: string;
117
- xNode?: string;
118
- }
119
-
120
- type View = [number | boolean, string];
121
- type Option = {
122
- action_id?: number;
123
- load_filters?: boolean;
124
- toolbar?: boolean;
125
- };
126
- interface GetViewParams {
127
- model?: string;
128
- views?: View[];
129
- context?: Record<string, any>;
130
- options?: Option;
131
- aid?: number | string | null | boolean;
132
- service?: string;
133
- xNode?: string;
134
- searchParams?: Record<string, string | number | boolean>;
135
- }
136
-
137
- 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, TThreadData as T, 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, GetExternalTab as h, updatePasswordBody as u };
File without changes