@fctc/edu-logic-lib 1.0.3 → 1.0.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.
Files changed (55) hide show
  1. package/dist/index.d.mts +1076 -23
  2. package/dist/index.d.ts +1076 -23
  3. package/dist/index.js +4 -618
  4. package/dist/index.mjs +3 -572
  5. package/package.json +1 -1
  6. package/dist/base-model-type-DvO53Lwi.d.mts +0 -7
  7. package/dist/base-model-type-DvO53Lwi.d.ts +0 -7
  8. package/dist/config.d.mts +0 -15
  9. package/dist/config.d.ts +0 -15
  10. package/dist/config.js +0 -262
  11. package/dist/config.mjs +0 -256
  12. package/dist/constants.d.mts +0 -120
  13. package/dist/constants.d.ts +0 -120
  14. package/dist/constants.js +0 -154
  15. package/dist/constants.mjs +0 -141
  16. package/dist/context-type-D5XefoL-.d.mts +0 -8
  17. package/dist/context-type-D5XefoL-.d.ts +0 -8
  18. package/dist/environment.d.mts +0 -37
  19. package/dist/environment.d.ts +0 -37
  20. package/dist/environment.js +0 -849
  21. package/dist/environment.mjs +0 -841
  22. package/dist/hooks.d.mts +0 -218
  23. package/dist/hooks.d.ts +0 -218
  24. package/dist/hooks.js +0 -4865
  25. package/dist/hooks.mjs +0 -4814
  26. package/dist/index-C_nK1Mii.d.mts +0 -19
  27. package/dist/index-C_nK1Mii.d.ts +0 -19
  28. package/dist/models.d.mts +0 -35
  29. package/dist/models.d.ts +0 -35
  30. package/dist/models.js +0 -3225
  31. package/dist/models.mjs +0 -3217
  32. package/dist/provider.d.mts +0 -16
  33. package/dist/provider.d.ts +0 -16
  34. package/dist/provider.js +0 -3232
  35. package/dist/provider.mjs +0 -3224
  36. package/dist/services.d.mts +0 -160
  37. package/dist/services.d.ts +0 -160
  38. package/dist/services.js +0 -4045
  39. package/dist/services.mjs +0 -4032
  40. package/dist/store.d.mts +0 -505
  41. package/dist/store.d.ts +0 -505
  42. package/dist/store.js +0 -582
  43. package/dist/store.mjs +0 -519
  44. package/dist/types.d.mts +0 -12
  45. package/dist/types.d.ts +0 -12
  46. package/dist/types.js +0 -2
  47. package/dist/types.mjs +0 -1
  48. package/dist/use-get-selection-DFh6sc49.d.mts +0 -26
  49. package/dist/use-get-selection-DFh6sc49.d.ts +0 -26
  50. package/dist/utils.d.mts +0 -52
  51. package/dist/utils.d.ts +0 -52
  52. package/dist/utils.js +0 -2360
  53. package/dist/utils.mjs +0 -2344
  54. package/dist/view-type-BTzRpkT7.d.mts +0 -106
  55. package/dist/view-type-BTzRpkT7.d.ts +0 -106
package/dist/config.js DELETED
@@ -1,262 +0,0 @@
1
- 'use strict';
2
-
3
- var axios = require('axios');
4
-
5
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
6
-
7
- var axios__default = /*#__PURE__*/_interopDefault(axios);
8
-
9
- // src/config/axios-client.ts
10
- var MAINT_KEY = "MAINTENANCE_ACTIVE";
11
- var MAINT_AT = "MAINTENANCE_AT";
12
- var MAINT_LAST_PATH = "MAINTENANCE_LAST_PATH";
13
- var hasRedirectedToMaintenance = false;
14
- function setMaintenanceFlags() {
15
- if (typeof window === "undefined") return;
16
- const { pathname, search } = window.location;
17
- const lastPath = pathname + (search || "");
18
- if (pathname !== "/maintenance" && !window.localStorage.getItem(MAINT_LAST_PATH)) {
19
- window.localStorage.setItem(MAINT_LAST_PATH, lastPath);
20
- }
21
- window.localStorage.setItem(MAINT_KEY, "true");
22
- window.localStorage.setItem(MAINT_AT, String(Date.now()));
23
- }
24
- async function clearMaintenanceAndExit(getToken, opts) {
25
- if (typeof window === "undefined") return;
26
- const forceLogin = opts?.forceLogin === true;
27
- const clearTokenOnForce = opts?.clearTokenOnForce !== false;
28
- window.localStorage.removeItem(MAINT_KEY);
29
- window.localStorage.removeItem(MAINT_AT);
30
- const lastPath = window.localStorage.getItem(MAINT_LAST_PATH);
31
- window.localStorage.removeItem(MAINT_LAST_PATH);
32
- try {
33
- if (forceLogin) {
34
- if (clearTokenOnForce) {
35
- try {
36
- await opts?.clearToken?.();
37
- } catch {
38
- }
39
- }
40
- window.location.replace("/login");
41
- return;
42
- }
43
- const token = await getToken();
44
- if (token) {
45
- const target = lastPath && lastPath !== "/maintenance" ? lastPath : "/";
46
- window.location.replace(target);
47
- } else {
48
- window.location.replace("/login");
49
- }
50
- } catch {
51
- window.location.replace("/login");
52
- }
53
- }
54
- var axiosClient = {
55
- init(config) {
56
- const localStorage = config.localStorageUtils;
57
- const sessionStorage = config.sessionStorageUtils;
58
- const db = config.db;
59
- let isRefreshing = false;
60
- let failedQueue = [];
61
- const processQueue = (error, token = null) => {
62
- failedQueue?.forEach((prom) => {
63
- if (error) {
64
- prom.reject(error);
65
- } else {
66
- prom.resolve(token);
67
- }
68
- });
69
- failedQueue = [];
70
- };
71
- const instance = axios__default.default.create({
72
- adapter: axios__default.default.defaults.adapter,
73
- baseURL: config.baseUrl,
74
- timeout: 5e4,
75
- paramsSerializer: (params) => new URLSearchParams(params).toString()
76
- });
77
- if (typeof window !== "undefined") {
78
- const isMaint = window.localStorage.getItem(MAINT_KEY) === "true";
79
- const onMaintenancePage = window.location.pathname === "/maintenance";
80
- if (isMaint && !onMaintenancePage) {
81
- hasRedirectedToMaintenance = true;
82
- window.location.replace("/maintenance");
83
- }
84
- if (isMaint && onMaintenancePage) {
85
- const healthUrl = config.healthUrl || `${(config.baseUrl || "").replace(/\/+$/, "")}/health`;
86
- (async () => {
87
- try {
88
- await axios__default.default.get(healthUrl, { timeout: 8e3 });
89
- await clearMaintenanceAndExit(() => localStorage.getAccessToken(), {
90
- forceLogin: true,
91
- clearTokenOnForce: true,
92
- clearToken: () => localStorage.clearToken()
93
- });
94
- } catch {
95
- }
96
- })();
97
- }
98
- }
99
- instance.interceptors.request.use(
100
- async (configReq) => {
101
- const token = await localStorage.getAccessToken();
102
- if (token) {
103
- configReq.headers["Authorization"] = "Bearer " + token;
104
- }
105
- return configReq;
106
- },
107
- (error) => Promise.reject(error)
108
- );
109
- instance.interceptors.response.use(
110
- (response) => {
111
- if (typeof window !== "undefined") {
112
- const isMaint = window.localStorage.getItem(MAINT_KEY) === "true";
113
- const onMaintenancePage = window.location.pathname === "/maintenance";
114
- if (isMaint && onMaintenancePage) {
115
- (async () => {
116
- await clearMaintenanceAndExit(
117
- () => localStorage.getAccessToken(),
118
- {
119
- forceLogin: true,
120
- clearTokenOnForce: true,
121
- clearToken: () => localStorage.clearToken()
122
- }
123
- );
124
- })();
125
- } else if (isMaint) {
126
- window.localStorage.removeItem(MAINT_KEY);
127
- window.localStorage.removeItem(MAINT_AT);
128
- window.localStorage.removeItem(MAINT_LAST_PATH);
129
- }
130
- }
131
- return handleResponse(response);
132
- },
133
- async (error) => {
134
- const status = error?.response?.status;
135
- if (status === 503) {
136
- if (typeof window !== "undefined") {
137
- setMaintenanceFlags();
138
- if (!hasRedirectedToMaintenance && window.location.pathname !== "/maintenance") {
139
- hasRedirectedToMaintenance = true;
140
- window.location.replace("/maintenance");
141
- }
142
- }
143
- return Promise.reject({
144
- code: 503,
145
- message: "SERVICE_UNAVAILABLE",
146
- original: error?.response?.data
147
- });
148
- }
149
- const handleError = async (err) => {
150
- if (!err.response) {
151
- return err;
152
- }
153
- const { data } = err.response;
154
- if (data && data.code === 400 && ["invalid_grant"].includes(data.data?.error)) {
155
- await clearAuthToken();
156
- }
157
- return data;
158
- };
159
- const originalRequest = error.config;
160
- if ((error.response?.status === 403 || error.response?.status === 401 || error.response?.status === 404) && ["TOKEN_EXPIRED", "AUTHEN_FAIL", 401].includes(
161
- error.response.data.code
162
- )) {
163
- if (isRefreshing) {
164
- return new Promise(function(resolve, reject) {
165
- failedQueue.push({ resolve, reject });
166
- }).then((token) => {
167
- originalRequest.headers["Authorization"] = "Bearer " + token;
168
- return instance.request(originalRequest);
169
- }).catch(async (err) => {
170
- if ((err.response?.status === 400 || err.response?.status === 401) && ["invalid_grant"].includes(err.response.data.error)) {
171
- await clearAuthToken();
172
- }
173
- });
174
- }
175
- const browserSession = await sessionStorage.getBrowserSession();
176
- const refreshToken = await localStorage.getRefreshToken();
177
- const accessTokenExp = await localStorage.getAccessToken();
178
- isRefreshing = true;
179
- if (!refreshToken && (!browserSession || browserSession == "unActive")) {
180
- await clearAuthToken();
181
- } else {
182
- const payload = Object.fromEntries(
183
- Object.entries({
184
- refresh_token: refreshToken,
185
- grant_type: "refresh_token",
186
- client_id: config.config.clientId,
187
- client_secret: config.config.clientSecret
188
- }).filter(([_, value]) => !!value)
189
- );
190
- return new Promise(function(resolve) {
191
- axios__default.default.post(
192
- `${config.baseUrl}${"/authentication/oauth2/token" /* AUTH_TOKEN_PATH */}`,
193
- payload,
194
- {
195
- headers: {
196
- "Content-Type": "multipart/form-data",
197
- Authorization: `Bearer ${accessTokenExp}`
198
- }
199
- }
200
- ).then(async (res) => {
201
- const data = res.data;
202
- await localStorage.setToken(data.access_token);
203
- await localStorage.setRefreshToken(data.refresh_token);
204
- axios__default.default.defaults.headers.common["Authorization"] = "Bearer " + data.access_token;
205
- originalRequest.headers["Authorization"] = "Bearer " + data.access_token;
206
- processQueue(null, data.access_token);
207
- resolve(instance.request(originalRequest));
208
- }).catch(async (err) => {
209
- if (err && (err?.error_code === "AUTHEN_FAIL" || err?.error_code === "TOKEN_EXPIRED" || err?.error_code === "TOKEN_INCORRECT" || err?.code === "ERR_BAD_REQUEST")) {
210
- await clearAuthToken();
211
- }
212
- if (err && err.response) {
213
- const { error_code } = err.response?.data || {};
214
- if (error_code === "AUTHEN_FAIL") {
215
- await clearAuthToken();
216
- }
217
- }
218
- processQueue(err, null);
219
- }).finally(() => {
220
- isRefreshing = false;
221
- });
222
- });
223
- }
224
- }
225
- return Promise.reject(await handleError(error));
226
- }
227
- );
228
- const handleResponse = (res) => {
229
- if (res && res.data) {
230
- return res.data;
231
- }
232
- return res;
233
- };
234
- const clearAuthToken = async () => {
235
- await localStorage.clearToken();
236
- if (typeof window !== "undefined") {
237
- window.location.href = `/login`;
238
- }
239
- };
240
- function formatUrl(url, db2) {
241
- return url + (db2 ? "?db=" + db2 : "");
242
- }
243
- const responseBody = (response) => response;
244
- const requests = {
245
- get: (url, headers) => instance.get(formatUrl(url, db), headers).then(responseBody),
246
- post: (url, body, headers) => instance.post(formatUrl(url, db), body, { headers }).then(responseBody),
247
- post_excel: (url, body, headers) => instance.post(formatUrl(url, db), body, {
248
- responseType: "arraybuffer",
249
- headers: {
250
- "Content-Type": typeof window !== "undefined" ? "application/json" : "application/javascript",
251
- Accept: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
252
- }
253
- }).then(responseBody),
254
- put: (url, body, headers) => instance.put(formatUrl(url, db), body, headers).then(responseBody),
255
- patch: (url, body) => instance.patch(formatUrl(url, db), body).then(responseBody),
256
- delete: (url, body) => instance.delete(formatUrl(url, db), body).then(responseBody)
257
- };
258
- return requests;
259
- }
260
- };
261
-
262
- exports.axiosClient = axiosClient;
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 };
@@ -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 };