@fctc/edu-logic-lib 1.0.3 → 1.0.5
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/index.d.mts +1294 -23
- package/dist/index.d.ts +1294 -23
- package/package.json +96 -96
- package/dist/base-model-type-DvO53Lwi.d.mts +0 -7
- package/dist/base-model-type-DvO53Lwi.d.ts +0 -7
- package/dist/config.d.mts +0 -15
- package/dist/config.d.ts +0 -15
- package/dist/config.js +0 -262
- package/dist/config.mjs +0 -256
- package/dist/constants.d.mts +0 -120
- package/dist/constants.d.ts +0 -120
- package/dist/constants.js +0 -154
- package/dist/constants.mjs +0 -141
- package/dist/context-type-D5XefoL-.d.mts +0 -8
- package/dist/context-type-D5XefoL-.d.ts +0 -8
- package/dist/environment.d.mts +0 -37
- package/dist/environment.d.ts +0 -37
- package/dist/environment.js +0 -849
- package/dist/environment.mjs +0 -841
- package/dist/hooks.d.mts +0 -218
- package/dist/hooks.d.ts +0 -218
- package/dist/hooks.js +0 -4865
- package/dist/hooks.mjs +0 -4814
- package/dist/index-C_nK1Mii.d.mts +0 -19
- package/dist/index-C_nK1Mii.d.ts +0 -19
- package/dist/models.d.mts +0 -35
- package/dist/models.d.ts +0 -35
- package/dist/models.js +0 -3225
- package/dist/models.mjs +0 -3217
- package/dist/provider.d.mts +0 -16
- package/dist/provider.d.ts +0 -16
- package/dist/provider.js +0 -3232
- package/dist/provider.mjs +0 -3224
- package/dist/services.d.mts +0 -160
- package/dist/services.d.ts +0 -160
- package/dist/services.js +0 -4045
- package/dist/services.mjs +0 -4032
- package/dist/store.d.mts +0 -505
- package/dist/store.d.ts +0 -505
- package/dist/store.js +0 -582
- package/dist/store.mjs +0 -519
- package/dist/types.d.mts +0 -12
- package/dist/types.d.ts +0 -12
- package/dist/types.js +0 -2
- package/dist/types.mjs +0 -1
- package/dist/use-get-selection-DFh6sc49.d.mts +0 -26
- package/dist/use-get-selection-DFh6sc49.d.ts +0 -26
- package/dist/utils.d.mts +0 -52
- package/dist/utils.d.ts +0 -52
- package/dist/utils.js +0 -2360
- package/dist/utils.mjs +0 -2344
- package/dist/view-type-BTzRpkT7.d.mts +0 -106
- package/dist/view-type-BTzRpkT7.d.ts +0 -106
package/dist/config.mjs
DELETED
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
import axios from 'axios';
|
|
2
|
-
|
|
3
|
-
// src/config/axios-client.ts
|
|
4
|
-
var MAINT_KEY = "MAINTENANCE_ACTIVE";
|
|
5
|
-
var MAINT_AT = "MAINTENANCE_AT";
|
|
6
|
-
var MAINT_LAST_PATH = "MAINTENANCE_LAST_PATH";
|
|
7
|
-
var hasRedirectedToMaintenance = false;
|
|
8
|
-
function setMaintenanceFlags() {
|
|
9
|
-
if (typeof window === "undefined") return;
|
|
10
|
-
const { pathname, search } = window.location;
|
|
11
|
-
const lastPath = pathname + (search || "");
|
|
12
|
-
if (pathname !== "/maintenance" && !window.localStorage.getItem(MAINT_LAST_PATH)) {
|
|
13
|
-
window.localStorage.setItem(MAINT_LAST_PATH, lastPath);
|
|
14
|
-
}
|
|
15
|
-
window.localStorage.setItem(MAINT_KEY, "true");
|
|
16
|
-
window.localStorage.setItem(MAINT_AT, String(Date.now()));
|
|
17
|
-
}
|
|
18
|
-
async function clearMaintenanceAndExit(getToken, opts) {
|
|
19
|
-
if (typeof window === "undefined") return;
|
|
20
|
-
const forceLogin = opts?.forceLogin === true;
|
|
21
|
-
const clearTokenOnForce = opts?.clearTokenOnForce !== false;
|
|
22
|
-
window.localStorage.removeItem(MAINT_KEY);
|
|
23
|
-
window.localStorage.removeItem(MAINT_AT);
|
|
24
|
-
const lastPath = window.localStorage.getItem(MAINT_LAST_PATH);
|
|
25
|
-
window.localStorage.removeItem(MAINT_LAST_PATH);
|
|
26
|
-
try {
|
|
27
|
-
if (forceLogin) {
|
|
28
|
-
if (clearTokenOnForce) {
|
|
29
|
-
try {
|
|
30
|
-
await opts?.clearToken?.();
|
|
31
|
-
} catch {
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
window.location.replace("/login");
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
const token = await getToken();
|
|
38
|
-
if (token) {
|
|
39
|
-
const target = lastPath && lastPath !== "/maintenance" ? lastPath : "/";
|
|
40
|
-
window.location.replace(target);
|
|
41
|
-
} else {
|
|
42
|
-
window.location.replace("/login");
|
|
43
|
-
}
|
|
44
|
-
} catch {
|
|
45
|
-
window.location.replace("/login");
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
var axiosClient = {
|
|
49
|
-
init(config) {
|
|
50
|
-
const localStorage = config.localStorageUtils;
|
|
51
|
-
const sessionStorage = config.sessionStorageUtils;
|
|
52
|
-
const db = config.db;
|
|
53
|
-
let isRefreshing = false;
|
|
54
|
-
let failedQueue = [];
|
|
55
|
-
const processQueue = (error, token = null) => {
|
|
56
|
-
failedQueue?.forEach((prom) => {
|
|
57
|
-
if (error) {
|
|
58
|
-
prom.reject(error);
|
|
59
|
-
} else {
|
|
60
|
-
prom.resolve(token);
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
failedQueue = [];
|
|
64
|
-
};
|
|
65
|
-
const instance = axios.create({
|
|
66
|
-
adapter: axios.defaults.adapter,
|
|
67
|
-
baseURL: config.baseUrl,
|
|
68
|
-
timeout: 5e4,
|
|
69
|
-
paramsSerializer: (params) => new URLSearchParams(params).toString()
|
|
70
|
-
});
|
|
71
|
-
if (typeof window !== "undefined") {
|
|
72
|
-
const isMaint = window.localStorage.getItem(MAINT_KEY) === "true";
|
|
73
|
-
const onMaintenancePage = window.location.pathname === "/maintenance";
|
|
74
|
-
if (isMaint && !onMaintenancePage) {
|
|
75
|
-
hasRedirectedToMaintenance = true;
|
|
76
|
-
window.location.replace("/maintenance");
|
|
77
|
-
}
|
|
78
|
-
if (isMaint && onMaintenancePage) {
|
|
79
|
-
const healthUrl = config.healthUrl || `${(config.baseUrl || "").replace(/\/+$/, "")}/health`;
|
|
80
|
-
(async () => {
|
|
81
|
-
try {
|
|
82
|
-
await axios.get(healthUrl, { timeout: 8e3 });
|
|
83
|
-
await clearMaintenanceAndExit(() => localStorage.getAccessToken(), {
|
|
84
|
-
forceLogin: true,
|
|
85
|
-
clearTokenOnForce: true,
|
|
86
|
-
clearToken: () => localStorage.clearToken()
|
|
87
|
-
});
|
|
88
|
-
} catch {
|
|
89
|
-
}
|
|
90
|
-
})();
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
instance.interceptors.request.use(
|
|
94
|
-
async (configReq) => {
|
|
95
|
-
const token = await localStorage.getAccessToken();
|
|
96
|
-
if (token) {
|
|
97
|
-
configReq.headers["Authorization"] = "Bearer " + token;
|
|
98
|
-
}
|
|
99
|
-
return configReq;
|
|
100
|
-
},
|
|
101
|
-
(error) => Promise.reject(error)
|
|
102
|
-
);
|
|
103
|
-
instance.interceptors.response.use(
|
|
104
|
-
(response) => {
|
|
105
|
-
if (typeof window !== "undefined") {
|
|
106
|
-
const isMaint = window.localStorage.getItem(MAINT_KEY) === "true";
|
|
107
|
-
const onMaintenancePage = window.location.pathname === "/maintenance";
|
|
108
|
-
if (isMaint && onMaintenancePage) {
|
|
109
|
-
(async () => {
|
|
110
|
-
await clearMaintenanceAndExit(
|
|
111
|
-
() => localStorage.getAccessToken(),
|
|
112
|
-
{
|
|
113
|
-
forceLogin: true,
|
|
114
|
-
clearTokenOnForce: true,
|
|
115
|
-
clearToken: () => localStorage.clearToken()
|
|
116
|
-
}
|
|
117
|
-
);
|
|
118
|
-
})();
|
|
119
|
-
} else if (isMaint) {
|
|
120
|
-
window.localStorage.removeItem(MAINT_KEY);
|
|
121
|
-
window.localStorage.removeItem(MAINT_AT);
|
|
122
|
-
window.localStorage.removeItem(MAINT_LAST_PATH);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
return handleResponse(response);
|
|
126
|
-
},
|
|
127
|
-
async (error) => {
|
|
128
|
-
const status = error?.response?.status;
|
|
129
|
-
if (status === 503) {
|
|
130
|
-
if (typeof window !== "undefined") {
|
|
131
|
-
setMaintenanceFlags();
|
|
132
|
-
if (!hasRedirectedToMaintenance && window.location.pathname !== "/maintenance") {
|
|
133
|
-
hasRedirectedToMaintenance = true;
|
|
134
|
-
window.location.replace("/maintenance");
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
return Promise.reject({
|
|
138
|
-
code: 503,
|
|
139
|
-
message: "SERVICE_UNAVAILABLE",
|
|
140
|
-
original: error?.response?.data
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
const handleError = async (err) => {
|
|
144
|
-
if (!err.response) {
|
|
145
|
-
return err;
|
|
146
|
-
}
|
|
147
|
-
const { data } = err.response;
|
|
148
|
-
if (data && data.code === 400 && ["invalid_grant"].includes(data.data?.error)) {
|
|
149
|
-
await clearAuthToken();
|
|
150
|
-
}
|
|
151
|
-
return data;
|
|
152
|
-
};
|
|
153
|
-
const originalRequest = error.config;
|
|
154
|
-
if ((error.response?.status === 403 || error.response?.status === 401 || error.response?.status === 404) && ["TOKEN_EXPIRED", "AUTHEN_FAIL", 401].includes(
|
|
155
|
-
error.response.data.code
|
|
156
|
-
)) {
|
|
157
|
-
if (isRefreshing) {
|
|
158
|
-
return new Promise(function(resolve, reject) {
|
|
159
|
-
failedQueue.push({ resolve, reject });
|
|
160
|
-
}).then((token) => {
|
|
161
|
-
originalRequest.headers["Authorization"] = "Bearer " + token;
|
|
162
|
-
return instance.request(originalRequest);
|
|
163
|
-
}).catch(async (err) => {
|
|
164
|
-
if ((err.response?.status === 400 || err.response?.status === 401) && ["invalid_grant"].includes(err.response.data.error)) {
|
|
165
|
-
await clearAuthToken();
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
|
-
}
|
|
169
|
-
const browserSession = await sessionStorage.getBrowserSession();
|
|
170
|
-
const refreshToken = await localStorage.getRefreshToken();
|
|
171
|
-
const accessTokenExp = await localStorage.getAccessToken();
|
|
172
|
-
isRefreshing = true;
|
|
173
|
-
if (!refreshToken && (!browserSession || browserSession == "unActive")) {
|
|
174
|
-
await clearAuthToken();
|
|
175
|
-
} else {
|
|
176
|
-
const payload = Object.fromEntries(
|
|
177
|
-
Object.entries({
|
|
178
|
-
refresh_token: refreshToken,
|
|
179
|
-
grant_type: "refresh_token",
|
|
180
|
-
client_id: config.config.clientId,
|
|
181
|
-
client_secret: config.config.clientSecret
|
|
182
|
-
}).filter(([_, value]) => !!value)
|
|
183
|
-
);
|
|
184
|
-
return new Promise(function(resolve) {
|
|
185
|
-
axios.post(
|
|
186
|
-
`${config.baseUrl}${"/authentication/oauth2/token" /* AUTH_TOKEN_PATH */}`,
|
|
187
|
-
payload,
|
|
188
|
-
{
|
|
189
|
-
headers: {
|
|
190
|
-
"Content-Type": "multipart/form-data",
|
|
191
|
-
Authorization: `Bearer ${accessTokenExp}`
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
).then(async (res) => {
|
|
195
|
-
const data = res.data;
|
|
196
|
-
await localStorage.setToken(data.access_token);
|
|
197
|
-
await localStorage.setRefreshToken(data.refresh_token);
|
|
198
|
-
axios.defaults.headers.common["Authorization"] = "Bearer " + data.access_token;
|
|
199
|
-
originalRequest.headers["Authorization"] = "Bearer " + data.access_token;
|
|
200
|
-
processQueue(null, data.access_token);
|
|
201
|
-
resolve(instance.request(originalRequest));
|
|
202
|
-
}).catch(async (err) => {
|
|
203
|
-
if (err && (err?.error_code === "AUTHEN_FAIL" || err?.error_code === "TOKEN_EXPIRED" || err?.error_code === "TOKEN_INCORRECT" || err?.code === "ERR_BAD_REQUEST")) {
|
|
204
|
-
await clearAuthToken();
|
|
205
|
-
}
|
|
206
|
-
if (err && err.response) {
|
|
207
|
-
const { error_code } = err.response?.data || {};
|
|
208
|
-
if (error_code === "AUTHEN_FAIL") {
|
|
209
|
-
await clearAuthToken();
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
processQueue(err, null);
|
|
213
|
-
}).finally(() => {
|
|
214
|
-
isRefreshing = false;
|
|
215
|
-
});
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
return Promise.reject(await handleError(error));
|
|
220
|
-
}
|
|
221
|
-
);
|
|
222
|
-
const handleResponse = (res) => {
|
|
223
|
-
if (res && res.data) {
|
|
224
|
-
return res.data;
|
|
225
|
-
}
|
|
226
|
-
return res;
|
|
227
|
-
};
|
|
228
|
-
const clearAuthToken = async () => {
|
|
229
|
-
await localStorage.clearToken();
|
|
230
|
-
if (typeof window !== "undefined") {
|
|
231
|
-
window.location.href = `/login`;
|
|
232
|
-
}
|
|
233
|
-
};
|
|
234
|
-
function formatUrl(url, db2) {
|
|
235
|
-
return url + (db2 ? "?db=" + db2 : "");
|
|
236
|
-
}
|
|
237
|
-
const responseBody = (response) => response;
|
|
238
|
-
const requests = {
|
|
239
|
-
get: (url, headers) => instance.get(formatUrl(url, db), headers).then(responseBody),
|
|
240
|
-
post: (url, body, headers) => instance.post(formatUrl(url, db), body, { headers }).then(responseBody),
|
|
241
|
-
post_excel: (url, body, headers) => instance.post(formatUrl(url, db), body, {
|
|
242
|
-
responseType: "arraybuffer",
|
|
243
|
-
headers: {
|
|
244
|
-
"Content-Type": typeof window !== "undefined" ? "application/json" : "application/javascript",
|
|
245
|
-
Accept: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
246
|
-
}
|
|
247
|
-
}).then(responseBody),
|
|
248
|
-
put: (url, body, headers) => instance.put(formatUrl(url, db), body, headers).then(responseBody),
|
|
249
|
-
patch: (url, body) => instance.patch(formatUrl(url, db), body).then(responseBody),
|
|
250
|
-
delete: (url, body) => instance.delete(formatUrl(url, db), body).then(responseBody)
|
|
251
|
-
};
|
|
252
|
-
return requests;
|
|
253
|
-
}
|
|
254
|
-
};
|
|
255
|
-
|
|
256
|
-
export { axiosClient };
|
package/dist/constants.d.mts
DELETED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
declare enum KeyConstants {
|
|
2
|
-
PROFILE = "userinfo",
|
|
3
|
-
CURRENT_COMPANY = "current_company",
|
|
4
|
-
LIST_COMPANY = "list_company",
|
|
5
|
-
COMPANY_INFO = "company_info",
|
|
6
|
-
MENU = "menus",
|
|
7
|
-
GET_VIEW_BY_ACTION = "get_view_by_action",
|
|
8
|
-
ACTION_DETAIL = "action_detail",
|
|
9
|
-
GET_DATA_SELECTION = "get_data_select",
|
|
10
|
-
WEB_SAVE = "web_save",
|
|
11
|
-
WEB_READ = "web_read",
|
|
12
|
-
GET_PROVIDER = "get_provider"
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
declare enum MethodConstants {
|
|
16
|
-
WEB_SEARCH_READ = "web_search_read",
|
|
17
|
-
WEB_READ_GROUP = "web_read_group",
|
|
18
|
-
WEB_READ = "web_read",
|
|
19
|
-
WEB_SAVE = "web_save",
|
|
20
|
-
UNLINK = "unlink",
|
|
21
|
-
ONCHANGE = "onchange",
|
|
22
|
-
GET_ONCHANGE_FIELDS = "get_fields_onchange",
|
|
23
|
-
GET_FIELD_VIEW = "get_fields_view_v2"
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
declare enum UriConstants {
|
|
27
|
-
AUTH_TOKEN_PATH = "/authentication/oauth2/token",
|
|
28
|
-
GENTOKEN_SOCIAL = "/token/generate",
|
|
29
|
-
CALL_PATH = "/call",
|
|
30
|
-
COMPANY_PATH = "/company",
|
|
31
|
-
PROFILE_PATH = "/userinfo",
|
|
32
|
-
RESET_PASSWORD_PATH = "/reset_password",
|
|
33
|
-
CHANGE_PASSWORD_PATH = "/change_password",
|
|
34
|
-
UPDATE_PASSWORD_PATH = "/change_password_parent",
|
|
35
|
-
LOAD_ACTION = "/load_action",
|
|
36
|
-
REPORT_PATH = "/report",
|
|
37
|
-
RUN_ACTION_PATH = "/run_action",
|
|
38
|
-
UPLOAD_FILE_PATH = "/upload/file",
|
|
39
|
-
GET_MESSAGE = "/chatter/thread/messages",
|
|
40
|
-
SENT_MESSAGE = "/chatter/message/post",
|
|
41
|
-
UPLOAD_IMAGE = "/mail/attachment/upload",
|
|
42
|
-
DELETE_MESSAGE = "/chatter/message/update_content",
|
|
43
|
-
IMAGE_PATH = "/web/image",
|
|
44
|
-
LOAD_MESSAGE = "/load_message_failures",
|
|
45
|
-
TOKEN = "/check_token",
|
|
46
|
-
CREATE_UPDATE_PATH = "/create_update",
|
|
47
|
-
TWOFA_METHOD_PATH = "/id/api/v2/call",
|
|
48
|
-
SIGNIN_SSO = "/signin-sso/oauth"
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
declare enum FieldTypeConstants {
|
|
52
|
-
CHAR = "char",
|
|
53
|
-
TEXT = "text",
|
|
54
|
-
INTEGER = "integer",
|
|
55
|
-
FLOAT = "float",
|
|
56
|
-
BOOLEAN = "boolean",
|
|
57
|
-
DATE = "date",
|
|
58
|
-
DATETIME = "datetime",
|
|
59
|
-
BINARY = "binary",
|
|
60
|
-
SELECTION = "selection",
|
|
61
|
-
HTML = "html",
|
|
62
|
-
MANY2ONE = "many2one",
|
|
63
|
-
ONE2MANY = "one2many",
|
|
64
|
-
MANY2MANY = "many2many",
|
|
65
|
-
MONETARY = "monetary",
|
|
66
|
-
REFERENCE = "reference",
|
|
67
|
-
FUNCTION = "function",
|
|
68
|
-
PROPERTY = "property"
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
declare enum MethodType {
|
|
72
|
-
CREATE = 0,
|
|
73
|
-
UPDATE = 1,
|
|
74
|
-
DELETE = 2,
|
|
75
|
-
UNLINK = 3,
|
|
76
|
-
NO_CHANGE = 4
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
declare enum ModelConstants {
|
|
80
|
-
MENU = "ir.ui.menu",
|
|
81
|
-
USER = "res.users",
|
|
82
|
-
COMPANY = "res.company",
|
|
83
|
-
WINDOW_ACTION = "ir.actions.act_window",
|
|
84
|
-
BASE_IMPORT = "base_import.import",
|
|
85
|
-
GET_IMPORT = "get_import_templates"
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
declare enum ComponentType {
|
|
89
|
-
TREE = "tree",
|
|
90
|
-
GROUP = "group",
|
|
91
|
-
LIST = "list",
|
|
92
|
-
FORM = "form",
|
|
93
|
-
FIELD = "field",
|
|
94
|
-
DIV = "div",
|
|
95
|
-
SPAN = "span"
|
|
96
|
-
}
|
|
97
|
-
declare const SearchType: {
|
|
98
|
-
FILTER: string;
|
|
99
|
-
SEARCH: string;
|
|
100
|
-
GROUP: string;
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
declare enum WIDGETAVATAR {
|
|
104
|
-
many2one_avatar_user = "many2one_avatar_user",
|
|
105
|
-
many2many_avatar_user = "many2many_avatar_user"
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
declare enum WIDGETCOLOR {
|
|
109
|
-
many2many_tags = "many2many_tags",
|
|
110
|
-
helpdesk_sla_many2many_tags = "helpdesk_sla_many2many_tags"
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
declare enum WIDGETSTATUS {
|
|
114
|
-
sla_status_ids = "sla_status_ids"
|
|
115
|
-
}
|
|
116
|
-
declare enum WIDGETNOSTRING {
|
|
117
|
-
sla_status_ids = "sla_status_ids"
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
export { ComponentType, FieldTypeConstants, KeyConstants, MethodConstants, MethodType, ModelConstants, SearchType, UriConstants, WIDGETAVATAR, WIDGETCOLOR, WIDGETNOSTRING, WIDGETSTATUS };
|
package/dist/constants.d.ts
DELETED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
declare enum KeyConstants {
|
|
2
|
-
PROFILE = "userinfo",
|
|
3
|
-
CURRENT_COMPANY = "current_company",
|
|
4
|
-
LIST_COMPANY = "list_company",
|
|
5
|
-
COMPANY_INFO = "company_info",
|
|
6
|
-
MENU = "menus",
|
|
7
|
-
GET_VIEW_BY_ACTION = "get_view_by_action",
|
|
8
|
-
ACTION_DETAIL = "action_detail",
|
|
9
|
-
GET_DATA_SELECTION = "get_data_select",
|
|
10
|
-
WEB_SAVE = "web_save",
|
|
11
|
-
WEB_READ = "web_read",
|
|
12
|
-
GET_PROVIDER = "get_provider"
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
declare enum MethodConstants {
|
|
16
|
-
WEB_SEARCH_READ = "web_search_read",
|
|
17
|
-
WEB_READ_GROUP = "web_read_group",
|
|
18
|
-
WEB_READ = "web_read",
|
|
19
|
-
WEB_SAVE = "web_save",
|
|
20
|
-
UNLINK = "unlink",
|
|
21
|
-
ONCHANGE = "onchange",
|
|
22
|
-
GET_ONCHANGE_FIELDS = "get_fields_onchange",
|
|
23
|
-
GET_FIELD_VIEW = "get_fields_view_v2"
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
declare enum UriConstants {
|
|
27
|
-
AUTH_TOKEN_PATH = "/authentication/oauth2/token",
|
|
28
|
-
GENTOKEN_SOCIAL = "/token/generate",
|
|
29
|
-
CALL_PATH = "/call",
|
|
30
|
-
COMPANY_PATH = "/company",
|
|
31
|
-
PROFILE_PATH = "/userinfo",
|
|
32
|
-
RESET_PASSWORD_PATH = "/reset_password",
|
|
33
|
-
CHANGE_PASSWORD_PATH = "/change_password",
|
|
34
|
-
UPDATE_PASSWORD_PATH = "/change_password_parent",
|
|
35
|
-
LOAD_ACTION = "/load_action",
|
|
36
|
-
REPORT_PATH = "/report",
|
|
37
|
-
RUN_ACTION_PATH = "/run_action",
|
|
38
|
-
UPLOAD_FILE_PATH = "/upload/file",
|
|
39
|
-
GET_MESSAGE = "/chatter/thread/messages",
|
|
40
|
-
SENT_MESSAGE = "/chatter/message/post",
|
|
41
|
-
UPLOAD_IMAGE = "/mail/attachment/upload",
|
|
42
|
-
DELETE_MESSAGE = "/chatter/message/update_content",
|
|
43
|
-
IMAGE_PATH = "/web/image",
|
|
44
|
-
LOAD_MESSAGE = "/load_message_failures",
|
|
45
|
-
TOKEN = "/check_token",
|
|
46
|
-
CREATE_UPDATE_PATH = "/create_update",
|
|
47
|
-
TWOFA_METHOD_PATH = "/id/api/v2/call",
|
|
48
|
-
SIGNIN_SSO = "/signin-sso/oauth"
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
declare enum FieldTypeConstants {
|
|
52
|
-
CHAR = "char",
|
|
53
|
-
TEXT = "text",
|
|
54
|
-
INTEGER = "integer",
|
|
55
|
-
FLOAT = "float",
|
|
56
|
-
BOOLEAN = "boolean",
|
|
57
|
-
DATE = "date",
|
|
58
|
-
DATETIME = "datetime",
|
|
59
|
-
BINARY = "binary",
|
|
60
|
-
SELECTION = "selection",
|
|
61
|
-
HTML = "html",
|
|
62
|
-
MANY2ONE = "many2one",
|
|
63
|
-
ONE2MANY = "one2many",
|
|
64
|
-
MANY2MANY = "many2many",
|
|
65
|
-
MONETARY = "monetary",
|
|
66
|
-
REFERENCE = "reference",
|
|
67
|
-
FUNCTION = "function",
|
|
68
|
-
PROPERTY = "property"
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
declare enum MethodType {
|
|
72
|
-
CREATE = 0,
|
|
73
|
-
UPDATE = 1,
|
|
74
|
-
DELETE = 2,
|
|
75
|
-
UNLINK = 3,
|
|
76
|
-
NO_CHANGE = 4
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
declare enum ModelConstants {
|
|
80
|
-
MENU = "ir.ui.menu",
|
|
81
|
-
USER = "res.users",
|
|
82
|
-
COMPANY = "res.company",
|
|
83
|
-
WINDOW_ACTION = "ir.actions.act_window",
|
|
84
|
-
BASE_IMPORT = "base_import.import",
|
|
85
|
-
GET_IMPORT = "get_import_templates"
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
declare enum ComponentType {
|
|
89
|
-
TREE = "tree",
|
|
90
|
-
GROUP = "group",
|
|
91
|
-
LIST = "list",
|
|
92
|
-
FORM = "form",
|
|
93
|
-
FIELD = "field",
|
|
94
|
-
DIV = "div",
|
|
95
|
-
SPAN = "span"
|
|
96
|
-
}
|
|
97
|
-
declare const SearchType: {
|
|
98
|
-
FILTER: string;
|
|
99
|
-
SEARCH: string;
|
|
100
|
-
GROUP: string;
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
declare enum WIDGETAVATAR {
|
|
104
|
-
many2one_avatar_user = "many2one_avatar_user",
|
|
105
|
-
many2many_avatar_user = "many2many_avatar_user"
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
declare enum WIDGETCOLOR {
|
|
109
|
-
many2many_tags = "many2many_tags",
|
|
110
|
-
helpdesk_sla_many2many_tags = "helpdesk_sla_many2many_tags"
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
declare enum WIDGETSTATUS {
|
|
114
|
-
sla_status_ids = "sla_status_ids"
|
|
115
|
-
}
|
|
116
|
-
declare enum WIDGETNOSTRING {
|
|
117
|
-
sla_status_ids = "sla_status_ids"
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
export { ComponentType, FieldTypeConstants, KeyConstants, MethodConstants, MethodType, ModelConstants, SearchType, UriConstants, WIDGETAVATAR, WIDGETCOLOR, WIDGETNOSTRING, WIDGETSTATUS };
|
package/dist/constants.js
DELETED
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
// src/constants/api/key-constant.ts
|
|
4
|
-
var KeyConstants = /* @__PURE__ */ ((KeyConstants2) => {
|
|
5
|
-
KeyConstants2["PROFILE"] = "userinfo";
|
|
6
|
-
KeyConstants2["CURRENT_COMPANY"] = "current_company";
|
|
7
|
-
KeyConstants2["LIST_COMPANY"] = "list_company";
|
|
8
|
-
KeyConstants2["COMPANY_INFO"] = "company_info";
|
|
9
|
-
KeyConstants2["MENU"] = "menus";
|
|
10
|
-
KeyConstants2["GET_VIEW_BY_ACTION"] = "get_view_by_action";
|
|
11
|
-
KeyConstants2["ACTION_DETAIL"] = "action_detail";
|
|
12
|
-
KeyConstants2["GET_DATA_SELECTION"] = "get_data_select";
|
|
13
|
-
KeyConstants2["WEB_SAVE"] = "web_save";
|
|
14
|
-
KeyConstants2["WEB_READ"] = "web_read";
|
|
15
|
-
KeyConstants2["GET_PROVIDER"] = "get_provider";
|
|
16
|
-
return KeyConstants2;
|
|
17
|
-
})(KeyConstants || {});
|
|
18
|
-
|
|
19
|
-
// src/constants/api/method-constant.ts
|
|
20
|
-
var MethodConstants = /* @__PURE__ */ ((MethodConstants2) => {
|
|
21
|
-
MethodConstants2["WEB_SEARCH_READ"] = "web_search_read";
|
|
22
|
-
MethodConstants2["WEB_READ_GROUP"] = "web_read_group";
|
|
23
|
-
MethodConstants2["WEB_READ"] = "web_read";
|
|
24
|
-
MethodConstants2["WEB_SAVE"] = "web_save";
|
|
25
|
-
MethodConstants2["UNLINK"] = "unlink";
|
|
26
|
-
MethodConstants2["ONCHANGE"] = "onchange";
|
|
27
|
-
MethodConstants2["GET_ONCHANGE_FIELDS"] = "get_fields_onchange";
|
|
28
|
-
MethodConstants2["GET_FIELD_VIEW"] = "get_fields_view_v2";
|
|
29
|
-
return MethodConstants2;
|
|
30
|
-
})(MethodConstants || {});
|
|
31
|
-
|
|
32
|
-
// src/constants/api/uri-constant.ts
|
|
33
|
-
var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
|
|
34
|
-
UriConstants2["AUTH_TOKEN_PATH"] = "/authentication/oauth2/token";
|
|
35
|
-
UriConstants2["GENTOKEN_SOCIAL"] = "/token/generate";
|
|
36
|
-
UriConstants2["CALL_PATH"] = "/call";
|
|
37
|
-
UriConstants2["COMPANY_PATH"] = "/company";
|
|
38
|
-
UriConstants2["PROFILE_PATH"] = "/userinfo";
|
|
39
|
-
UriConstants2["RESET_PASSWORD_PATH"] = "/reset_password";
|
|
40
|
-
UriConstants2["CHANGE_PASSWORD_PATH"] = "/change_password";
|
|
41
|
-
UriConstants2["UPDATE_PASSWORD_PATH"] = "/change_password_parent";
|
|
42
|
-
UriConstants2["LOAD_ACTION"] = `/load_action`;
|
|
43
|
-
UriConstants2["REPORT_PATH"] = `/report`;
|
|
44
|
-
UriConstants2["RUN_ACTION_PATH"] = `/run_action`;
|
|
45
|
-
UriConstants2["UPLOAD_FILE_PATH"] = `/upload/file`;
|
|
46
|
-
UriConstants2["GET_MESSAGE"] = `/chatter/thread/messages`;
|
|
47
|
-
UriConstants2["SENT_MESSAGE"] = `/chatter/message/post`;
|
|
48
|
-
UriConstants2["UPLOAD_IMAGE"] = `/mail/attachment/upload`;
|
|
49
|
-
UriConstants2["DELETE_MESSAGE"] = `/chatter/message/update_content`;
|
|
50
|
-
UriConstants2["IMAGE_PATH"] = `/web/image`;
|
|
51
|
-
UriConstants2["LOAD_MESSAGE"] = `/load_message_failures`;
|
|
52
|
-
UriConstants2["TOKEN"] = `/check_token`;
|
|
53
|
-
UriConstants2["CREATE_UPDATE_PATH"] = `/create_update`;
|
|
54
|
-
UriConstants2["TWOFA_METHOD_PATH"] = `/id/api/v2/call`;
|
|
55
|
-
UriConstants2["SIGNIN_SSO"] = `/signin-sso/oauth`;
|
|
56
|
-
return UriConstants2;
|
|
57
|
-
})(UriConstants || {});
|
|
58
|
-
|
|
59
|
-
// src/constants/field/field-type-constant.ts
|
|
60
|
-
var FieldTypeConstants = /* @__PURE__ */ ((FieldTypeConstants2) => {
|
|
61
|
-
FieldTypeConstants2["CHAR"] = "char";
|
|
62
|
-
FieldTypeConstants2["TEXT"] = "text";
|
|
63
|
-
FieldTypeConstants2["INTEGER"] = "integer";
|
|
64
|
-
FieldTypeConstants2["FLOAT"] = "float";
|
|
65
|
-
FieldTypeConstants2["BOOLEAN"] = "boolean";
|
|
66
|
-
FieldTypeConstants2["DATE"] = "date";
|
|
67
|
-
FieldTypeConstants2["DATETIME"] = "datetime";
|
|
68
|
-
FieldTypeConstants2["BINARY"] = "binary";
|
|
69
|
-
FieldTypeConstants2["SELECTION"] = "selection";
|
|
70
|
-
FieldTypeConstants2["HTML"] = "html";
|
|
71
|
-
FieldTypeConstants2["MANY2ONE"] = "many2one";
|
|
72
|
-
FieldTypeConstants2["ONE2MANY"] = "one2many";
|
|
73
|
-
FieldTypeConstants2["MANY2MANY"] = "many2many";
|
|
74
|
-
FieldTypeConstants2["MONETARY"] = "monetary";
|
|
75
|
-
FieldTypeConstants2["REFERENCE"] = "reference";
|
|
76
|
-
FieldTypeConstants2["FUNCTION"] = "function";
|
|
77
|
-
FieldTypeConstants2["PROPERTY"] = "property";
|
|
78
|
-
return FieldTypeConstants2;
|
|
79
|
-
})(FieldTypeConstants || {});
|
|
80
|
-
|
|
81
|
-
// src/constants/method/method-type-constant.ts
|
|
82
|
-
var MethodType = /* @__PURE__ */ ((MethodType2) => {
|
|
83
|
-
MethodType2[MethodType2["CREATE"] = 0] = "CREATE";
|
|
84
|
-
MethodType2[MethodType2["UPDATE"] = 1] = "UPDATE";
|
|
85
|
-
MethodType2[MethodType2["DELETE"] = 2] = "DELETE";
|
|
86
|
-
MethodType2[MethodType2["UNLINK"] = 3] = "UNLINK";
|
|
87
|
-
MethodType2[MethodType2["NO_CHANGE"] = 4] = "NO_CHANGE";
|
|
88
|
-
return MethodType2;
|
|
89
|
-
})(MethodType || {});
|
|
90
|
-
|
|
91
|
-
// src/constants/model/model-constant.ts
|
|
92
|
-
var ModelConstants = /* @__PURE__ */ ((ModelConstants2) => {
|
|
93
|
-
ModelConstants2["MENU"] = "ir.ui.menu";
|
|
94
|
-
ModelConstants2["USER"] = "res.users";
|
|
95
|
-
ModelConstants2["COMPANY"] = "res.company";
|
|
96
|
-
ModelConstants2["WINDOW_ACTION"] = "ir.actions.act_window";
|
|
97
|
-
ModelConstants2["BASE_IMPORT"] = "base_import.import";
|
|
98
|
-
ModelConstants2["GET_IMPORT"] = "get_import_templates";
|
|
99
|
-
return ModelConstants2;
|
|
100
|
-
})(ModelConstants || {});
|
|
101
|
-
|
|
102
|
-
// src/constants/type/index.ts
|
|
103
|
-
var ComponentType = /* @__PURE__ */ ((ComponentType2) => {
|
|
104
|
-
ComponentType2["TREE"] = "tree";
|
|
105
|
-
ComponentType2["GROUP"] = "group";
|
|
106
|
-
ComponentType2["LIST"] = "list";
|
|
107
|
-
ComponentType2["FORM"] = "form";
|
|
108
|
-
ComponentType2["FIELD"] = "field";
|
|
109
|
-
ComponentType2["DIV"] = "div";
|
|
110
|
-
ComponentType2["SPAN"] = "span";
|
|
111
|
-
return ComponentType2;
|
|
112
|
-
})(ComponentType || {});
|
|
113
|
-
var SearchType = {
|
|
114
|
-
FILTER: "filter_by",
|
|
115
|
-
SEARCH: "search_by",
|
|
116
|
-
GROUP: "group_by"
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
// src/constants/widget/widget-avatar-constant.ts
|
|
120
|
-
var WIDGETAVATAR = /* @__PURE__ */ ((WIDGETAVATAR2) => {
|
|
121
|
-
WIDGETAVATAR2["many2one_avatar_user"] = "many2one_avatar_user";
|
|
122
|
-
WIDGETAVATAR2["many2many_avatar_user"] = "many2many_avatar_user";
|
|
123
|
-
return WIDGETAVATAR2;
|
|
124
|
-
})(WIDGETAVATAR || {});
|
|
125
|
-
|
|
126
|
-
// src/constants/widget/widget-color-constant.ts
|
|
127
|
-
var WIDGETCOLOR = /* @__PURE__ */ ((WIDGETCOLOR2) => {
|
|
128
|
-
WIDGETCOLOR2["many2many_tags"] = "many2many_tags";
|
|
129
|
-
WIDGETCOLOR2["helpdesk_sla_many2many_tags"] = "helpdesk_sla_many2many_tags";
|
|
130
|
-
return WIDGETCOLOR2;
|
|
131
|
-
})(WIDGETCOLOR || {});
|
|
132
|
-
|
|
133
|
-
// src/constants/widget/widget-status-constant.ts
|
|
134
|
-
var WIDGETSTATUS = /* @__PURE__ */ ((WIDGETSTATUS2) => {
|
|
135
|
-
WIDGETSTATUS2["sla_status_ids"] = "sla_status_ids";
|
|
136
|
-
return WIDGETSTATUS2;
|
|
137
|
-
})(WIDGETSTATUS || {});
|
|
138
|
-
var WIDGETNOSTRING = /* @__PURE__ */ ((WIDGETNOSTRING2) => {
|
|
139
|
-
WIDGETNOSTRING2["sla_status_ids"] = "sla_status_ids";
|
|
140
|
-
return WIDGETNOSTRING2;
|
|
141
|
-
})(WIDGETNOSTRING || {});
|
|
142
|
-
|
|
143
|
-
exports.ComponentType = ComponentType;
|
|
144
|
-
exports.FieldTypeConstants = FieldTypeConstants;
|
|
145
|
-
exports.KeyConstants = KeyConstants;
|
|
146
|
-
exports.MethodConstants = MethodConstants;
|
|
147
|
-
exports.MethodType = MethodType;
|
|
148
|
-
exports.ModelConstants = ModelConstants;
|
|
149
|
-
exports.SearchType = SearchType;
|
|
150
|
-
exports.UriConstants = UriConstants;
|
|
151
|
-
exports.WIDGETAVATAR = WIDGETAVATAR;
|
|
152
|
-
exports.WIDGETCOLOR = WIDGETCOLOR;
|
|
153
|
-
exports.WIDGETNOSTRING = WIDGETNOSTRING;
|
|
154
|
-
exports.WIDGETSTATUS = WIDGETSTATUS;
|